blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
3
264
content_id
stringlengths
40
40
detected_licenses
listlengths
0
85
license_type
stringclasses
2 values
repo_name
stringlengths
5
140
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringclasses
905 values
visit_date
timestamp[us]date
2015-08-09 11:21:18
2023-09-06 10:45:07
revision_date
timestamp[us]date
1997-09-14 05:04:47
2023-09-17 19:19:19
committer_date
timestamp[us]date
1997-09-14 05:04:47
2023-09-06 06:22:19
github_id
int64
3.89k
681M
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
22 values
gha_event_created_at
timestamp[us]date
2012-06-07 00:51:45
2023-09-14 21:58:39
gha_created_at
timestamp[us]date
2008-03-27 23:40:48
2023-08-21 23:17:38
gha_language
stringclasses
141 values
src_encoding
stringclasses
34 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
3
10.4M
extension
stringclasses
115 values
content
stringlengths
3
10.4M
authors
listlengths
1
1
author_id
stringlengths
0
158
222ee0bfd5d5ea6774181bb6b6231300e8da9fb5
58a36a74e92779c6550bbadae9db9e3c71845dfe
/csci111/labs/lab_3/lab3.cpp
13a741fb3723024d496163193d57fcda31121891
[]
no_license
spencermcw/Code
9b34c2c11aa5b1cd4371ea074fa9220bcfdfe660
56cec1000602d2a4b83a085b2a7afd7ad3432016
refs/heads/master
2021-01-21T13:15:05.513865
2016-04-23T01:37:25
2016-04-23T01:37:25
56,894,455
0
3
null
null
null
null
UTF-8
C++
false
false
106
cpp
#include <iostream> using namespace std; int main() { cout << "Hello there world!\n"; return 0; }
[ "Spencer@Spencers-MacBook-Pro-2.local" ]
Spencer@Spencers-MacBook-Pro-2.local
9fbd15a460c034f30d9b505608bfd06f2604a797
cffc460605febc80e8bb7c417266bde1bd1988eb
/before2020/UVa_ACM/103 - Volume CIII/UVa 10311(prime).cpp
0f907d4ae0e8911bd96a880674f0682b8a1c0aff
[]
no_license
m80126colin/Judge
f79b2077f2bf67a3b176d073fcdf68a8583d5a2c
56258ea977733e992b11f9e0cb74d630799ba274
refs/heads/master
2021-06-11T04:25:27.786735
2020-05-21T08:55:03
2020-05-21T08:55:03
19,424,030
7
4
null
null
null
null
UTF-8
C++
false
false
992
cpp
/** * @judge UVa * @id 10311 * @tag Prime */ #include <stdio.h> #include <math.h> #include <iostream> #include <map> #include <math.h> using namespace std; map<int, int> M; inline int isprime(int x) { if (x < 2) return 0; if (M[x]) return M[x] > 1; int y = sqrt((double) x); for (int i = 2; i <= y; i++) { if (!(x % i)) { M[x] = 1; return 0; } } M[x] = 2; return 1; } int main() { int n, t; M.clear(); M[1] = 1; while (scanf("%d", &n) != EOF) { if (n & 1) { if (isprime(n - 2)) printf("%d is the sum of 2 and %d.\n", n, n - 2); else printf("%d is not the sum of two primes!\n", n); } else { t = n / 2; if (!(t & 1)) t--; for (; t > 2; t -= 2) { if (t >= n - t) continue; if (isprime(t) && isprime(n - t)) { printf("%d is the sum of %d and %d.\n", n, t, n - t); break; } } if (t <= 2) printf("%d is not the sum of two primes!\n", n); } } }
[ "m80126colin@gmail.com" ]
m80126colin@gmail.com
7d6fbdd7118ab2b8f7bb6013636cd0fd7fa505bc
425eb72d3d8dc0492c649e0a29f757c3e9750d78
/Source/GUI/AppMenu/Formats/Scrolling/AppMenu_Scrolling_InputHandler.cpp
b9198f47900bb23d3bd2528f2e0a4e0615676b2b
[]
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
4,385
cpp
#define APPMENU_IMPLEMENTATION #include "AppMenu_Scrolling_InputHandler.h" #include "AppMenu_Scrolling_FolderComponent.h" #include "AppMenu_Scrolling_MenuComponent.h" #include "Layout_Transition_Animator.h" // Initializes the InputHandler, setting it to handle the menu component's // input events. AppMenu::Scrolling::InputHandler::InputHandler (AppMenu::MenuComponent* menuComponent, AppMenu::Controller* controller) : AppMenu::InputHandler(menuComponent, controller) { } // Handles a key event received from the menu. bool AppMenu::Scrolling::InputHandler::keyPressed (const AppMenu::InputHandler::KeyType keyType) { MenuComponent* scrollingMenu = dynamic_cast<MenuComponent*> (getMenuComponent()); const int openFolderCount = scrollingMenu->openFolderCount(); // There should always be an open folder component jassert(openFolderCount > 0); FolderComponent* activeFolder = dynamic_cast<FolderComponent*> (getMenuComponent()->getOpenFolder(openFolderCount - 1)); // The open folder component should always be a scrolling folder jassert(activeFolder != nullptr); // Ignore key events if the folder is animating if (Layout::Transition::Animator::isAnimating(activeFolder)) { return true; } const int selectedIndex = activeFolder->getSelectedIndex(); const bool firstItemSelected = (selectedIndex == 0); const bool lastItemSelected = (selectedIndex == activeFolder->getFolderSize() - 1); switch(keyType) { case KeyType::Up: if (!firstItemSelected) { activeFolder->setSelectedIndex(selectedIndex - 1); scrollingMenu->updateMenuLayout(false); } return true; case KeyType::Down: if (!lastItemSelected) { activeFolder->setSelectedIndex(selectedIndex + 1); scrollingMenu->updateMenuLayout(false); } return true; case KeyType::Left: case KeyType::Cancel: if (selectedIndex >= 0) { activeFolder->setSelectedIndex(-1); scrollingMenu->updateMenuLayout(true); } else if (openFolderCount > 1) { getMenuComponent()->closeActiveFolder(); } return true; case KeyType::Right: case KeyType::Select: if (selectedIndex >= 0) { getController()->activateMenuItem (activeFolder->getSelectedItem()); } else { activeFolder->setSelectedIndex(0); getMenuComponent()->updateMenuLayout(); } return true; case KeyType::Edit: { MenuItem folder= activeFolder->getFolderMenuItem(); if (selectedIndex >= 0) { getController()->showContextMenu (folder.getFolderItem(selectedIndex)); } else { getController()->showContextMenu (folder, folder.getMovableChildCount()); } return true; } case KeyType::Tab: activeFolder->setSelectedIndex(lastItemSelected ? 0 : selectedIndex + 1); scrollingMenu->updateMenuLayout(lastItemSelected); return true; } return false; } // Handles clicks to menu item buttons. void AppMenu::Scrolling::InputHandler::menuItemClicked (const AppMenu::MenuButton* clickedButton, const bool rightClicked) { if (!clickedButton->isSelected()) { FolderComponent* parentFolder = static_cast<FolderComponent*>( clickedButton->getParentComponent()); parentFolder->setSelectedIndex( clickedButton->getMenuItem().getIndex()); getMenuComponent()->updateMenuLayout(); } else { if (rightClicked) { DBG("Right-Clicked " << clickedButton->getMenuItem().getTitle()); getController()->showContextMenu(clickedButton->getMenuItem()); } else { DBG("Left-Clicked " << clickedButton->getMenuItem().getTitle()); getController()->activateMenuItem(clickedButton->getMenuItem()); } } }
[ "anthony0857@gmail.com" ]
anthony0857@gmail.com
e096212da7e1b95d1fba9ea281436eaf20f4a330
ec3a754ac21137a04250ef7dc9e5152e94fb7bd3
/damBreakFine/0.75/U
66154faa5c698d84f0f5ede7072fb5b5cd1fb868
[]
no_license
johnathoncobabe/425
2336a62cd0f575b777cd549a886a15b5799b6c72
e1ee61fb87a1078683d71a1d15131713c435cfae
refs/heads/master
2021-01-10T10:00:11.128510
2015-10-02T17:54:40
2015-10-02T17:54:40
43,466,206
0
0
null
null
null
null
UTF-8
C++
false
false
225,427
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.4.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volVectorField; location "0.75"; object U; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 1 -1 0 0 0 0]; internalField nonuniform List<vector> 7700 ( (1.1196e-35 3.54945e-36 0) (9.4951e-35 2.32607e-35 0) (4.64932e-34 1.54448e-34 0) (4.30088e-33 1.14414e-34 0) (3.92108e-33 -2.96481e-34 0) (-3.91899e-33 -2.9601e-34 0) (-4.28749e-33 1.18777e-34 0) (-3.57952e-34 1.81664e-34 0) (4.66838e-34 2.01522e-34 0) (4.76769e-33 2.77168e-34 0) (8.32871e-33 -1.53967e-34 0) (5.73409e-34 -4.10895e-34 0) (-3.34728e-33 1.14413e-34 0) (4.02952e-33 2.68852e-34 0) (4.31442e-33 -1.18837e-34 0) (4.66838e-34 -1.54989e-34 0) (9.53242e-35 -2.33332e-35 0) (1.16888e-35 -3.89331e-36 0) (1.68055e-36 -4.78522e-37 0) (1.94923e-37 -5.9795e-38 0) (2.33048e-38 -6.52347e-39 0) (2.47547e-39 -7.01315e-40 0) (2.60242e-40 -6.93331e-41 0) (2.76879e-41 -6.07195e-42 0) (2.78664e-41 6.12485e-42 0) (2.62418e-40 6.98856e-41 0) (2.49831e-39 7.07383e-40 0) (2.35391e-38 6.58607e-39 0) (1.97134e-37 6.04257e-38 0) (1.70133e-36 4.84331e-37 0) (1.18599e-35 3.94644e-36 0) (9.68048e-35 2.37505e-35 0) (4.76799e-34 1.58391e-34 0) (4.39766e-33 1.38157e-34 0) (4.39766e-33 -1.38157e-34 0) (4.76799e-34 -1.58391e-34 0) (9.68048e-35 -2.37505e-35 0) (1.18599e-35 -3.94644e-36 0) (1.70133e-36 -4.84331e-37 0) (1.97131e-37 -6.04297e-38 0) (2.35244e-38 -6.61557e-39 0) (2.41157e-39 -8.92728e-40 0) (-8.47327e-41 -1.16989e-39 0) (-1.31821e-39 -4.44812e-39 0) (8.68519e-41 -1.77746e-38 0) (1.67499e-39 -2.94102e-39 0) (4.02053e-36 -1.6046e-36 0) (3.04321e-35 -1.23573e-35 0) (1.44492e-34 -8.19508e-35 0) (8.57749e-34 -6.05167e-35 0) (7.40086e-34 1.57037e-34 0) (-7.39273e-34 1.56807e-34 0) (-8.52767e-34 -6.2717e-35 0) (-1.09587e-34 -9.63218e-35 0) (1.4523e-34 -1.0696e-34 0) (1.00297e-33 -1.46662e-34 0) (1.63265e-33 8.17172e-35 0) (1.79969e-34 2.17554e-34 0) (-5.59958e-34 -6.05163e-35 0) (7.75548e-34 -1.42464e-34 0) (8.62791e-34 6.27447e-35 0) (1.4523e-34 8.22135e-35 0) (3.05913e-35 1.24042e-35 0) (4.32956e-36 1.97093e-36 0) (6.43778e-37 2.32963e-37 0) (7.96306e-38 2.77475e-38 0) (9.77193e-39 2.90986e-39 0) (1.0755e-39 3.01462e-40 0) (1.15295e-40 2.88916e-41 0) (1.25626e-41 2.46741e-42 0) (1.26458e-41 -2.48792e-42 0) (1.16294e-40 -2.91108e-41 0) (1.08583e-39 -3.03928e-40 0) (9.87547e-39 -2.93602e-39 0) (8.05886e-38 -2.80196e-38 0) (6.52452e-37 -2.35565e-37 0) (4.39919e-36 -1.99571e-36 0) (3.11533e-35 -1.26088e-35 0) (1.48896e-34 -8.39456e-35 0) (8.88892e-34 -7.31223e-35 0) (8.88892e-34 7.31223e-35 0) (1.48896e-34 8.39456e-35 0) (3.11533e-35 1.26088e-35 0) (4.39919e-36 1.99571e-36 0) (6.52449e-37 2.35562e-37 0) (8.05662e-38 2.79903e-38 0) (9.73359e-39 2.71296e-39 0) (2.42629e-40 -1.12824e-39 0) (-3.28701e-39 -8.63973e-39 0) (-1.33186e-38 -3.60136e-38 0) (7.7764e-40 -1.46032e-37 0) (1.6044e-38 -2.41918e-38 0) (1.13981e-36 -6.08946e-37 0) (7.23151e-36 -4.43079e-36 0) (2.62294e-35 -2.34807e-35 0) (1.21093e-34 -1.58558e-35 0) (1.01131e-34 4.46196e-35 0) (-1.00881e-34 4.4524e-35 0) (-1.19719e-34 -1.67051e-35 0) (-1.77839e-35 -2.86819e-35 0) (2.64536e-35 -3.2462e-35 0) (1.47543e-34 -4.09496e-35 0) (2.30638e-34 2.33831e-35 0) (3.48439e-35 6.04751e-35 0) (-6.62356e-35 -1.58555e-35 0) (1.09742e-34 -3.93343e-35 0) (1.22487e-34 1.67171e-35 0) (2.64536e-35 2.35902e-35 0) (7.27266e-36 4.44936e-36 0) (1.17683e-36 7.5409e-37 0) (1.94861e-37 9.6952e-38 0) (2.58289e-38 1.20067e-38 0) (3.3449e-39 1.31858e-39 0) (3.82905e-40 1.40467e-40 0) (4.23501e-41 1.38756e-41 0) (4.73687e-42 1.20796e-42 0) (4.76926e-42 -1.21842e-42 0) (4.27332e-41 -1.39853e-41 0) (3.86786e-40 -1.41674e-40 0) (3.38282e-39 -1.33111e-39 0) (2.61686e-38 -1.21331e-38 0) (1.97815e-37 -9.81275e-38 0) (1.19923e-36 -7.64751e-37 0) (7.44092e-36 -4.53403e-36 0) (2.74288e-35 -2.42447e-35 0) (1.28531e-34 -2.03882e-35 0) (1.28531e-34 2.03882e-35 0) (2.74288e-35 2.42447e-35 0) (7.44092e-36 4.53403e-36 0) (1.19923e-36 7.64748e-37 0) (1.97793e-37 9.81023e-38 0) (2.59998e-38 1.1928e-38 0) (2.30331e-39 -2.48269e-40 0) (-6.11036e-39 -1.01277e-38 0) (-2.65614e-38 -6.30912e-38 0) (-1.05767e-37 -2.66937e-37 0) (5.48256e-39 -1.09941e-36 0) (1.25265e-37 -1.81842e-37 0) (2.28121e-37 -1.96068e-37 0) (1.24876e-36 -1.29219e-36 0) (3.47684e-36 -6.33752e-36 0) (1.3063e-35 -4.14041e-36 0) (1.06487e-35 1.2037e-35 0) (-1.0595e-35 1.20051e-35 0) (-1.2791e-35 -4.40959e-36 0) (-1.99167e-36 -7.86995e-36 0) (3.52444e-36 -8.95739e-36 0) (1.65864e-35 -1.09868e-35 0) (2.51889e-35 6.30342e-36 0) (4.99679e-36 1.61771e-35 0) (-5.64031e-36 -4.13998e-36 0) (1.21681e-35 -1.04754e-35 0) (1.33387e-35 4.41382e-36 0) (3.52444e-36 6.37299e-36 0) (1.25601e-36 1.29697e-36 0) (2.29705e-37 2.37704e-37 0) (4.13553e-38 3.24572e-38 0) (5.8096e-39 4.23759e-39 0) (7.83312e-40 4.8504e-40 0) (9.2608e-41 5.34653e-41 0) (1.04896e-41 5.42741e-42 0) (1.19888e-42 4.82289e-43 0) (1.20729e-42 -4.86616e-43 0) (1.05878e-41 -5.47205e-42 0) (9.3587e-41 -5.39472e-41 0) (7.92681e-40 -4.89931e-40 0) (5.89151e-39 -4.28553e-39 0) (4.20438e-38 -3.28877e-38 0) (2.3471e-37 -2.41445e-37 0) (1.29137e-36 -1.32509e-36 0) (3.71122e-36 -6.57726e-36 0) (1.43533e-35 -5.46458e-36 0) (1.43533e-35 5.46458e-36 0) (3.71122e-36 6.57726e-36 0) (1.29137e-36 1.32508e-36 0) (2.34691e-37 2.41427e-37 0) (4.18879e-38 3.27238e-38 0) (4.694e-39 2.936e-39 0) (-6.9572e-39 -1.00432e-38 0) (-4.725e-38 -6.95034e-38 0) (-1.97356e-37 -4.35576e-37 0) (-7.97813e-37 -1.88464e-36 0) (3.5365e-38 -7.91713e-36 0) (9.27315e-37 -1.30575e-36 0) (3.26892e-38 -8.42689e-38 0) (2.0201e-37 -2.83705e-37 0) (3.83618e-37 -1.23168e-36 0) (1.02999e-36 -7.7302e-37 0) (8.13031e-37 2.31489e-36 0) (-8.02268e-37 2.30807e-36 0) (-9.79995e-37 -8.29394e-37 0) (-1.41702e-37 -1.539e-36 0) (3.91172e-37 -1.76132e-36 0) (1.41977e-36 -2.10168e-36 0) (2.08023e-36 1.21223e-36 0) (6.28864e-37 3.08576e-36 0) (-1.81556e-37 -7.70298e-37 0) (1.05952e-36 -1.98983e-36 0) (1.07836e-36 8.30384e-37 0) (3.91172e-37 1.22818e-36 0) (1.99706e-37 2.67705e-37 0) (4.06898e-38 5.17927e-38 0) (7.92879e-39 7.42416e-39 0) (1.16864e-39 1.00592e-39 0) (1.63382e-40 1.18873e-40 0) (1.98431e-41 1.34247e-41 0) (2.29544e-42 1.39154e-42 0) (2.67162e-43 1.25509e-43 0) (2.69077e-43 -1.26666e-43 0) (2.31757e-42 -1.40332e-42 0) (2.00606e-41 -1.35501e-41 0) (1.65428e-40 -1.20125e-40 0) (1.18614e-39 -1.01792e-39 0) (8.07185e-39 -7.52933e-39 0) (4.16904e-38 -5.2677e-38 0) (2.06426e-37 -2.74097e-37 0) (4.23604e-37 -1.27231e-36 0) (1.23503e-36 -1.04428e-36 0) (1.23503e-36 1.04428e-36 0) (4.23603e-37 1.27231e-36 0) (2.06412e-37 2.74086e-37 0) (4.15651e-38 5.25703e-38 0) (7.04293e-39 6.54847e-39 0) (-6.82063e-39 -7.15625e-39 0) (-5.24468e-38 -6.46913e-38 0) (-3.27408e-37 -4.36288e-37 0) (-1.39598e-36 -2.79564e-36 0) (-5.76223e-36 -1.24537e-35 0) (2.05702e-37 -5.34628e-35 0) (6.55537e-36 -8.81247e-36 0) (-6.1602e-38 -3.07933e-37 0) (5.66415e-38 -1.73284e-37 0) (4.94165e-38 -3.03899e-37 0) (5.54547e-38 -1.54394e-37 0) (3.53021e-38 4.12083e-37 0) (-3.10697e-38 4.13939e-37 0) (-3.86464e-38 -1.47304e-37 0) (-1.51801e-39 -2.79248e-37 0) (3.85505e-38 -3.2048e-37 0) (8.50535e-38 -3.76551e-37 0) (1.15001e-37 2.17474e-37 0) (7.35584e-38 5.51603e-37 0) (4.06874e-38 -1.35559e-37 0) (6.98253e-38 -3.54521e-37 0) (5.44965e-38 1.47425e-37 0) (3.85491e-38 2.20736e-37 0) (2.90281e-38 5.01117e-38 0) (6.45662e-39 1.01695e-38 0) (1.33611e-39 1.51423e-39 0) (2.04675e-40 2.11986e-40 0) (2.94439e-41 2.57142e-41 0) (3.65716e-42 2.96575e-42 0) (4.30476e-43 3.1275e-43 0) (5.08908e-44 2.85689e-44 0) (5.12626e-44 -2.88383e-44 0) (4.34731e-43 -3.15465e-43 0) (3.6985e-42 -2.9943e-42 0) (2.98268e-41 -2.59951e-41 0) (2.07893e-40 -2.14633e-40 0) (1.36181e-39 -1.53691e-39 0) (6.63099e-39 -1.03551e-38 0) (3.01522e-38 -5.1408e-38 0) (4.36105e-38 -2.2934e-37 0) (7.66562e-38 -1.86941e-37 0) (7.66555e-38 1.86941e-37 0) (4.3602e-38 2.29334e-37 0) (3.00702e-38 5.13483e-38 0) (5.87854e-39 9.77447e-39 0) (-4.89239e-39 -3.8745e-39 0) (-4.92106e-38 -4.55882e-38 0) (-3.30735e-37 -3.70564e-37 0) (-2.10405e-36 -2.55791e-36 0) (-9.22429e-36 -1.69062e-35 0) (-3.89633e-35 -7.82847e-35 0) (9.97853e-37 -3.46427e-34 0) (4.31846e-35 -5.68528e-35 0) (-4.42691e-37 -1.985e-36 0) (2.26451e-37 -8.13212e-37 0) (9.66546e-38 -5.93626e-37 0) (6.09727e-38 -1.42968e-37 0) (1.11964e-38 4.10716e-38 0) (6.22063e-39 6.20603e-38 0) (4.49069e-39 -2.36897e-38 0) (1.71554e-39 -4.48677e-38 0) (3.69258e-39 -5.15578e-38 0) (8.45314e-40 -5.97135e-38 0) (-7.44404e-40 3.45333e-38 0) (8.6938e-39 8.72881e-38 0) (1.17088e-38 -2.1135e-38 0) (2.30472e-39 -5.59311e-38 0) (-1.62238e-39 2.31765e-38 0) (3.6839e-39 3.51111e-38 0) (4.11353e-39 8.26307e-39 0) (9.73909e-40 1.74103e-39 0) (2.10925e-40 2.67592e-40 0) (3.32712e-41 3.8453e-41 0) (4.89731e-42 4.76731e-42 0) (6.19343e-43 5.59419e-43 0) (7.39582e-44 5.98637e-44 0) (8.85662e-45 5.52722e-45 0) (8.92234e-45 -5.58036e-45 0) (7.47044e-44 -6.03945e-44 0) (6.26522e-43 -5.64942e-43 0) (4.96301e-42 -4.821e-42 0) (3.3815e-41 -3.89513e-41 0) (2.15187e-40 -2.71788e-40 0) (1.00213e-39 -1.77459e-39 0) (4.28993e-39 -8.49109e-39 0) (4.437e-39 -3.6575e-38 0) (1.4499e-39 -2.96215e-38 0) (1.44587e-39 2.96189e-38 0) (4.3909e-39 3.65484e-38 0) (3.84137e-39 8.21119e-39 0) (-3.16959e-39 -9.83562e-40 0) (-3.49829e-38 -2.5822e-38 0) (-2.83472e-37 -2.2499e-37 0) (-1.94152e-36 -1.8662e-36 0) (-1.27037e-35 -1.33117e-35 0) (-5.76672e-35 -9.15472e-35 0) (-2.51605e-34 -4.47087e-34 0) (3.71226e-36 -2.0417e-33 0) (2.7081e-34 -3.35855e-34 0) (-2.52056e-36 -1.21697e-35 0) (1.89245e-36 -4.958e-36 0) (7.01198e-37 -3.51861e-36 0) (4.29926e-37 -7.51334e-37 0) (9.14579e-38 -1.39999e-37 0) (2.00065e-38 -1.24148e-38 0) (4.15913e-39 -6.61462e-39 0) (7.90728e-40 -7.1846e-39 0) (4.13481e-40 -7.88216e-39 0) (-7.14802e-40 -8.9926e-39 0) (-1.35183e-39 5.19925e-39 0) (1.04512e-39 1.31156e-38 0) (2.01455e-39 -3.14044e-39 0) (-2.39788e-40 -8.38313e-39 0) (-9.08344e-40 3.46752e-39 0) (3.61034e-40 5.29441e-39 0) (5.57695e-40 1.27879e-39 0) (1.37968e-40 2.77815e-40 0) (3.08762e-41 4.37768e-41 0) (4.98408e-42 6.4267e-42 0) (7.47102e-43 8.10925e-43 0) (9.5911e-44 9.6529e-44 0) (1.15913e-44 1.04546e-44 0) (1.40349e-45 9.7391e-46 0) (1.41405e-45 -9.83424e-46 0) (1.17104e-44 -1.05489e-44 0) (9.70465e-44 -9.7502e-44 0) (7.57384e-43 -8.20292e-43 0) (5.06814e-42 -6.51256e-42 0) (3.15247e-41 -4.4489e-41 0) (1.42181e-40 -2.83411e-40 0) (5.83381e-40 -1.31595e-39 0) (4.6646e-40 -5.52689e-39 0) (-5.00546e-40 -4.45643e-39 0) (-5.19427e-40 4.44565e-39 0) (2.48152e-40 5.41709e-39 0) (-1.56533e-39 1.45952e-40 0) (-2.01314e-38 -1.14174e-38 0) (-1.74025e-37 -1.12844e-37 0) (-1.43307e-36 -9.97552e-37 0) (-1.00878e-35 -8.5631e-36 0) (-6.81879e-35 -6.39357e-35 0) (-3.23079e-34 -4.66451e-34 0) (-1.45908e-33 -2.45193e-33 0) (3.81145e-36 -1.18158e-32 0) (1.50973e-33 -1.91927e-33 0) (-1.05986e-35 -7.14664e-35 0) (1.66155e-35 -2.77587e-35 0) (5.36268e-36 -1.97117e-35 0) (2.81853e-36 -4.08344e-36 0) (5.74796e-37 -7.8869e-37 0) (1.14163e-37 -1.1298e-37 0) (1.71953e-38 -1.62279e-38 0) (2.46497e-39 -2.84834e-39 0) (3.33086e-40 -1.32616e-39 0) (-1.16048e-40 -1.28433e-39 0) (-2.56419e-40 7.27962e-40 0) (1.28729e-40 1.83803e-39 0) (2.92603e-40 -4.35689e-40 0) (-6.74058e-41 -1.17237e-39 0) (-1.64762e-40 4.84042e-40 0) (3.79304e-41 7.44505e-40 0) (7.33803e-41 1.83956e-40 0) (1.86943e-41 4.09474e-41 0) (4.28549e-42 6.58693e-42 0) (7.04227e-43 9.83907e-43 0) (1.07112e-43 1.25998e-43 0) (1.39198e-44 1.51781e-44 0) (1.69905e-45 1.66086e-45 0) (2.07624e-46 1.55897e-46 0) (2.09203e-46 -1.57442e-46 0) (1.71675e-45 -1.67608e-45 0) (1.40874e-44 -1.53339e-44 0) (1.08616e-43 -1.27484e-43 0) (7.16384e-43 -9.97395e-43 0) (4.37796e-42 -6.69749e-42 0) (1.92836e-41 -4.18032e-41 0) (7.68772e-41 -1.89545e-40 0) (5.14462e-41 -7.78823e-40 0) (-1.19365e-40 -6.27626e-40 0) (-1.98448e-40 5.95105e-40 0) (-8.73605e-40 4.43678e-40 0) (-9.15986e-39 -3.42992e-39 0) (-8.87499e-38 -3.67655e-38 0) (-7.78625e-37 -3.63395e-37 0) (-6.5938e-36 -3.31892e-36 0) (-4.79889e-35 -2.99091e-35 0) (-3.38693e-34 -2.40249e-34 0) (-1.68893e-33 -1.91188e-33 0) (-8.09989e-33 -1.12835e-32 0) (-5.26005e-35 -5.69678e-32 0) (8.03323e-33 -9.36309e-33 0) (-1.26583e-35 -3.72169e-34 0) (1.48281e-34 -1.47077e-34 0) (4.01925e-35 -1.07481e-34 0) (1.67527e-35 -2.12555e-35 0) (3.18899e-36 -3.94846e-36 0) (6.00873e-37 -5.50217e-37 0) (8.66892e-38 -7.36312e-38 0) (1.19888e-38 -8.72353e-39 0) (1.44678e-39 -1.11439e-39 0) (1.43779e-40 -2.68418e-40 0) (-1.99074e-41 8.79139e-41 0) (1.73773e-41 2.44845e-40 0) (3.85186e-41 -5.78452e-41 0) (-1.04568e-41 -1.56467e-40 0) (-2.33001e-41 6.45051e-41 0) (4.18861e-42 9.98022e-41 0) (9.2402e-42 2.51041e-41 0) (2.40542e-42 5.69295e-42 0) (5.61523e-43 9.30569e-43 0) (9.36402e-44 1.40866e-43 0) (1.44142e-44 1.82476e-44 0) (1.89284e-45 2.21851e-45 0) (2.32999e-46 2.44709e-46 0) (2.87013e-47 2.31039e-47 0) (2.89202e-47 -2.33356e-47 0) (2.35432e-46 -2.46982e-46 0) (1.9156e-45 -2.24167e-45 0) (1.46148e-44 -1.84676e-44 0) (9.52166e-44 -1.42851e-43 0) (5.72937e-43 -9.46777e-43 0) (2.47044e-42 -5.81821e-42 0) (9.53089e-42 -2.59304e-41 0) (3.90215e-42 -1.05052e-40 0) (-4.12921e-41 -9.00537e-41 0) (-2.91751e-40 7.34912e-42 0) (-2.96184e-39 -7.59727e-40 0) (-3.00764e-38 -9.4871e-39 0) (-2.94896e-37 -9.88757e-38 0) (-2.65034e-36 -1.01093e-36 0) (-2.3135e-35 -9.69905e-36 0) (-1.75025e-34 -9.48678e-35 0) (-1.29269e-33 -8.52964e-34 0) (-6.85352e-33 -7.8006e-33 0) (-3.47949e-32 -5.36681e-32 0) (-4.59247e-34 -3.05502e-31 0) (3.14667e-32 -4.73467e-32 0) (-8.33038e-36 -2.67394e-36 0) (-7.59162e-35 -1.8349e-35 0) (-3.85249e-34 -1.34284e-34 0) (-3.91631e-33 -1.025e-34 0) (-3.59955e-33 2.58417e-34 0) (3.59955e-33 2.58417e-34 0) (3.91631e-33 -1.025e-34 0) (3.85254e-34 -1.34282e-34 0) (7.6014e-35 -1.83537e-35 0) (8.58553e-36 -2.90702e-36 0) (1.17745e-36 -3.30685e-37 0) (1.25559e-37 -3.95128e-38 0) (-1.16263e-42 -7.96415e-39 0) (-1.25572e-37 -3.95162e-38 0) (-1.1776e-36 -3.30723e-37 0) (-8.58697e-36 -2.90742e-36 0) (-7.60286e-35 -1.83578e-35 0) (-3.85382e-34 -1.34322e-34 0) (-3.91751e-33 -1.02834e-34 0) (-3.60827e-33 2.5547e-34 0) (3.52235e-33 2.39728e-34 0) (3.52235e-33 -2.39728e-34 0) (-3.60827e-33 -2.5547e-34 0) (-3.91751e-33 1.02834e-34 0) (-3.85382e-34 1.34322e-34 0) (-7.60287e-35 1.83577e-35 0) (-8.58842e-36 2.90701e-36 0) (-1.19226e-36 3.26669e-37 0) (-2.55286e-37 -3.66556e-40 0) (-1.20508e-36 -3.30277e-37 0) (-8.70086e-36 -2.94211e-36 0) (-7.70779e-35 -1.86488e-35 0) (-3.92776e-34 -1.36894e-34 0) (-3.98481e-33 -1.18241e-34 0) (-3.91631e-33 1.39876e-34 0) (-1.23926e-39 2.74457e-34 0) (3.9163e-33 1.39873e-34 0) (3.9847e-33 -1.18271e-34 0) (3.91571e-34 -1.36956e-34 0) (7.11995e-35 -1.67674e-35 0) (-3.00034e-36 1.21194e-36 0) (-2.42939e-35 9.74531e-36 0) (-1.20445e-34 7.12322e-35 0) (-7.87112e-34 5.42196e-35 0) (-6.88223e-34 -1.36855e-34 0) (6.88223e-34 -1.36855e-34 0) (7.87112e-34 5.42196e-35 0) (1.20448e-34 7.12319e-35 0) (2.43381e-35 9.75603e-36 0) (3.18282e-36 1.4666e-36 0) (4.4981e-37 1.60419e-37 0) (5.12169e-38 1.82421e-38 0) (-5.33488e-43 3.53875e-39 0) (-5.12228e-38 1.82435e-38 0) (-4.49873e-37 1.60435e-37 0) (-3.18345e-36 1.46678e-36 0) (-2.43441e-35 9.75782e-36 0) (-1.20501e-34 7.12501e-35 0) (-7.87568e-34 5.43818e-35 0) (-6.91458e-34 -1.3537e-34 0) (6.63429e-34 -1.26936e-34 0) (6.63429e-34 1.26936e-34 0) (-6.91458e-34 1.3537e-34 0) (-7.87568e-34 -5.43818e-35 0) (-1.20501e-34 -7.12501e-35 0) (-2.43442e-35 -9.7578e-36 0) (-3.18408e-36 -1.4666e-36 0) (-4.56012e-37 -1.58635e-37 0) (-1.04241e-37 1.57486e-40 0) (-4.61348e-37 1.60244e-37 0) (-3.22983e-36 1.48288e-36 0) (-2.47416e-35 9.89996e-36 0) (-1.23228e-34 7.25545e-35 0) (-8.08671e-34 6.26529e-35 0) (-7.87112e-34 -7.4056e-35 0) (-5.87969e-40 -1.45433e-34 0) (7.87106e-34 -7.40548e-35 0) (8.08622e-34 6.2661e-35 0) (1.22733e-34 7.24792e-35 0) (2.21372e-35 7.44279e-36 0) (-8.55714e-37 4.59392e-37 0) (-5.83399e-36 3.51018e-36 0) (-2.20053e-35 2.05286e-35 0) (-1.12054e-34 1.44424e-35 0) (-9.51407e-35 -3.91208e-35 0) (9.51407e-35 -3.91208e-35 0) (1.12054e-34 1.44424e-35 0) (2.20056e-35 2.05283e-35 0) (5.84137e-36 3.51382e-36 0) (8.70953e-37 5.60781e-37 0) (1.37006e-37 6.67961e-38 0) (1.667e-38 7.88529e-39 0) (-2.05187e-43 1.60205e-39 0) (-1.66723e-38 7.88596e-39 0) (-1.37029e-37 6.68036e-38 0) (-8.71176e-37 5.60862e-37 0) (-5.84346e-36 3.51463e-36 0) (-2.20227e-35 2.05362e-35 0) (-1.12193e-34 1.451e-35 0) (-9.60288e-35 -3.85522e-35 0) (8.91602e-35 -3.55394e-35 0) (8.91602e-35 3.55394e-35 0) (-9.60288e-35 3.85522e-35 0) (-1.12193e-34 -1.451e-35 0) (-2.20227e-35 -2.05362e-35 0) (-5.84348e-36 -3.51462e-36 0) (-8.71402e-37 -5.6078e-37 0) (-1.39142e-37 -6.59883e-38 0) (-3.39851e-38 7.29946e-41 0) (-1.40965e-37 6.67149e-38 0) (-8.86199e-37 5.67777e-37 0) (-5.9634e-36 3.57352e-36 0) (-2.27545e-35 2.10294e-35 0) (-1.17146e-34 1.74552e-35 0) (-1.12054e-34 -2.16052e-35 0) (-1.24178e-40 -4.2194e-35 0) (1.12053e-34 -2.16046e-35 0) (1.17138e-34 1.74592e-35 0) (2.26781e-35 2.10062e-35 0) (5.5504e-36 2.68191e-36 0) (-1.73136e-37 1.44321e-37 0) (-1.01741e-36 1.02442e-36 0) (-2.93783e-36 5.55529e-36 0) (-1.2212e-35 3.79787e-36 0) (-1.0147e-35 -1.05821e-35 0) (1.0147e-35 -1.05821e-35 0) (1.2212e-35 3.79787e-36 0) (2.93779e-36 5.55528e-36 0) (1.01802e-36 1.02607e-36 0) (1.71043e-37 1.77403e-37 0) (2.92111e-38 2.2439e-38 0) (3.75866e-39 2.79517e-39 0) (-5.27131e-44 5.91126e-40 0) (-3.75923e-39 2.79544e-39 0) (-2.92169e-38 2.24419e-38 0) (-1.71097e-37 1.77434e-37 0) (-1.01851e-36 1.02637e-36 0) (-2.94166e-36 5.55808e-36 0) (-1.22417e-35 3.8206e-36 0) (-1.03219e-35 -1.0402e-35 0) (9.09931e-36 -9.53335e-36 0) (9.09931e-36 9.53335e-36 0) (-1.03219e-35 1.0402e-35 0) (-1.22417e-35 -3.8206e-36 0) (-2.94166e-36 -5.55808e-36 0) (-1.01852e-36 -1.02636e-36 0) (-1.71152e-37 -1.77402e-37 0) (-2.97132e-38 -2.21408e-38 0) (-7.67353e-39 2.77791e-41 0) (-3.01393e-38 2.2408e-38 0) (-1.74473e-37 1.79869e-37 0) (-1.04387e-36 1.046e-36 0) (-3.08299e-36 5.71275e-36 0) (-1.30848e-35 4.66647e-36 0) (-1.2212e-35 -5.89547e-36 0) (-1.70663e-41 -1.14709e-35 0) (1.22119e-35 -5.89534e-36 0) (1.30843e-35 4.66705e-36 0) (3.07764e-36 5.70181e-36 0) (1.00606e-36 7.74376e-37 0) (-3.21005e-38 3.12013e-38 0) (-1.63622e-37 2.11687e-37 0) (-3.26494e-37 1.07225e-36 0) (-9.85966e-37 7.11742e-37 0) (-7.97503e-37 -2.04076e-36 0) (7.97503e-37 -2.04076e-36 0) (9.85964e-37 7.11743e-37 0) (3.26462e-37 1.07226e-36 0) (1.63524e-37 2.12137e-37 0) (3.04736e-38 3.87387e-38 0) (5.627e-39 5.14451e-39 0) (7.57902e-40 6.65182e-40 0) (-1.19053e-44 1.45115e-40 0) (-7.58028e-40 6.65252e-40 0) (-5.62826e-39 5.14527e-39 0) (-3.04852e-38 3.87465e-38 0) (-1.63627e-37 2.12211e-37 0) (-3.27243e-37 1.07293e-36 0) (-9.91695e-37 7.1696e-37 0) (-8.28758e-37 -2.00136e-36 0) (6.28248e-37 -1.82341e-36 0) (6.28248e-37 1.82341e-36 0) (-8.28758e-37 2.00136e-36 0) (-9.91695e-37 -7.1696e-37 0) (-3.27243e-37 -1.07293e-36 0) (-1.63628e-37 -2.1221e-37 0) (-3.0497e-38 -3.87386e-38 0) (-5.73218e-39 -5.07128e-39 0) (-1.54932e-39 6.96727e-42 0) (-5.82093e-39 5.13671e-39 0) (-3.11635e-38 3.93228e-38 0) (-1.68475e-37 2.16688e-37 0) (-3.51986e-37 1.10645e-36 0) (-1.12396e-36 8.89693e-37 0) (-9.85965e-37 -1.14645e-36 0) (-7.04332e-43 -2.22333e-36 0) (9.85966e-37 -1.14644e-36 0) (1.1241e-36 8.89701e-37 0) (3.5306e-37 1.1034e-36 0) (1.70558e-37 1.57883e-37 0) (-5.27883e-39 6.09394e-39 0) (-2.40121e-38 3.96212e-38 0) (-3.21891e-38 1.92882e-37 0) (-4.92455e-38 1.25838e-37 0) (-3.70064e-38 -3.67314e-37 0) (3.70064e-38 -3.67314e-37 0) (4.92452e-38 1.25839e-37 0) (3.2182e-38 1.9289e-37 0) (2.39669e-38 3.97524e-38 0) (4.85674e-39 7.62433e-39 0) (9.51475e-40 1.05166e-39 0) (1.32964e-40 1.40565e-40 0) (-2.29344e-45 3.14489e-41 0) (-1.32988e-40 1.40581e-40 0) (-9.51712e-40 1.05183e-39 0) (-4.85888e-39 7.62606e-39 0) (-2.39855e-38 3.97683e-38 0) (-3.23192e-38 1.93031e-37 0) (-5.02155e-38 1.26907e-37 0) (-4.20004e-38 -3.59549e-37 0) (1.20692e-38 -3.26494e-37 0) (1.20692e-38 3.26494e-37 0) (-4.20004e-38 3.59549e-37 0) (-5.02155e-38 -1.26907e-37 0) (-3.23192e-38 -1.93031e-37 0) (-2.39857e-38 -3.97681e-38 0) (-4.86105e-39 -7.62432e-39 0) (-9.70491e-40 -1.03578e-39 0) (-2.72113e-40 1.53862e-42 0) (-9.86461e-40 1.04993e-39 0) (-4.97755e-39 7.7473e-39 0) (-2.48002e-38 4.0679e-38 0) (-3.62057e-38 1.99588e-37 0) (-6.91884e-38 1.58894e-37 0) (-4.92452e-38 -2.07479e-37 0) (2.85126e-43 -4.0131e-37 0) (4.92495e-38 -2.07479e-37 0) (6.92439e-38 1.58866e-37 0) (3.66415e-38 1.98838e-37 0) (2.62084e-38 2.91477e-38 0) (-6.78069e-40 9.84632e-40 0) (-3.41443e-39 6.34864e-39 0) (-3.0559e-39 3.06744e-38 0) (1.64539e-39 1.97014e-38 0) (1.90158e-39 -5.84963e-38 0) (-1.90113e-39 -5.84959e-38 0) (-1.64273e-39 1.97059e-38 0) (3.07186e-39 3.07064e-38 0) (3.41686e-39 6.56125e-39 0) (7.34795e-40 1.30764e-39 0) (1.50592e-40 1.86176e-40 0) (2.16414e-41 2.55502e-41 0) (-4.02933e-46 5.83851e-42 0) (-2.16456e-41 2.55533e-41 0) (-1.50633e-40 1.86209e-40 0) (-7.35159e-40 1.30797e-39 0) (-3.41996e-39 6.5642e-39 0) (-3.09423e-39 3.0732e-38 0) (1.48901e-39 1.9895e-38 0) (1.14401e-39 -5.71626e-38 0) (-5.47176e-39 -5.17455e-38 0) (-5.47176e-39 5.17455e-38 0) (1.14401e-39 5.71626e-38 0) (1.48901e-39 -1.9895e-38 0) (-3.09423e-39 -3.07319e-38 0) (-3.42e-39 -6.56417e-39 0) (-7.35527e-40 -1.30764e-39 0) (-1.53764e-40 -1.83228e-40 0) (-4.43312e-41 2.90051e-43 0) (-1.56416e-40 1.85851e-40 0) (-7.54431e-40 1.32992e-39 0) (-3.54827e-39 6.72476e-39 0) (-3.6753e-39 3.18505e-38 0) (-1.17069e-39 2.5123e-38 0) (1.64274e-39 -3.32066e-38 0) (1.09381e-43 -6.40792e-38 0) (-1.64147e-39 -3.32071e-38 0) (1.18386e-39 2.51139e-38 0) (3.77508e-39 3.17e-38 0) (3.89421e-39 4.74785e-39 0) (2.56635e-39 8.61204e-40 0) (-6.30105e-41 -5.36474e-40 0) (-1.31216e-40 4.39716e-39 0) (8.84789e-40 2.9071e-39 0) (7.8441e-40 -8.83423e-39 0) (-7.80844e-40 -8.8314e-39 0) (-8.60854e-40 2.93784e-39 0) (3.00216e-40 4.63282e-39 0) (4.65011e-40 1.01615e-39 0) (1.04301e-40 2.08979e-40 0) (2.20835e-41 3.05023e-41 0) (3.24473e-42 4.27789e-42 0) (-6.43586e-47 9.94323e-43 0) (-3.24539e-42 4.27844e-42 0) (-2.20899e-41 3.0508e-41 0) (-1.04357e-40 2.09035e-40 0) (-4.65483e-40 1.01665e-39 0) (-3.0357e-40 4.6371e-39 0) (8.38326e-40 2.96887e-39 0) (6.73529e-40 -8.61784e-39 0) (-1.26876e-39 -7.78395e-39 0) (-1.26876e-39 7.78395e-39 0) (6.73529e-40 8.61784e-39 0) (8.38326e-40 -2.96887e-39 0) (-3.03571e-40 -4.6371e-39 0) (-4.6549e-40 -1.01665e-39 0) (-1.04415e-40 -2.08978e-40 0) (-2.25684e-41 -3.00001e-41 0) (-6.65191e-42 5.00284e-44 0) (-2.29726e-41 3.0446e-41 0) (-1.07242e-40 2.12698e-40 0) (-4.84222e-40 1.04287e-39 0) (-3.8531e-40 4.81508e-39 0) (4.80974e-40 3.77176e-39 0) (8.6089e-40 -5.03217e-39 0) (2.4477e-44 -9.69217e-39 0) (-8.60629e-40 -5.03233e-39 0) (-4.78543e-40 3.76963e-39 0) (4.03109e-40 4.78784e-39 0) (5.46961e-40 7.26583e-40 0) (5.09119e-38 -1.15299e-38 0) (5.49224e-39 -1.06047e-38 0) (1.54063e-39 -8.55012e-40 0) (3.48933e-40 2.38305e-40 0) (1.60368e-40 -1.25908e-39 0) (-1.3478e-40 -1.24445e-39 0) (-1.5529e-40 4.08688e-40 0) (3.14358e-41 6.51778e-40 0) (6.13236e-41 1.46269e-40 0) (1.41505e-41 3.08377e-41 0) (3.06906e-42 4.59487e-42 0) (4.58751e-43 6.55843e-43 0) (-9.54075e-48 1.54635e-43 0) (-4.58848e-43 6.55931e-43 0) (-3.06999e-42 4.59579e-42 0) (-1.41586e-41 3.08466e-41 0) (-6.13899e-41 1.46348e-40 0) (-3.1892e-41 6.52443e-40 0) (1.5237e-40 4.13477e-40 0) (1.22465e-40 -1.21153e-39 0) (-2.01551e-40 -1.09209e-39 0) (-2.01551e-40 1.09209e-39 0) (1.22465e-40 1.21153e-39 0) (1.5237e-40 -4.13477e-40 0) (-3.18921e-41 -6.52443e-40 0) (-6.13909e-41 -1.46347e-40 0) (-1.41669e-41 -3.08377e-41 0) (-3.13869e-42 -4.51675e-42 0) (-9.41091e-43 7.86266e-45 0) (-3.19657e-42 4.58602e-42 0) (-1.45658e-41 3.14066e-41 0) (-6.39858e-41 1.50285e-40 0) (-4.29048e-41 6.78609e-40 0) (1.05674e-40 5.28253e-40 0) (1.55508e-40 -7.10688e-40 0) (4.47865e-45 -1.36656e-39 0) (-1.55463e-40 -7.10723e-40 0) (-1.0528e-40 5.27852e-40 0) (4.57075e-41 6.74192e-40 0) (7.39244e-41 1.03542e-40 0) (7.93796e-37 1.62447e-37 0) (9.47099e-38 -6.76548e-38 0) (1.29435e-38 -9.13554e-39 0) (1.34924e-39 -8.35909e-40 0) (1.53272e-40 -2.44638e-40 0) (-7.02194e-42 -1.7309e-40 0) (-2.094e-41 5.38378e-41 0) (3.54283e-42 8.73687e-41 0) (7.73895e-42 1.99689e-41 0) (1.82288e-42 4.29102e-42 0) (4.02548e-43 6.49698e-43 0) (6.10295e-44 9.39943e-44 0) (-1.15066e-48 2.24102e-44 0) (-6.10404e-44 9.40082e-44 0) (-4.02639e-43 6.49845e-43 0) (-1.82348e-42 4.2925e-42 0) (-7.74118e-42 1.99829e-41 0) (-3.51859e-42 8.75e-41 0) (2.15922e-41 5.49952e-41 0) (1.73155e-41 -1.62373e-40 0) (-2.73449e-41 -1.46125e-40 0) (-2.73449e-41 1.46125e-40 0) (1.73155e-41 1.62373e-40 0) (2.15922e-41 -5.49952e-41 0) (-3.5186e-42 -8.74999e-41 0) (-7.74131e-42 -1.99828e-41 0) (-1.82461e-42 -4.29119e-42 0) (-4.11895e-43 -6.38388e-43 0) (-1.25263e-43 1.14875e-45 0) (-4.19677e-43 6.48416e-43 0) (-1.87758e-42 4.37258e-42 0) (-8.0807e-42 2.05383e-41 0) (-4.9292e-42 9.11302e-41 0) (1.57458e-41 7.05816e-41 0) (2.2004e-41 -9.55993e-41 0) (7.1307e-46 -1.83583e-40 0) (-2.19971e-41 -9.56056e-41 0) (-1.56883e-41 7.05153e-41 0) (5.32716e-42 9.04675e-41 0) (9.49015e-42 1.40257e-41 0) (4.64846e-34 -2.27747e-33 0) (1.45206e-33 -7.48253e-34 0) (3.40872e-34 -5.19457e-34 0) (1.14825e-34 -9.76701e-35 0) (1.99245e-35 -1.71545e-35 0) (3.52976e-36 -2.2951e-36 0) (4.87081e-37 -2.96104e-37 0) (6.53246e-38 -3.36978e-38 0) (7.67149e-39 -3.71562e-39 0) (8.64258e-40 -3.91118e-40 0) (8.63178e-41 -2.78806e-41 0) (1.0298e-41 1.89639e-41 0) (4.28285e-42 -5.51601e-42 0) (-9.32244e-43 -1.42307e-41 0) (-2.15907e-42 5.85432e-42 0) (3.42226e-43 9.09881e-42 0) (8.14806e-43 2.3284e-42 0) (2.15292e-43 5.4107e-43 0) (5.09e-44 9.01519e-44 0) (8.57824e-45 1.39039e-44 0) (1.33172e-45 1.82933e-45 0) (1.76182e-46 2.25544e-46 0) (2.18148e-47 2.51795e-47 0) (2.70173e-48 2.40034e-48 0) (2.71776e-48 -2.4246e-48 0) (2.1968e-47 -2.54142e-47 0) (1.77188e-46 -2.27894e-46 0) (1.33411e-45 -1.85112e-45 0) (8.49558e-45 -1.40938e-44 0) (4.88331e-44 -9.16136e-44 0) (1.80201e-43 -5.51264e-43 0) (3.17086e-43 -2.38055e-42 0) (-6.1147e-42 -9.25044e-42 0) (-8.02828e-41 -4.06694e-42 0) (-8.93795e-40 4.86263e-41 0) (-9.80935e-39 4.57754e-40 0) (-1.01493e-37 4.62146e-39 0) (-1.02201e-36 4.19236e-38 0) (-9.45297e-36 2.94208e-37 0) (-8.59956e-35 9.77761e-38 0) (-6.79146e-34 -4.65444e-35 0) (-5.38475e-33 -1.13023e-33 0) (-3.06167e-32 -1.71053e-32 0) (-1.83481e-31 -1.80319e-31 0) (1.0494e-33 -1.08709e-30 0) (1.83787e-31 -1.80251e-31 0) (1.12607e-32 -1.23121e-32 0) (1.96671e-32 -4.67358e-33 0) (3.60628e-33 -3.47147e-33 0) (8.46147e-34 -5.71214e-34 0) (1.27725e-34 -9.58923e-35 0) (2.01502e-35 -1.21621e-35 0) (2.60328e-36 -1.52796e-36 0) (3.31624e-37 -1.68927e-37 0) (3.76103e-38 -1.82369e-38 0) (4.13238e-39 -1.81864e-39 0) (4.19517e-40 -1.74889e-40 0) (4.12308e-41 -1.41804e-41 0) (4.04899e-42 -1.83493e-42 0) (2.65113e-43 -1.27693e-42 0) (-1.28635e-43 4.67054e-43 0) (2.59879e-44 7.43271e-43 0) (5.84811e-44 1.92478e-43 0) (1.56281e-44 4.51046e-44 0) (3.75093e-45 7.57787e-45 0) (6.40007e-46 1.17528e-45 0) (1.00516e-46 1.55453e-46 0) (1.34306e-47 1.92333e-47 0) (1.6776e-48 2.154e-48 0) (2.09673e-49 2.0578e-49 0) (2.13671e-49 -2.06687e-49 0) (1.73377e-48 -2.1569e-48 0) (1.41579e-47 -1.9173e-47 0) (1.09976e-46 -1.53452e-46 0) (7.62227e-46 -1.13591e-45 0) (5.32386e-45 -6.9271e-45 0) (3.54824e-44 -3.54614e-44 0) (3.04809e-43 -5.92277e-44 0) (2.98268e-42 9.93103e-43 0) (3.43731e-41 2.10442e-41 0) (3.85075e-40 2.5643e-40 0) (4.14995e-39 2.86945e-39 0) (4.21732e-38 3.06946e-38 0) (4.13307e-37 2.96538e-37 0) (3.73988e-36 2.44142e-36 0) (3.27281e-35 1.00081e-35 0) (2.51615e-34 -1.56899e-34 0) (1.87629e-33 -5.63873e-33 0) (1.03718e-32 -9.98393e-32 0) (5.47384e-32 -1.27992e-30 0) (1.90724e-32 -1.13799e-29 0) (-3.22201e-32 -1.28365e-30 0) (1.56538e-31 -9.9075e-32 0) (1.89893e-31 -1.23457e-32 0) (2.46961e-32 -1.05167e-33 0) (5.50198e-33 -6.75705e-35 0) (7.48426e-34 -3.01108e-36 0) (1.1421e-34 -5.70036e-38 0) (1.40835e-35 8.09384e-39 0) (1.75377e-36 1.35644e-39 0) (1.93741e-37 1.53271e-40 0) (2.09457e-38 1.45882e-41 0) (2.09166e-39 1.37921e-42 0) (2.02518e-40 2.4694e-43 0) (1.85066e-41 -2.17061e-44 0) (1.62791e-42 -8.44113e-44 0) (1.26116e-43 3.50808e-44 0) (1.29414e-44 5.48762e-44 0) (5.15131e-45 1.43694e-44 0) (1.22115e-45 3.40925e-45 0) (2.84157e-46 5.79028e-46 0) (4.83368e-47 9.06734e-47 0) (7.60123e-48 1.20956e-47 0) (1.01906e-48 1.50736e-48 0) (1.2772e-49 1.69894e-49 0) (1.69076e-50 1.6299e-50 0) (3.03091e-50 -1.65551e-50 0) (3.44028e-49 -1.72808e-49 0) (4.20106e-48 -1.54322e-48 0) (5.31913e-47 -1.25365e-47 0) (6.82414e-46 -9.61739e-47 0) (8.85607e-45 -6.47783e-46 0) (1.13268e-43 -4.27781e-45 0) (1.42556e-42 -2.52238e-44 0) (1.73327e-41 -1.89672e-43 0) (2.04544e-40 -1.65908e-42 0) (2.30487e-39 -1.9009e-41 0) (2.51125e-38 -2.12504e-40 0) (2.58104e-37 -2.23473e-39 0) (2.56892e-36 -2.02142e-38 0) (2.35991e-35 -1.2841e-37 0) (2.11368e-34 5.81623e-37 0) (1.66077e-33 3.9638e-35 0) (1.28964e-32 9.18066e-34 0) (7.39767e-32 1.46287e-32 0) (4.30706e-31 1.7544e-31 0) (1.9508e-31 1.46792e-30 0) (-2.10422e-31 1.75119e-31 0) (1.68434e-32 -9.67079e-32 0) (1.678e-32 -9.47263e-33 0) (3.14329e-33 2.21911e-33 0) (7.55165e-34 4.87153e-34 0) (1.16255e-34 9.16377e-35 0) (1.86406e-35 1.20145e-35 0) (2.43631e-36 1.52864e-36 0) (3.13195e-37 1.69645e-37 0) (3.57667e-38 1.83308e-38 0) (3.95198e-39 1.82685e-39 0) (4.03236e-40 1.76486e-40 0) (3.96633e-41 1.60889e-41 0) (3.67781e-42 1.41565e-42 0) (3.2836e-43 1.13059e-43 0) (2.72316e-44 1.23155e-44 0) (2.42645e-45 4.82663e-45 0) (4.77933e-46 1.13115e-45 0) (9.45131e-47 2.60379e-46 0) (2.06755e-47 4.40724e-47 0) (3.47494e-48 6.9048e-48 0) (5.45503e-49 9.23592e-49 0) (7.33219e-50 1.1536e-49 0) (9.21888e-51 1.30295e-50 0) (1.23039e-51 1.18054e-51 0) (2.26682e-51 -2.41878e-51 0) (2.5736e-50 -3.10982e-50 0) (3.12904e-49 -3.8882e-49 0) (3.92402e-48 -4.95415e-48 0) (4.97049e-47 -6.47782e-47 0) (6.3396e-46 -8.50612e-46 0) (7.95933e-45 -1.11872e-44 0) (9.79103e-44 -1.44243e-43 0) (1.16363e-42 -1.82299e-42 0) (1.33383e-41 -2.22147e-41 0) (1.46152e-40 -2.62249e-40 0) (1.53172e-39 -2.93895e-39 0) (1.51916e-38 -3.13643e-38 0) (1.42996e-37 -3.00218e-37 0) (1.25273e-36 -2.39226e-36 0) (1.02633e-35 -7.49474e-36 0) (7.54667e-35 2.19598e-34 0) (4.94069e-34 6.83205e-33 0) (2.58853e-33 1.17628e-31 0) (8.88371e-33 1.48345e-30 0) (1.90801e-32 1.30121e-29 0) (1.36628e-32 1.48692e-30 0) (3.83437e-33 -9.63481e-33 0) (-2.76823e-34 -1.40767e-33 0) (5.42954e-35 2.56132e-34 0) (5.77688e-35 7.36721e-35 0) (1.26288e-35 1.49332e-35 0) (2.56293e-36 2.0937e-36 0) (3.79374e-37 2.75762e-37 0) (5.33929e-38 3.16791e-38 0) (6.47331e-39 3.50075e-39 0) (7.48849e-40 3.56671e-40 0) (7.90394e-41 3.50195e-41 0) (7.98669e-42 3.24142e-42 0) (7.56201e-43 2.89181e-43 0) (6.8754e-44 2.42063e-44 0) (5.89273e-45 2.20757e-45 0) (5.03731e-46 4.42532e-46 0) (5.98047e-47 8.74291e-47 0) (8.60409e-48 1.89778e-47 0) (1.58625e-48 3.17534e-48 0) (2.52784e-49 4.96576e-49 0) (3.88274e-50 6.65832e-50 0) (5.18223e-51 8.34097e-51 0) (6.27081e-52 9.45684e-52 0) (-2.81149e-52 9.40265e-53 0) (-5.57902e-51 -4.50404e-53 0) (-8.55148e-50 -2.15613e-52 0) (-1.27085e-48 2.89689e-51 0) (-1.83669e-47 1.01299e-49 0) (-2.57292e-46 1.9433e-48 0) (-3.50261e-45 3.11345e-47 0) (-4.60653e-44 4.4996e-46 0) (-5.88071e-43 6.08863e-45 0) (-7.21507e-42 7.8601e-44 0) (-8.58443e-41 9.68666e-43 0) (-9.73766e-40 1.16503e-41 0) (-1.0715e-38 1.36194e-40 0) (-1.10948e-37 1.65373e-39 0) (-1.1185e-36 2.16781e-38 0) (-1.03571e-35 3.39055e-37 0) (-9.43802e-35 5.91083e-36 0) (-7.46491e-34 1.05681e-34 0) (-5.93338e-33 1.69267e-33 0) (-3.37976e-32 2.25522e-32 0) (-2.03301e-31 2.22176e-31 0) (1.24034e-33 1.31833e-30 0) (2.04769e-31 2.22596e-31 0) (4.34557e-34 -1.916e-33 0) (-1.37867e-34 -2.86196e-34 0) (-1.88188e-35 1.59036e-35 0) (2.18578e-36 8.64602e-36 0) (9.66529e-37 2.1499e-36 0) (2.52257e-37 3.34059e-37 0) (4.17643e-38 4.76914e-38 0) (6.30141e-39 5.79727e-39 0) (8.01195e-40 6.70124e-40 0) (9.5876e-41 7.06272e-41 0) (1.03935e-41 7.12565e-42 0) (1.07195e-42 6.73744e-43 0) (1.03249e-43 6.11996e-44 0) (9.52038e-45 5.25791e-45 0) (8.29721e-46 4.52693e-46 0) (7.06777e-47 5.45026e-47 0) (6.97548e-48 7.89771e-48 0) (8.04978e-49 1.45341e-48 0) (1.228e-49 2.30965e-49 0) (1.80976e-50 3.53613e-50 0) (2.68091e-51 4.71011e-51 0) (3.53673e-52 5.88816e-52 0) (5.18003e-53 7.12322e-53 0) (1.29198e-52 8.04488e-53 0) (1.92233e-51 1.1758e-51 0) (2.90001e-50 1.83456e-50 0) (4.25647e-49 2.79099e-49 0) (6.07946e-48 4.12828e-48 0) (8.41793e-47 5.9434e-47 0) (1.13163e-45 8.29769e-46 0) (1.46859e-44 1.12584e-44 0) (1.8459e-43 1.47584e-43 0) (2.22696e-42 1.87712e-42 0) (2.59587e-41 2.29445e-41 0) (2.8797e-40 2.71781e-40 0) (3.08057e-39 3.07002e-39 0) (3.0934e-38 3.36271e-38 0) (2.99398e-37 3.475e-37 0) (2.65245e-36 3.50911e-36 0) (2.27066e-35 3.30068e-35 0) (1.68014e-34 3.10856e-34 0) (1.20496e-33 2.64596e-33 0) (6.17988e-33 2.26934e-32 0) (3.0131e-32 1.45946e-31 0) (6.60944e-35 8.1437e-31 0) (-3.0039e-32 1.45934e-31 0) (6.08087e-35 -2.12032e-34 0) (-2.76182e-35 -3.62369e-35 0) (-4.65639e-36 -1.78651e-37 0) (-2.93839e-37 7.09641e-37 0) (4.05402e-38 2.18792e-37 0) (2.10731e-38 3.73357e-38 0) (4.14935e-39 5.67074e-39 0) (6.90695e-40 7.21108e-40 0) (9.31355e-41 8.61538e-41 0) (1.16273e-41 9.32404e-42 0) (1.29983e-42 9.60146e-43 0) (1.37308e-43 9.2359e-44 0) (1.34762e-44 8.5077e-45 0) (1.26178e-45 7.41952e-46 0) (1.11583e-46 6.33868e-47 0) (9.54455e-48 6.30707e-48 0) (8.58059e-49 7.33492e-49 0) (8.41521e-50 1.12166e-49 0) (1.03781e-50 1.65172e-50 0) (1.35217e-51 2.44108e-51 0) (1.8707e-52 3.2099e-52 0) (2.75008e-53 4.01641e-53 0) (6.219e-53 9.16167e-54 0) (9.46051e-52 7.64749e-53 0) (1.47142e-50 1.2149e-51 0) (2.23268e-49 1.8936e-50 0) (3.29542e-48 2.87884e-49 0) (4.73561e-47 4.25777e-48 0) (6.60022e-46 6.13217e-47 0) (8.9398e-45 8.56693e-46 0) (1.16982e-43 1.16349e-44 0) (1.48492e-42 1.52689e-43 0) (1.81111e-41 1.9448e-42 0) (2.13954e-40 2.38118e-41 0) (2.40906e-39 2.82771e-40 0) (2.62615e-38 3.20795e-39 0) (2.69331e-37 3.54717e-38 0) (2.68064e-36 3.74795e-37 0) (2.45071e-35 3.98357e-36 0) (2.19236e-34 4.18336e-35 0) (1.70396e-33 4.72835e-34 0) (1.31603e-32 5.26344e-33 0) (7.31408e-32 5.76468e-32 0) (4.16155e-31 4.89972e-31 0) (6.1881e-35 2.86081e-30 0) (-4.15936e-31 4.89149e-31 0) (6.42655e-36 -2.87258e-35 0) (-3.14784e-36 -5.06295e-36 0) (-5.87798e-37 -3.56378e-37 0) (-6.47302e-38 3.06989e-38 0) (-1.30074e-39 1.88783e-38 0) (1.39876e-39 3.76107e-39 0) (3.45579e-40 6.25737e-40 0) (6.36312e-41 8.41961e-41 0) (9.07793e-42 1.04861e-41 0) (1.17752e-42 1.17004e-42 0) (1.35375e-43 1.23397e-43 0) (1.46076e-44 1.20953e-44 0) (1.45838e-45 1.13133e-45 0) (1.38436e-46 1.00033e-46 0) (1.23944e-47 8.56517e-48 0) (1.06768e-48 7.73058e-49 0) (9.26039e-50 7.62252e-50 0) (8.35969e-51 9.44005e-51 0) (8.85297e-52 1.23145e-51 0) (1.02115e-52 1.70001e-52 0) (1.32928e-53 2.16796e-53 0) (7.20859e-54 2.46759e-54 0) (9.21414e-53 -2.83034e-54 0) (1.46881e-51 -5.10939e-53 0) (2.28759e-50 -8.15941e-52 0) (3.47499e-49 -1.26965e-50 0) (5.13513e-48 -1.92677e-49 0) (7.389e-47 -2.84431e-48 0) (1.03126e-45 -4.08797e-47 0) (1.39901e-44 -5.69851e-46 0) (1.8337e-43 -7.71948e-45 0) (2.33212e-42 -1.01015e-43 0) (2.85017e-41 -1.28162e-42 0) (3.37528e-40 -1.55977e-41 0) (3.81008e-39 -1.82845e-40 0) (4.16688e-38 -2.00708e-39 0) (4.28742e-37 -2.01873e-38 0) (4.28657e-36 -1.56587e-37 0) (3.93613e-35 -2.3918e-37 0) (3.54544e-34 2.89951e-35 0) (2.7729e-33 8.64327e-34 0) (2.16768e-32 1.72888e-32 0) (1.21691e-31 2.61769e-31 0) (7.12837e-31 3.01608e-30 0) (1.03357e-34 2.42086e-29 0) (-7.12469e-31 3.01041e-30 0) (7.21123e-37 -2.99024e-36 0) (-3.56658e-37 -5.61658e-37 0) (-6.91587e-38 -6.08369e-38 0) (-1.00973e-38 -1.18679e-39 0) (-7.27724e-40 1.29024e-39 0) (4.96502e-41 3.16493e-40 0) (2.41824e-41 5.79166e-41 0) (5.2963e-42 8.23105e-42 0) (8.17379e-43 1.06444e-42 0) (1.11394e-43 1.22114e-43 0) (1.32402e-44 1.31541e-44 0) (1.46434e-45 1.31153e-45 0) (1.48976e-46 1.24365e-46 0) (1.43538e-47 1.11295e-47 0) (1.30127e-48 9.58914e-49 0) (1.1305e-49 8.33347e-50 0) (9.65183e-51 7.54823e-51 0) (8.30937e-52 8.02507e-52 0) (7.86744e-53 9.27603e-53 0) (8.0635e-54 1.17728e-53 0) (9.3225e-55 1.40449e-54 0) (2.69212e-55 -4.33196e-55 0) (2.68141e-54 -1.0117e-53 0) (4.26588e-53 -1.65778e-52 0) (6.64728e-52 -2.64857e-51 0) (1.01036e-50 -4.12586e-50 0) (1.49398e-49 -6.26879e-49 0) (2.1512e-48 -9.26578e-48 0) (3.00459e-47 -1.3336e-46 0) (4.07946e-46 -1.86177e-45 0) (5.35178e-45 -2.52638e-44 0) (6.81352e-44 -3.31216e-43 0) (8.33611e-43 -4.21247e-42 0) (9.8849e-42 -5.14394e-41 0) (1.11735e-40 -6.06954e-40 0) (1.22408e-39 -6.7658e-39 0) (1.26167e-38 -7.11299e-38 0) (1.26439e-37 -6.45592e-37 0) (1.16367e-36 -4.18349e-36 0) (1.05178e-35 1.56243e-35 0) (8.25182e-35 1.19541e-33 0) (6.48783e-34 2.79746e-32 0) (3.65931e-33 4.46934e-31 0) (2.171e-32 5.36615e-30 0) (3.13902e-36 4.49168e-29 0) (-2.16988e-32 5.35607e-30 0) (6.94059e-38 -3.2964e-37 0) (-3.40343e-38 -6.35108e-38 0) (-6.87931e-39 -9.09683e-39 0) (-1.16508e-39 -6.35526e-40 0) (-1.10824e-40 4.93192e-41 0) (-2.72959e-42 2.24268e-41 0) (1.31128e-42 4.84421e-42 0) (3.83439e-43 7.43318e-43 0) (6.52437e-44 1.0092e-43 0) (9.38926e-45 1.19663e-44 0) (1.15555e-45 1.32101e-45 0) (1.3101e-46 1.34209e-46 0) (1.35806e-47 1.29167e-47 0) (1.32769e-48 1.17021e-48 0) (1.21821e-49 1.01643e-49 0) (1.06781e-50 8.68534e-51 0) (9.07847e-52 7.49121e-52 0) (7.64074e-53 7.11329e-53 0) (6.76392e-54 7.30931e-54 0) (6.15232e-55 8.36723e-55 0) (-2.68518e-55 8.36127e-56 0) (-5.59216e-54 -2.06511e-55 0) (-9.15622e-53 -3.63951e-54 0) (-1.4626e-51 -5.94957e-53 0) (-2.27797e-50 -9.49669e-52 0) (-3.46041e-49 -1.47795e-50 0) (-5.11362e-48 -2.24319e-49 0) (-7.35812e-47 -3.31189e-48 0) (-1.02696e-45 -4.7607e-47 0) (-1.39318e-44 -6.63726e-46 0) (-1.82607e-43 -8.99266e-45 0) (-2.32243e-42 -1.17697e-43 0) (-2.83833e-41 -1.49365e-42 0) (-3.36128e-40 -1.8186e-41 0) (-3.79429e-39 -2.13411e-40 0) (-4.14963e-38 -2.34949e-39 0) (-4.26966e-37 -2.38516e-38 0) (-4.26885e-36 -1.91941e-37 0) (-3.91982e-35 -5.31311e-37 0) (-3.53084e-34 2.77737e-35 0) (-2.76148e-33 8.8207e-34 0) (-2.159e-32 1.79413e-32 0) (-1.2121e-31 2.73315e-31 0) (-7.10371e-31 3.16389e-30 0) (-1.03043e-34 2.55146e-29 0) (7.10005e-31 3.15795e-30 0) (6.70304e-39 -3.14244e-38 0) (-3.23693e-39 -6.28339e-39 0) (-6.68775e-40 -1.04811e-39 0) (-1.27118e-40 -9.80784e-41 0) (-1.41189e-41 -2.06207e-42 0) (-9.62668e-43 1.23941e-42 0) (2.40239e-44 3.52606e-43 0) (2.31481e-44 5.95383e-44 0) (4.69093e-45 8.5314e-45 0) (7.31212e-46 1.04729e-45 0) (9.41711e-47 1.18514e-46 0) (1.10068e-47 1.22686e-47 0) (1.16606e-48 1.19814e-48 0) (1.15886e-49 1.09856e-49 0) (1.07716e-50 9.62565e-51 0) (9.53478e-52 8.18588e-52 0) (8.11575e-53 6.89329e-53 0) (6.75876e-54 6.11588e-54 0) (5.73085e-55 6.0054e-55 0) (3.55027e-56 6.77262e-56 0) (-2.26818e-55 2.3148e-56 0) (-3.86731e-54 2.56057e-55 0) (-6.31909e-53 4.27264e-54 0) (-1.00841e-51 6.9925e-53 0) (-1.56896e-50 1.11797e-51 0) (-2.38067e-49 1.74293e-50 0) (-3.51381e-48 2.65052e-49 0) (-5.04928e-47 3.9214e-48 0) (-7.0371e-46 5.65002e-47 0) (-9.53102e-45 7.89685e-46 0) (-1.2471e-43 1.07304e-44 0) (-1.58287e-42 1.40896e-43 0) (-1.93037e-41 1.79576e-42 0) (-2.28012e-40 2.20025e-41 0) (-2.56692e-39 2.61528e-40 0) (-2.79768e-38 2.97057e-39 0) (-2.86851e-37 3.29183e-38 0) (-2.85418e-36 3.49242e-37 0) (-2.60836e-35 3.74345e-36 0) (-2.33242e-34 3.99246e-35 0) (-1.81178e-33 4.61067e-34 0) (-1.39869e-32 5.25668e-33 0) (-7.76804e-32 5.85431e-32 0) (-4.42078e-31 5.045e-31 0) (-6.39771e-35 2.95401e-30 0) (4.41851e-31 5.03624e-31 0) (4.32793e-40 -3.80364e-39 0) (-2.07171e-40 -7.80282e-40 0) (-4.36378e-41 -1.49148e-40 0) (-8.73996e-42 -1.68159e-41 0) (-1.03287e-42 -1.22601e-42 0) (-8.58558e-44 9.37676e-45 0) (-1.82925e-45 2.39804e-44 0) (1.05372e-45 5.06909e-45 0) (2.53737e-46 8.02991e-46 0) (4.20992e-47 1.04299e-46 0) (5.60028e-48 1.22563e-47 0) (6.68178e-49 1.30332e-48 0) (7.18121e-50 1.29885e-49 0) (7.21298e-51 1.20995e-50 0) (6.76048e-52 1.07221e-51 0) (6.02356e-53 9.09506e-53 0) (5.16331e-54 7.03973e-54 0) (4.87846e-55 6.24787e-55 0) (4.42209e-56 5.34223e-55 0) (-2.62696e-56 1.37959e-55 0) (-5.92754e-56 4.6597e-56 0) (-8.70844e-55 2.05242e-55 0) (-1.41577e-53 3.33139e-54 0) (-2.25239e-52 5.44302e-53 0) (-3.49287e-51 8.68922e-52 0) (-5.28018e-50 1.35249e-50 0) (-7.76185e-49 2.05315e-49 0) (-1.11021e-47 3.03195e-48 0) (-1.5395e-46 4.35942e-47 0) (-2.07292e-45 6.07964e-46 0) (-2.6951e-44 8.24042e-45 0) (-3.39496e-43 1.07914e-43 0) (-4.10631e-42 1.37104e-42 0) (-4.80164e-41 1.67396e-41 0) (-5.3467e-40 1.9801e-40 0) (-5.7464e-39 2.23351e-39 0) (-5.80331e-38 2.44181e-38 0) (-5.65711e-37 2.5181e-37 0) (-5.05747e-36 2.53477e-36 0) (-4.3782e-35 2.37474e-35 0) (-3.28776e-34 2.22213e-34 0) (-2.39632e-33 1.87617e-33 0) (-1.25719e-32 1.59276e-32 0) (-6.22159e-32 1.01398e-31 0) (-8.81225e-36 5.61018e-31 0) (6.21887e-32 1.01295e-31 0) (-1.7696e-39 -9.53108e-39 0) (8.41894e-40 -1.95134e-39 0) (1.78853e-40 -3.70891e-40 0) (3.70598e-41 -4.15938e-41 0) (4.55742e-42 -2.98982e-42 0) (4.24873e-43 3.16148e-44 0) (1.91663e-44 6.05752e-44 0) (-2.6063e-45 1.26812e-44 0) (-8.25268e-46 2.00062e-45 0) (-1.47326e-46 2.59203e-46 0) (-2.0261e-47 3.04072e-47 0) (-2.46604e-48 3.22918e-48 0) (-2.6853e-49 3.21487e-49 0) (-2.7229e-50 2.99168e-50 0) (-2.57028e-51 2.63752e-51 0) (-2.29963e-52 2.17372e-52 0) (-1.91975e-53 8.38667e-54 0) (-4.69074e-55 1.26165e-54 0) (3.22037e-56 8.93311e-54 0) (-5.06266e-55 2.43218e-54 0) (-1.52064e-55 6.34752e-55 0) (-2.17787e-55 1.57912e-55 0) (-2.94517e-54 7.78697e-55 0) (-4.67118e-53 1.23931e-53 0) (-7.23531e-52 1.97183e-52 0) (-1.0921e-50 3.0587e-51 0) (-1.60231e-49 4.62543e-50 0) (-2.28633e-48 6.80197e-49 0) (-3.16107e-47 9.73339e-48 0) (-4.2409e-46 1.35037e-46 0) (-5.4897e-45 1.81929e-45 0) (-6.87824e-44 2.36687e-44 0) (-8.26582e-43 2.9837e-43 0) (-9.58912e-42 3.61202e-42 0) (-1.05747e-40 4.22805e-41 0) (-1.12298e-39 4.71424e-40 0) (-1.1172e-38 5.07588e-39 0) (-1.06881e-37 5.14128e-38 0) (-9.32396e-37 5.03761e-37 0) (-7.83137e-36 4.54998e-36 0) (-5.64275e-35 4.01115e-35 0) (-3.92896e-34 3.11619e-34 0) (-1.92709e-33 2.36829e-33 0) (-9.11556e-33 1.3251e-32 0) (-9.43181e-37 6.57549e-32 0) (9.11532e-33 1.3243e-32 0) (-2.07756e-38 -9.77717e-38 0) (1.00164e-38 -1.9619e-38 0) (2.07628e-39 -3.34168e-39 0) (3.99535e-40 -3.24474e-40 0) (4.51665e-41 -1.06704e-41 0) (3.29978e-42 3.1769e-42 0) (-2.3065e-44 9.96112e-43 0) (-6.40344e-44 1.72377e-43 0) (-1.35479e-44 2.50013e-44 0) (-2.14688e-45 3.09026e-45 0) (-2.78796e-46 3.51334e-46 0) (-3.27581e-47 3.6489e-47 0) (-3.48268e-48 3.57234e-48 0) (-3.47039e-49 3.28039e-49 0) (-3.2321e-50 2.85395e-50 0) (-2.86082e-51 2.29903e-51 0) (-2.34943e-52 1.9479e-53 0) (1.09495e-54 1.24049e-53 0) (1.34471e-54 1.59829e-52 0) (-9.24602e-54 4.34874e-53 0) (-2.58606e-54 1.13053e-53 0) (-7.10917e-55 2.01526e-54 0) (-5.63977e-55 4.88332e-55 0) (-7.02739e-54 2.64523e-54 0) (-1.08316e-52 4.13453e-53 0) (-1.63088e-51 6.40507e-52 0) (-2.38618e-50 9.67078e-51 0) (-3.39372e-49 1.41937e-49 0) (-4.67495e-48 2.02605e-48 0) (-6.2447e-47 2.80242e-47 0) (-8.04416e-46 3.76157e-46 0) (-1.002e-44 4.87193e-45 0) (-1.19623e-43 6.10805e-44 0) (-1.37663e-42 7.34566e-43 0) (-1.50438e-41 8.52884e-42 0) (-1.57949e-40 9.41522e-41 0) (-1.55098e-39 1.00112e-39 0) (-1.45893e-38 9.97738e-39 0) (-1.24784e-37 9.56944e-38 0) (-1.02083e-36 8.38508e-37 0) (-7.12863e-36 7.09217e-36 0) (-4.76349e-35 5.17703e-35 0) (-2.22533e-34 3.66376e-34 0) (-9.95329e-34 1.85059e-33 0) (3.1669e-36 8.8446e-33 0) (9.96323e-34 1.88023e-33 0) (-2.16651e-37 -1.02716e-36 0) (1.06006e-37 -1.99005e-37 0) (2.1507e-38 -2.93596e-38 0) (3.72038e-39 -2.21582e-39 0) (3.66929e-40 1.03844e-40 0) (1.32698e-41 6.21227e-41 0) (-3.32564e-42 1.39679e-41 0) (-1.08186e-42 2.17517e-42 0) (-1.88922e-43 2.9782e-43 0) (-2.75347e-44 3.54952e-44 0) (-3.41312e-45 3.93288e-45 0) (-3.88841e-46 4.00625e-46 0) (-4.04446e-47 3.86377e-47 0) (-3.96451e-48 3.5038e-48 0) (-3.64479e-49 3.00412e-49 0) (-3.19167e-50 2.3429e-50 0) (-2.55972e-51 -1.02166e-51 0) (1.55465e-52 1.11802e-52 0) (3.45659e-53 2.79217e-51 0) (-1.65521e-52 7.58036e-52 0) (-4.6229e-53 1.96954e-52 0) (-1.22358e-53 3.48695e-53 0) (-2.24525e-54 5.73492e-54 0) (-1.31836e-54 1.1887e-54 0) (-1.48448e-53 6.50351e-54 0) (-2.22391e-52 9.90778e-53 0) (-3.24681e-51 1.49313e-51 0) (-4.60591e-50 2.18706e-50 0) (-6.32515e-49 3.1141e-49 0) (-8.41819e-48 4.29541e-48 0) (-1.07964e-46 5.74542e-47 0) (-1.33794e-45 7.41284e-46 0) (-1.58739e-44 9.24827e-45 0) (-1.81367e-43 1.10632e-43 0) (-1.96438e-42 1.27559e-42 0) (-2.0414e-41 1.39764e-41 0) (-1.97829e-40 1.4709e-40 0) (-1.83326e-39 1.44984e-39 0) (-1.53612e-38 1.36814e-38 0) (-1.22903e-37 1.17776e-37 0) (-8.29276e-37 9.685e-37 0) (-5.36956e-36 6.85735e-36 0) (-2.34999e-35 4.62604e-35 0) (-1.02342e-34 2.24601e-34 0) (3.41421e-35 1.01983e-33 0) (1.10009e-34 5.42355e-34 0) (-2.25027e-36 -9.4527e-36 0) (1.11067e-36 -1.78688e-36 0) (2.16621e-37 -2.06936e-37 0) (3.25602e-38 -7.11684e-39 0) (2.52384e-39 3.36716e-39 0) (-1.00155e-40 8.91138e-40 0) (-6.68286e-41 1.67335e-40 0) (-1.52616e-41 2.40668e-41 0) (-2.3912e-42 3.13571e-42 0) (-3.2868e-43 3.61503e-43 0) (-3.92705e-44 3.90825e-44 0) (-4.3594e-45 3.90731e-45 0) (-4.44698e-46 3.71306e-46 0) (-4.2941e-47 3.32446e-47 0) (-3.89912e-48 2.79478e-48 0) (-3.37763e-49 2.05088e-49 0) (-2.61412e-50 -3.31616e-50 0) (4.23839e-51 7.09506e-52 0) (7.19331e-52 4.76764e-50 0) (-2.89262e-51 1.28991e-50 0) (-8.06048e-52 3.34772e-51 0) (-2.13162e-52 5.91106e-52 0) (-3.79845e-53 9.67008e-53 0) (-6.17347e-54 1.34104e-53 0) (4.41946e-55 3.7904e-54 0) (2.0812e-53 3.3006e-53 0) (3.27077e-52 5.01682e-52 0) (4.9557e-51 7.46512e-51 0) (7.30936e-50 1.07972e-49 0) (1.04058e-48 1.51611e-48 0) (1.44027e-47 2.06314e-47 0) (1.91317e-46 2.71738e-46 0) (2.46813e-45 3.45549e-45 0) (3.03045e-44 4.23676e-44 0) (3.61195e-43 4.98977e-43 0) (4.04498e-42 5.63856e-42 0) (4.40171e-41 6.07553e-41 0) (4.40572e-40 6.24109e-40 0) (4.30359e-39 6.04278e-39 0) (3.71909e-38 5.52991e-38 0) (3.17409e-37 4.67116e-37 0) (2.20554e-36 3.68239e-36 0) (1.55877e-35 2.55487e-35 0) (7.05652e-35 1.61301e-34 0) (3.54458e-34 7.62131e-34 0) (5.19216e-36 3.01869e-33 0) (-2.03698e-35 -9.02907e-35 0) (9.95812e-36 -1.6082e-35 0) (1.87347e-36 -1.26639e-36 0) (2.20975e-37 6.44252e-38 0) (7.82127e-39 5.29422e-38 0) (-3.63902e-39 1.08738e-38 0) (-9.72015e-40 1.83462e-39 0) (-1.83762e-40 2.48646e-40 0) (-2.65365e-41 3.11201e-41 0) (-3.46836e-42 3.484e-42 0) (-4.00726e-43 3.68384e-43 0) (-4.33986e-44 3.61791e-44 0) (-4.34467e-45 3.38934e-45 0) (-4.13393e-46 2.99376e-46 0) (-3.70724e-47 2.44411e-47 0) (-3.17385e-48 1.58694e-48 0) (-2.29631e-49 -6.96281e-49 0) (8.99692e-50 7.71726e-52 0) (1.35776e-50 7.9181e-49 0) (-4.94162e-50 2.13332e-49 0) (-1.37208e-50 5.52722e-50 0) (-3.62422e-51 9.73091e-51 0) (-6.44085e-52 1.5895e-51 0) (-1.04545e-52 2.18406e-52 0) (6.92652e-54 3.59572e-53 0) (3.30783e-52 1.31862e-52 0) (5.01051e-51 1.99344e-51 0) (7.33434e-50 3.00888e-50 0) (1.04364e-48 4.41565e-49 0) (1.4384e-47 6.30257e-48 0) (1.92261e-46 8.71747e-47 0) (2.4783e-45 1.17011e-45 0) (3.0896e-44 1.51564e-44 0) (3.69173e-43 1.90044e-43 0) (4.25312e-42 2.28605e-42 0) (4.65311e-41 2.6551e-41 0) (4.89265e-40 2.93245e-40 0) (4.8117e-39 3.11997e-39 0) (4.53545e-38 3.11222e-38 0) (3.88742e-37 2.98844e-37 0) (3.18956e-36 2.62296e-36 0) (2.23389e-35 2.22356e-35 0) (1.49869e-34 1.62825e-34 0) (7.02653e-34 1.15686e-33 0) (3.15424e-33 5.86986e-33 0) (-5.35878e-35 2.81579e-32 0) (-1.91716e-34 -6.86374e-34 0) (8.72401e-35 -1.18694e-34 0) (1.49314e-35 -2.66183e-36 0) (1.09758e-36 1.84472e-36 0) (-9.11096e-38 6.18966e-37 0) (-5.91235e-38 1.0792e-37 0) (-1.19924e-38 1.65826e-38 0) (-2.02453e-39 2.12297e-39 0) (-2.74996e-40 2.54863e-40 0) (-3.45027e-41 2.76783e-41 0) (-3.87017e-42 2.85796e-42 0) (-4.09888e-43 2.75495e-43 0) (-4.03085e-44 2.54208e-44 0) (-3.78146e-45 2.20861e-45 0) (-3.34753e-46 1.6927e-46 0) (-2.82662e-47 7.17155e-48 0) (-1.78842e-48 -1.27505e-47 0) (1.65756e-48 -9.6831e-50 0) (2.36881e-49 1.2832e-47 0) (-8.21211e-49 3.43922e-48 0) (-2.27014e-49 8.88978e-49 0) (-5.98565e-50 1.55958e-49 0) (-1.06067e-50 2.54257e-50 0) (-1.73221e-51 3.47993e-51 0) (-9.57113e-53 4.80148e-52 0) (2.19564e-51 6.24692e-52 0) (3.36103e-50 8.90582e-51 0) (4.93334e-49 1.3462e-49 0) (7.04203e-48 1.98019e-48 0) (9.7404e-47 2.83461e-47 0) (1.30744e-45 3.93441e-46 0) (1.69337e-44 5.3037e-45 0) (2.12313e-43 6.90493e-44 0) (2.55333e-42 8.71215e-43 0) (2.96484e-41 1.05581e-41 0) (3.27286e-40 1.23754e-40 0) (3.48014e-39 1.38211e-39 0) (3.46709e-38 1.49126e-38 0) (3.32323e-37 1.51451e-37 0) (2.90502e-36 1.48926e-36 0) (2.44707e-35 1.35175e-35 0) (1.7685e-34 1.19964e-34 0) (1.23671e-33 9.40825e-34 0) (6.08841e-33 7.22401e-33 0) (2.89528e-32 4.09468e-32 0) (-5.53605e-34 2.04058e-31 0) (-1.41754e-33 -6.06167e-33 0) (4.66529e-34 -9.26153e-34 0) (6.69799e-35 3.57798e-35 0) (-4.25945e-36 2.44978e-35 0) (-2.58889e-36 6.28843e-36 0) (-7.15434e-37 9.86726e-37 0) (-1.20749e-37 1.41711e-37 0) (-1.84246e-38 1.72868e-38 0) (-2.35841e-39 2.00356e-39 0) (-2.83592e-40 2.11571e-40 0) (-3.08505e-41 2.13791e-41 0) (-3.19057e-42 2.02377e-42 0) (-3.07979e-43 1.83993e-43 0) (-2.84688e-44 1.56381e-44 0) (-2.48294e-45 1.04023e-45 0) (-2.05405e-46 -1.81956e-47 0) (-8.30505e-48 -2.10393e-46 0) (2.8513e-47 -2.26273e-48 0) (3.94224e-48 2.0146e-46 0) (-1.33185e-47 5.36929e-47 0) (-3.66153e-48 1.38374e-47 0) (-9.63059e-49 2.41824e-48 0) (-1.70052e-49 3.93328e-49 0) (-2.78199e-50 5.36703e-50 0) (-3.16534e-51 6.99863e-51 0) (9.69198e-51 3.29892e-51 0) (1.53883e-49 3.92496e-50 0) (2.26351e-48 5.9498e-49 0) (3.23875e-47 8.79288e-48 0) (4.4931e-46 1.26536e-46 0) (6.05335e-45 1.7663e-45 0) (7.8757e-44 2.39663e-44 0) (9.92944e-43 3.1421e-43 0) (1.20225e-41 3.9974e-42 0) (1.40768e-40 4.88749e-41 0) (1.56995e-39 5.79149e-40 0) (1.69066e-38 6.5448e-39 0) (1.71158e-37 7.17306e-38 0) (1.67359e-36 7.4179e-37 0) (1.50201e-35 7.49955e-36 0) (1.30651e-34 7.0655e-35 0) (9.87146e-34 6.67266e-34 0) (7.2431e-33 5.69997e-33 0) (3.83252e-32 4.91091e-32 0) (1.90668e-31 3.17146e-31 0) (-4.11325e-33 1.77572e-30 0) (-1.22174e-32 -3.30332e-32 0) (1.12909e-33 -4.94544e-33 0) (-9.94086e-35 6.49243e-34 0) (-1.61411e-34 2.07919e-34 0) (-3.63935e-35 4.33478e-35 0) (-7.51502e-36 6.14212e-36 0) (-1.12105e-36 8.14031e-37 0) (-1.58644e-37 9.38907e-38 0) (-1.93e-38 1.0407e-38 0) (-2.23863e-39 1.0628e-39 0) (-2.36741e-40 1.04552e-40 0) (-2.396e-41 9.6903e-42 0) (-2.27145e-42 8.65222e-43 0) (-2.0705e-43 6.96483e-44 0) (-1.77294e-44 1.71409e-45 0) (-1.41775e-45 -1.40549e-45 0) (1.59132e-47 -3.30529e-45 0) (4.59238e-46 -4.05607e-47 0) (6.24051e-47 3.08262e-45 0) (-2.09276e-46 8.16032e-46 0) (-5.71949e-47 2.09507e-46 0) (-1.49966e-47 3.64438e-47 0) (-2.63773e-48 5.91006e-48 0) (-4.30957e-49 8.0372e-49 0) (-5.606e-50 1.02344e-49 0) (3.80275e-50 1.32682e-50 0) (6.90988e-49 2.57848e-50 0) (1.02189e-47 3.73586e-49 0) (1.46967e-46 5.53365e-48 0) (2.05005e-45 7.98637e-47 0) (2.77941e-44 1.11819e-45 0) (3.64066e-43 1.52245e-44 0) (4.62682e-42 2.00326e-43 0) (5.65016e-41 2.55969e-42 0) (6.68499e-40 3.14531e-41 0) (7.53879e-39 3.75484e-40 0) (8.23496e-38 4.29533e-39 0) (8.46256e-37 4.83381e-38 0) (8.44719e-36 5.30744e-37 0) (7.74352e-35 6.1125e-36 0) (6.9582e-34 7.39362e-35 0) (5.42864e-33 9.93523e-34 0) (4.22613e-32 1.31158e-32 0) (2.36195e-31 1.59544e-31 0) (1.36974e-30 1.47359e-30 0) (-3.11851e-32 8.69736e-30 0) (-5.9394e-32 -3.02962e-31 0) (-4.68175e-32 -3.15595e-32 0) (-8.87462e-33 6.37653e-33 0) (-2.16159e-33 1.44717e-33 0) (-3.36447e-34 2.75692e-34 0) (-5.44339e-35 3.62895e-35 0) (-7.15915e-36 4.62619e-36 0) (-9.24839e-37 5.13859e-37 0) (-1.06003e-37 5.55548e-38 0) (-1.17471e-38 5.53867e-39 0) (-1.20142e-39 5.3522e-40 0) (-1.18405e-40 4.87648e-41 0) (-1.09972e-41 4.28468e-42 0) (-9.87864e-43 2.99982e-43 0) (-8.14262e-44 -3.48151e-44 0) (-5.7821e-45 -2.53123e-44 0) (1.50816e-45 -4.90715e-44 0) (7.12563e-45 -6.14818e-46 0) (9.55626e-46 4.54643e-44 0) (-3.20545e-45 1.19524e-44 0) (-8.6981e-46 3.05453e-45 0) (-2.27167e-46 5.28664e-46 0) (-3.97674e-47 8.54335e-47 0) (-6.48039e-48 1.15769e-47 0) (-8.81383e-49 1.46875e-48 0) (-7.53673e-50 1.6285e-49 0) (5.54208e-49 -5.68372e-50 0) (8.38292e-48 -1.13617e-48 0) (1.20703e-46 -1.6819e-47 0) (1.6855e-45 -2.4206e-46 0) (2.28791e-44 -3.37904e-45 0) (3.00063e-43 -4.58496e-44 0) (3.819e-42 -6.01052e-43 0) (4.67074e-41 -7.6437e-42 0) (5.53634e-40 -9.33294e-41 0) (6.25513e-39 -1.10113e-39 0) (6.84917e-38 -1.22727e-38 0) (7.05522e-37 -1.29007e-37 0) (7.06584e-36 -1.17052e-36 0) (6.4976e-35 -7.57925e-36 0) (5.86811e-34 2.85047e-35 0) (4.59848e-33 2.17058e-33 0) (3.61212e-32 5.07686e-32 0) (2.03328e-31 8.10804e-31 0) (1.2052e-30 9.73158e-30 0) (-2.75759e-32 8.14134e-29 0) (-4.8438e-31 -5.71967e-31 0) (-5.73348e-31 -7.12707e-32 0) (-7.44457e-32 -6.07036e-33 0) (-1.66037e-32 -3.89905e-34 0) (-2.25998e-33 -1.73504e-35 0) (-3.45225e-34 -3.24603e-37 0) (-4.25987e-35 4.73227e-38 0) (-5.30809e-36 7.90096e-39 0) (-5.8667e-37 8.94618e-40 0) (-6.34532e-38 8.65864e-41 0) (-6.33879e-39 7.95746e-42 0) (-6.13918e-40 5.45905e-43 0) (-5.61192e-41 -1.89652e-43 0) (-5.00619e-42 -8.86218e-43 0) (-3.79142e-43 -9.21154e-43 0) (-1.7257e-44 -3.93158e-43 0) (2.74545e-44 -7.0671e-43 0) (1.05488e-43 -8.82936e-45 0) (1.40239e-44 6.53192e-43 0) (-4.73282e-44 1.70262e-43 0) (-1.27494e-44 4.32639e-44 0) (-3.31376e-45 7.44158e-45 0) (-5.77139e-46 1.19733e-45 0) (-9.37186e-47 1.6153e-46 0) (-1.27374e-47 2.04312e-47 0) (-1.65696e-48 2.31975e-48 0) (-7.52265e-49 1.74973e-49 0) (-8.40446e-48 -1.1131e-48 0) (-1.20708e-46 -1.68179e-47 0) (-1.68553e-45 -2.42074e-46 0) (-2.28795e-44 -3.37923e-45 0) (-3.00068e-43 -4.58521e-44 0) (-3.81906e-42 -6.01083e-43 0) (-4.67081e-41 -7.64406e-42 0) (-5.53642e-40 -9.33336e-41 0) (-6.25521e-39 -1.10117e-39 0) (-6.84924e-38 -1.22732e-38 0) (-7.05529e-37 -1.29011e-37 0) (-7.0659e-36 -1.17057e-36 0) (-6.49765e-35 -7.57963e-36 0) (-5.86814e-34 2.85017e-35 0) (-4.59849e-33 2.17056e-33 0) (-3.61213e-32 5.07685e-32 0) (-2.03328e-31 8.10803e-31 0) (-1.2052e-30 9.73158e-30 0) (2.75762e-32 8.14134e-29 0) (-2.71223e-32 -3.26252e-31 0) (-6.35098e-32 -5.00726e-32 0) (-1.1553e-32 -1.35988e-32 0) (-2.68832e-33 -1.93139e-33 0) (-4.02904e-34 -3.00095e-34 0) (-6.31882e-35 -3.71215e-35 0) (-8.12831e-36 -4.61981e-36 0) (-1.03191e-36 -5.09433e-37 0) (-1.16724e-37 -5.49568e-38 0) (-1.27996e-38 -5.46691e-39 0) (-1.29904e-39 -5.26856e-40 0) (-1.27513e-40 -4.9817e-41 0) (-1.25894e-41 -7.57296e-42 0) (-1.80033e-42 -1.2566e-41 0) (4.66449e-43 -1.26584e-41 0) (2.32474e-43 -5.35724e-42 0) (4.2845e-43 -9.70573e-42 0) (1.5178e-42 -1.18662e-43 0) (1.99871e-43 8.98201e-42 0) (-6.80864e-43 2.3215e-42 0) (-1.81769e-43 5.85829e-43 0) (-4.69646e-44 1.00092e-43 0) (-8.12815e-45 1.60221e-44 0) (-1.31405e-45 2.15098e-45 0) (-1.77769e-46 2.71061e-46 0) (-2.25807e-47 3.07351e-47 0) (-3.25981e-48 3.31955e-48 0) (-1.04967e-47 7.01043e-49 0) (-1.47013e-46 5.55669e-48 0) (-2.0503e-45 7.9755e-47 0) (-2.77972e-44 1.1167e-45 0) (-3.64105e-43 1.52052e-44 0) (-4.62728e-42 2.00085e-43 0) (-5.65069e-41 2.55679e-42 0) (-6.68557e-40 3.14197e-41 0) (-7.53939e-39 3.75116e-40 0) (-8.23555e-38 4.29145e-39 0) (-8.46311e-37 4.82996e-38 0) (-8.44766e-36 5.3038e-37 0) (-7.7439e-35 6.10934e-36 0) (-6.95846e-34 7.39101e-35 0) (-5.42882e-33 9.93336e-34 0) (-4.22621e-32 1.31145e-32 0) (-2.36198e-31 1.59538e-31 0) (-1.36975e-30 1.47356e-30 0) (3.11797e-32 8.69734e-30 0) (7.58893e-33 -3.42501e-32 0) (-9.1139e-33 -7.18599e-33 0) (-1.80743e-33 -2.08807e-33 0) (-5.02212e-34 -3.34382e-34 0) (-8.0127e-35 -5.41675e-35 0) (-1.33288e-35 -7.0403e-36 0) (-1.77108e-36 -8.96984e-37 0) (-2.30859e-37 -1.01495e-37 0) (-2.65652e-38 -1.08589e-38 0) (-2.9743e-39 -9.40393e-40 0) (-3.20052e-40 -6.95751e-41 0) (-3.69548e-41 -2.91856e-41 0) (-1.47139e-41 -4.44409e-41 0) (-1.06413e-41 -1.63049e-40 0) (7.63355e-42 -1.68592e-40 0) (3.26334e-42 -7.09031e-41 0) (5.84462e-42 -1.29902e-40 0) (2.08568e-41 -1.5449e-42 0) (2.72201e-42 1.20409e-40 0) (-9.37621e-42 3.07808e-41 0) (-2.48085e-42 7.7016e-42 0) (-6.36391e-43 1.30479e-42 0) (-1.09394e-43 2.07532e-43 0) (-1.75936e-44 2.76908e-44 0) (-2.3684e-45 3.47319e-45 0) (-2.99127e-46 3.92076e-46 0) (-3.41211e-47 4.19327e-47 0) (-5.91893e-48 4.75047e-48 0) (-3.28766e-47 9.1325e-48 0) (-4.51026e-46 1.25824e-46 0) (-6.07508e-45 1.75624e-45 0) (-7.90285e-44 2.38355e-44 0) (-9.96197e-43 3.12565e-43 0) (-1.20601e-41 3.97753e-42 0) (-1.4118e-40 4.86434e-41 0) (-1.5743e-39 5.7658e-40 0) (-1.69497e-38 6.51735e-39 0) (-1.71565e-37 7.14551e-38 0) (-1.67712e-36 7.39134e-37 0) (-1.50492e-35 7.47608e-36 0) (-1.30859e-34 7.04558e-35 0) (-9.88569e-34 6.65796e-34 0) (-7.25044e-33 5.6896e-33 0) (-3.83619e-32 4.90551e-32 0) (-1.90741e-31 3.16886e-31 0) (3.90054e-33 1.77551e-30 0) (3.95438e-33 7.01188e-33 0) (-2.30943e-33 1.06936e-33 0) (-4.72879e-34 -1.87506e-35 0) (-1.17616e-34 -2.32604e-35 0) (-1.79691e-35 -6.20347e-36 0) (-2.82025e-36 -9.82349e-37 0) (-3.63272e-37 -1.47221e-37 0) (-4.5104e-38 -1.78498e-38 0) (-4.92116e-39 1.2884e-39 0) (-8.08866e-40 2.14571e-39 0) (-2.85711e-40 4.88647e-40 0) (-9.86969e-41 -2.38196e-40 0) (-1.60447e-40 -5.44427e-40 0) (-1.39015e-40 -2.061e-39 0) (1.03013e-40 -2.13118e-39 0) (4.322e-41 -8.8918e-40 0) (7.73415e-41 -1.64639e-39 0) (2.79073e-40 -1.90037e-41 0) (3.59664e-41 1.52864e-39 0) (-1.25924e-40 3.86652e-40 0) (-3.29327e-41 9.57356e-41 0) (-8.37327e-42 1.60718e-41 0) (-1.42704e-42 2.53705e-42 0) (-2.28031e-43 3.36233e-43 0) (-3.05076e-44 4.19457e-44 0) (-3.83483e-45 4.71226e-45 0) (-4.33592e-46 5.016e-46 0) (-4.69388e-47 4.97497e-47 0) (-1.24966e-47 6.43227e-48 0) (-1.09207e-46 2.55433e-47 0) (-1.45509e-45 3.49969e-46 0) (-1.87891e-44 4.73577e-45 0) (-2.347e-43 6.18652e-44 0) (-2.81405e-42 7.83855e-43 0) (-3.2539e-41 9.531e-42 0) (-3.5813e-40 1.12232e-40 0) (-3.78931e-39 1.25737e-39 0) (-3.76472e-38 1.36391e-38 0) (-3.58611e-37 1.38914e-37 0) (-3.12811e-36 1.37527e-36 0) (-2.61266e-35 1.25173e-35 0) (-1.88766e-34 1.12232e-34 0) (-1.30327e-33 8.83456e-34 0) (-6.46524e-33 6.90294e-33 0) (-3.0034e-32 3.93227e-32 0) (-3.83631e-33 2.0273e-31 0) (2.06183e-32 6.785e-32 0) (-1.06746e-32 1.22513e-32 0) (-1.73929e-33 1.3321e-33 0) (-3.46129e-34 1.04834e-34 0) (-4.4227e-35 7.14106e-36 0) (-5.91431e-36 4.39795e-37 0) (-6.64517e-37 -4.39055e-38 0) (-6.43514e-38 -5.32329e-39 0) (-4.28951e-39 4.09595e-38 0) (-3.82955e-39 2.91357e-38 0) (-2.92998e-39 6.26239e-39 0) (-1.14523e-39 -2.73336e-39 0) (-2.00123e-39 -6.59594e-39 0) (-1.74142e-39 -2.54584e-38 0) (1.31701e-39 -2.63175e-38 0) (5.41973e-40 -1.08587e-38 0) (9.66199e-40 -2.04029e-38 0) (3.52379e-39 -2.26469e-40 0) (4.46887e-40 1.89845e-38 0) (-1.60229e-39 4.73135e-39 0) (-4.14293e-40 1.15649e-39 0) (-1.04189e-40 1.91848e-40 0) (-1.75925e-41 3.0002e-41 0) (-2.78975e-42 3.94188e-42 0) (-3.707e-43 4.88436e-43 0) (-4.63449e-44 5.45334e-44 0) (-5.21432e-45 5.77645e-45 0) (-5.56067e-46 5.69006e-46 0) (-5.97707e-47 5.28878e-47 0) (-6.93459e-47 -3.8551e-48 0) (-8.41864e-46 -1.15291e-46 0) (-1.06831e-44 -1.4967e-45 0) (-1.30578e-43 -1.88548e-44 0) (-1.53993e-42 -2.27103e-43 0) (-1.73708e-41 -2.6696e-42 0) (-1.88341e-40 -2.96448e-41 0) (-1.93473e-39 -3.23542e-40 0) (-1.90205e-38 -3.26569e-39 0) (-1.74454e-37 -3.29734e-38 0) (-1.52438e-36 -2.9519e-37 0) (-1.2082e-35 -2.74932e-36 0) (-9.08934e-35 -2.0493e-35 0) (-5.82881e-34 -1.72542e-34 0) (-3.55217e-33 -8.1516e-34 0) (-1.53424e-32 -5.72078e-33 0) (-6.60863e-32 1.84065e-32 0) (1.80872e-32 6.83032e-31 0) (-9.35291e-33 8.51022e-32 0) (-1.48073e-33 7.24328e-33 0) (-2.90175e-34 4.64544e-34 0) (-3.64341e-35 2.18347e-35 0) (-4.99718e-36 6.90609e-37 0) (-5.69189e-37 -8.31181e-37 0) (6.06411e-38 -8.3095e-38 0) (3.38781e-38 4.71857e-37 0) (-3.80595e-38 3.35081e-37 0) (-3.41138e-38 7.11751e-38 0) (-1.27705e-38 -3.11951e-38 0) (-2.38272e-38 -7.48302e-38 0) (-2.07323e-38 -2.92842e-37 0) (1.66236e-38 -3.02528e-37 0) (6.61809e-39 -1.23514e-37 0) (1.16299e-38 -2.35318e-37 0) (4.30248e-38 -2.50273e-39 0) (5.28051e-39 2.19455e-37 0) (-1.99693e-38 5.39491e-38 0) (-5.0798e-39 1.2973e-38 0) (-1.26017e-39 2.12428e-39 0) (-2.10211e-40 3.28455e-40 0) (-3.30192e-41 4.27425e-41 0) (-4.34951e-42 5.2546e-42 0) (-5.40086e-43 5.827e-43 0) (-6.03899e-44 6.13838e-44 0) (-6.406e-45 6.01837e-45 0) (-6.48964e-46 5.63862e-46 0) (-2.96059e-46 5.09273e-47 0) (-3.11368e-45 1.71517e-47 0) (-3.96093e-44 1.72716e-46 0) (-4.85358e-43 2.2223e-45 0) (-5.75917e-42 2.7709e-44 0) (-6.52248e-41 3.31194e-43 0) (-7.14699e-40 3.81681e-42 0) (-7.38704e-39 4.17806e-41 0) (-7.39974e-38 4.39572e-40 0) (-6.85127e-37 4.32756e-39 0) (-6.20304e-36 4.08421e-38 0) (-4.98946e-35 3.50937e-37 0) (-4.04507e-34 2.8889e-36 0) (-2.66003e-33 2.03722e-35 0) (-1.95222e-32 1.37788e-34 0) (-8.86749e-32 6.58029e-34 0) (-6.76785e-31 2.99518e-33 0) (-1.80634e-32 6.83118e-31 0) (9.34018e-33 8.51201e-32 0) (1.478e-33 7.24264e-33 0) (2.91505e-34 4.64993e-34 0) (3.66987e-35 3.5638e-35 0) (2.54396e-36 4.12963e-36 0) (9.24305e-38 -8.89268e-36 0) (1.41664e-36 -8.36855e-37 0) (4.64508e-37 5.39215e-36 0) (-4.00966e-37 3.79832e-36 0) (-3.51092e-37 7.97859e-37 0) (-1.03319e-37 -3.224e-37 0) (-2.33833e-37 -8.25394e-37 0) (-2.05521e-37 -3.31751e-36 0) (2.00417e-37 -3.42538e-36 0) (7.53407e-38 -1.37597e-36 0) (1.25863e-37 -2.67771e-36 0) (4.70676e-37 -2.68635e-38 0) (5.34901e-38 2.50468e-36 0) (-2.32297e-37 6.02802e-37 0) (-5.81106e-38 1.42067e-37 0) (-1.41609e-38 2.28567e-38 0) (-2.33072e-39 3.48462e-39 0) (-3.61898e-40 4.47819e-40 0) (-4.72126e-41 5.45139e-41 0) (-5.81622e-42 5.99235e-42 0) (-6.45928e-43 6.2686e-43 0) (-6.81291e-44 6.10786e-44 0) (-6.6898e-45 5.69418e-45 0) (-6.76759e-46 5.17544e-46 0) (-7.06552e-46 2.46438e-46 0) (-8.23316e-45 2.68314e-45 0) (-9.9984e-44 3.4182e-44 0) (-1.17443e-42 4.19349e-43 0) (-1.3161e-41 4.98271e-42 0) (-1.42291e-40 5.65185e-41 0) (-1.45062e-39 6.20405e-40 0) (-1.42598e-38 6.42507e-39 0) (-1.29589e-37 6.44905e-38 0) (-1.13981e-36 5.97899e-37 0) (-8.92721e-36 5.40576e-36 0) (-6.87905e-35 4.30151e-35 0) (-4.34627e-34 3.37368e-34 0) (-2.85658e-33 1.98623e-33 0) (-1.22223e-32 1.16559e-32 0) (-6.61405e-32 1.00835e-32 0) (-2.04257e-32 6.85846e-32 0) (1.05589e-32 1.23998e-32 0) (1.71525e-33 1.30592e-33 0) (3.5946e-34 1.06215e-34 0) (4.65505e-35 1.62216e-34 0) (-1.75458e-35 3.89113e-35 0) (-3.89985e-36 -9.13103e-35 0) (1.48729e-35 -8.47961e-36 0) (5.24221e-36 5.55044e-35 0) (-3.52934e-36 3.88521e-35 0) (-2.64372e-36 7.99949e-36 0) (1.92885e-37 -3.35749e-36 0) (-1.38031e-36 -8.3011e-36 0) (-1.2563e-36 -3.39388e-35 0) (2.53382e-36 -3.50041e-35 0) (8.41261e-37 -1.38575e-35 0) (1.19598e-36 -2.74857e-35 0) (4.51136e-36 -2.58454e-37 0) (3.86373e-37 2.57904e-35 0) (-2.68624e-36 6.09379e-36 0) (-6.53103e-37 1.3981e-36 0) (-1.55482e-37 2.20554e-37 0) (-2.51213e-38 3.30309e-38 0) (-3.84466e-39 4.18514e-39 0) (-4.95262e-40 5.03498e-40 0) (-6.04114e-41 5.48101e-41 0) (-6.65026e-42 5.68827e-42 0) (-6.96543e-43 5.50545e-43 0) (-6.79343e-44 5.10376e-44 0) (-6.34868e-45 4.48786e-45 0) (-7.07636e-46 4.22706e-46 0) (-1.90579e-45 6.00203e-46 0) (-2.24276e-44 7.20754e-45 0) (-2.61165e-43 8.76302e-44 0) (-2.89571e-42 1.03041e-42 0) (-3.09003e-41 1.15613e-41 0) (-3.09767e-40 1.25171e-40 0) (-2.98205e-39 1.2781e-39 0) (-2.63426e-38 1.25824e-38 0) (-2.23544e-37 1.14428e-37 0) (-1.65958e-36 1.00392e-36 0) (-1.19407e-35 7.76384e-36 0) (-6.67227e-35 5.75839e-35 0) (-3.77537e-34 3.22538e-34 0) (-1.08448e-33 1.63056e-33 0) (-4.38992e-33 1.35993e-33 0) (-2.7577e-33 1.35266e-32 0) (1.32702e-33 2.23881e-33 0) (2.58568e-34 -4.23422e-34 0) (1.96285e-34 -4.05513e-35 0) (2.04355e-35 1.60163e-33 0) (-1.70997e-34 3.93754e-34 0) (-3.51286e-35 -9.54781e-34 0) (1.30447e-34 -8.66368e-35 0) (5.46247e-35 5.757e-34 0) (-5.04244e-36 3.99123e-34 0) (1.11974e-35 8.05773e-35 0) (4.13715e-35 -2.99605e-35 0) (2.42971e-35 -8.1879e-35 0) (1.93953e-35 -3.48694e-34 0) (3.29381e-35 -3.59297e-34 0) (8.53726e-36 -1.38571e-34 0) (6.09012e-36 -2.84275e-34 0) (2.09176e-35 -2.43647e-36 0) (-2.14195e-36 2.67885e-34 0) (-2.84997e-35 6.12111e-35 0) (-6.68497e-36 1.35968e-35 0) (-1.5376e-36 2.08662e-36 0) (-2.43097e-37 3.05792e-37 0) (-3.65184e-38 3.80271e-38 0) (-4.63685e-39 4.50938e-39 0) (-5.58925e-40 4.84736e-40 0) (-6.09309e-41 4.981e-41 0) (-6.33131e-42 4.77883e-42 0) (-6.13378e-43 4.39896e-43 0) (-5.69116e-44 3.84126e-44 0) (-5.02587e-45 3.24034e-45 0) (-6.94981e-46 3.91173e-46 0) (-3.29065e-45 1.66791e-45 0) (-3.76129e-44 1.98982e-44 0) (-4.13115e-43 2.31925e-43 0) (-4.35704e-42 2.57402e-42 0) (-4.31008e-41 2.7498e-41 0) (-4.07791e-40 2.76016e-40 0) (-3.53002e-39 2.66064e-39 0) (-2.91274e-38 2.35295e-38 0) (-2.08768e-37 1.99569e-37 0) (-1.42517e-36 1.47322e-36 0) (-7.35646e-36 1.03887e-35 0) (-3.67127e-35 5.41416e-35 0) (-7.29946e-35 2.60333e-34 0) (-2.12323e-34 2.13982e-34 0) (-6.53141e-34 1.23059e-33 0) (-7.58228e-34 -1.32213e-33 0) (-5.59578e-34 -7.17993e-33 0) (-4.72108e-34 -7.90256e-34 0) (-4.79657e-34 1.3984e-32 0) (-1.5648e-34 3.41237e-33 0) (-1.06084e-34 -8.4097e-33 0) (8.1278e-34 -7.54898e-34 0) (5.82766e-34 5.03844e-33 0) (6.97009e-34 3.46187e-33 0) (1.02918e-33 6.74705e-34 0) (1.35578e-33 -2.84447e-34 0) (1.15428e-33 -6.95557e-34 0) (9.68545e-34 -3.02651e-33 0) (4.96607e-34 -3.11281e-33 0) (8.6746e-35 -1.17468e-33 0) (-7.72003e-35 -2.47841e-33 0) (-3.97151e-34 -1.91293e-35 0) (-1.61091e-34 2.34586e-33 0) (-3.13481e-34 5.21988e-34 0) (-6.87314e-35 1.10704e-34 0) (-1.50784e-35 1.64583e-35 0) (-2.30957e-36 2.342e-36 0) (-3.38963e-37 2.849e-37 0) (-4.22214e-38 3.31732e-38 0) (-5.01569e-39 3.51513e-39 0) (-5.39916e-40 3.57007e-40 0) (-5.55489e-41 3.39278e-41 0) (-5.33471e-42 3.099e-42 0) (-4.91488e-43 2.6888e-43 0) (-4.29508e-44 2.24954e-44 0) (-3.65281e-45 1.82331e-45 0) (-7.54593e-46 3.81925e-46 0) (-5.34071e-45 2.91257e-45 0) (-5.79725e-44 3.35455e-44 0) (-6.05725e-43 3.68805e-43 0) (-5.92342e-42 3.89394e-42 0) (-5.5253e-41 3.85709e-41 0) (-4.69663e-40 3.65467e-40 0) (-3.78824e-39 3.16887e-39 0) (-2.63023e-38 2.61735e-38 0) (-1.72454e-37 1.87397e-37 0) (-8.28695e-37 1.26812e-36 0) (-3.75405e-36 6.32275e-36 0) (-4.33428e-36 2.87759e-35 0) (-2.45973e-36 2.54923e-35 0) (-2.05676e-33 -2.04302e-33 0) (-9.47547e-33 -1.40263e-32 0) (-1.41587e-32 -6.67949e-32 0) (-4.73758e-32 -8.21462e-33 0) (-1.79942e-32 1.2911e-31 0) (3.57146e-32 3.08701e-32 0) (4.43654e-33 -7.83383e-32 0) (-5.29966e-33 -6.68674e-33 0) (5.4932e-33 4.63553e-32 0) (2.2726e-32 3.13208e-32 0) (2.88298e-32 5.86637e-33 0) (3.20499e-32 -2.0505e-33 0) (2.99749e-32 -5.87644e-33 0) (2.54628e-32 -2.74419e-32 0) (7.54086e-33 -2.81783e-32 0) (7.62789e-34 -1.01174e-32 0) (-3.54028e-33 -2.27312e-32 0) (-1.72543e-32 -1.50316e-34 0) (-4.28046e-33 2.16469e-32 0) (-3.07996e-33 4.52391e-33 0) (-6.14688e-34 9.13284e-34 0) (-1.24874e-34 1.29971e-34 0) (-1.83664e-35 1.79124e-35 0) (-2.6086e-36 2.11947e-36 0) (-3.17535e-37 2.41825e-37 0) (-3.70283e-38 2.51733e-38 0) (-3.92896e-39 2.52227e-39 0) (-3.99544e-40 2.36834e-40 0) (-3.80098e-41 2.14267e-41 0) (-3.47502e-42 1.84315e-42 0) (-3.01734e-43 1.53112e-43 0) (-2.52638e-44 1.22042e-44 0) (-2.08044e-45 9.76202e-46 0) (-7.67039e-46 4.86195e-46 0) (-6.59366e-45 4.78917e-45 0) (-6.79216e-44 5.22689e-44 0) (-6.53939e-43 5.47721e-43 0) (-5.97487e-42 5.37776e-42 0) (-4.9374e-41 5.04316e-41 0) (-3.82442e-40 4.32203e-40 0) (-2.48257e-39 3.52588e-39 0) (-1.45258e-38 2.49814e-38 0) (-4.9851e-38 1.68762e-37 0) (-4.32403e-38 8.7462e-37 0) (2.40602e-36 4.55696e-36 0) (2.30624e-35 1.44138e-35 0) (-1.77794e-32 -1.26526e-32 0) (-9.94551e-32 -8.4631e-32 0) (-2.46541e-31 -4.21519e-31 0) (-1.08421e-30 -5.54151e-32 0) (-3.73215e-31 8.13886e-31 0) (8.9806e-31 1.9176e-31 0) (1.11586e-31 -4.97539e-31 0) (-2.40329e-31 -4.14807e-32 0) (5.45773e-32 2.91708e-31 0) (4.53985e-31 1.9428e-31 0) (5.52456e-31 3.3783e-32 0) (5.854e-31 -1.82482e-32 0) (5.61476e-31 -3.5709e-32 0) (4.83115e-31 -1.70696e-31 0) (1.10617e-31 -1.74731e-31 0) (6.88222e-33 -6.03724e-32 0) (-7.01284e-32 -1.42353e-31 0) (-3.66509e-31 -7.89276e-34 0) (-7.68348e-32 1.36376e-31 0) (-3.23155e-32 2.72349e-32 0) (-5.64964e-33 5.08334e-33 0) (-1.05272e-33 6.87268e-34 0) (-1.46536e-34 9.02161e-35 0) (-2.00668e-35 1.03108e-35 0) (-2.37271e-36 1.14295e-36 0) (-2.71015e-37 1.16438e-37 0) (-2.82491e-38 1.14641e-38 0) (-2.83419e-39 1.06185e-39 0) (-2.6642e-40 9.50074e-41 0) (-2.41272e-41 8.10052e-42 0) (-2.0772e-42 6.68075e-43 0) (-1.72681e-43 5.29291e-44 0) (-1.37736e-44 4.06889e-45 0) (-1.10437e-45 3.57336e-46 0) (-4.40034e-46 6.82541e-46 0) (-2.50501e-45 7.50659e-45 0) (-6.44441e-45 8.27666e-44 0) (1.75338e-43 8.74334e-43 0) (4.71228e-42 9.03162e-42 0) (7.70659e-41 8.93388e-41 0) (1.05976e-39 8.77521e-40 0) (1.27623e-38 8.28129e-39 0) (1.40493e-37 7.92804e-38 0) (1.42376e-36 7.29895e-37 0) (1.32462e-35 6.89236e-36 0) (1.16148e-34 6.16041e-35 0) (-1.10158e-31 -7.53039e-32 0) (-7.66237e-31 -5.23395e-31 0) (-3.07781e-30 -3.07613e-30 0) (-1.73253e-29 -4.97094e-31 0) (-5.73255e-30 5.96428e-30 0) (1.51167e-29 1.34036e-30 0) (1.64253e-30 -3.70325e-30 0) (-4.70916e-30 -2.61492e-31 0) (3.9747e-31 2.11602e-30 0) (6.73429e-30 1.35725e-30 0) (7.8932e-30 2.11294e-31 0) (8.14919e-30 -8.89104e-32 0) (7.95609e-30 -2.14117e-31 0) (6.96544e-30 -1.20664e-30 0) (1.2369e-30 -1.23171e-30 0) (4.45458e-32 -3.71329e-31 0) (-9.35516e-31 -1.0332e-30 0) (-5.68895e-30 -4.35331e-33 0) (-9.79116e-31 9.98394e-31 0) (-2.4943e-31 1.68472e-31 0) (-3.74765e-32 2.99007e-32 0) (-6.10401e-33 3.80672e-33 0) (-7.91678e-34 4.85618e-34 0) (-1.02471e-34 5.377e-35 0) (-1.16775e-35 5.84619e-36 0) (-1.29528e-36 5.8371e-37 0) (-1.3215e-37 5.66593e-38 0) (-1.30319e-38 5.17421e-39 0) (-1.20879e-39 4.57921e-40 0) (-1.0829e-40 3.86303e-41 0) (-9.24288e-42 3.15835e-42 0) (-7.62997e-43 2.48141e-43 0) (-6.04894e-44 1.89194e-44 0) (-4.52938e-45 1.39829e-45 0) (1.3494e-45 1.52162e-46 0) (2.32768e-44 5.71501e-46 0) (3.09143e-43 5.82136e-45 0) (3.96786e-42 5.60439e-44 0) (4.892e-41 5.12843e-43 0) (5.82645e-40 4.26113e-42 0) (6.62236e-39 3.34094e-41 0) (7.26381e-38 2.23946e-40 0) (7.52505e-37 1.40517e-39 0) (7.5272e-36 6.33776e-39 0) (6.98877e-35 2.65071e-38 0) (6.29639e-34 1.97291e-38 0) (-6.82148e-31 1.68903e-34 0) (-5.29803e-30 6.49412e-35 0) (-2.25727e-29 4.62845e-35 0) (-1.85165e-28 9.60978e-36 0) (-6.1271e-29 1.92818e-36 0) (1.69089e-28 3.62855e-37 0) (1.22065e-29 -2.84883e-37 0) (-5.41999e-29 -2.30162e-35 0) (2.63934e-30 -5.38813e-34 0) (6.85888e-29 -8.60907e-33 0) (7.71278e-29 -1.03369e-31 0) (7.88215e-29 -8.65255e-31 0) (7.73624e-29 -1.03369e-31 0) (7.01829e-29 -8.60909e-33 0) (8.94603e-30 -5.38834e-34 0) (2.71113e-31 -2.30213e-35 0) (-6.90582e-30 -3.06269e-37 0) (-6.10049e-29 8.06873e-38 0) (-7.1719e-30 1.85939e-38 0) (-1.72768e-30 2.37755e-39 0) (-2.29998e-31 2.94145e-40 0) (-3.60149e-32 3.11195e-41 0) (-4.42325e-33 3.27214e-42 0) (-5.57493e-34 3.16442e-43 0) (-6.16239e-35 3.02758e-44 0) (-6.7086e-36 2.7349e-45 0) (-6.71178e-37 2.42566e-46 0) (-6.52801e-38 2.05536e-47 0) (-5.97233e-39 1.70176e-48 0) (-5.29387e-40 1.35113e-49 0) (-4.47211e-41 4.26481e-51 0) (-3.66069e-42 -8.55395e-50 0) (-2.87913e-43 -1.16383e-48 0) (-2.19554e-44 -1.53074e-47 0) (-1.35863e-45 -1.9728e-46 0) (3.79367e-45 -2.48005e-45 0) (5.51875e-44 -3.06125e-44 0) (7.38666e-43 -3.68212e-43 0) (9.38454e-42 -4.35509e-42 0) (1.13622e-40 -5.00248e-41 0) (1.30397e-39 -5.64875e-40 0) (1.42889e-38 -6.14861e-39 0) (1.47323e-37 -6.5631e-38 0) (1.45208e-36 -6.66779e-37 0) (1.32645e-35 -6.62306e-36 0) (1.16107e-34 -6.14056e-35 0) (-1.10055e-31 7.66293e-32 0) (-7.66711e-31 5.23938e-31 0) (-3.07794e-30 3.07654e-30 0) (-1.73253e-29 4.97175e-31 0) (-5.73256e-30 -5.96427e-30 0) (1.51167e-29 -1.34036e-30 0) (1.64254e-30 3.70325e-30 0) (-4.70905e-30 2.61458e-31 0) (3.98304e-31 -2.11669e-30 0) (6.73897e-30 -1.36755e-30 0) (7.92062e-30 -3.30324e-31 0) (8.14919e-30 -8.68855e-31 0) (7.92866e-30 9.50873e-32 0) (6.96076e-30 1.19633e-30 0) (1.23607e-30 1.23104e-30 0) (4.44391e-32 3.71295e-31 0) (-9.35529e-31 1.0332e-30 0) (-5.68895e-30 4.35333e-33 0) (-9.79117e-31 -9.98394e-31 0) (-2.4943e-31 -1.68472e-31 0) (-3.74765e-32 -2.99007e-32 0) (-6.10401e-33 -3.80672e-33 0) (-7.91678e-34 -4.85618e-34 0) (-1.02471e-34 -5.377e-35 0) (-1.16775e-35 -5.84619e-36 0) (-1.29528e-36 -5.8371e-37 0) (-1.3215e-37 -5.66593e-38 0) (-1.30319e-38 -5.17421e-39 0) (-1.20879e-39 -4.57921e-40 0) (-1.0829e-40 -3.86303e-41 0) (-9.24288e-42 -3.15835e-42 0) (-7.62998e-43 -2.48141e-43 0) (-6.05063e-44 -1.89254e-44 0) (-4.74727e-45 -1.46969e-45 0) (-1.38901e-45 -9.73594e-46 0) (-1.05155e-44 -9.56974e-45 0) (-9.71969e-44 -1.00383e-43 0) (-8.36788e-43 -9.91448e-43 0) (-6.25022e-42 -9.36533e-42 0) (-4.01078e-41 -8.17906e-41 0) (-1.53092e-40 -6.8451e-40 0) (3.5937e-40 -5.16687e-39 0) (1.8924e-38 -3.82619e-38 0) (2.52752e-37 -2.5196e-37 0) (2.65469e-36 -1.80254e-36 0) (2.29405e-35 -1.23843e-35 0) (-2.00775e-32 2.37989e-32 0) (-1.06575e-31 8.82814e-32 0) (-2.48212e-31 4.24037e-31 0) (-1.08478e-30 5.58883e-32 0) (-3.73312e-31 -8.13803e-31 0) (8.98044e-31 -1.91749e-31 0) (1.11592e-31 4.97539e-31 0) (-2.40261e-31 4.14632e-32 0) (5.51039e-32 -2.91908e-31 0) (4.56909e-31 -1.96497e-31 0) (5.69078e-31 -5.28184e-32 0) (5.854e-31 -9.31579e-32 0) (5.44855e-31 1.66735e-32 0) (4.80191e-31 1.68479e-31 0) (1.1009e-31 1.74531e-31 0) (6.81396e-33 6.03548e-32 0) (-7.01372e-32 1.42351e-31 0) (-3.6651e-31 7.89131e-34 0) (-7.68349e-32 -1.36376e-31 0) (-3.23155e-32 -2.72349e-32 0) (-5.64965e-33 -5.08334e-33 0) (-1.05272e-33 -6.87268e-34 0) (-1.46536e-34 -9.02161e-35 0) (-2.00668e-35 -1.03108e-35 0) (-2.37271e-36 -1.14295e-36 0) (-2.71015e-37 -1.16438e-37 0) (-2.82491e-38 -1.14641e-38 0) (-2.83419e-39 -1.06185e-39 0) (-2.6642e-40 -9.50074e-41 0) (-2.41272e-41 -8.10052e-42 0) (-2.0772e-42 -6.68076e-43 0) (-1.72688e-43 -5.2933e-44 0) (-1.38524e-44 -4.11811e-45 0) (-2.01037e-45 -9.44835e-46 0) (-1.03581e-44 -7.42562e-45 0) (-1.06653e-43 -8.10094e-44 0) (-1.03572e-42 -8.49111e-43 0) (-9.55538e-42 -8.34673e-42 0) (-8.03965e-41 -7.81611e-41 0) (-6.36745e-40 -6.6981e-40 0) (-4.35124e-39 -5.4287e-39 0) (-2.75608e-38 -3.82452e-38 0) (-1.28338e-37 -2.5185e-37 0) (-5.24032e-37 -1.24977e-36 0) (-3.16934e-37 -5.62839e-36 0) (3.26826e-36 -8.84305e-36 0) (-5.65709e-32 6.32743e-32 0) (-1.05377e-31 3.70781e-32 0) (-3.17582e-32 8.37829e-32 0) (-5.15067e-32 1.10088e-32 0) (-1.86178e-32 -1.28642e-31 0) (3.56164e-32 -3.08108e-32 0) (4.42548e-33 7.83449e-32 0) (-5.2889e-33 6.6792e-33 0) (5.58325e-33 -4.64259e-32 0) (2.31991e-32 -3.19199e-32 0) (3.11704e-32 -9.67688e-33 0) (3.20499e-32 -1.90177e-32 0) (2.76343e-32 2.06593e-33 0) (2.49896e-32 2.68428e-32 0) (7.45063e-33 2.81077e-32 0) (7.50404e-34 1.01091e-32 0) (-3.54193e-33 2.27303e-32 0) (-1.72545e-32 1.50221e-34 0) (-4.28048e-33 -2.16469e-32 0) (-3.07996e-33 -4.52391e-33 0) (-6.14688e-34 -9.13284e-34 0) (-1.24874e-34 -1.29971e-34 0) (-1.83664e-35 -1.79124e-35 0) (-2.6086e-36 -2.11947e-36 0) (-3.17535e-37 -2.41825e-37 0) (-3.70283e-38 -2.51733e-38 0) (-3.92896e-39 -2.52227e-39 0) (-3.99544e-40 -2.36834e-40 0) (-3.80098e-41 -2.14267e-41 0) (-3.47502e-42 -1.84315e-42 0) (-3.01739e-43 -1.53114e-43 0) (-2.53194e-44 -1.22318e-44 0) (-2.74569e-45 -1.32222e-45 0) (-8.42203e-45 -4.64856e-45 0) (-9.03437e-44 -5.30289e-44 0) (-9.45664e-43 -5.84683e-43 0) (-9.28094e-42 -6.18493e-42 0) (-8.6741e-41 -6.14969e-41 0) (-7.41386e-40 -5.8362e-40 0) (-5.99048e-39 -5.08836e-39 0) (-4.20268e-38 -4.20553e-38 0) (-2.75792e-37 -3.04114e-37 0) (-1.36375e-36 -2.05473e-36 0) (-6.16186e-36 -1.05316e-35 0) (-9.5194e-36 -4.75587e-35 0) (-7.47217e-36 -6.04618e-35 0) (-7.5737e-31 4.90761e-31 0) (-9.28057e-31 6.42337e-32 0) (-1.21347e-31 1.29664e-32 0) (-2.73753e-32 1.20658e-33 0) (-4.1393e-33 -1.39578e-32 0) (-7.14668e-34 -3.41084e-33 0) (-1.74609e-34 8.40963e-33 0) (8.06333e-34 7.53394e-34 0) (5.96579e-34 -5.05017e-33 0) (7.69277e-34 -3.551e-33 0) (1.37138e-33 -1.17301e-33 0) (1.35578e-33 -2.1877e-33 0) (8.12073e-34 1.97249e-34 0) (8.96175e-34 2.93737e-33 0) (4.81848e-34 3.10108e-33 0) (8.46257e-35 1.17317e-33 0) (-7.74947e-35 2.47824e-33 0) (-3.97186e-34 1.91103e-35 0) (-1.61095e-34 -2.34586e-33 0) (-3.13481e-34 -5.21989e-34 0) (-6.87315e-35 -1.10704e-34 0) (-1.50784e-35 -1.64583e-35 0) (-2.30957e-36 -2.342e-36 0) (-3.38963e-37 -2.849e-37 0) (-4.22214e-38 -3.31732e-38 0) (-5.01569e-39 -3.51513e-39 0) (-5.39916e-40 -3.57007e-40 0) (-5.55489e-41 -3.39278e-41 0) (-5.33471e-42 -3.099e-42 0) (-4.9149e-43 -2.68881e-43 0) (-4.29818e-44 -2.251e-44 0) (-4.04147e-45 -2.01351e-45 0) (-5.42722e-45 -2.7813e-45 0) (-5.94583e-44 -3.1995e-44 0) (-6.54799e-43 -3.73594e-43 0) (-6.91953e-42 -4.15993e-42 0) (-6.87157e-41 -4.45229e-41 0) (-6.51245e-40 -4.4877e-40 0) (-5.66942e-39 -4.33121e-39 0) (-4.6816e-38 -3.85302e-38 0) (-3.38891e-37 -3.26696e-37 0) (-2.30824e-36 -2.4374e-36 0) (-1.22005e-35 -1.71313e-35 0) (-5.99263e-35 -9.20762e-35 0) (-1.34212e-34 -4.39509e-34 0) (-3.08072e-34 -5.86287e-34 0) (-4.01635e-32 5.87048e-31 0) (-1.03458e-31 6.85024e-32 0) (-1.88089e-32 -7.49308e-33 0) (-4.22786e-33 -2.08029e-33 0) (-6.40932e-34 -2.02663e-33 0) (-2.74435e-34 -4.50482e-34 0) (-4.83715e-35 9.47475e-34 0) (1.29032e-34 8.55607e-35 0) (5.6225e-35 -5.77731e-34 0) (3.30058e-36 -4.12883e-34 0) (4.85974e-35 -1.49999e-34 0) (4.13713e-35 -3.01755e-34 0) (-1.3105e-35 1.2458e-35 0) (1.10314e-35 3.34943e-34 0) (3.11477e-35 3.57354e-34 0) (8.26926e-36 1.38305e-34 0) (6.05174e-36 2.84244e-34 0) (2.09129e-35 2.43287e-36 0) (-2.1425e-36 -2.67885e-34 0) (-2.84998e-35 -6.12111e-35 0) (-6.68498e-36 -1.35968e-35 0) (-1.5376e-36 -2.08662e-36 0) (-2.43097e-37 -3.05792e-37 0) (-3.65184e-38 -3.80271e-38 0) (-4.63685e-39 -4.50938e-39 0) (-5.58925e-40 -4.84736e-40 0) (-6.09309e-41 -4.981e-41 0) (-6.33131e-42 -4.77883e-42 0) (-6.13379e-43 -4.39896e-43 0) (-5.6928e-44 -3.84173e-44 0) (-5.24045e-45 -3.30348e-45 0) (-3.40019e-45 -1.21937e-45 0) (-3.60561e-44 -1.21886e-44 0) (-4.20408e-43 -1.48543e-43 0) (-4.67666e-42 -1.75111e-42 0) (-4.99987e-41 -1.97301e-41 0) (-5.03314e-40 -2.14022e-40 0) (-4.85123e-39 -2.19614e-39 0) (-4.31048e-38 -2.16287e-38 0) (-3.65557e-37 -1.97955e-37 0) (-2.73976e-36 -1.73199e-36 0) (-1.95912e-35 -1.35424e-35 0) (-1.11604e-34 -9.97049e-35 0) (-6.14396e-34 -5.77976e-34 0) (-1.8659e-33 -2.89554e-33 0) (-6.3625e-33 -4.39827e-33 0) (5.2823e-33 1.44474e-30 0) (-1.15135e-32 1.78471e-31 0) (-2.32382e-33 1.35741e-32 0) (-6.96262e-34 6.34351e-34 0) (-1.16395e-34 -1.72863e-34 0) (-4.40672e-35 -4.58645e-35 0) (-7.37182e-36 9.01632e-35 0) (1.44566e-35 8.30798e-36 0) (5.40337e-36 -5.57633e-35 0) (-2.58348e-36 -4.04962e-35 0) (1.49831e-36 -1.58122e-35 0) (1.92827e-37 -3.2106e-35 0) (-5.52293e-36 4.88542e-37 0) (-2.20785e-36 3.22962e-35 0) (2.32127e-36 3.47604e-35 0) (8.08479e-37 1.38228e-35 0) (1.19115e-36 2.74814e-35 0) (4.51076e-36 2.57961e-37 0) (3.86301e-37 -2.57904e-35 0) (-2.68625e-36 -6.0938e-36 0) (-6.53104e-37 -1.3981e-36 0) (-1.55482e-37 -2.20554e-37 0) (-2.51214e-38 -3.30309e-38 0) (-3.84466e-39 -4.18514e-39 0) (-4.95262e-40 -5.03498e-40 0) (-6.04114e-41 -5.48101e-41 0) (-6.65026e-42 -5.68827e-42 0) (-6.96544e-43 -5.50545e-43 0) (-6.79397e-44 -5.10392e-44 0) (-6.42086e-45 -4.51109e-45 0) (-1.65365e-45 -7.40122e-46 0) (-1.39131e-44 -4.79726e-45 0) (-1.69109e-43 -6.0998e-44 0) (-1.99147e-42 -7.51698e-43 0) (-2.24109e-41 -8.9566e-42 0) (-2.42773e-40 -1.02118e-40 0) (-2.48726e-39 -1.12294e-39 0) (-2.44596e-38 -1.17012e-38 0) (-2.23645e-37 -1.17391e-37 0) (-1.96007e-36 -1.09741e-36 0) (-1.54751e-35 -9.87226e-36 0) (-1.17564e-34 -7.97441e-35 0) (-7.5032e-34 -6.1748e-34 0) (-4.70979e-33 -3.80144e-33 0) (-2.02792e-32 -2.16302e-32 0) (-9.58833e-32 -3.75244e-32 0) (-5.81499e-32 9.66402e-31 0) (2.04189e-32 1.22539e-31 0) (2.65205e-33 1.25293e-32 0) (2.36333e-34 1.09584e-33 0) (-3.00759e-36 9.08361e-35 0) (-8.18477e-36 6.95643e-36 0) (-1.68318e-36 1.00522e-35 0) (1.15335e-36 9.56011e-37 0) (4.52641e-37 -5.40855e-36 0) (-3.10409e-37 -3.99122e-36 0) (4.76457e-38 -1.67998e-36 0) (-1.03363e-37 -3.58316e-36 0) (-6.33006e-37 -5.68607e-38 0) (-3.00082e-37 3.12324e-36 0) (1.78626e-37 3.3956e-36 0) (7.18911e-38 1.3716e-36 0) (1.25345e-37 2.67716e-36 0) (4.70611e-37 2.67991e-38 0) (5.34822e-38 -2.50468e-36 0) (-2.32298e-37 -6.02802e-37 0) (-5.81107e-38 -1.42067e-37 0) (-1.41609e-38 -2.28567e-38 0) (-2.33072e-39 -3.48462e-39 0) (-3.61898e-40 -4.47819e-40 0) (-4.72126e-41 -5.45139e-41 0) (-5.81622e-42 -5.99235e-42 0) (-6.45928e-43 -6.2686e-43 0) (-6.8131e-44 -6.10786e-44 0) (-6.7167e-45 -5.69454e-45 0) (-1.04405e-45 -5.2304e-46 0) (-5.55839e-45 -3.27148e-46 0) (-7.03487e-44 -3.84296e-45 0) (-8.65888e-43 -5.00541e-44 0) (-1.03037e-41 -6.32578e-43 0) (-1.17299e-40 -7.68125e-42 0) (-1.28772e-39 -9.02504e-41 0) (-1.33919e-38 -1.01091e-39 0) (-1.34088e-37 -1.09471e-38 0) (-1.25126e-36 -1.11697e-37 0) (-1.12586e-35 -1.10492e-36 0) (-9.15314e-35 -1.01125e-35 0) (-7.2613e-34 -9.0712e-35 0) (-4.84133e-33 -7.22285e-34 0) (-3.32004e-32 -5.63315e-33 0) (-1.52074e-31 -3.25795e-32 0) (-9.81134e-31 -1.63358e-31 0) (-1.0778e-31 -3.35017e-31 0) (-8.207e-32 -1.96405e-32 0) (-1.55259e-32 1.53403e-32 0) (-3.79197e-33 2.89476e-33 0) (-5.91381e-34 5.11772e-34 0) (-9.61136e-35 6.57044e-35 0) (-1.2674e-35 9.10251e-36 0) (-1.51508e-36 9.9407e-37 0) (-1.4565e-37 -3.7675e-37 0) (-4.90895e-38 -3.4522e-37 0) (1.93798e-39 -1.57868e-37 0) (-1.29758e-38 -3.45417e-37 0) (-6.19748e-38 -1.28004e-38 0) (-2.99346e-38 2.7292e-37 0) (1.44488e-38 2.99391e-37 0) (6.26722e-39 1.23045e-37 0) (1.15763e-38 2.35258e-37 0) (4.30179e-38 2.49558e-39 0) (5.27966e-39 -2.19455e-37 0) (-1.99694e-38 -5.39491e-38 0) (-5.07981e-39 -1.2973e-38 0) (-1.26017e-39 -2.12428e-39 0) (-2.10211e-40 -3.28455e-40 0) (-3.30192e-41 -4.27425e-41 0) (-4.34951e-42 -5.25461e-42 0) (-5.40086e-43 -5.827e-43 0) (-6.03899e-44 -6.13838e-44 0) (-6.40678e-45 -6.01869e-45 0) (-6.60371e-46 -5.68568e-46 0) (-4.57514e-46 -1.19421e-46 0) (-5.3422e-45 -9.83256e-46 0) (-6.91612e-44 -1.34404e-44 0) (-8.67647e-43 -1.78034e-43 0) (-1.04697e-41 -2.29418e-42 0) (-1.21968e-40 -2.8347e-41 0) (-1.35701e-39 -3.40822e-40 0) (-1.45377e-38 -3.89327e-39 0) (-1.47097e-37 -4.34319e-38 0) (-1.43046e-36 -4.54547e-37 0) (-1.28787e-35 -4.71307e-36 0) (-1.11356e-34 -4.52116e-35 0) (-8.51004e-34 -4.45846e-34 0) (-6.20076e-33 -3.93094e-33 0) (-3.40525e-32 -3.60322e-32 0) (-1.67805e-31 -2.39766e-31 0) (-9.2623e-32 -1.44629e-30 0) (-8.53613e-31 -3.12226e-32 0) (-1.02271e-30 -5.68942e-33 0) (-1.32782e-31 -4.60684e-34 0) (-2.95933e-32 -2.09905e-35 0) (-4.02583e-33 8.93118e-37 0) (-6.14701e-34 2.67936e-37 0) (-7.58261e-35 1.08729e-37 0) (-9.43606e-36 1.08633e-38 0) (-1.04037e-36 -4.08039e-38 0) (-1.15141e-37 -3.10889e-38 0) (-1.08024e-38 -1.47997e-38 0) (-2.23081e-39 -3.33317e-38 0) (-5.43353e-39 -1.94413e-39 0) (-2.5707e-39 2.34677e-38 0) (1.11854e-39 2.5998e-38 0) (5.09471e-40 1.08101e-38 0) (9.61169e-40 2.03967e-38 0) (3.52314e-39 2.2571e-40 0) (4.46806e-40 -1.89846e-38 0) (-1.6023e-39 -4.73136e-39 0) (-4.14294e-40 -1.15649e-39 0) (-1.04189e-40 -1.91849e-40 0) (-1.75925e-41 -3.0002e-41 0) (-2.78976e-42 -3.94188e-42 0) (-3.707e-43 -4.88436e-43 0) (-4.63449e-44 -5.45334e-44 0) (-5.2148e-45 -5.77643e-45 0) (-5.63187e-46 -5.68809e-46 0) (-1.62421e-46 -4.99832e-47 0) (-1.50478e-45 4.56529e-47 0) (-2.03584e-44 6.98063e-46 0) (-2.67056e-43 9.39618e-45 0) (-3.39977e-42 1.22135e-43 0) (-4.15967e-41 1.53762e-42 0) (-4.93273e-40 1.85948e-41 0) (-5.57683e-39 2.16819e-40 0) (-6.11084e-38 2.39377e-39 0) (-6.30133e-37 2.49251e-38 0) (-6.31805e-36 2.28093e-37 0) (-5.8197e-35 1.59206e-36 0) (-5.26543e-34 -3.37532e-37 0) (-4.13707e-33 -2.80729e-34 0) (-3.2588e-32 -6.72271e-33 0) (-1.84185e-31 -1.01529e-31 0) (-1.09652e-30 -1.06925e-30 0) (1.87781e-32 -6.4141e-30 0) (-9.17906e-32 -7.31256e-32 0) (-9.03371e-32 -2.63771e-32 0) (-1.69163e-32 -1.8938e-32 0) (-4.06508e-33 -3.10614e-33 0) (-6.26009e-34 -5.20423e-34 0) (-1.00421e-34 -6.59505e-35 0) (-1.31292e-35 -8.2754e-36 0) (-1.68754e-36 -9.14664e-37 0) (-1.92578e-37 -1.02097e-37 0) (-2.14864e-38 -1.23807e-38 0) (-2.11846e-39 -2.2239e-39 0) (-3.0712e-40 -3.01148e-39 0) (-4.65064e-40 -2.26361e-40 0) (-2.11938e-40 1.87909e-39 0) (8.5438e-41 2.10155e-39 0) (4.0312e-41 8.84614e-40 0) (7.6887e-41 1.6458e-39 0) (2.79013e-40 1.89308e-41 0) (3.5959e-41 -1.52865e-39 0) (-1.25925e-40 -3.86652e-40 0) (-3.29327e-41 -9.57357e-41 0) (-8.37328e-42 -1.60718e-41 0) (-1.42704e-42 -2.53705e-42 0) (-2.28031e-43 -3.36233e-43 0) (-3.05076e-44 -4.19457e-44 0) (-3.83482e-45 -4.71225e-45 0) (-4.33426e-46 -5.01499e-46 0) (-4.45048e-47 -4.8211e-47 0) (2.23171e-47 1.63171e-47 0) (3.73598e-46 3.01994e-46 0) (5.04692e-45 4.22412e-45 0) (6.57765e-44 5.73577e-44 0) (8.31017e-43 7.52522e-43 0) (1.00854e-41 9.57992e-42 0) (1.18426e-40 1.17144e-40 0) (1.32507e-39 1.38603e-39 0) (1.43279e-38 1.55512e-38 0) (1.4573e-37 1.66477e-37 0) (1.4336e-36 1.59823e-36 0) (1.29569e-35 1.28987e-35 0) (1.13759e-34 4.39407e-35 0) (8.68912e-34 -1.0765e-33 0) (6.46917e-33 -3.48251e-32 0) (3.48114e-32 -6.03743e-31 0) (1.77811e-31 -7.66598e-30 0) (-4.23145e-33 -6.7583e-29 0) (-1.89642e-32 -5.37116e-31 0) (5.77083e-34 -6.89891e-32 0) (-4.69101e-34 -8.20426e-33 0) (-3.47898e-34 -8.60318e-34 0) (-7.29944e-35 -1.04813e-34 0) (-1.44869e-35 -1.22412e-35 0) (-2.12243e-36 -1.50055e-36 0) (-2.96568e-37 -1.68725e-37 0) (-3.57844e-38 -1.88102e-38 0) (-4.14078e-39 -2.09179e-39 0) (-4.29042e-40 -2.92667e-40 0) (-5.09266e-41 -2.69364e-40 0) (-3.89806e-41 -2.43158e-41 0) (-1.65645e-41 1.46846e-40 0) (6.1859e-42 1.65932e-40 0) (3.02097e-42 7.04897e-41 0) (5.80639e-42 1.29848e-40 0) (2.08517e-41 1.5382e-42 0) (2.72138e-42 -1.2041e-40 0) (-9.37628e-42 -3.07809e-41 0) (-2.48086e-42 -7.70161e-42 0) (-6.36392e-43 -1.30479e-42 0) (-1.09394e-43 -2.07532e-43 0) (-1.75936e-44 -2.76908e-44 0) (-2.3684e-45 -3.4732e-45 0) (-2.99046e-46 -3.92074e-46 0) (-3.28998e-47 -4.18951e-47 0) (1.21237e-47 -4.17884e-48 0) (2.26669e-46 -6.83332e-49 0) (3.17025e-45 -4.2128e-48 0) (4.30339e-44 -5.8415e-47 0) (5.644e-43 -7.94027e-46 0) (7.18336e-42 -1.04269e-44 0) (8.78548e-41 -1.32866e-43 0) (1.04137e-39 -1.62517e-42 0) (1.17658e-38 -1.92151e-41 0) (1.28833e-37 -2.14494e-40 0) (1.32709e-36 -2.25821e-39 0) (1.3291e-35 -2.04638e-38 0) (1.22222e-34 -1.31193e-37 0) (1.10382e-33 5.54691e-37 0) (8.65002e-33 3.93357e-35 0) (6.7947e-32 9.14973e-34 0) (3.82478e-31 1.45903e-32 0) (2.26711e-30 1.7504e-31 0) (-5.18814e-32 1.46403e-30 0) (1.16687e-32 -5.45103e-31 0) (-6.50317e-33 -6.88663e-32 0) (-1.04366e-33 -6.40047e-33 0) (-2.36088e-34 -4.85124e-34 0) (-3.33476e-35 -3.67176e-35 0) (-5.0582e-36 -3.04643e-36 0) (-6.33399e-37 -3.1432e-37 0) (-7.90073e-38 -3.39275e-38 0) (-8.82086e-39 -3.78012e-39 0) (-9.5882e-40 -4.06071e-40 0) (-9.58997e-41 -4.76688e-41 0) (-9.89866e-42 -2.40076e-41 0) (-3.52009e-42 -2.43221e-42 0) (-1.29044e-42 1.08582e-41 0) (4.34103e-43 1.24062e-41 0) (2.19799e-43 5.32006e-42 0) (4.2589e-43 9.70095e-42 0) (1.51743e-42 1.18076e-43 0) (1.99822e-43 -8.98208e-42 0) (-6.8087e-43 -2.32151e-42 0) (-1.8177e-43 -5.85829e-43 0) (-4.69646e-44 -1.00093e-43 0) (-8.12816e-45 -1.60221e-44 0) (-1.31405e-45 -2.15098e-45 0) (-1.77766e-46 -2.71061e-46 0) (-2.25281e-47 -3.07395e-47 0) (-2.46181e-48 -3.38899e-48 0) (1.28278e-48 -1.75596e-48 0) (2.22793e-47 -2.11472e-47 0) (3.09455e-46 -3.04114e-46 0) (4.16937e-45 -4.24839e-45 0) (5.4255e-44 -5.76946e-44 0) (6.84201e-43 -7.57033e-43 0) (8.28808e-42 -9.63872e-42 0) (9.7095e-41 -1.17876e-40 0) (1.08384e-39 -1.39484e-39 0) (1.16832e-38 -1.56493e-38 0) (1.18468e-37 -1.6747e-37 0) (1.16025e-36 -1.60533e-36 0) (1.04423e-35 -1.28859e-35 0) (9.10299e-35 -4.17661e-35 0) (6.9089e-34 1.13588e-33 0) (5.07181e-33 3.59913e-32 0) (2.69675e-32 6.21285e-31 0) (1.31643e-31 7.86791e-30 0) (-2.86643e-33 6.9204e-29 0) (-9.09224e-34 -1.10236e-31 0) (4.53982e-34 -1.99946e-32 0) (6.82854e-35 -2.27046e-33 0) (9.00827e-36 -1.92809e-34 0) (5.98794e-37 -1.57732e-35 0) (-1.93172e-38 -1.29492e-36 0) (-1.32984e-38 -1.22472e-37 0) (-2.84633e-39 -1.19112e-38 0) (-4.25829e-40 -1.20419e-39 0) (-5.62411e-41 -1.17226e-40 0) (-6.4502e-42 -1.1617e-41 0) (-7.37699e-43 -2.58024e-42 0) (-2.63224e-43 -2.69426e-43 0) (-9.35939e-44 7.77942e-43 0) (2.9285e-44 9.03133e-43 0) (1.53162e-44 3.90321e-43 0) (2.98906e-44 7.06333e-43 0) (1.05659e-43 8.78226e-45 0) (1.40348e-44 -6.53197e-43 0) (-4.73275e-44 -1.70262e-43 0) (-1.27493e-44 -4.32639e-44 0) (-3.31376e-45 -7.44159e-45 0) (-5.77139e-46 -1.19733e-45 0) (-9.37186e-47 -1.6153e-46 0) (-1.27372e-47 -2.04316e-47 0) (-1.65338e-48 -2.3254e-48 0) (-6.98089e-49 -2.62849e-49 0) (-7.60622e-48 -2.21137e-49 0) (-1.09261e-46 -2.88863e-48 0) (-1.52639e-45 -4.13246e-47 0) (-2.07304e-44 -5.73749e-46 0) (-2.72043e-43 -7.73723e-45 0) (-3.46482e-42 -1.00777e-43 0) (-4.24086e-41 -1.27193e-42 0) (-5.03149e-40 -1.54081e-41 0) (-5.69062e-39 -1.80021e-40 0) (-6.23897e-38 -1.98585e-39 0) (-6.43575e-37 -2.05801e-38 0) (-6.45691e-36 -1.83675e-37 0) (-5.94936e-35 -1.15012e-36 0) (-5.38661e-34 4.66377e-36 0) (-4.23281e-33 3.24097e-34 0) (-3.33663e-32 7.16059e-33 0) (-1.88506e-31 1.05859e-31 0) (-1.12271e-30 1.10434e-30 0) (2.57752e-32 6.60684e-30 0) (-1.28045e-32 -5.74576e-31 0) (6.61945e-33 -7.21849e-32 0) (1.00754e-33 -6.30395e-33 0) (1.93725e-34 -4.21001e-34 0) (2.3755e-35 -2.14688e-35 0) (3.06959e-36 -7.78231e-37 0) (3.32387e-37 -2.37378e-39 0) (3.60607e-38 2.95719e-39 0) (3.54113e-39 4.11468e-40 0) (3.41109e-40 4.15818e-41 0) (3.07059e-41 3.79489e-42 0) (2.68692e-42 2.10875e-43 0) (2.1005e-43 1.23798e-44 0) (1.20082e-44 5.63534e-44 0) (3.37289e-45 6.31551e-44 0) (1.14725e-45 2.74239e-44 0) (2.04787e-45 4.92196e-44 0) (7.166e-45 6.24187e-46 0) (9.58494e-46 -4.54638e-44 0) (-3.20525e-45 -1.19524e-44 0) (-8.69798e-46 -3.05453e-45 0) (-2.27166e-46 -5.28664e-46 0) (-3.97674e-47 -8.54335e-47 0) (-6.48056e-48 -1.15769e-47 0) (-8.84251e-49 -1.46893e-48 0) (-1.20022e-49 -1.65711e-49 0) (-1.23907e-49 1.23022e-50 0) (-1.63456e-48 4.5994e-49 0) (-2.33881e-47 6.83074e-48 0) (-3.24797e-46 9.84128e-47 0) (-4.38141e-45 1.37536e-45 0) (-5.70916e-44 1.86867e-44 0) (-7.21136e-43 2.45336e-43 0) (-8.751e-42 3.12629e-42 0) (-1.0274e-40 3.82892e-41 0) (-1.14959e-39 4.54653e-40 0) (-1.24293e-38 5.14901e-39 0) (-1.26449e-37 5.65939e-38 0) (-1.24383e-36 5.87103e-37 0) (-1.12479e-35 5.96441e-36 0) (-9.87166e-35 5.65393e-35 0) (-7.54594e-34 5.39362e-34 0) (-5.60371e-33 4.666e-33 0) (-3.01405e-32 4.08424e-32 0) (-1.5146e-31 2.67865e-31 0) (3.34314e-33 1.51977e-30 0) (1.49513e-32 -5.65926e-31 0) (-7.74992e-33 -7.06365e-32 0) (-1.23423e-33 -6.01137e-33 0) (-2.47357e-34 -3.83026e-34 0) (-3.17231e-35 -1.60991e-35 0) (-4.29019e-36 -1.23854e-37 0) (-4.8736e-37 7.83029e-38 0) (-5.54373e-38 1.19397e-38 0) (-5.71347e-39 1.38638e-39 0) (-5.76968e-40 1.39824e-40 0) (-5.4457e-41 1.33894e-41 0) (-4.99676e-42 1.19862e-42 0) (-4.36359e-43 1.03965e-43 0) (-3.72208e-44 1.23947e-44 0) (-2.85876e-45 4.98014e-45 0) (-1.66715e-46 1.9265e-45 0) (1.16355e-46 3.34427e-45 0) (4.67004e-46 4.33325e-47 0) (6.29803e-47 -3.08243e-45 0) (-2.09235e-46 -8.1602e-46 0) (-5.71921e-47 -2.09507e-46 0) (-1.49964e-47 -3.64438e-47 0) (-2.63773e-48 -5.91006e-48 0) (-4.3114e-49 -8.03711e-49 0) (-5.89959e-50 -1.02197e-49 0) (-7.67778e-51 -1.09319e-50 0) (-2.96972e-51 1.06195e-50 0) (-3.07012e-50 1.79731e-49 0) (-4.32341e-49 2.64826e-48 0) (-5.90959e-48 3.7958e-47 0) (-7.8215e-47 5.27684e-46 0) (-9.97097e-46 7.12718e-45 0) (-1.22639e-44 9.3008e-44 0) (-1.44319e-43 1.17688e-42 0) (-1.63118e-42 1.43119e-41 0) (-1.74584e-41 1.68461e-40 0) (-1.78395e-40 1.89113e-39 0) (-1.69627e-39 2.05346e-38 0) (-1.52623e-38 2.10245e-37 0) (-1.23528e-37 2.08894e-36 0) (-9.30807e-37 1.92341e-35 0) (-5.82407e-36 1.73864e-34 0) (-3.25829e-35 1.39918e-33 0) (-1.16152e-34 1.10292e-32 0) (-3.11836e-34 6.46477e-32 0) (-1.19114e-36 3.25441e-31 0) (1.50185e-32 -6.55521e-32 0) (-8.32276e-33 -1.14236e-32 0) (-1.39264e-33 -9.13037e-34 0) (-3.15785e-34 -2.19255e-35 0) (-4.4814e-35 8.90254e-36 0) (-6.75566e-36 1.87772e-36 0) (-8.42307e-37 2.92299e-37 0) (-1.04364e-37 3.6531e-38 0) (-1.15897e-38 4.2682e-39 0) (-1.25117e-39 4.52074e-40 0) (-1.25325e-40 4.5732e-41 0) (-1.21293e-41 4.33101e-42 0) (-1.10931e-42 3.93972e-43 0) (-9.80013e-44 3.43106e-44 0) (-8.25843e-45 3.12029e-45 0) (-6.70277e-46 3.50293e-46 0) (-4.43728e-47 2.36012e-46 0) (2.57955e-47 4.16644e-48 0) (3.74384e-48 -2.01323e-46 0) (-1.33326e-47 -5.36834e-47 0) (-3.6625e-48 -1.38367e-47 0) (-9.63125e-49 -2.4182e-48 0) (-1.70057e-49 -3.93324e-49 0) (-2.78379e-50 -5.36546e-50 0) (-3.44753e-51 -6.7441e-51 0) (5.32166e-51 7.7077e-52 0) (8.79252e-50 2.42052e-50 0) (1.29595e-48 3.70145e-49 0) (1.85848e-47 5.4884e-48 0) (2.58535e-46 7.92727e-47 0) (3.49494e-45 1.11085e-45 0) (4.56567e-44 1.51392e-44 0) (5.78487e-43 1.99403e-43 0) (7.04608e-42 2.55054e-42 0) (8.30955e-41 3.13614e-41 0) (9.34823e-40 3.74174e-40 0) (1.01732e-38 4.25904e-39 0) (1.04327e-37 4.71208e-38 0) (1.03606e-36 4.92442e-37 0) (9.48201e-36 5.05786e-36 0) (8.43735e-35 4.86192e-35 0) (6.56445e-34 4.73945e-34 0) (4.96091e-33 4.20998e-33 0) (2.73162e-32 3.79988e-32 0) (1.39101e-31 2.56545e-31 0) (-3.16634e-33 1.48766e-30 0) (-1.61549e-32 -4.40717e-32 0) (-2.7004e-33 -5.79514e-33 0) (-1.20682e-33 2.18071e-33 0) (-5.52503e-34 5.35304e-34 0) (-1.05829e-34 1.03472e-34 0) (-1.98765e-35 1.42634e-35 0) (-2.83338e-36 1.8612e-36 0) (-3.88358e-37 2.12623e-37 0) (-4.62871e-38 2.34012e-38 0) (-5.28485e-39 2.37686e-39 0) (-5.52425e-40 2.32776e-40 0) (-5.53832e-41 2.14959e-41 0) (-5.21051e-42 1.91571e-42 0) (-4.71479e-43 1.62915e-43 0) (-4.059e-44 1.34112e-44 0) (-3.37125e-45 1.06649e-45 0) (-2.68202e-46 9.50041e-47 0) (-1.88881e-47 6.18563e-48 0) (-1.29243e-48 -1.23943e-47 0) (-9.31661e-49 -3.40869e-48 0) (-2.34745e-49 -8.86907e-49 0) (-6.03824e-50 -1.55821e-49 0) (-1.06356e-50 -2.54177e-50 0) (-1.63659e-51 -3.49166e-51 0) (1.47253e-51 -6.80799e-52 0) (2.6708e-50 -3.82901e-51 0) (4.07417e-49 -5.87921e-50 0) (6.0402e-48 -8.92121e-49 0) (8.7231e-47 -1.31698e-47 0) (1.22218e-45 -1.89293e-46 0) (1.66538e-44 -2.63893e-45 0) (2.1931e-43 -3.57545e-44 0) (2.80455e-42 -4.68037e-43 0) (3.44738e-41 -5.94331e-42 0) (4.11107e-40 -7.25101e-41 0) (4.67444e-39 -8.56399e-40 0) (5.15915e-38 -9.62398e-39 0) (5.35818e-37 -1.0415e-37 0) (5.42471e-36 -1.0442e-36 0) (5.04316e-35 -9.75857e-36 0) (4.62611e-34 -7.44093e-35 0) (3.67952e-33 -3.85868e-34 0) (2.96104e-32 1.67479e-33 0) (1.70203e-31 6.44205e-32 0) (1.05612e-30 8.92326e-31 0) (-2.45426e-32 5.47536e-30 0) (-6.85318e-32 -4.54204e-31 0) (-1.29754e-31 -3.23295e-32 0) (-2.38267e-32 1.76021e-32 0) (-5.5796e-33 3.42479e-33 0) (-8.4084e-34 6.14857e-34 0) (-1.32384e-34 7.94663e-35 0) (-1.70788e-35 1.00443e-35 0) (-2.17277e-36 1.11158e-36 0) (-2.46175e-37 1.19923e-37 0) (-2.70255e-38 1.19401e-38 0) (-2.74324e-39 1.15261e-39 0) (-2.68651e-40 1.0495e-40 0) (-2.48117e-41 9.25025e-42 0) (-2.21154e-42 7.78265e-43 0) (-1.88077e-43 6.34281e-44 0) (-1.5465e-44 4.97188e-45 0) (-1.22241e-45 3.78911e-46 0) (-9.35277e-47 2.78026e-47 0) (-6.91576e-48 1.19485e-48 0) (-5.47546e-49 -7.55965e-50 0) (-4.8454e-50 -4.59735e-50 0) (-5.98205e-51 -9.12018e-51 0) (-8.1435e-52 -1.55227e-51 0) (-3.54461e-52 -2.47952e-52 0) (-3.82233e-51 -5.59482e-52 0) (-5.9242e-50 -8.50595e-51 0) (-8.98997e-49 -1.3257e-49 0) (-1.32709e-47 -2.0162e-48 0) (-1.90735e-46 -2.98318e-47 0) (-2.65878e-45 -4.29859e-46 0) (-3.60195e-44 -6.00842e-45 0) (-4.71433e-43 -8.16491e-44 0) (-5.98576e-42 -1.0721e-42 0) (-7.30266e-41 -1.36624e-41 0) (-8.63009e-40 -1.67276e-40 0) (-9.72082e-39 -1.98343e-39 0) (-1.06023e-37 -2.23491e-38 0) (-1.08789e-36 -2.41852e-37 0) (-1.0836e-35 -2.39346e-36 0) (-9.91344e-35 -2.12665e-35 0) (-8.87869e-34 -1.28807e-34 0) (-6.9071e-33 1.80685e-34 0) (-5.3443e-32 2.60571e-32 0) (-2.97236e-31 5.24082e-31 0) (-1.6965e-30 7.24835e-30 0) (3.84904e-32 6.85598e-29 0) (-9.63843e-31 6.88423e-31 0) (-1.25676e-30 8.94189e-32 0) (-1.64231e-31 7.94236e-33 0) (-3.64793e-32 5.3609e-34 0) (-4.95406e-33 2.76191e-35 0) (-7.53827e-34 1.0186e-36 0) (-9.27836e-35 5.33416e-39 0) (-1.15328e-35 -3.57621e-39 0) (-1.27231e-36 -5.0639e-40 0) (-1.37383e-37 -5.13731e-41 0) (-1.37059e-38 -4.73008e-42 0) (-1.32581e-39 -4.04902e-43 0) (-1.20952e-40 -3.34055e-44 0) (-1.06784e-41 -2.63829e-45 0) (-8.99746e-43 -2.02125e-46 0) (-7.3421e-44 -1.49239e-47 0) (-5.76124e-45 -1.02349e-48 0) (-4.38543e-46 -7.42406e-50 0) (-3.2266e-47 -5.26594e-50 0) (-2.31026e-48 -1.32275e-50 0) (-1.60888e-49 -3.36882e-51 0) (-1.1029e-50 -5.92352e-52 0) (-7.78209e-52 -9.54679e-53 0) (-5.33569e-52 8.57452e-54 0) (-7.70238e-51 3.55737e-52 0) (-1.1996e-49 5.70893e-51 0) (-1.8232e-48 8.89125e-50 0) (-2.69566e-47 1.35057e-48 0) (-3.88117e-46 1.99572e-47 0) (-5.42026e-45 2.8716e-46 0) (-7.35848e-44 4.00777e-45 0) (-9.65219e-43 5.43685e-44 0) (-1.22868e-41 7.12579e-43 0) (-1.503e-40 9.06e-42 0) (-1.78196e-39 1.10607e-40 0) (-2.01384e-38 1.30496e-39 0) (-2.20581e-37 1.45534e-38 0) (-2.27298e-36 1.5333e-37 0) (-2.27745e-35 1.40323e-36 0) (-2.09537e-34 9.44549e-36 0) (-1.89364e-33 -2.22024e-35 0) (-1.48502e-32 -2.32591e-33 0) (-1.16765e-31 -5.57193e-32 0) (-6.57948e-31 -8.95497e-31 0) (-3.90572e-30 -1.07821e-29 0) (8.94505e-32 -9.03126e-29 0) (-8.74882e-32 1.79003e-30 0) (-1.19951e-31 2.03624e-31 0) (-2.22298e-32 -2.36882e-33 0) (-5.2636e-33 -2.38815e-33 0) (-8.00686e-34 -5.59467e-34 0) (-1.27073e-34 -7.71728e-35 0) (-1.64883e-35 -9.9923e-36 0) (-2.10735e-36 -1.1141e-36 0) (-2.39605e-37 -1.20462e-37 0) (-2.63801e-38 -1.19989e-38 0) (-2.68395e-39 -1.15814e-39 0) (-2.63359e-40 -1.05427e-40 0) (-2.43629e-41 -9.28972e-42 0) (-2.1746e-42 -7.81387e-43 0) (-1.85162e-43 -6.36666e-44 0) (-1.52416e-44 -4.98913e-45 0) (-1.20591e-45 -3.79325e-46 0) (-9.2449e-47 -2.78801e-47 0) (-6.84798e-48 -1.9946e-48 0) (-4.92783e-49 -1.3883e-49 0) (-3.44159e-50 -9.51709e-51 0) (-2.34525e-51 -6.46849e-52 0) (-1.467e-52 -4.17862e-53 0) (1.46842e-52 4.94196e-53 0) (2.51095e-51 8.61369e-52 0) (3.91475e-50 1.3773e-50 0) (5.9519e-49 2.14674e-49 0) (8.80353e-48 3.26381e-48 0) (1.2681e-46 4.82744e-47 0) (1.77186e-45 6.95333e-46 0) (2.40689e-44 9.71509e-45 0) (3.15923e-43 1.31956e-43 0) (4.0247e-42 1.73175e-42 0) (4.92754e-41 2.20533e-41 0) (5.84815e-40 2.69739e-40 0) (6.61674e-39 3.19185e-39 0) (7.2576e-38 3.57895e-38 0) (7.49027e-37 3.82106e-37 0) (7.51949e-36 3.63318e-36 0) (6.93318e-35 2.83249e-35 0) (6.28252e-34 6.7113e-35 0) (4.94132e-33 -3.1891e-33 0) (3.8989e-32 -9.25471e-32 0) (2.20501e-31 -1.56183e-30 0) (1.31415e-30 -1.94272e-29 0) (-3.0201e-32 -1.67117e-28 0) (-3.7077e-32 7.99141e-31 0) (8.11873e-33 1.07294e-31 0) (5.96773e-34 7.13688e-33 0) (-1.92555e-34 1.16928e-34 0) (-5.96425e-35 -6.66043e-35 0) (-1.37366e-35 -1.25257e-35 0) (-2.14696e-36 -1.79315e-36 0) (-3.12045e-37 -2.10581e-37 0) (-3.85963e-38 -2.33823e-38 0) (-4.52744e-39 -2.38091e-39 0) (-4.82684e-40 -2.33313e-40 0) (-4.91467e-41 -2.15465e-41 0) (-4.68064e-42 -1.92001e-42 0) (-4.27811e-43 -1.63244e-43 0) (-3.71388e-44 -1.34199e-44 0) (-3.10667e-45 -1.06058e-45 0) (-2.49122e-46 -8.12265e-47 0) (-1.93158e-47 -6.01144e-48 0) (-1.44452e-48 -4.32261e-49 0) (-1.04768e-49 -3.01703e-50 0) (-7.36196e-51 -2.05556e-51 0) (-5.01576e-52 -1.37003e-52 0) (-4.6323e-54 -1.00753e-53 0) (4.69866e-52 -1.83892e-53 0) (7.54493e-51 -2.91331e-52 0) (1.17593e-49 -4.65711e-51 0) (1.7877e-48 -7.26027e-50 0) (2.64394e-47 -1.10408e-48 0) (3.80796e-46 -1.63346e-47 0) (5.31998e-45 -2.35354e-46 0) (7.22543e-44 -3.28952e-45 0) (9.48213e-43 -4.47003e-44 0) (1.20771e-41 -5.86969e-43 0) (1.47825e-40 -7.48163e-42 0) (1.7539e-39 -9.16738e-41 0) (1.98372e-38 -1.0897e-39 0) (2.17498e-37 -1.2375e-38 0) (2.24366e-36 -1.37031e-37 0) (2.25119e-35 -1.45028e-36 0) (2.07434e-34 -1.54541e-35 0) (1.87835e-33 -1.62784e-34 0) (1.47614e-32 -1.8468e-33 0) (1.16395e-31 -2.06152e-32 0) (6.57725e-31 -2.26246e-31 0) (3.92089e-30 -1.9235e-30 0) (-9.00253e-32 -1.12389e-29 0) (-5.18764e-33 7.34533e-31 0) (2.14693e-33 9.62477e-32 0) (3.68939e-34 8.4712e-33 0) (3.40396e-35 5.42741e-34 0) (3.08207e-38 2.02542e-35 0) (-8.16521e-37 -4.97847e-37 0) (-1.79702e-37 -2.36225e-37 0) (-3.08834e-38 -3.45144e-38 0) (-4.19677e-39 -4.20206e-39 0) (-5.24311e-40 -4.49598e-40 0) (-5.84781e-41 -4.55847e-41 0) (-6.15843e-42 -4.31764e-42 0) (-6.02407e-43 -3.92644e-43 0) (-5.62401e-44 -3.3938e-44 0) (-4.96946e-45 -2.82847e-45 0) (-4.21802e-46 -2.26101e-46 0) (-3.42509e-47 -1.74836e-47 0) (-2.68396e-48 -1.30444e-48 0) (-2.02591e-49 -9.44148e-50 0) (-1.48105e-50 -6.62267e-51 0) (-1.048e-51 -4.5205e-52 0) (-7.26457e-53 -3.02105e-53 0) (-1.49161e-53 -5.03089e-54 0) (-1.65643e-52 -5.17339e-53 0) (-2.64281e-51 -8.44705e-52 0) (-4.11928e-50 -1.35058e-50 0) (-6.26303e-49 -2.10565e-49 0) (-9.26406e-48 -3.20225e-48 0) (-1.33449e-46 -4.73785e-47 0) (-1.86475e-45 -6.82664e-46 0) (-2.53326e-44 -9.54162e-45 0) (-3.3254e-43 -1.29656e-43 0) (-4.23688e-42 -1.7024e-42 0) (-5.18803e-41 -2.16944e-41 0) (-6.15836e-40 -2.65647e-40 0) (-6.96918e-39 -3.15135e-39 0) (-7.64615e-38 -3.55685e-38 0) (-7.89381e-37 -3.869e-37 0) (-7.92776e-36 -3.89046e-36 0) (-7.3133e-35 -3.62707e-35 0) (-6.63104e-34 -2.66158e-34 0) (-5.21954e-33 -1.03513e-33 0) (-4.12211e-32 1.71821e-32 0) (-2.33393e-31 4.66227e-31 0) (-1.39248e-30 7.12433e-30 0) (3.20386e-32 6.96893e-29 0) (-1.22059e-32 6.99525e-31 0) (6.2791e-33 9.01712e-32 0) (8.98721e-34 8.44161e-33 0) (1.65419e-34 6.18715e-34 0) (1.91696e-35 4.02048e-35 0) (2.33911e-36 2.4609e-36 0) (2.36291e-37 1.62558e-37 0) (2.37778e-38 1.15922e-38 0) (2.13715e-39 9.06159e-40 0) (1.86531e-40 7.07652e-41 0) (1.49421e-41 5.46849e-42 0) (1.14397e-42 3.99923e-43 0) (8.07751e-44 2.78368e-44 0) (5.33642e-45 1.8008e-45 0) (3.17285e-46 1.076e-46 0) (1.64567e-47 5.70167e-48 0) (6.34671e-49 2.47027e-49 0) (4.1482e-51 5.7973e-51 0) (-2.60507e-51 -3.85884e-52 0) (-3.71913e-52 -7.72732e-53 0) (-3.75222e-53 -8.33996e-54 0) (-4.92322e-54 -6.45197e-55 0) (-2.85455e-53 1.5435e-54 0) (-4.6304e-52 2.68434e-53 0) (-7.40298e-51 4.39423e-52 0) (-1.15413e-49 7.02597e-51 0) (-1.75511e-48 1.0954e-49 0) (-2.59658e-47 1.66587e-48 0) (-3.74109e-46 2.46468e-47 0) (-5.22847e-45 3.55122e-46 0) (-7.10405e-44 4.96338e-45 0) (-9.32672e-43 6.74409e-44 0) (-1.18848e-41 8.85407e-43 0) (-1.45542e-40 1.128e-41 0) (-1.72782e-39 1.38012e-40 0) (-1.95534e-38 1.63328e-39 0) (-2.14543e-37 1.82973e-38 0) (-2.2147e-36 1.94642e-37 0) (-2.22434e-35 1.82641e-36 0) (-2.05134e-34 1.35411e-35 0) (-1.86031e-33 1.06991e-35 0) (-1.46365e-32 -2.12791e-33 0) (-1.15731e-31 -5.60827e-32 0) (-6.55234e-31 -9.22548e-31 0) (-3.93456e-30 -1.12612e-29 0) (9.04308e-32 -9.48379e-29 0) (4.03364e-32 2.68061e-31 0) (-2.09066e-32 4.85787e-32 0) (-3.38226e-33 5.46905e-33 0) (-6.70503e-34 4.5743e-34 0) (-8.54033e-35 3.60564e-35 0) (-1.13779e-35 2.80898e-36 0) (-1.27525e-36 2.50284e-37 0) (-1.4279e-37 2.32061e-38 0) (-1.44999e-38 2.25994e-39 0) (-1.44212e-39 2.12118e-40 0) (-1.34153e-40 1.95726e-41 0) (-1.21337e-41 1.72095e-42 0) (-1.04295e-42 1.4696e-43 0) (-8.70053e-44 1.20317e-44 0) (-6.9629e-45 9.55923e-46 0) (-5.41055e-46 7.32439e-47 0) (-4.05787e-47 5.4525e-48 0) (-2.95883e-48 3.93137e-49 0) (-2.09117e-49 2.75835e-50 0) (-1.43911e-50 1.88047e-51 0) (-9.62867e-52 1.24958e-52 0) (-6.16648e-53 8.24837e-54 0) (1.56246e-53 3.2765e-54 0) (3.20856e-52 4.63581e-53 0) (5.13344e-51 7.5807e-52 0) (8.00214e-50 1.21179e-50 0) (1.21673e-48 1.8888e-49 0) (1.79977e-47 2.87171e-48 0) (2.59254e-46 4.24756e-47 0) (3.6224e-45 6.11821e-46 0) (4.92044e-44 8.54845e-45 0) (6.45777e-43 1.16113e-43 0) (8.22576e-42 1.52385e-42 0) (1.00687e-40 1.94058e-41 0) (1.19467e-39 2.37343e-40 0) (1.35114e-38 2.80783e-39 0) (1.48139e-37 3.14562e-38 0) (1.52788e-36 3.34912e-37 0) (1.53293e-35 3.15495e-36 0) (1.41196e-34 2.37332e-35 0) (1.27866e-33 2.91271e-35 0) (1.0043e-32 -3.46414e-33 0) (7.92835e-32 -9.38452e-32 0) (4.47994e-31 -1.56977e-30 0) (2.68869e-30 -1.95756e-29 0) (-6.16787e-32 -1.71326e-28 0) (4.74253e-32 2.02301e-30 0) (-2.51768e-32 2.52376e-31 0) (-3.95082e-33 2.19669e-32 0) (-8.12765e-34 1.48512e-33 0) (-1.06434e-34 8.21924e-35 0) (-1.48648e-35 4.1323e-36 0) (-1.73796e-36 2.40425e-37 0) (-2.03832e-37 2.03923e-38 0) (-2.16016e-38 2.3319e-39 0) (-2.24147e-39 2.68861e-40 0) (-2.1694e-40 2.97458e-41 0) (-2.03858e-41 3.03089e-42 0) (-1.81652e-42 2.92257e-43 0) (-1.56846e-43 2.64674e-44 0) (-1.29682e-44 2.29124e-45 0) (-1.03953e-45 1.88984e-46 0) (-8.03046e-47 1.50036e-47 0) (-6.02311e-48 1.14478e-48 0) (-4.37304e-49 8.44691e-50 0) (-3.08792e-50 6.02402e-51 0) (-2.11763e-51 4.16877e-52 0) (-1.40115e-52 2.79131e-53 0) (1.37956e-53 4.2824e-55 0) (3.75561e-52 -2.33654e-53 0) (6.00893e-51 -3.84501e-52 0) (9.35976e-50 -6.15091e-51 0) (1.42199e-48 -9.59457e-50 0) (2.10162e-47 -1.45992e-48 0) (3.02455e-46 -2.1612e-47 0) (4.22203e-45 -3.11585e-46 0) (5.72886e-44 -4.35767e-45 0) (7.51064e-43 -5.9253e-44 0) (9.55489e-42 -7.78513e-43 0) (1.16809e-40 -9.92786e-42 0) (1.38384e-39 -1.21631e-40 0) (1.56273e-38 -1.44311e-39 0) (1.71001e-37 -1.62613e-38 0) (1.76042e-36 -1.75708e-37 0) (1.76147e-35 -1.72581e-36 0) (1.61864e-34 -1.49218e-35 0) (1.4597e-33 -7.784e-35 0) (1.1427e-32 5.12175e-34 0) (8.94818e-32 2.67756e-32 0) (5.02655e-31 5.15283e-31 0) (2.95149e-30 7.16231e-30 0) (-6.79143e-32 7.08979e-29 0) (-8.4053e-32 1.94493e-30 0) (3.07556e-32 2.40403e-31 0) (4.19407e-33 2.31289e-32 0) (4.7519e-34 1.89645e-33 0) (2.0234e-35 1.68548e-34 0) (-4.01895e-36 1.63031e-35 0) (-1.15627e-36 1.83868e-36 0) (-2.1313e-37 2.03262e-37 0) (-2.97249e-38 2.24531e-38 0) (-3.76413e-39 2.3118e-39 0) (-4.22404e-40 2.29738e-40 0) (-4.46613e-41 2.14962e-41 0) (-4.37594e-42 1.93782e-42 0) (-4.09047e-43 1.66413e-43 0) (-3.61564e-44 1.38002e-44 0) (-3.06997e-45 1.09896e-45 0) (-2.49273e-46 8.4734e-47 0) (-1.95344e-47 6.30851e-48 0) (-1.47432e-48 4.55882e-49 0) (-1.07776e-49 3.19376e-50 0) (-7.62474e-51 2.17655e-51 0) (-5.24354e-52 1.44148e-52 0) (-4.13475e-53 7.82899e-54 0) (-1.06813e-52 -2.42847e-53 0) (-1.67447e-51 -4.06307e-52 0) (-2.61503e-50 -6.48472e-51 0) (-3.98459e-49 -1.00907e-49 0) (-5.9073e-48 -1.5314e-48 0) (-8.53061e-47 -2.26099e-47 0) (-1.19512e-45 -3.25025e-46 0) (-1.62825e-44 -4.5323e-45 0) (-2.14386e-43 -6.14248e-44 0) (-2.74088e-42 -8.04413e-43 0) (-3.36818e-41 -1.02198e-41 0) (-4.0151e-40 -1.24783e-40 0) (-4.56335e-39 -1.47545e-39 0) (-5.03399e-38 -1.66193e-38 0) (-5.22481e-37 -1.80753e-37 0) (-5.28678e-36 -1.83577e-36 0) (-4.91042e-35 -1.77331e-35 0) (-4.50434e-34 -1.49061e-34 0) (-3.57979e-33 -1.08174e-33 0) (-2.891e-32 -4.1699e-33 0) (-1.66473e-31 1.43038e-32 0) (-1.05289e-30 5.54409e-31 0) (1.52412e-32 3.16003e-30 0) (-2.05984e-31 -5.44871e-31 0) (-8.32982e-32 -4.12003e-32 0) (-1.66435e-32 1.9665e-32 0) (-4.2894e-33 3.8786e-33 0) (-6.96661e-34 7.0058e-34 0) (-1.16504e-34 9.07371e-35 0) (-1.56675e-35 1.14828e-35 0) (-2.05852e-36 1.27162e-36 0) (-2.38893e-37 1.37256e-37 0) (-2.67357e-38 1.36708e-38 0) (-2.75564e-39 1.32008e-39 0) (-2.73317e-40 1.20229e-40 0) (-2.55105e-41 1.05993e-41 0) (-2.2944e-42 8.9194e-43 0) (-1.96635e-43 7.27039e-44 0) (-1.62778e-44 5.69939e-45 0) (-1.29428e-45 4.33473e-46 0) (-9.96589e-47 3.18691e-47 0) (-7.41079e-48 2.27742e-48 0) (-5.34961e-49 1.57909e-49 0) (-3.74412e-50 1.06616e-50 0) (-2.54963e-51 7.00393e-52 0) (-1.73339e-52 4.44023e-53 0) (-8.4558e-53 -5.16304e-54 0) (-1.16883e-51 -1.28932e-52 0) (-1.80617e-50 -2.04211e-51 0) (-2.72239e-49 -3.14986e-50 0) (-3.99203e-48 -4.73444e-49 0) (-5.69574e-47 -6.92461e-48 0) (-7.88393e-46 -9.8489e-47 0) (-1.05956e-44 -1.35956e-45 0) (-1.37645e-43 -1.82059e-44 0) (-1.7321e-42 -2.35834e-43 0) (-2.09642e-41 -2.95495e-42 0) (-2.45197e-40 -3.56598e-41 0) (-2.73855e-39 -4.14838e-40 0) (-2.94957e-38 -4.61947e-39 0) (-2.99955e-37 -4.93813e-38 0) (-2.9391e-36 -5.0024e-37 0) (-2.66421e-35 -4.82962e-36 0) (-2.32893e-34 -4.31461e-35 0) (-1.79531e-33 -3.57547e-34 0) (-1.32732e-32 -2.49835e-33 0) (-7.32805e-32 -1.36407e-32 0) (-3.65709e-31 -1.73227e-32 0) (-1.29994e-31 5.31142e-31 0) (-1.19372e-30 -1.36028e-30 0) (-1.39982e-30 -1.6731e-31 0) (-1.81494e-31 -1.36731e-32 0) (-4.04895e-32 -8.18666e-34 0) (-5.51121e-33 -2.62865e-35 0) (-8.42234e-34 9.06966e-37 0) (-1.03952e-34 2.98402e-37 0) (-1.29571e-35 3.73923e-38 0) (-1.43239e-36 3.94544e-39 0) (-1.54959e-37 3.70276e-40 0) (-1.54824e-38 3.32411e-41 0) (-1.49967e-39 2.82049e-42 0) (-1.36967e-40 2.31881e-43 0) (-1.21045e-41 1.82799e-44 0) (-1.0208e-42 1.39922e-45 0) (-8.33649e-44 1.0338e-46 0) (-6.54608e-45 7.42726e-48 0) (-4.98607e-46 5.17286e-49 0) (-3.67065e-47 3.50873e-50 0) (-2.62622e-48 2.31442e-51 0) (-1.82289e-49 1.48911e-52 0) (-1.23204e-50 9.35201e-54 0) (-8.25244e-52 7.84062e-55 0) (-2.99393e-52 3.57006e-54 0) (-3.93759e-51 5.76439e-53 0) (-6.10031e-50 9.17777e-52 0) (-9.22202e-49 1.42472e-50 0) (-1.35658e-47 2.15671e-49 0) (-1.94205e-46 3.17581e-48 0) (-2.69794e-45 4.55226e-47 0) (-3.64004e-44 6.32899e-46 0) (-4.74895e-43 8.54896e-45 0) (-6.00371e-42 1.11562e-43 0) (-7.30396e-41 1.41122e-42 0) (-8.59151e-40 1.71367e-41 0) (-9.65714e-39 2.00676e-40 0) (-1.04781e-37 2.21502e-39 0) (-1.07441e-36 2.2831e-38 0) (-1.06365e-35 1.97888e-37 0) (-9.7532e-35 1.04652e-36 0) (-8.67165e-34 -1.14666e-35 0) (-6.81545e-33 -4.97151e-34 0) (-5.23734e-32 -1.04123e-32 0) (-3.03756e-31 -1.52647e-31 0) (-1.73974e-30 -1.60362e-30 0) (-1.3728e-30 -9.99747e-30 0) (-6.77281e-32 -7.88281e-31 0) (-1.54837e-31 -1.2103e-31 0) (-2.8153e-32 -3.30842e-32 0) (-6.55139e-33 -4.70615e-33 0) (-9.82091e-34 -7.32189e-34 0) (-1.54081e-34 -9.06199e-35 0) (-1.98264e-35 -1.12822e-35 0) (-2.5178e-36 -1.2444e-36 0) (-2.84874e-37 -1.34319e-37 0) (-3.12424e-38 -1.33931e-38 0) (-3.16871e-39 -1.29507e-39 0) (-3.10124e-40 -1.18104e-40 0) (-2.86272e-41 -1.04244e-41 0) (-2.55056e-42 -8.78144e-43 0) (-2.16832e-43 -7.16473e-44 0) (-1.78242e-44 -5.62128e-45 0) (-1.40856e-45 -4.27858e-46 0) (-1.07872e-46 -3.14779e-47 0) (-7.98294e-48 -2.25088e-48 0) (-5.73778e-49 -1.56158e-49 0) (-4.00022e-50 -1.05489e-50 0) (-2.71421e-51 -6.93266e-52 0) (-1.79763e-52 -4.30134e-53 0) (-2.13849e-53 2.12089e-53 0) (-1.53119e-52 3.91298e-52 0) (-2.29665e-51 6.23982e-51 0) (-3.36414e-50 9.69879e-50 0) (-4.79426e-49 1.47012e-48 0) (-6.61964e-48 2.16815e-47 0) (-8.87388e-47 3.11285e-46 0) (-1.14748e-45 4.33616e-45 0) (-1.4375e-44 5.8688e-44 0) (-1.7261e-43 7.67787e-43 0) (-2.0041e-42 9.73838e-42 0) (-2.2085e-41 1.18707e-40 0) (-2.35118e-40 1.39745e-39 0) (-2.33635e-39 1.55878e-38 0) (-2.2486e-38 1.64481e-37 0) (-1.95606e-37 1.52697e-36 0) (-1.6709e-36 1.08651e-35 0) (-1.19999e-35 -3.82609e-36 0) (-8.96742e-35 -2.0824e-33 0) (-4.62143e-34 -5.26666e-32 0) (-3.34073e-33 -8.67758e-31 0) (-8.79384e-33 -1.07071e-29 0) (-1.38025e-31 -9.33386e-29 0) (1.72384e-32 -8.63424e-32 0) (-2.16367e-32 -1.81029e-32 0) (-4.29277e-33 -5.21667e-33 0) (-1.19965e-33 -8.32501e-34 0) (-1.91956e-34 -1.34451e-34 0) (-3.2031e-35 -1.74435e-35 0) (-4.2648e-36 -2.21801e-36 0) (-5.57077e-37 -2.50718e-37 0) (-6.42215e-38 -2.74524e-38 0) (-7.14981e-39 -2.78013e-39 0) (-7.33116e-40 -2.71723e-40 0) (-7.23754e-41 -2.50537e-41 0) (-6.72485e-42 -2.22997e-42 0) (-6.0224e-43 -1.89419e-43 0) (-5.13992e-44 -1.55596e-44 0) (-4.23772e-45 -1.22885e-45 0) (-3.35621e-46 -9.40586e-47 0) (-2.57425e-47 -6.9575e-48 0) (-1.90697e-48 -4.99875e-49 0) (-1.3714e-49 -3.48378e-50 0) (-9.56259e-51 -2.36306e-51 0) (-6.4804e-52 -1.55917e-52 0) (-3.14381e-53 -9.85935e-54 0) (1.83141e-52 2.23894e-54 0) (2.97149e-51 4.64758e-53 0) (4.63189e-50 7.36428e-52 0) (7.04214e-49 1.13673e-50 0) (1.04154e-47 1.71006e-49 0) (1.5001e-46 2.50253e-48 0) (2.09563e-45 3.56215e-47 0) (2.84601e-44 4.91863e-46 0) (3.73426e-43 6.59071e-45 0) (4.75528e-42 8.53482e-44 0) (5.81856e-41 1.06932e-42 0) (6.90105e-40 1.28667e-41 0) (7.80082e-39 1.48708e-40 0) (8.54763e-38 1.61635e-39 0) (8.80919e-37 1.61217e-38 0) (8.82982e-36 1.28777e-37 0) (8.12371e-35 3.7186e-37 0) (7.34415e-34 -1.67619e-35 0) (5.75745e-33 -5.25966e-34 0) (4.52795e-32 -1.02499e-32 0) (2.54874e-31 -1.46298e-31 0) (1.51278e-30 -1.497e-30 0) (-4.38013e-32 -8.93324e-30 0) (2.94925e-33 -1.58349e-32 0) (-2.16984e-33 -3.29226e-33 0) (-4.81434e-34 -1.02303e-33 0) (-1.46773e-34 -1.68565e-34 0) (-2.49005e-35 -2.84942e-35 0) (-4.29938e-36 -3.80593e-36 0) (-5.89793e-37 -4.96965e-37 0) (-7.84947e-38 -5.72247e-38 0) (-9.20678e-39 -6.36166e-39 0) (-1.03722e-39 -6.51489e-40 0) (-1.07536e-40 -6.4245e-41 0) (-1.07031e-41 -5.96384e-42 0) (-1.00206e-42 -5.33657e-43 0) (-9.02681e-44 -4.55146e-44 0) (-7.74607e-45 -3.75032e-45 0) (-6.41434e-46 -2.96867e-46 0) (-5.10048e-47 -2.27597e-47 0) (-3.92504e-48 -1.68535e-48 0) (-2.91638e-49 -1.2116e-49 0) (-2.10258e-50 -8.44577e-51 0) (-1.46944e-51 -5.72799e-52 0) (-9.97233e-53 -3.78138e-53 0) (-4.0462e-54 -3.0095e-54 0) (4.12053e-53 -9.88034e-54 0) (6.62589e-52 -1.59267e-52 0) (1.02812e-50 -2.547e-51 0) (1.55534e-49 -3.97191e-50 0) (2.28835e-48 -6.04202e-49 0) (3.27672e-47 -8.94156e-48 0) (4.54967e-46 -1.28871e-46 0) (6.13594e-45 -1.80168e-45 0) (7.99267e-44 -2.4489e-44 0) (1.00916e-42 -3.2163e-43 0) (1.22392e-41 -4.10026e-42 0) (1.43598e-40 -5.02355e-41 0) (1.60532e-39 -5.96783e-40 0) (1.73386e-38 -6.7609e-39 0) (1.76145e-37 -7.43494e-38 0) (1.7299e-36 -7.71541e-37 0) (1.56085e-35 -7.84319e-36 0) (1.36656e-34 -7.43746e-35 0) (1.04103e-33 -7.10141e-34 0) (7.70598e-33 -6.14609e-33 0) (4.1251e-32 -5.38581e-32 0) (2.06749e-31 -3.53349e-31 0) (-4.98026e-33 -2.00722e-30 0) (4.82718e-34 -1.74235e-33 0) (-2.6547e-34 -3.96362e-34 0) (-6.01845e-35 -1.2719e-34 0) (-1.95895e-35 -2.19117e-35 0) (-3.4056e-36 -3.80754e-36 0) (-6.02559e-37 -5.23251e-37 0) (-8.39731e-38 -6.96279e-38 0) (-1.13244e-38 -8.16285e-39 0) (-1.34145e-39 -9.19018e-40 0) (-1.5232e-40 -9.52314e-41 0) (-1.58906e-41 -9.47409e-42 0) (-1.58927e-42 -8.86679e-43 0) (-1.4937e-43 -7.98501e-44 0) (-1.34951e-44 -6.85046e-45 0) (-1.16072e-45 -5.67159e-46 0) (-9.62757e-47 -4.50916e-47 0) (-7.66489e-48 -3.46955e-48 0) (-5.90291e-49 -2.57767e-49 0) (-4.38789e-50 -1.85824e-50 0) (-3.16378e-51 -1.2986e-51 0) (-2.21074e-52 -8.82603e-53 0) (-1.49849e-53 -5.84059e-54 0) (-4.03051e-55 -5.1344e-55 0) (9.53345e-54 -2.32415e-54 0) (1.52666e-52 -3.75044e-53 0) (2.36666e-51 -5.97033e-52 0) (3.5755e-50 -9.26552e-51 0) (5.25112e-49 -1.40201e-49 0) (7.5014e-48 -2.06329e-48 0) (1.03844e-46 -2.9553e-47 0) (1.39522e-45 -4.10469e-46 0) (1.80895e-44 -5.53779e-45 0) (2.27082e-43 -7.21645e-44 0) (2.73454e-42 -9.11569e-43 0) (3.18036e-41 -1.10617e-41 0) (3.5168e-40 -1.29869e-40 0) (3.74763e-39 -1.45316e-39 0) (3.74223e-38 -1.5717e-38 0) (3.59789e-37 -1.60093e-37 0) (3.15542e-36 -1.58044e-36 0) (2.66987e-35 -1.44212e-35 0) (1.93871e-34 -1.28895e-34 0) (1.36449e-33 -1.02093e-33 0) (6.76158e-33 -7.92231e-33 0) (3.24179e-32 -4.55173e-32 0) (-6.38509e-34 -2.278e-31 0) (1.51437e-34 2.1258e-34 0) (-7.52787e-35 3.69711e-35 0) (-1.66626e-35 2.33184e-36 0) (-4.61886e-36 -2.91011e-37 0) (-7.48443e-37 -1.51364e-37 0) (-1.22724e-37 -2.94683e-38 0) (-1.63065e-38 -4.84453e-39 0) (-2.10404e-39 -6.47691e-40 0) (-2.41347e-40 -8.02888e-41 0) (-2.66181e-41 -8.92953e-42 0) (-2.71344e-42 -9.3928e-43 0) (-2.6575e-43 -9.18796e-44 0) (-2.45423e-44 -8.57969e-45 0) (-2.18204e-45 -7.58464e-46 0) (-1.85083e-46 -6.43984e-47 0) (-1.51561e-47 -5.23072e-48 0) (-1.19293e-48 -4.0992e-49 0) (-9.09018e-50 -3.09403e-50 0) (-6.69235e-51 -2.26128e-51 0) (-4.78208e-52 -1.59928e-52 0) (-3.31393e-53 -1.09841e-53 0) (-2.23355e-54 -7.36113e-55 0) (-1.39312e-55 -1.08179e-55 0) (1.07124e-55 -1.01498e-54 0) (1.84755e-54 -1.64958e-53 0) (2.85421e-53 -2.62511e-52 0) (4.29002e-52 -4.07125e-51 0) (6.25922e-51 -6.15396e-50 0) (8.86686e-50 -9.04332e-49 0) (1.2149e-48 -1.29275e-47 0) (1.61163e-47 -1.79098e-46 0) (2.05764e-46 -2.40848e-45 0) (2.53479e-45 -3.12585e-44 0) (2.98407e-44 -3.92862e-43 0) (3.37547e-43 -4.73734e-42 0) (3.60897e-42 -5.51856e-41 0) (3.68875e-41 -6.11404e-40 0) (3.49781e-40 -6.53082e-39 0) (3.1511e-39 -6.54167e-38 0) (2.54058e-38 -6.31666e-37 0) (1.93235e-37 -5.57752e-36 0) (1.21084e-36 -4.76861e-35 0) (7.15024e-36 -3.52471e-34 0) (2.69041e-35 -2.53592e-33 0) (1.05434e-34 -1.30327e-32 0) (-2.00301e-37 -6.33023e-32 0) (9.23598e-34 3.23296e-33 0) (-4.65998e-34 6.47457e-34 0) (-9.32481e-35 1.22093e-34 0) (-2.13125e-35 1.55453e-35 0) (-3.02683e-36 1.99831e-36 0) (-4.33985e-37 2.21646e-37 0) (-5.16412e-38 2.44183e-38 0) (-6.0169e-39 2.45902e-39 0) (-6.31197e-40 2.41457e-40 0) (-6.414e-41 2.22079e-41 0) (-6.07098e-42 1.97956e-42 0) (-5.55212e-43 1.67694e-43 0) (-4.8131e-44 1.37602e-44 0) (-4.03434e-45 1.08294e-45 0) (-3.23851e-46 8.26571e-47 0) (-2.51824e-47 6.08802e-48 0) (-1.88776e-48 4.35645e-49 0) (-1.37369e-49 3.0211e-50 0) (-9.68089e-51 2.03915e-51 0) (-6.63624e-52 1.33809e-52 0) (-4.42065e-53 8.56049e-54 0) (-2.90133e-54 5.27435e-55 0) (-7.1288e-55 -7.57867e-56 0) (-8.67374e-54 -1.80527e-54 0) (-1.37864e-52 -2.94614e-53 0) (-2.1383e-51 -4.6911e-52 0) (-3.23259e-50 -7.28301e-51 0) (-4.75108e-49 -1.10267e-49 0) (-6.79313e-48 -1.62408e-48 0) (-9.41354e-47 -2.32873e-47 0) (-1.26631e-45 -3.23897e-46 0) (-1.64407e-44 -4.37748e-45 0) (-2.06723e-43 -5.71696e-44 0) (-2.49402e-42 -7.24093e-43 0) (-2.90711e-41 -8.81598e-42 0) (-3.22286e-40 -1.03919e-40 0) (-3.44509e-39 -1.16866e-39 0) (-3.45248e-38 -1.27175e-38 0) (-3.33413e-37 -1.3058e-37 0) (-2.93933e-36 -1.30208e-36 0) (-2.50331e-35 -1.20495e-35 0) (-1.83172e-34 -1.09614e-34 0) (-1.30108e-33 -8.90042e-34 0) (-6.51549e-33 -7.07722e-33 0) (-3.1569e-32 -4.19453e-32 0) (6.21696e-34 -2.11737e-31 0) (5.88224e-33 2.98359e-32 0) (-3.05135e-33 5.30681e-33 0) (-5.90552e-34 8.68681e-34 0) (-1.22255e-34 9.83055e-35 0) (-1.64514e-35 1.16076e-35 0) (-2.23055e-36 1.21148e-36 0) (-2.55322e-37 1.29393e-37 0) (-2.87621e-38 1.27501e-38 0) (-2.94071e-39 1.23961e-39 0) (-2.92404e-40 1.13101e-40 0) (-2.71919e-41 1.00483e-41 0) (-2.44956e-42 8.48874e-43 0) (-2.09646e-43 6.96335e-44 0) (-1.73781e-44 5.4809e-45 0) (-1.38149e-45 4.19023e-46 0) (-1.06507e-46 3.09255e-47 0) (-7.92336e-48 2.2197e-48 0) (-5.72652e-49 1.54457e-49 0) (-4.01091e-50 1.04683e-50 0) (-2.73426e-51 6.89983e-52 0) (-1.81219e-52 4.43616e-53 0) (-1.18287e-53 2.75524e-54 0) (-2.73103e-54 -2.65107e-55 0) (-3.25413e-53 -7.29752e-54 0) (-5.17343e-52 -1.19842e-52 0) (-8.03039e-51 -1.92035e-51 0) (-1.2156e-49 -3.00097e-50 0) (-1.79006e-48 -4.57573e-49 0) (-2.56618e-47 -6.78882e-48 0) (-3.56841e-46 -9.8125e-47 0) (-4.82153e-45 -1.37609e-45 0) (-6.29515e-44 -1.87707e-44 0) (-7.97083e-43 -2.47474e-43 0) (-9.70107e-42 -3.169e-42 0) (-1.143e-40 -3.90142e-41 0) (-1.28448e-39 -4.66167e-40 0) (-1.39603e-38 -5.31476e-39 0) (-1.42945e-37 -5.89206e-38 0) (-1.41699e-36 -6.17204e-37 0) (-1.29402e-35 -6.35968e-36 0) (-1.14855e-34 -6.1382e-35 0) (-8.90931e-34 -6.01696e-34 0) (-6.71233e-33 -5.38002e-33 0) (-3.68258e-32 -4.88769e-32 0) (-1.87054e-31 -3.31986e-31 0) (4.23909e-33 -1.93104e-30 0) (4.43829e-32 1.43885e-31 0) (-2.29634e-32 2.6083e-32 0) (-3.67365e-33 2.75509e-33 0) (-7.20776e-34 2.11445e-34 0) (-9.07444e-35 1.36091e-35 0) (-1.1934e-35 7.84788e-37 0) (-1.31915e-36 4.69462e-38 0) (-1.45571e-37 3.07657e-39 0) (-1.45621e-38 2.35982e-40 0) (-1.42646e-39 1.91393e-41 0) (-1.30669e-40 1.60734e-42 0) (-1.16384e-41 1.31173e-43 0) (-9.8508e-43 1.05169e-44 0) (-8.09318e-44 8.11107e-46 0) (-6.3789e-45 6.09706e-47 0) (-4.88263e-46 4.42653e-48 0) (-3.60754e-47 3.13135e-49 0) (-2.5919e-48 2.14831e-50 0) (-1.80521e-49 1.43744e-51 0) (-1.2245e-50 9.35717e-53 0) (-8.0774e-52 5.95139e-54 0) (-5.24831e-53 4.3559e-55 0) (-1.18818e-53 1.16678e-54 0) (-1.41528e-52 1.91428e-53 0) (-2.26333e-51 3.12731e-52 0) (-3.53469e-50 4.99065e-51 0) (-5.38572e-49 7.76512e-50 0) (-7.98438e-48 1.17832e-48 0) (-1.15305e-46 1.73937e-47 0) (-1.61547e-45 2.49982e-46 0) (-2.20121e-44 3.48468e-45 0) (-2.89861e-43 4.72083e-44 0) (-3.70661e-42 6.17898e-43 0) (-4.556e-41 7.84519e-42 0) (-5.43283e-40 9.56989e-41 0) (-6.17699e-39 1.13007e-39 0) (-6.81704e-38 1.26968e-38 0) (-7.07955e-37 1.37369e-37 0) (-7.1668e-36 1.37685e-36 0) (-6.66213e-35 1.28621e-35 0) (-6.11041e-34 9.80095e-35 0) (-4.85953e-33 5.07192e-34 0) (-3.90986e-32 -2.22679e-33 0) (-2.24707e-31 -8.51394e-32 0) (-1.39378e-30 -1.17795e-30 0) (3.23861e-32 -7.22833e-30 0) (1.80062e-32 1.5115e-30 0) (-9.30437e-33 1.83777e-31 0) (-1.42157e-33 1.52681e-32 0) (-2.75655e-34 9.51428e-34 0) (-3.40819e-35 3.82051e-35 0) (-4.44941e-36 1.70082e-37 0) (-4.87015e-37 -1.91521e-37 0) (-5.34515e-38 -2.71081e-38 0) (-5.31283e-39 -2.952e-39 0) (-5.18203e-40 -2.79497e-40 0) (-4.72499e-41 -2.51527e-41 0) (-4.19386e-42 -2.13464e-42 0) (-3.53707e-43 -1.75439e-43 0) (-2.89762e-44 -1.38229e-44 0) (-2.27732e-45 -1.05752e-45 0) (-1.7389e-46 -7.80942e-47 0) (-1.28173e-47 -5.60803e-48 0) (-9.18954e-49 -3.90406e-49 0) (-6.38735e-50 -2.64704e-50 0) (-4.32469e-51 -1.74534e-51 0) (-2.84697e-52 -1.12247e-52 0) (-1.71446e-53 -6.88735e-54 0) (1.80533e-53 2.15145e-54 0) (3.13617e-52 4.3242e-53 0) (5.00616e-51 7.08158e-52 0) (7.78952e-50 1.13226e-50 0) (1.18205e-48 1.76523e-49 0) (1.74486e-47 2.68448e-48 0) (2.50767e-46 3.97165e-47 0) (3.49544e-45 5.72238e-46 0) (4.73512e-44 7.99774e-45 0) (6.19704e-43 1.08669e-43 0) (7.86774e-42 1.42671e-42 0) (9.59787e-41 1.81785e-41 0) (1.13413e-39 2.22532e-40 0) (1.27733e-38 2.63809e-39 0) (1.39296e-37 2.97198e-38 0) (1.42908e-36 3.21553e-37 0) (1.42317e-35 3.18207e-36 0) (1.30173e-34 2.82846e-35 0) (1.16554e-33 1.71818e-34 0) (9.06451e-33 -2.24289e-34 0) (7.01087e-32 -3.42986e-32 0) (3.89776e-31 -6.91056e-31 0) (2.22347e-30 -9.56099e-30 0) (-5.04278e-32 -9.04064e-29 0) (-6.34376e-32 7.86126e-31 0) (3.28047e-32 9.79586e-32 0) (5.19067e-33 8.34431e-33 0) (1.0166e-33 5.36074e-34 0) (1.2753e-34 2.38747e-35 0) (1.67555e-35 4.496e-37 0) (1.84898e-36 -6.4633e-38 0) (2.03888e-37 -1.08158e-38 0) (2.03745e-38 -1.22316e-39 0) (1.99458e-39 -1.1718e-40 0) (1.82573e-40 -1.05903e-41 0) (1.62526e-41 -9.00439e-43 0) (1.37481e-42 -7.40762e-44 0) (1.12897e-43 -5.84071e-45 0) (8.89398e-45 -4.47092e-46 0) (6.80491e-46 -3.30329e-47 0) (5.02568e-47 -2.37317e-48 0) (3.60941e-48 -1.65278e-49 0) (2.51295e-49 -1.12103e-50 0) (1.70398e-50 -7.39419e-52 0) (1.12374e-51 -4.75775e-53 0) (7.4617e-53 -3.07685e-54 0) (4.38136e-53 -1.77977e-54 0) (6.42869e-52 -2.6748e-53 0) (1.02684e-50 -4.37272e-52 0) (1.59989e-49 -6.98566e-51 0) (2.43139e-48 -1.08814e-49 0) (3.59458e-47 -1.65321e-48 0) (5.17489e-46 -2.44342e-47 0) (7.22619e-45 -3.51651e-46 0) (9.8089e-44 -4.90884e-45 0) (1.28645e-42 -6.66065e-44 0) (1.63732e-41 -8.73151e-43 0) (2.00248e-40 -1.11039e-41 0) (2.37359e-39 -1.35577e-40 0) (2.68176e-38 -1.59956e-39 0) (2.93645e-37 -1.78277e-38 0) (3.02479e-36 -1.87394e-37 0) (3.02935e-35 -1.70019e-36 0) (2.78573e-34 -1.10064e-35 0) (2.51584e-33 4.14817e-35 0) (1.97151e-32 3.15452e-33 0) (1.54863e-31 7.37736e-32 0) (8.71728e-31 1.17817e-30 0) (5.167e-30 1.41406e-29 0) (-1.18225e-31 1.18298e-28 0) (-2.62908e-32 -6.46464e-31 0) (1.36091e-32 -7.15304e-32 0) (2.2535e-33 -5.33032e-33 0) (4.46835e-34 -2.84327e-34 0) (5.70426e-35 -4.44239e-36 0) (7.55111e-36 9.99725e-37 0) (8.41179e-37 1.85736e-37 0) (9.32589e-38 2.13363e-38 0) (9.37621e-39 2.18872e-39 0) (9.21673e-40 2.0315e-40 0) (8.473e-41 1.8148e-41 0) (7.56716e-42 1.53513e-42 0) (6.422e-43 1.25949e-43 0) (5.28754e-44 9.91087e-45 0) (4.17626e-45 7.57479e-46 0) (3.20229e-46 5.58856e-47 0) (2.37001e-47 4.01004e-48 0) (1.70527e-48 2.78952e-49 0) (1.18934e-49 1.89009e-50 0) (8.07749e-51 1.24546e-51 0) (5.33404e-52 8.00465e-53 0) (3.37382e-53 4.80287e-54 0) (-8.24615e-54 -3.3548e-54 0) (-1.7023e-52 -6.13043e-53 0) (-2.72543e-51 -1.00315e-51 0) (-4.25153e-50 -1.60302e-50 0) (-6.46959e-49 -2.4977e-49 0) (-9.57772e-48 -3.79593e-48 0) (-1.38093e-46 -5.61219e-47 0) (-1.93136e-45 -8.07992e-46 0) (-2.62633e-44 -1.12835e-44 0) (-3.45086e-43 -1.53172e-43 0) (-4.40151e-42 -2.00894e-42 0) (-5.39513e-41 -2.5564e-41 0) (-6.41218e-40 -3.12403e-40 0) (-7.26442e-39 -3.69182e-39 0) (-7.98206e-38 -4.13009e-38 0) (-8.25041e-37 -4.38619e-37 0) (-8.30239e-36 -4.10972e-36 0) (-7.66889e-35 -3.0391e-35 0) (-6.9756e-34 -2.2678e-35 0) (-5.50031e-33 4.82503e-33 0) (-4.3747e-32 1.27157e-31 0) (-2.48663e-31 2.10128e-30 0) (-1.51711e-30 2.58444e-29 0) (3.49408e-32 2.21349e-28 0) (1.76935e-32 -4.95363e-32 0) (-9.15405e-33 -9.03161e-33 0) (-1.38001e-33 -7.06635e-34 0) (-2.64532e-34 -2.86132e-35 0) (-3.2351e-35 2.42416e-36 0) (-4.18712e-36 5.79348e-37 0) (-4.54553e-37 8.08459e-38 0) (-4.95732e-38 8.77541e-39 0) (-4.89816e-39 8.86733e-40 0) (-4.75533e-40 8.22525e-41 0) (-4.31715e-41 7.36412e-42 0) (-3.81844e-42 6.25237e-43 0) (-3.20998e-43 5.14654e-44 0) (-2.62257e-44 4.06346e-45 0) (-2.05601e-45 3.1146e-46 0) (-1.56661e-46 2.30439e-47 0) (-1.15249e-47 1.65758e-48 0) (-8.24916e-49 1.15582e-49 0) (-5.72493e-50 7.84825e-51 0) (-3.87103e-51 5.18219e-52 0) (-2.54681e-52 3.33747e-53 0) (-1.80451e-53 2.10745e-54 0) (-2.96341e-53 3.42388e-55 0) (-4.67941e-52 3.62986e-54 0) (-7.47369e-51 5.99155e-53 0) (-1.16401e-49 9.68782e-52 0) (-1.76824e-48 1.52799e-50 0) (-2.61305e-47 2.35275e-49 0) (-3.7601e-46 3.52586e-48 0) (-5.24808e-45 5.15148e-47 0) (-7.12003e-44 7.30451e-46 0) (-9.33298e-43 1.00854e-44 0) (-1.18711e-41 1.34645e-43 0) (-1.45096e-40 1.74965e-42 0) (-1.71857e-39 2.19055e-41 0) (-1.94025e-38 2.68399e-40 0) (-2.12251e-37 3.19368e-39 0) (-2.1844e-36 3.8768e-38 0) (-2.18491e-35 4.91339e-37 0) (-2.00693e-34 7.13368e-36 0) (-1.80907e-33 1.14427e-34 0) (-1.41549e-32 1.93128e-33 0) (-1.10803e-31 2.9817e-32 0) (-6.22155e-31 3.90645e-31 0) (-3.65448e-30 3.79605e-30 0) (8.35756e-32 2.25243e-29 0) (1.86469e-33 -1.37594e-32 0) (-9.81982e-34 -2.38767e-33 0) (-1.86653e-34 -3.93076e-34 0) (-3.62326e-35 -4.44518e-35 0) (-4.68809e-36 -5.25898e-36 0) (-6.08063e-37 -5.47225e-37 0) (-6.73522e-38 -5.8246e-38 0) (-7.36405e-39 -5.71114e-39 0) (-7.35469e-40 -5.52913e-40 0) (-7.16743e-41 -5.02311e-41 0) (-6.55641e-42 -4.44714e-42 0) (-5.82425e-43 -3.74455e-43 0) (-4.92623e-44 -3.06337e-44 0) (-4.04268e-45 -2.40515e-45 0) (-3.18621e-46 -1.83493e-46 0) (-2.43841e-47 -1.35165e-47 0) (-1.80247e-48 -9.68586e-49 0) (-1.29561e-49 -6.72994e-50 0) (-9.03161e-51 -4.55551e-51 0) (-6.13187e-52 -2.99922e-52 0) (-4.05169e-53 -1.92589e-53 0) (-2.9812e-54 -1.13581e-54 0) (-6.58002e-54 1.1645e-54 0) (-1.04356e-52 2.08304e-53 0) (-1.65851e-51 3.41695e-52 0) (-2.56966e-50 5.47549e-51 0) (-3.88144e-49 8.55707e-50 0) (-5.7017e-48 1.30471e-48 0) (-8.15042e-47 1.93575e-47 0) (-1.12967e-45 2.79763e-46 0) (-1.52054e-44 3.92325e-45 0) (-1.97661e-43 5.35052e-44 0) (-2.48985e-42 7.05395e-43 0) (-3.01234e-41 9.03019e-42 0) (-3.52404e-40 1.11175e-40 0) (-3.92747e-39 1.32785e-39 0) (-4.22582e-38 1.51428e-38 0) (-4.27531e-37 1.67803e-37 0) (-4.1764e-36 1.75988e-36 0) (-3.74592e-35 1.81372e-35 0) (-3.25453e-34 1.75819e-34 0) (-2.45801e-33 1.72687e-33 0) (-1.80174e-32 1.55841e-32 0) (-9.54509e-32 1.41134e-31 0) (-4.75356e-31 9.63628e-31 0) (1.0704e-32 5.37155e-30 0) (2.85601e-32 -1.89245e-32 0) (5.34691e-33 -1.95281e-33 0) (7.06888e-34 -2.01887e-34 0) (9.538e-35 -2.01073e-35 0) (-6.42819e-33 -1.1129e-31 0) (-1.08476e-33 -7.59167e-33 0) (-1.40937e-34 -3.7751e-34 0) (-1.58703e-35 -1.01884e-35 0) (-4.44791e-32 1.57144e-32 0) (-7.31438e-33 1.09323e-33 0) (-9.3964e-34 5.29524e-35 0) (-1.04931e-34 9.64628e-37 0) (1.89949e-33 1.30531e-31 0) (4.99844e-34 8.98294e-33 0) (8.29987e-35 4.5098e-34 0) (1.51692e-35 1.22754e-35 0) (3.58807e-32 2.47062e-32 0) (6.75707e-33 2.12523e-33 0) (9.23546e-34 1.60315e-34 0) (1.25332e-34 1.16884e-35 0) (-6.42452e-33 2.39933e-32 0) (-1.3264e-33 3.03946e-33 0) (-1.98138e-34 3.81881e-34 0) (-2.83059e-35 4.35128e-35 0) (-7.66261e-32 6.13111e-32 0) (-1.46689e-32 6.119e-33 0) (-2.04494e-33 5.90014e-34 0) (-2.79538e-34 5.5661e-35 0) (-1.27529e-31 2.80851e-31 0) (-2.41642e-32 2.06139e-32 0) (-3.3287e-33 1.16228e-33 0) (-4.52135e-34 4.65176e-35 0) (-3.83537e-33 4.80073e-31 0) (-7.23231e-34 3.35077e-32 0) (-9.90625e-35 1.6512e-33 0) (-1.34122e-35 3.58771e-35 0) (1.27026e-31 2.93277e-31 0) (2.40673e-32 2.14027e-32 0) (3.315e-33 1.1893e-33 0) (4.50276e-34 4.53508e-35 0) (8.13827e-32 6.22869e-32 0) (1.5591e-32 6.11704e-33 0) (2.17459e-33 5.76287e-34 0) (2.97452e-34 5.31899e-35 0) (1.31482e-32 1.67714e-32 0) (2.66858e-33 2.13952e-33 0) (3.94072e-34 2.69972e-34 0) (5.57902e-35 3.08525e-35 0) (2.01021e-33 2.48733e-33 0) (4.35898e-34 3.5375e-34 0) (6.73752e-35 4.85286e-35 0) (9.93759e-36 5.8942e-36 0) (2.28595e-34 3.91339e-34 0) (5.18862e-35 6.03582e-35 0) (8.27868e-36 8.85287e-36 0) (1.25525e-36 1.13167e-36 0) (-8.41476e-36 1.26362e-34 0) (-2.82742e-36 2.59331e-35 0) (-1.16375e-36 4.18651e-36 0) (-2.13444e-37 6.21871e-37 0) (-3.58153e-34 7.09882e-34 0) (-9.06676e-35 1.56199e-34 0) (-2.13514e-35 2.49654e-35 0) (-3.54954e-36 3.75264e-36 0) (-3.20711e-33 6.27562e-33 0) (-7.90818e-34 1.30428e-33 0) (-1.78178e-34 1.98287e-34 0) (-2.87281e-35 2.86945e-35 0) (-2.94316e-32 4.38195e-32 0) (-6.84507e-33 8.20615e-33 0) (-1.46998e-33 1.15594e-33 0) (-2.27302e-34 1.56288e-34 0) (-1.93614e-31 3.39516e-31 0) (-4.30613e-32 5.61044e-32 0) (-8.63197e-33 7.05597e-33 0) (-1.27274e-33 8.74843e-34 0) (-1.39293e-30 1.57376e-30 0) (-2.65971e-31 1.87076e-31 0) (-5.0373e-32 1.69195e-32 0) (-7.00548e-33 1.38535e-33 0) (-1.22587e-30 1.04111e-29 0) (-2.29047e-31 9.63425e-31 0) (-4.30523e-32 6.75674e-32 0) (-5.93455e-33 3.38232e-33 0) (1.22587e-30 1.04111e-29 0) (2.29047e-31 9.63428e-31 0) (4.30519e-32 6.75682e-32 0) (5.93444e-33 3.38249e-33 0) (1.39292e-30 1.57378e-30 0) (2.65966e-31 1.87106e-31 0) (5.03688e-32 1.69267e-32 0) (7.00448e-33 1.38688e-33 0) (1.93405e-31 3.39739e-31 0) (4.29826e-32 5.6373e-32 0) (8.5915e-33 7.11754e-33 0) (1.26389e-33 8.874e-34 0) (2.51077e-32 4.52211e-32 0) (5.67328e-33 9.88775e-33 0) (1.04929e-33 1.52244e-33 0) (1.46478e-34 2.26002e-34 0) (-6.20525e-32 1.65714e-32 0) (-1.24474e-32 1.33355e-32 0) (-3.04887e-33 2.45505e-33 0) (-5.02455e-34 4.36035e-34 0) (-6.69688e-31 7.04479e-34 0) (-9.62302e-32 1.55331e-34 0) (-2.20035e-32 2.4972e-35 0) (-3.244e-33 4.35568e-36 0) (-6.52251e-32 -1.02156e-32 0) (-1.3229e-32 -1.20124e-32 0) (-3.22416e-33 -2.25226e-33 0) (-5.28122e-34 -4.00565e-34 0) (-4.32034e-33 -1.39335e-33 0) (-1.16925e-33 -1.67743e-33 0) (-4.13267e-34 -3.52323e-34 0) (-5.22217e-35 -7.36359e-36 0) (-2.0631e-34 -2.18764e-34 0) (-6.2454e-35 -2.50656e-34 0) (3.28779e-35 5.07078e-35 0) (3.02149e-34 5.13179e-34 0) (1.56411e-35 -3.78474e-36 0) (1.2842e-34 1.10529e-34 0) (6.42415e-34 9.13521e-34 0) (3.01437e-33 4.51115e-33 0) (1.66656e-34 9.85125e-35 0) (1.11841e-33 7.31089e-34 0) (5.86576e-33 5.08726e-33 0) (3.10982e-32 2.67257e-32 0) (8.93685e-34 5.42821e-34 0) (6.44295e-33 4.05593e-33 0) (3.81532e-32 2.9733e-32 0) (2.35891e-31 1.64205e-31 0) (4.97902e-33 -2.2748e-38 0) (3.77928e-32 -2.78258e-38 0) (2.33082e-31 -7.32586e-39 0) (1.61196e-30 -1.72065e-39 0) (8.93646e-34 -5.43054e-34 0) (6.44297e-33 -4.05621e-33 0) (3.81533e-32 -2.97331e-32 0) (2.35891e-31 -1.64205e-31 0) (1.66553e-34 -1.00927e-34 0) (1.11871e-33 -7.34e-34 0) (5.86609e-33 -5.08799e-33 0) (3.10982e-32 -2.67258e-32 0) (2.14767e-35 -1.68744e-35 0) (1.33062e-34 -1.3518e-34 0) (6.46023e-34 -9.19474e-34 0) (3.01522e-33 -4.51241e-33 0) (-2.24252e-36 2.55016e-35 0) (9.62388e-36 2.32413e-35 0) (6.75052e-35 -1.02147e-34 0) (3.09582e-34 -5.23557e-34 0) (-2.73992e-34 2.54421e-34 0) (-1.04914e-34 3.71834e-34 0) (-4.96554e-35 7.28959e-35 0) (1.60423e-35 -4.44776e-35 0) (-5.96828e-33 1.45326e-33 0) (-1.62294e-33 2.31172e-33 0) (-5.91541e-34 5.0993e-34 0) (-1.11553e-34 9.18339e-35 0) (-9.20058e-32 9.75678e-33 0) (-1.85503e-32 1.63824e-32 0) (-4.53477e-33 3.11187e-33 0) (-7.46834e-34 5.66913e-34 0) (-9.47448e-31 -3.48621e-32 0) (-1.34076e-31 -6.40617e-33 0) (-3.07442e-32 -8.88575e-34 0) (-4.52603e-33 -1.18403e-34 0) (5.77666e-32 -2.89606e-31 0) (1.44143e-32 -6.19226e-32 0) (1.96497e-33 -8.74862e-33 0) (1.99358e-34 -1.25729e-33 0) (1.10748e-30 -1.1457e-30 0) (2.05181e-31 -1.23439e-31 0) (3.8119e-32 -9.59321e-33 0) (5.2003e-33 -5.60946e-34 0) (-1.80979e-31 -8.20454e-30 0) (-3.92941e-32 -7.20244e-31 0) (-7.78423e-33 -4.69667e-32 0) (-1.13646e-33 -1.85358e-33 0) (-2.306e-30 1.87182e-31 0) (-4.30871e-31 1.72832e-32 0) (-8.09922e-32 1.20489e-33 0) (-1.1165e-32 5.86479e-35 0) (-1.33615e-31 8.41979e-30 0) (-3.02868e-32 7.40554e-31 0) (-6.048e-33 4.83981e-32 0) (-8.91395e-34 1.92124e-33 0) (1.14197e-30 1.17866e-30 0) (2.12359e-31 1.25499e-31 0) (3.97719e-32 9.51262e-33 0) (5.46336e-33 5.03429e-34 0) (1.53768e-31 2.86774e-31 0) (3.38612e-32 4.66922e-32 0) (6.68235e-33 5.78209e-33 0) (9.73674e-34 7.07804e-34 0) (3.18194e-34 6.91722e-32 0) (1.30298e-34 1.2552e-32 0) (3.84312e-35 1.72274e-33 0) (7.4157e-36 2.2705e-34 0) (-1.41178e-31 2.74674e-31 0) (-3.06826e-32 4.35012e-32 0) (-5.92124e-33 5.22823e-33 0) (-8.48045e-34 6.23247e-34 0) (-1.07461e-30 9.5121e-31 0) (-1.91869e-31 7.87614e-32 0) (-3.52968e-32 2.80762e-33 0) (-4.75078e-33 -4.16994e-34 0) (1.72492e-30 7.76039e-30 0) (3.34617e-31 6.28139e-31 0) (6.37037e-32 3.58362e-32 0) (8.9131e-33 6.32579e-34 0) (3.97272e-30 -1.15349e-29 0) (7.41183e-31 -1.06434e-30 0) (1.39172e-31 -7.42254e-32 0) (1.91656e-32 -3.64603e-33 0) (-1.33669e-30 -2.07863e-29 0) (-2.48402e-31 -1.86022e-30 0) (-4.64759e-32 -1.24133e-31 0) (-6.37821e-33 -5.26313e-33 0) (-3.98821e-30 -2.05526e-30 0) (-7.40966e-31 -2.63484e-31 0) (-1.3874e-31 -2.62327e-32 0) (-1.90528e-32 -2.5077e-33 0) (1.41635e-30 7.62763e-30 0) (2.62926e-31 5.63945e-31 0) (4.91382e-32 2.50766e-32 0) (6.73762e-33 -9.36317e-34 0) (4.00243e-30 -1.20473e-29 0) (7.3826e-31 -1.09776e-30 0) (1.37941e-31 -7.49849e-32 0) (1.88911e-32 -3.42164e-33 0) (-2.73517e-30 -2.0949e-29 0) (-5.04793e-31 -1.86855e-30 0) (-9.45029e-32 -1.25552e-31 0) (-1.29637e-32 -5.59417e-33 0) (-3.00235e-30 7.67361e-30 0) (-5.66381e-31 6.16972e-31 0) (-1.06762e-31 3.65569e-32 0) (-1.47698e-32 1.05368e-33 0) (1.06036e-30 5.95486e-31 0) (1.84437e-31 2.58285e-32 0) (3.34102e-32 -3.50064e-33 0) (4.42048e-33 -1.16049e-33 0) (2.0967e-31 2.87934e-32 0) (4.81099e-32 1.46347e-32 0) (8.04635e-33 2.53106e-33 0) (1.02853e-33 5.02167e-34 0) (1.88329e-31 -1.71201e-30 0) (9.61624e-32 -1.80886e-31 0) (1.00362e-32 -1.38019e-32 0) (9.57934e-34 -7.61603e-34 0) (-1.52658e-31 -1.15055e-29 0) (-3.04644e-32 -1.06179e-30 0) (-7.23807e-33 -7.58443e-32 0) (-1.17371e-33 -4.26617e-33 0) (-1.55001e-30 -1.60437e-30 0) (-2.90433e-31 -1.77391e-31 0) (-5.50084e-32 -1.4449e-32 0) (-7.63044e-33 -9.58801e-34 0) (-2.10498e-31 -3.79334e-31 0) (-4.65932e-32 -6.2259e-32 0) (-9.29013e-33 -7.77093e-33 0) (-1.36518e-33 -9.62038e-34 0) (-3.29738e-32 -4.88206e-32 0) (-7.62146e-33 -9.08228e-33 0) (-1.6328e-33 -1.27354e-33 0) (-2.51775e-34 -1.7177e-34 0) (-1.08054e-34 -1.397e-32 0) (-3.17962e-35 -2.87475e-33 0) (-9.41596e-36 -4.33004e-34 0) (-1.79014e-36 -6.22505e-35 0) (3.20879e-32 -4.48791e-32 0) (7.32564e-33 -8.06025e-33 0) (1.54711e-33 -1.09687e-33 0) (2.3557e-34 -1.43314e-34 0) (1.89854e-31 -3.55445e-31 0) (4.13646e-32 -5.59728e-32 0) (8.01062e-33 -6.68467e-33 0) (1.15075e-33 -7.91698e-34 0) (1.41818e-30 -1.25569e-30 0) (2.53309e-31 -1.04077e-31 0) (4.66072e-32 -3.72509e-33 0) (6.27433e-33 5.477e-34 0) (-2.26072e-30 -1.02364e-29 0) (-4.38793e-31 -8.2831e-31 0) (-8.35684e-32 -4.71864e-32 0) (-1.16969e-32 -8.16776e-34 0) (-5.25561e-30 1.51279e-29 0) (-9.81992e-31 1.39993e-30 0) (-1.84578e-31 9.81838e-32 0) (-2.54432e-32 4.91538e-33 0) (1.54356e-30 2.76527e-29 0) (2.80259e-31 2.50035e-30 0) (5.21374e-32 1.69988e-31 0) (7.09896e-33 7.74864e-33 0) (3.7167e-30 4.05293e-30 0) (7.00728e-31 4.6011e-31 0) (1.32068e-31 3.88765e-32 0) (1.82673e-32 2.77039e-33 0) (4.82296e-31 1.03099e-30 0) (1.07197e-31 1.61886e-31 0) (2.1465e-32 1.93942e-32 0) (3.16865e-33 2.27878e-33 0) (1.0706e-35 -1.66733e-36 0) (1.12046e-36 -6.34774e-38 0) (1.06819e-37 -2.64586e-39 0) (9.92832e-39 -1.31173e-40 0) (8.66422e-40 -2.56287e-41 0) (7.13773e-41 -1.61155e-41 0) (3.83916e-42 4.83464e-42 0) (7.40645e-43 7.96436e-42 0) (7.16788e-43 1.85267e-42 0) (1.65709e-43 4.08336e-43 0) (3.66856e-44 6.30173e-44 0) (5.60431e-45 9.29392e-45 0) (6.71366e-49 2.24943e-45 0) (-5.5935e-45 9.29554e-45 0) (-3.65215e-44 6.30347e-44 0) (-1.63306e-43 4.08515e-43 0) (-6.83185e-43 1.85439e-42 0) (-2.86732e-43 7.98067e-42 0) (2.00978e-42 4.98021e-42 0) (1.60837e-42 -1.48048e-41 0) (-2.49708e-42 -1.33051e-41 0) (-2.49708e-42 1.33051e-41 0) (1.60837e-42 1.48048e-41 0) (2.00978e-42 -4.98021e-42 0) (-2.86733e-43 -7.98067e-42 0) (-6.83197e-43 -1.85438e-42 0) (-1.63411e-43 -4.08381e-43 0) (-3.73774e-44 -6.1884e-44 0) (-1.14833e-44 1.16761e-46 0) (-3.80957e-44 6.2889e-44 0) (-1.6826e-43 4.16408e-43 0) (-7.13919e-43 1.90809e-42 0) (-4.12569e-43 8.32491e-42 0) (1.49644e-42 6.41578e-42 0) (2.04715e-42 -8.75087e-42 0) (7.50475e-47 -1.67782e-41 0) (-2.04644e-42 -8.7516e-42 0) (-1.49068e-42 6.40847e-42 0) (4.52314e-43 8.25781e-42 0) (8.58793e-43 1.28424e-42 0) (-1.4092e-36 5.91472e-37 0) (-9.8765e-38 1.06674e-37 0) (-4.80704e-39 1.02406e-38 0) (1.77728e-41 7.9645e-40 0) (4.03684e-41 5.29869e-41 0) (6.686e-42 2.03731e-42 0) (6.63319e-43 5.65955e-43 0) (1.03869e-43 6.57993e-43 0) (5.67136e-44 1.53259e-43 0) (1.25276e-44 3.40225e-44 0) (2.74788e-45 5.29481e-45 0) (4.21693e-46 7.85421e-46 0) (3.12586e-49 1.91146e-46 0) (-4.17422e-46 7.85984e-46 0) (-2.69294e-45 5.30062e-45 0) (-1.18503e-44 3.40689e-44 0) (-4.89112e-44 1.53396e-43 0) (-1.97781e-44 6.52766e-43 0) (1.46418e-43 4.04978e-43 0) (1.16916e-43 -1.21026e-42 0) (-1.80795e-43 -1.08641e-42 0) (-1.80795e-43 1.08641e-42 0) (1.16916e-43 1.21026e-42 0) (1.46418e-43 -4.04978e-43 0) (-1.97782e-44 -6.52766e-43 0) (-4.89121e-44 -1.53395e-43 0) (-1.18583e-44 -3.40575e-44 0) (-2.75762e-45 -5.2028e-45 0) (-8.5748e-46 9.9528e-48 0) (-2.81179e-45 5.28819e-45 0) (-1.22196e-44 3.47356e-44 0) (-5.11719e-44 1.57907e-43 0) (-2.88638e-44 6.81428e-43 0) (1.09846e-43 5.23433e-43 0) (1.49175e-43 -7.16972e-43 0) (6.29995e-48 -1.37365e-42 0) (-1.49117e-43 -7.17041e-43 0) (-1.09391e-43 5.2276e-43 0) (3.19671e-44 6.7553e-43 0) (6.23868e-44 1.05848e-43 0) (-9.53932e-36 -1.81948e-37 0) (-7.25518e-37 -2.66325e-38 0) (-4.7203e-38 -2.75833e-39 0) (-2.1218e-39 -2.44202e-40 0) (-7.99201e-42 -2.06232e-41 0) (1.51812e-41 -1.71772e-42 0) (2.3964e-42 -9.55454e-44 0) (2.8492e-43 3.89061e-44 0) (3.16163e-44 1.07876e-44 0) (3.41832e-45 2.5302e-45 0) (4.13095e-46 4.02112e-46 0) (4.8157e-47 6.04796e-47 0) (1.26587e-48 1.4871e-47 0) (-3.12147e-47 6.06867e-47 0) (-2.00579e-46 4.05255e-46 0) (-8.76129e-46 2.57646e-45 0) (-3.58309e-45 1.14524e-44 0) (-1.42152e-45 4.8155e-44 0) (1.07866e-44 2.97058e-44 0) (8.59734e-45 -8.92451e-44 0) (-1.3289e-44 -8.00238e-44 0) (-1.3289e-44 8.00238e-44 0) (8.59734e-45 8.92451e-44 0) (1.07866e-44 -2.97058e-44 0) (-1.42153e-45 -4.8155e-44 0) (-3.58316e-45 -1.14523e-44 0) (-8.76738e-46 -2.57557e-45 0) (-2.05463e-46 -3.97637e-46 0) (-6.43236e-47 7.79777e-49 0) (-2.09544e-46 4.0428e-46 0) (-9.03808e-46 2.62785e-45 0) (-3.75125e-45 1.17967e-44 0) (-2.09167e-45 5.0318e-44 0) (8.11635e-45 3.85144e-44 0) (1.0992e-44 -5.30083e-44 0) (5.13745e-49 -1.01462e-43 0) (-1.09874e-44 -5.30142e-44 0) (-8.08058e-45 3.84588e-44 0) (2.33232e-45 4.9852e-44 0) (4.62848e-45 7.84897e-45 0) (2.01239e-36 -7.25288e-37 0) (2.5739e-37 -1.27501e-37 0) (2.84215e-38 -1.23088e-38 0) (3.05812e-39 -9.69453e-40 0) (2.99775e-40 -6.82869e-41 0) (2.83936e-41 -4.36323e-42 0) (2.51553e-42 -2.44519e-43 0) (2.15369e-43 -8.20818e-45 0) (1.77377e-44 4.92566e-46 0) (1.43491e-45 2.01494e-46 0) (1.17539e-46 3.34653e-47 0) (9.76258e-48 4.94217e-48 0) (5.30664e-49 1.16591e-48 0) (-2.18246e-48 4.61085e-48 0) (-1.41089e-47 3.06408e-47 0) (-6.11179e-47 1.93597e-46 0) (-2.47637e-46 8.55532e-46 0) (-9.68599e-47 3.56696e-45 0) (7.47062e-46 2.19041e-45 0) (5.94325e-46 -6.60772e-45 0) (-9.19452e-46 -5.9197e-45 0) (-9.19452e-46 5.9197e-45 0) (5.94325e-46 6.60772e-45 0) (7.47062e-46 -2.19041e-45 0) (-9.68605e-47 -3.56696e-45 0) (-2.47642e-46 -8.55525e-46 0) (-6.11617e-47 -1.93529e-46 0) (-1.44593e-47 -3.00597e-47 0) (-4.56017e-48 5.96091e-50 0) (-1.47501e-47 3.0566e-47 0) (-6.30785e-47 1.97496e-46 0) (-2.59449e-46 8.81543e-46 0) (-1.43481e-46 3.72929e-45 0) (5.63149e-46 2.84723e-45 0) (7.61521e-46 -3.93153e-45 0) (3.91335e-50 -7.52104e-45 0) (-7.61171e-46 -3.93202e-45 0) (-5.60527e-46 2.84276e-45 0) (1.60871e-46 3.69299e-45 0) (3.22697e-46 5.84632e-46 0) (1.35576e-35 8.56167e-37 0) (1.40219e-36 6.83714e-38 0) (1.31559e-37 6.16267e-39 0) (1.212e-38 5.5133e-40 0) (1.04469e-39 4.89764e-41 0) (8.7722e-41 4.14047e-42 0) (7.00184e-42 3.40094e-43 0) (5.43273e-43 2.69226e-44 0) (4.04626e-44 2.08972e-45 0) (2.93162e-45 1.62286e-46 0) (2.05529e-46 1.27452e-47 0) (1.40644e-47 1.05609e-48 0) (9.17107e-49 1.30179e-49 0) (-9.52335e-50 3.32671e-49 0) (-9.7204e-49 2.17804e-48 0) (-4.20628e-48 1.36609e-47 0) (-1.69242e-47 5.99058e-47 0) (-6.55039e-48 2.47568e-46 0) (5.1097e-47 1.51337e-46 0) (4.05871e-47 -4.58441e-46 0) (-6.28506e-47 -4.10344e-46 0) (-6.28506e-47 4.10344e-46 0) (4.05871e-47 4.58441e-46 0) (5.1097e-47 -1.51337e-46 0) (-6.55043e-48 -2.47568e-46 0) (-1.69245e-47 -5.99052e-47 0) (-4.20956e-48 -1.3656e-47 0) (-9.99994e-49 -2.13608e-48 0) (-3.16905e-49 4.30155e-51 0) (-1.02026e-48 2.17245e-48 0) (-4.34267e-48 1.39394e-47 0) (-1.77401e-47 6.17525e-47 0) (-9.75427e-48 2.59006e-46 0) (3.85605e-47 1.97216e-46 0) (5.2097e-47 -2.73285e-46 0) (2.87744e-51 -5.22453e-46 0) (-5.20716e-47 -2.73322e-46 0) (-3.83729e-47 1.96882e-46 0) (1.09834e-47 2.56364e-46 0) (2.22342e-47 4.07705e-47 0) (-3.21788e-36 4.50491e-36 0) (-3.41737e-37 4.14909e-37 0) (-3.28793e-38 3.78587e-38 0) (-3.06889e-39 3.24875e-39 0) (-2.67654e-40 2.71644e-40 0) (-2.25847e-41 2.16048e-41 0) (-1.80939e-42 1.66908e-42 0) (-1.40313e-43 1.23746e-43 0) (-1.04291e-44 8.91613e-45 0) (-7.51407e-46 6.20627e-46 0) (-5.21896e-47 4.20696e-47 0) (-3.51823e-48 2.77195e-48 0) (-2.30832e-49 1.81349e-49 0) (-2.49339e-50 3.3911e-50 0) (-6.53773e-50 1.52161e-49 0) (-2.76573e-49 9.4577e-49 0) (-1.10466e-48 4.12939e-48 0) (-4.23205e-49 1.69508e-47 0) (3.33706e-48 1.03234e-47 0) (2.64657e-48 -3.13777e-47 0) (-4.10265e-48 -2.80653e-47 0) (-4.10265e-48 2.80653e-47 0) (2.64657e-48 3.13777e-47 0) (3.33706e-48 -1.03234e-47 0) (-4.23207e-49 -1.69508e-47 0) (-1.10468e-48 -4.12935e-48 0) (-2.76723e-49 -9.45385e-49 0) (-6.60863e-50 -1.48575e-49 0) (-2.10496e-50 3.0178e-52 0) (-6.74364e-50 1.51121e-49 0) (-2.85558e-49 9.65152e-49 0) (-1.15851e-48 4.25778e-48 0) (-6.33461e-49 1.77419e-47 0) (2.52096e-48 1.34815e-47 0) (3.40315e-48 -1.87307e-47 0) (2.00831e-52 -3.57927e-47 0) (-3.4014e-48 -1.87334e-47 0) (-2.50821e-48 1.34572e-47 0) (7.1608e-49 1.75541e-47 0) (1.46099e-48 2.80408e-48 0) (-3.04901e-35 5.07764e-36 0) (-3.15777e-36 4.40435e-37 0) (-2.96815e-37 3.91122e-38 0) (-2.72911e-38 3.31417e-39 0) (-2.34796e-39 2.75158e-40 0) (-1.9635e-40 2.17703e-41 0) (-1.56071e-41 1.67449e-42 0) (-1.2042e-42 1.2362e-43 0) (-8.91421e-44 8.86959e-45 0) (-6.40948e-45 6.14424e-46 0) (-4.44845e-46 4.14149e-47 0) (-3.00285e-47 2.70697e-48 0) (-1.96504e-48 1.72625e-49 0) (-1.25922e-49 1.21992e-50 0) (-1.19262e-50 1.07125e-50 0) (-1.8264e-50 6.25661e-50 0) (-7.07099e-50 2.71689e-49 0) (-2.68502e-50 1.10771e-48 0) (2.13595e-49 6.72113e-49 0) (1.69175e-49 -2.04978e-48 0) (-2.6249e-49 -1.83207e-48 0) (-2.6249e-49 1.83207e-48 0) (1.69175e-49 2.04978e-48 0) (2.13595e-49 -6.72113e-49 0) (-2.68488e-50 -1.10771e-48 0) (-7.06838e-50 -2.71685e-49 0) (-1.78077e-50 -6.25049e-50 0) (-4.26691e-51 -9.87227e-51 0) (-1.36411e-51 2.02531e-53 0) (-4.35456e-51 1.00427e-50 0) (-1.838e-50 6.38227e-50 0) (-7.41562e-50 2.80214e-49 0) (-4.03646e-50 1.15996e-48 0) (1.61487e-49 8.79567e-49 0) (2.17862e-49 -1.22536e-48 0) (1.35591e-53 -2.34045e-48 0) (-2.17744e-49 -1.22555e-48 0) (-1.60644e-49 8.77896e-49 0) (4.5779e-50 1.14725e-48 0) (9.40706e-50 1.84019e-49 0) (-4.8983e-35 1.08835e-38 0) (-5.05147e-36 -1.74577e-37 0) (-4.72712e-37 -2.20157e-38 0) (-4.33292e-38 -2.06292e-39 0) (-3.71611e-39 -1.77048e-40 0) (-3.10024e-40 -1.41797e-41 0) (-2.45851e-41 -1.09632e-42 0) (-1.89337e-42 -8.11922e-44 0) (-1.39904e-43 -5.83779e-45 0) (-1.00441e-44 -4.05123e-46 0) (-6.961e-46 -2.73433e-47 0) (-4.69311e-47 -1.789e-48 0) (-3.06743e-48 -1.14005e-49 0) (-1.95368e-49 -6.96794e-51 0) (-1.23548e-50 2.25313e-52 0) (-1.8346e-51 4.01317e-51 0) (-4.40277e-51 1.74919e-50 0) (-1.64454e-51 7.09348e-50 0) (1.31787e-50 4.29052e-50 0) (1.04246e-50 -1.31221e-49 0) (-1.61894e-50 -1.17212e-49 0) (-1.61894e-50 1.17212e-49 0) (1.04246e-50 1.31221e-49 0) (1.31789e-50 -4.29052e-50 0) (-1.64207e-51 -7.09349e-50 0) (-4.35982e-51 -1.74932e-50 0) (-1.10459e-51 -4.03684e-51 0) (-2.65569e-52 -6.39924e-52 0) (-8.52142e-53 1.32075e-54 0) (-2.71055e-52 6.51025e-52 0) (-1.14032e-51 4.12244e-51 0) (-4.57574e-51 1.80459e-50 0) (-2.47953e-51 7.43067e-50 0) (9.97167e-51 5.62494e-50 0) (1.34445e-50 -7.85318e-50 0) (8.78296e-55 -1.49945e-49 0) (-1.34369e-50 -7.85447e-50 0) (-9.91806e-51 5.61377e-50 0) (2.82072e-51 7.347e-50 0) (5.8344e-51 1.183e-50 0) (-1.44799e-36 -4.72813e-36 0) (-1.48987e-37 -7.40021e-37 0) (-1.39088e-38 -7.78827e-38 0) (-1.2727e-39 -6.96121e-39 0) (-1.08962e-40 -5.8817e-40 0) (-9.07805e-42 -4.68073e-41 0) (-7.18932e-43 -3.60758e-42 0) (-5.53066e-44 -2.66569e-43 0) (-4.08235e-45 -1.91338e-44 0) (-2.92822e-46 -1.32573e-45 0) (-2.02762e-47 -8.93597e-47 0) (-1.366e-48 -5.8393e-48 0) (-8.92179e-50 -3.71756e-49 0) (-5.68006e-51 -2.3011e-50 0) (-3.67103e-52 -1.34971e-51 0) (-8.81113e-53 1.69508e-52 0) (-2.64227e-52 1.0809e-51 0) (-9.8393e-53 4.37823e-51 0) (7.95115e-52 2.64012e-51 0) (6.28236e-52 -8.09719e-51 0) (-9.76408e-52 -7.22837e-51 0) (-9.76408e-52 7.22837e-51 0) (6.28236e-52 8.0972e-51 0) (7.95119e-52 -2.64013e-51 0) (-9.83224e-53 -4.37849e-51 0) (-2.62984e-52 -1.0856e-51 0) (-6.69431e-53 -2.51304e-52 0) (-1.61308e-53 -3.99784e-53 0) (-5.19086e-54 7.84906e-56 0) (-1.64648e-53 4.06784e-53 0) (-6.91191e-53 2.56663e-52 0) (-2.76089e-52 1.12012e-51 0) (-1.49039e-52 4.58824e-51 0) (6.02004e-52 3.4674e-51 0) (8.1125e-52 -4.85134e-51 0) (5.56454e-56 -9.25968e-51 0) (-8.1078e-52 -4.85216e-51 0) (-5.98688e-52 3.46023e-51 0) (1.69993e-52 4.53523e-51 0) (3.53739e-52 7.32987e-52 0) (4.87812e-35 -3.43672e-37 0) (5.03072e-36 -2.15654e-37 0) (4.70772e-37 -2.60505e-38 0) (4.31518e-38 -2.41696e-39 0) (3.70092e-39 -2.06827e-40 0) (3.08758e-40 -1.65493e-41 0) (2.44848e-41 -1.27914e-42 0) (1.88566e-42 -9.47197e-44 0) (1.39335e-43 -6.81006e-45 0) (1.00033e-44 -4.72577e-46 0) (6.93273e-46 -3.18956e-47 0) (4.67406e-47 -2.08686e-48 0) (3.05498e-48 -1.33006e-49 0) (1.94534e-49 -8.24329e-51 0) (1.20458e-50 -4.95997e-52 0) (7.23946e-52 -1.41224e-53 0) (2.74928e-53 6.40771e-53 0) (-3.23469e-54 2.64155e-52 0) (4.66554e-53 1.58985e-52 0) (3.67138e-53 -4.88507e-52 0) (-5.71007e-53 -4.35901e-52 0) (-5.70936e-53 4.35918e-52 0) (3.6712e-53 4.88657e-52 0) (4.65089e-53 -1.58868e-52 0) (-5.71245e-54 -2.64238e-52 0) (-1.53827e-53 -6.58338e-53 0) (-3.92789e-54 -1.5275e-53 0) (-9.54169e-55 -2.35986e-54 0) (-3.11943e-55 -7.93329e-56 0) (-9.64791e-55 2.45873e-54 0) (-4.05969e-54 1.55918e-53 0) (-1.61486e-53 6.79333e-53 0) (-8.68475e-54 2.77057e-52 0) (3.52315e-53 2.09085e-52 0) (4.7459e-53 -2.93042e-52 0) (1.23869e-56 -5.59081e-52 0) (-4.74357e-53 -2.92934e-52 0) (-3.50463e-53 2.08546e-52 0) (9.93177e-54 2.73712e-52 0) (2.07909e-53 4.43496e-53 0) (3.24629e-35 4.76746e-36 0) (3.36368e-36 4.0947e-37 0) (3.163e-37 3.61822e-38 0) (2.90929e-38 3.05739e-39 0) (2.50376e-39 2.534e-40 0) (2.09435e-40 2.00199e-41 0) (1.66514e-41 1.53799e-42 0) (1.28506e-42 1.13409e-43 0) (9.51468e-44 8.12808e-45 0) (6.8425e-45 5.62424e-46 0) (4.74984e-46 3.78669e-47 0) (3.20684e-47 2.47185e-48 0) (2.0988e-48 1.57224e-49 0) (1.33804e-49 9.72608e-51 0) (8.29518e-51 5.87203e-52 0) (5.01441e-52 3.52211e-53 0) (2.86976e-53 4.93496e-54 0) (1.5098e-54 1.52876e-53 0) (2.83797e-54 1.06839e-53 0) (2.03953e-54 -2.74019e-53 0) (-3.32815e-54 -2.52127e-53 0) (-3.1879e-54 2.54975e-53 0) (2.14532e-54 3.01302e-53 0) (2.59749e-54 -8.40566e-54 0) (-3.91616e-55 -1.4941e-53 0) (-9.17496e-55 -4.18181e-54 0) (-1.28325e-55 -1.06687e-54 0) (-1.35308e-55 1.21935e-54 0) (-1.18653e-55 -1.5213e-54 0) (3.10952e-56 -2.0649e-55 0) (-1.9844e-55 8.82187e-55 0) (-8.61852e-55 4.24062e-54 0) (-4.58644e-55 1.7275e-53 0) (1.89904e-54 1.31154e-53 0) (2.65359e-54 -1.81875e-53 0) (1.69409e-55 -3.29343e-53 0) (-2.74899e-54 -1.52546e-53 0) (-2.13637e-54 1.13399e-53 0) (5.66113e-55 1.56695e-53 0) (1.3046e-54 1.81492e-54 0) (6.29644e-36 3.19597e-36 0) (6.66632e-37 2.94329e-37 0) (6.40067e-38 2.68229e-38 0) (5.97502e-39 2.29874e-39 0) (5.21509e-40 1.91855e-40 0) (4.40938e-41 1.52309e-41 0) (3.54129e-42 1.17413e-42 0) (2.75513e-43 8.68511e-44 0) (2.05536e-44 6.24094e-45 0) (1.48739e-45 4.32919e-46 0) (1.03851e-46 2.92105e-47 0) (7.04623e-48 1.9107e-48 0) (4.63278e-49 1.21754e-49 0) (2.96526e-50 7.54479e-51 0) (1.84487e-51 4.55163e-52 0) (1.11032e-52 2.27242e-53 0) (6.51015e-54 -1.51474e-53 0) (2.81684e-54 -4.3383e-54 0) (1.719e-54 2.63205e-53 0) (-1.07205e-54 2.00163e-53 0) (-1.41699e-54 3.49437e-54 0) (1.16208e-54 1.18745e-54 0) (1.02438e-54 2.842e-53 0) (-9.34518e-55 1.50124e-53 0) (-1.26628e-54 8.61417e-54 0) (-7.7826e-55 -6.0938e-54 0) (1.75754e-54 -3.4636e-54 0) (-1.43251e-54 2.38216e-53 0) (-1.81283e-54 -2.6732e-53 0) (1.56519e-54 -6.14981e-54 0) (6.21481e-55 -5.27691e-55 0) (1.10705e-54 4.78676e-54 0) (6.57082e-55 2.04163e-53 0) (-2.0975e-54 1.71291e-53 0) (-1.01424e-54 -2.00883e-53 0) (3.09967e-54 -6.10739e-54 0) (-8.3119e-55 3.23894e-53 0) (-2.49018e-54 -1.53243e-53 0) (9.32673e-56 -5.31966e-54 0) (2.02036e-54 -1.32915e-53 0) (1.16058e-36 6.34702e-37 0) (1.25788e-37 6.01475e-38 0) (1.23172e-38 5.58196e-39 0) (1.16652e-39 4.85921e-40 0) (1.03064e-40 4.10249e-41 0) (8.79615e-42 3.29177e-42 0) (7.12079e-43 2.55917e-43 0) (5.57486e-44 1.90811e-44 0) (4.1811e-45 1.38016e-45 0) (3.03856e-46 9.63263e-47 0) (2.12915e-47 6.5334e-48 0) (1.44871e-48 4.29434e-49 0) (9.54738e-50 2.74791e-50 0) (6.12105e-51 1.70656e-51 0) (3.7722e-52 8.56691e-53 0) (6.37735e-54 -6.92811e-53 0) (2.10766e-55 -3.03644e-52 0) (4.51602e-53 -9.55774e-53 0) (2.84744e-53 4.63318e-52 0) (-2.1988e-53 3.8833e-52 0) (-2.3148e-53 8.67703e-53 0) (2.30496e-53 -1.24618e-53 0) (1.66979e-53 4.51945e-52 0) (-1.82508e-53 2.71608e-52 0) (-2.26086e-53 1.68552e-52 0) (-1.36309e-53 -1.07464e-52 0) (3.13616e-53 -6.70552e-53 0) (-2.46284e-53 4.06652e-52 0) (-3.16675e-53 -4.58599e-52 0) (2.76146e-53 -1.04894e-52 0) (1.13137e-53 -8.94779e-54 0) (2.11845e-53 8.17861e-53 0) (1.25333e-53 3.49858e-52 0) (-4.07374e-53 2.9428e-52 0) (-2.18059e-53 -3.45785e-52 0) (5.54091e-53 -8.36152e-53 0) (-1.2451e-53 5.71094e-52 0) (-4.18301e-53 -2.94248e-52 0) (2.69254e-54 -1.0884e-52 0) (3.33994e-53 -2.21877e-52 0) (1.49736e-37 1.26347e-37 0) (1.64782e-38 1.23546e-38 0) (1.63183e-39 1.17098e-39 0) (1.5591e-40 1.03933e-40 0) (1.38616e-41 8.90106e-42 0) (1.1891e-42 7.2403e-43 0) (9.65963e-44 5.68944e-44 0) (7.58405e-45 4.28578e-45 0) (5.6979e-46 3.1259e-46 0) (4.14655e-47 2.19908e-47 0) (2.90734e-48 1.50138e-48 0) (1.97899e-49 9.92929e-50 0) (1.30378e-50 6.3779e-51 0) (8.17501e-52 3.47739e-52 0) (-2.44352e-53 -2.90038e-52 0) (-2.98771e-52 -1.31382e-51 0) (-2.11702e-53 -5.32316e-51 0) (8.10145e-52 -1.67889e-51 0) (5.11096e-52 8.11039e-51 0) (-3.97438e-52 6.78989e-51 0) (-4.23304e-52 1.48345e-51 0) (3.85557e-52 -3.53535e-52 0) (3.00045e-52 7.39652e-51 0) (-2.99243e-52 4.6236e-51 0) (-4.0029e-52 2.9158e-51 0) (-2.48786e-52 -1.9153e-51 0) (5.42932e-52 -1.2736e-51 0) (-4.13584e-52 6.74267e-51 0) (-5.40282e-52 -7.64848e-51 0) (4.74882e-52 -1.73663e-51 0) (1.97127e-52 -1.31015e-52 0) (3.78797e-52 1.42946e-51 0) (2.24335e-52 6.11826e-51 0) (-7.34353e-52 5.13591e-51 0) (-3.98799e-52 -6.09515e-51 0) (9.68236e-52 -1.5907e-51 0) (-2.2255e-52 9.50238e-51 0) (-7.18217e-52 -5.26375e-51 0) (7.57414e-53 -1.8517e-51 0) (5.55857e-52 -3.54094e-51 0) (-3.54329e-38 7.44102e-38 0) (-4.40844e-39 8.03207e-39 0) (-5.24434e-40 8.02786e-40 0) (-5.50682e-41 7.62861e-41 0) (-5.53107e-42 6.82418e-42 0) (-5.12297e-43 5.8436e-43 0) (-4.55179e-44 4.76507e-44 0) (-3.81062e-45 3.7392e-45 0) (-3.07095e-46 2.81551e-46 0) (-2.36053e-47 2.04794e-47 0) (-1.75224e-48 1.43607e-48 0) (-1.24974e-49 9.74674e-50 0) (-8.67907e-51 6.25715e-51 0) (-8.97836e-52 -4.64014e-52 0) (-1.37179e-51 -5.31746e-51 0) (-5.29165e-51 -2.23844e-50 0) (-3.84071e-52 -9.10133e-50 0) (1.41857e-50 -2.87838e-50 0) (8.94298e-51 1.38631e-49 0) (-6.99771e-51 1.15883e-49 0) (-7.54254e-51 2.47236e-50 0) (6.24733e-51 -8.28847e-51 0) (5.25579e-51 1.17868e-49 0) (-4.73481e-51 7.68326e-50 0) (-6.90566e-51 4.9243e-50 0) (-4.42352e-51 -3.33165e-50 0) (9.14502e-51 -2.34329e-50 0) (-6.73503e-51 1.09003e-49 0) (-8.95725e-51 -1.24416e-49 0) (7.94073e-51 -2.80208e-50 0) (3.34404e-51 -1.81355e-51 0) (6.59937e-51 2.43814e-50 0) (3.91406e-51 1.04473e-49 0) (-1.2897e-50 8.7498e-50 0) (-7.10244e-51 -1.04926e-49 0) (1.64739e-50 -2.93332e-50 0) (-3.87882e-51 1.5419e-49 0) (-1.19937e-50 -9.18491e-50 0) (1.8049e-51 -3.07321e-50 0) (8.95848e-51 -5.48044e-50 0) (-5.11668e-37 4.45782e-37 0) (-6.03664e-38 4.82831e-38 0) (-6.72082e-39 4.80997e-39 0) (-6.81269e-40 4.58206e-40 0) (-6.58053e-41 4.09562e-41 0) (-5.94359e-42 3.51485e-42 0) (-5.14572e-43 2.86759e-43 0) (-4.22779e-44 2.25509e-44 0) (-3.34465e-45 1.69968e-45 0) (-2.53392e-46 1.23818e-46 0) (-1.85473e-47 8.67684e-48 0) (-1.30717e-48 5.87316e-49 0) (-9.00479e-50 3.60043e-50 0) (-1.13663e-50 -1.19253e-50 0) (-2.30985e-50 -8.80456e-50 0) (-9.0505e-50 -3.70201e-49 0) (-6.75738e-51 -1.51224e-48 0) (2.42541e-49 -4.79614e-49 0) (1.52792e-49 2.30279e-48 0) (-1.203e-49 1.92196e-48 0) (-1.3113e-49 4.001e-49 0) (9.84324e-50 -1.74864e-49 0) (8.99011e-50 1.81512e-48 0) (-7.25363e-50 1.23994e-48 0) (-1.16347e-49 8.081e-49 0) (-7.67497e-50 -5.63031e-49 0) (1.50353e-49 -4.16698e-49 0) (-1.06711e-49 1.70616e-48 0) (-1.44776e-49 -1.96094e-48 0) (1.2953e-49 -4.37992e-49 0) (5.53573e-50 -2.30912e-50 0) (1.1226e-49 4.04088e-49 0) (6.66628e-50 1.73379e-48 0) (-2.21155e-49 1.44931e-48 0) (-1.23379e-49 -1.75514e-48 0) (2.73722e-49 -5.22597e-49 0) (-6.60288e-50 2.42402e-48 0) (-1.95377e-49 -1.55666e-48 0) (3.8844e-50 -4.95286e-49 0) (1.40261e-49 -8.14651e-49 0) (-4.01224e-36 3.30599e-36 0) (-4.63817e-37 3.49975e-37 0) (-5.06917e-38 3.42439e-38 0) (-5.06937e-39 3.21773e-39 0) (-4.83984e-40 2.84297e-40 0) (-4.33177e-41 2.41732e-41 0) (-3.72151e-42 1.9562e-42 0) (-3.0387e-43 1.52805e-43 0) (-2.39145e-44 1.14411e-44 0) (-1.80361e-45 8.2795e-46 0) (-1.31469e-46 5.74496e-47 0) (-9.22059e-48 3.82943e-48 0) (-6.39459e-49 2.07238e-49 0) (-1.31477e-49 -2.14888e-49 0) (-3.78504e-49 -1.41721e-48 0) (-1.50444e-48 -5.96686e-48 0) (-1.15556e-49 -2.45065e-47 0) (4.03e-48 -7.79759e-48 0) (2.53691e-48 3.7306e-47 0) (-2.00983e-48 3.10851e-47 0) (-2.21472e-48 6.30959e-48 0) (1.49575e-48 -3.42158e-48 0) (1.49452e-48 2.71656e-47 0) (-1.06476e-48 1.95158e-47 0) (-1.90477e-48 1.29366e-47 0) (-1.29368e-48 -9.27482e-48 0) (2.39777e-48 -7.18236e-48 0) (-1.63225e-48 2.60092e-47 0) (-2.26596e-48 -3.01134e-47 0) (2.04778e-48 -6.66313e-48 0) (8.89743e-49 -2.64609e-49 0) (1.85595e-48 6.52545e-48 0) (1.10414e-48 2.80571e-47 0) (-3.68545e-48 2.33999e-47 0) (-2.08279e-48 -2.86365e-47 0) (4.41559e-48 -9.02066e-48 0) (-1.09236e-48 3.71301e-47 0) (-3.08502e-48 -2.57087e-47 0) (7.7854e-49 -7.78051e-48 0) (2.11493e-48 -1.16965e-47 0) (-3.0677e-35 1.71841e-35 0) (-3.45431e-36 1.75473e-36 0) (-3.69826e-37 1.67743e-37 0) (-3.6364e-38 1.54801e-38 0) (-3.42549e-39 1.34987e-39 0) (-3.0309e-40 1.13553e-40 0) (-2.57978e-41 9.11235e-42 0) (-2.08936e-42 7.06732e-43 0) (-1.6332e-43 5.24745e-44 0) (-1.22361e-44 3.75394e-45 0) (-8.86043e-46 2.53596e-46 0) (-6.15623e-47 1.60118e-47 0) (-4.34723e-48 3.55906e-49 0) (-1.72131e-48 -3.51423e-48 0) (-6.0778e-48 -2.20634e-47 0) (-2.4395e-47 -9.31195e-47 0) (-1.93385e-48 -3.84597e-46 0) (6.53083e-47 -1.22778e-46 0) (4.1082e-47 5.85266e-46 0) (-3.27481e-47 4.86865e-46 0) (-3.6454e-47 9.62577e-47 0) (2.20521e-47 -6.29332e-47 0) (2.42345e-47 3.90605e-46 0) (-1.50504e-47 2.9721e-46 0) (-3.04223e-47 2.00523e-46 0) (-2.12546e-47 -1.47926e-46 0) (3.72915e-47 -1.19442e-46 0) (-2.42446e-47 3.82032e-46 0) (-3.45367e-47 -4.46036e-46 0) (3.15493e-47 -9.77582e-47 0) (1.39381e-47 -2.4372e-48 0) (2.99246e-47 1.0204e-46 0) (1.78292e-47 4.39745e-46 0) (-5.98986e-47 3.66125e-46 0) (-3.42502e-47 -4.52397e-46 0) (6.95017e-47 -1.50188e-46 0) (-1.76324e-47 5.48538e-46 0) (-4.74713e-47 -4.10996e-46 0) (1.47093e-47 -1.18235e-46 0) (3.08908e-47 -1.59554e-46 0) (-1.63666e-34 9.00966e-35 0) (-1.78666e-35 8.84307e-36 0) (-1.86142e-36 8.21936e-37 0) (-1.79525e-37 7.44751e-38 0) (-1.66378e-38 6.39467e-39 0) (-1.45404e-39 5.31657e-40 0) (-1.22491e-40 4.22109e-41 0) (-9.84021e-42 3.24324e-42 0) (-7.63883e-43 2.36649e-43 0) (-5.67728e-44 1.64201e-44 0) (-4.06613e-45 1.01221e-45 0) (-2.75789e-46 5.0514e-47 0) (-2.11932e-47 -7.16212e-48 0) (-2.37307e-47 -5.37436e-47 0) (-9.46998e-47 -3.33959e-46 0) (-3.83119e-46 -1.41452e-45 0) (-3.13361e-47 -5.88116e-45 0) (1.02494e-45 -1.8848e-45 0) (6.44266e-46 8.94619e-45 0) (-5.16754e-46 7.42862e-45 0) (-5.80948e-46 1.42934e-45 0) (3.11336e-46 -1.09948e-45 0) (3.80593e-46 5.44949e-45 0) (-2.0115e-46 4.41107e-45 0) (-4.70468e-46 3.02958e-45 0) (-3.38098e-46 -2.29747e-45 0) (5.60248e-46 -1.92532e-45 0) (-3.45415e-46 5.46158e-45 0) (-5.07308e-46 -6.43291e-45 0) (4.68993e-46 -1.3943e-45 0) (2.11203e-46 -1.24755e-47 0) (4.67311e-46 1.55257e-45 0) (2.79089e-46 6.71366e-45 0) (-9.4278e-46 5.57692e-45 0) (-5.45568e-46 -6.96494e-45 0) (1.05803e-45 -2.42281e-45 0) (-2.75626e-46 7.89165e-45 0) (-7.04982e-46 -6.3965e-45 0) (2.64061e-46 -1.74932e-45 0) (4.30938e-46 -2.08815e-45 0) (-8.71162e-34 9.76904e-35 0) (-9.21187e-35 7.31332e-36 0) (-9.39235e-36 5.90009e-37 0) (-8.87691e-37 5.0195e-38 0) (-8.10411e-38 4.19582e-39 0) (-6.98376e-39 3.44759e-40 0) (-5.81867e-40 2.72169e-41 0) (-4.6269e-41 2.0415e-42 0) (-3.55989e-42 1.04057e-43 0) (-2.60273e-43 -7.05373e-46 0) (-1.81171e-44 -1.8849e-45 0) (-1.13459e-45 -3.8288e-46 0) (-1.14092e-46 -1.76165e-46 0) (-3.45719e-46 -7.83881e-46 0) (-1.43847e-45 -4.86679e-45 0) (-5.86356e-45 -2.07055e-44 0) (-4.97002e-46 -8.6675e-44 0) (1.56729e-44 -2.78868e-44 0) (9.8446e-45 1.31789e-43 0) (-7.94516e-45 1.09236e-43 0) (-9.01331e-45 2.04272e-44 0) (4.25387e-45 -1.82424e-44 0) (5.82483e-45 7.24047e-44 0) (-2.56231e-45 6.30243e-44 0) (-7.09197e-45 4.41029e-44 0) (-5.23686e-45 -3.43856e-44 0) (8.20473e-45 -2.98389e-44 0) (-4.76908e-45 7.4709e-44 0) (-7.25125e-45 -8.89109e-44 0) (6.7899e-45 -1.9058e-44 0) (3.11591e-45 1.82989e-46 0) (7.11007e-45 2.27669e-44 0) (4.25402e-45 9.8803e-44 0) (-1.44583e-44 8.19585e-44 0) (-8.45487e-45 -1.03323e-43 0) (1.5708e-44 -3.75705e-44 0) (-4.20043e-45 1.08801e-43 0) (-1.01964e-44 -9.59146e-44 0) (4.52617e-45 -2.49045e-44 0) (5.80035e-45 -2.54297e-44 0) (-7.34626e-34 5.75515e-35 0) (-7.72974e-35 -8.29426e-36 0) (-7.85617e-36 -1.2857e-36 0) (-7.4008e-37 -1.33905e-37 0) (-6.74045e-38 -1.19988e-38 0) (-5.79489e-39 -1.00986e-39 0) (-4.82052e-40 -7.98747e-41 0) (-3.8352e-41 -6.74405e-42 0) (-2.91296e-42 -1.16151e-42 0) (-1.68278e-43 -1.98596e-43 0) (-3.72641e-45 -3.96448e-44 0) (1.52289e-45 -6.25145e-45 0) (-4.43299e-46 -2.52417e-45 0) (-4.96123e-45 -1.10309e-44 0) (-2.10648e-44 -6.88893e-44 0) (-8.64973e-44 -2.94723e-43 0) (-7.59258e-45 -1.24411e-42 0) (2.30979e-43 -4.02185e-43 0) (1.4498e-43 1.8907e-42 0) (-1.17736e-43 1.56396e-42 0) (-1.34763e-43 2.83921e-43 0) (5.50291e-44 -2.89993e-43 0) (8.59256e-44 9.3231e-43 0) (-2.99913e-44 8.77461e-43 0) (-1.03003e-43 6.25625e-43 0) (-7.8167e-44 -5.00888e-43 0) (1.15398e-43 -4.48227e-43 0) (-6.25263e-44 9.95073e-43 0) (-9.92093e-44 -1.19693e-42 0) (9.4252e-44 -2.53103e-43 0) (4.42374e-44 7.47262e-45 0) (1.04278e-43 3.24482e-43 0) (6.25881e-44 1.41553e-42 0) (-2.13698e-43 1.1715e-42 0) (-1.26357e-43 -1.4932e-42 0) (2.24345e-43 -5.64447e-43 0) (-6.16879e-44 1.46156e-42 0) (-1.41458e-43 -1.39943e-42 0) (7.40706e-44 -3.44924e-43 0) (7.35147e-44 -2.9273e-43 0) (7.34603e-34 5.75767e-35 0) (7.7294e-35 -8.29086e-36 0) (7.85569e-36 -1.28532e-36 0) (7.40025e-37 -1.33877e-37 0) (6.74011e-38 -1.19871e-38 0) (5.79442e-39 -9.91887e-40 0) (4.79821e-40 -7.04947e-41 0) (3.67205e-41 -1.35986e-41 0) (3.33299e-42 -1.00999e-41 0) (9.20705e-43 -2.28795e-42 0) (1.84353e-43 -5.07552e-43 0) (3.79398e-44 -8.2061e-44 0) (-5.14513e-45 -3.36328e-44 0) (-7.02038e-44 -1.48256e-43 0) (-3.00063e-43 -9.32142e-43 0) (-1.24295e-42 -4.01497e-42 0) (-1.13723e-43 -1.70918e-41 0) (3.31502e-42 -5.5515e-42 0) (2.07923e-42 2.59604e-41 0) (-1.6991e-42 2.1431e-41 0) (-1.96025e-42 3.7701e-42 0) (6.87024e-43 -4.37887e-42 0) (1.23479e-42 1.12704e-41 0) (-3.25321e-43 1.16745e-41 0) (-1.45773e-42 8.49108e-42 0) (-1.13536e-42 -6.9836e-42 0) (1.58296e-42 -6.43653e-42 0) (-7.92867e-43 1.25477e-41 0) (-1.32112e-42 -1.52927e-41 0) (1.27458e-42 -3.19128e-42 0) (6.11101e-43 1.70306e-43 0) (1.48929e-42 4.42713e-42 0) (8.95969e-43 1.94162e-41 0) (-3.07578e-42 1.6054e-41 0) (-1.83531e-42 -2.0648e-41 0) (3.12594e-42 -8.10522e-42 0) (-8.82977e-43 1.86352e-41 0) (-1.91197e-42 -1.95396e-41 0) (1.16313e-42 -4.56149e-42 0) (8.93098e-43 -2.97336e-42 0) (8.70957e-34 9.79127e-35 0) (9.20891e-35 7.34244e-36 0) (9.38832e-36 5.93083e-37 0) (8.87252e-37 5.03248e-38 0) (8.10276e-38 4.33709e-39 0) (6.98087e-39 6.01273e-40 0) (5.53515e-40 1.6212e-40 0) (2.53677e-41 -9.70989e-41 0) (8.99872e-42 -1.28768e-40 0) (9.92935e-42 -2.98274e-41 0) (2.3183e-42 -6.63136e-42 0) (5.00387e-43 -1.06594e-42 0) (-7.01225e-44 -4.35193e-43 0) (-9.50764e-43 -1.93092e-42 0) (-4.09135e-42 -1.22434e-41 0) (-1.70974e-41 -5.31765e-41 0) (-1.63047e-42 -2.28851e-40 0) (4.5526e-41 -7.47782e-41 0) (2.8535e-41 3.47369e-40 0) (-2.34658e-41 2.86084e-40 0) (-2.72879e-41 4.86941e-41 0) (7.96324e-42 -6.36414e-41 0) (1.69875e-41 1.32044e-40 0) (-2.95214e-42 1.51557e-40 0) (-1.973e-41 1.12414e-40 0) (-1.57785e-41 -9.48201e-41 0) (2.06774e-41 -8.96428e-41 0) (-9.38429e-42 1.54508e-40 0) (-1.66663e-41 -1.90785e-40 0) (1.6371e-41 -3.91345e-41 0) (8.06365e-42 3.07554e-42 0) (2.03639e-41 5.8682e-41 0) (1.23072e-41 2.59387e-40 0) (-4.23609e-41 2.13969e-40 0) (-2.55334e-41 -2.78397e-40 0) (4.15729e-41 -1.12817e-40 0) (-1.209e-41 2.32203e-40 0) (-2.45642e-41 -2.65616e-40 0) (1.74035e-41 -5.86935e-41 0) (9.92484e-42 -2.69501e-41 0) (1.61983e-34 9.18528e-35 0) (1.76322e-35 9.06607e-36 0) (1.83042e-36 8.43589e-37 0) (1.76383e-37 7.41878e-38 0) (1.67672e-38 7.99092e-39 0) (1.44687e-39 3.76367e-39 0) (-2.53505e-40 1.74831e-39 0) (-2.68825e-40 -1.25692e-39 0) (7.4284e-41 -1.63255e-39 0) (1.29503e-40 -3.73892e-40 0) (3.0461e-41 -8.22944e-41 0) (6.56031e-42 -1.31052e-41 0) (-9.15655e-43 -5.31544e-42 0) (-1.25001e-41 -2.37591e-41 0) (-5.42456e-41 -1.52035e-40 0) (-2.29283e-40 -6.67136e-40 0) (-2.3112e-41 -2.90209e-39 0) (6.08751e-40 -9.53799e-40 0) (3.81325e-40 4.4018e-39 0) (-3.15607e-40 3.61695e-39 0) (-3.69364e-40 5.94125e-40 0) (8.90573e-41 -8.73223e-40 0) (2.27915e-40 1.41516e-39 0) (-2.08258e-41 1.85916e-39 0) (-2.60173e-40 1.40865e-39 0) (-2.13202e-40 -1.21956e-39 0) (2.64167e-40 -1.18241e-39 0) (-1.07234e-40 1.77029e-39 0) (-2.05147e-40 -2.22418e-39 0) (2.05333e-40 -4.48945e-40 0) (1.03577e-40 4.94831e-41 0) (2.71324e-40 7.37077e-40 0) (1.64631e-40 3.28354e-39 0) (-5.67928e-40 2.70808e-39 0) (-3.44679e-40 -3.5534e-39 0) (5.40487e-40 -1.48703e-39 0) (-1.61342e-40 2.70453e-39 0) (-3.08284e-40 -3.41982e-39 0) (2.5015e-40 -7.12577e-40 0) (1.03957e-40 -1.62749e-40 0) (1.65639e-35 2.64777e-35 0) (1.58736e-36 2.88329e-36 0) (1.30407e-37 2.5058e-37 0) (1.47799e-38 -8.172e-39 0) (7.08987e-39 1.91687e-38 0) (4.1588e-40 3.99481e-38 0) (-4.70399e-39 2.10891e-38 0) (-3.50558e-39 -1.5665e-38 0) (9.44573e-40 -2.02111e-38 0) (1.64251e-39 -4.56181e-39 0) (3.82155e-40 -9.91912e-40 0) (8.15348e-41 -1.5607e-40 0) (-1.12849e-41 -6.27897e-41 0) (-1.554e-40 -2.83245e-40 0) (-6.81448e-40 -1.83419e-39 0) (-2.91329e-39 -8.15077e-39 0) (-3.14792e-40 -3.59847e-38 0) (7.68415e-39 -1.19194e-38 0) (4.81267e-39 5.45331e-38 0) (-4.00972e-39 4.46804e-38 0) (-4.72134e-39 7.06668e-39 0) (9.00476e-40 -1.1586e-38 0) (2.90004e-39 1.47453e-38 0) (-2.68606e-42 2.23501e-38 0) (-3.23246e-39 1.72845e-38 0) (-2.71536e-39 -1.53221e-38 0) (3.17373e-39 -1.51664e-38 0) (-1.10494e-39 1.99792e-38 0) (-2.35233e-39 -2.55062e-38 0) (2.40948e-39 -5.03146e-39 0) (1.25656e-39 7.17684e-40 0) (3.42608e-39 9.00597e-39 0) (2.09913e-39 4.05993e-38 0) (-7.18395e-39 3.34033e-38 0) (-4.39043e-39 -4.43817e-38 0) (6.62348e-39 -1.90445e-38 0) (-2.02938e-39 3.10456e-38 0) (-3.62761e-39 -4.29994e-38 0) (3.38523e-39 -8.43669e-39 0) (9.13983e-40 -7.94217e-41 0) (-7.72752e-35 5.47586e-35 0) (-9.61529e-36 6.48203e-36 0) (-1.19716e-36 2.324e-37 0) (-6.75486e-38 -3.49295e-37 0) (6.63511e-38 1.9836e-37 0) (3.47125e-39 4.58572e-37 0) (-5.76777e-38 2.42602e-37 0) (-4.26004e-38 -1.81277e-37 0) (1.20062e-38 -2.32922e-37 0) (2.03891e-38 -5.18288e-38 0) (4.67045e-39 -1.10983e-38 0) (9.84732e-40 -1.72323e-39 0) (-1.34791e-40 -6.86463e-40 0) (-1.87742e-39 -3.13132e-39 0) (-8.34044e-39 -2.05433e-38 0) (-3.62326e-38 -9.27678e-38 0) (-4.45006e-39 -4.15391e-37 0) (9.38482e-38 -1.38602e-37 0) (5.88443e-38 6.2888e-37 0) (-4.93805e-38 5.13886e-37 0) (-5.82687e-38 7.79597e-38 0) (9.33017e-39 -1.43166e-37 0) (3.62256e-38 1.3289e-37 0) (2.93826e-39 2.49265e-37 0) (-3.87653e-38 1.9724e-37 0) (-3.32295e-38 -1.79294e-37 0) (3.76582e-38 -1.8137e-37 0) (-1.09495e-38 2.03442e-37 0) (-2.65169e-38 -2.66083e-37 0) (2.78001e-38 -5.14509e-38 0) (1.48818e-38 9.59326e-39 0) (4.23092e-38 1.02572e-37 0) (2.63326e-38 4.6773e-37 0) (-8.7757e-38 3.85232e-37 0) (-5.34578e-38 -5.15661e-37 0) (7.97003e-38 -2.27384e-37 0) (-2.46632e-38 3.24472e-37 0) (-4.20984e-38 -5.03462e-37 0) (4.34161e-38 -9.24005e-38 0) (6.77483e-39 2.53545e-38 0) (-4.76281e-34 2.97624e-36 0) (-5.64414e-35 1.65909e-36 0) (-7.04748e-36 -4.83176e-36 0) (-5.53431e-38 -4.73235e-36 0) (8.16771e-37 2.19043e-36 0) (4.70703e-38 5.20609e-36 0) (-6.36498e-37 2.75147e-36 0) (-4.61379e-37 -2.07155e-36 0) (1.46141e-37 -2.64608e-36 0) (2.36175e-37 -5.7653e-37 0) (5.32082e-38 -1.21136e-37 0) (1.10466e-38 -1.8477e-38 0) (-1.49374e-39 -7.27087e-39 0) (-2.10674e-38 -3.36267e-38 0) (-9.5197e-38 -2.24528e-37 0) (-4.20528e-37 -1.03413e-36 0) (-6.54014e-38 -4.73046e-36 0) (1.03042e-36 -1.59534e-36 0) (6.49914e-37 7.15325e-36 0) (-5.50118e-37 5.8233e-36 0) (-6.46832e-37 8.44168e-37 0) (1.0195e-37 -1.72522e-36 0) (4.26033e-37 1.17648e-36 0) (7.81962e-38 2.75431e-36 0) (-4.11403e-37 2.22586e-36 0) (-3.58571e-37 -2.06704e-36 0) (4.14625e-37 -2.12493e-36 0) (-8.87587e-38 2.08794e-36 0) (-2.70093e-37 -2.78265e-36 0) (2.9224e-37 -5.20511e-37 0) (1.63452e-37 1.18888e-37 0) (4.87724e-37 1.14225e-36 0) (3.17427e-37 5.30659e-36 0) (-9.57702e-37 4.35955e-36 0) (-5.70865e-37 -5.91865e-36 0) (8.81424e-37 -2.65621e-36 0) (-2.65672e-37 3.41394e-36 0) (-4.5065e-37 -5.80678e-36 0) (4.90181e-37 -9.94007e-37 0) (1.18985e-38 5.27601e-37 0) (-7.97618e-35 -2.51403e-35 0) (-1.64233e-35 1.07188e-35 0) (-6.7798e-36 -5.02864e-35 0) (6.18204e-36 -4.8707e-35 0) (9.15617e-36 2.25203e-35 0) (5.9665e-37 5.34236e-35 0) (-6.31335e-36 2.81727e-35 0) (-4.28886e-36 -2.13605e-35 0) (1.87873e-36 -2.71371e-35 0) (2.71136e-36 -5.79555e-36 0) (5.94706e-37 -1.18741e-36 0) (1.21002e-37 -1.77514e-37 0) (-1.60895e-38 -6.87704e-38 0) (-2.30879e-37 -3.23668e-37 0) (-1.06657e-36 -2.20416e-36 0) (-4.84297e-36 -1.04247e-35 0) (-1.14824e-36 -4.86218e-35 0) (1.00228e-35 -1.65532e-35 0) (6.46307e-36 7.3422e-35 0) (-5.54615e-36 5.95787e-35 0) (-6.34279e-36 8.20485e-36 0) (1.8112e-36 -1.88407e-35 0) (5.08012e-36 7.60619e-36 0) (1.4504e-36 2.73176e-35 0) (-3.66994e-36 2.26322e-35 0) (-3.17773e-36 -2.1526e-35 0) (4.69184e-36 -2.25481e-35 0) (-6.53709e-37 1.81869e-35 0) (-2.7532e-36 -2.51426e-35 0) (3.06983e-36 -4.58762e-36 0) (1.76707e-36 1.34283e-36 0) (5.56867e-36 1.15134e-35 0) (3.99643e-36 5.44206e-35 0) (-9.05652e-36 4.4856e-35 0) (-4.79787e-36 -6.12311e-35 0) (9.55564e-36 -2.81054e-35 0) (-2.42259e-36 3.11179e-35 0) (-4.94882e-36 -6.04768e-35 0) (4.40857e-36 -9.54024e-36 0) (-6.5373e-37 8.67735e-36 0) (6.86472e-36 2.59981e-34 0) (-4.02057e-35 1.74358e-34 0) (-3.5157e-35 -5.13543e-34 0) (4.22394e-35 -5.03529e-34 0) (6.729e-35 2.33532e-34 0) (6.06881e-36 5.51466e-34 0) (-3.73868e-35 2.89944e-34 0) (-1.58556e-35 -2.22244e-34 0) (2.5008e-35 -2.79888e-34 0) (2.84843e-35 -5.78189e-35 0) (6.03872e-36 -1.14895e-35 0) (1.19283e-36 -1.67066e-36 0) (-1.55541e-37 -6.35081e-37 0) (-2.27719e-36 -3.05306e-36 0) (-1.08671e-35 -2.13705e-35 0) (-5.10748e-35 -1.04342e-34 0) (-2.25434e-35 -5.03312e-34 0) (5.22548e-35 -1.74049e-34 0) (3.88224e-35 7.58826e-34 0) (-3.47957e-35 6.12425e-34 0) (-3.37836e-35 7.95542e-35 0) (4.27352e-35 -2.04278e-34 0) (5.84917e-35 4.90737e-35 0) (2.58086e-35 2.75175e-34 0) (-8.75812e-36 2.32776e-34 0) (-5.09828e-36 -2.25367e-34 0) (5.0314e-35 -2.38591e-34 0) (-1.39102e-36 1.70014e-34 0) (-2.36752e-35 -2.39076e-34 0) (2.77975e-35 -4.13227e-35 0) (1.71586e-35 1.42528e-35 0) (5.82055e-35 1.14923e-34 0) (5.22964e-35 5.60376e-34 0) (-3.77101e-35 4.60743e-34 0) (1.57221e-36 -6.39625e-34 0) (8.6764e-35 -2.95807e-34 0) (-6.52497e-36 3.01158e-34 0) (-5.09325e-35 -6.33295e-34 0) (4.70273e-36 -9.16029e-35 0) (-2.12473e-35 1.11918e-34 0) (3.4388e-34 2.35061e-33 0) (2.61103e-34 1.55085e-33 0) (1.81965e-34 -4.47877e-33 0) (-1.07938e-34 -4.39824e-33 0) (5.07345e-35 2.04144e-33 0) (6.16633e-35 4.80663e-33 0) (2.70821e-34 2.51898e-33 0) (5.08201e-34 -1.95002e-33 0) (3.86653e-34 -2.43731e-33 0) (3.07757e-34 -4.88634e-34 0) (6.13833e-35 -9.295e-35 0) (1.16444e-35 -1.30847e-35 0) (-1.47576e-36 -4.84628e-36 0) (-2.2249e-35 -2.39813e-35 0) (-1.10959e-34 -1.73282e-34 0) (-5.55511e-34 -8.858e-34 0) (-4.75486e-34 -4.39669e-33 0) (-6.75922e-34 -1.5398e-33 0) (-2.57161e-34 6.61568e-33 0) (1.81334e-34 5.31718e-33 0) (4.12058e-34 6.45854e-34 0) (1.0915e-33 -1.88438e-33 0) (7.45574e-34 3.69066e-36 0) (4.42271e-34 2.31903e-33 0) (5.87594e-34 2.01445e-33 0) (6.12599e-34 -1.99337e-33 0) (6.22385e-34 -2.14355e-33 0) (3.44266e-35 1.17274e-33 0) (-2.10455e-34 -1.7525e-33 0) (2.59707e-34 -2.94325e-34 0) (1.67152e-34 1.30875e-34 0) (6.25005e-34 9.74318e-34 0) (7.89552e-34 4.88293e-33 0) (9.36117e-34 4.04836e-33 0) (1.25447e-33 -5.62343e-33 0) (6.75056e-34 -2.64482e-33 0) (3.78178e-34 2.26842e-33 0) (-6.09616e-34 -5.59882e-33 0) (-1.00327e-33 -7.26619e-34 0) (-4.39377e-34 1.30153e-33 0) (5.61635e-33 2.15223e-32 0) (1.68713e-32 1.45733e-32 0) (1.3831e-32 -4.09927e-32 0) (-1.31882e-32 -4.03295e-32 0) (-1.38919e-32 1.87797e-32 0) (5.41344e-34 4.38614e-32 0) (1.69516e-32 2.28855e-32 0) (1.92847e-32 -1.80302e-32 0) (5.98523e-33 -2.22132e-32 0) (2.94699e-33 -4.19326e-33 0) (5.39208e-34 -7.61147e-34 0) (9.57712e-35 -1.02573e-34 0) (-1.17086e-35 -3.69396e-35 0) (-1.83177e-34 -1.8858e-34 0) (-9.81388e-34 -1.42319e-33 0) (-5.36576e-33 -7.63671e-33 0) (-9.1058e-33 -4.03177e-32 0) (-3.29999e-32 -1.44846e-32 0) (-1.68431e-32 6.05512e-32 0) (1.38016e-32 4.82127e-32 0) (2.04017e-32 5.39092e-33 0) (2.40418e-32 -1.78572e-32 0) (9.38661e-33 -1.07181e-33 0) (7.31168e-33 2.08775e-32 0) (2.00872e-32 1.84579e-32 0) (2.01243e-32 -1.84696e-32 0) (7.57202e-33 -1.98892e-32 0) (1.15455e-33 1.05503e-32 0) (-1.24176e-33 -1.54911e-32 0) (1.78046e-33 -2.3305e-33 0) (1.3655e-33 1.14185e-33 0) (5.95185e-33 8.35681e-33 0) (1.20923e-32 4.44136e-32 0) (3.76079e-32 3.68033e-32 0) (3.84246e-32 -5.21959e-32 0) (3.47009e-34 -2.42922e-32 0) (1.34963e-32 2.08613e-32 0) (-7.18216e-33 -5.19184e-32 0) (-3.26613e-32 -6.02559e-33 0) (-8.13526e-33 1.2934e-32 0) (8.51364e-32 1.35009e-31 0) (3.70484e-31 9.30536e-32 0) (3.11889e-31 -2.56716e-31 0) (-3.06172e-31 -2.53037e-31 0) (-3.40272e-31 1.18005e-31 0) (4.87359e-33 2.74262e-31 0) (3.71174e-31 1.4244e-31 0) (3.95652e-31 -1.1387e-31 0) (8.85577e-32 -1.38713e-31 0) (2.99678e-32 -2.48957e-32 0) (4.85731e-33 -4.19431e-33 0) (8.00656e-34 -5.36396e-34 0) (-9.31793e-35 -1.84929e-34 0) (-1.53376e-33 -9.90523e-34 0) (-8.90426e-33 -7.86911e-33 0) (-5.51661e-32 -4.5654e-32 0) (-1.47842e-31 -2.52979e-31 0) (-7.06587e-31 -9.2579e-32 0) (-3.70292e-31 3.78989e-31 0) (3.11494e-31 2.99848e-31 0) (4.32484e-31 3.05119e-32 0) (4.38544e-31 -1.17202e-31 0) (1.22668e-31 -3.15094e-32 0) (1.07171e-31 1.27045e-31 0) (4.0366e-31 1.15141e-31 0) (4.0259e-31 -1.17239e-31 0) (1.00355e-31 -1.27419e-31 0) (1.7185e-32 4.77986e-32 0) (-7.83644e-33 -7.68227e-32 0) (1.33928e-32 -1.1344e-32 0) (1.15035e-32 7.13028e-33 0) (6.01591e-32 4.98329e-32 0) (1.77245e-31 2.78095e-31 0) (7.79201e-31 2.36537e-31 0) (7.62018e-31 -3.29515e-31 0) (-9.05307e-32 -1.54343e-31 0) (2.81425e-31 1.11507e-31 0) (-9.46999e-32 -3.29242e-31 0) (-6.65465e-31 -3.30915e-32 0) (-1.25112e-31 1.01865e-31 0) (9.70623e-31 9.64708e-31 0) (5.73819e-30 7.05847e-31 0) (4.96759e-30 -1.84513e-30 0) (-4.93141e-30 -1.82348e-30 0) (-5.5137e-30 8.58606e-31 0) (3.14031e-32 1.95426e-30 0) (5.74236e-30 1.00845e-30 0) (5.93074e-30 -8.34424e-31 0) (9.94104e-31 -9.86536e-31 0) (2.2337e-31 -1.52392e-31 0) (3.13211e-32 -2.44982e-32 0) (4.58415e-33 -2.95557e-33 0) (-5.01095e-34 -9.94028e-34 0) (-8.79728e-33 -5.47223e-33 0) (-5.80082e-32 -4.61291e-32 0) (-4.15895e-31 -2.80593e-31 0) (-1.76886e-30 -1.82316e-30 0) (-1.0893e-29 -7.03291e-31 0) (-5.73753e-30 2.7286e-30 0) (4.96368e-30 2.11028e-30 0) (6.51891e-30 1.84045e-31 0) (6.16547e-30 -8.51308e-31 0) (1.24465e-30 -5.84047e-32 0) (1.21494e-30 9.2092e-31 0) (5.99193e-30 8.40632e-31 0) (5.9675e-30 -8.5505e-31 0) (1.00894e-30 -9.09743e-31 0) (2.12774e-31 5.57852e-31 0) (2.11862e-32 -7.34394e-31 0) (2.37831e-32 -7.71052e-32 0) (6.47182e-32 4.24151e-32 0) (4.4654e-31 3.04131e-31 0) (1.98773e-30 1.97285e-30 0) (1.17529e-29 1.69618e-30 0) (1.12979e-29 -2.43023e-30 0) (-2.40513e-30 -1.0763e-30 0) (4.41158e-30 1.08831e-30 0) (-9.4734e-31 -2.41389e-30 0) (-1.01241e-29 -2.12805e-31 0) (-1.49339e-30 6.22223e-31 0) (7.03746e-30 -3.05662e-40 0) (5.90701e-29 -6.45807e-41 0) (5.34211e-29 6.75691e-41 0) (-5.32017e-29 7.05935e-41 0) (-5.75397e-29 -3.34615e-41 0) (1.91332e-31 -7.65153e-41 0) (5.90947e-29 -3.95986e-41 0) (6.04061e-29 3.23918e-41 0) (7.17394e-30 3.86731e-41 0) (1.52418e-30 6.2925e-42 0) (1.90889e-31 1.01857e-42 0) (2.6953e-32 -3.19203e-43 0) (-2.79959e-33 -5.56785e-42 0) (-5.18136e-32 -6.63958e-41 0) (-3.54551e-31 -7.51993e-40 0) (-2.86013e-30 -7.45651e-39 0) (-1.28475e-29 -5.7432e-38 0) (-1.13796e-28 3.19749e-38 0) (-5.90666e-29 1.31004e-35 0) (5.33959e-29 3.61811e-34 0) (6.47669e-29 6.47579e-33 0) (6.19189e-29 8.64506e-32 0) (8.86451e-30 7.96999e-31 0) (8.76127e-30 8.64638e-32 0) (6.07895e-29 6.8245e-33 0) (6.06212e-29 6.47579e-33 0) (7.19495e-30 7.9988e-32 0) (1.53981e-30 7.10548e-31 0) (2.09052e-31 -7.10548e-31 0) (7.32003e-32 -7.99615e-32 0) (3.82189e-31 -5.74314e-33 0) (3.03443e-30 6.2898e-33 0) (1.42719e-29 8.86225e-32 0) (1.19988e-28 8.17383e-31 0) (1.16646e-28 9.50982e-32 0) (-3.48569e-29 9.30758e-32 0) (4.92478e-29 7.97018e-31 0) (-6.7998e-30 8.03307e-32 0) (-1.08082e-28 -7.37331e-32 0) (-1.13595e-29 -7.10837e-31 0) (9.70623e-31 -9.64708e-31 0) (5.73819e-30 -7.05847e-31 0) (4.96759e-30 1.84513e-30 0) (-4.93141e-30 1.82348e-30 0) (-5.5137e-30 -8.58606e-31 0) (3.14031e-32 -1.95426e-30 0) (5.74236e-30 -1.00845e-30 0) (5.93074e-30 8.34424e-31 0) (9.94104e-31 9.86536e-31 0) (2.2337e-31 1.52392e-31 0) (3.13211e-32 2.44982e-32 0) (4.58415e-33 2.95557e-33 0) (-5.01095e-34 9.94028e-34 0) (-8.79728e-33 5.47223e-33 0) (-5.80082e-32 4.61291e-32 0) (-4.15895e-31 2.80593e-31 0) (-1.76886e-30 1.82316e-30 0) (-1.0893e-29 7.03292e-31 0) (-5.73761e-30 -2.72858e-30 0) (4.96305e-30 -2.10982e-30 0) (6.51517e-30 -1.76273e-31 0) (6.14118e-30 9.50922e-31 0) (1.24465e-30 9.41317e-31 0) (1.23916e-30 -8.21286e-31 0) (5.99512e-30 -8.32422e-31 0) (5.96502e-30 8.62822e-31 0) (9.88475e-31 1.00161e-30 0) (2.37069e-31 2.25447e-31 0) (4.54648e-32 -4.89038e-32 0) (3.1623e-33 -1.47169e-32 0) (6.09589e-32 -4.92574e-32 0) (4.42139e-31 -2.96603e-31 0) (1.9627e-30 -1.87073e-30 0) (1.17522e-29 -7.90633e-31 0) (1.13191e-29 2.54011e-30 0) (-2.42552e-30 1.18386e-30 0) (4.41277e-30 -2.05372e-31 0) (-9.20099e-31 2.5062e-30 0) (-1.01002e-29 1.28588e-31 0) (-1.53173e-30 -1.40548e-30 0) (8.51364e-32 -1.35009e-31 0) (3.70484e-31 -9.30536e-32 0) (3.11889e-31 2.56716e-31 0) (-3.06172e-31 2.53037e-31 0) (-3.40272e-31 -1.18005e-31 0) (4.87359e-33 -2.74262e-31 0) (3.71174e-31 -1.4244e-31 0) (3.95652e-31 1.1387e-31 0) (8.85577e-32 1.38713e-31 0) (2.99678e-32 2.48957e-32 0) (4.85731e-33 4.19431e-33 0) (8.00656e-34 5.36396e-34 0) (-9.31793e-35 1.84929e-34 0) (-1.53376e-33 9.90523e-34 0) (-8.90426e-33 7.86911e-33 0) (-5.51662e-32 4.5654e-32 0) (-1.47843e-31 2.52979e-31 0) (-7.06592e-31 9.25799e-32 0) (-3.7034e-31 -3.78977e-31 0) (3.11096e-31 -2.99707e-31 0) (4.30145e-31 -2.8805e-32 0) (4.23809e-31 1.33207e-31 0) (1.22662e-31 1.3502e-31 0) (1.21863e-31 -1.1103e-31 0) (4.05649e-31 -1.13305e-31 0) (4.01047e-31 1.18946e-31 0) (8.80076e-32 1.41729e-31 0) (3.19247e-32 3.97069e-32 0) (6.89268e-33 -1.06806e-32 0) (9.48755e-34 -2.94189e-33 0) (9.15356e-33 -8.55139e-33 0) (5.74047e-32 -4.82115e-32 0) (1.62051e-31 -2.61687e-31 0) (7.78798e-31 -1.30287e-31 0) (7.74787e-31 3.47628e-31 0) (-1.02827e-31 1.72087e-31 0) (2.82171e-31 -7.97921e-33 0) (-7.8122e-32 3.43711e-31 0) (-6.51016e-31 2.07101e-32 0) (-1.48208e-31 -1.88667e-31 0) (5.61652e-33 -2.15225e-32 0) (1.68714e-32 -1.45733e-32 0) (1.3831e-32 4.09927e-32 0) (-1.31882e-32 4.03295e-32 0) (-1.38919e-32 -1.87797e-32 0) (5.41344e-34 -4.38614e-32 0) (1.69516e-32 -2.28855e-32 0) (1.92847e-32 1.80302e-32 0) (5.98523e-33 2.22132e-32 0) (2.94699e-33 4.19326e-33 0) (5.39208e-34 7.61147e-34 0) (9.57712e-35 1.02573e-34 0) (-1.17086e-35 3.69396e-35 0) (-1.83177e-34 1.8858e-34 0) (-9.81389e-34 1.42319e-33 0) (-5.36578e-33 7.63672e-33 0) (-9.10591e-33 4.03177e-32 0) (-3.3001e-32 1.44852e-32 0) (-1.68518e-32 -6.05454e-32 0) (1.37333e-32 -4.81613e-32 0) (2.00219e-32 -4.91869e-33 0) (2.1956e-32 2.10668e-32 0) (9.38564e-33 2.0699e-32 0) (9.38983e-33 -1.76627e-32 0) (2.04073e-32 -1.794e-32 0) (1.98811e-32 1.89418e-32 0) (5.87473e-33 2.26324e-32 0) (3.24125e-33 5.86738e-33 0) (8.42971e-34 -9.25296e-34 0) (6.56349e-35 -4.00981e-34 0) (9.83878e-34 -1.50984e-33 0) (5.50178e-33 -7.91782e-33 0) (9.93795e-33 -4.11227e-32 0) (3.75387e-32 -1.66327e-32 0) (4.01838e-32 5.59579e-32 0) (-1.34223e-33 2.79809e-32 0) (1.36237e-32 -1.22564e-33 0) (-4.80057e-33 5.47251e-32 0) (-3.06231e-32 3.90223e-33 0) (-1.12927e-32 -2.89193e-32 0) (3.45271e-34 -2.35205e-33 0) (2.61295e-34 -1.55103e-33 0) (1.8199e-34 4.47875e-33 0) (-1.07936e-34 4.39824e-33 0) (5.07348e-35 -2.04144e-33 0) (6.16633e-35 -4.80663e-33 0) (2.70821e-34 -2.51898e-33 0) (5.08201e-34 1.95002e-33 0) (3.86653e-34 2.43731e-33 0) (3.07757e-34 4.88634e-34 0) (6.13833e-35 9.295e-35 0) (1.16444e-35 1.30847e-35 0) (-1.47576e-36 4.84628e-36 0) (-2.2249e-35 2.39814e-35 0) (-1.10959e-34 1.73282e-34 0) (-5.55513e-34 8.85801e-34 0) (-4.75508e-34 4.3967e-33 0) (-6.76117e-34 1.53991e-33 0) (-2.58649e-34 -6.61463e-33 0) (1.70118e-34 -5.30857e-33 0) (3.53867e-34 -5.75085e-34 0) (7.85828e-34 2.3052e-33 0) (7.45401e-34 2.30797e-33 0) (7.46627e-34 -1.89728e-33 0) (6.36055e-34 -1.93612e-33 0) (5.76842e-34 2.06414e-33 0) (3.7641e-34 2.49464e-33 0) (3.40248e-34 7.18137e-34 0) (9.50159e-35 -1.38133e-34 0) (1.07209e-35 -5.46345e-35 0) (1.0866e-34 -1.84186e-34 0) (5.55432e-34 -9.09227e-34 0) (4.73446e-34 -4.45144e-33 0) (9.24746e-34 -1.67023e-33 0) (1.50976e-33 6.12546e-33 0) (4.30271e-34 3.13726e-33 0) (3.98952e-34 4.47833e-35 0) (-2.59847e-34 5.96078e-33 0) (-7.06693e-34 4.71214e-34 0) (-9.01466e-34 -3.12084e-33 0) (1.85769e-35 -2.66752e-34 0) (-3.86782e-35 -1.75157e-34 0) (-3.49656e-35 5.13459e-34 0) (4.22605e-35 5.0352e-34 0) (6.72923e-35 -2.33533e-34 0) (6.06902e-36 -5.51466e-34 0) (-3.73868e-35 -2.89944e-34 0) (-1.58556e-35 2.22244e-34 0) (2.5008e-35 2.79888e-34 0) (2.84843e-35 5.78189e-35 0) (6.03872e-36 1.14895e-35 0) (1.19283e-36 1.67066e-36 0) (-1.55542e-37 6.35081e-37 0) (-2.27719e-36 3.05306e-36 0) (-1.08671e-35 2.13706e-35 0) (-5.10752e-35 1.04342e-34 0) (-2.25463e-35 5.03315e-34 0) (5.22293e-35 1.74069e-34 0) (3.86339e-35 -7.5864e-34 0) (-3.61596e-35 -6.1099e-34 0) (-4.05214e-35 -6.85678e-35 0) (9.23743e-36 2.62977e-34 0) (5.84691e-35 2.61649e-34 0) (5.91408e-35 -2.16313e-34 0) (-3.19597e-36 -2.20541e-34 0) (-9.10805e-36 2.36353e-34 0) (2.37445e-35 2.86487e-34 0) (3.21266e-35 8.20161e-35 0) (9.79668e-36 -1.29083e-35 0) (8.4661e-37 -6.19703e-36 0) (1.03839e-35 -2.23306e-35 0) (5.00978e-35 -1.0489e-34 0) (1.76085e-35 -5.00185e-34 0) (-3.90941e-35 -1.40818e-34 0) (2.91902e-35 7.10764e-34 0) (6.0328e-35 3.65608e-34 0) (-4.01191e-36 9.84098e-36 0) (-1.24215e-35 6.83062e-34 0) (3.70285e-35 5.91355e-35 0) (-7.14644e-35 -3.51555e-34 0) (-1.85649e-35 -1.29388e-35 0) (-9.05991e-36 -1.51237e-35 0) (-5.91848e-36 4.98335e-35 0) (6.27301e-36 4.86615e-35 0) (9.16545e-36 -2.25245e-35 0) (5.9753e-37 -5.3424e-35 0) (-6.31327e-36 -2.81727e-35 0) (-4.28885e-36 2.13605e-35 0) (1.87873e-36 2.71371e-35 0) (2.71136e-36 5.79555e-36 0) (5.94706e-37 1.18741e-36 0) (1.21002e-37 1.77514e-37 0) (-1.60895e-38 6.87705e-38 0) (-2.3088e-37 3.23668e-37 0) (-1.06658e-36 2.20416e-36 0) (-4.84302e-36 1.04247e-35 0) (-1.14861e-36 4.86221e-35 0) (1.00196e-35 1.6556e-35 0) (6.43996e-36 -7.33978e-35 0) (-5.70845e-36 -5.93982e-35 0) (-7.11024e-36 -6.88848e-36 0) (-1.90486e-36 2.54566e-35 0) (5.07729e-36 2.5679e-35 0) (5.14624e-36 -2.06805e-35 0) (-3.04171e-36 -2.11596e-35 0) (-3.62055e-36 2.28424e-35 0) (1.76659e-36 2.78717e-35 0) (3.06485e-36 8.48324e-36 0) (9.59615e-37 -1.52141e-36 0) (9.78248e-38 -6.86754e-37 0) (9.9521e-37 -2.29338e-36 0) (4.63958e-36 -1.03175e-35 0) (1.4438e-37 -4.76361e-35 0) (-9.22135e-36 -1.05593e-35 0) (-1.75385e-36 6.93267e-35 0) (6.64509e-36 3.605e-35 0) (-2.12499e-36 2.20343e-36 0) (-6.73504e-37 6.60392e-35 0) (7.97427e-36 6.09234e-36 0) (-6.23336e-36 -3.38163e-35 0) (-1.1455e-34 6.91121e-35 0) (-1.48039e-35 6.79926e-36 0) (-2.25167e-36 5.71314e-36 0) (4.3842e-37 4.82177e-36 0) (8.66496e-37 -2.18204e-36 0) (5.17042e-38 -5.20532e-36 0) (-6.36078e-37 -2.7514e-36 0) (-4.61344e-37 2.07156e-36 0) (1.46144e-37 2.64609e-36 0) (2.36175e-37 5.7653e-37 0) (5.32082e-38 1.21136e-37 0) (1.10466e-38 1.8477e-38 0) (-1.49375e-39 7.27088e-39 0) (-2.10674e-38 3.36268e-38 0) (-9.51975e-38 2.24528e-37 0) (-4.20533e-37 1.03414e-36 0) (-6.54423e-38 4.73049e-36 0) (1.03007e-36 1.59569e-36 0) (6.47479e-37 -7.1502e-36 0) (-5.66786e-37 -5.8012e-36 0) (-7.23191e-37 -6.88078e-37 0) (-2.56711e-37 2.473e-36 0) (4.25729e-37 2.49336e-36 0) (4.34731e-37 -2.00386e-36 0) (-3.4928e-37 -2.05072e-36 0) (-4.01593e-37 2.22313e-36 0) (1.34786e-37 2.71965e-36 0) (2.70169e-37 8.34233e-37 0) (8.82184e-38 -1.38732e-37 0) (7.47405e-39 -6.80047e-38 0) (8.66381e-38 -2.30172e-37 0) (3.94874e-37 -1.00094e-36 0) (-5.4728e-38 -4.53972e-36 0) (-9.7464e-37 -5.7608e-37 0) (-2.79335e-37 6.84093e-36 0) (6.03006e-37 3.5614e-36 0) (-2.35231e-37 2.605e-37 0) (-3.71535e-38 6.43129e-36 0) (8.32848e-37 6.25581e-37 0) (-5.25365e-37 -3.26139e-36 0) (-6.66913e-34 -1.30916e-35 0) (-7.82948e-35 -1.44241e-36 0) (-9.17967e-36 3.01344e-37 0) (-8.96463e-37 4.04248e-37 0) (-1.77011e-38 -1.9315e-37 0) (-4.41192e-39 -4.58093e-37 0) (-5.83947e-38 -2.42561e-37 0) (-4.26619e-38 1.81281e-37 0) (1.20011e-38 2.32922e-37 0) (2.03887e-38 5.18288e-38 0) (4.67042e-39 1.10983e-38 0) (9.8473e-40 1.72323e-39 0) (-1.34792e-40 6.86463e-40 0) (-1.87743e-39 3.13133e-39 0) (-8.34049e-39 2.05433e-38 0) (-3.62331e-38 9.27683e-38 0) (-4.45435e-39 4.15395e-37 0) (9.38124e-38 1.38641e-37 0) (5.85963e-38 -6.28551e-37 0) (-5.10462e-38 -5.11555e-37 0) (-6.57046e-38 -6.1927e-38 0) (-2.49671e-38 2.17519e-37 0) (3.61941e-38 2.21491e-37 0) (3.70195e-38 -1.74626e-37 0) (-3.27475e-38 -1.79205e-37 0) (-3.73337e-38 1.95327e-37 0) (1.10477e-38 2.40016e-37 0) (2.33754e-38 7.65993e-38 0) (7.74415e-39 -1.38704e-38 0) (6.87894e-40 -6.52724e-39 0) (7.40024e-39 -2.08996e-38 0) (3.32334e-38 -8.81001e-38 0) (-9.28223e-39 -3.91475e-37 0) (-8.94506e-38 -1.96898e-38 0) (-2.57125e-38 6.07873e-37 0) (5.32247e-38 3.17894e-37 0) (-2.16313e-38 3.04077e-38 0) (-2.53505e-39 5.65288e-37 0) (7.60582e-38 5.72083e-38 0) (-4.46547e-38 -2.85779e-37 0) (5.42696e-36 -1.41936e-34 0) (-1.17476e-36 -1.52744e-35 0) (-3.58533e-37 -1.4735e-36 0) (-4.89489e-38 -1.10195e-37 0) (-5.58425e-40 -2.98896e-38 0) (-3.91219e-40 -4.08921e-38 0) (-4.78465e-39 -2.1168e-38 0) (-3.51303e-39 1.56587e-38 0) (9.43916e-40 2.02106e-38 0) (1.64246e-39 4.56177e-39 0) (3.82151e-40 9.91909e-40 0) (8.15344e-41 1.5607e-40 0) (-1.1285e-41 6.27897e-41 0) (-1.554e-40 2.83245e-40 0) (-6.81452e-40 1.8342e-39 0) (-2.91334e-39 8.15082e-39 0) (-3.15199e-40 3.59852e-38 0) (7.6808e-39 1.19235e-38 0) (4.78972e-39 -5.4499e-38 0) (-4.16134e-39 -4.44427e-38 0) (-5.38504e-39 -5.46242e-39 0) (-2.10106e-39 1.88361e-38 0) (2.89709e-39 1.92096e-38 0) (2.9789e-39 -1.50703e-38 0) (-2.69746e-39 -1.54766e-38 0) (-3.0758e-39 1.69263e-38 0) (8.5912e-40 2.08461e-38 0) (1.89917e-39 6.72692e-39 0) (6.45812e-40 -1.19073e-39 0) (4.84366e-41 -5.78977e-40 0) (5.88688e-40 -1.83997e-39 0) (2.61373e-39 -7.56096e-39 0) (-1.01995e-39 -3.31634e-38 0) (-7.33818e-39 1.63464e-39 0) (-1.97512e-39 5.34139e-38 0) (4.32064e-39 2.79105e-38 0) (-1.7542e-39 2.96138e-39 0) (-1.60807e-40 4.90072e-38 0) (6.23339e-39 5.12703e-39 0) (-3.58256e-39 -2.46312e-38 0) (6.35664e-34 -1.89066e-35 0) (6.6148e-35 -3.61984e-38 0) (6.64041e-36 6.02219e-38 0) (6.18934e-37 8.94544e-39 0) (5.61731e-38 -8.89353e-40 0) (4.7617e-39 -3.18201e-39 0) (1.63456e-41 -1.70292e-39 0) (-2.47851e-40 1.26034e-39 0) (7.58634e-41 1.6328e-39 0) (1.29617e-40 3.7391e-40 0) (3.0469e-41 8.22956e-41 0) (6.56086e-42 1.31053e-41 0) (-9.15624e-43 5.31544e-42 0) (-1.25002e-41 2.37592e-41 0) (-5.4246e-41 1.52035e-40 0) (-2.29288e-40 6.6714e-40 0) (-2.31491e-41 2.90214e-39 0) (6.08448e-40 9.54188e-40 0) (3.79275e-40 -4.39859e-39 0) (-3.28982e-40 -3.59492e-39 0) (-4.26989e-40 -4.47919e-40 0) (-1.68059e-40 1.52139e-39 0) (2.2765e-40 1.56319e-39 0) (2.3451e-40 -1.20821e-39 0) (-2.13876e-40 -1.24363e-39 0) (-2.44076e-40 1.36577e-39 0) (6.67504e-41 1.68755e-39 0) (1.50114e-40 5.60025e-40 0) (5.16629e-41 -1.05256e-40 0) (3.76935e-42 -4.96839e-41 0) (4.55831e-41 -1.51026e-40 0) (2.00629e-40 -6.05638e-40 0) (-1.02705e-40 -2.61875e-39 0) (-5.81537e-40 3.66389e-40 0) (-1.38542e-40 4.36365e-39 0) (3.44072e-40 2.28238e-39 0) (-1.37127e-40 2.78725e-40 0) (-1.11418e-41 3.95562e-39 0) (4.93503e-40 4.24759e-40 0) (-2.81413e-40 -1.98442e-39 0) (-1.45301e-34 3.66066e-35 0) (-1.58033e-35 1.43493e-35 0) (-1.6445e-36 1.72251e-36 0) (-1.58529e-37 1.68842e-37 0) (-1.46747e-38 1.46868e-38 0) (-1.28567e-39 9.81425e-40 0) (-1.36631e-40 -3.68154e-41 0) (-2.96137e-41 1.06701e-40 0) (4.75796e-42 1.29476e-40 0) (9.61494e-42 2.98779e-41 0) (2.29568e-42 6.63485e-42 0) (4.98816e-43 1.06618e-42 0) (-7.0229e-44 4.35209e-43 0) (-9.50775e-43 1.93093e-42 0) (-4.09139e-42 1.22435e-41 0) (-1.70977e-41 5.31769e-41 0) (-1.63361e-42 2.28855e-40 0) (4.55005e-41 7.48136e-41 0) (2.8364e-41 -3.47079e-40 0) (-2.45688e-41 -2.84114e-40 0) (-3.19812e-41 -3.57817e-41 0) (-1.26876e-41 1.20005e-40 0) (1.69652e-41 1.23601e-40 0) (1.75504e-41 -9.49423e-41 0) (-1.5969e-41 -9.78218e-41 0) (-1.82656e-41 1.07732e-40 0) (4.89299e-42 1.33381e-40 0) (1.12861e-41 4.47856e-41 0) (3.95874e-42 -8.42862e-42 0) (2.40584e-43 -4.01524e-42 0) (3.33982e-42 -1.19937e-41 0) (1.45955e-41 -4.70904e-41 0) (-9.1759e-42 -2.01576e-40 0) (-4.34837e-41 5.00014e-41 0) (-9.04149e-42 3.49052e-40 0) (2.58686e-41 1.82175e-40 0) (-1.00972e-41 2.38877e-41 0) (-6.7618e-43 3.12119e-40 0) (3.69089e-41 3.42684e-41 0) (-2.1012e-41 -1.56034e-40 0) (-1.38221e-33 7.17554e-37 0) (-1.45448e-34 -1.90744e-37 0) (-1.47841e-35 -2.78475e-38 0) (-1.39284e-36 -2.906e-39 0) (-1.26867e-37 -2.74861e-40 0) (-1.09082e-38 -4.1983e-41 0) (-9.09274e-40 -1.19605e-41 0) (-7.35295e-41 7.24649e-42 0) (-5.14307e-42 9.62986e-42 0) (2.94269e-43 2.25421e-42 0) (1.39426e-43 5.05212e-43 0) (3.48264e-44 8.19032e-44 0) (-5.35492e-45 3.36225e-44 0) (-7.02179e-44 1.48256e-43 0) (-3.00067e-43 9.32146e-43 0) (-1.24298e-42 4.01501e-42 0) (-1.1398e-43 1.70922e-41 0) (3.31296e-42 5.55451e-42 0) (2.06545e-42 -2.59359e-41 0) (-1.78718e-42 -2.12665e-41 0) (-2.33124e-42 -2.70415e-42 0) (-9.28421e-43 8.97558e-42 0) (1.23298e-42 9.29989e-42 0) (1.27819e-42 -7.05669e-42 0) (-1.16107e-42 -7.2851e-42 0) (-1.33017e-42 8.04952e-42 0) (3.52448e-43 9.99146e-42 0) (8.24155e-43 3.42693e-42 0) (2.92234e-43 -6.75094e-43 0) (1.61997e-44 -3.14095e-43 0) (2.37672e-43 -9.02768e-43 0) (1.03264e-42 -3.4715e-42 0) (-7.8529e-43 -1.47014e-41 0) (-3.16546e-42 5.19188e-42 0) (-5.49017e-43 2.6423e-41 0) (1.90168e-42 1.37743e-41 0) (-7.24133e-43 1.97275e-42 0) (-4.22209e-44 2.33268e-41 0) (2.68631e-42 2.60769e-42 0) (-1.52762e-42 -1.16498e-41 0) (-1.14061e-34 -3.63521e-35 0) (-1.24274e-35 -1.46891e-35 0) (-1.29107e-36 -1.77061e-36 0) (-1.24345e-37 -1.7393e-37 0) (-1.15062e-38 -1.53062e-38 0) (-1.00476e-39 -1.283e-39 0) (-8.47195e-41 -1.02617e-40 0) (-6.8976e-42 -7.2956e-42 0) (-4.99936e-43 1.23775e-43 0) (9.68746e-45 1.24176e-43 0) (9.01386e-45 3.4488e-44 0) (2.40424e-45 5.90404e-45 0) (-3.84013e-46 2.50147e-45 0) (-4.95739e-45 1.10295e-44 0) (-2.10649e-44 6.88895e-44 0) (-8.64997e-44 2.94726e-43 0) (-7.61246e-45 1.24413e-42 0) (2.3082e-43 4.02431e-43 0) (1.43927e-43 -1.88872e-42 0) (-1.24411e-43 -1.5507e-42 0) (-1.62648e-43 -1.98728e-43 0) (-6.51256e-44 6.53764e-43 0) (8.57865e-44 6.793e-43 0) (8.92521e-44 -5.1198e-43 0) (-8.0742e-44 -5.29155e-43 0) (-9.27004e-44 5.86079e-43 0) (2.41935e-44 7.28768e-43 0) (5.77495e-44 2.52852e-43 0) (2.07845e-44 -5.04367e-44 0) (9.18138e-46 -2.34122e-44 0) (1.61675e-44 -6.5776e-44 0) (6.99144e-44 -2.48185e-43 0) (-6.25117e-44 -1.0424e-42 0) (-2.20495e-43 4.93392e-43 0) (-3.09725e-44 1.95105e-42 0) (1.33604e-43 1.0139e-42 0) (-4.96696e-44 1.53123e-43 0) (-2.28109e-45 1.69881e-42 0) (1.87201e-43 1.92887e-43 0) (-1.06494e-43 -8.46725e-43 0) (6.74308e-34 9.17649e-36 0) (7.07759e-35 -1.2565e-36 0) (7.17875e-36 -2.01786e-37 0) (6.7509e-37 -2.13699e-38 0) (6.13976e-38 -1.94229e-39 0) (5.27186e-39 -1.65473e-40 0) (4.37949e-40 -1.33629e-41 0) (3.47185e-41 -9.95653e-43 0) (2.66931e-42 -2.79924e-44 0) (2.00319e-43 6.08719e-45 0) (1.49286e-44 2.25306e-45 0) (1.15637e-45 4.07401e-46 0) (4.03103e-47 1.7775e-46 0) (-3.35627e-46 7.83983e-46 0) (-1.43785e-45 4.86682e-45 0) (-5.8637e-45 2.07057e-44 0) (-4.98484e-46 8.66773e-44 0) (1.56611e-44 2.79058e-44 0) (9.76678e-45 -1.31636e-43 0) (-8.43536e-45 -1.08222e-43 0) (-1.10475e-44 -1.39663e-44 0) (-4.43863e-45 4.56116e-44 0) (5.8145e-45 4.76302e-44 0) (6.06287e-45 -3.55236e-44 0) (-5.47032e-45 -3.67807e-44 0) (-6.29053e-45 4.08464e-44 0) (1.62519e-45 5.08981e-44 0) (3.9324e-45 1.79633e-44 0) (1.4293e-45 -3.71821e-45 0) (5.2935e-47 -1.69167e-45 0) (1.06812e-45 -4.58806e-45 0) (4.60082e-45 -1.69863e-44 0) (-4.7992e-45 -7.07295e-44 0) (-1.49576e-44 4.207e-44 0) (-1.57105e-45 1.3782e-43 0) (9.16184e-45 7.14362e-44 0) (-3.31904e-45 1.14711e-44 0) (-1.22126e-46 1.18422e-43 0) (1.27006e-44 1.36204e-44 0) (-7.2248e-45 -5.90018e-44 0) (1.23639e-34 7.21279e-35 0) (1.33809e-35 7.03349e-36 0) (1.38321e-36 6.50554e-37 0) (1.32633e-37 5.8759e-38 0) (1.2231e-38 5.03102e-39 0) (1.06476e-39 4.17374e-40 0) (8.94023e-41 3.30643e-41 0) (7.16228e-42 2.54118e-42 0) (5.55029e-43 1.90718e-43 0) (4.15349e-44 1.4221e-44 0) (3.03532e-45 1.11075e-45 0) (2.19707e-46 9.24904e-47 0) (1.23892e-47 1.6506e-47 0) (-2.15239e-47 5.43384e-47 0) (-9.456e-47 3.33998e-46 0) (-3.83123e-46 1.41454e-45 0) (-3.14415e-47 5.88133e-45 0) (1.0241e-45 1.88622e-45 0) (6.38757e-46 -8.93485e-45 0) (-5.51242e-46 -7.35362e-45 0) (-7.23286e-46 -9.54555e-46 0) (-2.91923e-46 3.09774e-45 0) (3.7986e-46 3.24447e-45 0) (3.97346e-46 -2.40305e-45 0) (-3.5712e-46 -2.49115e-45 0) (-4.11452e-46 2.77224e-45 0) (1.04904e-46 3.46001e-45 0) (2.58482e-46 1.23462e-45 0) (9.5102e-47 -2.60062e-46 0) (2.50697e-48 -1.17385e-46 0) (6.7906e-47 -3.10244e-46 0) (2.91593e-46 -1.12811e-45 0) (-3.49397e-46 -4.66395e-45 0) (-9.77914e-46 3.40778e-45 0) (-6.89878e-47 9.4867e-45 0) (6.05e-46 4.89838e-45 0) (-2.13692e-46 8.19971e-46 0) (-5.35522e-48 8.03875e-45 0) (8.30792e-46 9.35028e-46 0) (-4.72956e-46 -4.00126e-45 0) (1.16979e-36 2.44943e-35 0) (1.46773e-37 2.46262e-36 0) (1.70074e-38 2.3296e-37 0) (1.7786e-39 2.13195e-38 0) (1.75607e-40 1.84752e-39 0) (1.6156e-41 1.54612e-40 0) (1.41819e-42 1.23558e-41 0) (1.17917e-43 9.55421e-43 0) (9.42879e-45 7.12233e-44 0) (7.33937e-46 5.16978e-45 0) (5.65252e-47 3.68359e-46 0) (4.53054e-48 2.6102e-47 0) (1.50365e-49 2.40956e-48 0) (-1.42477e-48 3.69102e-48 0) (-6.05888e-48 2.20745e-47 0) (-2.43947e-47 9.31214e-47 0) (-1.9411e-48 3.84609e-46 0) (6.52505e-47 1.2288e-46 0) (4.07039e-47 -5.8446e-46 0) (-3.5103e-47 -4.81554e-46 0) (-4.61305e-47 -6.28353e-47 0) (-1.86799e-47 2.02862e-46 0) (2.41841e-47 2.13393e-46 0) (2.5355e-47 -1.56588e-46 0) (-2.27234e-47 -1.62597e-46 0) (-2.62207e-47 1.81347e-46 0) (6.61871e-48 2.26746e-46 0) (1.65313e-47 8.20718e-47 0) (6.13688e-48 -1.78377e-47 0) (1.11916e-49 -7.90983e-48 0) (4.19595e-48 -2.02164e-47 0) (1.79713e-47 -7.21824e-47 0) (-2.4617e-47 -2.96212e-46 0) (-6.2298e-47 2.58166e-46 0) (-2.13686e-48 6.29158e-46 0) (3.89847e-47 3.23712e-46 0) (-1.34079e-47 5.67176e-47 0) (-2.06451e-49 5.25945e-46 0) (5.29425e-47 6.17552e-47 0) (-3.01525e-47 -2.61812e-46 0) (-1.05644e-34 6.20909e-35 0) (-1.12822e-35 5.96597e-36 0) (-1.15189e-36 5.45732e-37 0) (-1.09436e-37 4.89253e-38 0) (-1.00104e-38 4.16194e-39 0) (-8.65931e-40 3.4355e-40 0) (-7.23139e-41 2.70905e-41 0) (-5.76824e-42 2.07166e-42 0) (-4.45221e-43 1.52368e-43 0) (-3.30489e-44 1.08836e-44 0) (-2.37907e-45 7.51779e-46 0) (-1.65502e-46 5.05499e-47 0) (-1.12013e-47 3.33773e-48 0) (-8.2397e-49 4.40017e-49 0) (-4.22724e-49 1.43112e-48 0) (-1.50724e-48 5.96779e-48 0) (-1.1621e-49 2.45074e-47 0) (4.02616e-48 7.80461e-48 0) (2.51191e-48 -3.72505e-47 0) (-2.16487e-48 -3.07205e-47 0) (-2.8495e-48 -4.02631e-48 0) (-1.1585e-48 1.29404e-47 0) (1.49118e-48 1.36531e-47 0) (1.56789e-48 -9.94924e-48 0) (-1.40007e-48 -1.03443e-47 0) (-1.61836e-48 1.1558e-47 0) (4.03617e-49 1.44728e-47 0) (1.0249e-48 5.29312e-48 0) (3.84414e-49 -1.17303e-48 0) (3.06271e-51 -5.14671e-49 0) (2.50639e-49 -1.27936e-48 0) (1.07141e-48 -4.48698e-48 0) (-1.66247e-48 -1.8293e-47 0) (-3.84343e-48 1.87957e-47 0) (5.64298e-51 4.06704e-47 0) (2.43158e-48 2.08342e-47 0) (-8.14507e-49 3.77555e-48 0) (-3.18464e-51 3.35258e-47 0) (3.26819e-48 3.96915e-48 0) (-1.86314e-48 -1.66843e-47 0) (-5.78983e-34 -9.12238e-35 0) (-5.99981e-35 -1.13932e-35 0) (-6.03045e-36 -1.15497e-36 0) (-5.62083e-37 -1.08128e-37 0) (-5.07723e-38 -9.40445e-39 0) (-4.33101e-39 -7.86204e-40 0) (-3.57897e-40 -6.26161e-41 0) (-2.82348e-41 -4.82537e-42 0) (-2.15974e-42 -3.57417e-43 0) (-1.58861e-43 -2.56802e-44 0) (-1.13466e-44 -1.78281e-45 0) (-7.83301e-46 -1.20299e-46 0) (-5.25969e-47 -7.87084e-48 0) (-3.43172e-48 -4.87408e-49 0) (-2.40175e-49 5.70896e-50 0) (-1.03913e-49 3.68335e-49 0) (-7.59649e-51 1.51218e-48 0) (2.42247e-49 4.80075e-49 0) (1.51182e-49 -2.29911e-48 0) (-1.30223e-49 -1.89783e-48 0) (-1.71644e-49 -2.49715e-49 0) (-7.00057e-50 7.9965e-49 0) (8.96857e-50 8.46954e-49 0) (9.45147e-50 -6.11989e-49 0) (-8.4152e-50 -6.37281e-49 0) (-9.74157e-50 7.1341e-49 0) (2.40566e-50 8.94744e-49 0) (6.19136e-50 3.31297e-49 0) (2.34122e-50 -7.54553e-50 0) (-1.60028e-53 -3.2578e-50 0) (1.45658e-50 -7.83789e-50 0) (6.21678e-50 -2.69905e-49 0) (-1.08941e-49 -1.0929e-48 0) (-2.31267e-49 1.30289e-48 0) (8.92279e-51 2.54552e-48 0) (1.48068e-49 1.2985e-48 0) (-4.82594e-50 2.43836e-49 0) (3.01658e-52 2.06964e-48 0) (1.96744e-49 2.46743e-49 0) (-1.12246e-49 -1.03044e-48 0) (1.11166e-33 -1.48925e-34 0) (1.17932e-34 -2.46173e-35 0) (1.20487e-35 -2.64419e-36 0) (1.14115e-36 -2.51086e-37 0) (1.04337e-37 -2.18437e-38 0) (9.0049e-39 -1.82121e-39 0) (7.51132e-40 -1.44482e-40 0) (5.97892e-41 -1.10951e-41 0) (4.60756e-42 -8.18936e-43 0) (3.41312e-43 -5.86621e-44 0) (2.45262e-44 -4.06069e-45 0) (1.70286e-45 -2.73308e-46 0) (1.14917e-46 -1.78436e-47 0) (7.52122e-48 -1.13386e-48 0) (4.78058e-49 -6.48577e-50 0) (2.44314e-50 1.81493e-50 0) (1.41142e-51 9.07677e-50 0) (1.42763e-50 2.87996e-50 0) (8.84915e-51 -1.38395e-49 0) (-7.61252e-51 -1.14332e-49 0) (-1.00484e-50 -1.50947e-50 0) (-4.11316e-51 4.81843e-50 0) (5.24237e-51 5.11868e-50 0) (5.53941e-51 -3.67329e-50 0) (-4.91516e-51 -3.83011e-50 0) (-5.69899e-51 4.29452e-50 0) (1.39164e-51 5.39345e-50 0) (3.63711e-51 2.01662e-50 0) (1.38769e-51 -4.68535e-51 0) (-1.47737e-53 -1.99931e-51 0) (8.20945e-52 -4.67163e-51 0) (3.50017e-51 -1.5794e-50 0) (-6.88922e-51 -6.35487e-50 0) (-1.35239e-50 8.72976e-50 0) (1.02154e-51 1.55422e-49 0) (8.76006e-51 7.89043e-50 0) (-2.7781e-51 1.52379e-50 0) (4.92785e-53 1.24602e-49 0) (1.15124e-50 1.49462e-50 0) (-6.57559e-51 -6.20517e-50 0) (2.3706e-33 -5.18788e-35 0) (2.49271e-34 1.04237e-35 0) (2.53215e-35 1.54237e-36 0) (2.3843e-36 1.5916e-37 0) (2.17077e-37 1.42294e-38 0) (1.86566e-38 1.19845e-39 0) (1.5511e-39 9.55361e-41 0) (1.23071e-40 7.35695e-42 0) (9.45932e-42 5.44235e-43 0) (6.98938e-43 3.90552e-44 0) (5.01159e-44 2.70805e-45 0) (3.47234e-45 1.82538e-46 0) (2.33902e-46 1.19345e-47 0) (1.52828e-47 7.59965e-49 0) (9.72468e-49 4.73838e-50 0) (5.99033e-50 4.15937e-51 0) (3.61438e-51 5.49103e-51 0) (1.02329e-51 1.69042e-51 0) (5.1736e-52 -8.09506e-51 0) (-4.33884e-52 -6.69339e-51 0) (-5.74294e-52 -8.86349e-52 0) (-2.35808e-52 2.82223e-51 0) (2.99232e-52 3.00864e-51 0) (3.16901e-52 -2.14221e-51 0) (-2.80359e-52 -2.23702e-51 0) (-3.25532e-52 2.51239e-51 0) (7.87213e-53 3.15981e-51 0) (2.08489e-52 1.19445e-51 0) (8.01425e-53 -2.84374e-52 0) (-1.56731e-54 -1.19565e-52 0) (4.50605e-53 -2.70465e-52 0) (1.91971e-52 -8.97179e-52 0) (-4.23692e-52 -3.5859e-51 0) (-7.72205e-52 5.62358e-51 0) (8.77017e-53 9.221e-51 0) (5.06398e-52 4.6593e-51 0) (-1.56141e-52 9.26041e-52 0) (4.43464e-54 7.29037e-51 0) (6.57715e-52 8.79028e-52 0) (-3.76053e-52 -3.63327e-51 0) (-7.86453e-34 4.30023e-35 0) (-8.24811e-35 3.21108e-35 0) (-8.36011e-36 4.00332e-36 0) (-7.85719e-37 3.96664e-37 0) (-7.14229e-38 3.49874e-38 0) (-6.12999e-39 2.93116e-39 0) (-5.09058e-40 2.32991e-40 0) (-4.03501e-41 1.79091e-41 0) (-3.09866e-42 1.32277e-42 0) (-2.2878e-43 9.48017e-44 0) (-1.63935e-44 6.56543e-45 0) (-1.13518e-45 4.42072e-46 0) (-7.64293e-47 2.88733e-47 0) (-4.99154e-48 1.83678e-48 0) (-3.17527e-49 1.13688e-49 0) (-1.96662e-50 6.93815e-51 0) (-1.18747e-51 7.08017e-52 0) (-2.48075e-53 1.18996e-52 0) (2.40894e-53 -4.61086e-52 0) (-2.4399e-53 -3.82506e-52 0) (-3.19999e-53 -5.07889e-53 0) (-1.3178e-53 1.61383e-52 0) (1.66436e-53 1.72544e-52 0) (1.76708e-53 -1.22028e-52 0) (-1.55818e-53 -1.27598e-52 0) (-1.81196e-53 1.43509e-52 0) (4.33537e-54 1.80721e-52 0) (1.16501e-53 6.89458e-53 0) (4.51379e-54 -1.67394e-53 0) (-1.32115e-55 -6.95381e-54 0) (2.40415e-54 -1.52595e-53 0) (1.02388e-53 -4.96425e-53 0) (-2.52623e-53 -1.97126e-52 0) (-4.29644e-53 3.5147e-52 0) (6.51614e-54 5.34248e-52 0) (2.85207e-53 2.68577e-52 0) (-8.54897e-54 5.46624e-53 0) (3.42613e-55 4.16476e-52 0) (3.66192e-53 5.04432e-53 0) (-2.09643e-53 -2.07683e-52 0) (-2.35138e-33 -2.11142e-34 0) (-2.46773e-34 -1.83331e-35 0) (-2.50288e-35 -1.60899e-36 0) (-2.35356e-36 -1.4228e-37 0) (-2.14043e-37 -1.209e-38 0) (-1.83779e-38 -1.00029e-39 0) (-1.52669e-39 -7.91708e-41 0) (-1.21048e-40 -6.07536e-42 0) (-9.29814e-42 -4.48345e-43 0) (-6.86652e-43 -3.21147e-44 0) (-4.92121e-44 -2.22311e-45 0) (-3.40828e-45 -1.49636e-46 0) (-2.29504e-46 -9.77019e-48 0) (-1.49905e-47 -6.21365e-49 0) (-9.53676e-49 -3.84437e-50 0) (-5.90229e-50 -2.31641e-51 0) (-3.56367e-51 -1.19668e-52 0) (-2.07343e-52 -2.53788e-54 0) (-1.05378e-53 -2.61749e-53 0) (-1.99251e-54 -2.1331e-53 0) (-1.77871e-54 -2.83657e-54 0) (-7.21504e-55 8.99338e-54 0) (9.04923e-55 9.64674e-54 0) (9.63014e-55 -6.77236e-54 0) (-8.46664e-55 -7.09179e-54 0) (-9.8592e-55 7.98766e-54 0) (2.33641e-55 1.00721e-53 0) (6.36104e-55 3.88073e-54 0) (2.48157e-55 -9.63298e-55 0) (-9.4996e-57 -3.94713e-55 0) (1.25026e-55 -8.38393e-55 0) (5.3239e-55 -2.67264e-54 0) (-1.46773e-54 -1.05396e-53 0) (-2.33686e-54 2.12478e-53 0) (4.45564e-55 3.01586e-53 0) (1.57104e-54 1.50845e-53 0) (-4.57492e-55 3.14422e-54 0) (2.34604e-56 2.31833e-53 0) (1.99298e-54 2.81866e-54 0) (-1.14236e-54 -1.15719e-53 0) (8.30066e-34 -3.23103e-34 0) (8.70031e-35 -4.2279e-35 0) (8.81384e-36 -4.30234e-36 0) (8.28039e-37 -4.01671e-37 0) (7.52451e-38 -3.47595e-38 0) (6.45638e-39 -2.89331e-39 0) (5.36048e-40 -2.2943e-40 0) (4.2482e-41 -1.76167e-41 0) (3.26191e-42 -1.30031e-42 0) (2.40806e-43 -9.31466e-44 0) (1.72536e-44 -6.44803e-45 0) (1.19464e-45 -4.34007e-46 0) (8.04277e-47 -2.83367e-47 0) (5.2524e-48 -1.80208e-48 0) (3.34103e-49 -1.11491e-49 0) (2.06749e-50 -6.72917e-51 0) (1.24818e-51 -3.95126e-52 0) (7.36063e-53 -2.24846e-53 0) (4.30715e-54 -2.6792e-54 0) (1.67629e-55 -1.2302e-54 0) (-7.95246e-56 -1.58433e-55 0) (-3.76657e-56 4.89693e-55 0) (4.8092e-56 5.2696e-55 0) (5.12584e-56 -3.67514e-55 0) (-4.49202e-56 -3.85363e-55 0) (-5.23835e-56 4.34601e-55 0) (1.22876e-56 5.48673e-55 0) (3.39225e-56 2.13243e-55 0) (1.33282e-56 -5.39439e-56 0) (-6.36789e-58 -2.18416e-56 0) (6.33008e-57 -4.4957e-56 0) (2.69609e-56 -1.40319e-55 0) (-8.29499e-56 -5.49462e-55 0) (-1.2411e-55 1.24968e-54 0) (2.85296e-56 1.66442e-54 0) (8.44962e-56 8.2805e-55 0) (-2.38987e-56 1.76159e-55 0) (1.5128e-57 1.26151e-54 0) (1.05922e-55 1.5388e-55 0) (-6.07997e-56 -6.30235e-55 0) (2.32868e-33 -1.12487e-35 0) (2.44029e-34 1.52184e-35 0) (2.47291e-35 2.01158e-36 0) (2.32307e-36 2.02166e-37 0) (2.11123e-37 1.79002e-38 0) (1.81138e-38 1.50106e-39 0) (1.50389e-39 1.19312e-40 0) (1.19169e-40 9.16896e-42 0) (9.14938e-42 6.77008e-43 0) (6.75338e-43 4.85071e-44 0) (4.83807e-44 3.35841e-45 0) (3.3493e-45 2.26081e-46 0) (2.25449e-46 1.47629e-47 0) (1.47203e-47 9.38959e-49 0) (9.3617e-49 5.80976e-50 0) (5.79197e-50 3.50705e-51 0) (3.496e-51 2.06469e-52 0) (2.05758e-52 1.18859e-53 0) (1.18353e-53 5.92472e-55 0) (6.60934e-55 -2.5006e-56 0) (3.17035e-56 -6.26427e-57 0) (-3.81985e-59 2.61631e-56 0) (2.60069e-57 2.81226e-56 0) (2.67483e-57 -1.94721e-56 0) (-2.33233e-57 -2.04472e-56 0) (-2.72378e-57 2.30894e-56 0) (6.32894e-58 2.91855e-56 0) (1.76988e-57 1.14464e-56 0) (6.99833e-58 -2.955e-57 0) (-3.97466e-59 -1.18124e-57 0) (3.12575e-58 -2.3523e-57 0) (1.33186e-57 -7.18053e-57 0) (-4.57588e-57 -2.79042e-56 0) (-6.45079e-57 7.13881e-56 0) (1.74097e-57 8.96883e-56 0) (4.44912e-57 4.43816e-56 0) (-1.22151e-57 9.63459e-57 0) (9.17446e-59 6.70272e-56 0) (5.50918e-57 8.19851e-57 0) (-3.16665e-57 -3.35243e-56 0) (-1.60116e-33 -3.71689e-36 0) (-1.6804e-34 2.68049e-35 0) (-1.70529e-35 3.4819e-36 0) (-1.60381e-36 3.48496e-37 0) (-1.45907e-37 3.08349e-38 0) (-1.25294e-38 2.58633e-39 0) (-1.04107e-39 2.05699e-40 0) (-8.25515e-41 1.58178e-41 0) (-6.34188e-42 1.16873e-42 0) (-4.68365e-43 8.37913e-44 0) (-3.35698e-44 5.80494e-45 0) (-2.32501e-45 3.91006e-46 0) (-1.56564e-46 2.55471e-47 0) (-1.02263e-47 1.62577e-48 0) (-6.50583e-49 1.00649e-49 0) (-4.02632e-50 6.07884e-51 0) (-2.43094e-51 3.57983e-52 0) (-1.43106e-52 2.05976e-53 0) (-8.2306e-54 1.15376e-54 0) (-4.6262e-55 6.04452e-56 0) (-2.56624e-56 2.99518e-57 0) (-1.46894e-57 1.53696e-57 0) (5.49511e-59 1.47701e-57 0) (1.32288e-58 -1.00942e-57 0) (-1.18658e-58 -1.06185e-57 0) (-1.38538e-58 1.20048e-57 0) (3.18709e-59 1.51918e-57 0) (9.03333e-59 6.00725e-58 0) (3.59509e-59 -1.57915e-58 0) (-2.37627e-60 -6.23993e-59 0) (1.50417e-59 -1.20285e-58 0) (6.41371e-59 -3.58675e-58 0) (-2.46165e-58 -1.38269e-57 0) (-3.27944e-58 3.97612e-57 0) (1.01729e-58 4.73004e-57 0) (2.29131e-58 2.32765e-57 0) (-6.10462e-59 5.14364e-58 0) (5.34861e-60 3.48524e-57 0) (2.80282e-58 4.27292e-58 0) (-1.61349e-58 -1.7451e-57 0) (-1.83147e-33 -8.16425e-35 0) (-1.93118e-34 -1.66775e-35 0) (-1.96569e-35 -1.84813e-36 0) (-1.85481e-36 -1.76375e-37 0) (-1.69164e-37 -1.53076e-38 0) (-1.45642e-38 -1.27047e-39 0) (-1.21275e-39 -1.00264e-40 0) (-9.63752e-41 -7.65773e-42 0) (-7.41812e-42 -5.62122e-43 0) (-5.48899e-43 -4.0043e-44 0) (-3.94111e-44 -2.75645e-45 0) (-2.7343e-45 -1.84485e-46 0) (-1.84426e-46 -1.19769e-47 0) (-1.20655e-47 -7.57316e-49 0) (-7.68768e-49 -4.65835e-50 0) (-4.76494e-50 -2.79534e-51 0) (-2.8811e-51 -1.63549e-52 0) (-1.69851e-52 -9.34851e-54 0) (-9.78275e-54 -5.22173e-55 0) (-5.50401e-55 -2.86737e-56 0) (-3.03051e-56 -1.54533e-57 0) (-1.63627e-57 -1.06568e-59 0) (-7.97032e-59 7.08617e-59 0) (2.34313e-60 -5.14307e-59 0) (-6.12022e-60 -5.39479e-59 0) (-6.91345e-60 6.10481e-59 0) (1.57263e-60 7.73449e-59 0) (4.51587e-60 3.08431e-59 0) (1.80794e-60 -8.26171e-60 0) (-1.35708e-61 -3.22565e-60 0) (7.06134e-61 -6.01138e-60 0) (3.01363e-60 -1.74845e-59 0) (-1.29454e-59 -6.68105e-59 0) (-1.63333e-59 2.1574e-58 0) (5.73716e-60 2.43979e-58 0) (1.15637e-59 1.19395e-58 0) (-2.98802e-60 2.68477e-59 0) (2.99125e-61 1.77252e-58 0) (1.39695e-59 2.17722e-59 0) (-8.05387e-60 -8.88666e-59 0) (5.30059e-34 -1.64349e-34 0) (5.39888e-35 -1.81894e-35 0) (5.32677e-36 -1.75409e-36 0) (4.87221e-37 -1.59211e-37 0) (4.31228e-38 -1.35304e-38 0) (3.60331e-39 -1.10634e-39 0) (2.91266e-40 -8.62685e-41 0) (2.24676e-41 -6.50287e-42 0) (1.67821e-42 -4.71141e-43 0) (1.2047e-43 -3.30761e-44 0) (8.38701e-45 -2.24293e-45 0) (5.63921e-46 -1.47675e-46 0) (3.68341e-47 -9.42506e-48 0) (2.33195e-48 -5.85113e-49 0) (1.4365e-49 -3.5306e-50 0) (8.59996e-51 -2.07553e-51 0) (5.01685e-52 -1.18842e-52 0) (2.85014e-53 -6.63862e-54 0) (1.57976e-54 -3.61799e-55 0) (8.54089e-56 -1.92659e-56 0) (4.50928e-57 -1.00244e-57 0) (2.32316e-58 -4.7458e-59 0) (1.20312e-59 1.21836e-60 0) (9.09413e-61 -2.66894e-60 0) (-2.59475e-61 -2.69017e-60 0) (-3.35532e-61 3.04114e-60 0) (7.60961e-62 3.85751e-60 0) (2.21142e-61 1.55033e-60 0) (8.9062e-62 -4.22489e-61 0) (-7.49785e-63 -1.63131e-61 0) (3.23175e-62 -2.93947e-61 0) (1.38086e-61 -8.32588e-61 0) (-6.65206e-61 -3.15103e-60 0) (-7.96767e-61 1.14337e-59 0) (3.12886e-61 1.23294e-59 0) (5.71602e-61 5.99916e-60 0) (-1.43197e-61 1.37027e-60 0) (1.62161e-62 8.83138e-60 0) (6.81975e-61 1.08645e-60 0) (-3.93813e-61 -4.4333e-60 0) (9.93344e-35 6.60991e-35 0) (8.03731e-36 8.23542e-36 0) (4.77234e-37 8.90157e-37 0) (1.65161e-38 9.37902e-38 0) (-1.54909e-39 9.04054e-39 0) (-3.79675e-40 8.43636e-40 0) (-5.4201e-41 7.38218e-41 0) (-6.04284e-42 6.24604e-42 0) (-6.07392e-43 5.0252e-43 0) (-5.5313e-44 3.91332e-44 0) (-4.74939e-45 2.92329e-45 0) (-3.83248e-46 2.11751e-46 0) (-2.95938e-47 1.48008e-47 0) (-2.18156e-48 1.00514e-48 0) (-1.55044e-49 6.61477e-50 0) (-1.06103e-50 4.23747e-51 0) (-7.03315e-52 2.6389e-52 0) (-4.51354e-53 1.6025e-53 0) (-2.81501e-54 9.48349e-55 0) (-1.70615e-55 5.48112e-56 0) (-1.00751e-56 3.09332e-57 0) (-5.79788e-58 1.70905e-58 0) (-3.25569e-59 9.40048e-60 0) (-1.7711e-60 3.6327e-61 0) (-1.09606e-61 -1.05624e-61 0) (-2.1152e-62 1.49688e-61 0) (3.3465e-63 1.88501e-61 0) (1.06045e-62 7.6336e-62 0) (4.2993e-63 -2.11693e-62 0) (-4.00204e-64 -8.08243e-63 0) (1.44255e-63 -1.40663e-62 0) (6.17216e-63 -3.87244e-62 0) (-3.34582e-62 -1.44993e-61 0) (-3.81149e-62 5.91656e-61 0) (1.65733e-62 6.10238e-61 0) (2.77131e-62 2.95226e-61 0) (-6.72728e-63 6.84671e-62 0) (8.51161e-64 4.30968e-61 0) (3.2648e-62 5.30814e-62 0) (-1.88831e-62 -2.16648e-61 0) (-3.56796e-35 -1.91106e-35 0) (-1.54371e-35 1.09473e-36 0) (-3.26865e-36 2.16801e-37 0) (-4.40966e-37 2.36964e-38 0) (-5.47321e-38 2.16599e-39 0) (-5.83567e-39 1.84289e-40 0) (-5.90203e-40 1.47991e-41 0) (-5.47107e-41 1.1456e-42 0) (-4.85538e-42 8.51751e-44 0) (-4.05421e-43 6.13839e-45 0) (-3.25829e-44 4.27443e-46 0) (-2.49764e-45 2.89214e-47 0) (-1.85004e-46 1.89802e-48 0) (-1.31782e-47 1.21271e-49 0) (-9.09932e-49 7.5371e-51 0) (-6.07514e-50 4.56862e-52 0) (-3.94194e-51 2.69993e-53 0) (-2.4828e-52 1.55856e-54 0) (-1.52309e-53 8.78793e-56 0) (-9.09597e-55 4.84671e-57 0) (-5.30068e-56 2.61499e-58 0) (-3.01391e-57 1.38253e-59 0) (-1.67486e-58 7.23975e-61 0) (-9.09702e-60 3.0372e-62 0) (-4.84299e-61 -4.44917e-63 0) (-2.59267e-62 7.18942e-63 0) (-1.11595e-63 9.03045e-63 0) (4.35758e-64 3.68387e-63 0) (2.00436e-64 -1.03843e-63 0) (-2.09211e-65 -3.92293e-64 0) (6.27441e-65 -6.59275e-64 0) (2.68934e-64 -1.76019e-63 0) (-1.64701e-63 -6.51197e-63 0) (-1.78791e-63 2.99496e-62 0) (8.53553e-64 2.9619e-62 0) (1.31758e-63 1.42457e-62 0) (-3.09786e-64 3.34998e-63 0) (4.35034e-65 2.06233e-62 0) (1.53266e-63 2.54243e-63 0) (-8.87961e-64 -1.03819e-62 0) (-1.77282e-34 -1.48152e-34 0) (-2.16723e-35 -1.78751e-36 0) (-2.57332e-36 2.35896e-37 0) (-2.74534e-37 2.56812e-38 0) (-2.82746e-38 1.68609e-39 0) (-2.69851e-39 5.89633e-41 0) (-2.48358e-40 -2.07582e-42 0) (-2.15633e-41 -7.36581e-43 0) (-1.80752e-42 -9.61441e-44 0) (-1.44535e-43 -1.00455e-44 0) (-1.11807e-44 -9.11401e-46 0) (-8.31195e-46 -7.64385e-47 0) (-5.99098e-47 -5.97294e-48 0) (-4.17154e-48 -4.44129e-49 0) (-2.82217e-49 -3.14636e-50 0) (-1.85156e-50 -2.14536e-51 0) (-1.18258e-51 -1.40843e-52 0) (-7.34632e-53 -8.95393e-54 0) (-4.4505e-54 -5.51399e-55 0) (-2.62845e-55 -3.30106e-56 0) (-1.51624e-56 -1.92192e-57 0) (-8.54287e-58 -1.09082e-58 0) (-4.70779e-59 -6.03752e-60 0) (-2.53787e-60 -3.26768e-61 0) (-1.34009e-61 -1.75473e-62 0) (-6.96296e-63 -5.59052e-64 0) (-3.43562e-64 3.78797e-64 0) (5.64027e-66 1.72079e-64 0) (8.60449e-66 -5.00634e-65 0) (-1.08846e-66 -1.86777e-65 0) (2.65763e-66 -3.02724e-65 0) (1.14194e-65 -7.8182e-65 0) (-7.94502e-65 -2.85312e-64 0) (-8.2316e-65 1.48291e-63 0) (4.28575e-65 1.40967e-63 0) (6.14922e-65 6.74032e-64 0) (-1.39959e-65 1.60649e-64 0) (2.16405e-66 9.67738e-64 0) (7.06189e-65 1.19375e-64 0) (-4.09826e-65 -4.87902e-64 0) (-9.53087e-34 -4.75667e-35 0) (-1.01069e-34 -2.29611e-36 0) (-1.03679e-35 -1.37605e-37 0) (-9.84929e-37 -1.17213e-38 0) (-9.05382e-38 -1.12828e-39 0) (-7.85162e-39 -1.11595e-40 0) (-6.58983e-40 -1.03813e-41 0) (-5.27635e-41 -9.27181e-43 0) (-4.09354e-42 -7.80521e-44 0) (-3.05235e-43 -6.31476e-45 0) (-2.20904e-44 -4.87316e-46 0) (-1.54458e-45 -3.62988e-47 0) (-1.0501e-46 -2.59987e-48 0) (-6.92403e-48 -1.80373e-49 0) (-4.44686e-49 -1.20983e-50 0) (-2.77801e-50 -7.88261e-52 0) (-1.69309e-51 -4.98462e-53 0) (-1.00604e-52 -3.06899e-54 0) (-5.8405e-54 -1.83924e-55 0) (-3.31199e-55 -1.0753e-56 0) (-1.83737e-56 -6.13319e-58 0) (-9.97194e-58 -3.41828e-59 0) (-5.30076e-59 -1.86202e-60 0) (-2.7602e-60 -9.9267e-62 0) (-1.40921e-61 -5.19219e-63 0) (-7.05715e-63 -2.49387e-64 0) (-3.46335e-64 6.28122e-66 0) (-1.56734e-65 7.4416e-66 0) (-3.61009e-67 -2.38701e-66 0) (-8.84278e-68 -8.73157e-67 0) (1.07998e-67 -1.36272e-66 0) (4.71933e-67 -3.39407e-66 0) (-3.75593e-66 -1.21932e-65 0) (-3.72001e-66 7.19182e-65 0) (2.09952e-66 6.58501e-65 0) (2.8171e-66 3.12991e-65 0) (-6.20393e-67 7.55303e-66 0) (1.05128e-67 4.45695e-65 0) (3.19394e-66 5.49992e-66 0) (-1.85679e-66 -2.25045e-65 0) (-1.75214e-34 -9.90586e-35 0) (-1.9127e-35 -9.76871e-36 0) (-1.99584e-36 -9.12298e-37 0) (-1.92935e-37 -8.32345e-38 0) (-1.79421e-38 -7.1931e-39 0) (-1.57391e-39 -6.02562e-40 0) (-1.33185e-40 -4.81844e-41 0) (-1.07486e-41 -3.73475e-42 0) (-8.38865e-43 -2.78266e-43 0) (-6.2902e-44 -2.01259e-44 0) (-4.57204e-45 -1.40648e-45 0) (-3.20972e-46 -9.55792e-47 0) (-2.18905e-47 -6.2999e-48 0) (-1.44757e-48 -4.04485e-49 0) (-9.31801e-50 -2.52626e-50 0) (-5.83299e-51 -1.53937e-51 0) (-3.56065e-52 -9.14568e-53 0) (-2.11871e-53 -5.30891e-54 0) (-1.2313e-54 -3.01033e-55 0) (-6.98858e-56 -1.66995e-56 0) (-3.87942e-57 -9.06321e-58 0) (-2.10648e-58 -4.81778e-59 0) (-1.12004e-59 -2.50879e-60 0) (-5.83311e-61 -1.28092e-61 0) (-2.97799e-62 -6.41433e-63 0) (-1.49088e-63 -3.14473e-64 0) (-7.32166e-65 -1.43185e-65 0) (-3.48418e-66 -3.5147e-67 0) (-1.47887e-67 -1.42546e-67 0) (-1.02523e-68 -4.14749e-68 0) (4.04104e-69 -6.02151e-68 0) (1.8952e-68 -1.43982e-67 0) (-1.74174e-67 -5.07852e-67 0) (-1.65134e-67 3.41662e-66 0) (1.0053e-67 3.01932e-66 0) (1.26785e-67 1.42655e-66 0) (-2.70004e-68 3.48403e-67 0) (4.98698e-69 2.01482e-66 0) (1.41894e-67 2.48663e-67 0) (-8.26345e-68 -1.01897e-66 0) (-3.39597e-35 -1.88778e-35 0) (-3.82276e-36 -1.93094e-36 0) (-4.09747e-37 -1.85093e-37 0) (-4.03382e-38 -1.71485e-38 0) (-3.80793e-39 -1.50166e-39 0) (-3.37648e-40 -1.26939e-40 0) (-2.88171e-41 -1.02371e-41 0) (-2.3402e-42 -7.98458e-43 0) (-1.83505e-43 -5.98413e-44 0) (-1.38062e-44 -4.34754e-45 0) (-1.00583e-45 -3.05084e-46 0) (-7.07121e-47 -2.0799e-47 0) (-4.82587e-48 -1.37491e-48 0) (-3.19144e-49 -8.84743e-50 0) (-2.05333e-50 -5.53677e-51 0) (-1.28418e-51 -3.37889e-52 0) (-7.8287e-53 -2.01004e-53 0) (-4.65065e-54 -1.16787e-54 0) (-2.69747e-55 -6.62706e-56 0) (-1.52764e-56 -3.67796e-57 0) (-8.45936e-58 -1.9967e-58 0) (-4.58122e-59 -1.06147e-59 0) (-2.42901e-60 -5.52711e-61 0) (-1.26125e-61 -2.8213e-62 0) (-6.41892e-63 -1.41218e-63 0) (-3.20298e-64 -6.93267e-65 0) (-1.56798e-65 -3.30428e-66 0) (-7.51365e-67 -1.41795e-67 0) (-3.46982e-68 -1.23136e-68 0) (-1.76368e-69 -2.1332e-69 0) (9.58477e-71 -2.61965e-69 0) (7.36109e-70 -5.96797e-69 0) (-7.92435e-69 -2.05976e-68 0) (-7.20155e-69 1.59161e-67 0) (4.70773e-69 1.35986e-67 0) (5.60593e-69 6.38628e-68 0) (-1.15387e-69 1.57723e-68 0) (2.31508e-70 8.94671e-68 0) (6.19307e-69 1.10409e-68 0) (-3.61314e-69 -4.53191e-68 0) (-2.93941e-37 -7.13376e-36 0) (-3.7664e-38 -7.52633e-37 0) (-4.52955e-39 -7.3458e-38 0) (-4.86755e-40 -6.89335e-39 0) (-4.96528e-41 -6.08469e-40 0) (-4.69333e-42 -5.17236e-41 0) (-4.24155e-43 -4.18544e-42 0) (-3.61951e-44 -3.27094e-43 0) (-2.96879e-45 -2.4532e-44 0) (-2.32517e-46 -1.78186e-45 0) (-1.75767e-47 -1.24911e-46 0) (-1.278e-48 -8.50125e-48 0) (-8.99885e-50 -5.60712e-49 0) (-6.12582e-51 -3.59827e-50 0) (-4.04953e-52 -2.2448e-51 0) (-2.59767e-53 -1.36515e-52 0) (-1.62192e-54 -8.09053e-54 0) (-9.85495e-56 -4.68179e-55 0) (-5.83973e-57 -2.6454e-56 0) (-3.37509e-58 -1.46164e-57 0) (-1.90554e-59 -7.89831e-59 0) (-1.05122e-60 -4.17878e-60 0) (-5.67326e-62 -2.16521e-61 0) (-2.99622e-63 -1.09966e-62 0) (-1.54994e-64 -5.47587e-64 0) (-7.85631e-66 -2.67522e-65 0) (-3.90436e-67 -1.28115e-66 0) (-1.89482e-68 -5.96824e-68 0) (-8.74189e-70 -3.01505e-69 0) (-4.81293e-71 -2.06412e-70 0) (4.44572e-72 -1.16355e-70 0) (2.77941e-71 -2.41762e-70 0) (-3.53972e-70 -8.12223e-70 0) (-3.08716e-70 7.27173e-69 0) (2.15884e-70 6.01689e-69 0) (2.43677e-70 2.8086e-69 0) (-4.84472e-71 7.0115e-70 0) (1.05185e-71 3.90288e-69 0) (2.657e-70 4.81504e-70 0) (-1.55295e-70 -1.98027e-69 0) (3.13681e-35 -1.53615e-35 0) (3.49443e-36 -1.53622e-36 0) (3.7085e-37 -1.44818e-37 0) (3.61965e-38 -1.32164e-38 0) (3.38923e-39 -1.14305e-39 0) (2.98314e-40 -9.55021e-41 0) (2.52813e-41 -7.6228e-42 0) (2.03963e-42 -5.88733e-43 0) (1.58927e-43 -4.37279e-44 0) (1.18855e-44 -3.14957e-45 0) (8.60868e-46 -2.19241e-46 0) (6.01832e-47 -1.48307e-47 0) (4.08493e-48 -9.73162e-49 0) (2.68716e-49 -6.21752e-50 0) (1.71995e-50 -3.86432e-51 0) (1.07024e-51 -2.34254e-52 0) (6.49207e-53 -1.38456e-53 0) (3.83784e-54 -7.9939e-55 0) (2.21534e-55 -4.50835e-56 0) (1.24868e-56 -2.48709e-57 0) (6.88232e-58 -1.34228e-58 0) (3.71001e-59 -7.09464e-60 0) (1.95813e-60 -3.67331e-61 0) (1.01216e-61 -1.8646e-62 0) (5.12826e-63 -9.28183e-64 0) (2.54761e-64 -4.53411e-65 0) (1.24175e-65 -2.17409e-66 0) (5.94038e-67 -1.02361e-67 0) (2.7908e-68 -4.74719e-69 0) (1.28757e-69 -2.18892e-70 0) (5.86374e-71 -1.425e-71 0) (3.61614e-72 -9.96264e-72 0) (-1.5413e-71 -3.10917e-71 0) (-1.30063e-71 3.26094e-70 0) (9.69949e-72 2.61694e-70 0) (1.04142e-71 1.2141e-70 0) (-1.99878e-72 3.06172e-71 0) (4.6842e-73 1.67358e-70 0) (1.12075e-71 2.06375e-71 0) (-6.56263e-72 -8.50576e-71 0) (1.43817e-34 -7.84195e-35 0) (1.53965e-35 -7.50234e-36 0) (1.57546e-36 -6.84046e-37 0) (1.49943e-37 -6.11788e-38 0) (1.37368e-38 -5.19391e-39 0) (1.18978e-39 -4.28042e-40 0) (9.94665e-41 -3.37043e-41 0) (7.94134e-42 -2.57427e-42 0) (6.13426e-43 -1.89108e-43 0) (4.55659e-44 -1.34921e-44 0) (3.28215e-45 -9.30483e-46 0) (2.28477e-46 -6.24243e-47 0) (1.54558e-47 -4.06326e-48 0) (1.01419e-48 -2.57703e-49 0) (6.47961e-50 -1.5903e-50 0) (4.02715e-51 -9.57699e-52 0) (2.4412e-52 -5.62437e-53 0) (1.44283e-53 -3.22787e-54 0) (8.33006e-55 -1.80988e-55 0) (4.69775e-56 -9.92955e-57 0) (2.59147e-57 -5.33038e-58 0) (1.39855e-58 -2.80304e-59 0) (7.39168e-60 -1.44412e-60 0) (3.82691e-61 -7.29563e-62 0) (1.94246e-62 -3.61494e-63 0) (9.6689e-64 -1.758e-64 0) (4.72293e-65 -8.39318e-66 0) (2.26457e-66 -3.93612e-67 0) (1.06644e-67 -1.81374e-68 0) (4.93391e-69 -8.21658e-70 0) (2.24371e-70 -3.67765e-71 0) (1.0066e-71 -1.97014e-72 0) (-2.28183e-73 -1.21868e-72 0) (-5.20311e-73 1.43537e-71 0) (4.28158e-73 1.11901e-71 0) (4.37856e-73 5.15981e-72 0) (-8.10651e-74 1.31392e-72 0) (2.04508e-74 7.05558e-72 0) (4.65004e-73 8.69485e-73 0) (-2.72792e-73 -3.59208e-72 0) (7.64753e-34 1.20147e-34 0) (7.92588e-35 1.50164e-35 0) (7.96707e-36 1.5229e-36 0) (7.42657e-37 1.42615e-37 0) (6.70879e-38 1.24071e-38 0) (5.72316e-39 1.03743e-39 0) (4.72964e-40 8.26401e-41 0) (3.73145e-41 6.36945e-42 0) (2.8544e-42 4.71853e-43 0) (2.09965e-43 3.39065e-44 0) (1.49973e-44 2.35421e-45 0) (1.03536e-45 1.58876e-46 0) (6.95234e-47 1.03994e-47 0) (4.5291e-48 6.62853e-49 0) (2.87458e-49 4.10982e-50 0) (1.77511e-50 2.48554e-51 0) (1.06963e-51 1.46559e-52 0) (6.28512e-53 8.4421e-54 0) (3.60884e-54 4.74999e-55 0) (2.02439e-55 2.61436e-56 0) (1.11109e-56 1.4077e-57 0) (5.96673e-58 7.42345e-59 0) (3.1387e-59 3.83477e-60 0) (1.61754e-60 1.94215e-61 0) (8.17394e-62 9.64601e-63 0) (4.05112e-63 4.70144e-64 0) (1.97056e-64 2.24935e-65 0) (9.40987e-66 1.05698e-66 0) (4.41372e-67 4.87958e-68 0) (2.03408e-68 2.21416e-69 0) (9.21467e-70 9.87728e-71 0) (4.10454e-71 4.32068e-72 0) (1.76994e-72 1.46195e-73 0) (5.55205e-74 6.2887e-73 0) (2.17616e-74 4.70993e-73 0) (1.82468e-74 2.157e-73 0) (-3.22705e-75 5.5431e-74 0) (8.76466e-76 2.92579e-73 0) (1.89812e-74 3.60265e-74 0) (-1.11563e-74 -1.49214e-73 0) (-1.45933e-33 1.9884e-34 0) (-1.54856e-34 3.27449e-35 0) (-1.58245e-35 3.51545e-36 0) (-1.49904e-36 3.33829e-37 0) (-1.37082e-37 2.90475e-38 0) (-1.18325e-38 2.42232e-39 0) (-9.87107e-40 1.92206e-40 0) (-7.85805e-41 1.47625e-41 0) (-6.0562e-42 1.08979e-42 0) (-4.48656e-43 7.80742e-44 0) (-3.2242e-44 5.40506e-45 0) (-2.23869e-45 3.63829e-46 0) (-1.51085e-46 2.37559e-47 0) (-9.88928e-48 1.51083e-48 0) (-6.30327e-49 9.34743e-50 0) (-3.90798e-50 5.6421e-51 0) (-2.36335e-51 3.32061e-52 0) (-1.39344e-52 1.90942e-53 0) (-8.0259e-54 1.07255e-54 0) (-4.5154e-55 5.89404e-56 0) (-2.485e-56 3.16888e-57 0) (-1.3379e-57 1.66872e-58 0) (-7.05455e-59 8.60843e-60 0) (-3.64376e-60 4.35413e-61 0) (-1.84517e-61 2.15984e-62 0) (-9.16313e-63 1.05144e-63 0) (-4.46546e-64 5.02466e-65 0) (-2.13614e-65 2.35847e-66 0) (-1.00363e-66 1.08763e-67 0) (-4.63262e-68 4.93009e-69 0) (-2.10178e-69 2.19723e-70 0) (-9.37514e-71 9.63146e-72 0) (-4.1143e-72 4.14028e-73 0) (-1.78418e-73 4.40212e-74 0) (-6.75759e-75 2.02125e-74 0) (4.21899e-76 8.90017e-75 0) (-1.39778e-76 2.30098e-75 0) (3.6328e-77 1.19363e-74 0) (7.62545e-76 1.46835e-75 0) (-4.49052e-76 -6.09824e-75 0) (-3.14956e-33 8.37005e-35 0) (-3.31397e-34 -1.20448e-35 0) (-3.36816e-35 -1.86755e-36 0) (-3.17293e-36 -1.94516e-37 0) (-2.88981e-37 -1.74315e-38 0) (-2.48442e-38 -1.46906e-39 0) (-2.06607e-39 -1.17107e-40 0) (-1.63969e-40 -9.01684e-42 0) (-1.26052e-41 -6.66885e-43 0) (-9.31541e-43 -4.78474e-44 0) (-6.68039e-44 -3.31698e-45 0) (-4.62919e-45 -2.23539e-46 0) (-3.11864e-46 -1.46121e-47 0) (-2.03788e-47 -9.30227e-49 0) (-1.29695e-48 -5.76072e-50 0) (-8.02934e-50 -3.48014e-51 0) (-4.84933e-51 -2.04986e-52 0) (-2.85558e-52 -1.17959e-53 0) (-1.64283e-53 -6.63058e-55 0) (-9.2323e-55 -3.64608e-56 0) (-5.07559e-56 -1.96149e-57 0) (-2.72993e-57 -1.03351e-58 0) (-1.4381e-58 -5.33445e-60 0) (-7.42123e-60 -2.69953e-61 0) (-3.75484e-61 -1.33974e-62 0) (-1.86312e-62 -6.52501e-64 0) (-9.0724e-64 -3.11955e-65 0) (-4.33668e-65 -1.46486e-66 0) (-2.03604e-66 -6.75796e-68 0) (-9.39149e-68 -3.06446e-69 0) (-4.25797e-69 -1.36625e-70 0) (-1.89806e-70 -5.99126e-72 0) (-8.32211e-72 -2.58526e-73 0) (-3.59022e-73 -9.87277e-75 0) (-1.52079e-74 3.34399e-76 0) (-6.07403e-76 3.40106e-76 0) (-3.11055e-77 9.30959e-77 0) (4.60264e-79 4.79234e-76 0) (3.0116e-77 5.88905e-77 0) (-1.77952e-77 -2.45294e-76 0) (8.73154e-34 2.71044e-35 0) (9.12303e-35 -3.41411e-35 0) (9.23032e-36 -4.52417e-36 0) (8.65451e-37 -4.55314e-37 0) (7.85533e-38 -4.03772e-38 0) (6.73019e-39 -3.39035e-39 0) (5.58179e-40 -2.69838e-40 0) (4.41815e-41 -2.07594e-41 0) (3.38902e-42 -1.53442e-42 0) (2.49921e-43 -1.10038e-43 0) (1.789e-44 -7.62488e-45 0) (1.23751e-45 -5.1366e-46 0) (8.3241e-47 -3.35643e-47 0) (5.4313e-48 -2.13605e-48 0) (3.45197e-49 -1.32241e-49 0) (2.13436e-50 -7.98665e-51 0) (1.28754e-51 -4.70303e-52 0) (7.57329e-53 -2.70569e-53 0) (4.35242e-54 -1.52055e-54 0) (2.44352e-55 -8.35957e-56 0) (1.34211e-56 -4.49632e-57 0) (7.21213e-58 -2.36866e-58 0) (3.79606e-59 -1.22237e-59 0) (1.95735e-60 -6.18485e-61 0) (9.89577e-62 -3.06896e-62 0) (4.90655e-63 -1.49447e-63 0) (2.38754e-64 -7.14394e-65 0) (1.14048e-65 -3.35415e-66 0) (5.351e-67 -1.5472e-67 0) (2.46665e-68 -7.01508e-69 0) (1.11766e-69 -3.12722e-70 0) (4.97924e-71 -1.37119e-71 0) (2.1819e-72 -5.91514e-73 0) (9.40669e-74 -2.50681e-74 0) (3.99281e-75 -1.01782e-75 0) (1.67896e-76 -2.8896e-77 0) (6.67247e-78 2.01868e-78 0) (3.39695e-79 1.88734e-77 0) (1.18561e-78 2.32208e-78 0) (-6.93867e-79 -9.71316e-78 0) (2.26469e-33 1.55725e-34 0) (2.38743e-34 8.71746e-36 0) (2.42922e-35 5.49986e-37 0) (2.29132e-36 4.02777e-38 0) (2.08875e-37 3.11759e-39 0) (1.79743e-38 2.46323e-40 0) (1.49586e-39 1.89265e-41 0) (1.18804e-40 1.4221e-42 0) (9.13879e-42 1.02973e-43 0) (6.75786e-43 7.25673e-45 0) (4.84888e-44 4.94499e-46 0) (3.36181e-45 3.28169e-47 0) (2.26588e-46 2.11348e-48 0) (1.48132e-47 1.32729e-49 0) (9.43141e-49 8.11216e-51 0) (5.84135e-50 4.84114e-52 0) (3.52924e-51 2.81798e-53 0) (2.079e-52 1.60368e-54 0) (1.19648e-53 8.91791e-56 0) (6.72624e-55 4.85405e-57 0) (3.69906e-56 2.58561e-58 0) (1.99019e-57 1.34952e-59 0) (1.04873e-58 6.90178e-61 0) (5.41355e-60 3.46195e-62 0) (2.73982e-61 1.70338e-63 0) (1.35986e-62 8.22736e-65 0) (6.62362e-64 3.90164e-66 0) (3.16699e-65 1.81774e-67 0) (1.48727e-66 8.32166e-69 0) (6.86198e-68 3.74536e-70 0) (3.11191e-69 1.65761e-71 0) (1.38753e-70 7.21702e-73 0) (6.0851e-72 3.09184e-74 0) (2.62554e-73 1.30564e-75 0) (1.11492e-74 5.53863e-77 0) (4.66112e-76 2.77444e-78 0) (1.91782e-77 2.3819e-79 0) (7.80313e-79 7.4089e-79 0) (7.61196e-80 9.05063e-80 0) (-2.5446e-80 -3.78759e-79 0) (4.07109e-34 2.24649e-34 0) (4.45204e-35 2.13887e-35 0) (4.64058e-36 1.94811e-36 0) (4.48138e-37 1.74036e-37 0) (4.15599e-38 1.47792e-38 0) (3.63581e-39 1.21778e-39 0) (3.06516e-40 9.59253e-41 0) (2.46459e-41 7.32678e-42 0) (1.91518e-42 5.38385e-43 0) (1.42995e-43 3.84135e-44 0) (1.03452e-44 2.64968e-45 0) (7.22898e-46 1.77766e-46 0) (4.90613e-47 1.15721e-47 0) (3.2285e-48 7.3392e-49 0) (2.06771e-49 4.52915e-50 0) (1.28785e-50 2.72733e-51 0) (7.82107e-52 1.60162e-52 0) (4.62988e-53 9.19083e-54 0) (2.67667e-54 5.15275e-55 0) (1.51129e-55 2.82652e-56 0) (8.34519e-57 1.51709e-57 0) (4.5075e-58 7.97619e-59 0) (2.38401e-59 4.10847e-60 0) (1.235e-60 2.07509e-61 0) (6.27153e-62 1.02794e-62 0) (3.12291e-63 4.99766e-64 0) (1.52586e-64 2.38535e-65 0) (7.31767e-66 1.11831e-66 0) (3.44647e-67 5.15136e-68 0) (1.5946e-68 2.33253e-69 0) (7.25114e-70 1.03847e-70 0) (3.24164e-71 4.54778e-72 0) (1.42527e-72 1.95953e-73 0) (6.1649e-74 8.30999e-75 0) (2.6242e-75 3.46982e-76 0) (1.09959e-76 1.42858e-77 0) (4.5364e-78 5.83617e-79 0) (1.84442e-79 5.23821e-80 0) (9.04879e-81 4.49636e-81 0) (-6.79302e-82 -1.49841e-80 0) ) ; boundaryField { leftWall { type fixedValue; value uniform (0 0 0); } rightWall { type fixedValue; value uniform (0 0 0); } lowerWall { type fixedValue; value uniform (0 0 0); } atmosphere { type pressureInletOutletVelocity; value nonuniform List<vector> 90 ( (0 -1.37594e-32 0) (0 -2.38767e-33 0) (0 -3.93076e-34 0) (0 -4.44518e-35 0) (0 -5.25898e-36 0) (0 -5.47225e-37 0) (0 -5.8246e-38 0) (0 -5.71114e-39 0) (0 -5.52913e-40 0) (0 -5.02311e-41 0) (0 -4.44714e-42 0) (0 -3.74455e-43 0) (0 -3.06337e-44 0) (0 -2.40515e-45 0) (0 -1.83493e-46 0) (0 -1.35165e-47 0) (0 -9.68586e-49 0) (0 -6.72994e-50 0) (0 -4.55551e-51 0) (0 -2.99922e-52 0) (0 -1.92589e-53 0) (0 -1.13581e-54 0) (-6.58002e-54 1.1645e-54 0) (-1.04356e-52 2.08304e-53 0) (-1.65851e-51 3.41695e-52 0) (-2.56966e-50 5.47549e-51 0) (-3.88144e-49 8.55707e-50 0) (-5.7017e-48 1.30471e-48 0) (-8.15042e-47 1.93575e-47 0) (-1.12967e-45 2.79763e-46 0) (-1.52054e-44 3.92325e-45 0) (-1.97661e-43 5.35052e-44 0) (-2.48985e-42 7.05395e-43 0) (-3.01234e-41 9.03019e-42 0) (-3.52404e-40 1.11175e-40 0) (-3.92747e-39 1.32785e-39 0) (-4.22582e-38 1.51428e-38 0) (-4.27531e-37 1.67803e-37 0) (-4.1764e-36 1.75988e-36 0) (-3.74592e-35 1.81372e-35 0) (-3.25453e-34 1.75819e-34 0) (-2.45801e-33 1.72687e-33 0) (-1.80174e-32 1.55841e-32 0) (-9.54509e-32 1.41134e-31 0) (-4.75356e-31 9.63628e-31 0) (1.0704e-32 5.37155e-30 0) (4.82296e-31 1.03099e-30 0) (1.07197e-31 1.61886e-31 0) (2.1465e-32 1.93942e-32 0) (3.16865e-33 2.27878e-33 0) (4.07109e-34 2.24649e-34 0) (4.45204e-35 2.13887e-35 0) (4.64058e-36 1.94811e-36 0) (4.48138e-37 1.74036e-37 0) (4.15599e-38 1.47792e-38 0) (3.63581e-39 1.21778e-39 0) (3.06516e-40 9.59253e-41 0) (2.46459e-41 7.32678e-42 0) (1.91518e-42 5.38385e-43 0) (1.42995e-43 3.84135e-44 0) (1.03452e-44 2.64968e-45 0) (7.22898e-46 1.77766e-46 0) (4.90613e-47 1.15721e-47 0) (3.2285e-48 7.3392e-49 0) (2.06771e-49 4.52915e-50 0) (1.28785e-50 2.72733e-51 0) (7.82107e-52 1.60162e-52 0) (4.62988e-53 9.19083e-54 0) (2.67667e-54 5.15275e-55 0) (1.51129e-55 2.82652e-56 0) (8.34519e-57 1.51709e-57 0) (4.5075e-58 7.97619e-59 0) (2.38401e-59 4.10847e-60 0) (1.235e-60 2.07509e-61 0) (6.27153e-62 1.02794e-62 0) (3.12291e-63 4.99766e-64 0) (1.52586e-64 2.38535e-65 0) (7.31767e-66 1.11831e-66 0) (3.44647e-67 5.15136e-68 0) (1.5946e-68 2.33253e-69 0) (7.25114e-70 1.03847e-70 0) (3.24164e-71 4.54778e-72 0) (1.42527e-72 1.95953e-73 0) (6.1649e-74 8.30999e-75 0) (2.6242e-75 3.46982e-76 0) (1.09959e-76 1.42858e-77 0) (4.5364e-78 5.83617e-79 0) (1.84442e-79 5.23821e-80 0) (9.04879e-81 4.49636e-81 0) (0 -1.49841e-80 0) ) ; } defaultFaces { type empty; } } // ************************************************************************* //
[ "johnathoncobabe@gmail.com" ]
johnathoncobabe@gmail.com
dd06bd541fdc49ea4ed01ed6e83953a333fd7797
7c9240f53aad5d0be468eb5cfd4fa2c92583aa1a
/SourceCodes/FBCaptureSDK/Audio/IAudioCapture.cpp
fb87c7cf5b1a5022bd216650b182e78778669e3f
[ "BSD-3-Clause" ]
permissive
facebookarchive/360-Capture-SDK
76ba6b865d12320754614b7bfec74a917a49011d
3a74ce2658984fa768fe803e77c56788dae4c9d9
refs/heads/master
2021-10-10T20:36:43.189478
2019-01-16T20:22:43
2019-01-16T20:22:43
86,860,847
26
18
null
null
null
null
UTF-8
C++
false
false
1,748
cpp
/* * Copyright (c) 2014, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * */ #include "IAudioCapture.h" namespace FBCapture { namespace Audio { HMMIO IAudioCapture::file_ = {}; IAudioCapture::IAudioCapture() { // Riff chunk ckRIFF_.ckid = MAKEFOURCC('R', 'I', 'F', 'F'); ckRIFF_.fccType = MAKEFOURCC('W', 'A', 'V', 'E'); // fmt chunk ckFMT_.ckid = MAKEFOURCC('f', 'm', 't', ' '); // data chunk ckData_.ckid = MAKEFOURCC('d', 'a', 't', 'a'); } FBCAPTURE_STATUS IAudioCapture::closeCaptureFile() { if (file_) { auto cleanupHandler = [](HMMIO__* ptr) { mmioClose(ptr, 0); file_ = nullptr; }; auto filePtr = std::unique_ptr<HMMIO__, decltype(cleanupHandler)>(file_, cleanupHandler); MMRESULT hr; hr = mmioAscend(filePtr.get(), &ckData_, 0); if (MMSYSERR_NOERROR != hr) { DEBUG_LOG_VAR("Failed to ascend out of a chunk in a RIFF file. [Error code] ", to_string(hr)); return FBCAPTURE_STATUS_RELEASING_WAV_FAILED; } hr = mmioAscend(filePtr.get(), &ckRIFF_, 0); if (MMSYSERR_NOERROR != hr) { DEBUG_LOG_VAR("Failed to ascend out of a chunk in a Data file. [Error code] ", to_string(hr)); return FBCAPTURE_STATUS_RELEASING_WAV_FAILED; } DEBUG_LOG("Released wave file resources"); } needToCloseCaptureFile = false; needToOpenCaptureFile = true; return FBCAPTURE_STATUS_OK; } } }
[ "homin.lee@oculus.com" ]
homin.lee@oculus.com
96cd56b732b25a1353e917fde001ddc23764cdd7
afc067cc21eb8058a93e9c4f9af1d648e22ce9b8
/hyphy-src/src/core/category.cpp
369b7c695e3c350092eb128abb04b87fba5a6b27
[ "MIT" ]
permissive
veg/hyphy-python
76c0ea7d6a6a30735903b1182327762d64cc104a
6f3e2d19bafe27d0b8a6626201a3326022010811
refs/heads/master
2023-05-25T19:00:26.404623
2023-05-15T19:17:33
2023-05-15T19:17:33
39,527,089
0
1
NOASSERTION
2023-05-25T02:19:32
2015-07-22T19:52:43
C++
UTF-8
C++
false
false
44,699
cpp
/* HyPhy - Hypothesis Testing Using Phylogenies. Copyright (C) 1997-now Core Developers: Sergei L Kosakovsky Pond (spond@ucsd.edu) Art FY Poon (apoon@cfenet.ubc.ca) Steven Weaver (sweaver@ucsd.edu) Module Developers: Lance Hepler (nlhepler@gmail.com) Martin Smith (martin.audacis@gmail.com) Significant contributions from: Spencer V Muse (muse@stat.ncsu.edu) Simon DW Frost (sdf22@cam.ac.uk) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include "category.h" #include "math.h" #ifdef __HYPHYDMALLOC__ #include "dmalloc.h" #endif //___________________________________________________________________________________________ _String defaultEqual ("EQUAL"), medianRep ("MEDIAN"), scaledMedianRep ("SCALED_MEDIAN"), maxCatIvals ("MAX_CATEGORY_INTERVALS"), constantOnPartition ("CONSTANT_ON_PARTITION"); _Parameter maxCategoryIntervals = 100.0; #ifdef _SLKP_LFENGINE_REWRITE_ #define SLIGHT_SHIFT 0. #else #define SLIGHT_SHIFT 1e-150 #endif _Variable *_x_ = nil, *_n_ = nil; extern _List modelNames; extern _SimpleList modelMatrixIndices, modelFrequenciesIndices; bool CheckEqual (_Parameter, _Parameter); //___________________________________________________________________________________________ _CategoryVariable::_CategoryVariable (_String& name, _List* parms, _VariableContainer* theP):_Variable (name) { values = intervalEnds = weights = conditionalWeights = nil; hiddenMarkovModel = HY_NO_MODEL; flags = 0; covariant = -1; intervalSplitter = -1; Construct (*parms, theP); } //___________________________________________________________________________________________ bool _CategoryVariable::checkWeightMatrix(_Matrix& w, long row) { bool check = true; _Constant iterate; _Parameter sumCheck = 0; if (row>=0) { long shift = w.GetVDim()*row; for (long i=0; i<intervals; i++) { sumCheck+=w[shift+i]; } if (fabs(sumCheck-1.0)>=1e-8) { if (sumCheck<1.0) { sumCheck = 1.0/sumCheck; } for (long k=0; k<intervals; k++) { w[shift+k]/=sumCheck; } } } else { for (long i=0; i<intervals; i++) { sumCheck+=w.theData[i]; } if (fabs(sumCheck-1.0)>=1e-8) { if (sumCheck<1.0) { sumCheck = 1.0/sumCheck; } for (long k=0; k<intervals; k++) { w.theData[k]/=sumCheck; } } } return check; } //___________________________________________________________________________________________ void _CategoryVariable::Construct (_List& parameters, _VariableContainer *theP) // main workhorse constructor // expects a list of strings containing the following // number of intervals // types of representation (MEAN or MEDIAN) // probability weight formula or "EQUAL" // probability density function (must contain at least _x_) // (optional) cumulative distribution f-n (must contain at least _x_) // range for _x_ { _String xname ("_x_"); if (_hyApplicationGlobals.Find (&xname) < 0) { _hyApplicationGlobals.Insert (new _String (xname)); } _x_ = CheckReceptacle (&xname,empty,false,false); xname = "_n_"; if (_hyApplicationGlobals.Find (&xname) < 0) { _hyApplicationGlobals.Insert (new _String (xname)); } _n_ = CheckReceptacle (&xname,empty,false,false); _String errorMsg = _String ("While attempting to construct category variable ") & *GetName() & ": "; _SimpleList scannedVarsList, variableDependanceAllocationsAux; _AVLListXL variableDependanceAllocations (&variableDependanceAllocationsAux); bool check, covariantVar = false; long f; Clear(); // clear this variable if needed checkParameter (maxCatIvals, maxCategoryIntervals, 100); // set up the number of intervals and the matrices _String* param = (_String*)parameters(0); intervals = ProcessNumericArgument(param,theP); if (intervals<=0) { WarnError (errorMsg & _String("Category variable must have a positive number of classes - had ") & *param); return; } if (intervals>maxCategoryIntervals) { intervals = maxCategoryIntervals; errorMsg = errorMsg & _String("Category variable cannot have more than ")&maxCatIvals&" classes - had " & *param&". Reset to "& _String(intervals); ReportWarning (errorMsg); } checkPointer(values = new _Matrix (intervals, 1, false, true)); checkPointer(intervalEnds = new _Matrix (intervals, 1, false, true)); checkPointer(weights = new _Matrix (intervals, 1, false, true)); // construct the formula for interval weights param = (_String*)parameters (1); check = false; if (!param->Equal(&defaultEqual)) // do something here, otherwise they are just equal { _String splitterName (AppendContainerName(*param,theP)); f = LocateVarByName (splitterName); if (f>=0 && FetchVar(f)->IsCategory()) { _CategoryVariable * iSplitter = (_CategoryVariable*)FetchVar(f); if (!CheckEqual (iSplitter->GetMinX(),SLIGHT_SHIFT) || !CheckEqual (iSplitter->GetMaxX(),1.0) || theName->Equal(&splitterName) || (intervals = iSplitter->GetNumberOfIntervals()+1) < 2) { WarnError (errorMsg & _String("Category variables which specify interval splitting options must be supported on [0,1], and not result in circular dependance")); return; } intervalSplitter = iSplitter->GetAVariable(); _AVLList ivl (&scannedVarsList); iSplitter->ScanForVariables (ivl, true); ivl.ReorderList(); DeleteObject (values); DeleteObject (intervalEnds); DeleteObject (weights); checkPointer(values = new _Matrix (intervals, 1, false, true)); checkPointer(intervalEnds = new _Matrix (intervals, 1, false, true)); checkPointer(weights = new _Matrix (intervals, 1, false, true)); check = true; } else { _Formula probabilities(*param,theP); { _AVLList sv (&scannedVarsList); probabilities.ScanFForVariables (sv, true); sv.ReorderList(); } _Matrix *tryMatrix = (_Matrix*)probabilities.GetTheMatrix(); // check to see if it is a matrix spec if (tryMatrix) { _Matrix* weightMatrix = (_Matrix*)tryMatrix; if (!( ((weightMatrix->GetHDim()==1)&&(weightMatrix->GetVDim()==intervals))|| ((weightMatrix->GetHDim()==intervals)&&(weightMatrix->GetVDim()==1)))) { if (weightMatrix->GetVDim() == intervals) // covariance structure here { if (weightMatrix->GetHDim() > 1) { check = true; covariantVar = true; if (weightMatrix->IsIndependent()) for (long k=0; check && (k<weightMatrix->GetHDim()); k++) { check = check && checkWeightMatrix (*weightMatrix, k); } if (check) { weights->Duplicate(weightMatrix); } } else { check = false; } } else { check = false; } } else // indepenent category variable { if (weightMatrix->IsIndependent()) { check=checkWeightMatrix(*weightMatrix); } else { for (long k = 0; k < weightMatrix->GetHDim() * weightMatrix->GetVDim (); k++) { _Formula* thisCell = weightMatrix->GetFormula (k,-1); if (thisCell) { _SimpleList probVars; _AVLList sv (&probVars); thisCell->ScanFForVariables (sv, true); sv.ReorderList(); for (long v = 0; v < probVars.lLength; v++) { long f = variableDependanceAllocations.Find ((BaseRef)probVars.lData[v]); if (f < 0) { f = variableDependanceAllocations.Insert ((BaseRef)probVars.lData[v], (long)(new _SimpleList (intervals,0,0)),false); } ((_SimpleList*) variableDependanceAllocations.GetXtra (f))->lData[k] = 1; } } } check = true; } if (check) { weights->Duplicate(weightMatrix); } } } else { if (scannedVarsList.lLength) { if(scannedVarsList.lLength==1) { if (scannedVarsList[0]==_n_->GetAVariable()) { check = true; for (unsigned long i=0; i<intervals; i++) { _n_->SetValue(new _Constant ((_Parameter)i), false); (*weights)[i]= probabilities.Compute()->Value(); } check = checkWeightMatrix (*weights); } } if (!check) { errorMsg = errorMsg & _String("Interval weights must be specified in terms of _n_."); ReportWarning (errorMsg); } scannedVarsList.Clear(); } } } } else { for (long i=0; i<intervals; i++) { (*weights)[i] = 1.0/intervals; } check = true; } if (!check) { ReportWarning (errorMsg & _String("Invalid weight matrix for a category variable. Reset to EQUAL")); covariantVar = false; for (long i=0; i<intervals; i++) { (*weights)[i] = 1.0/intervals; } } // set the representation mode param = (_String*)parameters(2); if (medianRep.Equal(param)) { representation = MEDIAN; } else if (scaledMedianRep.Equal(param)) { representation = SCALED_MEDIAN; } else { representation = MEAN; } // get the probability density param = (_String*)parameters(3); if (!covariantVar) { _FormulaParsingContext fpc (nil, theP); Parse (&density, *param, fpc, nil); // check if the formula is good } if (!density.IsEmpty()) { if (covariantVar) { errorMsg = errorMsg & "Continuous distributions are not supported by non-independent category variables - specify a discrete range."; WarnError (errorMsg); return; } { _SimpleList densityVars, existingVars (scannedVarsList); _AVLList sv (&densityVars); density.ScanFForVariables (sv, true); sv.ReorderList(); scannedVarsList.Union (densityVars,existingVars); } f = scannedVarsList.Find(_x_->GetAVariable()); if (f!=-1) { // no dummy variable check = true; scannedVarsList.Delete(f); } else { //scannedVars.Clear(); check = false; } // get the cumulative probability param = (_String*)parameters(4); if (!param->Length()) { // no cumul. dist'n specified - integration is yet to be implemented ReportWarning (errorMsg & _String("Runtime integration of probability density can be _very_ slow - please provide the analytic form for cumulative distribution if known.")); } else { if(check) { _FormulaParsingContext fpc (nil, theP); Parse(&cumulative,*param,fpc, nil); { _SimpleList densityVars, existingVars (scannedVarsList); _AVLList sv (&densityVars); cumulative.ScanFForVariables (sv, true); sv.ReorderList(); scannedVarsList.Union (densityVars,existingVars); } f = scannedVarsList.BinaryFind(_x_->GetAVariable()); if (f<0) { // no dummy variable WarnError (errorMsg & _String("Cumulative distribution must be specified in terms of _x_. Had:")&*param); return; } else { scannedVarsList.Delete(f); } } } // get the bounds here param = (_String*)parameters(5); x_min = param->toNum()+SLIGHT_SHIFT; param = (_String*)parameters(6); x_max = param->toNum()-SLIGHT_SHIFT; if (x_max<=x_min) { errorMsg = errorMsg & _String("Bad variable bounds. Had:")&*(_String*)parameters(5)&" and "&*param; WarnError (errorMsg); return; } if (x_max >= INFINITE_BOUND) { x_max = INFINITE_BOUND; } if (!check) { // uniform distribution if (x_max==INFINITE_BOUND) { WarnError ( errorMsg & _String("Can't have uniform distributions over infinite intervals. ")); return; } else { errorMsg = errorMsg & _String("Since density ")&*(_String*)parameters(3)& " contains no _x_, the distribution was set to uniform over ["&_String(x_min)&","&_String(x_max)&"]"; ReportWarning (errorMsg); density.Clear(); _Parameter dns = 1.0/(x_max-x_min); errorMsg = _String(dns); _FormulaParsingContext fpc; Parse(&density, errorMsg,fpc, nil); errorMsg = _String(dns)&"*(_x_-"&_String(x_min)&")"; Parse(&cumulative, errorMsg,fpc, nil); } } } else { // enumerated interval parameters x_min = 0.; x_max = 1.; // expect a matrix for the cumulative distribution if (covariantVar) { param = (_String*)parameters(3); _String splitterName (AppendContainerName(*param,theP)); f = LocateVarByName (splitterName); check = true; if (f>=0) { _Variable * cbase = FetchVar (f); if (cbase->IsCategory()) { check = ((_CategoryVariable*)cbase)->IsUncorrelated(); } else { check = false; } } else { check = false; } if (!check) { errorMsg = errorMsg & *param & " must be the identifier of an existing, independent category variable."; WarnError (errorMsg); return; } else { covariant = variableNames.GetXtra (f); if (((_CategoryVariable*)FetchVar (f))->GetNumberOfIntervals() != weights->GetHDim()) { errorMsg = errorMsg & *param & " is incompatible with the conditional probability matrix for " & *GetName() &". The number of possible values of " & *param &" must match the row count of the matrix."; WarnError (errorMsg ); return; } } } param = (_String*)parameters(4); _Formula cumulative(*param,theP); { _SimpleList densityVars, existingVars (scannedVarsList); _AVLList sv (&densityVars); cumulative.ScanFForVariables (sv, true); sv.ReorderList(); scannedVarsList.Union (densityVars,existingVars); } // check to see if it is a matrix spec _PMathObj tryMatrix = cumulative.GetTheMatrix(); if (tryMatrix) { _Matrix* catMatrix = (_Matrix*)tryMatrix; if (!( ((catMatrix->GetHDim()==1)&&(catMatrix->GetVDim()==intervals))|| ((catMatrix->GetHDim()==intervals)&&(catMatrix->GetVDim()==1)))) { check = false; errorMsg = errorMsg & ("Dimension of category representatives matrix is not the same as the number of categories"); WarnError (errorMsg ); return; } else { values->Duplicate(catMatrix); if (!catMatrix->IsIndependent()) { // not a constant matrix for (long k = 0; k < catMatrix->GetHDim() * catMatrix->GetVDim (); k++) { _Formula* thisCell = catMatrix->GetFormula (k,-1); if (thisCell) { _SimpleList densityVars, existingVars (scannedVarsList); _AVLList sv (&densityVars); thisCell->ScanFForVariables (sv, true); sv.ReorderList(); for (long v = 0; v < densityVars.lLength; v++) { long f = variableDependanceAllocations.Find ((BaseRef)densityVars.lData[v]); if (f < 0) { f = variableDependanceAllocations.Insert ((BaseRef)densityVars.lData[v], (long)(new _SimpleList (intervals,0,0)),false); } ((_SimpleList*) variableDependanceAllocations.GetXtra (f))->lData[k] = 1; } scannedVarsList.Union (densityVars,existingVars); } } } } } else { WarnError (errorMsg & ("Expected an explicit enumeration of category representatives in place of cumulative distribution. Had:") & _String((_String*)cumulative.toStr()) ); return; } } // disallow category -> category dependance for (long i=0; i<scannedVarsList.lLength; i++) { _Variable * curVar = (_Variable*)variablePtrs (scannedVarsList.lData[i]); if (curVar->IsCategory()) { errorMsg = errorMsg & _String("Can't have a category variable depend on a category variable."); WarnError (errorMsg); return; } } hiddenMarkovModel = HY_NO_MODEL; parameterList.Duplicate (&scannedVarsList); // finally go thru all the variables and put them where they belong in dependance containers _SimpleList exclude; if (parameters.countitems()>7) { // aux mean formula param = (_String*)parameters(7); _FormulaParsingContext fpc (nil, theP); Parse (&meanC,*param,fpc, nil); if (parameters.lLength>8) { _String hmmModelName = AppendContainerName(*(_String*)parameters(8),theP); f = FindModelName(hmmModelName); if (f==-1) { if (constantOnPartition.Equal ((_String*)parameters (8))) { flags = CONSTANT_ON_PARTITION; } else { WarnError (errorMsg & (*(_String*)parameters(8))& " is not an existing model identifier in call to 'category'"); return; } } else { if (covariantVar) { WarnError (errorMsg & "Non-independent random variables can't also be hidden Markov."); return; } long mindex = f; _Matrix * hmm, * freq; bool mbf; RetrieveModelComponents (mindex, hmm, freq, mbf); mbf = false; if (hmm) { f = weights->GetHDim()*weights->GetVDim(); if (hmm->GetHDim()==f && hmm->GetVDim()==f) { _SimpleList hmmVars, existingVars (parameterList); _AVLList sv (&hmmVars); hmm->ScanForVariables (sv,true); freq->ScanForVariables (sv,true); sv.ReorderList(); parameterList.Union (hmmVars,existingVars); exclude.Subtract (hmmVars,existingVars); hiddenMarkovModel = mindex; mbf = true; } } if (!mbf) { WarnError (errorMsg & (*(_String*)parameters(8))& " is not a valid HMM-component model (square matrix of dimension "&_String (f) & ") identifier in call to 'category'"); } } } } for (long vid = 0; vid < parameterList.lLength; vid ++) { long vf = variableDependanceAllocations.Find ((BaseRef)parameterList.lData[vid]); if (vf >= 0) { affectedClasses << (_SimpleList*)(variableDependanceAllocations.GetXtra (vf)); } else if (exclude.Find (parameterList.lData[vid]) >= 0) { affectedClasses.AppendNewInstance (new _SimpleList (intervals,0,0)); } else { affectedClasses.AppendNewInstance (new _SimpleList (intervals,1,0)); } _String vlog = _String ("Variable ") & *LocateVar(parameterList.lData[vid])->GetName() & " mapped to class " & _String(((_String*)affectedClasses(vid)->toStr())); ReportWarning (vlog); } if (covariant >= 0) { conditionalWeights = new _Matrix (intervals, 1, false, true); } /*{ _SimpleList tl; _AVLList test (&tl); ScanForVariables (test, true); _String str (128L, true); _SimpleList hist; long ls, cn; cn = test.Traverser (hist,ls,test.GetRoot()); while (cn>=0) { long keyVal = (long)test.Retrieve (cn); str << *LocateVar(keyVal)->GetName(); if (LocateVar(keyVal)->IsGlobal()) str << " Global"; str << '\n'; cn = test.Traverser (hist,ls); } StringToConsole (str); }*/ } //___________________________________________________________________________________________ bool _CategoryVariable::IsUncorrelated (void) { return covariant == -1; } //___________________________________________________________________________________________ bool _CategoryVariable::IsLayered (void) { return intervalSplitter >= 0; } //___________________________________________________________________________________________ void _CategoryVariable::ChangeNumberOfIntervals (long newi) { if (newi==intervals) { return; } DeleteObject (values); DeleteObject (intervalEnds); DeleteObject (weights); intervals = newi; values = new _Matrix (intervals, 1, false, true); intervalEnds = new _Matrix (intervals, 1, false, true); weights = new _Matrix (intervals, 1, false, true); checkPointer(values); checkPointer(intervalEnds); checkPointer(weights); covariant = -1; intervalSplitter = -1; for (long i=0; i<intervals; i++) { (*weights)[i] = 1.0/intervals; } UpdateIntervalsAndValues(); } //___________________________________________________________________________________________ BaseRef _CategoryVariable::makeDynamic(void) { _CategoryVariable* result = new _CategoryVariable(); checkPointer(result); result->Duplicate(this); return result; } //___________________________________________________________________________________________ void _CategoryVariable::Duplicate(BaseRef s) { _CategoryVariable* cv = (_CategoryVariable*)s; Clear(); intervals = cv->intervals; density.Duplicate ((BaseRef)&cv->density); cumulative.Duplicate ((BaseRef)&cv->cumulative); meanC.Duplicate ((BaseRef)&cv->meanC); representation = cv->representation; x_min = cv->x_min; x_max = cv->x_max; if (cv->values) { values = (_Matrix*)cv->values->makeDynamic(); } else { values = nil; } if (cv->intervalEnds) { intervalEnds = (_Matrix*)cv->intervalEnds->makeDynamic(); } else { intervalEnds = nil; } if (cv->weights) { weights = (_Matrix*)cv->weights->makeDynamic(); } else { weights = nil; } if (cv->conditionalWeights) { conditionalWeights = (_Matrix*)cv->conditionalWeights->makeDynamic(); } else { conditionalWeights = nil; } covariant = cv->covariant; intervalSplitter = cv->intervalSplitter; hiddenMarkovModel = cv->hiddenMarkovModel; flags = cv->flags; parameterList.Duplicate (&cv->parameterList); affectedClasses.Duplicate (&cv->affectedClasses); this->_Variable::Duplicate (s); } //___________________________________________________________________________________________ void _CategoryVariable::Clear (void) { density.Clear (); cumulative.Clear (); DeleteObject (values); DeleteObject (intervalEnds); DeleteObject (weights); DeleteObject (conditionalWeights); covariant = -1; intervalSplitter = -1; hiddenMarkovModel = HY_NO_MODEL; flags = 0; parameterList.Clear(); affectedClasses.Clear(); } //___________________________________________________________________________________________ BaseRef _CategoryVariable::toStr (void) { UpdateIntervalsAndValues(true); _String result (10,true), *s, st; if (weights) { st = "\nClass weights are:"; result<<&st; _Matrix* cw =(_Matrix*)weights->ComputeNumeric(); checkWeightMatrix(*cw); s = (_String*)cw->toStr(); result<<s; result<<'\n'; DeleteObject(s); } if (values) { st = "Classes represented by:"; result<<&st; s = (_String*)values->toStr(); result<<s; DeleteObject(s); } if (intervalEnds) { st = "Interval ends:"; result<<&st; s = (_String*)intervalEnds->toStr(); result<<s; DeleteObject(s); } if (!density.IsEmpty()) { result << "\nSupported on ["; result << _String(x_min); result << ','; result << _String(x_max); result << "]\n"; } result.Finalize(); return result.makeDynamic(); } //___________________________________________________________________________________________ _Parameter _CategoryVariable::SetIntervalValue (long ival, bool recalc) { _Parameter newIntervalValue; if (recalc) { newIntervalValue = GetValues()->theData[ival]; } else { newIntervalValue = ((_Matrix*)values->RetrieveNumeric())->theData[ival]; } SetValue (new _Constant(newIntervalValue),false); return newIntervalValue; } //___________________________________________________________________________________________ _Parameter _CategoryVariable::GetIntervalValue (long ival) { if (values) { return GetValues()->theData[ival]; } else { return 0.0; } } //___________________________________________________________________________________________ _Parameter _CategoryVariable::GetIntervalWeight (long ival) { if (weights) { if (covariant >= 0 || intervalSplitter >= 0) { return GetWeights()->theData[ival]; } if (weights->IsIndependent()) { return ((_Matrix*)weights->ComputeNumeric())->theData[ival]; } else { _Matrix* cw = ((_Matrix*)weights->ComputeNumeric()); checkWeightMatrix(*cw); return cw->theData[ival]; } } else { return 0.0; } } //___________________________________________________________________________________________ _Matrix* _CategoryVariable::GetValues (void) { return (_Matrix*)values->ComputeNumeric(); } //___________________________________________________________________________________________ long _CategoryVariable::GetCurrentState (void) { _Matrix *v = GetValues(); _Parameter cv = Compute()->Value(); for (long res = 0; res < intervals; res ++) if (CheckEqual (cv, v->theData[res])) { return res; } return 0; } //___________________________________________________________________________________________ _Matrix* _CategoryVariable::GetWeights (bool covAll) { _Matrix * cw; if (intervalSplitter>=0) { _CategoryVariable * iSplitter = (_CategoryVariable*)LocateVar (intervalSplitter); cw = iSplitter->GetValues(); _Parameter minusMe = 0.0; for (long k=0; k<intervals-1; k++) { weights->theData[k] = cw->theData[k] - minusMe; minusMe = cw->theData[k]; } weights->theData[intervals-1] = 1.-minusMe; return weights; } if (weights->IsIndependent()) { cw = (_Matrix*)weights->ComputeNumeric(); } else { cw = ((_Matrix*)weights->ComputeNumeric()); if (covariant < 0) { checkWeightMatrix(*cw); } } if (covariant >= 0) { _CategoryVariable * cv = (_CategoryVariable*)LocateVar (covariant); if (covAll) { long iv2 = cv->GetNumberOfIntervals(); for (long m=0; m<iv2; m++) { checkWeightMatrix (*cw, m); } _Matrix * cw2 = cv->GetWeights (); for (long k=0; k<intervals; k++) { _Parameter sum = 0.0; for (long j=0; j<iv2; j++) { sum += cw2->theData[j]* (*cw)(j,k); } conditionalWeights->theData[k] = sum; } cw = conditionalWeights; } else { long rowIdx = cv->GetCurrentState()*cw->GetVDim(); for (long k=0; k<intervals; k++) { conditionalWeights->theData[k] = cw->theData[rowIdx+k]; } cw = conditionalWeights; checkWeightMatrix (*cw); } } return cw; } //___________________________________________________________________________________________ _Matrix* _CategoryVariable::GetIntervalEnds (void) { return (_Matrix*)intervalEnds->ComputeNumeric(); } //___________________________________________________________________________________________ _Matrix* _CategoryVariable::ComputeHiddenMarkov (void) { _Variable* theMX = LocateVar (modelMatrixIndices.lData[hiddenMarkovModel]); return (_Matrix*)((_Matrix*)theMX->GetValue())->ComputeNumeric(); } //___________________________________________________________________________________________ _Matrix* _CategoryVariable::ComputeHiddenMarkovFreqs (void) { long fIndex = modelFrequenciesIndices.lData[hiddenMarkovModel]; if (fIndex<0) { fIndex = -fIndex-1; } _Variable* theMX = LocateVar (fIndex); return (_Matrix*)((_Matrix*)theMX->GetValue())->ComputeNumeric(); } //___________________________________________________________________________________________ _Matrix* _CategoryVariable::GetHiddenMarkov (void) { _Variable* theMX = LocateVar (modelMatrixIndices.lData[hiddenMarkovModel]); return (_Matrix*)theMX->GetValue(); } //___________________________________________________________________________________________ _Matrix* _CategoryVariable::GetHiddenMarkovFreqs (void) { long fIndex = modelFrequenciesIndices.lData[hiddenMarkovModel]; if (fIndex<0) { fIndex = -fIndex-1; } _Variable* theMX = LocateVar (fIndex); return (_Matrix*)theMX->GetValue(); } //___________________________________________________________________________________________ bool _CategoryVariable::HaveParametersChanged (long catID) { for (unsigned long i=0; i<parameterList.lLength; i++) { _Variable * p = LocateVar(parameterList.lData[i]); if (p->HasChanged()) if (catID == -1 || ((_SimpleList**)affectedClasses.lData)[i]->lData[catID]) { return true; } } return false; } //___________________________________________________________________________________________ bool _CategoryVariable::IsConstant (void) { for (unsigned long i=0; i<parameterList.lLength; i++) if (LocateVar(parameterList.lData[i])->IsConstant() == false) { return false; } return true; } //___________________________________________________________________________________________ bool _CategoryVariable::IsGlobal (void) { return true; } //___________________________________________________________________________________________ void _CategoryVariable::ScanForVariables (_AVLList& l, bool globals, _AVLListX * tagger, long weight) { density.ScanFForVariables(l,true, false, true, false, tagger, weight); weights->ScanForVariables(l,true,tagger, weight); values->ScanForVariables(l,true,tagger, weight); if (hiddenMarkovModel != HY_NO_MODEL) { GetHiddenMarkov()->ScanForVariables (l,true, tagger, weight); GetHiddenMarkovFreqs()->ScanForVariables (l,true, tagger, weight); } if (intervalSplitter != HY_NO_MODEL) { LocateVar(intervalSplitter)->ScanForVariables (l, globals, tagger, weight); } if (globals) { l.Delete ((BaseRef)(_x_->GetAVariable())); } } //___________________________________________________________________________________________ void _CategoryVariable::ScanForGVariables (_AVLList& l) { _SimpleList temp; { _AVLList tempA (&temp); density.ScanFForVariables(tempA,true); weights->ScanForVariables(tempA,true); values->ScanForVariables(tempA,true); if (hiddenMarkovModel != HY_NO_MODEL) { GetHiddenMarkov()->ScanForVariables (tempA,true); GetHiddenMarkovFreqs()->ScanForVariables (tempA,true); } tempA.ReorderList(); } long xi = _x_->GetAVariable(); for (long i=0; i<temp.lLength; i++) { if (temp.lData[i]!=xi) { _Variable* theV = LocateVar(temp.lData[i]); if (theV->IsGlobal()&& theV->IsIndependent()) { l.Insert ((BaseRef)temp.lData[i]); } } } } //___________________________________________________________________________________________ _Parameter _CategoryVariable::Mean (void) { _Parameter mean = 0.; _Matrix * wts = GetWeights(), * val = GetValues(); for (long ii = 0; ii < intervals; ii++) { mean += wts->theData[ii] * val->theData[ii]; } return mean; } //___________________________________________________________________________________________ bool _CategoryVariable::UpdateIntervalsAndValues (bool force) { if (density.IsEmpty()) { return false; } long i=0; if (intervalSplitter >= 0) { force = ((_CategoryVariable*)LocateVar(intervalSplitter))->UpdateIntervalsAndValues(force); } if (!force) { force = density.HasChanged(); if (!force) { force = (*values)[0]==0.0; } } if (force) { // stuff to do _Matrix* ew; if (intervalSplitter >= 0) { ew = GetWeights(); } else { ew = (_Matrix*)weights->ComputeNumeric(); } if (!weights->IsIndependent() && !checkWeightMatrix(*ew)) { WarnError (_String("Matrix of category weights invalid at runtime: ") & _String((_String*)ew->toStr())); } _Parameter currentBase = 0.0, currentLeft = x_min; for (i = 0; i<intervals-1; i++) { _Parameter currentProb = (*ew)[i]; currentBase+=currentProb; if (!cumulative.IsEmpty()) { (*intervalEnds)[i] = cumulative.Newton (density, currentBase, currentLeft,x_max, _x_); // get the next interval point } else { (*intervalEnds)[i] = density.Newton ( _x_, currentBase,x_min, currentLeft); // get the next interval point } if (currentProb) { if (representation == MEAN) { // compute the MEAN // need to perform integration here of p(x) dx if (meanC.IsEmpty()) { values->theData[i] = density.MeanIntegral (_x_,currentLeft,(*intervalEnds)[i])/(*ew)[i]; } else { _Constant currentRight ((*intervalEnds)[i]); _x_->SetValue(&currentRight); values->theData[i] = meanC.Compute()->Value(); currentRight.SetValue(currentLeft); _x_->SetValue(&currentRight); values->theData[i] = x_min+((*values)[i]- meanC.Compute()->Value())/(*ew)[i]; if (values->theData[i]>x_max) { values->theData[i] = x_max; } if (i) { if (values->theData[i]<intervalEnds->theData[i-1]) { values->theData[i]=intervalEnds->theData[i-1]; } } else if (values->theData[i]<x_min) { values->theData[i]=x_min; } } } else { // compute the MEDIAN if (!cumulative.IsEmpty()) { (*values)[i] = cumulative.Newton (density,currentBase-(*ew)[i]/2, currentLeft, x_max ,_x_); } else { (*values)[i] = density.Newton (_x_, currentBase-(*ew)[i]/2,x_min, currentLeft); } } } else { (*values)[i] = (*intervalEnds)[i]; } currentLeft = (*intervalEnds)[i]; } // finally do something special for the last interval, since it may be over (a,infinity) _Parameter lastProb = (*ew)[i]; if (lastProb) { if (representation == MEAN) { // compute the MEAN // need to perform integration here of p(x) dx if (meanC.IsEmpty()) { (*values)[i] = density.MeanIntegral (_x_,currentLeft,(*intervalEnds)[i],true)/(*ew)[i]; } else { _Constant currentRight (x_max); _x_->SetValue(&currentRight); values->theData[i] = meanC.Compute()->Value(); currentRight.SetValue(currentLeft); _x_->SetValue(&currentRight); values->theData[i] = x_min+((*values)[i]- meanC.Compute()->Value())/(*ew)[i]; if (values->theData[i]>x_max) { values->theData[i] = x_max; } if (i) { if (values->theData[i]<intervalEnds->theData[i-1]) { values->theData[i]=intervalEnds->theData[i-1]; } } else { if (values->theData[i]<x_min) { values->theData[i]=x_min; } } } } else { // compute the MEDIAN if (!cumulative.IsEmpty()) { (*values)[i] = cumulative.Newton (density,currentBase+(*ew)[i]/2, currentLeft, x_max, _x_); } else { (*values)[i] = density.Newton (_x_, currentBase+(*ew)[i]/2,x_min, currentLeft); } } } else { (*values)[i] = currentLeft; } if (representation == SCALED_MEDIAN) { _Parameter distMean,discMean = 0; if (meanC.IsEmpty()) { distMean = density.MeanIntegral (_x_,x_min,x_max, true); } else { _Constant currentRight (x_max); _x_->SetValue(&currentRight); distMean = meanC.Compute()->Value(); } for (i=0; i<intervals; i++) { discMean +=(*values)[i]*(*ew)[i]; } discMean = distMean/discMean; for (i=0; i<intervals; i++) { (*values)[i]*=discMean; } } } _x_->MarkDone(); return force; } //___________________________________________________________________________________________ void _CategoryVariable::SerializeCategory (_String& rec) { _String weightNames = *GetName()&'.'&"weights", catNames = *GetName()&'.'&"points", *theFS; if (intervalSplitter>=0) { ((_CategoryVariable*)LocateVar(intervalSplitter))->SerializeCategory(rec); } bool hasDensity = (!density.IsEmpty()); rec << '\n'; if (intervalSplitter==-1) { weights->Serialize (rec, weightNames); } rec << '\n'; if (!hasDensity) { values->Serialize (rec, catNames); } rec << '\n'; if (hiddenMarkovModel != HY_NO_MODEL) { SerializeModel (rec,hiddenMarkovModel); } rec << "\ncategory "; rec << *GetName(); rec << "=("; rec << _String ((long)intervals); rec << ','; if (intervalSplitter==-1) { rec << weightNames; } else { rec << LocateVar(intervalSplitter)->GetName(); } rec << ','; switch (representation) { case MEDIAN: rec << medianRep; break; case SCALED_MEDIAN: rec << scaledMedianRep; break; default: rec << "MEAN"; break; } rec << ','; if (hasDensity) { theFS = (_String*)density.toStr(); rec << *theFS; DeleteObject (theFS); rec << ','; theFS = (_String*)cumulative.toStr(); rec << *theFS; DeleteObject (theFS); } else { if (IsUncorrelated()) { rec << ','; } else { rec << LocateVar (covariant)->GetName(); rec << ','; } rec << catNames; } rec << ','; rec << _String(x_min-SLIGHT_SHIFT); rec << ','; rec << _String(x_max+SLIGHT_SHIFT); rec << ','; theFS = (_String*)meanC.toStr(); rec << *theFS; DeleteObject (theFS); if ((hiddenMarkovModel != HY_NO_MODEL)||(flags&CONSTANT_ON_PARTITION)) { rec << ','; if (hiddenMarkovModel != HY_NO_MODEL) { rec << *(_String*)modelNames (hiddenMarkovModel); } if (flags&CONSTANT_ON_PARTITION) { rec << constantOnPartition; } } rec << ");\n"; }
[ "sweaver@temple.edu" ]
sweaver@temple.edu
1af40286b13fadb5e4dd1c71844407a2638bda89
08d8a9ffeabacbe3fd0d770ab679ff9bd4e63ba0
/Demo/SimpleClient/ThreadSimpleClientSocket.cpp
1fb3cc74b25ceba8adc518563970ae4d3db737eb
[]
no_license
99nails/threader
2bf8ac8dc51ccc2970f3b9586c12e55376239e3b
45b1d084ddd1167ca6ba9462173b89659f08df78
refs/heads/master
2023-03-28T17:17:48.157932
2021-04-01T15:35:09
2021-04-01T15:35:09
353,737,215
0
0
null
null
null
null
UTF-8
C++
false
false
5,706
cpp
#include "ThreadSimpleClientSocket.h" #include "../Common/Logs/LogMessagesTemplatesDemo.h" #include "../../Threads/HandlerTcpSocket.h" #include "../../Utils/SocketUtils.h" #include "../../Utils/DateUtils.h" ThreadSimpleClientSocket::ThreadSimpleClientSocket(IMessageSubscriber *parent, Descriptor socket, const QString host, const uint16_t port) : ThreadHandler(parent, new HandlerTcpSocket(host, port, socket), 10000, new PacketFactorySimple()) { setThreadName(QString("Thread.Server.%1").arg(handler()->deviceName())); setTimeout(1000); } void ThreadSimpleClientSocket::onThreadStarted() { writeLog(nullptr, Message1100, handler()->deviceName().toUtf8().constData()); } void ThreadSimpleClientSocket::onThreadFinishing() { writeLog(nullptr, Message1101, handler()->deviceName().toUtf8().constData()); } void ThreadSimpleClientSocket::onThreadFinished() { writeLog(nullptr, Message1102, handler()->deviceName().toUtf8().constData()); } void ThreadSimpleClientSocket::onIdle() { if (!handler() || handler()->connectionState() != HandlerBase::ConnectionState::Connected) return; qint64 nextSendAlive = lastPacketSent() + 10000; if (nextSendAlive <= DateUtils::getTickCount()) { sendPacketAlive(); } if (lastPacketReceived() + 30000 < DateUtils::getTickCount()) { writeLog(nullptr, Message1202, handler()->deviceName().toUtf8().constData(), 30000); handler()->close(); } } void ThreadSimpleClientSocket::onConnecting() { writeLog(nullptr, Message1103, handler()->deviceName().toUtf8().constData()); } void ThreadSimpleClientSocket::onConnected() { writeLog(nullptr, Message1104, handler()->deviceName().toUtf8().constData()); sendPacketHello("Client"); } void ThreadSimpleClientSocket::onDisconnected() { writeLog(nullptr, Message1105, handler()->deviceName().toUtf8().constData()); } void ThreadSimpleClientSocket::onError(const int errorCode) { writeLog(nullptr, Message1106, handler()->deviceName().toUtf8().constData(), errorCode, errorString(errorCode).toUtf8().constData()); } void ThreadSimpleClientSocket::onReadData(const char *, const int &size) { writeLog(nullptr, Message1107, size, handler()->deviceName().toUtf8().constData()); } void ThreadSimpleClientSocket::onWriteData(const char *, const int &size) { writeLog(nullptr, Message1108, size, handler()->deviceName().toUtf8().constData()); } bool ThreadSimpleClientSocket::onPacketReceived(const PacketBase::Ptr &packet) { auto packetSimple = std::dynamic_pointer_cast<PacketSimple>(packet); SimplePacketType type = SimplePacketType(packetSimple->header().packetType); QString packetTypeName = "Unknown"; auto *packetFactorySimple = dynamic_cast<PacketFactorySimple*>(packetFactory()); if (packetFactorySimple) packetTypeName = packetFactorySimple->packetTypeName(type); writeLog(nullptr, Message1109, packetTypeName.toLocal8Bit().constData(), packetSimple->header().packetType, packetSimple->header().packetId, packetSimple->header().length, handler()->deviceName().toUtf8().constData()); switch (SimplePacketType(packetSimple->header().packetType)) { case SimplePacketType::Welcome: doPacketWelcome(packetSimple); break; default: break; } return true; } bool ThreadSimpleClientSocket::onPacketSent(const PacketBase::Ptr &packet) { auto packetSimple = std::dynamic_pointer_cast<PacketSimple>(packet); SimplePacketType type = SimplePacketType(packetSimple->header().packetType); QString packetTypeName = "Unknown"; auto *packetFactorySimple = dynamic_cast<PacketFactorySimple*>(packetFactory()); if (packetFactorySimple) packetTypeName = packetFactorySimple->packetTypeName(type); writeLog(nullptr, Message1110, packetTypeName.toLocal8Bit().constData(), packetSimple->header().packetType, packetSimple->header().packetId, packetSimple->header().length, handler()->deviceName().toUtf8().constData()); return true; } void ThreadSimpleClientSocket::doPacketWelcome(PacketSimple::Ptr packet) { QString name = QString(*packet->data()); writeLog(nullptr, Message1201, name.toLocal8Bit().constData(), handler()->deviceName().toUtf8().constData()); sendPacketAlive(); } void ThreadSimpleClientSocket::sendPacketHello(const QString &name) { auto factory = dynamic_cast<PacketFactorySimple*>(packetFactory()); if (!factory) return; auto packet = factory->buildPacketHello(name); if (!packet) return; sendPacket(packet); } void ThreadSimpleClientSocket::sendPacketAlive() { auto factory = dynamic_cast<PacketFactorySimple*>(packetFactory()); if (!factory) return; auto packet = factory->buildPacketAlive(QDateTime::currentDateTime().toMSecsSinceEpoch(), DateUtils::getTickCount()); if (!packet) return; sendPacket(packet); }
[ "maxx0@mail.ru" ]
maxx0@mail.ru
b351cfc1934636acf1d7198654b4c920544cdb62
0dbefdf1d366ee330686201ee8ca8e7ae81215a6
/CoreVRTemplate/Source/CoreVRTemplate/Private/UI/Widget3DBase.cpp
ea0b7f079e1a20c0f95514f5b42f860b66a3ad22
[]
no_license
Mukudori/VRInputTemplatePlugin
c348522f65aede0d1b1461211adb62bc2d0eefe3
a3791eca85f1e4578478cbbe23de25d02acb61ae
refs/heads/master
2023-03-18T05:28:01.913859
2021-03-12T08:06:59
2021-03-12T08:06:59
346,988,717
0
0
null
null
null
null
UTF-8
C++
false
false
1,652
cpp
// Fill out your copyright notice in the Description page of Project Settings. #include "UI/Widget3DBase.h" // Sets default values AWidget3DBase::AWidget3DBase() { // Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it PrimaryActorTick.bCanEverTick = true; root = CreateDefaultSubobject<USceneComponent>(TEXT("Root")); RootComponent = root; widget = CreateDefaultSubobject<UWidgetComponent>(TEXT("Widget")); widget->AttachToComponent(root, FAttachmentTransformRules::KeepRelativeTransform); bNetLoadOnClient = true; } // Called when the game starts or when spawned void AWidget3DBase::BeginPlay() { Super::BeginPlay(); CreateWidgetFromClass(widgetClass); // If faild GetWorld() in Editor } // Called every frame void AWidget3DBase::Tick(float DeltaTime) { Super::Tick(DeltaTime); } void AWidget3DBase::SetWidget(UUserWidget* NewWidget) { if (NewWidget != nullptr) widget->SetWidget(NewWidget); else UE_LOG(LogTemp, Error, TEXT("%s: Can't set widget. NewWidget == nullptr."), *GetName()); } UUserWidget* AWidget3DBase::GetWidget() const { return widget->GetWidget(); } void AWidget3DBase::CreateWidgetFromClass(TSubclassOf<UUserWidget> NewWidgetClass) { widgetClass = NewWidgetClass; if (widgetClass) { if (widget == nullptr || widget->GetWidgetClass() != widgetClass) { widget->SetWidget( CreateWidget(GetWorld(), widgetClass) ); } else UE_LOG(LogTemp, Warning, TEXT("%s: WidgetClass is already exists"), *GetName()); } else { UE_LOG(LogTemp, Error, TEXT("%s:WidgetClass is null into CreateWidget"), *GetName()); } }
[ "vuramu@outlook.com" ]
vuramu@outlook.com
68de4bb632508e654e684a2ab5c03b154be9512c
a55bb3c17399e44cad6ad58f5b53f372e46da264
/codes/Human/src/lib.cpp
e895b8b35b8ffac7898532be6f17ebae9315e36a
[]
no_license
Ziaeemehr/Frontiers2021
92f7913285cfccaa8d91ce6853c83bc4f55e8f93
c27f722757b3692e50fea4011af54cd2853976dc
refs/heads/master
2023-03-25T02:41:51.862301
2021-03-24T07:12:26
2021-03-24T07:12:26
334,370,991
0
0
null
null
null
null
UTF-8
C++
false
false
8,234
cpp
#include "lib.h" Eigen::MatrixXd read_matrix(int Node, std::string filename) { using namespace Eigen; std::ifstream ifile(filename); if (fileExists(filename)) { dim2 Cij(Node, dim1(Node)); for (int i = 0; i < Node; i++) { for (int j = 0; j < Node; j++) { ifile >> Cij[i][j]; } } ifile.close(); Eigen::MatrixXd mat(Node, Node); for (int i = 0; i < Node; i++) mat.row(i) = Eigen::VectorXd::Map(&Cij[i][0], Cij[i].size()); return mat; } else { std::cerr << "\n file : " << filename << " not found \n"; exit(2); } } /*------------------------------------------------------------*/ bool fileExists(const std::string &filename) { struct stat buf; if (stat(filename.c_str(), &buf) != -1) { return true; } return false; } /*------------------------------------------------------------*/ dim2 kuramoto_correlation(const dim1 &x) { /* Calculate Kuramoto correlation*/ int n = x.size(); dim2 cor(n, dim1(n)); for (int i = 0; i < n; i++) for (int j = 0; j < n; j++) cor[i][j] = cos(x[j] - x[i]); return cor; } /*------------------------------------------------------------*/ std::vector<double> arange(const double start, const double end, const double step) { int nstep = round((end - start) / step); std::vector<double> arr(nstep); for (int i = 0; i < nstep; i++) arr[i] = start + i * step; return arr; } //-----------------------------------------------------------// double get_wall_time() { /*measure real passed time */ struct timeval time; if (gettimeofday(&time, NULL)) { // Handle error return 0; } return (double)time.tv_sec + (double)time.tv_usec * .000001; } //------------------------------------------------------------// double get_cpu_time() { /*measure cpu passed time*/ return (double)clock() / CLOCKS_PER_SEC; } //------------------------------------------------------------// void display_timing(double wtime, double cptime) { int wh; //, ch; int wmin; //, cpmin; double wsec; //, csec; wh = (int)wtime / 3600; // ch = (int)cptime / 3600; wmin = ((int)wtime % 3600) / 60; // cpmin = ((int)cptime % 3600) / 60; wsec = wtime - (3600. * wh + 60. * wmin); // csec = cptime - (3600. * ch + 60. * cpmin); printf("Wall Time : %d hours and %d minutes and %.4f seconds.\n", wh, wmin, wsec); // printf ("CPU Time : %d hours and %d minutes and %.4f seconds.\n",ch,cpmin,csec); } //------------------------------------------------------------// void print_matrix(const dim2 &A, std::string filename) { using namespace std; int row = A.size(); int col = A[0].size(); ofstream ofile; ofile.open(filename); if (ofile.is_open()) { ofile.precision(9); for (int i = 0; i < row; i++) { for (int j = 0; j < col; j++) { ofile << setw(20) << A[i][j]; } ofile << "\n"; } ofile.close(); } else { std::cout << "Error opening file to print R \n"; } } //------------------------------------------------------------// void find_dominant_frequency(const dim1 &Freq, const dim1 &Pxx, double &f, double &p) { int n = Pxx.size(); double max_v = -100000.0; int index = 0; for (int i = 1; i < n; i++) { if (max_v < Pxx[i]) { max_v = Pxx[i]; index = i; } } p = max_v; f = Freq[index]; cout << f << "\t" << p << endl; } //------------------------------------------------------------// vector<vector<int>> nodes_of_each_cluster(vector<int> &clusters) { std::vector<std::vector<int>> local_nodes; int nc = clusters.size(); local_nodes.resize(nc); vector<int> a = {0}; for (int i = 0; i < nc; i++) { a.push_back(a[i] + clusters[i]); vector<int> c(clusters[i]); std::iota(c.begin(), c.end(), a[i]); for (int j = 0; j < clusters[i]; j++) local_nodes[i].push_back(c[j]); } return local_nodes; } //------------------------------------------------------------// vector<vector<int>> read_nodes_of_each_cluster( const std::string filename, const int n) { vector<vector<int>> adjlist; adjlist.resize(n); std::ifstream file(filename); if (file.is_open()) { std::string line; int counter = 0; while (getline(file, line)) { std::istringstream iss(line); int value; while (iss >> value) adjlist[counter].push_back(value); counter++; } } else { printf("%s file not found! \n", filename.c_str()); exit(EXIT_FAILURE); } file.close(); return adjlist; } //------------------------------------------------------------// std::vector<int> read_from_file(std::string filename) { std::vector<int> numbers; std::ifstream inputFile(filename); if (inputFile.good()) { int current_number = 0; while (inputFile >> current_number) numbers.push_back(current_number); inputFile.close(); } else { printf("%s file not found! \n", filename.c_str()); exit(EXIT_FAILURE); } return numbers; } //------------------------------------------------------------// std::vector<std::vector<int>> adjmat_to_adjlist(const Eigen::MatrixXd &A) { int row = A.rows(); int col = A.cols(); std::vector<std::vector<int>> adjlist; adjlist.resize(row); for (int i = 0; i < row; i++) { for (int j = 0; j < col; j++) { if (std::abs(A(i, j)) > 1.e-6) adjlist[i].push_back(j); } } return adjlist; } /*------------------------------------------------------------*/ void write_matrix_to_file( const string fname, Eigen::MatrixXd &m) { int n = m.rows(); std::ofstream oX((fname + ".bin").c_str(), std::ios::out | std::ios::binary); if (!oX) { cout << "Could not open file for binary output!"; exit(EXIT_FAILURE); } for (int i = 0; i < n; i++) for (int j = 0; j < n; j++) oX.write((char *)&m(i, j), sizeof(double)); oX.close(); } /*------------------------------------------------------------*/ void fftRealSignal(const dim1 &signal, valarray<double> &freq, valarray<double> &freqAmplitudes, const double dt, int FRACTION) { const int NUM_POINTS = signal.size(); const double fs = 1.0 / (dt + 0.0); double *signalArray = new double[NUM_POINTS]; unsigned flags{0}; fftw_complex result[NUM_POINTS / 2 + 1]; fftw_plan plan = fftw_plan_dft_r2c_1d(NUM_POINTS, signalArray, result, flags); for (int i = 0; i < NUM_POINTS; i++) signalArray[i] = signal[i]; fftw_execute(plan); for (int i = 0; i < (NUM_POINTS/FRACTION); i++) { freqAmplitudes[i] = 2.0 / (double)(NUM_POINTS)*sqrt(result[i][REAL] * result[i][REAL] + result[i][IMAG] * result[i][IMAG]); freq[i] = i / double(NUM_POINTS) * fs; } fftw_destroy_plan(plan); delete[] signalArray; } /*------------------------------------------------------------*/ void print2DVector(const dim2& vec2d, const std::string fileName) { long unsigned int row = vec2d.size(); long unsigned int col = vec2d[0].size(); std::ofstream oX((fileName + ".bin").c_str(), std::ios::out | std::ios::binary); if (!oX) { cout << "Could not open file for binary output!"; exit(EXIT_FAILURE); } for (long unsigned i = 0; i < row; i++) for (long unsigned j = 0; j < col; j++) oX.write((char *)&vec2d[i][j], sizeof(double)); oX.close(); }
[ "a.ziaeemehr@gmail.com" ]
a.ziaeemehr@gmail.com
7ee129ea72d20649cafe7ee2aac6c2900c81e458
e3ef18f3123e881d597052a4f79ef1ff0e33478d
/src/WiFiConnectionManager.cpp
54a7ec31860336f29b77ff2b51962d877ab8f26a
[]
no_license
hoangnguyen205/hvn205
97c40763522ef4558d2a27a4e6f8af650f3c899b
af22f221379283c6c8bc7ec7b7059b38f9daf5ff
refs/heads/master
2023-04-06T05:19:25.101254
2021-04-25T02:12:16
2021-04-25T02:12:16
361,126,726
0
0
null
null
null
null
UTF-8
C++
false
false
10,704
cpp
#include "WiFiConnectionManager.h" #include "HTTPUpdate.h" #include "ESP32Ping.h" #include "WiFiManager.h" #include "esp_task_wdt.h" const char* serverUrl = "http://airsense.vn:3030/firmware_v3.bin"; static unsigned long last_check_wifi_status = 0; static unsigned long last_reconnect_wifi = 0; static unsigned long time_to_reconnect_wifi = TIME_TO_RECONNECT_WIFI_DEFAULT; #define _DB_LOG_ WiFiConnectionManager::WiFiConnectionManager() { } WiFiConnectionManager::~WiFiConnectionManager() { } void WiFiConnectionManager::init() { #ifdef _DB_LOG_ Serial.println("WiFi init station mode"); // Serial.println(WiFi.BSSIDstr()); // Serial.println(WiFi.psk()); #endif WiFi.disconnect(); WiFi.mode(WIFI_MODE_STA); this->state.current_state = WIFI_STATE_INIT; this->state.status = WIFI_STATUS_NO_WIFI_CONNECTED; this->state.entry = 0; this->switchState(WIFI_STATE_CONNECT_OLD_CONFIG); } void WiFiConnectionManager::switchState(uint8_t _next_state) { this->state.previous_state = this->state.current_state; this->state.current_state = _next_state; } void WiFiConnectionManager::setMode(wifi_mode_t _mode) { WiFi.mode(_mode); } void WiFiConnectionManager::connect(uint32_t connectTimeout) { WiFi.begin(); uint8_t status = WiFi.status(); auto startTime = millis(); while(status != WL_CONNECTED && status != WL_NO_SSID_AVAIL && status != WL_CONNECT_FAILED && (millis() - startTime) <= connectTimeout) { delay(10); status = WiFi.status(); } } void WiFiConnectionManager::reconnect() { WiFi.reconnect(); } bool WiFiConnectionManager::isConnected() { if(WiFi.isConnected()) { #ifdef _DB_LOG_ // Serial.println("WiFi is connected to:"); // Serial.println(WiFi.SSID()); // Serial.println(WiFi.psk()); #endif return true; } else { #ifdef _DB_LOG_ // Serial.println("No WiFi connection!"); #endif return false; } } bool WiFiConnectionManager::isIntenetConnected() { return Ping.ping("google.com", 2); } void WiFiConnectionManager::smartConfig() { WiFi.mode(WIFI_AP_STA); WiFi.beginSmartConfig(); unsigned long start_time = millis(); while(millis() < (start_time + 20000)) { if(WiFi.smartConfigDone()) { #ifdef _DB_LOG_ Serial.println("Smart config successed"); #endif uint8_t i = 0; while(WiFi.status() != WL_CONNECTED && i != 50) { i++; delay(100); } if(WiFi.status() == WL_CONNECTED) { this->state.status = WIFI_STATUS_WIFI_CONNECTED_BUT_NO_INTERNET; } else { this->state.status = WIFI_STATUS_NO_WIFI_CONNECTED; } // wifi_mul.addAP(&WiFi.SSID()[0], &WiFi.psk()[0]); //logWiFi info to SD // DeviceManager *device_manager; // device_manager = DeviceManager::getInstance(); // if(device_manager->g_store.isExist()) // { // device_manager->g_store.logWiFiInfo(WiFi.SSID(), WiFi.psk(), WIFI_INFO_FILE); // } return; } delay(500); esp_task_wdt_reset(); } #ifdef _DB_LOG_ Serial.println("Smart config failed"); #endif } bool WiFiConnectionManager::isSmartConfigDone() { return WiFi.smartConfigDone(); } void WiFiConnectionManager::getWiFiListFromStore() { // DeviceManager *device_manager; // device_manager = DeviceManager::getInstance(); // #ifdef _DB_LOG_ // Serial.println("WiFi from SD card:"); // #endif // device_manager->g_store.readWiFiInfo(&this->wifi_mul); } void WiFiConnectionManager::startAP() { //WiFiManager //Local intialization. Once its business is done, there is no need to keep it around WiFiManager wifiManager; //reset settings - for testing // wifiManager.resetSettings(); //sets timeout until configuration portal gets turned off //useful to make it all retry or go to sleep //in seconds wifiManager.setConfigPortalTimeout(120); //set menu std::vector<const char *> menu = {"wifi","wifinoscan","restart","exit"}; wifiManager.setMenu(menu); // set dark theme wifiManager.setClass("invert"); //it starts an access point with the specified name //here "AutoConnectAP" //and goes into a blocking loop awaiting configuration //WITHOUT THIS THE AP DOES NOT SEEM TO WORK PROPERLY WITH SDK 1.5 , update to at least 1.5.1 //WiFi.mode(WIFI_STA); if (!wifiManager.startConfigPortal("AirSENSE V3", "sparclab")) { Serial.println("failed to connect and hit timeout"); delay(3000); //reset and try again, or maybe put it to deep sleep // ESP.reset(); // delay(5000); } else { //if you get here you have connected to the WiFi Serial.println("connected...yeey :)"); } } uint32_t WiFiConnectionManager::updateUnixTime() { if(this->isConnected()) { configTime(GMT_OFFSET_SECOND, DAY_LIGHR_OFFSET_SECOND, NTP_SERVER); struct tm timeinfo; if(!getLocalTime(&timeinfo)) { #ifdef _DB_LOG_ Serial.println("Failed to obtain time"); #endif } else { time_t unixtime; unixtime = mktime(&timeinfo); // if(unixtime > 1605666264) { #ifdef _DB_LOG_ Serial.print("Get time success, Unixtime: "); Serial.println(unixtime); #endif return unixtime + GMT_OFFSET_SECOND; } } } else { #ifdef _DB_LOG_ Serial.println("No Internet so can not get time online"); #endif } return 0; } void WiFiConnectionManager::connectBestWiFi(uint32_t connectTimeout) { this->wifi_mul.run(connectTimeout); } WiFiMulti *WiFiConnectionManager::getWiFiMul() { return &wifi_mul; } WiFiConnectionState WiFiConnectionManager::getState() { return this->state; } void WiFiConnectionManager::updateOTA() { WiFiClient wificlient; t_httpUpdate_return ret = httpUpdate.update(wificlient, serverUrl, FIRMWARE_VERSION); switch (ret) { case HTTP_UPDATE_FAILED: Serial.printf("HTTP_UPDATE_FAILD Error (%d): %s", httpUpdate.getLastError(), httpUpdate.getLastErrorString().c_str()); break; case HTTP_UPDATE_NO_UPDATES: Serial.println("HTTP_UPDATE_NO_UPDATES"); break; case HTTP_UPDATE_OK: Serial.println("HTTP_UPDATE_OK"); ESP.restart(); break; default: break; } } void WiFiConnectionManager::waitAndCheckEvent() { /** * if Internet is connected before, we will lengthen the time period * every check to minimize resource consumed. */ uint32_t time_to_check = 60000; if(this->state.status != WIFI_STATUS_INTERNET_CONNECTED) // || this->state.previous_state == WIFI_STATE_SMARTCONFIG) { time_to_check = 10000; } //wait to check Internet and WiFi if(millis() > last_check_wifi_status + time_to_check) { #ifdef _DB_LOG_ Serial.print("WiFi status: "); #endif if(this->isIntenetConnected()) { #ifdef _DB_LOG_ Serial.println("Internet connected"); #endif this->state.status = WIFI_STATUS_INTERNET_CONNECTED; this->state.entry = 0; } else if(WiFi.status() == WL_CONNECTED) { #ifdef _DB_LOG_ Serial.println("WiFi but no Internet"); #endif this->state.status = WIFI_STATUS_WIFI_CONNECTED_BUT_NO_INTERNET; this->switchState(WIFI_STATE_RECONNECT); } else { #ifdef _DB_LOG_ Serial.println("WiFi disconnected"); #endif this->state.status = WIFI_STATUS_NO_WIFI_CONNECTED; this->switchState(WIFI_STATE_RECONNECT); } //handle event after check status last_check_wifi_status = millis(); if(this->state.status == WIFI_STATUS_INTERNET_CONNECTED) { if(this->state.previous_state == WIFI_STATE_CONNECT_OLD_CONFIG) { this->switchState(WIFI_STATE_STORE_WIFI_INFO); } else if(this->state.previous_state == WIFI_STATE_SMARTCONFIG) { this->switchState(WIFI_STATE_STORE_WIFI_INFO); } else if(this->state.previous_state == WIFI_STATE_CONNECT_BEST_WIFI) { // this->switchState(WIFI_SATE) } } else if(this->state.entry == 5) { //this WiFi is no longer usable so we remove it and try another this->removeCurrentWiFi(); if(!wifi_mul.remainWiFi()) { // if there is no WiFi info, so get info from SD card and check again this->switchState(WIFI_STATE_GET_WIFI_INFO_FROM_SD); } else { this->state.entry = 0; this->switchState(WIFI_STATE_CONNECT_BEST_WIFI); } } else if(this->state.previous_state == WIFI_STATE_RECONNECT) { this->switchState(WIFI_STATE_RECONNECT); } else { /* code */ } } } void WiFiConnectionManager::reconnectSequence() { if(millis() > (last_reconnect_wifi + time_to_reconnect_wifi)) { this->reconnect(); this->state.entry ++; if(time_to_reconnect_wifi < TIME_TO_RECONNECT_WIFI_MAX) { time_to_reconnect_wifi *= 2; } else { time_to_reconnect_wifi = TIME_TO_RECONNECT_WIFI_MAX; } last_reconnect_wifi = millis(); #ifdef _DB_LOG_ Serial.printf("WiFi entry = %d. ", this->state.entry); Serial.println("WiFi reconnecting ..."); #endif } else { } this->switchState(WIFI_STATE_CHECK_AND_WAIT); } void WiFiConnectionManager::removeCurrentWiFi() { #ifdef _DB_LOG_ Serial.println("WiFi remove current WiFi info"); #endif wifi_mul.removeWiFiNoInternet(WiFi.SSID()); }
[ "nguyen.hv172728@gmail.com" ]
nguyen.hv172728@gmail.com
3c6630db7e0d835fc02457449cbd19578bc980f2
abd8c67768f4b9fd2a3144fb946382ad706190e2
/other_code/2019.8.27/RBTree.cpp
fba5d3887306a26d21c1feffed209cb5a8b30abd
[]
no_license
ALXlixiong/day_code
0647ad9f910087568184c62031dda784756ff143
4bde28e7023e6de19d15d4000b56254d71079ffd
refs/heads/master
2020-05-04T06:21:05.375883
2019-09-18T13:25:38
2019-09-18T13:25:38
179,003,935
0
0
null
null
null
null
UTF-8
C++
false
false
192
cpp
#include <iostream> #include <vector> #include "RBTree.hpp" int main() { RBTree<int> b; std::vector<int> v{ 16, 3, 7, 11, 9, 26, 18, 14, 15 }; for (auto e : v) b.Insert(e); return 0; }
[ "2749811373@qq.com" ]
2749811373@qq.com
bfa061605e8442a51dc1b93a5d0e1a9ec9ccbd69
70eee34c50992d41118a85469ea6d9d590d48038
/examples/dash-migrationLTE.cc
566c5303204fb2aed0de9b299d3cc07ce974ab03
[]
no_license
D3F3R4L/D2D-Video-Caching
1fce233bf38cbcce982afe07820406be3ea73cbb
2763fdac790d5bec94b4e7240c4bb08bdd518eea
refs/heads/master
2023-02-24T22:36:41.284277
2021-02-01T19:10:06
2021-02-01T19:10:06
274,766,402
2
1
null
2021-02-01T19:10:07
2020-06-24T20:47:13
C++
UTF-8
C++
false
false
52,328
cc
/* Adapted from haraldott project * Author: fabioraraujo */ // - TCP Stream server and user-defined number of clients connected with an AP // - WiFi connection // - Tracing of throughput, packet information is done in the client #include "ns3/point-to-point-helper.h" #include <fstream> #include "ns3/core-module.h" #include "ns3/applications-module.h" #include "ns3/internet-module.h" #include "ns3/point-to-point-module.h" #include "ns3/network-module.h" #include "ns3/wifi-module.h" #include "ns3/lte-helper.h" #include "ns3/epc-helper.h" #include "ns3/lte-module.h" #include "ns3/mobility-module.h" #include <ns3/buildings-module.h> #include "ns3/building-position-allocator.h" #include <sys/stat.h> #include <sys/types.h> #include <errno.h> #include "ns3/internet-apps-module.h" #include "ns3/flow-monitor-module.h" #include "ns3/flow-monitor-helper.h" #include "ns3/ipv4-flow-classifier.h" #include "ns3/tcp-stream-helper.h" #include "ns3/tcp-stream-interface.h" #include "ns3/netanim-module.h" #include <iostream> #include <stdlib.h> #include <sstream> #include <iomanip> #include <vector> #include <string> #include "ns3/simple-device-energy-model.h" #include "ns3/li-ion-energy-source.h" #include "ns3/energy-source-container.h" #include "ns3/energy-model-helper.h" #include "ns3/basic-energy-source.h" #include "ns3/energy-source.h" #include "ns3/li-ion-energy-source-helper.h" #include "ns3/ipv4-global-routing-helper.h" #include "ns3/point-to-point-helper.h" template <typename T> std::string ToString(T val) { std::stringstream stream; stream << val; return stream.str(); } using namespace ns3; NS_LOG_COMPONENT_DEFINE ("dash-migrationExample"); double StallMMESV1=0; double RebufferMMESV1=0; double StallMMESV2=0; double RebufferMMESV2=0; double StallMMESV3=0; double RebufferMMESV3=0; double StallMMECloud=0; double RebufferMMECloud=0; double StartMMESV1=0; double StartMMESV2=0; double StartMMESV3=0; double StartMMECloud=0; uint16_t n=3; uint16_t MaxClientsSV=300; uint32_t numberOfUeNodes; uint32_t simulationId = 0; std::vector <double> throughputs; std::vector <double> Rebuffers; std::vector <uint64_t> Stalls; std::vector <uint32_t> SClients {0,0,0,0}; std::vector <uint32_t> SBClients {0,0,0,0}; std::vector <uint32_t> queue {0,0,0,0}; std::vector <std::string> delays {"0","0","0","0"}; Address server1Address; Address server2Address; Address server3Address; Address cloudAddress; std::string dirTmp; std::string type; std::ofstream StallsLog; std::ofstream RebufferLog; std::ofstream StartTimeLog; std::ofstream ServerScoreLog; unsigned int handNumber = 0; // int cell_ue[2][4]; void LogStall (double sv1,double sv2,double sv3,double cloud) { StallsLog << std::setfill (' ') << std::setw (0) << Simulator::Now ().GetMicroSeconds () / (double)1000000 << ";" << std::setfill (' ') << std::setw (0) << sv1 << ";" << std::setfill (' ') << std::setw (0) << StallMMESV1 << ";" << std::setfill (' ') << std::setw (0) << sv2 << ";" << std::setfill (' ') << std::setw (0) << StallMMESV2 << ";" << std::setfill (' ') << std::setw (0) << sv3 << ";" << std::setfill (' ') << std::setw (0) << StallMMESV3 << ";" << std::setfill (' ') << std::setw (0) << cloud << ";" << std::setfill (' ') << std::setw (0) << StallMMECloud << ";\n"; StallsLog.flush (); } void LogRebuffer (double Tsv1,double Tsv2,double Tsv3,double Tcloud) { RebufferLog << std::setfill (' ') << std::setw (0) << Simulator::Now ().GetMicroSeconds () / (double)1000000 << ";" << std::setfill (' ') << std::setw (0) << Tsv1 << ";" << std::setfill (' ') << std::setw (0) << RebufferMMESV1 << ";" << std::setfill (' ') << std::setw (0) << Tsv2 << ";" << std::setfill (' ') << std::setw (0) << RebufferMMESV2 << ";" << std::setfill (' ') << std::setw (0) << Tsv3 << ";" << std::setfill (' ') << std::setw (0) << RebufferMMESV3 << ";" << std::setfill (' ') << std::setw (0) << Tcloud << ";" << std::setfill (' ') << std::setw (0) << RebufferMMECloud << ";\n"; RebufferLog.flush (); } void LogStartTime (double sv1,double sv2,double sv3,double cloud) { StartTimeLog << std::setfill (' ') << std::setw (0) << sv1 << ";" << std::setfill (' ') << std::setw (0) << StartMMESV1 << ";" << std::setfill (' ') << std::setw (0) << sv2 << ";" << std::setfill (' ') << std::setw (0) << StartMMESV2 << ";" << std::setfill (' ') << std::setw (0) << sv3 << ";" << std::setfill (' ') << std::setw (0) << StartMMESV3 << ";" << std::setfill (' ') << std::setw (0) << cloud << ";" << std::setfill (' ') << std::setw (0) << StartMMECloud << ";\n"; StartTimeLog.flush (); } /* void throughput(Ptr<FlowMonitor> flowMonitor,Ptr<Ipv4FlowClassifier> classifier) { std::map<FlowId, FlowMonitor::FlowStats> stats = flowMonitor->GetFlowStats (); for (std::map<FlowId, FlowMonitor::FlowStats>::const_iterator iter = stats.begin (); iter != stats.end (); ++iter) { Ipv4FlowClassifier::FiveTuple t = classifier->FindFlow (iter->first); if (iter->second.rxPackets<=10 and (t.sourceAddress=="1.0.0.1" or t.sourceAddress=="2.0.0.1" or t.sourceAddress=="3.0.0.1")) { NS_LOG_UNCOND("Flow ID: " << iter->first << " Src Addr " << t.sourceAddress << " Dst Addr " << t.destinationAddress); NS_LOG_UNCOND("Tx Packets = " << iter->second.txPackets); //NS_LOG_UNCOND("Tx Bytes = " << iter->second.txBytes); //NS_LOG_UNCOND("Sum jitter = " << iter->second.jitterSum); //NS_LOG_UNCOND("Delay Sum = " << iter->second.delaySum); //NS_LOG_UNCOND("Lost Packet = " << iter->second.lostPackets); //NS_LOG_UNCOND("Rx Bytes = " << iter->second.rxBytes); NS_LOG_UNCOND("Rx Packets = " << iter->second.rxPackets); //NS_LOG_UNCOND("timeLastRxPacket = " << iter->second.timeLastRxPacket.GetSeconds()); //NS_LOG_UNCOND("timefirstTxPacket = " << iter->second.timeFirstTxPacket.GetSeconds()); // NS_LOG_UNCOND("Throughput: " << iter->second.rxBytes * 8.0 / (iter->second.timeLastRxPacket.GetSeconds()-iter->second.timeFirstTxPacket.GetSeconds()) / 1000/1000 << " Mbps"); //NS_LOG_UNCOND("Packet loss %= " << ((iter->second.txPackets-iter->second.rxPackets)*1.0)/iter->second.txPackets); } } Simulator::Schedule(Seconds(1),&throughput,flowMonitor,classifier); } */ void getThropughputClients(ApplicationContainer clientApps, TcpStreamClientHelper clientHelper, std::vector <std::pair <Ptr<Node>, std::string> > clients) { for (uint i = 0; i < numberOfUeNodes; i++) { throughputs[i]=clientHelper.GetThroughput(clientApps, clients.at (i).first); } Simulator::Schedule(Seconds(1),&getThropughputClients,clientApps,clientHelper,clients); } void getThropughputServer(ApplicationContainer serverApp, TcpStreamServerHelper serverHelper,NodeContainer servers) { for (uint j = 0; j < servers.GetN(); j++) { serverHelper.serverThroughput(serverApp, servers.Get(j)); } Simulator::Schedule(Seconds(1),&getThropughputServer,serverApp, serverHelper,servers); } static void ServerHandover(ApplicationContainer clientApps, TcpStreamClientHelper clientHelper, Address server2Address, std::vector <std::pair <Ptr<Node>, std::string> > clients, uint16_t n) { clientHelper.Handover(clientApps, clients.at (n).first, server2Address); } void getStartTime(ApplicationContainer clientApps, TcpStreamClientHelper clientHelper, std::vector <std::pair <Ptr<Node>, std::string> > clients) { double STsv1=0; double STsv2=0; double STsv3=0; double STcloud=0; for (uint i = 0; i < numberOfUeNodes; i++) { std::string ip = clientHelper.GetServerAddress(clientApps, clients.at (i).first); if(ip=="1.0.0.1") { STsv1+=clientHelper.GetPlaybakStartTime(clientApps, clients.at (i).first); StartMMESV1=StartMMESV1 + (2*(STsv1-StartMMESV1)/(n+1)); } else { if(ip=="2.0.0.1") { STsv2+=clientHelper.GetPlaybakStartTime(clientApps, clients.at (i).first); StartMMESV2=StartMMESV2 + (2*(STsv2-StartMMESV2)/(n+1)); } else { if(ip=="3.0.0.1") { STsv3+=clientHelper.GetPlaybakStartTime(clientApps, clients.at (i).first); StartMMESV3=StartMMESV3 + (2*(STsv2-StartMMESV3)/(n+1)); } else { STcloud+=clientHelper.GetPlaybakStartTime(clientApps, clients.at (i).first); StartMMECloud=StartMMECloud + (2*(STcloud-StartMMECloud)/(n+1)); } } } } LogStartTime(STsv1,STsv2,STsv3,STcloud); } void InitializeLogFiles (std::string dashLogDirectory, std::string m_algoName,std::string numberOfUeNodes, std::string simulationId,std::string pol) { NS_LOG_UNCOND("Inicializando log"); std::string SLog = dashLogDirectory + m_algoName + "/" + numberOfUeNodes + "/" + pol + "/sim" + simulationId + "_" + "StallLog.csv"; StallsLog.open (SLog.c_str ()); StallsLog << "Time_Now;SV1_Stalls;SV1_Stalls_MME;SV2_Stalls;SV2_Stalls_MME;SV3_Stalls;SV3_Stalls_MME;Cloud_Stalls;Cloud_Stalls_MME\n"; StallsLog.flush (); std::string RLog = dashLogDirectory + m_algoName + "/" + numberOfUeNodes + "/" + pol + "/sim" + simulationId + "_" + "RebufferLog.csv"; RebufferLog.open (RLog.c_str ()); RebufferLog << "Time_Now;SV1_Rebuffer;SV1_Rebuffer_MME;SV2_Rebuffer;SV2_Rebuffer_MME;SV3_Rebuffer;SV3_Rebuffer_MME;Cloud_Rebuffer;Cloud_Rebuffer_MME\n"; RebufferLog.flush (); std::string STLog = dashLogDirectory + m_algoName + "/" + numberOfUeNodes + "/" + pol + "/sim" + simulationId + "_" + "PlaybackStartTime.csv"; StartTimeLog.open (STLog.c_str ()); StartTimeLog << "SV1_PlaybackStartTime;SV1_PlaybackStartTime_MME;SV2_PlaybackStartTime;SV2_PlaybackStartTime_MME;SV3_PlaybackStartTime;SV3_PlaybackStartTime_MME;Cloud_PlaybackStartTime;Cloud_PlaybackStartTime_MME\n"; StartTimeLog.flush (); std::string SsLog = dashLogDirectory + m_algoName + "/" + numberOfUeNodes + "/" + pol + "/sim" + simulationId + "_" + "ServerScores.csv"; ServerScoreLog.open (SsLog.c_str ()); ServerScoreLog << "SV1_Score;SV2_Score;SV3_Score;Cloud_Score;\n"; ServerScoreLog.flush (); } void stopSim (TcpStreamClientHelper clientHelper, NodeContainer staContainer) { uint32_t closedApps = 0; closedApps = clientHelper.checkApps(staContainer); if (closedApps>=numberOfUeNodes) { Simulator::Stop(); } else { Simulator::Schedule(Seconds(5),&stopSim,clientHelper, staContainer); } } std::string execute(const char* cmd) { FILE* pipe = popen(cmd, "r"); if (!pipe) return "ERROR"; char buffer[128]; std::string result = ""; while(!feof(pipe)) { if(fgets(buffer, 128, pipe) != NULL) result += buffer; } pclose(pipe); if (result.size() > 0){ result.resize(result.size()-1); } NS_LOG_UNCOND(result); return result; } std::vector <std::string> split(const char *phrase, std::string delimiter){ std::vector <std::string> list; std::string s = ToString (phrase); size_t pos = 0; std::string token; while ((pos = s.find(delimiter)) != std::string::npos) { token = s.substr(0, pos); list.push_back(token); s.erase(0, pos + delimiter.length()); } list.push_back(s); return list; } void getStall(ApplicationContainer clientApps, TcpStreamClientHelper clientHelper, std::vector <std::pair <Ptr<Node>, std::string> > clients) { double sv1=0; double sv2=0; double sv3=0; double cloud=0; double Tsv1=0; double Tsv2=0; double Tsv3=0; double Tcloud=0; std::string filename = "python3 src/esba-dash-energy/StallRebuffer.py " + dirTmp +" "+ToString(simulationId); std::string Values = execute(filename.c_str()); NS_LOG_UNCOND(Values); //system(filename.c_str()); std::vector <std::string> StallsRebuffers; StallsRebuffers = split(Values.c_str(), " "); sv1+=std::stod(StallsRebuffers[0]); StallMMESV1=StallMMESV1 + (2*(sv1-StallMMESV1)/(n+1)); Tsv1+=std::stod(StallsRebuffers[1]); RebufferMMESV1=RebufferMMESV1 + (2*(Tsv1-RebufferMMESV1)/(n+1)); sv2+=std::stod(StallsRebuffers[2]); StallMMESV2=StallMMESV2 + (2*(sv2-StallMMESV2)/(n+1)); Tsv2+=std::stod(StallsRebuffers[3]); RebufferMMESV2=RebufferMMESV2 + (2*(Tsv2-RebufferMMESV2)/(n+1)); sv3+=std::stod(StallsRebuffers[4]); StallMMESV3=StallMMESV3 + (2*(sv3-StallMMESV3)/(n+1)); Tsv3+=std::stod(StallsRebuffers[5]); RebufferMMESV3=RebufferMMESV3 + (2*(Tsv3-RebufferMMESV3)/(n+1)); cloud+=std::stod(StallsRebuffers[6]); StallMMECloud=StallMMECloud + (2*(cloud-StallMMECloud)/(n+1)); Tcloud+=std::stod(StallsRebuffers[7]); RebufferMMECloud=RebufferMMECloud + (2*(Tcloud-RebufferMMECloud)/(n+1)); LogStall(sv1,sv2,sv3,cloud); LogRebuffer(Tsv1,Tsv2,Tsv3,Tcloud); Simulator::Schedule(Seconds(1),&getStall,clientApps,clientHelper,clients); } void getClientsStallsRebuffers(ApplicationContainer clientApps, TcpStreamClientHelper clientHelper, std::vector <std::pair <Ptr<Node>, std::string> > clients) { for (uint i = 0; i < numberOfUeNodes; i++) { Rebuffers[i]=clientHelper.GetTotalBufferUnderrunTime(clientApps, clients.at (i).first); Stalls[i]=clientHelper.GetNumbersOfBufferUnderrun(clientApps, clients.at (i).first); } } void getClientsOnServer(ApplicationContainer serverApp, TcpStreamServerHelper serverHelper,NodeContainer servers) { for (uint j = 0; j < servers.GetN(); j++) { SClients[j]=serverHelper.NumberOfClients(serverApp, servers.Get(j)); NS_LOG_UNCOND(SClients[j]); } if (SClients[0]==0 and SClients[1]==0 and SClients[2]==0 and SClients[3]==0) { Simulator::Stop(); } Simulator::Schedule(Seconds(1),&getClientsOnServer,serverApp, serverHelper, servers); } void getClientsHandover(ApplicationContainer clientApps, TcpStreamClientHelper clientHelper, std::vector <std::pair <Ptr<Node>, std::string> > clients) { queue[0]=0; queue[1]=0; queue[2]=0; queue[3]=0; for (uint j = 0; j < numberOfUeNodes; j++) { std::string ip; if (clientHelper.GetHandover(clientApps, clients.at (j).first)) { ip=clientHelper.GetNewServerAddress(clientApps, clients.at (j).first); switch(ip.at(0)) { case '1': queue[0]=queue[0]+1; break; case '2': queue[1]=queue[1]+1; break; case '3': queue[2]=queue[2]+1; break; case '4': queue[3]=queue[3]+1; break; } } } NS_LOG_UNCOND(queue[0]); NS_LOG_UNCOND(queue[1]); NS_LOG_UNCOND(queue[2]); NS_LOG_UNCOND(queue[3]); } uint64_t getRepIndex(ApplicationContainer clientApps, TcpStreamClientHelper clientHelper, Ptr <Node> clients) { return clientHelper.GetRepIndex(clientApps,clients); } void politica(ApplicationContainer clientApps, TcpStreamClientHelper clientHelper, std::vector <std::pair <Ptr<Node>, std::string> > clients,TcpStreamServerHelper serverHelper,NodeContainer servers , uint16_t num) { //getClientsOnServer(serverApp, serverHelper, servers); getClientsHandover(clientApps,clientHelper,clients); getClientsStallsRebuffers(clientApps,clientHelper,clients); Address SvIp; if (type=="SMigracao") { if (Simulator::Now()<=Seconds(6)) { NS_LOG_UNCOND("SMigracao"); SvIp=server2Address; ServerHandover(clientApps, clientHelper, SvIp, clients,num); } } if (type=="AMigracao") { std::string ip = clientHelper.GetServerAddress(clientApps, clients.at (num).first); if (ip=="1.0.0.1") { SvIp=server3Address; ServerHandover(clientApps, clientHelper, SvIp, clients,num); Simulator::Schedule(Seconds(9),&politica,clientApps,clientHelper,clients,serverHelper,servers,num); NS_LOG_UNCOND("AMigracao"); } else { SvIp=server1Address; ServerHandover(clientApps, clientHelper, SvIp, clients,num); NS_LOG_UNCOND("AMigracao2"); } } //Simulator::Schedule(Seconds(5),&politica,clientApps,clientHelper,clients,serverApp, serverHelper,servers); } void politica2(ApplicationContainer clientApps, TcpStreamClientHelper clientHelper, std::vector <std::pair <Ptr<Node>, std::string> > clients,ApplicationContainer serverApp, TcpStreamServerHelper serverHelper,NodeContainer servers) { getClientsOnServer(serverApp, serverHelper, servers); getClientsHandover(clientApps,clientHelper,clients); getClientsStallsRebuffers(clientApps,clientHelper,clients); double T1=0; double T2=0; double T3=0; double T4=0; uint16_t C1=0; uint16_t C2=0; uint16_t C3=0; uint16_t C4=0; for (uint i = 0; i < numberOfUeNodes; i++) { std::string ip = clientHelper.GetServerAddress(clientApps, clients.at (i).first); switch(ip.at(0)) { case '1': T1 = T1 + getRepIndex(clientApps,clientHelper,clients.at (i).first); C1+=1; break; case '2': T2 = T2 + getRepIndex(clientApps,clientHelper,clients.at (i).first); C2+=1; break; case '3': T3 = T3 + getRepIndex(clientApps,clientHelper,clients.at (i).first); C3+=1; break; case '4': T4 = T4 + getRepIndex(clientApps,clientHelper,clients.at (i).first); C4+=1; break; } } /* for (uint k = 0; k < 4; k++) { int dif=SClients[k]-SBClients[k]; if (dif>0) { queue[k]=queue[k]-dif; } }*/ for (uint i = 0; i < numberOfUeNodes; i++) { NS_LOG_UNCOND(Stalls[i]); NS_LOG_UNCOND(Rebuffers[i]); NS_LOG_UNCOND(throughputs[i]); uint64_t Tc = getRepIndex(clientApps,clientHelper,clients.at (i).first); double Tf1 = (T1 + Tc); double Tf2 = (T2 + Tc); double Tf3 = (T3 + Tc); double Tf4 = (T4 + Tc); std::string ip = clientHelper.GetServerAddress(clientApps, clients.at (i).first); std::string filename = "python3 src/esba-dash-energy/Guloso-Aleatorio/exemplo.py " + dirTmp +" "+ToString(type)+" "+ ToString(SClients[0]+queue[0])+" "+ ToString(SClients[1]+queue[1])+" "+ ToString(SClients[2]+queue[2])+" "+ ToString(SClients[3])+" "+ip+" "+ToString(simulationId)+" "+delays[0]+" "+delays[1]+" "+delays[2]+" "+delays[3]+" "+ToString(throughputs[i])+" "+ToString(Stalls[i])+" "+ToString(Rebuffers[i])+" "+ToString(Tf1)+" "+ToString(Tf2)+" "+ToString(Tf3)+" "+ToString(Tf4); std::string bestSv = execute(filename.c_str()); Address SvIp; NS_LOG_UNCOND(ip); uint16_t aux; //std::string bestSv="1.0.0.1 2.0.0.1 3.0.0.1"; //system(filename.c_str()); std::vector <std::string> BestServers; BestServers = split(bestSv.c_str(), " "); switch(BestServers[0].at(0)) { case '1': SvIp=server1Address; T1=Tf1; aux=0; break; case '2': SvIp=server2Address; T2=Tf2; aux=1; break; case '3': SvIp=server3Address; T3=Tf3; aux=2; break; case '4': SvIp=cloudAddress; T4=Tf4; aux=3; break; } if ((ip!=bestSv and SClients[aux]+queue[aux]<MaxClientsSV)) { std::cout << SvIp << "ServerId: \t" << i << " Cliente" << SClients[aux]<< std::endl; queue[aux]=queue[aux]+1; ServerHandover(clientApps, clientHelper, SvIp, clients,i); } } for (uint l = 0; l < 4; l++) { SBClients[l]=SClients[l]; } Simulator::Schedule(Seconds(2),&politica2,clientApps,clientHelper,clients,serverApp, serverHelper,servers); } static void PingRtt (std::string context, Time rtt) { std::vector <std::string> nodes; nodes = split(context.c_str(), "/"); delays[std::stoi(nodes[4])]=ToString(rtt); std::cout << context << " " << ToString(rtt) << std::endl; } ///////////////////////////////////////////////////////// LTE ///////////////////////////////////////////////////////// void ArrayPositionAllocator(Ptr<ListPositionAllocator> HpnPosition) { std::ifstream pos_file("CellsDataset"); int cellId; double x_coord, y_coord; char a; while (pos_file >> cellId >> x_coord >> y_coord >> a) { NS_LOG_INFO("Adding cell " << cellId << " to coordinates x:" << x_coord << " y:" << y_coord); HpnPosition->Add(Vector(x_coord, y_coord, 30)); } } void NotifyConnectionEstablishedUe(std::string context, uint64_t imsi, uint16_t cellid, uint16_t rnti) { NS_LOG_DEBUG(Simulator::Now().GetSeconds() << " " << context << " UE IMSI " << imsi << ": connected to CellId " << cellid << " with RNTI " << rnti); std::stringstream temp_cell_dir; std::stringstream ueId; temp_cell_dir << "./v2x_temp/" << cellid; ueId << temp_cell_dir.str() << "/" << rnti; if (mkdir(temp_cell_dir.str().c_str(), S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH) != 0) { } std::ofstream outfile(ueId.str().c_str()); outfile << imsi << std::endl; outfile.close(); // zero the node's previous connection for (uint16_t i =0; i < 2; ++i) { //::cell_ue[i][imsi - 1] = 0; } // record the current cell in the matrix // ::cell_ue[cellid - 1][imsi - 1] = rnti; } void NotifyHandoverStartUe(std::string context, uint64_t imsi, uint16_t cellid, uint16_t rnti, uint16_t targetCellId) { NS_LOG_DEBUG(Simulator::Now().GetSeconds() << " " << context << " UE IMSI " << imsi << ": previously connected to CellId " << cellid << " with RNTI " << rnti << ", doing handover to CellId " << targetCellId); std::stringstream ueId; ueId << "./v2x_temp/" << cellid << "/" << rnti; remove(ueId.str().c_str()); ++handNumber; } void NotifyHandoverEndOkUe(std::string context, uint64_t imsi, uint16_t cellid, uint16_t rnti) { NS_LOG_DEBUG(Simulator::Now().GetSeconds() << " " << context << " UE IMSI " << imsi << ": successful handover to CellId " << cellid << " with RNTI " << rnti); std::stringstream target_cell_dir; std::stringstream newUeId; target_cell_dir << "./v2x_temp/" << cellid; newUeId << target_cell_dir.str() << "/" << rnti; if (mkdir(target_cell_dir.str().c_str(), S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH) != 0) { } std::ofstream outfile(newUeId.str().c_str()); outfile << imsi << std::endl; outfile.close(); } void NotifyConnectionEstablishedEnb(std::string context, uint64_t imsi, uint16_t cellid, uint16_t rnti) { NS_LOG_DEBUG(Simulator::Now().GetSeconds() << " " << context << " eNB CellId " << cellid << ": successful connection of UE with IMSI " << imsi << " RNTI " << rnti); } void NotifyHandoverStartEnb(std::string context, uint64_t imsi, uint16_t cellid, uint16_t rnti, uint16_t targetCellId) { NS_LOG_DEBUG(Simulator::Now().GetSeconds() << " " << context << " eNB CellId " << cellid << ": start handover of UE with IMSI " << imsi << " RNTI " << rnti << " to CellId " << targetCellId); } void NotifyHandoverEndOkEnb(std::string context, uint64_t imsi, uint16_t cellid, uint16_t rnti) { NS_LOG_DEBUG(Simulator::Now().GetSeconds() << " " << context << " eNB CellId " << cellid << ": completed handover of UE with IMSI " << imsi << " RNTI " << rnti); } static void PrintCellInfo (Ptr<EnergySource> es) { std::cout << "At " << Simulator::Now ().GetSeconds () << " Cell voltage: " << es->GetSupplyVoltage () << " V Remaining Capacity: " << es->GetRemainingEnergy () / (3.6 * 3600) << " Ah " << es->GetNode ()->GetId() << " node ID" <<std::endl; Ptr<LiIonEnergySource> bat = es->GetNode ()->GetObject<LiIonEnergySource> (); NS_LOG_UNCOND (bat->GetRemainingEnergy ()); if (!Simulator::IsFinished ()) { Simulator::Schedule (Seconds (1), &PrintCellInfo, es); } } int main (int argc, char *argv[]) { uint64_t segmentDuration = 2000000; // The simulation id is used to distinguish log file results from potentially multiple consequent simulation runs. simulationId = 1; numberOfUeNodes = 20; uint16_t numberOfEnbNodes = 10; uint32_t numberOfServers = 4; std::string adaptationAlgo = "festive"; std::string segmentSizeFilePath = "src/esba-dash-energy/dash/segmentSizesBigBuck1A.txt"; //bool shortGuardInterval = true; int seedValue = 1; uint16_t pol=4; //lastRx=[numberOfUeNodes]; LogComponentEnable("dash-migrationExample", LOG_LEVEL_ALL); CommandLine cmd; cmd.Usage ("Simulation of streaming with DASH.\n"); cmd.AddValue ("simulationId", "The simulation's index (for logging purposes)", simulationId); cmd.AddValue ("numberOfUeNodes", "The number of clients", numberOfUeNodes); cmd.AddValue ("numberOfEnbNodes", "The number of ENB nodes", numberOfEnbNodes); cmd.AddValue ("segmentDuration", "The duration of a video segment in microseconds", segmentDuration); cmd.AddValue ("adaptationAlgo", "The adaptation algorithm that the client uses for the simulation", adaptationAlgo); cmd.AddValue ("segmentSizeFile", "The relative path (from ns-3.x directory) to the file containing the segment sizes in bytes", segmentSizeFilePath); cmd.AddValue("seedValue", "random seed value.", seedValue); cmd.AddValue("politica", "value to choose the type of politica to be used (0 is AHP , 1 is Greedy, 2 is random and 3 is none. Default is 3)", pol); cmd.Parse (argc, argv); RngSeedManager::SetSeed(seedValue + 10000); srand(seedValue); Config::SetDefault ("ns3::LteUeNetDevice::DlEarfcn", UintegerValue (100)); Config::SetDefault ("ns3::LteEnbNetDevice::DlEarfcn", UintegerValue (100)); Config::SetDefault ("ns3::LteEnbNetDevice::UlEarfcn", UintegerValue (18100)); Config::SetDefault ("ns3::LteEnbNetDevice::DlBandwidth", UintegerValue (100)); Config::SetDefault ("ns3::LteEnbNetDevice::UlBandwidth", UintegerValue (100)); Config::SetDefault("ns3::LteEnbRrc::DefaultTransmissionMode", UintegerValue(1)); Config::SetDefault("ns3::TcpSocket::SegmentSize", UintegerValue (1446)); Config::SetDefault("ns3::TcpSocket::SndBufSize", UintegerValue (524288)); Config::SetDefault("ns3::TcpSocket::RcvBufSize", UintegerValue (524288)); Ptr<LteHelper> lteHelper = CreateObject<LteHelper> (); Ptr<PointToPointEpcHelper> epcHelper = CreateObject<PointToPointEpcHelper> (); lteHelper->SetEpcHelper (epcHelper); lteHelper->SetSchedulerType("ns3::PssFfMacScheduler"); lteHelper->SetSchedulerAttribute("nMux", UintegerValue(1)); // the maximum number of UE selected by TD scheduler lteHelper->SetSchedulerAttribute("PssFdSchedulerType", StringValue("CoItA")); // PF scheduler type in PSS lteHelper->SetHandoverAlgorithmType("ns3::A2A4RsrqHandoverAlgorithm"); lteHelper->SetHandoverAlgorithmAttribute("ServingCellThreshold", UintegerValue(32)); lteHelper->SetHandoverAlgorithmAttribute("NeighbourCellOffset", UintegerValue(5)); lteHelper->EnableTraces(); // Propagation Parameters lteHelper->SetEnbDeviceAttribute("DlEarfcn", UintegerValue(100)); lteHelper->SetEnbDeviceAttribute("UlEarfcn", UintegerValue(18100)); //lteHelper->SetAttribute("PathlossModel",StringValue("ns3::Cost231PropagationLossModel")); /* //-------------Antenna Parameters lteHelper->SetEnbAntennaModelType("ns3::CosineAntennaModel"); lteHelper->SetEnbAntennaModelAttribute("Orientation", DoubleValue(0)); lteHelper->SetEnbAntennaModelAttribute("Beamwidth", DoubleValue(60)); Config::SetDefault("ns3::LteHelper::UseIdealRrc", BooleanValue(false));*/ // parse again so you can override default values from the command line Ptr<Node> pgw = epcHelper->GetPgwNode (); // Create a single RemoteHost NodeContainer remoteHosts; remoteHosts.Create (numberOfServers); Ptr<Node> remoteHost = remoteHosts.Get (0); Ptr<Node> remoteHost2 = remoteHosts.Get (1); Ptr<Node> remoteHost3= remoteHosts.Get (2); Ptr<Node> remoteHost4= remoteHosts.Get (3); InternetStackHelper internet; internet.Install (remoteHosts); Ptr<Node> router = CreateObject<Node> (); internet.Install (router); // Create p2p links PointToPointHelper p2ph; p2ph.SetDeviceAttribute ("DataRate", DataRateValue (DataRate ("1Gb/s"))); p2ph.SetDeviceAttribute ("Mtu", UintegerValue (1500)); p2ph.SetChannelAttribute ("Delay", TimeValue(MilliSeconds(0))); //Install link between PGW and Router NetDeviceContainer pgwRouterDevices = p2ph.Install (pgw, router); NetDeviceContainer remoteHostsDevices; NetDeviceContainer routerDevices; for (uint16_t u = 0; u < numberOfServers; u++) { if (u==1) { p2ph.SetChannelAttribute("Delay", TimeValue(MilliSeconds(20))); } if (u==2) { p2ph.SetDeviceAttribute ("DataRate", DataRateValue (DataRate ("500Kb/s"))); } NetDeviceContainer c = p2ph.Install (router, remoteHosts.Get (u)); routerDevices.Add (c.Get(0)); remoteHostsDevices.Add (c.Get(1)); } // Assigning Ipv4 Addresses Ipv4InterfaceContainer routerInterfaces; Ipv4InterfaceContainer remoteHostsInterfaces; Ipv4AddressHelper pgwRouterIpv4 ("192.168.0.0", "255.255.0.0"); Ipv4InterfaceContainer pgwRouterInterfaces = pgwRouterIpv4.Assign(pgwRouterDevices); Ipv4AddressHelper internetIpv4 ("1.0.0.0", "255.0.0.0"); for (uint16_t r = 0; r < remoteHosts.GetN(); ++r) { NetDeviceContainer ndc; ndc.Add (remoteHostsDevices.Get (r)); ndc.Add (routerDevices.Get (r)); //ndc.Add (pgwDevices.Get (r)); Ipv4InterfaceContainer ifc = internetIpv4.Assign (ndc); remoteHostsInterfaces.Add (ifc.Get (0)); routerInterfaces.Add (ifc.Get (1)); } Ipv4StaticRoutingHelper ipv4RoutingHelper; uint16_t j = 2; for (uint16_t u = 0; u < numberOfServers; u++) { std::stringstream ss; ss << u + j; Ptr<Ipv4StaticRouting> remoteHostStaticRouting = ipv4RoutingHelper.GetStaticRouting (remoteHosts.Get (u)->GetObject<Ipv4> ()); remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask ("255.0.0.0"), Ipv4Address(("1.0.0." + ss.str()).c_str()), 1); j++; } Ptr<Ipv4StaticRouting> routerStaticRouting = ipv4RoutingHelper.GetStaticRouting (router->GetObject<Ipv4> ()); routerStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask ("255.0.0.0"), Ipv4Address("192.168.0.1"), 1); j = 1; for (uint16_t u = 0; u < numberOfServers; u++) { std::stringstream ss; ss << u + j; routerStaticRouting->AddHostRouteTo (Ipv4Address (("1.0.0." + ss.str()).c_str()), j+1); j++; } Ptr<Ipv4StaticRouting> pgwStaticRouting = ipv4RoutingHelper.GetStaticRouting (pgw->GetObject<Ipv4> ()); pgwStaticRouting->AddNetworkRouteTo (Ipv4Address ("1.0.0.0"), Ipv4Mask ("255.0.0.0"), Ipv4Address("192.168.0.2"), 2); server1Address = Address(remoteHostsInterfaces.GetAddress (0)); server2Address = Address(remoteHostsInterfaces.GetAddress (1)); server3Address = Address(remoteHostsInterfaces.GetAddress (2)); cloudAddress = Address(remoteHostsInterfaces.GetAddress (3)); /* Set up WAN link between server node and access point*//* PointToPointHelper p2p; p2p.SetDeviceAttribute ("DataRate", StringValue ("1Gb/s")); // This must not be more than the maximum throughput in 802.11n p2p.SetDeviceAttribute ("Mtu", UintegerValue (1500)); p2p.SetChannelAttribute ("Delay", StringValue ("0ms")); NetDeviceContainer wanIpDevices; wanIpDevices = p2p.Install (remoteHost, pgw); p2p.SetDeviceAttribute ("DataRate", StringValue ("1Gb/s")); // This must not be more than the maximum throughput in 802.11n p2p.SetDeviceAttribute ("Mtu", UintegerValue (1500)); p2p.SetChannelAttribute ("Delay", StringValue ("100ms")); NetDeviceContainer wanIpDevices2; wanIpDevices2 = p2p.Install (remoteHost2, remoteHost); p2p.SetDeviceAttribute ("DataRate", StringValue ("1Kb/s")); // This must not be more than the maximum throughput in 802.11n p2p.SetDeviceAttribute ("Mtu", UintegerValue (1500)); p2p.SetChannelAttribute ("Delay", StringValue ("1ms")); NetDeviceContainer wanIpDevices3; wanIpDevices3 = p2p.Install (remoteHost3, remoteHost2); p2p.SetDeviceAttribute ("DataRate", StringValue ("1Gb/s")); // This must not be more than the maximum throughput in 802.11n p2p.SetDeviceAttribute ("Mtu", UintegerValue (1500)); p2p.SetChannelAttribute ("Delay", StringValue ("96ms")); NetDeviceContainer wanIpDevices4; wanIpDevices4 = p2p.Install (remoteHost4, remoteHost3); /* Assign IP addresses *//* Ipv4AddressHelper address; Ipv4AddressHelper address2; Ipv4AddressHelper address3; Ipv4AddressHelper address4; /* IPs for WAN *//* address.SetBase ("1.0.0.0", "255.255.255.0"); address2.SetBase ("2.0.0.0", "255.255.255.0"); address3.SetBase ("3.0.0.0", "255.255.255.0"); address4.SetBase ("4.0.0.0", "255.255.255.0"); Ipv4InterfaceContainer wanInterface = address.Assign (wanIpDevices); Ipv4InterfaceContainer wanInterface2 = address2.Assign (wanIpDevices2); Ipv4InterfaceContainer wanInterface3 = address3.Assign (wanIpDevices3); Ipv4InterfaceContainer wanInterface4 = address4.Assign (wanIpDevices4); server1Address = Address(wanInterface.GetAddress (0)); server2Address = Address(wanInterface2.GetAddress (0)); server3Address = Address(wanInterface3.GetAddress (0)); cloudAddress = Address(wanInterface4.GetAddress (0)); Ipv4StaticRoutingHelper ipv4RoutingHelper; Ptr<Ipv4StaticRouting> remoteStaticRouting = ipv4RoutingHelper.GetStaticRouting (remoteHost->GetObject<Ipv4> ()); remoteStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask ("255.0.0.0"), 1); Ptr<Ipv4StaticRouting> remoteStaticRouting2 = ipv4RoutingHelper.GetStaticRouting (remoteHost2->GetObject<Ipv4> ()); remoteStaticRouting2->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask ("255.0.0.0"), 1); Ptr<Ipv4StaticRouting> remoteStaticRouting3 = ipv4RoutingHelper.GetStaticRouting (remoteHost3->GetObject<Ipv4> ()); remoteStaticRouting3->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask ("255.0.0.0"), 1); Ptr<Ipv4StaticRouting> remoteStaticRouting4 = ipv4RoutingHelper.GetStaticRouting (remoteHost4->GetObject<Ipv4> ()); remoteStaticRouting4->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask ("255.0.0.0"), 1); /* Create Nodes */ NodeContainer UeNodes; UeNodes.Create (numberOfUeNodes); NodeContainer EnbNodes; EnbNodes.Create (numberOfEnbNodes); std::vector <std::pair <Ptr<Node>, std::string> > clients; for (NodeContainer::Iterator i = UeNodes.Begin (); i != UeNodes.End (); ++i) { std::pair <Ptr<Node>, std::string> client (*i, adaptationAlgo); clients.push_back (client); } ////////////////////////////////////////////////////////////////////////////////////////////////// //// Set up Building ////////////////////////////////////////////////////////////////////////////////////////////////// /* double roomHeight = 3; double roomLength = 6; double roomWidth = 5; uint32_t xRooms = 8; uint32_t yRooms = 3; uint32_t nFloors = 6; Ptr<Building> b = CreateObject <Building> (); b->SetBoundaries (Box ( 0.0, xRooms * roomWidth, 0.0, yRooms * roomLength, 0.0, nFloors * roomHeight)); b->SetBuildingType (Building::Office); b->SetExtWallsType (Building::ConcreteWithWindows); b->SetNFloors (6); b->SetNRoomsX (8); b->SetNRoomsY (3); Vector posAp = Vector ( 1.0, 1.0, 1.0); // give the server node any position, it does not have influence on the simulation, it has to be set though, // because when we do: mobility.Install (networkNodes);, there has to be a position as place holder for the server // because otherwise the first client would not get assigned the desired position. Vector posServer = Vector (1.5, 1.5, 1.5); /* Set up positions of nodes (AP and server) */ /* Ptr<ListPositionAllocator> positionAlloc = CreateObject<ListPositionAllocator> (); positionAlloc->Add (posAp); positionAlloc->Add (posServer); Ptr<RandomRoomPositionAllocator> randPosAlloc = CreateObject<RandomRoomPositionAllocator> (); randPosAlloc->AssignStreams (simulationId);*/ // create folder so we can log the positions of the clients const char * mylogsDir = dashLogDirectory.c_str(); mkdir (mylogsDir, S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH); std::string tobascoDirTmp = dashLogDirectory + adaptationAlgo + "/"; const char * tobascoDir = tobascoDirTmp.c_str(); //const char * tobascoDir = (ToString (dashLogDirectory) + ToString (adaptationAlgo) + "/").c_str(); mkdir (tobascoDir, S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH); dirTmp = dashLogDirectory + adaptationAlgo + "/" + ToString (numberOfUeNodes) + "/"; //const char * dir = (ToString (dashLogDirectory) + ToString (adaptationAlgo) + "/" + ToString (numberOfUeNodes) + "/").c_str(); const char * dir = dirTmp.c_str(); mkdir(dir, S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH); dirTmp = dashLogDirectory + adaptationAlgo + "/" + ToString (numberOfUeNodes) + "/" + ToString (pol) + "/"; //const char * dir = (ToString (dashLogDirectory) + ToString (adaptationAlgo) + "/" + ToString (numberOfClients) + "/").c_str(); dir = dirTmp.c_str(); mkdir(dir, S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH); std::cout << mylogsDir << "\n"; std::cout << tobascoDir << "\n"; std::cout << dir << "\n"; /*std::ofstream clientPosLog; std::string clientPos = dashLogDirectory + adaptationAlgo + "/" + ToString (numberOfUeNodes) + "/" + "sim" + ToString (simulationId) + "_" + "clientPos.txt"; clientPosLog.open (clientPos.c_str()); std::cout << clientPos << "\n"; NS_ASSERT_MSG (clientPosLog.is_open(), "Couldn't open clientPosLog file"); // allocate clients to positions for (uint i = 0; i < numberOfUeNodes; i++) { Vector pos = Vector (randPosAlloc->GetNext()); positionAlloc->Add (pos); // log client positions clientPosLog << ToString(pos.x) << ", " << ToString(pos.y) << ", " << ToString(pos.z) << "\n"; clientPosLog.flush (); }*/ Ptr < ListPositionAllocator > HpnPosition = CreateObject < ListPositionAllocator > (); ArrayPositionAllocator(HpnPosition); MobilityHelper mobilityEnb; mobilityEnb.SetMobilityModel("ns3::ConstantPositionMobilityModel"); //mobilityEnb.SetPositionAllocator(HpnPosition); mobilityEnb.Install(EnbNodes); // remote host mobility (constant) MobilityHelper remoteHostMobility; remoteHostMobility.SetMobilityModel("ns3::ConstantPositionMobilityModel"); remoteHostMobility.Install(pgw); remoteHostMobility.Install(remoteHosts); // User Devices mobility Ns2MobilityHelper ue_mobil = Ns2MobilityHelper("mobil/mobility_25_users.tcl"); MobilityHelper ueMobility; MobilityHelper enbMobility; ue_mobil.Install(UeNodes.Begin(), UeNodes.End()); NetDeviceContainer enbLteDevs = lteHelper->InstallEnbDevice (EnbNodes); NetDeviceContainer ueLteDevs = lteHelper->InstallUeDevice (UeNodes); // Install the IP stack on the UEs internet.Install (UeNodes); Ipv4InterfaceContainer ueIpIface; ueIpIface = epcHelper->AssignUeIpv4Address (NetDeviceContainer (ueLteDevs)); for (uint32_t u = 0; u < UeNodes.GetN (); ++u) { Ptr<Node> ueNode = UeNodes.Get (u); // Set the default gateway for the UE Ptr<Ipv4StaticRouting> ueStaticRouting = ipv4RoutingHelper.GetStaticRouting (ueNode->GetObject<Ipv4> ()); ueStaticRouting->SetDefaultRoute (epcHelper->GetUeDefaultGatewayAddress (), 1); } // Attach one UE per eNodeB lteHelper->Attach(ueLteDevs); lteHelper->AddX2Interface(EnbNodes); lteHelper->EnablePhyTraces (); lteHelper->EnableMacTraces (); uint16_t port= 9; //V4PingHelper ping = V4PingHelper (wanInterface.GetAddress (0)); //ApplicationContainer apps = ping.Install (pgw); //V4PingHelper ping2 = V4PingHelper (wanInterface2.GetAddress (0)); //apps.Add(ping2.Install (pgw)); //V4PingHelper ping3 = V4PingHelper (wanInterface3.GetAddress (0)); //apps.Add(ping3.Install (pgw)); //V4PingHelper ping4 = V4PingHelper (wanInterface4.GetAddress (0)); //apps.Add(ping4.Install (pgw)); //apps.Start (Seconds (2.0)); // finally, print the ping rtts. Config::Connect ("/NodeList/*/ApplicationList/*/$ns3::V4Ping/Rtt",MakeCallback (&PingRtt)); //Packet::EnablePrinting (); NodeContainer servers; servers.Add(remoteHost); servers.Add(remoteHost2); servers.Add(remoteHost3); servers.Add(remoteHost4); TcpStreamServerHelper serverHelper (port,simulationId,dirTmp); //NS_LOG_UNCOND("dash Install 277"); serverHelper.SetAttribute ("RemoteAddress", AddressValue (server1Address)); ApplicationContainer serverApp = serverHelper.Install (remoteHost);//NS_LOG_UNCOND("dash Install 278"); serverHelper.SetAttribute ("RemoteAddress", AddressValue (server2Address)); serverApp = serverHelper.Install (remoteHost2); serverHelper.SetAttribute ("RemoteAddress", AddressValue (server3Address)); serverApp = serverHelper.Install (remoteHost3); serverHelper.SetAttribute ("RemoteAddress", AddressValue (cloudAddress)); serverApp = serverHelper.Install (remoteHost4); serverApp.Start (Seconds (1.0)); //serverApp2.Start (Seconds (1.0)); //serverApp3.Start (Seconds (1.0)); std::vector <std::pair <Ptr<Node>, std::string> > clients_temp0; std::vector <std::pair <Ptr<Node>, std::string> > clients_temp1; std::vector <std::pair <Ptr<Node>, std::string> > clients_temp2; std::vector <std::pair <Ptr<Node>, std::string> > clients_temp3; /* for (uint i = 0; i < numberOfUeNodes; i++) { if(i<numberOfUeNodes/4) { clients_temp0.push_back(clients[i]); } else if(i<(2*numberOfUeNodes)/4) { clients_temp1.push_back(clients[i]); } else if(i<(3*numberOfUeNodes)/4) { clients_temp2.push_back(clients[i]); } else { clients_temp3.push_back(clients[i]); } } /* Install TCP/UDP Transmitter on the station */ TcpStreamClientHelper clientHelper (server1Address, port,pol); clientHelper.SetAttribute ("SegmentDuration", UintegerValue (segmentDuration)); clientHelper.SetAttribute ("SegmentSizeFilePath", StringValue (segmentSizeFilePath)); clientHelper.SetAttribute ("NumberOfClients", UintegerValue(numberOfUeNodes)); clientHelper.SetAttribute ("SimulationId", UintegerValue (simulationId)); clientHelper.SetAttribute ("ServerId", UintegerValue (0)); ApplicationContainer clientApps = clientHelper.Install (clients); //TcpStreamClientHelper clientHelper2 (server2Address, port); clientHelper.SetAttribute ("RemoteAddress", AddressValue (server2Address)); clientHelper.SetAttribute ("RemotePort", UintegerValue (port)); clientHelper.SetAttribute ("SegmentDuration", UintegerValue (segmentDuration)); clientHelper.SetAttribute ("SegmentSizeFilePath", StringValue (segmentSizeFilePath)); clientHelper.SetAttribute ("NumberOfClients", UintegerValue(numberOfUeNodes)); clientHelper.SetAttribute ("SimulationId", UintegerValue (simulationId)); clientHelper.SetAttribute ("ServerId", UintegerValue (1)); clientApps.Add(clientHelper.Install (clients_temp1)); //TcpStreamClientHelper clientHelper3 (server3Address, port); clientHelper.SetAttribute ("RemoteAddress", AddressValue (server3Address)); clientHelper.SetAttribute ("RemotePort", UintegerValue (port)); clientHelper.SetAttribute ("SegmentDuration", UintegerValue (segmentDuration)); clientHelper.SetAttribute ("SegmentSizeFilePath", StringValue (segmentSizeFilePath)); clientHelper.SetAttribute ("NumberOfClients", UintegerValue(numberOfUeNodes)); clientHelper.SetAttribute ("SimulationId", UintegerValue (simulationId)); clientHelper.SetAttribute ("ServerId", UintegerValue (2)); clientApps.Add(clientHelper.Install (clients_temp2)); clientHelper.SetAttribute ("RemoteAddress", AddressValue (cloudAddress)); clientHelper.SetAttribute ("RemotePort", UintegerValue (port)); clientHelper.SetAttribute ("SegmentDuration", UintegerValue (segmentDuration)); clientHelper.SetAttribute ("SegmentSizeFilePath", StringValue (segmentSizeFilePath)); clientHelper.SetAttribute ("NumberOfClients", UintegerValue(numberOfUeNodes)); clientHelper.SetAttribute ("SimulationId", UintegerValue (simulationId)); clientHelper.SetAttribute ("ServerId", UintegerValue (3)); clientApps.Add(clientHelper.Install (clients_temp3)); for (uint i = 0; i < clientApps.GetN (); i++) { double startTime = 2.0; clientApps.Get (i)->SetStartTime (Seconds (startTime+(i/10))); } Ptr<EnergySourceContainer> esCont = CreateObject<EnergySourceContainer> (); for (uint16_t i = 0; i < numberOfUeNodes; i++) { Ptr<SimpleDeviceEnergyModel> sem = CreateObject<SimpleDeviceEnergyModel> (); Ptr<LiIonEnergySource> es = CreateObject<LiIonEnergySource> (); esCont->Add (es); es->SetNode (UeNodes.Get(i)); sem->SetEnergySource (es); es->AppendDeviceEnergyModel (sem); sem->SetNode (UeNodes.Get(i)); UeNodes.Get(i)->AggregateObject (es); PrintCellInfo (esCont->Get(i)); } /* /* Install TCP Receiver on the access point */ /* std::vector <std::pair <Ptr<Node>, std::string> > clients_temp0; clients_temp0.push_back(clients[0]);*/ /* Install TCP/UDP Transmitter on the station */ //TcpStreamClientHelper clientHelper (serverAddress, port); //NS_LOG_UNCOND("dash Install 288"); //clientHelper.SetAttribute ("SegmentDuration", UintegerValue (segmentDuration)); //clientHelper.SetAttribute ("SegmentSizeFilePath", StringValue (segmentSizeFilePath)); //clientHelper.SetAttribute ("numberOfUeNodes", UintegerValue(numberOfUeNodes)); //clientHelper.SetAttribute ("SimulationId", UintegerValue (simulationId)); //NS_LOG_UNCOND("dash Install 292"); //ApplicationContainer clientApps = clientHelper.Install (clients); //NS_LOG_UNCOND("dash Install 293"); /* std::vector <std::pair <Ptr<Node>, std::string> > clients_temp1; clients_temp1.push_back(clients[1]); TcpStreamClientHelper clientHelper2 (serverAddress2, port); clientHelper2.SetAttribute ("SegmentDuration", UintegerValue (segmentDuration)); clientHelper2.SetAttribute ("SegmentSizeFilePath", StringValue (segmentSizeFilePath)); clientHelper2.SetAttribute ("numberOfUeNodes", UintegerValue(numberOfUeNodes)); clientHelper2.SetAttribute ("SimulationId", UintegerValue (simulationId+1)); ApplicationContainer clientApps2 = clientHelper2.Install (clients_temp1);*/ //for (uint i = 0; i < clientApps.GetN (); i++) //{ //double startTime = 2.0 + ((i * 3) / 100.0); //clientApps.Get (i)->SetStartTime (Seconds (startTime)); //} /* for (uint i = 0; i < clientApps2.GetN (); i++) { double startTime = 2.0 + ((i * 3) / 100.0); clientApps2.Get (i)->SetStartTime (Seconds (startTime)); }*/ //Ptr<FlowMonitor> flowMonitor; //FlowMonitorHelper flowHelper; //flowMonitor = flowHelper.InstallAll(); //Ptr<Ipv4FlowClassifier> classifier = DynamicCast<Ipv4FlowClassifier> (flowHelper.GetClassifier ()); throughputs.reserve(numberOfUeNodes); throughputs.resize(numberOfUeNodes); Stalls.reserve(numberOfUeNodes); Stalls.resize(numberOfUeNodes); Rebuffers.reserve(numberOfUeNodes); Rebuffers.resize(numberOfUeNodes); /* AnimationInterface anim("pandora_anim.xml"); for (uint32_t i = 0; i < EnbNodes.GetN(); ++i) { anim.UpdateNodeDescription(EnbNodes.Get(i), "eNb--------------"); anim.UpdateNodeColor(EnbNodes.Get(i), 0, 255, 0); } for (uint32_t i = 0; i < UeNodes.GetN(); ++i) { anim.UpdateNodeDescription(UeNodes.Get(i), "UE"); anim.UpdateNodeColor(UeNodes.Get(i), 255, 0, 0); }*/ if (pol==0) { type="PMigracao"; //Simulator::Schedule(Seconds(5.001),&politica,clientApps,clientHelper,clients,serverApp, serverHelper,servers); } else { if (pol==1) { type="SMigracao"; //Simulator::Schedule(Seconds(5.001),&politica,clientApps,clientHelper,clients,serverApp, serverHelper,servers); } else { if (pol==2) { type="AMigracao"; //Simulator::Schedule(Seconds(5.001),&politica,clientApps,clientHelper,clients,serverApp, serverHelper,servers); } } } //FlowMonitorHelper flowmon; // Ptr < FlowMonitor > monitor = flowmon.InstallAll(); InitializeLogFiles (dashLogDirectory, adaptationAlgo,ToString(numberOfUeNodes),ToString(simulationId),ToString(pol)); /*--------------HANDOVER NOTIFICATIONS-------------------------*/ Config::Connect("/NodeList/*/DeviceList/*/LteUeRrc/ConnectionEstablished", MakeCallback( & NotifyConnectionEstablishedUe)); Config::Connect("/NodeList/*/DeviceList/*/LteUeRrc/HandoverStart", MakeCallback( & NotifyHandoverStartUe)); Config::Connect("/NodeList/*/DeviceList/*/LteUeRrc/HandoverEndOk", MakeCallback( & NotifyHandoverEndOkUe)); //Simulator::Stop(Seconds(7.5)); NS_LOG_INFO ("Run Simulation."); NS_LOG_INFO ("Sim: " << simulationId << "Clients: " << numberOfUeNodes); Simulator::Schedule(Seconds(5),&getClientsOnServer,serverApp, serverHelper, servers); Simulator::Schedule(Seconds(2),&getThropughputServer,serverApp, serverHelper,servers); Simulator::Schedule(Seconds(2),&getThropughputClients,clientApps,clientHelper,clients); Simulator::Schedule(Seconds(3),&getStall,clientApps,clientHelper,clients); Simulator::Schedule(Seconds(10),&getStartTime,clientApps,clientHelper,clients); if (pol=!0) { Simulator::Schedule(Seconds(4.12),&politica,clientApps,clientHelper,clients, serverHelper,servers,13); Simulator::Schedule(Seconds(4.72),&politica,clientApps,clientHelper,clients, serverHelper,servers,6); Simulator::Schedule(Seconds(6.88),&politica,clientApps,clientHelper,clients, serverHelper,servers,19); Simulator::Schedule(Seconds(9.76),&politica,clientApps,clientHelper,clients, serverHelper,servers,0); Simulator::Schedule(Seconds(12.84),&politica,clientApps,clientHelper,clients, serverHelper,servers,3); Simulator::Schedule(Seconds(15.48),&politica,clientApps,clientHelper,clients, serverHelper,servers,13); Simulator::Schedule(Seconds(64.48),&politica,clientApps,clientHelper,clients, serverHelper,servers,8); Simulator::Schedule(Seconds(68.56),&politica,clientApps,clientHelper,clients, serverHelper,servers,3); Simulator::Schedule(Seconds(80.32),&politica,clientApps,clientHelper,clients, serverHelper,servers,17); Simulator::Schedule(Seconds(81.48),&politica,clientApps,clientHelper,clients, serverHelper,servers,6); Simulator::Schedule(Seconds(99.56),&politica,clientApps,clientHelper,clients, serverHelper,servers,3); } //Simulator::Schedule(Seconds(1),&throughput,flowMonitor,classifier); Simulator::Run (); /* monitor->CheckForLostPackets(); Ptr < Ipv4FlowClassifier > classifier = DynamicCast < Ipv4FlowClassifier > (flowmon.GetClassifier()); FlowMonitor::FlowStatsContainer stats = monitor->GetFlowStats(); for (std::map < FlowId, FlowMonitor::FlowStats > ::const_iterator i = stats.begin(); i != stats.end(); ++i) { if (i->first > 2) { Ipv4FlowClassifier::FiveTuple t = classifier->FindFlow(i->first); std::cout << "Flow " << i->first - 2 << " (" << t.sourceAddress << " -> " << t.destinationAddress << ")\n"; std::cout << " Tx Packets: " << i->second.txPackets << "\n"; std::cout << " Tx Bytes: " << i->second.txBytes << "\n"; std::cout << " TxOffered: " << i->second.txBytes * 8.0 / 9.0 / 1000 / 1000 << " Mbps\n"; std::cout << " Rx Packets: " << i->second.rxPackets << "\n"; std::cout << " Rx Bytes: " << i->second.rxBytes << "\n"; std::cout << " Throughput: " << i->second.rxBytes * 8.0 / 9.0 / 1000 / 1000 << " Mbps\n"; } }*/ //flowMonitor->SerializeToXmlFile ("results.xml" , true, true ); Simulator::Destroy (); NS_LOG_INFO ("Done."); }
[ "derian.sobral@gmail.com" ]
derian.sobral@gmail.com
ef93fd5354b9f7c4cb56139075b500af1676c852
34626fa16da7f909826a0ddba535f90760d9326c
/cpp/main.cpp
3196f33c95190ac6e44acaaa3f25bb050e3b0b1e
[]
no_license
lennyferguson/MachineLearningLangs
db34f3269050cd6a52b3948d1bcd14afbd78bb3d
4f21ca53c5520ce79e4e650b88a003c2084dac3c
refs/heads/master
2020-06-10T06:25:17.762156
2016-12-12T05:04:11
2016-12-12T05:04:11
76,054,693
0
0
null
null
null
null
UTF-8
C++
false
false
943
cpp
#include "nvec.h" #include <iostream> #include <cassert> using namespace std; using namespace ML; /* Testing Functions */ int main() { // Use Variadic Constructor! MlVecD a(1.0,1.0,1.0,1.0); // Or use Initialize List! MlVecD b = { 2.0, 3.0, 4.0, 5.0 }; assert(a == a && b == b); assert(a != b && b != a); auto c = a + b; assert(c == MlVecD(3.0,4.0,5.0,6.0)); c = b - a; assert(c == MlVecD(1.0,2.0,3.0,4.0)); c = b * b; assert(c == MlVecD(4.0,9.0,16.0,25.0)); assert(a * 2 == 2 * a && a * 2 == MlVecD(2.0,2.0,2.0,2.0)); c = b / b; assert(c == MlVecD(1.0,1.0,1.0,1.0)); c = a / 2; assert(a / 2 == a * (1.0 / 2.0) && a / 2 == MlVecD(0.5,0.5,0.5,0.5)); assert(a / 2 == a / MlVecD(2.0,2.0,2.0,2.0)); assert(a * b == b * a && a * b == MlVecD(2.0,3.0,4.0,5.0)); c = a * b + b * a; assert(c.dot(c) == 216.0); c = a.dot(b); assert(c == 14.0); cout << "Tests Passed" << endl; return 0; }
[ "trio.of.four@gmail.com" ]
trio.of.four@gmail.com
626484b934c14c04eefad43597c4f6acb00d0d28
3bc3e4a0f630c1c5caf3624b5317b87aeaabaf47
/diantiguanlixitong2/debug/moc_remark.cpp
0616a1adb997fb38383a85dd5f6d7ede74589f34
[]
no_license
bluege/diantiguanlixitong
6db2be1609dfe8d48fc4ca2a122eb5a6ebcd5140
6899a79364a033aae0a21331ebf7bc20854b95fc
refs/heads/master
2021-07-01T09:11:50.542966
2017-09-18T09:30:10
2017-09-18T09:30:10
104,162,334
0
0
null
2017-09-20T03:44:38
2017-09-20T03:44:38
null
UTF-8
C++
false
false
3,262
cpp
/**************************************************************************** ** Meta object code from reading C++ file 'remark.h' ** ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.7.0) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ #include "../remark.h" #include <QtCore/qbytearray.h> #include <QtCore/qmetatype.h> #if !defined(Q_MOC_OUTPUT_REVISION) #error "The header file 'remark.h' doesn't include <QObject>." #elif Q_MOC_OUTPUT_REVISION != 67 #error "This file was generated using the moc from 5.7.0. It" #error "cannot be used with the include files from this version of Qt." #error "(The moc has changed too much.)" #endif QT_BEGIN_MOC_NAMESPACE struct qt_meta_stringdata_remark_t { QByteArrayData data[3]; char stringdata0[32]; }; #define QT_MOC_LITERAL(idx, ofs, len) \ Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \ qptrdiff(offsetof(qt_meta_stringdata_remark_t, stringdata0) + ofs \ - idx * sizeof(QByteArrayData)) \ ) static const qt_meta_stringdata_remark_t qt_meta_stringdata_remark = { { QT_MOC_LITERAL(0, 0, 6), // "remark" QT_MOC_LITERAL(1, 7, 23), // "on_pushButton_2_clicked" QT_MOC_LITERAL(2, 31, 0) // "" }, "remark\0on_pushButton_2_clicked\0" }; #undef QT_MOC_LITERAL static const uint qt_meta_data_remark[] = { // content: 7, // revision 0, // classname 0, 0, // classinfo 1, 14, // methods 0, 0, // properties 0, 0, // enums/sets 0, 0, // constructors 0, // flags 0, // signalCount // slots: name, argc, parameters, tag, flags 1, 0, 19, 2, 0x08 /* Private */, // slots: parameters QMetaType::Void, 0 // eod }; void remark::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a) { if (_c == QMetaObject::InvokeMetaMethod) { remark *_t = static_cast<remark *>(_o); Q_UNUSED(_t) switch (_id) { case 0: _t->on_pushButton_2_clicked(); break; default: ; } } Q_UNUSED(_a); } const QMetaObject remark::staticMetaObject = { { &QDialog::staticMetaObject, qt_meta_stringdata_remark.data, qt_meta_data_remark, qt_static_metacall, Q_NULLPTR, Q_NULLPTR} }; const QMetaObject *remark::metaObject() const { return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject; } void *remark::qt_metacast(const char *_clname) { if (!_clname) return Q_NULLPTR; if (!strcmp(_clname, qt_meta_stringdata_remark.stringdata0)) return static_cast<void*>(const_cast< remark*>(this)); return QDialog::qt_metacast(_clname); } int remark::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 < 1) qt_static_metacall(this, _c, _id, _a); _id -= 1; } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) { if (_id < 1) *reinterpret_cast<int*>(_a[0]) = -1; _id -= 1; } return _id; } QT_END_MOC_NAMESPACE
[ "674886842@qq.com" ]
674886842@qq.com
2e97afaa3d95044bf0bd92c23bd03bd5e394f624
e431a1685ace7e541da641d9005195db89cb1b6f
/368_v1.cpp
0dc7db41ed3930af6ff871f966aaf1fe98e45aec
[]
no_license
jianminchen/LeetCode-17
7f82230be3510fdfb60847bcee521e6796b33ea9
68080d07819bf81823a0c9d25ec84f2a19d422a6
refs/heads/master
2021-01-19T07:07:30.481800
2016-07-17T08:08:56
2016-07-17T08:08:56
67,087,459
1
0
null
2016-09-01T01:35:35
2016-09-01T01:35:34
null
UTF-8
C++
false
false
1,130
cpp
/* 368_v1.cpp Largest Divisible Subset My first submission got WA. I didn't think too much about the initialization part so I just went ahead and memset the two arrays f and prev as 0. This apparently is incorrect since f[] at least can be 1. */ class Solution { public: vector<int> largestDivisibleSubset(vector<int>& nums) { vector<int> ret; int n = nums.size(), f[n], prev[n]; if (n == 0) return ret; sort(nums.begin(), nums.end()); for (int i = 0; i < n; i++) f[i] = 1, prev[i] = i; for (int i = 1; i < n; i++) { for (int j = 0; j < i; j++) { if (nums[i] % nums[j] == 0) { if (f[j] + 1 > f[i]) { f[i] = f[j] + 1; prev[i] = j; } } } } int maxAns = 1, maxIdx = 0; for (int i = 1; i < n; i++) { if (f[i] > maxAns) { maxAns = f[i]; maxIdx = i; } } ret.push_back(nums[maxIdx]); int currIdx = maxIdx; while (currIdx != prev[currIdx]) { currIdx = prev[currIdx]; ret.push_back(nums[currIdx]); } sort(ret.begin(), ret.end()); return ret; } };
[ "phoenixinter@gmail.com" ]
phoenixinter@gmail.com
bfba9c8c2503515c9e4dfc22123a821d0a293f37
4b9848f1a9496af06c9a8c8acebed34129d6a712
/testing/test_sort/sort.h
2f90fba6400192e7c4312a009343ee675fcf8c57
[]
no_license
zcorvid/stalg
8bf2e06d72078c96d4aec5158fd24732ba64166f
99fbd625e99e784025f70402c08260fa84c76711
refs/heads/master
2022-12-03T02:42:03.194003
2020-08-21T12:46:05
2020-08-21T12:46:05
null
0
0
null
null
null
null
UTF-8
C++
false
false
172
h
#include <algorithm> #include "stalgsort.h" template<class RandomIt> void tst_sort(RandomIt begin_it, RandomIt end_it) { CombSort(&(*begin_it), end_it - begin_it); }
[ "blackzabeth@yandex.ru" ]
blackzabeth@yandex.ru
0537340e917e37a0b12917f75c16fa76be3df6de
7d445799f32995d24bcffa79784175314bcbc922
/DynamicProgramming/DynamicProgramming/Thief.cpp
7d02b668c3f27f19596f7978d7b94fd8d81dacd7
[]
no_license
kimhyeyun/Programmers
2c73280eb9b2960835071e33e7c9bd5c992c159e
b3d9aa4b22a2313ff9ddef8b060cba3d70c6d899
refs/heads/master
2022-12-30T09:16:35.723658
2020-10-20T03:34:18
2020-10-20T03:34:18
287,903,433
0
0
null
null
null
null
UHC
C++
false
false
661
cpp
#include<iostream> #include <string> #include <vector> using namespace std; int solution(vector<int> money) { vector<int> dp1(money.size() - 1); vector<int> dp2(money.size()); //출발점 dp1[0] = money[0]; dp1[1] = money[0]; for (int i = 2;i < money.size() - 1;i++) dp1[i] = max(dp1[i - 1], dp1[i - 2] + money[i]); //두번째 집이 출발점 dp2[0] = 0; dp2[1] = money[1]; for (int i = 2;i < money.size();i++) dp2[i] = max(dp2[i - 2] + money[i], dp2[i - 1]); return max(dp1[money.size() - 2], dp2[money.size() - 1]); } int main() { vector<int> m = { 1,2,3,1 }; cout << solution(m); }
[ "cqqwer@gmail.com" ]
cqqwer@gmail.com
804dbfc81db5c860993dd1af9e59e7dafc22e378
a8bc07f102ec1383f4e79e7e3ba13b1ec659de0d
/Source/GIS/LevelSet.h
6fdd791201dc6a1aec6e9285a03ac3fb131251d8
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
hustztz/Urho3D
19c2767910de18d6ab3056743467c16868220da5
90abf7d8f176da9f9b828bb7ea9f46d1058ed009
refs/heads/master
2020-03-10T04:40:04.173866
2018-08-29T08:16:24
2018-08-29T08:16:24
129,197,648
0
0
null
null
null
null
UTF-8
C++
false
false
658
h
#pragma once #include "ElevationConfig.h" #include "Level.h" #include "Sector.h" #include "LatLon.h" #include <vector> namespace GIS { class LevelSet { public: LevelSet(ElevationConfig & config); const Sector & GetSector() const noexcept; const Level & GetLevel( int index ) const; Level & GetLevel(int index); const LatLon & GetTileOrigin() const noexcept; Level & GetTargetLevel(double targetSize); uint32_t GetLevelCount() const noexcept; const Level & GetLastLevel() const; Level & GetLastLevel(); private: std::vector<Level> levels_; LatLon tileOrigin_; LatLon levelZeroTileDelta_; Sector sector_; }; }
[ "ztz_mai@163.com" ]
ztz_mai@163.com
3b0533f95549d2db86f61639a1f04452ba887ec1
7faeb9b6b0397935a7a529ebd5afccc968e27bc5
/Исходные файлы/animal.h
3ba13c4d3060930b8144e17e8c2e7bfd5332a1da
[]
no_license
VarZagus/Dekstop-Animal-World-DB
ef84d5981d1bcbda56a1ba998b898320bdf860a0
113ef17f252fead7b85997a9532ed03c29c00724
refs/heads/main
2023-05-24T10:15:44.311210
2021-06-15T23:04:40
2021-06-15T23:04:40
377,309,236
0
0
null
null
null
null
UTF-8
C++
false
false
621
h
#ifndef ANIMAL_H #define ANIMAL_H #include <QString> #include <vector> #include <fstream> #include <QFile> #include <QTextStream> using namespace std; struct animal{ QString _class; QString otrad; QString semestvo; QString vid; }; class Animals{ private: vector<animal> data; public: Animals(QFile &f); Animals(){}; void sort(); void add(animal a); void erase(int i); int search(QString v); void save(QFile &f); animal& operator[](int index); int size(); void sortVid(); void sortSemestvo(); void setSpace(); void set_(); }; #endif // ANIMAL_H
[ "69350747+VarZagus@users.noreply.github.com" ]
69350747+VarZagus@users.noreply.github.com
4e5fd845cb4fda89a62000b8c00bda5b9862423a
53e04366a96e17b01ad481353e679defac954d7a
/src/calculator/sample.calculator/DivideImpl.h
07eb016e1a4c10093d454b1012f4654fe6fbb3a5
[]
no_license
maxdebayser/nativesca
15704f7c84bc6aedd7809c5c0c117b4fc4d95373
f883669dbf01dcdfa043f724ee607f5419f585df
refs/heads/master
2016-09-06T01:16:19.896177
2013-03-18T03:20:17
2013-03-18T03:20:17
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,163
h
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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. */ /* $Rev: 452753 $ $Date: 2006-10-04 07:19:15 +0100 (Wed, 04 Oct 2006) $ */ #ifndef sample_divideimpl_h #define sample_divideimpl_h #include "Divide.h" class DivideImpl : public Divide { public: DivideImpl(); virtual ~DivideImpl(); // Divide interface virtual float divide(float arg1, float arg2); }; #endif // sample_divideimpl_h
[ "maxdebayser@gmail.com" ]
maxdebayser@gmail.com
0feda7bbfcc8a34f787e578ea74b3cb4cf462062
260774d6182ed7f0309636869abb9a0a32ea50ed
/Neat/src/Neat/Math/Types/TypeQuaternion.h
a24a16d17eb750d42c4bb6791688b505587203df
[ "Apache-2.0" ]
permissive
gabrieldinse/Neat
ff44be0dcd2570cddc50945f74918b262ac0df4e
c242378fdbd5b553b368196bd0baffc7cdfede6f
refs/heads/master
2022-11-11T05:36:56.183743
2020-07-01T23:30:28
2020-07-01T23:30:28
261,851,463
2
0
null
null
null
null
UTF-8
C++
false
false
5,754
h
#pragma once #include "Neat/Math/Types/TypeVectorN.h" #include "Neat/Math/Types/TypeMatrixMxN.h" namespace Neat { template <typename T> struct Quaternion { using Type = Quaternion<T>; using ValueType = T; // Class data union { struct { T w, x, y, z; }; struct { T a, b, c, d; }; struct { T q0, q1, q2, q3; }; struct { T s; Vector<3, T> v; }; }; // Default constructor constexpr Quaternion(); // Basic constructors constexpr Quaternion(T s, const Vector<3, T>& v); constexpr Quaternion(T w, T x, T y, T z); // Copy constructor constexpr Quaternion(const Quaternion<T>& q); // Conversion constructors template <typename U> constexpr explicit Quaternion(const Quaternion<U>& q); // Matrix constructor constexpr explicit Quaternion(const Matrix<3, 3, T>& rotation); constexpr explicit Quaternion(const Matrix<4, 4, T>& rotation); // Assignment operators constexpr Quaternion<T>& operator=(const Quaternion<T>& q) = default; template <typename U> constexpr Quaternion<T>& operator=(const Quaternion<U>& q); // Compound assignment operators template <typename U> constexpr Quaternion<T>& operator+=(const Quaternion<U>& q); template <typename U> constexpr Quaternion<T>& operator-=(const Quaternion<U>& q); template <typename U> constexpr Quaternion<T>& operator*=(const Quaternion<U>& q); template <typename U> constexpr Quaternion<T>& operator*=(U scalar); template <typename U> constexpr Quaternion<T>& operator/=(U scalar); // Static factory constructors static constexpr Quaternion<T> fromAngleAxis(T angleRadians, const Vector<3, T>& axis); static constexpr Quaternion<T> fromEulerAngles( const Vector<3, T>& pitchYawRoll); static constexpr Quaternion<T> fromEulerAngles(T pitch, T yaw, T roll); static constexpr Quaternion<T> identity() { return Quaternion<T>(); } // Member converters constexpr Matrix<3, 3, T> toMatrix3() const; constexpr Matrix<4, 4, T> toMatrix4() const; // Explicit conversion operators explicit operator Matrix<3, 3, T>() const; explicit operator Matrix<4, 4, T>() const; // Element accessing constexpr T& operator[](UInt32 pos); constexpr const T& operator[](UInt32 pos) const; // Static member functions static constexpr UInt32 size() { return 4; } static constexpr UInt32 length() { return size(); } }; // Predefined types using QuaternionF = Quaternion<float>; using QuaternionD = Quaternion<double>; // Quaternion/Matrix conversion template <typename T> Matrix<3, 3, T> Matrix3Cast(const Quaternion<T>& q); template <typename T> Matrix<4, 4, T> Matrix4Cast(const Quaternion<T>& q); template <typename T> Quaternion<T> QuaternionCast(const Matrix<3, 3, T>& m); template<typename T> Quaternion<T> QuaternionCast(const Matrix<4, 4, T>& m4); // Non members operators template <typename T> inline constexpr Quaternion<T> operator+(const Quaternion<T>& qa, const Quaternion<T>& qb); template <typename T> inline constexpr Quaternion<T> operator-(const Quaternion<T>& q); template <typename T> inline constexpr Quaternion<T> operator-(const Quaternion<T>& qa, const Quaternion<T>& qb); template <typename T> inline constexpr Quaternion<T> operator*(const Quaternion<T>& qa, const Quaternion<T>& qb); template <typename T> inline constexpr Vector<3, T> operator*(const Quaternion<T>& q, const Vector<3, T>& v); template <typename T> inline constexpr Vector<3, T> operator*(const Vector<3, T>& v, const Quaternion<T>& q); template <typename T> inline constexpr Vector<4, T> operator*(const Quaternion<T>& q, const Vector<4, T>& v); template <typename T> inline constexpr Vector<4, T> operator*(const Vector<4, T>& v, const Quaternion<T>& q); template <typename T> inline constexpr Quaternion<T> operator*(const Quaternion<T>& q, T const& scalar); template <typename T> inline constexpr Quaternion<T> operator*(T const& scalar, const Quaternion<T>& q); template <typename T> inline constexpr Quaternion<T> operator/(const Quaternion<T>& q, T const& scalar); // Relational operators template <typename T> inline constexpr bool operator==(const Quaternion<T>& qa, const Quaternion<T>& qb); template <typename T> inline constexpr bool operator!=(const Quaternion<T>& qa, const Quaternion<T>& qb); // Quaternion operations template <typename T> inline constexpr T dot(const Quaternion<T>& qa, const Quaternion<T>& qb); template <typename T> inline constexpr Quaternion<T> cross(const Quaternion<T>& qa, const Quaternion<T>& qb); template <typename T> inline constexpr T norm(const Quaternion<T>& q); template <typename T> inline constexpr Quaternion<T> normalize(const Quaternion<T>& q); template <typename T> inline constexpr Quaternion<T> conjugate(const Quaternion<T>& q); template <typename T> inline constexpr Quaternion<T> inverse(const Quaternion<T>& q); template<typename T> inline constexpr Vector<3, T> rotate(const Quaternion<T>& q, const Vector<3, T>& v); template<typename T> inline constexpr Vector<4, T> rotate(const Quaternion<T>& q, const Vector<4, T>& v); // Ostream operators template <typename T, UInt32 N> std::ostream& operator<<(std::ostream& os, const Quaternion<T>& q); } #include "Neat/Math/Types/TypeQuaternion.inl"
[ "gabriel_dinse@hotmail.com" ]
gabriel_dinse@hotmail.com
0b9d9cc1be8bf5cf37a3c5b89a6295a92106be4b
2c316b08080767efa44b583ee40b16020d16df68
/src/lib/Prefab.cpp
be9cd1ab1b0f845badeac51dfe974ecba12b68df
[ "MIT" ]
permissive
bmjoy/UniEngine-1
e87f31c18bc99053b1d5f9310dfa8053872d91f7
5f9770e086a8382bff3a3d3e9f048aee284e26e5
refs/heads/main
2023-07-10T06:42:30.998172
2021-08-22T23:37:52
2021-08-22T23:37:52
null
0
0
null
null
null
null
UTF-8
C++
false
false
52,601
cpp
#include <Application.hpp> #include <AssetManager.hpp> #include <DefaultResources.hpp> #include <EditorManager.hpp> #include <Gui.hpp> #include <MeshRenderer.hpp> #include <Prefab.hpp> #include <RenderManager.hpp> #include <SerializationManager.hpp> #include <SkinnedMeshRenderer.hpp> #include <Utilities.hpp> using namespace UniEngine; void Prefab::OnCreate() { m_name = "New Prefab"; } Entity Prefab::ToEntity() const { std::unordered_map<Handle, Handle> entityMap; std::vector<DataComponentType> types; for (auto &i : m_dataComponents) { types.emplace_back(i.m_type); } auto archetype = EntityManager::CreateEntityArchetype("", types); const Entity entity = EntityManager::CreateEntity(archetype, m_name); entityMap[m_entityHandle] = entity.GetHandle(); for (auto &i : m_dataComponents) { EntityManager::SetDataComponent(entity.GetIndex(), i.m_type.m_typeId, i.m_type.m_size, i.m_data.get()); } int index = 0; for (const auto &i : m_children) { AttachChildren(i, entity, m_name + "_" + std::to_string(index), entityMap); index++; } for (auto &i : m_privateComponents) { size_t id; auto ptr = std::static_pointer_cast<IPrivateComponent>( SerializationManager::ProduceSerializable(i.m_data->GetTypeName(), id)); ptr->Clone(i.m_data); EntityManager::SetPrivateComponent(entity, ptr); } for (const auto &i : m_children) { AttachChildrenPrivateComponent(i, entity, entityMap); index++; } RelinkChildren(entity, entityMap); entity.SetEnabled(m_enabled); return entity; } void Prefab::AttachChildren( const std::shared_ptr<Prefab> &modelNode, Entity parentEntity, const std::string &parentName, std::unordered_map<Handle, Handle> &map) const { std::vector<DataComponentType> types; for (auto &i : modelNode->m_dataComponents) { types.emplace_back(i.m_type); } auto archetype = EntityManager::CreateEntityArchetype("", types); Entity entity = EntityManager::CreateEntity(archetype, m_name); map[modelNode->m_entityHandle] = entity.GetHandle(); entity.SetParent(parentEntity); for (auto &i : modelNode->m_dataComponents) { EntityManager::SetDataComponent(entity.GetIndex(), i.m_type.m_typeId, i.m_type.m_size, i.m_data.get()); } int index = 0; for (auto &i : modelNode->m_children) { AttachChildren(i, entity, (parentName + "_" + std::to_string(index)), map); index++; } } void Prefab::AttachChildrenPrivateComponent( const std::shared_ptr<Prefab> &modelNode, const Entity &parentEntity, const std::unordered_map<Handle, Handle> &map) const { Entity entity; auto children = parentEntity.GetChildren(); for (auto &i : children) { auto a = i.GetHandle().GetValue(); auto b = map.at(modelNode->m_entityHandle).GetValue(); if (a == b) entity = i; } if (entity.IsNull()) return; for (auto &i : modelNode->m_privateComponents) { size_t id; auto ptr = std::static_pointer_cast<IPrivateComponent>( SerializationManager::ProduceSerializable(i.m_data->GetTypeName(), id)); ptr->Clone(i.m_data); EntityManager::SetPrivateComponent(entity, ptr); } int index = 0; for (auto &i : modelNode->m_children) { AttachChildrenPrivateComponent(i, entity, map); index++; } entity.SetEnabled(m_enabled); } #pragma region Model Loading void Prefab::Load(const std::filesystem::path &path) { if (path.extension() == ".ueprefab") { std::ifstream stream(path.string()); std::stringstream stringStream; stringStream << stream.rdbuf(); YAML::Node in = YAML::Load(stringStream.str()); #pragma region Assets std::vector<std::shared_ptr<IAsset>> localAssets; auto inLocalAssets = in["LocalAssets"]; if (inLocalAssets) { for (const auto &i : inLocalAssets) { Handle handle = i["Handle"].as<uint64_t>(); localAssets.push_back( AssetManager::CreateAsset(i["TypeName"].as<std::string>(), handle, i["Name"].as<std::string>())); } int index = 0; for (const auto &i : inLocalAssets) { localAssets[index++]->Deserialize(i); } } #pragma endregion Deserialize(in); } else { LoadModel(path); } } #ifdef USE_ASSIMP void Prefab::AttachAnimator(Prefab *parent, const Handle &animatorEntityHandle) { auto smr = parent->GetPrivateComponent<SkinnedMeshRenderer>(); if (smr) { smr->m_animator.m_entityHandle = animatorEntityHandle; smr->m_animator.m_privateComponentTypeName = "Animator"; } for (auto &i : parent->m_children) { AttachAnimator(i.get(), animatorEntityHandle); } } glm::mat4 mat4_cast(const aiMatrix4x4 &m) { return glm::transpose(glm::make_mat4(&m.a1)); } glm::mat4 mat4_cast(const aiMatrix3x3 &m) { return glm::transpose(glm::make_mat3(&m.a1)); } AssimpNode::AssimpNode(aiNode *node) { m_correspondingNode = node; if (node->mParent) m_localTransform.m_value = mat4_cast(node->mTransformation); m_name = node->mName.C_Str(); } void AssimpNode::AttachToAnimator(std::shared_ptr<Animation> &animation, size_t &index) { animation->m_rootBone = m_bone; animation->m_rootBone->m_index = index; for (auto &i : m_children) { index += 1; i->AttachChild(m_bone, index); } } void AssimpNode::AttachChild(std::shared_ptr<Bone> &parent, size_t &index) { m_bone->m_index = index; parent->m_children.push_back(m_bone); for (auto &i : m_children) { index += 1; i->AttachChild(m_bone, index); } } bool AssimpNode::NecessaryWalker(std::map<std::string, std::shared_ptr<Bone>> &boneMap) { bool necessary = false; for (int i = 0; i < m_children.size(); i++) { if (!m_children[i]->NecessaryWalker(boneMap)) { m_children.erase(m_children.begin() + i); i--; } else { necessary = true; } } const auto search = boneMap.find(m_name); if (search != boneMap.end()) { m_bone = search->second; necessary = true; } else if (necessary) { m_bone = std::make_shared<Bone>(); m_bone->m_name = m_name; } return necessary; } void Prefab::ReadKeyFrame(BoneKeyFrames &boneAnimation, const aiNodeAnim *channel) { const auto numPositions = channel->mNumPositionKeys; boneAnimation.m_positions.resize(numPositions); for (int positionIndex = 0; positionIndex < numPositions; ++positionIndex) { const aiVector3D aiPosition = channel->mPositionKeys[positionIndex].mValue; const float timeStamp = channel->mPositionKeys[positionIndex].mTime; BonePosition data; data.m_value = glm::vec3(aiPosition.x, aiPosition.y, aiPosition.z); data.m_timeStamp = timeStamp; boneAnimation.m_positions.push_back(data); boneAnimation.m_maxTimeStamp = glm::max(boneAnimation.m_maxTimeStamp, timeStamp); } const auto numRotations = channel->mNumRotationKeys; boneAnimation.m_rotations.resize(numRotations); for (int rotationIndex = 0; rotationIndex < numRotations; ++rotationIndex) { const aiQuaternion aiOrientation = channel->mRotationKeys[rotationIndex].mValue; const float timeStamp = channel->mRotationKeys[rotationIndex].mTime; BoneRotation data; data.m_value = glm::quat(aiOrientation.w, aiOrientation.x, aiOrientation.y, aiOrientation.z); data.m_timeStamp = timeStamp; boneAnimation.m_rotations.push_back(data); boneAnimation.m_maxTimeStamp = glm::max(boneAnimation.m_maxTimeStamp, timeStamp); } const auto numScales = channel->mNumScalingKeys; boneAnimation.m_scales.resize(numScales); for (int keyIndex = 0; keyIndex < numScales; ++keyIndex) { const aiVector3D scale = channel->mScalingKeys[keyIndex].mValue; const float timeStamp = channel->mScalingKeys[keyIndex].mTime; BoneScale data; data.m_value = glm::vec3(scale.x, scale.y, scale.z); data.m_timeStamp = timeStamp; boneAnimation.m_scales.push_back(data); boneAnimation.m_maxTimeStamp = glm::max(boneAnimation.m_maxTimeStamp, timeStamp); } } void Prefab::ReadAnimations( const aiScene *importerScene, std::shared_ptr<Animation> &animator, std::map<std::string, std::shared_ptr<Bone>> &bonesMap) { for (int i = 0; i < importerScene->mNumAnimations; i++) { aiAnimation *importerAnimation = importerScene->mAnimations[i]; const std::string animationName = importerAnimation->mName.C_Str(); float maxAnimationTimeStamp = 0.0f; for (int j = 0; j < importerAnimation->mNumChannels; j++) { aiNodeAnim *importerNodeAmination = importerAnimation->mChannels[j]; const std::string nodeName = importerNodeAmination->mNodeName.C_Str(); const auto search = bonesMap.find(nodeName); if (search != bonesMap.end()) { auto &bone = search->second; bone->m_animations[animationName] = BoneKeyFrames(); ReadKeyFrame(bone->m_animations[animationName], importerNodeAmination); maxAnimationTimeStamp = glm::max(maxAnimationTimeStamp, bone->m_animations[animationName].m_maxTimeStamp); } } animator->m_animationNameAndLength[animationName] = maxAnimationTimeStamp; } } std::shared_ptr<Texture2D> Prefab::CollectTexture( const std::string &directory, const std::string &path, std::map<std::string, std::shared_ptr<Texture2D>> &loadedTextures) { const std::string fileName = directory + "/" + path; if (const auto search = loadedTextures.find(fileName); search != loadedTextures.end()) { return search->second; } auto texture2D = AssetManager::Import<Texture2D>(directory + "/" + path); loadedTextures[fileName] = texture2D; return texture2D; } std::shared_ptr<Material> Prefab::ReadMaterial( const std::string &directory, const std::shared_ptr<OpenGLUtils::GLProgram> &glProgram, std::map<std::string, std::shared_ptr<Texture2D>> &texture2DsLoaded, aiMaterial *importerMaterial) { auto targetMaterial = AssetManager::LoadMaterial(glProgram); // PBR if (importerMaterial->GetTextureCount(aiTextureType_BASE_COLOR) > 0) { aiString str; importerMaterial->GetTexture(aiTextureType_BASE_COLOR, 0, &str); targetMaterial->SetTexture(TextureType::Albedo, CollectTexture(directory, str.C_Str(), texture2DsLoaded)); } if (importerMaterial->GetTextureCount(aiTextureType_DIFFUSE) > 0) { aiString str; importerMaterial->GetTexture(aiTextureType_DIFFUSE, 0, &str); targetMaterial->SetTexture(TextureType::Albedo, CollectTexture(directory, str.C_Str(), texture2DsLoaded)); } if (importerMaterial->GetTextureCount(aiTextureType_NORMAL_CAMERA) > 0) { aiString str; importerMaterial->GetTexture(aiTextureType_NORMAL_CAMERA, 0, &str); targetMaterial->SetTexture(TextureType::Normal, CollectTexture(directory, str.C_Str(), texture2DsLoaded)); } if (importerMaterial->GetTextureCount(aiTextureType_METALNESS) > 0) { aiString str; importerMaterial->GetTexture(aiTextureType_METALNESS, 0, &str); targetMaterial->SetTexture(TextureType::Metallic, CollectTexture(directory, str.C_Str(), texture2DsLoaded)); } if (importerMaterial->GetTextureCount(aiTextureType_DIFFUSE_ROUGHNESS) > 0) { aiString str; importerMaterial->GetTexture(aiTextureType_DIFFUSE_ROUGHNESS, 0, &str); targetMaterial->SetTexture(TextureType::Roughness, CollectTexture(directory, str.C_Str(), texture2DsLoaded)); } if (importerMaterial->GetTextureCount(aiTextureType_AMBIENT_OCCLUSION) > 0) { aiString str; importerMaterial->GetTexture(aiTextureType_AMBIENT_OCCLUSION, 0, &str); targetMaterial->SetTexture(TextureType::AO, CollectTexture(directory, str.C_Str(), texture2DsLoaded)); } if (importerMaterial->GetTextureCount(aiTextureType_HEIGHT) > 0) { aiString str; importerMaterial->GetTexture(aiTextureType_HEIGHT, 0, &str); targetMaterial->SetTexture(TextureType::Normal, CollectTexture(directory, str.C_Str(), texture2DsLoaded)); } return targetMaterial; } bool Prefab::ProcessNode( const std::string &directory, Prefab *modelNode, std::map<unsigned, std::shared_ptr<Material>> &loadedMaterials, std::map<std::string, std::shared_ptr<Texture2D>> &texture2DsLoaded, std::map<std::string, std::shared_ptr<Bone>> &boneMaps, aiNode *importerNode, std::shared_ptr<AssimpNode> assimpNode, const aiScene *importerScene, const std::shared_ptr<Animation> &animation) { bool addedMeshRenderer = false; for (unsigned i = 0; i < importerNode->mNumMeshes; i++) { // the modelNode object only contains indices to index the actual objects in the scene. // the scene contains all the data, modelNode is just to keep stuff organized (like relations between nodes). aiMesh *importerMesh = importerScene->mMeshes[importerNode->mMeshes[i]]; if (!importerMesh) continue; auto childNode = AssetManager::CreateAsset<Prefab>(std::string(importerMesh->mName.C_Str())); const auto search = loadedMaterials.find(importerMesh->mMaterialIndex); bool isSkinnedMesh = !importerMesh->HasBones(); std::shared_ptr<Material> material; if (search == loadedMaterials.end()) { aiMaterial *importerMaterial = importerScene->mMaterials[importerMesh->mMaterialIndex]; material = ReadMaterial( directory, isSkinnedMesh ? DefaultResources::GLPrograms::StandardSkinnedProgram : DefaultResources::GLPrograms::StandardProgram, texture2DsLoaded, importerMaterial); } else { material = search->second; } if (importerMesh->HasBones()) { auto skinnedMeshRenderer = SerializationManager::ProduceSerializable<SkinnedMeshRenderer>(); skinnedMeshRenderer->m_material.Set<Material>(material); skinnedMeshRenderer->m_skinnedMesh.Set<SkinnedMesh>(ReadSkinnedMesh(boneMaps, importerMesh)); if (!skinnedMeshRenderer->m_skinnedMesh.Get()) continue; addedMeshRenderer = true; skinnedMeshRenderer->m_skinnedMesh.Get<SkinnedMesh>()->m_animation.Set<Animation>(animation); PrivateComponentHolder holder; holder.m_enabled = true; holder.m_data = std::static_pointer_cast<IPrivateComponent>(skinnedMeshRenderer); childNode->m_privateComponents.push_back(holder); } else { auto meshRenderer = SerializationManager::ProduceSerializable<MeshRenderer>(); meshRenderer->m_material.Set<Material>(material); meshRenderer->m_mesh.Set<Mesh>(ReadMesh(importerMesh)); if (!meshRenderer->m_mesh.Get()) continue; addedMeshRenderer = true; PrivateComponentHolder holder; holder.m_enabled = true; holder.m_data = std::static_pointer_cast<IPrivateComponent>(meshRenderer); childNode->m_privateComponents.push_back(holder); } auto transform = std::make_shared<Transform>(); transform->m_value = mat4_cast(importerNode->mTransformation); if (!importerNode->mParent) transform->m_value = Transform().m_value; DataComponentHolder holder; holder.m_type = Typeof<Transform>(); holder.m_data = transform; childNode->m_dataComponents.push_back(holder); modelNode->m_children.push_back(std::move(childNode)); } for (unsigned i = 0; i < importerNode->mNumChildren; i++) { auto childNode = AssetManager::CreateAsset<Prefab>(std::string(importerNode->mChildren[i]->mName.C_Str())); auto childAssimpNode = std::make_shared<AssimpNode>(importerNode->mChildren[i]); childAssimpNode->m_parent = assimpNode; const bool childAdd = ProcessNode( directory, childNode.get(), loadedMaterials, texture2DsLoaded, boneMaps, importerNode->mChildren[i], childAssimpNode, importerScene, animation); if (childAdd) { modelNode->m_children.push_back(std::move(childNode)); } addedMeshRenderer = addedMeshRenderer | childAdd; assimpNode->m_children.push_back(std::move(childAssimpNode)); } return addedMeshRenderer; } std::shared_ptr<Mesh> Prefab::ReadMesh(aiMesh *importerMesh) { unsigned mask = 1; std::vector<Vertex> vertices; std::vector<unsigned> indices; if (importerMesh->mNumVertices == 0 || !importerMesh->HasFaces()) return nullptr; vertices.resize(importerMesh->mNumVertices); // Walk through each of the mesh's vertices for (int i = 0; i < importerMesh->mNumVertices; i++) { Vertex vertex; glm::vec3 v3; // we declare a placeholder vector since assimp uses its own vector class that doesn't directly // convert to glm's vec3 class so we transfer the data to this placeholder glm::vec3 first. // positions v3.x = importerMesh->mVertices[i].x; v3.y = importerMesh->mVertices[i].y; v3.z = importerMesh->mVertices[i].z; vertex.m_position = v3; if (importerMesh->HasNormals()) { v3.x = importerMesh->mNormals[i].x; v3.y = importerMesh->mNormals[i].y; v3.z = importerMesh->mNormals[i].z; vertex.m_normal = v3; mask = mask | static_cast<unsigned>(VertexAttribute::Normal); } if (importerMesh->HasTangentsAndBitangents()) { v3.x = importerMesh->mTangents[i].x; v3.y = importerMesh->mTangents[i].y; v3.z = importerMesh->mTangents[i].z; vertex.m_tangent = v3; mask = mask | static_cast<unsigned>(VertexAttribute::Tangent); } glm::vec4 v4; if (importerMesh->HasVertexColors(0)) { v4.x = importerMesh->mColors[0][i].r; v4.y = importerMesh->mColors[0][i].g; v4.z = importerMesh->mColors[0][i].b; v4.w = importerMesh->mColors[0][i].a; vertex.m_color = v4; mask = mask | static_cast<unsigned>(VertexAttribute::Color); } glm::vec2 v2; if (importerMesh->HasTextureCoords(0)) { v2.x = importerMesh->mTextureCoords[0][i].x; v2.y = importerMesh->mTextureCoords[0][i].y; vertex.m_texCoords = v2; mask = mask | static_cast<unsigned>(VertexAttribute::TexCoord); } else { vertex.m_texCoords = glm::vec2(0.0f, 0.0f); mask = mask | static_cast<unsigned>(VertexAttribute::TexCoord); } vertices[i] = vertex; } // now walk through each of the mesh's _Faces (a face is a mesh its triangle) and retrieve the corresponding vertex // indices. for (int i = 0; i < importerMesh->mNumFaces; i++) { assert(importerMesh->mFaces[i].mNumIndices == 3); // retrieve all indices of the face and store them in the indices vector for (int j = 0; j < 3; j++) indices.push_back(importerMesh->mFaces[i].mIndices[j]); } auto mesh = AssetManager::CreateAsset<Mesh>(); mesh->SetVertices(mask, vertices, indices); return mesh; } std::shared_ptr<SkinnedMesh> Prefab::ReadSkinnedMesh( std::map<std::string, std::shared_ptr<Bone>> &bonesMap, aiMesh *importerMesh) { unsigned mask = 1; std::vector<SkinnedVertex> vertices; std::vector<unsigned> indices; if (importerMesh->mNumVertices == 0 || !importerMesh->HasFaces()) return nullptr; vertices.resize(importerMesh->mNumVertices); // Walk through each of the mesh's vertices for (int i = 0; i < importerMesh->mNumVertices; i++) { SkinnedVertex vertex; glm::vec3 v3; // we declare a placeholder vector since assimp uses its own vector class that doesn't directly // convert to glm's vec3 class so we transfer the data to this placeholder glm::vec3 first. // positions v3.x = importerMesh->mVertices[i].x; v3.y = importerMesh->mVertices[i].y; v3.z = importerMesh->mVertices[i].z; vertex.m_position = v3; if (importerMesh->HasNormals()) { v3.x = importerMesh->mNormals[i].x; v3.y = importerMesh->mNormals[i].y; v3.z = importerMesh->mNormals[i].z; vertex.m_normal = v3; mask = mask | static_cast<unsigned>(VertexAttribute::Normal); } if (importerMesh->HasTangentsAndBitangents()) { v3.x = importerMesh->mTangents[i].x; v3.y = importerMesh->mTangents[i].y; v3.z = importerMesh->mTangents[i].z; vertex.m_tangent = v3; mask = mask | static_cast<unsigned>(VertexAttribute::Tangent); } glm::vec4 v4; if (importerMesh->HasVertexColors(0)) { v4.x = importerMesh->mColors[0][i].r; v4.y = importerMesh->mColors[0][i].g; v4.z = importerMesh->mColors[0][i].b; v4.w = importerMesh->mColors[0][i].a; vertex.m_color = v4; mask = mask | static_cast<unsigned>(VertexAttribute::Color); } glm::vec2 v2; if (importerMesh->HasTextureCoords(0)) { v2.x = importerMesh->mTextureCoords[0][i].x; v2.y = importerMesh->mTextureCoords[0][i].y; vertex.m_texCoords = v2; mask = mask | static_cast<unsigned>(VertexAttribute::TexCoord); } else { vertex.m_texCoords = glm::vec2(0.0f, 0.0f); mask = mask | static_cast<unsigned>(VertexAttribute::TexCoord); } vertices[i] = vertex; } // now walk through each of the mesh's _Faces (a face is a mesh its triangle) and retrieve the corresponding vertex // indices. for (int i = 0; i < importerMesh->mNumFaces; i++) { assert(importerMesh->mFaces[i].mNumIndices == 3); // retrieve all indices of the face and store them in the indices vector for (int j = 0; j < 3; j++) indices.push_back(importerMesh->mFaces[i].mIndices[j]); } auto skinnedMesh = AssetManager::CreateAsset<SkinnedMesh>(importerMesh->mName.C_Str()); #pragma region Read bones std::vector<std::vector<std::pair<int, float>>> verticesBoneIdWeights; verticesBoneIdWeights.resize(vertices.size()); for (unsigned i = 0; i < importerMesh->mNumBones; i++) { aiBone *importerBone = importerMesh->mBones[i]; auto name = importerBone->mName.C_Str(); if (const auto search = bonesMap.find(name); search == bonesMap.end()) // If we can't find this bone { std::shared_ptr<Bone> bone = std::make_shared<Bone>(); bone->m_name = name; bone->m_offsetMatrix.m_value = mat4_cast(importerBone->mOffsetMatrix); bonesMap[name] = bone; skinnedMesh->m_bones.push_back(bone); } else { skinnedMesh->m_bones.push_back(search->second); } for (int j = 0; j < importerBone->mNumWeights; j++) { verticesBoneIdWeights[importerBone->mWeights[j].mVertexId].emplace_back( i, importerBone->mWeights[j].mWeight); } } for (unsigned i = 0; i < verticesBoneIdWeights.size(); i++) { auto ids = glm::ivec4(-1); auto weights = glm::vec4(0.0f); auto &list = verticesBoneIdWeights[i]; for (unsigned j = 0; j < 4; j++) { if (!list.empty()) { int extract = -1; float max = -1.0f; for (int k = 0; k < list.size(); k++) { if (list[k].second > max) { max = list[k].second; extract = k; } } ids[j] = list[extract].first; weights[j] = list[extract].second; list.erase(list.begin() + extract); } else break; } vertices[i].m_bondId = ids; vertices[i].m_weight = weights; ids = glm::ivec4(-1); weights = glm::vec4(0.0f); for (unsigned j = 0; j < 4; j++) { if (!list.empty()) { int extract = -1; float max = -1.0f; for (int k = 0; k < list.size(); k++) { if (list[k].second > max) { max = list[k].second; extract = k; } } ids[j] = list[extract].first; weights[j] = list[extract].second; list.erase(list.begin() + extract); } else break; } vertices[i].m_bondId2 = ids; vertices[i].m_weight2 = weights; } #pragma endregion skinnedMesh->SetVertices(mask, vertices, indices); return skinnedMesh; } void Prefab::ApplyBoneIndices(Prefab *node) { auto smr = node->GetPrivateComponent<SkinnedMeshRenderer>(); if (smr) { smr->m_skinnedMesh.Get<SkinnedMesh>()->FetchIndices(); smr->m_skinnedMesh.Get<SkinnedMesh>()->m_bones.clear(); } for (auto &i : node->m_children) { ApplyBoneIndices(i.get()); } } void Prefab::FromEntity(const Entity &entity) { m_entityHandle = entity.GetHandle(); m_name = entity.GetName(); m_enabled = entity.IsEnabled(); EntityManager::UnsafeForEachDataComponent(entity, [&](const DataComponentType &type, void *data) { DataComponentHolder holder; holder.m_type = type; size_t id; size_t size; holder.m_data = std::static_pointer_cast<IDataComponent>(SerializationManager::ProduceDataComponent(type.m_name, id, size)); memcpy(holder.m_data.get(), data, type.m_size); m_dataComponents.push_back(std::move(holder)); }); auto &elements = EntityManager::GetInstance().m_entityMetaDataCollection->at(entity.GetIndex()).m_privateComponentElements; for (auto &element : elements) { size_t id; auto ptr = std::static_pointer_cast<IPrivateComponent>( SerializationManager::ProduceSerializable(element.m_privateComponentData->GetTypeName(), id)); ptr->OnCreate(); ptr->Clone(element.m_privateComponentData); ptr->m_started = false; PrivateComponentHolder holder; holder.m_enabled = element.m_privateComponentData->m_enabled; holder.m_data = ptr; m_privateComponents.push_back(holder); } auto children = entity.GetChildren(); for (auto &i : children) { m_children.push_back(AssetManager::CreateAsset<Prefab>(i.GetName())); m_children.back()->FromEntity(i); } } #else void Prefab::ProcessNode( const std::string &directory, std::map<int, std::vector<Vertex>> &meshMaterials, const tinyobj::shape_t &shape, const tinyobj::attrib_t &attribute) { std::unique_ptr<ModelNode> childNode = std::make_unique<ModelNode>(); // Loop over faces(polygon) size_t index_offset = 0; for (size_t f = 0; f < shape.mesh.num_face_vertices.size(); f++) { // per-face material int materialId = -1; if (shape.mesh.material_ids[f] != -1) { materialId = shape.mesh.material_ids[f]; if (meshMaterials.find(materialId) == meshMaterials.end()) { meshMaterials[materialId] = std::vector<Vertex>(); } } const size_t fv = size_t(shape.mesh.num_face_vertices[f]); // Loop over vertices in the face. Vertex vertices[3]; bool recalculateNormal = false; for (size_t v = 0; v < fv; v++) { Vertex &vertex = vertices[v]; // access to vertex tinyobj::index_t idx = shape.mesh.indices[index_offset + v]; vertex.m_position.x = attribute.vertices[3 * size_t(idx.vertex_index) + 0]; vertex.m_position.y = attribute.vertices[3 * size_t(idx.vertex_index) + 1]; vertex.m_position.z = attribute.vertices[3 * size_t(idx.vertex_index) + 2]; // Check if `normal_index` is zero or positive. negative = no normal data if (idx.normal_index >= 0) { vertex.m_normal.x = attribute.normals[3 * size_t(idx.normal_index) + 0]; vertex.m_normal.y = attribute.normals[3 * size_t(idx.normal_index) + 1]; vertex.m_normal.z = attribute.normals[3 * size_t(idx.normal_index) + 2]; } else { recalculateNormal = true; } // Check if `texcoord_index` is zero or positive. negative = no texcoord data if (idx.texcoord_index >= 0) { vertex.m_texCoords.x = attribute.texcoords[2 * size_t(idx.texcoord_index) + 0]; vertex.m_texCoords.y = attribute.texcoords[2 * size_t(idx.texcoord_index) + 1]; } else { vertex.m_texCoords = glm::vec2(0.0f); } if (!attribute.colors.empty()) { vertex.m_color.x = attribute.colors[3 * size_t(idx.vertex_index) + 0]; vertex.m_color.y = attribute.colors[3 * size_t(idx.vertex_index) + 1]; vertex.m_color.z = attribute.colors[3 * size_t(idx.vertex_index) + 2]; } else { vertex.m_color = glm::vec4(1.0f); } } if (recalculateNormal) { vertices[0].m_normal = vertices[1].m_normal = vertices[2].m_normal = -glm::normalize(glm::cross( vertices[0].m_position - vertices[1].m_position, vertices[0].m_position - vertices[2].m_position)); } meshMaterials[materialId].push_back(vertices[0]); meshMaterials[materialId].push_back(vertices[1]); meshMaterials[materialId].push_back(vertices[2]); index_offset += fv; } } #endif #pragma endregion void DataComponentHolder::Serialize(YAML::Emitter &out) { out << YAML::Key << "m_type.m_name" << YAML::Value << m_type.m_name; out << YAML::Key << "m_data" << YAML::Value << YAML::Binary((const unsigned char *)m_data.get(), m_type.m_size); } void DataComponentHolder::Deserialize(const YAML::Node &in) { m_type.m_name = in["m_type.m_name"].as<std::string>(); m_data = SerializationManager::ProduceDataComponent(m_type.m_name, m_type.m_typeId, m_type.m_size); if (in["m_data"]) { YAML::Binary data = in["m_data"].as<YAML::Binary>(); std::memcpy(m_data.get(), data.data(), data.size()); } } void Prefab::Serialize(YAML::Emitter &out) { out << YAML::Key << "m_enabled" << YAML::Value << m_enabled; out << YAML::Key << "m_entityHandle" << YAML::Value << m_entityHandle.GetValue(); if (!m_dataComponents.empty()) { out << YAML::Key << "m_dataComponents" << YAML::BeginSeq; for (auto &i : m_dataComponents) { out << YAML::BeginMap; i.Serialize(out); out << YAML::EndMap; } out << YAML::EndSeq; } if (!m_privateComponents.empty()) { out << YAML::Key << "m_privateComponents" << YAML::BeginSeq; for (auto &i : m_privateComponents) { out << YAML::BeginMap; i.Serialize(out); out << YAML::EndMap; } out << YAML::EndSeq; } if (!m_children.empty()) { out << YAML::Key << "m_children" << YAML::BeginSeq; for (auto &i : m_children) { out << YAML::BeginMap; out << YAML::Key << "m_handle" << i->GetHandle().GetValue(); i->Serialize(out); out << YAML::EndMap; } out << YAML::EndSeq; } } void Prefab::Deserialize(const YAML::Node &in) { m_enabled = in["m_enabled"].as<bool>(); m_entityHandle = Handle(in["m_entityHandle"].as<uint64_t>()); if (in["m_dataComponents"]) { for (const auto &i : in["m_dataComponents"]) { DataComponentHolder holder; holder.Deserialize(i); m_dataComponents.push_back(holder); } } if (in["m_privateComponents"]) { for (const auto &i : in["m_privateComponents"]) { PrivateComponentHolder holder; holder.Deserialize(i); m_privateComponents.push_back(holder); } } if (in["m_children"]) { for (const auto &i : in["m_children"]) { auto child = AssetManager::CreateAsset<Prefab>(Handle(i["m_handle"].as<uint64_t>()), ""); child->Deserialize(i); m_children.push_back(child); } } } void Prefab::CollectAssets(std::unordered_map<Handle, std::shared_ptr<IAsset>> &map) { std::vector<AssetRef> list; for (auto &i : m_privateComponents) { i.m_data->CollectAssetRef(list); } for (auto &i : list) { auto asset = i.Get<IAsset>(); if (asset && asset->GetHandle().GetValue() >= DefaultResources::GetMaxHandle() && asset->GetPath().empty()) { map[asset->GetHandle()] = asset; } } bool listCheck = true; while (listCheck) { size_t currentSize = map.size(); list.clear(); for (auto &i : map) { i.second->CollectAssetRef(list); } for (auto &i : list) { auto asset = i.Get<IAsset>(); if (asset && asset->GetHandle().GetValue() >= DefaultResources::GetMaxHandle() && asset->GetPath().empty()) { map[asset->GetHandle()] = asset; } } if (map.size() == currentSize) listCheck = false; } for (auto &i : m_children) i->CollectAssets(map); } void Prefab::Save(const std::filesystem::path &path) { auto directory = path; directory.remove_filename(); std::filesystem::create_directories(directory); YAML::Emitter out; out << YAML::BeginMap; Serialize(out); std::unordered_map<Handle, std::shared_ptr<IAsset>> assetMap; CollectAssets(assetMap); if (!assetMap.empty()) { out << YAML::Key << "LocalAssets" << YAML::Value << YAML::BeginSeq; for (auto &i : assetMap) { out << YAML::BeginMap; out << YAML::Key << "TypeName" << YAML::Value << i.second->GetTypeName(); out << YAML::Key << "Handle" << YAML::Value << i.first.GetValue(); out << YAML::Key << "Name" << YAML::Value << i.second->m_name; i.second->Serialize(out); out << YAML::EndMap; } out << YAML::EndSeq; } out << YAML::EndMap; std::ofstream fout(path.string()); fout << out.c_str(); fout.flush(); } void Prefab::RelinkChildren(const Entity &parentEntity, const std::unordered_map<Handle, Handle> &map) const { EntityManager::ForEachPrivateComponent( parentEntity, [&](PrivateComponentElement &data) { data.m_privateComponentData->Relink(map); }); EntityManager::ForEachChild(parentEntity, [&](Entity child) { RelinkChildren(child, map); }); } void Prefab::LoadModel(const std::filesystem::path &path, bool optimize, unsigned flags) { #ifdef USE_ASSIMP if(optimize) { flags = flags | aiProcess_OptimizeGraph | aiProcess_OptimizeMeshes; } // read file via ASSIMP Assimp::Importer importer; const aiScene *scene = importer.ReadFile(path.string(), flags); // check for errors if (!scene || scene->mFlags & AI_SCENE_FLAGS_INCOMPLETE || !scene->mRootNode) // if is Not Zero { UNIENGINE_LOG("Assimp: " + std::string(importer.GetErrorString())); return; } // retrieve the directory path of the filepath auto temp = path; const std::string directory = temp.remove_filename().string(); std::map<std::string, std::shared_ptr<Texture2D>> texture2DsLoaded; m_name = path.filename().string(); std::map<unsigned, std::shared_ptr<Material>> loadedMaterials; std::map<std::string, std::shared_ptr<Bone>> bonesMap; std::shared_ptr<Animation> animation; if (!bonesMap.empty() || scene->HasAnimations()) { animation = AssetManager::CreateAsset<Animation>(path.filename().string()); } std::shared_ptr<AssimpNode> rootAssimpNode = std::make_shared<AssimpNode>(scene->mRootNode); if (!ProcessNode( directory, this, loadedMaterials, texture2DsLoaded, bonesMap, scene->mRootNode, rootAssimpNode, scene, animation)) { UNIENGINE_ERROR("Model is empty!"); return; } if (!bonesMap.empty() || scene->HasAnimations()) { rootAssimpNode->NecessaryWalker(bonesMap); size_t index = 0; rootAssimpNode->AttachToAnimator(animation, index); animation->m_boneSize = index + 1; ReadAnimations(scene, animation, bonesMap); ApplyBoneIndices(this); auto animator = SerializationManager::ProduceSerializable<Animator>(); animator->Setup(animation); AttachAnimator(this, m_entityHandle); PrivateComponentHolder holder; holder.m_enabled = true; holder.m_data = std::static_pointer_cast<IPrivateComponent>(animator); m_privateComponents.push_back(holder); } return; #else stbi_hdr_to_ldr_gamma(gamma); stbi_ldr_to_hdr_gamma(gamma); tinyobj::ObjReaderConfig reader_config; reader_config.mtl_search_path = ""; // Path to material files reader_config.triangulate = true; tinyobj::ObjReader reader; if (!reader.ParseFromFile(path, reader_config)) { if (!reader.Error().empty()) { std::cerr << "TinyObjReader: " << reader.Error(); } exit(1); } if (!reader.Warning().empty()) { std::cout << "TinyObjReader: " << reader.Warning(); } auto retVal = CreateResource<Model>(); retVal->m_typeName = path.substr(path.find_last_of("/\\") + 1); auto &attribute = reader.GetAttrib(); auto &shapes = reader.GetShapes(); auto &materials = reader.GetMaterials(); const std::string directory = path.substr(0, path.find_last_of('/')); std::map<std::string, std::shared_ptr<Texture2D>> loadedTextures; if (!optimize) { std::map<int, std::shared_ptr<Material>> loadedMaterials; for (const auto &i : shapes) { std::map<int, std::vector<Vertex>> meshMaterials; meshMaterials[-1] = std::vector<Vertex>(); ProcessNode(directory, meshMaterials, i, attribute); for (auto &i : meshMaterials) { std::unique_ptr<ModelNode> childNode = std::make_unique<ModelNode>(); const auto materialId = i.first; auto &vertices = i.second; if (vertices.empty()) continue; const auto mask = (unsigned)VertexAttribute::Normal | (unsigned)VertexAttribute::TexCoord | (unsigned)VertexAttribute::Position | (unsigned)VertexAttribute::Color; #pragma region Material std::shared_ptr<Material> material; if (materialId != -1) { auto search = loadedMaterials.find(materialId); if (search != loadedMaterials.end()) { material = search->second; } else { material = CreateResource<Material>(); auto &importedMaterial = materials[materialId]; material->m_metallic = importedMaterial.metallic == 0 ? 0.0f : importedMaterial.metallic; material->m_roughness = importedMaterial.roughness == 0 ? 1.0f : importedMaterial.roughness; material->m_albedoColor = glm::vec3( importedMaterial.diffuse[0], importedMaterial.diffuse[1], importedMaterial.diffuse[2]); #pragma region Textures if (!importedMaterial.diffuse_texname.empty()) { const auto albedo = CollectTexture(directory, importedMaterial.diffuse_texname, loadedTextures, gamma); if (albedo) { material->SetTexture(TextureType::Albedo, albedo); } } if (!importedMaterial.bump_texname.empty()) { const auto normal = CollectTexture(directory, importedMaterial.bump_texname, loadedTextures, gamma); if (normal) { material->SetTexture(TextureType::Normal, normal); } } if (!importedMaterial.normal_texname.empty()) { const auto normal = CollectTexture(directory, importedMaterial.normal_texname, loadedTextures, gamma); if (normal) { material->SetTexture(TextureType::Normal, normal); } } if (!importedMaterial.roughness_texname.empty()) { const auto roughness = CollectTexture(directory, importedMaterial.roughness_texname, loadedTextures, gamma); if (roughness) { material->SetTexture(TextureType::Roughness, roughness); } } if (!importedMaterial.specular_highlight_texname.empty()) { const auto roughness = CollectTexture( directory, importedMaterial.specular_highlight_texname, loadedTextures, gamma); if (roughness) { material->SetTexture(TextureType::Roughness, roughness); } } if (!importedMaterial.metallic_texname.empty()) { const auto metallic = CollectTexture(directory, importedMaterial.metallic_texname, loadedTextures, gamma); if (metallic) { material->SetTexture(TextureType::Metallic, metallic); } } if (!importedMaterial.reflection_texname.empty()) { const auto metallic = CollectTexture(directory, importedMaterial.reflection_texname, loadedTextures, gamma); if (metallic) { material->SetTexture(TextureType::Metallic, metallic); } } if (!importedMaterial.ambient_texname.empty()) { const auto ao = CollectTexture(directory, importedMaterial.ambient_texname, loadedTextures, gamma); if (ao) { material->SetTexture(TextureType::AO, ao); } } #pragma endregion loadedMaterials[materialId] = material; } } else { material = DefaultResources::Materials::StandardMaterial; } #pragma endregion #pragma region Mesh auto mesh = CreateResource<Mesh>(); auto indices = std::vector<unsigned>(); assert(vertices.size() % 3 == 0); for (unsigned i = 0; i < vertices.size(); i++) { indices.push_back(i); } mesh->SetVertices(mask, vertices, indices); #pragma endregion childNode->m_localTransform.m_value = glm::translate(glm::vec3(0.0f)) * glm::mat4_cast(glm::quat(glm::vec3(0.0f))) * glm::scale(glm::vec3(1.0f)); childNode->m_mesh = mesh; childNode->m_value = material; retVal->RootNode()->m_children.push_back(std::move(childNode)); } } } else { std::map<int, std::vector<Vertex>> meshMaterials; meshMaterials[-1] = std::vector<Vertex>(); for (const auto &i : shapes) { ProcessNode(directory, meshMaterials, i, attribute); } for (auto &i : meshMaterials) { std::unique_ptr<ModelNode> childNode = std::make_unique<ModelNode>(); const auto materialId = i.first; auto &vertices = i.second; if (vertices.empty()) continue; const auto mask = (unsigned)VertexAttribute::Normal | (unsigned)VertexAttribute::TexCoord | (unsigned)VertexAttribute::Position | (unsigned)VertexAttribute::Color; #pragma region Material auto material = std::make_shared<Material>(); if (materialId != -1) { auto &importedMaterial = materials[materialId]; material->m_metallic = importedMaterial.metallic; material->m_roughness = importedMaterial.roughness; material->m_albedoColor = glm::vec3(importedMaterial.diffuse[0], importedMaterial.diffuse[1], importedMaterial.diffuse[2]); if (!importedMaterial.diffuse_texname.empty()) { const auto albedo = CollectTexture(directory, importedMaterial.diffuse_texname, loadedTextures, gamma); if (albedo) { material->SetTexture(TextureType::Albedo, albedo); } } if (!importedMaterial.bump_texname.empty()) { const auto normal = CollectTexture(directory, importedMaterial.bump_texname, loadedTextures, gamma); if (normal) { material->SetTexture(TextureType::Normal, normal); } } if (!importedMaterial.normal_texname.empty()) { const auto normal = CollectTexture(directory, importedMaterial.normal_texname, loadedTextures, gamma); if (normal) { material->SetTexture(TextureType::Normal, normal); } } if (!importedMaterial.roughness_texname.empty()) { const auto roughness = CollectTexture(directory, importedMaterial.roughness_texname, loadedTextures, gamma); if (roughness) { material->SetTexture(TextureType::Roughness, roughness); } } if (!importedMaterial.specular_highlight_texname.empty()) { const auto roughness = CollectTexture(directory, importedMaterial.specular_highlight_texname, loadedTextures, gamma); if (roughness) { material->SetTexture(TextureType::Roughness, roughness); } } if (!importedMaterial.metallic_texname.empty()) { const auto metallic = CollectTexture(directory, importedMaterial.metallic_texname, loadedTextures, gamma); if (metallic) { material->SetTexture(TextureType::Metallic, metallic); } } if (!importedMaterial.reflection_texname.empty()) { const auto metallic = CollectTexture(directory, importedMaterial.reflection_texname, loadedTextures, gamma); if (metallic) { material->SetTexture(TextureType::Metallic, metallic); } } if (!importedMaterial.ambient_texname.empty()) { const auto ao = CollectTexture(directory, importedMaterial.ambient_texname, loadedTextures, gamma); if (ao) { material->SetTexture(TextureType::AO, ao); } } } else { material = DefaultResources::Materials::StandardMaterial; } #pragma endregion #pragma region Mesh auto mesh = std::make_shared<Mesh>(); auto indices = std::vector<unsigned>(); assert(vertices.size() % 3 == 0); for (unsigned i = 0; i < vertices.size(); i++) { indices.push_back(i); } mesh->SetVertices(mask, vertices, indices); #pragma endregion childNode->m_localTransform.m_value = glm::translate(glm::vec3(0.0f)) * glm::mat4_cast(glm::quat(glm::vec3(0.0f))) * glm::scale(glm::vec3(1.0f)); childNode->m_mesh = mesh; childNode->m_value = material; retVal->RootNode()->m_children.push_back(std::move(childNode)); } } if (addResource) Share(retVal); return retVal; #endif } void PrivateComponentHolder::Serialize(YAML::Emitter &out) { out << YAML::Key << "m_enabled" << YAML::Value << m_enabled; out << YAML::Key << "m_typeName" << YAML::Value << m_data->GetTypeName(); out << YAML::Key << "m_data" << YAML::BeginMap; out << YAML::Key << "m_handle" << m_data->GetHandle().GetValue(); m_data->Serialize(out); out << YAML::EndMap; } void PrivateComponentHolder::Deserialize(const YAML::Node &in) { m_enabled = in["m_enabled"].as<bool>(); auto typeName = in["m_typeName"].as<std::string>(); size_t hashCode; auto inData = in["m_data"]; m_data = std::dynamic_pointer_cast<IPrivateComponent>( SerializationManager::ProduceSerializable(typeName, hashCode, Handle(inData["m_handle"].as<uint64_t>()))); m_data->OnCreate(); m_data->Deserialize(inData); }
[ "li2343@purdue.edu" ]
li2343@purdue.edu
8ca932de6c16dd7ba11a8e611f33f67eca9b3683
a92b18defb50c5d1118a11bc364f17b148312028
/src/test/current/source/NativeReplicatorStack/TpccService/TestComStateProvider2Factory.h
4f36e6206f763346781a4d17ff92f22bed7daf6f
[ "MIT" ]
permissive
KDSBest/service-fabric
34694e150fde662286e25f048fb763c97606382e
fe61c45b15a30fb089ad891c68c893b3a976e404
refs/heads/master
2023-01-28T23:19:25.040275
2020-11-30T11:11:58
2020-11-30T11:11:58
301,365,601
1
0
MIT
2020-11-30T11:11:59
2020-10-05T10:05:53
null
UTF-8
C++
false
false
1,375
h
// ------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License (MIT). See License.txt in the repo root for license information. // ------------------------------------------------------------ #pragma once namespace TpccService { class TestComStateProvider2Factory final : public KObject<TestComStateProvider2Factory> , public KShared<TestComStateProvider2Factory> , public IFabricStateProvider2Factory { K_FORCE_SHARED(TestComStateProvider2Factory) K_BEGIN_COM_INTERFACE_LIST(TestComStateProvider2Factory) COM_INTERFACE_ITEM(IID_IUnknown, IFabricStateProvider2Factory) COM_INTERFACE_ITEM(IID_IFabricStateProvider2Factory, IFabricStateProvider2Factory) K_END_COM_INTERFACE_LIST() public: static Common::ComPointer<IFabricStateProvider2Factory> Create( __in FABRIC_REPLICA_ID replicaId, __in KAllocator & allocator); virtual HRESULT STDMETHODCALLTYPE Create( /* [in] */ const FABRIC_STATE_PROVIDER_FACTORY_ARGUMENTS *factoryArguments, /* [retval][out] */ void **stateProvider); private: TestComStateProvider2Factory(__in FABRIC_REPLICA_ID replicaId); private: FABRIC_REPLICA_ID replicaId_; }; }
[ "31968192+bpm-ms@users.noreply.github.com" ]
31968192+bpm-ms@users.noreply.github.com
54755be5b2d554bc28946ea6f1cd098a190c068c
8c8820fb84dea70d31c1e31dd57d295bd08dd644
/UnrealAudio/Public/UnrealAudioTests.h
6bc1d9daad45d879d1ec517b59abd37627beffd6
[]
no_license
redisread/UE-Runtime
e1a56df95a4591e12c0fd0e884ac6e54f69d0a57
48b9e72b1ad04458039c6ddeb7578e4fc68a7bac
refs/heads/master
2022-11-15T08:30:24.570998
2020-06-20T06:37:55
2020-06-20T06:37:55
274,085,558
3
0
null
null
null
null
UTF-8
C++
false
false
2,509
h
// Copyright Epic Games, Inc. All Rights Reserved. #pragma once #include "CoreMinimal.h" #include "UnrealAudioSoundFile.h" namespace UAudio { /** * TestDeviceQuery * * Test which queries input and output devices and displays information to log about device capabilities, format, etc. * @return True if test succeeds. */ bool UNREALAUDIO_API TestDeviceQuery(); /** * TestDeviceOutputSimple * * Test which runs a simple sinusoid output on all channels (each channel is one octave higher than left channel) * to test that audio output is working and function with no discontinuities. * @param TestTime The amount of time to run the test in seconds (negative value means to run indefinitely) * @return True if test succeeds. */ bool UNREALAUDIO_API TestDeviceOutputSimple(double TestTime); /** * TestDeviceOutputRandomizedFm * * Test which tests output device functionality with a bit more fun than the simple test. You should hear randomized FM synthesis in panning through * all connected speaker outputs. * @param TestTime The amount of time to run the test in seconds (negative value means to run indefinitely) * @return True if test succeeds. */ bool UNREALAUDIO_API TestDeviceOutputRandomizedFm(double TestTime); /** * TestDeviceOutputNoisePan * * Test which tests output device functionality with white noise that pans clockwise in surround sound setup. * @param TestTime The amount of time to run the test in seconds (negative value means to run indefinitely) * @return True if test succeeds. */ bool UNREALAUDIO_API TestDeviceOutputNoisePan(double TestTime); /** * TestSourceConvert * * Tests converting a sound file. * @param ImportSettings A struct defining import settings. * @return True if test succeeds. */ bool UNREALAUDIO_API TestSourceConvert(const FString& FilePath, const FSoundFileConvertFormat& ConvertFormat); /** * TestEmitterManager * * Tests the emitter manager with creating and updating emitters from one thread (simulating main thread) and processing from * the audio system thread. * @return True if test succeeds. */ bool UNREALAUDIO_API TestEmitterManager(); /** * TestVoiceManager * * Tests the voice manager with creating and updating voices from one thread (simulating main thread) and processing from * the audio system thread. * @return True if test succeeds. */ bool UNREALAUDIO_API TestVoiceManager(const FString& FolderOrPath); bool UNREALAUDIO_API TestSoundFileManager(const FString& FolderOrPath); }
[ "wujiahong19981022@outlook.com" ]
wujiahong19981022@outlook.com
300be069cd2f3bba49a9f609450c362d733c2bc5
73247c2e55fe21ca0ec03a508546845aa72164f6
/006. ZigZag Conversion/my_solution.cpp
807b82c79ad91a266cbd8363186fd04237a88c66
[]
no_license
wrsophia/LeetCode
aaa9f5bb159db7618218e074d71dca7a245c2e8a
46b653c54ca5ad5afc29fef6a79592acc4e10d53
refs/heads/master
2021-01-17T17:28:48.628595
2018-09-18T11:16:45
2018-09-18T11:16:45
70,395,595
0
0
null
null
null
null
UTF-8
C++
false
false
1,197
cpp
#include <iostream> #include <string> using namespace std; /* 每隔一定的间隔取一个字母, 模 (2 * numRows - 2) */ class Solution { public: string convert(string s, int numRows) { if (numRows == 1) { // 这个是为防止 line 19 进入无限循环 return s; } int n = s.length(); char res[n + 1]; int idx = 0; for (int i = 0; i < s.length(); i += (2 * numRows - 2)) { res[idx++] = s[i]; // 第1行和第n-1行和其它不一样,单独考虑 } for (int i = 1; i < numRows - 1; ++i) { int k = i; int j = 2 * numRows - 2 - i; while (j < s.length()) { res[idx++] = s[k]; res[idx++] = s[j]; k += (2 * numRows - 2); j += (2 * numRows - 2); } if (k < s.length()) { res[idx++] = s[k]; } } for (int i = numRows - 1; i < s.length(); i += (2 * numRows - 2)) { res[idx++] = s[i]; } res[idx] = '\0'; return string(res); } };
[ "ruishanwang@creditease.cn" ]
ruishanwang@creditease.cn
7a8dce5b8f818e118c476fbf04155fddb984e67a
4963543af7590efc362db1979f49e7f18f85a7db
/bro-2.3.1/build/src/analyzer/protocol/netbios/events.bif.h
be02822c7e995732dc2bd095bf5f6ac939d6a8a3
[ "BSD-2-Clause" ]
permissive
bbaugnies/DPI-MPTCP
683a0df3ebefbbbc32f9266775a7462342391015
d9d7b753c19a114c897e6d9266ebc4175099bbd5
refs/heads/master
2020-04-05T23:46:21.166521
2015-08-17T13:19:47
2015-08-17T13:19:47
33,184,388
1
0
null
null
null
null
UTF-8
C++
false
false
1,795
h
// This file was automatically generated by bifcl from /home/benjamin/Bro/bro-2.3.1/src/analyzer/protocol/netbios/events.bif (plugin mode). #if defined(BRO_IN_NETVAR) || ! defined(_home_benjamin_Bro_bro_2_3_1_build_src_analyzer_protocol_netbios_events_bif) #ifndef BRO_IN_NETVAR #ifndef _home_benjamin_Bro_bro_2_3_1_build_src_analyzer_protocol_netbios_events_bif #define _home_benjamin_Bro_bro_2_3_1_build_src_analyzer_protocol_netbios_events_bif #include "bro-bif.h" #endif #endif extern EventHandlerPtr netbios_session_message; namespace BifEvent { void generate_netbios_session_message(analyzer::Analyzer* analyzer, Connection* c, int is_orig, bro_uint_t msg_type, bro_uint_t data_len); } extern EventHandlerPtr netbios_session_request; namespace BifEvent { void generate_netbios_session_request(analyzer::Analyzer* analyzer, Connection* c, StringVal* msg); } extern EventHandlerPtr netbios_session_accepted; namespace BifEvent { void generate_netbios_session_accepted(analyzer::Analyzer* analyzer, Connection* c, StringVal* msg); } extern EventHandlerPtr netbios_session_rejected; namespace BifEvent { void generate_netbios_session_rejected(analyzer::Analyzer* analyzer, Connection* c, StringVal* msg); } extern EventHandlerPtr netbios_session_raw_message; namespace BifEvent { void generate_netbios_session_raw_message(analyzer::Analyzer* analyzer, Connection* c, int is_orig, StringVal* msg); } extern EventHandlerPtr netbios_session_ret_arg_resp; namespace BifEvent { void generate_netbios_session_ret_arg_resp(analyzer::Analyzer* analyzer, Connection* c, StringVal* msg); } extern EventHandlerPtr netbios_session_keepalive; namespace BifEvent { void generate_netbios_session_keepalive(analyzer::Analyzer* analyzer, Connection* c, StringVal* msg); } #endif
[ "bbaugnies@gmail.com" ]
bbaugnies@gmail.com
99d92efc9a0d0173e639d3a4c8a2b68da92cfa63
6a36f251c7c8f49f4c28bd9d6993456b1da2348e
/Pointer/tempCodeRunnerFile.cpp
0a6c96d697d7a626ccd91266a35340ecfc29f490
[]
no_license
Payalkumari25/DSA
2803d57e57d860b461407f20d616e6e85130ac28
15a898fcbd9a9c91c92bf992f1bec1878db7275e
refs/heads/main
2023-07-17T06:20:58.164445
2021-09-09T23:27:14
2021-09-09T23:27:14
404,093,336
0
0
null
null
null
null
UTF-8
C++
false
false
456
cpp
cout<<"address of p "<<&p<<endl; // cout<<"value of p2 "<<p2<<endl; // cout<<endl; // cout<<"value at *p2 "<<*p2<<endl; // cout<<"value of p "<<p<<endl; // cout<<"Before fun1 value of **p "<<p2<<endl; // fun1(p2); // cout<<"after fun1 value of **p "<<p2<<endl; // cout<<endl; // cout<<"before fun2 value of *p2 "<<*p2<<endl; // fun2(p2); // cout<<"after fun2 value of *p2 "<<*p2<<endl; // cout<<endl;
[ "payalkumari255555@gmail.com" ]
payalkumari255555@gmail.com
40e07b97b23492e91be2ab7e71edf1388f99bd90
c75fe06cdae4ca3e91f5794dbb21ab6a96406776
/detectors/UNIMLampWedge/UNIMLampWedgeRootEvent.cpp
d68275df62b075c1d16b781fb0cf93c3874d7876
[]
no_license
dellaquilamaster/UNIMapper
20012783df7b9bde41961ccf0de2cecae88ec678
c980a2ed15dbb856a8175268bec3d0bd3b2a00ec
refs/heads/master
2021-06-23T16:22:27.408141
2021-06-15T07:59:50
2021-06-15T07:59:50
211,689,953
0
0
null
null
null
null
UTF-8
C++
false
false
759
cpp
#include <UNIMLampWedgeRootEvent.h> //________________________________________________ UNIMLampWedgeData::UNIMLampWedgeData(int num_dets) : fmulti(0) { fnumstrip=new Int_t[num_dets]; fEnergy=new Short_t[num_dets]; fTime=new Short_t[num_dets]; fEnergyCal=new double[num_dets]; } //________________________________________________ UNIMLampWedgeData::~UNIMLampWedgeData() { delete [] fnumstrip; delete [] fEnergy; delete [] fTime; delete [] fEnergyCal; } //________________________________________________ UNIMLampWedgeRootEvent::UNIMLampWedgeRootEvent(int num_dets) : fNumDetectors(num_dets), fLampWedge(fNumDetectors) {} //________________________________________________ UNIMLampWedgeRootEvent::~UNIMLampWedgeRootEvent() {}
[ "daniele@ddellaq.zef.irb.hr" ]
daniele@ddellaq.zef.irb.hr
90fcf515ba508555fbb5815b7be79c7a7b2031d8
cc937768d5e0cdcd5e228fa81542316a18754c2a
/SqlStatementParser/SqlStatementParser.h
f79cd9b74d9b9c51a018e349f793aef851a51393
[]
no_license
avraampiperidis/SqlStatementParser
e38e3a0f5e6c5dd8861f5c9ac4e42ed41123b0f5
6e59d79b3d903ca8c819be9171a870e1f01d15b6
refs/heads/master
2020-07-01T03:45:37.674348
2019-10-04T21:28:48
2019-10-04T21:28:48
201,037,514
12
1
null
null
null
null
UTF-8
C++
false
false
693
h
// SqlStatementParser.h #pragma once #include <Windows.h> #include <vector> #include <utility> #include <stdio.h> #include <limits.h> #include <string> #include <list> using namespace System; using namespace std; namespace SqlStatementParser { public ref class SqlStatementParser { private: bool isLineBreak(const unsigned char* head, const unsigned char* line_break); const unsigned char* skip_leading_whitespace(const unsigned char* head, const unsigned char* tail); public: void determineStatementRanges(const char* sql, size_t length, const std::string& initial_delimiter, std::vector<std::pair<size_t, size_t> >& ranges , const std::string& line_break); }; }
[ "piperidis3@yahoo.gr" ]
piperidis3@yahoo.gr
7809d792ebcc34ed3b576f25cb7c332304ff1247
c097c09c748cb8294d83d4763d744957501cd67c
/Ejercicio7MateriaSeccion/src/Seccion.cpp
7e257917d4f82f5cbedb61d6bafb88810aaf303d
[]
no_license
PeterGabrielVE/CPlusPlus
afd9af5c4b5507fe0eb16793bea76f4ba76dc247
b82a3df577570cc1e8deac2aa14c7baf494dc158
refs/heads/master
2021-05-11T04:03:03.054773
2018-04-01T02:50:01
2018-04-01T02:50:01
117,926,636
0
0
null
null
null
null
UTF-8
C++
false
false
694
cpp
/* * Seccion.cpp * * Created on: 30/01/2013 * Author: Pedro Gabriel Leal */ #include "Seccion.h" Seccion::Seccion() {} // TODO Auto-generated constructor stub void Seccion::setCantAlum(int CantAl) { CantAlum=CantAl; } int Seccion::getCantAlum() { return CantAlum; } void Seccion::setEstAplazados(int EstApl) { EstAplazados=EstApl; } int Seccion::getEstAplazados() { return EstAplazados; } void Seccion::setNotaSec(float NotaS) { NotaSec=NotaS; } float Seccion::getNotaSec() { return NotaSec; } int Seccion::CalcEstAprob() { int EstAp; EstAp=CantAlum-EstAplazados; return EstAp; } float Seccion::CalcPromSec() { float PromS; PromS=NotaSec/CantAlum; return PromS; }
[ "gaboleal123@gmail.com" ]
gaboleal123@gmail.com
951d26bf7f93911fd97a666eb3e209c418314e0b
c550a91bfc657b4ae537a8455609132d469b9de8
/Measure/Measure.ino
d0fb7b8e7be8858720f2ab0ec597533bef823c18
[]
no_license
Alpaca99/ELEC491
e673f2d130d053be8096029c9553f81756e288f0
e0b8e219db456d9ee152a657e52ff940e69aeb35
refs/heads/master
2020-04-05T09:45:10.362778
2019-03-28T07:46:55
2019-03-28T07:46:55
156,772,692
0
0
null
null
null
null
UTF-8
C++
false
false
623
ino
const int signalPin = 0; unsigned long time; void setup() { Serial.begin(57600); } int i=0; void loop() { float voltage; voltage = getVoltage(signalPin); if( i<5000 ){ Serial.print(voltage); Serial.print("\n"); i++; Serial.print("Time: "); time = millis(); Serial.print(); } // Serial.println(voltage); delayMicroseconds(100); // Sampling rate: 10000Hz } float getVoltage(int pin) { return (analogRead(pin) * 0.004882814*6*0.1); // This equation converts the 0 to 1023 value that analogRead() // returns, into a 0.0 to 5.0 value that is the true voltage // being read at that pin. }
[ "46383202+junxianhe@users.noreply.github.com" ]
46383202+junxianhe@users.noreply.github.com
bbd1d80e69ce37e4e1c9fd717f27bce28014814a
6b2a8dd202fdce77c971c412717e305e1caaac51
/solutions_5695413893988352_1/C++/MrDindows/code.cpp
2a65a30119b32e672646caa5b98d4d881c72dda2
[]
no_license
alexandraback/datacollection
0bc67a9ace00abbc843f4912562f3a064992e0e9
076a7bc7693f3abf07bfdbdac838cb4ef65ccfcf
refs/heads/master
2021-01-24T18:27:24.417992
2017-05-23T09:23:38
2017-05-23T09:23:38
84,313,442
2
4
null
null
null
null
UTF-8
C++
false
false
11,514
cpp
#pragma comment(linker, "/stack:20000000") #define _CRT_SECURE_NO_WARNINGS # include <iostream> # include <cmath> # include <algorithm> # include <cstdio> # include <cstring> # include <string> # include <cstdlib> # include <vector> # include <bitset> # include <map> # include <queue> # include <ctime> # include <stack> # include <set> # include <list> # include <deque> # include <functional> # include <sstream> # include <fstream> # include <complex> # include <numeric> # include <immintrin.h> using namespace std; // Let's define unordered map # ifdef __GNUC__ # if __cplusplus > 199711L # include <unordered_set> # include <unordered_map> # else # include <tr1/unordered_map> # include <tr1/unordered_set> using namespace std::tr1; # endif # else # include <unordered_map> # include <unordered_set> # endif #define VA_NUM_ARGS(...) VA_NUM_ARGS_IMPL_((0,__VA_ARGS__, 5,4,3,2,1)) #define VA_NUM_ARGS_IMPL_(tuple) VA_NUM_ARGS_IMPL tuple #define VA_NUM_ARGS_IMPL(_0,_1,_2,_3,_4,_5,N,...) N #define macro_dispatcher(macro, ...) macro_dispatcher_(macro, VA_NUM_ARGS(__VA_ARGS__)) #define macro_dispatcher_(macro, nargs) macro_dispatcher__(macro, nargs) #define macro_dispatcher__(macro, nargs) macro_dispatcher___(macro, nargs) #define macro_dispatcher___(macro, nargs) macro ## nargs #define DBN1(a) std::cerr<<#a<<"="<<(a)<<"\n" #define DBN2(a,b) std::cerr<<#a<<"="<<(a)<<", "<<#b<<"="<<(b)<<"\n" #define DBN3(a,b,c) std::cerr<<#a<<"="<<(a)<<", "<<#b<<"="<<(b)<<", "<<#c<<"="<<(c)<<"\n" #define DBN4(a,b,c,d) std::cerr<<#a<<"="<<(a)<<", "<<#b<<"="<<(b)<<", "<<#c<<"="<<(c)<<", "<<#d<<"="<<(d)<<"\n" #define DBN5(a,b,c,d,e) std::cerr<<#a<<"="<<(a)<<", "<<#b<<"="<<(b)<<", "<<#c<<"="<<(c)<<", "<<#d<<"="<<(d)<<", "<<#e<<"="<<(e)<<"\n" #define DBN(...) macro_dispatcher(DBN, __VA_ARGS__)(__VA_ARGS__) #define DA(a,n) cout<<#a<<"=["; printarray(a,n); cout<<"]\n" #define DAR(a,n,s) cout<<#a<<"["<<s<<"-"<<n-1<<"]=["; printarray(a,n,s); cout<<"]\n" #ifdef _MSC_VER #define ALIGN(x) __declspec(align(x)) #else #define ALIGN(x) __attribute__((aligned(x))) #endif #define CURTIME() cerr << clock() * 1.0 / CLOCKS_PER_SEC << std::endl double __begin; #define DTIME(ccc) __begin = clock(); ccc; std::cerr<<"Time of work = "<<(clock()-__begin)/CLOCKS_PER_SEC<<std::endl; #define mp make_pair typedef long long ll; typedef unsigned int uint; typedef unsigned long long ull; typedef pair<int, int> pii; typedef pair<long long, long long> pll; typedef vector<int> vi; typedef vector<long long> vll; template<typename T1, typename T2, typename T3> struct triple{ T1 a; T2 b; T3 c; triple(){}; triple(T1 _a, T2 _b, T3 _c) :a(_a), b(_b), c(_c){} }; #define tri triple<int,int,int> #define trll triple<ll,ll,ll> template<typename T1, typename T2, typename T3> bool operator<(const triple<T1, T2, T3> &t1, const triple<T1, T2, T3> &t2){ if (t1.a != t2.a) return t1.a<t2.a; else if (t1.b != t2.b) return t1.b<t2.b; else return t1.c < t2.c; } #define FI(n) for(int i=0;i<n;++i) #define FJ(n) for(int j=0;j<n;++j) #define FK(n) for(int k=0;k<n;++k) #define all(a) a.begin(), a.end() //int some_primes[10] = {100271, 500179, 1000003, 2000227, 5000321} inline int bits_count(int v){ v = v - ((v >> 1) & 0x55555555); v = (v & 0x33333333) + ((v >> 2) & 0x33333333); return((v + (v >> 4) & 0xF0F0F0F) * 0x1010101) >> 24; } inline int bits_count(ll v){ int t = v >> 32; int p = (v & ((1LL << 32) - 1)); return bits_count(t) + bits_count(p); } unsigned int reverse_bits(register unsigned int x){ x = (((x & 0xaaaaaaaa) >> 1) | ((x & 0x55555555) << 1)); x = (((x & 0xcccccccc) >> 2) | ((x & 0x33333333) << 2)); x = (((x & 0xf0f0f0f0) >> 4) | ((x & 0x0f0f0f0f) << 4)); x = (((x & 0xff00ff00) >> 8) | ((x & 0x00ff00ff) << 8)); return((x >> 16) | (x << 16)); } inline int sign(int x){ return x > 0; } inline bool isPowerOfTwo(int x){ return (x != 0 && (x&(x - 1)) == 0); } #define checkbit(n, b) ((n >> b) & 1) #define reunique(v) v.resize(std::unique(v.begin(), v.end()) - v.begin()) //STL output ******************************** template<typename T1, typename T2> inline std::ostream& operator << (std::ostream& os, const std::pair<T1, T2>& p); template<typename T> inline std::ostream &operator<<(std::ostream &os, const std::vector<T>& v); template<typename T>inline std::ostream &operator<<(std::ostream &os, const std::set<T>&v); template<typename T1, typename T2>inline std::ostream &operator << (std::ostream & os, const std::map<T1, T2>& v); template<typename T1, typename T2, typename T3> inline std::ostream& operator << (std::ostream& os, const triple<T1, T2, T3>& t); template<typename T1, typename T2> inline std::ostream& operator << (std::ostream& os, const std::pair<T1, T2>& p){ return os << "(" << p.first << ", " << p.second << ")"; } template<typename T>inline std::ostream &operator<<(std::ostream &os, const std::vector<T>& v){ bool first = true; os << "["; for (unsigned int i = 0; i<v.size(); i++){ if (!first)os << ", "; os << v[i]; first = false; }return os << "]"; } template<typename T>inline std::ostream &operator<<(std::ostream &os, const std::set<T>&v){ bool first = true; os << "["; for (auto ii = v.begin(); ii != v.end(); ++ii){ if (!first)os << ", "; os << *ii; first = false; }return os << "]"; } template<typename T1, typename T2>inline std::ostream &operator << (std::ostream & os, const std::map<T1, T2>& v){ bool first = true; os << "["; for (auto ii = v.begin(); ii != v.end(); ++ii){ if (!first)os << ", "; os << *ii; first = false; }return os << "]"; } template<typename T, typename T2>void printarray(T a[], T2 sz, T2 beg = 0){ for (T2 i = beg; i<sz; i++) cout << a[i] << " "; cout << endl; } template<typename T1, typename T2, typename T3> inline std::ostream& operator << (std::ostream& os, const triple<T1, T2, T3>& t){ return os << "(" << t.a << ", " << t.b << ", " << t.c << ")"; } //Pair magic template<typename T1, typename T2> inline pair<T1, T2> operator+(const pair<T1, T2> &p1 , const pair<T1, T2> &p2) { return pair<T1, T2>(p1.first + p2.first, p1.second + p2.second); } template<typename T1, typename T2> inline pair<T1, T2> operator-(const pair<T1, T2> &p1 , const pair<T1, T2> &p2) { return pair<T1, T2>(p1.first - p2.first, p1.second - p2.second); } #define FREIN(FILE) freopen(FILE, "rt", stdin) #define FREOUT(FILE) freopen(FILE, "wt", stdout) #define sqr(x) ((x) * (x)) #define sqrt(x) sqrt(1.0 * (x)) #define pow(x, n) pow(1.0 * (x), n) inline ll mulmod(ll x, ll n, ll _mod){ ll res = 0; while (n){ if (n & 1)res = (res + x) % _mod; x = (x + x) % _mod; n >>= 1; }return res; } inline ll powmod(ll x, ll n, ll _mod){ ll res = 1; while (n){ if (n & 1)res = (res*x) % _mod; x = (x*x) % _mod; n >>= 1; }return res; } inline ll gcd(ll a, ll b){ ll t; while (b){ a = a%b; t = a; a = b; b = t; }return a; } inline int gcd(int a, int b){ int t; while (b){ a = a%b; t = a; a = b; b = t; }return a; } inline ll lcm(ll a, ll b){ return a / gcd(a, b)*b; } inline ll gcd(ll a, ll b, ll c){ return gcd(gcd(a, b), c); } inline int gcd(int a, int b, int c){ return gcd(gcd(a, b), c); } // Useful constants #define INF 1011111111 #define LLINF 1000111000111000111LL #define EPS (double)1e-10 #define mod 1000000007 #define PI 3.14159265358979323 #define link asaxlaj //************************************************************************************* //const int MAXN = ...; // число вершин //const int INF = 1000000000; // константа-бесконечность // //struct edge { // int a, b, cap, flow; //}; // //int n, s, t, d[MAXN], ptr[MAXN], q[MAXN]; //vector<edge> e; //vector<int> g[MAXN]; // //void add_edge (int a, int b, int cap) { // edge e1 = { a, b, cap, 0 }; // edge e2 = { b, a, 0, 0 }; // g[a].push_back ((int) e.size()); // e.push_back (e1); // g[b].push_back ((int) e.size()); // e.push_back (e2); //} // //bool bfs() { // int qh=0, qt=0; // q[qt++] = s; // memset (d, -1, n * sizeof d[0]); // d[s] = 0; // while (qh < qt && d[t] == -1) { // int v = q[qh++]; // for (size_t i=0; i<g[v].size(); ++i) { // int id = g[v][i], // to = e[id].b; // if (d[to] == -1 && e[id].flow < e[id].cap) { // q[qt++] = to; // d[to] = d[v] + 1; // } // } // } // return d[t] != -1; //} // //int dfs (int v, int flow) { // if (!flow) return 0; // if (v == t) return flow; // for (; ptr[v]<(int)g[v].size(); ++ptr[v]) { // int id = g[v][ptr[v]], // to = e[id].b; // if (d[to] != d[v] + 1) continue; // int pushed = dfs (to, min (flow, e[id].cap - e[id].flow)); // if (pushed) { // e[id].flow += pushed; // e[id^1].flow -= pushed; // return pushed; // } // } // return 0; //} // //int dinic() { // int flow = 0; // for (;;) { // if (!bfs()) break; // memset (ptr, 0, n * sizeof ptr[0]); // while (int pushed = dfs (s, INF)) // flow += pushed; // } // return flow; //} int cnt[10101]; int n; string a, b; ll bestDif; ll ansx, ansy; void go(int cur, ll x, ll y) { if (cur == n) { ll dif = abs(x - y); if (dif < bestDif || (dif == bestDif && (x < ansx || (x == ansx && y < ansy)))) { bestDif = dif; ansx = x; ansy = y; } return; } int curx = a[cur] - '0'; int cury = b[cur] - '0'; if (curx < 10 && cury < 10) { go(cur + 1, x * 10 + curx, y * 10 + cury); } else if (curx > 10 && cury > 10) { if (x == y) { go(cur + 1, x * 10 + 0, y * 10 + 1); go(cur + 1, x * 10 + 0, y * 10 + 0); go(cur + 1, x * 10 + 1, y * 10 + 0); } else if (x > y) { go(cur + 1, x * 10 + 0, y * 10 + 9); } else { go(cur + 1, x * 10 + 9, y * 10 + 0); } } else { if (x == y) { if (curx > 10) { if (cury - 1 >= 0) go(cur + 1, x * 10 + cury - 1, y * 10 + cury); go(cur + 1, x * 10 + cury, y * 10 + cury); if (cury + 1 < 10) go(cur + 1, x * 10 + cury + 1, y * 10 + cury); } else { if (curx - 1 >= 0) go(cur + 1, x * 10 + curx, y * 10 + curx - 1); go(cur + 1, x * 10 + curx, y * 10 + curx); if (curx + 1 < 10) go(cur + 1, x * 10 + curx, y * 10 + curx + 1); } } else if (x > y) { if (curx > 10) { go(cur + 1, x * 10 + 0, y * 10 + cury); } else { go(cur + 1, x * 10 + curx, y * 10 + 9); } } else if (x < y) { if (curx > 10) { go(cur + 1, x * 10 + 9, y * 10 + cury); } else { go(cur + 1, x * 10 + curx, y * 10 + 0); } } } } int main() { FREIN("in.txt"); FREOUT("out.txt"); int t; cin >> t; for (int tc = 1; tc <= t; ++tc) { cout << "Case #" << tc << ": "; cin >> a >> b; n = a.size(); bestDif = 2e18; go(0, 0, 0); string sa = to_string(ansx); string sb = to_string(ansy); while (sa.size() < n) sa = "0" + sa; while (sb.size() < n) sb = "0" + sb; cout << sa << " " << sb << endl; // for (int i = 0; i < (1 << n); ++i) { // // } } return 0; }
[ "alexandra1.back@gmail.com" ]
alexandra1.back@gmail.com
28d6e3245620ba87140dc17ecfa8277dec1f45cf
b5a149e5d526c82d7576e7fb135a720802b35f6c
/search/globals.h
03c5ae83d0e6a3d03a9d3465f1cf748607a66d78
[]
no_license
xuy/fd-sac
f42a70cb7c1da81fea54910528f77ffe050e359c
2e1db3047aac63b1838344fe27b5d2bf1e7bbf04
refs/heads/master
2020-11-26T21:02:31.551009
2012-08-07T17:42:17
2012-08-07T17:42:17
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,692
h
#ifndef GLOBALS_H #define GLOBALS_H #include "operator_cost.h" #include <iosfwd> #include <string> #include <vector> class AxiomEvaluator; class CausalGraph; class DomainTransitionGraph; class Operator; class Axiom; class State; class SuccessorGenerator; class Timer; class RandomNumberGenerator; bool test_goal(const State &state); void save_plan(const std::vector<const Operator *> &plan, int iter); int calculate_plan_cost(const std::vector<const Operator *> &plan); void read_everything(std::istream &in); void dump_everything(); void verify_no_axioms_no_cond_effects(); void check_magic(std::istream &in, std::string magic); bool are_mutex(const std::pair<int, int> &a, const std::pair<int, int> &b); extern bool g_use_metric; extern int g_min_action_cost; extern int g_max_action_cost; // TODO: The following five belong into a new Variable class. extern std::vector<std::string> g_variable_name; extern std::vector<int> g_variable_domain; extern std::vector<std::vector<std::string> > g_fact_names; extern std::vector<int> g_axiom_layers; extern std::vector<int> g_default_axiom_values; extern State *g_initial_state; // g_goal is a mapping from state variable index to goal position. // If a planning problem has five goals, g_goal.size() == 5. extern std::vector<std::pair<int, int> > g_goal; extern std::vector<Operator> g_operators; extern std::vector<Operator> g_axioms; extern AxiomEvaluator *g_axiom_evaluator; extern SuccessorGenerator *g_successor_generator; extern std::vector<DomainTransitionGraph *> g_transition_graphs; extern CausalGraph *g_causal_graph; extern Timer g_timer; extern std::string g_plan_filename; extern RandomNumberGenerator g_rng; #endif
[ "xu.mathena@gmail.com" ]
xu.mathena@gmail.com
5c4a0dd36c2811ee07d6cb75f22ffcbe3248d578
c3b2e97f2f883297e45ec638d6a07eade9203c90
/backends/lua/src/LuaOperatorConversion.hpp
a712d4134bff910b8b675ab3fd0fcf7cd5bc0e91
[]
no_license
Sponk/Dynamo
f268133706b7bf27df7993c2e9fa95b53c5d2256
680823d92ea0df98208825df6fd316b334e169c1
refs/heads/master
2020-03-28T22:55:56.165417
2018-11-08T10:45:49
2018-11-08T10:45:49
149,266,399
0
0
null
null
null
null
UTF-8
C++
false
false
716
hpp
#pragma once #include <Pass.h> #include <Node.h> #include <For.h> #include <Assignment.h> #include <Binop.h> #include <vector> class LuaOperatorConversion: public dynamo::Pass { public: void handleNode(dynamo::NodeRef node) override { if(node->getType() == dynamo::BINOP) { auto binop = reinterpret_cast<Binop*>(node.get()); if(binop->getOperator() == "~=") binop->setOperator("!="); else if(binop->getOperator() == "^") binop->setOperator("**"); else if(binop->getOperator() == "..") binop->setOperator("+"); } else if(node->getType() == dynamo::UNOP) { auto unop = reinterpret_cast<Unop*>(node.get()); if(unop->getOperator() == "#") unop->setOperator("*"); } } };
[ "yp1995@outlook.com" ]
yp1995@outlook.com
3f230e661603908ee05035703d10cbec3ca560c2
eb0b9e28df8c8e522392d31628760c2361266693
/tags/TexMakerX/1.8.1/structdialog.cpp
c027a35506c5b4dcbece075c68248d3f7f76e94e
[]
no_license
svn2github/texstudio
9b0c7ccf22ed2aef453b43edf0fb0c416c742c93
de425fe2f8d2c48637d91632f3aa5554d6e68899
refs/heads/master
2021-01-25T07:29:04.777238
2013-08-27T16:18:15
2013-08-27T16:18:15
11,453,207
0
0
null
null
null
null
UTF-8
C++
false
false
975
cpp
/*************************************************************************** * copyright : (C) 2003-2007 by Pascal Brachet * * http://www.xm1math.net/texmaker/ * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include "structdialog.h" StructDialog::StructDialog(QWidget *parent, QString name) : QDialog(parent) { setModal(true); ui.setupUi(this); setWindowTitle(name); } StructDialog::~StructDialog(){ }
[ "BeniBela@92cce386-e96d-4106-809f-596c673a3fd8" ]
BeniBela@92cce386-e96d-4106-809f-596c673a3fd8
4e3234a7bc85144d521e5a24f1971f71b59e20e4
025917876a1f037f9af17fc20e74758c270e0c7f
/src/wiz/utils/futils.cpp
7312f08b043f382ab932bf05f85856611a15b60e
[]
no_license
clytras/WizBoSa
8ff78dab87b7666763a653b59a9326c2cbcd57e0
e6e7ce25ab980a583c43d21f7cbb1044d42ed4ff
refs/heads/master
2023-03-24T04:46:21.979908
2021-03-20T11:15:06
2021-03-20T11:15:06
349,433,404
0
0
null
null
null
null
UTF-8
C++
false
false
6,687
cpp
#include <iostream> #include <stdlib.h> #include <string.h> #include <sys/stat.h> #include <cerrno> #include <fcntl.h> #include <unistd.h> #include <linux/limits.h> #include "futils.h" namespace wiznet { const char *futils::os_pathsep = PATH_SEPARATOR; const char *futils::os_dirsep = DIRECTORY_SEPARATOR; bool futils::is_dir(const char *pDir) { bool result = false; struct stat st; if(lstat(pDir, &st) == 0) result = S_ISDIR(st.st_mode); return result; } bool futils::is_file(const char *pFile) { bool result = false; struct stat st; if(lstat(pFile, &st) == 0) result = S_ISREG(st.st_mode); return result; } bool futils::exists(const char *pDirFile) { bool result = false; struct stat st; result = lstat(pDirFile, &st) == 0; return result; } bool futils::set_current_path(const char *pPath) { return chdir(pPath) == 0; } char *futils::get_current_path(char *pbuffer) { return getcwd(pbuffer, PATH_MAX); } std::string futils::get_current_path() { char buffer[PATH_MAX]; return getcwd(buffer, PATH_MAX) ? std::string(buffer) : std::string(""); } // basename from PHP Version 5 source char *futils::basename(const char *pPath, const char *pSuffix /*= ""*/) { //const char *s, size_t len, char *suffix, size_t sufflen, char **p_ret, size_t *p_len const char *s = pPath, *suffix = pSuffix; size_t len = strlen(s), sufflen = strlen(suffix); //static char buffer[256]; char *p_ret; // = buffer; //size_t *p_len; char *ret = NULL, *c, *comp, *cend; size_t inc_len, cnt; int state; c = comp = cend = (char*)s; cnt = len; state = 0; while (cnt > 0) { inc_len = (*c == '\0' ? 1: /*php_mblen(c, cnt)*/ 1); switch (inc_len) { case -2: case -1: inc_len = 1; //php_ignore_value(php_mblen(NULL, 0)); break; case 0: goto quit_loop; case 1: #ifdef _WIN32 if (*c == '/' || *c == '\\') { #else if (*c == '/') { #endif if (state == 1) { state = 0; cend = c; } } else { if (state == 0) { comp = c; state = 1; } } break; default: if (state == 0) { comp = c; state = 1; } break; } c += inc_len; cnt -= inc_len; } quit_loop: if (state == 1) { cend = c; } if (suffix != NULL && sufflen < (uint)(cend - comp) && memcmp(cend - sufflen, suffix, sufflen) == 0) { cend -= sufflen; } len = cend - comp; //if (p_ret) { ret = (char*)malloc(len + 1); memcpy(ret, comp, len); ret[len] = '\0'; p_ret = ret; //} //if (p_len) { // *p_len = len; //} return p_ret; } char *futils::dirname(const char *pPath) { size_t len = strlen(pPath); char *path = (char*)calloc(1, len + 1); //static char path[len + 1]; strcpy(path, pPath); size_t ret_len = _dirname(path); char *ret = (char*)calloc(1, ret_len + 1); //static char ret[ret_len + 1]; strncpy(ret, path, ret_len); return ret; } size_t futils::_dirname(const char *pPath) { // char *path, size_t len size_t len = strlen(pPath); char *path = (char*)pPath; //(char*)malloc(len + 1); //strcpy(path, pPath); //size_t ret; register char *end = path + len - 1; unsigned int len_adjust = 0; //#ifdef _WIN32 // /* Note that on Win32 CWD is per drive (heritage from CP/M). // * This means dirname("c:foo") maps to "c:." or "c:" - which means CWD on C: drive. // */ // if ((2 <= len) && isalpha((int)((unsigned char *)path)[0]) && (':' == path[1])) { // /* Skip over the drive spec (if any) so as not to change */ // path += 2; // len_adjust += 2; // if (2 == len) { // /* Return "c:" on Win32 for dirname("c:"). // * It would be more consistent to return "c:." // * but that would require making the string *longer*. // */ // return len; // } // } //#else // /* // * Find the first occurence of : from the left // * move the path pointer to the position just after : // * increment the len_adjust to the length of path till colon character(inclusive) // * If there is no character beyond : simple return len // */ // char *colonpos = NULL; // colonpos = strchr(path, ':'); // if (colonpos != NULL) { // len_adjust = ((colonpos - path) + 1); // path += len_adjust; // if (len_adjust == len) { // return len; // } // } //#endif if (len == 0) { /* Illegal use of this function */ return 0; } /* Strip trailing slashes */ while (end >= path && IS_SLASH_P(end)) { end--; } if (end < path) { /* The path only contained slashes */ path[0] = DEFAULT_SLASH; path[1] = '\0'; return 1 + len_adjust; } /* Strip filename */ while (end >= path && !IS_SLASH_P(end)) { end--; } if (end < path) { /* No slash found, therefore return '.' */ path[0] = '.'; path[1] = '\0'; return 1 + len_adjust; } /* Strip slashes which came before the file name */ while (end >= path && IS_SLASH_P(end)) { end--; } if (end < path) { path[0] = DEFAULT_SLASH; path[1] = '\0'; return 1 + len_adjust; } *(end+1) = '\0'; size_t ret = (size_t)(end + 1 - path) + len_adjust; //free(path); return ret; } string futils::real_path(string sPath) { char *prp = realpath(sPath.c_str(), NULL); string ret(prp ? prp : ""); free(prp); return ret; } string& futils::add_slash(string& sPath) { if(!IS_SLASH(sPath[sPath.length() - 1])) sPath += DIRECTORY_SEPARATOR; return sPath; } string& futils::remove_slash(string &sPath) { if(IS_SLASH(sPath[sPath.length() - 1])) sPath.erase(sPath.length() - 1, 1); // [sPath.length() - 1] = ""; return sPath; } int futils::mkpath(string s, mode_t mode) { size_t pre = 0, pos; std::string dir; int mdret; if(s[s.size()-1]!='/') { // force trailing / so we can handle everything in loop s+='/'; } while((pos = s.find_first_of('/', pre)) != std::string::npos) { dir = s.substr(0, pos++); pre = pos; if(dir.size() == 0) continue; // if leading / first time is 0 length if((mdret = mkdir(dir.c_str(), mode)) && errno != EEXIST) { return mdret; } } return mdret; } }
[ "christos.lytras@gmail.com" ]
christos.lytras@gmail.com
235a61f7224368207ac4361961b5e4a64b6d69df
5286798f369775a6607636a7c97c87d2a4380967
/src/scriptwidget.h
7ea00d16da3d2b34f949095ee06436394fd9dc36
[ "MIT", "LicenseRef-scancode-free-unknown" ]
permissive
MelvinG24/dust3d
d03e9091c1368985302bd69e00f59fa031297037
c4936fd900a9a48220ebb811dfeaea0effbae3ee
refs/heads/master
2023-08-24T20:33:06.967388
2021-08-10T10:44:24
2021-08-10T10:44:24
293,045,595
0
0
MIT
2020-09-05T09:38:30
2020-09-05T09:38:29
null
UTF-8
C++
false
false
475
h
#ifndef SCRIPT_WIDGET_H #define SCRIPT_WIDGET_H #include <QWidget> #include <QPlainTextEdit> #include "scriptvariableswidget.h" class Document; class ScriptWidget : public QWidget { Q_OBJECT public: ScriptWidget(const Document *document, QWidget *parent=nullptr); public slots: void updateScriptConsole(); protected: QSize sizeHint() const override; private: const Document *m_document = nullptr; QPlainTextEdit *m_consoleEdit = nullptr; }; #endif
[ "huxingyi@msn.com" ]
huxingyi@msn.com
468fb123c0006bc1a8a7cc68308723291391fe7c
2b631cb14b185044e4201c9cc8be8219c5ab7556
/ml/nn/runtime/test/generated/examples/rnn_state.example.cpp
ed3fc97693c9f48fa9cff98925cf4804611aacca
[ "Apache-2.0" ]
permissive
yuchuangu85/Android-framework-code
59837ba3e41ebdda7de74ce82e1af2d0367610ce
fb27715328b4b0064b0f4e7b499b8c0f2e728d61
refs/heads/master
2020-09-03T09:00:20.642461
2019-11-04T16:21:25
2019-11-04T16:21:25
219,429,555
2
3
null
null
null
null
UTF-8
C++
false
false
11,603
cpp
// clang-format off // Generated file (from: rnn_state.mod.py). Do not edit std::vector<MixedTypedExample>& get_examples() { static std::vector<MixedTypedExample> examples = { // Begin of an example { .operands = { //Input(s) { // See tools/test_generator/include/TestHarness.h:MixedTyped // int -> Dimensions map .operandDimensions = {{0, {2, 8}}, {1, {16, 8}}, {2, {16, 16}}, {3, {16}}, {4, {2, 16}}}, // int -> FLOAT32 map .float32Operands = {{0, {-0.69424844f, -0.93421471f, -0.87287879f, 0.37144363f, -0.62476718f, 0.23791671f, 0.40060222f, 0.1356622f, -0.69424844f, -0.93421471f, -0.87287879f, 0.37144363f, -0.62476718f, 0.23791671f, 0.40060222f, 0.1356622f}}, {1, {0.461459f, 0.153381f, 0.529743f, -0.00371218f, 0.676267f, -0.211346f, 0.317493f, 0.969689f, -0.343251f, 0.186423f, 0.398151f, 0.152399f, 0.448504f, 0.317662f, 0.523556f, -0.323514f, 0.480877f, 0.333113f, -0.757714f, -0.674487f, -0.643585f, 0.217766f, -0.0251462f, 0.79512f, -0.595574f, -0.422444f, 0.371572f, -0.452178f, -0.556069f, -0.482188f, -0.685456f, -0.727851f, 0.841829f, 0.551535f, -0.232336f, 0.729158f, -0.00294906f, -0.69754f, 0.766073f, -0.178424f, 0.369513f, -0.423241f, 0.548547f, -0.0152023f, -0.757482f, -0.85491f, 0.251331f, -0.989183f, 0.306261f, -0.340716f, 0.886103f, -0.0726757f, -0.723523f, -0.784303f, 0.0354295f, 0.566564f, -0.485469f, -0.620498f, 0.832546f, 0.697884f, -0.279115f, 0.294415f, -0.584313f, 0.548772f, 0.0648819f, 0.968726f, 0.723834f, -0.0080452f, -0.350386f, -0.272803f, 0.115121f, -0.412644f, -0.824713f, -0.992843f, -0.592904f, -0.417893f, 0.863791f, -0.423461f, -0.147601f, -0.770664f, -0.479006f, 0.654782f, 0.587314f, -0.639158f, 0.816969f, -0.337228f, 0.659878f, 0.73107f, 0.754768f, -0.337042f, 0.0960841f, 0.368357f, 0.244191f, -0.817703f, -0.211223f, 0.442012f, 0.37225f, -0.623598f, -0.405423f, 0.455101f, 0.673656f, -0.145345f, -0.511346f, -0.901675f, -0.81252f, -0.127006f, 0.809865f, -0.721884f, 0.636255f, 0.868989f, -0.347973f, -0.10179f, -0.777449f, 0.917274f, 0.819286f, 0.206218f, -0.00785118f, 0.167141f, 0.45872f, 0.972934f, -0.276798f, 0.837861f, 0.747958f, -0.0151566f, -0.330057f, -0.469077f, 0.277308f, 0.415818f}}, {2, {0.1f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.1f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.1f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.1f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.1f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.1f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.1f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.1f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.1f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.1f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.1f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.1f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.1f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.1f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.1f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.1f}}, {3, {0.065691948f, -0.69055247f, 0.1107955f, -0.97084129f, -0.23957068f, -0.23566568f, -0.389184f, 0.47481549f, -0.4791103f, 0.29931796f, 0.10463274f, 0.83918178f, 0.37197268f, 0.61957061f, 0.3956964f, -0.37609905f}}, {4, {0.496726f, 0.0f, 0.965996f, 0.0f, 0.0584256f, 0.0f, 0.0f, 0.12315f, 0.0f, 0.0f, 0.612267f, 0.456601f, 0.0f, 0.52286f, 1.16099f, 0.0291233f, 0.496726f, 0.0f, 0.965996f, 0.0f, 0.0584256f, 0.0f, 0.0f, 0.12315f, 0.0f, 0.0f, 0.612267f, 0.456601f, 0.0f, 0.52286f, 1.16099f, 0.0291233f}}}, // int -> INT32 map .int32Operands = {}, // int -> QUANT8_ASYMM map .quant8AsymmOperands = {}, // int -> QUANT16_SYMM map .quant16SymmOperands = {}, // int -> FLOAT16 map .float16Operands = {}, // int -> BOOL8 map .bool8Operands = {}, // int -> QUANT8_SYMM_PER_CHANNEL map .quant8ChannelOperands = {}, // int -> QUANT16_ASYMM map .quant16AsymmOperands = {}, // int -> QUANT8_SYMM map .quant8SymmOperands = {}, }, //Output(s) { // See tools/test_generator/include/TestHarness.h:MixedTyped // int -> Dimensions map .operandDimensions = {{0, {2, 16}}, {1, {2, 16}}}, // int -> FLOAT32 map .float32Operands = {{0, {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}}, {1, {0.0f, 0.0f, 0.524901f, 0.0f, 0.0f, 0.0f, 0.0f, 1.02116f, 0.0f, 1.35762f, 0.0f, 0.356909f, 0.436415f, 0.0355727f, 0.0f, 0.0f, 0.0f, 0.0f, 0.524901f, 0.0f, 0.0f, 0.0f, 0.0f, 1.02116f, 0.0f, 1.35762f, 0.0f, 0.356909f, 0.436415f, 0.0355727f, 0.0f, 0.0f}}}, // int -> INT32 map .int32Operands = {}, // int -> QUANT8_ASYMM map .quant8AsymmOperands = {}, // int -> QUANT16_SYMM map .quant16SymmOperands = {}, // int -> FLOAT16 map .float16Operands = {}, // int -> BOOL8 map .bool8Operands = {}, // int -> QUANT8_SYMM_PER_CHANNEL map .quant8ChannelOperands = {}, // int -> QUANT16_ASYMM map .quant16AsymmOperands = {}, // int -> QUANT8_SYMM map .quant8SymmOperands = {}, } }, }, // End of an example }; return examples; }; std::vector<MixedTypedExample>& get_examples_dynamic_output_shape() { static std::vector<MixedTypedExample> examples_dynamic_output_shape = { // Begin of an example { .operands = { //Input(s) { // See tools/test_generator/include/TestHarness.h:MixedTyped // int -> Dimensions map .operandDimensions = {{0, {2, 8}}, {1, {16, 8}}, {2, {16, 16}}, {3, {16}}, {4, {2, 16}}}, // int -> FLOAT32 map .float32Operands = {{0, {-0.69424844f, -0.93421471f, -0.87287879f, 0.37144363f, -0.62476718f, 0.23791671f, 0.40060222f, 0.1356622f, -0.69424844f, -0.93421471f, -0.87287879f, 0.37144363f, -0.62476718f, 0.23791671f, 0.40060222f, 0.1356622f}}, {1, {0.461459f, 0.153381f, 0.529743f, -0.00371218f, 0.676267f, -0.211346f, 0.317493f, 0.969689f, -0.343251f, 0.186423f, 0.398151f, 0.152399f, 0.448504f, 0.317662f, 0.523556f, -0.323514f, 0.480877f, 0.333113f, -0.757714f, -0.674487f, -0.643585f, 0.217766f, -0.0251462f, 0.79512f, -0.595574f, -0.422444f, 0.371572f, -0.452178f, -0.556069f, -0.482188f, -0.685456f, -0.727851f, 0.841829f, 0.551535f, -0.232336f, 0.729158f, -0.00294906f, -0.69754f, 0.766073f, -0.178424f, 0.369513f, -0.423241f, 0.548547f, -0.0152023f, -0.757482f, -0.85491f, 0.251331f, -0.989183f, 0.306261f, -0.340716f, 0.886103f, -0.0726757f, -0.723523f, -0.784303f, 0.0354295f, 0.566564f, -0.485469f, -0.620498f, 0.832546f, 0.697884f, -0.279115f, 0.294415f, -0.584313f, 0.548772f, 0.0648819f, 0.968726f, 0.723834f, -0.0080452f, -0.350386f, -0.272803f, 0.115121f, -0.412644f, -0.824713f, -0.992843f, -0.592904f, -0.417893f, 0.863791f, -0.423461f, -0.147601f, -0.770664f, -0.479006f, 0.654782f, 0.587314f, -0.639158f, 0.816969f, -0.337228f, 0.659878f, 0.73107f, 0.754768f, -0.337042f, 0.0960841f, 0.368357f, 0.244191f, -0.817703f, -0.211223f, 0.442012f, 0.37225f, -0.623598f, -0.405423f, 0.455101f, 0.673656f, -0.145345f, -0.511346f, -0.901675f, -0.81252f, -0.127006f, 0.809865f, -0.721884f, 0.636255f, 0.868989f, -0.347973f, -0.10179f, -0.777449f, 0.917274f, 0.819286f, 0.206218f, -0.00785118f, 0.167141f, 0.45872f, 0.972934f, -0.276798f, 0.837861f, 0.747958f, -0.0151566f, -0.330057f, -0.469077f, 0.277308f, 0.415818f}}, {2, {0.1f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.1f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.1f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.1f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.1f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.1f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.1f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.1f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.1f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.1f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.1f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.1f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.1f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.1f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.1f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.1f}}, {3, {0.065691948f, -0.69055247f, 0.1107955f, -0.97084129f, -0.23957068f, -0.23566568f, -0.389184f, 0.47481549f, -0.4791103f, 0.29931796f, 0.10463274f, 0.83918178f, 0.37197268f, 0.61957061f, 0.3956964f, -0.37609905f}}, {4, {0.496726f, 0.0f, 0.965996f, 0.0f, 0.0584256f, 0.0f, 0.0f, 0.12315f, 0.0f, 0.0f, 0.612267f, 0.456601f, 0.0f, 0.52286f, 1.16099f, 0.0291233f, 0.496726f, 0.0f, 0.965996f, 0.0f, 0.0584256f, 0.0f, 0.0f, 0.12315f, 0.0f, 0.0f, 0.612267f, 0.456601f, 0.0f, 0.52286f, 1.16099f, 0.0291233f}}}, // int -> INT32 map .int32Operands = {}, // int -> QUANT8_ASYMM map .quant8AsymmOperands = {}, // int -> QUANT16_SYMM map .quant16SymmOperands = {}, // int -> FLOAT16 map .float16Operands = {}, // int -> BOOL8 map .bool8Operands = {}, // int -> QUANT8_SYMM_PER_CHANNEL map .quant8ChannelOperands = {}, // int -> QUANT16_ASYMM map .quant16AsymmOperands = {}, // int -> QUANT8_SYMM map .quant8SymmOperands = {}, }, //Output(s) { // See tools/test_generator/include/TestHarness.h:MixedTyped // int -> Dimensions map .operandDimensions = {{0, {2, 16}}, {1, {2, 16}}}, // int -> FLOAT32 map .float32Operands = {{0, {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}}, {1, {0.0f, 0.0f, 0.524901f, 0.0f, 0.0f, 0.0f, 0.0f, 1.02116f, 0.0f, 1.35762f, 0.0f, 0.356909f, 0.436415f, 0.0355727f, 0.0f, 0.0f, 0.0f, 0.0f, 0.524901f, 0.0f, 0.0f, 0.0f, 0.0f, 1.02116f, 0.0f, 1.35762f, 0.0f, 0.356909f, 0.436415f, 0.0355727f, 0.0f, 0.0f}}}, // int -> INT32 map .int32Operands = {}, // int -> QUANT8_ASYMM map .quant8AsymmOperands = {}, // int -> QUANT16_SYMM map .quant16SymmOperands = {}, // int -> FLOAT16 map .float16Operands = {}, // int -> BOOL8 map .bool8Operands = {}, // int -> QUANT8_SYMM_PER_CHANNEL map .quant8ChannelOperands = {}, // int -> QUANT16_ASYMM map .quant16AsymmOperands = {}, // int -> QUANT8_SYMM map .quant8SymmOperands = {}, } }, }, // End of an example }; return examples_dynamic_output_shape; };
[ "yuchuangu85@gmail.com" ]
yuchuangu85@gmail.com
e2b4aa806b9af49c62b4272467ebd73e68530255
7d7c322f87ee4ce290f391eed5938cea526bbba8
/work2017/SOA/smsv5src/Ses/Sgs/CurveUtil.h
0b3bac985ba9001f36c1a760f24c3ffd3c58f464
[]
no_license
tatsumiking/GitBackup
8cc380f5ff29ed11118a1e3c9a28493f693f3588
74e7810e6449f5d233fde095a1901d6fd48b8ed6
refs/heads/master
2023-04-01T09:43:33.361077
2021-03-29T00:11:58
2021-03-29T00:11:58
326,543,058
0
0
null
null
null
null
SHIFT_JIS
C++
false
false
971
h
#pragma once //C 交点検出処理クラス class CCrossLib { public: CCrossLib(CScrollView* pcview); public: CTonView* m_pcView; CTonDoc* m_pcDoc; CVect *m_pcVect; CTypedPtrList<CObList,CData*> *m_pcPtrList; typedef CTypedPtrList<CPtrList, CFigure*> m_cFigureList; public: void SetDataList(CTypedPtrList<CObList,CData*> *pList); void GetCrossPoint(dlinetype ln1, dcrostype * crs, int *crsmax, int limit); void GetCrossPointVect(CVect *pcVect, dlinetype ln1, dcrostype * crs, int *crsmax); private: void GetRejionCrossPoint(CVect *pcVect, dlinetype ln1, dcrostype * crs, int *crsmax); void GetNoRejionCrossPoint(CVect *pcVect, dlinetype ln1, dcrostype * crs, int *crsmax); void GetCrossPointFigu(dlinetype ln1, dlinetype ln2, int pp, dcrostype * crs, int *crsmax); void GetCrossPointFigu(dlinetype ln1, darctype ac2, int pp, dcrostype * crs, int *crsmax); void GetCrossPointFigu(dlinetype ln1, dbezetype bz2, int pp, dcrostype * crs, int *crsmax); };
[ "tatsumiking@gmail.com" ]
tatsumiking@gmail.com
3e6b9247b6ab819b5cfb479d255489a57232efd9
8ef96553716f2df3cd927035a8eb4a0746c54320
/controller/usbmidiio/source/midiparser.cpp
3189f07cd9a4be98e60a808094fa76cfa924cbd6
[ "MIT" ]
permissive
ThisIsNotRocketScience/Syntonovo_PAN
d25cd834cfc8e7cab42a492b47fea8b993756bca
0dfb3ccc66df0c2699228dbdbc1e450c408dd91b
refs/heads/master
2021-08-02T14:12:47.771414
2021-07-18T11:32:15
2021-07-18T11:32:15
129,516,620
0
0
null
null
null
null
UTF-8
C++
false
false
6,109
cpp
#include "midiparser.h" static int usbmidi_msglen(const midicmd_t cmd) { switch (cmd.header & 0x0F) { case 0x5: // 1-uint8_t sysex case 0xF: // single uint8_t return 1; // 1 uint8_t case 0x2: // 2-uint8_t system common case 0x6: // 2-uint8_t sysex end case 0xC: // program change case 0xD: // channel pressure return 2; // 2 uint8_ts case 0x3: // 3-uint8_t system common case 0x4: // 3-uint8_t sysex start/continue case 0x7: // 3-uint8_t sysex end case 0x8: // note off case 0x9: // note on case 0xA: // poly-keypress case 0xB: // control change case 0xE: // pitchbend return 3; // 3 uint8_ts break; default: // unimplemented break; } return 0; } void midiin_reset(midiin_state_t* state) { state->midiin_status = 0; state->midiin_header = 0; state->midiin_count = 0; state->midiin_length = 0; } static void midiin_sysex(midicmd_t* cmd, midiin_state_t* state) { cmd->header = 0x4; cmd->b1 = state->midiin_uint8_ts[0]; cmd->b2 = state->midiin_uint8_ts[1]; cmd->b3 = state->midiin_uint8_ts[2]; } static void midiin_sysex_end(midicmd_t* cmd, midiin_state_t* state) { switch (state->midiin_count) { case 1: cmd->header = 0x5; break; case 2: cmd->header = 0x6; break; case 3: cmd->header = 0x7; break; default: return; } cmd->b1 = state->midiin_uint8_ts[0]; cmd->b2 = state->midiin_uint8_ts[1]; cmd->b3 = state->midiin_uint8_ts[2]; } static void midiin_pack_cmd(midicmd_t* cmd, midiin_state_t* state) { if (state->midiin_status < 0xF0) { cmd->header = state->midiin_status >> 4; } else if (state->midiin_status == 0xF0) { if (state->midiin_uint8_ts[0] == 0xF0) { cmd->header = 0x4; } else { switch (state->midiin_count) { case 1: cmd->header = 0x5; break; case 2: cmd->header = 0x6; break; case 3: cmd->header = 0x7; break; default: return; } } } else { if (state->midiin_length == 1) { cmd->header = 0x2; } else if (state->midiin_length == 2) { cmd->header = 0x3; } else { // uh-oh cmd->header = 0xF; } } cmd->b1 = state->midiin_status; cmd->b2 = state->midiin_uint8_ts[0]; cmd->b3 = state->midiin_uint8_ts[1]; } int midiin_process(midicmd_t* cmd, uint8_t b, midiin_state_t* state) { if (b == 0xf4 || b == 0xf5) { // ignore internal sync uint8_ts return 0; } if (b >= 0xF8) { // single uint8_t system realtime messages cmd->header = 0xF; cmd->b1 = b; cmd->b2 = 0; cmd->b3 = 0; return 1; } if (b == 0xF7) { // SysEx End state->midiin_uint8_ts[state->midiin_count] = b; state->midiin_count++; midiin_sysex_end(cmd, state); state->midiin_status = 0; state->midiin_count = 0; state->midiin_length = 0; return 1; } if ((b & 0x80) == 0) { if (state->midiin_status != 0) { state->midiin_uint8_ts[state->midiin_count] = b; state->midiin_count++; if (state->midiin_count == state->midiin_length) { if (state->midiin_status == 0xF0) { midiin_sysex(cmd, state); } else { midiin_pack_cmd(cmd, state); } state->midiin_count = 0; return 1; } } return 0; } else { // (b & 0x80) switch (b & 0xF0) { case 0x80: // note off case 0x90: // note on case 0xA0: // aftertouch case 0xB0: // control change case 0xE0: // pitch bend state->midiin_status = b; state->midiin_count = 0; state->midiin_length = 2; return 0; case 0xC0: // program change case 0xD0: // channel pressure state->midiin_status = b; state->midiin_count = 0; state->midiin_length = 1; return 0; default: switch (b) { case 0xF0: // SysEx begin state->midiin_status = b; state->midiin_length = 3; state->midiin_uint8_ts[0] = b; state->midiin_count = 1; return 0; case 0xF1: // MTC quarter frame state->midiin_status = b; state->midiin_count = 0; state->midiin_length = 1; return 0; case 0xF2: // Song position state->midiin_status = b; state->midiin_count = 0; state->midiin_length = 2; return 0; case 0xF3: // Song select state->midiin_status = b; state->midiin_count = 0; state->midiin_length = 1; return 0; case 0xF6: // Tune request state->midiin_status = 0; cmd->header = 0x5; cmd->b1 = b; cmd->b2 = 0; cmd->b3 = 0; return 1; } } } // ignored state->midiin_status = 0; return 0; } #ifndef ERR_OK #define ERR_OK 0x00U /*!< OK */ #endif int midiin_receive(midicmd_t* cmd, midiin_state_t* state) { while (state->GetCharsInRxBuf() > 0) { uint8_t b; if (state->RecvChar(&b) == ERR_OK) { if (midiin_process(cmd, b, state)) { return 1; } } } return 0; } void midiout_reset(midiout_state_t* state) { state->midiout_laststatus = 0; } int midiout_can_transmit(int numbytes, midiout_state_t* state) { return (state->OutBufSize - state->GetCharsInTxBuf()) > numbytes; } void midiout_resetstatus(midiout_state_t* state) { state->midiout_laststatus = 0; } int midiout_checkstatus(uint8_t status, midiout_state_t* state) { // allow non-status uint8_ts if ((status & 0x80) == 0) { return 1; } // allow all real-time status uint8_ts if ((status & 0xF0) == 0xF0) { if (status <= 0xF7) { midiout_resetstatus(state); } return 1; } // filter rest of status uint8_ts if status did not change if (status == state->midiout_laststatus && !state->CounterExpired(state->midiout_counterhandle)) { return 0; } state->midiout_laststatus = status; state->SetCounter(state->midiout_counterhandle, 10); // 10 ticks, 10ms each = 100ms return 1; } void midiout_transmit(const midicmd_t cmd, void* _state) { midiout_state_t* state = (midiout_state_t*) _state; switch (usbmidi_msglen(cmd)) { case 1: // 1 byte state->SendChar(cmd.b1); break; case 2: // 2 bytes if (midiout_checkstatus(cmd.b1, state)) { state->SendChar(cmd.b1); } state->SendChar(cmd.b2); break; case 3: // 3 bytes if (midiout_checkstatus(cmd.b1, state)) { state->SendChar(cmd.b1); } state->SendChar(cmd.b2); state->SendChar(cmd.b3); break; default: // unimplemented break; } }
[ "lauri.koponen@iki.fi" ]
lauri.koponen@iki.fi
61a95b7eee1da07e2a9167e3bd16bcf71ac1e755
840152e7187468fb31c0af1183d25a1c5985553c
/OCV/ocv.cpp
b9f57000e567925bfc612a8742d6364d85f7bf3d
[]
no_license
TaeWoo0k/OCV_CH11
0f2b035bd155da525536780e654680e390366f26
6f515e3b7d07cdf3a710552569338c0c97c9c02a
refs/heads/master
2020-12-05T23:50:52.156780
2020-01-07T08:40:32
2020-01-07T08:40:32
null
0
0
null
null
null
null
UHC
C++
false
false
9,786
cpp
//#include "pch.h" #include <iostream> #include<opencv\cv.h> #include<opencv\highgui.h> #include<opencv\cxcore.h> #include<stdio.h> #include<Windows.h> #include<stdlib.h> #include<time.h> #include<math.h> #include<string.h> #include<assert.h> #include<string.h> #define unsigned char uchar int N_MASK[3][3] = { { 0,1,0 }, { 1,1,1 }, {0,1,0} }; int** i_alloc(int size_x, int size_y) { int** m; int i; if ((m = (int**)calloc(size_y, sizeof(int*))) == NULL) { printf("i_alloc error 1\7\n"); exit(0); } for (i = 0; i < size_y; i++) if ((m[i] = (int*)calloc(size_x, sizeof(int))) == NULL) { printf("i_alloc error 2\7\n"); exit(0); } return m; } uchar** uc_alloc(int size_x, int size_y) { uchar** m; int i; if ((m = (uchar * *)calloc(size_y, sizeof(uchar*))) == NULL) { printf("uc_alloc error 1\7\n"); exit(0); } for (i = 0; i < size_y; i++) if ((m[i] = (uchar*)calloc(size_x, sizeof(uchar))) == NULL) { printf("uc_alloc error 2\7\n"); exit(0); } return m; } void read_ucmatrix(int size_x, int size_y, uchar** ucmatrix, char* filename) { int i; FILE* f; if ((fopen_s(&f, filename, "rb")) != NULL) { printf("%s File open Error! \n", filename); exit(0); } for (i = 0; i < size_y; i++) if (fread(ucmatrix[i], sizeof(uchar), size_x, f) != size_x) { printf("Data Read Error! \n"); exit(0); } fclose(f); } void MakeBinary(uchar** img, uchar** out, int Row, int Col, double avg) { int i, j; for (i = 0; i < Row; i++) { for (j = 0; j < Col; j++) { if (img[i][j] > avg) out[i][j] = 255; //Change value for book with avg-30 else out[i][j] = 0; } } }void Erosion(uchar** Data_In, uchar** Data_Out, int Size, int BLK_SIZE) { int i, j, smin, value; int indexi, indexj; int maski, maskj; for (i = -Size; i < BLK_SIZE - Size; i++) { for (j = -Size; j < BLK_SIZE - Size; j++) { smin = 256; for (maski = 0; maski <= 2 * Size; maski++) { for (maskj = 0; maskj <= 2 * Size; maskj++) { if (N_MASK[maski][maskj] != 0) { indexi = i + maski; indexj = j + maskj; if (indexi < 0) indexi = -indexi; else if (indexi >= BLK_SIZE) indexi = 2 * BLK_SIZE - indexi - 1; if (indexj < 0) indexj = -indexj; else if (indexj >= BLK_SIZE) indexj = 2 * BLK_SIZE - indexj - 1; //circular method /*if (indexi < 0) indexi += BLK_SIZE; else if (indexi >= BLK_SIZE) indexi -= BLK_SIZE; if (indexj < 0) indexj += BLK_SIZE; else if (indexj >= BLK_SIZE) indexj -= BLK_SIZE;*/ if (Data_In[indexi][indexj] < smin) { value = (int)Data_In[indexi][indexj] - (int)N_MASK[maski][maskj]; if (value < smin) smin = value; } } } } Data_Out[i + Size][j + Size] = (smin < 0) ? (uchar)0 : (uchar)smin; } } } void Dilation(uchar** Data_In, uchar** Data_Out, int Size, int BLK_SIZE) { int i, j, smax, value; int indexi, indexj; int maski, maskj; for (i = -Size; i < BLK_SIZE - Size; i++) { for (j = -Size; j < BLK_SIZE - Size; j++) { smax = 0; for (maski = 0; maski <= 2 * Size; maski++) { for (maskj = 0; maskj <= 2 * Size; maskj++) { if (N_MASK[maski][maskj] != 0) { indexi = i + maski; indexj = j + maskj; if (indexi < 0) indexi = -indexi; else if (indexi >= BLK_SIZE) indexi = 2 * BLK_SIZE - indexi - 1; if (indexj < 0) indexj = -indexj; else if (indexj >= BLK_SIZE) indexj = 2 * BLK_SIZE - indexj - 1; //circular method /*if (indexi < 0) indexi += BLK_SIZE; else if (indexi >= BLK_SIZE) indexi -= BLK_SIZE; if (indexj < 0) indexj += BLK_SIZE; else if (indexj >= BLK_SIZE) indexj -= BLK_SIZE;*/ if (Data_In[indexi][indexj] > smax) { value = (int)Data_In[indexi][indexj] + (int)N_MASK[maski][maskj]; if (value > smax) smax = value; } } } } Data_Out[i + Size][j + Size] = (smax > 255) ? (uchar)255 : (uchar)smax; } } } //void Dilation(uchar** Data_In, uchar** Data_Out, int Size, int BLK_SIZE) //{ // int i, j, smax, value; // int maski, maskj; // int indexi, indexj; // // //int** N_MASK; // for (i = -Size; i < BLK_SIZE - Size; i++) { // for (j = -Size; j < BLK_SIZE - Size; j++) { // smax = 0; // for (maski = 0; maski <= 2 * Size; maski++) { // for (maskj = 0; maskj <= 2 * Size; maskj++) { // if (N_MASK[maski][maskj] != 0) { // indexi = i + maski; // indexj = j + maskj; // // if (indexi < 0) indexi = -indexi; // else if (indexi >= BLK_SIZE) indexi = 2 * BLK_SIZE - indexi - 1; // if (indexj < 0) indexj = -indexj; // else if (indexj >= BLK_SIZE) indexj = 2 * BLK_SIZE - indexj - 1; // if (Data_In[indexi][indexj] > smax) { // value = (int)Data_In[indexi][indexj] + (int)N_MASK[maski][maskj]; // if (value > smax)smax = value; // } // } // } // } // Data_Out[i + Size][j + Size] = (smax > 255) ? (uchar)255 : (uchar)smax; // } // } //} void BinaryErosion(uchar** Data_In, uchar** Data_Out, int Size, int BLK_SIZE) { int i, j, count; int indexi, indexj; int maski, maskj; for (i = -Size; i < BLK_SIZE - Size; i++) { for (j = -Size; j < BLK_SIZE - Size; j++) { count = 0; for (maski = 0; maski <= 2 * Size; maski++) { for (maskj = 0; maskj <= 2 * Size; maskj++) { if (N_MASK[maski][maskj] != 0) { indexi = i + maski; indexj = j + maskj; if (indexi < 0) indexi = -indexi; else if (indexi >= BLK_SIZE)indexi = 2 * BLK_SIZE - indexi - 1; if (indexj < 0)indexj = -indexj; else if (indexj >= BLK_SIZE)indexj = 2 * BLK_SIZE - indexj - 1; if (Data_In[indexi][indexj] == 255) { count++; } } } } if (count == 5) Data_Out[i + Size][j + Size] = 255; else Data_Out[i + Size][j + Size] = 0; } } } void BinaryDilation(uchar** Data_In, uchar** Data_Out, int Size, int BLK_SIZE) { int i, j, count; int maski, maskj; int indexi, indexj; for (i = -Size; i < BLK_SIZE - Size; i++) { for (j = -Size; j < BLK_SIZE - Size; j++) { count = 0; for (maski = 0; maski <= 2 * Size; maski++) { for (maskj = 0; maskj <= 2 * Size; maskj++) { if (N_MASK[maski][maskj] != 0) { indexi = i + maski; indexj = j + maskj; if (indexi < 0) indexi = -indexi; else if (indexi >= BLK_SIZE)indexi = 2 * BLK_SIZE - indexi - 1; if (indexj < 0)indexj = -indexj; else if (indexj >= BLK_SIZE)indexj = 2 * BLK_SIZE - indexj - 1; if (Data_In[indexi][indexj] == 255) { count++; } } } } if (count) Data_Out[i + Size][j + Size] = 255; else Data_Out[i + Size][j + Size] = 0; } } } void Opening(uchar** Data_In, uchar** Data_Out, int sizex, int sizey) { uchar** TempBLK; TempBLK = uc_alloc(sizex, sizey); Erosion(Data_In, TempBLK, 1, sizey); Dilation(TempBLK, Data_Out, 1, sizex); } void Closing(uchar** Data_In, uchar** Data_Out, int sizex, int sizey) { uchar** TempBLK; TempBLK = uc_alloc(sizex, sizey); Dilation(Data_In, TempBLK, 1, sizex); Erosion(TempBLK, Data_Out, 1, sizey); } void AddSub(uchar** img, uchar** Result, int Row, int Col, int flag, int factor) { int i, j; double tmp; for (i = 0; i < Row; i++) for (j = 0; j < Col; j++) { if (flag == 0) { tmp = img[i][j] = tmp; } else { tmp = img[i][j] - factor; if (tmp > 255) tmp = 255; else if (tmp < 0) tmp = 0; Result[i][j] = tmp; } } } void write_ucmatrix(int size_x, int size_y, uchar** ucmatrix, char* filename) { int i; FILE* f; if ((fopen_s(&f, filename, "wb")) != NULL) { printf("%s File open Error! \n", filename); exit(0); } for (i = 0; i < size_y; i++) if (fwrite(ucmatrix[i], sizeof(uchar), size_x, f) != size_x) { printf("Data Write Error! \n"); exit(0); } fclose(f); } int main(int argc, char* argv[]) { srand(time(NULL)); double sum; int i, j; int position, num; IplImage* cvImg; CvSize imgSize; uchar** img; uchar** outimg = 0; uchar** outimg8; uchar** outimg7; uchar** outimg6; uchar** outimg5; if (argc != 4) { printf("Exe imgData x_size y_size \n"); exit(0); } imgSize.width = atoi(argv[2]); imgSize.height = atoi(argv[3]); img = uc_alloc(imgSize.width, imgSize.height); // 메모리 할당 outimg = uc_alloc(imgSize.width, imgSize.height); // 메모리 할당 outimg8 = uc_alloc(imgSize.width, imgSize.height); // 메모리 할당 outimg7 = uc_alloc(imgSize.width, imgSize.height); // 메모리 할당 outimg6 = uc_alloc(imgSize.width, imgSize.height); // 메모리 할당 outimg5 = uc_alloc(imgSize.width, imgSize.height); // 메모리 할당 */ read_ucmatrix(imgSize.width, imgSize.height, img, argv[1]); // 레나 이미지 읽기 cvImg = cvCreateImage(imgSize, 8, 1); MakeBinary(img, img, imgSize.width, imgSize.height, 123); //Opening(img, outimg, imgSize.width, imgSize.height); BinaryDilation(img, outimg, 1, imgSize.height); for (i = 0; i < imgSize.height; i++) for (j = 0; j < imgSize.width; j++) { ((uchar*)(cvImg->imageData + cvImg->widthStep * i))[j] = outimg[i][j]; } cvShowImage("lena BinaryDilaion", cvImg); BinaryErosion(img, outimg, 1, imgSize.height); //Closing(img, outimg, imgSize.width, imgSize.height); for (i = 0; i < imgSize.height; i++) for (j = 0; j < imgSize.width; j++) { ((uchar*)(cvImg->imageData + cvImg->widthStep * i))[j] = outimg[i][j]; } cvNamedWindow("lena BinaryErosion", 1); cvShowImage("lena BinaryErosion", cvImg); cvWaitKey(0); cvDestroyWindow("image"); cvReleaseImage(&cvImg); getchar(); getchar(); return 0; }
[ "uhwawoo@naver.com" ]
uhwawoo@naver.com
b5b01f3446aff480c095f035e79b204277b47c8c
1da5543d1edefd735f88741bb301c09925d87f96
/Tensile/Source/lib/include/Tensile/ContractionProblem_Detail.hpp
c7d6abf2a92920a6cde2181987e8d4d62c0f226d
[ "MIT" ]
permissive
lsl036/Tensile_FGPS
020d4b3ccfb6a2e0cbc2aab21f5e46adc9b9529e
c816e8b7ed622c067aec4388334d6b0b4415287a
refs/heads/master
2023-08-23T19:37:05.754878
2021-10-25T08:09:59
2021-10-25T08:09:59
null
0
0
null
null
null
null
UTF-8
C++
false
false
3,823
hpp
/******************************************************************************* * * MIT License * * Copyright (c) 2019 Advanced Micro Devices, Inc. * * 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 <Tensile/Comparison.hpp> #include <Tensile/ContractionProblem.hpp> #include <Tensile/TensorDescriptor_Detail.hpp> namespace Tensile { template <> struct Comparison<ContractionProblem::FreeIndex> { enum { implemented = true }; static int compare(ContractionProblem::FreeIndex const& lhs, ContractionProblem::FreeIndex const& rhs) { return LexicographicCompare(lhs.d, rhs.d, lhs.c, rhs.c, lhs.i, rhs.i, lhs.isA, rhs.isA); } }; template <> struct Comparison<ContractionProblem::BatchIndex> { enum { implemented = true }; static int compare(ContractionProblem::BatchIndex const& lhs, ContractionProblem::BatchIndex const& rhs) { return LexicographicCompare(lhs.d, rhs.d, lhs.c, rhs.c, lhs.a, rhs.a, lhs.b, rhs.b); } }; template <> struct Comparison<ContractionProblem::BoundIndex> { enum { implemented = true }; static int compare(ContractionProblem::BoundIndex const& lhs, ContractionProblem::BoundIndex const& rhs) { return LexicographicCompare(lhs.a, rhs.a, lhs.b, rhs.b); } }; template <> struct Comparison<ContractionProblem> { enum { implemented = true }; static int compare(ContractionProblem const& lhs, ContractionProblem const& rhs) { return LexicographicCompare( lhs.operationIdentifier(), rhs.operationIdentifier(), lhs.highPrecisionAccumulate(), rhs.highPrecisionAccumulate(), lhs.a(), rhs.a(), lhs.b(), rhs.b(), lhs.c(), rhs.c(), lhs.d(), rhs.d()); } }; } namespace std { template <> struct hash<Tensile::ContractionProblem> { inline size_t operator()(Tensile::ContractionProblem const& problem) { return Tensile::hash_combine( problem.operationIdentifier(), problem.a(), problem.b(), problem.c(), problem.d(), problem.highPrecisionAccumulate() ); } }; }
[ "FFFLJL@163.com" ]
FFFLJL@163.com
330af4bed6b4e4329a38688f7e1ff125ad596044
66b73baecd362382276abcb18f8b8beec8594c75
/PathFinding/PathFinding/GraphSearchAlgorithms.h
c686d8bd37ac54103460ab38b30694303a6df071
[]
no_license
mArribas/PathFinding
0a0a12ff26a2458986f02256f2a3139c5b61684d
333e3c4db78811d68f9c0951be6b6ae9564c7e17
refs/heads/master
2021-04-09T16:18:08.441926
2018-03-22T17:01:05
2018-03-22T17:01:05
125,852,971
0
0
null
null
null
null
UTF-8
C++
false
false
972
h
#pragma once #include "Types.h" class CGraph; namespace GraphSearchAlgorithms { // Applies Breadth First Search algorithm and returns a path to the goal. // If the goal cannot be reached, returns an empty path. Nodes BreadthFirstSearch ( CGraph* const graph, SNode* const start, SNode* const goal = nullptr); // Applies Depth First Search algorithm and returns a path to the goal. If // the goal cannot be reached, returns an empty path. Nodes DepthFirstSearch ( CGraph* const graph, SNode* const start, SNode* const goal = nullptr, const bool searchFromRight = false); // Applies Dijkstra algorithm and returns a path to the goal. If the goal // cannot be reached, returns an empty path. Nodes Dijkstra ( CGraph* const graph, SNode* const start, SNode* const goal = nullptr); Nodes GetPathToSource (SNode* start); }
[ "enterhak@gmail.com" ]
enterhak@gmail.com
c97d69fde34262cb332fe0dcbab10cf9aecfa25b
8a2b42bf4ac9333319dbb66390feb7a8469b4e3b
/Scripts/out/pybind11-module/bakkesmod/wrappers/GameObject/PerformanceStats/NetStatGraphWrapper.cpp
9b5881beaf72045768cfbb85968103f91387aa09
[ "MIT" ]
permissive
Stanbroek/BakkesModSDK-Python
c3cc9abbf9da8bf225180f054f1decc677bfecda
e9f977dbf1d39bbcb445731c2889749fe0c485c8
refs/heads/main
2023-05-13T04:37:30.654157
2021-06-10T18:36:35
2021-06-10T18:36:35
373,925,214
3
0
null
null
null
null
UTF-8
C++
false
false
4,282
cpp
void bind_NetStatGraphWrapper(pybind11::module& m) { pybind11::class_<NetStatGraphWrapper, std::shared_ptr<NetStatGraphWrapper>, StatGraphWrapper> cl_NetStatGraphWrapper(m, "NetStatGraphWrapper"); cl_NetStatGraphWrapper.def(pybind11::init<uintptr_t>(), pybind11::arg("mem")); cl_NetStatGraphWrapper.def(pybind11::init<NetStatGraphWrapper const &>(), pybind11::arg("other")); // cl_NetStatGraphWrapper.def(pybind11::del<>()); cl_NetStatGraphWrapper.def("GetPacketsOut", [](NetStatGraphWrapper& cls_) { return cls_.GetPacketsOut(); }); cl_NetStatGraphWrapper.def("SetPacketsOut", [](NetStatGraphWrapper& cls_, SampleHistoryWrapper newPacketsOut) { return cls_.SetPacketsOut(newPacketsOut); }, pybind11::arg("newPacketsOut")); cl_NetStatGraphWrapper.def("GetPacketsIn", [](NetStatGraphWrapper& cls_) { return cls_.GetPacketsIn(); }); cl_NetStatGraphWrapper.def("SetPacketsIn", [](NetStatGraphWrapper& cls_, SampleHistoryWrapper newPacketsIn) { return cls_.SetPacketsIn(newPacketsIn); }, pybind11::arg("newPacketsIn")); cl_NetStatGraphWrapper.def("GetLostPacketsOut", [](NetStatGraphWrapper& cls_) { return cls_.GetLostPacketsOut(); }); cl_NetStatGraphWrapper.def("SetLostPacketsOut", [](NetStatGraphWrapper& cls_, SampleHistoryWrapper newLostPacketsOut) { return cls_.SetLostPacketsOut(newLostPacketsOut); }, pybind11::arg("newLostPacketsOut")); cl_NetStatGraphWrapper.def("GetLostPacketsIn", [](NetStatGraphWrapper& cls_) { return cls_.GetLostPacketsIn(); }); cl_NetStatGraphWrapper.def("SetLostPacketsIn", [](NetStatGraphWrapper& cls_, SampleHistoryWrapper newLostPacketsIn) { return cls_.SetLostPacketsIn(newLostPacketsIn); }, pybind11::arg("newLostPacketsIn")); cl_NetStatGraphWrapper.def("GetBytesOut", [](NetStatGraphWrapper& cls_) { return cls_.GetBytesOut(); }); cl_NetStatGraphWrapper.def("SetBytesOut", [](NetStatGraphWrapper& cls_, SampleHistoryWrapper newBytesOut) { return cls_.SetBytesOut(newBytesOut); }, pybind11::arg("newBytesOut")); cl_NetStatGraphWrapper.def("GetBytesIn", [](NetStatGraphWrapper& cls_) { return cls_.GetBytesIn(); }); cl_NetStatGraphWrapper.def("SetBytesIn", [](NetStatGraphWrapper& cls_, SampleHistoryWrapper newBytesIn) { return cls_.SetBytesIn(newBytesIn); }, pybind11::arg("newBytesIn")); cl_NetStatGraphWrapper.def("GetLatency", [](NetStatGraphWrapper& cls_) { return cls_.GetLatency(); }); cl_NetStatGraphWrapper.def("SetLatency", [](NetStatGraphWrapper& cls_, SampleHistoryWrapper newLatency) { return cls_.SetLatency(newLatency); }, pybind11::arg("newLatency")); cl_NetStatGraphWrapper.def("GetExpectedOutPacketRate", [](NetStatGraphWrapper& cls_) { return cls_.GetExpectedOutPacketRate(); }); cl_NetStatGraphWrapper.def("SetExpectedOutPacketRate", [](NetStatGraphWrapper& cls_, float newExpectedOutPacketRate) { return cls_.SetExpectedOutPacketRate(newExpectedOutPacketRate); }, pybind11::arg("newExpectedOutPacketRate")); cl_NetStatGraphWrapper.def("GetExpectedInPacketRate", [](NetStatGraphWrapper& cls_) { return cls_.GetExpectedInPacketRate(); }); cl_NetStatGraphWrapper.def("SetExpectedInPacketRate", [](NetStatGraphWrapper& cls_, float newExpectedInPacketRate) { return cls_.SetExpectedInPacketRate(newExpectedInPacketRate); }, pybind11::arg("newExpectedInPacketRate")); cl_NetStatGraphWrapper.def("GetMaxBytesRate", [](NetStatGraphWrapper& cls_) { return cls_.GetMaxBytesRate(); }); cl_NetStatGraphWrapper.def("SetMaxBytesRate", [](NetStatGraphWrapper& cls_, float newMaxBytesRate) { return cls_.SetMaxBytesRate(newMaxBytesRate); }, pybind11::arg("newMaxBytesRate")); cl_NetStatGraphWrapper.def("eventUpdateGraphRanges", [](NetStatGraphWrapper& cls_) { return cls_.eventUpdateGraphRanges(); }); cl_NetStatGraphWrapper.def("CreateBytesSummary", [](NetStatGraphWrapper& cls_, std::string Title) { return cls_.CreateBytesSummary(Title); }, pybind11::arg("Title")); cl_NetStatGraphWrapper.def("CreateLossSummary", [](NetStatGraphWrapper& cls_, std::string Title) { return cls_.CreateLossSummary(Title); }, pybind11::arg("Title")); cl_NetStatGraphWrapper.def("CreatePktSummary", [](NetStatGraphWrapper& cls_, std::string Title) { return cls_.CreatePktSummary(Title); }, pybind11::arg("Title")); cl_NetStatGraphWrapper.def("eventConstruct", [](NetStatGraphWrapper& cls_) { return cls_.eventConstruct(); }); }
[ "32653890+Stanbroek@users.noreply.github.com" ]
32653890+Stanbroek@users.noreply.github.com
d745f559cca560505d2052d07a5629a2aa0f1f34
3b6185d3052764481e4b6dff75ab9a6ed34d1cef
/Solutions/sudoku-solver.cpp
8ed1e0ce3a2f8dde5dbe4ddece469eb75a4dc1cf
[]
no_license
niaokedaoren/LeetCode_Solution
a01a8a7ffcd80c165a705bb712a2c75509464ac0
91be5d8bfc98b0efa76d92c2cdf4edb6fd0d3a03
refs/heads/master
2016-08-07T20:41:29.852161
2013-10-16T11:07:40
2013-10-16T11:07:40
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,126
cpp
class Solution { public: void solveSudoku(vector<vector<char> > &board) { // Note: The Solution object is instantiated only once and is reused by each test case. DFS(board, 0); } private: bool DFS(vector<vector<char> > &board, int n) { if (n == size * size) return true; int x = n / size; int y = n % size; if (board[x][y] == '.') { for (int c=1; c<=9; c++) { if (!isConflict(board, x, y, '0'+c)) { board[x][y] = '0' + c; if (DFS(board, n+1)) return true; board[x][y] = '.'; } } } else return DFS(board, n+1); return false; } bool isConflict(const vector<vector<char> > &board, int x, int y, char val) { for (int i=0; i<size; i++) { if (board[i][y] == val) return true; } for (int j=0; j<size; j++) { if (board[x][j] == val) return true; } int blockX = x / 3; int blockY = y / 3; for (int i=blockX*3; i < (blockX+1)*3; i++) { for (int j=blockY*3; j < (blockY+1)*3; j++) { if (board[i][j] == val) return true; } } return false; } static const int size; }; const int Solution::size = 9;
[ "gorgeousabalone@gmail.com" ]
gorgeousabalone@gmail.com
33245e0399d2db66fe1bc3913846fa8bf54fbaa9
a2643558629eadb20a458269b225ba94230b365d
/LeetCode/main.cpp
36da028fc7964ad5341e2ac96c0ce65201495663
[]
no_license
MyfristUbantu/LeetCode
b920da4d4f1581f40540b1d282efb39a205a3bd8
9035cbd457324b22281a2a5f600c6161cd65d476
refs/heads/master
2021-08-19T07:40:27.530960
2017-11-25T07:22:53
2017-11-25T07:22:53
111,985,594
0
0
null
2017-11-25T07:34:52
2017-11-25T07:34:52
null
UTF-8
C++
false
false
423
cpp
#include <iostream> #include <vector> #include "4_MedianOfTwoSortedArrays.h" #include "test.h" int main(){ std::vector<int> v1{ 1, 2 }, v2{ 3, 4 }; auto mid = findMedianSortedArrays(v1, v2); if (mid != ERRORCODE) std::cout << "the median of the sorted array: " << mid << std::endl; else std::cout << "Error!!!" << std::endl; //std::cout << "test: " << test(2.0, 3.0) << std::endl; system("pause"); return 0; }
[ "devinchang@126.com" ]
devinchang@126.com
cbf86666c9f929387a180d6abe050f462af77a40
5de39f2aabbc2bd26ecc05850ed235955270c23e
/Ctwl_ChunkSvr_Analysis/xzmo_trunk/gamechunklog_s/GameDbPool.h
643e4583a2f99866bb246e5bfaaaf8f8fe2f1a9d
[]
no_license
WangcfGH/Git_Code
ecba205784826f49a6059ee7ee7cbf9996e3c7b7
db3ccddd039132669e4d9ac1c84ab156fee83eb2
refs/heads/master
2023-04-27T03:04:55.345257
2023-04-15T01:51:42
2023-04-15T01:51:42
224,375,664
1
0
null
null
null
null
UTF-8
C++
false
false
663
h
#pragma once #include "dbconnectpool/DBConnectPool.h" #include "dbconnectpool/TcyMySqlConnect.h" class GameDbPool; class DBConnectEntry : public PoolEntry, public MysqlSession { public: DBConnectEntry(GameDbPool* pool); virtual void enterThread() override; virtual void leaveThread() override; }; class GameDbPool : public DBConnectPool { public: GameDbPool(int nthread=8); ~GameDbPool(); virtual void start(int n /* = 8 */) override; protected: virtual std::shared_ptr<ThreadEntryBase> createThreadEntry() override; BOOL ReadGameChunkDBConfig(); void FillGameDBAccount(); private: std::string m_dbaFile; CHUNK_DB m_dbInfo; int m_dbIndex; };
[ "15988132243@163.com" ]
15988132243@163.com
46f4143544c544915d1c04d3dada45486cf13ee0
32f84ffec6a2ef0e72f8178ced15f4de060f3d3a
/MyAlgorithm/MyAlgorithm/BOJ/[9251]LCS.cpp
bc080fc47921c599b7413dd108cb0259087e3ded
[]
no_license
lyh4967/MyAlgorithm
185e4bca772974a8f238e8f09f0e4bd7bb175840
82c783b7a56ca4eef517b352f6fbad9dcfa46afb
refs/heads/master
2021-06-11T05:13:56.667656
2019-06-03T13:26:08
2019-06-03T13:26:08
128,493,317
0
0
null
null
null
null
UTF-8
C++
false
false
730
cpp
#include <iostream> #include <algorithm> #include <string> using namespace std; int main() { string s1, s2; cin >> s1 >> s2; int length1 = s1.size(); int length2 = s2.size(); int** dp = new int*[length1 + 1]; for (int i = 0; i <= length1; i++) { dp[i] = new int[length2 + 1]; fill(dp[i], dp[i] + length2 + 1, 0); } for (int i = 1; i <= length1; i++) { for (int j = 1; j <= length2; j++) { if (s1[i - 1] == s2[j - 1]) dp[i][j] = dp[i - 1][j - 1] + 1; else { dp[i][j] = max(dp[i - 1][j], dp[i][j - 1]); } } }/* for (int i = 1; i <= length1; i++) { for (int j = 1; j <= length2; j++) { cout << dp[i][j] << ' '; } cout << endl; }*/ cout << dp[length1][length2] << endl; return 0; }
[ "2012103993" ]
2012103993
8e09c9c0038ae26a4338418e92844160ea2b2926
b2e1ab1babfa9934570affd4630d06dfedc22639
/C. Vanya and Exams.cpp
d03e951278245b850fcfb68a15ddd87066334e2a
[]
no_license
sunshine2050/CodeForces-Div2-C
0c1a0055fa872dc90873b7bd38a3abf27444110c
4a30786ec596edddc52d67a9f561b306ca6c0987
refs/heads/master
2020-06-10T22:34:00.047912
2017-01-11T17:40:23
2017-01-11T17:40:23
75,856,381
0
0
null
null
null
null
UTF-8
C++
false
false
755
cpp
#include <iostream> #include <vector> #include <algorithm> #include <utility> using namespace std; typedef pair<int,int> ii; bool cmp(ii i,ii j){ if(i.second==j.second) return i.first<j.first; return i.second<j.second; } int main(){ long long n,r,minavg; cin>>n>>r>>minavg; vector <ii> a; int grade=0; for(int i=0;i<n;i++){ int x,y; cin>>x>>y; grade+=x; a.push_back(make_pair(x,y)); } sort(a.begin(),a.end(),cmp); long long nEssays=0; long long nPoints=(grade<minavg*r?minavg*r-grade:0); for(int i=0;i<n;i++){ if(!nPoints) break; nEssays+=min(nPoints,(r-a[i].first))*a[i].second; nPoints-=min(nPoints,(r-a[i].first)); } cout<<nEssays<<endl; }
[ "sunshin_samy@hotmail.com" ]
sunshin_samy@hotmail.com
bfdaba73ecb664109a810cd986feadedefa3d5a9
e9ade5ea33cf3382f8ab3ad980e7f6d8cb76faf8
/solved/RobertCppPrograming/string2.cpp
500622ec5e09c32b1befc7e422920f50b8b9c97a
[]
no_license
Creamy1137689/kyopro
75bc3f92edb7bff2cbf27dc79d384b422a0a4702
dcacbf27defe840ea7998e06a5f3fb78718e7d53
refs/heads/master
2023-05-10T19:28:56.447493
2021-06-03T12:54:11
2021-06-03T12:54:11
266,143,691
0
0
null
null
null
null
UTF-8
C++
false
false
291
cpp
#include <iostream> #include <cstdio> using namespace std; int f(int x, int y){ return 2*x + y; } void show(int x, int y){ char str[50]; sprintf(str, "f(%d, %d) = %d", x, y ,f(x,y)); cout << str << endl; } int main(){ show(1,2); show(182,144); }
[ "exception031noexist@gmail.com" ]
exception031noexist@gmail.com
ad8938ef0670c17bb0a13c1ae126b93bf927c819
88ae8695987ada722184307301e221e1ba3cc2fa
/third_party/webrtc/modules/rtp_rtcp/source/rtp_video_header.h
d185c20c83802418dce19f69e64193435137f7b1
[ "Apache-2.0", "LGPL-2.0-or-later", "MIT", "GPL-1.0-or-later", "BSD-3-Clause", "LicenseRef-scancode-google-patent-license-webrtc", "LicenseRef-scancode-google-patent-license-webm", "LicenseRef-scancode-unknown-license-reference" ]
permissive
iridium-browser/iridium-browser
71d9c5ff76e014e6900b825f67389ab0ccd01329
5ee297f53dc7f8e70183031cff62f37b0f19d25f
refs/heads/master
2023-08-03T16:44:16.844552
2023-07-20T15:17:00
2023-07-23T16:09:30
220,016,632
341
40
BSD-3-Clause
2021-08-13T13:54:45
2019-11-06T14:32:31
null
UTF-8
C++
false
false
3,849
h
/* * Copyright (c) 2018 The WebRTC 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 in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ #ifndef MODULES_RTP_RTCP_SOURCE_RTP_VIDEO_HEADER_H_ #define MODULES_RTP_RTCP_SOURCE_RTP_VIDEO_HEADER_H_ #include <bitset> #include <cstdint> #include "absl/container/inlined_vector.h" #include "absl/types/optional.h" #include "absl/types/variant.h" #include "api/rtp_headers.h" #include "api/transport/rtp/dependency_descriptor.h" #include "api/video/color_space.h" #include "api/video/video_codec_type.h" #include "api/video/video_content_type.h" #include "api/video/video_frame_metadata.h" #include "api/video/video_frame_type.h" #include "api/video/video_rotation.h" #include "api/video/video_timing.h" #include "modules/video_coding/codecs/h264/include/h264_globals.h" #include "modules/video_coding/codecs/vp8/include/vp8_globals.h" #include "modules/video_coding/codecs/vp9/include/vp9_globals.h" namespace webrtc { // Details passed in the rtp payload for legacy generic rtp packetizer. // TODO(bugs.webrtc.org/9772): Deprecate in favor of passing generic video // details in an rtp header extension. struct RTPVideoHeaderLegacyGeneric { uint16_t picture_id; }; using RTPVideoTypeHeader = absl::variant<absl::monostate, RTPVideoHeaderVP8, RTPVideoHeaderVP9, RTPVideoHeaderH264, RTPVideoHeaderLegacyGeneric>; struct RTPVideoHeader { struct GenericDescriptorInfo { GenericDescriptorInfo(); GenericDescriptorInfo(const GenericDescriptorInfo& other); ~GenericDescriptorInfo(); int64_t frame_id = 0; int spatial_index = 0; int temporal_index = 0; absl::InlinedVector<DecodeTargetIndication, 10> decode_target_indications; absl::InlinedVector<int64_t, 5> dependencies; absl::InlinedVector<int, 4> chain_diffs; std::bitset<32> active_decode_targets = ~uint32_t{0}; }; static RTPVideoHeader FromMetadata(const VideoFrameMetadata& metadata); RTPVideoHeader(); RTPVideoHeader(const RTPVideoHeader& other); ~RTPVideoHeader(); // The subset of RTPVideoHeader that is exposed in the Insertable Streams API. VideoFrameMetadata GetAsMetadata() const; void SetFromMetadata(const VideoFrameMetadata& metadata); absl::optional<GenericDescriptorInfo> generic; VideoFrameType frame_type = VideoFrameType::kEmptyFrame; uint16_t width = 0; uint16_t height = 0; VideoRotation rotation = VideoRotation::kVideoRotation_0; VideoContentType content_type = VideoContentType::UNSPECIFIED; bool is_first_packet_in_frame = false; bool is_last_packet_in_frame = false; bool is_last_frame_in_picture = true; uint8_t simulcastIdx = 0; VideoCodecType codec = VideoCodecType::kVideoCodecGeneric; VideoPlayoutDelay playout_delay; VideoSendTiming video_timing; absl::optional<ColorSpace> color_space; // This field is meant for media quality testing purpose only. When enabled it // carries the webrtc::VideoFrame id field from the sender to the receiver. absl::optional<uint16_t> video_frame_tracking_id; RTPVideoTypeHeader video_type_header; // When provided, is sent as is as an RTP header extension according to // http://www.webrtc.org/experiments/rtp-hdrext/abs-capture-time. // Otherwise, it is derived from other relevant information. absl::optional<AbsoluteCaptureTime> absolute_capture_time; }; } // namespace webrtc #endif // MODULES_RTP_RTCP_SOURCE_RTP_VIDEO_HEADER_H_
[ "jengelh@inai.de" ]
jengelh@inai.de
13c43ed62eef8e759e1a5d766666aa7039ef5259
8ae7a23f05805fd71d4be13686cf35d8994762ed
/mame150/src/mess/machine/petuser.h
6701595a4b4afe6ee769e6387359e6230ec4cf3e
[]
no_license
cyberkni/276in1JAMMA
fb06ccc6656fb4346808a24beed8977996da91b2
d1a68172d4f3490cf7f6e7db25d5dfd4cde3bb22
refs/heads/master
2021-01-18T09:38:36.974037
2013-10-07T18:30:02
2013-10-07T18:30:02
13,152,960
1
0
null
null
null
null
UTF-8
C++
false
false
4,013
h
/********************************************************************** Commodore PET User Port emulation Copyright MESS Team. Visit http://mamedev.org for licensing and usage restrictions. ********************************************************************** GND 1 A GND VIDEO 2 B CA1 _SRQ IN 3 C PA0 EOI 4 D PA1 DIAG 5 E PA2 #2 CASS READ 6 F PA3 CASS WRITE 7 H PA4 #1 CASS READ 8 J PA5 VERT DRIVE 9 K PA6 HORZ DRIVE 10 L PA7 GND 11 M CB2 GND 12 N GND **********************************************************************/ #pragma once #ifndef __PET_USER_PORT__ #define __PET_USER_PORT__ #include "emu.h" //************************************************************************** // CONSTANTS //************************************************************************** #define PET_USER_PORT_TAG "user" //************************************************************************** // INTERFACE CONFIGURATION MACROS //************************************************************************** #define PET_USER_PORT_INTERFACE(_name) \ const pet_user_port_interface (_name) = #define MCFG_PET_USER_PORT_ADD(_tag, _config, _slot_intf, _def_slot) \ MCFG_DEVICE_ADD(_tag, PET_USER_PORT, 0) \ MCFG_DEVICE_CONFIG(_config) \ MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false) //************************************************************************** // TYPE DEFINITIONS //************************************************************************** // ======================> pet_user_port_interface struct pet_user_port_interface { devcb_write_line m_out_ca1_cb; devcb_write_line m_out_cb2_cb; }; // ======================> pet_user_port_device class device_pet_user_port_interface; class pet_user_port_device : public device_t, public pet_user_port_interface, public device_slot_interface { public: // construction/destruction pet_user_port_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // computer interface DECLARE_READ8_MEMBER( pa_r ); DECLARE_WRITE8_MEMBER( pa_w ); DECLARE_READ_LINE_MEMBER( ca1_r ); DECLARE_WRITE_LINE_MEMBER( ca1_w ); DECLARE_READ_LINE_MEMBER( cb2_r ); DECLARE_WRITE_LINE_MEMBER( cb2_w ); // cartridge interface DECLARE_WRITE_LINE_MEMBER( via_ca1_w ) { m_out_ca1_func(state); } DECLARE_WRITE_LINE_MEMBER( via_cb2_w ) { m_out_cb2_func(state); } protected: // device-level overrides virtual void device_config_complete(); virtual void device_start(); virtual void device_reset(); devcb_resolved_write_line m_out_ca1_func; devcb_resolved_write_line m_out_cb2_func; device_pet_user_port_interface *m_card; }; // ======================> device_pet_user_port_interface // class representing interface-specific live pet_expansion card class device_pet_user_port_interface : public device_slot_card_interface { public: // construction/destruction device_pet_user_port_interface(const machine_config &mconfig, device_t &device); virtual ~device_pet_user_port_interface(); virtual UINT8 pet_pa_r(address_space &space, offs_t offset) { return 0xff; }; virtual void pet_pa_w(address_space &space, offs_t offset, UINT8 data) { }; virtual int pet_ca1_r() { return 1; }; virtual void pet_ca1_w(int state) { }; virtual int pet_cb2_r() { return 1; }; virtual void pet_cb2_w(int state) { }; protected: pet_user_port_device *m_slot; }; // device type definition extern const device_type PET_USER_PORT; #endif
[ "dan@van.derveer.com" ]
dan@van.derveer.com
b194ac2a0e926c2d22d96371cd64a7e1f02c35ef
c53aa6accf1255d821d4225b40aec07f3a141c29
/Parser/PRC.CPP
3b6a238a0997e329d99d930d16d5a6d1826b025c
[]
no_license
dprotopopov/DES
ae6fc16cd26ae767dc73a9ce5ff0ab26aecedb71
cb731635e8ff6f69490ea31a9ecae4b2c53cec2c
refs/heads/master
2016-09-14T02:11:54.418760
2016-05-19T15:30:18
2016-05-19T15:30:18
59,219,204
0
0
null
null
null
null
UTF-8
C++
false
false
403
cpp
////////////////////////////////// // System level dependencies #include <windows.h> ////////////////////////////////// // ANSI level dependencies #include <stdio.h> #include <time.h> ////////////////////////////////// // Application level dependencies #include "tdb.h" #include "tio.h" #include "tlog.h" #include "tmemory.h" #include "pobject.h" #include "prc.h" /////////////////////////////////
[ "protopopov@narod.ru" ]
protopopov@narod.ru
14f8071571be9875fe8a524000f95d6d951f259a
77da632163112ccab3acfe1ae0da5f820034ebd5
/playerlibrary/src/main/cpp/MediaPlayer/source/device/android/GLESDevice.h
4caef8d01a1ed315407894787fe1c630ed7e6cb6
[]
no_license
zhumingwei/DafuPlayer
d9b1e3f2e104f2e8a664823f4b756db583c02a96
ca506b6bf9c7f5eb2200a21f9aa728e69f07d3d3
refs/heads/master
2022-11-17T17:07:01.799959
2020-07-16T03:29:40
2020-07-16T03:29:40
272,461,479
0
0
null
null
null
null
UTF-8
C++
false
false
2,280
h
// // Created by zhumingwei on 2020/7/7. // #ifndef DAFUPLAYER_GLESDEVICE_H #define DAFUPLAYER_GLESDEVICE_H #include <player/PlayerState.h> #include <device/VideoDevice.h> #include <android/native_window.h> #include <node/NodeType.h> #include <Mutex.h> #include <Condition.h> #include <EGL/egl.h> #include <common/EglHelper.h> #include <node/InputRenderNode.h> #include <node/RenderNodeList.h> class GLESDevice : public VideoDevice{ public: GLESDevice(); virtual ~GLESDevice(); void surfaceCreated(ANativeWindow *window); void terminate() override ; void terminate(bool releaseContext); void setTimeStamp(double timeStamp) override; void onInitTexture( int width,int height,TextureFormat format, BlendMode blendMode, int rotate ) override ; int onUpdateYUV(uint8_t *yData, int yPitch, uint8_t *uData, int uPitch, uint8_t *vData, int vPitch) override; int onUpdateARGB(uint8_t *rgba, int pitch) override; int onRequestRender(bool flip) override; void changeFilter(RenderNodeType type, const char *filterName); void changeFilter(RenderNodeType type, const int id); private: void resetVertices(); void resetTexVertices(); private: Mutex mMutex; Condition mCondition; ANativeWindow *mWindow; //Surface窗口 int mSurfaceWidth; //窗口宽度 int mSurfaceHeight; //窗口高度 EGLSurface eglSurface; //eglSurface EglHelper *eglHelper; //EGL帮助器 bool mSurfaceReset; //重新设置Surface bool mHasSurface; //是否存在Surface bool mHaveEGLSurface; //EGLSurface bool mHaveEGLContext; //释放资源 Texture *mVideoTexture; //视频纹理 InputRenderNode *mRenderNode; //输入渲染结点 RenderNodeList *nodeList; //滤镜链 FilterInfo filterInfo; //滤镜信息 bool filterChange; //切换滤镜 GLfloat vertices[8]; //顶点坐标 GLfloat textureVertices[8]; //纹理坐标 }; #endif //DAFUPLAYER_GLESDEVICE_H
[ "zhumingwei2016@gmail.com" ]
zhumingwei2016@gmail.com
8836b1fd2b8ddbfa2f48a2f25f615f7c94769146
9c7c58220a546d583e22f8737a59e7cc8bb206e6
/Test/TestMyDelegatePortSimple/Src/MySimpleDelegate/MySimpleStaticFunPtrType.h
de6c818a85cc928f6efa2f78f5204813ed1ceb27
[]
no_license
SiCoYu/UE
7176f9ece890e226f21cf972e5da4c3c4c4bfe41
31722c056d40ad362e5c4a0cba53b05f51a19324
refs/heads/master
2021-03-08T05:00:32.137142
2019-07-03T12:20:25
2019-07-03T12:20:25
null
0
0
null
null
null
null
UTF-8
C++
false
false
250
h
#pragma once namespace MyNS { template <typename FuncType> struct MySimpleStaticFunPtrType; template <typename RetType, typename... ArgTypes> struct MySimpleStaticFunPtrType<RetType(ArgTypes...)> { typedef RetType(* Type)(ArgTypes...); }; }
[ "kuangben2001@163.com" ]
kuangben2001@163.com
baa7072216f800d74861324746e8c099ed757ff4
be7ed980484aca16f96a69412dc2e94801c692f9
/singlenode.cpp
ea3095de43ac90d4af505aff9db10fbe1e924e58
[]
no_license
fazlayrabbi/SpeciesScore
b07bd5e71df05be21140b5c11a4cde17aefac63c
a8f62a5188707a98af05ce00be5cfa1300e3d7e5
refs/heads/master
2020-04-10T21:03:17.356373
2015-02-03T21:18:08
2015-02-03T21:18:08
30,265,131
0
0
null
null
null
null
UTF-8
C++
false
false
1,218
cpp
/******************************************************************************* Title: singlenode.cpp Author: Fazlay Rabbi Created on: 12/14/2014 Description: Implementation file of singlenode.h for a program which outputs names of species based on their score. Purpose of this program is to demonstrate usage of tree. Usage: ./a.out input_file Build with: g++ -std=c++0x hwk4_frabbi.cpp Dependencies: One input file that should be in the same directory. Modifications: Comments were added on 12/14/2014 *******************************************************************************/ #include <string> #include <iostream> #include <cstdlib> #include "singlenode.h" using namespace std; void single_node::setScore(double s){ score= s; } void single_node::setName(string n){ name = n; } single_node::single_node(double g){ score = g; left = NULL; right = NULL; } double single_node::getScore(){ return score; } string single_node::getName(){ return name; } single_node* single_node::getLeft(){ return left; } single_node* single_node::getRight(){ return right; } void single_node::setLeft(single_node* node){ left= node; } void single_node::setRight(single_node* node){ right= node; }
[ "fazlay.rabbi35@myhunter.cuny.edu" ]
fazlay.rabbi35@myhunter.cuny.edu
46b5967b791240a96c726c30113ce80442738782
56006c14ce5e67cd90b1352af771e76daf0f3f6e
/DirectionalLighting/Example/IndexedPrimitive.cpp
f20580f6f545a2b419633469d397810107638550
[]
no_license
humbertosanchas/DirectXProg
dd014d5d6c90480378af93af1f34c69a3075f4b5
5da2b772bbd2660c6070258341f7e09ac6f618a0
refs/heads/master
2020-09-19T13:38:04.442993
2016-12-06T16:20:41
2016-12-06T16:20:41
67,732,811
0
0
null
null
null
null
UTF-8
C++
false
false
6,511
cpp
// // BGTD 9201 // Class that represents a simple IndexedPrimitive // #include "IndexedPrimitive.h" #include <DirectXColors.h> #include <VertexTypes.h> #include <vector> static bool faceNormals = true; // Temporary collection types used when generating the geometry. typedef std::vector<VertexPositionNormalColor> VertexCollection; typedef std::vector<uint16_t> IndexCollection; // create a 20-sided sphere like object static void CreateIcosahedron(VertexCollection& vertices, IndexCollection& indices, float size) { static const float t = 1.618033988749894848205f; // (1 + sqrt(5)) / 2 static const float t2 = 1.519544995837552493271f; // sqrt( 1 + sqr( (1 + sqrt(5)) / 2 ) ) static const XMVECTORF32 verts[12] = { { t / t2, 1.f / t2, 0 }, { -t / t2, 1.f / t2, 0 }, { t / t2, -1.f / t2, 0 }, { -t / t2, -1.f / t2, 0 }, { 1.f / t2, 0, t / t2 }, { 1.f / t2, 0, -t / t2 }, { -1.f / t2, 0, t / t2 }, { -1.f / t2, 0, -t / t2 }, { 0, t / t2, 1.f / t2 }, { 0, -t / t2, 1.f / t2 }, { 0, t / t2, -1.f / t2 }, { 0, -t / t2, -1.f / t2 } }; static const uint32_t faces[20 * 3] = { 0, 8, 4, 0, 5, 10, 2, 4, 9, 2, 11, 5, 1, 6, 8, 1, 10, 7, 3, 9, 6, 3, 7, 11, 0, 10, 8, 1, 8, 10, 2, 9, 11, 3, 11, 9, 4, 2, 0, 5, 0, 2, 6, 1, 3, 7, 3, 1, 8, 6, 4, 9, 4, 6, 10, 5, 7, 11, 7, 5 }; for (size_t j = 0; j < _countof(faces); j += 3) { uint32_t v0 = faces[j]; uint32_t v1 = faces[j + 1]; uint32_t v2 = faces[j + 2]; XMVECTOR normal; if (faceNormals) { normal = XMVector3Cross(verts[v1].v - verts[v0].v, verts[v2].v - verts[v0].v); normal = XMVector3Normalize(normal); } size_t base = vertices.size(); indices.push_back(base); indices.push_back(base + 1); indices.push_back(base + 2); // Duplicate vertices to use face normals XMVECTOR position = XMVectorScale(verts[v0], size); if (!faceNormals) normal = XMVector3Normalize(position); vertices.push_back(VertexPositionNormalColor(position, normal, DirectX::Colors::White)); position = XMVectorScale(verts[v1], size); if (!faceNormals) normal = XMVector3Normalize(position); vertices.push_back(VertexPositionNormalColor(position, normal, DirectX::Colors::White)); position = XMVectorScale(verts[v2], size); if (!faceNormals) normal = XMVector3Normalize(position); vertices.push_back(VertexPositionNormalColor(position, normal, DirectX::Colors::White)); } assert(vertices.size() == 20 * 3); assert(indices.size() == 20 * 3); } // ------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------ IndexedPrimitive::IndexedPrimitive() { pVertexBuffer = nullptr; pInputLayout = nullptr; pIndexBuffer = nullptr; numVerts = 0; numIndices = 0; } // ------------------------------------------------------------------------------------ // // ------------------------------------------------------------------------------------ IndexedPrimitive::~IndexedPrimitive() { // Make sure we clean up what ever we allocated! if (pVertexBuffer != nullptr) { pVertexBuffer->Release(); pVertexBuffer = nullptr; } if (pIndexBuffer != nullptr) { pIndexBuffer->Release(); pIndexBuffer = nullptr; } if (pInputLayout != nullptr) { pInputLayout->Release(); pInputLayout = nullptr; } } // ------------------------------------------------------------------------------------ // Initialize the vertex buffer // ------------------------------------------------------------------------------------ void IndexedPrimitive::InitializeGeometry(ID3D11Device* pDevice) { // build the icosahedron VertexCollection vertices; IndexCollection indices; CreateIcosahedron(vertices, indices, 1.0f); // numVerts = vertices.size(); numIndices = indices.size(); // describe the vertex buffer we are trying to create D3D11_BUFFER_DESC desc; desc.ByteWidth = numVerts * sizeof(VertexPositionNormalColor); desc.Usage = D3D11_USAGE_IMMUTABLE; desc.BindFlags = D3D11_BIND_VERTEX_BUFFER; desc.CPUAccessFlags = 0; desc.MiscFlags = 0; // setup the subresource data - tells D3D what data to use to initialize // the vertexbuffer with D3D11_SUBRESOURCE_DATA data; data.pSysMem = vertices.data(); // create the vertex buffer HRESULT hr = pDevice->CreateBuffer(&desc, &data, &pVertexBuffer); if (FAILED(hr)) { OutputDebugString(L"FAILED TO CREATE VERTEX BUFFER"); assert(false); } // set up the index buffer D3D11_BUFFER_DESC indexBufferDesc; indexBufferDesc.Usage = D3D11_USAGE_IMMUTABLE; indexBufferDesc.ByteWidth = numIndices * sizeof(uint16_t); indexBufferDesc.BindFlags = D3D11_BIND_INDEX_BUFFER; indexBufferDesc.CPUAccessFlags = 0; indexBufferDesc.MiscFlags = 0; indexBufferDesc.StructureByteStride = 0; D3D11_SUBRESOURCE_DATA indexData; indexData.pSysMem = indices.data(); hr = pDevice->CreateBuffer(&indexBufferDesc, &indexData, &pIndexBuffer); if (FAILED(hr)) { OutputDebugString(L"FAILED TO CREATE INDEX BUFFER"); assert(false); } } // ------------------------------------------------------------------------------------ // Initialzes the shaders // ------------------------------------------------------------------------------------ void IndexedPrimitive::InitializeInputLayout(ID3D11Device* pDevice, const void* pBinary, size_t binarySize) { // create the input layout HRESULT hr = pDevice->CreateInputLayout(VertexPositionNormalColor::InputElements, VertexPositionNormalColor::InputElementCount, pBinary, binarySize, &pInputLayout); if (FAILED(hr)) { OutputDebugString(L"Failed to create input layout"); assert(0); } } // ------------------------------------------------------------------------------------ // Draw the IndexedPrimitive // ------------------------------------------------------------------------------------ void IndexedPrimitive::Draw(ID3D11DeviceContext* pDeviceContext) { // Set up our input layout pDeviceContext->IASetInputLayout(pInputLayout); // tell D3D we are drawing a triangle list pDeviceContext->IASetPrimitiveTopology(D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST); // Tell the device which vertex buffer we are using UINT stride = sizeof(VertexPositionNormalColor); UINT offset = 0; pDeviceContext->IASetVertexBuffers(0, 1, &pVertexBuffer, &stride, &offset); // Set the index buffer pDeviceContext->IASetIndexBuffer(pIndexBuffer, DXGI_FORMAT_R16_UINT, 0); // tell it to draw the primitive pDeviceContext->DrawIndexed(numIndices, 0, 0); }
[ "pboyko1@S30816H0682" ]
pboyko1@S30816H0682
e0876a579ecd4b1d4e7c6f49bab8a089153770fb
a32cd2dfe184a166a0c738c982d15e1b09634be3
/src/bitcoinrpc.cpp
1386f2b76c302ec30cd0e86bd2b083915006fb0e
[ "MIT", "LicenseRef-scancode-other-permissive" ]
permissive
bicypto/CRUR-Simplified-UI
7db867a0fca496e31225dbc9623f6ec53f0dd2bc
60f58c82dc112ee351a39097f211628e2861d3f3
refs/heads/master
2020-06-29T12:29:56.507963
2019-09-24T14:44:17
2019-09-24T14:44:17
200,536,353
0
0
null
2019-09-03T16:54:21
2019-08-04T20:04:27
C++
UTF-8
C++
false
false
48,022
cpp
// Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "init.h" #include "util.h" #include "sync.h" #include "ui_interface.h" #include "base58.h" #include "bitcoinrpc.h" #include "db.h" #undef printf #include <boost/asio.hpp> #include <boost/asio/ip/v6_only.hpp> #include <boost/bind.hpp> #include <boost/filesystem.hpp> #include <boost/foreach.hpp> #include <boost/iostreams/concepts.hpp> #include <boost/iostreams/stream.hpp> #include <boost/algorithm/string.hpp> #include <boost/asio/ssl.hpp> #include <boost/filesystem/fstream.hpp> #include <boost/shared_ptr.hpp> #include <list> #define printf OutputDebugStringF using namespace std; using namespace boost; using namespace boost::asio; using namespace json_spirit; void ThreadRPCServer2(void* parg); static std::string strRPCUserColonPass; const Object emptyobj; void ThreadRPCServer3(void* parg); static inline unsigned short GetDefaultRPCPort() { return GetBoolArg("-testnet", false) ? 25715 : 45001; } Object JSONRPCError(int code, const string& message) { Object error; error.push_back(Pair("code", code)); error.push_back(Pair("message", message)); return error; } void RPCTypeCheck(const Array& params, const list<Value_type>& typesExpected, bool fAllowNull) { unsigned int i = 0; BOOST_FOREACH(Value_type t, typesExpected) { if (params.size() <= i) break; const Value& v = params[i]; if (!((v.type() == t) || (fAllowNull && (v.type() == null_type)))) { string err = strprintf("Expected type %s, got %s", Value_type_name[t], Value_type_name[v.type()]); throw JSONRPCError(RPC_TYPE_ERROR, err); } i++; } } void RPCTypeCheck(const Object& o, const map<string, Value_type>& typesExpected, bool fAllowNull) { BOOST_FOREACH(const PAIRTYPE(string, Value_type)& t, typesExpected) { const Value& v = find_value(o, t.first); if (!fAllowNull && v.type() == null_type) throw JSONRPCError(RPC_TYPE_ERROR, strprintf("Missing %s", t.first.c_str())); if (!((v.type() == t.second) || (fAllowNull && (v.type() == null_type)))) { string err = strprintf("Expected type %s for %s, got %s", Value_type_name[t.second], t.first.c_str(), Value_type_name[v.type()]); throw JSONRPCError(RPC_TYPE_ERROR, err); } } } int64_t AmountFromValue(const Value& value) { double dAmount = value.get_real(); if (dAmount <= 0.0 || dAmount > MAX_MONEY) throw JSONRPCError(RPC_TYPE_ERROR, "Invalid amount"); int64_t nAmount = roundint64(dAmount * COIN); if (!MoneyRange(nAmount)) throw JSONRPCError(RPC_TYPE_ERROR, "Invalid amount"); return nAmount; } Value ValueFromAmount(int64_t amount) { return (double)amount / (double)COIN; } std::string HexBits(unsigned int nBits) { union { int32_t nBits; char cBits[4]; } uBits; uBits.nBits = htonl((int32_t)nBits); return HexStr(BEGIN(uBits.cBits), END(uBits.cBits)); } // // Utilities: convert hex-encoded Values // (throws error if not hex). // uint256 ParseHashV(const Value& v, string strName) { string strHex; if (v.type() == str_type) strHex = v.get_str(); if (!IsHex(strHex)) // Note: IsHex("") is false throw JSONRPCError(RPC_INVALID_PARAMETER, strName+" must be hexadecimal string (not '"+strHex+"')"); uint256 result; result.SetHex(strHex); return result; } uint256 ParseHashO(const Object& o, string strKey) { return ParseHashV(find_value(o, strKey), strKey); } vector<unsigned char> ParseHexV(const Value& v, string strName) { string strHex; if (v.type() == str_type) strHex = v.get_str(); if (!IsHex(strHex)) throw JSONRPCError(RPC_INVALID_PARAMETER, strName+" must be hexadecimal string (not '"+strHex+"')"); return ParseHex(strHex); } vector<unsigned char> ParseHexO(const Object& o, string strKey) { return ParseHexV(find_value(o, strKey), strKey); } /// /// Note: This interface may still be subject to change. /// string CRPCTable::help(string strCommand) const { string strRet; set<rpcfn_type> setDone; for (map<string, const CRPCCommand*>::const_iterator mi = mapCommands.begin(); mi != mapCommands.end(); ++mi) { const CRPCCommand *pcmd = mi->second; string strMethod = mi->first; // We already filter duplicates, but these deprecated screw up the sort order if (strMethod.find("label") != string::npos) continue; if (strCommand != "" && strMethod != strCommand) continue; try { Array params; rpcfn_type pfn = pcmd->actor; if (setDone.insert(pfn).second) (*pfn)(params, true); } catch (std::exception& e) { // Help text is returned in an exception string strHelp = string(e.what()); if (strCommand == "") if (strHelp.find('\n') != string::npos) strHelp = strHelp.substr(0, strHelp.find('\n')); strRet += strHelp + "\n"; } } if (strRet == "") strRet = strprintf("help: unknown command: %s\n", strCommand.c_str()); strRet = strRet.substr(0,strRet.size()-1); return strRet; } Value help(const Array& params, bool fHelp) { if (fHelp || params.size() > 1) throw runtime_error( "help [command]\n" "List commands, or get help for a command."); string strCommand; if (params.size() > 0) strCommand = params[0].get_str(); return tableRPC.help(strCommand); } Value stop(const Array& params, bool fHelp) { if (fHelp || params.size() > 1) throw runtime_error( "stop <detach>\n" "<detach> is true or false to detach the database or not for this stop only\n" "Stop CRUR server (and possibly override the detachdb config value)."); // Shutdown will take long enough that the response should get back if (params.size() > 0) bitdb.SetDetach(params[0].get_bool()); StartShutdown(); return "CRUR server stopping"; } // // Call Table // static const CRPCCommand vRPCCommands[] = { // name function safemd unlocked // ------------------------ ----------------------- ------ -------- { "help", &help, true, true }, { "stop", &stop, true, true }, { "getbestblockhash", &getbestblockhash, true, false }, { "getblockcount", &getblockcount, true, false }, { "getconnectioncount", &getconnectioncount, true, false }, { "getpeerinfo", &getpeerinfo, true, false }, { "getdifficulty", &getdifficulty, true, false }, { "getinfo", &getinfo, true, false }, { "getsubsidy", &getsubsidy, true, false }, { "getmininginfo", &getmininginfo, true, false }, { "getstakinginfo", &getstakinginfo, true, false }, { "getnewaddress", &getnewaddress, true, false }, { "getnewpubkey", &getnewpubkey, true, false }, { "getaccountaddress", &getaccountaddress, true, false }, { "setaccount", &setaccount, true, false }, { "getaccount", &getaccount, false, false }, { "getaddressesbyaccount", &getaddressesbyaccount, true, false }, { "sendtoaddress", &sendtoaddress, false, false }, { "getreceivedbyaddress", &getreceivedbyaddress, false, false }, { "getreceivedbyaccount", &getreceivedbyaccount, false, false }, { "listreceivedbyaddress", &listreceivedbyaddress, false, false }, { "listreceivedbyaccount", &listreceivedbyaccount, false, false }, { "backupwallet", &backupwallet, true, false }, { "keypoolrefill", &keypoolrefill, true, false }, { "walletpassphrase", &walletpassphrase, true, false }, { "walletpassphrasechange", &walletpassphrasechange, false, false }, { "walletlock", &walletlock, true, false }, { "encryptwallet", &encryptwallet, false, false }, { "validateaddress", &validateaddress, true, false }, { "validatepubkey", &validatepubkey, true, false }, { "getbalance", &getbalance, false, false }, { "move", &movecmd, false, false }, { "sendfrom", &sendfrom, false, false }, { "sendmany", &sendmany, false, false }, { "addmultisigaddress", &addmultisigaddress, false, false }, { "addredeemscript", &addredeemscript, false, false }, { "getrawmempool", &getrawmempool, true, false }, { "getblock", &getblock, false, false }, { "getblockbynumber", &getblockbynumber, false, false }, { "getblockhash", &getblockhash, false, false }, { "gettransaction", &gettransaction, false, false }, { "listtransactions", &listtransactions, false, false }, { "listaddressgroupings", &listaddressgroupings, false, false }, { "signmessage", &signmessage, false, false }, { "verifymessage", &verifymessage, false, false }, { "getwork", &getwork, true, false }, { "getworkex", &getworkex, true, false }, { "listaccounts", &listaccounts, false, false }, { "settxfee", &settxfee, false, false }, { "getblocktemplate", &getblocktemplate, true, false }, { "submitblock", &submitblock, false, false }, { "listsinceblock", &listsinceblock, false, false }, { "dumpprivkey", &dumpprivkey, false, false }, { "dumpwallet", &dumpwallet, true, false }, { "importwallet", &importwallet, false, false }, { "importprivkey", &importprivkey, false, false }, { "listunspent", &listunspent, false, false }, { "getrawtransaction", &getrawtransaction, false, false }, { "createrawtransaction", &createrawtransaction, false, false }, { "decoderawtransaction", &decoderawtransaction, false, false }, { "decodescript", &decodescript, false, false }, { "signrawtransaction", &signrawtransaction, false, false }, { "sendrawtransaction", &sendrawtransaction, false, false }, { "getcheckpoint", &getcheckpoint, true, false }, { "reservebalance", &reservebalance, false, true}, { "checkwallet", &checkwallet, false, true}, { "repairwallet", &repairwallet, false, true}, { "resendtx", &resendtx, false, true}, { "makekeypair", &makekeypair, false, true}, { "sendalert", &sendalert, false, false}, }; CRPCTable::CRPCTable() { unsigned int vcidx; for (vcidx = 0; vcidx < (sizeof(vRPCCommands) / sizeof(vRPCCommands[0])); vcidx++) { const CRPCCommand *pcmd; pcmd = &vRPCCommands[vcidx]; mapCommands[pcmd->name] = pcmd; } } const CRPCCommand *CRPCTable::operator[](string name) const { map<string, const CRPCCommand*>::const_iterator it = mapCommands.find(name); if (it == mapCommands.end()) return NULL; return (*it).second; } // // HTTP protocol // // This ain't Apache. We're just using HTTP header for the length field // and to be compatible with other JSON-RPC implementations. // string HTTPPost(const string& strMsg, const map<string,string>& mapRequestHeaders) { ostringstream s; s << "POST / HTTP/1.1\r\n" << "User-Agent: CRUR-json-rpc/" << FormatFullVersion() << "\r\n" << "Host: 127.0.0.1\r\n" << "Content-Type: application/json\r\n" << "Content-Length: " << strMsg.size() << "\r\n" << "Connection: close\r\n" << "Accept: application/json\r\n"; BOOST_FOREACH(const PAIRTYPE(string, string)& item, mapRequestHeaders) s << item.first << ": " << item.second << "\r\n"; s << "\r\n" << strMsg; return s.str(); } string rfc1123Time() { char buffer[64]; time_t now; time(&now); struct tm* now_gmt = gmtime(&now); string locale(setlocale(LC_TIME, NULL)); setlocale(LC_TIME, "C"); // we want POSIX (aka "C") weekday/month strings strftime(buffer, sizeof(buffer), "%a, %d %b %Y %H:%M:%S +0000", now_gmt); setlocale(LC_TIME, locale.c_str()); return string(buffer); } static string HTTPReply(int nStatus, const string& strMsg, bool keepalive) { if (nStatus == HTTP_UNAUTHORIZED) return strprintf("HTTP/1.0 401 Authorization Required\r\n" "Date: %s\r\n" "Server: CRUR-json-rpc/%s\r\n" "WWW-Authenticate: Basic realm=\"jsonrpc\"\r\n" "Content-Type: text/html\r\n" "Content-Length: 296\r\n" "\r\n" "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\r\n" "\"http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd\">\r\n" "<HTML>\r\n" "<HEAD>\r\n" "<TITLE>Error</TITLE>\r\n" "<META HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=ISO-8859-1'>\r\n" "</HEAD>\r\n" "<BODY><H1>401 Unauthorized.</H1></BODY>\r\n" "</HTML>\r\n", rfc1123Time().c_str(), FormatFullVersion().c_str()); const char *cStatus; if (nStatus == HTTP_OK) cStatus = "OK"; else if (nStatus == HTTP_BAD_REQUEST) cStatus = "Bad Request"; else if (nStatus == HTTP_FORBIDDEN) cStatus = "Forbidden"; else if (nStatus == HTTP_NOT_FOUND) cStatus = "Not Found"; else if (nStatus == HTTP_INTERNAL_SERVER_ERROR) cStatus = "Internal Server Error"; else cStatus = ""; return strprintf( "HTTP/1.1 %d %s\r\n" "Date: %s\r\n" "Connection: %s\r\n" "Content-Length: %"PRIszu"\r\n" "Content-Type: application/json\r\n" "Server: CRUR-json-rpc/%s\r\n" "\r\n" "%s", nStatus, cStatus, rfc1123Time().c_str(), keepalive ? "keep-alive" : "close", strMsg.size(), FormatFullVersion().c_str(), strMsg.c_str()); } int ReadHTTPStatus(std::basic_istream<char>& stream, int &proto) { string str; getline(stream, str); vector<string> vWords; boost::split(vWords, str, boost::is_any_of(" ")); if (vWords.size() < 2) return HTTP_INTERNAL_SERVER_ERROR; proto = 0; const char *ver = strstr(str.c_str(), "HTTP/1."); if (ver != NULL) proto = atoi(ver+7); return atoi(vWords[1].c_str()); } int ReadHTTPHeader(std::basic_istream<char>& stream, map<string, string>& mapHeadersRet) { int nLen = 0; while (true) { string str; std::getline(stream, str); if (str.empty() || str == "\r") break; string::size_type nColon = str.find(":"); if (nColon != string::npos) { string strHeader = str.substr(0, nColon); boost::trim(strHeader); boost::to_lower(strHeader); string strValue = str.substr(nColon+1); boost::trim(strValue); mapHeadersRet[strHeader] = strValue; if (strHeader == "content-length") nLen = atoi(strValue.c_str()); } } return nLen; } int ReadHTTP(std::basic_istream<char>& stream, map<string, string>& mapHeadersRet, string& strMessageRet) { mapHeadersRet.clear(); strMessageRet = ""; // Read status int nProto = 0; int nStatus = ReadHTTPStatus(stream, nProto); // Read header int nLen = ReadHTTPHeader(stream, mapHeadersRet); if (nLen < 0 || nLen > (int)MAX_SIZE) return HTTP_INTERNAL_SERVER_ERROR; // Read message if (nLen > 0) { vector<char> vch(nLen); stream.read(&vch[0], nLen); strMessageRet = string(vch.begin(), vch.end()); } string sConHdr = mapHeadersRet["connection"]; if ((sConHdr != "close") && (sConHdr != "keep-alive")) { if (nProto >= 1) mapHeadersRet["connection"] = "keep-alive"; else mapHeadersRet["connection"] = "close"; } return nStatus; } bool HTTPAuthorized(map<string, string>& mapHeaders) { string strAuth = mapHeaders["authorization"]; if (strAuth.substr(0,6) != "Basic ") return false; string strUserPass64 = strAuth.substr(6); boost::trim(strUserPass64); string strUserPass = DecodeBase64(strUserPass64); return TimingResistantEqual(strUserPass, strRPCUserColonPass); } // // JSON-RPC protocol. Bitcoin speaks version 1.0 for maximum compatibility, // but uses JSON-RPC 1.1/2.0 standards for parts of the 1.0 standard that were // unspecified (HTTP errors and contents of 'error'). // // 1.0 spec: http://json-rpc.org/wiki/specification // 1.2 spec: http://groups.google.com/group/json-rpc/web/json-rpc-over-http // http://www.codeproject.com/KB/recipes/JSON_Spirit.aspx // string JSONRPCRequest(const string& strMethod, const Array& params, const Value& id) { Object request; request.push_back(Pair("method", strMethod)); request.push_back(Pair("params", params)); request.push_back(Pair("id", id)); return write_string(Value(request), false) + "\n"; } Object JSONRPCReplyObj(const Value& result, const Value& error, const Value& id) { Object reply; if (error.type() != null_type) reply.push_back(Pair("result", Value::null)); else reply.push_back(Pair("result", result)); reply.push_back(Pair("error", error)); reply.push_back(Pair("id", id)); return reply; } string JSONRPCReply(const Value& result, const Value& error, const Value& id) { Object reply = JSONRPCReplyObj(result, error, id); return write_string(Value(reply), false) + "\n"; } void ErrorReply(std::ostream& stream, const Object& objError, const Value& id) { // Send error reply from json-rpc error object int nStatus = HTTP_INTERNAL_SERVER_ERROR; int code = find_value(objError, "code").get_int(); if (code == RPC_INVALID_REQUEST) nStatus = HTTP_BAD_REQUEST; else if (code == RPC_METHOD_NOT_FOUND) nStatus = HTTP_NOT_FOUND; string strReply = JSONRPCReply(Value::null, objError, id); stream << HTTPReply(nStatus, strReply, false) << std::flush; } bool ClientAllowed(const boost::asio::ip::address& address) { // Make sure that IPv4-compatible and IPv4-mapped IPv6 addresses are treated as IPv4 addresses if (address.is_v6() && (address.to_v6().is_v4_compatible() || address.to_v6().is_v4_mapped())) return ClientAllowed(address.to_v6().to_v4()); if (address == asio::ip::address_v4::loopback() || address == asio::ip::address_v6::loopback() || (address.is_v4() // Check whether IPv4 addresses match 127.0.0.0/8 (loopback subnet) && (address.to_v4().to_ulong() & 0xff000000) == 0x7f000000)) return true; const string strAddress = address.to_string(); const vector<string>& vAllow = mapMultiArgs["-rpcallowip"]; BOOST_FOREACH(string strAllow, vAllow) if (WildcardMatch(strAddress, strAllow)) return true; return false; } // // IOStream device that speaks SSL but can also speak non-SSL // template <typename Protocol> class SSLIOStreamDevice : public iostreams::device<iostreams::bidirectional> { public: SSLIOStreamDevice(asio::ssl::stream<typename Protocol::socket> &streamIn, bool fUseSSLIn) : stream(streamIn) { fUseSSL = fUseSSLIn; fNeedHandshake = fUseSSLIn; } void handshake(ssl::stream_base::handshake_type role) { if (!fNeedHandshake) return; fNeedHandshake = false; stream.handshake(role); } std::streamsize read(char* s, std::streamsize n) { handshake(ssl::stream_base::server); // HTTPS servers read first if (fUseSSL) return stream.read_some(asio::buffer(s, n)); return stream.next_layer().read_some(asio::buffer(s, n)); } std::streamsize write(const char* s, std::streamsize n) { handshake(ssl::stream_base::client); // HTTPS clients write first if (fUseSSL) return asio::write(stream, asio::buffer(s, n)); return asio::write(stream.next_layer(), asio::buffer(s, n)); } bool connect(const std::string& server, const std::string& port) { ip::tcp::resolver resolver(stream.get_io_service()); ip::tcp::resolver::query query(server.c_str(), port.c_str()); ip::tcp::resolver::iterator endpoint_iterator = resolver.resolve(query); ip::tcp::resolver::iterator end; boost::system::error_code error = asio::error::host_not_found; while (error && endpoint_iterator != end) { stream.lowest_layer().close(); stream.lowest_layer().connect(*endpoint_iterator++, error); } if (error) return false; return true; } private: bool fNeedHandshake; bool fUseSSL; asio::ssl::stream<typename Protocol::socket>& stream; }; class AcceptedConnection { public: virtual ~AcceptedConnection() {} virtual std::iostream& stream() = 0; virtual std::string peer_address_to_string() const = 0; virtual void close() = 0; }; template <typename Protocol> class AcceptedConnectionImpl : public AcceptedConnection { public: AcceptedConnectionImpl( asio::io_service& io_service, ssl::context &context, bool fUseSSL) : sslStream(io_service, context), _d(sslStream, fUseSSL), _stream(_d) { } virtual std::iostream& stream() { return _stream; } virtual std::string peer_address_to_string() const { return peer.address().to_string(); } virtual void close() { _stream.close(); } typename Protocol::endpoint peer; asio::ssl::stream<typename Protocol::socket> sslStream; private: SSLIOStreamDevice<Protocol> _d; iostreams::stream< SSLIOStreamDevice<Protocol> > _stream; }; void ThreadRPCServer(void* parg) { // Make this thread recognisable as the RPC listener RenameThread("CRUR-rpclist"); try { vnThreadsRunning[THREAD_RPCLISTENER]++; ThreadRPCServer2(parg); vnThreadsRunning[THREAD_RPCLISTENER]--; } catch (std::exception& e) { vnThreadsRunning[THREAD_RPCLISTENER]--; PrintException(&e, "ThreadRPCServer()"); } catch (...) { vnThreadsRunning[THREAD_RPCLISTENER]--; PrintException(NULL, "ThreadRPCServer()"); } printf("ThreadRPCServer exited\n"); } // Forward declaration required for RPCListen template <typename Protocol, typename SocketAcceptorService> static void RPCAcceptHandler(boost::shared_ptr< basic_socket_acceptor<Protocol, SocketAcceptorService> > acceptor, ssl::context& context, bool fUseSSL, AcceptedConnection* conn, const boost::system::error_code& error); /** * Sets up I/O resources to accept and handle a new connection. */ template <typename Protocol, typename SocketAcceptorService> static void RPCListen(boost::shared_ptr< basic_socket_acceptor<Protocol, SocketAcceptorService> > acceptor, ssl::context& context, const bool fUseSSL) { // Accept connection AcceptedConnectionImpl<Protocol>* conn = new AcceptedConnectionImpl<Protocol>(acceptor->get_io_service(), context, fUseSSL); acceptor->async_accept( conn->sslStream.lowest_layer(), conn->peer, boost::bind(&RPCAcceptHandler<Protocol, SocketAcceptorService>, acceptor, boost::ref(context), fUseSSL, conn, boost::asio::placeholders::error)); } /** * Accept and handle incoming connection. */ template <typename Protocol, typename SocketAcceptorService> static void RPCAcceptHandler(boost::shared_ptr< basic_socket_acceptor<Protocol, SocketAcceptorService> > acceptor, ssl::context& context, const bool fUseSSL, AcceptedConnection* conn, const boost::system::error_code& error) { vnThreadsRunning[THREAD_RPCLISTENER]++; // Immediately start accepting new connections, except when we're cancelled or our socket is closed. if (error != asio::error::operation_aborted && acceptor->is_open()) RPCListen(acceptor, context, fUseSSL); AcceptedConnectionImpl<ip::tcp>* tcp_conn = dynamic_cast< AcceptedConnectionImpl<ip::tcp>* >(conn); // TODO: Actually handle errors if (error) { delete conn; } // Restrict callers by IP. It is important to // do this before starting client thread, to filter out // certain DoS and misbehaving clients. else if (tcp_conn && !ClientAllowed(tcp_conn->peer.address())) { // Only send a 403 if we're not using SSL to prevent a DoS during the SSL handshake. if (!fUseSSL) conn->stream() << HTTPReply(HTTP_FORBIDDEN, "", false) << std::flush; delete conn; } // start HTTP client thread else if (!NewThread(ThreadRPCServer3, conn)) { printf("Failed to create RPC server client thread\n"); delete conn; } vnThreadsRunning[THREAD_RPCLISTENER]--; } void ThreadRPCServer2(void* parg) { printf("ThreadRPCServer started\n"); strRPCUserColonPass = mapArgs["-rpcuser"] + ":" + mapArgs["-rpcpassword"]; if ((mapArgs["-rpcpassword"] == "") || (mapArgs["-rpcuser"] == mapArgs["-rpcpassword"])) { unsigned char rand_pwd[32]; RAND_bytes(rand_pwd, 32); string strWhatAmI = "To use CRURd"; if (mapArgs.count("-server")) strWhatAmI = strprintf(_("To use the %s option"), "\"-server\""); else if (mapArgs.count("-daemon")) strWhatAmI = strprintf(_("To use the %s option"), "\"-daemon\""); uiInterface.ThreadSafeMessageBox(strprintf( _("%s, you must set a rpcpassword in the configuration file:\n %s\n" "It is recommended you use the following random password:\n" "rpcuser=CRURrpc\n" "rpcpassword=%s\n" "(you do not need to remember this password)\n" "The username and password MUST NOT be the same.\n" "If the file does not exist, create it with owner-readable-only file permissions.\n" "It is also recommended to set alertnotify so you are notified of problems;\n" "for example: alertnotify=echo %%s | mail -s \"CRUR Alert\" admin@foo.com\n"), strWhatAmI.c_str(), GetConfigFile().string().c_str(), EncodeBase58(&rand_pwd[0],&rand_pwd[0]+32).c_str()), _("Error"), CClientUIInterface::OK | CClientUIInterface::MODAL); StartShutdown(); return; } const bool fUseSSL = GetBoolArg("-rpcssl"); asio::io_service io_service; ssl::context context(io_service, ssl::context::sslv23); if (fUseSSL) { context.set_options(ssl::context::no_sslv2); filesystem::path pathCertFile(GetArg("-rpcsslcertificatechainfile", "server.cert")); if (!pathCertFile.is_complete()) pathCertFile = filesystem::path(GetDataDir()) / pathCertFile; if (filesystem::exists(pathCertFile)) context.use_certificate_chain_file(pathCertFile.string()); else printf("ThreadRPCServer ERROR: missing server certificate file %s\n", pathCertFile.string().c_str()); filesystem::path pathPKFile(GetArg("-rpcsslprivatekeyfile", "server.pem")); if (!pathPKFile.is_complete()) pathPKFile = filesystem::path(GetDataDir()) / pathPKFile; if (filesystem::exists(pathPKFile)) context.use_private_key_file(pathPKFile.string(), ssl::context::pem); else printf("ThreadRPCServer ERROR: missing server private key file %s\n", pathPKFile.string().c_str()); string strCiphers = GetArg("-rpcsslciphers", "TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH"); SSL_CTX_set_cipher_list(context.impl(), strCiphers.c_str()); } // Try a dual IPv6/IPv4 socket, falling back to separate IPv4 and IPv6 sockets const bool loopback = !mapArgs.count("-rpcallowip"); asio::ip::address bindAddress = loopback ? asio::ip::address_v6::loopback() : asio::ip::address_v6::any(); ip::tcp::endpoint endpoint(bindAddress, GetArg("-rpcport", GetDefaultRPCPort())); boost::system::error_code v6_only_error; boost::shared_ptr<ip::tcp::acceptor> acceptor(new ip::tcp::acceptor(io_service)); boost::signals2::signal<void ()> StopRequests; bool fListening = false; std::string strerr; try { acceptor->open(endpoint.protocol()); acceptor->set_option(boost::asio::ip::tcp::acceptor::reuse_address(true)); // Try making the socket dual IPv6/IPv4 (if listening on the "any" address) acceptor->set_option(boost::asio::ip::v6_only(loopback), v6_only_error); acceptor->bind(endpoint); acceptor->listen(socket_base::max_connections); RPCListen(acceptor, context, fUseSSL); // Cancel outstanding listen-requests for this acceptor when shutting down StopRequests.connect(signals2::slot<void ()>( static_cast<void (ip::tcp::acceptor::*)()>(&ip::tcp::acceptor::close), acceptor.get()) .track(acceptor)); fListening = true; } catch(boost::system::system_error &e) { strerr = strprintf(_("An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s"), endpoint.port(), e.what()); } try { // If dual IPv6/IPv4 failed (or we're opening loopback interfaces only), open IPv4 separately if (!fListening || loopback || v6_only_error) { bindAddress = loopback ? asio::ip::address_v4::loopback() : asio::ip::address_v4::any(); endpoint.address(bindAddress); acceptor.reset(new ip::tcp::acceptor(io_service)); acceptor->open(endpoint.protocol()); acceptor->set_option(boost::asio::ip::tcp::acceptor::reuse_address(true)); acceptor->bind(endpoint); acceptor->listen(socket_base::max_connections); RPCListen(acceptor, context, fUseSSL); // Cancel outstanding listen-requests for this acceptor when shutting down StopRequests.connect(signals2::slot<void ()>( static_cast<void (ip::tcp::acceptor::*)()>(&ip::tcp::acceptor::close), acceptor.get()) .track(acceptor)); fListening = true; } } catch(boost::system::system_error &e) { strerr = strprintf(_("An error occurred while setting up the RPC port %u for listening on IPv4: %s"), endpoint.port(), e.what()); } if (!fListening) { uiInterface.ThreadSafeMessageBox(strerr, _("Error"), CClientUIInterface::OK | CClientUIInterface::MODAL); StartShutdown(); return; } vnThreadsRunning[THREAD_RPCLISTENER]--; while (!fShutdown) io_service.run_one(); vnThreadsRunning[THREAD_RPCLISTENER]++; StopRequests(); } class JSONRequest { public: Value id; string strMethod; Array params; JSONRequest() { id = Value::null; } void parse(const Value& valRequest); }; void JSONRequest::parse(const Value& valRequest) { // Parse request if (valRequest.type() != obj_type) throw JSONRPCError(RPC_INVALID_REQUEST, "Invalid Request object"); const Object& request = valRequest.get_obj(); // Parse id now so errors from here on will have the id id = find_value(request, "id"); // Parse method Value valMethod = find_value(request, "method"); if (valMethod.type() == null_type) throw JSONRPCError(RPC_INVALID_REQUEST, "Missing method"); if (valMethod.type() != str_type) throw JSONRPCError(RPC_INVALID_REQUEST, "Method must be a string"); strMethod = valMethod.get_str(); if (strMethod != "getwork" && strMethod != "getblocktemplate") printf("ThreadRPCServer method=%s\n", strMethod.c_str()); // Parse params Value valParams = find_value(request, "params"); if (valParams.type() == array_type) params = valParams.get_array(); else if (valParams.type() == null_type) params = Array(); else throw JSONRPCError(RPC_INVALID_REQUEST, "Params must be an array"); } static Object JSONRPCExecOne(const Value& req) { Object rpc_result; JSONRequest jreq; try { jreq.parse(req); Value result = tableRPC.execute(jreq.strMethod, jreq.params); rpc_result = JSONRPCReplyObj(result, Value::null, jreq.id); } catch (Object& objError) { rpc_result = JSONRPCReplyObj(Value::null, objError, jreq.id); } catch (std::exception& e) { rpc_result = JSONRPCReplyObj(Value::null, JSONRPCError(RPC_PARSE_ERROR, e.what()), jreq.id); } return rpc_result; } static string JSONRPCExecBatch(const Array& vReq) { Array ret; for (unsigned int reqIdx = 0; reqIdx < vReq.size(); reqIdx++) ret.push_back(JSONRPCExecOne(vReq[reqIdx])); return write_string(Value(ret), false) + "\n"; } static CCriticalSection cs_THREAD_RPCHANDLER; void ThreadRPCServer3(void* parg) { // Make this thread recognisable as the RPC handler RenameThread("CRUR-rpchand"); { LOCK(cs_THREAD_RPCHANDLER); vnThreadsRunning[THREAD_RPCHANDLER]++; } AcceptedConnection *conn = (AcceptedConnection *) parg; bool fRun = true; while (true) { if (fShutdown || !fRun) { conn->close(); delete conn; { LOCK(cs_THREAD_RPCHANDLER); --vnThreadsRunning[THREAD_RPCHANDLER]; } return; } map<string, string> mapHeaders; string strRequest; ReadHTTP(conn->stream(), mapHeaders, strRequest); // Check authorization if (mapHeaders.count("authorization") == 0) { conn->stream() << HTTPReply(HTTP_UNAUTHORIZED, "", false) << std::flush; break; } if (!HTTPAuthorized(mapHeaders)) { printf("ThreadRPCServer incorrect password attempt from %s\n", conn->peer_address_to_string().c_str()); /* Deter brute-forcing short passwords. If this results in a DOS the user really shouldn't have their RPC port exposed.*/ if (mapArgs["-rpcpassword"].size() < 20) MilliSleep(250); conn->stream() << HTTPReply(HTTP_UNAUTHORIZED, "", false) << std::flush; break; } if (mapHeaders["connection"] == "close") fRun = false; JSONRequest jreq; try { // Parse request Value valRequest; if (!read_string(strRequest, valRequest)) throw JSONRPCError(RPC_PARSE_ERROR, "Parse error"); string strReply; // singleton request if (valRequest.type() == obj_type) { jreq.parse(valRequest); Value result = tableRPC.execute(jreq.strMethod, jreq.params); // Send reply strReply = JSONRPCReply(result, Value::null, jreq.id); // array of requests } else if (valRequest.type() == array_type) strReply = JSONRPCExecBatch(valRequest.get_array()); else throw JSONRPCError(RPC_PARSE_ERROR, "Top-level object parse error"); conn->stream() << HTTPReply(HTTP_OK, strReply, fRun) << std::flush; } catch (Object& objError) { ErrorReply(conn->stream(), objError, jreq.id); break; } catch (std::exception& e) { ErrorReply(conn->stream(), JSONRPCError(RPC_PARSE_ERROR, e.what()), jreq.id); break; } } delete conn; { LOCK(cs_THREAD_RPCHANDLER); vnThreadsRunning[THREAD_RPCHANDLER]--; } } json_spirit::Value CRPCTable::execute(const std::string &strMethod, const json_spirit::Array &params) const { // Find method const CRPCCommand *pcmd = tableRPC[strMethod]; if (!pcmd) throw JSONRPCError(RPC_METHOD_NOT_FOUND, "Method not found"); // Observe safe mode string strWarning = GetWarnings("rpc"); if (strWarning != "" && !GetBoolArg("-disablesafemode") && !pcmd->okSafeMode) throw JSONRPCError(RPC_FORBIDDEN_BY_SAFE_MODE, string("Safe mode: ") + strWarning); try { // Execute Value result; { if (pcmd->unlocked) result = pcmd->actor(params, false); else { LOCK2(cs_main, pwalletMain->cs_wallet); result = pcmd->actor(params, false); } } return result; } catch (std::exception& e) { throw JSONRPCError(RPC_MISC_ERROR, e.what()); } } Object CallRPC(const string& strMethod, const Array& params) { if (mapArgs["-rpcuser"] == "" && mapArgs["-rpcpassword"] == "") throw runtime_error(strprintf( _("You must set rpcpassword=<password> in the configuration file:\n%s\n" "If the file does not exist, create it with owner-readable-only file permissions."), GetConfigFile().string().c_str())); // Connect to localhost bool fUseSSL = GetBoolArg("-rpcssl"); asio::io_service io_service; ssl::context context(io_service, ssl::context::sslv23); context.set_options(ssl::context::no_sslv2); asio::ssl::stream<asio::ip::tcp::socket> sslStream(io_service, context); SSLIOStreamDevice<asio::ip::tcp> d(sslStream, fUseSSL); iostreams::stream< SSLIOStreamDevice<asio::ip::tcp> > stream(d); if (!d.connect(GetArg("-rpcconnect", "127.0.0.1"), GetArg("-rpcport", itostr(GetDefaultRPCPort())))) throw runtime_error("couldn't connect to server"); // HTTP basic authentication string strUserPass64 = EncodeBase64(mapArgs["-rpcuser"] + ":" + mapArgs["-rpcpassword"]); map<string, string> mapRequestHeaders; mapRequestHeaders["Authorization"] = string("Basic ") + strUserPass64; // Send request string strRequest = JSONRPCRequest(strMethod, params, 1); string strPost = HTTPPost(strRequest, mapRequestHeaders); stream << strPost << std::flush; // Receive reply map<string, string> mapHeaders; string strReply; int nStatus = ReadHTTP(stream, mapHeaders, strReply); if (nStatus == HTTP_UNAUTHORIZED) throw runtime_error("incorrect rpcuser or rpcpassword (authorization failed)"); else if (nStatus >= 400 && nStatus != HTTP_BAD_REQUEST && nStatus != HTTP_NOT_FOUND && nStatus != HTTP_INTERNAL_SERVER_ERROR) throw runtime_error(strprintf("server returned HTTP error %d", nStatus)); else if (strReply.empty()) throw runtime_error("no response from server"); // Parse reply Value valReply; if (!read_string(strReply, valReply)) throw runtime_error("couldn't parse reply from server"); const Object& reply = valReply.get_obj(); if (reply.empty()) throw runtime_error("expected reply to have result, error and id properties"); return reply; } template<typename T> void ConvertTo(Value& value, bool fAllowNull=false) { if (fAllowNull && value.type() == null_type) return; if (value.type() == str_type) { // reinterpret string as unquoted json value Value value2; string strJSON = value.get_str(); if (!read_string(strJSON, value2)) throw runtime_error(string("Error parsing JSON:")+strJSON); ConvertTo<T>(value2, fAllowNull); value = value2; } else { value = value.get_value<T>(); } } // Convert strings to command-specific RPC representation Array RPCConvertValues(const std::string &strMethod, const std::vector<std::string> &strParams) { Array params; BOOST_FOREACH(const std::string &param, strParams) params.push_back(param); int n = params.size(); // // Special case non-string parameter types // if (strMethod == "stop" && n > 0) ConvertTo<bool>(params[0]); if (strMethod == "sendtoaddress" && n > 1) ConvertTo<double>(params[1]); if (strMethod == "settxfee" && n > 0) ConvertTo<double>(params[0]); if (strMethod == "getreceivedbyaddress" && n > 1) ConvertTo<int64_t>(params[1]); if (strMethod == "getreceivedbyaccount" && n > 1) ConvertTo<int64_t>(params[1]); if (strMethod == "listreceivedbyaddress" && n > 0) ConvertTo<int64_t>(params[0]); if (strMethod == "listreceivedbyaddress" && n > 1) ConvertTo<bool>(params[1]); if (strMethod == "listreceivedbyaccount" && n > 0) ConvertTo<int64_t>(params[0]); if (strMethod == "listreceivedbyaccount" && n > 1) ConvertTo<bool>(params[1]); if (strMethod == "getbalance" && n > 1) ConvertTo<int64_t>(params[1]); if (strMethod == "getblock" && n > 1) ConvertTo<bool>(params[1]); if (strMethod == "getblockbynumber" && n > 0) ConvertTo<int64_t>(params[0]); if (strMethod == "getblockbynumber" && n > 1) ConvertTo<bool>(params[1]); if (strMethod == "getblockhash" && n > 0) ConvertTo<int64_t>(params[0]); if (strMethod == "move" && n > 2) ConvertTo<double>(params[2]); if (strMethod == "move" && n > 3) ConvertTo<int64_t>(params[3]); if (strMethod == "sendfrom" && n > 2) ConvertTo<double>(params[2]); if (strMethod == "sendfrom" && n > 3) ConvertTo<int64_t>(params[3]); if (strMethod == "listtransactions" && n > 1) ConvertTo<int64_t>(params[1]); if (strMethod == "listtransactions" && n > 2) ConvertTo<int64_t>(params[2]); if (strMethod == "listaccounts" && n > 0) ConvertTo<int64_t>(params[0]); if (strMethod == "walletpassphrase" && n > 1) ConvertTo<int64_t>(params[1]); if (strMethod == "walletpassphrase" && n > 2) ConvertTo<bool>(params[2]); if (strMethod == "getblocktemplate" && n > 0) ConvertTo<Object>(params[0]); if (strMethod == "listsinceblock" && n > 1) ConvertTo<int64_t>(params[1]); if (strMethod == "sendalert" && n > 2) ConvertTo<int64_t>(params[2]); if (strMethod == "sendalert" && n > 3) ConvertTo<int64_t>(params[3]); if (strMethod == "sendalert" && n > 4) ConvertTo<int64_t>(params[4]); if (strMethod == "sendalert" && n > 5) ConvertTo<int64_t>(params[5]); if (strMethod == "sendalert" && n > 6) ConvertTo<int64_t>(params[6]); if (strMethod == "sendmany" && n > 1) ConvertTo<Object>(params[1]); if (strMethod == "sendmany" && n > 2) ConvertTo<int64_t>(params[2]); if (strMethod == "reservebalance" && n > 0) ConvertTo<bool>(params[0]); if (strMethod == "reservebalance" && n > 1) ConvertTo<double>(params[1]); if (strMethod == "addmultisigaddress" && n > 0) ConvertTo<int64_t>(params[0]); if (strMethod == "addmultisigaddress" && n > 1) ConvertTo<Array>(params[1]); if (strMethod == "listunspent" && n > 0) ConvertTo<int64_t>(params[0]); if (strMethod == "listunspent" && n > 1) ConvertTo<int64_t>(params[1]); if (strMethod == "listunspent" && n > 2) ConvertTo<Array>(params[2]); if (strMethod == "getrawtransaction" && n > 1) ConvertTo<int64_t>(params[1]); if (strMethod == "createrawtransaction" && n > 0) ConvertTo<Array>(params[0]); if (strMethod == "createrawtransaction" && n > 1) ConvertTo<Object>(params[1]); if (strMethod == "signrawtransaction" && n > 1) ConvertTo<Array>(params[1], true); if (strMethod == "signrawtransaction" && n > 2) ConvertTo<Array>(params[2], true); if (strMethod == "keypoolrefill" && n > 0) ConvertTo<int64_t>(params[0]); return params; } int CommandLineRPC(int argc, char *argv[]) { string strPrint; int nRet = 0; try { // Skip switches while (argc > 1 && IsSwitchChar(argv[1][0])) { argc--; argv++; } // Method if (argc < 2) throw runtime_error("too few parameters"); string strMethod = argv[1]; // Parameters default to strings std::vector<std::string> strParams(&argv[2], &argv[argc]); Array params = RPCConvertValues(strMethod, strParams); // Execute Object reply = CallRPC(strMethod, params); // Parse reply const Value& result = find_value(reply, "result"); const Value& error = find_value(reply, "error"); if (error.type() != null_type) { // Error strPrint = "error: " + write_string(error, false); int code = find_value(error.get_obj(), "code").get_int(); nRet = abs(code); } else { // Result if (result.type() == null_type) strPrint = ""; else if (result.type() == str_type) strPrint = result.get_str(); else strPrint = write_string(result, true); } } catch (std::exception& e) { strPrint = string("error: ") + e.what(); nRet = 87; } catch (...) { PrintException(NULL, "CommandLineRPC()"); } if (strPrint != "") { fprintf((nRet == 0 ? stdout : stderr), "%s\n", strPrint.c_str()); } return nRet; } #ifdef TEST int main(int argc, char *argv[]) { #ifdef _MSC_VER // Turn off Microsoft heap dump noise _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE); _CrtSetReportFile(_CRT_WARN, CreateFile("NUL", GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, 0)); #endif setbuf(stdin, NULL); setbuf(stdout, NULL); setbuf(stderr, NULL); try { if (argc >= 2 && string(argv[1]) == "-server") { printf("server ready\n"); ThreadRPCServer(NULL); } else { return CommandLineRPC(argc, argv); } } catch (std::exception& e) { PrintException(&e, "main()"); } catch (...) { PrintException(NULL, "main()"); } return 0; } #endif const CRPCTable tableRPC;
[ "crur2017@outlook.com" ]
crur2017@outlook.com
a3c7b6bbf7a924f0e9d87ca847145d47cebab40d
b0f8c523f9f5c0ec39f590289ddc113d316e6d7e
/p2-chain/linkedlist.cpp
18c29c1e0261c5d7e0ff44183f38f39375b06806
[]
no_license
mingzejin11/ECE-250-Data-Structures-and-Algorithms
a048aab0ea72c9eaaca71b1c7b6afed8a6d483b4
e857ac555fce1d5fc0555f8823ed1303f67c5822
refs/heads/master
2022-07-04T14:03:53.418659
2020-05-13T00:09:01
2020-05-13T00:09:01
263,478,245
0
0
null
null
null
null
UTF-8
C++
false
false
1,621
cpp
#include "linkedlist.h" #include <iostream> using namespace std; LinkedList::LinkedList() { first = 0; last = 0; } LinkedList::~LinkedList() { node* current = first; while (current) { node* temp = current->next; delete current; current = temp; } first = 0; } bool LinkedList::enqueue(int k) { node* current = first; while (current) { if (current->key == k) { return false; } current = current->next; } node* Node = new node; Node->key = k; if (!first) { first = Node; last = Node; Node->prev = 0; Node->next = 0; } else { last->next = Node; Node->prev = last; last = Node; } return true; } bool LinkedList::dequeue(int k){ if (!first) { return false; } node* current = first; while (current) { if (current->key == k) { if (current->next) { current->next->prev = current->prev; } else { last = current->prev; } if (current->prev) { current->prev->next = current->next; } else { first = current->next; } delete current; return true; } current = current->next; } return false; } int LinkedList::search(int k) { if (!first) { return -1; } node* current = first; int i = 0; while (current) { if (current->key == k) { return i; } i ++; current = current->next; } return -1; }
[ "mingze.jin11@gmail.com" ]
mingze.jin11@gmail.com
f10ccf529f46bc14fdfccb3abf0ffb2fb9c9c90c
29e2f637f2c49a4d9d0dd375dd0ccd79c69cb438
/freeflow/sys/handler.ipp
6f33463c425a2c8106bbf0c08eb8e0b1afe83ca8
[ "Apache-2.0" ]
permissive
dmbk/freeflow
03ea3da9dabfd516dbf286c00b47ee17c1840297
c5cd77495d44fe3a9e48a2e06fbb44f7418d388e
refs/heads/master
2020-12-27T20:39:43.757320
2014-08-28T12:45:44
2014-08-28T12:45:44
null
0
0
null
null
null
null
UTF-8
C++
false
false
5,888
ipp
// Copyright (c) 2013-2014 Flowgrammable.org // // 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 <iostream> namespace freeflow { // -------------------------------------------------------------------------- // // Abstract handler inline Event_handler::Event_handler(Reactor& r,int fd, Event_mask m) : react_(r), flags_(0), events_(m), fd_(fd) { } inline Event_handler::~Event_handler() { } /// The on_close event is sewnt when the event handler is first added /// to the ractor and becomes active. inline bool Event_handler::on_open() { return true; } /// The on_close event is sent when the event handler is removed /// from the reactor. inline bool Event_handler::on_close() { return true; } /// The on_read event is sent when data is available for reading. inline bool Event_handler::on_read() { return true; } /// The on_write event is sent when it is possible to write data. inline bool Event_handler::on_write() { return true; } /// The on_except event is sent when urgent (out-of-band) data is /// available for reading. inline bool Event_handler::on_except() { return true; } /// The on_time event is sent when the timer, indicated by the given /// timer-id was triggered. inline bool Event_handler::on_time(int) { return true; } /// The on_signal event is sent when the given signal was caught by /// the program. inline bool Event_handler::on_signal(int) { return true; } inline Reactor& Event_handler::reactor() { return react_; } /// Returns the uderlying file descriptor. inline int Event_handler::fd() const { return fd_; } /// Returns the set of events subscribed to by the event handler. inline Event_mask Event_handler::events() const { return events_; } /// Returns true if the event handler is subscribed to the given /// events. inline bool Event_handler::is_subscribed(Event_mask m) const { return events_ & m; } /// Subscribe the event handler to the given set of events. This is used /// indirectly by the reactor to manage the handler. Do not use this /// function. inline void Event_handler::subscribe(Event_mask m) { events_ |= m; } /// Unsubscribe the event handler from the given set of events. This is /// used indirectly by the reactor to manage the handler. Do not use /// this function. inline void Event_handler::unsubscribe(Event_mask m) { events_ &= ~m; } /// Returns the set of flags used to manage the event handler. inline Handler_flags Event_handler::flags() const { return flags_; } inline bool Event_handler::has_flags(Handler_flags f) const { return flags_ & f; } /// Set management flags. This is called only by the reactor. Do not use /// this function. inline void Event_handler::set_flags(Handler_flags f) { flags_ |= f; } /// Clear management flags. This is called only be the reator. Do not /// use this functions. inline void Event_handler::clear_flags(Handler_flags f) { flags_ &= ~f; } // -------------------------------------------------------------------------- // // Resource handler template<typename T> template<typename... Args> inline Resource_wrapper<T>::Resource_wrapper(Args&&... args) : rc_(std::forward<Args>(args)...) { } /// Initialize the resource handler for the given reactor, initially /// subscroibe to the given events, and whose underlying resource is /// constructed from the given arguments. template<typename T> template<typename... Args> inline Basic_event_handler<T>::Basic_event_handler(Reactor& r, Event_mask m, Args&&... args) : Resource_wrapper<T>(std::forward<Args>(args)...) , Event_handler(r, this->rc_.fd(), m) { } /// Assign the handler by replacing its resource with x. This is /// useful in applications where the resource is not initialized on /// construction (e.g., as with the acceptor and connector). /// /// \todo This is gross and requires fd_ to be a protected member in /// order to avoid an unwanted mutator. Can this be made less ugly? template<typename T> inline void Basic_event_handler<T>::assign(T&& x) { this->rc_ = std::move(x); this->fd_ = this->rc_.fd(); } template<typename T> inline T& Basic_event_handler<T>::rc() { return this->rc_; } template<typename T> inline const T& Basic_event_handler<T>::rc() const { return this->rc_; } // -------------------------------------------------------------------------- // // Factory /// The default accept factor creates a new service that wraps the /// accepted socket. template<typename H> inline H* Default_handler_factory<H>::operator()(Reactor& r, Socket&& s) const { return new H(r, std::move(s)); } // -------------------------------------------------------------------------- // // Registry inline Handler_registry::Handler_registry() : reg_(FD_SETSIZE), max_(-1), wait_() { } inline const Select_set& Handler_registry::wait() const { return wait_; } inline int Handler_registry::max() const { return max_; } inline Handler_registry::iterator Handler_registry::begin() { return reg_.begin(); } inline Handler_registry::iterator Handler_registry::end() { return reg_.end(); } inline Handler_registry::const_iterator Handler_registry::begin() const { return reg_.begin(); } inline Handler_registry::const_iterator Handler_registry::end() const { return reg_.end(); } } // namespace nocontrol
[ "andrew.n.sutton@gmail.com" ]
andrew.n.sutton@gmail.com
8923d15a8499ad737274c0b6218c80fc961b04b3
77c7ff339f5a4e84ac04be42be13c0b2f7146b77
/BT10/A4.cpp
c7a3f5ccc38823973bc06c709fa32e1612f960d0
[]
no_license
vinhnguyen1182002/baitap
54d9113213e5d675dac4ddb50e9e2b0c30f3dfbf
f190b4842f380da0f0de7f67233fa735f374ced5
refs/heads/master
2023-04-24T01:06:06.915150
2021-05-15T16:53:54
2021-05-15T16:53:54
340,930,414
0
0
null
null
null
null
UTF-8
C++
false
false
177
cpp
#include<iostream> using namespace std; struct Point{ int x; int y; }; int main() { Point p; cout<<&p<<endl<<&p.x<<endl<<&p.y; //x duoc luu cung vi tri voi dia chi cua p }
[ "78186815+vinhnguyen1182002@users.noreply.github.com" ]
78186815+vinhnguyen1182002@users.noreply.github.com
5ef34a25ca684b0a4bb0ba71b9018b7d67fc7248
ae8b9ad94b5cb354ad43057751aa4d9a7d31da4f
/IoTDataLogger/IoTDataLogger.ino
a86c9d61eb06d6204b0ed41043a0fa8191697e1a
[]
no_license
pubpsv/IoT-Data-Logger
2618f1f5f8b41837f1d3b5b79f9bd3ecf320a8b6
42d3ab33634eba1e13e9432801b1460b82a0db79
refs/heads/master
2021-06-11T08:59:57.176112
2017-01-20T12:44:23
2017-01-20T12:44:23
108,173,603
1
0
null
2017-10-24T19:28:16
2017-10-24T19:28:16
null
UTF-8
C++
false
false
4,869
ino
/***********************************************************************************/ /* This is an simple application to illustrate IoT Temperature & Humidity Logger. */ /* written by Prashanth from BSP Embed. */ /* This code is availbale from GitHub. */ /* Demo is available on YouTube BSP Embed */ /* This is an example for our Monochrome OLEDs based on SSD1306 drivers */ /* Pick one up today in the adafruit shop! */ /* ------> http://www.adafruit.com/category/63_98 */ /* This example is for a 128x64 size display using I2C to communicate */ /* 3 pins are required to interface (2 I2C and one reset) */ /* Adafruit invests time and resources providing this open source code, */ /* please support Adafruit and open-source hardware by purchasing */ /* products from Adafruit! */ /* Written by Limor Fried/Ladyada for Adafruit Industries. */ /* BSD license, check license.txt for more information */ /* All text above, and the splash screen must be included in any redistribution */ /************************************************************************************/ #include <Wire.h> #include <Adafruit_GFX.h> #include <Adafruit_SSD1306.h> #include <DHT.h> #include <ESP8266WiFi.h> #define OLED_RESET 4 #define SSD1306_LCDHEIGHT 64 Adafruit_SSD1306 display(OLED_RESET); #define DHTTYPE DHT11 #define DHTPIN 4 /* What pin we're connected to */ #define Frequent 1 /* Frequency of upload in Minutes */ String apiKey = "9FKQQUHY51BLPJ6M"; /* Replace with your thingspeak API key */ const char* ssid = "WIFI_SSID"; /* Your Router's SSID */ const char* password = "WIFI_PASSWORD"; /* Your Router's WiFi Password */ const char* server = "api.thingspeak.com"; DHT dht(DHTPIN, DHTTYPE); WiFiClient client; #if (SSD1306_LCDHEIGHT != 64) #error("Height incorrect, please fix Adafruit_SSD1306.h!"); #endif void setup() { Wire.begin(0,2); /* I2C OLED SDA, SCL */ Serial.begin(9600); dht.begin(); display.begin(SSD1306_SWITCHCAPVCC, 0x3c); /* Initialize OLED */ display.display(); delay(250); ConnectAP(); DispParam(); } void loop() { float h = dht.readHumidity(); float t = dht.readTemperature(); if (isnan(h) || isnan(t)) { Serial.println("Failed to read from DHT sensor!"); return; } display.setCursor(60,0); display.println(String(t)); display.display(); display.setCursor(60,18); display.println(String(h)); display.display(); if (client.connect(server,80)) { String postStr = apiKey; postStr +="&field1="; postStr += String(t); postStr +="&field2="; postStr += String(h); postStr += "\r\n\r\n"; client.print("POST /update HTTP/1.1\n"); client.print("Host: api.thingspeak.com\n"); client.print("Connection: close\n"); client.print("X-THINGSPEAKAPIKEY: "+apiKey+"\n"); client.print("Content-Type: application/x-www-form-urlencoded\n"); client.print("Content-Length: "); client.print(postStr.length()); client.print("\n\n"); client.print(postStr); } client.stop(); ESP.deepSleep(Frequent * 60 * 1000000, WAKE_RF_DEFAULT); } /**************************************/ /* Connect to WiFi Router */ /* (Access Point) */ /**************************************/ void ConnectAP(void) { WiFi.mode(WIFI_STA); /* Set WiFi to station mode */ WiFi.disconnect(); /* disconnect from an AP if it was Previously connected*/ delay(100); Serial.print("Connecting Wifi: "); Serial.println(ssid); display.clearDisplay(); /* For Display */ display.setTextSize(2); display.setTextColor(WHITE); display.setCursor(0,0); display.println("Connecting"); display.setCursor(0,18); display.display(); WiFi.begin(ssid, password); while (WiFi.status() != WL_CONNECTED) { Serial.print("."); display.print('.'); display.display(); delay(500); } Serial.println(""); Serial.println("WiFi connected"); Serial.println("IP address: "); IPAddress ip = WiFi.localIP(); Serial.println(ip); } void DispParam(void) { display.clearDisplay(); /* Clear the buffer */ display.setTextSize(2); display.setTextColor(WHITE); display.setCursor(0,0); display.println("Temp:"); display.setCursor(0,18); display.println("Humi:"); display.display(); }
[ "bsp.embed@gmail.com" ]
bsp.embed@gmail.com
dce19737e90a917a525a760b4b200a78ddbe3b5f
771ae01dd3791635afc7b957fda4d04174945c5d
/server.h
f634380e6a57c81d2ebee5fd6d59eb7fb6401aa7
[]
no_license
GeremiaPompei/rest_pistache
b1314219b71c23bb1747b393bf7fa1492aea3e11
1a9975ad3ba4dbc227f1aa22363d98293d264758
refs/heads/main
2023-04-30T19:42:54.949984
2021-05-17T01:35:06
2021-05-17T01:35:06
348,532,355
0
0
null
null
null
null
UTF-8
C++
false
false
1,562
h
#ifndef SERVER_H #define SERVER_H #include <pistache/router.h> #include <pistache/endpoint.h> #include "element.h" using namespace std; using namespace Pistache; /** * Classe Server utile per rispondere al client. */ class Server { private: /** * Element salvati nel server da parte del client. */ vector<Element> elements; /** * Endpoint dell'istanza del server utile per operare sulle funzioni principali del servizio. */ shared_ptr<Http::Endpoint> httpEndpoint; /** * Rotte rest messe a disposizione dal server. */ Rest::Router router; /** * Metiodo utile ad inizializzare le rotte del server. */ void setupRoutes(); /** * Metodo utile a configurare la risposta ad una richiesta POST. */ void post(const Rest::Request& request, Http::ResponseWriter response); /** * Metodo utile a configurare la risposta ad una richiesta GET. */ void get(const Rest::Request& request, Http::ResponseWriter response); /** * Metodo utile a configurare la risposta ad una richiesta DELETE. */ void del(const Rest::Request& request, Http::ResponseWriter response); public: /** * Costruttore del server. */ Server(int nPort); /** * Metodo utile ad inizializzare il server. */ void init(size_t thr = 2); /** * Metodo utile a far partire il server. */ void start(bool httpsOn); /** * Metodo utile a spegnere il server. */ void stop(); }; #endif
[ "geremia.pompei@studenti.unicam.it" ]
geremia.pompei@studenti.unicam.it
97f4a48b1d1567146ed8d60d4d9d496a32909b70
09dc003859396d8839852711f58f38faf7057e05
/src/visitor.h
461c805f7ab19d735a70915c94fc167c9829e96b
[]
no_license
Xelonion/VisitorPattern-Cpp
b08c8de2c25dfee44e32e24fba5706cc4ea7b237
93c32e5ebea2c6450933ae356fdfc001e9b56f06
refs/heads/master
2021-01-19T03:47:38.512341
2017-04-05T20:41:10
2017-04-05T20:41:10
87,333,556
0
0
null
null
null
null
UTF-8
C++
false
false
343
h
#ifndef W_VISITOR_H #define W_VISITOR_H #include <string> using namespace std; class ElementNum; class ElementStr; class Visitor { private: int value; string str; public: Visitor(); ~Visitor(); void VisitElementNum(ElementNum*); void VisitElementStr(ElementStr*); int getValue(); string getStr(); }; #endif
[ "1310545@uni-wuppertal.de" ]
1310545@uni-wuppertal.de
ed60e20e809a4981fdbad4bfbe313a86876dff1a
10c67c4beef52d4afc3b7935a698059e37cffc30
/pao13.cpp
197a239dcc12fd6d4fe2b35c9f216bf2b62b141d
[]
no_license
ronaldo-k/Solutions
00e6bb321e677bcf6061099aa64ff870f6f18e53
3cc63cd1d9ff88654691b6a6f4afbbde902cb306
refs/heads/master
2020-07-29T15:50:45.905274
2019-11-27T00:39:06
2019-11-27T00:39:06
209,868,438
0
0
null
null
null
null
UTF-8
C++
false
false
720
cpp
#include <stdio.h> #include <algorithm> #define debug(args...) fprintf(stderr, args) using namespace std; const int MAXN = 1e5; int n, k, v[MAXN]; // Comprimento dos paes bool test(int m) { if(m == 0) return true; int div = 0; for(int i = 0; i < k; i++) { div += (v[i] / m); } debug("div = %d, k = %d\n", div, k); if(div >= k) return true; else return false; } int main() { scanf("%d %d", &n, &k); for(int i = 0; i < k; i++) { scanf("%d", &v[i]); } sort(v, v + n); int ini = 0, fim = 1e4; if( !(test(ini)) ) return 0; while(ini < fim) { int m = (ini + fim) / 2; debug("m = %d\n", m); if(ini == fim - 1) m = fim; if(test(m)) ini = m; else fim = m - 1; } printf("%d\n", fim); }
[ "ronaldo.kanegae@gmail.com" ]
ronaldo.kanegae@gmail.com
e5160a69212c0608f66f64739bd13231c9a434be
a5a934e6039c24e1311a00303f653fbac89e911f
/cf/Contest/645/Park lighting/main.cpp
3985175ad85e30c167738c686fe43ae56c9036ef
[ "MIT" ]
permissive
wdjpng/soi
8bd9561a3a3d86a0081388cde735a2d2cd3b3de8
dd565587ae30985676f7f374093ec0687436b881
refs/heads/master
2022-11-19T03:26:58.386248
2020-07-15T15:35:48
2020-07-15T15:35:48
171,109,395
0
0
null
null
null
null
UTF-8
C++
false
false
437
cpp
#include <bits/stdc++.h> #define int long long using namespace std; signed main() { // Turn off synchronization between cin/cout and scanf/printf ios_base::sync_with_stdio(false); // Disable automatic flush of cout when reading from cin cin.tie(0); cin.tie(0); int t; cin >> t; for (int curT = 0; curT < t; ++curT) { int n, m; cin >> n >> m; cout << n*m/2 + (n*m)%2 << "\n"; } }
[ "muenzel.lukas@gmail.com" ]
muenzel.lukas@gmail.com
b22d9134400f105a1c01c29c96089eb37343aea8
3cf9e141cc8fee9d490224741297d3eca3f5feff
/C++ Benchmark Programs/Benchmark Files 1/classtester/autogen-sources/source-17843.cpp
9965f48b55533cdd230ef9ed313bce8b24025e51
[]
no_license
TeamVault/tauCFI
e0ac60b8106fc1bb9874adc515fc01672b775123
e677d8cc7acd0b1dd0ac0212ff8362fcd4178c10
refs/heads/master
2023-05-30T20:57:13.450360
2021-06-14T09:10:24
2021-06-14T09:10:24
154,563,655
0
1
null
null
null
null
UTF-8
C++
false
false
3,192
cpp
struct c0; void __attribute__ ((noinline)) tester0(c0* p); struct c0 { bool active0; c0() : active0(true) {} virtual ~c0() { tester0(this); active0 = false; } virtual void f0(){} }; void __attribute__ ((noinline)) tester0(c0* p) { p->f0(); } struct c1; void __attribute__ ((noinline)) tester1(c1* p); struct c1 : virtual c0 { bool active1; c1() : active1(true) {} virtual ~c1() { tester1(this); c0 *p0_0 = (c0*)(c1*)(this); tester0(p0_0); active1 = false; } virtual void f1(){} }; void __attribute__ ((noinline)) tester1(c1* p) { p->f1(); if (p->active0) p->f0(); } struct c2; void __attribute__ ((noinline)) tester2(c2* p); struct c2 : c1 { bool active2; c2() : active2(true) {} virtual ~c2() { tester2(this); c0 *p0_0 = (c0*)(c1*)(c2*)(this); tester0(p0_0); c1 *p1_0 = (c1*)(c2*)(this); tester1(p1_0); active2 = false; } virtual void f2(){} }; void __attribute__ ((noinline)) tester2(c2* p) { p->f2(); if (p->active1) p->f1(); if (p->active0) p->f0(); } struct c3; void __attribute__ ((noinline)) tester3(c3* p); struct c3 : virtual c1, virtual c0 { bool active3; c3() : active3(true) {} virtual ~c3() { tester3(this); c0 *p0_0 = (c0*)(c1*)(c3*)(this); tester0(p0_0); c0 *p0_1 = (c0*)(c3*)(this); tester0(p0_1); c1 *p1_0 = (c1*)(c3*)(this); tester1(p1_0); active3 = false; } virtual void f3(){} }; void __attribute__ ((noinline)) tester3(c3* p) { p->f3(); if (p->active0) p->f0(); if (p->active1) p->f1(); } struct c4; void __attribute__ ((noinline)) tester4(c4* p); struct c4 : virtual c0, virtual c1, virtual c3 { bool active4; c4() : active4(true) {} virtual ~c4() { tester4(this); c0 *p0_0 = (c0*)(c4*)(this); tester0(p0_0); c0 *p0_1 = (c0*)(c1*)(c4*)(this); tester0(p0_1); c0 *p0_2 = (c0*)(c1*)(c3*)(c4*)(this); tester0(p0_2); c0 *p0_3 = (c0*)(c3*)(c4*)(this); tester0(p0_3); c1 *p1_0 = (c1*)(c4*)(this); tester1(p1_0); c1 *p1_1 = (c1*)(c3*)(c4*)(this); tester1(p1_1); c3 *p3_0 = (c3*)(c4*)(this); tester3(p3_0); active4 = false; } virtual void f4(){} }; void __attribute__ ((noinline)) tester4(c4* p) { p->f4(); if (p->active0) p->f0(); if (p->active1) p->f1(); if (p->active3) p->f3(); } int __attribute__ ((noinline)) inc(int v) {return ++v;} int main() { c0* ptrs0[25]; ptrs0[0] = (c0*)(new c0()); ptrs0[1] = (c0*)(c1*)(new c1()); ptrs0[2] = (c0*)(c1*)(c2*)(new c2()); ptrs0[3] = (c0*)(c1*)(c3*)(new c3()); ptrs0[4] = (c0*)(c3*)(new c3()); ptrs0[5] = (c0*)(c4*)(new c4()); ptrs0[6] = (c0*)(c1*)(c4*)(new c4()); ptrs0[7] = (c0*)(c1*)(c3*)(c4*)(new c4()); ptrs0[8] = (c0*)(c3*)(c4*)(new c4()); for (int i=0;i<9;i=inc(i)) { tester0(ptrs0[i]); delete ptrs0[i]; } c1* ptrs1[25]; ptrs1[0] = (c1*)(new c1()); ptrs1[1] = (c1*)(c2*)(new c2()); ptrs1[2] = (c1*)(c3*)(new c3()); ptrs1[3] = (c1*)(c4*)(new c4()); ptrs1[4] = (c1*)(c3*)(c4*)(new c4()); for (int i=0;i<5;i=inc(i)) { tester1(ptrs1[i]); delete ptrs1[i]; } c2* ptrs2[25]; ptrs2[0] = (c2*)(new c2()); for (int i=0;i<1;i=inc(i)) { tester2(ptrs2[i]); delete ptrs2[i]; } c3* ptrs3[25]; ptrs3[0] = (c3*)(new c3()); ptrs3[1] = (c3*)(c4*)(new c4()); for (int i=0;i<2;i=inc(i)) { tester3(ptrs3[i]); delete ptrs3[i]; } c4* ptrs4[25]; ptrs4[0] = (c4*)(new c4()); for (int i=0;i<1;i=inc(i)) { tester4(ptrs4[i]); delete ptrs4[i]; } return 0; }
[ "ga72foq@mytum.de" ]
ga72foq@mytum.de
5aafb193ec7549d477d3a437360ccea0de43ebab
f51049c139bcea6626b9cbc338e7f6ba89ec09c7
/cygwin/omnetpp-4.1/src/tkenv/modinsp.cc
5f339f64410c771efa7bf13b80fa7c6b119cee09
[]
no_license
YanivFais/thesis_msc_dist_alg
e147f4603e084e02054f6d5737392c92f479e891
9d495062516fa7960814a560e4956278d6d7b750
refs/heads/master
2023-01-29T05:27:20.307668
2020-04-12T12:12:41
2020-04-12T12:12:41
255,051,982
0
0
null
2023-01-26T23:54:42
2020-04-12T09:47:21
C++
UTF-8
C++
false
false
45,227
cc
//========================================================================== // MODINSP.CC - part of // // OMNeT++/OMNEST // Discrete System Simulation in C++ // // Implementation of // inspectors // //========================================================================== /*--------------------------------------------------------------* Copyright (C) 1992-2008 Andras Varga Copyright (C) 2006-2008 OpenSim Ltd. This file is distributed WITHOUT ANY WARRANTY. See the file `license' for details on this and other legal matters. *--------------------------------------------------------------*/ #include <string.h> #include <stdlib.h> #include <math.h> #include <assert.h> #include "modinsp.h" #include "cchannel.h" #include "tkenv.h" #include "tklib.h" #include "tkutil.h" #include "inspfactory.h" #include "arrow.h" #include "graphlayouter.h" #include "layouterenv.h" #include "forcedirectedgraphlayouter.h" #include "basicspringembedderlayout.h" #include "stringtokenizer.h" USING_NAMESPACE #define UNKNOWNICON_WIDTH 32 #define UNKNOWNICON_HEIGHT 32 void _dummy_for_modinsp() {} class TModuleWindowFactory : public cInspectorFactory { public: TModuleWindowFactory(const char *name) : cInspectorFactory(name) {} bool supportsObject(cObject *obj) {return dynamic_cast<cModule *>(obj)!=NULL;} int inspectorType() {return INSP_MODULEOUTPUT;} double qualityAsDefault(cObject *object) {return 0.5;} TInspector *createInspectorFor(cObject *object,int type,const char *geom,void *data) { return new TModuleWindow(object, type, geom, data); } }; Register_InspectorFactory(TModuleWindowFactory); TModuleWindow::TModuleWindow(cObject *obj,int typ,const char *geom,void *dat) : TInspector(obj,typ,geom,dat) { } void TModuleWindow::createWindow() { TInspector::createWindow(); // create window name etc. strcpy(textWidget,windowname); strcat(textWidget, ".main.text"); // create inspector window by calling the specified proc with // the object's pointer. Window name will be like ".ptr80003a9d-1" Tcl_Interp *interp = getTkenv()->getInterp(); cModule *mod = static_cast<cModule *>(object); const char *createcommand = mod->isSimple() ? "create_simplemodulewindow " : "create_compoundmodulewindow "; CHK(Tcl_VarEval(interp, createcommand, windowname, " \"", geometry, "\"", NULL )); redisplay(getTkenv()->getLogBuffer()); } void TModuleWindow::update() { TInspector::update(); Tcl_Interp *interp = getTkenv()->getInterp(); CHK(Tcl_VarEval(interp, "modulewindow_trimlines ", windowname, NULL)); } void TModuleWindow::printLastLineOf(const LogBuffer& logBuffer) { printLastLineOf(getTkenv()->getInterp(), textWidget, logBuffer, excludedModuleIds); } void TModuleWindow::redisplay(const LogBuffer& logBuffer) { redisplay(getTkenv()->getInterp(), textWidget, logBuffer, static_cast<cModule *>(object), excludedModuleIds); } void TModuleWindow::printLastLineOf(Tcl_Interp *interp, const char *textWidget, const LogBuffer& logBuffer, const std::set<int>& excludedModuleIds) { const LogBuffer::Entry& entry = logBuffer.getEntries().back(); if (!entry.moduleIds) { if (entry.lines.empty()) textWidget_insert(interp, textWidget, entry.banner, "log"); else textWidget_insert(interp, textWidget, entry.lines.back()); } else if (excludedModuleIds.find(entry.moduleIds[0])==excludedModuleIds.end()) { if (entry.lines.empty()) textWidget_insert(interp, textWidget, entry.banner, "event"); else textWidget_insert(interp, textWidget, entry.lines.back()); } textWidget_gotoEnd(interp, textWidget); } void TModuleWindow::redisplay(Tcl_Interp *interp, const char *textWidget, const LogBuffer& logBuffer, cModule *mod, const std::set<int>& excludedModuleIds) { textWidget_clear(interp, textWidget); if (!mod) return; int inspModuleId = mod->getId(); const std::list<LogBuffer::Entry>& entries = logBuffer.getEntries(); for (std::list<LogBuffer::Entry>::const_iterator it=entries.begin(); it!=entries.end(); it++) { const LogBuffer::Entry& entry = *it; if (!entry.moduleIds) { textWidget_insert(interp, textWidget, entry.banner, "log"); for (int i=0; i<(int)entry.lines.size(); i++) textWidget_insert(interp, textWidget, entry.lines[i]); //? } else { // check that this module is covered in entry.moduleIds[] (module path up to the root) bool found = false; for (int *p = entry.moduleIds; !found && *p; p++) if (*p == inspModuleId) found = true; // if so, and is not excluded, display log if (found && excludedModuleIds.find(entry.moduleIds[0])==excludedModuleIds.end()) { textWidget_insert(interp, textWidget, entry.banner, "event"); for (int i=0; i<(int)entry.lines.size(); i++) textWidget_insert(interp, textWidget, entry.lines[i]); } } } textWidget_gotoEnd(interp, textWidget); } int TModuleWindow::inspectorCommand(Tcl_Interp *interp, int argc, const char **argv) { if (argc<1) {Tcl_SetResult(interp, TCLCONST("wrong number of args"), TCL_STATIC); return TCL_ERROR;} // supported commands: redisplay, getexcludedmoduleids, setexcludedmoduleids if (strcmp(argv[0],"redisplay")==0) { if (argc!=1) {Tcl_SetResult(interp, TCLCONST("wrong argcount"), TCL_STATIC); return TCL_ERROR;} TRY(redisplay(getTkenv()->getLogBuffer())); return TCL_OK; } else if (strcmp(argv[0],"getexcludedmoduleids")==0) { if (argc!=1) {Tcl_SetResult(interp, TCLCONST("wrong argcount"), TCL_STATIC); return TCL_ERROR;} Tcl_Obj *listobj = Tcl_NewListObj(0, NULL); for (std::set<int>::iterator it=excludedModuleIds.begin(); it!=excludedModuleIds.end(); it++) Tcl_ListObjAppendElement(interp, listobj, Tcl_NewIntObj(*it)); Tcl_SetObjResult(interp, listobj); return TCL_OK; } else if (strcmp(argv[0],"setexcludedmoduleids")==0) { if (argc!=2) {Tcl_SetResult(interp, TCLCONST("wrong argcount"), TCL_STATIC); return TCL_ERROR;} excludedModuleIds.clear(); StringTokenizer tokenizer(argv[1]); while (tokenizer.hasMoreTokens()) excludedModuleIds.insert(atoi(tokenizer.nextToken())); return TCL_OK; } return TCL_ERROR; } //======================================================================= class TGraphicalModWindowFactory : public cInspectorFactory { public: TGraphicalModWindowFactory(const char *name) : cInspectorFactory(name) {} bool supportsObject(cObject *obj) {return dynamic_cast<cModule *>(obj)!=NULL;} int inspectorType() {return INSP_GRAPHICAL;} double qualityAsDefault(cObject *object) { return dynamic_cast<cSimpleModule *>(object) ? 0.9 : 3.0; } TInspector *createInspectorFor(cObject *object,int type,const char *geom,void *data) { return new TGraphicalModWindow(object, type, geom, data); } }; Register_InspectorFactory(TGraphicalModWindowFactory); TGraphicalModWindow::TGraphicalModWindow(cObject *obj,int typ,const char *geom,void *dat) : TInspector(obj,typ,geom,dat) { needs_redraw = false; not_drawn = false; const cDisplayString blank; cModule *parentmodule = static_cast<cModule *>(object); const cDisplayString& ds = parentmodule->hasDisplayString() ? parentmodule->getDisplayString() : blank; random_seed = resolveLongDispStrArg(ds.getTagArg("bgl",4), parentmodule, 1); } TGraphicalModWindow::~TGraphicalModWindow() { } void TGraphicalModWindow::createWindow() { TInspector::createWindow(); // create window name etc. strcpy(canvas,windowname); strcat(canvas,".c"); // create inspector window by calling the specified proc with // the object's pointer. Window name will be like ".ptr80003a9d-1" Tcl_Interp *interp = getTkenv()->getInterp(); CHK(Tcl_VarEval(interp, "create_graphicalmodwindow ", windowname, " \"", geometry, "\"", NULL )); } void TGraphicalModWindow::update() { TInspector::update(); if (not_drawn) return; // redraw modules only if really needed if (needs_redraw) { needs_redraw = false; redrawAll(); } else { redrawNextEventMarker(); redrawMessages(); updateSubmodules(); } } void TGraphicalModWindow::relayoutAndRedrawAll() { cModule *mod = (cModule *)object; int submodcount = 0; int gatecountestimate = mod->gateCount(); for (cModule::SubmoduleIterator submod(mod); !submod.end(); submod++) { submodcount++; // note: gatecountestimate will count unconnected gates in the gate array as well gatecountestimate += submod()->gateCount(); } not_drawn = false; if (submodcount>1000 || gatecountestimate>4000) { Tcl_Interp *interp = getTkenv()->getInterp(); char problem[200]; if (submodcount>1000) sprintf(problem, "contains more than 1000 submodules (exactly %d)", submodcount); else sprintf(problem, "may contain a lot of connections (modules have a large number of gates)"); CHK(Tcl_VarEval(interp,"tk_messageBox -parent ",windowname," -type yesno -title Warning -icon question " "-message {Module '", object->getFullName(), "' ", problem, ", it may take a long time to display the graphics. " "Do you want to proceed with drawing?}", NULL)); bool answer = (Tcl_GetStringResult(interp)[0]=='y'); if (answer==false) { not_drawn = true; CHK(Tcl_VarEval(interp, canvas, " delete all",NULL)); // this must be done, still return; } } // go to next seed random_seed++; recalculateLayout(); redrawModules(); redrawNextEventMarker(); redrawMessages(); updateSubmodules(); } void TGraphicalModWindow::redrawAll() { refreshLayout(); redrawModules(); redrawNextEventMarker(); redrawMessages(); updateSubmodules(); } void TGraphicalModWindow::getSubmoduleCoords(cModule *submod, bool& explicitcoords, bool& obeyslayout, int& x, int& y, int& sx, int& sy) { const cDisplayString blank; const cDisplayString& ds = submod->hasDisplayString() ? submod->getDisplayString() : blank; // get size -- we'll need to return that too, and may be needed for matrix, ring etc. layout int boxsx=0, boxsy=0, iconsx=0, iconsy=0; if (ds.containsTag("b") || !ds.containsTag("i")) { boxsx = resolveLongDispStrArg(ds.getTagArg("b",0), submod, 40); boxsy = resolveLongDispStrArg(ds.getTagArg("b",1), submod, 24); } if (ds.containsTag("i")) { const char *imgname = ds.getTagArg("i",0); const char *imgsize = ds.getTagArg("is",0); if (!imgname || !*imgname) { iconsx = UNKNOWNICON_WIDTH; iconsy = UNKNOWNICON_HEIGHT; } else { Tcl_Interp *interp = getTkenv()->getInterp(); Tcl_VarEval(interp, "lookup_image ", imgname, " ", imgsize, NULL); Tk_Image img = Tk_GetImage(interp, Tk_MainWindow(interp), Tcl_GetStringResult(interp), NULL, NULL); if (!img) { iconsx = UNKNOWNICON_WIDTH; iconsy = UNKNOWNICON_HEIGHT; } else { Tk_SizeOfImage(img, &iconsx, &iconsy); Tk_FreeImage(img); } } } sx = (boxsx>iconsx) ? boxsx : iconsx; sy = (boxsy>iconsy) ? boxsy : iconsy; // first, see if there's an explicit position ("p=" tag) given x = resolveLongDispStrArg(ds.getTagArg("p",0), submod, -1); y = resolveLongDispStrArg(ds.getTagArg("p",1), submod, -1); explicitcoords = x!=-1 && y!=-1; // set missing coordinates to zero if (x==-1) x = 0; if (y==-1) y = 0; const char *layout = ds.getTagArg("p",2); // matrix, row, column, ring, exact etc. obeyslayout = (layout && *layout); // modify x,y using predefined layouts if (!layout || !*layout) { // we're happy } else if (!strcmp(layout,"e") || !strcmp(layout,"x") || !strcmp(layout,"exact")) { int dx = resolveLongDispStrArg(ds.getTagArg("p",3), submod, 0); int dy = resolveLongDispStrArg(ds.getTagArg("p",4), submod, 0); x += dx; y += dy; } else if (!strcmp(layout,"r") || !strcmp(layout,"row")) { // perhaps we should use the size of the 1st element in the vector? int dx = resolveLongDispStrArg(ds.getTagArg("p",3), submod, 2*sx); x += submod->getIndex()*dx; } else if (!strcmp(layout,"c") || !strcmp(layout,"col") || !strcmp(layout,"column")) { int dy = resolveLongDispStrArg(ds.getTagArg("p",3), submod, 2*sy); y += submod->getIndex()*dy; } else if (!strcmp(layout,"m") || !strcmp(layout,"matrix")) { // perhaps we should use the size of the 1st element in the vector? int columns = resolveLongDispStrArg(ds.getTagArg("p",3), submod, 5); int dx = resolveLongDispStrArg(ds.getTagArg("p",4), submod, 2*sx); int dy = resolveLongDispStrArg(ds.getTagArg("p",5), submod, 2*sy); x += (submod->getIndex() % columns)*dx; y += (submod->getIndex() / columns)*dy; } else if (!strcmp(layout,"i") || !strcmp(layout,"ri") || !strcmp(layout,"ring")) { // perhaps we should use the size of the 1st element in the vector? int rx = resolveLongDispStrArg(ds.getTagArg("p",3), submod, (sx+sy)*submod->size()/4); int ry = resolveLongDispStrArg(ds.getTagArg("p",4), submod, rx); x += (int) floor(rx - rx*sin(submod->getIndex()*2*PI/submod->size())); y += (int) floor(ry - ry*cos(submod->getIndex()*2*PI/submod->size())); } else { Tcl_Interp *interp = getTkenv()->getInterp(); CHK(Tcl_VarEval(interp,"messagebox {Error} " "{Error: invalid layout `", layout, "' in `p' tag " "of display string \"", ds.str(), "\"} error ok", NULL)); } } void TGraphicalModWindow::recalculateLayout() { // refresh layout with empty submodPosMap -- everything layouted submodPosMap.clear(); refreshLayout(); } void TGraphicalModWindow::refreshLayout() { // recalculate layout, using coordinates in submodPosMap as "fixed" nodes -- // only new nodes are re-layouted cModule *parentmodule = static_cast<cModule *>(object); // Note trick avoid calling getDisplayString() directly because it'd cause // the display string object inside cModule to spring into existence const cDisplayString blank; const cDisplayString& ds = parentmodule->hasDisplayString() ? parentmodule->getDisplayString() : blank; // create and configure layouter object Tkenv::LayouterChoice choice = getTkenv()->opt_layouterchoice; if (choice==Tkenv::LAYOUTER_AUTO) { const int LIMIT = 20; // note: on test/anim/dynamic2, Advanced is already very slow with 30-40 modules int submodCountLimited = 0; for (cModule::SubmoduleIterator submod(parentmodule); !submod.end() && submodCountLimited<LIMIT; submod++) submodCountLimited++; choice = submodCountLimited>=LIMIT ? Tkenv::LAYOUTER_FAST : Tkenv::LAYOUTER_ADVANCED; } GraphLayouter *layouter = choice==Tkenv::LAYOUTER_FAST ? (GraphLayouter *) new BasicSpringEmbedderLayout() : (GraphLayouter *) new ForceDirectedGraphLayouter(); layouter->setSeed(random_seed); // background size int sx = resolveLongDispStrArg(ds.getTagArg("bgb",0), parentmodule, 0); int sy = resolveLongDispStrArg(ds.getTagArg("bgb",1), parentmodule, 0); int border = 30; if (sx!=0 && sx < 2*border) border = sx/2; if (sy!=0 && sy < 2*border) border = sy/2; layouter->setSize(sx, sy, border); // TODO support "bgp" tag ("background position") // TODO: scaling ("bgs") support for layouter. // Layouter algorithm is NOT scale-independent, so we should divide ALL coordinates // by "scale" before passing them to the layouter, then multiply back the results. // loop through all submodules, get their sizes and positions and feed them into layouting engine for (cModule::SubmoduleIterator it(parentmodule); !it.end(); it++) { cModule *submod = it(); bool explicitcoords, obeyslayout; int x, y, sx, sy; getSubmoduleCoords(submod, explicitcoords, obeyslayout, x, y, sx, sy); // add node into layouter: if (explicitcoords) { // e.g. "p=120,70" or "p=140,30,ring" layouter->addFixedNode(submod, x, y, sx, sy); } else if (submodPosMap.find(submod)!=submodPosMap.end()) { // reuse coordinates from previous layout Point pos = submodPosMap[submod]; layouter->addFixedNode(submod, pos.x, pos.y, sx, sy); } else if (obeyslayout) { // all modules are anchored to the anchor point with the vector's name // e.g. "p=,,ring" layouter->addAnchoredNode(submod, submod->getName(), x, y, sx, sy); } else { layouter->addMovableNode(submod, sx, sy); } } // add connections into the layouter, too bool parent = false; for (cModule::SubmoduleIterator it(parentmodule); !parent; it++) { cModule *mod = !it.end() ? it() : (parent=true,parentmodule); for (cModule::GateIterator i(mod); !i.end(); i++) { cGate *gate = i(); cGate *destgate = gate->getNextGate(); if (gate->getType()==(parent ? cGate::INPUT : cGate::OUTPUT) && destgate) { cModule *destmod = destgate->getOwnerModule(); if (mod==parentmodule && destmod==parentmodule) { // nop } else if (destmod==parentmodule) { layouter->addEdgeToBorder(mod); } else if (destmod->getParentModule()!=parentmodule) { // connection goes to a module under a different parent! // this in fact violates module encapsulation, but let's // accept it nevertheless. Just skip this connection. } else if (mod==parentmodule) { layouter->addEdgeToBorder(destmod); } else { layouter->addEdge(mod,destmod); } } } } // set up layouter environment (responsible for "Stop" button handling and visualizing the layouting process) Tcl_Interp *interp = getTkenv()->getInterp(); TGraphLayouterEnvironment environment(interp, parentmodule, ds); std::string stopButton = std::string(windowName()) + ".toolbar.stop"; bool isExpressMode = getTkenv()->getSimulationRunMode() == Tkenv::RUNMODE_EXPRESS; if (!isExpressMode) environment.setWidgetToGrab(stopButton.c_str()); // enable visualizing only if full re-layouting (no cached coordinates in submodPosMap) // if (getTkenv()->opt_showlayouting) // for debugging if (submodPosMap.empty() && getTkenv()->opt_showlayouting) environment.setCanvas(canvas); layouter->setEnvironment(&environment); layouter->execute(); environment.cleanup(); // fill the map with the results submodPosMap.clear(); for (cModule::SubmoduleIterator it(parentmodule); !it.end(); it++) { cModule *submod = it(); Point pos; layouter->getNodePosition(submod, pos.x, pos.y); submodPosMap[submod] = pos; } random_seed = layouter->getSeed(); delete layouter; } // requires either recalculateLayout() or refreshLayout() called before! void TGraphicalModWindow::redrawModules() { cModule *parentmodule = static_cast<cModule *>(object); Tcl_Interp *interp = getTkenv()->getInterp(); // then display all submodules CHK(Tcl_VarEval(interp, canvas, " delete dx",NULL)); // NOT "delete all" because that'd remove "bubbles" too! const cDisplayString blank; std::string buffer; const char *rawScaling = parentmodule->hasDisplayString() ? parentmodule->getDisplayString().getTagArg("bgs",0) : ""; const char *scaling = substituteDisplayStringParamRefs(rawScaling, buffer, parentmodule, true); for (cModule::SubmoduleIterator it(parentmodule); !it.end(); it++) { cModule *submod = it(); assert(submodPosMap.find(submod)!=submodPosMap.end()); Point& pos = submodPosMap[submod]; drawSubmodule(interp, submod, pos.x, pos.y, scaling); } // draw enclosing module drawEnclosingModule(interp, parentmodule, scaling); // loop through all submodules and enclosing module & draw their connections bool atparent = false; for (cModule::SubmoduleIterator it(parentmodule); !atparent; it++) { cModule *mod = !it.end() ? it() : (atparent=true,parentmodule); for (cModule::GateIterator i(mod); !i.end(); i++) { cGate *gate = i(); if (gate->getType()==(atparent ? cGate::INPUT: cGate::OUTPUT) && gate->getNextGate()!=NULL) { drawConnection(interp, gate); } } } CHK(Tcl_VarEval(interp, canvas, " raise bubble",NULL)); CHK(Tcl_VarEval(interp, "graphmodwin_setscrollregion ", windowname, " 0",NULL)); } void TGraphicalModWindow::drawSubmodule(Tcl_Interp *interp, cModule *submod, int x, int y, const char *scaling) { char coords[32]; sprintf(coords,"%d %d ", x, y); const char *dispstr = submod->hasDisplayString() ? submod->getDisplayString().str() : ""; CHK(Tcl_VarEval(interp, "draw_submod ", canvas, " ", ptrToStr(submod), " ", coords, "{", submod->getFullName(), "} ", TclQuotedString(dispstr).get(), " ", "{", scaling, "} ", NULL)); } void TGraphicalModWindow::drawEnclosingModule(Tcl_Interp *interp, cModule *parentmodule, const char *scaling) { const char *dispstr = parentmodule->hasDisplayString() ? parentmodule->getDisplayString().str() : ""; CHK(Tcl_VarEval(interp, "draw_enclosingmod ", canvas, " ", ptrToStr(parentmodule), " ", "{", parentmodule->getFullPath().c_str(), "} ", TclQuotedString(dispstr).get(), " ", "{", scaling, "} ", NULL )); } void TGraphicalModWindow::drawConnection(Tcl_Interp *interp, cGate *gate) { cModule *mod = gate->getOwnerModule(); cGate *dest_gate = gate->getNextGate(); char gateptr[32], srcptr[32], destptr[32], chanptr[32], indices[32]; // check if this is a two way connection (an other connection is pointing back // to the this gate's pair from the next gate's pair) bool twoWayConnection = false; // check if this gate is really part of an in/out gate pair // gate o-------------------->o dest_gate // gate_pair o<--------------------o dest_gate_pair if (gate->getNameSuffix()[0]) { const cGate *gate_pair = mod->gateHalf(gate->getBaseName(), gate->getType() == cGate::INPUT ? cGate::OUTPUT : cGate::INPUT, gate->isVector() ? gate->getIndex() : -1); if (dest_gate->getNameSuffix()[0]) { const cGate *dest_gate_pair = dest_gate->getOwnerModule()->gateHalf(dest_gate->getBaseName(), dest_gate->getType() == cGate::INPUT ? cGate::OUTPUT : cGate::INPUT, dest_gate->isVector() ? dest_gate->getIndex() : -1); twoWayConnection = dest_gate_pair == gate_pair->getPreviousGate(); } } ptrToStr(gate, gateptr); ptrToStr(mod, srcptr); ptrToStr(dest_gate->getOwnerModule(), destptr); sprintf(indices, "%d %d %d %d", gate->getIndex(), gate->size(), dest_gate->getIndex(), dest_gate->size()); cChannel *chan = gate->getChannel(); ptrToStr(chan, chanptr); const char *dispstr = (chan && chan->hasDisplayString()) ? chan->getDisplayString().str() : ""; CHK(Tcl_VarEval(interp, "draw_connection ", canvas, " ", gateptr, " ", TclQuotedString(dispstr).get(), " ", srcptr, " ", destptr, " ", chanptr, " ", indices, " ", twoWayConnection ? "1" : "0", NULL )); } void TGraphicalModWindow::redrawMessages() { Tcl_Interp *interp = getTkenv()->getInterp(); // refresh & cleanup from prev. events CHK(Tcl_VarEval(interp, canvas, " delete msg msgname", NULL)); // this thingy is only needed if animation is going on if (!getTkenv()->animating) return; // loop through all messages in the event queue and display them for (cMessageHeap::Iterator msg(simulation.msgQueue); !msg.end(); msg++) { char msgptr[32]; ptrToStr(msg(),msgptr); cModule *arrivalmod = simulation.getModule( msg()->getArrivalModuleId() ); if (arrivalmod && arrivalmod->getParentModule()==static_cast<cModule *>(object) && msg()->getArrivalGateId()>=0) { cGate *arrivalGate = msg()->getArrivalGate(); // if arrivalgate is connected, msg arrived on a connection, otherwise via sendDirect() if (arrivalGate->getPreviousGate()) { cGate *gate = arrivalGate->getPreviousGate(); CHK(Tcl_VarEval(interp, "graphmodwin_draw_message_on_gate ", canvas, " ", ptrToStr(gate), " ", msgptr, NULL)); } else { CHK(Tcl_VarEval(interp, "graphmodwin_draw_message_on_module ", canvas, " ", ptrToStr(arrivalmod), " ", msgptr, NULL)); } } } CHK(Tcl_VarEval(interp, canvas, " raise bubble",NULL)); } void TGraphicalModWindow::redrawNextEventMarker() { Tcl_Interp *interp = getTkenv()->getInterp(); cModule *mod = static_cast<cModule *>(object); // removing marker from previous event CHK(Tcl_VarEval(interp, canvas, " delete nexteventmarker", NULL)); // this thingy is only needed if animation is going on if (!getTkenv()->animating || !getTkenv()->opt_nexteventmarkers) return; // if any parent of the module containing the next event is on this canvas, draw marker cModule *nextmod = simulation.guessNextModule(); cModule *nextmodparent = nextmod; while (nextmodparent && nextmodparent->getParentModule()!=mod) nextmodparent = nextmodparent->getParentModule(); if (nextmodparent) { CHK(Tcl_VarEval(interp, "graphmodwin_draw_nexteventmarker ", canvas, " ", ptrToStr(nextmodparent), " ", (nextmod==nextmodparent ? "2" : "1"), NULL)); } } void TGraphicalModWindow::updateSubmodules() { Tcl_Interp *interp = getTkenv()->getInterp(); for (cModule::SubmoduleIterator submod(static_cast<cModule *>(object)); !submod.end(); submod++) { CHK(Tcl_VarEval(interp, "graphmodwin_update_submod ", canvas, " ", ptrToStr(submod()), NULL)); } } void TGraphicalModWindow::submoduleCreated(cModule *newmodule) { needs_redraw = true; } void TGraphicalModWindow::submoduleDeleted(cModule *module) { needs_redraw = true; } void TGraphicalModWindow::connectionCreated(cGate *srcgate) { needs_redraw = true; } void TGraphicalModWindow::connectionDeleted(cGate *srcgate) { needs_redraw = true; } void TGraphicalModWindow::displayStringChanged(cModule *) { needs_redraw = true; } void TGraphicalModWindow::displayStringChanged() { needs_redraw = true; //TODO check, probably only non-background tags have changed... } void TGraphicalModWindow::displayStringChanged(cGate *) { needs_redraw = true; } void TGraphicalModWindow::bubble(cModule *submod, const char *text) { Tcl_Interp *interp = getTkenv()->getInterp(); // if submod position is not yet known (because e.g. we're in fast mode // and it was dynamically created since the last update), refresh layout // so that we can get coordinates for it if (submodPosMap.find(submod)==submodPosMap.end()) refreshLayout(); cModule *parentmodule = static_cast<cModule *>(object); std::string buffer; const char *rawScaling = parentmodule->hasDisplayString() ? parentmodule->getDisplayString().getTagArg("bgs",0) : ""; const char *scaling = substituteDisplayStringParamRefs(rawScaling, buffer, parentmodule, true); // invoke Tcl code to display bubble char coords[32]; Point& pos = submodPosMap[submod]; sprintf(coords, " %d %d ", pos.x, pos.y); CHK(Tcl_VarEval(interp, "graphmodwin_bubble ", canvas, coords, " ", TclQuotedString(scaling).get(), " ", TclQuotedString(text).get(), NULL)); } int TGraphicalModWindow::inspectorCommand(Tcl_Interp *interp, int argc, const char **argv) { if (argc<1) {Tcl_SetResult(interp, TCLCONST("wrong number of args"), TCL_STATIC); return TCL_ERROR;} // supported commands: // arrowcoords, relayout, etc... if (strcmp(argv[0],"arrowcoords")==0) { return ::arrowcoords(interp,argc,argv); } else if (strcmp(argv[0],"relayout")==0) { TRY(relayoutAndRedrawAll()); return TCL_OK; } else if (strcmp(argv[0],"redraw")==0) { TRY(redrawAll()); return TCL_OK; } else if (strcmp(argv[0],"submodulecount")==0) { return getSubmoduleCount(interp,argc,argv); } else if (strcmp(argv[0],"getsubmodq")==0) { return getSubmodQ(interp,argc,argv); } else if (strcmp(argv[0],"getsubmodqlen")==0) { return getSubmodQLen(interp,argc,argv); } return TCL_ERROR; } int TGraphicalModWindow::getSubmoduleCount(Tcl_Interp *interp, int argc, const char **argv) { int count = 0; for (cModule::SubmoduleIterator submod(static_cast<cModule *>(object)); !submod.end(); submod++) count++; char buf[20]; sprintf(buf, "%d", count); Tcl_SetResult(interp, buf, TCL_VOLATILE); return TCL_OK; } int TGraphicalModWindow::getSubmodQ(Tcl_Interp *interp, int argc, const char **argv) { // args: <module ptr> <qname> if (argc!=3) {Tcl_SetResult(interp, TCLCONST("wrong number of args"), TCL_STATIC); return TCL_ERROR;} cModule *mod = dynamic_cast<cModule *>(strToPtr( argv[1] )); const char *qname = argv[2]; cQueue *q = dynamic_cast<cQueue *>(mod->findObject(qname)); char buf[21]; ptrToStr(q,buf); Tcl_SetResult(interp, buf, TCL_VOLATILE); return TCL_OK; } int TGraphicalModWindow::getSubmodQLen(Tcl_Interp *interp, int argc, const char **argv) { // args: <module ptr> <qname> if (argc!=3) {Tcl_SetResult(interp, TCLCONST("wrong number of args"), TCL_STATIC); return TCL_ERROR;} cModule *mod = dynamic_cast<cModule *>(strToPtr( argv[1] )); const char *qname = argv[2]; cQueue *q = dynamic_cast<cQueue *>(mod->findObject(qname)); //FIXME THIS MUST BE REFINED! SEARCHES WAY TOO DEEEEEP!!!! if (!q) {Tcl_SetResult(interp, TCLCONST(""), TCL_STATIC); return TCL_OK;} char buf[20]; sprintf(buf, "%d", q->length()); Tcl_SetResult(interp, buf, TCL_VOLATILE); return TCL_OK; } //======================================================================= // // class TCompoundModInspectorFactory : public cInspectorFactory // { // public: // TCompoundModInspectorFactory(const char *name) : cInspectorFactory(name) {} // // bool supportsObject(cObject *obj) {return dynamic_cast<cModule *>(obj)!=NULL;} // int inspectorType() {return INSP_OBJECT;} // double qualityAsDefault(cObject *object) {return 2.9;} // // TInspector *createInspectorFor(cObject *object,int type,const char *geom,void *data) { // return new TCompoundModInspector(object, type, geom, data); // } // }; // // Register_InspectorFactory(TCompoundModInspectorFactory); // // // TCompoundModInspector::TCompoundModInspector(cObject *obj,int typ,const char *geom,void *dat) : // TInspector(obj,typ,geom,dat) // { // } // // void TCompoundModInspector::createWindow() // { // TInspector::createWindow(); // create window name etc. // // // create inspector window by calling the specified proc with // // the object's pointer. Window name will be like ".ptr80003a9d-1" // Tcl_Interp *interp = getTkenv()->getInterp(); // CHK(Tcl_VarEval(interp, "create_compoundmodinspector ", windowname, " \"", geometry, "\"", NULL )); // } // // void TCompoundModInspector::update() // { // TInspector::update(); // // cCompoundModule *mod = static_cast<cCompoundModule *>(object); // // //setToolbarInspectButton(".toolbar.parent", mod->getParentModule(),INSP_DEFAULT); // // setEntry(".nb.info.name.e", mod->getName()); // char id[16]; sprintf(id,"%ld", (long)mod->getId()); // setLabel(".nb.info.id.e", id); // setEntry(".nb.info.dispstr.e", mod->getDisplayString()); // setEntry(".nb.info.dispstrpt.e", mod->backgroundDisplayString()); // // deleteInspectorListbox(".nb.contents"); // fillInspectorListbox(".nb.contents", mod, false); // } // // void TCompoundModInspector::writeBack() // { // cCompoundModule *mod = static_cast<cCompoundModule *>(object); // mod->setName(getEntry(".nb.info.name.e")); // mod->getDisplayString().parse(getEntry(".nb.info.dispstr.e")); // mod->backgroundDisplayString().parse(getEntry(".nb.info.dispstrpt.e")); // // TInspector::writeBack(); // must be there after all changes // } // //======================================================================= // // class TSimpleModInspectorFactory : public cInspectorFactory // { // public: // TSimpleModInspectorFactory(const char *name) : cInspectorFactory(name) {} // // bool supportsObject(cObject *obj) {return dynamic_cast<cSimpleModule *>(obj)!=NULL;} // int inspectorType() {return INSP_OBJECT;} // double qualityAsDefault(cObject *object) {return 4.0;} // // TInspector *createInspectorFor(cObject *object,int type,const char *geom,void *data) { // return new TSimpleModInspector(object, type, geom, data); // } // }; // // Register_InspectorFactory(TSimpleModInspectorFactory); // // // TSimpleModInspector::TSimpleModInspector(cObject *obj,int typ,const char *geom,void *dat) : // TInspector(obj,typ,geom,dat) // { // } // // void TSimpleModInspector::createWindow() // { // TInspector::createWindow(); // create window name etc. // // // create inspector window by calling the specified proc with // // the object's pointer. Window name will be like ".ptr80003a9d-1" // Tcl_Interp *interp = getTkenv()->getInterp(); // CHK(Tcl_VarEval(interp, "create_simplemodinspector ", windowname, " \"", geometry, "\"", NULL )); // } // // void TSimpleModInspector::update() // { // TInspector::update(); // // cSimpleModule *mod = static_cast<cSimpleModule *>(object); // // char buf[40]; // setEntry(".nb.info.name.e", mod->getName()); // sprintf(buf,"%ld", (long)mod->getId()); // setLabel(".nb.info.id.e", buf); // setEntry(".nb.info.dispstr.e", mod->getDisplayString()); // setEntry(".nb.info.dispstrpt.e", mod->backgroundDisplayString()); // setLabel(".nb.info.state.e", modstate[ mod->moduleState() ] ); // if (mod->usesActivity()) // { // unsigned stk = mod->getStackSize(); // unsigned extra = ev.getExtraStackForEnvir(); // unsigned used = mod->getStackUsage(); // sprintf(buf,"%u + %u = %u bytes", stk-extra, extra, stk); // setLabel(".nb.info.stacksize.e", buf ); // sprintf(buf,"approx. %u bytes", used); // setLabel(".nb.info.stackused.e", buf ); // } // else // { // setLabel(".nb.info.stacksize.e", "n/a" ); // setLabel(".nb.info.stackused.e", "n/a" ); // } // // deleteInspectorListbox(".nb.contents"); // fillInspectorListbox(".nb.contents", mod, false); // } // // void TSimpleModInspector::writeBack() // { // cSimpleModule *mod = static_cast<cSimpleModule *>(object); // mod->setName(getEntry(".nb.info.name.e")); // mod->getDisplayString().parse(getEntry(".nb.info.dispstr.e")); // mod->backgroundDisplayString().parse(getEntry(".nb.info.dispstrpt.e")); // // TInspector::writeBack(); // must be there after all changes // } // //======================================================================= // // class TGateInspectorFactory : public cInspectorFactory // { // public: // TGateInspectorFactory(const char *name) : cInspectorFactory(name) {} // // bool supportsObject(cObject *obj) {return dynamic_cast<cGate *>(obj)!=NULL;} // int inspectorType() {return INSP_OBJECT;} // double qualityAsDefault(cObject *object) {return 2.9;} // // TInspector *createInspectorFor(cObject *object,int type,const char *geom,void *data) { // return new TGateInspector(object, type, geom, data); // } // }; // // Register_InspectorFactory(TGateInspectorFactory); // // TGateInspector::TGateInspector(cObject *obj,int typ,const char *geom,void *dat) : // TInspector(obj,typ,geom,dat) // { // } // // void TGateInspector::createWindow() // { // TInspector::createWindow(); // create window name etc. // // // create inspector window by calling the specified proc with // // the object's pointer. Window name will be like ".ptr80003a9d-1" // Tcl_Interp *interp = getTkenv()->getInterp(); // CHK(Tcl_VarEval(interp, "create_gateinspector ", windowname, " \"", geometry, "\"", NULL )); // } // // void TGateInspector::update() // { // TInspector::update(); // // cGate *g = static_cast<cGate *>(object); // // setEntry(".nb.info.name.e", g->getName()); // char buf[64]; // sprintf(buf,"#%d", g->getId()); // setLabel(".nb.info.id.e", buf); // setEntry(".nb.info.dispstr.e", g->getDisplayString().str()); // cDatarateChannel *ch = dynamic_cast<cDatarateChannel*>(g->getChannel()); // if (ch) // { // setEntry(".nb.info.delay.e", ch->getDelay()); // setEntry(".nb.info.error.e", ch->getError()); // setEntry(".nb.info.datarate.e", ch->getDatarate()); // } // else // { // setEntry(".nb.info.delay.e", 0.0); // setEntry(".nb.info.error.e", 0.0); // setEntry(".nb.info.datarate.e", 0.0); // } // setLabel(".nb.info.trfinish.e", g->getTransmissionFinishTime()); // // setInspectButton(".nb.info.from", g->getPreviousGate(), true, INSP_DEFAULT); // setInspectButton(".nb.info.to", g->getNextGate(), true, INSP_DEFAULT); // } // // void TGateInspector::writeBack() // { // cGate *g = static_cast<cGate *>(object); // g->setName(getEntry(".nb.info.name.e")); // g->getDisplayString().parse(getEntry(".nb.info.dispstr.e")); // cDatarateChannel *ch = dynamic_cast<cDatarateChannel*>(g->getChannel()); // double delay = atof(getEntry(".nb.info.delay.e")); // double error = atof(getEntry(".nb.info.error.e")); // double datarate = atof(getEntry(".nb.info.datarate.e")); // if (delay!=0 || error!=0 || datarate!=0 || ch!=NULL) // { // if (!ch) // { // ch = new cDatarateChannel("channel"); // g->setChannel(ch); // } // ch->setDelay(delay<0 ? 0 : delay); // ch->setError(error<0 ? 0 : error>1 ? 1 : error); // ch->setDatarate(datarate<0 ? 0 : datarate); // } // // TInspector::writeBack(); // must be there after all changes // } // //======================================================================= class TGraphicalGateWindowFactory : public cInspectorFactory { public: TGraphicalGateWindowFactory(const char *name) : cInspectorFactory(name) {} bool supportsObject(cObject *obj) {return dynamic_cast<cGate *>(obj)!=NULL;} int inspectorType() {return INSP_GRAPHICAL;} double qualityAsDefault(cObject *object) {return 3.0;} TInspector *createInspectorFor(cObject *object,int type,const char *geom,void *data) { return new TGraphicalGateWindow(object, type, geom, data); } }; Register_InspectorFactory(TGraphicalGateWindowFactory); TGraphicalGateWindow::TGraphicalGateWindow(cObject *obj,int typ,const char *geom,void *dat) : TInspector(obj,typ,geom,dat) { } void TGraphicalGateWindow::createWindow() { TInspector::createWindow(); // create window name etc. strcpy(canvas,windowname); strcat(canvas,".c"); // create inspector window by calling the specified proc with // the object's pointer. Window name will be like ".ptr80003a9d-1" Tcl_Interp *interp = getTkenv()->getInterp(); CHK(Tcl_VarEval(interp, "create_graphicalgatewindow ", windowname, " \"", geometry, "\"", NULL )); } int TGraphicalGateWindow::redraw(Tcl_Interp *interp, int, const char **) { cGate *gate = (cGate *)object; CHK(Tcl_VarEval(interp, canvas, " delete all",NULL)); // draw modules int k = 0; int xsiz = 0; char prevdir = ' '; cGate *g; for (g = gate->getPathStartGate(); g!=NULL; g=g->getNextGate(),k++) { if (g->getType()==prevdir) xsiz += (g->getType()==cGate::OUTPUT) ? 1 : -1; else prevdir = g->getType(); char modptr[32], gateptr[32], kstr[16], xstr[16], dir[2]; ptrToStr(g->getOwnerModule(),modptr); ptrToStr(g,gateptr); sprintf(kstr,"%d",k); sprintf(xstr,"%d",xsiz); dir[0] = g->getType(); dir[1]=0; CHK(Tcl_VarEval(interp, "draw_module_gate ", canvas, " ", modptr, " ", gateptr, " ", "{",g->getOwnerModule()->getFullPath().c_str(), "} ", "{",g->getFullName(), "} ", kstr," ", xstr," ", dir, " ", g==gate?"1":"0", NULL )); } // draw connections for (g = gate->getPathStartGate(); g->getNextGate()!=NULL; g=g->getNextGate()) { char srcgateptr[32], destgateptr[32], chanptr[32]; ptrToStr(g,srcgateptr); ptrToStr(g->getNextGate(),destgateptr); cChannel *chan = g->getChannel(); ptrToStr(chan,chanptr); const char *dispstr = (chan && chan->hasDisplayString()) ? chan->getDisplayString().str() : ""; CHK(Tcl_VarEval(interp, "draw_conn ", canvas, " ", srcgateptr, " ", destgateptr, " ", chanptr, " ", TclQuotedString(chan?chan->info().c_str():"").get(), " ", TclQuotedString(dispstr).get(), " ", NULL )); } // loop through all messages in the event queue update(); return TCL_OK; } void TGraphicalGateWindow::update() { TInspector::update(); Tcl_Interp *interp = getTkenv()->getInterp(); cGate *gate = static_cast<cGate *>(object); // redraw modules only on explicit request // loop through all messages in the event queue CHK(Tcl_VarEval(interp, canvas, " delete msg msgname", NULL)); cGate *destgate = gate->getPathEndGate(); for (cMessageHeap::Iterator msg(simulation.msgQueue); !msg.end(); msg++) { char gateptr[32], msgptr[32]; ptrToStr(msg(),msgptr); if (msg()->getArrivalGate()== destgate) { cGate *gate = msg()->getArrivalGate(); if (gate) gate = gate->getPreviousGate(); if (gate) { CHK(Tcl_VarEval(interp, "graphmodwin_draw_message_on_gate ", canvas, " ", ptrToStr(gate,gateptr), " ", msgptr, NULL)); } } } } int TGraphicalGateWindow::inspectorCommand(Tcl_Interp *interp, int argc, const char **argv) { if (argc<1) {Tcl_SetResult(interp, TCLCONST("wrong number of args"), TCL_STATIC); return TCL_ERROR;} // supported commands: // redraw if (strcmp(argv[0],"redraw")==0) { return redraw(interp,argc,argv); } Tcl_SetResult(interp, TCLCONST("invalid arg: must be 'redraw'"), TCL_STATIC); return TCL_ERROR; } void TGraphicalGateWindow::displayStringChanged(cGate *gate) { //XXX should defer redraw (via redraw_needed) to avoid "flickering" }
[ "YanivFais@users.noreply.github.com" ]
YanivFais@users.noreply.github.com
ed6035b82953de6c1627aa34e9c77a6040166e16
a2111a80faf35749d74a533e123d9da9da108214
/raw/workshop11/workshop2011-data-20110925/sources/xfdtznywb7qjx61s/13/sandbox/my_sandbox/apps/my_app/basics.cpp
ba3296c0ada8042d89dcf673581eb28d60fa4e64
[ "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
704
cpp
/* * basics.cpp * seqan * * Created by Roland Krause on 13.09.11. * Copyright 2011 MPI for Molecular Genetics. All rights reserved. * */ #include <seqan/sequence.h> #include <seqan/basic.h> #include <iostream> using namespace seqan; template <typename TAlphabet> void showAllLetterOfMyAlphabet(TAlphabet const &) { typedef typename Size<TAlphabet>::Type TSize; TSize alphSize = ValueSize<TAlphabet>::VALUE; for (TSize i = 0; i < alphSize; ++i) std::cout << i << ',' << TAlphabet(i) << " "; std::cout << std::endl; } int main() { showAllLetterOfMyAlphabet(AminoAcid()); showAllLetterOfMyAlphabet(Dna()); showAllLetterOfMyAlphabet(Dna5()); return 0; }
[ "mail@bkahlert.com" ]
mail@bkahlert.com
8533fa9f8246ac920ef43966d4572f9e6a275566
24f26275ffcd9324998d7570ea9fda82578eeb9e
/ios/chrome/browser/component_updater/ios_component_updater_configurator.cc
5ca721e51c22660b1173a526ade54160e7b21f99
[ "BSD-3-Clause" ]
permissive
Vizionnation/chromenohistory
70a51193c8538d7b995000a1b2a654e70603040f
146feeb85985a6835f4b8826ad67be9195455402
refs/heads/master
2022-12-15T07:02:54.461083
2019-10-25T15:07:06
2019-10-25T15:07:06
217,557,501
2
1
BSD-3-Clause
2022-11-19T06:53:07
2019-10-25T14:58:54
null
UTF-8
C++
false
false
7,747
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 "ios/chrome/browser/component_updater/ios_component_updater_configurator.h" #include <stdint.h> #include <memory> #include <string> #include <vector> #include "base/containers/flat_map.h" #include "base/version.h" #include "components/component_updater/component_updater_command_line_config_policy.h" #include "components/component_updater/configurator_impl.h" #include "components/services/patch/in_process_file_patcher.h" #include "components/services/unzip/in_process_unzipper.h" #include "components/update_client/activity_data_service.h" #include "components/update_client/net/network_chromium.h" #include "components/update_client/patch/patch_impl.h" #include "components/update_client/patcher.h" #include "components/update_client/protocol_handler.h" #include "components/update_client/unzip/unzip_impl.h" #include "components/update_client/unzipper.h" #include "components/update_client/update_query_params.h" #include "ios/chrome/browser/application_context.h" #include "ios/chrome/browser/google/google_brand.h" #include "ios/chrome/common/channel_info.h" #include "services/network/public/cpp/shared_url_loader_factory.h" namespace component_updater { namespace { class IOSConfigurator : public update_client::Configurator { public: explicit IOSConfigurator(const base::CommandLine* cmdline); // update_client::Configurator overrides. int InitialDelay() const override; int NextCheckDelay() const override; int OnDemandDelay() const override; int UpdateDelay() const override; std::vector<GURL> UpdateUrl() const override; std::vector<GURL> PingUrl() const override; std::string GetProdId() const override; base::Version GetBrowserVersion() const override; std::string GetChannel() const override; std::string GetBrand() const override; std::string GetLang() const override; std::string GetOSLongName() const override; base::flat_map<std::string, std::string> ExtraRequestParams() const override; std::string GetDownloadPreference() const override; scoped_refptr<update_client::NetworkFetcherFactory> GetNetworkFetcherFactory() override; scoped_refptr<update_client::UnzipperFactory> GetUnzipperFactory() override; scoped_refptr<update_client::PatcherFactory> GetPatcherFactory() override; bool EnabledDeltas() const override; bool EnabledComponentUpdates() const override; bool EnabledBackgroundDownloader() const override; bool EnabledCupSigning() const override; PrefService* GetPrefService() const override; update_client::ActivityDataService* GetActivityDataService() const override; bool IsPerUserInstall() const override; std::vector<uint8_t> GetRunActionKeyHash() const override; std::string GetAppGuid() const override; std::unique_ptr<update_client::ProtocolHandlerFactory> GetProtocolHandlerFactory() const override; update_client::RecoveryCRXElevator GetRecoveryCRXElevator() const override; private: friend class base::RefCountedThreadSafe<IOSConfigurator>; ConfiguratorImpl configurator_impl_; scoped_refptr<update_client::NetworkFetcherFactory> network_fetcher_factory_; scoped_refptr<update_client::UnzipperFactory> unzip_factory_; scoped_refptr<update_client::PatcherFactory> patch_factory_; ~IOSConfigurator() override {} }; // Allows the component updater to use non-encrypted communication with the // update backend. The security of the update checks is enforced using // a custom message signing protocol and it does not depend on using HTTPS. IOSConfigurator::IOSConfigurator(const base::CommandLine* cmdline) : configurator_impl_(ComponentUpdaterCommandLineConfigPolicy(cmdline), false) {} int IOSConfigurator::InitialDelay() const { return configurator_impl_.InitialDelay(); } int IOSConfigurator::NextCheckDelay() const { return configurator_impl_.NextCheckDelay(); } int IOSConfigurator::OnDemandDelay() const { return configurator_impl_.OnDemandDelay(); } int IOSConfigurator::UpdateDelay() const { return configurator_impl_.UpdateDelay(); } std::vector<GURL> IOSConfigurator::UpdateUrl() const { return configurator_impl_.UpdateUrl(); } std::vector<GURL> IOSConfigurator::PingUrl() const { return configurator_impl_.PingUrl(); } std::string IOSConfigurator::GetProdId() const { return update_client::UpdateQueryParams::GetProdIdString( update_client::UpdateQueryParams::ProdId::CHROME); } base::Version IOSConfigurator::GetBrowserVersion() const { return configurator_impl_.GetBrowserVersion(); } std::string IOSConfigurator::GetChannel() const { return GetChannelString(); } std::string IOSConfigurator::GetBrand() const { std::string brand; ios::google_brand::GetBrand(&brand); return brand; } std::string IOSConfigurator::GetLang() const { return GetApplicationContext()->GetApplicationLocale(); } std::string IOSConfigurator::GetOSLongName() const { return configurator_impl_.GetOSLongName(); } base::flat_map<std::string, std::string> IOSConfigurator::ExtraRequestParams() const { return configurator_impl_.ExtraRequestParams(); } std::string IOSConfigurator::GetDownloadPreference() const { return configurator_impl_.GetDownloadPreference(); } scoped_refptr<update_client::NetworkFetcherFactory> IOSConfigurator::GetNetworkFetcherFactory() { if (!network_fetcher_factory_) { network_fetcher_factory_ = base::MakeRefCounted<update_client::NetworkFetcherChromiumFactory>( GetApplicationContext()->GetSharedURLLoaderFactory()); } return network_fetcher_factory_; } scoped_refptr<update_client::UnzipperFactory> IOSConfigurator::GetUnzipperFactory() { if (!unzip_factory_) { unzip_factory_ = base::MakeRefCounted<update_client::UnzipChromiumFactory>( base::BindRepeating(&unzip::LaunchInProcessUnzipper)); } return unzip_factory_; } scoped_refptr<update_client::PatcherFactory> IOSConfigurator::GetPatcherFactory() { if (!patch_factory_) { patch_factory_ = base::MakeRefCounted<update_client::PatchChromiumFactory>( base::BindRepeating(&patch::LaunchInProcessFilePatcher)); } return patch_factory_; } bool IOSConfigurator::EnabledDeltas() const { return configurator_impl_.EnabledDeltas(); } bool IOSConfigurator::EnabledComponentUpdates() const { return configurator_impl_.EnabledComponentUpdates(); } bool IOSConfigurator::EnabledBackgroundDownloader() const { return configurator_impl_.EnabledBackgroundDownloader(); } bool IOSConfigurator::EnabledCupSigning() const { return configurator_impl_.EnabledCupSigning(); } PrefService* IOSConfigurator::GetPrefService() const { return GetApplicationContext()->GetLocalState(); } update_client::ActivityDataService* IOSConfigurator::GetActivityDataService() const { return nullptr; } bool IOSConfigurator::IsPerUserInstall() const { return true; } std::vector<uint8_t> IOSConfigurator::GetRunActionKeyHash() const { return configurator_impl_.GetRunActionKeyHash(); } std::string IOSConfigurator::GetAppGuid() const { return configurator_impl_.GetAppGuid(); } std::unique_ptr<update_client::ProtocolHandlerFactory> IOSConfigurator::GetProtocolHandlerFactory() const { return configurator_impl_.GetProtocolHandlerFactory(); } update_client::RecoveryCRXElevator IOSConfigurator::GetRecoveryCRXElevator() const { return configurator_impl_.GetRecoveryCRXElevator(); } } // namespace scoped_refptr<update_client::Configurator> MakeIOSComponentUpdaterConfigurator( const base::CommandLine* cmdline) { return base::MakeRefCounted<IOSConfigurator>(cmdline); } } // namespace component_updater
[ "rjkroege@chromium.org" ]
rjkroege@chromium.org
0907fc56702e254c18ff6e311ca828511b214200
75d9ec182406aab369bd343512fb67f78bbc7d96
/MMVII/include/MMVII_SysSurR.h
04506d4d6225b32fef7225b0cb36073ee9722e7a
[ "LicenseRef-scancode-cecill-b-en" ]
permissive
FrankGuldstrand/micmac
e4460a0e115eda9b893825fd441f629a279805bd
f3f842164a87a54909bca525a1dd553a71032cf8
refs/heads/master
2020-07-24T02:31:00.529506
2019-09-09T12:42:28
2019-09-09T12:42:28
null
0
0
null
null
null
null
UTF-8
C++
false
false
2,852
h
#ifndef _MMVII_SysSurR_H_ #define _MMVII_SysSurR_H_ namespace MMVII { /** \file MMVII_SysSurR.h \brief Classes for linear redundant system */ /** Virtual base classe for solving an over resolved system of linear equation; Typical derived classes can be : * l1 sys using barodale methods * least square using covariance system * least square not using covariance ... */ template <class Type> class cSysSurResolu { public : cSysSurResolu(int aNbVar); /// Virtual methods => virtaul ~X() virtual ~cSysSurResolu(); /// Add aPds ( aCoeff .X = aRHS) virtual void AddObservation(const Type& aWeight,const cDenseVect<Type> & aCoeff,const Type & aRHS) = 0; /// Add aPds ( aCoeff .X = aRHS) , version sparse virtual void AddObservation(const Type& aWeight,const cSparseVect<Type> & aCoeff,const Type & aRHS) = 0; /// "Purge" all accumulated equations virtual void Reset() = 0; /// Compute a solution virtual cDenseVect<Type> Solve() = 0; /// Usefull for bench at least (check minimum) virtual Type Residual(const cDenseVect<Type> & aVect,const Type& aWeight,const cDenseVect<Type> & aCoeff,const Type & aRHS) const = 0; // ============ Fix value of variable ============= /// Fix value of curent variable, 1 variable virtual void AddObsFixVar(const Type& aWeight,int aIndVal,const Type & aVal); /// Fix value of curent variable, N variable virtual void AddObsFixVar(const Type& aWeight,const cSparseVect<Type> & aVVarVals); /// Fix value of curent variable, All variable virtual void AddObsFixVar(const Type& aWeight,const cDenseVect<Type> & aVRHS); /// Accessor int NbVar() const; private : int mNbVar; }; template <class Type> class cLeasSq : public cSysSurResolu<Type> { public : cLeasSq(int aNbVar); Type Residual(const cDenseVect<Type> & aVect,const Type& aWeight,const cDenseVect<Type> & aCoeff,const Type & aRHS) const override; }; template <class Type> class cLeasSqtAA : public cLeasSq<Type> { public : cLeasSqtAA(int aNbVar); void AddObservation(const Type& aWeight,const cDenseVect<Type> & aCoeff,const Type & aRHS) override; void AddObservation(const Type& aWeight,const cSparseVect<Type> & aCoeff,const Type & aRHS) override; void Reset() override; /// Compute a solution cDenseVect<Type> Solve() override; // Accessor, at least for debug (else why ?) const cDenseMatrix<Type> & tAA () const; const cDenseVect<Type> & tARhs () const; private : cDenseMatrix<Type> mtAA; /// Som(W tA A) cDenseVect<Type> mtARhs; /// Som(W tA Rhs) }; }; #endif // _MMVII_SysSurR_H_
[ "marc.pierrot-deseilligny@ensg.eu" ]
marc.pierrot-deseilligny@ensg.eu
73ff0bb4b0794d858d419df73f6f48f18590ef06
1de331d068456cedbd2a5b4d4a6b16145646f97d
/src/libv/sig/dummy.cpp
64d6330a5b436fe80614c76f97575f4a985e4d1c
[ "Zlib" ]
permissive
sheerluck/libv
ed37015aeeb49ea8504d7b3aa48a69bde754708f
293e382f459f0acbc540de8ef6283782b38d2e63
refs/heads/master
2023-05-26T01:18:50.817268
2021-04-18T01:06:51
2021-04-27T03:20:36
null
0
0
null
null
null
null
UTF-8
C++
false
false
128
cpp
// Project: libv.sig, File: src/libv/sig/dummy.cpp, Author: Császár Mátyás [Vader] // VSIG is a header only implementation.
[ "vaderhun@gmail.com" ]
vaderhun@gmail.com
1a9632b763ad11a57660b4dda001cf2802226112
04192d103aa82dc7d9f064624976b1ee6af523f3
/qgis/include/qgsrelation.h
c3cf829025802022d256cecdc6ead9512167b764
[]
no_license
lichaoenterprising/Template_QtPlugin
d4d6cd983efdb3f9d4b8c715883c54d0a7d73008
8cc932ccfe170e4bc19783bdfb35738d0191b4d7
refs/heads/master
2023-02-09T23:00:41.104328
2021-01-04T15:21:19
2021-01-04T15:21:19
325,731,335
0
0
null
null
null
null
UTF-8
C++
false
false
12,296
h
/*************************************************************************** qgsrelation.h -------------------------------------- Date : 29.4.2013 Copyright : (C) 2013 Matthias Kuhn Email : matthias at opengis dot ch *************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #ifndef QGSRELATION_H #define QGSRELATION_H #include <QList> #include <Qtxml\QDomNode> #include <QPair> #include "qgis_core.h" #include "qgsfields.h" #include "qgsreadwritecontext.h" #include "qgis.h" class QgsFeatureIterator; class QgsFeature; class QgsFeatureRequest; class QgsAttributes; class QgsVectorLayer; class QgsRelationPrivate; /** * \ingroup core * \class QgsRelation */ class CORE_EXPORT QgsRelation { Q_GADGET Q_PROPERTY( QString id READ id WRITE setId ) Q_PROPERTY( QgsVectorLayer *referencingLayer READ referencingLayer ) Q_PROPERTY( QgsVectorLayer *referencedLayer READ referencedLayer ) Q_PROPERTY( QString name READ name WRITE setName ) Q_PROPERTY( bool isValid READ isValid ) public: /** * enum for the relation strength * Association, Composition */ enum RelationStrength { Association, //!< Loose relation, related elements are not part of the parent and a parent copy will not copy any children. Composition //!< Fix relation, related elements are part of the parent and a parent copy will copy any children or delete of parent will delete children }; #ifndef SIP_RUN /** * \ingroup core * Defines a relation between matching fields of the two involved tables of a relation. * Often, a relation is only defined by just one FieldPair with the name of the foreign key * column of the referencing (child) table as first element and the name of the primary key column * of the referenced (parent) table as the second element. * \note not available in Python bindings */ class FieldPair : public QPair< QString, QString > { public: //! Default constructor: NULL strings FieldPair() = default; //! Constructor which takes two fields FieldPair( const QString &referencingField, const QString &referencedField ) : QPair< QString, QString >( referencingField, referencedField ) {} //! Gets the name of the referencing (child) field QString referencingField() const { return first; } //! Gets the name of the referenced (parent) field QString referencedField() const { return second; } bool operator==( const FieldPair &other ) const { return first == other.first && second == other.second; } }; #endif /** * Default constructor. Creates an invalid relation. */ QgsRelation(); ~QgsRelation(); /** * Copies a relation. * This makes a shallow copy, relations are implicitly shared and only duplicated when the copy is * changed. */ QgsRelation( const QgsRelation &other ); /** * Copies a relation. * This makes a shallow copy, relations are implicitly shared and only duplicated when the copy is * changed. */ QgsRelation &operator=( const QgsRelation &other ); /** * Creates a relation from an XML structure. Used for reading .qgs projects. * * \param node The dom node containing the relation information * \param context to pass project translator * * \returns A relation */ static QgsRelation createFromXml( const QDomNode &node, QgsReadWriteContext &context ); /** * Writes a relation to an XML structure. Used for saving .qgs projects * * \param node The parent node in which the relation will be created * \param doc The document in which the relation will be saved */ void writeXml( QDomNode &node, QDomDocument &doc ) const; /** * Set an id for this relation */ void setId( const QString &id ); /** * Set a name for this relation */ void setName( const QString &name ); /** * Set a strength for this relation * \since QGIS 3.0 */ void setStrength( RelationStrength strength ); /** * Set the referencing (child) layer id. This layer will be searched in the registry. */ void setReferencingLayer( const QString &id ); /** * Set the referenced (parent) layer id. This layer will be searched in the registry. */ void setReferencedLayer( const QString &id ); /** * Add a field pairs which is part of this relation * The first element of each pair are the field names of the foreign key. * The second element of each pair are the field names of the matching primary key. * * \param referencingField The field name on the referencing (child) layer (FK) * \param referencedField The field name on the referenced (parent) layer (PK) */ void addFieldPair( const QString &referencingField, const QString &referencedField ); /** * Add a field pairs which is part of this relation * The first element of each pair are the field names of the foreign key. * The second element of each pair are the field names of the matching primary key. * * \param fieldPair A pair of two strings * \note not available in Python bindings */ void addFieldPair( const FieldPair &fieldPair ) SIP_SKIP; /** * Creates an iterator which returns all the features on the referencing (child) layer * which have a foreign key pointing to the provided feature. * * \param feature A feature from the referenced (parent) layer * * \returns An iterator with all the referenced features * \see getRelatedFeaturesRequest() * \see getRelatedFeaturesFilter() */ QgsFeatureIterator getRelatedFeatures( const QgsFeature &feature ) const; /** * Creates a request to return all the features on the referencing (child) layer * which have a foreign key pointing to the provided feature. * * \param feature A feature from the referenced (parent) layer * * \returns A request for all the referencing features * \see getRelatedFeatures() * \see getRelatedFeaturesFilter() */ QgsFeatureRequest getRelatedFeaturesRequest( const QgsFeature &feature ) const; /** * Returns a filter expression which returns all the features on the referencing (child) layer * which have a foreign key pointing to the provided feature. * \param feature A feature from the referenced (parent) layer * \returns expression filter string for all the referencing features * \see getRelatedFeatures() * \see getRelatedFeaturesRequest() * \since QGIS 2.16 */ QString getRelatedFeaturesFilter( const QgsFeature &feature ) const; /** * Creates a request to return the feature on the referenced (parent) layer * which is referenced by the provided feature. * * \param attributes An attribute vector containing the foreign key * * \returns A request the referenced feature */ QgsFeatureRequest getReferencedFeatureRequest( const QgsAttributes &attributes ) const; /** * Creates a request to return the feature on the referenced (parent) layer * which is referenced by the provided feature. * * \param feature A feature from the referencing (child) layer * * \returns A request the referenced feature */ QgsFeatureRequest getReferencedFeatureRequest( const QgsFeature &feature ) const; /** * Creates a request to return the feature on the referenced (parent) layer * which is referenced by the provided feature. * * \param feature A feature from the referencing (child) layer * * \returns A request the referenced feature */ QgsFeature getReferencedFeature( const QgsFeature &feature ) const; /** * Returns a human readable name for this relation. Mostly used as title for the children. * * \see id() * * \returns A name */ QString name() const; /** * Returns the relation strength as a string * * \returns strength * \since QGIS 3.0 */ RelationStrength strength() const; /** * A (project-wide) unique id for this relation * * \returns The id */ QString id() const; /** * Generate a (project-wide) unique id for this relation * \since QGIS 3.0 */ void generateId(); /** * Access the referencing (child) layer's id * This is the layer which has the field(s) which point to another layer * * \returns The id of the referencing layer */ QString referencingLayerId() const; /** * Access the referencing (child) layer * This is the layer which has the field(s) which point to another layer * * \returns The referencing layer */ QgsVectorLayer *referencingLayer() const; /** * Access the referenced (parent) layer's id * * \returns The id of the referenced layer */ QString referencedLayerId() const; /** * Access the referenced (parent) layer * * \returns referenced layer */ QgsVectorLayer *referencedLayer() const; /** * Returns the field pairs which form this relation * The first element of each pair are the field names of the foreign key. * The second element of each pair are the field names of the matching primary key. * * \returns The fields forming the relation */ #ifndef SIP_RUN QList< QgsRelation::FieldPair > fieldPairs() const; #else QMap< QString, QString > fieldPairs() const; % MethodCode const QList< QgsRelation::FieldPair > &pairs = sipCpp->fieldPairs(); sipRes = new QMap< QString, QString >(); for ( const QgsRelation::FieldPair &pair : pairs ) { sipRes->insert( pair.first, pair.second ); } % End #endif /** * Returns a list of attributes used to form the referenced fields * (most likely primary key) on the referenced (parent) layer. * * \returns A list of attributes */ QgsAttributeList referencedFields() const; /** * Returns a list of attributes used to form the referencing fields * (foreign key) on the referencing (child) layer. * * \returns A list of attributes */ QgsAttributeList referencingFields() const; /** * Returns the validity of this relation. Don't use the information if it's not valid. * * \returns true if the relation is valid */ bool isValid() const; /** * Compares the two QgsRelation, ignoring the name and the ID. * * \param other The other relation * \returns true if they are similar * \since QGIS 3.0 */ bool hasEqualDefinition( const QgsRelation &other ) const; /** * Gets the referenced field counterpart given a referencing field. * * \since QGIS 3.0 */ Q_INVOKABLE QString resolveReferencedField( const QString &referencingField ) const; /** * Gets the referencing field counterpart given a referenced field. * * \since QGIS 3.0 */ Q_INVOKABLE QString resolveReferencingField( const QString &referencedField ) const; private: /** * Updates the validity status of this relation. * Will be called internally whenever a member is changed. */ void updateRelationStatus(); mutable QExplicitlySharedDataPointer<QgsRelationPrivate> d; }; // Register QgsRelation for usage with QVariant Q_DECLARE_METATYPE( QgsRelation ) Q_DECLARE_METATYPE( QgsRelation::RelationStrength ) #endif // QGSRELATION_H
[ "51834877@qq.com" ]
51834877@qq.com
dbcdc4fb70d722d59b68cbd9a853981e93ede870
9fad4848e43f4487730185e4f50e05a044f865ab
/src/cc/trees/occlusion_tracker.cc
b1319b8a7a4a5fb0ac857acdd28c89c7d413d850
[ "BSD-3-Clause" ]
permissive
dummas2008/chromium
d1b30da64f0630823cb97f58ec82825998dbb93e
82d2e84ce3ed8a00dc26c948219192c3229dfdaa
refs/heads/master
2020-12-31T07:18:45.026190
2016-04-14T03:17:45
2016-04-14T03:17:45
56,194,439
4
0
null
null
null
null
UTF-8
C++
false
false
16,256
cc
// Copyright 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "cc/trees/occlusion_tracker.h" #include <stddef.h> #include <algorithm> #include "cc/base/math_util.h" #include "cc/base/region.h" #include "cc/layers/layer.h" #include "cc/layers/layer_impl.h" #include "cc/layers/render_surface_impl.h" #include "cc/trees/layer_tree_impl.h" #include "ui/gfx/geometry/quad_f.h" #include "ui/gfx/geometry/rect_conversions.h" namespace cc { OcclusionTracker::OcclusionTracker(const gfx::Rect& screen_space_clip_rect) : screen_space_clip_rect_(screen_space_clip_rect) { } OcclusionTracker::~OcclusionTracker() { } Occlusion OcclusionTracker::GetCurrentOcclusionForLayer( const gfx::Transform& draw_transform) const { DCHECK(!stack_.empty()); const StackObject& back = stack_.back(); return Occlusion(draw_transform, back.occlusion_from_outside_target, back.occlusion_from_inside_target); } Occlusion OcclusionTracker::GetCurrentOcclusionForContributingSurface( const gfx::Transform& draw_transform) const { DCHECK(!stack_.empty()); if (stack_.size() < 2) return Occlusion(); // A contributing surface doesn't get occluded by things inside its own // surface, so only things outside the surface can occlude it. That occlusion // is found just below the top of the stack (if it exists). const StackObject& second_last = stack_[stack_.size() - 2]; return Occlusion(draw_transform, second_last.occlusion_from_outside_target, second_last.occlusion_from_inside_target); } void OcclusionTracker::EnterLayer(const LayerIteratorPosition& layer_iterator) { LayerImpl* render_target = layer_iterator.target_render_surface_layer; if (layer_iterator.represents_itself) EnterRenderTarget(render_target); else if (layer_iterator.represents_target_render_surface) FinishedRenderTarget(render_target); } void OcclusionTracker::LeaveLayer(const LayerIteratorPosition& layer_iterator) { LayerImpl* render_target = layer_iterator.target_render_surface_layer; if (layer_iterator.represents_itself) MarkOccludedBehindLayer(layer_iterator.current_layer); // TODO(danakj): This should be done when entering the contributing surface, // but in a way that the surface's own occlusion won't occlude itself. else if (layer_iterator.represents_contributing_render_surface) LeaveToRenderTarget(render_target); } static gfx::Rect ScreenSpaceClipRectInTargetSurface( const RenderSurfaceImpl* target_surface, const gfx::Rect& screen_space_clip_rect) { gfx::Transform inverse_screen_space_transform( gfx::Transform::kSkipInitialization); if (!target_surface->screen_space_transform().GetInverse( &inverse_screen_space_transform)) return target_surface->content_rect(); return MathUtil::ProjectEnclosingClippedRect(inverse_screen_space_transform, screen_space_clip_rect); } static SimpleEnclosedRegion TransformSurfaceOpaqueRegion( const SimpleEnclosedRegion& region, bool have_clip_rect, const gfx::Rect& clip_rect_in_new_target, const gfx::Transform& transform) { if (region.IsEmpty()) return region; // Verify that rects within the |surface| will remain rects in its target // surface after applying |transform|. If this is true, then apply |transform| // to each rect within |region| in order to transform the entire Region. // TODO(danakj): Find a rect interior to each transformed quad. if (!transform.Preserves2dAxisAlignment()) return SimpleEnclosedRegion(); SimpleEnclosedRegion transformed_region; for (size_t i = 0; i < region.GetRegionComplexity(); ++i) { gfx::Rect transformed_rect = MathUtil::MapEnclosedRectWith2dAxisAlignedTransform(transform, region.GetRect(i)); if (have_clip_rect) transformed_rect.Intersect(clip_rect_in_new_target); transformed_region.Union(transformed_rect); } return transformed_region; } void OcclusionTracker::EnterRenderTarget(const LayerImpl* new_target) { DCHECK(new_target->has_render_surface()); if (!stack_.empty() && stack_.back().target == new_target->render_surface()) return; const RenderSurfaceImpl* old_target_surface = NULL; const RenderSurfaceImpl* old_occlusion_immune_ancestor = NULL; if (!stack_.empty()) { old_target_surface = stack_.back().target; old_occlusion_immune_ancestor = old_target_surface->nearest_occlusion_immune_ancestor(); } const RenderSurfaceImpl* new_occlusion_immune_ancestor = new_target->render_surface()->nearest_occlusion_immune_ancestor(); stack_.push_back(StackObject(new_target->render_surface())); // We copy the screen occlusion into the new RenderSurfaceImpl subtree, but we // never copy in the occlusion from inside the target, since we are looking // at a new RenderSurfaceImpl target. // If entering an unoccluded subtree, do not carry forward the outside // occlusion calculated so far. bool entering_unoccluded_subtree = new_occlusion_immune_ancestor && new_occlusion_immune_ancestor != old_occlusion_immune_ancestor; gfx::Transform inverse_new_target_screen_space_transform( // Note carefully, not used if screen space transform is uninvertible. gfx::Transform::kSkipInitialization); bool have_transform_from_screen_to_new_target = new_target->render_surface()->screen_space_transform().GetInverse( &inverse_new_target_screen_space_transform); bool entering_root_target = new_target->layer_tree_impl()->IsRootLayer(new_target); bool copy_outside_occlusion_forward = stack_.size() > 1 && !entering_unoccluded_subtree && have_transform_from_screen_to_new_target && !entering_root_target; if (!copy_outside_occlusion_forward) return; size_t last_index = stack_.size() - 1; gfx::Transform old_target_to_new_target_transform( inverse_new_target_screen_space_transform, old_target_surface->screen_space_transform()); stack_[last_index].occlusion_from_outside_target = TransformSurfaceOpaqueRegion( stack_[last_index - 1].occlusion_from_outside_target, false, gfx::Rect(), old_target_to_new_target_transform); stack_[last_index].occlusion_from_outside_target.Union( TransformSurfaceOpaqueRegion( stack_[last_index - 1].occlusion_from_inside_target, false, gfx::Rect(), old_target_to_new_target_transform)); } void OcclusionTracker::FinishedRenderTarget(const LayerImpl* finished_target) { // Make sure we know about the target surface. EnterRenderTarget(finished_target); RenderSurfaceImpl* surface = finished_target->render_surface(); // Readbacks always happen on render targets so we only need to check // for readbacks here. bool target_is_only_for_copy_request = finished_target->HasCopyRequest() && finished_target->IsHidden(); // If the occlusion within the surface can not be applied to things outside of // the surface's subtree, then clear the occlusion here so it won't be used. if (finished_target->mask_layer() || surface->draw_opacity() < 1 || !finished_target->uses_default_blend_mode() || target_is_only_for_copy_request || finished_target->filters().HasFilterThatAffectsOpacity()) { stack_.back().occlusion_from_outside_target.Clear(); stack_.back().occlusion_from_inside_target.Clear(); } } static void ReduceOcclusionBelowSurface( const LayerImpl* contributing_layer, const gfx::Rect& surface_rect, const gfx::Transform& surface_transform, const LayerImpl* render_target, SimpleEnclosedRegion* occlusion_from_inside_target) { if (surface_rect.IsEmpty()) return; gfx::Rect affected_area_in_target = MathUtil::MapEnclosingClippedRect(surface_transform, surface_rect); if (contributing_layer->render_surface()->is_clipped()) { affected_area_in_target.Intersect( contributing_layer->render_surface()->clip_rect()); } if (affected_area_in_target.IsEmpty()) return; int outset_top, outset_right, outset_bottom, outset_left; contributing_layer->background_filters().GetOutsets( &outset_top, &outset_right, &outset_bottom, &outset_left); // The filter can move pixels from outside of the clip, so allow affected_area // to expand outside the clip. affected_area_in_target.Inset( -outset_left, -outset_top, -outset_right, -outset_bottom); SimpleEnclosedRegion affected_occlusion = *occlusion_from_inside_target; affected_occlusion.Intersect(affected_area_in_target); occlusion_from_inside_target->Subtract(affected_area_in_target); for (size_t i = 0; i < affected_occlusion.GetRegionComplexity(); ++i) { gfx::Rect occlusion_rect = affected_occlusion.GetRect(i); // Shrink the rect by expanding the non-opaque pixels outside the rect. // The left outset of the filters moves pixels on the right side of // the occlusion_rect into it, shrinking its right edge. int shrink_left = occlusion_rect.x() == affected_area_in_target.x() ? 0 : outset_right; int shrink_top = occlusion_rect.y() == affected_area_in_target.y() ? 0 : outset_bottom; int shrink_right = occlusion_rect.right() == affected_area_in_target.right() ? 0 : outset_left; int shrink_bottom = occlusion_rect.bottom() == affected_area_in_target.bottom() ? 0 : outset_top; occlusion_rect.Inset(shrink_left, shrink_top, shrink_right, shrink_bottom); occlusion_from_inside_target->Union(occlusion_rect); } } void OcclusionTracker::LeaveToRenderTarget(const LayerImpl* new_target) { DCHECK(!stack_.empty()); size_t last_index = stack_.size() - 1; DCHECK(new_target->has_render_surface()); bool surface_will_be_at_top_after_pop = stack_.size() > 1 && stack_[last_index - 1].target == new_target->render_surface(); // We merge the screen occlusion from the current RenderSurfaceImpl subtree // out to its parent target RenderSurfaceImpl. The target occlusion can be // merged out as well but needs to be transformed to the new target. const RenderSurfaceImpl* old_surface = stack_[last_index].target; const LayerImpl* old_target = new_target->layer_tree_impl()->LayerById(old_surface->OwningLayerId()); SimpleEnclosedRegion old_occlusion_from_inside_target_in_new_target = TransformSurfaceOpaqueRegion( stack_[last_index].occlusion_from_inside_target, old_surface->is_clipped(), old_surface->clip_rect(), old_surface->draw_transform()); if (old_target->has_replica() && !old_target->replica_has_mask()) { old_occlusion_from_inside_target_in_new_target.Union( TransformSurfaceOpaqueRegion( stack_[last_index].occlusion_from_inside_target, old_surface->is_clipped(), old_surface->clip_rect(), old_surface->replica_draw_transform())); } SimpleEnclosedRegion old_occlusion_from_outside_target_in_new_target = TransformSurfaceOpaqueRegion( stack_[last_index].occlusion_from_outside_target, false, gfx::Rect(), old_surface->draw_transform()); gfx::Rect unoccluded_surface_rect; gfx::Rect unoccluded_replica_rect; if (old_target->background_filters().HasFilterThatMovesPixels()) { Occlusion surface_occlusion = GetCurrentOcclusionForContributingSurface( old_surface->draw_transform()); unoccluded_surface_rect = surface_occlusion.GetUnoccludedContentRect(old_surface->content_rect()); if (old_target->has_replica()) { Occlusion replica_occlusion = GetCurrentOcclusionForContributingSurface( old_surface->replica_draw_transform()); unoccluded_replica_rect = replica_occlusion.GetUnoccludedContentRect( old_surface->content_rect()); } } if (surface_will_be_at_top_after_pop) { // Merge the top of the stack down. stack_[last_index - 1].occlusion_from_inside_target.Union( old_occlusion_from_inside_target_in_new_target); // TODO(danakj): Strictly this should subtract the inside target occlusion // before union. if (!new_target->layer_tree_impl()->IsRootLayer(new_target)) { stack_[last_index - 1].occlusion_from_outside_target.Union( old_occlusion_from_outside_target_in_new_target); } stack_.pop_back(); } else { // Replace the top of the stack with the new pushed surface. stack_.back().target = new_target->render_surface(); stack_.back().occlusion_from_inside_target = old_occlusion_from_inside_target_in_new_target; if (!new_target->layer_tree_impl()->IsRootLayer(new_target)) { stack_.back().occlusion_from_outside_target = old_occlusion_from_outside_target_in_new_target; } else { stack_.back().occlusion_from_outside_target.Clear(); } } if (!old_target->background_filters().HasFilterThatMovesPixels()) return; ReduceOcclusionBelowSurface(old_target, unoccluded_surface_rect, old_surface->draw_transform(), new_target, &stack_.back().occlusion_from_inside_target); ReduceOcclusionBelowSurface(old_target, unoccluded_surface_rect, old_surface->draw_transform(), new_target, &stack_.back().occlusion_from_outside_target); if (!old_target->has_replica()) return; ReduceOcclusionBelowSurface(old_target, unoccluded_replica_rect, old_surface->replica_draw_transform(), new_target, &stack_.back().occlusion_from_inside_target); ReduceOcclusionBelowSurface(old_target, unoccluded_replica_rect, old_surface->replica_draw_transform(), new_target, &stack_.back().occlusion_from_outside_target); } void OcclusionTracker::MarkOccludedBehindLayer(const LayerImpl* layer) { DCHECK(!stack_.empty()); DCHECK_EQ(layer->render_target(), stack_.back().target); if (layer->draw_opacity() < 1) return; if (!layer->uses_default_blend_mode()) return; if (layer->Is3dSorted()) return; SimpleEnclosedRegion opaque_layer_region = layer->VisibleOpaqueRegion(); if (opaque_layer_region.IsEmpty()) return; DCHECK(layer->visible_layer_rect().Contains(opaque_layer_region.bounds())); gfx::Transform draw_transform = layer->DrawTransform(); // TODO(danakj): Find a rect interior to each transformed quad. if (!draw_transform.Preserves2dAxisAlignment()) return; gfx::Rect clip_rect_in_target = ScreenSpaceClipRectInTargetSurface( layer->render_target(), screen_space_clip_rect_); if (layer->is_clipped()) { clip_rect_in_target.Intersect(layer->clip_rect()); } else { clip_rect_in_target.Intersect(layer->render_target()->content_rect()); } for (size_t i = 0; i < opaque_layer_region.GetRegionComplexity(); ++i) { gfx::Rect transformed_rect = MathUtil::MapEnclosedRectWith2dAxisAlignedTransform( draw_transform, opaque_layer_region.GetRect(i)); transformed_rect.Intersect(clip_rect_in_target); if (transformed_rect.width() < minimum_tracking_size_.width() && transformed_rect.height() < minimum_tracking_size_.height()) continue; stack_.back().occlusion_from_inside_target.Union(transformed_rect); } } Region OcclusionTracker::ComputeVisibleRegionInScreen( const LayerTreeImpl* layer_tree) const { DCHECK(layer_tree->root_layer()->render_surface() == stack_.back().target); const SimpleEnclosedRegion& occluded = stack_.back().occlusion_from_inside_target; Region visible_region(screen_space_clip_rect_); for (size_t i = 0; i < occluded.GetRegionComplexity(); ++i) visible_region.Subtract(occluded.GetRect(i)); return visible_region; } } // namespace cc
[ "dummas@163.com" ]
dummas@163.com
d6bdbe73e52743522851fc65ff7d2edd613537dd
3be032c14c9b659ba4c1dfd599f8c85257688317
/dist/ios/include/Fuse.Platform.StatusBarStyle.h
acc4cfb1132942b9c0e986e18acb0fbc6ff070d4
[]
no_license
gncvalente/18app
5433674c6f86d204af81290aa61eef07bb897cf5
40968aa4e3e7c044ce14cd2488313dd5a45d9b1b
refs/heads/master
2021-07-21T01:43:39.091532
2017-10-31T12:44:48
2017-10-31T12:44:48
106,106,556
3
0
null
2017-10-07T15:02:43
2017-10-07T15:02:43
null
UTF-8
C++
false
false
353
h
// This file was generated based on /usr/local/share/uno/Packages/Fuse.Platform/1.3.1/iOS/SystemUI.uno. // WARNING: Changes might be lost if you edit this file directly. #pragma once #include <Uno.Int.h> namespace g{ namespace Fuse{ namespace Platform{ // public enum StatusBarStyle :8 uEnumType* StatusBarStyle_typeof(); }}} // ::g::Fuse::Platform
[ "giuseppe.toto@gmail.com" ]
giuseppe.toto@gmail.com
59d3ecb62434f9b324e2a24228876a159f19dae3
9b3b4c0467ab61832bd2102dae22bc2e38ffd105
/Tools/EGen_v1.13.0/TestHarness/Reference/inc/TableRows.h
ffffbad89cc1785c99b58c202c296d22d44d1d90
[]
no_license
gggggtz/Src
6c37c9303f54b994f7c58c5fe2f8c94dfe9aae17
262152e1b6efb2ccb630a6e6320ae7bc01b6f933
refs/heads/master
2020-04-06T07:05:42.776707
2014-09-15T03:25:27
2014-09-15T03:25:27
null
0
0
null
null
null
null
UTF-8
C++
false
false
13,430
h
/* * Legal Notice * * This document and associated source code (the "Work") is a part of a * benchmark specification maintained by the TPC. * * The TPC reserves all right, title, and interest to the Work as provided * under U.S. and international laws, including without limitation all patent * and trademark rights therein. * * No Warranty * * 1.1 TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THE INFORMATION * CONTAINED HEREIN IS PROVIDED "AS IS" AND WITH ALL FAULTS, AND THE * AUTHORS AND DEVELOPERS OF THE WORK HEREBY DISCLAIM ALL OTHER * WARRANTIES AND CONDITIONS, EITHER EXPRESS, IMPLIED OR STATUTORY, * INCLUDING, BUT NOT LIMITED TO, ANY (IF ANY) IMPLIED WARRANTIES, * DUTIES OR CONDITIONS OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR * PURPOSE, OF ACCURACY OR COMPLETENESS OF RESPONSES, OF RESULTS, OF * WORKMANLIKE EFFORT, OF LACK OF VIRUSES, AND OF LACK OF NEGLIGENCE. * ALSO, THERE IS NO WARRANTY OR CONDITION OF TITLE, QUIET ENJOYMENT, * QUIET POSSESSION, CORRESPONDENCE TO DESCRIPTION OR NON-INFRINGEMENT * WITH REGARD TO THE WORK. * 1.2 IN NO EVENT WILL ANY AUTHOR OR DEVELOPER OF THE WORK BE LIABLE TO * ANY OTHER PARTY FOR ANY DAMAGES, INCLUDING BUT NOT LIMITED TO THE * COST OF PROCURING SUBSTITUTE GOODS OR SERVICES, LOST PROFITS, LOSS * OF USE, LOSS OF DATA, OR ANY INCIDENTAL, CONSEQUENTIAL, DIRECT, * INDIRECT, OR SPECIAL DAMAGES WHETHER UNDER CONTRACT, TORT, WARRANTY, * OR OTHERWISE, ARISING IN ANY WAY OUT OF THIS OR ANY OTHER AGREEMENT * RELATING TO THE WORK, WHETHER OR NOT SUCH AUTHOR OR DEVELOPER HAD * ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. * * Contributors * - Sergey Vasilevskiy, Doug Johnson, Larry Loen */ /****************************************************************************** * Description: Simple behaviorless structs representing a row in a table. * These are what is emitted by EGen to database loaders. ******************************************************************************/ #ifndef TABLE_ROWS_H #define TABLE_ROWS_H #include "../inc/EGenStandardTypes.h" #include "../inc/TableConsts.h" #include "../inc/DateTime.h" using namespace std; namespace TPCE { // ACCOUNT_PERMISSION table typedef struct ACCOUNT_PERMISSION_ROW { TIdent AP_CA_ID; char AP_ACL[ cACL_len+1 ]; //binary column in the table char AP_TAX_ID[ cTAX_ID_len+1 ]; char AP_L_NAME[ cL_NAME_len+1 ]; char AP_F_NAME[ cF_NAME_len+1 ]; } *PACCOUNT_PERMISSION_ROW; // ADDRESS table typedef struct ADDRESS_ROW { TIdent AD_ID; char AD_LINE1[ cAD_LINE_len+1]; char AD_LINE2[ cAD_LINE_len+1]; char AD_ZC_CODE[ cAD_ZIP_len+1 ]; char AD_CTRY[ cAD_CTRY_len+1 ]; } *PADDRESS_ROW; // BROKER table typedef struct BROKER_ROW { TIdent B_ID; char B_ST_ID[ cST_ID_len+1 ]; char B_NAME[ cB_NAME_len+1 ]; int B_NUM_TRADES; double B_COMM_TOTAL; } *PBROKER_ROW; // CASH_TRANSACTION table typedef struct CASH_TRANSACTION_ROW { TTrade CT_T_ID; CDateTime CT_DTS; double CT_AMT; char CT_NAME[cCT_NAME_len+1]; } *PCASH_TRANSACTION_ROW; // CHARGE table typedef struct CHARGE_ROW { char CH_TT_ID[cTT_ID_len+1]; int CH_C_TIER; double CH_CHRG; } *PCHARGE_ROW; // COMMISSION_RATE table typedef struct COMMISSION_RATE_ROW { int CR_C_TIER; char CR_TT_ID[cTT_ID_len+1]; char CR_EX_ID[cEX_ID_len+1]; int CR_FROM_QTY; int CR_TO_QTY; double CR_RATE; } *PCOMMISSION_RATE_ROW; // COMPANY table typedef struct COMPANY_ROW { TIdent CO_ID; char CO_ST_ID[ cST_ID_len+1 ]; char CO_NAME[ cCO_NAME_len+1 ]; char CO_IN_ID[ cIN_ID_len+1 ]; char CO_SP_RATE[ cSP_RATE_len+1 ]; char CO_CEO[ cCEO_NAME_len+1 ]; TIdent CO_AD_ID; char CO_DESC[ cCO_DESC_len+1 ]; CDateTime CO_OPEN_DATE; } *PCOMPANY_ROW; // COMPANY_COMPETITOR table typedef struct COMPANY_COMPETITOR_ROW { TIdent CP_CO_ID; TIdent CP_COMP_CO_ID; char CP_IN_ID[cIN_ID_len+1]; } *PCOMPANY_COMPETITOR_ROW; // CUSTOMER table typedef struct CUSTOMER_ROW { TIdent C_ID; char C_TAX_ID[ cTAX_ID_len+1 ]; char C_ST_ID[ cST_ID_len+1 ]; char C_L_NAME[ cL_NAME_len+1 ]; char C_F_NAME[ cF_NAME_len+1 ]; char C_M_NAME[ cM_NAME_len+1 ]; char C_GNDR; char C_TIER; CDateTime C_DOB; TIdent C_AD_ID; char C_CTRY_1[ cCTRY_len+1 ]; char C_AREA_1[ cAREA_len+1 ]; char C_LOCAL_1[ cLOCAL_len+1 ]; char C_EXT_1[ cEXT_len+1 ]; char C_CTRY_2[ cCTRY_len+1 ]; char C_AREA_2[ cAREA_len+1 ]; char C_LOCAL_2[ cLOCAL_len+1 ]; char C_EXT_2[ cEXT_len+1 ]; char C_CTRY_3[ cCTRY_len+1 ]; char C_AREA_3[ cAREA_len+1 ]; char C_LOCAL_3[ cLOCAL_len+1 ]; char C_EXT_3[ cEXT_len+1 ]; char C_EMAIL_1[ cEMAIL_len+1 ]; char C_EMAIL_2[ cEMAIL_len+1 ]; CUSTOMER_ROW() : C_ID(0) {}; } *PCUSTOMER_ROW; // CUSTOMER_ACCOUNT table typedef struct CUSTOMER_ACCOUNT_ROW { TIdent CA_ID; TIdent CA_B_ID; TIdent CA_C_ID; char CA_NAME[ cCA_NAME_len+1 ]; char CA_TAX_ST; double CA_BAL; } *PCUSTOMER_ACCOUNT_ROW; // CUSTOMER_TAXRATE table typedef struct CUSTOMER_TAXRATE_ROW { char CX_TX_ID[ cTX_ID_len+1 ]; TIdent CX_C_ID; } *PCUSTOMER_TAXRATE_ROW; // DAILY_MARKET table typedef struct DAILY_MARKET_ROW { CDateTime DM_DATE; char DM_S_SYMB[cSYMBOL_len+1]; double DM_CLOSE; double DM_HIGH; double DM_LOW; INT64 DM_VOL; } *PDAILY_MARKET_ROW; // EXCHANGE table typedef struct EXCHANGE_ROW { char EX_ID[ cEX_ID_len+1 ]; char EX_NAME[ cEX_NAME_len+1 ]; int EX_NUM_SYMB; int EX_OPEN; int EX_CLOSE; char EX_DESC[ cEX_DESC_len+1 ]; TIdent EX_AD_ID; } *PEXCHANGE_ROW; // FINANCIAL table typedef struct FINANCIAL_ROW { TIdent FI_CO_ID; int FI_YEAR; int FI_QTR; CDateTime FI_QTR_START_DATE; double FI_REVENUE; double FI_NET_EARN; double FI_BASIC_EPS; double FI_DILUT_EPS; double FI_MARGIN; double FI_INVENTORY; double FI_ASSETS; double FI_LIABILITY; INT64 FI_OUT_BASIC; INT64 FI_OUT_DILUT; } *PFINANCIAL_ROW; // HOLDING table typedef struct HOLDING_ROW { TTrade H_T_ID; TIdent H_CA_ID; char H_S_SYMB[ cSYMBOL_len+1 ]; CDateTime H_DTS; double H_PRICE; int H_QTY; } *PHOLDING_ROW; // HOLDING_HISTORY table typedef struct HOLDING_HISTORY_ROW { TTrade HH_H_T_ID; TTrade HH_T_ID; int HH_BEFORE_QTY; int HH_AFTER_QTY; } *PHOLDING_HISTORY_ROW; // HOLDING_SUMMARY table typedef struct HOLDING_SUMMARY_ROW { TIdent HS_CA_ID; char HS_S_SYMB[ cSYMBOL_len+1 ]; int HS_QTY; } *PHOLDING_SUMMARY_ROW; // INDUSTRY table typedef struct INDUSTRY_ROW { char IN_ID[cIN_ID_len+1]; char IN_NAME[cIN_NAME_len+1]; char IN_SC_ID[cSC_ID_len+1]; } *PINDUSTRY_ROW; // LAST_TRADE table typedef struct LAST_TRADE_ROW { char LT_S_SYMB[cSYMBOL_len+1]; CDateTime LT_DTS; double LT_PRICE; double LT_OPEN_PRICE; INT64 LT_VOL; } *PLAST_TRADE_ROW; // NEWS_ITEM table typedef struct NEWS_ITEM_ROW { TIdent NI_ID; char NI_HEADLINE[cNI_HEADLINE_len+1]; char NI_SUMMARY[cNI_SUMMARY_len+1]; char NI_ITEM[cNI_ITEM_len+1]; CDateTime NI_DTS; char NI_SOURCE[cNI_SOURCE_len+1]; char NI_AUTHOR[cNI_AUTHOR_len+1]; } *PNEWS_ITEM_ROW; // NEWS_XREF table typedef struct NEWS_XREF_ROW { TIdent NX_NI_ID; TIdent NX_CO_ID; } *PNEWS_XREF_ROW; // SECTOR table typedef struct SECTOR_ROW { char SC_ID[cSC_ID_len+1]; char SC_NAME[cSC_NAME_len+1]; } *PSECTOR_ROW; // SECURITY table typedef struct SECURITY_ROW { char S_SYMB[ cSYMBOL_len+1 ]; char S_ISSUE[ cS_ISSUE_len+1 ]; char S_ST_ID[ cST_ID_len+1 ]; char S_NAME[ cS_NAME_len+1 ]; char S_EX_ID[ cEX_ID_len+1 ]; TIdent S_CO_ID; INT64 S_NUM_OUT; CDateTime S_START_DATE; CDateTime S_EXCH_DATE; double S_PE; float S_52WK_HIGH; CDateTime S_52WK_HIGH_DATE; float S_52WK_LOW; CDateTime S_52WK_LOW_DATE; double S_DIVIDEND; double S_YIELD; } *PSECURITY_ROW; // SETTLEMENT table typedef struct SETTLEMENT_ROW { TTrade SE_T_ID; char SE_CASH_TYPE[cSE_CASH_TYPE_len+1]; CDateTime SE_CASH_DUE_DATE; double SE_AMT; } *PSETTLEMENT_ROW; // STATUS_TYPE table typedef struct STATUS_TYPE_ROW { char ST_ID[cST_ID_len+1]; char ST_NAME[cST_NAME_len+1]; } *PSTATUS_TYPE_ROW; // TAXRATE table typedef struct TAX_RATE_ROW { char TX_ID[ cTX_ID_len+1 ]; char TX_NAME[ cTX_NAME_len+1 ]; double TX_RATE; } *PTAX_RATE_ROW; // TRADE table typedef struct TRADE_ROW { TTrade T_ID; CDateTime T_DTS; char T_ST_ID[ cST_ID_len+1 ]; char T_TT_ID[ cTT_ID_len+1 ]; bool T_IS_CASH; char T_S_SYMB[ cSYMBOL_len+1 ]; int T_QTY; double T_BID_PRICE; TIdent T_CA_ID; char T_EXEC_NAME[ cEXEC_NAME_len+1 ]; double T_TRADE_PRICE; double T_CHRG; double T_COMM; double T_TAX; bool T_LIFO; } *PTRADE_ROW; // TRADE_HISTORY table typedef struct TRADE_HISTORY_ROW { TTrade TH_T_ID; CDateTime TH_DTS; char TH_ST_ID[cST_ID_len+1]; } *PTRADE_HISTORY_ROW; // TRADE_REQUEST table typedef struct TRADE_REQUEST_ROW { TTrade TR_T_ID; char TR_TT_ID[ cTT_ID_len+1 ]; char TR_S_SYMB[ cSYMBOL_len+1 ]; int TR_QTY; double TR_BID_PRICE; TIdent TR_B_ID; } *PTRADE_REQUEST_ROW; // TRADE_TYPE table typedef struct TRADE_TYPE_ROW { char TT_ID[ cTT_ID_len+1 ]; char TT_NAME[ cTT_NAME_len+1 ]; bool TT_IS_SELL; bool TT_IS_MRKT; } *PTRADE_TYPE_ROW; // WATCH_ITEM table typedef struct WATCH_ITEM_ROW { TIdent WI_WL_ID; char WI_S_SYMB[ cSYMBOL_len+1 ]; } *PWATCH_ITEM_ROW; // WATCH_LIST table typedef struct WATCH_LIST_ROW { TIdent WL_ID; TIdent WL_C_ID; } *PWATCH_LIST_ROW; // ZIP_CODE table typedef struct ZIP_CODE_ROW { char ZC_CODE[cZC_CODE_len+1]; char ZC_TOWN[cZC_TOWN_len+1]; char ZC_DIV[cZC_DIV_len+1]; } *PZIP_CODE_ROW; } // namespace TPCE #endif // #ifndef TABLE_ROWS_H
[ "gggggtz@hotmail.com" ]
gggggtz@hotmail.com
017faf1177f3e507a8e8ff6f345aaade34710fe7
96ad4472f36ef5534de298188150d0ca68cff5d0
/src/s390/assembler-s390.h
cb14dae6675b44b8a8e650d5fd78e14d88aab4c9
[ "SunPro", "bzip2-1.0.6", "BSD-3-Clause" ]
permissive
xiazemin/v8
ba0401fd044acec9c5504240e8d9dacc668a0e0f
d4a108078d93a58fb2c296a59328f25980ded3ea
refs/heads/master
2021-01-21T12:20:22.485156
2017-06-22T22:14:24
2017-06-22T22:14:24
95,180,489
1
0
null
2017-06-23T03:40:30
2017-06-23T03:40:29
null
UTF-8
C++
false
false
57,619
h
// Copyright (c) 1994-2006 Sun Microsystems Inc. // 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. // // - Redistribution 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 Sun Microsystems or the names of contributors may // be used to endorse or promote products derived from this software without // specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES // (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED // OF THE POSSIBILITY OF SUCH DAMAGE. // The original source code covered by the above license above has been // modified significantly by Google Inc. // Copyright 2014 the V8 project authors. All rights reserved. // A light-weight S390 Assembler // Generates user mode instructions for z/Architecture #ifndef V8_S390_ASSEMBLER_S390_H_ #define V8_S390_ASSEMBLER_S390_H_ #include <stdio.h> #if V8_HOST_ARCH_S390 // elf.h include is required for auxv check for STFLE facility used // for hardware detection, which is sensible only on s390 hosts. #include <elf.h> #endif #include <fcntl.h> #include <unistd.h> #include "src/assembler.h" #include "src/s390/constants-s390.h" #define ABI_USES_FUNCTION_DESCRIPTORS 0 #define ABI_PASSES_HANDLES_IN_REGS 1 // ObjectPair is defined under runtime/runtime-util.h. // On 31-bit, ObjectPair == uint64_t. ABI dictates long long // be returned with the lower addressed half in r2 // and the higher addressed half in r3. (Returns in Regs) // On 64-bit, ObjectPair is a Struct. ABI dictaes Structs be // returned in a storage buffer allocated by the caller, // with the address of this buffer passed as a hidden // argument in r2. (Does NOT return in Regs) // For x86 linux, ObjectPair is returned in registers. #if V8_TARGET_ARCH_S390X #define ABI_RETURNS_OBJECTPAIR_IN_REGS 0 #else #define ABI_RETURNS_OBJECTPAIR_IN_REGS 1 #endif #define ABI_CALL_VIA_IP 1 #define INSTR_AND_DATA_CACHE_COHERENCY LWSYNC namespace v8 { namespace internal { // clang-format off #define GENERAL_REGISTERS(V) \ V(r0) V(r1) V(r2) V(r3) V(r4) V(r5) V(r6) V(r7) \ V(r8) V(r9) V(r10) V(fp) V(ip) V(r13) V(r14) V(sp) #define ALLOCATABLE_GENERAL_REGISTERS(V) \ V(r2) V(r3) V(r4) V(r5) V(r6) V(r7) \ V(r8) V(r9) V(r13) #define DOUBLE_REGISTERS(V) \ V(d0) V(d1) V(d2) V(d3) V(d4) V(d5) V(d6) V(d7) \ V(d8) V(d9) V(d10) V(d11) V(d12) V(d13) V(d14) V(d15) #define FLOAT_REGISTERS DOUBLE_REGISTERS #define SIMD128_REGISTERS DOUBLE_REGISTERS #define ALLOCATABLE_DOUBLE_REGISTERS(V) \ V(d1) V(d2) V(d3) V(d4) V(d5) V(d6) V(d7) \ V(d8) V(d9) V(d10) V(d11) V(d12) V(d15) V(d0) // clang-format on // CPU Registers. // // 1) We would prefer to use an enum, but enum values are assignment- // compatible with int, which has caused code-generation bugs. // // 2) We would prefer to use a class instead of a struct but we don't like // the register initialization to depend on the particular initialization // order (which appears to be different on OS X, Linux, and Windows for the // installed versions of C++ we tried). Using a struct permits C-style // "initialization". Also, the Register objects cannot be const as this // forces initialization stubs in MSVC, making us dependent on initialization // order. // // 3) By not using an enum, we are possibly preventing the compiler from // doing certain constant folds, which may significantly reduce the // code generated for some assembly instructions (because they boil down // to a few constants). If this is a problem, we could change the code // such that we use an enum in optimized mode, and the struct in debug // mode. This way we get the compile-time error checking in debug mode // and best performance in optimized code. struct Register { enum Code { #define REGISTER_CODE(R) kCode_##R, GENERAL_REGISTERS(REGISTER_CODE) #undef REGISTER_CODE kAfterLast, kCode_no_reg = -1 }; static constexpr int kNumRegisters = Code::kAfterLast; #define REGISTER_COUNT(R) 1 + static constexpr int kNumAllocatable = ALLOCATABLE_GENERAL_REGISTERS(REGISTER_COUNT) 0; #undef REGISTER_COUNT #define REGISTER_BIT(R) 1 << kCode_##R | static constexpr RegList kAllocatable = ALLOCATABLE_GENERAL_REGISTERS(REGISTER_BIT) 0; #undef REGISTER_BIT static Register from_code(int code) { DCHECK(code >= 0); DCHECK(code < kNumRegisters); Register r = {code}; return r; } bool is_valid() const { return 0 <= reg_code && reg_code < kNumRegisters; } bool is(Register reg) const { return reg_code == reg.reg_code; } int code() const { DCHECK(is_valid()); return reg_code; } int bit() const { DCHECK(is_valid()); return 1 << reg_code; } void set_code(int code) { reg_code = code; DCHECK(is_valid()); } #if V8_TARGET_LITTLE_ENDIAN static constexpr int kMantissaOffset = 0; static constexpr int kExponentOffset = 4; #else static constexpr int kMantissaOffset = 4; static constexpr int kExponentOffset = 0; #endif // Unfortunately we can't make this private in a struct. int reg_code; }; typedef struct Register Register; #define DEFINE_REGISTER(R) constexpr Register R = {Register::kCode_##R}; GENERAL_REGISTERS(DEFINE_REGISTER) #undef DEFINE_REGISTER constexpr Register no_reg = {Register::kCode_no_reg}; // Register aliases constexpr Register kLithiumScratch = r1; // lithium scratch. constexpr Register kRootRegister = r10; // Roots array pointer. constexpr Register cp = r13; // JavaScript context pointer. constexpr bool kSimpleFPAliasing = true; constexpr bool kSimdMaskRegisters = false; // Double word FP register. struct DoubleRegister { enum Code { #define REGISTER_CODE(R) kCode_##R, DOUBLE_REGISTERS(REGISTER_CODE) #undef REGISTER_CODE kAfterLast, kCode_no_reg = -1 }; static constexpr int kNumRegisters = Code::kAfterLast; static constexpr int kMaxNumRegisters = kNumRegisters; bool is_valid() const { return 0 <= reg_code && reg_code < kNumRegisters; } bool is(DoubleRegister reg) const { return reg_code == reg.reg_code; } int code() const { DCHECK(is_valid()); return reg_code; } int bit() const { DCHECK(is_valid()); return 1 << reg_code; } static DoubleRegister from_code(int code) { DoubleRegister r = {code}; return r; } int reg_code; }; typedef DoubleRegister FloatRegister; // TODO(john.yan) Define SIMD registers. typedef DoubleRegister Simd128Register; #define DEFINE_REGISTER(R) \ constexpr DoubleRegister R = {DoubleRegister::kCode_##R}; DOUBLE_REGISTERS(DEFINE_REGISTER) #undef DEFINE_REGISTER constexpr Register no_dreg = {Register::kCode_no_reg}; constexpr DoubleRegister kDoubleRegZero = d14; constexpr DoubleRegister kScratchDoubleReg = d13; Register ToRegister(int num); // Coprocessor register struct CRegister { bool is_valid() const { return 0 <= reg_code && reg_code < 8; } bool is(CRegister creg) const { return reg_code == creg.reg_code; } int code() const { DCHECK(is_valid()); return reg_code; } int bit() const { DCHECK(is_valid()); return 1 << reg_code; } // Unfortunately we can't make this private in a struct. int reg_code; }; constexpr CRegister no_creg = {-1}; constexpr CRegister cr0 = {0}; constexpr CRegister cr1 = {1}; constexpr CRegister cr2 = {2}; constexpr CRegister cr3 = {3}; constexpr CRegister cr4 = {4}; constexpr CRegister cr5 = {5}; constexpr CRegister cr6 = {6}; constexpr CRegister cr7 = {7}; // ----------------------------------------------------------------------------- // Machine instruction Operands #if V8_TARGET_ARCH_S390X constexpr RelocInfo::Mode kRelocInfo_NONEPTR = RelocInfo::NONE64; #else constexpr RelocInfo::Mode kRelocInfo_NONEPTR = RelocInfo::NONE32; #endif // Class Operand represents a shifter operand in data processing instructions // defining immediate numbers and masks typedef uint8_t Length; struct Mask { uint8_t mask; uint8_t value() { return mask; } static Mask from_value(uint8_t input) { DCHECK(input <= 0x0F); Mask m = {input}; return m; } }; class Operand BASE_EMBEDDED { public: // immediate INLINE(explicit Operand(intptr_t immediate, RelocInfo::Mode rmode = kRelocInfo_NONEPTR)); INLINE(static Operand Zero()) { return Operand(static_cast<intptr_t>(0)); } INLINE(explicit Operand(const ExternalReference& f)); explicit Operand(Handle<Object> handle); INLINE(explicit Operand(Smi* value)); // rm INLINE(explicit Operand(Register rm)); // Return true if this is a register operand. INLINE(bool is_reg() const); bool must_output_reloc_info(const Assembler* assembler) const; inline intptr_t immediate() const { DCHECK(!rm_.is_valid()); return imm_; } inline void setBits(int n) { imm_ = (static_cast<uint32_t>(imm_) << (32 - n)) >> (32 - n); } Register rm() const { return rm_; } private: Register rm_; intptr_t imm_; // valid if rm_ == no_reg RelocInfo::Mode rmode_; friend class Assembler; friend class MacroAssembler; }; typedef int32_t Disp; // Class MemOperand represents a memory operand in load and store instructions // On S390, we have various flavours of memory operands: // 1) a base register + 16 bit unsigned displacement // 2) a base register + index register + 16 bit unsigned displacement // 3) a base register + index register + 20 bit signed displacement class MemOperand BASE_EMBEDDED { public: explicit MemOperand(Register rx, Disp offset = 0); explicit MemOperand(Register rx, Register rb, Disp offset = 0); int32_t offset() const { return offset_; } uint32_t getDisplacement() const { return offset(); } // Base register Register rb() const { DCHECK(!baseRegister.is(no_reg)); return baseRegister; } Register getBaseRegister() const { return rb(); } // Index Register Register rx() const { DCHECK(!indexRegister.is(no_reg)); return indexRegister; } Register getIndexRegister() const { return rx(); } private: Register baseRegister; // base Register indexRegister; // index int32_t offset_; // offset friend class Assembler; }; class DeferredRelocInfo { public: DeferredRelocInfo() {} DeferredRelocInfo(int position, RelocInfo::Mode rmode, intptr_t data) : position_(position), rmode_(rmode), data_(data) {} int position() const { return position_; } RelocInfo::Mode rmode() const { return rmode_; } intptr_t data() const { return data_; } private: int position_; RelocInfo::Mode rmode_; intptr_t data_; }; class Assembler : public AssemblerBase { public: // Create an assembler. Instructions and relocation information are emitted // into a buffer, with the instructions starting from the beginning and the // relocation information starting from the end of the buffer. See CodeDesc // for a detailed comment on the layout (globals.h). // // If the provided buffer is NULL, the assembler allocates and grows its own // buffer, and buffer_size determines the initial buffer size. The buffer is // owned by the assembler and deallocated upon destruction of the assembler. // // If the provided buffer is not NULL, the assembler uses the provided buffer // for code generation and assumes its size to be buffer_size. If the buffer // is too small, a fatal error occurs. No deallocation of the buffer is done // upon destruction of the assembler. Assembler(Isolate* isolate, void* buffer, int buffer_size) : Assembler(IsolateData(isolate), buffer, buffer_size) {} Assembler(IsolateData isolate_data, void* buffer, int buffer_size); virtual ~Assembler() {} // GetCode emits any pending (non-emitted) code and fills the descriptor // desc. GetCode() is idempotent; it returns the same result if no other // Assembler functions are invoked in between GetCode() calls. void GetCode(Isolate* isolate, CodeDesc* desc); // Label operations & relative jumps (PPUM Appendix D) // // Takes a branch opcode (cc) and a label (L) and generates // either a backward branch or a forward branch and links it // to the label fixup chain. Usage: // // Label L; // unbound label // j(cc, &L); // forward branch to unbound label // bind(&L); // bind label to the current pc // j(cc, &L); // backward branch to bound label // bind(&L); // illegal: a label may be bound only once // // Note: The same Label can be used for forward and backward branches // but it may be bound only once. void bind(Label* L); // binds an unbound label L to the current code position // Links a label at the current pc_offset(). If already bound, returns the // bound position. If already linked, returns the position of the prior link. // Otherwise, returns the current pc_offset(). int link(Label* L); // Determines if Label is bound and near enough so that a single // branch instruction can be used to reach it. bool is_near(Label* L, Condition cond); // Returns the branch offset to the given label from the current code position // Links the label to the current position if it is still unbound int branch_offset(Label* L) { return link(L) - pc_offset(); } // Puts a labels target address at the given position. // The high 8 bits are set to zero. void label_at_put(Label* L, int at_offset); void load_label_offset(Register r1, Label* L); // Read/Modify the code target address in the branch/call instruction at pc. // The isolate argument is unused (and may be nullptr) when skipping flushing. INLINE(static Address target_address_at(Address pc, Address constant_pool)); INLINE(static void set_target_address_at( Isolate* isolate, Address pc, Address constant_pool, Address target, ICacheFlushMode icache_flush_mode = FLUSH_ICACHE_IF_NEEDED)); INLINE(static Address target_address_at(Address pc, Code* code)); INLINE(static void set_target_address_at( Isolate* isolate, Address pc, Code* code, Address target, ICacheFlushMode icache_flush_mode = FLUSH_ICACHE_IF_NEEDED)); // Return the code target address at a call site from the return address // of that call in the instruction stream. inline static Address target_address_from_return_address(Address pc); static void set_heap_number(Handle<HeapObject> number, Address pc) { UNIMPLEMENTED(); } // Given the address of the beginning of a call, return the address // in the instruction stream that the call will return to. INLINE(static Address return_address_from_call_start(Address pc)); inline Handle<Object> code_target_object_handle_at(Address pc); // This sets the branch destination. // This is for calls and branches within generated code. inline static void deserialization_set_special_target_at( Isolate* isolate, Address instruction_payload, Code* code, Address target); // This sets the internal reference at the pc. inline static void deserialization_set_target_internal_reference_at( Isolate* isolate, Address pc, Address target, RelocInfo::Mode mode = RelocInfo::INTERNAL_REFERENCE); // Here we are patching the address in the IIHF/IILF instruction pair. // These values are used in the serialization process and must be zero for // S390 platform, as Code, Embedded Object or External-reference pointers // are split across two consecutive instructions and don't exist separately // in the code, so the serializer should not step forwards in memory after // a target is resolved and written. static constexpr int kSpecialTargetSize = 0; // Number of bytes for instructions used to store pointer sized constant. #if V8_TARGET_ARCH_S390X static constexpr int kBytesForPtrConstant = 12; // IIHF + IILF #else static constexpr int kBytesForPtrConstant = 6; // IILF #endif // Distance between the instruction referring to the address of the call // target and the return address. // Offset between call target address and return address // for BRASL calls // Patch will be appiled to other FIXED_SEQUENCE call static constexpr int kCallTargetAddressOffset = 6; // The length of FIXED_SEQUENCE call // iihf r8, <address_hi> // <64-bit only> // iilf r8, <address_lo> // basr r14, r8 #if V8_TARGET_ARCH_S390X static constexpr int kCallSequenceLength = 14; #else static constexpr int kCallSequenceLength = 8; #endif // This is the length of the BreakLocationIterator::SetDebugBreakAtReturn() // code patch FIXED_SEQUENCE in bytes! // JS Return Sequence = Call Sequence + BKPT // static constexpr int kJSReturnSequenceLength = kCallSequenceLength + 2; // This is the length of the code sequence from SetDebugBreakAtSlot() // FIXED_SEQUENCE in bytes! static constexpr int kDebugBreakSlotLength = kCallSequenceLength; static constexpr int kPatchDebugBreakSlotReturnOffset = kCallTargetAddressOffset; // Length to patch between the start of the JS return sequence // from SetDebugBreakAtReturn and the address from // break_address_from_return_address. // // frame->pc() in Debug::SetAfterBreakTarget will point to BKPT in // JS return sequence, so the length to patch will not include BKPT // instruction length. // static constexpr int kPatchReturnSequenceAddressOffset = // kCallSequenceLength - kPatchDebugBreakSlotReturnOffset; // Length to patch between the start of the FIXED call sequence from // SetDebugBreakAtSlot() and the the address from // break_address_from_return_address. static constexpr int kPatchDebugBreakSlotAddressOffset = kDebugBreakSlotLength - kPatchDebugBreakSlotReturnOffset; static inline int encode_crbit(const CRegister& cr, enum CRBit crbit) { return ((cr.code() * CRWIDTH) + crbit); } // --------------------------------------------------------------------------- // Code generation template <class T, int size, int lo, int hi> inline T getfield(T value) { DCHECK(lo < hi); DCHECK(size > 0); int mask = hi - lo; int shift = size * 8 - hi; uint32_t mask_value = (mask == 32) ? 0xffffffff : (1 << mask) - 1; return (value & mask_value) << shift; } // Declare generic instruction formats by fields inline void e_format(Opcode opcode) { emit2bytes(getfield<uint16_t, 2, 0, 16>(opcode)); } inline void i_format(Opcode opcode, int f1) { emit2bytes(getfield<uint16_t, 2, 0, 8>(opcode) | getfield<uint16_t, 2, 8, 16>(f1)); } inline void ie_format(Opcode opcode, int f1, int f2) { emit4bytes(getfield<uint32_t, 4, 0, 16>(opcode) | getfield<uint32_t, 4, 24, 28>(f1) | getfield<uint32_t, 4, 28, 32>(f2)); } inline void mii_format(Opcode opcode, int f1, int f2, int f3) { emit6bytes( getfield<uint64_t, 6, 0, 8>(opcode) | getfield<uint64_t, 6, 8, 12>(f1) | getfield<uint64_t, 6, 12, 24>(f2) | getfield<uint64_t, 6, 24, 48>(f3)); } inline void ri_format(Opcode opcode, int f1, int f2) { uint32_t op1 = opcode >> 4; uint32_t op2 = opcode & 0xf; emit4bytes( getfield<uint32_t, 4, 0, 8>(op1) | getfield<uint32_t, 4, 8, 12>(f1) | getfield<uint32_t, 4, 12, 16>(op2) | getfield<uint32_t, 4, 16, 32>(f2)); } inline void rie_1_format(Opcode opcode, int f1, int f2, int f3, int f4) { uint32_t op1 = opcode >> 8; uint32_t op2 = opcode & 0xff; emit6bytes( getfield<uint64_t, 6, 0, 8>(op1) | getfield<uint64_t, 6, 8, 12>(f1) | getfield<uint64_t, 6, 12, 16>(f2) | getfield<uint64_t, 6, 16, 32>(f3) | getfield<uint64_t, 6, 32, 36>(f4) | getfield<uint64_t, 6, 40, 48>(op2)); } inline void rie_2_format(Opcode opcode, int f1, int f2, int f3, int f4) { uint32_t op1 = opcode >> 8; uint32_t op2 = opcode & 0xff; emit6bytes( getfield<uint64_t, 6, 0, 8>(op1) | getfield<uint64_t, 6, 8, 12>(f1) | getfield<uint64_t, 6, 12, 16>(f2) | getfield<uint64_t, 6, 16, 32>(f3) | getfield<uint64_t, 6, 32, 40>(f4) | getfield<uint64_t, 6, 40, 48>(op2)); } inline void rie_3_format(Opcode opcode, int f1, int f2, int f3, int f4, int f5) { uint32_t op1 = opcode >> 8; uint32_t op2 = opcode & 0xff; emit6bytes( getfield<uint64_t, 6, 0, 8>(op1) | getfield<uint64_t, 6, 8, 12>(f1) | getfield<uint64_t, 6, 12, 16>(f2) | getfield<uint64_t, 6, 16, 24>(f3) | getfield<uint64_t, 6, 24, 32>(f4) | getfield<uint64_t, 6, 32, 40>(f5) | getfield<uint64_t, 6, 40, 48>(op2)); } #define DECLARE_S390_RIL_AB_INSTRUCTIONS(name, op_name, op_value) \ template <class R1> \ inline void name(R1 r1, const Operand& i2) { \ ril_format(op_name, r1.code(), i2.immediate()); \ } #define DECLARE_S390_RIL_C_INSTRUCTIONS(name, op_name, op_value) \ inline void name(Condition m1, const Operand& i2) { \ ril_format(op_name, m1, i2.immediate()); \ } inline void ril_format(Opcode opcode, int f1, int f2) { uint32_t op1 = opcode >> 4; uint32_t op2 = opcode & 0xf; emit6bytes( getfield<uint64_t, 6, 0, 8>(op1) | getfield<uint64_t, 6, 8, 12>(f1) | getfield<uint64_t, 6, 12, 16>(op2) | getfield<uint64_t, 6, 16, 48>(f2)); } S390_RIL_A_OPCODE_LIST(DECLARE_S390_RIL_AB_INSTRUCTIONS) S390_RIL_B_OPCODE_LIST(DECLARE_S390_RIL_AB_INSTRUCTIONS) S390_RIL_C_OPCODE_LIST(DECLARE_S390_RIL_C_INSTRUCTIONS) #undef DECLARE_S390_RIL_AB_INSTRUCTIONS #undef DECLARE_S390_RIL_C_INSTRUCTIONS inline void ris_format(Opcode opcode, int f1, int f2, int f3, int f4, int f5) { uint32_t op1 = opcode >> 8; uint32_t op2 = opcode & 0xff; emit6bytes( getfield<uint64_t, 6, 0, 8>(op1) | getfield<uint64_t, 6, 8, 12>(f1) | getfield<uint64_t, 6, 12, 16>(f2) | getfield<uint64_t, 6, 16, 20>(f3) | getfield<uint64_t, 6, 20, 32>(f4) | getfield<uint64_t, 6, 32, 40>(f5) | getfield<uint64_t, 6, 40, 48>(op2)); } #define DECLARE_S390_RR_INSTRUCTIONS(name, op_name, op_value) \ inline void name(Register r1, Register r2) { \ rr_format(op_name, r1.code(), r2.code()); \ } \ inline void name(DoubleRegister r1, DoubleRegister r2) { \ rr_format(op_name, r1.code(), r2.code()); \ } \ inline void name(Condition m1, Register r2) { \ rr_format(op_name, m1, r2.code()); \ } inline void rr_format(Opcode opcode, int f1, int f2) { emit2bytes(getfield<uint16_t, 2, 0, 8>(opcode) | getfield<uint16_t, 2, 8, 12>(f1) | getfield<uint16_t, 2, 12, 16>(f2)); } S390_RR_OPCODE_LIST(DECLARE_S390_RR_INSTRUCTIONS) #undef DECLARE_S390_RR_INSTRUCTIONS #define DECLARE_S390_RRD_INSTRUCTIONS(name, op_name, op_value) \ template <class R1, class R2, class R3> \ inline void name(R1 r1, R3 r3, R2 r2) { \ rrd_format(op_name, r1.code(), r3.code(), r2.code()); \ } inline void rrd_format(Opcode opcode, int f1, int f2, int f3) { emit4bytes(getfield<uint32_t, 4, 0, 16>(opcode) | getfield<uint32_t, 4, 16, 20>(f1) | getfield<uint32_t, 4, 24, 28>(f2) | getfield<uint32_t, 4, 28, 32>(f3)); } S390_RRD_OPCODE_LIST(DECLARE_S390_RRD_INSTRUCTIONS) #undef DECLARE_S390_RRD_INSTRUCTIONS #define DECLARE_S390_RRE_INSTRUCTIONS(name, op_name, op_value) \ template <class R1, class R2> \ inline void name(R1 r1, R2 r2) { \ rre_format(op_name, r1.code(), r2.code()); \ } inline void rre_format(Opcode opcode, int f1, int f2) { emit4bytes(getfield<uint32_t, 4, 0, 16>(opcode) | getfield<uint32_t, 4, 24, 28>(f1) | getfield<uint32_t, 4, 28, 32>(f2)); } S390_RRE_OPCODE_LIST(DECLARE_S390_RRE_INSTRUCTIONS) // Special format void lzdr(DoubleRegister r1) { rre_format(LZDR, r1.code(), 0); } #undef DECLARE_S390_RRE_INSTRUCTIONS inline void rrf_format(Opcode opcode, int f1, int f2, int f3, int f4) { emit4bytes( getfield<uint32_t, 4, 0, 16>(opcode) | getfield<uint32_t, 4, 16, 20>(f1) | getfield<uint32_t, 4, 20, 24>(f2) | getfield<uint32_t, 4, 24, 28>(f3) | getfield<uint32_t, 4, 28, 32>(f4)); } #define DECLARE_S390_RX_INSTRUCTIONS(name, op_name, op_value) \ template <class R1> \ inline void name(R1 r1, Register x2, Register b2, Disp d2) { \ rx_format(op_name, r1.code(), x2.code(), b2.code(), d2); \ } \ template <class R1> \ inline void name(R1 r1, const MemOperand& opnd) { \ name(r1, opnd.getIndexRegister(), \ opnd.getBaseRegister(), opnd.getDisplacement()); \ } inline void rx_format(Opcode opcode, int f1, int f2, int f3, int f4) { DCHECK(is_uint8(opcode)); DCHECK(is_uint12(f4)); emit4bytes(getfield<uint32_t, 4, 0, 8>(opcode) | getfield<uint32_t, 4, 8, 12>(f1) | getfield<uint32_t, 4, 12, 16>(f2) | getfield<uint32_t, 4, 16, 20>(f3) | getfield<uint32_t, 4, 20, 32>(f4)); } S390_RX_A_OPCODE_LIST(DECLARE_S390_RX_INSTRUCTIONS) void bc(Condition cond, const MemOperand& opnd) { bc(cond, opnd.getIndexRegister(), opnd.getBaseRegister(), opnd.getDisplacement()); } void bc(Condition cond, Register x2, Register b2, Disp d2) { rx_format(BC, cond, x2.code(), b2.code(), d2); } #undef DECLARE_S390_RX_INSTRUCTIONS #define DECLARE_S390_RXY_INSTRUCTIONS(name, op_name, op_value) \ template <class R1, class R2> \ inline void name(R1 r1, R2 r2, Register b2, Disp d2) { \ rxy_format(op_name, r1.code(), r2.code(), b2.code(), d2); \ } \ template <class R1> \ inline void name(R1 r1, const MemOperand& opnd) { \ name(r1, opnd.getIndexRegister(), \ opnd.getBaseRegister(), opnd.getDisplacement()); \ } inline void rxy_format(Opcode opcode, int f1, int f2, int f3, int f4) { DCHECK(is_uint16(opcode)); DCHECK(is_int20(f4)); emit6bytes(getfield<uint64_t, 6, 0, 8>(opcode >> 8) | getfield<uint64_t, 6, 8, 12>(f1) | getfield<uint64_t, 6, 12, 16>(f2) | getfield<uint64_t, 6, 16, 20>(f3) | getfield<uint64_t, 6, 20, 32>(f4 & 0x0fff) | getfield<uint64_t, 6, 32, 40>(f4 >> 12) | getfield<uint64_t, 6, 40, 48>(opcode & 0x00ff)); } S390_RXY_A_OPCODE_LIST(DECLARE_S390_RXY_INSTRUCTIONS) void pfd(Condition cond, const MemOperand& opnd) { pfd(cond, opnd.getIndexRegister(), opnd.getBaseRegister(), opnd.getDisplacement()); } void pfd(Condition cond, Register x2, Register b2, Disp d2) { rxy_format(PFD, cond, x2.code(), b2.code(), d2); } #undef DECLARE_S390_RXY_INSTRUCTIONS // Helper for unconditional branch to Label with update to save register void b(Register r, Label* l) { int32_t halfwords = branch_offset(l) / 2; brasl(r, Operand(halfwords)); } // Conditional Branch Instruction - Generates either BRC / BRCL void branchOnCond(Condition c, int branch_offset, bool is_bound = false); // Helpers for conditional branch to Label void b(Condition cond, Label* l, Label::Distance dist = Label::kFar) { branchOnCond(cond, branch_offset(l), l->is_bound() || (dist == Label::kNear)); } void bc_short(Condition cond, Label* l, Label::Distance dist = Label::kFar) { b(cond, l, Label::kNear); } // Helpers for conditional branch to Label void beq(Label* l, Label::Distance dist = Label::kFar) { b(eq, l, dist); } void bne(Label* l, Label::Distance dist = Label::kFar) { b(ne, l, dist); } void blt(Label* l, Label::Distance dist = Label::kFar) { b(lt, l, dist); } void ble(Label* l, Label::Distance dist = Label::kFar) { b(le, l, dist); } void bgt(Label* l, Label::Distance dist = Label::kFar) { b(gt, l, dist); } void bge(Label* l, Label::Distance dist = Label::kFar) { b(ge, l, dist); } void b(Label* l, Label::Distance dist = Label::kFar) { b(al, l, dist); } void jmp(Label* l, Label::Distance dist = Label::kFar) { b(al, l, dist); } void bunordered(Label* l, Label::Distance dist = Label::kFar) { b(unordered, l, dist); } void bordered(Label* l, Label::Distance dist = Label::kFar) { b(ordered, l, dist); } // Helpers for conditional indirect branch off register void b(Condition cond, Register r) { bcr(cond, r); } void beq(Register r) { b(eq, r); } void bne(Register r) { b(ne, r); } void blt(Register r) { b(lt, r); } void ble(Register r) { b(le, r); } void bgt(Register r) { b(gt, r); } void bge(Register r) { b(ge, r); } void b(Register r) { b(al, r); } void jmp(Register r) { b(al, r); } void bunordered(Register r) { b(unordered, r); } void bordered(Register r) { b(ordered, r); } // --------------------------------------------------------------------------- // Code generation // Insert the smallest number of nop instructions // possible to align the pc offset to a multiple // of m. m must be a power of 2 (>= 4). void Align(int m); // Insert the smallest number of zero bytes possible to align the pc offset // to a mulitple of m. m must be a power of 2 (>= 2). void DataAlign(int m); // Aligns code to something that's optimal for a jump target for the platform. void CodeTargetAlign(); void breakpoint(bool do_print) { if (do_print) { PrintF("DebugBreak is inserted to %p\n", static_cast<void*>(pc_)); } #if V8_HOST_ARCH_64_BIT int64_t value = reinterpret_cast<uint64_t>(&v8::base::OS::DebugBreak); int32_t hi_32 = static_cast<int64_t>(value) >> 32; int32_t lo_32 = static_cast<int32_t>(value); iihf(r1, Operand(hi_32)); iilf(r1, Operand(lo_32)); #else iilf(r1, Operand(reinterpret_cast<uint32_t>(&v8::base::OS::DebugBreak))); #endif basr(r14, r1); } void call(Handle<Code> target, RelocInfo::Mode rmode, TypeFeedbackId ast_id = TypeFeedbackId::None()); void jump(Handle<Code> target, RelocInfo::Mode rmode, Condition cond); // S390 instruction generation #define I_FORM(name) void name(const Operand& i) #define RR_FORM(name) void name(Register r1, Register r2) #define RR2_FORM(name) void name(Condition m1, Register r2) #define RI1_FORM(name) void name(Register r, const Operand& i) #define RI2_FORM(name) void name(Condition m, const Operand& i) #define RIE_FORM(name) void name(Register r1, Register R3, const Operand& i) #define RIE_F_FORM(name) \ void name(Register r1, Register r2, const Operand& i3, const Operand& i4, \ const Operand& i5) #define RXE_FORM(name) \ void name(Register r1, const MemOperand& opnd); \ void name(Register r1, Register b2, Register x2, Disp d2) #define RXF_FORM(name) \ void name(Register r1, Register r3, const MemOperand& opnd); \ void name(Register r1, Register r3, Register b2, Register x2, Disp d2) #define RSI_FORM(name) void name(Register r1, Register r3, const Operand& i) #define RIS_FORM(name) \ void name(Register r1, Condition m3, Register b4, Disp d4, \ const Operand& i2); \ void name(Register r1, const Operand& i2, Condition m3, \ const MemOperand& opnd) #define SI_FORM(name) \ void name(const MemOperand& opnd, const Operand& i); \ void name(const Operand& i2, Register b1, Disp d1) #define SIL_FORM(name) \ void name(Register b1, Disp d1, const Operand& i2); \ void name(const MemOperand& opnd, const Operand& i2) #define RRF1_FORM(name) void name(Register r1, Register r2, Register r3) #define RRF2_FORM(name) void name(Condition m1, Register r1, Register r2) #define RRF3_FORM(name) \ void name(Register r3, Condition m4, Register r1, Register r2) #define RS1_FORM(name) \ void name(Register r1, Register r3, const MemOperand& opnd); \ void name(Register r1, Register r3, Register b2, Disp d2) #define RS2_FORM(name) \ void name(Register r1, Condition m3, const MemOperand& opnd); \ void name(Register r1, Condition m3, Register b2, Disp d2) #define RSE_FORM(name) \ void name(Register r1, Register r3, const MemOperand& opnd); \ void name(Register r1, Register r3, Register b2, Disp d2) #define RSL_FORM(name) \ void name(Length l, Register b2, Disp d2); \ void name(const MemOperand& opnd) #define RSY1_FORM(name) \ void name(Register r1, Register r3, Register b2, Disp d2); \ void name(Register r1, Register r3, const MemOperand& opnd) #define RSY2_FORM(name) \ void name(Register r1, Condition m3, Register b2, Disp d2); \ void name(Register r1, Condition m3, const MemOperand& opnd) #define RRS_FORM(name) \ void name(Register r1, Register r2, Register b4, Disp d4, Condition m3); \ void name(Register r1, Register r2, Condition m3, const MemOperand& opnd) #define S_FORM(name) \ void name(Register b2, Disp d2); \ void name(const MemOperand& opnd) #define SIY_FORM(name) \ void name(const Operand& i2, Register b1, Disp d1); \ void name(const MemOperand& opnd, const Operand& i) #define SS1_FORM(name) \ void name(Register b1, Disp d1, Register b3, Disp d2, Length length); \ void name(const MemOperand& opnd1, const MemOperand& opnd2, Length length) #define SS2_FORM(name) \ void name(const MemOperand& opnd1, const MemOperand& opnd2, Length length1, \ Length length2); \ void name(Register b1, Disp d1, Register b2, Disp d2, Length l1, Length l2) #define SS3_FORM(name) \ void name(const MemOperand& opnd1, const MemOperand& opnd2, Length length); \ void name(const Operand& i3, Register b1, Disp d1, Register b2, Disp d2, \ Length l1) #define SS4_FORM(name) \ void name(const MemOperand& opnd1, const MemOperand& opnd2); \ void name(Register r1, Register r3, Register b1, Disp d1, Register b2, \ Disp d2) #define SS5_FORM(name) \ void name(const MemOperand& opnd1, const MemOperand& opnd2); \ void name(Register r1, Register r3, Register b3, Disp d2, Register b4, \ Disp d4) #define SSE_FORM(name) \ void name(Register b1, Disp d1, Register b2, Disp d2); \ void name(const MemOperand& opnd1, const MemOperand& opnd2) #define SSF_FORM(name) \ void name(Register r3, Register b1, Disp d1, Register b2, Disp d2); \ void name(Register r3, const MemOperand& opnd1, const MemOperand& opnd2) #define DECLARE_VRR_A_INSTRUCTIONS(name, opcode_name, opcode_value) \ void name(DoubleRegister v1, DoubleRegister v2, Condition m5, Condition m4, \ Condition m3) { \ uint64_t code = (static_cast<uint64_t>(opcode_value & 0xFF00)) * B32 | \ (static_cast<uint64_t>(v1.code())) * B36 | \ (static_cast<uint64_t>(v2.code())) * B32 | \ (static_cast<uint64_t>(m5 & 0xF)) * B20 | \ (static_cast<uint64_t>(m4 & 0xF)) * B16 | \ (static_cast<uint64_t>(m3 & 0xF)) * B12 | \ (static_cast<uint64_t>(opcode_value & 0x00FF)); \ emit6bytes(code); \ } S390_VRR_A_OPCODE_LIST(DECLARE_VRR_A_INSTRUCTIONS) #undef DECLARE_VRR_A_INSTRUCTIONS #define DECLARE_VRR_C_INSTRUCTIONS(name, opcode_name, opcode_value) \ void name(DoubleRegister v1, DoubleRegister v2, DoubleRegister v3, \ Condition m6, Condition m5, Condition m4) { \ uint64_t code = (static_cast<uint64_t>(opcode_value & 0xFF00)) * B32 | \ (static_cast<uint64_t>(v1.code())) * B36 | \ (static_cast<uint64_t>(v2.code())) * B32 | \ (static_cast<uint64_t>(v3.code())) * B28 | \ (static_cast<uint64_t>(m6 & 0xF)) * B20 | \ (static_cast<uint64_t>(m5 & 0xF)) * B16 | \ (static_cast<uint64_t>(m4 & 0xF)) * B12 | \ (static_cast<uint64_t>(opcode_value & 0x00FF)); \ emit6bytes(code); \ } S390_VRR_C_OPCODE_LIST(DECLARE_VRR_C_INSTRUCTIONS) #undef DECLARE_VRR_C_INSTRUCTIONS // Single Element format void vfa(DoubleRegister v1, DoubleRegister v2, DoubleRegister v3) { vfa(v1, v2, v3, static_cast<Condition>(0), static_cast<Condition>(8), static_cast<Condition>(3)); } void vfs(DoubleRegister v1, DoubleRegister v2, DoubleRegister v3) { vfs(v1, v2, v3, static_cast<Condition>(0), static_cast<Condition>(8), static_cast<Condition>(3)); } void vfm(DoubleRegister v1, DoubleRegister v2, DoubleRegister v3) { vfm(v1, v2, v3, static_cast<Condition>(0), static_cast<Condition>(8), static_cast<Condition>(3)); } void vfd(DoubleRegister v1, DoubleRegister v2, DoubleRegister v3) { vfd(v1, v2, v3, static_cast<Condition>(0), static_cast<Condition>(8), static_cast<Condition>(3)); } // S390 instruction sets RXE_FORM(ddb); SS1_FORM(ed); RRF2_FORM(fidbr); RI1_FORM(iihh); RI1_FORM(iihl); RI1_FORM(iilh); RI1_FORM(iill); RSY1_FORM(loc); RXE_FORM(mdb); SS4_FORM(mvck); SSF_FORM(mvcos); SS4_FORM(mvcs); SS1_FORM(mvn); SS1_FORM(nc); SI_FORM(ni); RI1_FORM(nilh); RI1_FORM(nill); RI1_FORM(oill); RXE_FORM(sdb); RS1_FORM(srdl); RI1_FORM(tmll); SS1_FORM(tr); S_FORM(ts); // Load Address Instructions void larl(Register r, Label* l); // Load Instructions void lhi(Register r, const Operand& imm); void lghi(Register r, const Operand& imm); // Load Multiple Instructions void lm(Register r1, Register r2, const MemOperand& src); void lmy(Register r1, Register r2, const MemOperand& src); void lmg(Register r1, Register r2, const MemOperand& src); // Load On Condition Instructions void locr(Condition m3, Register r1, Register r2); void locgr(Condition m3, Register r1, Register r2); void loc(Condition m3, Register r1, const MemOperand& src); void locg(Condition m3, Register r1, const MemOperand& src); // Store Instructions // Store Multiple Instructions void stm(Register r1, Register r2, const MemOperand& src); void stmy(Register r1, Register r2, const MemOperand& src); void stmg(Register r1, Register r2, const MemOperand& src); // Compare Instructions void chi(Register r, const Operand& opnd); void cghi(Register r, const Operand& opnd); // Compare Logical Instructions void cli(const MemOperand& mem, const Operand& imm); void cliy(const MemOperand& mem, const Operand& imm); void clc(const MemOperand& opnd1, const MemOperand& opnd2, Length length); // Compare and Swap Instructions void cs(Register r1, Register r2, const MemOperand& src); void csy(Register r1, Register r2, const MemOperand& src); void csg(Register r1, Register r2, const MemOperand& src); // Test Under Mask Instructions void tm(const MemOperand& mem, const Operand& imm); void tmy(const MemOperand& mem, const Operand& imm); // Rotate Instructions void rll(Register r1, Register r3, Register opnd); void rll(Register r1, Register r3, const Operand& opnd); void rll(Register r1, Register r3, Register r2, const Operand& opnd); void rllg(Register r1, Register r3, const Operand& opnd); void rllg(Register r1, Register r3, const Register opnd); void rllg(Register r1, Register r3, Register r2, const Operand& opnd); // Shift Instructions (32) void sll(Register r1, Register opnd); void sll(Register r1, const Operand& opnd); void sllk(Register r1, Register r3, Register opnd); void sllk(Register r1, Register r3, const Operand& opnd); void srl(Register r1, Register opnd); void srl(Register r1, const Operand& opnd); void srlk(Register r1, Register r3, Register opnd); void srlk(Register r1, Register r3, const Operand& opnd); void sra(Register r1, Register opnd); void sra(Register r1, const Operand& opnd); void srak(Register r1, Register r3, Register opnd); void srak(Register r1, Register r3, const Operand& opnd); void sla(Register r1, Register opnd); void sla(Register r1, const Operand& opnd); void slak(Register r1, Register r3, Register opnd); void slak(Register r1, Register r3, const Operand& opnd); // Shift Instructions (64) void sllg(Register r1, Register r3, const Operand& opnd); void sllg(Register r1, Register r3, const Register opnd); void srlg(Register r1, Register r3, const Operand& opnd); void srlg(Register r1, Register r3, const Register opnd); void srag(Register r1, Register r3, const Operand& opnd); void srag(Register r1, Register r3, const Register opnd); void srda(Register r1, const Operand& opnd); void srdl(Register r1, const Operand& opnd); void slag(Register r1, Register r3, const Operand& opnd); void slag(Register r1, Register r3, const Register opnd); void sldl(Register r1, Register b2, const Operand& opnd); void srdl(Register r1, Register b2, const Operand& opnd); void srda(Register r1, Register b2, const Operand& opnd); // Rotate and Insert Selected Bits void risbg(Register dst, Register src, const Operand& startBit, const Operand& endBit, const Operand& shiftAmt, bool zeroBits = true); void risbgn(Register dst, Register src, const Operand& startBit, const Operand& endBit, const Operand& shiftAmt, bool zeroBits = true); // Move Character (Mem to Mem) void mvc(const MemOperand& opnd1, const MemOperand& opnd2, uint32_t length); // Branch Instructions void bras(Register r, const Operand& opnd); void brc(Condition c, const Operand& opnd); void brct(Register r1, const Operand& opnd); void brctg(Register r1, const Operand& opnd); // 32-bit Add Instructions void ahi(Register r1, const Operand& opnd); void ahik(Register r1, Register r3, const Operand& opnd); void ark(Register r1, Register r2, Register r3); void asi(const MemOperand&, const Operand&); // 64-bit Add Instructions void aghi(Register r1, const Operand& opnd); void aghik(Register r1, Register r3, const Operand& opnd); void agrk(Register r1, Register r2, Register r3); void agsi(const MemOperand&, const Operand&); // 32-bit Add Logical Instructions void alrk(Register r1, Register r2, Register r3); // 64-bit Add Logical Instructions void algrk(Register r1, Register r2, Register r3); // 32-bit Subtract Instructions void srk(Register r1, Register r2, Register r3); // 64-bit Subtract Instructions void sgrk(Register r1, Register r2, Register r3); // 32-bit Subtract Logical Instructions void slrk(Register r1, Register r2, Register r3); // 64-bit Subtract Logical Instructions void slgrk(Register r1, Register r2, Register r3); // 32-bit Multiply Instructions void mhi(Register r1, const Operand& opnd); void msrkc(Register r1, Register r2, Register r3); void msgrkc(Register r1, Register r2, Register r3); // 64-bit Multiply Instructions void mghi(Register r1, const Operand& opnd); // Bitwise Instructions (AND / OR / XOR) void nrk(Register r1, Register r2, Register r3); void ngrk(Register r1, Register r2, Register r3); void ork(Register r1, Register r2, Register r3); void ogrk(Register r1, Register r2, Register r3); void xrk(Register r1, Register r2, Register r3); void xgrk(Register r1, Register r2, Register r3); void xc(const MemOperand& opnd1, const MemOperand& opnd2, Length length); // Floating <-> Fixed Point Conversion Instructions void cdlfbr(Condition m3, Condition m4, DoubleRegister fltReg, Register fixReg); void cdlgbr(Condition m3, Condition m4, DoubleRegister fltReg, Register fixReg); void celgbr(Condition m3, Condition m4, DoubleRegister fltReg, Register fixReg); void celfbr(Condition m3, Condition m4, DoubleRegister fltReg, Register fixReg); void clfdbr(Condition m3, Condition m4, Register fixReg, DoubleRegister fltReg); void clfebr(Condition m3, Condition m4, Register fixReg, DoubleRegister fltReg); void clgdbr(Condition m3, Condition m4, Register fixReg, DoubleRegister fltReg); void clgebr(Condition m3, Condition m4, Register fixReg, DoubleRegister fltReg); void cfdbr(Condition m, Register fixReg, DoubleRegister fltReg); void cgebr(Condition m, Register fixReg, DoubleRegister fltReg); void cgdbr(Condition m, Register fixReg, DoubleRegister fltReg); void cfebr(Condition m3, Register fixReg, DoubleRegister fltReg); void cefbr(Condition m3, DoubleRegister fltReg, Register fixReg); // Floating Point Compare Instructions void cdb(DoubleRegister r1, const MemOperand& opnd); void ceb(DoubleRegister r1, const MemOperand& opnd); // Floating Point Arithmetic Instructions void adb(DoubleRegister r1, const MemOperand& opnd); void aeb(DoubleRegister r1, const MemOperand& opnd); void sdb(DoubleRegister r1, const MemOperand& opnd); void seb(DoubleRegister r1, const MemOperand& opnd); void mdb(DoubleRegister r1, const MemOperand& opnd); void meeb(DoubleRegister r1, const MemOperand& opnd); void ddb(DoubleRegister r1, const MemOperand& opnd); void deb(DoubleRegister r1, const MemOperand& opnd); void sqdb(DoubleRegister r1, const MemOperand& opnd); void ldeb(DoubleRegister r1, const MemOperand& opnd); enum FIDBRA_MASK3 { FIDBRA_CURRENT_ROUNDING_MODE = 0, FIDBRA_ROUND_TO_NEAREST_AWAY_FROM_0 = 1, // ... FIDBRA_ROUND_TOWARD_0 = 5, FIDBRA_ROUND_TOWARD_POS_INF = 6, FIDBRA_ROUND_TOWARD_NEG_INF = 7 }; void fiebra(DoubleRegister d1, DoubleRegister d2, FIDBRA_MASK3 m3); void fidbra(DoubleRegister d1, DoubleRegister d2, FIDBRA_MASK3 m3); // Move integer void mvhi(const MemOperand& opnd1, const Operand& i2); void mvghi(const MemOperand& opnd1, const Operand& i2); // Exception-generating instructions and debugging support void stop(const char* msg, Condition cond = al, int32_t code = kDefaultStopCode, CRegister cr = cr7); void bkpt(uint32_t imm16); // v5 and above // Different nop operations are used by the code generator to detect certain // states of the generated code. enum NopMarkerTypes { NON_MARKING_NOP = 0, GROUP_ENDING_NOP, DEBUG_BREAK_NOP, // IC markers. PROPERTY_ACCESS_INLINED, PROPERTY_ACCESS_INLINED_CONTEXT, PROPERTY_ACCESS_INLINED_CONTEXT_DONT_DELETE, // Helper values. LAST_CODE_MARKER, FIRST_IC_MARKER = PROPERTY_ACCESS_INLINED }; void nop(int type = 0); // 0 is the default non-marking type. void dumy(int r1, int x2, int b2, int d2); // Check the code size generated from label to here. int SizeOfCodeGeneratedSince(Label* label) { return pc_offset() - label->pos(); } // Debugging // Mark address of a debug break slot. void RecordDebugBreakSlot(RelocInfo::Mode mode); // Record the AST id of the CallIC being compiled, so that it can be placed // in the relocation information. void SetRecordedAstId(TypeFeedbackId ast_id) { recorded_ast_id_ = ast_id; } TypeFeedbackId RecordedAstId() { // roohack - another issue??? DCHECK(!recorded_ast_id_.IsNone()); return recorded_ast_id_; } void ClearRecordedAstId() { recorded_ast_id_ = TypeFeedbackId::None(); } // Record a comment relocation entry that can be used by a disassembler. // Use --code-comments to enable. void RecordComment(const char* msg); // Record a deoptimization reason that can be used by a log or cpu profiler. // Use --trace-deopt to enable. void RecordDeoptReason(DeoptimizeReason reason, SourcePosition position, int id); // Writes a single byte or word of data in the code stream. Used // for inline tables, e.g., jump-tables. void db(uint8_t data); void dd(uint32_t data); void dq(uint64_t data); void dp(uintptr_t data); void PatchConstantPoolAccessInstruction(int pc_offset, int offset, ConstantPoolEntry::Access access, ConstantPoolEntry::Type type) { // No embedded constant pool support. UNREACHABLE(); } // Read/patch instructions SixByteInstr instr_at(int pos) { return Instruction::InstructionBits(buffer_ + pos); } template <typename T> void instr_at_put(int pos, T instr) { Instruction::SetInstructionBits<T>(buffer_ + pos, instr); } // Decodes instruction at pos, and returns its length int32_t instr_length_at(int pos) { return Instruction::InstructionLength(buffer_ + pos); } static SixByteInstr instr_at(byte* pc) { return Instruction::InstructionBits(pc); } static Condition GetCondition(Instr instr); static bool IsBranch(Instr instr); #if V8_TARGET_ARCH_S390X static bool Is64BitLoadIntoIP(SixByteInstr instr1, SixByteInstr instr2); #else static bool Is32BitLoadIntoIP(SixByteInstr instr); #endif static bool IsCmpRegister(Instr instr); static bool IsCmpImmediate(Instr instr); static bool IsNop(SixByteInstr instr, int type = NON_MARKING_NOP); // The code currently calls CheckBuffer() too often. This has the side // effect of randomly growing the buffer in the middle of multi-instruction // sequences. // // This function allows outside callers to check and grow the buffer void EnsureSpaceFor(int space_needed); void EmitRelocations(); void emit_label_addr(Label* label); public: byte* buffer_pos() const { return buffer_; } protected: // Relocation for a type-recording IC has the AST id added to it. This // member variable is a way to pass the information from the call site to // the relocation info. TypeFeedbackId recorded_ast_id_; int buffer_space() const { return reloc_info_writer.pos() - pc_; } // Decode instruction(s) at pos and return backchain to previous // label reference or kEndOfChain. int target_at(int pos); // Patch instruction(s) at pos to target target_pos (e.g. branch) void target_at_put(int pos, int target_pos, bool* is_branch = nullptr); // Record reloc info for current pc_ void RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data = 0); private: // Avoid overflows for displacements etc. static const int kMaximalBufferSize = 512 * MB; // Code generation // The relocation writer's position is at least kGap bytes below the end of // the generated instructions. This is so that multi-instruction sequences do // not have to check for overflow. The same is true for writes of large // relocation info entries. static constexpr int kGap = 32; // Relocation info generation // Each relocation is encoded as a variable size value static constexpr int kMaxRelocSize = RelocInfoWriter::kMaxSize; RelocInfoWriter reloc_info_writer; std::vector<DeferredRelocInfo> relocations_; // The bound position, before this we cannot do instruction elimination. int last_bound_pos_; // Code emission inline void CheckBuffer(); void GrowBuffer(int needed = 0); inline void TrackBranch(); inline void UntrackBranch(); inline int32_t emit_code_target( Handle<Code> target, RelocInfo::Mode rmode, TypeFeedbackId ast_id = TypeFeedbackId::None()); // Helpers to emit binary encoding of 2/4/6 byte instructions. inline void emit2bytes(uint16_t x); inline void emit4bytes(uint32_t x); inline void emit6bytes(uint64_t x); // Helpers to emit binary encoding for various instruction formats. inline void rr2_form(uint8_t op, Condition m1, Register r2); inline void ri_form(Opcode op, Register r1, const Operand& i2); inline void ri_form(Opcode op, Condition m1, const Operand& i2); inline void rie_form(Opcode op, Register r1, Register r3, const Operand& i2); inline void rie_f_form(Opcode op, Register r1, Register r2, const Operand& i3, const Operand& i4, const Operand& i5); inline void ris_form(Opcode op, Register r1, Condition m3, Register b4, Disp d4, const Operand& i2); inline void rrf1_form(Opcode op, Register r1, Register r2, Register r3); inline void rrf1_form(uint32_t x); inline void rrf2_form(uint32_t x); inline void rrf3_form(uint32_t x); inline void rrfe_form(Opcode op, Condition m3, Condition m4, Register r1, Register r2); inline void rrs_form(Opcode op, Register r1, Register r2, Register b4, Disp d4, Condition m3); inline void rs_form(Opcode op, Register r1, Condition m3, Register b2, const Disp d2); inline void rs_form(Opcode op, Register r1, Register r3, Register b2, const Disp d2); inline void rsi_form(Opcode op, Register r1, Register r3, const Operand& i2); inline void rsl_form(Opcode op, Length l1, Register b2, Disp d2); inline void rsy_form(Opcode op, Register r1, Register r3, Register b2, const Disp d2); inline void rsy_form(Opcode op, Register r1, Condition m3, Register b2, const Disp d2); inline void rxe_form(Opcode op, Register r1, Register x2, Register b2, Disp d2); inline void rxf_form(Opcode op, Register r1, Register r3, Register b2, Register x2, Disp d2); inline void s_form(Opcode op, Register b1, Disp d2); inline void si_form(Opcode op, const Operand& i2, Register b1, Disp d1); inline void siy_form(Opcode op, const Operand& i2, Register b1, Disp d1); inline void sil_form(Opcode op, Register b1, Disp d1, const Operand& i2); inline void ss_form(Opcode op, Length l, Register b1, Disp d1, Register b2, Disp d2); inline void ss_form(Opcode op, Length l1, Length l2, Register b1, Disp d1, Register b2, Disp d2); inline void ss_form(Opcode op, Length l1, const Operand& i3, Register b1, Disp d1, Register b2, Disp d2); inline void ss_form(Opcode op, Register r1, Register r2, Register b1, Disp d1, Register b2, Disp d2); inline void sse_form(Opcode op, Register b1, Disp d1, Register b2, Disp d2); inline void ssf_form(Opcode op, Register r3, Register b1, Disp d1, Register b2, Disp d2); // Labels void print(Label* L); int max_reach_from(int pos); void bind_to(Label* L, int pos); void next(Label* L); friend class RegExpMacroAssemblerS390; friend class RelocInfo; friend class CodePatcher; List<Handle<Code> > code_targets_; friend class EnsureSpace; }; class EnsureSpace BASE_EMBEDDED { public: explicit EnsureSpace(Assembler* assembler) { assembler->CheckBuffer(); } }; } // namespace internal } // namespace v8 #endif // V8_S390_ASSEMBLER_S390_H_
[ "commit-bot@chromium.org" ]
commit-bot@chromium.org
43dbc622c02c8fa52ac0b941045243a09717ce10
8445eea269977c26edfbbc6c9ae4a164e973732e
/week 10/contest 1/dominos.cpp
11938272125bb057e277b3a71591ce508cd24f21
[]
no_license
AbelTesfaye/Competitive-Programming
5de1883267254b46b2370f4560695e8dd7dc8ee9
f8613c31e64c755b9dd9b836fca872294f9b2b71
refs/heads/master
2023-06-14T09:59:09.229018
2021-07-17T09:47:20
2021-07-17T09:47:20
325,812,652
1
0
null
null
null
null
UTF-8
C++
false
false
480
cpp
class Solution { public: unordered_map<string, int> m; int numEquivDominoPairs(vector<vector<int>>& dominoes) { int ret = 0; for(auto d: dominoes){ int mi = min(d[0], d[1]); int ma = max(d[0], d[1]); string key1 = to_string(mi) + "," + to_string(ma); if(m.find(key1) != m.end()) ret += m[key1]; m[key1]++; } return ret; } };
[ "abeltesfaye45@gmail.com" ]
abeltesfaye45@gmail.com
6b89b8adcc5584e62c054c8f7f9d0595bfb6473b
8eac14184cacb3ad8ff1385ad96c86b868ae67f6
/ServerProject/LoginServer/LoginServer/DMainApp.h
89b2e2a2b8d286eb0c26060f4473d2f3bc52acd0
[]
no_license
luw630/darkserver
2ff26fe2b13db8bcd8f93a3c31fba5e3f34643ca
a2a599dbb19073103b5b2c3cb863658a4f96e6ae
refs/heads/master
2021-01-10T07:39:08.397177
2016-01-12T03:42:08
2016-01-12T03:42:08
47,673,294
0
0
null
null
null
null
GB18030
C++
false
false
1,659
h
#pragma once #include "PlayerManager.h" #include "ServerManager.h" #include "NetDBModule.h" #include "NetAccountCheckModule.h" #include "NetGMModule.h" #include "CllctServerModule/LoginDataCollect.h" #include "DBCenterModule.h" #include "NetWorkModule/datamsgs.h" #include "AccountModuleManage.h" #include "zoneserver/zoneserver/CenterModule.h" //#include "../../区域服务器/区域服务器/CenterModule.h" ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// class CDAppMain { public: BOOL InitServer(); BOOL LoopServer(); BOOL ExitServer(); public: void DisplayServerInfo(); public: CDAppMain(void); ~CDAppMain(void); public: // 服务器的退出标志 BOOL m_bQuit; std::string servername; CPlayerManager m_PlayerManager; CServerManager m_ServerManager; CNetAccountCheckModule m_AccountClient; CNetDBModule m_DatabaseClient; DBCenterModule m_dbCenterClient; CNetGMModule m_NetGMModule; CGMManager m_GMManager; // GM管理 Lovelonely CLoginDataCollect m_DataCollect; // 数据采集对象 AccountModuleManage m_AccountModuleManage; //所有的账号管理模块 CenterModule m_CenterClient; //连接中心服的Socket }; BOOL CreateApp(void); void ClearApp(void); CDAppMain *&GetApp(void); ////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
[ "luw630@gmail.com" ]
luw630@gmail.com
19608c6fc0f78ed84d0d76e474e22e163b3524f2
33cf7b462d358197667ea8c02ed94d97e76749a3
/Framework/Source/Math/MathHelpers.h
c84722343a669651af871f5a2862649951549fac
[]
no_license
omrkocar/SchoolGameEngine
3bda792d1ba872727b5821d3cede5f835e397043
04426af512edaab15fe283eec60cb0a46df56028
refs/heads/main
2023-04-27T23:56:17.413476
2021-05-05T23:05:59
2021-05-05T23:05:59
null
0
0
null
null
null
null
UTF-8
C++
false
false
2,170
h
// // Copyright (c) 2012-2014 Jimmy Lord http://www.flatheadgames.com // // This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. // Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: // 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. // 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. // 3. This notice may not be removed or altered from any source distribution. #ifndef __Utility_H__ #define __Utility_H__ #define PI 3.1415926535897932384626433832795f const float FEQUALEPSILON = 0.00001f; inline bool fequal(const float a, const float b, const float epsilon = FEQUALEPSILON) { return fabs(a - b) <= epsilon; } inline bool fnotequal(const float a, const float b, const float epsilon = FEQUALEPSILON) { return fabs(a - b) > epsilon; } template <class MyType> void MySwap(MyType& v1, MyType& v2) { MyType temp = v1; v1 = v2; v2 = temp; } template <class MyType> void MyClamp(MyType& value, MyType min, MyType max) { if (value < min) value = min; if (value > max) value = max; } template <class MyType> MyType MyClamp_Return(MyType value, MyType min, MyType max) { MyType temp = value; if (temp < min) temp = min; if (temp > max) temp = max; return temp; } template <class MyType> void IncreaseIfBigger(MyType& value, MyType newvalue) { if (newvalue > value) value = newvalue; } template <class MyType> void DecreaseIfLower(MyType& value, MyType newvalue, bool treatzeroasinfinite = false) { if (treatzeroasinfinite && value == 0) value = newvalue; if (newvalue < value) value = newvalue; } #endif //__Utility_H__
[ "koca0007@algonquinlive.com" ]
koca0007@algonquinlive.com
886854917032918d56473e53afb145019bae026e
6730adf4a8ff8f77484ccb5db6a9c309b460520d
/abc058a.cpp
eb866d4f4c25a75f1456eb01d03de7e9c1795689
[]
no_license
togacoder/AtCoder
8fa3cd0007ec3aa5243dbf578c7588ce8940504b
9128bc4d475da004d5aa490bd636ab6f935b6804
refs/heads/master
2021-06-08T09:08:11.403406
2020-04-12T14:17:54
2020-04-12T14:17:54
87,400,397
0
0
null
null
null
null
UTF-8
C++
false
false
193
cpp
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; if(b - a == c - b) { cout << "YES" << endl; } else { cout << "NO" << endl; } return 0; }
[ "bike.dio@gmail.com" ]
bike.dio@gmail.com
61ff51b394c0692b6bde07b547a31e3792e0822d
027ad99a3fa9231dd96dd610fdbebd26f9fd02db
/Projects/mo_graphics/compositeMaster_objectDOFFilter.cpp
edb73b5427d9c1540dfac75b454f23d6084267f5
[ "BSD-3-Clause" ]
permissive
droidoid/MoPlugs
ee5b6162a3a504d43d8a62ab221cfe72317afe25
fce52e6469408e32e94af8ac8a303840bc956e53
refs/heads/master
2020-12-19T04:26:07.530778
2019-08-07T22:05:07
2019-08-07T22:05:07
235,619,955
1
0
BSD-3-Clause
2020-01-22T16:54:13
2020-01-22T16:54:12
null
UTF-8
C++
false
false
10,710
cpp
////////////////////////////////////////////////////////////////////////////////////////////////// // // file: compositeMaster_objectDOFFilter.cpp // // Author Sergey Solokhin (Neill3d) // // GitHub page - https://github.com/Neill3d/MoPlugs // Licensed under BSD 3-Clause - https://github.com/Neill3d/MoPlugs/blob/master/LICENSE // /////////////////////////////////////////////////////////////////////////////////////////////////// #include "compositeMaster_objectDOFFilter.h" FBClassImplementation2(ObjectFilter3dDOF) FBUserObjectImplement(ObjectFilter3dDOF, "Composition 3d DOF", EFFECT_ICON); //Register UserObject class FBElementClassImplementationFilter(ObjectFilter3dDOF, FILTER3DDOF__ASSETNAME, EFFECT_ICON); //Register to the asset system ////////////////////////////////////////////////////////////////////////////////////////////////// PROCS void AddPropertyViewForDOF(const char* pPropertyName, const char* pHierarchy, bool pIsFolder=false) { FBPropertyViewManager::TheOne().AddPropertyView(FILTER3DDOF__CLASSSTR, pPropertyName, pHierarchy); } void ObjectFilter3dDOF::AddPropertiesToPropertyViewManager() { AddPropertyViewForDOF( "Active", "" ); AddPropertyViewForDOF( "Reload Shader", "" ); AddPropertyViewForDOF( "Opacity", "" ); AddPropertyViewForDOF( "", "Masking", true ); AddPropertyViewForDOF( "Use Composite Mask", "Masking" ); AddPropertyViewForDOF( "Select Composite Mask", "Masking" ); AddPropertyViewForDOF( "Invert Composite Mask", "Masking" ); AddPropertyViewForDOF( "Custom Mask", "Masking" ); AddPropertyViewForDOF( "", "Info", true ); AddPropertyViewForDOF( "Out Width", "Info" ); AddPropertyViewForDOF( "Out Height", "Info" ); } /////////////////////////////////////////////////////////////////////////////////////////////////// /************************************************ * Constructor. ************************************************/ ObjectFilter3dDOF::ObjectFilter3dDOF( const char* pName, HIObject pObject ) : ObjectCompositeFilter( pName, pObject, new CProgramUniformsBase() ) { FBClassInit; } /************************************************ * FiLMBOX Constructor. ************************************************/ bool ObjectFilter3dDOF::FBCreate() { FBPropertyPublish(this, UseCameraDOFProperties, "Use Camera DOF Properties", nullptr, nullptr); FBPropertyPublish(this, ResetAction, "Reset", nullptr, SetResetAction); FBPropertyPublish(this, DebugBlurValue, "Debug Blur Value", nullptr, nullptr); FBPropertyPublish(this, FocalDistance, "Focal Distance", nullptr, nullptr); FBPropertyPublish(this, FocalRange, "Focal Range", nullptr, nullptr); FBPropertyPublish(this, FStop, "F-Stop", nullptr, nullptr); FBPropertyPublish(this, AutoFocus, "Auto Focus", nullptr, nullptr); FBPropertyPublish(this, FocusObject, "Focus object", nullptr, nullptr); FBPropertyPublish(this, SelectFocusObject, "Select Focus object", nullptr, SetSelectFocusObject); FBPropertyPublish(this, FastPreview, "Fast Preview", nullptr, SetFastPreview); FBPropertyPublish(this, PreviewQuality, "Preview Quality", nullptr, nullptr); FBPropertyPublish(this, PreviewBlurAmount, "Preview Blur Amount", nullptr, nullptr); FBPropertyPublish(this, BlurForeground, "Blur Foreground", nullptr, nullptr); /* FBPropertyPublish(this, ManualFocus, "Manual mode", nullptr, nullptr); FBPropertyPublish(this, ManualNear, "Manual Near Distance", nullptr, nullptr); FBPropertyPublish(this, ManualNearFalloff, "Manual Near Falloff", nullptr, nullptr); FBPropertyPublish(this, ManualFar, "Manual Far Distance", nullptr, nullptr); FBPropertyPublish(this, ManualFarFalloff, "Manual Far Falloff", nullptr, nullptr); */ FBPropertyPublish(this, Vignetting, "Vignetting", nullptr, nullptr); FBPropertyPublish(this, Samples, "Samples", nullptr, nullptr); FBPropertyPublish(this, Rings, "Ring count", nullptr, nullptr); FBPropertyPublish(this, CoC, "Circle of confusion", nullptr, nullptr); FBPropertyPublish(this, Threshold, "Highlight Threshold", nullptr, nullptr); FBPropertyPublish(this, Gain, "Highlight Gain", nullptr, nullptr); FBPropertyPublish(this, Bias, "Bokeh Bias", nullptr, nullptr); FBPropertyPublish(this, Fringe, "Bokeh Fringe", nullptr, nullptr); FBPropertyPublish(this, Noise, "Noise", nullptr, nullptr); FBPropertyPublish(this, Pentagon, "Pentagon", nullptr, nullptr); FBPropertyPublish(this, PentagonFeather, "Pentagon feather", nullptr, nullptr); FocusObject.SetSingleConnect(true); FocusObject.SetFilter( FBModelNull::GetInternalClassId() ); Samples.SetMinMax(1, 12, true, true); Rings.SetMinMax(1, 32, true, true); PentagonFeather.SetMinMax(0.0, 1.0, true, true); // DoReset(); ShaderBlurSystem::Create(mBlurCache); return ParentClass::FBCreate(); } /************************************************ * FiLMBOX Destructor. ************************************************/ void ObjectFilter3dDOF::FBDestroy() { ShaderBlurSystem::Destroy(mBlurCache); ParentClass::FBDestroy(); } void ObjectFilter3dDOF::PrepData(const CCompositionInfo *pInfo) { bool autofocus = false; AutoFocus.GetData( &autofocus, sizeof(bool) ); //FBCamera *pCamera = ((CCompositionInfo*)pInfo)->GetRenderCamera(); if (UseCameraDOFProperties && pInfo->UseCameraDOFSettings() ) { mData.focalDepth = (float) pInfo->FocusSpecificDistance(); mData.focalLength = (float) pInfo->FocusAngle(); FBModel *pInterest = ((CCompositionInfo*)pInfo)->GetRenderCameraInterest(); if (pInfo->FocusDistanceSource() == kFBFocusDistanceCameraInterest && pInterest != nullptr) { FBMatrix modelView, modelViewI; ( (FBModel*) ((CCompositionInfo*)pInfo)->GetRenderCamera())->GetMatrix(modelView); modelViewI = modelView.Inverse(); FBVector3d lPos; pInterest->GetVector(lPos); FBTVector p( lPos[0], lPos[1], lPos[2] ); FBVectorMatrixMult( p, modelViewI, p ); double dist = p[0]; // Dont write to property // FocalDistance = dist; mData.focalDepth = dist; } } else { mData.focalDepth = FocalDistance; mData.focalLength = FocalRange; if ( autofocus && FocusObject.GetCount() > 0) { FBMatrix modelView, modelViewI; ( (FBModel*) ((CCompositionInfo*)pInfo)->GetRenderCamera())->GetMatrix(modelView); modelViewI = modelView.Inverse(); FBVector3d lPos; FBModel *pModel = (FBModel*) FocusObject.GetAt(0); pModel->GetVector(lPos); FBTVector p( lPos[0], lPos[1], lPos[2] ); FBVectorMatrixMult( p, modelViewI, p ); double dist = p[0]; // Dont write to property // FocalDistance = dist; mData.focalDepth = dist; } } mData.fstop = FStop; mData.samples = Samples; mData.rings = Rings; mData.ndofstart = 1.0; mData.ndofdist = 2.0; mData.fdofstart = 1.0; mData.fdofdist = 3.0; mData.CoC = 0.01f * (float) CoC; mData.threshold = 0.01f * (float) Threshold; mData.focus = vec2(0.5f, 0.5f); mData.gain = 0.01f * (float) Gain; mData.bias = 0.01f * (float) Bias; mData.fringe = 0.01f * (float) Fringe; mData.feather = 0.01f * (float) PentagonFeather; mData.debugBlurValue = (DebugBlurValue.AsInt() > 0) ? 1.0f : 0.0f; // // mDataBuffer.UpdateData( sizeof(Data), 1, &mData ); } bool ObjectFilter3dDOF::GenBlurData(const CCompositionInfo *pInfo, const CProcessingInfo &prInfo, CompositeFinalStats &stats, const GLuint sourceTexId, const GLuint dstTexId) { mBlurData.horzFactor = 0.01 * PreviewBlurAmount; mBlurData.vertFactor = 0.01 * PreviewBlurAmount; mBlurData.w = prInfo.GetWidth(); mBlurData.h = prInfo.GetHeight(); if (pInfo->GetPreviewSizeFactor() >= 1.0f) { switch(PreviewQuality) { case eCompositionQualityPreview2: mBlurData.w = mBlurData.w / 2; mBlurData.h = mBlurData.h / 2; break; case eCompositionQualityPreview4: mBlurData.w = mBlurData.w / 4; mBlurData.h = mBlurData.h / 4; break; } } mBlurTexture.ReSizeLayersData( mBlurData.w, mBlurData.h ); mBlurData.opacity = 1.0f; if (false == ShaderBlurSystem::CheckIfShaderIsReady(pInfo, mBlurData, mBlurCache) ) return false; mBlurData.sourceTexId = sourceTexId; mBlurData.dstTexId = mBlurTexture.QueryATextureBuffer(); if (false == ShaderBlurSystem::ApplyFilter(pInfo, mBlurData, stats, mBlurCache) ) return false; return true; } bool ObjectFilter3dDOF::PlugDataNotify(FBConnectionAction pAction,FBPlug* pThis,void* pData,void* pDataOld,int pDataSize) { if (pAction == kFBCandidated && (pThis == &Noise || pThis == &Vignetting || pThis == &BlurForeground || pThis == &Pentagon) ) { // query a new program with updated define list mProgram = nullptr; } return ParentClass::PlugDataNotify(pAction, pThis, pData, pDataOld, pDataSize); } bool ObjectFilter3dDOF::PlugNotify(FBConnectionAction pAction,FBPlug* pThis,int pIndex,FBPlug* pPlug,FBConnectionType pConnectionType,FBPlug* pNewPlug ) { if (pThis == &FocusObject) { if (pAction == kFBConnectedSrc) { ConnectSrc(pPlug); } else if (pAction == kFBDisconnectedSrc) { DisconnectSrc(pPlug); } } return ParentClass::PlugNotify(pAction, pThis, pIndex, pPlug, pConnectionType, pNewPlug); } void ObjectFilter3dDOF::SetResetAction(HIObject object, bool value) { ObjectFilter3dDOF *pBase = FBCast<ObjectFilter3dDOF>(object); if (pBase && value) { pBase->DoReset(); } } void ObjectFilter3dDOF::SetSelectFocusObject(HIObject object, bool value) { ObjectFilter3dDOF *pBase = FBCast<ObjectFilter3dDOF>(object); if (pBase && value) { pBase->DoSelectFocusObject(); } } void ObjectFilter3dDOF::SetFastPreview(HIObject object, bool value) { ObjectFilter3dDOF *pBase = FBCast<ObjectFilter3dDOF>(object); if (pBase) { pBase->ChangeGlobalSettings(); pBase->FastPreview.SetPropertyValue(value); } } void ObjectFilter3dDOF::DoReset() { UseCameraDOFProperties = true; DebugBlurValue = false; FocalDistance = 40.0; FocalRange = 4.0; FStop = 0.5; BlurForeground = true; /* ManualFocus = false; ManualNear = 1.0; ManualNearFalloff = 2.0; ManualFar = 1.0; ManualFarFalloff = 3.0; */ AutoFocus = false; FastPreview = false; PreviewQuality = eCompositionQualityPreview2; PreviewBlurAmount = 100.0; Samples = 3; Rings = 3; CoC = 3.0; Threshold = 50.0; Gain = 200.0; Bias = 50.0; Fringe = 70.0; Noise = true; Pentagon = false; PentagonFeather = 40.0; } void ObjectFilter3dDOF::DoSelectFocusObject() { // TODO: crashes a system /* if (FocusObject.GetCount() > 0) { FBBeginChangeAllModels(); FBScene *pScene = mSystem.Scene; for (int i=0; i<pScene->Components.GetCount(); ++i) { FBComponent *pComp = pScene->Components[i]; if ( pComp->HasObjectFlags(kFBFlagSystem) ) continue; pComp->Selected = false; } FocusObject.GetAt(0)->Selected = true; FBEndChangeAllModels(); } */ }
[ "neill@bk.ru" ]
neill@bk.ru
50e1301455aab6e1592c82431ea6b7825e05c82c
7d053d9477981633d31fc4dc6478ab0be3072b1c
/src/Utils/StringUtils.h
de2dce485dbff343262b5a74bd545d6b8cfff815
[]
no_license
GorillaSX/RenderingSystem
776416cd45413d10525887b1e58f4963969938bf
0374edbae7a95487661e8f4c0a217c41a40aedc6
refs/heads/master
2020-03-15T06:22:37.785969
2018-12-03T17:54:30
2018-12-03T17:54:30
132,006,284
0
0
null
null
null
null
UTF-8
C++
false
false
389
h
#ifndef __STRINGUTILS_H__ #define __STRINGUTILS_H__ namespace Gorilla { class StringUtils { public: static bool endsWith(const std::string& input, const std::string& end); static std::string readFileToString(const std::string& fileName); static std::string humanizeNumber(double value, bool usePowerOfTwo = false); }; } #endif //__STRINGUTILS_H__
[ "songxin@udel.edu" ]
songxin@udel.edu
d3b1947e23fd2e8432027ae7ab2ba465e72c11ca
306ca9867750b5af749163187bdd368b52678936
/GameEngine/src/graphics/sprite.cpp
36c1642aec7f698e4a8d9a47836cc12d5ac95bb2
[]
no_license
alfmunny/GameEngine
e0231049d1a49bf9ca8a5a3669176d2f22f3eb29
6590b825ee3e91ff889c58697a4fb25fe12deeff
refs/heads/master
2021-05-04T10:47:25.905263
2017-01-17T15:33:34
2017-01-17T15:33:34
52,613,448
0
0
null
null
null
null
UTF-8
C++
false
false
258
cpp
#include "sprite.h" namespace sparky{ namespace graphics { Sprite::Sprite(float x, float y, float width, float height, const maths::vec4 & color) : Renderable2D(maths::vec3(x, y, 0), maths::vec2(width, height), color) { } Sprite::~Sprite() { } } }
[ "alfmunny@gmail.com" ]
alfmunny@gmail.com
c51bebf2702658e1c993d090eb41cf8d8723a3e0
dcd034bd298959a2dee25ace99633a4c23f19981
/dendrite.cpp
69af3d4ca2089a6842ee8a4a47a96b32c2213b52
[]
no_license
thejbug/HTMstuff1
8901cdf31dcdb3cd83569359ec9eb9d5c7a5ab06
87029641c777f04552d80625bd3aa4270344c601
refs/heads/master
2020-09-28T08:12:32.553568
2020-01-02T07:49:41
2020-01-02T07:49:41
226,730,562
0
0
null
null
null
null
UTF-8
C++
false
false
5,298
cpp
#include "dendrite.h" #include "random" Dendrite::Dendrite() { potentialIndices = new std::vector<unsigned short>; } Dendrite::Dendrite(BitArray& input, float potentialPercent, float maxInitialPerm, float connectedThreshold) { this->connectedThreshold = static_cast<unsigned char>(connectedThreshold * 255); unsigned char maxPerm = static_cast<unsigned char>(maxInitialPerm * 255); if(potentialPercent >= 0.9999f) { for(unsigned int i = 0; i < input.size(); i ++) { unsigned char perm = rand() % maxPerm; permanences.push_back(perm); } potentialIndices = nullptr; } else { int numSynapses = static_cast<int>(input.size() * potentialPercent); } } using namespace std; Dendrite* Dendrite::growSegment(BitArray *input, unsigned char id, float initialPerm, float connectedThreshold) { Dendrite* dend = new Dendrite; //dend->potentialIndices = new std::vector<unsigned short>; //*dend->potentialIndices = input->onBits(); dend->potentialIndices = new std::vector<unsigned short>(input->onBits()); dend->inputID = id; dend->permanences = std::vector<unsigned char>(dend->potentialIndices->size()); dend->connectedThreshold = static_cast<unsigned char>(connectedThreshold * 255); unsigned char perm = static_cast<unsigned char>(initialPerm * 255); for(unsigned int p = 0; p < dend->permanences.size(); p ++) { dend->permanences[p] = perm; } return dend; } //computes and stores two overlap scores. one is the overlap with actual connections witht the input, //the other is the overlap of the permanences with the input. returns the actual overlap unsigned short Dendrite::computeOverlap(BitArray *input) { overlap = 0; potentialOverlap = 0; if(!potentialIndices) { for(unsigned int i = 0; i < input->size(); i ++) { if(input->at(i)) { if(permanences[i] >= connectedThreshold) { overlap ++; } } } } //if there are indices else { auto on = input->onBits(); for(unsigned int i = 0; i < potentialIndices->size(); i ++) { unsigned int index = potentialIndices->at(i); if(input->at(index)) { potentialOverlap ++; if(permanences[i] >= connectedThreshold) { overlap ++; } } } } return overlap; } //returns the stored overlap unsigned short Dendrite::getOverlap() { return overlap; } unsigned short Dendrite::receptiveFieldSize() { return permanences.size(); } BitArray Dendrite::getConnections() { BitArray ret(permanences.size(), 1); for(unsigned int i = 0; i < ret.size(); i ++) { ret[i] = permanences[i] >= connectedThreshold; } return ret; } void Dendrite::fit(BitArray *input, unsigned char inc, unsigned char dec) { if(!potentialIndices) { for(unsigned int i = 0; i < input->size(); i ++) { if(input->at(i)) { permanences[i] = std::min(255, permanences[i] + inc); } else { permanences[i] = std::max(0, permanences[i] - dec); } } } else { //fit the existing synapses to the input //also track any synapses that need to be deleted std::vector<unsigned short> deadSynapses; for(unsigned int i = 0; i < potentialIndices->size(); i ++) { unsigned int index = potentialIndices->at(i); if(input->at(index)) { permanences[i] = std::min(255, permanences[i] + inc); } else { permanences[i] = std::max(0, permanences[i] - dec); } if(permanences[i] == 0) { deadSynapses.push_back(i); } } //grow new synapses if necessary //for each on bit... auto on = input->onBits(); for(unsigned int i = 0; i < on.size(); i ++) { //if it's not already in the potential indices, add the new synapse if(BitArray::in(on[i], potentialIndices) < 0) { potentialIndices->push_back(on[i]); permanences.push_back(connectedThreshold); } } //delete dead synapsees if(deadSynapses.size() > 0) { //copy old synapses if they are not dead auto newIndices = new std::vector<unsigned short>; std::vector<unsigned char> newPerms; for(unsigned int i = 0; i < potentialIndices->size(); i ++) { if(!BitArray::in(i, &deadSynapses)) { newIndices->push_back(potentialIndices->at(i)); newPerms.push_back(permanences[i]); } } delete potentialIndices; potentialIndices = newIndices; permanences = newPerms; } } } std::vector<unsigned char> Dendrite::getPermanences() { return permanences; }
[ "jaredemery@Jareds-MacBook-Pro.local" ]
jaredemery@Jareds-MacBook-Pro.local
8c90dd111455f4deaec50d3412ac9962cf25b0f3
8a0a4d70c8626bdbf08f2c6a1856a159e885e0b5
/NSIS/tags/v203/Source/script.cpp
e3520f9475c7ce8a19cce1be9cd284189aaa4c27
[]
no_license
joelnb/nsis
c77ad193314fd3f23fd104d924dfbee7e3e959e7
cb26737974acb558c61a143458a79984e724f381
refs/heads/master
2022-09-13T03:33:20.860809
2022-09-02T20:03:18
2022-09-02T20:03:18
142,794,118
1
0
null
null
null
null
UTF-8
C++
false
false
190,733
cpp
#include "Platform.h" #include <stdio.h> #include <ctype.h> #include "tokens.h" #include "build.h" #include "util.h" #include "exedata.h" #include "ResourceEditor.h" #include "DialogTemplate.h" #include "lang.h" #include "dirreader.h" #include "exehead/resource.h" #include <cassert> // for assert(3) #include <time.h> using namespace std; #ifdef _WIN32 # include <direct.h> #else # include <sys/stat.h> # include <glob.h> # include <fcntl.h> // for O_RDONLY # include <unistd.h> #endif #define MAX_INCLUDEDEPTH 10 #define MAX_LINELENGTH 16384 #ifdef NSIS_SUPPORT_STANDARD_PREDEFINES // Added by Sunil Kamath 11 June 2003 char *CEXEBuild::set_file_predefine(char *filename) { char *oldfilename = definedlist.find("__FILE__"); if(oldfilename) { oldfilename = strdup(oldfilename); definedlist.del("__FILE__"); } char *p = strrchr(filename,'\\'); if(p) { p++; } else { p = curfilename; } definedlist.add("__FILE__",p); return oldfilename; } void CEXEBuild::restore_file_predefine(char *oldfilename) { definedlist.del("__FILE__"); if(oldfilename) { definedlist.add("__FILE__",oldfilename); free(oldfilename); } } char *CEXEBuild::set_timestamp_predefine(char *filename) { char *oldtimestamp = definedlist.find("__TIMESTAMP__"); if(oldtimestamp) { oldtimestamp = strdup(oldtimestamp); definedlist.del("__TIMESTAMP__"); } #ifdef _WIN32 char timestampbuf[256] = ""; char datebuf[128] = ""; char timebuf[128] = ""; WIN32_FIND_DATA fd; FILETIME floctime; SYSTEMTIME stime; HANDLE hSearch = FindFirstFile(filename, &fd); if (hSearch != INVALID_HANDLE_VALUE) { FindClose(hSearch); FileTimeToLocalFileTime(&fd.ftLastWriteTime, &floctime); FileTimeToSystemTime(&floctime, &stime); GetDateFormat(LOCALE_USER_DEFAULT, DATE_LONGDATE, &stime, NULL, datebuf, sizeof(datebuf)); GetTimeFormat(LOCALE_USER_DEFAULT, 0, &stime, NULL, timebuf, sizeof(timebuf)); wsprintf(timestampbuf,"%s %s",datebuf,timebuf); definedlist.add("__TIMESTAMP__",timestampbuf); } #else struct stat st; if (!stat(filename, &st)) definedlist.add("__TIMESTAMP__",ctime(&st.st_mtime)); #endif return oldtimestamp; } void CEXEBuild::restore_timestamp_predefine(char *oldtimestamp) { definedlist.del("__TIMESTAMP__"); if(oldtimestamp) { definedlist.add("__TIMESTAMP__",oldtimestamp); free(oldtimestamp); } } char *CEXEBuild::set_line_predefine(int linecnt, BOOL is_macro) { char* linebuf = NULL; MANAGE_WITH(linebuf, free); char temp[128] = ""; sprintf(temp,"%d",linecnt); char *oldline = definedlist.find("__LINE__"); if(oldline) { oldline = strdup(oldline); definedlist.del("__LINE__"); } if(is_macro && oldline) { linebuf = (char *)malloc(strlen(oldline)+strlen(temp)+2); sprintf(linebuf,"%s.%s",oldline,temp); } else { linebuf = strdup(temp); } definedlist.add("__LINE__",linebuf); return oldline; } void CEXEBuild::restore_line_predefine(char *oldline) { definedlist.del("__LINE__"); if(oldline) { definedlist.add("__LINE__",oldline); free(oldline); } } void CEXEBuild::set_date_time_predefines() { time_t etime; struct tm * ltime; char datebuf[128]; char timebuf[128]; time(&etime); ltime = localtime(&etime); #ifdef _WIN32 SYSTEMTIME stime; stime.wYear = ltime->tm_year+1900; stime.wMonth = ltime->tm_mon + 1; stime.wDay = ltime->tm_mday; stime.wHour= ltime->tm_hour; stime.wMinute= ltime->tm_min; stime.wSecond= ltime->tm_sec; stime.wMilliseconds= 0; GetDateFormat(LOCALE_USER_DEFAULT, DATE_SHORTDATE, &stime, NULL, datebuf, sizeof(datebuf)); definedlist.add("__DATE__",(char *)datebuf); GetTimeFormat(LOCALE_USER_DEFAULT, 0, &stime, NULL, timebuf, sizeof(timebuf)); definedlist.add("__TIME__",(char *)timebuf); #else my_strftime(datebuf, sizeof(datebuf), "%x", ltime); definedlist.add("__DATE__",(char *)datebuf); my_strftime(timebuf, sizeof(timebuf), "%X", ltime); definedlist.add("__TIME__",(char *)timebuf); #endif } void CEXEBuild::del_date_time_predefines() { definedlist.del("__DATE__"); definedlist.del("__TIME__"); } #endif int CEXEBuild::process_script(FILE *filepointer, char *filename) { linecnt = 0; fp = filepointer; curfilename = filename; if (has_called_write_output) { ERROR_MSG("Error (process_script): write_output already called, can't continue\n"); return PS_ERROR; } #ifdef NSIS_SUPPORT_STANDARD_PREDEFINES // Added by Sunil Kamath 11 June 2003 set_date_time_predefines(); char *oldfilename = set_file_predefine(curfilename); char *oldtimestamp = set_timestamp_predefine(curfilename); #endif int ret=parseScript(); #ifdef NSIS_SUPPORT_STANDARD_PREDEFINES // Added by Sunil Kamath 11 June 2003 restore_file_predefine(oldfilename); restore_timestamp_predefine(oldtimestamp); del_date_time_predefines(); #endif fp = 0; curfilename = 0; if (m_linebuild.getlen()) { ERROR_MSG("Error: invalid script: last line ended with \\\n"); return PS_ERROR; } if (ret == PS_EOF && num_ifblock()) { ERROR_MSG("!if[macro][n]def: open at EOF - need !endif\n"); return PS_ERROR; } return ret; } #define PRINTHELP() { print_help(line.gettoken_str(0)); return PS_ERROR; } void CEXEBuild::start_ifblock() { ifblock ib = {0, }; if (cur_ifblock) ib.inherited_ignore = cur_ifblock->ignore || cur_ifblock->inherited_ignore; int num = build_preprocessor_data.getlen() / sizeof(ifblock); build_preprocessor_data.add(&ib, sizeof(ifblock)); cur_ifblock = (ifblock *) build_preprocessor_data.get() + num; } void CEXEBuild::end_ifblock() { if (build_preprocessor_data.getlen()) { cur_ifblock--; build_preprocessor_data.resize(build_preprocessor_data.getlen() - sizeof(ifblock)); if (!build_preprocessor_data.getlen()) cur_ifblock = 0; } } int CEXEBuild::num_ifblock() { return build_preprocessor_data.getlen() / sizeof(ifblock); } // Func size: just under 200 lines (orip) int CEXEBuild::doParse(const char *str) { LineParser line(inside_comment); int res; while (*str == ' ' || *str == '\t') str++; // if ignoring, ignore all lines that don't begin with !. if (cur_ifblock && (cur_ifblock->ignore || cur_ifblock->inherited_ignore) && *str!='!' && !last_line_had_slash) return PS_OK; if (m_linebuild.getlen()>1) m_linebuild.resize(m_linebuild.getlen()-2); m_linebuild.add(str,strlen(str)+1); // remove trailing slash and null if (str[0] && CharPrev(str,str+strlen(str))[0] == '\\') { last_line_had_slash = 1; return PS_OK; } else last_line_had_slash = 0; res=line.parse((char*)m_linebuild.get(),!strnicmp((char*)m_linebuild.get(),"!define",7)); inside_comment = line.InCommentBlock(); m_linebuild.resize(0); if (res) { if (res==-2) ERROR_MSG("Error: unterminated string parsing line at %s:%d\n",curfilename,linecnt); else ERROR_MSG("Error: error parsing line (%s:%d)\n",curfilename,linecnt); return PS_ERROR; } parse_again: if (line.getnumtokens() < 1) return PS_OK; int np,op,pos; int tkid=get_commandtoken(line.gettoken_str(0),&np,&op,&pos); if (tkid == -1) { char *p=line.gettoken_str(0); if (p[0] && p[strlen(p)-1]==':') { if (p[0] == '!' || (p[0] >= '0' && p[0] <= '9') || p[0] == '$' || p[0] == '-' || p[0] == '+') { ERROR_MSG("Invalid label: %s (labels cannot begin with !, $, -, +, or 0-9)\n",line.gettoken_str(0)); return PS_ERROR; } if (add_label(line.gettoken_str(0))) return PS_ERROR; line.eattoken(); goto parse_again; } #ifdef NSIS_CONFIG_PLUGIN_SUPPORT // Added by Ximon Eighteen 5th August 2002 // We didn't recognise this command, could it be the name of a // function exported from a dll? if (m_plugins.IsPluginCommand(line.gettoken_str(0))) { np = 0; // parameters are optional op = -1; // unlimited number of optional parameters pos = -1; // placement will tested later tkid = TOK__PLUGINCOMMAND; } else #endif { ERROR_MSG("Invalid command: %s\n",line.gettoken_str(0)); return PS_ERROR; } } if (IsTokenPlacedRight(pos, line.gettoken_str(0)) != PS_OK) return PS_ERROR; int v=line.getnumtokens()-(np+1); if (v < 0 || (op >= 0 && v > op)) // opt_parms is -1 for unlimited { ERROR_MSG("%s expects %d",line.gettoken_str(0),np); if (op < 0) ERROR_MSG("+"); if (op > 0) ERROR_MSG("-%d",op+np); ERROR_MSG(" parameters, got %d.\n",line.getnumtokens()-1); PRINTHELP() } int if_from_else = 0; if (tkid == TOK_P_ELSE) { if (cur_ifblock && cur_ifblock->inherited_ignore) return PS_OK; if (!num_ifblock() || cur_ifblock->elseused) { ERROR_MSG("!else: stray !else\n"); return PS_ERROR; } if (cur_ifblock->hasexeced) { cur_ifblock->ignore++; return PS_OK; } if (line.getnumtokens() == 1) { cur_ifblock->ignore = !cur_ifblock->ignore; // if not executed up until now, it will now cur_ifblock->hasexeced++; cur_ifblock->elseused++; return PS_OK; } line.eattoken(); int v=line.gettoken_enum(0,"ifdef\0ifndef\0ifmacrodef\0ifmacrondef\0"); if (v < 0) PRINTHELP() if (line.getnumtokens() == 1) PRINTHELP() int cmds[] = {TOK_P_IFDEF, TOK_P_IFNDEF, TOK_P_IFMACRODEF, TOK_P_IFMACRONDEF}; tkid = cmds[v]; if_from_else++; } if (tkid == TOK_P_IFNDEF || tkid == TOK_P_IFDEF || tkid == TOK_P_IFMACRODEF || tkid == TOK_P_IFMACRONDEF) { if (!if_from_else) start_ifblock(); if (cur_ifblock && cur_ifblock->inherited_ignore) { return PS_OK; } int istrue=0; int mod=0; int p; // pure left to right precedence. Not too powerful, but useful. for (p = 1; p < line.getnumtokens(); p ++) { if (p & 1) { int new_s; if (tkid == TOK_P_IFNDEF || tkid == TOK_P_IFDEF) new_s=!!definedlist.find(line.gettoken_str(p)); else new_s=MacroExists(line.gettoken_str(p)); if (tkid == TOK_P_IFNDEF || tkid == TOK_P_IFMACRONDEF) new_s=!new_s; if (mod == 0) istrue = istrue || new_s; else istrue = istrue && new_s; } else { mod=line.gettoken_enum(p,"|\0&\0||\0&&\0"); if (mod == -1) PRINTHELP() mod &= 1; } } if (istrue) { cur_ifblock->hasexeced++; cur_ifblock->ignore = 0; } else cur_ifblock->ignore++; return PS_OK; } if (tkid == TOK_P_ENDIF) { if (!num_ifblock()) { ERROR_MSG("!endif: no !ifdef open\n"); return PS_ERROR; } end_ifblock(); return PS_OK; } if (!cur_ifblock || (!cur_ifblock->ignore && !cur_ifblock->inherited_ignore)) { return doCommand(tkid,line); } return PS_OK; } // Func size: about 140 lines (orip) #ifdef NSIS_FIX_DEFINES_IN_STRINGS void CEXEBuild::ps_addtoline(const char *str, GrowBuf &linedata, StringList &hist, bool bIgnoreDefines /*= false*/) #else void CEXEBuild::ps_addtoline(const char *str, GrowBuf &linedata, StringList &hist) #endif { // convert $\r, $\n to their literals // preprocessor replace ${VAR} and $%VAR% with whatever value // note that if VAR does not exist, ${VAR} or $%VAR% will go through unmodified const char *in=str; while (*in) { int add=1; char *t; char c=*in; t=CharNext(in); if (t-in > 1) // handle multibyte chars (no escape) { linedata.add((void*)in,t-in); in=t; continue; } in=t; if (c == '$') { if (in[0] == '\\') { if (in[1] == 'r') { in+=2; c='\r'; } else if (in[1] == 'n') { in+=2; c='\n'; } else if (in[1] == 't') { in+=2; c='\t'; } } else if (in[0] == '{') { char *s=strdup(in+1); MANAGE_WITH(s, free); char *t=s; unsigned int bn = 0; while (*t) { if (*t == '{') bn++; if (*t == '}' && bn-- == 0) break; t=CharNext(t); } if (*t && t!=s #ifdef NSIS_FIX_DEFINES_IN_STRINGS && !bIgnoreDefines #endif ) { *t=0; // check for defines inside the define name - ${bla${blo}} GrowBuf defname; ps_addtoline(s,defname,hist); defname.add("",1); t=definedlist.find((char*)defname.get()); if (t && hist.find((char*)defname.get(),0)<0) { in+=strlen(s)+2; add=0; hist.add((char*)defname.get(),0); #ifdef NSIS_FIX_DEFINES_IN_STRINGS ps_addtoline(t,linedata,hist,true); #else ps_addtoline(t,linedata,hist); #endif hist.delbypos(hist.find((char*)defname.get(),0)); } } } else if (in[0] == '%') { char *s=strdup(in+1); MANAGE_WITH(s, free); char *t=s; while (*t) { if (*t == '%') break; t=CharNext(t); } if (*t && t!=s) { *t=0; // check for defines inside the define name - ${bla${blo}} GrowBuf defname; ps_addtoline(s,defname,hist); defname.add("",1); t=getenv((char*)defname.get()); if (t && hist.find((char*)defname.get(),0)<0) { in+=strlen(s)+2; add=0; hist.add((char*)defname.get(),0); #ifdef NSIS_FIX_DEFINES_IN_STRINGS ps_addtoline(t,linedata,hist,true); #else ps_addtoline(t,linedata,hist); #endif hist.delbypos(hist.find((char*)defname.get(),0)); } } } #ifdef NSIS_FIX_DEFINES_IN_STRINGS else if (in[0] == '$') { if (in[1] == '{') // Found $$ before - Don't replace this define { char *s=strdup(in+2); MANAGE_WITH(s, free); char *t=s; unsigned int bn = 0; while (*t) { if (*t == '{') bn++; if (*t == '}' && bn-- == 0) break; t=CharNext(t); } if (*t && t!=s) { *t=0; // add text unchanged GrowBuf defname; ps_addtoline(s,defname,hist); in++; } } else { linedata.add((void*)&c,1); in++; } } #endif } if (add) linedata.add((void*)&c,1); } } int CEXEBuild::parseScript() { char str[MAX_LINELENGTH]; for (;;) { char *p=str; *p=0; fgets(str,MAX_LINELENGTH,fp); linecnt++; if (feof(fp)&&!str[0]) break; // remove trailing whitespace while (*p) p++; if (p > str) p--; while (p >= str && (*p == '\r' || *p == '\n' || *p == ' ' || *p == '\t')) p--; *++p=0; StringList hist; GrowBuf linedata; #ifdef NSIS_SUPPORT_STANDARD_PREDEFINES // Added by Sunil Kamath 11 June 2003 char *oldline = set_line_predefine(linecnt, FALSE); #endif ps_addtoline(str,linedata,hist); linedata.add((void*)"",1); int ret=doParse((char*)linedata.get()); #ifdef NSIS_SUPPORT_STANDARD_PREDEFINES // Added by Sunil Kamath 11 June 2003 restore_line_predefine(oldline); #endif if (ret != PS_OK) return ret; } return PS_EOF; } int CEXEBuild::includeScript(char *f) { SCRIPT_MSG("!include: \"%s\"\n",f); FILE *incfp=FOPEN(f,"rt"); if (!incfp) { ERROR_MSG("!include: could not open file: \"%s\"\n",f); return PS_ERROR; } // auto-fclose(3) incfp MANAGE_WITH(incfp, fclose); if (build_include_depth >= MAX_INCLUDEDEPTH) { ERROR_MSG("parseScript: too many levels of includes (%d max).\n",MAX_INCLUDEDEPTH); return PS_ERROR; } build_include_depth++; int last_linecnt=linecnt; linecnt=0; char *last_filename=curfilename; curfilename=f; FILE *last_fp=fp; fp=incfp; #ifdef NSIS_SUPPORT_STANDARD_PREDEFINES // Added by Sunil Kamath 11 June 2003 char *oldfilename = set_file_predefine(curfilename); char *oldtimestamp = set_timestamp_predefine(curfilename); #endif int r=parseScript(); #ifdef NSIS_SUPPORT_STANDARD_PREDEFINES // Added by Sunil Kamath 11 June 2003 restore_file_predefine(oldfilename); restore_timestamp_predefine(oldtimestamp); #endif int errlinecnt=linecnt; linecnt=last_linecnt; curfilename=last_filename; fp=last_fp; build_include_depth--; if (r != PS_EOF && r != PS_OK) { ERROR_MSG("!include: error in script: \"%s\" on line %d\n",f,errlinecnt); return PS_ERROR; } SCRIPT_MSG("!include: closed: \"%s\"\n",f); return PS_OK; } // !ifmacro[n]def based on Anders Kjersem's code int CEXEBuild::MacroExists(const char *macroname) { char *m = (char *) m_macros.get(); while (m && *m) { // check if macroname matches if (!stricmp(m, macroname)) return 1; // skip macro name m += strlen(m) + 1; // skip params while (*m) m += strlen(m) + 1; m++; // skip data while (*m) m += strlen(m) + 1; if (m - (char *) m_macros.get() >= m_macros.getlen() - 1) break; m++; } return 0; } int CEXEBuild::process_oneline(char *line, char *filename, int linenum) { char *last_filename=curfilename; curfilename=filename; int last_linecnt=linecnt; linecnt=linenum; StringList hist; GrowBuf linedata; #ifdef NSIS_SUPPORT_STANDARD_PREDEFINES // Added by Sunil Kamath 11 June 2003 char *oldfilename = NULL; char *oldtimestamp = NULL; char *oldline = NULL; BOOL is_commandline = !strcmp(filename,"command line"); BOOL is_macro = !strncmp(filename,"macro:",strlen("macro:")); if(!is_commandline) { // Don't set the predefines for command line /X option if(!is_macro) { oldfilename = set_file_predefine(curfilename); oldtimestamp = set_timestamp_predefine(curfilename); } oldline = set_line_predefine(linecnt, is_macro); } #endif ps_addtoline(line,linedata,hist); linedata.add((void*)"",1); int ret=doParse((char*)linedata.get()); #ifdef NSIS_SUPPORT_STANDARD_PREDEFINES // Added by Sunil Kamath 11 June 2003 if(!is_commandline) { // Don't set the predefines for command line /X option if(!is_macro) { restore_file_predefine(oldfilename); restore_timestamp_predefine(oldtimestamp); } restore_line_predefine(oldline); } #endif linecnt=last_linecnt; curfilename=last_filename; return ret; } int CEXEBuild::process_jump(LineParser &line, int wt, int *offs) { const char *s=line.gettoken_str(wt); int v; if (!stricmp(s,"0") || !stricmp(s,"")) *offs=0; else if ((v=GetUserVarIndex(line, wt))>=0) { *offs=-v-1; // to jump to a user variable target, -variable_index-1 is stored. } else { if ((s[0] == '-' || s[0] == '+') && !atoi(s+1)) { ERROR_MSG("Error: Goto targets beginning with '+' or '-' must be followed by nonzero integer (relative jump)\n"); return 1; } if ((s[0] >= '0' && s[0] <= '9') || s[0] == '$' || s[0] == '!') { ERROR_MSG("Error: Goto targets cannot begin with 0-9, $, !\n"); return 1; } *offs=ns_label.add(s,0); } return 0; } #define FLAG_OFFSET(flag) (FIELD_OFFSET(exec_flags, flag)/sizeof(int)) #define SECTION_FIELD_GET(field) (FIELD_OFFSET(section, field)/sizeof(int)) #define SECTION_FIELD_SET(field) (-1 - (int)(FIELD_OFFSET(section, field)/sizeof(int))) // Func size: about 5000 lines (orip) int CEXEBuild::doCommand(int which_token, LineParser &line) { static const char *rootkeys[2] = { "HKCR\0HKLM\0HKCU\0HKU\0HKCC\0HKDD\0HKPD\0", "HKEY_CLASSES_ROOT\0HKEY_LOCAL_MACHINE\0HKEY_CURRENT_USER\0HKEY_USERS\0HKEY_CURRENT_CONFIG\0HKEY_DYN_DATA\0HKEY_PERFORMANCE_DATA\0" }; static HKEY rootkey_tab[] = { HKEY_CLASSES_ROOT,HKEY_LOCAL_MACHINE,HKEY_CURRENT_USER,HKEY_USERS,HKEY_CURRENT_CONFIG,HKEY_DYN_DATA,HKEY_PERFORMANCE_DATA }; #ifdef NSIS_CONFIG_PLUGIN_SUPPORT build_plugin_table(); #endif multiple_entries_instruction=0; entry ent={0,}; switch (which_token) { // macro shit /////////////////////////////////////////////////////////////////////////////// case TOK_P_MACRO: { if (!line.gettoken_str(1)[0]) PRINTHELP() char *t=(char *)m_macros.get(); while (t && *t) { if (!stricmp(t,line.gettoken_str(1))) break; t+=strlen(t)+1; // advance over parameters while (*t) t+=strlen(t)+1; t++; // advance over data while (*t) t+=strlen(t)+1; if (t-(char *)m_macros.get() >= m_macros.getlen()-1) break; t++; } if (t && *t) { ERROR_MSG("!macro: macro named \"%s\" already found!\n",line.gettoken_str(1)); return PS_ERROR; } m_macros.add(line.gettoken_str(1),strlen(line.gettoken_str(1))+1); int pc; for (pc=2; pc < line.getnumtokens(); pc ++) { if (!line.gettoken_str(pc)[0]) { ERROR_MSG("!macro: macro parameter %d is empty, not valid!\n",pc-1); return PS_ERROR; } int a; for (a=2; a < pc; a ++) { if (!stricmp(line.gettoken_str(pc),line.gettoken_str(a))) { ERROR_MSG("!macro: macro parameter named %s is used multiple times!\n", line.gettoken_str(pc)); return PS_ERROR; } } m_macros.add(line.gettoken_str(pc),strlen(line.gettoken_str(pc))+1); } m_macros.add("",1); for (;;) { char str[MAX_LINELENGTH]; char *p=str; str[0]=0; fgets(str,MAX_LINELENGTH,fp); //SCRIPT_MSG("%s%s", str, str[strlen(str)-1]=='\n'?"":"\n"); if (feof(fp) && !str[0]) { ERROR_MSG("!macro \"%s\": unterminated (no !macroend found in file)!\n",line.gettoken_str(1)); return PS_ERROR; } // remove trailing whitespace while (*p) p++; if (p > str) p--; while (p >= str && (*p == '\r' || *p == '\n' || *p == ' ' || *p == '\t')) p--; *++p=0; LineParser l2(false); if (!l2.parse(str)) { if (!stricmp(l2.gettoken_str(0),"!macroend")) { linecnt++; break; } if (!stricmp(l2.gettoken_str(0),"!macro")) { ERROR_MSG("Error: can't define a macro inside a macro!\n"); return PS_ERROR; } } if (str[0]) m_macros.add(str,strlen(str)+1); else m_macros.add(" ",2); linecnt++; } m_macros.add("",1); } return PS_OK; case TOK_P_MACROEND: ERROR_MSG("!macroend: no macro currently open.\n"); return PS_ERROR; case TOK_P_INSERTMACRO: { if (!line.gettoken_str(1)[0]) PRINTHELP() char *t=(char *)m_macros.get(); char *m=t; while (t && *t) { if (!stricmp(t,line.gettoken_str(1))) break; t+=strlen(t)+1; // advance over parms while (*t) t+=strlen(t)+1; t++; // advance over data while (*t) t+=strlen(t)+1; if (t-(char *)m_macros.get() >= m_macros.getlen()-1) break; t++; } SCRIPT_MSG("!insertmacro: %s\n",line.gettoken_str(1)); if (!t || !*t) { ERROR_MSG("!insertmacro: macro named \"%s\" not found!\n",line.gettoken_str(1)); return PS_ERROR; } t+=strlen(t)+1; GrowBuf l_define_names; DefineList l_define_saves; int npr=0; // advance over parms while (*t) { char *v=definedlist.find(t); if (v) { l_define_saves.add(t,v); definedlist.del(t); } l_define_names.add(t,strlen(t)+1); definedlist.add(t,line.gettoken_str(npr+2)); npr++; t+=strlen(t)+1; } l_define_names.add("",1); t++; if (npr != line.getnumtokens()-2) { ERROR_MSG("!insertmacro: macro \"%s\" requires %d parameter(s), passed %d!\n", line.gettoken_str(1),npr,line.getnumtokens()-2); return PS_ERROR; } int lp=0; char str[1024]; if (m_macro_entry.find(line.gettoken_str(1),0)>=0) { ERROR_MSG("!insertmacro: macro \"%s\" already being inserted!\n",line.gettoken_str(1)); return PS_ERROR; } int npos=m_macro_entry.add(line.gettoken_str(1),0); wsprintf(str,"macro:%s",line.gettoken_str(1)); while (*t) { lp++; if (strcmp(t," ")) { int ret=process_oneline(t,str,lp); if (ret != PS_OK) { ERROR_MSG("Error in macro %s on macroline %d\n",line.gettoken_str(1),lp); return ret; } } { // fix t if process_oneline changed m_macros char *nm=(char *)m_macros.get(); if (nm != m) { t += nm - m; m = nm; } } t+=strlen(t)+1; } m_macro_entry.delbypos(npos); { char *p=(char*)l_define_names.get(); while (*p) { definedlist.del(p); char *v; if ((v=l_define_saves.find(p))) definedlist.add(p,v); p+=strlen(p)+1; } } SCRIPT_MSG("!insertmacro: end of %s\n",line.gettoken_str(1)); } return PS_OK; // page ordering shit /////////////////////////////////////////////////////////////////////////////// #ifdef NSIS_CONFIG_VISIBLE_SUPPORT case TOK_UNINSTPAGE: set_uninstall_mode(1); case TOK_PAGE: { if (!uninstall_mode) { enable_last_page_cancel = 0; if (!stricmp(line.gettoken_str(line.getnumtokens()-1),"/ENABLECANCEL")) enable_last_page_cancel = 1; } else { uenable_last_page_cancel = 0; if (!stricmp(line.gettoken_str(line.getnumtokens()-1),"/ENABLECANCEL")) uenable_last_page_cancel = 1; } int k = line.gettoken_enum(1,"custom\0license\0components\0directory\0instfiles\0uninstConfirm"); if (k < 0) PRINTHELP(); if (add_page(k) != PS_OK) return PS_ERROR; #ifndef NSIS_SUPPORT_CODECALLBACKS if (!k) { ERROR_MSG("Error: custom page specified, NSIS_SUPPORT_CODECALLBACKS not defined.\n"); return PS_ERROR; } #endif//!NSIS_SUPPORT_CODECALLBACKS if (k) { // not custom #ifdef NSIS_SUPPORT_CODECALLBACKS switch (line.getnumtokens() - enable_last_page_cancel) { case 6: PRINTHELP(); case 5: if (*line.gettoken_str(4)) cur_page->leavefunc = ns_func.add(line.gettoken_str(4),0); case 4: if (*line.gettoken_str(3)) cur_page->showfunc = ns_func.add(line.gettoken_str(3),0); case 3: if (*line.gettoken_str(2)) cur_page->prefunc = ns_func.add(line.gettoken_str(2),0); } #endif//NSIS_SUPPORT_CODECALLBACKS } #ifdef NSIS_SUPPORT_CODECALLBACKS else { // a custom page switch (line.getnumtokens() - enable_last_page_cancel) { case 6: PRINTHELP(); case 5: cur_page->caption = add_string(line.gettoken_str(4)); case 4: if (*line.gettoken_str(3)) cur_page->leavefunc = ns_func.add(line.gettoken_str(3),0); case 3: if (*line.gettoken_str(2)) cur_page->prefunc = ns_func.add(line.gettoken_str(2),0); break; case 2: ERROR_MSG("Error: custom page must have a creator function!\n"); PRINTHELP(); } } #endif//NSIS_SUPPORT_CODECALLBACKS SCRIPT_MSG("%sPage: %s", uninstall_mode?"Uninst":"", line.gettoken_str(1)); #ifdef NSIS_SUPPORT_CODECALLBACKS if (cur_page->prefunc>=0) SCRIPT_MSG(" (%s:%s)", k?"pre":"creator", line.gettoken_str(2)); if (cur_page->showfunc>=0 && k) SCRIPT_MSG(" (show:%s)", line.gettoken_str(3)); if (cur_page->leavefunc>=0) SCRIPT_MSG(" (leave:%s)", line.gettoken_str(4-!k)); else if (cur_page->caption && !k) SCRIPT_MSG(" (caption:%s)", line.gettoken_str(3)); #endif SCRIPT_MSG("\n"); page_end(); if (k == PAGE_INSTFILES) { add_page(PAGE_COMPLETED); page_end(); } set_uninstall_mode(0); } return PS_OK; // extended page setting case TOK_PAGEEX: { int k = line.gettoken_enum(1,"custom\0license\0components\0directory\0instfiles\0uninstConfirm\0"); if (k < 0) { k = line.gettoken_enum(1,"un.custom\0un.license\0un.components\0un.directory\0un.instfiles\0un.uninstConfirm\0"); if (k < 0) PRINTHELP(); set_uninstall_mode(1); } SCRIPT_MSG("PageEx: %s\n", line.gettoken_str(1)); if (add_page(k) != PS_OK) return PS_ERROR; cur_page->flags |= PF_PAGE_EX; } return PS_OK; case TOK_PAGEEXEND: { SCRIPT_MSG("PageExEnd\n"); #ifdef NSIS_SUPPORT_CODECALLBACKS if (cur_page_type == PAGE_CUSTOM && !cur_page->prefunc) { ERROR_MSG("Error: custom pages must have a creator function.\n"); return PS_ERROR; } #endif page_end(); if (cur_page_type == PAGE_INSTFILES) { add_page(PAGE_COMPLETED); page_end(); } set_uninstall_mode(0); } return PS_OK; case TOK_PAGECALLBACKS: #ifdef NSIS_SUPPORT_CODECALLBACKS { SCRIPT_MSG("PageCallbacks:"); if (cur_page_type == PAGE_CUSTOM) { switch (line.getnumtokens()) { case 4: { PRINTHELP(); } case 3: { if (*line.gettoken_str(2)) { if (strnicmp(line.gettoken_str(2), "un.", 3)) { if (uninstall_mode) { ERROR_MSG("\nError: function names must start with \"un.\" in an uninstall page.\n"); return PS_ERROR; } } else { if (!uninstall_mode) { ERROR_MSG("\nError: function names must start with \"un.\" in an uninstall page.\n"); return PS_ERROR; } } cur_page->leavefunc = ns_func.add(line.gettoken_str(2),0); } } case 2: { if (*line.gettoken_str(1)) { if (strnicmp(line.gettoken_str(1), "un.", 3)) { if (uninstall_mode) { ERROR_MSG("\nError: function names must start with \"un.\" in an uninstall page.\n"); return PS_ERROR; } } else { if (!uninstall_mode) { ERROR_MSG("\nError: function names must start with \"un.\" in an uninstall page.\n"); return PS_ERROR; } } cur_page->prefunc = ns_func.add(line.gettoken_str(1),0); } } } } else { switch (line.getnumtokens()) { case 4: { if (*line.gettoken_str(3)) { if (strnicmp(line.gettoken_str(3), "un.", 3)) { if (uninstall_mode) { ERROR_MSG("\nError: function names must start with \"un.\" in an uninstall page.\n"); return PS_ERROR; } } else { if (!uninstall_mode) { ERROR_MSG("\nError: function names must start with \"un.\" in an uninstall page.\n"); return PS_ERROR; } } cur_page->leavefunc = ns_func.add(line.gettoken_str(3),0); } } case 3: { if (*line.gettoken_str(2)) { if (strnicmp(line.gettoken_str(2), "un.", 3)) { if (uninstall_mode) { ERROR_MSG("\nError: function names must start with \"un.\" in an uninstall page.\n"); return PS_ERROR; } } else { if (!uninstall_mode) { ERROR_MSG("\nError: function names must start with \"un.\" in an uninstall page.\n"); return PS_ERROR; } } cur_page->showfunc = ns_func.add(line.gettoken_str(2),0); } } case 2: { if (*line.gettoken_str(1)) { if (strnicmp(line.gettoken_str(1), "un.", 3)) { if (uninstall_mode) { ERROR_MSG("\nError: function names must start with \"un.\" in an uninstall page.\n"); return PS_ERROR; } } else { if (!uninstall_mode) { ERROR_MSG("\nError: function names must start with \"un.\" in an uninstall page.\n"); return PS_ERROR; } } cur_page->prefunc = ns_func.add(line.gettoken_str(1),0); } } } } int custom = cur_page_type == PAGE_CUSTOM ? 1 : 0; if (cur_page->prefunc>=0) SCRIPT_MSG(" %s:%s", !custom?"pre":"creator", line.gettoken_str(1)); if (cur_page->showfunc>=0 && !custom) SCRIPT_MSG(" show:%s", line.gettoken_str(2)); if (cur_page->leavefunc>=0) SCRIPT_MSG(" leave:%s", line.gettoken_str(3-custom)); SCRIPT_MSG("\n"); } return PS_OK; #else ERROR_MSG("Error: %s specified, NSIS_SUPPORT_CODECALLBACKS not defined.\n", line.gettoken_str(0)); return PS_ERROR; #endif//NSIS_SUPPORT_CODECALLBACKS #else case TOK_PAGE: case TOK_UNINSTPAGE: case TOK_PAGEEX: case TOK_PAGEEXEND: case TOK_PAGECALLBACKS: ERROR_MSG("Error: %s specified, NSIS_CONFIG_VISIBLE_SUPPORT not defined.\n", line.gettoken_str(0)); return PS_ERROR; #endif//NSIS_CONFIG_VISIBLE_SUPPORT // header flags /////////////////////////////////////////////////////////////////////////////// case TOK_LANGSTRING: { char *name = line.gettoken_str(1); LANGID lang = line.gettoken_int(2); char *str = line.gettoken_str(3); int ret = SetLangString(name, lang, str); if (ret == PS_WARNING) warning_fl("LangString \"%s\" set multiple times for %d, wasting space", name, lang); else if (ret == PS_ERROR) { ERROR_MSG("Error: can't set LangString \"%s\"!\n", name); return PS_ERROR; } SCRIPT_MSG("LangString: \"%s\" %d \"%s\"\n", name, lang, str); } return PS_OK; case TOK_LANGSTRINGUP: SCRIPT_MSG("Error: LangStringUP is obsolete, there are no more unprocessed strings. Use LangString.\n"); return PS_ERROR; case TOK_LICENSELANGSTRING: { #ifdef NSIS_CONFIG_SILENT_SUPPORT if (build_header.flags&(CH_FLAGS_SILENT|CH_FLAGS_SILENT_LOG)) { warning_fl("LicenseLangString: SilentInstall enabled, wasting space"); } #endif char *name = line.gettoken_str(1); LANGID lang = line.gettoken_int(2); char *file = line.gettoken_str(3); FILE *fp; unsigned int datalen; fp=FOPEN(file,"rb"); if (!fp) { ERROR_MSG("LicenseLangString: open failed \"%s\"\n",file); PRINTHELP() } MANAGE_WITH(fp, fclose); fseek(fp,0,SEEK_END); datalen=ftell(fp); if (!datalen) { ERROR_MSG("LicenseLangString: empty license file \"%s\"\n",file); return PS_ERROR; } rewind(fp); char *data=(char*)malloc(datalen+2); if (!data) { ERROR_MSG("Internal compiler error #12345: LicenseData malloc(%d) failed.\n", datalen+2); return PS_ERROR; } MANAGE_WITH(data, free); char *ldata=data+1; if (fread(ldata,1,datalen,fp) != datalen) { ERROR_MSG("LicenseLangString: can't read file.\n"); return PS_ERROR; } ldata[datalen]=0; if (!strncmp(ldata,"{\\rtf",sizeof("{\\rtf")-1)) *data = SF_RTF; else *data = SF_TEXT; int ret = SetLangString(name, lang, data); if (ret == PS_WARNING) warning_fl("LicenseLangString \"%s\" set multiple times for %d, wasting space", name, lang); else if (ret == PS_ERROR) { ERROR_MSG("Error: can't set LicenseLangString \"%s\"!\n", name); return PS_ERROR; } SCRIPT_MSG("LicenseLangString: \"%s\" %d \"%s\"\n", name, lang, file); } return PS_OK; case TOK_NAME: { if (SetInnerString(NLF_NAME,line.gettoken_str(1)) == PS_WARNING) warning_fl("%s: specified multiple times, wasting space",line.gettoken_str(0)); SetInnerString(NLF_NAME_DA,line.gettoken_str(2)); SCRIPT_MSG("Name: \"%s\"",line.gettoken_str(1)); if (*line.gettoken_str(2)) SCRIPT_MSG(" \"%s\"",line.gettoken_str(2)); SCRIPT_MSG("\n"); } return PS_OK; case TOK_CAPTION: { if (!cur_page) { if (SetInnerString(NLF_CAPTION,line.gettoken_str(1)) == PS_WARNING) warning_fl("%s: specified multiple times, wasting space",line.gettoken_str(0)); } else { cur_page->caption = add_string(line.gettoken_str(1)); } SCRIPT_MSG("Caption: \"%s\"\n",line.gettoken_str(1)); } return PS_OK; case TOK_ICON: SCRIPT_MSG("Icon: \"%s\"\n",line.gettoken_str(1)); try { init_res_editor(); if (replace_icon(res_editor, IDI_ICON2, line.gettoken_str(1))) { ERROR_MSG("Error: File doesn't exist or is an invalid icon file\n"); return PS_ERROR; } } catch (exception& err) { ERROR_MSG("Error while replacing icon: %s\n", err.what()); return PS_ERROR; } return PS_OK; #ifdef NSIS_CONFIG_COMPONENTPAGE case TOK_CHECKBITMAP: SCRIPT_MSG("CheckBitmap: \"%s\"\n",line.gettoken_str(1)); try { init_res_editor(); int err = update_bitmap(res_editor, IDB_BITMAP1, line.gettoken_str(1), 96, 16, 8); if (err) { switch (err) { case -1: ERROR_MSG("Error: can't find bitmap\n"); break; case -2: ERROR_MSG("Error: invalid bitmap file - corrupted or not a bitmap\n"); break; case -3: ERROR_MSG("Error: bitmap isn't 96x16 in size\n"); break; case -4: ERROR_MSG("Error: bitmap has more than 8bpp\n"); break; } return PS_ERROR; } } catch (exception& err) { ERROR_MSG("Error while replacing bitmap: %s\n", err.what()); return PS_ERROR; } return PS_OK; #else//NSIS_CONFIG_COMPONENTPAGE case TOK_CHECKBITMAP: ERROR_MSG("Error: %s specified, NSIS_CONFIG_COMPONENTPAGE not defined.\n", line.gettoken_str(0)); return PS_ERROR; #endif//!NSIS_CONFIG_COMPONENTPAGE case TOK_DIRTEXT: #ifdef NSIS_CONFIG_VISIBLE_SUPPORT { if (!cur_page) { if (SetInnerString(NLF_DIR_TEXT, line.gettoken_str(1)) == PS_WARNING) warning_fl("%s: specified multiple times, wasting space",line.gettoken_str(0)); if (line.getnumtokens() > 2) SetInnerString(NLF_DIR_SUBTEXT, line.gettoken_str(2)); if (line.getnumtokens() > 3) SetInnerString(NLF_BTN_BROWSE, line.gettoken_str(3)); if (line.getnumtokens() > 4) SetInnerString(NLF_DIR_BROWSETEXT, line.gettoken_str(4)); } else { if (cur_page_type != PAGE_DIRECTORY) { ERROR_MSG("Error: DirText can only be used inside PageEx directory.\n"); return PS_ERROR; } cur_page->parms[0] = add_string(line.gettoken_str(1)); if (line.getnumtokens() > 2) cur_page->parms[1] = add_string(line.gettoken_str(2)); if (line.getnumtokens() > 3) cur_page->parms[2] = add_string(line.gettoken_str(3)); if (line.getnumtokens() > 4) cur_page->parms[3] = add_string(line.gettoken_str(4)); } SCRIPT_MSG("DirText: \"%s\" \"%s\" \"%s\" \"%s\"\n",line.gettoken_str(1),line.gettoken_str(2),line.gettoken_str(3),line.gettoken_str(4)); } return PS_OK; #else//NSIS_CONFIG_VISIBLE_SUPPORT ERROR_MSG("Error: %s specified, NSIS_CONFIG_VISIBLE_SUPPORT not defined.\n", line.gettoken_str(0)); return PS_ERROR; #endif//!NSIS_CONFIG_VISIBLE_SUPPORT case TOK_DIRVAR: { if (cur_page_type != PAGE_DIRECTORY && cur_page_type != PAGE_UNINSTCONFIRM) { ERROR_MSG("Error: can't use DirVar outside of PageEx directory|uninstConfirm.\n"); return PS_ERROR; } cur_page->parms[4] = GetUserVarIndex(line, 1) + 1; if (cur_page->parms[4] <= 0) PRINTHELP(); SCRIPT_MSG("DirVar: %s\n", line.gettoken_str(1)); } return PS_OK; case TOK_DIRVERIFY: { if (cur_page_type != PAGE_DIRECTORY) { ERROR_MSG("Error: can't use DirVerify outside of PageEx directory.\n"); return PS_ERROR; } cur_page->flags &= ~PF_DIR_NO_BTN_DISABLE; int k = line.gettoken_enum(1,"auto\0leave\0"); if (k == -1) PRINTHELP(); if (k) cur_page->flags |= PF_DIR_NO_BTN_DISABLE; SCRIPT_MSG("DirVerify: %s\n", line.gettoken_str(1)); } return PS_OK; case TOK_GETINSTDIRERROR: ent.which = EW_GETFLAG; ent.offsets[0] = GetUserVarIndex(line, 1); ent.offsets[1] = FLAG_OFFSET(instdir_error); return add_entry(&ent); #ifdef NSIS_CONFIG_COMPONENTPAGE case TOK_COMPTEXT: { if (!cur_page) { if (SetInnerString(NLF_COMP_TEXT, line.gettoken_str(1)) == PS_WARNING) warning_fl("%s: specified multiple times, wasting space",line.gettoken_str(0)); if (line.getnumtokens() > 2) SetInnerString(NLF_COMP_SUBTEXT1, line.gettoken_str(2)); if (line.getnumtokens() > 3) SetInnerString(NLF_COMP_SUBTEXT2, line.gettoken_str(3)); } else { if (cur_page_type != PAGE_COMPONENTS) { ERROR_MSG("Error: ComponentText can only be used inside PageEx components.\n"); return PS_ERROR; } cur_page->parms[0] = add_string(line.gettoken_str(1)); cur_page->parms[1] = add_string(line.gettoken_str(2)); cur_page->parms[2] = add_string(line.gettoken_str(3)); cur_page->parms[3] = cur_page->parms[1]; cur_page->parms[4] = cur_page->parms[2]; } SCRIPT_MSG("ComponentText: \"%s\" \"%s\" \"%s\"\n",line.gettoken_str(1),line.gettoken_str(2),line.gettoken_str(3)); } return PS_OK; case TOK_INSTTYPE: { int x; if (!stricmp(line.gettoken_str(1),"/NOCUSTOM")) { build_header.flags|=CH_FLAGS_NO_CUSTOM; SCRIPT_MSG("InstType: disabling custom install type\n"); } else if (!stricmp(line.gettoken_str(1),"/COMPONENTSONLYONCUSTOM")) { build_header.flags|=CH_FLAGS_COMP_ONLY_ON_CUSTOM; SCRIPT_MSG("InstType: making components viewable only on custom install type\n"); } else if (!strnicmp(line.gettoken_str(1),"/CUSTOMSTRING=",14)) { SCRIPT_MSG("InstType: setting custom text to: \"%s\"\n",line.gettoken_str(1)+14); if (SetInnerString(NLF_COMP_CUSTOM,line.gettoken_str(1)+14) == PS_WARNING) warning_fl("%s: specified multiple times, wasting space","InstType /CUSTOMSTRING"); } else if (line.gettoken_str(1)[0]=='/') { PRINTHELP() } else { char *itname = line.gettoken_str(1); if (!strnicmp(itname, "un.", 3)) { set_uninstall_mode(1); itname += 3; } for (x = 0; x < NSIS_MAX_INST_TYPES && cur_header->install_types[x]; x ++); if (x == NSIS_MAX_INST_TYPES) { ERROR_MSG("InstType: no more than %d install types allowed. %d specified\n", NSIS_MAX_INST_TYPES, NSIS_MAX_INST_TYPES + 1); return PS_ERROR; } else { cur_header->install_types[x] = add_string(itname); SCRIPT_MSG("InstType: %s%d=\"%s\"\n", uninstall_mode ? "(uninstall) " : "", x+1, itname); } set_uninstall_mode(0); } } return PS_OK; #else//NSIS_CONFIG_COMPONENTPAGE case TOK_COMPTEXT: case TOK_INSTTYPE: ERROR_MSG("Error: %s specified but NSIS_CONFIG_COMPONENTPAGE not defined\n",line.gettoken_str(0)); return PS_ERROR; #endif//!NSIS_CONFIG_COMPONENTPAGE #ifdef NSIS_CONFIG_LICENSEPAGE case TOK_LICENSETEXT: { if (!cur_page) { if (SetInnerString(NLF_LICENSE_TEXT, line.gettoken_str(1)) == PS_WARNING) warning_fl("%s: specified multiple times, wasting space",line.gettoken_str(0)); SetInnerString(NLF_LICENSE_TEXT_FSRB, line.gettoken_str(1)); SetInnerString(NLF_LICENSE_TEXT_FSCB, line.gettoken_str(1)); if (line.getnumtokens() > 2) SetInnerString(NLF_BTN_LICENSE, line.gettoken_str(2)); } else { if (cur_page_type != PAGE_LICENSE) { ERROR_MSG("Error: LicenseText can only be used inside PageEx license.\n"); return PS_ERROR; } cur_page->parms[0] = add_string(line.gettoken_str(1)); cur_page->next = add_string(line.gettoken_str(2)); } SCRIPT_MSG("LicenseText: \"%s\" \"%s\"\n",line.gettoken_str(1),line.gettoken_str(2)); } return PS_OK; case TOK_LICENSEDATA: { int idx = 0; char *file = line.gettoken_str(1); char *data = NULL; if (file[0] == '$' && file[1] == '(') { char *cp = strdup(file+2); MANAGE_WITH(cp, free); char *p = strchr(cp, ')'); if (p && p[1] == 0) { // if string is only a language str identifier *p = 0; idx = DefineLangString(cp, 0); } data = file; } if (!idx) { unsigned int datalen; FILE *fp=FOPEN(file,"rb"); if (!fp) { ERROR_MSG("LicenseData: open failed \"%s\"\n",file); PRINTHELP() } MANAGE_WITH(fp, fclose); fseek(fp,0,SEEK_END); datalen=ftell(fp); if (!datalen) { ERROR_MSG("LicenseData: empty license file \"%s\"\n",file); return PS_ERROR; } rewind(fp); data=(char*)malloc(datalen+2); if (!data) { ERROR_MSG("Internal compiler error #12345: LicenseData malloc(%d) failed.\n", datalen+2); return PS_ERROR; } //MANAGE_WITH(data, free); char *ldata=data+1; if (fread(ldata,1,datalen,fp) != datalen) { ERROR_MSG("LicenseData: can't read file.\n"); free(data); // TODO: fix later (orip) return PS_ERROR; } ldata[datalen]=0; if (!strncmp(ldata,"{\\rtf",sizeof("{\\rtf")-1)) *data = SF_RTF; else *data = SF_TEXT; } if (!cur_page) { if (SetInnerString(NLF_LICENSE_DATA,data) == PS_WARNING) warning_fl("%s: specified multiple times, wasting space",line.gettoken_str(0)); } else { if (cur_page_type != PAGE_LICENSE) { ERROR_MSG("Error: LicenseData can only be used inside PageEx license.\n"); return PS_ERROR; } cur_page->parms[1] = add_string(data, 0); } if (!idx) free(data); // TODO: fix later (orip) SCRIPT_MSG("LicenseData: \"%s\"\n",file); } return PS_OK; case TOK_LICENSEFORCESELECTION: { int k=line.gettoken_enum(1,"off\0checkbox\0radiobuttons\0"); if (k == -1) PRINTHELP() if (k < line.getnumtokens() - 2) PRINTHELP() if (!cur_page) { switch (line.getnumtokens()) { case 4: SetInnerString(NLF_BTN_LICENSE_DISAGREE, line.gettoken_str(3)); case 3: SetInnerString(NLF_BTN_LICENSE_AGREE, line.gettoken_str(2)); break; } switch (k) { case 0: license_res_id = IDD_LICENSE; break; case 1: license_res_id = IDD_LICENSE_FSCB; break; case 2: license_res_id = IDD_LICENSE_FSRB; break; } } else { if (cur_page_type != PAGE_LICENSE) { ERROR_MSG("Error: LicenseForceSelection can only be used inside PageEx license.\n"); return PS_ERROR; } switch (line.getnumtokens()) { case 4: cur_page->parms[3] = add_string(line.gettoken_str(3)); case 3: cur_page->parms[2] = add_string(line.gettoken_str(2)); break; } cur_page->flags &= ~(PF_LICENSE_FORCE_SELECTION | PF_LICENSE_NO_FORCE_SELECTION); switch (k) { case 0: cur_page->dlg_id = IDD_LICENSE; cur_page->flags |= PF_LICENSE_NO_FORCE_SELECTION; break; case 1: cur_page->dlg_id = IDD_LICENSE_FSCB; cur_page->flags |= PF_LICENSE_FORCE_SELECTION; break; case 2: cur_page->dlg_id = IDD_LICENSE_FSRB; cur_page->flags |= PF_LICENSE_FORCE_SELECTION; break; } } SCRIPT_MSG("LicenseForceSelection: %s \"%s\" \"%s\"\n", line.gettoken_str(1), line.gettoken_str(2), line.gettoken_str(3)); } return PS_OK; case TOK_LICENSEBKCOLOR: { char *p = line.gettoken_str(1); if (!strcmpi(p,"/windows")) { build_header.license_bg=-COLOR_WINDOW; SCRIPT_MSG("LicenseBkColor: /windows\n"); } else if (!strcmpi(p,"/grey") || !strcmpi(p,"/gray")) { build_header.license_bg=-COLOR_BTNFACE; SCRIPT_MSG("LicenseBkColor: /grey\n"); } else { int v=strtoul(p,&p,16); build_header.license_bg=((v&0xff)<<16)|(v&0xff00)|((v&0xff0000)>>16); build_uninst.license_bg=build_header.license_bg; SCRIPT_MSG("LicenseBkColor: %06X\n",v); } } return PS_OK; #else//!NSIS_CONFIG_LICENSEPAGE case TOK_LICENSETEXT: case TOK_LICENSEDATA: case TOK_LICENSEBKCOLOR: ERROR_MSG("Error: %s specified, NSIS_CONFIG_LICENSEPAGE not defined.\n", line.gettoken_str(0)); return PS_ERROR; #endif//!NSIS_CONFIG_LICENSEPAGE #ifdef NSIS_CONFIG_SILENT_SUPPORT case TOK_SILENTINST: { int k=line.gettoken_enum(1,"normal\0silent\0silentlog\0"); if (k<0) PRINTHELP() #ifndef NSIS_CONFIG_LOG if (k == 2) { ERROR_MSG("SilentInstall: silentlog specified, no log support compiled in (use NSIS_CONFIG_LOG)\n"); return PS_ERROR; } #endif//NSIS_CONFIG_LOG SCRIPT_MSG("SilentInstall: %s\n",line.gettoken_str(1)); #ifdef NSIS_CONFIG_LICENSEPAGE if (k && HasUserDefined(NLF_LICENSE_DATA)) { warning_fl("SilentInstall: LicenseData already specified. wasting space"); } if (k) { build_header.flags|=CH_FLAGS_SILENT; if (k == 2) build_header.flags|=CH_FLAGS_SILENT_LOG; } else { build_header.flags&=~CH_FLAGS_SILENT; build_header.flags&=~CH_FLAGS_SILENT_LOG; } #endif//NSIS_CONFIG_LICENSEPAGE } return PS_OK; case TOK_SILENTUNINST: #ifdef NSIS_CONFIG_UNINSTALL_SUPPORT { int k=line.gettoken_enum(1,"normal\0silent\0"); if (k<0) PRINTHELP() if (k) build_uninst.flags|=CH_FLAGS_SILENT; else build_uninst.flags&=~CH_FLAGS_SILENT; SCRIPT_MSG("SilentUnInstall: %s\n",line.gettoken_str(1)); } return PS_OK; #else ERROR_MSG("Error: %s specified, NSIS_CONFIG_UNINSTALL_SUPPORT not defined.\n", line.gettoken_str(0)); return PS_ERROR; #endif case TOK_IFSILENT: ent.which=EW_IFFLAG; if (process_jump(line,1,&ent.offsets[0]) || process_jump(line,2,&ent.offsets[1])) PRINTHELP() ent.offsets[2]=FLAG_OFFSET(silent); ent.offsets[3]=~0;//new value mask - keep flag SCRIPT_MSG("IfSilent ?%s:%s\n",line.gettoken_str(1),line.gettoken_str(2)); return add_entry(&ent); case TOK_SETSILENT: { ent.which=EW_SETFLAG; ent.offsets[0]=FLAG_OFFSET(silent); int k=line.gettoken_enum(1,"normal\0silent\0"); if (k<0) PRINTHELP() ent.offsets[1]=add_intstring(k); SCRIPT_MSG("SetSilent: %s\n",line.gettoken_str(1)); } return add_entry(&ent); #else//!NSIS_CONFIG_SILENT_SUPPORT case TOK_SILENTINST: case TOK_SILENTUNINST: case TOK_IFSILENT: case TOK_SETSILENT: ERROR_MSG("Error: %s specified, NSIS_CONFIG_SILENT_SUPPORT not defined.\n", line.gettoken_str(0)); return PS_ERROR; #endif//NSIS_CONFIG_SILENT_SUPPORT case TOK_OUTFILE: strncpy(build_output_filename,line.gettoken_str(1),1024-1); SCRIPT_MSG("OutFile: \"%s\"\n",build_output_filename); return PS_OK; case TOK_INSTDIR: { char *p = line.gettoken_str(1); if (build_header.install_directory_ptr) { warning_fl("%s: specified multiple times. wasting space",line.gettoken_str(0)); } build_header.install_directory_ptr = add_string(p); build_header.install_directory_auto_append = 0; char *p2 = p + strlen(p); if (*p && *CharPrev(p, p2) != '\\') { // we risk hitting $\r or something like $(bla\ad) or ${bla\ad} here, but it's better // than hitting backslashes in processed strings while (p2 > p && *p2 != '\\') p2 = CharPrev(p, p2); if (*p2 == '\\') { build_header.install_directory_auto_append = add_string(p2 + 1); } } SCRIPT_MSG("InstallDir: \"%s\"\n",line.gettoken_str(1)); } return PS_OK; case TOK_INSTALLDIRREGKEY: // InstallDirRegKey { if (build_header.install_reg_key_ptr) { warning_fl("%s: specified multiple times, wasting space",line.gettoken_str(0)); } int k=line.gettoken_enum(1,rootkeys[0]); if (k == -1) k=line.gettoken_enum(1,rootkeys[1]); if (k == -1) PRINTHELP() build_header.install_reg_rootkey=(int)rootkey_tab[k]; build_header.install_reg_key_ptr = add_string(line.gettoken_str(2),0); if (line.gettoken_str(2)[0] == '\\') warning_fl("%s: registry path name begins with \'\\\', may cause problems",line.gettoken_str(0)); build_header.install_reg_value_ptr = add_string(line.gettoken_str(3),0); SCRIPT_MSG("InstallRegKey: \"%s\\%s\\%s\"\n",line.gettoken_str(1),line.gettoken_str(2),line.gettoken_str(3)); } return PS_OK; case TOK_CRCCHECK: build_crcchk=line.gettoken_enum(1,"off\0on\0force\0"); if (build_crcchk==-1) PRINTHELP() SCRIPT_MSG("CRCCheck: %s\n",line.gettoken_str(1)); return PS_OK; case TOK_INSTPROGRESSFLAGS: { int x; int smooth=0; build_header.flags&=~CH_FLAGS_PROGRESS_COLORED; for (x = 1; x < line.getnumtokens(); x ++) { if (!stricmp(line.gettoken_str(x),"smooth")) smooth=1; else if (!stricmp(line.gettoken_str(x),"colored")) build_header.flags|=CH_FLAGS_PROGRESS_COLORED; else PRINTHELP() } try { init_res_editor(); BYTE* dlg = res_editor->GetResource(RT_DIALOG, MAKEINTRESOURCE(IDD_INSTFILES), NSIS_DEFAULT_LANG); if (!dlg) throw runtime_error("IDD_INSTFILES doesn't exist!"); CDialogTemplate dt(dlg,uDefCodePage); free(dlg); DialogItemTemplate* progress = dt.GetItem(IDC_PROGRESS); if (!progress) { throw runtime_error("IDC_PROGRESS doesn't exist!"); } if (smooth) progress->dwStyle |= PBS_SMOOTH; else progress->dwStyle &= ~PBS_SMOOTH; DWORD dwSize; dlg = dt.Save(dwSize); res_editor->UpdateResource(RT_DIALOG, MAKEINTRESOURCE(IDD_INSTFILES), NSIS_DEFAULT_LANG, dlg, dwSize); res_editor->FreeResource(dlg); } catch (exception& err) { ERROR_MSG("Error setting smooth progress bar: %s\n", err.what()); return PS_ERROR; } SCRIPT_MSG("InstProgressFlags: smooth=%d, colored=%d\n",smooth, !!(build_header.flags&CH_FLAGS_PROGRESS_COLORED)); } return PS_OK; case TOK_AUTOCLOSE: { int k=line.gettoken_enum(1,"false\0true\0"); if (k == -1) PRINTHELP(); if (k) build_header.flags|=CH_FLAGS_AUTO_CLOSE; else build_header.flags&=~CH_FLAGS_AUTO_CLOSE; SCRIPT_MSG("AutoCloseWindow: %s\n",k?"true":"false"); } return PS_OK; case TOK_WINDOWICON: #ifdef NSIS_CONFIG_VISIBLE_SUPPORT disable_window_icon=line.gettoken_enum(1,"on\0off\0"); if (disable_window_icon == -1) PRINTHELP(); SCRIPT_MSG("WindowIcon: %s\n",line.gettoken_str(1)); return PS_OK; #else ERROR_MSG("Error: %s specified, NSIS_CONFIG_VISIBLE_SUPPORT not defined.\n",line.gettoken_str(0)); return PS_ERROR; #endif // NSIS_CONFIG_VISIBLE_SUPPORT case TOK_SHOWDETAILSUNINST: #ifndef NSIS_CONFIG_UNINSTALL_SUPPORT ERROR_MSG("Error: ShowUninstDetails specified but NSIS_CONFIG_UNINSTALL_SUPPORT not defined\n"); return PS_ERROR; #endif case TOK_SHOWDETAILS: { int k=line.gettoken_enum(1,"hide\0show\0nevershow\0"); if (k == -1) PRINTHELP() #ifdef NSIS_CONFIG_UNINSTALL_SUPPORT if (which_token == TOK_SHOWDETAILSUNINST) { build_uninst.flags&=~(CH_FLAGS_DETAILS_NEVERSHOW|CH_FLAGS_DETAILS_SHOWDETAILS); if (k==1) build_uninst.flags|=CH_FLAGS_DETAILS_SHOWDETAILS; else if (k==2) build_uninst.flags|=CH_FLAGS_DETAILS_NEVERSHOW; } else #endif { build_header.flags&=~(CH_FLAGS_DETAILS_NEVERSHOW|CH_FLAGS_DETAILS_SHOWDETAILS); if (k==1) build_header.flags|=CH_FLAGS_DETAILS_SHOWDETAILS; else if (k==2) build_header.flags|=CH_FLAGS_DETAILS_NEVERSHOW; } SCRIPT_MSG("%s: %s\n",line.gettoken_str(0),line.gettoken_str(1)); } return PS_OK; case TOK_DIRSHOW: /*{ int k=line.gettoken_enum(1,"show\0hide\0"); if (k == -1) PRINTHELP(); if (k) build_header.flags|=CH_FLAGS_DIR_NO_SHOW; else build_header.flags&=~CH_FLAGS_DIR_NO_SHOW; SCRIPT_MSG("DirShow: %s\n",k?"hide":"show"); }*/ ERROR_MSG("Error: DirShow doesn't currently work\n"); return PS_ERROR; case TOK_ROOTDIRINST: { int k=line.gettoken_enum(1,"true\0false\0"); if (k == -1) PRINTHELP(); if (k) build_header.flags|=CH_FLAGS_NO_ROOT_DIR; else build_header.flags&=~CH_FLAGS_NO_ROOT_DIR; SCRIPT_MSG("AllowRootDirInstall: %s\n",k?"false":"true"); } return PS_OK; case TOK_BGFONT: #ifndef NSIS_SUPPORT_BGBG ERROR_MSG("Error: BGFont specified but NSIS_SUPPORT_BGBG not defined\n"); return PS_ERROR; #else//NSIS_SUPPORT_BGBG if (line.getnumtokens()==1) { memcpy(&bg_font,&bg_default_font,sizeof(LOGFONT)); SCRIPT_MSG("BGFont: default font\n"); return PS_OK; } LOGFONT newfont; newfont.lfHeight=40; newfont.lfWidth=0; newfont.lfEscapement=0; newfont.lfOrientation=0; newfont.lfWeight=FW_NORMAL; newfont.lfItalic=FALSE; newfont.lfUnderline=FALSE; newfont.lfStrikeOut=FALSE; newfont.lfCharSet=DEFAULT_CHARSET; newfont.lfOutPrecision=OUT_DEFAULT_PRECIS; newfont.lfClipPrecision=CLIP_DEFAULT_PRECIS; newfont.lfQuality=DEFAULT_QUALITY; newfont.lfPitchAndFamily=DEFAULT_PITCH; strncpy(newfont.lfFaceName,line.gettoken_str(1),LF_FACESIZE); SCRIPT_MSG("BGFont: \"%s\"",line.gettoken_str(1)); { bool height=false; bool weight=false; for (int i = 2; i < line.getnumtokens(); i++) { char *tok=line.gettoken_str(i); if (tok[0]=='/') { if (!strcmpi(tok,"/ITALIC")) { SCRIPT_MSG(" /ITALIC"); newfont.lfItalic=TRUE; } else if (!strcmpi(tok,"/UNDERLINE")) { SCRIPT_MSG(" /UNDERLINE"); newfont.lfUnderline=TRUE; } else if (!strcmpi(tok,"/STRIKE")) { SCRIPT_MSG(" /STRIKE"); newfont.lfStrikeOut=TRUE; } else { SCRIPT_MSG("\n"); PRINTHELP(); } } else { if (!height) { SCRIPT_MSG(" height=%s",tok); newfont.lfHeight=line.gettoken_int(i); height=true; } else if (!weight) { SCRIPT_MSG(" weight=%s",tok); newfont.lfWeight=line.gettoken_int(i); weight=true; } else { SCRIPT_MSG("\n"); PRINTHELP(); } } } } SCRIPT_MSG("\n"); memcpy(&bg_font, &newfont, sizeof(LOGFONT)); return PS_OK; #endif//NSIS_SUPPORT_BGBG case TOK_BGGRADIENT: #ifndef NSIS_SUPPORT_BGBG ERROR_MSG("Error: BGGradient specified but NSIS_SUPPORT_BGBG not defined\n"); return PS_ERROR; #else//NSIS_SUPPORT_BGBG if (line.getnumtokens()==1) { SCRIPT_MSG("BGGradient: default colors\n"); build_header.bg_color1=0; build_header.bg_color2=RGB(0,0,255); } else if (!stricmp(line.gettoken_str(1),"off")) { build_header.bg_color1=build_header.bg_color2=build_header.bg_textcolor=-1; SCRIPT_MSG("BGGradient: off\n"); if (line.getnumtokens()>2) PRINTHELP() } else { char *p = line.gettoken_str(1); int v1,v2,v3=-1; v1=strtoul(p,&p,16); build_header.bg_color1=((v1&0xff)<<16)|(v1&0xff00)|((v1&0xff0000)>>16); p=line.gettoken_str(2); v2=strtoul(p,&p,16); build_header.bg_color2=((v2&0xff)<<16)|(v2&0xff00)|((v2&0xff0000)>>16); p=line.gettoken_str(3); if (*p) { if (!stricmp(p,"notext")) build_header.bg_textcolor=-1; else { v3=strtoul(p,&p,16); build_header.bg_textcolor=((v3&0xff)<<16)|(v3&0xff00)|((v3&0xff0000)>>16); } } SCRIPT_MSG("BGGradient: 0x%06X->0x%06X (text=0x%06X)\n",v1,v2,v3); } #ifdef NSIS_CONFIG_UNINSTALL_SUPPORT build_uninst.bg_color1=build_header.bg_color1; build_uninst.bg_color2=build_header.bg_color2; build_uninst.bg_textcolor=build_header.bg_textcolor; #endif//NSIS_CONFIG_UNINSTALL_SUPPORT #endif//NSIS_SUPPORT_BGBG return PS_OK; #ifdef NSIS_CONFIG_VISIBLE_SUPPORT case TOK_INSTCOLORS: { char *p = line.gettoken_str(1); if (p[0]=='/') { if (stricmp(p,"/windows") || line.getnumtokens()!=2) PRINTHELP() build_header.lb_fg=build_header.lb_bg=-1; SCRIPT_MSG("InstallColors: windows default colors\n"); } else { int v1,v2; if (line.getnumtokens()!=3) PRINTHELP() v1=strtoul(p,&p,16); build_header.lb_fg=((v1&0xff)<<16)|(v1&0xff00)|((v1&0xff0000)>>16); p=line.gettoken_str(2); v2=strtoul(p,&p,16); build_header.lb_bg=((v2&0xff)<<16)|(v2&0xff00)|((v2&0xff0000)>>16); SCRIPT_MSG("InstallColors: fg=%06X bg=%06X\n",v1,v2); } #ifdef NSIS_CONFIG_UNINSTALL_SUPPORT build_uninst.lb_fg=build_header.lb_fg; build_uninst.lb_bg=build_header.lb_bg; #endif } return PS_OK; case TOK_XPSTYLE: try { int k=line.gettoken_enum(1,"on\0off\0"); if (k == -1) PRINTHELP() SCRIPT_MSG("XPStyle: %s\n", line.gettoken_str(1)); init_res_editor(); const char *szXPManifest = k ? 0 : "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><assembly xmlns=\"urn:schemas-microsoft-com:asm.v1\" manifestVersion=\"1.0\"><assemblyIdentity version=\"1.0.0.0\" processorArchitecture=\"X86\" name=\"Nullsoft.NSIS.exehead\" type=\"win32\"/><description>Nullsoft Install System v2.03</description><dependency><dependentAssembly><assemblyIdentity type=\"win32\" name=\"Microsoft.Windows.Common-Controls\" version=\"6.0.0.0\" processorArchitecture=\"X86\" publicKeyToken=\"6595b64144ccf1df\" language=\"*\" /></dependentAssembly></dependency></assembly>"; res_editor->UpdateResource(MAKEINTRESOURCE(24), MAKEINTRESOURCE(1), NSIS_DEFAULT_LANG, (unsigned char*)szXPManifest, k ? 0 : strlen(szXPManifest)); } catch (exception& err) { ERROR_MSG("Error while adding XP style: %s\n", err.what()); return PS_ERROR; } return PS_OK; case TOK_CHANGEUI: try { DWORD dwSize; int k=line.gettoken_enum(1, "all\0IDD_LICENSE\0IDD_DIR\0IDD_SELCOM\0IDD_INST\0IDD_INSTFILES\0IDD_UNINST\0IDD_VERIFY\0IDD_LICENSE_FSRB\0IDD_LICENSE_FSCB\0"); if (k<0) PRINTHELP(); FILE *fui = FOPEN(line.gettoken_str(2), "rb"); if (!fui) { ERROR_MSG("Error: Can't open \"%s\"!\n", line.gettoken_str(2)); return PS_ERROR; } MANAGE_WITH(fui, fclose); fseek(fui, 0, SEEK_END); unsigned int len = ftell(fui); fseek(fui, 0, SEEK_SET); LPBYTE ui = (LPBYTE) malloc(len); if (!ui) { ERROR_MSG("Internal compiler error #12345: malloc(%d) failed\n", len); extern void quit(); quit(); } MANAGE_WITH(ui, free); if (fread(ui, 1, len, fui) != len) { ERROR_MSG("Error: Can't read \"%s\"!\n", line.gettoken_str(2)); return PS_ERROR; } CResourceEditor *uire = new CResourceEditor(ui, len); init_res_editor(); // Search for required items #define GET(x) dlg = uire->GetResource(RT_DIALOG, MAKEINTRESOURCE(x), 0); if (!dlg) return PS_ERROR; CDialogTemplate UIDlg(dlg, uDefCodePage); #define SEARCH(x) if (!UIDlg.GetItem(x)) {ERROR_MSG("Error: Can't find %s (%u) in the custom UI!\n", #x, x);delete [] dlg;delete uire;return PS_ERROR;} #define SAVE(x) dwSize = UIDlg.GetSize(); res_editor->UpdateResource(RT_DIALOG, x, NSIS_DEFAULT_LANG, dlg, dwSize); delete [] dlg; LPBYTE dlg = NULL; if (k == 0 || k == 1) { GET(IDD_LICENSE); SEARCH(IDC_EDIT1); SAVE(IDD_LICENSE); } if (k == 0 || k == 2) { GET(IDD_DIR); SEARCH(IDC_DIR); SEARCH(IDC_BROWSE); #ifdef NSIS_CONFIG_LOG SEARCH(IDC_CHECK1); #endif SAVE(IDD_DIR); } if (k == 0 || k == 3) { GET(IDD_SELCOM); SEARCH(IDC_TREE1); SEARCH(IDC_COMBO1); SAVE(IDD_SELCOM); } if (k == 0 || k == 4) { GET(IDD_INST); SEARCH(IDC_BACK); SEARCH(IDC_CHILDRECT); SEARCH(IDC_VERSTR); SEARCH(IDOK); SEARCH(IDCANCEL); // Search for bitmap holder (default for SetBrandingImage) branding_image_found = false; DialogItemTemplate* dlgItem = 0; for (int i = 0; (dlgItem = UIDlg.GetItemByIdx(i)); i++) { if (IS_INTRESOURCE(dlgItem->szClass)) { if (dlgItem->szClass == MAKEINTRESOURCE(0x0082)) { if ((dlgItem->dwStyle & SS_BITMAP) == SS_BITMAP) { branding_image_found = true; branding_image_id = dlgItem->wId; break; } } } } SAVE(IDD_INST); } if (k == 0 || k == 5) { GET(IDD_INSTFILES); SEARCH(IDC_LIST1); SEARCH(IDC_PROGRESS); SEARCH(IDC_SHOWDETAILS); SAVE(IDD_INSTFILES); } if (k == 0 || k == 6) { GET(IDD_UNINST); SEARCH(IDC_EDIT1); SAVE(IDD_UNINST); } if (k == 0 || k == 7) { GET(IDD_VERIFY); SEARCH(IDC_STR); SAVE(IDD_VERIFY); } if (k == 0 || k == 8) { GET(IDD_LICENSE_FSRB); SEARCH(IDC_EDIT1); SEARCH(IDC_LICENSEAGREE); SEARCH(IDC_LICENSEDISAGREE); SAVE(IDD_LICENSE_FSRB); } if (k == 0 || k == 9) { GET(IDD_LICENSE_FSCB); SEARCH(IDC_EDIT1); SEARCH(IDC_LICENSEAGREE); SAVE(IDD_LICENSE_FSCB); } delete uire; SCRIPT_MSG("ChangeUI: %s %s%s\n", line.gettoken_str(1), line.gettoken_str(2), branding_image_found?" (branding image holder found)":""); } catch (exception& err) { ERROR_MSG("Error while changing UI: %s\n", err.what()); return PS_ERROR; } return PS_OK; case TOK_ADDBRANDINGIMAGE: #ifdef _WIN32 try { int k=line.gettoken_enum(1,"top\0left\0bottom\0right\0"); int wh=line.gettoken_int(2); if (k == -1) PRINTHELP(); int padding = 2; if (line.getnumtokens() == 4) padding = line.gettoken_int(3); init_res_editor(); BYTE* dlg = res_editor->GetResource(RT_DIALOG, MAKEINTRESOURCE(IDD_INST), NSIS_DEFAULT_LANG); CDialogTemplate dt(dlg,uDefCodePage); delete [] dlg; DialogItemTemplate brandingCtl = {0,}; brandingCtl.dwStyle = SS_BITMAP | WS_CHILD | WS_VISIBLE; brandingCtl.sX = padding; brandingCtl.sY = padding; brandingCtl.szClass = MAKEINTRESOURCE(0x0082); brandingCtl.szTitle = ""; brandingCtl.wId = IDC_BRANDIMAGE; brandingCtl.sHeight = wh; brandingCtl.sWidth = wh; dt.PixelsToDlgUnits(brandingCtl.sWidth, brandingCtl.sHeight); if (k%2) { // left (1) / right (3) if (k & 2) // right brandingCtl.sX += dt.GetWidth(); else // left dt.MoveAll(brandingCtl.sWidth + (padding * 2), 0); dt.Resize(brandingCtl.sWidth + (padding * 2), 0); brandingCtl.sHeight = dt.GetHeight() - (padding * 2); } else { // top (0) / bottom (2) if (k & 2) // bottom brandingCtl.sY += dt.GetHeight(); else // top dt.MoveAll(0, brandingCtl.sHeight + (padding * 2)); dt.Resize(0, brandingCtl.sHeight + (padding * 2)); brandingCtl.sWidth = dt.GetWidth() - (padding * 2); } dt.AddItem(brandingCtl); DWORD dwDlgSize; dlg = dt.Save(dwDlgSize); res_editor->UpdateResource(RT_DIALOG, IDD_INST, NSIS_DEFAULT_LANG, dlg, dwDlgSize); res_editor->FreeResource(dlg); dt.DlgUnitsToPixels(brandingCtl.sWidth, brandingCtl.sHeight); SCRIPT_MSG("AddBrandingImage: %s %ux%u\n", line.gettoken_str(1), brandingCtl.sWidth, brandingCtl.sHeight); branding_image_found = true; branding_image_id = IDC_BRANDIMAGE; } catch (exception& err) { ERROR_MSG("Error while adding image branding support: %s\n", err.what()); return PS_ERROR; } return PS_OK; #else ERROR_MSG("Error: AddBrandingImage is disabled for non Win32 platforms.\n"); return PS_ERROR; #endif case TOK_SETFONT: { if (!strnicmp(line.gettoken_str(1), "/LANG=", 6)) { LANGID lang_id = atoi(line.gettoken_str(1) + 6); LanguageTable *table = GetLangTable(lang_id); table->nlf.m_szFont = (char*)malloc(strlen(line.gettoken_str(2))+1); strcpy(table->nlf.m_szFont, line.gettoken_str(2)); table->nlf.m_iFontSize = line.gettoken_int(3); SCRIPT_MSG("SetFont: lang=%d \"%s\" %s\n", lang_id, line.gettoken_str(2), line.gettoken_str(3)); } else { strncpy(build_font, line.gettoken_str(1), sizeof(build_font)); build_font_size = line.gettoken_int(2); SCRIPT_MSG("SetFont: \"%s\" %s\n", line.gettoken_str(1), line.gettoken_str(2)); } } return PS_OK; #else case TOK_INSTCOLORS: case TOK_XPSTYLE: case TOK_CHANGEUI: case TOK_ADDBRANDINGIMAGE: case TOK_SETFONT: ERROR_MSG("Error: %s specified, NSIS_CONFIG_VISIBLE_SUPPORT not defined.\n",line.gettoken_str(0)); return PS_ERROR; #endif// NSIS_CONFIG_VISIBLE_SUPPORT // Ability to change compression methods from within the script case TOK_SETCOMPRESSOR: #ifdef NSIS_CONFIG_COMPRESSION_SUPPORT { if (build_compressor_set) { ERROR_MSG("Error: can't change compressor after data already got compressed or header already changed!\n"); return PS_ERROR; } if (!build_compressor_final) { int a = 1; if (!strcmpi(line.gettoken_str(1),"/FINAL")) { build_compressor_final = true; a++; } else if (line.getnumtokens() == 3) { ERROR_MSG("%s expects 2 parameters, got 3.\n",line.gettoken_str(0)); PRINTHELP(); } int k=line.gettoken_enum(a,"zlib\0bzip2\0lzma\0"); switch (k) { case 0: // JF> should handle the state of going from bzip2 back to zlib: compressor = &zlib_compressor; update_exehead(zlib_exehead, zlib_exehead_size); #ifdef NSIS_ZLIB_COMPRESS_WHOLE build_compress_whole=true; #else build_compress_whole=false; #endif break; case 1: compressor=&bzip2_compressor; update_exehead(bzip2_exehead, bzip2_exehead_size); #ifdef NSIS_BZIP2_COMPRESS_WHOLE build_compress_whole=true; #else build_compress_whole=false; #endif break; case 2: compressor = &lzma_compressor; update_exehead(lzma_exehead, lzma_exehead_size); #ifdef NSIS_LZMA_COMPRESS_WHOLE build_compress_whole=true; #else build_compress_whole=false; #endif break; default: PRINTHELP(); } SCRIPT_MSG("SetCompressor: %s%s\n", build_compressor_final? "/FINAL " : "", line.gettoken_str(a)); } else { warning_fl("SetCompressor ignored due to previous call with the /FINAL switch"); } } return PS_OK; #else//NSIS_CONFIG_COMPRESSION_SUPPORT ERROR_MSG("Error: %s specified, NSIS_CONFIG_COMPRESSION_SUPPORT not defined.\n", line.gettoken_str(0)); return PS_ERROR; #endif//NSIS_CONFIG_COMPRESSION_SUPPORT case TOK_LOADNLF: { SCRIPT_MSG("LoadLanguageFile: %s\n", line.gettoken_str(1)); LanguageTable *table = LoadLangFile(line.gettoken_str(1)); if (!table) return PS_ERROR; if (!defcodepage_set) { uDefCodePage = table->nlf.m_uCodePage; defcodepage_set = true; } last_used_lang = table->lang_id; // define LANG_LangName as "####" (lang id) // for example ${LANG_ENGLISH} = 1033 char lang_id[16]; char lang_name[1024]; wsprintf(lang_name, "LANG_%s", table->nlf.m_szName); wsprintf(lang_id, "%u", table->lang_id); definedlist.add(lang_name, lang_id); } return PS_OK; // preprocessor-ish (ifdef/ifndef/else/endif are handled one step out from here) /////////////////////////////////////////////////////////////////////////////// case TOK_P_DEFINE: { char *define=line.gettoken_str(1); char *value; char datebuf[256]; bool date=false; if (!stricmp(define,"/date")) { if (line.getnumtokens()!=4) PRINTHELP() define=line.gettoken_str(2); value=line.gettoken_str(3); time_t rawtime; time(&rawtime); datebuf[0]=0; size_t s=strftime(datebuf,sizeof(datebuf),value,localtime(&rawtime)); if (s < 0) datebuf[0]=0; else datebuf[max(s,sizeof(datebuf)-1)]=0; value=datebuf; date=true; } else { if (line.getnumtokens()==4) PRINTHELP() value=line.gettoken_str(2); } if (definedlist.add(define,value)) { ERROR_MSG("!define: \"%s\" already defined!\n",define); return PS_ERROR; } SCRIPT_MSG("!define: %s\"%s\"=\"%s\"\n",date?"/date ":"",define,date?line.gettoken_str(3):value); } return PS_OK; case TOK_P_UNDEF: if (definedlist.del(line.gettoken_str(1))) { ERROR_MSG("!undef: \"%s\" not defined!\n",line.gettoken_str(1)); return PS_ERROR; } SCRIPT_MSG("!undef: \"%s\"\n",line.gettoken_str(1)); return PS_OK; case TOK_P_PACKEXEHEADER: strncpy(build_packname,line.gettoken_str(1),sizeof(build_packname)-1); strncpy(build_packcmd,line.gettoken_str(2),sizeof(build_packcmd)-1); SCRIPT_MSG("!packhdr: filename=\"%s\", command=\"%s\"\n", build_packname, build_packcmd); return PS_OK; case TOK_P_SYSTEMEXEC: { char *exec=line.gettoken_str(1); int comp=line.gettoken_enum(2,"<\0>\0<>\0=\0ignore\0"); if (line.getnumtokens() == 2) comp = 4; if (comp == -1 && line.getnumtokens() == 3) comp=4; if (comp == -1) PRINTHELP() int success=0; int cmpv=line.gettoken_int(3,&success); if (!success && comp != 4) PRINTHELP() SCRIPT_MSG("!system: \"%s\"\n",exec); #ifdef _WIN32 int ret=system(exec); #else char *execfixed = my_convert(exec); int ret=system(execfixed); my_convert_free(execfixed); #endif if (comp == 0 && ret < cmpv); else if (comp == 1 && ret > cmpv); else if (comp == 2 && ret != cmpv); else if (comp == 3 && ret == cmpv); else if (comp == 4); else { ERROR_MSG("!system: returned %d, aborting\n",ret); return PS_ERROR; } SCRIPT_MSG("!system: returned %d\n",ret); } return PS_OK; case TOK_P_EXECUTE: { char *exec=line.gettoken_str(1); #ifdef _WIN32 PROCESS_INFORMATION pi; STARTUPINFO si={sizeof(STARTUPINFO),}; if (CreateProcess(NULL,exec,NULL,NULL,FALSE,0,NULL,NULL,&si,&pi)) { WaitForSingleObject(pi.hProcess,INFINITE); CloseHandle(pi.hThread); CloseHandle(pi.hProcess); } #else char *execfixed = my_convert(exec); system(execfixed); my_convert_free(execfixed); #endif SCRIPT_MSG("!execute: \"%s\"\n",exec); } case TOK_P_ADDINCLUDEDIR: include_dirs.add(line.gettoken_str(1),0); return PS_OK; case TOK_P_INCLUDE: { char *f = line.gettoken_str(1); int included = 0; #ifdef _WIN32 WIN32_FIND_DATA fd; unsigned int malloced = sizeof(fd.cFileName) + strlen(f) + 1; char *incfile = (char *) malloc(malloced); strcpy(incfile, f); char *slash = strrchr(incfile, PATH_SEPARATOR_C); HANDLE search = FindFirstFile(f, &fd); if (search != INVALID_HANDLE_VALUE) { do { if (slash) slash[1] = 0; else incfile[0] = 0; strcat(incfile, fd.cFileName); if (includeScript(incfile) != PS_OK) #else unsigned int malloced = strlen(f) + 100; char *incfile = (char *) malloc(malloced); assert(incfile != 0); MANAGE_WITH(incfile, free); strcpy(incfile, f); glob_t globbuf; if (!GLOB(incfile, GLOB_NOSORT, NULL, &globbuf)) { for (unsigned int i = 0; i < globbuf.gl_pathc; i++) { if (includeScript(globbuf.gl_pathv[i]) != PS_OK) #endif return PS_ERROR; included++; } #ifdef _WIN32 while (FindNextFile(search, &fd)); FindClose(search); #else globfree(&globbuf); #endif } else { char *dir = include_dirs.get(); int dirs = include_dirs.getnum(); for (int i = 0; i < dirs; i++) { if (malloced < strlen(f) + strlen(dir) + 1) { free(incfile); malloced += strlen(dir); incfile = (char *) malloc(malloced); } strcpy(incfile, dir); if (*f != PATH_SEPARATOR_C) strcat(incfile, PATH_SEPARATOR_STR); strcat(incfile, f); #ifdef _WIN32 slash = strrchr(incfile, PATH_SEPARATOR_C); search = FindFirstFile(incfile, &fd); if (search != INVALID_HANDLE_VALUE) { do { if (slash) slash[1] = 0; else incfile[0] = 0; strcat(incfile, fd.cFileName); if (includeScript(incfile) != PS_OK) #else if (!GLOB(incfile, GLOB_NOSORT, NULL, &globbuf)) { for (unsigned int i = 0; i < globbuf.gl_pathc; i++) { if (includeScript(globbuf.gl_pathv[i]) != PS_OK) #endif return PS_ERROR; included++; } #ifdef _WIN32 while (FindNextFile(search, &fd)); FindClose(search); #else globfree(&globbuf); #endif break; } else { dir += strlen(dir) + 1; } } } if (!included) { ERROR_MSG("!include: could not find: \"%s\"\n",f); return PS_ERROR; } } return PS_OK; case TOK_P_CD: if (!line.gettoken_str(1)[0] || chdir(line.gettoken_str(1))) { ERROR_MSG("!cd: error changing to: \"%s\"\n",line.gettoken_str(1)); return PS_ERROR; } return PS_OK; case TOK_P_ERROR: ERROR_MSG("!error: %s\n",line.gettoken_str(1)); return PS_ERROR; case TOK_P_WARNING: warning_fl("!warning: %s",line.gettoken_str(1)); return PS_OK; case TOK_P_ECHO: SCRIPT_MSG("%s (%s:%d)\n", line.gettoken_str(1),curfilename,linecnt); return PS_OK; case TOK_P_VERBOSE: { extern int g_display_errors; int k=line.gettoken_enum(1,"push\0pop\0"); int v; if (k < 0) // just set v=line.gettoken_int(1); else { if (k) { // pop int l=verbose_stack.getlen(); if (l) { v=((int*)verbose_stack.get())[(l/sizeof(int))-1]; verbose_stack.resize(l-sizeof(int)); } else return PS_OK; } else { // push v=0; if (display_errors) { v++; if (display_warnings) { v++; if (display_info) { v++; if (display_script) { v++; } } } } verbose_stack.add(&v,sizeof(int)); return PS_OK; } } display_script=v>3; display_info=v>2; display_warnings=v>1; display_errors=v>0; g_display_errors=display_errors; } return PS_OK; case TOK_UNINSTALLEXENAME: PRINTHELP() #ifdef NSIS_CONFIG_UNINSTALL_SUPPORT case TOK_UNINSTCAPTION: { if (SetInnerString(NLF_UCAPTION,line.gettoken_str(1)) == PS_WARNING) warning_fl("%s: specified multiple times, wasting space",line.gettoken_str(0)); SCRIPT_MSG("UninstCaption: \"%s\"\n",line.gettoken_str(1)); } return PS_OK; case TOK_UNINSTICON: SCRIPT_MSG("UninstallIcon: \"%s\"\n",line.gettoken_str(1)); try { free(m_unicon_data); m_unicon_data = generate_uninstall_icon_data(line.gettoken_str(1)); if (!m_unicon_data) { ERROR_MSG("Error: File doesn't exist or is an invalid icon file\n"); return PS_ERROR; } } catch (exception& err) { ERROR_MSG("Error while replacing icon: %s\n", err.what()); return PS_ERROR; } return PS_OK; case TOK_UNINSTTEXT: { if (!cur_page) { if (SetInnerString(NLF_UNINST_TEXT, line.gettoken_str(1)) == PS_WARNING) warning_fl("%s: specified multiple times, wasting space",line.gettoken_str(0)); SetInnerString(NLF_UNINST_SUBTEXT, line.gettoken_str(2)); } else { if (cur_page_type != PAGE_UNINSTCONFIRM) { ERROR_MSG("Error: UninstallText can only be used inside PageEx uninstConfirm.\n"); return PS_ERROR; } cur_page->parms[0] = add_string(line.gettoken_str(1)); cur_page->parms[1] = add_string(line.gettoken_str(2)); } SCRIPT_MSG("UninstallText: \"%s\" \"%s\"\n",line.gettoken_str(1),line.gettoken_str(2)); } return PS_OK; case TOK_UNINSTSUBCAPTION: { int s; int w=line.gettoken_int(1,&s); if (!s || w < 0 || w > 2) PRINTHELP() SetInnerString(NLF_USUBCAPTION_CONFIRM+w,line.gettoken_str(2)); SCRIPT_MSG("UninstSubCaption: page:%d, text=%s\n",w,line.gettoken_str(2)); } return PS_OK; case TOK_WRITEUNINSTALLER: if (uninstall_mode) { ERROR_MSG("WriteUninstaller only valid from install, not from uninstall.\n"); PRINTHELP() } uninstaller_writes_used++; ent.which=EW_WRITEUNINSTALLER; ent.offsets[0]=add_string(line.gettoken_str(1)); if (!ent.offsets[0]) PRINTHELP() SCRIPT_MSG("WriteUninstaller: \"%s\"\n",line.gettoken_str(1)); DefineInnerLangString(NLF_ERR_CREATING); DefineInnerLangString(NLF_CREATED_UNINST); return add_entry(&ent); #else//!NSIS_CONFIG_UNINSTALL_SUPPORT case TOK_WRITEUNINSTALLER: case TOK_UNINSTCAPTION: case TOK_UNINSTICON: case TOK_UNINSTTEXT: case TOK_UNINSTSUBCAPTION: ERROR_MSG("Error: %s specified, NSIS_CONFIG_UNINSTALL_SUPPORT not defined.\n", line.gettoken_str(0)); return PS_ERROR; #endif // section/function shit /////////////////////////////////////////////////////////////////////////////// case TOK_SECTION: { int a=1,unselected = 0; if (!strcmpi(line.gettoken_str(1),"/o")) { unselected = 1; a++; } else if (line.getnumtokens() > 3) PRINTHELP(); SCRIPT_MSG("Section: \"%s\"",line.gettoken_str(a)); if (line.gettoken_str(a+1)[0]) SCRIPT_MSG(" ->(%s)",line.gettoken_str(a+1)); SCRIPT_MSG("\n"); #ifndef NSIS_CONFIG_UNINSTALL_SUPPORT if (!stricmp(line.gettoken_str(a),"uninstall")) { ERROR_MSG("Error: Uninstall section declared, no NSIS_CONFIG_UNINSTALL_SUPPORT\n"); return PS_ERROR; } #endif int ret; if (line.gettoken_str(a)[0]=='-') { if (!strnicmp(line.gettoken_str(a)+1,"un.",3)) ret=add_section("un.",line.gettoken_str(a+1)); else ret=add_section("",line.gettoken_str(a+1)); } else ret=add_section(line.gettoken_str(a),line.gettoken_str(a+1)); if (ret != PS_OK) return ret; if (unselected) build_cursection->flags &= ~SF_SELECTED; return PS_OK; } case TOK_SECTIONEND: SCRIPT_MSG("SectionEnd\n"); return section_end(); case TOK_SECTIONIN: { SCRIPT_MSG("SectionIn: "); int wt; for (wt = 1; wt < line.getnumtokens(); wt ++) { char *p=line.gettoken_str(wt); if (p[0]=='R' && p[1]=='O') { if (section_add_flags(SF_RO) != PS_OK) return PS_ERROR; SCRIPT_MSG("[RO] "); } else { int x=atoi(p)-1; if (x >= 0 && x < NSIS_MAX_INST_TYPES) { if (section_add_install_type(1<<x) != PS_OK) return PS_ERROR; SCRIPT_MSG("[%d] ",x); } else if (x < 0) { PRINTHELP() } else { ERROR_MSG("Error: SectionIn section %d out of range 1-%d\n",x+1,NSIS_MAX_INST_TYPES); return PS_ERROR; } p++; } } SCRIPT_MSG("\n"); } return PS_OK; case TOK_SUBSECTIONEND: case TOK_SUBSECTION: { char buf[1024]; int a=1,ex = 0; if (!strcmpi(line.gettoken_str(1),"/e")) { ex = 1; a++; } wsprintf(buf,"-%s",line.gettoken_str(a)); if (which_token == TOK_SUBSECTION) { char *s = line.gettoken_str(a); if (!s[0] || (!strcmpi(s, "un.") && !s[3])) PRINTHELP(); } SCRIPT_MSG("%s %s",line.gettoken_str(0),line.gettoken_str(a)); if (line.gettoken_str(a+1)[0]) SCRIPT_MSG(" ->(%s)",line.gettoken_str(a+1)); SCRIPT_MSG("\n"); return add_section(buf,line.gettoken_str(a+1),ex); } case TOK_FUNCTION: if (!line.gettoken_str(1)[0]) PRINTHELP() if (line.gettoken_str(1)[0]==':' || line.gettoken_str(1)[0]=='/') { ERROR_MSG("Function: function name cannot begin with : or /.\n"); PRINTHELP() } SCRIPT_MSG("Function: \"%s\"\n",line.gettoken_str(1)); #ifndef NSIS_CONFIG_UNINSTALL_SUPPORT if (!strnicmp(line.gettoken_str(1),"un.",3)) { ERROR_MSG("Error: Uninstall function declared, no NSIS_CONFIG_UNINSTALL_SUPPORT\n"); return PS_ERROR; } #endif return add_function(line.gettoken_str(1)); case TOK_FUNCTIONEND: SCRIPT_MSG("FunctionEnd\n"); return function_end(); // flag setters /////////////////////////////////////////////////////////////////////////////// // BEGIN - Added by ramon 23 May 2003 case TOK_ALLOWSKIPFILES: build_allowskipfiles=line.gettoken_enum(1,"off\0on\0"); if (build_allowskipfiles==-1) PRINTHELP() SCRIPT_MSG("AllowSkipFiles: %s\n",line.gettoken_str(1)); return PS_OK; // END - Added by ramon 23 May 2003 case TOK_SETDATESAVE: build_datesave=line.gettoken_enum(1,"off\0on\0"); if (build_datesave==-1) PRINTHELP() SCRIPT_MSG("SetDateSave: %s\n",line.gettoken_str(1)); return PS_OK; case TOK_SETOVERWRITE: { int k=line.gettoken_enum(1,"on\0off\0try\0ifnewer\0ifdiff\0lastused\0"); if (k==-1) PRINTHELP() if (k==5) { k=build_overwrite; build_overwrite=build_last_overwrite; build_last_overwrite=k; } else { build_last_overwrite=build_overwrite; build_overwrite=k; } SCRIPT_MSG("overwrite = %d, last_overwrite = %d\n", build_overwrite, build_last_overwrite); SCRIPT_MSG("SetOverwrite: %s\n",line.gettoken_str(1)); } return PS_OK; #ifdef NSIS_CONFIG_PLUGIN_SUPPORT case TOK_SETPLUGINUNLOAD: build_plugin_unload=line.gettoken_enum(1,"manual\0alwaysoff\0"); if (build_plugin_unload==-1) PRINTHELP() SCRIPT_MSG("SetPluginUnload: %s\n",line.gettoken_str(1)); return PS_OK; #endif //NSIS_CONFIG_PLUGIN_SUPPORT case TOK_SETCOMPRESS: build_compress=line.gettoken_enum(1,"off\0auto\0force\0"); if (build_compress==-1) PRINTHELP() if (build_compress==0 && build_compress_whole) { warning_fl("'SetCompress off' encountered, and in whole compression mode. Effectively ignored."); } SCRIPT_MSG("SetCompress: %s\n",line.gettoken_str(1)); return PS_OK; case TOK_DBOPTIMIZE: build_optimize_datablock=line.gettoken_enum(1,"off\0on\0"); if (build_optimize_datablock==-1) PRINTHELP() SCRIPT_MSG("SetDatablockOptimize: %s\n",line.gettoken_str(1)); return PS_OK; case TOK_FILEBUFSIZE: build_filebuflen=line.gettoken_int(1); build_filebuflen<<=20; if (build_filebuflen<=0) { ERROR_MSG("Error: FileBufSize: invalid buffer size -- %d\n",build_filebuflen); return PS_ERROR; } SCRIPT_MSG("FileBufSize: %smb (%d bytes)\n",line.gettoken_str(1),build_filebuflen); return PS_OK; #ifdef NSIS_CONFIG_COMPRESSION_SUPPORT case TOK_SETCOMPRESSIONLEVEL: { if (compressor == &lzma_compressor) warning_fl("SetCompressionLevel: compressor is set to LZMA. Effectively ignored."); if (build_compressor_set && build_compress_whole) warning_fl("SetCompressionLevel: data already compressed in compress whole mode. Effectively ignored."); int s; build_compress_level=line.gettoken_int(1,&s); if (!s || build_compress_level < 0 || build_compress_level > 9) PRINTHELP(); SCRIPT_MSG("SetCompressionLevel: %u\n", build_compress_level); } return PS_OK; case TOK_SETCOMPRESSORDICTSIZE: { if (compressor != &lzma_compressor) warning_fl("SetCompressorDictSize: compressor is not set to LZMA. Effectively ignored."); if (build_compressor_set && build_compress_whole) warning_fl("SetCompressorDictSize: data already compressed in compress whole mode. Effectively ignored."); int s; build_compress_dict_size=line.gettoken_int(1,&s); if (!s) PRINTHELP(); SCRIPT_MSG("SetCompressorDictSize: %u mb\n", build_compress_dict_size); build_compress_dict_size <<= 20; } return PS_OK; #else case TOK_SETCOMPRESSIONLEVEL: case TOK_SETCOMPRESSORDICTSIZE: ERROR_MSG("Error: %s specified, NSIS_CONFIG_COMPRESSION_SUPPORT not defined.\n", line.gettoken_str(0)); return PS_ERROR; #endif//NSIS_CONFIG_COMPRESSION_SUPPORT case TOK_ADDSIZE: { int s; int size_kb=line.gettoken_int(1,&s); if (!s) PRINTHELP() SCRIPT_MSG("AddSize: %d kb\n",size_kb); section_add_size_kb(size_kb); } return PS_OK; case TOK_SUBCAPTION: { int s; int w=line.gettoken_int(1,&s); if (!s || w < 0 || w > 4) PRINTHELP() SetInnerString(NLF_SUBCAPTION_LICENSE+w,line.gettoken_str(2)); SCRIPT_MSG("SubCaption: page:%d, text=%s\n",w,line.gettoken_str(2)); } return PS_OK; case TOK_FILEERRORTEXT: #ifdef NSIS_SUPPORT_FILE { SetInnerString(NLF_FILE_ERROR,line.gettoken_str(1)); SetInnerString(NLF_FILE_ERROR_NOIGNORE,line.gettoken_str(2)); SCRIPT_MSG("FileErrorText: \"%s\" \"%s\"\n",line.gettoken_str(1),line.gettoken_str(2)); } return PS_OK; #else ERROR_MSG("Error: %s specified, NSIS_SUPPORT_FILE not defined.\n", line.gettoken_str(0)); return PS_ERROR; #endif case TOK_BRANDINGTEXT: { int a = 1; int trim = 0; while (line.gettoken_str(a)[0] == '/') { if (!strnicmp(line.gettoken_str(a),"/TRIM",5)) { if (!stricmp(line.gettoken_str(a)+5,"LEFT")) trim = 1; else if (!stricmp(line.gettoken_str(a)+5,"RIGHT")) trim = 2; else if (!stricmp(line.gettoken_str(a)+5,"CENTER")) trim = 3; else PRINTHELP(); a++; } else break; } if (line.getnumtokens()!=a+1 && !trim) PRINTHELP(); if (line.getnumtokens()==a+1) SetInnerString(NLF_BRANDING,line.gettoken_str(a)); #ifdef _WIN32 if (trim) try { init_res_editor(); BYTE* dlg = res_editor->GetResource(RT_DIALOG, MAKEINTRESOURCE(IDD_INST), NSIS_DEFAULT_LANG); CDialogTemplate td(dlg,uDefCodePage); free(dlg); if (trim) { char str[512]; extern const char *NSIS_VERSION; if (line.getnumtokens()==a+1 && line.gettoken_str(a)[0]) strcpy(str, line.gettoken_str(a)); else wsprintf(str, "Nullsoft Install System %s", NSIS_VERSION); switch (trim) { case 1: td.LTrimToString(IDC_VERSTR, str, 4); break; case 2: td.RTrimToString(IDC_VERSTR, str, 4); break; case 3: td.CTrimToString(IDC_VERSTR, str, 4); break; } } DWORD dwSize; dlg = td.Save(dwSize); res_editor->UpdateResource(RT_DIALOG, MAKEINTRESOURCE(IDD_INST), NSIS_DEFAULT_LANG, dlg, dwSize); res_editor->FreeResource(dlg); } catch (exception& err) { ERROR_MSG("Error while triming branding text control: %s\n", err.what()); return PS_ERROR; } #else if (trim) { ERROR_MSG("Error: BrandingText /TRIM* is disabled for non Win32 platforms.\n"); return PS_ERROR; } #endif SCRIPT_MSG("BrandingText: \"%s\"\n",line.gettoken_str(a)); } return PS_OK; case TOK_MISCBUTTONTEXT: { SetInnerString(NLF_BTN_BACK,line.gettoken_str(1)); SetInnerString(NLF_BTN_NEXT,line.gettoken_str(2)); SetInnerString(NLF_BTN_CANCEL,line.gettoken_str(3)); SetInnerString(NLF_BTN_CLOSE,line.gettoken_str(4)); SCRIPT_MSG("MiscButtonText: back=\"%s\" next=\"%s\" cancel=\"%s\" close=\"%s\"\n",line.gettoken_str(1),line.gettoken_str(2),line.gettoken_str(3),line.gettoken_str(4)); } return PS_OK; case TOK_SPACETEXTS: { if (!strcmpi(line.gettoken_str(1), "none")) { no_space_texts=true; SCRIPT_MSG("SpaceTexts: none\n"); } else { no_space_texts=false; SetInnerString(NLF_SPACE_REQ,line.gettoken_str(1)); SetInnerString(NLF_SPACE_AVAIL,line.gettoken_str(2)); SCRIPT_MSG("SpaceTexts: required=\"%s\" available=\"%s\"\n",line.gettoken_str(1),line.gettoken_str(2)); } } return PS_OK; case TOK_INSTBUTTONTEXT: { SetInnerString(NLF_BTN_INSTALL,line.gettoken_str(1)); SCRIPT_MSG("InstallButtonText: \"%s\"\n",line.gettoken_str(1)); } return PS_OK; case TOK_DETAILSBUTTONTEXT: { if (!cur_page) { if (SetInnerString(NLF_BTN_DETAILS,line.gettoken_str(1)) == PS_WARNING) warning_fl("%s: specified multiple times, wasting space",line.gettoken_str(0)); } else { if (cur_page_type != PAGE_INSTFILES) { ERROR_MSG("Error: DetailsButtonText can only be used inside PageEx instfiles.\n"); return PS_ERROR; } cur_page->parms[1] = add_string(line.gettoken_str(1)); } SCRIPT_MSG("DetailsButtonText: \"%s\"\n",line.gettoken_str(1)); } return PS_OK; case TOK_COMPLETEDTEXT: { if (!cur_page) { if (SetInnerString(NLF_COMPLETED,line.gettoken_str(1)) == PS_WARNING) warning_fl("%s: specified multiple times, wasting space",line.gettoken_str(0)); } else { if (cur_page_type != PAGE_INSTFILES) { ERROR_MSG("Error: CompletedText can only be used inside PageEx instfiles.\n"); return PS_ERROR; } cur_page->parms[2] = add_string(line.gettoken_str(1)); } SCRIPT_MSG("CompletedText: \"%s\"\n",line.gettoken_str(1)); } return PS_OK; case TOK_UNINSTBUTTONTEXT: #ifdef NSIS_CONFIG_UNINSTALL_SUPPORT { SetInnerString(NLF_BTN_UNINSTALL,line.gettoken_str(1)); SCRIPT_MSG("UninstButtonText: \"%s\"\n",line.gettoken_str(1)); } return PS_OK; #else ERROR_MSG("Error: %s specified, NSIS_CONFIG_UNINSTALL_SUPPORT not defined.\n", line.gettoken_str(0)); return PS_ERROR; #endif // instructions /////////////////////////////////////////////////////////////////////////////// case TOK_NOP: SCRIPT_MSG("Nop\n"); ent.which=EW_NOP; return add_entry(&ent); case TOK_GOTO: ent.which=EW_NOP; if (process_jump(line,1,&ent.offsets[0])) PRINTHELP() SCRIPT_MSG("Goto: %s\n",line.gettoken_str(1)); return add_entry(&ent); case TOK_SETSHELLVARCONTEXT: { ent.which=EW_SETFLAG; ent.offsets[0]=FLAG_OFFSET(all_user_var); int k=line.gettoken_enum(1,"current\0all\0"); if (k<0) PRINTHELP() ent.offsets[1]=add_intstring(k); SCRIPT_MSG("SetShellVarContext: %s\n",line.gettoken_str(1)); } return add_entry(&ent); case TOK_RET: SCRIPT_MSG("Return\n"); ent.which=EW_RET; return add_entry(&ent); case TOK_CALL: if (!line.gettoken_str(1)[0] || (line.gettoken_str(1)[0]==':' && !line.gettoken_str(1)[1] )) PRINTHELP() #ifdef NSIS_CONFIG_UNINSTALL_SUPPORT if (uninstall_mode && strnicmp(line.gettoken_str(1),"un.",3) && (GetUserVarIndex(line,1) < 0)) { ERROR_MSG("Call must be used with function names starting with \"un.\" in the uninstall section.\n"); PRINTHELP() } if (!uninstall_mode && !strnicmp(line.gettoken_str(1),"un.",3)) { ERROR_MSG("Call must not be used with functions starting with \"un.\" in the non-uninstall sections.\n"); PRINTHELP() } #endif ent.which=EW_CALL; ent.offsets[1]=0; { int v; if ((v=GetUserVarIndex(line, 1))>=0) { ent.offsets[0]=-v-2; } else { if (line.gettoken_str(1)[0] == ':') { ent.offsets[1]=1; ent.offsets[0]=ns_label.add(line.gettoken_str(1)+1,0); } else ent.offsets[0]=ns_func.add(line.gettoken_str(1),0); } } SCRIPT_MSG("Call \"%s\"\n",line.gettoken_str(1)); return add_entry(&ent); case TOK_SETOUTPATH: { char *op=line.gettoken_str(1); if (!strcmp(op,"-")) { op="$INSTDIR"; } SCRIPT_MSG("SetOutPath: \"%s\"\n",op); ent.which=EW_CREATEDIR; ent.offsets[0]=add_string(op); ent.offsets[1]=1; DefineInnerLangString(NLF_OUTPUT_DIR); } return add_entry(&ent); case TOK_CREATEDIR: { char out_path[1024]; char *p=line.gettoken_str(1); if (*p == '-') out_path[0]=0; else { if (p[0] == '\\' && p[1] != '\\') p++; strncpy(out_path,p,1024-1); if (*CharPrev(out_path,out_path+strlen(out_path))=='\\') *CharPrev(out_path,out_path+strlen(out_path))=0; // remove trailing slash } if (!*out_path) PRINTHELP() SCRIPT_MSG("CreateDirectory: \"%s\"\n",out_path); ent.which=EW_CREATEDIR; ent.offsets[0]=add_string(out_path); DefineInnerLangString(NLF_CREATE_DIR); } return add_entry(&ent); case TOK_EXEC: case TOK_EXECWAIT: #ifdef NSIS_SUPPORT_EXECUTE ent.which=EW_EXECUTE; ent.offsets[0]=add_string(line.gettoken_str(1)); ent.offsets[2]=0; if (which_token == TOK_EXECWAIT) { ent.offsets[2]=1; ent.offsets[1]=GetUserVarIndex(line, 2); if (line.gettoken_str(2)[0] && ent.offsets[1]<0) PRINTHELP() } SCRIPT_MSG("%s: \"%s\" (->%s)\n",ent.offsets[2]?"ExecWait":"Exec",line.gettoken_str(1),line.gettoken_str(2)); DefineInnerLangString(NLF_EXEC); return add_entry(&ent); #else//!NSIS_SUPPORT_EXECUTE ERROR_MSG("Error: %s specified, NSIS_SUPPORT_EXECUTE not defined.\n", line.gettoken_str(0)); return PS_ERROR; #endif//!NSIS_SUPPORT_EXECUTE case TOK_EXECSHELL: // this uses improvements of Andras Varga #ifdef NSIS_SUPPORT_SHELLEXECUTE ent.which=EW_SHELLEXEC; ent.offsets[0]=add_string(line.gettoken_str(1)); ent.offsets[1]=add_string(line.gettoken_str(2)); ent.offsets[2]=add_string(line.gettoken_str(3)); ent.offsets[3]=SW_SHOWNORMAL; if (line.getnumtokens() > 4) { int tab[4]={SW_SHOWNORMAL,SW_SHOWMAXIMIZED,SW_SHOWMINIMIZED,SW_HIDE}; int a=line.gettoken_enum(4,"SW_SHOWNORMAL\0SW_SHOWMAXIMIZED\0SW_SHOWMINIMIZED\0SW_HIDE\0"); if (a < 0) PRINTHELP() ent.offsets[3]=tab[a]; } SCRIPT_MSG("ExecShell: %s: \"%s\" \"%s\" %s\n",line.gettoken_str(1),line.gettoken_str(2), line.gettoken_str(3),line.gettoken_str(4)); DefineInnerLangString(NLF_EXEC_SHELL); return add_entry(&ent); #else//!NSIS_SUPPORT_SHELLEXECUTE ERROR_MSG("Error: %s specified, NSIS_SUPPORT_SHELLEXECUTE not defined.\n", line.gettoken_str(0)); return PS_ERROR; #endif//!NSIS_SUPPORT_SHELLEXECUTE case TOK_CALLINSTDLL: case TOK_REGDLL: case TOK_UNREGDLL: #ifndef NSIS_SUPPORT_ACTIVEXREG ERROR_MSG("%s: support not compiled in (NSIS_SUPPORT_ACTIVEXREG)\n",line.gettoken_str(0)); return PS_ERROR; #else//NSIS_SUPPORT_ACTIVEXREG ent.which=EW_REGISTERDLL; ent.offsets[0]=add_string(line.gettoken_str(1)); if (which_token == TOK_UNREGDLL) { ent.offsets[1]=add_string("DllUnregisterServer"); ent.offsets[2]=DefineInnerLangString(NLF_UNREGISTERING); } else if (which_token == TOK_CALLINSTDLL) { int a = 2; if (!stricmp(line.gettoken_str(a), "/NOUNLOAD")) { ent.offsets[3]=1; a++; } if (a+1 != line.getnumtokens()) PRINTHELP(); ent.offsets[1]=add_string(line.gettoken_str(a)); if (!ent.offsets[1]) PRINTHELP() ent.offsets[2]=0; } else // register { ent.offsets[1] = add_string(line.gettoken_str(2)); if (!ent.offsets[1]) ent.offsets[1]=add_string("DllRegisterServer"); ent.offsets[2]=DefineInnerLangString(NLF_REGISTERING); } SCRIPT_MSG("%s: \"%s\" %s\n",line.gettoken_str(0),line.gettoken_str(1), line.gettoken_str(ent.offsets[3]?3:2)); DefineInnerLangString(NLF_SYMBOL_NOT_FOUND); DefineInnerLangString(NLF_COULD_NOT_LOAD); DefineInnerLangString(NLF_NO_OLE); DefineInnerLangString(NLF_ERR_REG_DLL); return add_entry(&ent); #endif//NSIS_SUPPORT_ACTIVEXREG case TOK_RENAME: #ifdef NSIS_SUPPORT_RENAME { int a=1; ent.which=EW_RENAME; if (!stricmp(line.gettoken_str(1),"/REBOOTOK")) { ent.offsets[2]=1; a++; #ifndef NSIS_SUPPORT_MOVEONREBOOT ERROR_MSG("Error: /REBOOTOK specified, NSIS_SUPPORT_MOVEONREBOOT not defined\n"); PRINTHELP() #endif } else if (line.gettoken_str(1)[0]=='/') { a=line.getnumtokens(); // cause usage to go here: } if (line.getnumtokens()!=a+2) PRINTHELP() ent.offsets[0]=add_string(line.gettoken_str(a)); ent.offsets[1]=add_string(line.gettoken_str(a+1)); SCRIPT_MSG("Rename: %s%s->%s\n",ent.offsets[2]?"/REBOOTOK ":"",line.gettoken_str(a),line.gettoken_str(a+1)); DefineInnerLangString(NLF_RENAME); #ifdef NSIS_SUPPORT_MOVEONREBOOT DefineInnerLangString(NLF_RENAME_ON_REBOOT); #endif } return add_entry(&ent); #else//!NSIS_SUPPORT_RENAME ERROR_MSG("Error: %s specified, NSIS_SUPPORT_RENAME not defined.\n", line.gettoken_str(0)); return PS_ERROR; #endif//!NSIS_SUPPORT_RENAME case TOK_MESSAGEBOX: #ifdef NSIS_SUPPORT_MESSAGEBOX { #define MBD(x) {x,#x}, struct { int id; char *str; } list[]= { MBD(MB_ABORTRETRYIGNORE) MBD(MB_OK) MBD(MB_OKCANCEL) MBD(MB_RETRYCANCEL) MBD(MB_YESNO) MBD(MB_YESNOCANCEL) MBD(MB_ICONEXCLAMATION) MBD(MB_ICONINFORMATION) MBD(MB_ICONQUESTION) MBD(MB_ICONSTOP) MBD(MB_TOPMOST) MBD(MB_SETFOREGROUND) MBD(MB_RIGHT) MBD(MB_DEFBUTTON1) MBD(MB_DEFBUTTON2) MBD(MB_DEFBUTTON3) MBD(MB_DEFBUTTON4) }; #undef MBD int r=0; int x; char *p=line.gettoken_str(1); while (*p) { char *np=p; while (*np && *np != '|') np++; if (*np) *np++=0; for (x = 0 ; (unsigned) x < sizeof(list) / sizeof(list[0]) && strcmpi(list[x].str, p); x++); if ((unsigned) x < sizeof(list) / sizeof(list[0])) { r|=list[x].id; } else PRINTHELP() p=np; } ent.which=EW_MESSAGEBOX; ent.offsets[0]=r; ent.offsets[1]=add_string(line.gettoken_str(2)); int rettab[] = { 0,IDABORT,IDCANCEL,IDIGNORE,IDNO,IDOK,IDRETRY,IDYES }; const char *retstr="0\0IDABORT\0IDCANCEL\0IDIGNORE\0IDNO\0IDOK\0IDRETRY\0IDYES\0"; int a=3; if (line.getnumtokens() > 3) { if (!strcmpi(line.gettoken_str(3),"/SD")) { int k=line.gettoken_enum(4,retstr); if (k <= 0) PRINTHELP(); ent.offsets[0]|=rettab[k]<<20; a=5; } else if (line.getnumtokens() > 7) PRINTHELP(); if (line.getnumtokens() > a) { ent.offsets[2]=line.gettoken_enum(a,retstr); if (ent.offsets[2] < 0) PRINTHELP(); ent.offsets[2] = rettab[ent.offsets[2]]; if (process_jump(line,a+1,&ent.offsets[3])) PRINTHELP(); if (line.getnumtokens() > a+2) { int v=line.gettoken_enum(a+2,retstr); if (v < 0) PRINTHELP(); ent.offsets[4] = rettab[v]; if (process_jump(line,a+3,&ent.offsets[5])) PRINTHELP(); } } } SCRIPT_MSG("MessageBox: %d: \"%s\"",r,line.gettoken_str(2)); if (line.getnumtokens()>a+1) SCRIPT_MSG(" (on %s goto %s)",line.gettoken_str(a),line.gettoken_str(a+1)); SCRIPT_MSG("\n"); } return add_entry(&ent); #else//!NSIS_SUPPORT_MESSAGEBOX ERROR_MSG("Error: %s specified, NSIS_SUPPORT_MESSAGEBOX not defined.\n", line.gettoken_str(0)); return PS_ERROR; #endif//!NSIS_SUPPORT_MESSAGEBOX case TOK_CREATESHORTCUT: #ifdef NSIS_SUPPORT_CREATESHORTCUT ent.which=EW_CREATESHORTCUT; ent.offsets[0]=add_string(line.gettoken_str(1)); ent.offsets[1]=add_string(line.gettoken_str(2)); ent.offsets[2]=add_string(line.gettoken_str(3)); ent.offsets[3]=add_string(line.gettoken_str(4)); ent.offsets[5]=add_string(line.gettoken_str(8)); int s; ent.offsets[4]=line.gettoken_int(5,&s)&0xff; if (!s) { if (line.getnumtokens() > 5 && *line.gettoken_str(5)) { ERROR_MSG("CreateShortCut: cannot interpret icon index\n"); PRINTHELP() } ent.offsets[4]=0; } if (line.getnumtokens() > 6 && *line.gettoken_str(6)) { int tab[3]={SW_SHOWNORMAL,SW_SHOWMAXIMIZED,SW_SHOWMINNOACTIVE/*SW_SHOWMINIMIZED doesn't work*/}; int a=line.gettoken_enum(6,"SW_SHOWNORMAL\0SW_SHOWMAXIMIZED\0SW_SHOWMINIMIZED\0"); if (a < 0) { ERROR_MSG("CreateShortCut: unknown show mode \"%s\"\n",line.gettoken_str(6)); PRINTHELP() } ent.offsets[4]|=tab[a]<<8; } if (line.getnumtokens() > 7) { char *s=(line.gettoken_str(7)); char b[255]; for (unsigned int spos=0; (spos <= strlen(s)) && (spos <= 255); spos++) b[spos]=toupper(*(s+spos)); strcpy(s,b); if (*s) { int c=0; if (strstr(s,"ALT|")) ent.offsets[4]|=HOTKEYF_ALT << 24; if (strstr(s,"CONTROL|")) ent.offsets[4]|=HOTKEYF_CONTROL << 24; if (strstr(s,"EXT|")) ent.offsets[4]|=HOTKEYF_EXT << 24; if (strstr(s,"SHIFT|")) ent.offsets[4]|=HOTKEYF_SHIFT << 24; while (strstr(s,"|")) { s=strstr(s,"|")+1; } if ((s[0] == 'F') && (s[1] >= '1' && s[1] <= '9')) { c=VK_F1-1+atoi(s+1); if (atoi(s+1) < 1 || atoi(s+1) > 24) { warning_fl("CreateShortCut: F-key \"%s\" out of range",s); } } else if (((s[0] >= 'A' && s[0] <= 'Z') || (s[0] >= '0' && s[0] <= '9')) && !s[1]) c=s[0]; else { c=s[0]; warning_fl("CreateShortCut: unrecognized hotkey \"%s\"",s); } ent.offsets[4] |= (c) << 16; } } SCRIPT_MSG("CreateShortCut: \"%s\"->\"%s\" %s icon:%s,%d, showmode=0x%X, hotkey=0x%X, comment=%s\n", line.gettoken_str(1),line.gettoken_str(2),line.gettoken_str(3), line.gettoken_str(4),ent.offsets[4]&0xff,(ent.offsets[4]>>8)&0xff,ent.offsets[4]>>16,line.gettoken_str(8)); DefineInnerLangString(NLF_CREATE_SHORTCUT); DefineInnerLangString(NLF_ERR_CREATING_SHORTCUT); return add_entry(&ent); #else//!NSIS_SUPPORT_CREATESHORTCUT ERROR_MSG("Error: %s specified, NSIS_SUPPORT_CREATESHORTCUT not defined.\n", line.gettoken_str(0)); return PS_ERROR; #endif//NSIS_SUPPORT_CREATESHORTCUT #ifdef NSIS_SUPPORT_HWNDS case TOK_FINDWINDOW: ent.which=EW_FINDWINDOW; ent.offsets[0]=GetUserVarIndex(line, 1); if (ent.offsets[0] < 0) PRINTHELP() ent.offsets[1]=add_string(line.gettoken_str(2)); ent.offsets[2]=add_string(line.gettoken_str(3)); ent.offsets[3]=add_string(line.gettoken_str(4)); ent.offsets[4]=add_string(line.gettoken_str(5)); SCRIPT_MSG("FindWindow: output=%s, class=\"%s\", text=\"%s\" hwndparent=\"%s\" hwndafter=\"%s\"\n", line.gettoken_str(1),line.gettoken_str(2),line.gettoken_str(3),line.gettoken_str(4),line.gettoken_str(5)); return add_entry(&ent); case TOK_SENDMESSAGE: ent.which=EW_SENDMESSAGE; if (line.gettoken_str(1)[0] == '/' || line.gettoken_str(2)[0] == '/' || line.gettoken_str(3)[0] == '/' || line.gettoken_str(4)[0] == '/') { PRINTHELP() } SCRIPT_MSG("SendMessage:"); { int a=5; ent.offsets[0]=GetUserVarIndex(line, 5); if (ent.offsets[0]>=0) { SCRIPT_MSG("(->%s)",line.gettoken_str(5)); a++; } if (!strncmp(line.gettoken_str(a),"/TIMEOUT=",9)) { ent.offsets[5]|=atoi(line.gettoken_str(a)+9)<<2; SCRIPT_MSG(" (timeout=%d)",ent.offsets[5]>>2); a++; } if (line.getnumtokens()>a) { PRINTHELP() } } if (!strncmp(line.gettoken_str(3),"STR:",4)) { ent.offsets[5]|=1; ent.offsets[3]=add_string(line.gettoken_str(3)+4); } else ent.offsets[3]=add_string(line.gettoken_str(3)); if (!strncmp(line.gettoken_str(4),"STR:",4)) { ent.offsets[5]|=2; ent.offsets[4]=add_string(line.gettoken_str(4)+4); } else ent.offsets[4]=add_string(line.gettoken_str(4)); ent.offsets[1]=add_string(line.gettoken_str(1)); ent.offsets[2]=add_string(line.gettoken_str(2)); SCRIPT_MSG("(%s,%s,%s,%s)\n",line.gettoken_str(1),line.gettoken_str(2),line.gettoken_str(3),line.gettoken_str(4)); return add_entry(&ent); case TOK_ISWINDOW: ent.which=EW_ISWINDOW; ent.offsets[0]=add_string(line.gettoken_str(1)); if (process_jump(line,2,&ent.offsets[1])|| process_jump(line,3,&ent.offsets[2])) PRINTHELP() SCRIPT_MSG("IsWindow(%s): %s:%s\n",line.gettoken_str(1),line.gettoken_str(2),line.gettoken_str(3)); return add_entry(&ent); #ifdef NSIS_CONFIG_ENHANCEDUI_SUPPORT case TOK_GETDLGITEM: ent.which=EW_GETDLGITEM; ent.offsets[0]=GetUserVarIndex(line, 1); if (ent.offsets[0]<0) PRINTHELP(); ent.offsets[1]=add_string(line.gettoken_str(2)); ent.offsets[2]=add_string(line.gettoken_str(3)); SCRIPT_MSG("GetDlgItem: output=%s dialog=%s item=%s\n",line.gettoken_str(1),line.gettoken_str(2),line.gettoken_str(3)); return add_entry(&ent); case TOK_SETCTLCOLORS: { ctlcolors c={0, }; ent.which=EW_SETCTLCOLORS; ent.offsets[0]=add_string(line.gettoken_str(1)); int a = 2; if (!strcmpi(line.gettoken_str(2),"/BRANDING")) a++; { char *p; if (a == 2 && line.getnumtokens() == 5) { ERROR_MSG("Error: SetCtlColors expected 3 parameters, got 4\n"); return PS_ERROR; } if (!strcmpi(line.gettoken_str(a+1),"transparent")) { c.flags|=CC_BKB; c.lbStyle=BS_NULL; c.bkmode=TRANSPARENT; } else { p=line.gettoken_str(a+1); if (*p) { int v=strtoul(p,&p,16); c.bkc=((v&0xff)<<16)|(v&0xff00)|((v&0xff0000)>>16); c.flags|=CC_BK|CC_BKB; } c.lbStyle=BS_SOLID; c.bkmode=OPAQUE; } p=line.gettoken_str(a); if (*p) { int v=strtoul(p,&p,16); c.text=((v&0xff)<<16)|(v&0xff00)|((v&0xff0000)>>16); c.flags|=CC_TEXT; } } if (a == 3) { c.flags|=CC_BK|CC_BKB; c.lbStyle=BS_NULL; if (!*line.gettoken_str(a+1)) { c.bkc=COLOR_BTNFACE; c.flags|=CC_BK_SYS; } c.flags|=CC_TEXT; if (!*line.gettoken_str(a)) { c.text=COLOR_BTNFACE; c.flags|=CC_TEXT_SYS; } c.bkmode=OPAQUE; } int i; int l=cur_ctlcolors->getlen()/sizeof(ctlcolors); for (i=0; i<l; i++) { if (!memcmp((ctlcolors*)cur_ctlcolors->get()+i,&c,sizeof(ctlcolors))) { ent.offsets[1]=i*sizeof(ctlcolors); break; } } if (i>=l) { ent.offsets[1]=cur_ctlcolors->add(&c,sizeof(ctlcolors)); } SCRIPT_MSG("SetCtlColors: hwnd=%s %stext=%s background=%s\n",line.gettoken_str(1),a==2?"":"/BRANDING ",line.gettoken_str(a),line.gettoken_str(a+1)); } return add_entry(&ent); case TOK_CREATEFONT: ent.which=EW_CREATEFONT; ent.offsets[0]=GetUserVarIndex(line, 1); ent.offsets[1]=add_string(line.gettoken_str(2)); SCRIPT_MSG("CreateFont: output=%s \"%s\"",line.gettoken_str(1),line.gettoken_str(2)); { int height=0; int weight=0; int flags=0; for (int i = 3; i < line.getnumtokens(); i++) { char *tok=line.gettoken_str(i); if (tok[0]=='/') { if (!strcmpi(tok,"/ITALIC")) { SCRIPT_MSG(" /ITALIC"); flags|=1; } else if (!strcmpi(tok,"/UNDERLINE")) { SCRIPT_MSG(" /UNDERLINE"); flags|=2; } else if (!strcmpi(tok,"/STRIKE")) { SCRIPT_MSG(" /STRIKE"); flags|=4; } else { SCRIPT_MSG("\n"); PRINTHELP(); } } else { if (!height) { SCRIPT_MSG(" height=%s",tok); height=add_string(tok); } else if (!weight) { SCRIPT_MSG(" weight=%s",tok); weight=add_string(tok); } else { SCRIPT_MSG("\n"); PRINTHELP(); } } } ent.offsets[2]=height; ent.offsets[3]=weight; ent.offsets[4]=flags; } SCRIPT_MSG("\n"); return add_entry(&ent); case TOK_ENABLEWINDOW: ent.which=EW_SHOWWINDOW; ent.offsets[0]=add_string(line.gettoken_str(1)); ent.offsets[1]=add_string(line.gettoken_str(2)); ent.offsets[3]=1; SCRIPT_MSG("EnableWindow: handle=%s enable=%s\n",line.gettoken_str(1),line.gettoken_str(2)); return add_entry(&ent); case TOK_SHOWWINDOW: ent.which=EW_SHOWWINDOW; ent.offsets[0]=add_string(line.gettoken_str(1)); ent.offsets[1]=add_string(line.gettoken_str(2)); SCRIPT_MSG("ShowWindow: handle=%s show state=%s\n",line.gettoken_str(1),line.gettoken_str(2)); return add_entry(&ent); case TOK_HIDEWINDOW: ent.which=EW_SHOWWINDOW; ent.offsets[0]=add_string("$HWNDPARENT"); ent.offsets[1]=add_string("0"/*SW_HIDE*/); ent.offsets[2]=1; SCRIPT_MSG("HideWindow\n"); return add_entry(&ent); case TOK_BRINGTOFRONT: { int ret; ent.which=EW_SHOWWINDOW; ent.offsets[0]=add_string("$HWNDPARENT"); ent.offsets[1]=add_string("5"/*SW_SHOW*/); ret = add_entry(&ent); if (ret != PS_OK) return ret; ent.which=EW_BRINGTOFRONT; ent.offsets[0]=0; ent.offsets[1]=0; SCRIPT_MSG("BringToFront\n"); } return add_entry(&ent); #else//NSIS_CONFIG_ENHANCEDUI_SUPPORT case TOK_GETDLGITEM: case TOK_SETCTLCOLORS: case TOK_SHOWWINDOW: case TOK_BRINGTOFRONT: case TOK_CREATEFONT: case TOK_HIDEWINDOW: case TOK_ENABLEWINDOW: ERROR_MSG("Error: %s specified, NSIS_CONFIG_ENHANCEDUI_SUPPORT not defined.\n", line.gettoken_str(0)); return PS_ERROR; #endif//NSIS_CONFIG_ENHANCEDUI_SUPPORT #else//!NSIS_SUPPORT_HWNDS case TOK_ISWINDOW: case TOK_SENDMESSAGE: case TOK_FINDWINDOW: case TOK_GETDLGITEM: case TOK_SETCTLCOLORS: case TOK_SHOWWINDOW: case TOK_ENABLEWINDOW: case TOK_CREATEFONT: case TOK_HIDEWINDOW: case TOK_BRINGTOFRONT: ERROR_MSG("Error: %s specified, NSIS_SUPPORT_HWNDS not defined.\n", line.gettoken_str(0)); return PS_ERROR; #endif//!NSIS_SUPPORT_HWNDS case TOK_DELETE: #ifdef NSIS_SUPPORT_DELETE { int a=1; ent.which=EW_DELETEFILE; if (!stricmp(line.gettoken_str(a),"/REBOOTOK")) { a++; ent.offsets[1]=DEL_REBOOT; #ifndef NSIS_SUPPORT_MOVEONREBOOT ERROR_MSG("Error: /REBOOTOK specified, NSIS_SUPPORT_MOVEONREBOOT not defined\n"); PRINTHELP() #endif } else if (line.gettoken_str(1)[0]=='/') { a=line.getnumtokens(); } if (line.getnumtokens() != a+1) PRINTHELP() ent.offsets[0]=add_string(line.gettoken_str(a)); SCRIPT_MSG("Delete: %s\"%s\"\n",ent.offsets[1]?"/REBOOTOK ":"",line.gettoken_str(a)); DefineInnerLangString(NLF_DEL_FILE); #ifdef NSIS_SUPPORT_MOVEONREBOOT DefineInnerLangString(NLF_DEL_ON_REBOOT); #endif } return add_entry(&ent); #else//!NSIS_SUPPORT_DELETE ERROR_MSG("Error: %s specified, NSIS_SUPPORT_DELETE not defined.\n", line.gettoken_str(0)); return PS_ERROR; #endif//!NSIS_SUPPORT_DELETE case TOK_RMDIR: #ifdef NSIS_SUPPORT_RMDIR { int a=1; ent.which=EW_RMDIR; ent.offsets[1]=DEL_DIR; while (line.gettoken_str(a)[0]=='/') { if (!stricmp(line.gettoken_str(a),"/r")) { if (a == 3) PRINTHELP(); a++; ent.offsets[1]|=DEL_RECURSE; } else if (!stricmp(line.gettoken_str(a),"/REBOOTOK")) { if (a == 3) PRINTHELP(); a++; ent.offsets[1]|=DEL_REBOOT; } else PRINTHELP(); } if (a < line.getnumtokens() - 1) PRINTHELP(); ent.offsets[0]=add_string(line.gettoken_str(a)); SCRIPT_MSG("RMDir: "); if (a>1) SCRIPT_MSG("%s ",line.gettoken_str(1)); if (a>2) SCRIPT_MSG("%s ",line.gettoken_str(2)); SCRIPT_MSG("\"%s\"\n",line.gettoken_str(a)); DefineInnerLangString(NLF_REMOVE_DIR); DefineInnerLangString(NLF_DEL_FILE); #ifdef NSIS_SUPPORT_MOVEONREBOOT DefineInnerLangString(NLF_DEL_ON_REBOOT); #endif } return add_entry(&ent); #else//!NSIS_SUPPORT_RMDIR ERROR_MSG("Error: %s specified, NSIS_SUPPORT_RMDIR not defined.\n", line.gettoken_str(0)); return PS_ERROR; #endif//!NSIS_SUPPORT_RMDIR case TOK_RESERVEFILE: case TOK_FILE: #ifdef NSIS_SUPPORT_FILE { set<string> excluded; int a=1,attrib=0,rec=0,fatal=1; if (!stricmp(line.gettoken_str(a),"/nonfatal")) { fatal=0; a++; } if (which_token == TOK_FILE && !stricmp(line.gettoken_str(a),"/a")) { #ifdef _WIN32 attrib=1; #else warning_fl("%sFile /a is disabled for non Win32 platforms.",(which_token == TOK_FILE)?"":"Reserve"); #endif a++; } if (!stricmp(line.gettoken_str(a),"/r")) { rec=1; a++; } else if (which_token == TOK_FILE && !strnicmp(line.gettoken_str(a),"/oname=",7)) { char *on=line.gettoken_str(a)+7; a++; if (!*on||line.getnumtokens()!=a+1||strstr(on,"*") || strstr(on,"?")) PRINTHELP() int tf=0; #ifdef _WIN32 int v=do_add_file(line.gettoken_str(a), attrib, 0, &tf, on); #else char *fn = my_convert(line.gettoken_str(a)); int v=do_add_file(fn, attrib, 0, &tf, on); my_convert_free(fn); #endif if (v != PS_OK) return v; if (tf > 1) PRINTHELP() if (!tf) { if (fatal) { ERROR_MSG("%sFile: \"%s\" -> no files found.\n",(which_token == TOK_FILE)?"":"Reserve",line.gettoken_str(a)); PRINTHELP() } else { warning_fl("%sFile: \"%s\" -> no files found",(which_token == TOK_FILE)?"":"Reserve",line.gettoken_str(a)); } } return PS_OK; } if (!strnicmp(line.gettoken_str(a),"/x",2)) { while (!strnicmp(line.gettoken_str(a),"/x",2)) { a++; if (line.getnumtokens() < a+1) PRINTHELP() excluded.insert(line.gettoken_str(a)); a++; } } #ifdef _WIN32 if (line.gettoken_str(a)[0] == '/') PRINTHELP() #endif if (line.getnumtokens()<a+1) PRINTHELP() while (a < line.getnumtokens()) { #ifdef _WIN32 if (line.gettoken_str(a)[0]=='/') PRINTHELP() #endif char buf[32]; char *t=line.gettoken_str(a++); if (t[0] && CharNext(t)[0] == ':' && CharNext(t)[1] == '\\' && !CharNext(t)[2]) { strcpy(buf,"X:\\*.*"); buf[0]=t[0]; t=buf; } int tf=0; #ifdef _WIN32 int v=do_add_file(t, attrib, rec, &tf, NULL, which_token == TOK_FILE, NULL, excluded); #else char *fn = my_convert(t); int v=do_add_file(fn, attrib, rec, &tf, NULL, which_token == TOK_FILE, NULL, excluded); my_convert_free(fn); #endif if (v != PS_OK) return v; if (!tf) { if (fatal) { ERROR_MSG("%sFile: \"%s\" -> no files found.\n",(which_token == TOK_FILE)?"":"Reserve",t); PRINTHELP(); } else { warning_fl("%sFile: \"%s\" -> no files found.",(which_token == TOK_FILE)?"":"Reserve",t); } } } } return PS_OK; #else//!NSIS_SUPPORT_FILE ERROR_MSG("Error: %s specified, NSIS_SUPPORT_FILE not defined.\n", line.gettoken_str(0)); return PS_ERROR; #endif//!NSIS_SUPPORT_FILE #ifdef NSIS_SUPPORT_COPYFILES case TOK_COPYFILES: { ent.which=EW_COPYFILES; ent.offsets[2]=FOF_NOCONFIRMATION|FOF_NOCONFIRMMKDIR|FOF_NOERRORUI|FOF_SIMPLEPROGRESS; int a=1; int x; for (x = 0; x < 2; x ++) { if (!stricmp(line.gettoken_str(a),"/SILENT")) { a++; ent.offsets[2]&=~FOF_SIMPLEPROGRESS; ent.offsets[2]|=FOF_SILENT; } else if (!stricmp(line.gettoken_str(a),"/FILESONLY")) { a++; ent.offsets[2]|=FOF_FILESONLY; } else if (line.gettoken_str(a)[0]=='/') PRINTHELP() else break; } if (line.getnumtokens() < a+2) PRINTHELP() ent.offsets[0]=add_string(line.gettoken_str(a)); ent.offsets[1]=add_string(line.gettoken_str(a+1)); int s; int size_kb=line.gettoken_int(a+2,&s); if (!s && line.gettoken_str(a+2)[0]) PRINTHELP() section_add_size_kb(size_kb); SCRIPT_MSG("CopyFiles: %s\"%s\" -> \"%s\", size=%iKB\n",ent.offsets[2]&FOF_SILENT?"(silent) ":"", line.gettoken_str(a),line.gettoken_str(a+1),size_kb); DefineInnerLangString(NLF_COPY_FAILED); DefineInnerLangString(NLF_COPY_TO); } return add_entry(&ent); #else//!NSIS_SUPPORT_COPYFILES case TOK_COPYFILES: ERROR_MSG("Error: %s specified, NSIS_SUPPORT_COPYFILES not defined.\n", line.gettoken_str(0)); return PS_ERROR; #endif//!NSIS_SUPPORT_COPYFILES case TOK_SETFILEATTRIBUTES: { #define MBD(x) {x,#x}, struct { int id; char *str; } list[]= { MBD(FILE_ATTRIBUTE_NORMAL) MBD(FILE_ATTRIBUTE_ARCHIVE) MBD(FILE_ATTRIBUTE_HIDDEN) MBD(FILE_ATTRIBUTE_OFFLINE) MBD(FILE_ATTRIBUTE_READONLY) MBD(FILE_ATTRIBUTE_SYSTEM) MBD(FILE_ATTRIBUTE_TEMPORARY) {FILE_ATTRIBUTE_NORMAL,"NORMAL"}, {FILE_ATTRIBUTE_ARCHIVE,"ARCHIVE"}, {FILE_ATTRIBUTE_HIDDEN,"HIDDEN"}, {FILE_ATTRIBUTE_OFFLINE,"OFFLINE"}, {FILE_ATTRIBUTE_READONLY,"READONLY"}, {FILE_ATTRIBUTE_SYSTEM,"SYSTEM"}, {FILE_ATTRIBUTE_TEMPORARY,"TEMPORARY"}, {FILE_ATTRIBUTE_NORMAL,"0"}, }; #undef MBD int r=0; int x; char *p=line.gettoken_str(2); while (*p) { char *np=p; while (*np && *np != '|') np++; if (*np) *np++=0; for (x = 0 ; (unsigned) x < sizeof(list)/sizeof(list[0]) && stricmp(list[x].str,p); x ++); if ((unsigned) x < sizeof(list)/sizeof(list[0])) { r|=list[x].id; } else PRINTHELP() p=np; } ent.which=EW_SETFILEATTRIBUTES; ent.offsets[0]=add_string(line.gettoken_str(1)); ent.offsets[1]=r; } return add_entry(&ent); case TOK_SLEEP: { ent.which=EW_SLEEP; ent.offsets[0]=add_string(line.gettoken_str(1)); SCRIPT_MSG("Sleep: %s ms\n",line.gettoken_str(1)); } return add_entry(&ent); case TOK_IFFILEEXISTS: ent.which=EW_IFFILEEXISTS; ent.offsets[0] = add_string(line.gettoken_str(1)); if (process_jump(line,2,&ent.offsets[1]) || process_jump(line,3,&ent.offsets[2])) PRINTHELP() SCRIPT_MSG("IfFileExists: \"%s\" ? %s : %s\n",line.gettoken_str(1),line.gettoken_str(2),line.gettoken_str(3)); return add_entry(&ent); case TOK_QUIT: ent.which=EW_QUIT; SCRIPT_MSG("Quit\n"); return add_entry(&ent); case TOK_ABORT: ent.which=EW_ABORT; ent.offsets[0] = add_string(line.gettoken_str(1)); SCRIPT_MSG("Abort: \"%s\"\n",line.gettoken_str(1)); return add_entry(&ent); case TOK_SETDETAILSVIEW: { int v=line.gettoken_enum(1,"hide\0show\0"); ent.which=EW_CHDETAILSVIEW; if (v < 0) PRINTHELP() ent.offsets[0] = v?SW_SHOWNA:SW_HIDE; ent.offsets[1] = v?SW_HIDE:SW_SHOWNA; SCRIPT_MSG("SetDetailsView: %s\n",line.gettoken_str(1)); } return add_entry(&ent); case TOK_SETDETAILSPRINT: ent.which=EW_UPDATETEXT; ent.offsets[0] = 0; ent.offsets[1] = line.gettoken_enum(1,"lastused\0listonly\0textonly\0both\0none\0"); if (ent.offsets[1] < 0) PRINTHELP(); switch (ent.offsets[1]) { case 0: ent.offsets[1]=8; break; case 1: case 2: case 3: ent.offsets[1]<<=1; break; case 4: ent.offsets[1]=16; break; } SCRIPT_MSG("SetDetailsPrint: %s\n",line.gettoken_str(1)); return add_entry(&ent); case TOK_SETAUTOCLOSE: { ent.which=EW_SETFLAG; ent.offsets[0]=FLAG_OFFSET(autoclose); int k=line.gettoken_enum(1,"false\0true\0"); if (k < 0) PRINTHELP() ent.offsets[1]=add_intstring(k); SCRIPT_MSG("SetAutoClose: %s\n",line.gettoken_str(1)); } return add_entry(&ent); case TOK_IFERRORS: ent.which=EW_IFFLAG; if (process_jump(line,1,&ent.offsets[0]) || process_jump(line,2,&ent.offsets[1])) PRINTHELP() ent.offsets[2]=FLAG_OFFSET(exec_error); ent.offsets[3]=0;//new value mask - clean error SCRIPT_MSG("IfErrors ?%s:%s\n",line.gettoken_str(1),line.gettoken_str(2)); return add_entry(&ent); case TOK_IFABORT: ent.which=EW_IFFLAG; if (process_jump(line,1,&ent.offsets[0]) || process_jump(line,2,&ent.offsets[1])) PRINTHELP() ent.offsets[2]=FLAG_OFFSET(abort); ent.offsets[3]=~0;//new value mask - keep flag SCRIPT_MSG("IfAbort ?%s:%s\n",line.gettoken_str(1),line.gettoken_str(2)); return add_entry(&ent); case TOK_CLEARERRORS: ent.which=EW_SETFLAG; ent.offsets[0]=FLAG_OFFSET(exec_error); ent.offsets[1]=add_intstring(0); SCRIPT_MSG("ClearErrors\n"); return add_entry(&ent); case TOK_SETERRORS: ent.which=EW_SETFLAG; ent.offsets[0]=FLAG_OFFSET(exec_error); ent.offsets[1]=add_intstring(1); SCRIPT_MSG("SetErrors\n"); return add_entry(&ent); case TOK_SETERRORLEVEL: ent.which=EW_SETFLAG; ent.offsets[0]=FLAG_OFFSET(errlvl); ent.offsets[1]=add_string(line.gettoken_str(1)); SCRIPT_MSG("SetErrorLevel: %s\n",line.gettoken_str(1)); return add_entry(&ent); case TOK_GETERRORLEVEL: ent.which=EW_GETFLAG; ent.offsets[0]=GetUserVarIndex(line, 1); ent.offsets[1]=FLAG_OFFSET(errlvl); if (line.gettoken_str(1)[0] && ent.offsets[0]<0) PRINTHELP() SCRIPT_MSG("GetErrorLevel: %s\n",line.gettoken_str(1)); return add_entry(&ent); #ifdef NSIS_SUPPORT_STROPTS case TOK_STRLEN: ent.which=EW_STRLEN; ent.offsets[0]=GetUserVarIndex(line, 1); ent.offsets[1]=add_string(line.gettoken_str(2)); if (ent.offsets[0] < 0) PRINTHELP() SCRIPT_MSG("StrLen %s \"%s\"\n",line.gettoken_str(1),line.gettoken_str(2)); return add_entry(&ent); case TOK_STRCPY: ent.which=EW_ASSIGNVAR; ent.offsets[0]=GetUserVarIndex(line, 1); ent.offsets[1]=add_string(line.gettoken_str(2)); ent.offsets[2]=add_string(line.gettoken_str(3)); ent.offsets[3]=add_string(line.gettoken_str(4)); if (ent.offsets[0] < 0) PRINTHELP() SCRIPT_MSG("StrCpy %s \"%s\" (%s) (%s)\n",line.gettoken_str(1),line.gettoken_str(2),line.gettoken_str(3),line.gettoken_str(4)); return add_entry(&ent); case TOK_GETFUNCTIONADDR: ent.which=EW_GETFUNCTIONADDR; ent.offsets[0]=GetUserVarIndex(line, 1); ent.offsets[1]=ns_func.add(line.gettoken_str(2),0); ent.offsets[2]=0; ent.offsets[3]=0; if (ent.offsets[0] < 0) PRINTHELP() SCRIPT_MSG("GetFunctionAddress: %s %s",line.gettoken_str(1),line.gettoken_str(2)); return add_entry(&ent); case TOK_GETLABELADDR: ent.which=EW_GETLABELADDR; ent.offsets[0]=GetUserVarIndex(line, 1); if (ent.offsets[0] < 0 || process_jump(line,2,&ent.offsets[1])) PRINTHELP() ent.offsets[2]=0; ent.offsets[3]=0; SCRIPT_MSG("GetLabelAddress: %s %s",line.gettoken_str(1),line.gettoken_str(2)); return add_entry(&ent); case TOK_GETCURRENTADDR: ent.which=EW_ASSIGNVAR; ent.offsets[0]=GetUserVarIndex(line, 1); { char buf[32]; wsprintf(buf,"%d",1+(cur_header->blocks[NB_ENTRIES].num)); ent.offsets[1]=add_string(buf); } if (ent.offsets[0] < 0) PRINTHELP() ent.offsets[2]=0; ent.offsets[3]=0; SCRIPT_MSG("GetCurrentAddress: %s",line.gettoken_str(1)); return add_entry(&ent); case TOK_STRCMP: ent.which=EW_STRCMP; ent.offsets[0]=add_string(line.gettoken_str(1)); ent.offsets[1]=add_string(line.gettoken_str(2)); if (process_jump(line,3,&ent.offsets[2]) || process_jump(line,4,&ent.offsets[3])) PRINTHELP() SCRIPT_MSG("StrCmp \"%s\" \"%s\" equal=%s, nonequal=%s\n",line.gettoken_str(1),line.gettoken_str(2), line.gettoken_str(3),line.gettoken_str(4)); return add_entry(&ent); case TOK_GETDLLVERSIONLOCAL: { char buf[128]; DWORD low=0, high=0; int flag=0; #ifdef _WIN32 DWORD s,d; int alloced=0; char *path=line.gettoken_str(1); if (!((*path == '\\' && path[1] == '\\') || (*path && path[1] == ':'))) { size_t pathlen=strlen(path)+GetCurrentDirectory(0, buf)+2; char *nrpath=(char *)malloc(pathlen); alloced=1; GetCurrentDirectory(pathlen, nrpath); if (path[0] != '\\') strcat(nrpath,"\\"); else if (nrpath[1] == ':') { nrpath[2]=0; } else { char *p=nrpath+2; while (*p!='\\') p++; *p=0; } strcat(nrpath,path); FILE *f=FOPEN(nrpath, "r"); if (f) { path=nrpath; fclose(f); } else { free(nrpath); alloced=0; } } s=GetFileVersionInfoSize(path,&d); if (s) { void *buf; buf=(void *)GlobalAlloc(GPTR,s); if (buf) { UINT uLen; VS_FIXEDFILEINFO *pvsf; if (GetFileVersionInfo(path,0,s,buf) && VerQueryValue(buf,"\\",(void**)&pvsf,&uLen)) { low=pvsf->dwFileVersionLS; high=pvsf->dwFileVersionMS; flag=1; } GlobalFree(buf); } } if (alloced) free(path); #else FILE *fdll = FOPEN(line.gettoken_str(1), "rb"); if (!fdll) { ERROR_MSG("Error: Can't open \"%s\"!\n", line.gettoken_str(1)); return PS_ERROR; } MANAGE_WITH(fdll, fclose); fseek(fdll, 0, SEEK_END); unsigned int len = ftell(fdll); fseek(fdll, 0, SEEK_SET); LPBYTE dll = (LPBYTE) malloc(len); if (!dll) { ERROR_MSG("Internal compiler error #12345: malloc(%d) failed\n", dll); extern void quit(); quit(); } MANAGE_WITH(dll, free); if (fread(dll, 1, len, fdll) != len) { ERROR_MSG("Error: Can't read \"%s\"!\n", line.gettoken_str(1)); return PS_ERROR; } try { CResourceEditor *dllre = new CResourceEditor(dll, len); LPBYTE ver = dllre->GetResource(VS_FILE_INFO, MAKEINTRESOURCE(VS_VERSION_INFO), 0); int versize = dllre->GetResourceSize(VS_FILE_INFO, MAKEINTRESOURCE(VS_VERSION_INFO), 0); if (ver) { if ((size_t) versize > sizeof(WORD) * 3) { // get VS_FIXEDFILEINFO from VS_VERSIONINFO WCHAR *szKey = (WCHAR *)(ver + sizeof(WORD) * 3); int len = WCStrLen(szKey) * sizeof(WCHAR) + sizeof(WORD) * 3; len = (len + 3) & ~3; // align on DWORD boundry VS_FIXEDFILEINFO *verinfo = (VS_FIXEDFILEINFO *)(ver + len); if (versize > len && verinfo->dwSignature == VS_FFI_SIGNATURE) { low = verinfo->dwFileVersionLS; high = verinfo->dwFileVersionMS; flag = 1; } } dllre->FreeResource(ver); } delete dllre; } catch (exception& err) { ERROR_MSG( "GetDLLVersionLocal: error reading version info from \"%s\": %s\n", line.gettoken_str(1), err.what() ); return PS_ERROR; } #endif if (!flag) { ERROR_MSG("GetDLLVersionLocal: error reading version info from \"%s\"\n",line.gettoken_str(1)); return PS_ERROR; } ent.which=EW_ASSIGNVAR; ent.offsets[0]=GetUserVarIndex(line, 2); wsprintf(buf,"%u",high); ent.offsets[1]=add_string(buf); ent.offsets[2]=0; ent.offsets[3]=0; if (ent.offsets[0]<0) PRINTHELP() add_entry(&ent); ent.offsets[0]=GetUserVarIndex(line, 3); wsprintf(buf,"%u",low); ent.offsets[1]=add_string(buf); ent.offsets[2]=0; ent.offsets[3]=0; if (ent.offsets[0]<0) PRINTHELP() SCRIPT_MSG("GetDLLVersionLocal: %s (%u,%u)->(%s,%s)\n", line.gettoken_str(1),high,low,line.gettoken_str(2),line.gettoken_str(3)); } return add_entry(&ent); case TOK_GETFILETIMELOCAL: { char buf[129]; DWORD high=0,low=0; #ifdef _WIN32 int flag=0; HANDLE hFile=CreateFile(line.gettoken_str(1),0,0,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL); if (hFile != INVALID_HANDLE_VALUE) { FILETIME ft; if (GetFileTime(hFile,NULL,NULL,&ft)) { high=ft.dwHighDateTime; low=ft.dwLowDateTime; flag=1; } CloseHandle(hFile); } if (!flag) { ERROR_MSG("GetFileTimeLocal: error reading date from \"%s\"\n",line.gettoken_str(1)); return PS_ERROR; } #else struct stat st; if (!stat(line.gettoken_str(1), &st)) { union { struct { long l; long h; } words; long long ll; }; ll = (st.st_mtime * 10000000LL) + 116444736000000000LL; high = words.h; low = words.l; } else { ERROR_MSG("GetFileTimeLocal: error reading date from \"%s\"\n",line.gettoken_str(1)); return PS_ERROR; } #endif ent.which=EW_ASSIGNVAR; ent.offsets[0]=GetUserVarIndex(line, 2); wsprintf(buf,"%u",high); ent.offsets[1]=add_string(buf); ent.offsets[2]=0; ent.offsets[3]=0; if (ent.offsets[0]<0) PRINTHELP() add_entry(&ent); ent.offsets[0]=GetUserVarIndex(line, 3); wsprintf(buf,"%u",low); ent.offsets[1]=add_string(buf); ent.offsets[2]=0; ent.offsets[3]=0; if (ent.offsets[0]<0) PRINTHELP() SCRIPT_MSG("GetFileTimeLocal: %s (%u,%u)->(%s,%s)\n", line.gettoken_str(1),high,low,line.gettoken_str(2),line.gettoken_str(3)); } return add_entry(&ent); #else//!NSIS_SUPPORT_STROPTS case TOK_GETDLLVERSIONLOCAL: case TOK_GETFILETIMELOCAL: case TOK_GETFUNCTIONADDR: case TOK_GETLABELADDR: case TOK_GETCURRENTADDR: case TOK_STRLEN: case TOK_STRCPY: case TOK_STRCMP: ERROR_MSG("Error: %s specified, NSIS_SUPPORT_STROPTS not defined.\n", line.gettoken_str(0)); return PS_ERROR; #endif//!NSIS_SUPPORT_STROPTS #ifdef NSIS_SUPPORT_INIFILES case TOK_DELETEINISEC: case TOK_DELETEINISTR: { char *vname=""; char *space=""; ent.which=EW_WRITEINI; ent.offsets[0]=add_string(line.gettoken_str(2)); // section name if (line.getnumtokens() > 3) { vname=line.gettoken_str(3); ent.offsets[1]=add_string(vname); // value name space=" "; } else ent.offsets[1]=0; ent.offsets[2]=0; ent.offsets[3]=add_string(line.gettoken_str(1)); SCRIPT_MSG("DeleteINI%s: [%s] %s%sin %s\n",*vname?"Str":"Sec", line.gettoken_str(2),vname,space,line.gettoken_str(1)); } return add_entry(&ent); case TOK_FLUSHINI: ent.which=EW_WRITEINI; ent.offsets[3]=add_string(line.gettoken_str(1)); SCRIPT_MSG("FlushINI: %s\n",line.gettoken_str(1)); return add_entry(&ent); case TOK_WRITEINISTR: ent.which=EW_WRITEINI; ent.offsets[0]=add_string(line.gettoken_str(2)); ent.offsets[1]=add_string(line.gettoken_str(3)); ent.offsets[2]=add_string(line.gettoken_str(4)); ent.offsets[3]=add_string(line.gettoken_str(1)); ent.offsets[4]=1; // write SCRIPT_MSG("WriteINIStr: [%s] %s=%s in %s\n", line.gettoken_str(2),line.gettoken_str(3),line.gettoken_str(4),line.gettoken_str(1)); return add_entry(&ent); case TOK_READINISTR: ent.which=EW_READINISTR; ent.offsets[0]=GetUserVarIndex(line, 1); if (ent.offsets[0] < 0) PRINTHELP() ent.offsets[1]=add_string(line.gettoken_str(3)); ent.offsets[2]=add_string(line.gettoken_str(4)); ent.offsets[3]=add_string(line.gettoken_str(2)); SCRIPT_MSG("ReadINIStr %s [%s]:%s from %s\n",line.gettoken_str(1),line.gettoken_str(3),line.gettoken_str(4),line.gettoken_str(2)); return add_entry(&ent); #else//!NSIS_SUPPORT_INIFILES case TOK_DELETEINISEC: case TOK_DELETEINISTR: case TOK_FLUSHINI: case TOK_WRITEINISTR: case TOK_READINISTR: ERROR_MSG("Error: %s specified, NSIS_SUPPORT_INIFILES not defined.\n", line.gettoken_str(0)); return PS_ERROR; #endif//!NSIS_SUPPORT_INIFILES case TOK_DETAILPRINT: ent.which=EW_UPDATETEXT; ent.offsets[0]=add_string(line.gettoken_str(1)); ent.offsets[1]=0; SCRIPT_MSG("DetailPrint: \"%s\"\n",line.gettoken_str(1)); return add_entry(&ent); #ifdef NSIS_SUPPORT_FNUTIL case TOK_GETTEMPFILENAME: ent.which=EW_GETTEMPFILENAME; ent.offsets[0]=GetUserVarIndex(line, 1); if (line.getnumtokens() == 3) ent.offsets[1]=add_string(line.gettoken_str(2)); else ent.offsets[1]=add_string("$TEMP"); if (ent.offsets[0]<0) PRINTHELP() SCRIPT_MSG("GetTempFileName -> %s\n",line.gettoken_str(1)); return add_entry(&ent); case TOK_GETFULLPATHNAME: { int a=0; ent.which=EW_GETFULLPATHNAME; if (line.getnumtokens()==4 && !stricmp(line.gettoken_str(1),"/SHORT")) a++; else if (line.getnumtokens()==4 || *line.gettoken_str(1)=='/') PRINTHELP() ent.offsets[0]=add_string(line.gettoken_str(2+a)); ent.offsets[1]=GetUserVarIndex(line, 1+a); ent.offsets[2]=!a; if (ent.offsets[0]<0) PRINTHELP() SCRIPT_MSG("GetFullPathName: %s->%s (%d)\n", line.gettoken_str(2+a),line.gettoken_str(1+a),a?"sfn":"lfn"); } return add_entry(&ent); case TOK_SEARCHPATH: ent.which=EW_SEARCHPATH; ent.offsets[0]=GetUserVarIndex(line, 1); if (ent.offsets[0] < 0) PRINTHELP() ent.offsets[1]=add_string(line.gettoken_str(2)); SCRIPT_MSG("SearchPath %s %s\n",line.gettoken_str(1),line.gettoken_str(2)); return add_entry(&ent); #else case TOK_SEARCHPATH: case TOK_GETTEMPFILENAME: case TOK_GETFULLPATHNAME: ERROR_MSG("Error: %s specified, NSIS_SUPPORT_FNUTIL not defined.\n", line.gettoken_str(0)); return PS_ERROR; #endif case TOK_GETDLLVERSION: #ifdef NSIS_SUPPORT_GETDLLVERSION ent.which=EW_GETDLLVERSION; ent.offsets[0]=GetUserVarIndex(line, 2); ent.offsets[1]=GetUserVarIndex(line, 3); ent.offsets[2]=add_string(line.gettoken_str(1)); if (ent.offsets[0]<0 || ent.offsets[1]<0) PRINTHELP() SCRIPT_MSG("GetDLLVersion: %s->%s,%s\n", line.gettoken_str(1),line.gettoken_str(2),line.gettoken_str(3)); return add_entry(&ent); #else//!NSIS_SUPPORT_GETDLLVERSION ERROR_MSG("Error: %s specified, NSIS_SUPPORT_GETDLLVERSION not defined.\n", line.gettoken_str(0)); return PS_ERROR; #endif//!NSIS_SUPPORT_GETDLLVERSION case TOK_GETFILETIME: #ifdef NSIS_SUPPORT_GETFILETIME ent.which=EW_GETFILETIME; ent.offsets[0]=GetUserVarIndex(line, 2); ent.offsets[1]=GetUserVarIndex(line, 3); ent.offsets[2]=add_string(line.gettoken_str(1)); if (ent.offsets[0]<0 || ent.offsets[1]<0) PRINTHELP() SCRIPT_MSG("GetFileTime: %s->%s,%s\n", line.gettoken_str(1),line.gettoken_str(2),line.gettoken_str(3)); return add_entry(&ent); #else//!NSIS_SUPPORT_GETFILETIME ERROR_MSG("Error: %s specified, NSIS_SUPPORT_GETFILETIME not defined.\n", line.gettoken_str(0)); return PS_ERROR; #endif//!NSIS_SUPPORT_GETFILETIME #ifdef NSIS_SUPPORT_INTOPTS case TOK_INTOP: ent.which=EW_INTOP; ent.offsets[0]=GetUserVarIndex(line, 1); ent.offsets[3]=line.gettoken_enum(3,"+\0-\0*\0/\0|\0&\0^\0!\0||\0&&\0%\0<<\0>>\0~\0"); if (ent.offsets[0] < 0 || ent.offsets[3] < 0 || ((ent.offsets[3] == 7 || ent.offsets[3] == 13) && line.getnumtokens() > 4)) PRINTHELP() ent.offsets[1]=add_string(line.gettoken_str(2)); if (ent.offsets[3] != 7 && ent.offsets[3] != 13) ent.offsets[2]=add_string(line.gettoken_str(4)); if (ent.offsets[3] == 13) { ent.offsets[3]=6; ent.offsets[2]=add_string("0xFFFFFFFF"); } SCRIPT_MSG("IntOp: %s=%s%s%s\n",line.gettoken_str(1),line.gettoken_str(2),line.gettoken_str(3),line.gettoken_str(4)); return add_entry(&ent); case TOK_INTFMT: ent.which=EW_INTFMT; ent.offsets[0]=GetUserVarIndex(line, 1); if (ent.offsets[0]<0) PRINTHELP() ent.offsets[1]=add_string(line.gettoken_str(2)); ent.offsets[2]=add_string(line.gettoken_str(3)); SCRIPT_MSG("IntFmt: %s->%s (fmt:%s)\n",line.gettoken_str(3),line.gettoken_str(1),line.gettoken_str(2)); return add_entry(&ent); case TOK_INTCMP: case TOK_INTCMPU: ent.which=EW_INTCMP; ent.offsets[0]=add_string(line.gettoken_str(1)); ent.offsets[1]=add_string(line.gettoken_str(2)); ent.offsets[5]=which_token == TOK_INTCMPU; if (process_jump(line,3,&ent.offsets[2]) || process_jump(line,4,&ent.offsets[3]) || process_jump(line,5,&ent.offsets[4])) PRINTHELP() SCRIPT_MSG("%s %s:%s equal=%s, < %s, > %s\n",line.gettoken_str(0), line.gettoken_str(1),line.gettoken_str(2), line.gettoken_str(3),line.gettoken_str(4),line.gettoken_str(5)); return add_entry(&ent); #else//!NSIS_SUPPORT_INTOPTS case TOK_INTOP: case TOK_INTCMP: case TOK_INTFMT: case TOK_INTCMPU: ERROR_MSG("Error: %s specified, NSIS_SUPPORT_INTOPTS not defined.\n", line.gettoken_str(0)); return PS_ERROR; #endif//!NSIS_SUPPORT_INTOPTS #ifdef NSIS_SUPPORT_REGISTRYFUNCTIONS case TOK_READREGSTR: case TOK_READREGDWORD: { ent.which=EW_READREGSTR; ent.offsets[0]=GetUserVarIndex(line, 1); int k=line.gettoken_enum(2,rootkeys[0]); if (k == -1) k=line.gettoken_enum(2,rootkeys[1]); if (ent.offsets[0] == -1 || k == -1) PRINTHELP() ent.offsets[1]=(int)rootkey_tab[k]; ent.offsets[2]=add_string(line.gettoken_str(3)); ent.offsets[3]=add_string(line.gettoken_str(4)); if (which_token == TOK_READREGDWORD) ent.offsets[4]=1; else ent.offsets[4]=0; if (line.gettoken_str(3)[0] == '\\') warning_fl("%s: registry path name begins with \'\\\', may cause problems",line.gettoken_str(0)); SCRIPT_MSG("%s %s %s\\%s\\%s\n",line.gettoken_str(0), line.gettoken_str(1),line.gettoken_str(2),line.gettoken_str(3),line.gettoken_str(4)); } return add_entry(&ent); case TOK_DELETEREGVALUE: case TOK_DELETEREGKEY: { int a=1; if (which_token==TOK_DELETEREGKEY) { ent.offsets[4]=1; char *s=line.gettoken_str(a); if (s[0] == '/') { if (stricmp(s,"/ifempty")) PRINTHELP() a++; ent.offsets[4]=3; } if (line.gettoken_str(a+2)[0]) PRINTHELP() } int k=line.gettoken_enum(a,rootkeys[0]); if (k == -1) k=line.gettoken_enum(a,rootkeys[1]); if (k == -1) PRINTHELP() ent.which=EW_DELREG; ent.offsets[1]=(int)rootkey_tab[k]; ent.offsets[2]=add_string(line.gettoken_str(a+1)); ent.offsets[3]=(which_token==TOK_DELETEREGKEY)?0:add_string(line.gettoken_str(a+2)); if (line.gettoken_str(a+1)[0] == '\\') warning_fl("%s: registry path name begins with \'\\\', may cause problems",line.gettoken_str(0)); if (which_token==TOK_DELETEREGKEY) SCRIPT_MSG("DeleteRegKey: %s\\%s\n",line.gettoken_str(a),line.gettoken_str(a+1)); else SCRIPT_MSG("DeleteRegValue: %s\\%s\\%s\n",line.gettoken_str(a),line.gettoken_str(a+1),line.gettoken_str(a+2)); } return add_entry(&ent); case TOK_WRITEREGSTR: case TOK_WRITEREGEXPANDSTR: case TOK_WRITEREGBIN: case TOK_WRITEREGDWORD: { int k=line.gettoken_enum(1,rootkeys[0]); if (k == -1) k=line.gettoken_enum(1,rootkeys[1]); if (k == -1) PRINTHELP() ent.which=EW_WRITEREG; ent.offsets[0]=(int)rootkey_tab[k]; ent.offsets[1]=add_string(line.gettoken_str(2)); if (line.gettoken_str(2)[0] == '\\') warning_fl("%s: registry path name begins with \'\\\', may cause problems",line.gettoken_str(0)); ent.offsets[2]=add_string(line.gettoken_str(3)); if (which_token == TOK_WRITEREGSTR || which_token == TOK_WRITEREGEXPANDSTR) { SCRIPT_MSG("%s: %s\\%s\\%s=%s\n", line.gettoken_str(0),line.gettoken_str(1),line.gettoken_str(2),line.gettoken_str(3),line.gettoken_str(4)); ent.offsets[3]=add_string(line.gettoken_str(4)); ent.offsets[4]=ent.offsets[5]=REG_SZ; if (which_token == TOK_WRITEREGEXPANDSTR) { ent.offsets[5]=REG_EXPAND_SZ; } } if (which_token == TOK_WRITEREGBIN) { char data[3*NSIS_MAX_STRLEN]; char *p=line.gettoken_str(4); int data_len=0; while (*p) { int c; int a,b; a=*p; if (a >= '0' && a <= '9') a-='0'; else if (a >= 'a' && a <= 'f') a-='a'-10; else if (a >= 'A' && a <= 'F') a-='A'-10; else break; b=*++p; if (b >= '0' && b <= '9') b-='0'; else if (b >= 'a' && b <= 'f') b-='a'-10; else if (b >= 'A' && b <= 'F') b-='A'-10; else break; p++; c=(a<<4)|b; if (data_len >= 3*NSIS_MAX_STRLEN) { ERROR_MSG("WriteRegBin: %d bytes of data exceeded\n",3*NSIS_MAX_STRLEN); return PS_ERROR; } data[data_len++]=c; } if (*p) PRINTHELP() SCRIPT_MSG("WriteRegBin: %s\\%s\\%s=%s\n", line.gettoken_str(1),line.gettoken_str(2),line.gettoken_str(3),line.gettoken_str(4)); ent.offsets[3]=add_db_data(data,data_len); if (ent.offsets[3] < 0) return PS_ERROR; ent.offsets[4]=ent.offsets[5]=REG_BINARY; } if (which_token == TOK_WRITEREGDWORD) { ent.offsets[3]=add_string(line.gettoken_str(4)); ent.offsets[4]=ent.offsets[5]=REG_DWORD; SCRIPT_MSG("WriteRegDWORD: %s\\%s\\%s=%s\n", line.gettoken_str(1),line.gettoken_str(2),line.gettoken_str(3),line.gettoken_str(4)); } } return add_entry(&ent); case TOK_ENUMREGKEY: case TOK_ENUMREGVAL: { ent.which=EW_REGENUM; ent.offsets[0]=GetUserVarIndex(line, 1); int k=line.gettoken_enum(2,rootkeys[0]); if (k == -1) k=line.gettoken_enum(2,rootkeys[1]); if (ent.offsets[0] == -1 || k == -1) PRINTHELP() ent.offsets[1]=(int)rootkey_tab[k]; ent.offsets[2]=add_string(line.gettoken_str(3)); ent.offsets[3]=add_string(line.gettoken_str(4)); ent.offsets[4]=which_token == TOK_ENUMREGKEY; if (line.gettoken_str(3)[0] == '\\') warning_fl("%s: registry path name begins with \'\\\', may cause problems",line.gettoken_str(0)); SCRIPT_MSG("%s %s %s\\%s\\%s\n",which_token == TOK_ENUMREGKEY ? "EnumRegKey" : "EnumRegValue", line.gettoken_str(1),line.gettoken_str(2),line.gettoken_str(3),line.gettoken_str(4)); } return add_entry(&ent); #else//!NSIS_SUPPORT_REGISTRYFUNCTIONS case TOK_READREGSTR: case TOK_READREGDWORD: case TOK_DELETEREGVALUE: case TOK_DELETEREGKEY: case TOK_WRITEREGSTR: case TOK_WRITEREGEXPANDSTR: case TOK_WRITEREGBIN: case TOK_WRITEREGDWORD: case TOK_ENUMREGKEY: case TOK_ENUMREGVAL: ERROR_MSG("Error: %s specified, NSIS_SUPPORT_REGISTRYFUNCTIONS not defined.\n", line.gettoken_str(0)); return PS_ERROR; #endif//!NSIS_SUPPORT_REGISTRYFUNCTIONS #ifdef NSIS_SUPPORT_STACK case TOK_EXCH: { int swapitem=1; int save=GetUserVarIndex(line, 1); ent.which=EW_PUSHPOP; if (line.gettoken_str(1)[0] && save<0) { int s=0; swapitem=line.gettoken_int(1,&s); if (!s || swapitem <= 0) PRINTHELP() } if (save>=0) { SCRIPT_MSG("Exch(%s,0)\n",line.gettoken_str(1)); ent.offsets[0]=add_string(line.gettoken_str(1)); ent.offsets[1]=0; ent.offsets[2]=0; add_entry(&ent); } else SCRIPT_MSG("Exch(st(%d),0)\n",swapitem); ent.offsets[0]=0; ent.offsets[1]=0; ent.offsets[2]=swapitem; if (save>=0) { add_entry(&ent); ent.offsets[0]=save; ent.offsets[1]=1; ent.offsets[2]=0; } DefineInnerLangString(NLF_INST_CORRUPTED); } return add_entry(&ent); case TOK_PUSH: ent.which=EW_PUSHPOP; ent.offsets[0]=add_string(line.gettoken_str(1)); ent.offsets[1]=0; SCRIPT_MSG("Push: %s\n",line.gettoken_str(1)); return add_entry(&ent); case TOK_POP: ent.which=EW_PUSHPOP; ent.offsets[0]=GetUserVarIndex(line, 1); ent.offsets[1]=1; if (ent.offsets[0] < 0) PRINTHELP() SCRIPT_MSG("Pop: %s\n",line.gettoken_str(1)); return add_entry(&ent); #else//!NSIS_SUPPORT_STACK case TOK_POP: case TOK_PUSH: case TOK_EXCH: ERROR_MSG("Error: %s specified, NSIS_SUPPORT_STACK not defined.\n", line.gettoken_str(0)); return PS_ERROR; #endif//!NSIS_SUPPORT_STACK #ifdef NSIS_SUPPORT_ENVIRONMENT case TOK_READENVSTR: ent.which=EW_READENVSTR; ent.offsets[0]=GetUserVarIndex(line, 1); { ent.offsets[1]=add_string(line.gettoken_str(2)); if (ent.offsets[0] < 0 || strlen(line.gettoken_str(2))<1) PRINTHELP() } ent.offsets[2]=1; SCRIPT_MSG("ReadEnvStr: %s->%s\n",line.gettoken_str(2),line.gettoken_str(1)); return add_entry(&ent); case TOK_EXPANDENVSTRS: ent.which=EW_READENVSTR; ent.offsets[0]=GetUserVarIndex(line, 1); ent.offsets[1]=add_string(line.gettoken_str(2)); ent.offsets[2]=0; if (ent.offsets[0] < 0) PRINTHELP() SCRIPT_MSG("ExpandEnvStrings: %s->%s\n",line.gettoken_str(2),line.gettoken_str(1)); return add_entry(&ent); #else//!NSIS_SUPPORT_ENVIRONMENT case TOK_EXPANDENVSTRS: case TOK_READENVSTR: ERROR_MSG("Error: %s specified, NSIS_SUPPORT_ENVIRONMENT not defined.\n", line.gettoken_str(0)); return PS_ERROR; #endif//!NSIS_SUPPORT_ENVIRONMENT #ifdef NSIS_SUPPORT_FINDFIRST case TOK_FINDFIRST: ent.which=EW_FINDFIRST; ent.offsets[0]=GetUserVarIndex(line, 2); // out ent.offsets[1]=GetUserVarIndex(line, 1); // handleout ent.offsets[2]=add_string(line.gettoken_str(3)); // filespec if (ent.offsets[0] < 0 || ent.offsets[1] < 0) PRINTHELP() SCRIPT_MSG("FindFirst: spec=\"%s\" handle=%s output=%s\n",line.gettoken_str(3),line.gettoken_str(1),line.gettoken_str(2)); return add_entry(&ent); case TOK_FINDNEXT: ent.which=EW_FINDNEXT; ent.offsets[0]=GetUserVarIndex(line, 2); ent.offsets[1]=GetUserVarIndex(line, 1); if (ent.offsets[0] < 0 || ent.offsets[1] < 0) PRINTHELP() SCRIPT_MSG("FindNext: handle=%s output=%s\n",line.gettoken_str(1),line.gettoken_str(2)); return add_entry(&ent); case TOK_FINDCLOSE: ent.which=EW_FINDCLOSE; ent.offsets[0]=GetUserVarIndex(line, 1); if (ent.offsets[0] < 0) PRINTHELP() SCRIPT_MSG("FindClose: %s\n",line.gettoken_str(1)); return add_entry(&ent); #else//!NSIS_SUPPORT_FINDFIRST case TOK_FINDCLOSE: case TOK_FINDNEXT: case TOK_FINDFIRST: ERROR_MSG("Error: %s specified, NSIS_SUPPORT_FINDFIRST not defined.\n", line.gettoken_str(0)); return PS_ERROR; #endif//!NSIS_SUPPORT_FINDFIRST #ifdef NSIS_SUPPORT_FILEFUNCTIONS case TOK_FILEOPEN: { ent.which=EW_FOPEN; ent.offsets[0]=GetUserVarIndex(line, 1); // file handle ent.offsets[3]=add_string(line.gettoken_str(2)); ent.offsets[1]=0; //openmode if (!stricmp(line.gettoken_str(3),"r")) { ent.offsets[1]=GENERIC_READ; ent.offsets[2]=OPEN_EXISTING; } else if (!stricmp(line.gettoken_str(3),"w")) { ent.offsets[1]=GENERIC_WRITE; ent.offsets[2]=CREATE_ALWAYS; } else if (!stricmp(line.gettoken_str(3),"a")) { ent.offsets[1]=GENERIC_WRITE|GENERIC_READ; ent.offsets[2]=OPEN_ALWAYS; } if (ent.offsets[3] < 0 || !ent.offsets[1]) PRINTHELP() } SCRIPT_MSG("FileOpen: %s as %s -> %s\n",line.gettoken_str(2),line.gettoken_str(3),line.gettoken_str(1)); return add_entry(&ent); case TOK_FILECLOSE: ent.which=EW_FCLOSE; ent.offsets[0]=GetUserVarIndex(line, 1); // file handle if (ent.offsets[0] < 0) PRINTHELP() SCRIPT_MSG("FileClose: %s\n",line.gettoken_str(1)); return add_entry(&ent); case TOK_FILEREAD: ent.which=EW_FGETS; ent.offsets[0]=GetUserVarIndex(line, 1); // file handle ent.offsets[1]=GetUserVarIndex(line, 2); // output string ent.offsets[2]=add_string(line.gettoken_str(3)[0]?line.gettoken_str(3):"1023"); if (ent.offsets[0]<0 || ent.offsets[1]<0) PRINTHELP() SCRIPT_MSG("FileRead: %s->%s (max:%s)\n",line.gettoken_str(1),line.gettoken_str(2),line.gettoken_str(3)); return add_entry(&ent); case TOK_FILEWRITE: ent.which=EW_FPUTS; ent.offsets[0]=GetUserVarIndex(line, 1); // file handle ent.offsets[1]=add_string(line.gettoken_str(2)); if (ent.offsets[0]<0) PRINTHELP() SCRIPT_MSG("FileWrite: %s->%s\n",line.gettoken_str(2),line.gettoken_str(1)); return add_entry(&ent); case TOK_FILEREADBYTE: ent.which=EW_FGETS; ent.offsets[0]=GetUserVarIndex(line, 1); // file handle ent.offsets[1]=GetUserVarIndex(line, 2); // output string ent.offsets[2]=add_string("1"); ent.offsets[3]=1; if (ent.offsets[0]<0 || ent.offsets[1]<0) PRINTHELP() SCRIPT_MSG("FileReadByte: %s->%s\n",line.gettoken_str(1),line.gettoken_str(2)); return add_entry(&ent); case TOK_FILEWRITEBYTE: ent.which=EW_FPUTS; ent.offsets[0]=GetUserVarIndex(line, 1); // file handle ent.offsets[1]=add_string(line.gettoken_str(2)); ent.offsets[2]=1; if (ent.offsets[0]<0) PRINTHELP() SCRIPT_MSG("FileWriteByte: %s->%s\n",line.gettoken_str(2),line.gettoken_str(1)); return add_entry(&ent); case TOK_FILESEEK: { char *modestr; int tab[3]={FILE_BEGIN,FILE_CURRENT,FILE_END}; int mode=line.gettoken_enum(3,"SET\0CUR\0END\0"); ent.which=EW_FSEEK; ent.offsets[0]=GetUserVarIndex(line, 1); ent.offsets[1]=GetUserVarIndex(line, 4); ent.offsets[2]=add_string(line.gettoken_str(2)); if (mode<0 && !line.gettoken_str(3)[0]) { mode=0; modestr="SET"; } else modestr=line.gettoken_str(3); if (mode<0 || ent.offsets[0] < 0 || (ent.offsets[1]<0 && line.gettoken_str(4)[0])) PRINTHELP() ent.offsets[3]=tab[mode]; SCRIPT_MSG("FileSeek: fp=%s, ofs=%s, mode=%s, output=%s\n", line.gettoken_str(1), line.gettoken_str(2), modestr, line.gettoken_str(4)); } return add_entry(&ent); #else//!NSIS_SUPPORT_FILEFUNCTIONS case TOK_FILEOPEN: case TOK_FILECLOSE: case TOK_FILESEEK: case TOK_FILEREAD: case TOK_FILEWRITE: case TOK_FILEREADBYTE: case TOK_FILEWRITEBYTE: ERROR_MSG("Error: %s specified, NSIS_SUPPORT_FILEFUNCTIONS not defined.\n", line.gettoken_str(0)); return PS_ERROR; #endif//!NSIS_SUPPORT_FILEFUNCTIONS #ifdef NSIS_SUPPORT_REBOOT case TOK_REBOOT: { int ret = add_entry_direct(EW_REBOOT, 0xbadf00d); if (ret != PS_OK) return ret; ret = add_entry_direct(EW_QUIT); if (ret != PS_OK) return ret; SCRIPT_MSG("Reboot! (WOW)\n"); DefineInnerLangString(NLF_INST_CORRUPTED); } return PS_OK; case TOK_IFREBOOTFLAG: ent.which=EW_IFFLAG; if (process_jump(line,1,&ent.offsets[0]) || process_jump(line,2,&ent.offsets[1])) PRINTHELP() ent.offsets[2]=FLAG_OFFSET(exec_reboot); ent.offsets[3]=~0;//new value mask - keep flag SCRIPT_MSG("IfRebootFlag ?%s:%s\n",line.gettoken_str(1),line.gettoken_str(2)); return add_entry(&ent); case TOK_SETREBOOTFLAG: { ent.which=EW_SETFLAG; ent.offsets[0]=FLAG_OFFSET(exec_reboot); int k=line.gettoken_enum(1,"false\0true\0"); if (k < 0) PRINTHELP() ent.offsets[1]=add_intstring(k); } return add_entry(&ent); #else//!NSIS_SUPPORT_REBOOT case TOK_REBOOT: case TOK_IFREBOOTFLAG: case TOK_SETREBOOTFLAG: ERROR_MSG("Error: %s specified, NSIS_SUPPORT_REBOOT not defined.\n", line.gettoken_str(0)); return PS_ERROR; #endif//!NSIS_SUPPORT_REBOOT #ifdef NSIS_CONFIG_LOG case TOK_LOGSET: ent.which=EW_LOG; ent.offsets[0]=1; ent.offsets[1]=line.gettoken_enum(1,"off\0on\0"); if (ent.offsets[1]<0) PRINTHELP() SCRIPT_MSG("LogSet: %s\n",line.gettoken_str(1)); return add_entry(&ent); case TOK_LOGTEXT: ent.which=EW_LOG; ent.offsets[0]=0; ent.offsets[1]=add_string(line.gettoken_str(1)); SCRIPT_MSG("LogText \"%s\"\n",line.gettoken_str(1)); return add_entry(&ent); #else//!NSIS_CONFIG_LOG case TOK_LOGSET: case TOK_LOGTEXT: ERROR_MSG("Error: %s specified, NSIS_CONFIG_LOG not defined.\n", line.gettoken_str(0)); return PS_ERROR; #endif//!NSIS_CONFIG_LOG #ifdef NSIS_CONFIG_COMPONENTPAGE case TOK_SECTIONSETTEXT: ent.which=EW_SECTIONSET; ent.offsets[0]=add_string(line.gettoken_str(1)); ent.offsets[1]=add_string(line.gettoken_str(2)); ent.offsets[2]=SECTION_FIELD_SET(name_ptr); SCRIPT_MSG("SectionSetText: %s->%s\n",line.gettoken_str(1),line.gettoken_str(2)); return add_entry(&ent); case TOK_SECTIONGETTEXT: ent.which=EW_SECTIONSET; ent.offsets[0]=add_string(line.gettoken_str(1)); ent.offsets[1]=GetUserVarIndex(line, 2); ent.offsets[2]=SECTION_FIELD_GET(name_ptr); if (line.gettoken_str(2)[0] && ent.offsets[1]<0) PRINTHELP() SCRIPT_MSG("SectionGetText: %s->%s\n",line.gettoken_str(1),line.gettoken_str(2)); return add_entry(&ent); case TOK_SECTIONSETFLAGS: ent.which=EW_SECTIONSET; ent.offsets[0]=add_string(line.gettoken_str(1)); ent.offsets[1]=add_string(line.gettoken_str(2)); ent.offsets[2]=SECTION_FIELD_SET(flags); SCRIPT_MSG("SectionSetFlags: %s->%s\n",line.gettoken_str(1),line.gettoken_str(2)); return add_entry(&ent); case TOK_SECTIONGETFLAGS: ent.which=EW_SECTIONSET; ent.offsets[0]=add_string(line.gettoken_str(1)); ent.offsets[1]=GetUserVarIndex(line, 2); ent.offsets[2]=SECTION_FIELD_GET(flags); if (line.gettoken_str(2)[0] && ent.offsets[1]<0) PRINTHELP() SCRIPT_MSG("SectionGetFlags: %s->%s\n",line.gettoken_str(1),line.gettoken_str(2)); return add_entry(&ent); case TOK_INSTTYPESETTEXT: ent.which=EW_INSTTYPESET; ent.offsets[0]=add_string(line.gettoken_str(1)); ent.offsets[1]=add_string(line.gettoken_str(2)); ent.offsets[2]=1; SCRIPT_MSG("InstTypeSetText: %s->%s\n",line.gettoken_str(1),line.gettoken_str(2)); return add_entry(&ent); case TOK_INSTTYPEGETTEXT: ent.which=EW_INSTTYPESET; ent.offsets[0]=add_string(line.gettoken_str(1)); ent.offsets[1]=GetUserVarIndex(line, 2); ent.offsets[2]=0; if (line.gettoken_str(1)[0] && ent.offsets[1]<0) PRINTHELP() SCRIPT_MSG("InstTypeGetText: %s->%s\n",line.gettoken_str(1),line.gettoken_str(2)); return add_entry(&ent); case TOK_SECTIONSETINSTTYPES: ent.which=EW_SECTIONSET; ent.offsets[0]=add_string(line.gettoken_str(1)); ent.offsets[1]=add_string(line.gettoken_str(2)); ent.offsets[2]=SECTION_FIELD_SET(install_types); SCRIPT_MSG("SectionSetInstTypes: %s->%s\n",line.gettoken_str(1),line.gettoken_str(2)); return add_entry(&ent); case TOK_SECTIONGETINSTTYPES: ent.which=EW_SECTIONSET; ent.offsets[0]=add_string(line.gettoken_str(1)); ent.offsets[1]=GetUserVarIndex(line, 2); ent.offsets[2]=SECTION_FIELD_GET(install_types); if (line.gettoken_str(2)[0] && ent.offsets[1]<0) PRINTHELP() SCRIPT_MSG("SectionGetInstTypes: %s->%s\n",line.gettoken_str(1),line.gettoken_str(2)); return add_entry(&ent); case TOK_SECTIONSETSIZE: ent.which=EW_SECTIONSET; ent.offsets[0]=add_string(line.gettoken_str(1)); ent.offsets[1]=add_string(line.gettoken_str(2)); ent.offsets[2]=SECTION_FIELD_SET(size_kb); SCRIPT_MSG("SectionSetSize: %s->%s\n",line.gettoken_str(1),line.gettoken_str(2)); return add_entry(&ent); case TOK_SECTIONGETSIZE: ent.which=EW_SECTIONSET; ent.offsets[0]=add_string(line.gettoken_str(1)); ent.offsets[1]=GetUserVarIndex(line, 2); ent.offsets[2]=SECTION_FIELD_GET(size_kb); if (line.gettoken_str(2)[0] && ent.offsets[1]<0) PRINTHELP() SCRIPT_MSG("SectionGetSize: %s->%s\n",line.gettoken_str(1),line.gettoken_str(2)); return add_entry(&ent); case TOK_SETCURINSTTYPE: { int ret; SCRIPT_MSG("SetCurInstType: %s\n",line.gettoken_str(1)); ret = add_entry_direct(EW_SETFLAG, FLAG_OFFSET(cur_insttype), add_string(line.gettoken_str(1))); if (ret != PS_OK) return ret; ret = add_entry_direct(EW_INSTTYPESET, 0, 0, 0, 1); if (ret != PS_OK) return ret; } return PS_OK; case TOK_GETCURINSTTYPE: ent.which=EW_GETFLAG; ent.offsets[0]=GetUserVarIndex(line, 1); ent.offsets[1]=FLAG_OFFSET(cur_insttype); if (line.gettoken_str(1)[0] && ent.offsets[0]<0) PRINTHELP() SCRIPT_MSG("GetCurInstType: %s\n",line.gettoken_str(1)); return add_entry(&ent); #else//!NSIS_CONFIG_COMPONENTPAGE case TOK_SECTIONSETTEXT: case TOK_SECTIONGETTEXT: case TOK_SECTIONSETFLAGS: case TOK_SECTIONGETFLAGS: case TOK_SECTIONSETSIZE: case TOK_SECTIONGETSIZE: case TOK_SECTIONSETINSTTYPES: case TOK_SECTIONGETINSTTYPES: case TOK_SETCURINSTTYPE: case TOK_GETCURINSTTYPE: ERROR_MSG("Error: %s specified, NSIS_CONFIG_COMPONENTPAGE not defined.\n", line.gettoken_str(0)); return PS_ERROR; #endif//!NSIS_CONFIG_COMPONENTPAGE // Added by Amir Szekely 29th July 2002 #ifdef NSIS_CONFIG_ENHANCEDUI_SUPPORT case TOK_SETBRANDINGIMAGE: { SCRIPT_MSG("SetBrandingImage: "); if (!branding_image_found) { ERROR_MSG("\nError: no branding image found in chosen UI!\n"); return PS_ERROR; } ent.which=EW_SETBRANDINGIMAGE; for (int i = 1; i < line.getnumtokens(); i++) if (!strnicmp(line.gettoken_str(i),"/IMGID=",7)) { ent.offsets[1]=atoi(line.gettoken_str(i)+7); SCRIPT_MSG("/IMGID=%d ",ent.offsets[1]); } else if (!stricmp(line.gettoken_str(i),"/RESIZETOFIT")) { ent.offsets[2]=1; // must be 1 or 0 SCRIPT_MSG("/RESIZETOFIT "); } else if (!ent.offsets[0]) { ent.offsets[0]=add_string(line.gettoken_str(i)); SCRIPT_MSG("\"%s\" ", line.gettoken_str(i)); } else { SCRIPT_MSG("\n"); PRINTHELP(); } if (!ent.offsets[1]) ent.offsets[1]=branding_image_id; SCRIPT_MSG("\n"); } return add_entry(&ent); #else//NSIS_CONFIG_ENHANCEDUI_SUPPORT case TOK_SETBRANDINGIMAGE: ERROR_MSG("Error: %s specified, NSIS_CONFIG_ENHANCEDUI_SUPPORT not defined.\n",line.gettoken_str(0)); return PS_ERROR; #endif//!NSIS_SUPPORT_CREATEFONT // Added by ramon 3 jun 2003 case TOK_DEFVAR: { SCRIPT_MSG("VAR \"%s\"\n",line.gettoken_str(1)); int res = DeclaredUserVar(line.gettoken_str(1)); if (res != PS_OK) return res; } return PS_OK; // Added by ramon 6 jun 2003 #ifdef NSIS_SUPPORT_VERSION_INFO case TOK_VI_ADDKEY: { LANGID LangID=0; int a = 1; if (!strnicmp(line.gettoken_str(a),"/LANG=",6)) LangID=atoi(line.gettoken_str(a++)+6); if (line.getnumtokens()!=a+2) PRINTHELP(); char *pKey = line.gettoken_str(a); char *pValue = line.gettoken_str(a+1); if ( !(*pKey) ) { ERROR_MSG("Error: empty name for version info key!\n"); return PS_ERROR; } else { SCRIPT_MSG("%s: \"%s\" \"%s\"\n", line.gettoken_str(0), line.gettoken_str(a), line.gettoken_str(a+1)); LANGID lReaded = LangID; LanguageTable *table = GetLangTable(LangID); if ( a > 1 && lReaded == 0 ) warning_fl("%s: %s language not loaded, using default \"1033-English\"", line.gettoken_str(0), line.gettoken_str(1)); if ( rVersionInfo.SetKeyValue(LangID, table->nlf.m_bLoaded ? table->nlf.m_uCodePage : 1252 /*English US*/, pKey, pValue) ) { ERROR_MSG("%s: \"%s\" \"%04d-%s\" already defined!\n",line.gettoken_str(0), line.gettoken_str(2), LangID, table->nlf.m_bLoaded ? table->nlf.m_szName : LangID == 1033 ? "English" : "???"); return PS_ERROR; } return PS_OK; } } case TOK_VI_SETPRODUCTVERSION: if ( version_product_v[0] ) { ERROR_MSG("Error: %s already defined!\n", line.gettoken_str(0)); return PS_ERROR; } strcpy(version_product_v, line.gettoken_str(1)); return PS_OK; #else case TOK_VI_ADDKEY: case TOK_VI_SETPRODUCTVERSION: ERROR_MSG("Error: %s specified, NSIS_SUPPORT_VERSION_INFO not defined.\n",line.gettoken_str(0)); return PS_ERROR; #endif // end of instructions /////////////////////////////////////////////////////////////////////////////// // Added by Ximon Eighteen 5th August 2002 #ifdef NSIS_CONFIG_PLUGIN_SUPPORT case TOK_PLUGINDIR: { if (line.getnumtokens() == 2) { SCRIPT_MSG("PluginDir: \"%s\"\n",line.gettoken_str(1)); #ifdef _WIN32 m_plugins.FindCommands(line.gettoken_str(1),display_info?true:false); #else char *converted_path = my_convert(line.gettoken_str(1)); m_plugins.FindCommands(converted_path,display_info?true:false); my_convert_free(converted_path); #endif return PS_OK; } } return PS_ERROR; case TOK__PLUGINCOMMAND: { int ret, data_handle; char* command = strdup(line.gettoken_str(0)); assert(command != 0); MANAGE_WITH(command, free); char* dllPath = m_plugins.GetPluginDll(uninstall_mode, &command, &data_handle); if (dllPath) { if (uninstall_mode) uninst_plugin_used = true; else plugin_used = true; // Initialize $PLUGINSDIR ent.which=EW_CALL; ent.offsets[0]=ns_func.add(uninstall_mode?"un.Initialize_____Plugins":"Initialize_____Plugins",0); ret=add_entry(&ent); if (ret != PS_OK) { return ret; } // DLL name on the user machine char tempDLL[NSIS_MAX_STRLEN]; char *dllName = strrchr(dllPath,PLATFORM_PATH_SEPARATOR_C); if (dllName && *dllName == PLATFORM_PATH_SEPARATOR_C) dllName++; wsprintf(tempDLL, "$PLUGINSDIR%c%s", PATH_SEPARATOR_C, dllName); // Add the DLL to the installer if (data_handle == -1) { int files_added; // BEGIN - Added by ramon 23 May 2003 int old_build_allowskipfiles=build_allowskipfiles; build_allowskipfiles=1; // on // END - Added by ramon 23 May 2003 int old_build_overwrite=build_overwrite; build_overwrite=1; // off int old_build_datesave=build_datesave; build_datesave=0; // off ret=do_add_file(dllPath,0,0,&files_added,tempDLL,2,&data_handle); // 2 means no size add if (ret != PS_OK) { return ret; } m_plugins.SetDllDataHandle(uninstall_mode, line.gettoken_str(0),data_handle); build_overwrite=old_build_overwrite; build_datesave=old_build_datesave; // Added by ramon 23 May 2003 build_allowskipfiles=old_build_allowskipfiles; } else { ent.which=EW_EXTRACTFILE; DefineInnerLangString(NLF_SKIPPED); DefineInnerLangString(NLF_ERR_DECOMPRESSING); DefineInnerLangString(NLF_ERR_WRITING); DefineInnerLangString(NLF_EXTRACT); DefineInnerLangString(NLF_CANT_WRITE); ent.offsets[0]=1; // overwrite off ent.offsets[0]|=(MB_RETRYCANCEL|MB_ICONSTOP|(IDCANCEL<<20))<<3; ent.offsets[1]=add_string(tempDLL); ent.offsets[2]=data_handle; ent.offsets[3]=0xffffffff; ent.offsets[4]=0xffffffff; ent.offsets[5]=DefineInnerLangString(NLF_FILE_ERROR); ret=add_entry(&ent); if (ret != PS_OK) { return ret; } } // SetDetailsPrint lastused ent.which=EW_UPDATETEXT; ent.offsets[0]=0; ent.offsets[1]=8; // lastused ent.offsets[2]=0; ret=add_entry(&ent); if (ret != PS_OK) { return ret; } // Call the DLL char* funcname = strstr(command,"::"); if (funcname) funcname += 2; else funcname = command; SCRIPT_MSG("Plugin Command: %s",funcname); int i = 1; int nounload = 0; if (!strcmpi(line.gettoken_str(i), "/NOUNLOAD")) { i++; nounload++; } // First push dll args int parmst=i; // we push em in reverse order int nounloadmisused=0; for (; i < line.getnumtokens(); i++) { int w=parmst + (line.getnumtokens()-i - 1); ent.which=EW_PUSHPOP; ent.offsets[0]=add_string(line.gettoken_str(w)); if (!strcmpi(line.gettoken_str(w), "/NOUNLOAD")) nounloadmisused=1; ent.offsets[1]=0; ret=add_entry(&ent); if (ret != PS_OK) { return ret; } SCRIPT_MSG(" %s",line.gettoken_str(i)); } SCRIPT_MSG("\n"); if (nounloadmisused) warning_fl("/NOUNLOAD must come first before any plugin parameter. Unless the plugin you are trying to use has a parameter /NOUNLOAD, you are doing something wrong"); // next, call it ent.which=EW_REGISTERDLL; ent.offsets[0]=add_string(tempDLL);; ent.offsets[1]=add_string(funcname); ent.offsets[2]=0; ent.offsets[3]=nounload|build_plugin_unload; ent.offsets[4]=1; ret=add_entry(&ent); if (ret != PS_OK) { return ret; } return PS_OK; } else ERROR_MSG("Error: Plugin dll for command \"%s\" not found.\n",line.gettoken_str(0)); } return PS_ERROR; case TOK_INITPLUGINSDIR: { int ret; SCRIPT_MSG("%s\n",line.gettoken_str(0)); if (uninstall_mode) uninst_plugin_used = true; else plugin_used = true; // Call [un.]Initialize_____Plugins ent.which=EW_CALL; ent.offsets[0]=ns_func.add(uninstall_mode?"un.Initialize_____Plugins":"Initialize_____Plugins",0); ret=add_entry(&ent); if (ret != PS_OK) return ret; // SetDetailsPrint lastused ent.which=EW_UPDATETEXT; ent.offsets[0]=0; ent.offsets[1]=8; // lastused ret=add_entry(&ent); if (ret != PS_OK) return ret; } return PS_OK; #else case TOK_PLUGINDIR: case TOK__PLUGINCOMMAND: case TOK_INITPLUGINSDIR: { ERROR_MSG("Error: %s specified, NSIS_CONFIG_PLUGIN_SUPPORT not defined.\n",line.gettoken_str(0)); } return PS_ERROR; #endif// NSIS_CONFIG_PLUGIN_SUPPORT #ifdef NSIS_LOCKWINDOW_SUPPORT case TOK_LOCKWINDOW: SCRIPT_MSG("LockWindow: lock state=%d\n",line.gettoken_str(1)); ent.which=EW_LOCKWINDOW; ent.offsets[0]=line.gettoken_enum(1,"on\0off\0"); if (ent.offsets[0] == -1) PRINTHELP(); return add_entry(&ent); #else case TOK_LOCKWINDOW: { ERROR_MSG("Error: %s specified, NSIS_LOCKWINDOW_SUPPORT not defined.\n",line.gettoken_str(0)); } return PS_ERROR; #endif // NSIS_LOCKWINDOW_SUPPORT default: break; } ERROR_MSG("Error: doCommand: Invalid token \"%s\".\n",line.gettoken_str(0)); return PS_ERROR; } #ifdef NSIS_SUPPORT_FILE int CEXEBuild::do_add_file(const char *lgss, int attrib, int recurse, int *total_files, const char *name_override, int generatecode, int *data_handle, const set<string>& excluded, const string& basedir) { assert(!name_override || !recurse); string dir = get_dir_name(lgss); string spec; if (dir == lgss) { dir = "."; spec = lgss; } else { spec = string(lgss).substr(dir.length() + 1, string::npos); } if (spec == "") { spec = "*"; } dir_reader *dr = new_dir_reader(); dr->exclude(excluded); dr->read(dir); dir_reader::iterator files_itr = dr->files().begin(); dir_reader::iterator files_end = dr->files().end(); bool dir_created = false; if (basedir == "") { dir_created = true; if (recurse) { // save $OUTDIR into $0 if (add_entry_direct(EW_ASSIGNVAR, m_UserVarNames.get("0"), add_string("$OUTDIR")) != PS_OK) { delete dr; return PS_ERROR; } } } for (; files_itr != files_end; files_itr++) { if (!dir_reader::matches(*files_itr, spec)) continue; if (!dir_created && generatecode) { SCRIPT_MSG("%sFile: Descending to: \"%s\"\n", generatecode? "" : "Reserve", dir.c_str()); if (do_add_file_create_dir(dir, basedir, attrib) != PS_OK) { delete dr; return PS_ERROR; } dir_created = true; } if (add_file(dir, *files_itr, attrib, name_override, generatecode, data_handle) != PS_OK) { delete dr; return PS_ERROR; } (*total_files)++; } if (recurse) { dir_reader::iterator dirs_itr = dr->dirs().begin(); dir_reader::iterator dirs_end = dr->dirs().end(); for (; dirs_itr != dirs_end; dirs_itr++) { string new_dir; if (basedir == "") { new_dir = *dirs_itr; } else { new_dir = basedir + PLATFORM_PATH_SEPARATOR_STR + *dirs_itr; } string new_spec = dir + PLATFORM_PATH_SEPARATOR_STR + *dirs_itr + PLATFORM_PATH_SEPARATOR_STR; if (!dir_reader::matches(*dirs_itr, spec)) { new_spec += spec; } const char *new_spec_c = new_spec.c_str(); if (do_add_file(new_spec_c, attrib, 1, total_files, NULL, generatecode, NULL, excluded, new_dir) != PS_OK) { delete dr; return PS_ERROR; } } if (basedir == "") { SCRIPT_MSG("%sFile: Returning to: \"%s\"\n", generatecode ? "" : "Reserve", dir.c_str()); // restore $OUTDIR from $0 if (do_add_file_create_dir(dir, basedir) != PS_OK) { delete dr; return PS_ERROR; } } } delete dr; return PS_OK; } int CEXEBuild::add_file(const string& dir, const string& file, int attrib, const char *name_override, int generatecode, int *data_handle) { string newfn_s = dir + PLATFORM_PATH_SEPARATOR_C + file; const char *newfn = newfn_s.c_str(); const char *filename = file.c_str(); MMapFile mmap; DWORD len; #ifdef _WIN32 HANDLE hFile = CreateFile( newfn, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_SEQUENTIAL_SCAN, NULL ); if (hFile == INVALID_HANDLE_VALUE) { ERROR_MSG("%sFile: failed opening file \"%s\"\n",generatecode?"":"Reserve",newfn); return PS_ERROR; } // Will auto-CloseHandle hFile MANAGE_WITH(hFile, CloseHandle); len = GetFileSize(hFile, NULL); if (len && !mmap.setfile(hFile, len)) { ERROR_MSG("%sFile: failed creating mmap of \"%s\"\n",generatecode?"":"Reserve",newfn); return PS_ERROR; } #else struct stat s; if (stat(newfn, &s)) { ERROR_MSG("%sFile: failed stating file \"%s\"\n",generatecode?"":"Reserve",newfn); return PS_ERROR; } len = (DWORD) s.st_size; int fd = OPEN(newfn, O_RDONLY); if (fd == -1) { ERROR_MSG("%sFile: failed opening file \"%s\"\n",generatecode?"":"Reserve",newfn); return PS_ERROR; } // Will auto-close(2) fd MANAGE_WITH(fd, close); if (len && !mmap.setfile(fd, len)) { ERROR_MSG("%sFile: failed creating mmap of \"%s\"\n",generatecode?"":"Reserve",newfn); return PS_ERROR; } #endif if (generatecode&1) section_add_size_kb((len+1023)/1024); if (name_override) SCRIPT_MSG("%sFile: \"%s\"->\"%s\"",generatecode?"":"Reserve",filename,name_override); else SCRIPT_MSG("%sFile: \"%s\"",generatecode?"":"Reserve",filename); if (!build_compress_whole) if (build_compress) SCRIPT_MSG(" [compress]"); fflush(stdout); char buf[1024]; int last_build_datablock_used=getcurdbsize(); entry ent={0,}; if (generatecode) { ent.which=EW_EXTRACTFILE; DefineInnerLangString(NLF_SKIPPED); DefineInnerLangString(NLF_ERR_DECOMPRESSING); DefineInnerLangString(NLF_ERR_WRITING); DefineInnerLangString(NLF_EXTRACT); DefineInnerLangString(NLF_CANT_WRITE); ent.offsets[0]=build_overwrite; if (name_override) { ent.offsets[1]=add_string(name_override); } else { const char *i=filename; char *o=buf; while (*i) { const char c=*i++; *o++=c; if (c == '$') *o++='$'; } *o=0; ent.offsets[1]=add_string(buf); } } ent.offsets[2]=add_db_data(&mmap); mmap.clear(); if (ent.offsets[2] < 0) { return PS_ERROR; } if (data_handle) { *data_handle=ent.offsets[2]; } { DWORD s=getcurdbsize()-last_build_datablock_used; if (s) s-=4; if (s != len) SCRIPT_MSG(" %d/%d bytes\n",s,len); else SCRIPT_MSG(" %d bytes\n",len); } if (generatecode) { if (build_datesave || build_overwrite>=0x3 /*ifnewer or ifdiff*/) { #ifdef _WIN32 FILETIME ft; if (GetFileTime(hFile,NULL,NULL,&ft)) { ent.offsets[3]=ft.dwLowDateTime; ent.offsets[4]=ft.dwHighDateTime; } #else struct stat st; if (!fstat(fd, &st)) { union { struct { long l; long h; } words; long long ll; }; ll = (st.st_mtime * 10000000LL) + 116444736000000000LL; ent.offsets[3] = words.l; ent.offsets[4] = words.h; } #endif else { ERROR_MSG("%sFile: failed getting file date from \"%s\"\n",generatecode?"":"Reserve",newfn); return PS_ERROR; } } else { ent.offsets[3]=0xffffffff; ent.offsets[4]=0xffffffff; } // overwrite flag can be 0, 1, 2 or 3. in all cases, 2 bits int mb = 0; if (build_allowskipfiles) { mb = MB_ABORTRETRYIGNORE | MB_ICONSTOP; // default for silent installers mb |= IDIGNORE << 20; } else { mb = MB_RETRYCANCEL | MB_ICONSTOP; // default for silent installers mb |= IDCANCEL << 20; } ent.offsets[0] |= mb << 3; ent.offsets[5] = DefineInnerLangString(build_allowskipfiles ? NLF_FILE_ERROR : NLF_FILE_ERROR_NOIGNORE); } if (generatecode) { int a=add_entry(&ent); if (a != PS_OK) { return a; } if (attrib) { #ifdef _WIN32 ent.which=EW_SETFILEATTRIBUTES; // $OUTDIR is the working directory ent.offsets[0]=add_string(name_override?name_override:buf); ent.offsets[1]=GetFileAttributes(newfn); ent.offsets[2]=0; ent.offsets[3]=0; ent.offsets[4]=0; ent.offsets[5]=0; a=add_entry(&ent); if (a != PS_OK) { return a; } #endif } } return PS_OK; } int CEXEBuild::do_add_file_create_dir(const string& local_dir, const string& dir, int attrib) { string outdir_s = "$0\\" + dir; string::size_type pos = 1; pos = outdir_s.find('$', pos); while (pos != string::npos) { outdir_s = outdir_s.insert(pos, "$"); pos = outdir_s.find('$', pos + 2); } int outdir = add_string(outdir_s.c_str()); if (add_entry_direct(EW_CREATEDIR, outdir, 1) != PS_OK) { return PS_ERROR; } #ifdef _WIN32 if (attrib) { int ndc = add_string("."); DWORD attr = GetFileAttributes(local_dir.c_str()); if (add_entry_direct(EW_SETFILEATTRIBUTES, ndc, attr) != PS_OK) { return PS_ERROR; } } #endif return PS_OK; } #endif
[ "(no author)@212acab6-be3b-0410-9dea-997c60f758d6" ]
(no author)@212acab6-be3b-0410-9dea-997c60f758d6
c59f80ae0149766dafeb640a6765b6e40bdf1e0f
39bad116e64e588d7243eb4d0ffdff3d6658bd23
/eggdroplin.cpp
e3bfb1c1e58e4783333aaafc919f73b38ea62c69
[]
no_license
piyushdubey-pd/dp_temp
f3f063e37f86e6ae6e1e403ff6f199e0486a2dc1
cf691aa0993f0cbb6f8dfa4dae3dae21a04ddefb
refs/heads/master
2023-08-15T13:41:59.613723
2021-10-02T16:12:16
2021-10-02T16:12:16
330,150,021
0
0
null
null
null
null
UTF-8
C++
false
false
1,265
cpp
// { Driver Code Starts #include<bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: //Function to find minimum number of attempts needed in //order to find the critical floor. int dp[201][201]; int egg(int n, int k) { if(n==1 || k<=1) return k; if(dp[n][k]!=-1) return dp[n][k]; int ans=INT_MAX; for(int i=1;i<=k;i++){ int left,right; if(dp[n-1][i-1]!=-1) left=dp[n-1][i-1]; else left=dp[n-1][i-1]=eggDrop(n-1,i-1); if(dp[n][k-i]!=-1) right=dp[n][k-i]; else right=dp[n-1][k-i]=eggDrop(n,k-i); int temp=1+max(left,right); ans=min(ans,temp); } return dp[n][k]=ans; } int eggDrop(int n, int k){ memset(dp,-1,sizeof(dp)); return egg(n,k); } }; // { Driver Code Starts. int main() { //taking total testcases int t; cin>>t; while(t--) { //taking eggs and floors count int n, k; cin>>n>>k; Solution ob; //calling function eggDrop() cout<<ob.eggDrop(n, k)<<endl; } return 0; } // } Driver Code Ends
[ "piyushdubey72090@gmail.com" ]
piyushdubey72090@gmail.com
307d64a77deacddfcc9ad8f5df362a25aa00970d
c89fc569241ea9598d6fd009db484074fc466ee4
/src/chart/main/stylesheet.cpp
922be929f8ca3d070348a159a3998da29d1bff26
[ "Apache-2.0", "LicenseRef-scancode-free-unknown" ]
permissive
namica/vizzu-lib
abcfc05eecd9bf95d0e90bab832a3371eecf0cc0
4d9473147ff0082e811234ad4c17c95e2eb0bdd7
refs/heads/main
2023-08-28T12:07:30.170977
2021-10-24T11:59:03
2021-10-24T11:59:03
418,309,880
0
0
Apache-2.0
2021-10-18T02:00:55
2021-10-18T02:00:55
null
UTF-8
C++
false
false
4,204
cpp
#include "stylesheet.h" #include <cmath> #include "base/io/log.h" using namespace Vizzu; using namespace Vizzu::Styles; Chart Sheet::getFullParams( const Diag::DiagramOptionsPtr &options, const Geom::Size &size) { this->options = options.get(); calcDefaults(size); return Base::getFullParams(); } void Sheet::calcDefaults(const Geom::Size &size) { defaultParams = Chart::def(); defaultParams.fontSize = baseFontSize(size, true); setPlot(); setAxis(); setMarkers(); setData(); } double Sheet::nominalSize(const Geom::Size &size) { // empirical formula return pow(fabs(size.x), 0.25)*pow(fabs(size.y), 0.75); } double Sheet::baseFontSize(const Geom::Size &size, bool rounded) { // approximated with proportional rate growth exponential function // using empirical values auto Y0 = 2; auto V0 = -0.031; auto K = 0.002; auto x = nominalSize(size); auto fontSize = Y0 - (V0/K) * (1-exp(-K * x)); if (!rounded) return fontSize; return fontSize >= 10 ? round(fontSize) : 0.5 * ceil(fontSize * 2.0); } void Sheet::setPlot() { if ((bool)options->polar.get()) { defaultParams.plot.paddingLeft = 0; } else if (!options->getScales().anyAxisSet()) { defaultParams.plot.paddingLeft = Gfx::Length::Emphemeral(40.0/12.0); } else if (options->getVeritalAxis().isPseudoDiscrete()) { defaultParams.plot.paddingLeft = Gfx::Length::Emphemeral(80.0/12.0); } else { defaultParams.plot.paddingLeft = Gfx::Length::Emphemeral(50.0/12.0); } } void Sheet::setAxis() { setAxisLabels(); setAxisTitle(); } void Sheet::setAxisLabels() { if (options->polar.get()) { auto &def = defaultParams.plot.xAxis.label; def.position = AxisLabel::Position::max_edge; def.side = AxisLabel::Side::positive; } } void Sheet::setAxisTitle() { if (options->polar.get()) { auto &def = defaultParams.plot.xAxis.title; def.position = AxisTitle::Position::max_edge; def.side = AxisTitle::Side::negative; def.paddingTop = Gfx::Length::Emphemeral(25.0/14.0); defaultParams.plot.yAxis.title.paddingBottom = Gfx::Length::Emphemeral(25.0/14.0); } } void Sheet::setMarkers() { setMarkerLabels(); if (!options->getScales().anyAxisSet()) { defaultParams.plot.marker.borderWidth = 0.5; defaultParams.plot.marker.borderOpacity = 0.7; } if (options->getScales().anyAxisSet() && options->shapeType.get() == Diag::ShapeType::Type::Circle && !options->getScales().at(Diag::ScaleId::size).isPseudoDiscrete() && ( !options->mainAxis().isPseudoDiscrete() || !options->subAxis().isPseudoDiscrete() )) { defaultParams.plot.marker.borderWidth = 1; defaultParams.plot.marker.fillOpacity = 0.8; } if (options->getScales().anyAxisSet() && options->shapeType.get() == Diag::ShapeType::Type::Rectangle && (bool)options->polar.get() && options->getVeritalAxis().isEmpty()) { defaultParams.plot.marker.rectangleSpacing = 0; } } void Sheet::setMarkerLabels() { auto &def = defaultParams.plot.marker.label; if (options->getScales().anyAxisSet() && !( options->shapeType.get() == Diag::ShapeType::Type::Rectangle && options->subAxis().discreteCount() > 0 ) ) { if (options->shapeType.get() == Diag::ShapeType::Type::Circle) { def.position = MarkerLabel::Position::right; } else { def.position = options->horizontal.get() ? MarkerLabel::Position::top : MarkerLabel::Position::right; if (options->shapeType.get() == Diag::ShapeType::Type::Area || options->shapeType.get() == Diag::ShapeType::Type::Line) { def.paddingBottom = Gfx::Length::Emphemeral(8/11.0); def.paddingLeft = Gfx::Length::Emphemeral(8/11.0); def.paddingTop = Gfx::Length::Emphemeral(8/11.0); def.paddingRight = Gfx::Length::Emphemeral(8/11.0); } } } else { def.position = MarkerLabel::Position::center; } const auto &pos = (activeParams && activeParams->plot.marker.label.position) ? activeParams->plot.marker.label.position : def.position; if (pos == MarkerLabel::Position::center) { def.filter = Gfx::ColorTransform::Lightness(0.7); } } void Sheet::setData() { defaultParams.plot.marker.circleMinRadius = options->getScales().at(Diag::ScaleId::size).isEmpty() ? 0.0105 : 0.006; }
[ "simon@vizzuhq.com" ]
simon@vizzuhq.com
a472123d029a621b9132cd43572fa6b861719cf3
d6271ab44c4e17aae7a63d3de84711b92b0e3269
/src/server/fuse_fs/symlink.h
61a96c4eb67660c0f2dfb82a29aeac960e10081e
[ "MIT" ]
permissive
throwException/genode-world
1b9873d4d2abca4b48d8a111c8572d9ac7121437
2a947864592bff84acf39f341463b00761852808
refs/heads/master
2023-01-06T21:11:42.386892
2020-11-12T10:15:08
2020-11-12T10:18:20
299,933,376
0
0
NOASSERTION
2020-09-30T13:46:17
2020-09-30T13:46:16
null
UTF-8
C++
false
false
1,778
h
/* * \brief Symlink file-system node * \author Norman Feske * \author Christian Helmuth * \author Josef Soentgen * \date 2013-11-26 */ /* * Copyright (C) 2013-2017 Genode Labs GmbH * * This file is part of the Genode OS framework, which is distributed * under the terms of the GNU Affero General Public License version 3. */ #ifndef _SYMLINK_H_ #define _SYMLINK_H_ /* local includes */ #include <node.h> namespace Fuse_fs { class Symlink; } class Fuse_fs::Symlink : public Node { private: Node *_parent; typedef Genode::Path<MAX_PATH_LEN> Path; Path _path; size_t _length() const { struct stat s; int res = Fuse::fuse()->op.getattr(_path.base(), &s); if (res != 0) return 0; return s.st_size; } public: Symlink(Node *parent, char const *name, bool create = false) : Node(name), _parent(parent), _path(name, parent->name()) { } Status status() override { struct stat s; int res = Fuse::fuse()->op.getattr(_path.base(), &s); if (res != 0) return Status(); Status status; status.inode = s.st_ino ? s.st_ino : 1; status.size = s.st_size; status.mode = File_system::Status::MODE_FILE; return status; } size_t read(char *dst, size_t len, seek_off_t seek_offset) override { int res = Fuse::fuse()->op.readlink(_path.base(), dst, len); if (res != 0) return 0; return Genode::strlen(dst); } size_t write(char const *src, size_t len, seek_off_t seek_offset) override { /* Ideal symlink operations are atomic. */ if (seek_offset) return 0; int res = Fuse::fuse()->op.symlink(src, _path.base()); if (res != 0) return 0; return len; } file_size_t length() const { return _length(); } }; #endif /* _SYMLINK_H_ */
[ "norman.feske@genode-labs.com" ]
norman.feske@genode-labs.com
96aec6285f80833cadd2509d1a06cb1b8b6fbdc0
859785282e385c49c7a6ad11a233e7f5a9d0c9e7
/c++/Maximum-Path-Sum-between-2-Leaf-Nodes.cpp
eaa5960e2c328be8fc3690fc0fef4d5783750c38
[]
no_license
tejeswinegi/DSA-Solved-Problems
eaacfd939ef08208f73854c2bae2b4e739d6c4c5
9c4947fecea1f8b66ee2405c2d537961465ea479
refs/heads/master
2023-08-30T19:49:06.935389
2021-10-06T02:07:47
2021-10-06T02:07:47
null
0
0
null
null
null
null
UTF-8
C++
false
false
539
cpp
int maxPathSumUtil(Node *root, int &res) { if (root == NULL) return 0; if (!root->left && !root->right) return root->data; int ls = maxPathSumUtil(root->left, res); int rs = maxPathSumUtil(root->right, res); if (root->left && root->right) { res = max(res, ls + rs + root->data); return max(ls, rs) + root->data; } return (!root->left) ? rs + root->data : ls + root->data; } int maxPathSum(Node *root) { int res = INT_MIN; maxPathSumUtil(root, res); return res; }
[ "nkits9@gmail.com" ]
nkits9@gmail.com
f1cad7d0ba8ea614c44be1b5b1d33d4b28541582
71679d07ad4a4b698428806801bb081aae302f8a
/Square VS Round/sources/pos.cpp
217891a6e945298f516063918f3b0055ef6ee927
[ "MIT" ]
permissive
killerdy/Square-VS-Round
7e7b4a3a1a5d7945c535718bf6f71ec8f7faf692
f074322bb079110e2501e373f818e9dde303562b
refs/heads/main
2023-03-06T07:26:47.707014
2021-02-21T11:09:40
2021-02-21T11:09:40
null
0
0
null
null
null
null
UTF-8
C++
false
false
224
cpp
#include "../includes/pos.hpp" #include <cmath> bool Pos::collide(Pos p, double eps) { return abs(x - p.x) + abs(y - p.y) < eps; } double Pos::get_dis(Pos p) { return sqrt((p.x - x) * (p.x - x) + (p.y - y) * (p.y - y)); }
[ "huyuantao@outlook.com" ]
huyuantao@outlook.com
05a8c6051767e96f0cafee48a488ec9273a4d4f8
c619b43718441c6faef4cafa01eb7a81c4009a3d
/base/task/thread_pool/priority_queue_unittest.cc
d4478dd07321ed0cace34b1df4ea739e3983329a
[ "BSD-3-Clause" ]
permissive
cyjie/chromium
553cb41ac7416a6a23e80129ab35d394d31deb58
54cfcfc367d540c502f89a2e3c15bfb43be27a1a
refs/heads/master
2022-12-31T23:35:23.038391
2020-11-11T07:12:22
2020-11-11T07:12:22
null
0
0
null
null
null
null
UTF-8
C++
false
false
9,221
cc
// Copyright 2016 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "base/task/thread_pool/priority_queue.h" #include <memory> #include <utility> #include "base/bind_helpers.h" #include "base/memory/ptr_util.h" #include "base/memory/ref_counted.h" #include "base/task/task_traits.h" #include "base/task/thread_pool/sequence.h" #include "base/task/thread_pool/task.h" #include "base/test/gtest_util.h" #include "base/test/task_environment.h" #include "base/time/time.h" #include "testing/gtest/include/gtest/gtest.h" namespace base { namespace internal { namespace { class PriorityQueueWithSequencesTest : public testing::Test { protected: void ExpectNumSequences(size_t num_best_effort, size_t num_user_visible, size_t num_user_blocking) { EXPECT_EQ(pq.GetNumTaskSourcesWithPriority(TaskPriority::BEST_EFFORT), num_best_effort); EXPECT_EQ(pq.GetNumTaskSourcesWithPriority(TaskPriority::USER_VISIBLE), num_user_visible); EXPECT_EQ(pq.GetNumTaskSourcesWithPriority(TaskPriority::USER_BLOCKING), num_user_blocking); } scoped_refptr<TaskSource> MakeSequenceWithTraitsAndTask( const TaskTraits& traits) { // FastForward time to ensure that queue order between task sources is well // defined. task_environment.FastForwardBy(TimeDelta::FromMicroseconds(1)); scoped_refptr<Sequence> sequence = MakeRefCounted<Sequence>( traits, nullptr, TaskSourceExecutionMode::kParallel); sequence->BeginTransaction().PushTask( Task(FROM_HERE, DoNothing(), TimeDelta())); return sequence; } void Push(scoped_refptr<TaskSource> task_source) { auto sort_key = task_source->GetSortKey(false); pq.Push(RegisteredTaskSource::CreateForTesting(std::move(task_source)), sort_key); } test::TaskEnvironment task_environment{ test::TaskEnvironment::TimeSource::MOCK_TIME}; scoped_refptr<TaskSource> sequence_a = MakeSequenceWithTraitsAndTask(TaskTraits(TaskPriority::USER_VISIBLE)); TaskSourceSortKey sort_key_a = sequence_a->GetSortKey(false); scoped_refptr<TaskSource> sequence_b = MakeSequenceWithTraitsAndTask(TaskTraits(TaskPriority::USER_BLOCKING)); TaskSourceSortKey sort_key_b = sequence_b->GetSortKey(false); scoped_refptr<TaskSource> sequence_c = MakeSequenceWithTraitsAndTask(TaskTraits(TaskPriority::USER_BLOCKING)); TaskSourceSortKey sort_key_c = sequence_c->GetSortKey(false); scoped_refptr<TaskSource> sequence_d = MakeSequenceWithTraitsAndTask(TaskTraits(TaskPriority::BEST_EFFORT)); TaskSourceSortKey sort_key_d = sequence_d->GetSortKey(false); PriorityQueue pq; }; } // namespace TEST_F(PriorityQueueWithSequencesTest, PushPopPeek) { EXPECT_TRUE(pq.IsEmpty()); ExpectNumSequences(0U, 0U, 0U); // Push |sequence_a| in the PriorityQueue. It becomes the sequence with the // highest priority. Push(sequence_a); EXPECT_EQ(sort_key_a, pq.PeekSortKey()); ExpectNumSequences(0U, 1U, 0U); // Push |sequence_b| in the PriorityQueue. It becomes the sequence with the // highest priority. Push(sequence_b); EXPECT_EQ(sort_key_b, pq.PeekSortKey()); ExpectNumSequences(0U, 1U, 1U); // Push |sequence_c| in the PriorityQueue. |sequence_b| is still the sequence // with the highest priority. Push(sequence_c); EXPECT_EQ(sort_key_b, pq.PeekSortKey()); ExpectNumSequences(0U, 1U, 2U); // Push |sequence_d| in the PriorityQueue. |sequence_b| is still the sequence // with the highest priority. Push(sequence_d); EXPECT_EQ(sort_key_b, pq.PeekSortKey()); ExpectNumSequences(1U, 1U, 2U); // Pop |sequence_b| from the PriorityQueue. |sequence_c| becomes the sequence // with the highest priority. EXPECT_EQ(sequence_b, pq.PopTaskSource().Unregister()); EXPECT_EQ(sort_key_c, pq.PeekSortKey()); ExpectNumSequences(1U, 1U, 1U); // Pop |sequence_c| from the PriorityQueue. |sequence_a| becomes the sequence // with the highest priority. EXPECT_EQ(sequence_c, pq.PopTaskSource().Unregister()); EXPECT_EQ(sort_key_a, pq.PeekSortKey()); ExpectNumSequences(1U, 1U, 0U); // Pop |sequence_a| from the PriorityQueue. |sequence_d| becomes the sequence // with the highest priority. EXPECT_EQ(sequence_a, pq.PopTaskSource().Unregister()); EXPECT_EQ(sort_key_d, pq.PeekSortKey()); ExpectNumSequences(1U, 0U, 0U); // Pop |sequence_d| from the PriorityQueue. It is now empty. EXPECT_EQ(sequence_d, pq.PopTaskSource().Unregister()); EXPECT_TRUE(pq.IsEmpty()); ExpectNumSequences(0U, 0U, 0U); } TEST_F(PriorityQueueWithSequencesTest, RemoveSequence) { EXPECT_TRUE(pq.IsEmpty()); // Push all test Sequences into the PriorityQueue. |sequence_b| // will be the sequence with the highest priority. Push(sequence_a); Push(sequence_b); Push(sequence_c); Push(sequence_d); EXPECT_EQ(sort_key_b, pq.PeekSortKey()); ExpectNumSequences(1U, 1U, 2U); // Remove |sequence_a| from the PriorityQueue. |sequence_b| is still the // sequence with the highest priority. EXPECT_TRUE(pq.RemoveTaskSource(*sequence_a).Unregister()); EXPECT_EQ(sort_key_b, pq.PeekSortKey()); ExpectNumSequences(1U, 0U, 2U); // RemoveTaskSource() should return false if called on a sequence not in the // PriorityQueue. EXPECT_FALSE(pq.RemoveTaskSource(*sequence_a).Unregister()); ExpectNumSequences(1U, 0U, 2U); // Remove |sequence_b| from the PriorityQueue. |sequence_c| becomes the // sequence with the highest priority. EXPECT_TRUE(pq.RemoveTaskSource(*sequence_b).Unregister()); EXPECT_EQ(sort_key_c, pq.PeekSortKey()); ExpectNumSequences(1U, 0U, 1U); // Remove |sequence_d| from the PriorityQueue. |sequence_c| is still the // sequence with the highest priority. EXPECT_TRUE(pq.RemoveTaskSource(*sequence_d).Unregister()); EXPECT_EQ(sort_key_c, pq.PeekSortKey()); ExpectNumSequences(0U, 0U, 1U); // Remove |sequence_c| from the PriorityQueue, making it empty. EXPECT_TRUE(pq.RemoveTaskSource(*sequence_c).Unregister()); EXPECT_TRUE(pq.IsEmpty()); ExpectNumSequences(0U, 0U, 0U); // Return false if RemoveTaskSource() is called on an empty PriorityQueue. EXPECT_FALSE(pq.RemoveTaskSource(*sequence_c).Unregister()); ExpectNumSequences(0U, 0U, 0U); } TEST_F(PriorityQueueWithSequencesTest, UpdateSortKey) { EXPECT_TRUE(pq.IsEmpty()); // Push all test Sequences into the PriorityQueue. |sequence_b| becomes the // sequence with the highest priority. Push(sequence_a); Push(sequence_b); Push(sequence_c); Push(sequence_d); EXPECT_EQ(sort_key_b, pq.PeekSortKey()); ExpectNumSequences(1U, 1U, 2U); { // Downgrade |sequence_b| from USER_BLOCKING to BEST_EFFORT. |sequence_c| // (USER_BLOCKING priority) becomes the sequence with the highest priority. auto sequence_b_transaction = sequence_b->BeginTransaction(); sequence_b_transaction.UpdatePriority(TaskPriority::BEST_EFFORT); pq.UpdateSortKey(*sequence_b, sequence_b->GetSortKey(false)); EXPECT_EQ(sort_key_c, pq.PeekSortKey()); ExpectNumSequences(2U, 1U, 1U); } { // Update |sequence_c|'s sort key to one with the same priority. // |sequence_c| (USER_BLOCKING priority) is still the sequence with the // highest priority. auto sequence_c_transaction = sequence_c->BeginTransaction(); sequence_c_transaction.UpdatePriority(TaskPriority::USER_BLOCKING); pq.UpdateSortKey(*sequence_c, sequence_c->GetSortKey(false)); ExpectNumSequences(2U, 1U, 1U); // Note: |sequence_c| is popped for comparison as |sort_key_c| becomes // obsolete. |sequence_a| (USER_VISIBLE priority) becomes the sequence with // the highest priority. EXPECT_EQ(sequence_c, pq.PopTaskSource().Unregister()); EXPECT_EQ(sort_key_a, pq.PeekSortKey()); ExpectNumSequences(2U, 1U, 0U); } { // Upgrade |sequence_d| from BEST_EFFORT to USER_BLOCKING. |sequence_d| // becomes the sequence with the highest priority. auto sequence_d_and_transaction = sequence_d->BeginTransaction(); sequence_d_and_transaction.UpdatePriority(TaskPriority::USER_BLOCKING); pq.UpdateSortKey(*sequence_d, sequence_d->GetSortKey(false)); ExpectNumSequences(1U, 1U, 1U); // Note: |sequence_d| is popped for comparison as |sort_key_d| becomes // obsolete. EXPECT_EQ(sequence_d, pq.PopTaskSource().Unregister()); // No-op if UpdateSortKey() is called on a Sequence not in the // PriorityQueue. EXPECT_EQ(sort_key_a, pq.PeekSortKey()); ExpectNumSequences(1U, 1U, 0U); } { pq.UpdateSortKey(*sequence_d, sequence_d->GetSortKey(false)); ExpectNumSequences(1U, 1U, 0U); EXPECT_EQ(sequence_a, pq.PopTaskSource().Unregister()); ExpectNumSequences(1U, 0U, 0U); EXPECT_EQ(sequence_b, pq.PopTaskSource().Unregister()); ExpectNumSequences(0U, 0U, 0U); } { // No-op if UpdateSortKey() is called on an empty PriorityQueue. pq.UpdateSortKey(*sequence_b, sequence_b->GetSortKey(false)); EXPECT_TRUE(pq.IsEmpty()); ExpectNumSequences(0U, 0U, 0U); } } } // namespace internal } // namespace base
[ "commit-bot@chromium.org" ]
commit-bot@chromium.org
9be28eb5a7ed5983b10a9e077cb7a69b857100dd
3ae18db84d0aba32bf473d7902e466cec26e6897
/tcpppl/array_ref_argument.cc
d173b5408cda15ebbe80128f503dca2574dfcb1c
[ "MIT" ]
permissive
sylsaint/cpp_learning
59f8c18d78699cb3c27ec6d1bb3361edb5515eb3
158bdf6186a38838ef16f9739e436b17518a56ba
refs/heads/master
2021-01-12T08:03:46.036808
2018-09-21T09:58:03
2018-09-21T09:58:03
77,113,208
0
0
null
null
null
null
UTF-8
C++
false
false
192
cc
#include<iostream> void f(int(&r)[4]) { std::cout << r[3]++ << std::endl; } void g() { int a1[] {1,2,3,4}; f(a1); std::cout << a1[3] << std::endl; } int main() { g(); }
[ "yonglu.syl@alibaba-inc.com" ]
yonglu.syl@alibaba-inc.com
852a906ffaf741fa61c1f25b5a623abd4ede9e54
b636da9e36be06c11ecf596545df8d221a5b0f35
/src/mame/includes/model2.h
b8f162014f19c18b59eb9c2b8052844e1133079c
[]
no_license
Ced2911/drunken-ironman
e8d1040ee8dc33dff9309ca2d7b2102f5b341f24
cad0a219576d3b0f9377c64fb5f66f4d69f8ceae
refs/heads/master
2016-08-08T12:52:13.064543
2012-08-21T19:57:46
2012-08-21T19:57:46
null
0
0
null
null
null
null
UTF-8
C++
false
false
5,007
h
#include "video/poly.h" typedef struct _raster_state raster_state; typedef struct _geo_state geo_state; class model2_state : public driver_device { public: model2_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_maincpu(*this,"maincpu"), m_workram(*this, "workram"), m_bufferram(*this, "bufferram"), m_paletteram32(*this, "paletteram32"), m_colorxlat(*this, "colorxlat"), m_textureram0(*this, "textureram0"), m_textureram1(*this, "textureram1"), m_lumaram(*this, "lumaram"), m_soundram(*this, "soundram"), m_tgp_program(*this, "tgp_program"){ } required_device<cpu_device> m_maincpu; required_shared_ptr<UINT32> m_workram; required_shared_ptr<UINT32> m_bufferram; required_shared_ptr<UINT32> m_paletteram32; required_shared_ptr<UINT32> m_colorxlat; required_shared_ptr<UINT32> m_textureram0; required_shared_ptr<UINT32> m_textureram1; required_shared_ptr<UINT32> m_lumaram; optional_shared_ptr<UINT16> m_soundram; optional_shared_ptr<UINT32> m_tgp_program; UINT32 m_intreq; UINT32 m_intena; UINT32 m_coproctl; UINT32 m_coprocnt; UINT32 m_geoctl; UINT32 m_geocnt; UINT32 m_timervals[4]; UINT32 m_timerorig[4]; int m_timerrun[4]; timer_device *m_timers[4]; int m_ctrlmode; int m_analog_channel; int m_dsp_type; int m_copro_fifoin_rpos; int m_copro_fifoin_wpos; UINT32 *m_copro_fifoin_data; int m_copro_fifoin_num; int m_copro_fifoout_rpos; int m_copro_fifoout_wpos; UINT32 *m_copro_fifoout_data; int m_copro_fifoout_num; UINT16 m_cmd_data; UINT8 m_driveio_comm_data; int m_iop_write_num; UINT32 m_iop_data; int m_geo_iop_write_num; UINT32 m_geo_iop_data; int m_to_68k; int m_protstate; int m_protpos; UINT8 m_protram[256]; int m_prot_a; int m_maxxstate; UINT32 m_netram[0x8000/4]; int m_zflagi; int m_zflag; int m_sysres; int m_scsp_last_line; int m_jnet_time_out; UINT32 m_geo_read_start_address; UINT32 m_geo_write_start_address; poly_manager *m_poly; raster_state *m_raster; geo_state *m_geo; bitmap_rgb32 m_sys24_bitmap; DECLARE_CUSTOM_INPUT_MEMBER(_1c00000_r); DECLARE_CUSTOM_INPUT_MEMBER(_1c0001c_r); DECLARE_CUSTOM_INPUT_MEMBER(rchase2_devices_r); DECLARE_READ32_MEMBER(timers_r); DECLARE_WRITE32_MEMBER(timers_w); DECLARE_WRITE32_MEMBER(pal32_w); DECLARE_WRITE32_MEMBER(ctrl0_w); DECLARE_WRITE32_MEMBER(analog_2b_w); DECLARE_READ32_MEMBER(fifoctl_r); DECLARE_READ32_MEMBER(videoctl_r); DECLARE_WRITE32_MEMBER(rchase2_devices_w); DECLARE_WRITE32_MEMBER(srallyc_devices_w); DECLARE_READ32_MEMBER(copro_prg_r); DECLARE_WRITE32_MEMBER(copro_prg_w); DECLARE_WRITE32_MEMBER(copro_ctl1_w); DECLARE_WRITE32_MEMBER(copro_function_port_w); DECLARE_READ32_MEMBER(copro_fifo_r); DECLARE_WRITE32_MEMBER(copro_fifo_w); DECLARE_WRITE32_MEMBER(copro_sharc_iop_w); DECLARE_WRITE32_MEMBER(geo_ctl1_w); DECLARE_WRITE32_MEMBER(geo_sharc_ctl1_w); DECLARE_READ32_MEMBER(geo_sharc_fifo_r); DECLARE_WRITE32_MEMBER(geo_sharc_fifo_w); DECLARE_WRITE32_MEMBER(geo_sharc_iop_w); DECLARE_READ32_MEMBER(geo_prg_r); DECLARE_WRITE32_MEMBER(geo_prg_w); DECLARE_READ32_MEMBER(geo_r); DECLARE_WRITE32_MEMBER(geo_w); DECLARE_READ32_MEMBER(hotd_unk_r); DECLARE_READ32_MEMBER(sonic_unk_r); DECLARE_READ32_MEMBER(daytona_unk_r); DECLARE_READ32_MEMBER(desert_unk_r); DECLARE_READ32_MEMBER(model2_irq_r); DECLARE_WRITE32_MEMBER(model2_irq_w); DECLARE_READ32_MEMBER(model2_serial_r); DECLARE_WRITE32_MEMBER(model2o_serial_w); DECLARE_WRITE32_MEMBER(model2_serial_w); DECLARE_READ32_MEMBER(model2_prot_r); DECLARE_WRITE32_MEMBER(model2_prot_w); DECLARE_READ32_MEMBER(maxx_r); DECLARE_READ32_MEMBER(network_r); DECLARE_WRITE32_MEMBER(network_w); DECLARE_WRITE32_MEMBER(copro_w); DECLARE_WRITE32_MEMBER(mode_w); DECLARE_WRITE32_MEMBER(model2o_tex_w0); DECLARE_WRITE32_MEMBER(model2o_tex_w1); DECLARE_WRITE32_MEMBER(model2o_luma_w); DECLARE_WRITE32_MEMBER(model2_3d_zclip_w); DECLARE_READ16_MEMBER(m1_snd_68k_latch_r); DECLARE_READ16_MEMBER(m1_snd_v60_ready_r); DECLARE_WRITE16_MEMBER(m1_snd_68k_latch1_w); DECLARE_WRITE16_MEMBER(m1_snd_68k_latch2_w); DECLARE_WRITE16_MEMBER(model2snd_ctrl); DECLARE_READ32_MEMBER(copro_sharc_input_fifo_r); DECLARE_WRITE32_MEMBER(copro_sharc_output_fifo_w); DECLARE_READ32_MEMBER(copro_sharc_buffer_r); DECLARE_WRITE32_MEMBER(copro_sharc_buffer_w); DECLARE_READ32_MEMBER(copro_tgp_buffer_r); DECLARE_WRITE32_MEMBER(copro_tgp_buffer_w); DECLARE_READ8_MEMBER(driveio_port_r); DECLARE_WRITE8_MEMBER(driveio_port_w); DECLARE_READ8_MEMBER(driveio_port_str_r); DECLARE_READ32_MEMBER(jaleco_network_r); DECLARE_WRITE32_MEMBER(jaleco_network_w); void push_geo_data(UINT32 data); }; /*----------- defined in video/model2.c -----------*/ VIDEO_START(model2); SCREEN_UPDATE_RGB32(model2); void model2_3d_set_zclip( running_machine &machine, UINT8 clip );
[ "Ced2911@gmail.com" ]
Ced2911@gmail.com
0be2c90f4f7d9ad5a1d70c5184a487ae40cb5cbf
f416ab3adfb5c641dc84022f918df43985c19a09
/problems/projecteuler/0018.cpp
062a4584e500b64e4ef126f222edbef0b30de8ed
[]
no_license
NicoKNL/coding-problems
a4656e8423e8c7f54be1b9015a9502864f0b13a5
4c8c8d5da3cdf74aefcfad4e82066c4a4beb8c06
refs/heads/master
2023-07-26T02:00:35.834440
2023-07-11T22:47:13
2023-07-11T22:47:13
160,269,601
1
0
null
null
null
null
UTF-8
C++
false
false
1,294
cpp
#include <bits/stdc++.h> using namespace std; string in = "75\n" "95 64\n" "17 47 82\n" "18 35 87 10\n" "20 04 82 47 65\n" "19 01 23 75 03 34\n" "88 02 77 73 07 63 67\n" "99 65 04 28 06 16 70 92\n" "41 41 26 56 83 40 80 70 33\n" "41 48 72 33 47 32 37 16 94 29\n" "53 71 44 65 25 43 91 52 97 51 14\n" "70 11 33 28 77 73 17 78 39 68 17 57\n" "91 71 52 38 17 14 91 43 58 50 27 29 48\n" "63 66 04 68 89 53 67 30 73 16 69 87 40 31\n" "04 62 98 27 23 09 70 98 73 93 38 53 60 04 23"; int main() { vector<vector<int>> triangle; // Parsing the input string stringstream ss; ss.str(in); string tmp; while (getline(ss, tmp)) { stringstream number_stream; number_stream.str(tmp); int n; vector<int> row; while (number_stream >> n) { row.push_back(n); } triangle.push_back(row); } for (int row = triangle.size() - 1; row > 0; --row) { for (int col = 0; col < triangle[row].size() - 1; ++col) { triangle[row - 1][col] += max(triangle[row][col], triangle[row][col + 1]); } } cout << triangle[0][0]; }
[ "klaassen.nico@gmail.com" ]
klaassen.nico@gmail.com
3982955210b1d3b82f1d9fd968b269a513b4b8ff
b5a14460d1ef875a6b842738954e58b085dba4ed
/materials/14032019/globalne_ocieplenie.cpp
568f10697831712b4d8f97971a516023086824a9
[ "MIT" ]
permissive
kamiltokarski/devcpp_thur
b779e39dd90273b70f48e2c3acbe55e40face27b
4106483644cde347f60eb20c8063e0d78fc89bcb
refs/heads/master
2020-04-28T04:40:11.321411
2019-03-28T16:02:06
2019-03-28T16:02:06
174,988,013
0
0
null
null
null
null
UTF-8
C++
false
false
1,249
cpp
#include <bits/stdc++.h> using namespace std; int tab[1000009]; pair <int, int> srt[1000009]; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int n; cin >> n; for(int i = 1; i <= n; i++) { cin >> tab[i]; srt[i] = make_pair(tab[i], i); } sort(srt, srt+n+1); int lczwsp = 1; int pzmwd = 0; int i = 1; cout << 1 << " "; while(lczwsp != 0) { pzmwd++; while(srt[i].first <= pzmwd && i <= n) { int ilt = srt[i].second; while(i < n && tab[srt[i + 1].second] == tab[srt[i].second] && (srt[i].second + 1) == srt[i + 1].second) { // cout << srt[i].second + 1 << " = " << srt[i + 1].second << endl; ++i; } // cout << "te same wyspy od " << ilt << " do " << srt[i].second << endl; if(tab[ilt-1] > pzmwd && tab[srt[i].second+1] > pzmwd) { lczwsp++; } else if(tab[ilt-1] <= pzmwd && tab[srt[i].second+1] <= pzmwd) { lczwsp--; } i++; } cout << lczwsp << " "; } return 0; }
[ "kato13@staszic.waw.pl" ]
kato13@staszic.waw.pl
9fda8ae338939efdf4c1e5c55dd915f2e43c4f2c
a4c5a956e20c32e2b8d13752e06da39826280780
/dft2lnt/DFTreeValidator.h
e7cc2e4bf5c3feb94808efd706d28de4bcccab32
[]
no_license
buschko/dftcalc
885f649b4b55ec7965bfb482a7d47f2abe3912b5
f8859cdbca064931099cf0e8d8fd40aa5389a0e4
refs/heads/master
2020-06-07T15:44:57.516678
2015-05-19T12:06:04
2015-05-19T12:06:04
28,040,398
0
1
null
null
null
null
UTF-8
C++
false
false
1,299
h
/* * DFTreeValidator.h * * Part of dft2lnt library - a library containing read/write operations for DFT * files in Galileo format and translating DFT specifications into Lotos NT. * * @author Freark van der Berg */ namespace DFT { class DFTreeValidator; } #ifndef DFTREEVALIDATOR_H #define DFTREEVALIDATOR_H #include "DFTree.h" #include "dft_parser.h" namespace DFT { /** * Validates the DFT. * Note that a DFT generated from a valid AST should be guaranteed valid. */ class DFTreeValidator { private: DFT::DFTree* dft; CompilerContext* cc; int validateReferences(); int validateSingleParent(); int validateNodes(); int validateBasicEvent(const DFT::Nodes::BasicEvent& be); int validateGate(const DFT::Nodes::Gate& gate); public: /** * Constructs a new DFTreeValidator using the specified DFT and * CompilerContext. * @param dft The DFT to be validated. * @param cc The CompilerConstruct used for eg error reports. */ DFTreeValidator(DFT::DFTree* dft, CompilerContext* cc); virtual ~DFTreeValidator() { } /** * Start the validation process using the DFT specified in teh constructor. * Returns whether the DFT is valid or not. * @return true: valid DFT, false: invalid DFT */ int validate(); }; } // Namespace: DFT #endif // DFTREEVALIDATOR_H
[ "fivanderberg@gmail.com" ]
fivanderberg@gmail.com
c0f397a40899cb1af0effd64e94b45ac00962559
dacd0cb1c1a4b651a465a442709b44485f24263e
/TheLeadGame_cchef.cpp
e4c1072aec5bcd0adcde7ce2cc426b7d061ff89e
[]
no_license
Anupoma/CodeChef_Practice
a06cdc414651efb1f2a0e21762ba5c25f940e6f3
906006327e74ad41374b2f24fc73ab853d42fd2f
refs/heads/main
2023-08-12T16:13:14.924915
2021-10-08T09:59:42
2021-10-08T09:59:42
414,934,126
0
0
null
null
null
null
UTF-8
C++
false
false
85
cpp
#include<bits/stdc++.h> using namespace std; int main() { int n, return 0; }
[ "anupomadastoma@gmail.com" ]
anupomadastoma@gmail.com
aa0c095ba33710a5a02ab90fff594cefeb6c7811
d2c0a259489e17b9df8fa249c23a0fead6dbfd75
/TrigBjetHypo/TrigDvHypo.h
f0458ebc41a110f4842ee939a5fa608c33a6ac57
[]
no_license
duartej/TrigDVHypo
a756712bc8fd9a82f90157f60a5135398e9d3968
2086a5f0890da81d815d6b7df7ad041df614e2e7
refs/heads/master
2020-12-24T16:50:29.813914
2015-11-17T14:07:16
2015-11-17T14:07:16
27,373,867
0
0
null
null
null
null
UTF-8
C++
false
false
2,542
h
// ************************************************ // // NAME: TrigDvHypo.h // PACKAGE: Trigger/TrigHypothesis/TrigDvHypo // // AUTHOR: Andrea Coccaro // EMAIL: Andrea.Coccaro@ge.infn.it // // ************************************************ #ifndef TRIGDVHYPO_H #define TRIGDVHYPO_H #include "TrigInterfaces/HypoAlgo.h" class TrigEFBjetContainer; class TrigTimerSvc; class TriggerElement; /** * @brief Hypo class for HLT Displaced vertex multi-track selection. * * @author Jordi Duarte-Campderros <jorge.duarte.campderros@cern.ch> * (based in the TrigBjetHypo class) * * This is the base hypothesis class for the displaced vertex selection * Selection can be performed using as handles from the secondary vertices * found in the TrigDvFex class. * * The event is selected using: * - * - * - * - * */ #include<string> class TrigEFBjetContainer; // Necesito esto? class TrigDvHypo : public HLT::HypoAlgo { public: /** @brief Constructor. */ TrigDvHypo (const std::string&, ISvcLocator*); /** @brief Destructor. */ ~TrigDvHypo (); HLT::ErrorCode hltInitialize(); HLT::ErrorCode hltExecute(const HLT::TriggerElement*, bool&); HLT::ErrorCode hltFinalize(); private: /** @brief Total execution time of TrigDvFex class. */ TrigTimer *m_totTimer; /** @brief Pointer to TrigEFBjet collection. */ TrigEFBjetContainer* m_trigEFBjetColl; /** @brief The jet collection to be used ("EFJet" or "" for default config), "SplitJet" for new config */ std::string m_jetKey; /** @brief DeclareProperty: Displaced-vertex track multiplicity cut */ int m_ntrackDV; /** @brief DeclareProperty: Displaced-vertex mass cut (using the pion hypothesis.. */ float m_massDV; /** @brief DeclareProperty: Displaced-vertex minimum distance to any primary vertex*/ float m_rDV; /** @brief DeclareProperty: if acceptAll flag is set to true, every event is taken. */ bool m_acceptAll; /** @brief DeclareProperty: string corresponding to the trigger level in which the algorithm is running. */ std::string m_instance; /** @brief to check the beam spot flag status. */ bool m_useBeamSpotFlag; /** @brief Cut counter. */ //unsigned short int m_cutCounter; --> try to use bitmask to extract the cuts used int m_cutCounter; /** @brief monitoring number of selected tracks */ int m_tracksPerRoI; }; #endif
[ "Jordi.Duarte.Campderros@cern.ch" ]
Jordi.Duarte.Campderros@cern.ch
5380f16cf60422d431830460f8e7a02b1f849dfe
8883bb97208c0a2d38f9654c29a748ac3c8743d5
/Implementation/circuit.h
8dabc9505f91a370a5ada4ab045e4ba35ec37185
[]
no_license
giancarlokc/fully-homomorphic-encryption
35c3aaf1610f5cf08ff8314490100169d0deecc4
c89494b98b241ff6d3dee0f98674f749bab3a339
refs/heads/master
2021-03-27T14:01:02.048310
2015-12-26T16:55:39
2015-12-26T16:55:39
46,006,106
1
0
null
null
null
null
UTF-8
C++
false
false
1,363
h
#ifndef CIRCUIT_H #define CIRCUIT_H #include "type_defs.h" #include "security_settings.h" #include "utilities.h" #include <vector> #include <stdexcept> #include <cmath> enum GateTypeEnum {And, Xor, Input, InputLiteral, Output}; typedef enum GateTypeEnum GateType; class Gate { private: SecuritySettings *sec; public: GateType gate_type; unsigned int id; unsigned long input_index; Gate *input1; bool input1_resolved; Gate *input2; bool input2_resolved; int unresolved_outputs; CipherBit* output_value; std::vector<Gate*> outputs; void init_vars(); void calc_z_vector(const PublicKey &pk); unsigned long int degree; unsigned long int norm; // Input gates //Gate(GateType gate_type, CipherBit* value, unsigned long lambda); Gate(GateType gate_type, unsigned long input_index, SecuritySettings *sec); // Input Literal gates Gate(GateType gate_type, bool input, SecuritySettings *sec); // Output gates Gate(GateType gate_type, Gate *input, SecuritySettings *sec); // Logic gates Gate(GateType gate_type, Gate *input1, Gate *input2, SecuritySettings *sec); void add_output(Gate *output_gate); void update_outputs(); void evaluate(const PublicKey &pk); void mod_reduce(const PublicKey &pk); bool is_input() {return gate_type == Input;} void set_input(CipherBit** inputs); }; #endif //CIRCUIT_H
[ "giancarlokc@gmail.com" ]
giancarlokc@gmail.com