blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 4 201 | content_id stringlengths 40 40 | detected_licenses listlengths 0 85 | license_type stringclasses 2
values | repo_name stringlengths 7 100 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringclasses 260
values | visit_date timestamp[us] | revision_date timestamp[us] | committer_date timestamp[us] | github_id int64 11.4k 681M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 17
values | gha_event_created_at timestamp[us] | gha_created_at timestamp[us] | gha_language stringclasses 80
values | src_encoding stringclasses 28
values | language stringclasses 1
value | is_vendor bool 1
class | is_generated bool 2
classes | length_bytes int64 8 9.86M | extension stringclasses 52
values | content stringlengths 8 9.86M | authors listlengths 1 1 | author stringlengths 0 119 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
113eb915a0660ed5666c7d960f67eb740b8d5e1f | e5e0d729f082999a9bec142611365b00f7bfc684 | /tensorflow/compiler/xla/service/interpreter/platform_id.h | a6cc10bcc1eb756a3146d4a834efa4cd3ceb2d27 | [
"Apache-2.0"
] | permissive | NVIDIA/tensorflow | ed6294098c7354dfc9f09631fc5ae22dbc278138 | 7cbba04a2ee16d21309eefad5be6585183a2d5a9 | refs/heads/r1.15.5+nv23.03 | 2023-08-16T22:25:18.037979 | 2023-08-03T22:09:23 | 2023-08-03T22:09:23 | 263,748,045 | 763 | 117 | Apache-2.0 | 2023-07-03T15:45:19 | 2020-05-13T21:34:32 | C++ | UTF-8 | C++ | false | false | 1,093 | h | /* Copyright 2017 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
#ifndef TENSORFLOW_COMPILER_XLA_SERVICE_INTERPRETER_PLATFORM_ID_H_
#define TENSORFLOW_COMPILER_XLA_SERVICE_INTERPRETER_PLATFORM_ID_H_
#include "tensorflow/stream_executor/platform.h"
namespace stream_executor {
namespace interpreter {
extern const Platform::Id kXlaInterpreterPlatformId;
} // namespace interpreter
} // namespace stream_executor
#endif // TENSORFLOW_COMPILER_XLA_SERVICE_INTERPRETER_PLATFORM_ID_H_
| [
"gardener@tensorflow.org"
] | gardener@tensorflow.org |
a58438c56230eadce205ea4d3cb77749a3721ec5 | 163f914a4ed89cc78d3e7ca9fe2978baa52f1e29 | /Client/AddressDlg.cpp | 9971896c5970e48ee12a7e27a35d72ba771e5a6d | [] | no_license | cot11/yupin | d050d3c19b8d3122bd2717a205f6f0fe598fdc32 | 89f71fe9c6e7b7c2cd47ebc2dd535dc1e6041015 | refs/heads/master | 2021-01-10T21:05:33.385909 | 2015-12-01T08:44:26 | 2015-12-01T08:44:26 | 42,455,059 | 0 | 0 | null | null | null | null | UHC | C++ | false | false | 7,372 | cpp | // AddressDlg.cpp : implementation file
//
#include "stdafx.h"
#include "Client.h"
#include "AddressDlg.h"
#include "ClientDlg.h"
#include "Join_dialog.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
CString Join_info;
BOOL OK = false;
/////////////////////////////////////////////////////////////////////////////
// CAddressDlg dialog
CAddressDlg::CAddressDlg(CWnd* pParent /*=NULL*/)
: CDialog(CAddressDlg::IDD, pParent)
, m_Name(_T(""))
, m_NewID(_T(""))
, m_NewPWD(_T(""))
{
//{{AFX_DATA_INIT(CAddressDlg)
m_address = _T("");
m_strName = _T("");
m_strPwd = _T("");
//}}AFX_DATA_INIT
}
CAddressDlg::~CAddressDlg()
{
}
void CAddressDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CAddressDlg)
DDX_Text(pDX, IDC_EDIT_NAME, m_strName);
DDX_Text(pDX, IDC_EDIT_PWD, m_strPwd);
//}}AFX_DATA_MAP
DDX_Text(pDX, IDC_EDIT_INUSER, m_Name);
DDX_Text(pDX, IDC_EDIT_INID, m_NewID);
DDX_Text(pDX, IDC_EDIT_INPWD, m_NewPWD);
}
BEGIN_MESSAGE_MAP(CAddressDlg, CDialog)
//{{AFX_MSG_MAP(CAddressDlg)
//}}AFX_MSG_MAP
ON_BN_CLICKED(IDOK, &CAddressDlg::OnBnClickedOk)
ON_BN_CLICKED(IDC_BUTTON_JOIN, &CAddressDlg::OnBnClickedButtonJoin)
ON_BN_CLICKED(IDC_BUTTON_GUEST, &CAddressDlg::OnBnClickedButtonGuest)
ON_BN_CLICKED(IDC_BUTTON_JOINOK, &CAddressDlg::OnBnClickedButtonJoinok)
ON_BN_CLICKED(IDC_BUTTON_CANCEL, &CAddressDlg::OnBnClickedButtonCancel)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CAddressDlg message handlers
BOOL CAddressDlg::OnInitDialog()
{
CDialog::OnInitDialog();
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void CAddressDlg::OnOK()
{
// TODO: Add extra validation here
CDialog::OnOK();
}
void CAddressDlg::OnBnClickedOk() //login
{
UpdateData(TRUE);
if (strcmp(m_strName, "") == 0 || strcmp(m_strPwd, "") == 0) { // ID 또는 PW가 공백으로 로그인 시 오류 처리
AfxMessageBox("아이디 또는 비밀번호를 다시 확인하세요.");
UpdateData(FALSE);
return;
}
UpdateData(FALSE);
CDialog::OnOK();
}
void CAddressDlg::OnBnClickedButtonJoin() // 회원가입 버튼 누를 시 이벤트 발생 처리
{
// TODO: 여기에 컨트롤 알림 처리기 코드를 추가합니다.
GetDlgItem(IDC_STATIC_INID)->ShowWindow(FALSE); // ID 텍스트 숨김
GetDlgItem(IDC_STATIC_INPWD)->ShowWindow(FALSE); // PWD 텍스트 숨김
GetDlgItem(IDC_EDIT_NAME)->ShowWindow(FALSE); // ID 입력 칸 숨김
GetDlgItem(IDC_EDIT_PWD)->ShowWindow(FALSE); // PWD 입력 칸 숨김
GetDlgItem(IDOK)->ShowWindow(FALSE); // 로그인 버튼 숨김
GetDlgItem(IDC_BUTTON_GUEST)->ShowWindow(FALSE); // 게스트 버튼 숨김
GetDlgItem(IDC_BUTTON_JOIN)->ShowWindow(FALSE); // 회원가입 상태 버튼 숨김
///////////////////////////////////////////////////////////////////////////// 활성화 되는 부분
GetDlgItem(IDC_STATIC_USER)->ShowWindow(TRUE);
GetDlgItem(IDC_EDIT_INUSER)->ShowWindow(TRUE);
GetDlgItem(IDC_STATIC_ID)->ShowWindow(TRUE);
GetDlgItem(IDC_EDIT_INID)->ShowWindow(TRUE);
GetDlgItem(IDC_STATIC_PWD)->ShowWindow(TRUE);
GetDlgItem(IDC_EDIT_INPWD)->ShowWindow(TRUE);
GetDlgItem(IDC_BUTTON_JOINOK)->ShowWindow(TRUE);
GetDlgItem(IDC_BUTTON_CANCEL)->ShowWindow(TRUE);
}
void CAddressDlg::OnBnClickedButtonGuest() // Guest 버튼 누를 시 이벤트 발생 처리
{
// TODO: 여기에 컨트롤 알림 처리기 코드를 추가합니다.
isGuest = TRUE;
CDialog::OnOK();
}
void CAddressDlg::OnBnClickedButtonJoinok() // 회원 가입서 안의 가입 버튼
{
// TODO: 여기에 컨트롤 알림 처리기 코드를 추가합니다.
CString Join_info = "";
UpdateData(TRUE);
if (strcmp(m_Name, "") == 0)
{
AfxMessageBox("이름을 입력하셈.");
UpdateData(FALSE);
return;
}
else if (strcmp(m_NewID, "") == 0)
{
AfxMessageBox("ID를 입력하셈.");
UpdateData(FALSE);
return;
}
// 이 부분에서 m_NewID(사용자가 사용할려고 하는 ID) 부분 중복체크해서 중복되면 리턴시켜버리면 될듯
/*else if( m_NewID를 서버로 보내는 소스 작성하면 될듯)
{
}*/
else if (strcmp(m_NewPWD, "") == 0)
{
AfxMessageBox("비번을 입력하셈.");
UpdateData(FALSE);
return;
}
Join_info = "J|" + m_Name + "|" + m_NewID + "|" + m_NewPWD + "|";
AfxMessageBox("가입 축하함. 확인을 누르면 바로 접속을 시도하겠음.");
GetDlgItem(IDC_STATIC_INID)->ShowWindow(TRUE); // ID 텍스트 숨김
GetDlgItem(IDC_STATIC_INPWD)->ShowWindow(TRUE); // PWD 텍스트 숨김
GetDlgItem(IDC_EDIT_NAME)->ShowWindow(TRUE); // ID 입력 칸 숨김
GetDlgItem(IDC_EDIT_PWD)->ShowWindow(TRUE); // PWD 입력 칸 숨김
GetDlgItem(IDOK)->ShowWindow(TRUE); // 로그인 버튼 숨김
GetDlgItem(IDC_BUTTON_GUEST)->ShowWindow(TRUE); // 게스트 버튼 숨김
GetDlgItem(IDC_BUTTON_JOIN)->ShowWindow(TRUE); // 회원가입 상태 버튼 숨김
///////////////////////////////////////////////////////////////////////////// 비활성화 되는 부분
GetDlgItem(IDC_STATIC_USER)->ShowWindow(FALSE); // 이름 텍스트 숨김
GetDlgItem(IDC_EDIT_INUSER)->ShowWindow(FALSE); // 이름 입력 칸 숨김
GetDlgItem(IDC_STATIC_ID)->ShowWindow(FALSE); // ID 텍스트 숨김
GetDlgItem(IDC_EDIT_INID)->ShowWindow(FALSE); // ID 입력 칸 숨김
GetDlgItem(IDC_STATIC_PWD)->ShowWindow(FALSE); // 비밀번호 텍스트 숨김
GetDlgItem(IDC_EDIT_INPWD)->ShowWindow(FALSE); // 비밀번호 입력 칸 숨김
GetDlgItem(IDC_BUTTON_JOINOK)->ShowWindow(FALSE); // 가입 버튼 숨김
GetDlgItem(IDC_BUTTON_CANCEL)->ShowWindow(FALSE); // 취소 버튼 숨김
m_Name = "";
m_NewID = "";
m_NewPWD = "";
UpdateData(FALSE);
CAddressDlg::OnOK();
}
void CAddressDlg::OnBnClickedButtonCancel() // 회원 가입서 안의 가입 가입 취소 버튼
{
// TODO: 여기에 컨트롤 알림 처리기 코드를 추가합니다.
m_Name = "";
m_NewID = "";
m_NewPWD = "";
UpdateData(FALSE);
AfxMessageBox("취소되었습니다.");
GetDlgItem(IDC_STATIC_INID)->ShowWindow(TRUE); // ID 텍스트 숨김
GetDlgItem(IDC_STATIC_INPWD)->ShowWindow(TRUE); // PWD 텍스트 숨김
GetDlgItem(IDC_EDIT_NAME)->ShowWindow(TRUE); // ID 입력 칸 숨김
GetDlgItem(IDC_EDIT_PWD)->ShowWindow(TRUE); // PWD 입력 칸 숨김
GetDlgItem(IDOK)->ShowWindow(TRUE); // 로그인 버튼 숨김
GetDlgItem(IDC_BUTTON_GUEST)->ShowWindow(TRUE); // 게스트 버튼 숨김
GetDlgItem(IDC_BUTTON_JOIN)->ShowWindow(TRUE); // 회원가입 상태 버튼 숨김
///////////////////////////////////////////////////////////////////////////// 비활성화 되는 부분
GetDlgItem(IDC_STATIC_USER)->ShowWindow(FALSE); // 이름 텍스트 숨김
GetDlgItem(IDC_EDIT_INUSER)->ShowWindow(FALSE); // 이름 입력 칸 숨김
GetDlgItem(IDC_STATIC_ID)->ShowWindow(FALSE); // ID 텍스트 숨김
GetDlgItem(IDC_EDIT_INID)->ShowWindow(FALSE); // ID 입력 칸 숨김
GetDlgItem(IDC_STATIC_PWD)->ShowWindow(FALSE); // 비밀번호 텍스트 숨김
GetDlgItem(IDC_EDIT_INPWD)->ShowWindow(FALSE); // 비밀번호 입력 칸 숨김
GetDlgItem(IDC_BUTTON_JOINOK)->ShowWindow(FALSE); // 가입 버튼 숨김
GetDlgItem(IDC_BUTTON_CANCEL)->ShowWindow(FALSE); // 취소 버튼 숨김
} | [
"cot11@naver.com"
] | cot11@naver.com |
b466698ad8b515003ab597ab0defca42b4f71ec4 | f1d87b7948acfdd804593579460884a7533ad0d0 | /数据结构与算法/图/Dijkstra.cpp | 424196a94efa615726498cf3ee87fbee9ee3ad65 | [] | no_license | halozxc/My_C_Code | bf7c8181cf3cb7305297e79a23c77a226d383a21 | b341a1d66677fef0d972104b962b1f407e2b3e34 | refs/heads/master | 2021-11-30T05:00:31.263501 | 2021-11-24T14:46:42 | 2021-11-24T14:46:42 | 181,249,234 | 6 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,279 | cpp | #include<bits/stdc++.h>
using namespace std;
const int board=100;
int main(){
long long map[board][board];
int dis[board],book[board],u,v,t1,t2,t3,x,y,min,s;
vector<int> path[board];
long long inf=99999;
for(int i=0;i<board;i++){
for(int j=0;j<board;j++){
map[i][j]=inf;
if(i==j){
map[i][j]=0;
}
}
}
cin>>u>>v>>s;
for(int i=1;i<=v;i++){
cin>>t1>>t2>>t3;
map[t1][t2]=t3;
}
for(int i=1;i<=u;i++){
dis[i]=map[s][i];
}
book[1]=1;
for(int i=1;i<u;i++){
min=inf;
for(int j=1;j<=u;j++){
if(book[j]==0&&dis[j]<min){
min=dis[j];
x=j;
}
}
book[x]=1;
for(y=1;y<=u;y++){
if(map[x][y]<inf){
if(dis[y]>dis[x]+map[x][y]){
dis[y]=dis[x]+map[x][y];
path[y].push_back(x);
}
}
}
}
for(int i=1;i<=u;i++){
cout<<s<<"to"<<i<<"length:"<<dis[i]<<endl;
cout<<"path is"<<i<<",";
for(int j=0;j<path[i].size();j++){
cout<<path[i][j]<<",";
}
cout<<i<<endl;
}
return 0;
}
| [
"824927872@qq.com"
] | 824927872@qq.com |
c38c7d6e6605cf4f6ac6a6629a5fac897c93d3cf | 7eb4e280db088ef332324a2ea343148b018edd9a | /Boss.h | 97cae23fa0e3efef6f0a73fb691ab3bfc8bd66dd | [] | no_license | JTuthill01/Wingman | 4c5f16083c77380ccc75d93be1a5b6af1dc1c7c5 | e82cf0b31b61ab34b225414b43c1b1b40d7e9091 | refs/heads/master | 2020-04-09T00:27:00.663520 | 2018-11-30T19:11:07 | 2018-11-30T19:11:07 | 159,867,509 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 988 | h | #pragma once
#include "Bullet.h"
class BossGun
{
public:
BossGun(sf::Texture* texture, sf::Vector2f position, float shootTimerMax);
~BossGun();
void update(const float &deltaTime);
void draw(sf::RenderTarget &target);
private:
float m_shootTimer;
float m_shootTimerMax;
float m_deltaTimeMultiplier;
sf::Sprite m_gunSprite;
};
class Boss
{
public:
Boss(dArr<sf::Texture> &bodyTextures, dArr<sf::Texture> &gunTextures, dArr<sf::Texture> &bulletTextures, sf::Vector2f position, int type);
virtual ~Boss();
void movement();
void update(const float &deltaTime);
void draw(sf::RenderTarget &target);
private:
int m_nrOfGuns;
int m_type;
float m_deltaTimeMultiplier;
sf::Sprite m_sprite;
dArr<sf::Texture>* m_bodyTextures;
dArr<sf::Texture>* m_gunTextures;
dArr<sf::Texture>* m_bulletTextures;
dArr<BossGun> m_guns;
dArr<Bullet> m_bullets;
int m_damageMin;
int m_damageMax;
int m_hpMax;
int m_hp;
};
| [
"noreply@github.com"
] | noreply@github.com |
85e789ac62f26f23927f3b00dc5bef5ed33ec8fe | 456551bbf0c752075d23e2dd348d9bf09533c40f | /practice/abc104c.cpp | d6ce998aeb1d40b721ffd0063c7a442028ff5d51 | [] | no_license | skjmp/ProCon | 5bed08c6efdc202d5f7d6038cd7a99d9c59d58f0 | b9971b374d45499f22e6eb0107473ca37ca46591 | refs/heads/master | 2020-03-27T20:12:38.044762 | 2020-03-01T11:42:03 | 2020-03-01T13:49:31 | 147,048,755 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,949 | cpp | #include <bits/stdc++.h>
#define REP(i, a, n) for (int i = (a); i < (int)(n); ++i)
#define REPC(i, a, n) for (int i = (a); i <= (int)(n); ++i)
#define ALL(t) t.begin(), t.end()
#define RALL(t) t.rbegin(), t.rend()
#define MATINIT(type, row, col, init) \
vector<vector<type>>(row, vector<type>(col, init));
#define Yes(cond) cout << (cond ? "Yes" : "No") << endl;
#define YES(cond) cout << (cond ? "YES" : "NO") << endl;
using namespace std;
using LL = long long;
using ULL = unsigned long long;
template <class T>
using VEC = std::vector<T>;
template <class T>
using MAT = std::vector<std::vector<T>>;
void DUMP() { cerr << endl; }
template <class Head, class... Tail>
void DUMP(Head &&head, Tail &&... tail) {
cerr << head << ", ";
DUMP(std::move(tail)...);
}
template <typename T>
ostream &operator<<(ostream &os, vector<T> &vec) {
os << "{";
for (auto v : vec) os << v << ",";
os << "}";
return os;
}
template <typename T1, typename T2>
ostream &operator<<(ostream &os, map<T1, T2> &m) {
os << "{";
for (auto p : m) os << p << ",";
os << "}";
return os;
}
template <typename T1, typename T2>
ostream &operator<<(ostream &os, pair<T1, T2> p) {
os << "[" << p.first << " " << p.second << "]";
return os;
}
int main() {
int D, G;
cin >> D >> G;
VEC<int> P(D), C(D);
REP(i, 0, D) cin >> P[i] >> C[i];
VEC<LL> sum(D, 0);
REP(i, 0, D) {
REP(j, 0, P[i]) sum[i] += (i + 1) * 100;
sum[i] += C[i];
}
int lim = 1 << (D + 1);
int ans = INT32_MAX;
REP(bit, 0, lim) {
LL point = 0;
VEC<bool> used(D, 0);
int cnt = 0;
REP(i, 0, D) {
if (bit & (1 << i)) {
point += sum[i];
cnt += P[i];
used[i] = 1;
}
}
for (int i = D - 1; i >= 0; --i) {
if (used[i]) continue;
for (int a = 0; a < P[i] && point < G; ++a) {
++cnt;
point += (i + 1) * 100;
}
}
ans = min(ans, cnt);
}
cout << ans << endl;
return 0;
}
| [
"2036oshmkufafg36@gmail.com"
] | 2036oshmkufafg36@gmail.com |
58428a8eee8a35feedebd3f30e76828a76010f59 | 0c6aebacc3e5447d75a5256f96b98c166c9df4b5 | /CPPPP/第四章 复合类型/newstrct.cpp | cba7314db0e23be606425cc25fec6b4e43d56f6e | [] | no_license | RaoXuntian/Learn_CPP | 8c940484806ded25eca397890eff3395b9456883 | 1b5bca10028c09c730fe4ed3582f674a3c2ced38 | refs/heads/master | 2021-01-07T09:54:23.284374 | 2020-06-28T17:59:28 | 2020-06-28T17:59:28 | 241,656,040 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 525 | cpp | #include<iostream>
using namespace std;
struct inflatable
{
char name[20];
float volume;
double price;
};
int main(int argc, char const *argv[])
{
inflatable* ps = new inflatable;
cout << "Enter name of inflatable item: ";
cin.get(ps->name, 20);
cout << "Enter volume in cubic feet: ";
cin >> (*ps).volume;
cout << "Enter price: $";
cin >> ps->price;
cout << "Name: " << (*ps).name << endl;
cout << "Volume: " << ps->volume << " cubic feet\n";
cout << "Price: $" << ps->price << endl;
delete ps;
return 0;
} | [
"raoxuntian@gmail.com"
] | raoxuntian@gmail.com |
5d36ad428445d7bc6e06209b38015461ef56456e | 5396e20b5eee35bf19de2fd54fd2d1817963defb | /IllusionEngine/src/Components/Collision.cpp | daab544046e6e0c0522c23ff285885d224e1756c | [] | no_license | Mesiow/Illusion-Engine | de302ff1d611a1551caf4773c4602617af4a980e | 0d48de78ef65e162cdd146936628d726b2856b29 | refs/heads/master | 2020-04-23T23:38:55.518978 | 2019-04-05T19:41:30 | 2019-04-05T19:41:30 | 171,542,901 | 3 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 7,770 | cpp | /*
* File: collision.cpp
* Author: Nick (original version), ahnonay (SFML2 compatibility)
*/
#include "../pcHeaders.h"
#include "Collision.h"
namespace Collision
{
class BitmaskManager
{
public:
~BitmaskManager() {
std::map<const sf::Texture*, sf::Uint8*>::const_iterator end = Bitmasks.end();
for (std::map<const sf::Texture*, sf::Uint8*>::const_iterator iter = Bitmasks.begin(); iter!=end; iter++)
delete [] iter->second;
}
sf::Uint8 GetPixel (const sf::Uint8* mask, const sf::Texture* tex, unsigned int x, unsigned int y) {
if (x>tex->getSize().x||y>tex->getSize().y)
return 0;
return mask[x+y*tex->getSize().x];
}
sf::Uint8* GetMask (const sf::Texture* tex) {
sf::Uint8* mask;
std::map<const sf::Texture*, sf::Uint8*>::iterator pair = Bitmasks.find(tex);
if (pair==Bitmasks.end())
{
sf::Image img = tex->copyToImage();
mask = CreateMask (tex, img);
}
else
mask = pair->second;
return mask;
}
sf::Uint8* CreateMask (const sf::Texture* tex, const sf::Image& img) {
sf::Uint8* mask = new sf::Uint8[tex->getSize().y*tex->getSize().x];
for (unsigned int y = 0; y<tex->getSize().y; y++)
{
for (unsigned int x = 0; x<tex->getSize().x; x++)
mask[x+y*tex->getSize().x] = img.getPixel(x,y).a;
}
Bitmasks.insert(std::pair<const sf::Texture*, sf::Uint8*>(tex,mask));
return mask;
}
private:
std::map<const sf::Texture*, sf::Uint8*> Bitmasks;
};
BitmaskManager Bitmasks;
bool PixelPerfectTest(const sf::Sprite& Object1, const sf::Sprite& Object2, sf::Uint8 AlphaLimit) {
sf::FloatRect Intersection;
if (Object1.getGlobalBounds().intersects(Object2.getGlobalBounds(), Intersection)) {
sf::IntRect O1SubRect = Object1.getTextureRect();
sf::IntRect O2SubRect = Object2.getTextureRect();
sf::Uint8* mask1 = Bitmasks.GetMask(Object1.getTexture());
sf::Uint8* mask2 = Bitmasks.GetMask(Object2.getTexture());
// Loop through our pixels
for (int i = Intersection.left; i < Intersection.left+Intersection.width; i++) {
for (int j = Intersection.top; j < Intersection.top+Intersection.height; j++) {
sf::Vector2f o1v = Object1.getInverseTransform().transformPoint(i, j);
sf::Vector2f o2v = Object2.getInverseTransform().transformPoint(i, j);
// Make sure pixels fall within the sprite's subrect
if (o1v.x > 0 && o1v.y > 0 && o2v.x > 0 && o2v.y > 0 &&
o1v.x < O1SubRect.width && o1v.y < O1SubRect.height &&
o2v.x < O2SubRect.width && o2v.y < O2SubRect.height) {
if (Bitmasks.GetPixel(mask1, Object1.getTexture(), (int)(o1v.x)+O1SubRect.left, (int)(o1v.y)+O1SubRect.top) > AlphaLimit &&
Bitmasks.GetPixel(mask2, Object2.getTexture(), (int)(o2v.x)+O2SubRect.left, (int)(o2v.y)+O2SubRect.top) > AlphaLimit)
return true;
}
}
}
}
return false;
}
bool CreateTextureAndBitmask(sf::Texture &LoadInto, const std::string& Filename)
{
sf::Image img;
if (!img.loadFromFile(Filename))
return false;
if (!LoadInto.loadFromImage(img))
return false;
Bitmasks.CreateMask(&LoadInto, img);
return true;
}
sf::Vector2f GetSpriteCenter (const sf::Sprite& Object)
{
sf::FloatRect AABB = Object.getGlobalBounds();
return sf::Vector2f (AABB.left+AABB.width/2.f, AABB.top+AABB.height/2.f);
}
sf::Vector2f GetSpriteSize (const sf::Sprite& Object)
{
sf::IntRect OriginalSize = Object.getTextureRect();
sf::Vector2f Scale = Object.getScale();
return sf::Vector2f (OriginalSize.width*Scale.x, OriginalSize.height*Scale.y);
}
bool CircleTest(const sf::Sprite& Object1, const sf::Sprite& Object2) {
sf::Vector2f Obj1Size = GetSpriteSize(Object1);
sf::Vector2f Obj2Size = GetSpriteSize(Object2);
float Radius1 = (Obj1Size.x + Obj1Size.y) / 4;
float Radius2 = (Obj2Size.x + Obj2Size.y) / 4;
sf::Vector2f Distance = GetSpriteCenter(Object1)-GetSpriteCenter(Object2);
return (Distance.x * Distance.x + Distance.y * Distance.y <= (Radius1 + Radius2) * (Radius1 + Radius2));
}
class OrientedBoundingBox // Used in the BoundingBoxTest
{
public:
OrientedBoundingBox (const sf::Sprite& Object) // Calculate the four points of the OBB from a transformed (scaled, rotated...) sprite
{
sf::Transform trans = Object.getTransform();
sf::IntRect local = Object.getTextureRect();
Points[0] = trans.transformPoint(0.f, 0.f);
Points[1] = trans.transformPoint(local.width, 0.f);
Points[2] = trans.transformPoint(local.width, local.height);
Points[3] = trans.transformPoint(0.f, local.height);
}
sf::Vector2f Points[4];
void ProjectOntoAxis (const sf::Vector2f& Axis, float& Min, float& Max) // Project all four points of the OBB onto the given axis and return the dotproducts of the two outermost points
{
Min = (Points[0].x*Axis.x+Points[0].y*Axis.y);
Max = Min;
for (int j = 1; j<4; j++)
{
float Projection = (Points[j].x*Axis.x+Points[j].y*Axis.y);
if (Projection<Min)
Min=Projection;
if (Projection>Max)
Max=Projection;
}
}
};
bool BoundingBoxTest(const sf::Sprite& Object1, const sf::Sprite& Object2) {
OrientedBoundingBox OBB1 (Object1);
OrientedBoundingBox OBB2 (Object2);
// Create the four distinct axes that are perpendicular to the edges of the two rectangles
sf::Vector2f Axes[4] = {
sf::Vector2f (OBB1.Points[1].x-OBB1.Points[0].x,
OBB1.Points[1].y-OBB1.Points[0].y),
sf::Vector2f (OBB1.Points[1].x-OBB1.Points[2].x,
OBB1.Points[1].y-OBB1.Points[2].y),
sf::Vector2f (OBB2.Points[0].x-OBB2.Points[3].x,
OBB2.Points[0].y-OBB2.Points[3].y),
sf::Vector2f (OBB2.Points[0].x-OBB2.Points[1].x,
OBB2.Points[0].y-OBB2.Points[1].y)
};
for (int i = 0; i<4; i++) // For each axis...
{
float MinOBB1, MaxOBB1, MinOBB2, MaxOBB2;
// ... project the points of both OBBs onto the axis ...
OBB1.ProjectOntoAxis(Axes[i], MinOBB1, MaxOBB1);
OBB2.ProjectOntoAxis(Axes[i], MinOBB2, MaxOBB2);
// ... and check whether the outermost projected points of both OBBs overlap.
// If this is not the case, the Separating Axis Theorem states that there can be no collision between the rectangles
if (!((MinOBB2<=MaxOBB1)&&(MaxOBB2>=MinOBB1)))
return false;
}
return true;
}
}
| [
"34993144+Mesiow@users.noreply.github.com"
] | 34993144+Mesiow@users.noreply.github.com |
1ad63d132b75c3c9f2b1ce644fef5687815e6ff3 | 212e721db6fb123434426c67a5639b5149e69eb1 | /vk_video_decoder/libs/glm/gtc/packing.hpp | 7487ed17785e96d94bd864fc0bca9cb4491a1a63 | [
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer",
"LicenseRef-scancode-unknown-license-reference",
"BSD-3-Clause",
"MIT",
"LicenseRef-scancode-kevlin-henney"
] | permissive | Jasper-Bekkers/vk_video_samples | 8aef48f431ab3cb1f374ead3525d47f38e24e1b3 | c851b02743574def866c593fe66d1dff93354e6d | refs/heads/main | 2023-04-25T04:38:53.116151 | 2021-04-23T18:00:18 | 2021-04-23T19:03:41 | 365,541,451 | 0 | 0 | Apache-2.0 | 2021-05-08T14:56:59 | 2021-05-08T14:56:59 | null | UTF-8 | C++ | false | false | 26,365 | hpp | ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net)
///
/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)
/// 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.
///
/// @ref gtc_packing
/// @file glm/gtc/packing.hpp
/// @date 2013-08-08 / 2013-08-08
/// @author Christophe Riccio
///
/// @see core (dependence)
///
/// @defgroup gtc_packing GLM_GTC_packing
/// @ingroup gtc
///
/// @brief This extension provides a set of function to convert vertors to packed
/// formats.
///
/// <glm/gtc/packing.hpp> need to be included to use these features.
///////////////////////////////////////////////////////////////////////////////////
#ifndef GLM_GTC_packing
#define GLM_GTC_packing
// Dependency:
#include "type_precision.hpp"
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
# pragma message("GLM: GLM_GTC_packing extension included")
#endif
namespace glm
{
/// @addtogroup gtc_packing
/// @{
/// First, converts the normalized floating-point value v into a 8-bit integer value.
/// Then, the results are packed into the returned 8-bit unsigned integer.
///
/// The conversion for component c of v to fixed point is done as follows:
/// packUnorm1x8: round(clamp(c, 0, +1) * 255.0)
///
/// @see gtc_packing
/// @see uint16 packUnorm2x8(vec2 const & v)
/// @see uint32 packUnorm4x8(vec4 const & v)
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packUnorm4x8.xml">GLSL packUnorm4x8 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
GLM_FUNC_DECL uint8 packUnorm1x8(float const & v);
/// Convert a single 8-bit integer to a normalized floating-point value.
///
/// The conversion for unpacked fixed-point value f to floating point is done as follows:
/// unpackUnorm4x8: f / 255.0
///
/// @see gtc_packing
/// @see vec2 unpackUnorm2x8(uint16 p)
/// @see vec4 unpackUnorm4x8(uint32 p)
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackUnorm4x8.xml">GLSL unpackUnorm4x8 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
GLM_FUNC_DECL float unpackUnorm1x8(uint8 const & p);
/// First, converts each component of the normalized floating-point value v into 8-bit integer values.
/// Then, the results are packed into the returned 16-bit unsigned integer.
///
/// The conversion for component c of v to fixed point is done as follows:
/// packUnorm2x8: round(clamp(c, 0, +1) * 255.0)
///
/// The first component of the vector will be written to the least significant bits of the output;
/// the last component will be written to the most significant bits.
///
/// @see gtc_packing
/// @see uint8 packUnorm1x8(float const & v)
/// @see uint32 packUnorm4x8(vec4 const & v)
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packUnorm4x8.xml">GLSL packUnorm4x8 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
GLM_FUNC_DECL uint16 packUnorm2x8(vec2 const & v);
/// First, unpacks a single 16-bit unsigned integer p into a pair of 8-bit unsigned integers.
/// Then, each component is converted to a normalized floating-point value to generate the returned two-component vector.
///
/// The conversion for unpacked fixed-point value f to floating point is done as follows:
/// unpackUnorm4x8: f / 255.0
///
/// The first component of the returned vector will be extracted from the least significant bits of the input;
/// the last component will be extracted from the most significant bits.
///
/// @see gtc_packing
/// @see float unpackUnorm1x8(uint8 v)
/// @see vec4 unpackUnorm4x8(uint32 p)
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackUnorm4x8.xml">GLSL unpackUnorm4x8 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
GLM_FUNC_DECL vec2 unpackUnorm2x8(uint16 const & p);
/// First, converts the normalized floating-point value v into 8-bit integer value.
/// Then, the results are packed into the returned 8-bit unsigned integer.
///
/// The conversion to fixed point is done as follows:
/// packSnorm1x8: round(clamp(s, -1, +1) * 127.0)
///
/// @see gtc_packing
/// @see uint16 packSnorm2x8(vec2 const & v)
/// @see uint32 packSnorm4x8(vec4 const & v)
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packSnorm4x8.xml">GLSL packSnorm4x8 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
GLM_FUNC_DECL uint8 packSnorm1x8(float const & s);
/// First, unpacks a single 8-bit unsigned integer p into a single 8-bit signed integers.
/// Then, the value is converted to a normalized floating-point value to generate the returned scalar.
///
/// The conversion for unpacked fixed-point value f to floating point is done as follows:
/// unpackSnorm1x8: clamp(f / 127.0, -1, +1)
///
/// @see gtc_packing
/// @see vec2 unpackSnorm2x8(uint16 p)
/// @see vec4 unpackSnorm4x8(uint32 p)
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackSnorm4x8.xml">GLSL unpackSnorm4x8 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
GLM_FUNC_DECL float unpackSnorm1x8(uint8 const & p);
/// First, converts each component of the normalized floating-point value v into 8-bit integer values.
/// Then, the results are packed into the returned 16-bit unsigned integer.
///
/// The conversion for component c of v to fixed point is done as follows:
/// packSnorm2x8: round(clamp(c, -1, +1) * 127.0)
///
/// The first component of the vector will be written to the least significant bits of the output;
/// the last component will be written to the most significant bits.
///
/// @see gtc_packing
/// @see uint8 packSnorm1x8(float const & v)
/// @see uint32 packSnorm4x8(vec4 const & v)
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packSnorm4x8.xml">GLSL packSnorm4x8 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
GLM_FUNC_DECL uint16 packSnorm2x8(vec2 const & v);
/// First, unpacks a single 16-bit unsigned integer p into a pair of 8-bit signed integers.
/// Then, each component is converted to a normalized floating-point value to generate the returned two-component vector.
///
/// The conversion for unpacked fixed-point value f to floating point is done as follows:
/// unpackSnorm2x8: clamp(f / 127.0, -1, +1)
///
/// The first component of the returned vector will be extracted from the least significant bits of the input;
/// the last component will be extracted from the most significant bits.
///
/// @see gtc_packing
/// @see float unpackSnorm1x8(uint8 p)
/// @see vec4 unpackSnorm4x8(uint32 p)
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackSnorm4x8.xml">GLSL unpackSnorm4x8 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
GLM_FUNC_DECL vec2 unpackSnorm2x8(uint16 const & p);
/// First, converts the normalized floating-point value v into a 16-bit integer value.
/// Then, the results are packed into the returned 16-bit unsigned integer.
///
/// The conversion for component c of v to fixed point is done as follows:
/// packUnorm1x16: round(clamp(c, 0, +1) * 65535.0)
///
/// @see gtc_packing
/// @see uint16 packSnorm1x16(float const & v)
/// @see uint64 packSnorm4x16(vec4 const & v)
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packUnorm4x8.xml">GLSL packUnorm4x8 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
GLM_FUNC_DECL uint16 packUnorm1x16(float const & v);
/// First, unpacks a single 16-bit unsigned integer p into a of 16-bit unsigned integers.
/// Then, the value is converted to a normalized floating-point value to generate the returned scalar.
///
/// The conversion for unpacked fixed-point value f to floating point is done as follows:
/// unpackUnorm1x16: f / 65535.0
///
/// @see gtc_packing
/// @see vec2 unpackUnorm2x16(uint32 p)
/// @see vec4 unpackUnorm4x16(uint64 p)
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackUnorm2x16.xml">GLSL unpackUnorm2x16 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
GLM_FUNC_DECL float unpackUnorm1x16(uint16 const & p);
/// First, converts each component of the normalized floating-point value v into 16-bit integer values.
/// Then, the results are packed into the returned 64-bit unsigned integer.
///
/// The conversion for component c of v to fixed point is done as follows:
/// packUnorm4x16: round(clamp(c, 0, +1) * 65535.0)
///
/// The first component of the vector will be written to the least significant bits of the output;
/// the last component will be written to the most significant bits.
///
/// @see gtc_packing
/// @see uint16 packUnorm1x16(float const & v)
/// @see uint32 packUnorm2x16(vec2 const & v)
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packUnorm4x8.xml">GLSL packUnorm4x8 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
GLM_FUNC_DECL uint64 packUnorm4x16(vec4 const & v);
/// First, unpacks a single 64-bit unsigned integer p into four 16-bit unsigned integers.
/// Then, each component is converted to a normalized floating-point value to generate the returned four-component vector.
///
/// The conversion for unpacked fixed-point value f to floating point is done as follows:
/// unpackUnormx4x16: f / 65535.0
///
/// The first component of the returned vector will be extracted from the least significant bits of the input;
/// the last component will be extracted from the most significant bits.
///
/// @see gtc_packing
/// @see float unpackUnorm1x16(uint16 p)
/// @see vec2 unpackUnorm2x16(uint32 p)
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackUnorm2x16.xml">GLSL unpackUnorm2x16 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
GLM_FUNC_DECL vec4 unpackUnorm4x16(uint64 const & p);
/// First, converts the normalized floating-point value v into 16-bit integer value.
/// Then, the results are packed into the returned 16-bit unsigned integer.
///
/// The conversion to fixed point is done as follows:
/// packSnorm1x8: round(clamp(s, -1, +1) * 32767.0)
///
/// @see gtc_packing
/// @see uint32 packSnorm2x16(vec2 const & v)
/// @see uint64 packSnorm4x16(vec4 const & v)
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packSnorm4x8.xml">GLSL packSnorm4x8 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
GLM_FUNC_DECL uint16 packSnorm1x16(float const & v);
/// First, unpacks a single 16-bit unsigned integer p into a single 16-bit signed integers.
/// Then, each component is converted to a normalized floating-point value to generate the returned scalar.
///
/// The conversion for unpacked fixed-point value f to floating point is done as follows:
/// unpackSnorm1x16: clamp(f / 32767.0, -1, +1)
///
/// @see gtc_packing
/// @see vec2 unpackSnorm2x16(uint32 p)
/// @see vec4 unpackSnorm4x16(uint64 p)
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackSnorm1x16.xml">GLSL unpackSnorm4x8 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
GLM_FUNC_DECL float unpackSnorm1x16(uint16 const & p);
/// First, converts each component of the normalized floating-point value v into 16-bit integer values.
/// Then, the results are packed into the returned 64-bit unsigned integer.
///
/// The conversion for component c of v to fixed point is done as follows:
/// packSnorm2x8: round(clamp(c, -1, +1) * 32767.0)
///
/// The first component of the vector will be written to the least significant bits of the output;
/// the last component will be written to the most significant bits.
///
/// @see gtc_packing
/// @see uint16 packSnorm1x16(float const & v)
/// @see uint32 packSnorm2x16(vec2 const & v)
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packSnorm4x8.xml">GLSL packSnorm4x8 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
GLM_FUNC_DECL uint64 packSnorm4x16(vec4 const & v);
/// First, unpacks a single 64-bit unsigned integer p into four 16-bit signed integers.
/// Then, each component is converted to a normalized floating-point value to generate the returned four-component vector.
///
/// The conversion for unpacked fixed-point value f to floating point is done as follows:
/// unpackSnorm4x16: clamp(f / 32767.0, -1, +1)
///
/// The first component of the returned vector will be extracted from the least significant bits of the input;
/// the last component will be extracted from the most significant bits.
///
/// @see gtc_packing
/// @see float unpackSnorm1x16(uint16 p)
/// @see vec2 unpackSnorm2x16(uint32 p)
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackSnorm2x16.xml">GLSL unpackSnorm4x8 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
GLM_FUNC_DECL vec4 unpackSnorm4x16(uint64 const & p);
/// Returns an unsigned integer obtained by converting the components of a floating-point scalar
/// to the 16-bit floating-point representation found in the OpenGL Specification,
/// and then packing this 16-bit value into a 16-bit unsigned integer.
///
/// @see gtc_packing
/// @see uint32 packHalf2x16(vec2 const & v)
/// @see uint64 packHalf4x16(vec4 const & v)
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packHalf2x16.xml">GLSL packHalf2x16 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
GLM_FUNC_DECL uint16 packHalf1x16(float const & v);
/// Returns a floating-point scalar with components obtained by unpacking a 16-bit unsigned integer into a 16-bit value,
/// interpreted as a 16-bit floating-point number according to the OpenGL Specification,
/// and converting it to 32-bit floating-point values.
///
/// @see gtc_packing
/// @see vec2 unpackHalf2x16(uint32 const & v)
/// @see vec4 unpackHalf4x16(uint64 const & v)
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackHalf2x16.xml">GLSL unpackHalf2x16 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
GLM_FUNC_DECL float unpackHalf1x16(uint16 const & v);
/// Returns an unsigned integer obtained by converting the components of a four-component floating-point vector
/// to the 16-bit floating-point representation found in the OpenGL Specification,
/// and then packing these four 16-bit values into a 64-bit unsigned integer.
/// The first vector component specifies the 16 least-significant bits of the result;
/// the forth component specifies the 16 most-significant bits.
///
/// @see gtc_packing
/// @see uint16 packHalf1x16(float const & v)
/// @see uint32 packHalf2x16(vec2 const & v)
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packHalf2x16.xml">GLSL packHalf2x16 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
GLM_FUNC_DECL uint64 packHalf4x16(vec4 const & v);
/// Returns a four-component floating-point vector with components obtained by unpacking a 64-bit unsigned integer into four 16-bit values,
/// interpreting those values as 16-bit floating-point numbers according to the OpenGL Specification,
/// and converting them to 32-bit floating-point values.
/// The first component of the vector is obtained from the 16 least-significant bits of v;
/// the forth component is obtained from the 16 most-significant bits of v.
///
/// @see gtc_packing
/// @see float unpackHalf1x16(uint16 const & v)
/// @see vec2 unpackHalf2x16(uint32 const & v)
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackHalf2x16.xml">GLSL unpackHalf2x16 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
GLM_FUNC_DECL vec4 unpackHalf4x16(uint64 const & p);
/// Returns an unsigned integer obtained by converting the components of a four-component signed integer vector
/// to the 10-10-10-2-bit signed integer representation found in the OpenGL Specification,
/// and then packing these four values into a 32-bit unsigned integer.
/// The first vector component specifies the 10 least-significant bits of the result;
/// the forth component specifies the 2 most-significant bits.
///
/// @see gtc_packing
/// @see uint32 packI3x10_1x2(uvec4 const & v)
/// @see uint32 packSnorm3x10_1x2(vec4 const & v)
/// @see uint32 packUnorm3x10_1x2(vec4 const & v)
/// @see ivec4 unpackI3x10_1x2(uint32 const & p)
GLM_FUNC_DECL uint32 packI3x10_1x2(ivec4 const & v);
/// Unpacks a single 32-bit unsigned integer p into three 10-bit and one 2-bit signed integers.
///
/// The first component of the returned vector will be extracted from the least significant bits of the input;
/// the last component will be extracted from the most significant bits.
///
/// @see gtc_packing
/// @see uint32 packU3x10_1x2(uvec4 const & v)
/// @see vec4 unpackSnorm3x10_1x2(uint32 const & p);
/// @see uvec4 unpackI3x10_1x2(uint32 const & p);
GLM_FUNC_DECL ivec4 unpackI3x10_1x2(uint32 const & p);
/// Returns an unsigned integer obtained by converting the components of a four-component unsigned integer vector
/// to the 10-10-10-2-bit unsigned integer representation found in the OpenGL Specification,
/// and then packing these four values into a 32-bit unsigned integer.
/// The first vector component specifies the 10 least-significant bits of the result;
/// the forth component specifies the 2 most-significant bits.
///
/// @see gtc_packing
/// @see uint32 packI3x10_1x2(ivec4 const & v)
/// @see uint32 packSnorm3x10_1x2(vec4 const & v)
/// @see uint32 packUnorm3x10_1x2(vec4 const & v)
/// @see ivec4 unpackU3x10_1x2(uint32 const & p)
GLM_FUNC_DECL uint32 packU3x10_1x2(uvec4 const & v);
/// Unpacks a single 32-bit unsigned integer p into three 10-bit and one 2-bit unsigned integers.
///
/// The first component of the returned vector will be extracted from the least significant bits of the input;
/// the last component will be extracted from the most significant bits.
///
/// @see gtc_packing
/// @see uint32 packU3x10_1x2(uvec4 const & v)
/// @see vec4 unpackSnorm3x10_1x2(uint32 const & p);
/// @see uvec4 unpackI3x10_1x2(uint32 const & p);
GLM_FUNC_DECL uvec4 unpackU3x10_1x2(uint32 const & p);
/// First, converts the first three components of the normalized floating-point value v into 10-bit signed integer values.
/// Then, converts the forth component of the normalized floating-point value v into 2-bit signed integer values.
/// Then, the results are packed into the returned 32-bit unsigned integer.
///
/// The conversion for component c of v to fixed point is done as follows:
/// packSnorm3x10_1x2(xyz): round(clamp(c, -1, +1) * 511.0)
/// packSnorm3x10_1x2(w): round(clamp(c, -1, +1) * 1.0)
///
/// The first vector component specifies the 10 least-significant bits of the result;
/// the forth component specifies the 2 most-significant bits.
///
/// @see gtc_packing
/// @see vec4 unpackSnorm3x10_1x2(uint32 const & p)
/// @see uint32 packUnorm3x10_1x2(vec4 const & v)
/// @see uint32 packU3x10_1x2(uvec4 const & v)
/// @see uint32 packI3x10_1x2(ivec4 const & v)
GLM_FUNC_DECL uint32 packSnorm3x10_1x2(vec4 const & v);
/// First, unpacks a single 32-bit unsigned integer p into four 16-bit signed integers.
/// Then, each component is converted to a normalized floating-point value to generate the returned four-component vector.
///
/// The conversion for unpacked fixed-point value f to floating point is done as follows:
/// unpackSnorm3x10_1x2(xyz): clamp(f / 511.0, -1, +1)
/// unpackSnorm3x10_1x2(w): clamp(f / 511.0, -1, +1)
///
/// The first component of the returned vector will be extracted from the least significant bits of the input;
/// the last component will be extracted from the most significant bits.
///
/// @see gtc_packing
/// @see uint32 packSnorm3x10_1x2(vec4 const & v)
/// @see vec4 unpackUnorm3x10_1x2(uint32 const & p))
/// @see uvec4 unpackI3x10_1x2(uint32 const & p)
/// @see uvec4 unpackU3x10_1x2(uint32 const & p)
GLM_FUNC_DECL vec4 unpackSnorm3x10_1x2(uint32 const & p);
/// First, converts the first three components of the normalized floating-point value v into 10-bit unsigned integer values.
/// Then, converts the forth component of the normalized floating-point value v into 2-bit signed uninteger values.
/// Then, the results are packed into the returned 32-bit unsigned integer.
///
/// The conversion for component c of v to fixed point is done as follows:
/// packUnorm3x10_1x2(xyz): round(clamp(c, 0, +1) * 1023.0)
/// packUnorm3x10_1x2(w): round(clamp(c, 0, +1) * 3.0)
///
/// The first vector component specifies the 10 least-significant bits of the result;
/// the forth component specifies the 2 most-significant bits.
///
/// @see gtc_packing
/// @see vec4 unpackUnorm3x10_1x2(uint32 const & p)
/// @see uint32 packUnorm3x10_1x2(vec4 const & v)
/// @see uint32 packU3x10_1x2(uvec4 const & v)
/// @see uint32 packI3x10_1x2(ivec4 const & v)
GLM_FUNC_DECL uint32 packUnorm3x10_1x2(vec4 const & v);
/// First, unpacks a single 32-bit unsigned integer p into four 16-bit signed integers.
/// Then, each component is converted to a normalized floating-point value to generate the returned four-component vector.
///
/// The conversion for unpacked fixed-point value f to floating point is done as follows:
/// unpackSnorm3x10_1x2(xyz): clamp(f / 1023.0, 0, +1)
/// unpackSnorm3x10_1x2(w): clamp(f / 3.0, 0, +1)
///
/// The first component of the returned vector will be extracted from the least significant bits of the input;
/// the last component will be extracted from the most significant bits.
///
/// @see gtc_packing
/// @see uint32 packSnorm3x10_1x2(vec4 const & v)
/// @see vec4 unpackInorm3x10_1x2(uint32 const & p))
/// @see uvec4 unpackI3x10_1x2(uint32 const & p)
/// @see uvec4 unpackU3x10_1x2(uint32 const & p)
GLM_FUNC_DECL vec4 unpackUnorm3x10_1x2(uint32 const & p);
/// First, converts the first two components of the normalized floating-point value v into 11-bit signless floating-point values.
/// Then, converts the third component of the normalized floating-point value v into a 10-bit signless floating-point value.
/// Then, the results are packed into the returned 32-bit unsigned integer.
///
/// The first vector component specifies the 11 least-significant bits of the result;
/// the last component specifies the 10 most-significant bits.
///
/// @see gtc_packing
/// @see vec3 unpackF2x11_1x10(uint32 const & p)
GLM_FUNC_DECL uint32 packF2x11_1x10(vec3 const & v);
/// First, unpacks a single 32-bit unsigned integer p into two 11-bit signless floating-point values and one 10-bit signless floating-point value .
/// Then, each component is converted to a normalized floating-point value to generate the returned three-component vector.
///
/// The first component of the returned vector will be extracted from the least significant bits of the input;
/// the last component will be extracted from the most significant bits.
///
/// @see gtc_packing
/// @see uint32 packF2x11_1x10(vec3 const & v)
GLM_FUNC_DECL vec3 unpackF2x11_1x10(uint32 const & p);
/// @}
}// namespace glm
#include "packing.inl"
#endif//GLM_GTC_packing
| [
"tzlatinski@nvidia.com"
] | tzlatinski@nvidia.com |
0b4e3a680b3870cf244efadd530a62f46d2877c1 | efdc2602bde02757dc64f35d0acc9d7a660bbc9b | /PdbStream.h | 88161c9050abd5b24b9d99397dd369c2b1b6c241 | [] | no_license | acekiller/MobiReader | a888ccfaa87c18047f5c11f82298978ec44a5958 | 75161b62da899b206c244a74917e6e042306b86e | refs/heads/master | 2016-09-06T09:32:19.806030 | 2009-12-29T21:00:49 | 2009-12-29T21:00:49 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 155 | h | #ifndef PDBSTREAM_H
#define PDBSTREAM_H
#include <QDataStream>
class PdbStream : public QDataStream
{
public:
PdbStream();
};
#endif // PDBSTREAM_H
| [
"patryk@debian.org"
] | patryk@debian.org |
e13840e009b9ffcc1274404fbfd5ad9929170b12 | f212dfc76ed285c51cfe9870a8c1e6e6d111f965 | /src/hems/modules/training/main.cpp | d32d88288e012d44728ea1de78f4d521eff84ba4 | [
"MIT"
] | permissive | somniferume/HEMS-1 | 16898b8de377c71f0070193241bb81be5a8b947e | 94ffd85a050211efc6ef785b873ee39e906a8b78 | refs/heads/master | 2023-05-13T12:01:22.569136 | 2021-06-05T22:00:00 | 2021-06-05T22:00:00 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,188 | cpp | /*
* Copyright (c) 2020-2021 Adrian Georg Herrmann
*
* This is the Model Training Module.
* This module is responsible for training of the energy production model. The model can be trained
* on a schedule or by request.
*/
#include <iostream>
#include <string>
#include <vector>
#include "hems/modules/training/training.h"
#include "hems/common/logger.h"
#include "hems/common/exit.h"
int main(int argc, char* argv[]) {
using namespace hems::modules::training;
bool debug = false;
std::string valid_args =
"--help, -h Get a list of permitted arguments.\n"
"--debug, -d Launch with the debug configuration.\n"
" This will log and print debug messages.\n";
for (int i = 1; i < argc; ++i) {
std::string arg = std::string(argv[i]);
if (arg == "--help" || arg == "-h") {
std::cout << valid_args;
return EXIT_FAILURE;
} else if (arg == "--debug" || arg == "-d") {
debug = true;
} else {
std::cout << "Invalid usage, permitted arguments are:\n\n" + valid_args;
return EXIT_FAILURE;
}
}
hems::logger::this_logger = new hems::remote_logger(hems_training::module_type, debug);
/* Register signal handlers to ensure that destructors are called before termination. */
signal(SIGTERM, hems::signal_handler);
signal(SIGQUIT, hems::signal_handler);
signal(SIGINT, hems::signal_handler);
try {
hems_training::this_instance = new hems_training(false);
/* The main thread remains blocked until the exit semaphore is notified through a call to
the `exit()` function, whereupon the thread leaves this block and the program terminates. */
hems::exit_sem.wait();
} catch (int err) {
hems::logger::this_logger->log(
"FATAL: Could not start instance of " +
hems::modules::to_string_extended(hems_training::module_type) + ".",
hems::logger::level::ERR
);
hems::exit(err);
}
delete hems_training::this_instance;
delete hems::logger::this_logger;
return hems::exit_status;
}
| [
"adrian.ghc@outlook.com"
] | adrian.ghc@outlook.com |
b83a7f4ac5d18d2c8361ebbb41efdcec639d4b58 | a5a7c59b04a1a64fe34653c7970c3cf173f9c1df | /externals/numeric_bindings/libs/numeric/bindings/tools/templates/auxiliary/langb.hpp | 6b53175a2bac3c9fe88f58cbeeb99d65eebdf24c | [
"BSL-1.0",
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | siconos/siconos | a7afdba41a2bc1192ad8dcd93ac7266fa281f4cf | 82a8d1338bfc1be0d36b5e8a9f40c1ad5384a641 | refs/heads/master | 2023-08-21T22:22:55.625941 | 2023-07-17T13:07:32 | 2023-07-17T13:07:32 | 37,709,357 | 166 | 33 | Apache-2.0 | 2023-07-17T12:31:16 | 2015-06-19T07:55:53 | C | UTF-8 | C++ | false | false | 181 | hpp | $TEMPLATE[langb.all.min_size_work.args]
NORM,N
$TEMPLATE[langb.all.min_size_work]
if ( norm == 'I' )
return std::max< $INTEGER_TYPE >( 1, n );
else
return 1;
$TEMPLATE[end]
| [
"franck.perignon@imag.fr"
] | franck.perignon@imag.fr |
5bf82fdea1b6f00152c36ec515c7b86d901aae9c | 570274df26c3b552755cd8ea13eca7a25eec3cba | /src/transactions/test/TxEnvelopeTests.cpp | 7572b8524f2df963bc2c058955ce36d86f660465 | [
"Apache-2.0",
"MIT",
"BSD-3-Clause",
"BSL-1.0",
"LicenseRef-scancode-public-domain",
"BSD-2-Clause"
] | permissive | thanigaivel97/stellar-core | e60ae13f8788b08b61942f9133886226cb662eb9 | 63ec6faa7e08ec070af3027c93ddf67310508b15 | refs/heads/main | 2023-08-16T21:50:00.335422 | 2020-11-19T10:29:15 | 2020-11-19T10:29:15 | 312,177,357 | 0 | 0 | NOASSERTION | 2023-08-02T16:07:12 | 2020-11-12T05:32:25 | C | UTF-8 | C++ | false | false | 92,342 | cpp | // Copyright 2014 Stellar Development Foundation and contributors. Licensed
// under the Apache License, Version 2.0. See the COPYING file at the root
// of this distribution or at http://www.apache.org/licenses/LICENSE-2.0
#include "crypto/Hex.h"
#include "crypto/Random.h"
#include "crypto/SignerKey.h"
#include "crypto/SignerKeyUtils.h"
#include "ledger/LedgerManager.h"
#include "ledger/LedgerTxn.h"
#include "ledger/LedgerTxnEntry.h"
#include "ledger/LedgerTxnHeader.h"
#include "lib/catch.hpp"
#include "lib/json/json.h"
#include "main/Application.h"
#include "test/TestAccount.h"
#include "test/TestExceptions.h"
#include "test/TestUtils.h"
#include "test/TxTests.h"
#include "test/test.h"
#include "transactions/CreateAccountOpFrame.h"
#include "transactions/ManageSellOfferOpFrame.h"
#include "transactions/MergeOpFrame.h"
#include "transactions/PaymentOpFrame.h"
#include "transactions/SetOptionsOpFrame.h"
#include "transactions/SignatureUtils.h"
#include "transactions/TransactionBridge.h"
#include "transactions/TransactionUtils.h"
#include "transactions/test/SponsorshipTestUtils.h"
#include "util/Logging.h"
#include "util/Timer.h"
using namespace stellar;
using namespace stellar::txbridge;
using namespace stellar::txtest;
/*
Tests that are testing the common envelope used in transactions.
Things like:
authz/authn
double spend
*/
TEST_CASE("txenvelope", "[tx][envelope]")
{
Config cfg = getTestConfig();
// Do our setup in version 1 so that for_all_versions below does not
// try to downgrade us from >1 to 1.
cfg.USE_CONFIG_FOR_GENESIS = false;
VirtualClock clock;
auto app = createTestApplication(clock, cfg);
app->start();
// set up world
auto root = TestAccount::createRoot(*app);
const int64_t paymentAmount = app->getLedgerManager().getLastReserve() * 10;
SECTION("outer envelope")
{
auto a1 = TestAccount{*app, getAccount("A")};
SECTION("no signature")
{
for_versions_from({1, 2, 3, 4, 5, 6, 8}, *app, [&] {
auto txFrame =
root.tx({createAccount(a1.getPublicKey(), paymentAmount)});
getSignatures(txFrame).clear();
applyCheck(txFrame, *app);
REQUIRE(txFrame->getResultCode() == txBAD_AUTH);
});
for_versions({7}, *app, [&] {
auto txFrame =
root.tx({createAccount(a1.getPublicKey(), paymentAmount)});
getSignatures(txFrame).clear();
applyCheck(txFrame, *app);
REQUIRE(txFrame->getResultCode() == txSUCCESS);
});
}
SECTION("bad signature")
{
for_versions_from({1, 2, 3, 4, 5, 6, 8}, *app, [&] {
auto txFrame =
root.tx({createAccount(a1.getPublicKey(), paymentAmount)});
getSignatures(txFrame)[0].signature = Signature(32, 123);
applyCheck(txFrame, *app);
REQUIRE(txFrame->getResultCode() == txBAD_AUTH);
});
for_versions({7}, *app, [&] {
auto txFrame =
root.tx({createAccount(a1.getPublicKey(), paymentAmount)});
getSignatures(txFrame)[0].signature = Signature(32, 123);
applyCheck(txFrame, *app);
REQUIRE(txFrame->getResultCode() == txSUCCESS);
});
}
SECTION("bad signature (wrong hint)")
{
for_versions_from({1, 2, 3, 4, 5, 6, 8}, *app, [&] {
auto txFrame =
root.tx({createAccount(a1.getPublicKey(), paymentAmount)});
getSignatures(txFrame)[0].hint.fill(1);
applyCheck(txFrame, *app);
REQUIRE(txFrame->getResultCode() == txBAD_AUTH);
});
for_versions({7}, *app, [&] {
auto txFrame =
root.tx({createAccount(a1.getPublicKey(), paymentAmount)});
getSignatures(txFrame)[0].hint.fill(1);
applyCheck(txFrame, *app);
REQUIRE(txFrame->getResultCode() == txSUCCESS);
});
}
SECTION("too many signatures (signed twice)")
{
for_versions_from({1, 2, 3, 4, 5, 6, 8}, *app, [&] {
auto txFrame =
root.tx({createAccount(a1.getPublicKey(), paymentAmount)});
txFrame->addSignature(a1);
applyCheck(txFrame, *app);
REQUIRE(txFrame->getResultCode() == txBAD_AUTH_EXTRA);
});
for_versions({7}, *app, [&] {
auto txFrame =
root.tx({createAccount(a1.getPublicKey(), paymentAmount)});
txFrame->addSignature(a1);
applyCheck(txFrame, *app);
REQUIRE(txFrame->getResultCode() == txSUCCESS);
});
}
SECTION("too many signatures (unused signature)")
{
for_versions_from({1, 2, 3, 4, 5, 6, 8}, *app, [&] {
auto txFrame =
root.tx({createAccount(a1.getPublicKey(), paymentAmount)});
SecretKey bogus = getAccount("bogus");
txFrame->addSignature(bogus);
applyCheck(txFrame, *app);
REQUIRE(txFrame->getResultCode() == txBAD_AUTH_EXTRA);
});
for_versions({7}, *app, [&] {
auto txFrame =
root.tx({createAccount(a1.getPublicKey(), paymentAmount)});
SecretKey bogus = getAccount("bogus");
txFrame->addSignature(bogus);
applyCheck(txFrame, *app);
REQUIRE(txFrame->getResultCode() == txSUCCESS);
});
}
}
SECTION("multisig")
{
auto a1 = root.create("A", paymentAmount);
auto s1 = getAccount("S1");
auto sk1 = makeSigner(s1, 5);
auto th = setMasterWeight(100) | setLowThreshold(10) |
setMedThreshold(50) | setHighThreshold(100);
a1.setOptions(th | setSigner(sk1));
auto s2 = getAccount("S2");
auto sk2 = makeSigner(s2, 95); // med rights account
a1.setOptions(setSigner(sk2));
SECTION("not enough rights (envelope)")
{
for_all_versions_except({7}, *app, [&] {
auto tx = a1.tx({payment(root, 1000)});
// only sign with s1
getSignatures(tx).clear();
tx->addSignature(s1);
applyCheck(tx, *app);
REQUIRE(tx->getResultCode() == txBAD_AUTH);
});
for_versions({7}, *app, [&] {
auto tx = a1.tx({payment(root, 1000)});
// only sign with s1
getSignatures(tx).clear();
tx->addSignature(s1);
applyCheck(tx, *app);
REQUIRE(tx->getResultCode() == txSUCCESS);
});
}
SECTION("not enough rights (operation, together)")
{
for_all_versions_except({7}, *app, [&] {
// updating thresholds requires high
auto tx = a1.tx({setOptions(th | setSigner(sk1))});
// only sign with s2 (med)
getSignatures(tx).clear();
tx->addSignature(s2);
applyCheck(tx, *app);
REQUIRE(tx->getResultCode() == txFAILED);
REQUIRE(getFirstResultCode(*tx) == opBAD_AUTH);
});
for_versions({7}, *app, [&] {
// updating thresholds requires high
auto tx = a1.tx({setOptions(th | setSigner(sk1))});
// only sign with s2 (med)
getSignatures(tx).clear();
tx->addSignature(s2);
applyCheck(tx, *app);
REQUIRE(tx->getResultCode() == txSUCCESS);
});
}
SECTION("not enough rights (first thresholds)")
{
for_all_versions_except({7}, *app, [&] {
// updating thresholds requires high
auto tx = a1.tx({setOptions(th), setOptions(setSigner(sk1))});
// only sign with s2 (med)
getSignatures(tx).clear();
tx->addSignature(s2);
applyCheck(tx, *app);
REQUIRE(tx->getResultCode() == txFAILED);
REQUIRE(getFirstResultCode(*tx) == opBAD_AUTH);
});
for_versions({7}, *app, [&] {
// updating thresholds requires high
auto tx = a1.tx({setOptions(th), setOptions(setSigner(sk1))});
// only sign with s2 (med)
getSignatures(tx).clear();
tx->addSignature(s2);
applyCheck(tx, *app);
REQUIRE(tx->getResultCode() == txSUCCESS);
});
}
SECTION("not enough rights (first signer)")
{
for_all_versions_except({7}, *app, [&] {
// updating thresholds requires high
auto tx = a1.tx({setOptions(setSigner(sk1)), setOptions(th)});
// only sign with s2 (med)
getSignatures(tx).clear();
tx->addSignature(s2);
applyCheck(tx, *app);
REQUIRE(tx->getResultCode() == txFAILED);
REQUIRE(getFirstResultCode(*tx) == opBAD_AUTH);
});
for_versions({7}, *app, [&] {
// updating thresholds requires high
auto tx = a1.tx({setOptions(setSigner(sk1)), setOptions(th)});
// only sign with s2 (med)
getSignatures(tx).clear();
tx->addSignature(s2);
applyCheck(tx, *app);
REQUIRE(tx->getResultCode() == txSUCCESS);
});
}
SECTION("success two signatures, together")
{
for_all_versions(*app, [&] {
// updating thresholds requires high
auto tx = a1.tx({setOptions(th | setSigner(sk1))});
getSignatures(tx).clear();
tx->addSignature(s1);
tx->addSignature(s2);
applyCheck(tx, *app);
REQUIRE(tx->getResultCode() == txSUCCESS);
REQUIRE(SetOptionsOpFrame::getInnerCode(getFirstResult(*tx)) ==
SET_OPTIONS_SUCCESS);
});
}
SECTION("success two signatures, first thresholds")
{
for_all_versions(*app, [&] {
// updating thresholds requires high
auto tx = a1.tx({setOptions(th), setOptions(setSigner(sk1))});
getSignatures(tx).clear();
tx->addSignature(s1);
tx->addSignature(s2);
applyCheck(tx, *app);
REQUIRE(tx->getResultCode() == txSUCCESS);
REQUIRE(SetOptionsOpFrame::getInnerCode(getFirstResult(*tx)) ==
SET_OPTIONS_SUCCESS);
});
}
SECTION("success two signatures, first signer")
{
for_all_versions(*app, [&] {
// updating thresholds requires high
auto tx = a1.tx({setOptions(setSigner(sk1)), setOptions(th)});
getSignatures(tx).clear();
tx->addSignature(s1);
tx->addSignature(s2);
applyCheck(tx, *app);
REQUIRE(tx->getResultCode() == txSUCCESS);
REQUIRE(SetOptionsOpFrame::getInnerCode(getFirstResult(*tx)) ==
SET_OPTIONS_SUCCESS);
});
}
SECTION("without master key")
{
a1.setOptions(setMasterWeight(0));
auto checkPayment = [&](bool withMaster,
TransactionResultCode expectedRes) {
for_all_versions_except({7}, *app, [&] {
// payment requires medium
auto tx = a1.tx({payment(root, 1000)});
// only sign with s2 (med)
if (!withMaster)
{
getSignatures(tx).clear();
}
tx->addSignature(s2);
applyCheck(tx, *app);
REQUIRE(tx->getResultCode() == expectedRes);
});
};
SECTION("good tx")
{
checkPayment(false, txSUCCESS);
}
SECTION("master key is extra")
{
checkPayment(true, txBAD_AUTH_EXTRA);
}
}
SECTION("account locked down")
{
root.setOptions(setMasterWeight(0));
for_versions_from(8, *app, [&] {
REQUIRE_THROWS_AS(root.pay(root, 1000), ex_txBAD_AUTH);
});
}
SECTION("do not allow duplicate signature")
{
for_versions_from({1, 2, 3, 4, 5, 6, 8}, *app, [&] {
auto tx = a1.tx({payment(root, 1000)});
getSignatures(tx).clear();
for (auto i = 0; i < 10; i++)
tx->addSignature(s1);
applyCheck(tx, *app);
REQUIRE(tx->getResultCode() == txBAD_AUTH);
});
for_versions({7}, *app, [&] {
auto tx = a1.tx({payment(root, 1000)});
getSignatures(tx).clear();
for (auto i = 0; i < 10; i++)
tx->addSignature(s1);
applyCheck(tx, *app);
REQUIRE(tx->getResultCode() == txSUCCESS);
});
}
}
SECTION("alternative signatures")
{
auto a1 = root.create("A", paymentAmount);
struct AltSignature
{
std::string name;
bool autoRemove;
std::function<SignerKey(TransactionFrame&)> createSigner;
std::function<void(TransactionFrame&)> sign;
};
// ensue that hash(x) supports 0 inside 'x'
auto x = std::vector<uint8_t>{'a', 'b', 'c', 0, 'd', 'e', 'f', 0,
0, 0, 'g', 'h', 'i', 'j', 'k', 'l',
'A', 'B', 'C', 0, 'D', 'E', 'F', 0,
0, 0, 'G', 'H', 'I', 'J', 'K', 'L'};
auto alternatives = std::vector<AltSignature>{
AltSignature{"hash tx", true,
[](TransactionFrame& tx) {
tx.clearCached();
return SignerKeyUtils::preAuthTxKey(tx);
},
[](TransactionFrame&) {}},
AltSignature{
"hash x", false,
[x](TransactionFrame&) { return SignerKeyUtils::hashXKey(x); },
[x](TransactionFrame& tx) {
tx.addSignature(SignatureUtils::signHashX(x));
}}};
for (auto const& alternative : alternatives)
{
SECTION(alternative.name)
{
for_versions_to(2, *app, [&] {
auto tx = a1.tx({payment(root, 1000)});
getSignatures(tx).clear();
setSeqNum(tx, tx->getSeqNum() + 1);
a1.setSequenceNumber(a1.getLastSequenceNumber() - 1);
SignerKey sk = alternative.createSigner(*tx);
Signer sk1(sk, 1);
REQUIRE_THROWS_AS(a1.setOptions(setSigner(sk1)),
ex_SET_OPTIONS_BAD_SIGNER);
});
SECTION("single signature")
{
SECTION("invalid seq nr")
{
TransactionFramePtr tx;
auto setup = [&]() {
tx = a1.tx({payment(root, 1000)});
a1.setSequenceNumber(a1.getLastSequenceNumber() -
1);
getSignatures(tx).clear();
SignerKey sk = alternative.createSigner(*tx);
Signer sk1(sk, 1);
a1.setOptions(setSigner(sk1));
REQUIRE(getAccountSigners(a1, *app).size() == 1);
alternative.sign(*tx);
};
for_versions(3, 9, *app, [&] {
setup();
{
LedgerTxn ltx(app->getLedgerTxnRoot());
REQUIRE(!tx->checkValid(ltx, 0, 0, 0));
}
REQUIRE(tx->getResultCode() == txBAD_SEQ);
REQUIRE(getAccountSigners(a1, *app).size() == 1);
});
for_versions(10, 12, *app, [&] {
setup();
applyCheck(tx, *app);
REQUIRE(tx->getResultCode() == txBAD_SEQ);
REQUIRE(getAccountSigners(a1, *app).size() == 1);
});
for_versions_from(13, *app, [&] {
setup();
applyCheck(tx, *app);
REQUIRE(tx->getResultCode() == txBAD_SEQ);
REQUIRE(getAccountSigners(a1, *app).size() ==
(alternative.autoRemove ? 0 : 1));
});
}
SECTION("invalid signature")
{
TransactionFramePtr tx;
auto setup = [&]() {
tx = a1.tx({payment(root, 1000)});
getSignatures(tx).clear();
setSeqNum(tx, tx->getSeqNum() + 1);
a1.setSequenceNumber(a1.getLastSequenceNumber() -
1);
SignerKey sk = alternative.createSigner(*tx);
KeyFunctions<SignerKey>::getKeyValue(sk)[0] ^= 0x01;
Signer sk1(sk, 1);
a1.setOptions(setSigner(sk1));
REQUIRE(getAccountSigners(a1, *app).size() == 1);
alternative.sign(*tx);
};
for_versions_from({3, 4, 5, 6, 8}, *app, [&] {
setup();
applyCheck(tx, *app);
REQUIRE(tx->getResultCode() == txBAD_AUTH);
REQUIRE(getAccountSigners(a1, *app).size() == 1);
});
for_versions({7}, *app, [&] {
setup();
applyCheck(tx, *app);
REQUIRE(tx->getResultCode() == txSUCCESS);
REQUIRE(getAccountSigners(a1, *app).size() == 1);
});
}
SECTION("too many signatures (signed by owner)")
{
TransactionFramePtr tx;
auto setup = [&]() {
tx = a1.tx({payment(root, 1000)});
setSeqNum(tx, tx->getSeqNum() + 1);
a1.setSequenceNumber(a1.getLastSequenceNumber() -
1);
SignerKey sk = alternative.createSigner(*tx);
Signer sk1(sk, 1);
a1.setOptions(setSigner(sk1));
REQUIRE(getAccountSigners(a1, *app).size() == 1);
alternative.sign(*tx);
};
for_versions({3, 4, 5, 6, 8, 9}, *app, [&] {
setup();
applyCheck(tx, *app);
REQUIRE(tx->getResultCode() == txBAD_AUTH_EXTRA);
REQUIRE(getAccountSigners(a1, *app).size() == 1);
});
for_versions({7}, *app, [&] {
setup();
applyCheck(tx, *app);
REQUIRE(tx->getResultCode() == txSUCCESS);
REQUIRE(getAccountSigners(a1, *app).size() == 1);
});
for_versions_from(10, *app, [&] {
setup();
applyCheck(tx, *app);
REQUIRE(tx->getResultCode() == txBAD_AUTH_EXTRA);
REQUIRE(getAccountSigners(a1, *app).size() ==
(alternative.autoRemove ? 0 : 1));
});
}
SECTION("success")
{
TransactionFramePtr tx;
auto setup = [&]() {
tx = a1.tx({payment(root, 1000)});
getSignatures(tx).clear();
setSeqNum(tx, tx->getSeqNum() + 1);
a1.setSequenceNumber(a1.getLastSequenceNumber() -
1);
SignerKey sk = alternative.createSigner(*tx);
Signer sk1(sk, 1);
a1.setOptions(setSigner(sk1));
REQUIRE(getAccountSigners(a1, *app).size() == 1);
alternative.sign(*tx);
};
for_versions_from({3, 4, 5, 6, 8}, *app, [&] {
setup();
applyCheck(tx, *app);
REQUIRE(tx->getResultCode() == txSUCCESS);
REQUIRE(PaymentOpFrame::getInnerCode(getFirstResult(
*tx)) == PAYMENT_SUCCESS);
REQUIRE(getAccountSigners(a1, *app).size() ==
(alternative.autoRemove ? 0 : 1));
});
for_versions({7}, *app, [&] {
setup();
applyCheck(tx, *app);
REQUIRE(tx->getResultCode() == txSUCCESS);
REQUIRE(PaymentOpFrame::getInnerCode(getFirstResult(
*tx)) == PAYMENT_SUCCESS);
REQUIRE(getAccountSigners(a1, *app).size() == 1);
});
}
SECTION("merge source account before payment")
{
auto b1 = root.create("b1", paymentAmount);
a1.pay(b1, 1000);
closeLedgerOn(*app, 2, 1, 1, 2016);
auto runTest = [&](bool txAccountMissing) {
// Create merge tx
auto txMerge = b1.tx({accountMerge(a1)});
// Create payment tx. Depending on txAccountMissing,
// either the transaction source account or the
// operation source account will go missing (because
// b1 will be merged into a1)
auto& txAccount = txAccountMissing ? b1 : a1;
auto& opAccount = txAccountMissing ? a1 : b1;
auto tx =
txAccount.tx({opAccount.op(payment(root, 110)),
root.op(payment(a1, 101))});
getSignatures(tx).clear();
SignerKey sk = alternative.createSigner(*tx);
Signer sk1(sk, 1);
alternative.sign(*tx);
// Create signer tx
auto setSignerTx =
root.tx({setOptions(setSigner(sk1)),
a1.op(setOptions(setSigner(sk1))),
b1.op(setOptions(setSigner(sk1)))});
setSignerTx->addSignature(a1.getSecretKey());
setSignerTx->addSignature(b1.getSecretKey());
// Apply signer tx
applyCheck(setSignerTx, *app);
REQUIRE(setSignerTx->getResultCode() == txSUCCESS);
REQUIRE(getAccountSigners(a1, *app).size() == 1);
REQUIRE(getAccountSigners(b1, *app).size() == 1);
REQUIRE(getAccountSigners(root, *app).size() == 1);
// merge b1 into a1 and attempt the payment tx
auto r = closeLedgerOn(*app, 3, 1, 2, 2016,
{txMerge, tx});
if (txAccountMissing)
{
checkTx(0, r, txSUCCESS);
checkTx(1, r, txNO_ACCOUNT);
}
else
{
checkTx(0, r, txSUCCESS);
checkTx(1, r, txFAILED);
}
uint32_t ledgerVersion;
{
LedgerTxn ltx(app->getLedgerTxnRoot());
ledgerVersion =
ltx.loadHeader().current().ledgerVersion;
}
// If the operation source account is missing, then
// the signatures can be removed if V10 or greater.
// However, if the transaction source account is
// missing, then signatures can only be removed if
// V13 or greater.
if (ledgerVersion < 13 &&
(txAccountMissing || ledgerVersion < 10))
{
REQUIRE(getAccountSigners(a1, *app).size() ==
1);
REQUIRE(getAccountSigners(root, *app).size() ==
1);
}
else
{
REQUIRE(getAccountSigners(a1, *app).size() ==
(alternative.autoRemove ? 0 : 1));
REQUIRE(getAccountSigners(root, *app).size() ==
(alternative.autoRemove ? 0 : 1));
}
};
SECTION("merge op source account")
{
for_versions_from(3, *app, [&] { runTest(false); });
}
SECTION("merge tx source account")
{
for_versions_from(3, *app, [&] { runTest(true); });
}
}
SECTION("accountMerge signing account")
{
auto b1 = root.create("b1", paymentAmount);
a1.pay(b1, 1000);
closeLedgerOn(*app, 2, 1, 1, 2016);
for_versions_from(3, *app, [&] {
auto tx = b1.tx({accountMerge(a1)},
b1.getLastSequenceNumber() + 2);
getSignatures(tx).clear();
SignerKey sk = alternative.createSigner(*tx);
Signer sk1(sk, 1);
b1.setOptions(setSigner(sk1));
REQUIRE(getAccountSigners(a1, *app).size() == 0);
REQUIRE(getAccountSigners(b1, *app).size() == 1);
alternative.sign(*tx);
applyCheck(tx, *app);
REQUIRE(tx->getResultCode() == txSUCCESS);
REQUIRE(MergeOpFrame::getInnerCode(getFirstResult(
*tx)) == ACCOUNT_MERGE_SUCCESS);
REQUIRE(getAccountSigners(a1, *app).size() == 0);
{
LedgerTxn ltx(app->getLedgerTxnRoot());
REQUIRE(!stellar::loadAccount(ltx, b1));
}
});
}
SECTION("failing transaction")
{
TransactionFramePtr tx;
auto setup = [&]() {
tx = a1.tx({payment(root, -1)});
getSignatures(tx).clear();
setSeqNum(tx, tx->getSeqNum() + 1);
a1.setSequenceNumber(a1.getLastSequenceNumber() -
1);
SignerKey sk = alternative.createSigner(*tx);
Signer sk1(sk, 1);
a1.setOptions(setSigner(sk1));
REQUIRE(getAccountSigners(a1, *app).size() == 1);
alternative.sign(*tx);
};
for_versions(3, 9, *app, [&] {
setup();
applyCheck(tx, *app);
REQUIRE(tx->getResultCode() == stellar::txFAILED);
REQUIRE(PaymentOpFrame::getInnerCode(getFirstResult(
*tx)) == stellar::PAYMENT_MALFORMED);
REQUIRE(getAccountSigners(a1, *app).size() == 1);
});
for_versions_from(10, *app, [&] {
setup();
applyCheck(tx, *app);
REQUIRE(tx->getResultCode() == stellar::txFAILED);
REQUIRE(PaymentOpFrame::getInnerCode(getFirstResult(
*tx)) == stellar::PAYMENT_MALFORMED);
REQUIRE(getAccountSigners(a1, *app).size() ==
(alternative.autoRemove ? 0 : 1));
});
}
}
SECTION("multisig")
{
auto s1 = getAccount("S1");
auto sk1Org = makeSigner(s1, 95);
auto th = setMasterWeight(100) | setLowThreshold(10) |
setMedThreshold(50) | setHighThreshold(100);
a1.setOptions(th | setSigner(sk1Org));
SECTION("not enough rights (envelope)")
{
TransactionFramePtr tx;
auto setup = [&]() {
tx = a1.tx({payment(root, 1000)});
getSignatures(tx).clear();
setSeqNum(tx, tx->getSeqNum() + 1);
a1.setSequenceNumber(a1.getLastSequenceNumber() -
1);
SignerKey sk = alternative.createSigner(*tx);
Signer sk1(sk, 5); // below low rights
a1.setOptions(setSigner(sk1));
REQUIRE(getAccountSigners(a1, *app).size() == 2);
alternative.sign(*tx);
};
for_versions({3, 4, 5, 6, 8, 9, 10, 11, 12}, *app, [&] {
setup();
applyCheck(tx, *app);
REQUIRE(tx->getResultCode() == txBAD_AUTH);
REQUIRE(getAccountSigners(a1, *app).size() == 2);
});
for_versions_from(13, *app, [&] {
setup();
applyCheck(tx, *app);
REQUIRE(tx->getResultCode() == txBAD_AUTH);
REQUIRE(getAccountSigners(a1, *app).size() ==
(alternative.autoRemove ? 1 : 2));
});
for_versions({7}, *app, [&] {
setup();
applyCheck(tx, *app);
REQUIRE(tx->getResultCode() == txSUCCESS);
REQUIRE(getAccountSigners(a1, *app).size() == 2);
});
}
SECTION("not enough rights (envelope). Same pre auth "
"signer on both tx and op source account")
{
TransactionFramePtr tx;
auto setup = [&]() {
tx = a1.tx({root.op(payment(a1, 100))});
getSignatures(tx).clear();
setSeqNum(tx, tx->getSeqNum() + 1);
a1.setSequenceNumber(a1.getLastSequenceNumber() -
1);
SignerKey sk = alternative.createSigner(*tx);
Signer sk1(sk, 5); // below low rights
a1.setOptions(setSigner(sk1));
root.setOptions(setSigner(sk1));
REQUIRE(getAccountSigners(a1, *app).size() == 2);
REQUIRE(getAccountSigners(root, *app).size() == 1);
alternative.sign(*tx);
};
for_versions({3, 4, 5, 6, 8, 9, 10, 11, 12}, *app, [&] {
setup();
applyCheck(tx, *app);
REQUIRE(tx->getResultCode() == txBAD_AUTH);
REQUIRE(getAccountSigners(a1, *app).size() == 2);
REQUIRE(getAccountSigners(root, *app).size() == 1);
});
for_versions_from(13, *app, [&] {
setup();
applyCheck(tx, *app);
REQUIRE(tx->getResultCode() == txBAD_AUTH);
REQUIRE(getAccountSigners(a1, *app).size() ==
(alternative.autoRemove ? 1 : 2));
REQUIRE(getAccountSigners(root, *app).size() ==
(alternative.autoRemove ? 0 : 1));
});
for_versions({7}, *app, [&] {
setup();
applyCheck(tx, *app);
REQUIRE(tx->getResultCode() == txSUCCESS);
REQUIRE(getAccountSigners(a1, *app).size() == 2);
REQUIRE(getAccountSigners(root, *app).size() == 1);
});
}
SECTION("Bad seq num. Same pre auth "
"signer on both tx and op source account")
{
TransactionFramePtr tx;
auto setup = [&]() {
tx = a1.tx({root.op(payment(a1, 100))});
getSignatures(tx).clear();
a1.setSequenceNumber(a1.getLastSequenceNumber() -
1);
SignerKey sk = alternative.createSigner(*tx);
Signer sk1(sk, 5); // below low rights
a1.setOptions(setSigner(sk1));
root.setOptions(setSigner(sk1));
REQUIRE(getAccountSigners(a1, *app).size() == 2);
REQUIRE(getAccountSigners(root, *app).size() == 1);
alternative.sign(*tx);
};
for_versions(10, 12, *app, [&] {
setup();
applyCheck(tx, *app);
REQUIRE(tx->getResultCode() == txBAD_SEQ);
REQUIRE(getAccountSigners(a1, *app).size() == 2);
REQUIRE(getAccountSigners(root, *app).size() == 1);
});
for_versions_from(13, *app, [&] {
setup();
applyCheck(tx, *app);
REQUIRE(tx->getResultCode() == txBAD_SEQ);
REQUIRE(getAccountSigners(a1, *app).size() ==
(alternative.autoRemove ? 1 : 2));
REQUIRE(getAccountSigners(root, *app).size() ==
(alternative.autoRemove ? 0 : 1));
});
}
SECTION("not enough rights (operation)")
{
// updating thresholds requires high
TransactionFramePtr tx;
auto setup = [&]() {
tx = a1.tx({setOptions(th)},
a1.getLastSequenceNumber() + 2);
getSignatures(tx).clear();
SignerKey sk = alternative.createSigner(*tx);
Signer sk1(sk, 95); // med rights account
a1.setOptions(setSigner(sk1));
REQUIRE(getAccountSigners(a1, *app).size() == 2);
alternative.sign(*tx);
};
for_versions({3, 4, 5, 6, 8, 9}, *app, [&] {
setup();
applyCheck(tx, *app);
REQUIRE(tx->getResultCode() == txFAILED);
REQUIRE(getFirstResultCode(*tx) == opBAD_AUTH);
REQUIRE(getAccountSigners(a1, *app).size() == 2);
});
for_versions({7}, *app, [&] {
setup();
applyCheck(tx, *app);
REQUIRE(tx->getResultCode() == txSUCCESS);
REQUIRE(getAccountSigners(a1, *app).size() == 2);
});
for_versions_from(10, *app, [&] {
setup();
applyCheck(tx, *app);
REQUIRE(tx->getResultCode() == txFAILED);
REQUIRE(getFirstResultCode(*tx) == opBAD_AUTH);
REQUIRE(getAccountSigners(a1, *app).size() ==
(alternative.autoRemove ? 1 : 2));
});
}
SECTION("not enough rights on first operation")
{
TransactionFramePtr tx1, tx2;
auto setup = [&]() {
auto b = root.create("b", 1000000000);
tx1 = b.tx({setOptions(
setMasterWeight(1) | setLowThreshold(1) |
setMedThreshold(2) | setHighThreshold(3))});
tx2 = b.tx(
{payment(root, 100), root.op(payment(b, 100))},
b.getLastSequenceNumber() + 1);
SignerKey sk = alternative.createSigner(*tx2);
Signer sk1(sk, 100); // high rights account
root.setOptions(setSigner(sk1));
REQUIRE(getAccountSigners(root, *app).size() == 1);
alternative.sign(*tx2);
};
for_versions(3, 9, *app, [&] {
setup();
closeLedgerOn(*app, 2, 1, 1, 2010, {tx1, tx2});
REQUIRE(getAccountSigners(root, *app).size() == 1);
});
for_versions_from(10, *app, [&] {
setup();
closeLedgerOn(*app, 2, 1, 1, 2010, {tx1, tx2});
REQUIRE(getAccountSigners(root, *app).size() ==
(alternative.autoRemove ? 0 : 1));
});
}
SECTION("not enough rights on second operation")
{
TransactionFramePtr tx1, tx2;
auto setup = [&]() {
auto b = root.create("b", 1000000000);
tx1 = b.tx({setOptions(
setMasterWeight(1) | setLowThreshold(1) |
setMedThreshold(2) | setHighThreshold(3))});
tx2 = b.tx(
{root.op(payment(b, 100)), payment(root, 100)},
b.getLastSequenceNumber() + 1);
SignerKey sk = alternative.createSigner(*tx2);
Signer sk1(sk, 100); // high rights account
root.setOptions(setSigner(sk1));
REQUIRE(getAccountSigners(root, *app).size() == 1);
alternative.sign(*tx2);
};
for_versions(3, 9, *app, [&] {
setup();
closeLedgerOn(*app, 2, 1, 1, 2010, {tx1, tx2});
REQUIRE(getAccountSigners(root, *app).size() == 1);
});
for_versions_from(10, *app, [&] {
setup();
closeLedgerOn(*app, 2, 1, 1, 2010, {tx1, tx2});
REQUIRE(getAccountSigners(root, *app).size() ==
(alternative.autoRemove ? 0 : 1));
});
}
SECTION("signatures removed from multiple accounts even "
"though transaction failed")
{
TransactionFramePtr tx;
auto setup = [&]() {
tx = a1.tx({root.op(payment(a1, 100))});
getSignatures(tx).clear();
setSeqNum(tx, tx->getSeqNum() + 1);
// add signer twice.
tx->addSignature(s1);
tx->addSignature(s1);
a1.setSequenceNumber(a1.getLastSequenceNumber() -
1);
SignerKey sk = alternative.createSigner(*tx);
Signer sk1(sk, 1);
a1.setOptions(setSigner(sk1));
root.setOptions(setSigner(sk1));
REQUIRE(getAccountSigners(a1, *app).size() == 2);
REQUIRE(getAccountSigners(root, *app).size() == 1);
alternative.sign(*tx);
};
for_versions({9}, *app, [&] {
setup();
applyCheck(tx, *app);
REQUIRE(tx->getResultCode() == txBAD_AUTH_EXTRA);
REQUIRE(getAccountSigners(a1, *app).size() == 2);
REQUIRE(getAccountSigners(root, *app).size() == 1);
});
for_versions({10}, *app, [&] {
setup();
applyCheck(tx, *app);
REQUIRE(tx->getResultCode() == txBAD_AUTH_EXTRA);
REQUIRE(getAccountSigners(a1, *app).size() ==
(alternative.autoRemove ? 1 : 2));
REQUIRE(getAccountSigners(root, *app).size() ==
(alternative.autoRemove ? 0 : 1));
});
}
SECTION("success complex sponsored signatures + " +
alternative.name)
{
for_versions_from(14, *app, [&] {
auto a2 = root.create("A2", paymentAmount);
TransactionFramePtr tx;
tx = a1.tx({payment(root, 1000)});
getSignatures(tx).clear();
tx->addSignature(s1);
SignerKey sk = alternative.createSigner(*tx);
Signer sk1(sk, 5); // below low rights
// add two more signers. We want to sandwich the
// signer that will be removed (sk1), so we can
// verify how signerSponsoringIDs changes
Signer signer1 = makeSigner(getAccount("1"), 5);
Signer signer2(SignerKeyUtils::hashXKey("5"), 5);
REQUIRE(signer1.key < sk);
REQUIRE(sk < signer2.key);
// sk1 is sponsored by a2, while signer1 and signer2
// are sponsored by root
auto insideSignerTx = transactionFrameFromOps(
app->getNetworkID(), a2,
{a2.op(beginSponsoringFutureReserves(a1)),
a1.op(setOptions(setSigner(sk1))),
a1.op(endSponsoringFutureReserves())},
{a1});
{
LedgerTxn ltx(app->getLedgerTxnRoot());
TransactionMeta txm(2);
REQUIRE(
insideSignerTx->checkValid(ltx, 0, 0, 0));
REQUIRE(insideSignerTx->apply(*app, ltx, txm));
REQUIRE(insideSignerTx->getResultCode() ==
txSUCCESS);
ltx.commit();
}
auto outsideSignerTx = transactionFrameFromOps(
app->getNetworkID(), root,
{root.op(beginSponsoringFutureReserves(a1)),
a1.op(setOptions(setSigner(signer1))),
a1.op(setOptions(setSigner(signer2))),
a1.op(endSponsoringFutureReserves())},
{a1});
{
LedgerTxn ltx(app->getLedgerTxnRoot());
TransactionMeta txm(2);
REQUIRE(
outsideSignerTx->checkValid(ltx, 0, 0, 0));
REQUIRE(outsideSignerTx->apply(*app, ltx, txm));
REQUIRE(outsideSignerTx->getResultCode() ==
txSUCCESS);
ltx.commit();
}
{
LedgerTxn ltx(app->getLedgerTxnRoot());
checkSponsorship(ltx, a1.getPublicKey(),
signer1.key, 2,
&root.getPublicKey());
checkSponsorship(ltx, a1.getPublicKey(),
signer2.key, 2,
&root.getPublicKey());
checkSponsorship(ltx, a1.getPublicKey(), sk, 2,
&a2.getPublicKey());
checkSponsorship(ltx, root.getPublicKey(), 0,
nullptr, 0, 2, 2, 0);
checkSponsorship(ltx, a2.getPublicKey(), 0,
nullptr, 0, 2, 1, 0);
}
REQUIRE(getAccountSigners(a1, *app).size() == 4);
alternative.sign(*tx);
applyTx(tx, *app);
REQUIRE(tx->getResultCode() == txSUCCESS);
REQUIRE(PaymentOpFrame::getInnerCode(getFirstResult(
*tx)) == PAYMENT_SUCCESS);
REQUIRE(getAccountSigners(a1, *app).size() ==
(alternative.autoRemove ? 3 : 4));
if (alternative.autoRemove)
{
LedgerTxn ltx(app->getLedgerTxnRoot());
checkSponsorship(ltx, root.getPublicKey(), 0,
nullptr, 0, 2, 2, 0);
checkSponsorship(ltx, a2.getPublicKey(), 0,
nullptr, 0, 2, 0, 0);
auto ltxe = stellar::loadAccount(ltx, a1);
auto const& a1Entry =
ltxe.current().data.account();
auto const& sponsoringIDs =
a1Entry.ext.v1()
.ext.v2()
.signerSponsoringIDs;
REQUIRE(sponsoringIDs.size() == 3);
REQUIRE(!sponsoringIDs[0]);
REQUIRE((sponsoringIDs[1] && sponsoringIDs[2]));
REQUIRE(*sponsoringIDs[1] ==
root.getPublicKey());
REQUIRE(*sponsoringIDs[1] == *sponsoringIDs[2]);
}
});
}
SECTION("success signature + " + alternative.name)
{
TransactionFramePtr tx;
auto setup = [&]() {
tx = a1.tx({payment(root, 1000)});
getSignatures(tx).clear();
setSeqNum(tx, tx->getSeqNum() + 1);
tx->addSignature(s1);
a1.setSequenceNumber(a1.getLastSequenceNumber() -
1);
SignerKey sk = alternative.createSigner(*tx);
Signer sk1(sk, 5); // below low rights
a1.setOptions(setSigner(sk1));
REQUIRE(getAccountSigners(a1, *app).size() == 2);
alternative.sign(*tx);
};
for_versions_from({3, 4, 5, 6, 8}, *app, [&] {
setup();
applyCheck(tx, *app);
REQUIRE(tx->getResultCode() == txSUCCESS);
REQUIRE(PaymentOpFrame::getInnerCode(getFirstResult(
*tx)) == PAYMENT_SUCCESS);
REQUIRE(getAccountSigners(a1, *app).size() ==
(alternative.autoRemove ? 1 : 2));
});
for_versions({7}, *app, [&] {
setup();
applyCheck(tx, *app);
REQUIRE(tx->getResultCode() == txSUCCESS);
REQUIRE(PaymentOpFrame::getInnerCode(getFirstResult(
*tx)) == PAYMENT_SUCCESS);
REQUIRE(getAccountSigners(a1, *app).size() == 2);
});
}
}
SECTION(alternative.name + " in op source account signers")
{
TransactionFramePtr tx;
auto setup = [&]() {
auto op = a1.op(payment(root, 100));
tx = transactionFromOperations(
*app, root, root.getLastSequenceNumber() + 2, {op});
getSignatures(tx).clear();
SignerKey sk = alternative.createSigner(*tx);
Signer sk1(sk, 1);
root.setOptions(setSigner(sk1));
a1.setOptions(setSigner(sk1));
REQUIRE(getAccountSigners(root, *app).size() == 1);
REQUIRE(getAccountSigners(a1, *app).size() == 1);
alternative.sign(*tx);
};
for_versions_from({3, 4, 5, 6, 8}, *app, [&] {
setup();
applyCheck(tx, *app);
REQUIRE(tx->getResultCode() == txSUCCESS);
REQUIRE(PaymentOpFrame::getInnerCode(
getFirstResult(*tx)) == PAYMENT_SUCCESS);
REQUIRE(getAccountSigners(root, *app).size() ==
(alternative.autoRemove ? 0 : 1));
REQUIRE(getAccountSigners(a1, *app).size() ==
(alternative.autoRemove ? 0 : 1));
});
for_versions({7}, *app, [&] {
setup();
applyCheck(tx, *app);
REQUIRE(tx->getResultCode() == txSUCCESS);
REQUIRE(PaymentOpFrame::getInnerCode(
getFirstResult(*tx)) == PAYMENT_SUCCESS);
REQUIRE(getAccountSigners(root, *app).size() == 1);
REQUIRE(getAccountSigners(a1, *app).size() == 1);
});
}
SECTION(alternative.name +
" in multiple ops source account signers")
{
TransactionFramePtr tx;
auto setup = [&]() {
auto op = a1.op(payment(root, 100));
tx = transactionFromOperations(
*app, root, root.getLastSequenceNumber() + 2,
{op, op});
getSignatures(tx).clear();
SignerKey sk = alternative.createSigner(*tx);
Signer sk1(sk, 1);
root.setOptions(setSigner(sk1));
a1.setOptions(setSigner(sk1));
REQUIRE(getAccountSigners(root, *app).size() == 1);
REQUIRE(getAccountSigners(a1, *app).size() == 1);
alternative.sign(*tx);
};
for_versions_from({3, 4, 5, 6, 8}, *app, [&] {
setup();
applyCheck(tx, *app);
REQUIRE(tx->getResultCode() == txSUCCESS);
REQUIRE(PaymentOpFrame::getInnerCode(
getFirstResult(*tx)) == PAYMENT_SUCCESS);
REQUIRE(getAccountSigners(root, *app).size() ==
(alternative.autoRemove ? 0 : 1));
REQUIRE(getAccountSigners(a1, *app).size() ==
(alternative.autoRemove ? 0 : 1));
});
for_versions({7}, *app, [&] {
setup();
applyCheck(tx, *app);
REQUIRE(tx->getResultCode() == txSUCCESS);
REQUIRE(PaymentOpFrame::getInnerCode(
getFirstResult(*tx)) == PAYMENT_SUCCESS);
REQUIRE(getAccountSigners(root, *app).size() == 1);
REQUIRE(getAccountSigners(a1, *app).size() == 1);
});
}
}
}
SECTION("empty X")
{
auto s1 = getAccount("S1");
auto sk1 = makeSigner(s1, 95);
auto th = setMasterWeight(100) | setLowThreshold(10) |
setMedThreshold(50) | setHighThreshold(100);
a1.setOptions(th | setSigner(sk1));
for_versions_from(3, *app, [&] {
auto tx = a1.tx({payment(root, 1000)});
getSignatures(tx).clear();
setSeqNum(tx, tx->getSeqNum() + 1);
tx->addSignature(s1);
a1.setSequenceNumber(a1.getLastSequenceNumber() - 1);
SignerKey sk = SignerKeyUtils::hashXKey(x);
Signer sk2(sk, 5); // below low rights
a1.setOptions(setSigner(sk2));
REQUIRE(getAccountSigners(a1, *app).size() == 2);
tx->addSignature(SignatureUtils::signHashX(x));
applyCheck(tx, *app);
REQUIRE(tx->getResultCode() == txSUCCESS);
REQUIRE(PaymentOpFrame::getInnerCode(getFirstResult(*tx)) ==
PAYMENT_SUCCESS);
REQUIRE(getAccountSigners(a1, *app).size() == 2);
});
}
}
SECTION("batching")
{
SECTION("empty batch")
{
for_all_versions(*app, [&] {
auto tx = root.tx({});
setFee(tx, 1000);
{
LedgerTxn ltx(app->getLedgerTxnRoot());
REQUIRE(!tx->checkValid(ltx, 0, 0, 0));
}
applyCheck(tx, *app);
REQUIRE(tx->getResultCode() == txMISSING_OPERATION);
});
}
SECTION("non empty")
{
auto a1 = root.create("A", paymentAmount);
auto b1 = root.create("B", paymentAmount);
SECTION("single tx wrapped by different account")
{
SECTION("missing signature")
{
for_versions_from({1, 2, 3, 4, 5, 6, 8}, *app, [&] {
auto tx = a1.tx({b1.op(payment(root, 1000))});
getSignatures(tx).clear();
tx->addSignature(a1);
{
LedgerTxn ltx(app->getLedgerTxnRoot());
REQUIRE(!tx->checkValid(ltx, 0, 0, 0));
}
applyCheck(tx, *app);
REQUIRE(tx->getResultCode() == txFAILED);
REQUIRE(tx->getOperations()[0]->getResultCode() ==
opBAD_AUTH);
});
for_versions({7}, *app, [&] {
auto tx = a1.tx({b1.op(payment(root, 1000))});
getSignatures(tx).clear();
tx->addSignature(a1);
{
LedgerTxn ltx(app->getLedgerTxnRoot());
REQUIRE(tx->checkValid(ltx, 0, 0, 0));
}
applyCheck(tx, *app);
REQUIRE(tx->getResultCode() == txSUCCESS);
});
}
SECTION("success")
{
for_all_versions(*app, [&] {
auto tx = a1.tx({b1.op(payment(root, 1000))});
getSignatures(tx).clear();
tx->addSignature(a1);
tx->addSignature(b1);
{
LedgerTxn ltx(app->getLedgerTxnRoot());
REQUIRE(tx->checkValid(ltx, 0, 0, 0));
}
applyCheck(tx, *app);
REQUIRE(tx->getResultCode() == txSUCCESS);
REQUIRE(PaymentOpFrame::getInnerCode(
getFirstResult(*tx)) == PAYMENT_SUCCESS);
});
}
}
SECTION("multiple tx")
{
for_all_versions(*app, [&] {
SECTION("one invalid tx")
{
auto idr = b1.asset("IDR");
Price price(1, 1);
auto tx = a1.tx(
{payment(root, 1000),
b1.op(manageOffer(0, idr, idr, price, 1000))});
getSignatures(tx).clear();
tx->addSignature(a1);
tx->addSignature(b1);
{
LedgerTxn ltx(app->getLedgerTxnRoot());
REQUIRE(!tx->checkValid(ltx, 0, 0, 0));
}
applyCheck(tx, *app);
REQUIRE(tx->getResult().feeCharged ==
2 * app->getLedgerManager().getLastTxFee());
REQUIRE(tx->getResultCode() == txFAILED);
// first operation was success
REQUIRE(PaymentOpFrame::getInnerCode(
getFirstResult(*tx)) == PAYMENT_SUCCESS);
// second
REQUIRE(ManageSellOfferOpFrame::getInnerCode(
tx->getOperations()[1]->getResult()) ==
MANAGE_SELL_OFFER_MALFORMED);
}
SECTION("one failed tx")
{
// this payment is too large
auto tx = a1.tx({payment(root, 1000),
b1.op(payment(root, paymentAmount))});
getSignatures(tx).clear();
tx->addSignature(a1);
tx->addSignature(b1);
{
LedgerTxn ltx(app->getLedgerTxnRoot());
REQUIRE(tx->checkValid(ltx, 0, 0, 0));
}
applyCheck(tx, *app);
REQUIRE(tx->getResult().feeCharged ==
2 * app->getLedgerManager().getLastTxFee());
REQUIRE(tx->getResultCode() == txFAILED);
// first operation was success
REQUIRE(PaymentOpFrame::getInnerCode(
getFirstResult(*tx)) == PAYMENT_SUCCESS);
// second
REQUIRE(PaymentOpFrame::getInnerCode(
tx->getOperations()[1]->getResult()) ==
PAYMENT_UNDERFUNDED);
}
SECTION("both success")
{
auto tx = a1.tx(
{payment(root, 1000), b1.op(payment(root, 1000))});
getSignatures(tx).clear();
tx->addSignature(a1);
tx->addSignature(b1);
{
LedgerTxn ltx(app->getLedgerTxnRoot());
REQUIRE(tx->checkValid(ltx, 0, 0, 0));
}
applyCheck(tx, *app);
REQUIRE(tx->getResult().feeCharged ==
2 * app->getLedgerManager().getLastTxFee());
REQUIRE(tx->getResultCode() == txSUCCESS);
REQUIRE(PaymentOpFrame::getInnerCode(
getFirstResult(*tx)) == PAYMENT_SUCCESS);
REQUIRE(PaymentOpFrame::getInnerCode(
tx->getOperations()[1]->getResult()) ==
PAYMENT_SUCCESS);
}
});
}
SECTION("operation using default signature")
{
for_all_versions(*app, [&] {
auto c1 = TestAccount{*app, getAccount("C")};
// build a transaction:
// 1. B funds C
// 2. send from C -> root
auto tx = b1.tx(
{createAccount(c1.getPublicKey(), paymentAmount / 2),
c1.op(payment(root, 1000))});
tx->addSignature(c1);
applyCheck(tx, *app);
REQUIRE(tx->getResult().feeCharged ==
2 * app->getLedgerManager().getLastTxFee());
REQUIRE(tx->getResultCode() == txSUCCESS);
REQUIRE(CreateAccountOpFrame::getInnerCode(
getFirstResult(*tx)) == CREATE_ACCOUNT_SUCCESS);
REQUIRE(PaymentOpFrame::getInnerCode(
tx->getOperations()[1]->getResult()) ==
PAYMENT_SUCCESS);
});
}
}
}
SECTION("common transaction")
{
auto a1 = root.create("A", paymentAmount);
TransactionFramePtr txFrame;
auto setup = [&]() {
auto txSet = std::make_shared<TxSetFrame>(
app->getLedgerManager().getLastClosedLedgerHeader().hash);
txFrame = root.tx({createAccount(a1, paymentAmount)});
txSet->add(txFrame);
// close this ledger
StellarValue sv(txSet->getContentsHash(), 1, emptyUpgradeSteps,
STELLAR_VALUE_BASIC);
LedgerCloseData ledgerData(1, txSet, sv);
app->getLedgerManager().closeLedger(ledgerData);
REQUIRE(app->getLedgerManager().getLastClosedLedgerNum() == 2);
};
// SECTION("Fee over max")
// {
// for_all_versions(*app, [&] {
// txFrame =
// root.tx({payment(a1.getPublicKey(), paymentAmount)});
// txFrame->getEnvelope().tx.fee = static_cast<uint64_t>(
// app->getLedgerManager().getMaxTxFee() + 1);
// applyCheck(txFrame, *app);
// REQUIRE(txFrame->getResultCode() == txFEE_OVER_MAX);
// });
// }
{
SECTION("Insufficient fee")
{
for_all_versions(*app, [&] {
setup();
txFrame =
root.tx({payment(a1.getPublicKey(), paymentAmount)});
setFee(txFrame, app->getLedgerManager().getLastTxFee() - 1);
applyCheck(txFrame, *app);
REQUIRE(txFrame->getResultCode() == txINSUFFICIENT_FEE);
// during apply, feeCharged is smaller in this case
REQUIRE(txFrame->getResult().feeCharged ==
app->getLedgerManager().getLastTxFee() - 1);
});
}
SECTION("duplicate payment")
{
for_versions_to(9, *app, [&] {
setup();
{
LedgerTxn ltx(app->getLedgerTxnRoot());
REQUIRE(!txFrame->checkValid(ltx, 0, 0, 0));
}
REQUIRE(txFrame->getResultCode() == txBAD_SEQ);
});
for_versions_from(10, *app, [&] {
setup();
applyCheck(txFrame, *app);
REQUIRE(txFrame->getResultCode() == txBAD_SEQ);
});
}
SECTION("time issues")
{
for_all_versions(*app, [&] {
setup();
// tx too young
// tx ok
// tx too old
VirtualClock::system_time_point ledgerTime;
time_t start = getTestDate(1, 7, 2014);
ledgerTime = VirtualClock::from_time_t(start);
clock.setCurrentVirtualTime(ledgerTime);
SECTION("too early")
{
txFrame = root.tx(
{payment(a1.getPublicKey(), paymentAmount)});
setMinTime(txFrame, start + 1000);
setMaxTime(txFrame, start + 10000);
closeLedgerOn(*app, 3, start + 1);
applyCheck(txFrame, *app);
REQUIRE(txFrame->getResultCode() == txTOO_EARLY);
}
SECTION("on time")
{
txFrame = root.tx(
{payment(a1.getPublicKey(), paymentAmount)});
setMinTime(txFrame, 1000);
setMaxTime(txFrame, start + 300000);
getSignatures(txFrame).clear();
txFrame->addSignature(root);
closeLedgerOn(*app, 3, start + 1);
applyCheck(txFrame, *app);
REQUIRE(txFrame->getResultCode() == txSUCCESS);
}
SECTION("too late")
{
txFrame = root.tx(
{payment(a1.getPublicKey(), paymentAmount)});
setMinTime(txFrame, 1000);
setMaxTime(txFrame, start);
closeLedgerOn(*app, 3, start + 1);
applyCheck(txFrame, *app);
REQUIRE(txFrame->getResultCode() == txTOO_LATE);
}
SECTION("lower bound offset")
{
txFrame = root.tx(
{payment(a1.getPublicKey(), paymentAmount)});
setMaxTime(txFrame, 0);
TimePoint lastClose = getTestDate(1, 1, 2020);
closeLedgerOn(*app, 3, lastClose);
TimePoint const nextOffset = 2;
auto const nextClose = lastClose + nextOffset;
auto testOneMinTimeLowerBoundCombination =
[&](TimePoint const minTime,
TimePoint const lowerBound,
bool const expectSuccess) {
setMinTime(txFrame, minTime);
getSignatures(txFrame).clear();
txFrame->addSignature(root);
{
LedgerTxn ltx(app->getLedgerTxnRoot());
REQUIRE(txFrame->checkValid(
ltx, 0, lowerBound, 0) ==
expectSuccess);
}
REQUIRE(
txFrame->getResultCode() ==
(expectSuccess ? txSUCCESS : txTOO_EARLY));
};
SECTION("too early despite offset")
{
testOneMinTimeLowerBoundCombination(
nextClose + 1, nextOffset, false);
}
SECTION("definitely too early without offset")
{
testOneMinTimeLowerBoundCombination(nextClose + 1,
0, false);
}
SECTION("not too early because of offset")
{
testOneMinTimeLowerBoundCombination(
nextClose, nextOffset, true);
}
SECTION("would have been too early without offset")
{
testOneMinTimeLowerBoundCombination(nextClose, 0,
false);
}
SECTION("not too early even without offset")
{
testOneMinTimeLowerBoundCombination(lastClose, 0,
true);
}
SECTION("definitely not too early with offset")
{
testOneMinTimeLowerBoundCombination(
lastClose, nextOffset, true);
}
}
SECTION("upper bound offset")
{
txFrame = root.tx(
{payment(a1.getPublicKey(), paymentAmount)});
setMinTime(txFrame, 1000);
getSignatures(txFrame).clear();
txFrame->addSignature(root);
closeLedgerOn(*app, 3, 3, 7, 2014);
auto closeTime = app->getLedgerManager()
.getLastClosedLedgerHeader()
.header.scpValue.closeTime;
auto offsetTest = [&](bool pushTime) {
if (pushTime)
{
// move clock past close time
clock.setCurrentVirtualTime(
VirtualClock::from_time_t(closeTime + 5));
}
auto offset =
getUpperBoundCloseTimeOffset(*app, closeTime);
auto upperBoundCloseTime = closeTime + offset;
SECTION("success")
{
setMaxTime(txFrame, upperBoundCloseTime);
getSignatures(txFrame).clear();
txFrame->addSignature(root);
{
LedgerTxn ltx(app->getLedgerTxnRoot());
REQUIRE(
txFrame->checkValid(ltx, 0, 0, offset));
}
REQUIRE(txFrame->getResultCode() == txSUCCESS);
}
SECTION("too late")
{
setMaxTime(txFrame, upperBoundCloseTime - 1);
{
LedgerTxn ltx(app->getLedgerTxnRoot());
REQUIRE(!txFrame->checkValid(ltx, 0, 0,
offset));
}
REQUIRE(txFrame->getResultCode() == txTOO_LATE);
}
};
SECTION("current time behind closeTime")
{
offsetTest(true);
}
SECTION("current time past closeTime")
{
offsetTest(false);
}
}
});
}
SECTION("transaction gap")
{
for_versions_to(9, *app, [&] {
setup();
txFrame =
root.tx({payment(a1.getPublicKey(), paymentAmount)});
setSeqNum(txFrame, txFrame->getSeqNum() - 1);
{
LedgerTxn ltx(app->getLedgerTxnRoot());
REQUIRE(!txFrame->checkValid(ltx, 0, 0, 0));
}
REQUIRE(txFrame->getResultCode() == txBAD_SEQ);
});
for_versions_from(10, *app, [&] {
setup();
txFrame =
root.tx({payment(a1.getPublicKey(), paymentAmount)});
setSeqNum(txFrame, txFrame->getSeqNum() - 1);
applyCheck(txFrame, *app);
REQUIRE(txFrame->getResultCode() == txBAD_SEQ);
});
}
}
}
SECTION("change signer and weights mid-transaction")
{
auto a = root.create("a", paymentAmount);
auto b = root.create("b", paymentAmount);
auto const baseFee = app->getLedgerManager().getLastTxFee();
SECTION("switch a into regular account 1")
{
a.setOptions(setSigner(makeSigner(b, 1)) | setMasterWeight(1) |
setLowThreshold(2) | setMedThreshold(2) |
setHighThreshold(2));
for_all_versions(*app, [&] {
auto tx = a.tx({setOptions(setMasterWeight(2) |
setSigner(makeSigner(b, 0)))});
tx->addSignature(b);
validateTxResults(tx, *app, {baseFee * 1, txSUCCESS},
expectedResult(baseFee * 1, 1, txSUCCESS,
{SET_OPTIONS_SUCCESS}));
});
}
SECTION("switch a into regular account 2")
{
a.setOptions(setMasterWeight(1) | setLowThreshold(2) |
setMedThreshold(2) | setHighThreshold(2) |
setSigner(makeSigner(b, 1)));
for_versions({1, 2, 3, 4, 5, 6, 8, 9}, *app, [&] {
auto tx = a.tx({setOptions(setSigner(makeSigner(b, 0))),
setOptions(setMasterWeight(2))});
tx->addSignature(b);
validateTxResults(
tx, *app, {baseFee * 2, txSUCCESS},
expectedResult(baseFee * 2, 2, txFAILED,
{SET_OPTIONS_SUCCESS, opBAD_AUTH}));
});
for_versions_from({7, 10}, *app, [&] {
auto tx = a.tx({setOptions(setSigner(makeSigner(b, 0))),
setOptions(setMasterWeight(2))});
tx->addSignature(b);
validateTxResults(
tx, *app, {baseFee * 2, txSUCCESS},
expectedResult(baseFee * 2, 2, txSUCCESS,
{SET_OPTIONS_SUCCESS, SET_OPTIONS_SUCCESS}));
});
}
SECTION("merge one of signing accounts")
{
a.setOptions(setMasterWeight(0) | setSigner(makeSigner(b, 1)));
closeLedgerOn(*app, 2, 1, 1, 2016);
SECTION("by destination")
{
for_versions({1, 2, 3, 4, 5, 6, 8, 9}, *app, [&] {
auto tx =
b.tx({a.op(setOptions(setMasterWeight(1) |
setSigner(makeSigner(b, 0)))),
a.op(accountMerge(b))});
validateTxResults(
tx, *app, {baseFee * 2, txSUCCESS},
expectedResult(baseFee * 2, 2, txFAILED,
{SET_OPTIONS_SUCCESS, opBAD_AUTH}));
});
for_versions_from({7, 10}, *app, [&] {
auto tx =
b.tx({a.op(setOptions(setMasterWeight(1) |
setSigner(makeSigner(b, 0)))),
a.op(accountMerge(b))});
auto applyResult = expectedResult(
baseFee * 2, 2, txSUCCESS,
{SET_OPTIONS_SUCCESS,
{ACCOUNT_MERGE_SUCCESS, paymentAmount - 100}});
validateTxResults(tx, *app, {baseFee * 2, txSUCCESS},
applyResult);
});
}
SECTION("by source, signed by destination")
{
for_versions({1, 2, 3, 4, 5, 6, 8, 9}, *app, [&] {
auto tx = a.tx({setOptions(setMasterWeight(1) |
setSigner(makeSigner(b, 0))),
accountMerge(b)});
getSignatures(tx).clear();
tx->addSignature(b);
validateTxResults(
tx, *app, {baseFee * 2, txSUCCESS},
expectedResult(baseFee * 2, 2, txFAILED,
{SET_OPTIONS_SUCCESS, opBAD_AUTH}));
});
for_versions_from({7, 10}, *app, [&] {
auto tx = a.tx({setOptions(setMasterWeight(1) |
setSigner(makeSigner(b, 0))),
accountMerge(b)});
getSignatures(tx).clear();
tx->addSignature(b);
auto applyResult = expectedResult(
baseFee * 2, 2, txSUCCESS,
{SET_OPTIONS_SUCCESS,
{ACCOUNT_MERGE_SUCCESS, paymentAmount - 300}});
validateTxResults(tx, *app, {baseFee * 2, txSUCCESS},
applyResult);
});
}
SECTION("by source, signed by both")
{
for_all_versions_except({7}, *app, [&] {
auto tx = a.tx({setOptions(setMasterWeight(1) |
setSigner(makeSigner(b, 0))),
accountMerge(b)});
tx->addSignature(b);
validateTxResults(tx, *app,
{baseFee * 2, txBAD_AUTH_EXTRA});
});
for_versions({7}, *app, [&] {
auto tx = a.tx({setOptions(setMasterWeight(1) |
setSigner(makeSigner(b, 0))),
accountMerge(b)});
tx->addSignature(b);
auto applyResult = expectedResult(
baseFee * 2, 2, txSUCCESS,
{SET_OPTIONS_SUCCESS,
{ACCOUNT_MERGE_SUCCESS, paymentAmount - 300}});
validateTxResults(tx, *app, {baseFee * 2, txSUCCESS},
applyResult);
});
}
}
SECTION("change thresholds twice")
{
for_versions({1, 2, 3, 4, 5, 6, 8, 9}, *app, [&] {
auto tx = a.tx({setOptions(setHighThreshold(3)),
setOptions(setHighThreshold(3))});
validateTxResults(
tx, *app, {baseFee * 2, txSUCCESS},
expectedResult(baseFee * 2, 2, txFAILED,
{SET_OPTIONS_SUCCESS, opBAD_AUTH}));
});
for_versions_from({7, 10}, *app, [&] {
auto tx = a.tx({setOptions(setHighThreshold(3)),
setOptions(setHighThreshold(3))});
validateTxResults(
tx, *app, {baseFee * 2, txSUCCESS},
expectedResult(baseFee * 2, 2, txSUCCESS,
{SET_OPTIONS_SUCCESS, SET_OPTIONS_SUCCESS}));
});
}
SECTION("lower master weight twice")
{
a.setOptions(setMasterWeight(10) | setLowThreshold(1) |
setMedThreshold(5) | setHighThreshold(10));
for_versions({1, 2, 3, 4, 5, 6, 8, 9}, *app, [&] {
auto tx = a.tx({setOptions(setMasterWeight(9)),
setOptions(setMasterWeight(8))});
validateTxResults(
tx, *app, {baseFee * 2, txSUCCESS},
expectedResult(baseFee * 2, 2, txFAILED,
{SET_OPTIONS_SUCCESS, opBAD_AUTH}));
});
for_versions_from({7, 10}, *app, [&] {
auto tx = a.tx({setOptions(setMasterWeight(9)),
setOptions(setMasterWeight(8))});
validateTxResults(
tx, *app, {baseFee * 2, txSUCCESS},
expectedResult(baseFee * 2, 2, txSUCCESS,
{SET_OPTIONS_SUCCESS, SET_OPTIONS_SUCCESS}));
});
}
SECTION("reduce auth, do something")
{
a.setOptions(setSigner(makeSigner(b, 2)) | setMasterWeight(3) |
setLowThreshold(1) | setMedThreshold(3) |
setHighThreshold(5));
SECTION("single tx")
{
SECTION("valid")
{
for_versions({1, 2, 3, 4, 5, 6, 8, 9}, *app, [&] {
auto tx =
a.tx({setOptions(setSigner(makeSigner(b, 1))),
setOptions(setSigner(makeSigner(b, 2)))});
tx->addSignature(b);
validateTxResults(
tx, *app, {baseFee * 2, txSUCCESS},
expectedResult(baseFee * 2, 2, txFAILED,
{SET_OPTIONS_SUCCESS, opBAD_AUTH}));
});
for_versions_from({7, 10}, *app, [&] {
auto tx =
a.tx({setOptions(setSigner(makeSigner(b, 1))),
setOptions(setSigner(makeSigner(b, 2)))});
tx->addSignature(b);
validateTxResults(
tx, *app, {baseFee * 2, txSUCCESS},
expectedResult(
baseFee * 2, 2, txSUCCESS,
{SET_OPTIONS_SUCCESS, SET_OPTIONS_SUCCESS}));
});
}
SECTION("missing signature")
{
for_versions_from(10, *app, [&] {
auto tx =
a.tx({payment(root, 1000),
setOptions(setSigner(makeSigner(b, 2)))});
// missing b signature
applyCheck(tx, *app);
REQUIRE(tx->getResultCode() == txFAILED);
REQUIRE(PaymentOpFrame::getInnerCode(
getFirstResult(*tx)) == PAYMENT_SUCCESS);
REQUIRE(tx->getOperations()[1]->getResultCode() ==
opBAD_AUTH);
});
}
}
SECTION("multiple tx")
{
for_versions_from(10, *app, [&] {
auto tx1 = a.tx({setOptions(setSigner(makeSigner(b, 1)))});
tx1->addSignature(b);
auto tx2 = a.tx({payment(root, 1000),
setOptions(setSigner(makeSigner(b, 2)))});
tx2->addSignature(b);
auto r =
closeLedgerOn(*app, 2, 1, 2, 2016, {tx1, tx2}, true);
REQUIRE(tx1->getResultCode() == txSUCCESS);
REQUIRE(tx2->getResultCode() == txFAILED);
REQUIRE(PaymentOpFrame::getInnerCode(
getFirstResult(*tx2)) == PAYMENT_SUCCESS);
REQUIRE(tx2->getOperations()[1]->getResultCode() ==
opBAD_AUTH);
});
}
}
SECTION("add signer, increase thresholds, do something")
{
for_all_versions_except({7}, *app, [&] {
auto tx =
a.tx({setOptions(setSigner(makeSigner(b, 1)) |
setMasterWeight(1) | setLowThreshold(2) |
setMedThreshold(2) | setHighThreshold(2)),
setOptions(setHomeDomain("stellar.org"))});
tx->addSignature(b);
validateTxResults(tx, *app, {baseFee * 2, txBAD_AUTH_EXTRA});
});
for_versions({7}, *app, [&] {
auto tx =
a.tx({setOptions(setSigner(makeSigner(b, 1)) |
setMasterWeight(1) | setLowThreshold(2) |
setMedThreshold(2) | setHighThreshold(2)),
setOptions(setHomeDomain("stellar.org"))});
tx->addSignature(b);
validateTxResults(
tx, *app, {baseFee * 2, txSUCCESS},
expectedResult(baseFee * 2, 2, txSUCCESS,
{SET_OPTIONS_SUCCESS, SET_OPTIONS_SUCCESS}));
});
}
}
SECTION("mux accounts")
{
auto toMux = [](MuxedAccount& id, uint64 memoID) {
MuxedAccount muxedID(KEY_TYPE_MUXED_ED25519);
auto& mid = muxedID.med25519();
mid.ed25519 = id.ed25519();
mid.id = memoID;
id = muxedID;
};
auto a = root.create("A", paymentAmount);
auto doChecks = [&](TransactionResultCode res) {
Operation op = txtest::payment(a.getPublicKey(), paymentAmount);
auto& pay = op.body.paymentOp();
auto checkRes = [&]() {
auto txFrame = root.tx({op});
applyCheck(txFrame, *app, false);
REQUIRE(txFrame->getResultCode() == res);
};
SECTION("dest account")
{
toMux(pay.destination, 2);
checkRes();
}
SECTION("src account")
{
op = root.op(op);
toMux(*op.sourceAccount, 3);
checkRes();
}
};
for_versions({12}, *app, [&] { doChecks(txNOT_SUPPORTED); });
for_versions_from(13, *app, [&] { doChecks(txSUCCESS); });
}
}
| [
"thani@leewayhertz.com"
] | thani@leewayhertz.com |
823bd1e53917351d9235bbf5ca5f287f8db50081 | 393ef88851fd0642f64a12a1a0162cdd33b141b2 | /thcrap_tasofro/src/cv0.cpp | 7304624bcd927f846f13d28dc57fcf5ea9da27e2 | [
"LicenseRef-scancode-public-domain",
"Unlicense"
] | permissive | zero318/thcrap | e076497a8b85fd596d72fdc44b87f1fe2179876d | dff0f66d486aae9e19f0237527a0c3d5163fb34c | refs/heads/master | 2023-03-17T12:19:01.522349 | 2021-03-13T21:18:29 | 2021-03-13T21:18:29 | 322,932,194 | 0 | 0 | Unlicense | 2021-01-27T19:53:22 | 2020-12-19T20:27:14 | C++ | WINDOWS-1252 | C++ | false | false | 8,605 | cpp | /**
* Touhou Community Reliant Automatic Patcher
* Tasogare Frontier support plugin
*
* ----
*
* On-the-fly th105 pl patcher
*/
#include <thcrap.h>
#include "thcrap_tasofro.h"
#include "cv0.h"
TasofroCv0::LineType TasofroCv0::guessLineType(const char* file, size_t size)
{
for (size_t i = 0; i < size && file[i] != '\n'; i++) {
if (file[i] == '#') {
return EMPTY;
}
else if (file[i] == ':') {
return COMMAND;
}
}
for (size_t i = 0; i < size && file[i] != '\n'; i++) {
if (file[i] != '\r' && file[i] != '\t' && file[i] != ' ') {
return TEXT;
}
}
return EMPTY;
}
TasofroCv0::ALine* TasofroCv0::readLine(const char*& file, size_t& size)
{
switch (guessLineType(file, size)) {
case EMPTY:
return Empty::read(file, size);
case COMMAND:
return Command::read(file, size);
case TEXT:
return Text::read(file, size);
default:
return nullptr; // Can't happen
}
}
std::string TasofroCv0::ALine::readLine(const char*& file, size_t& size)
{
std::string out;
size_t i = 0;
while (i < size && file[i] != '\n') {
i++;
}
if (i > 0 && file[i - 1] == '\r') {
out.assign(file, i - 1);
}
else {
out.assign(file, i);
}
if (i < size) {
i++;
}
file += i;
size -= i;
return out;
}
TasofroCv0::LineType TasofroCv0::Empty::getType() const
{
return EMPTY;
}
TasofroCv0::LineType TasofroCv0::Command::getType() const
{
return COMMAND;
}
TasofroCv0::LineType TasofroCv0::Text::getType() const
{
return TEXT;
}
TasofroCv0::ALine::ALine()
{}
std::string TasofroCv0::ALine::unescape(const std::string& in) const
{
std::string out;
for (size_t pos = 0; pos < in.size(); pos++) {
if (in[pos] == '\\' && in[pos + 1] == ',') {
pos++;
}
out += in[pos];
}
return out;
}
std::string TasofroCv0::ALine::escape(const std::string& in) const
{
std::string out;
for (size_t i = 0; i < in.size(); i++) {
if (in[i] == ',') {
out += "\\,";
}
else if (in.compare(i, 7, "{{ruby|") == 0) {
i += 7;
std::string top;
std::string bot;
while (i < in.size() && in[i] != '|') {
bot += in[i];
i++;
}
i++;
while (i < in.size() && in.compare(i, 2, "}}") != 0) {
top += in[i];
i++;
}
out += std::string("<ruby ") + top + ">" + bot + "</ruby>";
i++; // Actually i += 2, because it will be incremented once again in the for loop.
}
else {
out += in[i];
}
}
return out;
}
TasofroCv0::Empty::Empty()
{}
TasofroCv0::Empty* TasofroCv0::Empty::read(const char*& file, size_t& size)
{
Empty* line = new Empty();
line->content = ALine::readLine(file, size);
return line;
}
std::string TasofroCv0::Empty::toString() const
{
return content;
}
TasofroCv0::Command::Command()
{}
TasofroCv0::Command* TasofroCv0::Command::read(const char*& file, size_t& size)
{
Command* line = new Command();
line->content = ALine::readLine(file, size);
return line;
}
std::string TasofroCv0::Command::toString() const
{
return content;
}
TasofroCv0::Text::Text()
{}
TasofroCv0::Text::Text(const std::string& content)
: content(content)
{}
TasofroCv0::Text* TasofroCv0::Text::read(const char*& file, size_t& size)
{
Text* line = new Text();
line->content = ALine::readLine(file, size);
while (guessLineType(file, size) == TEXT) {
line->content += "\n" + ALine::readLine(file, size);
size_t i = line->content.length() - 1;
while (i > 0 && (line->content[i] == '\r' || line->content[i] == '\n')) {
i--;
}
if (line->content[i] == '\\') {
break;
}
}
return line;
}
std::string TasofroCv0::Text::toString() const
{
return content;
}
void TasofroCv0::Text::patch(std::list<ALine*>& file, std::list<ALine*>::iterator& file_it, int textbox_size, json_t *patch)
{
this->cur_line = 1;
this->nb_lines = 0;
this->content = "";
size_t json_line_num;
json_t *json_line;
json_array_foreach(patch, json_line_num, json_line) {
if (this->parseCommand(patch, json_line_num, textbox_size) == true) {
continue;
}
this->beginLine(file, file_it);
this->patchLine(json_string_value(json_line));
this->endLine();
}
this->content = this->escape(this->content);
}
bool TasofroCv0::Text::parseCommand(json_t *patch, int json_line_num, int textbox_size)
{
const char *line;
line = json_array_get_string(patch, json_line_num);
if (strcmp(line, "<balloon>") == 0) {
this->cur_line = 1;
this->nb_lines = 0;
return true;
}
if (this->nb_lines == 0) {
unsigned int i;
for (i = json_line_num + 1; i < json_array_size(patch); i++) {
line = json_array_get_string(patch, i);
if (strcmp(line, "<balloon>") == 0) {
break;
}
else if (line[0] != '\0' && (line[strlen(line) - 1] == '@' || line[strlen(line) - 1] == '\\')) {
i++;
break;
}
}
this->nb_lines = i - json_line_num;
if (this->nb_lines > textbox_size) {
this->nb_lines = textbox_size;
}
}
return false;
}
void TasofroCv0::Text::beginLine(std::list<ALine*>& file, const std::list<ALine*>::iterator& it)
{
if (this->cur_line == 1) {
this->content = this->escape(this->content);
file.insert(it, new Text(this->content));
this->content = "";
}
}
void TasofroCv0::Text::patchLine(const char *text)
{
std::string formattedText = text;
if (this->cur_line != this->nb_lines) {
formattedText += "\n";
}
else if (formattedText.length() == 0 || (formattedText[formattedText.length() - 1] != '@' && formattedText[formattedText.length() - 1] != '\\')) {
formattedText += "\\\n";
}
this->content += formattedText;
}
void TasofroCv0::Text::endLine()
{
if (this->cur_line != this->nb_lines) {
this->cur_line++;
}
else {
this->cur_line = 1;
this->nb_lines = 0;
}
}
json_t *TasofroCv0::balloonNumberToLines(json_t *patch, size_t balloon_number)
{
json_t *json_line_data;
json_t *json_lines;
json_line_data = json_object_numkey_get(patch, balloon_number);
if (!json_is_object(json_line_data)) {
return nullptr;
}
json_lines = json_object_get(json_line_data, "lines");
if (!json_is_array(json_lines)) {
return nullptr;
}
return json_lines;
}
int patch_cv0(void *file_inout, size_t size_out, size_t size_in, const char*, json_t *patch)
{
if (!patch) {
return 0;
}
std::list<TasofroCv0::ALine*> lines;
const char *file_in = (const char*)file_inout;
char *file_out = (char*)file_inout;
while (size_in > 0) {
lines.push_back(TasofroCv0::readLine(file_in, size_in));
}
size_t balloon_number = 1;
int textbox_size = 3;
for (std::list<TasofroCv0::ALine*>::iterator it = lines.begin(); it != lines.end(); ++it) {
TasofroCv0::ALine *line = *it;
if (line->getType() == TasofroCv0::COMMAND && textbox_size != 4 && line->toString().compare(0, 3, "CG:") == 0) {
textbox_size = 4;
continue;
}
else if (line->getType() != TasofroCv0::TEXT) {
continue;
}
json_t *json_lines = TasofroCv0::balloonNumberToLines(patch, balloon_number);
balloon_number++;
if (json_lines == nullptr) {
continue;
}
dynamic_cast<TasofroCv0::Text*>(line)->patch(lines, it, textbox_size, json_lines);
}
std::string str;
for (TasofroCv0::ALine* line : lines) {
str = line->toString();
if (str.size() > size_out + 3) {
log_print("Output file too small\n");
break;
}
memcpy(file_out, str.c_str(), str.size());
file_out += str.size();
size_out -= str.size();
*file_out = '\n';
file_out++;
size_out--;
}
*file_out = '\0';
return 1;
}
/**
* Add a way to escape commas in the th105 cv0 parser.
*
* Returns:
* • 0 if the the current character is a backslash followed by a quote.
* We overwrite the backslash and skip the code checking for the comma.
* • 1 otherwise, just let the game do its thing.
*
* Own JSON parameters
* -------------------
* Mandatory:
*
* [string]
* Current position of the parser in the cv0 file.
* Type: immediate
*
* [delim]
* Character the game is looking for.
* If the game doesn't try to kill our comma, no need to hide it.
* Type: immediate
*
* Other breakpoints called
* ------------------------
* None
*/
extern "C" int BP_th105_cv0_escape_comma(x86_reg_t *regs, json_t *bp_info)
{
// Parameters
// ----------
char *string = (char*)json_object_get_immediate(bp_info, regs, "string");
char delim = (char)json_object_get_immediate(bp_info, regs, "delim");
// ----------
if (delim != ',') {
return 1;
}
if (string[0] == '\\' && string[1] == ',') {
// Erase the backslash
int i;
for (i = 0; string[i + 1] && string[i + 1] != '\n'; i++) {
string[i] = string[i + 1];
}
string[i] = string[i + 1];
// Ensure the test will fail
regs->eax = 0;
regs->ecx = 0;
return 0;
}
return 1;
}
| [
"brliron@hotmail.fr"
] | brliron@hotmail.fr |
fc13a5be54df81d9aeba29fcaa1c6310faf73fa9 | ab8a01a9d0efa019c5327d491573f1f40648b3cb | /src/rpcnet.cpp | a3a9c7e6c19edfa42e5be8ec6aad31f615bf801b | [
"MIT"
] | permissive | drunkart/mnom | 9cbd3dc0c2ba83651010216cb8230ad628ca705d | 6fb8aa7f51490171185235def9668f542b3f595a | refs/heads/master | 2020-12-26T04:16:09.935262 | 2015-03-21T11:03:50 | 2015-03-21T11:03:50 | 16,522,452 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,098 | cpp | // Copyright (c) 2009-2012 Bitcoin Developers
// Copyright (c) 2011-2012 Litecoin Developers
// Copyright (c) 2013 Moneyenom Developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "net.h"
#include "bitcoinrpc.h"
using namespace json_spirit;
using namespace std;
Value getconnectioncount(const Array& params, bool fHelp)
{
if (fHelp || params.size() != 0)
throw runtime_error(
"getconnectioncount\n"
"Returns the number of connections to other nodes.");
LOCK(cs_vNodes);
return (int)vNodes.size();
}
static void CopyNodeStats(std::vector<CNodeStats>& vstats)
{
vstats.clear();
LOCK(cs_vNodes);
vstats.reserve(vNodes.size());
BOOST_FOREACH(CNode* pnode, vNodes) {
CNodeStats stats;
pnode->copyStats(stats);
vstats.push_back(stats);
}
}
Value getpeerinfo(const Array& params, bool fHelp)
{
if (fHelp || params.size() != 0)
throw runtime_error(
"getpeerinfo\n"
"Returns data about each connected network node.");
vector<CNodeStats> vstats;
CopyNodeStats(vstats);
Array ret;
BOOST_FOREACH(const CNodeStats& stats, vstats) {
Object obj;
obj.push_back(Pair("addr", stats.addrName));
obj.push_back(Pair("services", strprintf("%08"PRI64x, stats.nServices)));
obj.push_back(Pair("lastsend", (boost::int64_t)stats.nLastSend));
obj.push_back(Pair("lastrecv", (boost::int64_t)stats.nLastRecv));
obj.push_back(Pair("conntime", (boost::int64_t)stats.nTimeConnected));
obj.push_back(Pair("version", stats.nVersion));
obj.push_back(Pair("subver", stats.strSubVer));
obj.push_back(Pair("inbound", stats.fInbound));
obj.push_back(Pair("releasetime", (boost::int64_t)stats.nReleaseTime));
obj.push_back(Pair("startingheight", stats.nStartingHeight));
obj.push_back(Pair("banscore", stats.nMisbehavior));
ret.push_back(obj);
}
return ret;
}
| [
"wow@gmail.com"
] | wow@gmail.com |
256f8421fc88226d096c235b1482a6e9fd6358e5 | d3a4940ad9f3d0665844b99efc4d8c992b5dbbc0 | /ejercicios/demoapuntador.cpp | 276e812d8a89a1f6ee43a1cef975d75dabb20599 | [] | no_license | crisantru/C-plus-plus | fe24597aab33bd6064c3e397d9f0e4be5bf99d1e | 4b1fd3d8e4ffbe117a0e266bffc6bdfd87ae488e | refs/heads/master | 2020-04-25T00:24:56.467789 | 2019-02-24T19:12:18 | 2019-02-24T19:12:18 | 172,377,546 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 188 | cpp | #include<stdio.h>
main()
{
int a = 25;
printf("a= %i \n",a);
//imprime la direccion de la memoria de a
printf("La direccion de memoria de a es: %d", &a);
return 0;
}
| [
"crisantru@gmail.com"
] | crisantru@gmail.com |
f8f895ff32156ca76e2337502b71b97d9faaa5bc | 493ac26ce835200f4844e78d8319156eae5b21f4 | /flow_simulation/ideal_flow/0.31/U | 8abf446074834c948723967fa4b2817ece1bacbd | [] | no_license | mohan-padmanabha/worm_project | 46f65090b06a2659a49b77cbde3844410c978954 | 7a39f9384034e381d5f71191122457a740de3ff0 | refs/heads/master | 2022-12-14T14:41:21.237400 | 2020-08-21T13:33:10 | 2020-08-21T13:33:10 | 289,277,792 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 176,222 | /*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v1912 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
location "0.31";
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];
internalField nonuniform List<vector>
5794
(
(-0.535664 -0.0406299 -2.65843e-17)
(0.143213 2.30027 0)
(0.889381 -0.116975 -1.45734e-16)
(0.546916 1.04252 1.25271e-16)
(2.5393 0.835167 3.01442e-17)
(-0.0762665 2.89458 -8.54211e-17)
(3.64093 -0.0710518 -1.33689e-16)
(-4.43491 0.0340484 0)
(5.8387 1.03755 9.07552e-17)
(-1.24441 0.0874959 1.82215e-16)
(4.79558 -0.102847 -1.62018e-19)
(-0.929172 -0.399919 0)
(-1.73445 -0.52136 4.82447e-16)
(-0.14171 2.01322 2.88274e-16)
(1.40217 0.329815 4.06731e-16)
(0.656634 -0.102396 -1.41721e-16)
(1.89054 0.317932 5.53823e-17)
(-0.210561 1.66757 2.16004e-16)
(2.00765 0.0208267 3.62296e-16)
(0.0172282 1.89129 1.21089e-16)
(-2.9162 1.63275 -3.95935e-17)
(-0.0548327 1.57026 -1.1757e-16)
(3.56076 0.303156 1.94356e-16)
(-1.12006 -0.217062 -5.74043e-16)
(-3.57328 -0.271358 -2.6049e-16)
(2.92959 10.0199 2.00315e-17)
(7.03075 0.0120641 0)
(-2.55219 6.45688 -1.07282e-16)
(0.323711 10.2033 -3.03907e-17)
(-0.160881 -0.143296 2.9239e-16)
(1.42316 -1.08228 -4.89253e-16)
(-1.02681 0.0384657 -5.32014e-16)
(-2.62847 0.236879 -7.82307e-16)
(-1.00216 -1.00958 3.85051e-16)
(0.541663 0.226192 -1.62997e-16)
(1.91671 -0.71997 1.52836e-16)
(9.72212 0.554419 -1.98083e-16)
(0.257448 -0.282843 0)
(2.90295 -0.703652 1.19495e-16)
(1.56753 2.97179 0)
(-3.01159 -1.68119 -8.87785e-17)
(-1.65264 -0.795578 1.26937e-16)
(7.38494 0.111469 -8.75969e-19)
(0.313418 -2.38307 0)
(1.31005 -0.0141345 -3.58707e-16)
(5.3255 -0.0888506 1.14226e-16)
(2.6751 0.00426219 -2.56582e-16)
(-2.95001 -0.154242 0)
(-0.751808 0.208608 6.96772e-16)
(0.0350288 -0.340445 6.50392e-17)
(0.456699 -0.258303 -1.57226e-16)
(6.42978 -0.147272 -1.55014e-16)
(1.36794 0.0102239 0)
(1.85364 2.32097 1.07348e-16)
(-0.0962912 -0.075106 9.71421e-18)
(5.73859 -0.541841 0)
(2.98354 -0.0820864 -2.04295e-16)
(-2.03008 0.59594 1.18541e-16)
(8.32992 0.0611266 0)
(4.29943 9.35699 -6.77182e-19)
(9.21614 0.433499 1.72819e-18)
(0.683871 1.70269 -9.79208e-17)
(1.09188 -1.81733 -1.10704e-16)
(-0.373103 0.0326211 2.23861e-16)
(-1.60467 0.521869 0)
(1.76701 0.337272 -2.10349e-18)
(0.230774 0.261568 -2.48366e-16)
(0.349228 0.6112 0)
(-0.259621 1.3878 -2.2306e-16)
(0.0428527 0.964417 -8.52196e-21)
(5.19589 -0.405987 1.18871e-16)
(0.333493 1.30643 -3.26653e-16)
(12.1061 2.04554 -3.52538e-18)
(-1.60315 0.159599 0)
(-0.283561 1.48479 2.16036e-16)
(-2.03895 5.38306 4.06477e-20)
(-1.67764 0.245306 1.06126e-16)
(1.67298 9.77651 -2.07825e-17)
(0.0940098 -2.36959 3.55557e-17)
(0.681522 -0.0302502 6.44101e-17)
(-0.168681 0.0827541 -1.96101e-17)
(0.0137342 1.88189 -1.18619e-16)
(-3.38783 -2.52289 8.95336e-19)
(1.43048 -1.6638 -8.29801e-17)
(-0.798088 -0.86521 -3.46424e-16)
(-0.111004 5.40742 -3.59601e-17)
(0.225325 4.30584 3.30796e-17)
(-0.0207428 4.65087 -2.47473e-17)
(-0.627203 -0.385808 -1.64912e-16)
(2.91875 0.942762 -3.75507e-17)
(1.01863 5.80179 -7.1411e-17)
(0.0228189 5.00363 -8.87179e-17)
(-0.130805 7.98693 1.12691e-16)
(0.265711 7.61308 5.34492e-17)
(-0.176883 6.8777 2.80585e-17)
(-2.09655 0.0314035 4.74102e-18)
(-0.00585527 6.42828 -4.92337e-17)
(-0.168531 7.70689 -1.22256e-17)
(0.0518519 4.9088 0)
(8.9668 0.480352 -2.7964e-17)
(1.7955 3.34204 -1.0526e-16)
(-0.793238 0.00721717 -4.06762e-16)
(8.25052 0.141549 6.7605e-17)
(0.425928 3.39395 -3.07998e-16)
(0.695918 -0.284503 0)
(-2.18034 7.69398 0)
(0.0762096 1.71769 0)
(-0.700873 0.0987059 -2.42188e-16)
(-1.2848 0.531093 -1.09321e-16)
(-0.0796841 -2.32142 -9.61804e-17)
(0.948261 0.0790598 -9.37904e-19)
(-0.853887 -1.07681 0)
(-1.28762 4.81589 9.5245e-17)
(0.0597632 -0.484583 1.40807e-16)
(-0.246665 6.21128 0)
(-0.0167186 8.03884 0)
(0.672235 0.364717 -3.25311e-16)
(-1.75244 8.07011 -1.92158e-18)
(9.44104 0.388693 -2.42897e-20)
(10.8224 0.639639 5.29872e-18)
(-2.09048 8.91483 8.87201e-17)
(2.27068 0.0892669 0)
(-1.10494 -0.388781 0)
(-2.36168 5.73802 -1.31421e-16)
(-1.16033 -0.612358 1.68815e-16)
(4.90087 2.47427 4.64148e-17)
(-0.345589 0.926876 0)
(0.0827267 2.98052 5.18988e-17)
(6.83281 -0.462351 1.01316e-16)
(-0.52707 -0.0224759 1.51827e-16)
(0.777369 -0.619466 2.95913e-16)
(0.641465 -0.893548 1.80976e-16)
(0.235204 0.105442 2.72471e-17)
(1.22023 9.34216 -6.41374e-17)
(-1.39783 7.92809 1.07448e-16)
(0.618039 0.651557 0)
(4.72804 -0.189788 8.29665e-17)
(0.8275 1.65266 -1.47176e-16)
(0.1099 -0.210733 1.88915e-16)
(0.296646 -0.790481 0)
(-2.14934 -1.69124 -3.50461e-16)
(2.00994 5.3984 0)
(-1.14717 -1.4205 0)
(1.39098 5.84984 2.3111e-16)
(0.11277 -0.116602 2.11615e-16)
(2.04454 0.059188 1.71292e-17)
(-0.430356 0.293448 2.2816e-16)
(8.02788 0.271012 2.11925e-16)
(3.12157 0.531436 -1.89473e-18)
(0.233543 5.19887 2.73039e-16)
(7.24223 -0.171868 -1.61154e-16)
(1.3501 0.524896 2.43505e-16)
(-1.76848 7.689 0)
(-0.781749 0.301444 1.8643e-16)
(4.81955 -0.265729 0)
(2.55519 0.0155208 0)
(1.5546 -0.783851 -2.33975e-16)
(-0.00194414 -0.29971 3.94614e-16)
(5.20767 0.214192 -2.42899e-16)
(-0.130786 -0.176568 -1.37017e-16)
(-1.26811 0.344025 3.43654e-16)
(1.42236 0.0594201 -2.91472e-16)
(0.0780474 -0.165063 0)
(0.209146 -0.145323 -1.31499e-16)
(-2.9396 0.0251693 -2.67758e-16)
(-3.07323 -0.0552859 1.45966e-16)
(0.989524 -0.141716 1.1338e-18)
(1.26095 0.0156529 -3.11003e-18)
(0.920528 -0.0176222 0)
(-0.903997 -0.352064 8.10661e-19)
(0.0700539 -0.0753324 0)
(-1.87912 0.424388 -1.02298e-16)
(-0.897715 -0.726565 0)
(2.17268 -0.0289284 7.50427e-17)
(-1.52684 -0.381327 3.6821e-16)
(3.43176 0.0401492 0)
(1.60672 0.134496 -2.02407e-16)
(-3.67945 -0.321192 -1.58255e-16)
(-1.3929 -0.22052 -7.88567e-17)
(6.33476 0.17285 6.06166e-18)
(1.23969 -0.0156262 -4.74337e-18)
(-0.739908 -0.245585 0)
(2.8112 0.413135 0)
(-2.64933 -0.407012 1.06161e-16)
(1.98417 -0.25161 0)
(-0.00219592 -0.584385 7.21025e-17)
(-0.793969 0.0648395 -1.44619e-16)
(-0.966256 0.395733 -9.42293e-17)
(-1.2077 0.138054 1.15167e-16)
(-0.786431 -0.0526953 3.20044e-16)
(4.70849 -0.0615332 -3.16554e-16)
(-1.14951 -0.0465297 3.78299e-16)
(-2.95233 -0.11123 5.1753e-16)
(2.44469 -0.539034 4.6222e-16)
(0.19637 -0.214026 -9.4155e-17)
(0.185672 -0.24552 -5.06115e-16)
(-4.18288 -0.305576 -1.34259e-17)
(-3.38542 -0.528333 -1.29691e-16)
(1.95739 -0.211037 -2.46268e-16)
(6.41767 -0.0443498 1.12223e-16)
(3.55927 -0.0655477 -1.51062e-17)
(6.1975 0.0626285 0)
(-2.26057 -0.507327 0)
(-0.334936 -0.469527 9.69503e-18)
(2.52911 0.0700693 -5.99345e-17)
(5.16593 0.109123 0)
(-1.36156 -0.635273 9.08212e-18)
(0.308804 -0.250159 2.04814e-19)
(5.70997 0.584049 -6.41134e-18)
(2.10083 8.08037 1.1776e-16)
(-0.401282 -1.58659 9.0639e-17)
(9.67143 -0.0168032 0)
(1.18571 -0.471188 -9.26668e-17)
(0.983102 0.0986619 1.35568e-16)
(-1.25979 -0.742418 0)
(-4.26213 -0.612279 4.18893e-16)
(4.28286 0.344855 -9.87582e-17)
(1.00768 0.180692 1.06286e-16)
(4.15402 -0.171238 1.22209e-16)
(1.33596 5.75312 -1.5754e-16)
(9.58966 -0.0112417 0)
(2.56945 0.355854 1.66314e-16)
(-0.790949 1.69293 0)
(-0.0296111 5.30657 2.36032e-17)
(5.57693 0.115131 1.16828e-16)
(11.6883 0.74628 2.03764e-18)
(0.334616 0.0678624 -7.3477e-17)
(-0.26605 -0.193937 -1.06888e-16)
(3.47741 -0.042134 0)
(0.306084 0.519992 -2.96658e-16)
(0.325143 0.364074 0)
(0.943431 -0.500152 -5.15017e-17)
(-1.89764 -0.575479 -8.47664e-17)
(-0.982292 0.666996 1.36696e-16)
(0.562244 -0.00498237 1.92846e-16)
(9.06306 0.204083 6.77472e-18)
(7.35844 0.550366 2.30032e-18)
(7.54735 0.571641 2.62722e-17)
(-2.3215 -0.122841 -1.32195e-16)
(-1.17531 0.214328 -3.67044e-16)
(0.368912 1.78271 0)
(1.35141 0.620519 1.05573e-15)
(1.24001 4.13696 2.05571e-16)
(-0.759515 0.654206 -2.66789e-16)
(-1.18184 0.6373 2.55663e-16)
(0.81568 0.313523 2.76833e-16)
(0.698128 -0.487517 -1.26847e-16)
(3.715 0.433686 8.17597e-18)
(-0.164828 6.20125 0)
(-0.0498809 6.06666 0)
(0.0418199 3.32159 0)
(1.27182 0.324368 2.31929e-17)
(3.41365 -0.162905 -7.61081e-17)
(-0.675199 0.254053 -1.61977e-19)
(7.33622 1.15416 -5.27503e-17)
(4.87968 1.25162 -1.28169e-17)
(8.16951 0.220324 -1.38787e-16)
(8.98757 0.478634 1.46522e-16)
(-0.0576102 -0.744329 2.5542e-16)
(-1.63258 -0.143335 0)
(6.41039 -0.0347152 -1.00746e-16)
(1.28177 -0.327076 7.98499e-17)
(0.897608 0.070868 -7.88943e-17)
(1.21367 -0.207503 0)
(-1.82581 -0.028564 0)
(-3.62344 -0.0121284 -4.37899e-19)
(0.634129 7.10864 9.9134e-17)
(3.9652 0.855897 0)
(-1.80734 0.184691 -5.5334e-16)
(4.47874 0.18486 -1.10417e-16)
(2.41815 0.0677078 0)
(-1.98756 -1.20221 -2.09604e-16)
(-3.39621 -0.988169 -3.31023e-16)
(5.38384 -0.248367 -1.43071e-16)
(9.42248 0.0881852 3.31145e-17)
(1.02773 0.293881 2.7566e-16)
(2.15952 2.0359 -1.20926e-16)
(-1.88311 -0.163495 -7.06375e-17)
(0.50019 0.239666 -1.80567e-16)
(-1.25964 0.757368 -2.22485e-16)
(-4.39021 -0.269069 2.10258e-16)
(0.884243 3.05357 2.36256e-16)
(-2.8548 -1.43596 9.49462e-17)
(-1.59174 -0.887979 -3.51264e-16)
(2.00003 3.19566 4.98895e-17)
(-0.138763 5.16981 1.00479e-16)
(-0.0679537 6.48949 1.09846e-17)
(-0.0750271 6.2967 0)
(1.07227 5.84718 3.69017e-17)
(-1.4563 8.98223 0)
(2.59549 0.313178 -1.0704e-17)
(-0.243939 -0.213159 -1.02927e-16)
(-1.17925 -0.887794 2.03292e-18)
(2.54258 1.01449 0)
(8.10585 1.62833 0)
(1.45543 7.05721 6.7012e-18)
(-0.889419 -0.495108 5.9366e-17)
(-1.98483 -1.00578 4.24934e-19)
(2.75039 4.25972 -1.50248e-16)
(1.22275 -0.370951 -1.51507e-16)
(-0.00706234 1.61311 8.54932e-17)
(-0.401825 6.50625 0)
(0.0246709 -0.290509 -7.95189e-16)
(0.504509 1.56621 0)
(-1.20556 -1.22381 -1.32661e-16)
(3.80339 0.312305 1.4948e-18)
(0.413824 0.168561 -2.59474e-16)
(-0.238965 1.19011 3.67537e-16)
(5.06269 0.223821 2.2344e-16)
(2.56995 0.0514264 0)
(-0.522054 -0.595484 -5.67384e-16)
(-0.185642 0.0909556 -2.90695e-16)
(1.34961 6.88884 -1.32014e-16)
(0.228672 -0.476408 -7.94299e-17)
(10.5674 0.119565 0)
(10.0116 0.284351 -1.64704e-17)
(-0.3274 0.15069 -8.79515e-17)
(-2.35445 6.58076 -2.20945e-16)
(-2.0102 0.349477 -1.95186e-16)
(0.433593 8.10939 -3.35195e-17)
(-3.43839 0.425318 2.56388e-16)
(3.06946 -0.089178 -1.36411e-16)
(-1.1525 5.77292 -8.84069e-17)
(3.25047 0.657838 -9.03343e-19)
(-0.169899 -0.335785 0)
(1.77455 -1.05987 0)
(-1.6132 0.137184 0)
(-0.547426 -0.29919 6.73444e-17)
(-1.0089 -0.312241 -3.22323e-16)
(4.6022 -0.122048 2.77041e-16)
(6.51393 0.0187692 -6.24642e-18)
(6.58148 -0.12264 2.8112e-16)
(0.800823 -0.38881 8.21818e-17)
(-1.95475 0.405567 4.46939e-16)
(-0.982293 0.0750891 0)
(-1.40948 0.116399 -2.06792e-16)
(-1.36389 -0.114408 0)
(0.661039 -0.155411 0)
(-0.932352 0.0826557 -2.81347e-16)
(-0.213626 -0.0702224 0)
(-0.892692 -0.147042 3.93767e-16)
(-2.54901 0.0124487 2.93472e-16)
(6.31351 0.48373 0)
(3.35237 0.0672329 0)
(1.21413 0.223033 3.57036e-16)
(1.63158 0.147383 3.00554e-16)
(-1.61256 -0.721652 2.75772e-16)
(0.0778687 -0.226864 -2.32871e-17)
(-3.03295 -0.0879134 -1.08781e-16)
(0.486852 -0.0897561 8.00627e-17)
(3.59504 -0.0802415 5.26955e-17)
(0.390561 0.159438 2.43774e-16)
(-3.21812 -0.178176 -1.91696e-17)
(-1.14152 -0.145021 1.5065e-16)
(3.05395 -0.028298 0)
(-0.567543 -0.111912 0)
(1.37598 -0.320179 1.52812e-16)
(5.76606 -0.376345 1.48571e-16)
(3.32128 -0.0093144 5.27648e-17)
(-4.34346 -0.172838 0)
(0.0799592 -0.146191 -2.58367e-16)
(0.240168 -0.474202 5.28899e-16)
(5.13849 -0.073658 3.28925e-17)
(3.53754 -0.141769 -2.41935e-17)
(-3.79477 0.194357 -1.45629e-16)
(3.58811 0.050985 3.25344e-16)
(-3.1835 0.0104679 -3.3748e-17)
(4.80089 -0.340304 0)
(2.46824 -0.117141 3.35433e-16)
(-2.57539 0.193481 -7.0398e-17)
(0.310128 1.00743 -1.12011e-16)
(1.56491 -0.300294 0)
(3.293 0.0509303 -7.75538e-17)
(0.589025 -0.481852 2.87909e-16)
(0.521149 0.21258 8.01292e-17)
(-2.75637 0.156897 1.24519e-16)
(4.35235 -0.0604514 0)
(2.46492 0.250812 8.71189e-17)
(-1.72151 0.689693 0)
(0.564246 0.0763193 1.40164e-17)
(-2.6002 -1.33314 1.0708e-16)
(0.164789 0.632188 0)
(10.748 0.0816295 0)
(1.00877 -0.83881 1.22116e-16)
(1.27106 0.326458 -4.76434e-16)
(-0.720779 -0.846814 -3.147e-16)
(0.0505845 9.63925 -2.45614e-17)
(1.90585 -0.301727 2.04751e-16)
(-0.266745 0.330926 -7.94767e-16)
(1.23762 -0.183757 0)
(1.14196 0.0732106 -5.74812e-16)
(-1.21693 1.13228 -9.49206e-19)
(0.0136385 1.05579 -2.17797e-18)
(-2.97006 -0.0576208 1.03994e-16)
(-1.82742 -0.233169 6.61291e-17)
(2.11616 -0.239018 -7.0287e-17)
(-2.25836 -0.335105 8.8004e-17)
(0.650333 -1.89721 0)
(-1.58839 0.701347 0)
(3.86567 0.13613 -1.99023e-16)
(-1.3291 -0.298614 1.23312e-16)
(-4.96155 -0.592476 -2.27891e-16)
(10.0135 0.128147 3.40086e-17)
(0.861013 0.204111 1.80678e-16)
(0.115706 -0.973691 0)
(6.70925 1.04984 4.21072e-17)
(1.57343 -1.33028 4.33643e-19)
(-0.241581 2.12262 1.49989e-16)
(0.208203 1.70703 -2.9284e-17)
(-0.473588 5.89657 -5.6302e-17)
(-0.109704 7.46741 1.94322e-17)
(0.200235 5.00382 0)
(0.824927 0.43958 1.6415e-16)
(-0.977456 0.355468 2.47472e-16)
(5.30647 0.0712993 1.79849e-17)
(2.55454 0.0122714 7.53914e-17)
(-0.804745 -0.296123 0)
(-0.0939061 1.06115 2.43193e-16)
(-2.4265 0.16587 0)
(-0.229952 6.57741 3.40095e-17)
(0.066628 4.8481 -6.95318e-17)
(-0.198426 7.74325 2.56414e-17)
(-0.130619 0.0492639 -1.43067e-17)
(0.530847 1.41466 -3.20778e-17)
(-0.869937 -0.502155 0)
(1.58339 0.226051 0)
(-0.694267 -0.286345 -1.83863e-16)
(-0.103054 -0.432897 -1.8058e-16)
(-0.0359661 1.90873 -1.08871e-17)
(-0.325717 1.30984 4.35379e-17)
(4.46275 0.999749 2.65175e-16)
(9.96676 0.147487 1.17308e-17)
(0.827606 6.73346 -2.06175e-16)
(1.07576 -3.01404 -1.81189e-17)
(1.8269 -0.359236 2.53543e-16)
(0.626523 0.430973 0)
(-0.570491 -0.329768 1.49321e-16)
(0.372176 -0.451087 -9.20291e-18)
(0.0287316 -0.608759 -9.01677e-17)
(1.43899 0.222933 1.55059e-16)
(-0.221352 -0.553504 2.39915e-16)
(9.92015 0.0998679 -2.28775e-16)
(1.45022 -0.492804 0)
(1.04601 -0.217272 6.78212e-17)
(-1.6856 0.405696 -1.76743e-18)
(0.0629142 7.97492 -4.92987e-17)
(-0.20367 6.46928 8.00905e-20)
(0.239218 -0.233193 0)
(1.24454 -1.95293 1.53332e-16)
(0.921632 0.193386 -7.81957e-17)
(-1.18787 -0.157381 -1.96554e-16)
(-0.0124834 2.02138 -5.00308e-17)
(-2.60221 1.22578 4.04908e-17)
(-0.0324068 1.08399 -4.43208e-16)
(-0.151868 6.79106 -2.32106e-17)
(0.885901 -0.0805094 -4.83518e-16)
(0.397253 5.26064 -1.99259e-18)
(-1.66463 -0.312113 -1.87703e-16)
(-0.133022 6.90833 -2.71643e-17)
(1.32667 6.57774 7.94925e-17)
(-0.32943 0.522723 -1.04135e-16)
(0.106354 1.98241 -1.69721e-16)
(-0.440527 1.33921 1.52211e-16)
(0.527798 0.451871 -3.59415e-16)
(8.6511 0.523499 8.39128e-17)
(-0.516461 -0.0129325 -2.63279e-16)
(10.5456 0.514536 -2.11751e-18)
(3.22627 2.15502 6.87384e-17)
(0.54879 0.104085 -4.16142e-16)
(-0.373514 -1.98159 -4.44633e-17)
(0.302436 0.0925393 3.82317e-17)
(6.52552 0.615521 -5.44048e-18)
(1.54563 0.706152 -6.45467e-17)
(3.05318 -0.159346 1.98427e-17)
(0.820391 0.248137 -1.73746e-16)
(-0.901494 -1.2227 1.06833e-15)
(7.7648 1.48361 -3.45565e-18)
(-2.82585 6.67149 1.2279e-16)
(-1.4671 -0.00554967 1.60967e-16)
(0.0572296 1.93292 4.19095e-17)
(-1.42867 1.38185 2.18549e-16)
(-0.282095 0.252632 0)
(3.8563 0.0204584 -1.10235e-16)
(3.62569 -0.114534 8.22395e-18)
(-0.169872 0.154974 1.61707e-16)
(3.41752 -0.109506 -4.61134e-20)
(9.73296 0.021712 0)
(-1.03191 0.310528 1.95497e-18)
(0.624368 0.0103955 -4.8972e-17)
(-0.163022 0.437036 2.88621e-20)
(-0.0342684 1.96621 1.49083e-16)
(-0.0147369 2.27444 -1.58709e-16)
(-0.644124 4.19951 4.67271e-16)
(3.84153 0.527147 7.87097e-18)
(1.57096 -0.616424 -2.08371e-19)
(0.923092 -0.384101 2.21464e-16)
(-0.20047 0.0850242 0)
(0.0541548 0.742719 0)
(0.586751 -0.348804 -3.15097e-17)
(7.14585 0.904659 -1.41028e-19)
(4.09401 1.05749 2.76138e-17)
(7.85883 0.850379 -7.39107e-18)
(10.3446 0.484752 2.99066e-18)
(0.654635 -0.646965 0)
(0.762791 5.85587 0)
(0.206233 1.77317 1.71044e-16)
(-0.50026 0.512121 2.11826e-16)
(9.06229 0.454914 -4.09089e-16)
(1.56709 0.678193 0)
(1.76246 -0.0886274 0)
(-2.03136 0.126905 1.84643e-16)
(0.36966 0.102478 1.64172e-18)
(-2.99647 -1.88366 -1.12434e-16)
(0.831189 -0.0425133 1.7813e-16)
(0.472074 -0.355429 -8.92778e-17)
(-0.239981 5.59848 -2.84924e-17)
(-0.214424 8.04336 -1.17113e-17)
(0.789118 -0.0420456 -2.36781e-16)
(9.84587 0.151461 -6.08665e-17)
(10.0361 0.331034 3.5645e-18)
(-0.45365 1.30155 1.23393e-16)
(0.340976 1.83252 -3.19181e-17)
(2.79202 1.09275 -1.22452e-17)
(-1.35892 9.55643 -1.07045e-16)
(-0.212873 0.0583396 1.00703e-15)
(0.281998 2.19011 5.0493e-18)
(-1.04516 -0.406828 0)
(5.57157 3.88889 5.84117e-17)
(0.124758 2.01122 8.71373e-17)
(-0.125153 1.58283 -3.72744e-20)
(-0.488644 2.20341 1.57467e-16)
(-0.00215931 -0.147641 0)
(10.552 0.325652 0)
(-0.145073 0.435023 -6.12428e-17)
(3.4088 -0.0335369 0)
(3.06623 0.184883 5.81217e-17)
(9.99702 0.0587786 -9.56391e-17)
(5.2796 -0.0171813 6.77618e-17)
(-0.497918 0.0486415 1.16951e-16)
(7.39142 0.0449819 8.63069e-17)
(-0.111821 1.54604 6.39982e-17)
(-0.551734 -2.6394 1.51764e-16)
(-0.0068987 1.86773 1.62325e-16)
(-0.279019 1.43239 -1.68974e-16)
(-1.40422 0.0730806 -6.33687e-17)
(-0.437723 -0.257429 0)
(9.66569 0.763733 0)
(1.72575 5.73978 -2.40649e-16)
(0.0307498 -0.301856 -1.96047e-16)
(0.0451146 1.80923 5.17689e-16)
(0.901735 3.81504 -3.4726e-17)
(0.683782 0.133104 0)
(1.72559 0.0805358 -3.71735e-16)
(-1.04077 -1.15708 -1.33954e-16)
(0.0997672 1.95999 1.23618e-16)
(-1.08179 -1.61354 0)
(0.480094 2.1837 0)
(-0.0997358 1.84312 0)
(0.171642 1.92248 -1.37504e-16)
(1.35488 2.70381 7.20297e-18)
(10.5653 2.62259 -2.52268e-18)
(-0.0703866 0.0211189 0)
(5.5958 1.40525 0)
(1.43494 0.811148 -7.43304e-17)
(0.141273 1.91968 1.141e-16)
(-1.39049 0.152039 0)
(0.777043 -0.00833147 3.62296e-16)
(0.174358 -0.460786 -6.6815e-19)
(-0.104572 0.893344 -1.42699e-16)
(1.6559 -0.505469 0)
(8.24852 0.54646 -5.74384e-17)
(-1.56356 0.671388 -1.36772e-16)
(0.574633 2.1909 7.05049e-17)
(0.0421861 4.42264 0)
(0.874438 3.12887 -1.01958e-17)
(9.85003 0.238107 -1.8362e-17)
(3.27617 1.48641 -4.68498e-18)
(2.14946 3.75967 -1.20946e-16)
(-2.43742 -1.06824 -1.884e-16)
(-1.22857 -0.424731 -4.26831e-16)
(-0.202691 7.09814 7.59285e-19)
(-0.350601 6.32601 4.28512e-17)
(2.85118 2.61797 0)
(10.0862 -0.0606353 2.25628e-17)
(-2.73664 -0.152948 1.21053e-16)
(9.09729 0.762484 -1.07099e-16)
(-0.243247 -0.310975 1.64783e-16)
(-0.147922 6.90857 0)
(0.0250525 5.85501 -5.15359e-17)
(-0.276537 4.93905 1.67289e-16)
(1.73395 -0.282581 -5.88508e-18)
(0.167892 2.63861 3.93361e-17)
(1.15836 1.28515 5.13952e-18)
(-0.110428 6.76994 -2.42539e-17)
(-0.463777 6.66531 -2.61267e-17)
(1.95983 8.96229 5.11681e-17)
(0.517353 0.0376395 1.91191e-17)
(10.1077 0.175207 0)
(0.180176 -0.259221 4.86531e-16)
(0.825996 0.740689 -8.29329e-17)
(-0.867855 0.462091 -2.94877e-16)
(7.77136 0.54375 1.51163e-17)
(-0.35335 6.91313 -3.8786e-17)
(-0.00198616 6.96489 1.65073e-16)
(1.15018 -0.186274 -6.08106e-20)
(-0.404331 0.0452451 -1.13257e-16)
(1.1841 6.00986 0)
(-1.49442 0.00854158 0)
(-0.0948828 -0.198274 -1.93217e-17)
(-0.0492244 -1.72415 0)
(4.04232 2.89527 -6.37365e-17)
(4.78563 1.767 0)
(2.75734 3.65695 -1.81141e-16)
(2.1462 -1.58766 4.58441e-17)
(1.45377 0.206321 3.01329e-16)
(2.32102 0.0573848 3.17769e-17)
(7.45122 0.737961 -1.36492e-17)
(4.11151 0.00135639 -2.11786e-16)
(7.69648 0.14919 -2.6665e-16)
(1.1078 -0.234302 0)
(0.306682 1.71052 -6.82356e-17)
(5.22269 3.04524 1.49166e-16)
(3.73572 1.735 -6.79684e-17)
(-0.125138 -0.0537705 -3.49094e-16)
(0.447051 1.79427 4.72717e-16)
(0.21428 2.1637 2.53503e-17)
(0.603647 -0.341996 -4.31788e-16)
(1.12752 1.16643 -7.56555e-19)
(1.03911 0.927801 -2.27552e-16)
(-0.396339 -0.277614 1.73785e-16)
(-0.79295 0.534981 7.67691e-17)
(0.1927 2.20307 0)
(0.16264 0.692287 -7.01159e-17)
(-0.510165 1.21723 -6.46735e-17)
(0.341597 1.61865 2.55021e-16)
(3.84471 0.0279315 -6.27989e-17)
(1.56952 8.03136 -3.49584e-17)
(10.6276 0.426208 -6.61176e-17)
(3.42323 -0.0399219 7.09305e-17)
(-1.71311 6.28392 -4.181e-17)
(-1.16628 0.0240383 -1.20418e-16)
(8.58058 0.170748 3.30248e-16)
(3.99759 -0.0978682 -2.21056e-17)
(-0.0210009 6.08573 3.33016e-18)
(4.70944 -0.140237 2.21719e-16)
(0.0236574 4.3793 -1.60734e-16)
(-0.287203 6.46916 7.28334e-17)
(7.14041 0.359369 0)
(-0.21926 -0.603625 -1.10674e-16)
(0.0311128 0.0746987 2.72272e-17)
(-0.0745464 0.900362 0)
(-1.09307 -0.574752 -1.49679e-16)
(-0.158962 0.0514991 6.20146e-17)
(1.6935 0.566936 2.16013e-16)
(1.11971 0.0665097 2.44376e-16)
(4.12135 0.228755 -3.78121e-17)
(9.84829 0.698548 -1.1282e-18)
(0.77683 0.0136917 -1.80401e-16)
(0.232059 0.111146 3.60836e-16)
(0.871874 1.17591 -2.55096e-16)
(0.350705 -0.0393538 1.20877e-16)
(3.62014 -0.0481773 0)
(-0.150114 0.0500681 -1.10061e-17)
(-2.07069 1.58819 -2.3335e-16)
(-0.0134683 1.91996 -1.77872e-20)
(-0.146358 6.38182 2.2941e-17)
(0.583183 5.51644 -2.43484e-18)
(-0.168685 5.0704 -9.93009e-17)
(-0.0623224 6.43452 2.75315e-17)
(2.03301 4.49334 -1.29288e-16)
(7.41947 0.394775 6.46205e-17)
(0.270199 -1.81689 0)
(10.9857 1.08098 0)
(-1.60326 0.189538 3.20239e-16)
(-2.61759 0.537405 3.83435e-16)
(-0.269531 6.96796 1.20977e-16)
(0.0670231 7.10834 -1.11882e-16)
(-1.50996 0.130797 1.03574e-16)
(3.05449 3.82185 -4.37025e-17)
(-1.28387 0.0298501 4.06376e-17)
(0.447437 1.31769 1.94772e-17)
(0.392619 -0.420759 3.09148e-19)
(0.820366 1.86585 -4.84192e-17)
(-0.153761 -0.388952 -9.99919e-18)
(1.73508 3.78595 -4.87394e-17)
(3.9182 -0.0672543 -3.58691e-16)
(0.857329 4.80757 5.56669e-18)
(-0.0469225 0.825574 1.42662e-16)
(0.616806 0.317448 0)
(0.753354 -0.0931643 0)
(0.664532 1.13668 0)
(0.917187 5.96467 2.20854e-16)
(1.33387 7.71495 2.36771e-16)
(-0.187759 7.39492 1.88972e-16)
(2.99789 0.590536 2.5574e-17)
(5.96122 3.3977 -3.40442e-17)
(0.244156 0.0999031 0)
(0.030572 1.23784 8.05264e-17)
(-0.61436 -0.16864 3.23668e-17)
(10.511 0.0556963 -6.89475e-18)
(-0.670924 0.271454 -9.48298e-17)
(-1.61863 0.044467 2.82972e-18)
(-0.233798 -0.172312 -1.5745e-16)
(8.99726 0.345477 -1.88481e-17)
(0.861081 1.96897 0)
(3.31835 1.09678 -3.35175e-16)
(2.99837 -0.0182449 2.1821e-16)
(3.73352 -0.0538179 0)
(-0.155318 -0.251477 7.11523e-17)
(1.45099 2.20155 -2.37691e-16)
(8.75565 0.152736 0)
(2.12441 5.83521 -4.38106e-16)
(-0.12174 6.59887 -1.06408e-16)
(0.65363 3.63858 0)
(1.15011 0.532697 0)
(11.3694 0.285831 3.98378e-17)
(10.3328 0.324401 3.09764e-17)
(9.85782 1.29353 1.94343e-18)
(5.54343 2.28975 -1.99881e-21)
(0.727648 3.32692 0)
(1.51465 0.508846 1.83339e-16)
(2.4232 6.84757 -2.816e-17)
(5.08024 -0.0431018 0)
(-0.0428462 1.12903 -3.90195e-16)
(4.48095 1.12064 2.83818e-17)
(-0.0403907 -1.84125 -1.02419e-16)
(9.32162 0.8433 -4.85153e-17)
(10.844 0.0430584 7.1843e-17)
(1.84884 1.74376 -1.72307e-16)
(9.93335 0.397709 -1.42877e-17)
(-0.0755749 7.04464 1.32907e-16)
(0.912831 7.7427 4.13439e-17)
(0.732814 6.63529 -9.7179e-17)
(6.83321 3.71072 0)
(2.79123 0.766555 1.02463e-16)
(2.19816 0.572936 -1.29913e-16)
(3.52984 0.554932 3.20459e-17)
(-0.0662265 0.115455 1.2858e-16)
(0.0473241 5.00872 -3.60546e-21)
(-0.108311 7.85945 3.12279e-19)
(0.61057 6.22857 6.60968e-17)
(0.543753 0.655538 0)
(-0.692441 0.425357 0)
(1.17681 -1.0082 8.08424e-17)
(-1.2602 -0.362185 1.42219e-16)
(-0.100932 5.2991 -9.37588e-17)
(-0.0497758 6.48322 -3.06401e-18)
(-0.283034 2.15091 0)
(2.39856 -1.27008 -2.86638e-17)
(10.0679 0.112788 7.89737e-17)
(0.00118281 1.22823 0)
(-1.16528 -0.649192 -3.45376e-16)
(0.627337 2.21008 5.54519e-17)
(0.853437 -0.0542433 2.32138e-16)
(-0.366617 6.62075 5.50713e-17)
(-0.0894272 7.50387 1.1918e-16)
(9.56321 0.861381 0)
(0.412613 7.32997 -3.26701e-17)
(-0.148046 6.96366 -2.70204e-17)
(9.44199 1.04636 -8.94761e-17)
(-1.66688 0.194321 -1.29408e-20)
(6.94061 1.00169 8.42271e-18)
(-0.21134 6.78582 1.54128e-19)
(-0.194745 6.56435 0)
(0.203536 5.48508 2.63174e-18)
(-0.191862 4.90112 -8.66535e-17)
(-0.115145 6.36861 -3.37974e-17)
(3.8629 4.1508 1.29919e-16)
(0.0547299 -2.16869 3.26112e-17)
(-0.166142 7.31455 1.78117e-16)
(0.108331 5.54251 0)
(-0.414145 5.55516 -1.26488e-16)
(0.432788 0.680184 3.48354e-17)
(-0.171792 -0.289385 -1.41174e-16)
(2.76175 -0.0532681 5.95748e-17)
(0.176784 0.289186 4.05214e-18)
(0.345116 2.13875 9.58173e-17)
(-1.06221 -0.186525 0)
(2.86503 3.90217 1.26942e-17)
(0.00217424 2.18302 -1.65903e-17)
(0.565375 0.150503 -1.13376e-16)
(9.81052 0.958312 -7.52646e-19)
(1.01376 1.30814 -3.16734e-17)
(-0.281975 1.17606 -1.93666e-16)
(0.190609 2.07601 -1.37196e-16)
(-0.170356 6.54644 -1.82134e-16)
(-0.257489 6.4553 0)
(0.579348 0.103627 2.27536e-16)
(-0.152869 6.62486 7.78358e-17)
(-0.402643 6.54794 2.14147e-17)
(0.257522 -0.209348 -8.28321e-17)
(3.83717 3.6412 -1.35705e-16)
(-1.50505 -1.90188 4.1282e-16)
(-0.549079 -0.87012 5.65752e-16)
(0.937023 1.19116 -2.13597e-16)
(-0.321161 6.47201 2.11226e-16)
(-0.0340911 2.01101 -2.88354e-16)
(-0.647123 -0.544649 -1.63636e-16)
(-0.137281 1.10523 -1.05578e-16)
(1.40038 8.43649 0)
(9.78675 0.090369 0)
(-0.185032 0.0856103 -2.75833e-16)
(-0.0242725 1.23437 1.62998e-16)
(0.00905359 -0.593209 -6.93227e-17)
(0.100185 1.41984 0)
(1.72813 0.819718 8.44961e-17)
(0.544312 0.107115 -8.66843e-21)
(0.7938 0.0856016 -5.55883e-16)
(4.45195 0.125118 2.00984e-16)
(1.11636 4.78322 1.13235e-16)
(-0.200708 7.03754 -2.38975e-16)
(-2.08906 -0.85106 3.02224e-16)
(-0.843863 -0.83517 -1.3459e-16)
(9.84278 0.831033 -1.24006e-17)
(0.377852 3.17725 1.87872e-16)
(0.686063 -0.179145 1.6922e-16)
(0.112264 -0.303502 0)
(-1.00696 0.962889 5.04444e-17)
(2.29005 1.29244 -6.56319e-16)
(0.224799 1.78132 -2.02524e-17)
(-0.0693141 2.07978 2.1501e-16)
(1.03966 0.850965 2.72787e-17)
(8.80806 0.526743 -1.04797e-16)
(9.39191 0.456136 -3.10472e-19)
(-0.182112 -0.309495 1.7437e-16)
(11.0383 0.0447637 0)
(1.12474 0.737106 -4.05735e-18)
(3.11002 -0.153717 1.90678e-18)
(3.45045 0.2622 -1.15399e-17)
(0.0064688 6.00037 3.88592e-17)
(-0.147897 6.81584 3.39963e-17)
(0.0212719 5.05283 1.596e-17)
(10.4943 0.0354781 1.30797e-17)
(-0.118523 0.889984 -4.87945e-19)
(-2.31003 6.89976 -4.13551e-17)
(3.16869 -0.129319 -3.97261e-20)
(0.250687 0.178364 0)
(9.97705 1.70962 -4.63146e-18)
(-0.981697 0.0614136 0)
(0.607271 0.581561 8.46644e-17)
(-0.646299 0.176433 7.53937e-17)
(0.114244 1.50956 3.96781e-18)
(0.563591 0.23686 2.31351e-16)
(0.0769715 0.0917127 3.54027e-16)
(9.2761 0.690086 -1.62089e-17)
(0.365636 -0.24508 2.47528e-16)
(-1.88478 -2.25444 2.06725e-16)
(9.47638 0.987916 9.12535e-17)
(9.71811 0.333259 3.7457e-17)
(5.94006 1.61083 3.36637e-17)
(-0.292939 6.94148 -3.97564e-17)
(0.080255 6.68343 2.10508e-17)
(-0.0937744 3.33813 9.93175e-17)
(0.499406 1.70985 0)
(4.39779 0.804848 4.30061e-17)
(5.81244 3.20651 7.90803e-17)
(10.0229 0.159682 -2.07463e-17)
(0.13085 0.156905 1.14037e-16)
(0.540967 -0.315586 2.33498e-16)
(0.153854 0.183973 0)
(8.8797 1.59627 0)
(1.66704 3.31965 0)
(-0.703185 -1.56051 2.6137e-16)
(3.45086 -0.0891313 6.42548e-17)
(2.76116 4.2224 1.95791e-16)
(-0.0345655 5.74255 2.38271e-17)
(1.58528 6.94752 -5.49609e-17)
(0.104211 0.155803 0)
(0.290382 2.35663 6.76673e-17)
(-0.186261 2.73762 -1.83499e-16)
(0.0431628 -0.163568 -7.95315e-16)
(11.2343 0.118404 8.75539e-17)
(6.03107 1.29659 0)
(-0.187851 2.19841 1.36016e-16)
(1.0674 4.90665 0)
(0.864315 0.626706 1.3923e-16)
(-0.0164615 0.351168 -2.21669e-17)
(1.0724 8.85921 6.07048e-17)
(9.89573 0.991916 -1.24503e-17)
(9.81026 0.636809 9.38794e-17)
(-0.733619 0.0791419 0)
(0.0953393 0.883866 -6.67995e-17)
(-0.508465 -0.0194088 0)
(8.55666 0.344381 0)
(1.68435 0.524264 -1.09762e-16)
(-0.0959102 0.399476 2.14484e-17)
(-2.72903 4.94255 -1.14877e-16)
(3.00384 0.85593 -1.13831e-16)
(-0.200387 -2.20214 1.30815e-16)
(10.2571 0.108617 -2.38728e-21)
(6.04156 3.66221 -7.19611e-17)
(-0.589485 -1.07141 -7.60192e-19)
(-0.23681 6.85776 4.69471e-17)
(0.080742 6.2308 -4.77602e-17)
(0.441003 1.59964 -1.16375e-16)
(1.13986 6.18731 -2.26134e-16)
(2.33608 0.643056 -1.39247e-17)
(-0.369122 0.842042 -3.1579e-16)
(-0.00987199 2.0382 -1.57546e-16)
(0.35915 0.216943 6.78486e-17)
(1.35521 -0.570093 1.72354e-16)
(0.284957 -0.099155 -3.06616e-16)
(0.257197 1.76816 -4.27967e-16)
(-0.362699 1.70775 -2.93781e-16)
(6.97466 4.29868 3.43325e-18)
(0.629412 1.68093 4.67804e-16)
(10.0426 0.0405769 -5.7776e-17)
(1.336 -0.326049 0)
(0.863064 2.75597 -1.39573e-19)
(4.61665 -0.304531 -7.99029e-17)
(0.385562 -0.601401 0)
(9.99464 0.384191 3.65208e-17)
(-0.497556 0.071648 2.8989e-16)
(0.403013 0.0644682 -2.57271e-16)
(8.34123 1.31895 0)
(-0.19831 5.3163 1.85899e-20)
(-0.298609 8.2339 0)
(9.99772 0.0764046 0)
(1.28663 0.102921 -4.42192e-17)
(8.93432 1.10068 -6.61288e-17)
(8.9848 4.05575 -1.66069e-16)
(1.34912 6.22918 2.21104e-17)
(7.40746 2.04543 -9.75527e-17)
(-0.0450603 3.52813 -6.63863e-17)
(-0.0401562 5.57723 -1.2785e-20)
(-0.111326 4.83149 -5.97974e-17)
(-0.0542829 0.895168 0)
(-0.246824 1.68362 1.11763e-16)
(0.10809 -0.749875 0)
(-0.610378 -1.27729 0)
(-0.110827 -0.801011 0)
(0.361442 -1.29681 -1.5572e-16)
(-0.28974 1.22978 0)
(0.107636 1.14333 1.09331e-16)
(2.86883 2.76358 -2.53483e-16)
(0.552276 5.09224 0)
(-3.33667 7.82726 1.36146e-16)
(-0.310065 6.69928 -2.14486e-17)
(0.0953662 4.64453 9.10606e-17)
(-0.173355 7.67192 -3.26813e-17)
(1.14229 4.46879 2.04944e-16)
(9.3153 0.936874 -2.53075e-17)
(0.242778 1.8071 1.7653e-17)
(-0.22417 2.00629 -5.89162e-17)
(3.04328 0.270024 0)
(1.37433 -0.552116 3.09687e-19)
(5.51444 0.947288 0)
(0.574694 0.0251078 1.2214e-20)
(4.19691 0.128756 -4.01214e-16)
(10.0171 0.0481189 3.17679e-17)
(-2.41172 7.74733 1.1349e-16)
(-2.20097 2.47688 -2.5377e-16)
(-0.0359088 2.03565 0)
(-0.058046 0.599813 8.55752e-16)
(5.33904 1.43285 -4.12409e-17)
(11.2357 0.511935 0)
(9.76606 0.235878 2.25403e-17)
(1.04061 -2.096 1.10963e-17)
(9.15652 0.287245 0)
(4.3642 3.9807 9.04628e-18)
(3.18715 0.464716 -3.24141e-17)
(2.05378 1.198 -3.15619e-17)
(1.33412 0.978021 -1.06255e-17)
(1.83009 0.154517 -2.36305e-16)
(0.832705 0.250094 -2.03893e-16)
(1.27946 1.10545 -1.02387e-17)
(1.07256 1.38659 -4.85982e-18)
(-0.658101 1.28897 -7.80878e-17)
(0.268086 -0.225565 3.02606e-16)
(1.69716 -0.429709 -4.76823e-17)
(0.158689 1.60504 2.10937e-16)
(0.349755 0.486084 0)
(10.109 0.065647 7.16295e-18)
(-0.235023 2.42343 2.04867e-16)
(9.9099 0.300538 5.68207e-17)
(0.377567 0.254842 3.33727e-16)
(1.34565 -0.484893 1.31772e-16)
(8.37747 0.631966 1.24025e-17)
(9.84645 0.209645 2.16281e-17)
(0.347959 -0.365326 0)
(-2.23626 -0.897142 9.72484e-17)
(3.09222 4.31577 1.89013e-16)
(1.26166 0.555358 4.07851e-17)
(4.21754 -0.0521649 2.18479e-16)
(9.45597 0.947966 0)
(-0.619863 -1.13785 0)
(0.878885 0.381716 9.03753e-18)
(-0.500145 -0.535139 0)
(1.55285 0.757003 -1.14237e-16)
(1.12188 0.695463 4.3384e-17)
(10.1046 0.243664 -5.65269e-17)
(-0.529468 1.33661 1.14667e-18)
(0.179757 -0.273599 -1.03925e-16)
(9.86685 0.177253 0)
(0.335443 1.23918 1.2294e-16)
(11.1067 0.0282125 -1.15209e-16)
(4.33723 1.56125 -3.41485e-17)
(3.957 1.18923 -7.05057e-17)
(0.837488 -0.182195 -1.05785e-19)
(10.7153 0.357825 0)
(9.3293 1.00592 0)
(0.242935 6.04451 -4.9294e-17)
(9.53656 0.859508 -6.68369e-17)
(0.87026 7.24416 -1.37094e-16)
(-0.0428463 7.0771 -3.14026e-17)
(0.602572 6.36725 -1.8141e-17)
(0.149987 2.07254 -5.98966e-17)
(-0.951721 -1.00692 0)
(1.313 -0.119564 2.2715e-17)
(0.0399953 0.274998 -7.94599e-17)
(10.5745 0.559758 0)
(9.28428 3.65819 -8.08135e-17)
(2.05634 4.81595 0)
(1.9487 4.00608 -1.14697e-16)
(0.168444 4.38326 0)
(-0.41513 0.10528 0)
(-1.50756 2.22127 1.46633e-16)
(-0.0770274 3.44997 0)
(-0.0297667 5.43644 6.70592e-18)
(-0.193215 -0.796591 6.19912e-18)
(8.09109 0.224354 -6.51949e-17)
(0.240172 1.88576 0)
(-0.114123 0.820482 0)
(0.05429 2.07336 -3.51308e-20)
(-2.62302 2.41959 2.80823e-16)
(10.6074 0.0791589 7.18806e-20)
(1.00652 5.94791 -1.45871e-16)
(9.85273 0.442165 -1.71104e-16)
(0.228379 1.38086 1.37428e-16)
(9.75401 0.384155 7.86567e-17)
(9.78819 0.341329 4.42861e-17)
(10.469 0.222469 -2.38179e-17)
(-3.70556 0.705775 -1.58614e-16)
(0.288212 2.40815 0)
(-0.846105 0.0343272 1.82818e-16)
(2.18117 0.473817 -3.79719e-18)
(-1.30032 6.30154 5.71593e-17)
(-0.0176208 0.105743 -1.64885e-16)
(0.111377 1.49856 5.02687e-17)
(9.83212 0.112746 0)
(0.344974 5.59474 -4.12946e-17)
(1.07115 -0.310455 3.30423e-17)
(3.23226 -0.0866831 -4.34711e-17)
(0.124572 2.43908 -3.64478e-17)
(2.17513 0.713942 1.45409e-16)
(-0.330957 0.0891449 -3.5587e-16)
(0.895536 -0.311798 0)
(0.801046 0.106344 4.3447e-16)
(0.820026 1.29047 6.71026e-17)
(9.48316 0.225091 -2.88378e-17)
(0.164008 0.174682 -2.37754e-16)
(0.323596 1.05447 1.05767e-16)
(2.46123 1.64009 2.09673e-17)
(9.38622 1.0175 7.5932e-17)
(-0.747336 0.0522439 2.4893e-18)
(-0.577627 -0.173348 -3.54277e-16)
(1.14761 1.71568 -2.25414e-16)
(0.716375 -0.152052 2.54424e-16)
(0.838733 3.65497 -2.78664e-16)
(2.46207 -0.509808 -2.48529e-19)
(-0.52872 0.852492 0)
(0.345299 1.72778 -1.01076e-16)
(2.11697 0.191829 1.85806e-20)
(0.492609 0.0120411 1.28364e-19)
(1.77614 0.123884 0)
(10.5256 0.279158 -1.59934e-16)
(0.68274 0.846814 0)
(0.446064 -0.034784 0)
(-1.20067 -0.616437 -4.9678e-16)
(1.79047 0.237775 0)
(-0.810541 -0.761055 0)
(2.6984 5.43912 -1.14425e-16)
(10.1118 0.798969 0)
(10.0671 0.861616 -8.5355e-17)
(-0.112742 6.29835 -1.10443e-16)
(-0.448057 6.83407 -2.19895e-16)
(0.406148 -0.0783756 -1.13073e-16)
(0.899113 1.4443 0)
(1.43398 2.36365 0)
(-1.12412 -0.470537 1.38164e-16)
(-3.66241 -2.3055 8.52835e-17)
(-2.47198 8.77773 -1.95826e-16)
(0.351188 -0.136532 3.25774e-16)
(6.38374 3.06024 1.91985e-17)
(0.2046 -0.112313 -3.80312e-17)
(3.71774 0.964729 -1.89555e-17)
(0.790088 0.41721 -6.98256e-16)
(2.03201 0.868944 1.74922e-16)
(0.646767 0.525956 0)
(4.80701 3.69909 2.19022e-16)
(1.17181 4.87791 -1.51821e-16)
(-0.939894 -0.0577538 -1.53377e-16)
(8.13744 0.0624644 -4.0375e-17)
(0.903748 0.218697 1.61096e-17)
(0.0518222 -0.0452152 -5.34311e-19)
(2.18427 0.686895 -7.19527e-21)
(0.77196 -0.131685 0)
(8.27643 0.0068495 5.57182e-20)
(8.22935 0.0246734 7.83645e-17)
(-0.477079 -0.18053 3.11609e-16)
(8.10095 0.0829702 7.76581e-17)
(-0.738975 0.0738222 0)
(-0.855709 -0.122495 -5.16481e-18)
(1.10117 0.76167 2.36639e-17)
(0.257221 1.97366 -5.60129e-16)
(-0.40766 0.825836 3.93343e-16)
(0.97427 1.17764 -4.55308e-17)
(1.33683 1.65629 -7.02521e-17)
(0.416702 -0.0356884 2.02017e-16)
(-0.465779 0.275884 -8.84574e-17)
(0.0358039 0.369511 0)
(0.318754 0.126556 -1.30696e-16)
(-0.615839 0.794716 4.17813e-16)
(0.434705 1.43689 0)
(9.7454 0.2821 -6.91247e-17)
(-0.164229 1.94082 -3.7422e-16)
(10.6805 0.473659 6.13628e-18)
(1.08831 1.75238 1.22189e-16)
(8.11908 0.00436575 -7.28036e-17)
(9.87384 0.80838 0)
(8.40084 2.50845 2.56624e-17)
(4.60346 2.15759 0)
(2.46298 3.74714 1.83767e-18)
(0.961693 1.02512 -1.018e-17)
(0.738156 0.38173 -5.69281e-17)
(0.948417 0.984459 -1.55385e-17)
(-0.1687 -0.880395 1.195e-16)
(3.04655 0.401104 1.52809e-17)
(9.77543 0.935576 0)
(1.8866 -0.863366 2.10549e-17)
(2.45445 3.86351 0)
(5.53173 0.586683 -3.82626e-17)
(9.20156 0.667136 2.78872e-16)
(-0.314002 -1.56435 4.0934e-16)
(10.2101 0.746899 2.49499e-17)
(10.2572 0.655368 0)
(-0.34573 0.291478 -1.11358e-16)
(1.13051 0.313748 -1.91223e-17)
(1.05348 0.0297886 -1.44727e-16)
(0.743048 -0.195693 -1.16828e-19)
(6.25724 5.09488 1.12825e-18)
(8.04623 0.0990274 -4.8169e-17)
(0.933819 -0.178109 2.42455e-16)
(1.05608 1.71819 7.9526e-19)
(2.66596 1.29669 0)
(2.72441 1.26576 -3.1682e-16)
(9.95659 0.580672 9.62153e-19)
(0.212572 1.5156 -2.02666e-17)
(-1.22846 -0.266055 -9.61677e-17)
(-2.14639 -0.135624 -1.49059e-16)
(-1.14554 -0.645827 -3.07115e-19)
(1.87377 0.176742 -2.06052e-16)
(2.61222 2.42098 2.02779e-17)
(-1.87187 0.00642288 -2.92178e-17)
(-1.50203 -0.662639 1.73991e-16)
(-2.456 -1.22065 8.09334e-17)
(1.42492 3.46238 0)
(-0.588534 1.02751 1.35544e-19)
(0.338368 -0.270057 -6.32091e-17)
(2.31916 0.862609 -2.88846e-17)
(-0.452731 -0.564774 0)
(-1.24987 -0.367409 2.48782e-16)
(8.18909 -0.01087 -3.9768e-17)
(0.0109371 2.05864 -4.50592e-17)
(-3.34619 3.51588 4.73694e-17)
(-0.0794119 0.845061 9.73219e-17)
(4.2497 2.44722 0)
(-1.07321 -0.329142 0)
(-2.57497 -0.489523 0)
(9.17777 1.07011 4.68775e-17)
(10.3055 0.734271 1.86487e-19)
(9.61966 0.198849 6.01701e-17)
(11.1472 0.437635 1.36906e-16)
(9.49961 0.00403629 -5.41346e-17)
(9.40199 0.934092 0)
(0.507102 2.13947 -6.94485e-17)
(-1.19732 -1.77431 0)
(0.247076 6.68239 0)
(10.0283 0.929203 -4.00063e-17)
(9.43703 1.24363 4.28252e-18)
(0.0620416 2.03695 4.80897e-17)
(-0.63425 0.896361 0)
(7.87208 4.15015 -2.68842e-16)
(1.47638 3.07803 4.03099e-16)
(7.81676 1.25871 1.36442e-16)
(-3.94942 -0.0156504 -1.30701e-16)
(2.93369 -0.0947388 6.97737e-19)
(9.09764 1.89033 1.47864e-18)
(1.97692 0.513147 -1.43795e-16)
(8.49699 0.124012 -3.47179e-16)
(9.48805 1.0362 2.58422e-17)
(-2.95992 -0.0440099 0)
(-1.3266 0.00695986 0)
(9.61842 0.399582 2.56732e-17)
(9.38193 0.754703 6.68205e-17)
(0.652678 -0.128141 2.8426e-17)
(-0.295664 2.15027 4.3919e-16)
(0.50342 0.78618 2.65799e-18)
(2.54273 0.277617 2.90234e-17)
(1.03596 -0.156991 -3.62905e-16)
(0.542755 0.110747 6.02065e-17)
(2.38749 -1.69618 0)
(-0.610545 0.632874 1.23359e-16)
(0.496215 1.04717 0)
(3.88252 5.96558 9.9278e-17)
(3.55071 0.162416 5.56316e-17)
(7.97112 0.132975 0)
(-0.0628388 1.02401 -5.17446e-18)
(-1.23419 -0.604262 -2.02263e-16)
(0.865699 2.24789 -3.52356e-16)
(-0.108036 3.10766 1.22208e-16)
(0.0462363 5.22484 1.66025e-16)
(0.487335 0.392406 1.89209e-16)
(1.04842 1.02792 2.19418e-17)
(1.44219 -0.192151 1.43715e-16)
(1.60278 -0.534494 3.29106e-17)
(2.59652 1.25901 7.76214e-17)
(0.37145 0.0189693 -2.4461e-16)
(1.60148 0.32803 1.28127e-16)
(9.9085 0.129713 7.29194e-17)
(-0.891327 0.0138783 0)
(-0.134893 1.91065 -4.52303e-16)
(1.11021 -0.789 0)
(-0.155313 -0.0557146 -3.62991e-16)
(-1.02539 0.203552 1.71483e-16)
(-0.532128 -0.283203 0)
(8.7142 0.405628 -2.0841e-16)
(8.18586 0.0413969 -7.92248e-17)
(2.90301 -0.10475 -1.41957e-17)
(-0.695605 -0.163367 -5.00516e-19)
(-1.85171 6.30437 -2.4111e-17)
(-1.769 9.13274 0)
(8.23824 0.0140051 -7.62492e-17)
(-1.15519 2.03308 6.77207e-17)
(2.04773 0.374171 1.16477e-16)
(-0.461715 -1.63599 -2.04509e-17)
(-0.12582 -0.0156185 4.67045e-18)
(-0.864831 3.23625 0)
(6.44885 1.04019 5.93383e-18)
(1.04263 2.80744 -1.89894e-16)
(0.318554 0.944101 0)
(-0.475206 0.567656 1.58824e-16)
(0.286887 -0.79871 -7.98286e-17)
(3.19648 8.46298 -2.60754e-17)
(9.63459 0.271734 -1.19874e-17)
(-4.2936 0.254658 0)
(0.61392 -0.0537743 -9.19147e-17)
(10.7932 0.21226 4.84133e-17)
(0.311158 -0.155846 -1.55267e-17)
(0.40317 -0.487011 0)
(0.359265 -0.0845147 0)
(0.38808 1.6093 2.46413e-16)
(-0.571239 0.0432716 -1.73284e-17)
(0.0890315 1.20908 1.11787e-16)
(-0.506519 0.534479 -3.26258e-19)
(1.31572 0.151032 -1.48147e-16)
(-2.16055 6.34606 1.86175e-17)
(0.789754 -0.290784 -1.97434e-16)
(-2.81693 -1.7373 -3.57116e-17)
(-0.619092 0.602272 -5.04982e-17)
(0.11445 7.63245 6.12044e-17)
(4.66588 4.85747 8.3449e-17)
(2.53936 0.855145 -5.58397e-17)
(7.20844 1.99105 1.48696e-16)
(9.77573 0.289869 -4.14699e-17)
(-1.37186 5.82417 0)
(0.503486 -0.488706 -3.93336e-17)
(-0.240277 1.8316 2.27988e-16)
(-0.590761 4.49354 0)
(0.0635269 6.22716 0)
(-0.141783 6.8697 -1.21134e-19)
(-1.26905 0.709275 -1.30554e-16)
(1.74003 0.854897 2.15575e-17)
(3.07791 0.343572 -1.40158e-16)
(9.10604 0.791073 6.0367e-17)
(1.60013 0.360885 -2.19637e-16)
(0.315822 0.263062 0)
(0.236169 -0.00317794 -1.81451e-16)
(4.501 4.16051 -1.53513e-16)
(0.380379 -0.335496 0)
(-1.12554 1.11304 1.91229e-16)
(0.483567 1.35194 4.41045e-19)
(0.480567 0.113542 8.04119e-17)
(2.03776 0.666443 -1.84658e-20)
(0.585153 -0.0717979 -1.65263e-16)
(-0.572053 -1.9553 2.56603e-19)
(-1.72616 -0.0196326 -6.74521e-17)
(-0.191266 6.08758 0)
(0.262386 -0.39207 0)
(0.271709 0.519358 -1.94896e-16)
(9.82457 0.0749491 1.56441e-16)
(-2.60023 -0.971314 -5.18604e-17)
(0.344327 -0.531068 -5.69104e-17)
(-0.867724 1.2136 3.1412e-16)
(8.17003 0.453386 0)
(9.74945 0.190795 -6.03803e-17)
(3.90089 1.91803 -1.85163e-16)
(4.93859 2.96177 -2.77747e-16)
(1.79917 2.14591 1.90746e-16)
(0.12266 0.0994917 -3.82173e-17)
(-0.377315 0.0273985 0)
(0.425064 -0.51045 7.19371e-17)
(5.34458 3.61028 2.1016e-16)
(-0.221459 -0.627951 -8.67306e-17)
(-0.647924 -0.980047 0)
(-1.13494 -1.49409 -2.59223e-16)
(1.63889 0.442271 2.01322e-16)
(0.522974 6.78462 1.35559e-16)
(0.769832 0.326912 -3.51471e-16)
(1.93152 -0.944887 0)
(-0.698803 -0.157508 -1.4986e-16)
(3.45309 3.57312 -6.74761e-19)
(0.403499 -0.00257896 -1.29997e-16)
(-0.910247 -1.61747 2.09765e-16)
(1.37601 3.22487 -1.50321e-16)
(8.97506 2.78922 1.91755e-18)
(2.25287 0.946473 0)
(0.166376 0.456505 -8.08206e-17)
(9.90231 0.242348 -1.59836e-19)
(-0.89752 -1.38165 1.55945e-16)
(10.2737 0.11373 0)
(-0.322623 5.29558e-05 4.73805e-18)
(-3.3515 -2.32358 1.72152e-16)
(-0.568522 0.10864 2.93947e-16)
(0.77863 1.30279 -1.26835e-16)
(-2.11124 8.0643 -7.93523e-19)
(-0.948644 -0.832591 -4.76414e-17)
(-0.499066 -0.146377 3.65358e-17)
(0.0168153 0.0365784 -4.4257e-16)
(-0.840935 0.610024 2.82532e-16)
(0.0333642 -1.44164 0)
(-0.0933311 3.30167 -1.27408e-16)
(-0.0497353 4.51595 -2.54598e-17)
(-0.14619 0.54908 -7.1894e-17)
(0.00451827 5.3646 -5.33347e-17)
(2.16257 0.300869 3.6201e-18)
(0.385527 -0.265307 -1.23594e-16)
(-0.859463 1.12537 0)
(0.254805 9.44998e-05 3.17908e-16)
(0.854489 2.84319 -1.61854e-16)
(-0.540427 9.61389 -1.64312e-17)
(0.314091 0.0268446 6.58465e-17)
(0.200585 -0.174582 -2.34189e-17)
(-0.519077 1.02758 -2.19724e-19)
(7.81502 5.33001 -8.43762e-17)
(0.0314319 -0.149895 1.81837e-16)
(-0.605473 -0.10291 -1.5482e-17)
(0.74314 -0.341387 1.36496e-16)
(1.39836 0.306763 -3.39076e-17)
(1.63846 0.0768207 -6.90934e-17)
(0.208544 -0.833089 0)
(3.31409 0.645109 0)
(-0.0273085 0.132049 -3.59952e-17)
(9.80499 0.0947985 -7.05444e-17)
(-2.17003 -0.84705 6.41048e-17)
(4.86019 3.79679 -2.11182e-16)
(-0.0382136 -0.0333595 -2.61551e-16)
(0.876703 -0.405227 -2.72006e-17)
(7.76286 5.04115 1.74969e-17)
(3.1589 0.213267 1.64283e-16)
(-0.109385 1.48338 2.28707e-16)
(10.0707 0.232171 2.86129e-17)
(0.0473209 1.30659 -1.43281e-16)
(6.3761 3.25344 -2.36657e-16)
(0.274162 -0.175708 5.70575e-16)
(1.6131 0.00161016 -1.39846e-16)
(-0.302758 0.0191216 1.6233e-16)
(-0.535418 -0.114522 1.57421e-16)
(11.483 3.68775 -3.74877e-19)
(10.5149 0.24879 1.28894e-17)
(-0.232315 7.4028 2.63519e-17)
(0.567147 5.46026 1.09867e-17)
(-0.0748499 5.5167 9.67841e-17)
(1.39344 8.55767 -7.82753e-17)
(7.89129 4.73532 5.10215e-16)
(0.829774 -0.280125 1.42839e-16)
(-0.0602822 -0.0906705 -7.91281e-17)
(-0.994555 0.0505678 -1.07357e-16)
(-0.0548926 0.100348 -7.34213e-17)
(0.000693016 -0.0601295 1.95867e-17)
(1.42646 0.152011 -1.00936e-16)
(-0.960809 -0.0237555 -3.58394e-16)
(-0.467205 -0.0956679 0)
(-0.981958 -0.170332 0)
(0.280032 -0.0690657 0)
(0.60398 -0.165809 -1.31732e-16)
(-0.166236 0.210249 -1.48721e-16)
(-1.38194 0.136373 0)
(-0.866733 -0.125982 0)
(1.60533 -0.0877894 2.96273e-16)
(0.109483 -0.0539036 1.8411e-17)
(1.09955 0.196227 0)
(-1.06834 -0.00464543 0)
(1.12638 -0.126086 0)
(-0.816438 -0.132622 -3.05044e-16)
(-0.560858 0.189412 0)
(-0.400951 0.0122363 -1.09343e-17)
(1.69536 -0.0295862 0)
(-0.0299599 -0.0363308 -4.59768e-17)
(-0.0625747 -0.0748146 -1.18123e-16)
(0.0751817 0.0965216 4.3006e-16)
(1.02126 0.195457 -1.57809e-17)
(-0.644767 0.227337 -1.3307e-17)
(0.332542 -0.117579 1.40843e-16)
(-1.33929 -0.0952643 0)
(-1.45579 0.349946 1.04263e-16)
(0.0756622 0.224567 2.29468e-18)
(1.36414 -0.204624 -2.30395e-16)
(-0.490207 -0.0698542 -7.94149e-17)
(-0.643644 0.136642 0)
(0.0686143 -0.0501758 2.54288e-16)
(-0.313825 -0.0666483 0)
(1.17324 -0.131444 -1.35658e-16)
(-0.970243 -0.0259464 -1.15828e-16)
(0.0957117 -0.0172594 0)
(-1.24771 0.0947457 -6.75862e-17)
(0.367955 -0.185345 7.63775e-17)
(0.650131 0.2394 0)
(-0.883506 0.50724 0)
(-0.321222 -0.960797 -1.79846e-16)
(-1.08653 -1.42395 -3.63063e-16)
(8.62948 0.302637 9.80869e-17)
(0.066611 -0.540457 9.77111e-17)
(0.25579 1.45229 -2.76737e-16)
(3.56534 7.33303 2.15822e-17)
(2.37311 2.85108 -1.46105e-16)
(2.45035 3.68351 0)
(0.248499 0.162931 5.06487e-17)
(0.650938 -0.201389 4.92094e-16)
(7.25078 1.79484 6.06707e-17)
(0.328754 0.368145 -4.76024e-17)
(-0.336849 -0.250724 -2.23501e-17)
(-1.3761 5.36761 7.47646e-17)
(7.67178 1.23804 -1.08645e-18)
(3.34662 2.972 -2.02795e-17)
(2.49664 1.5486 -3.76951e-16)
(0.166596 -0.216586 0)
(0.497175 0.0663786 -3.97017e-16)
(0.448945 0.0324833 2.30659e-16)
(0.1587 -0.167066 -4.32499e-18)
(-0.457062 1.24602 -2.93954e-16)
(-0.168285 1.01151 3.1309e-16)
(-3.41373 -2.05617 -1.06823e-18)
(0.450263 -0.39966 -1.81484e-16)
(1.21124 0.0777109 4.78247e-16)
(2.25749 0.821011 8.64156e-17)
(0.424485 1.34129 0)
(0.611546 0.155959 4.03123e-16)
(-0.451366 0.39563 -7.83509e-17)
(-1.59214 0.635668 -1.15075e-16)
(-2.07764 2.02092 0)
(2.20814 0.935519 -1.70433e-16)
(7.62136 1.77936 -2.17549e-18)
(0.174767 1.1796 1.49366e-16)
(1.68153 -0.369397 -1.45568e-16)
(0.278882 0.395675 -2.16529e-19)
(9.9873 0.977039 4.65061e-17)
(-3.02226 6.89586 2.50399e-16)
(-1.31982 -1.50017 0)
(-0.784652 -1.61596 1.66844e-16)
(0.580341 2.44858 1.07514e-16)
(6.62851 3.26926 6.68905e-17)
(0.959182 2.00776 0)
(-0.227939 -0.762525 8.47679e-17)
(0.331308 -1.22504 4.0386e-17)
(-1.42749 -1.19322 1.18071e-16)
(9.80197 0.319537 2.77772e-17)
(10.0047 0.0364382 7.22891e-17)
(9.79953 4.96343 -1.10826e-17)
(-0.0528637 1.39952 1.56223e-16)
(-0.70792 0.204897 5.4979e-16)
(1.21038 -0.0864628 -2.22265e-16)
(-0.265209 2.03907 5.65976e-17)
(2.22975 4.79599 -4.81974e-16)
(-0.0944547 2.20018 2.56221e-17)
(3.22273 3.31651 -3.35696e-17)
(-0.261143 1.76318 3.66045e-18)
(-0.716302 -0.113543 0)
(-0.145618 -0.0702501 -2.00154e-17)
(-0.950587 0.0421041 2.26089e-17)
(1.32795 -0.0176915 3.16034e-17)
(0.094936 0.0163471 -2.37306e-16)
(-1.04656 -0.0743375 0)
(0.2134 -0.0504122 -1.3276e-17)
(0.942709 -0.236813 1.09315e-16)
(-1.46238 -0.0187984 0)
(0.166678 -0.0375654 1.76539e-17)
(-1.07458 0.428899 1.01006e-16)
(0.352097 0.237974 0)
(0.0902764 -0.0680194 -8.3454e-17)
(-0.36788 0.519522 0)
(-1.09206 0.145815 -2.1357e-16)
(-1.15043 -0.0355391 1.45122e-16)
(-0.372091 0.199736 1.37365e-16)
(1.71373 -0.0662849 0)
(0.803887 -0.0552032 -3.58706e-16)
(-0.530819 -0.0550537 0)
(-0.285063 -0.0962775 1.49373e-16)
(0.364482 -0.411247 0)
(-0.880235 0.113278 7.48187e-17)
(1.56377 8.92834 -5.61943e-17)
(3.04811 5.28289 1.56761e-16)
(-0.880556 -0.210591 -8.59801e-17)
(9.77563 0.960735 -2.52397e-17)
(-1.63647 -0.883732 -7.11143e-18)
(9.98801 0.0038788 0)
(2.2656 2.88507 0)
(0.86023 -0.132307 3.31469e-16)
(5.80079 0.481866 -1.79418e-17)
(2.66626 4.2039 -2.24096e-17)
(2.54891 0.0374686 1.17682e-16)
(3.86179 6.13683 -7.79438e-17)
(1.39335 4.66155 -1.52618e-16)
(-2.09025 -0.103294 8.5653e-19)
(-0.0431804 -0.100373 -2.00325e-16)
(1.11769 4.62238 1.53982e-16)
(7.14795 0.26728 2.40124e-17)
(3.31827 -0.0278015 1.4066e-16)
(6.57926 1.63669 -4.36601e-18)
(2.86738 2.40152 1.56623e-16)
(0.670172 6.51823 -1.23741e-18)
(0.674269 -0.0696047 2.43389e-17)
(-1.03539 4.80188 6.04656e-20)
(6.37096 4.71916 -2.22473e-18)
(0.4685 2.87541 -1.72524e-17)
(-1.21375 4.84797 -9.57956e-17)
(8.6728 2.81343 -4.61179e-17)
(0.154938 10.7931 -5.49123e-17)
(0.339262 -0.471082 -6.81352e-18)
(-1.18356 0.0561985 -1.39436e-16)
(-0.350654 -0.212291 -7.56133e-17)
(-0.0622128 1.41534 -4.79969e-16)
(0.2411 2.84339 -1.50841e-17)
(-0.260139 2.35205 -5.7855e-17)
(3.87031 3.99987 -7.96955e-17)
(0.484042 -0.48189 3.5031e-16)
(0.767257 1.01744 1.16854e-17)
(0.497066 -0.135955 9.19237e-17)
(-1.18785 -0.961743 0)
(-0.655927 0.901398 -1.30142e-16)
(0.408573 -0.345768 0)
(0.459188 -0.111886 0)
(-1.27382 4.64056 2.18468e-17)
(-0.262803 -0.709546 0)
(-0.22661 -0.698952 3.07363e-16)
(1.31789 0.879675 0)
(0.00396683 2.45596 8.59564e-18)
(0.862644 1.68599 2.0894e-16)
(9.94657 0.202206 0)
(-0.424646 2.39536 -2.49097e-16)
(3.58818 0.451856 6.69373e-18)
(-0.194164 -1.5631 5.92744e-17)
(-0.189143 -1.48727 0)
(5.32203 2.09011 1.1496e-16)
(-0.260307 0.0779518 -3.82428e-17)
(10.4283 0.0721865 0)
(9.55947 2.55534 0)
(-1.98319 5.77101 -1.91769e-17)
(3.49417 7.44308 2.3368e-17)
(0.677399 0.185141 -5.00798e-17)
(1.27188 0.821862 -6.1715e-17)
(-0.265149 2.25787 -6.63621e-17)
(-0.385398 -0.694256 1.52165e-16)
(-0.360357 4.0233 -2.53981e-19)
(10.0042 0.218309 2.4482e-17)
(-0.0773398 1.9882 1.28157e-18)
(0.142726 -0.115371 -1.25883e-16)
(-0.605909 0.231551 2.75062e-17)
(-0.49239 -0.569961 1.01279e-17)
(1.60489 -0.493882 -7.01393e-17)
(-0.35662 1.62826 1.00279e-16)
(-0.262344 0.038584 1.02172e-16)
(-0.0533894 -0.0418372 4.84122e-17)
(-0.0521842 0.445595 3.22952e-17)
(-0.568792 -0.286715 0)
(1.27584 2.98526 9.8999e-17)
(9.94783 0.783065 0)
(3.12819 0.155332 3.047e-17)
(1.89758 5.06709 1.0255e-16)
(0.201648 -0.125639 -3.70784e-18)
(-0.210777 3.89038 1.44644e-17)
(4.00812 3.56571 0)
(1.78066 3.44378 0)
(-0.0705002 3.81324 7.19654e-18)
(-2.41881 4.7967 9.75437e-17)
(-0.106235 2.40009 -1.14377e-16)
(0.22064 3.24904 0)
(0.601314 -0.181116 -2.37012e-17)
(2.75569 0.798477 7.29958e-17)
(2.11359 0.845091 0)
(-0.274034 1.77104 -2.09902e-17)
(8.77417 0.0108045 1.50281e-16)
(-2.8742 -0.934174 1.26379e-16)
(-1.20392 -0.80438 -2.40433e-16)
(3.49299 4.25318 -1.28747e-19)
(0.195372 0.321318 0)
(-0.445424 0.504956 -2.65168e-17)
(0.211895 -0.863268 2.3154e-16)
(0.00776629 0.542921 -1.20024e-16)
(0.000740861 -0.450934 -1.21291e-16)
(0.407265 2.76216 -1.85626e-16)
(0.0455719 3.82107 0)
(-0.423351 1.61927 -7.93037e-20)
(-0.0828337 5.48685 -5.81757e-17)
(9.69156 0.0757656 5.74408e-17)
(-2.71439 6.0496 -2.69636e-16)
(-0.146392 -0.812139 0)
(7.20741 3.05833 5.32647e-17)
(7.4106 2.62233 4.6221e-17)
(-1.01655 -2.07171 1.48453e-16)
(1.42139 4.308 -8.56477e-17)
(3.474 3.97609 3.29763e-17)
(2.79953 7.03948 3.72661e-18)
(0.136608 3.91992 1.53069e-17)
(3.00718 8.98848 0)
(0.610661 2.41408 1.06533e-16)
(1.37066 2.94811 -3.24847e-17)
(-1.50249 -0.0480435 -2.37752e-20)
(2.42539 7.38279 -3.53349e-16)
(3.01027 8.546 -3.02027e-18)
(8.89504 0.210572 -1.99225e-17)
(-0.279159 -1.99115 4.96298e-16)
(-0.222683 -1.35311 3.43509e-16)
(-0.580566 6.18156 3.3235e-17)
(1.76915 4.56588 5.90302e-17)
(-1.16786 1.41726 3.5584e-19)
(3.48037 -0.52682 -2.27129e-17)
(1.53838 -0.142711 9.87856e-17)
(1.21522 5.35997 7.21075e-17)
(-2.41823 0.571753 -1.51256e-16)
(2.91946 -0.333947 3.93893e-16)
(11.7229 1.73175 2.11432e-18)
(-0.0332715 -0.714191 -1.42527e-16)
(1.16925 1.44875 2.21355e-16)
(-1.69934 -1.13088 -2.16618e-16)
(0.854521 -0.428565 -8.0423e-17)
(-1.09239 -0.10581 -8.68396e-17)
(1.57977 0.215614 -1.70531e-17)
(4.08396 4.79195 -7.9851e-17)
(-0.537855 0.682184 3.15193e-20)
(0.366332 -0.563232 1.89292e-17)
(2.27836 0.785223 3.31321e-17)
(-2.46576 5.66736 9.09779e-17)
(-2.06066 5.78722 1.39981e-16)
(1.30467 3.5623 8.6511e-17)
(1.31455 3.87832 -2.65818e-16)
(-2.48641 6.43113 5.37909e-19)
(1.06869 4.10532 -1.64565e-16)
(-1.71219 5.91573 0)
(-0.250439 2.76763 -2.33533e-16)
(-2.88217 6.84824 -8.20098e-17)
(-3.1504 6.80022 -6.85759e-17)
(0.832069 4.56584 2.32447e-16)
(0.664459 4.66065 0)
(-2.82076 6.20612 -6.57909e-17)
(0.996868 4.33857 1.28125e-16)
(-3.42621 7.32732 -1.27633e-16)
(-3.19912 6.64247 2.09085e-16)
(-3.45503 7.33727 5.22898e-17)
(0.0424574 -1.87142 -1.90903e-17)
(0.0648179 -2.13915 -1.84411e-16)
(-0.0750915 -1.48619 0)
(9.95159 0.53638 1.39723e-18)
(0.0586643 -1.71802 1.49511e-16)
(0.237255 -1.40421 -8.4442e-17)
(0.320069 -1.18325 2.47333e-16)
(0.156013 -1.0924 -3.95773e-17)
(0.341345 -0.35286 5.01881e-17)
(0.0847288 2.39833 2.77055e-17)
(-0.0568715 1.338 1.56723e-17)
(-0.523523 3.37325 3.7206e-17)
(-0.776281 -0.461848 -3.81819e-17)
(-0.0389629 -0.409253 1.38593e-16)
(0.183116 0.565733 -2.94148e-17)
(0.138378 1.7843 -5.93521e-17)
(-0.28138 3.24005 -4.5189e-17)
(0.993112 0.339938 2.89108e-19)
(-0.0526411 -0.660582 1.35092e-16)
(-1.23939 -0.787747 -3.15647e-16)
(0.0705331 -0.133791 -5.39332e-17)
(0.482487 -0.0788762 2.30859e-18)
(-0.844732 -2.84349 1.09544e-16)
(-3.28445 -2.77135 3.41219e-17)
(2.03641 0.515288 -2.04972e-16)
(1.20619 7.04623 -2.90859e-17)
(-0.940132 -3.10618 0)
(0.148674 -0.637849 1.43807e-16)
(1.09098 0.618538 1.66925e-19)
(2.18864 0.577104 3.70116e-17)
(-0.122683 -0.647696 0)
(-0.0920235 -0.408356 7.63843e-17)
(-0.0561039 -0.572047 0)
(0.131597 -0.159853 0)
(0.850739 0.227421 6.11075e-16)
(-0.186165 -0.568995 7.74534e-17)
(0.858717 0.873812 9.66438e-18)
(0.0619883 0.714693 -1.70047e-16)
(0.468751 1.15085 0)
(0.883038 0.810304 1.84145e-16)
(1.06302 0.866113 -7.68037e-17)
(0.138562 0.480529 -1.50328e-16)
(1.45109 8.89198 0)
(-0.407011 0.29896 5.3744e-16)
(1.87411 -0.0922902 4.67193e-17)
(0.61069 -0.0419458 6.43718e-17)
(-0.146628 -0.809191 2.49595e-16)
(1.1255 9.87642 -1.9038e-17)
(0.180362 -0.112609 6.59142e-19)
(-0.126758 0.426088 -3.23444e-16)
(1.49828 7.61421 -3.06628e-16)
(-0.409109 0.382835 -1.16851e-16)
(0.772793 -0.0532553 5.91762e-17)
(2.70467 -0.260282 0)
(-0.287425 -1.24182 -2.25604e-16)
(-0.447652 0.930642 -1.59386e-16)
(2.0182 -0.0908835 9.22933e-17)
(-0.0078843 0.853283 -1.35428e-16)
(1.20722 6.67194 -1.38561e-16)
(-0.0981357 0.480367 6.84468e-16)
(-0.0673009 -1.26495 0)
(0.919042 3.20332 2.52029e-16)
(1.10485 -0.130169 5.24112e-16)
(2.60531 1.37682 -1.13753e-16)
(-0.710727 0.970359 -8.58052e-17)
(-0.257749 0.652169 -1.4966e-16)
(0.0878973 0.681831 2.75031e-16)
(0.581399 0.0182712 9.10286e-17)
(-0.270877 -1.73582 0)
(8.25488 0.337115 -2.26428e-18)
(-0.121841 0.397045 -4.15647e-16)
(0.0630204 -0.749578 0)
(-2.44024 0.109713 1.57435e-16)
(-0.306532 0.0474686 -2.96307e-16)
(0.465054 0.0195405 -1.22703e-16)
(-1.81179 -1.5649 1.74543e-16)
(-0.200382 -1.17976 0)
(0.729255 0.822902 1.33431e-16)
(0.28485 0.566564 0)
(3.34646 -0.268375 0)
(8.3486 0.157823 -3.05698e-17)
(0.540753 0.144844 -1.60029e-16)
(-0.669904 0.608021 -2.46748e-16)
(-0.323041 0.0912082 3.63363e-16)
(-0.157712 0.0858774 -3.19488e-16)
(-2.45555 0.0298939 -9.83744e-17)
(3.45381 -0.349309 0)
(-1.74077 -1.52203 1.89518e-16)
(0.933199 4.30633 1.02457e-16)
(-0.829491 -2.07981 2.49875e-16)
(8.34491 0.0296482 1.19381e-19)
(2.71734 -0.611565 9.70951e-17)
(-0.94179 0.0792969 7.38656e-20)
(-1.10485 -1.48051 -2.15389e-16)
(-0.0500521 0.507376 3.99105e-16)
(8.47525 -0.0224451 -2.63813e-17)
(-0.563663 -0.402583 -6.21038e-16)
(2.08278 0.47081 2.57896e-17)
(-0.0495064 0.57478 -1.06025e-16)
(1.45473 0.345117 -3.11471e-16)
(2.70367 -0.766511 -5.01265e-16)
(-0.538393 0.0874973 2.86786e-16)
(-0.688384 -0.949945 0)
(-0.744761 -1.51139 -4.17012e-18)
(0.7656 0.203446 0)
(0.714373 -0.0400064 0)
(1.53238 0.656514 0)
(10.0304 0.241284 3.77105e-17)
(10.0429 0.402228 1.17358e-16)
(1.63908 0.428188 -1.62627e-16)
(-0.220767 -0.861943 -1.05683e-20)
(-0.230629 -0.398969 0)
(-0.470545 -1.12558 4.99859e-16)
(0.0758655 -0.039454 2.63793e-16)
(-1.02942 -1.21622 1.15688e-16)
(-1.19012 -0.247302 -1.01628e-16)
(-1.6321 10.4824 1.66288e-17)
(-0.584514 0.771782 -1.72433e-17)
(2.46302 0.967707 -6.44167e-18)
(0.38129 -0.497725 -3.83715e-17)
(2.19312 -0.0117829 -4.6644e-16)
(-0.270296 -0.405751 -3.89274e-16)
(0.815916 -0.134348 0)
(-0.662097 -2.60031 -1.70392e-16)
(-0.775738 -0.0755683 6.68963e-17)
(0.698204 0.368351 2.62045e-18)
(0.179339 0.0878401 3.7357e-17)
(0.364392 1.04011 -8.84723e-19)
(0.47541 0.363297 -1.07086e-16)
(1.64433 0.436933 5.25056e-16)
(-0.200291 0.4732 5.58251e-16)
(0.106022 0.0883651 -1.74726e-16)
(-0.442205 -0.115006 2.6039e-16)
(-1.09347 -1.02695 2.12042e-16)
(3.27704 -0.176051 1.11229e-16)
(-1.00742 -0.10871 -2.64371e-18)
(0.00433293 -0.967409 0)
(0.594132 1.24732 -4.02947e-17)
(0.26993 -0.0534343 0)
(0.544668 -0.101946 5.17958e-17)
(0.421862 0.525881 4.00066e-16)
(0.94582 1.50299 -1.49698e-16)
(0.162404 0.0709772 0)
(-0.356133 -0.945728 -6.68898e-17)
(0.790598 1.59107 -3.91999e-17)
(0.0533692 -1.00594 8.40589e-18)
(-0.230167 -0.682686 0)
(0.0691699 -0.64344 2.98143e-16)
(0.300024 -0.11768 0)
(-0.0142548 0.0750281 -3.31556e-16)
(0.74309 1.54128 2.97238e-16)
(-0.54324 0.595654 3.73022e-17)
(-0.391824 0.892615 0)
(0.145179 -0.497957 -4.87847e-18)
(0.234609 -0.158258 4.18631e-17)
(0.856607 1.00916 -2.03186e-16)
(0.672563 0.159371 -1.13964e-16)
(-0.329358 0.378593 -2.52679e-16)
(0.761949 1.50778 0)
(0.422829 1.18971 2.6451e-16)
(0.308127 -1.09869 0)
(0.350672 0.519413 1.62093e-16)
(-0.747818 -1.68332 0)
(9.82169 0.323725 2.60222e-17)
(0.948284 0.371846 6.03158e-17)
(-1.1496 -1.98877 1.78756e-16)
(-0.616868 0.194862 0)
(0.0286561 -0.247994 -4.7886e-17)
(-0.0767433 -0.10433 -1.1215e-16)
(-3.12242 -2.80078 2.67307e-16)
(-0.0344743 0.331263 -7.96683e-17)
(0.712356 0.255728 -3.30118e-16)
(-0.117796 0.333096 -8.8344e-17)
(0.098984 0.142689 -3.1789e-16)
(0.157301 1.04725 -4.32745e-19)
(-0.266536 0.721986 0)
(-0.0735308 -0.433183 -1.47223e-16)
(-3.82753 -2.87845 -8.96507e-17)
(0.0190273 -0.194957 0)
(-0.921129 -2.89939 5.7254e-17)
(0.662872 0.0386523 -1.05617e-16)
(-0.0609951 0.710053 1.81958e-16)
(0.34175 0.0575316 2.98375e-18)
(0.559732 0.0591897 2.94691e-16)
(-3.70435 -2.60293 -1.35949e-16)
(-3.48862 -2.57295 -2.02384e-16)
(-2.7387 -2.68884 -4.44433e-18)
(0.541076 -0.799847 2.09919e-16)
(0.749151 0.000175838 3.35916e-16)
(0.535186 1.73812 -5.38343e-17)
(0.107563 0.792253 0)
(-3.67539 -2.62382 0)
(-2.20299 0.468497 1.23166e-17)
(0.233357 0.338298 1.96053e-16)
(0.432309 -0.808594 -9.77236e-18)
(2.62849 0.995487 0)
(-0.612788 0.604987 0)
(0.348831 -0.399043 1.02812e-16)
(0.758768 -0.153354 2.33222e-16)
(-0.651084 -0.139523 0)
(1.11229 -0.0711269 2.39234e-16)
(-1.48141 -0.212344 0)
(-1.71483 -0.00589026 0)
(0.427141 1.0916 3.10881e-17)
(0.332078 0.145043 -3.14521e-17)
(0.61685 -0.188429 -2.45893e-16)
(1.38876 -0.00980129 -2.78605e-16)
(3.44018 2.73488 2.25164e-16)
(2.94377 -0.207847 1.24503e-16)
(-2.00736 0.248554 1.48485e-17)
(0.0922257 -0.0939697 6.4479e-17)
(-0.959024 -0.316636 0)
(-2.96417 -0.574468 -5.97144e-16)
(-0.99298 -0.920732 -6.13045e-16)
(4.35023 0.23942 0)
(-0.0564298 -0.133383 0)
(-2.30769 1.41742 1.11657e-16)
(0.00963867 -0.0591325 -4.48617e-17)
(9.36741 0.432733 -7.50686e-17)
(8.71662 0.104494 7.28359e-17)
(-0.40981 -0.599983 -1.12155e-16)
(-4.20726 -1.02496 1.47012e-16)
(3.65818 1.22139 -1.40293e-16)
(-0.0242105 -1.26018 1.90794e-16)
(2.83709 0.858913 1.35607e-16)
(-0.677525 0.454721 -4.48561e-17)
(0.515609 -0.995954 -4.4829e-17)
(2.2186 -0.0723405 0)
(2.92596 -0.257024 -7.01503e-17)
(-2.22662 0.275855 1.00664e-16)
(-3.891 -0.880829 2.70599e-16)
(-1.6592 2.49377 2.08499e-16)
(3.02344 0.586809 -2.97853e-16)
(-0.598083 0.37236 -1.45028e-16)
(0.252449 -0.766112 -1.43143e-16)
(1.93116 -0.333426 1.39388e-16)
(1.06914 -0.284335 -2.86581e-16)
(-0.838244 0.919128 -1.34257e-16)
(2.58792 -0.0921091 -1.0941e-19)
(2.50674 3.70233 8.78486e-17)
(3.16958 -0.28423 -9.07261e-17)
(-2.62695 0.360659 8.38106e-17)
(0.584786 1.34882 -3.47051e-17)
(9.17817 0.685037 1.75309e-17)
(8.69609 0.134876 3.3612e-17)
(-0.723841 -0.611638 0)
(4.45168 1.38096 -1.26797e-16)
(-0.064821 2.26003 -1.66199e-18)
(-0.0201911 0.214705 4.81961e-18)
(-0.819184 -1.18919 -2.30346e-16)
(-0.909167 0.977926 -4.8383e-16)
(-1.64975 1.37962 1.22179e-16)
(0.0992309 0.564551 0)
(-0.662897 1.63589 0)
(-1.60732 4.16457 -2.45787e-16)
(2.23418 0.504241 -3.94776e-16)
(-0.904203 0.221826 1.10511e-16)
(0.548171 -0.683116 -4.69899e-16)
(0.0372824 0.0385888 9.57556e-16)
(0.0624603 0.298274 0)
(-1.18245 0.304046 -1.62031e-16)
(1.52167 -0.0464694 2.44117e-16)
(2.23517 5.47833 1.41794e-16)
(0.281668 -0.559551 5.70052e-17)
(9.25918 0.924985 -3.67711e-17)
(9.75478 0.634474 -9.83391e-17)
(-1.81964 0.278393 0)
(7.99969 0.0862633 -1.40502e-17)
(0.447116 -1.62465 -3.86621e-16)
(0.705833 -1.16238 -2.57706e-16)
(0.0274523 1.36613 -1.94861e-17)
(-2.85774 -0.906589 -1.38699e-16)
(-0.477977 -0.353135 2.0944e-16)
(-0.95766 -0.0354885 1.77913e-16)
(-0.491716 0.642096 0)
(-0.526398 1.0332 -1.8219e-16)
(-1.30526 2.88576 1.60927e-16)
(-0.269197 0.630837 6.34854e-16)
(0.318797 -0.74391 2.79767e-16)
(1.09932 -1.09912 1.95788e-16)
(-0.332017 1.66614 0)
(1.04301 7.025 -5.22162e-17)
(2.56619 -0.386982 -1.066e-16)
(-1.62906 0.454996 0)
(-1.88584 -1.3552 1.48464e-16)
(1.97658 0.281698 -1.58636e-16)
(3.29749 0.473567 -3.2263e-17)
(0.624403 3.92327 -9.02412e-17)
(0.199576 1.61977 -2.81349e-17)
(1.68405 2.07769 -4.4199e-17)
(1.02439 3.67135 4.84665e-17)
(-0.752873 -0.802887 -1.42329e-16)
(4.25711 2.08316 1.63074e-16)
(0.69212 2.07566 1.05067e-16)
(-2.00823 0.808785 -5.78999e-17)
(0.101709 1.18604 -8.0568e-19)
(-1.8249 3.76153 8.69279e-17)
(2.79477 0.134199 -1.25307e-16)
(-0.808141 -0.0797651 -8.14784e-17)
(0.361006 -0.475187 8.40881e-17)
(-0.451036 -1.214 1.60713e-16)
(-0.988337 -1.76727 -5.3124e-16)
(0.724077 1.69334 1.77234e-18)
(1.12103 -0.0154154 1.39433e-16)
(2.80488 6.83186 -2.49964e-16)
(2.33729 7.04386 2.3531e-16)
(0.916079 3.18511 1.6615e-16)
(2.12296 -0.453374 5.08379e-19)
(-0.760975 0.545775 -1.63594e-16)
(-0.254624 -3.14004 0)
(-0.798523 -2.97493 -3.18222e-17)
(0.245302 -0.580625 -3.88739e-17)
(9.79389 0.890891 -3.20531e-17)
(-1.88889 0.342483 0)
(0.664052 8.33785 -4.27193e-17)
(1.04324 3.51756 0)
(9.89684 0.329038 -1.63245e-17)
(8.67642 0.131978 -2.92804e-17)
(0.564409 2.04144 0)
(-0.729399 2.42061 0)
(-0.344291 -0.902473 1.43784e-16)
(-2.09989 -0.948057 -1.05941e-16)
(-3.80228 -1.19043 -1.66497e-18)
(3.55736 1.85527 -8.51724e-17)
(-1.4492 -2.13377 9.74253e-17)
(0.127254 0.371637 0)
(2.00492 1.29361 -7.31766e-18)
(-0.660715 1.04137 -3.42641e-16)
(-0.288982 0.940233 -1.95548e-16)
(2.50042 7.66607 -8.19733e-17)
(3.43302 0.0379516 -5.28046e-17)
(0.104136 0.788204 1.48186e-16)
(-1.9424 -2.62692 -6.99893e-17)
(0.324125 -0.706594 0)
(0.124076 -0.302966 -1.1362e-17)
(-0.548088 -1.53966 0)
(0.127358 0.890412 -1.15833e-17)
(0.336914 1.2026 1.01386e-17)
(-1.92072 5.00801 -6.47651e-17)
(1.73573 -0.208814 1.68417e-17)
(-1.19397 -0.440718 1.55461e-16)
(0.735443 -0.15124 1.0608e-17)
(-0.496723 3.20662 2.06428e-16)
(-1.26625 7.65344 -1.25898e-16)
(2.38167 -0.115017 -8.38892e-17)
(-0.403593 2.27619 3.68399e-17)
(0.698597 2.59115 7.16891e-17)
(1.18358 1.39567 -2.75425e-17)
(6.8537 4.83669 -1.67367e-16)
(-0.0076885 2.84976 -3.589e-17)
(2.27091 5.68368 5.51147e-17)
(2.12511 -0.430667 -1.25731e-16)
(-0.904672 0.779445 1.56928e-16)
(-0.407096 -2.47247 0)
(0.212743 -0.459201 4.12518e-17)
(9.45396 1.32672 6.06879e-17)
(-1.97072 0.376589 0)
(-0.184893 2.21103 -8.33526e-17)
(2.92635 0.47633 2.39242e-16)
(0.379787 2.39259 -9.87844e-17)
(1.50809 5.27456 9.58462e-17)
(0.0311215 4.48326 0)
(0.688476 -0.444702 3.93104e-17)
(0.875739 0.749093 1.21833e-16)
(-0.0505778 8.1652 3.05272e-17)
(-0.204143 5.82043 -2.99672e-19)
(-0.609617 -1.41028 0)
(0.53808 -2.08389 -1.67648e-16)
(-0.221526 0.259334 2.58881e-17)
(9.91951 0.165025 -1.20588e-17)
(0.507526 0.083674 -1.79816e-17)
(1.54295 1.16426 -2.83319e-16)
(0.674534 0.485099 -8.90327e-18)
(1.02211 1.50992 -3.4225e-16)
(0.266593 4.0417 8.93575e-17)
(1.26858 3.25589 0)
(1.02511 -0.304953 0)
(-0.789668 -1.00833 0)
(3.67253 2.77661 -4.41243e-19)
(-0.557893 4.28663 2.02278e-17)
(1.63383 1.3909 1.5388e-16)
(-0.843772 5.83616 0)
(0.327314 4.84186 4.98893e-18)
(0.422272 5.22352 -1.63444e-16)
(1.23894 1.587 2.14951e-16)
(4.62598 2.83943 0)
(0.445068 -0.219306 6.8581e-17)
(0.117607 -0.415821 -5.78258e-18)
(-0.959297 4.76321 1.31642e-17)
(0.356411 2.875 5.40745e-17)
(0.554389 4.98841 0)
(0.351977 5.20007 0)
(-0.214427 2.95021 -1.27989e-18)
(-2.09981 5.99027 0)
(1.19327 1.12267 7.43933e-20)
(1.53267 0.604473 0)
(1.80737 0.630587 1.79857e-16)
(0.541351 -0.948779 0)
(1.22107 1.28235 -6.57939e-17)
(2.8467 -0.287063 -1.73522e-19)
(-0.849405 -0.448718 2.34504e-18)
(0.278434 -0.0961021 -8.69615e-17)
(0.703447 -0.0215411 -4.81335e-16)
(0.659163 -0.216828 -1.73255e-16)
(0.588841 -0.183579 8.17684e-16)
(-0.50441 0.143064 0)
(-0.453647 -1.84189 2.2129e-16)
(0.119066 1.65959 -2.07985e-16)
(-2.53294 6.42644 0)
(-0.640871 -0.923587 4.37872e-17)
(-2.34725 -2.46911 -4.77054e-17)
(0.0706152 1.46085 1.16245e-18)
(-1.15096 -1.94358 -3.14401e-17)
(0.398048 1.74762 -7.37536e-17)
(0.329955 0.520507 2.74368e-16)
(0.301259 2.02156 0)
(0.449527 1.11354 0)
(0.440976 -0.494877 3.21359e-17)
(9.6455 1.09345 0)
(0.308781 4.1557 0)
(-0.499644 -0.329372 3.66883e-17)
(10.5007 0.122422 -8.4013e-17)
(-0.240949 -0.704495 2.32951e-16)
(2.26364 8.07082 0)
(0.207784 1.63327 0)
(0.088911 1.36942 7.82855e-17)
(-1.57398 -1.1821 0)
(2.05004 0.0158761 2.02339e-16)
(1.50883 4.76215 -3.73038e-16)
(2.53226 -0.289594 9.05681e-17)
(-1.53364 0.893128 2.54648e-16)
(0.45954 1.34671 2.47921e-18)
(-0.364198 4.69283 7.07223e-18)
(-0.889193 -2.55776 3.13537e-17)
(2.85259 0.594943 0)
(-0.182765 -0.341629 7.92053e-17)
(0.0696379 -0.426921 -4.56161e-17)
(0.348256 -1.15592 4.13475e-20)
(0.837266 0.115201 -1.1951e-16)
(-0.817747 5.19495 0)
(0.4905 -0.865054 5.62648e-17)
(-0.238006 0.370385 -1.55432e-16)
(-0.177719 -0.680245 3.05369e-16)
(1.76765 -0.0283274 2.61187e-16)
(-1.8847 0.260196 8.37029e-19)
(-0.91643 -2.78314 0)
(1.36947 2.16879 -1.23802e-17)
(-0.116552 1.47457 -3.96612e-17)
(1.27948 0.259418 4.10831e-17)
(0.830381 0.390381 -5.50711e-17)
(1.19329 0.758991 1.05862e-16)
(-0.289304 -0.407787 1.53044e-16)
(0.364328 3.25976 4.50372e-17)
(-0.650669 9.86157 -5.6655e-17)
(-1.89616 5.2233 3.94992e-17)
(0.262891 -0.412977 0)
(0.170575 1.18854 0)
(-1.19797 5.92478 -7.09775e-17)
(0.211043 3.1112 -8.35352e-17)
(1.58595 1.18872 1.36407e-16)
(-1.65064 -2.33868 0)
(0.793237 -0.397082 3.86469e-17)
(0.303875 1.14823 -3.03799e-17)
(0.390852 2.43749 -1.83024e-17)
(0.917513 0.0520478 -1.03088e-16)
(0.366146 -0.417638 -4.01474e-17)
(8.64411 0.162454 4.03444e-17)
(7.94421 0.148926 -1.16549e-16)
(-0.1403 -0.585376 -3.89898e-16)
(1.20736 0.283439 4.88616e-17)
(0.208107 1.17574 3.87837e-17)
(0.783252 -0.708522 -1.46925e-17)
(8.72782 0.145795 -3.12504e-16)
(-0.0405233 0.0296539 4.81743e-17)
(-2.14701 -2.75101 1.37854e-17)
(0.453414 1.3692 2.11921e-16)
(-1.20973 -2.70558 -2.83524e-17)
(8.33875 0.290958 7.76777e-18)
(1.42137 1.72474 3.24132e-17)
(0.178435 0.624134 -1.33007e-16)
(1.73875 -1.5542 5.21595e-16)
(-0.266202 -0.781408 2.12188e-16)
(1.21343 0.163209 0)
(-0.146184 -0.860041 3.35154e-16)
(-0.646078 4.96634 1.3158e-16)
(1.04648 0.821156 8.72168e-17)
(0.292144 5.23051 -3.03208e-18)
(-0.717985 2.38252 -2.31855e-16)
(2.14549 2.05703 1.8306e-16)
(2.72437 3.60549 0)
(1.75142 0.925569 -1.09059e-16)
(0.263375 4.28452 5.61395e-18)
(5.75951 4.90317 0)
(0.555845 2.00279 1.67103e-16)
(0.38823 -0.564624 -4.39277e-17)
(-0.487243 2.62404 -6.39795e-17)
(-0.22432 -0.73008 1.49294e-16)
(-3.13368 -1.25686 0)
(-0.942781 0.0427175 3.78445e-17)
(-0.460328 -0.0439652 0)
(1.31611 2.94183 0)
(-0.726557 -1.66461 0)
(-1.27798 -1.6301 4.41739e-17)
(1.08016 0.56273 2.4644e-17)
(0.992479 3.0333 2.7694e-17)
(1.51065 2.41133 0)
(9.75845 0.089969 0)
(0.27171 -0.986274 -3.7177e-16)
(-0.094006 3.21926 3.56369e-16)
(-0.632707 1.21747 4.39965e-16)
(-0.0390171 0.748405 6.10196e-17)
(-0.33023 -0.475457 0)
(-2.32898 -2.6966 0)
(1.84592 -0.538831 -6.09661e-22)
(-1.18198 -0.652643 8.01516e-17)
(0.730582 0.0952788 2.47483e-16)
(1.94978 3.33149 -6.56706e-18)
(1.41707 3.76098 -5.4549e-17)
(0.543258 3.14657 -3.84069e-17)
(1.08821 -0.0841613 -4.36256e-17)
(1.87351 -0.385666 -6.54165e-18)
(0.731443 3.21867 -9.1573e-17)
(0.716951 -0.494458 1.54971e-16)
(-1.14808 10.6269 -1.91393e-17)
(0.00857755 0.788839 -2.2919e-16)
(-0.858135 4.86315 0)
(-2.97577 6.93093 0)
(3.07621 4.75783 2.07609e-16)
(-0.915953 -0.0137092 1.86981e-16)
(8.13584 -0.0476998 3.83811e-17)
(-1.37273 -2.78661 5.4782e-17)
(0.272985 0.420998 7.94571e-17)
(-0.297984 4.17846 0)
(-0.264941 4.99994 0)
(-0.0722681 0.0915469 7.9965e-17)
(0.861863 2.54058 -3.34929e-17)
(5.28697 6.34333 0)
(-0.869131 1.39436 3.04456e-16)
(2.29479 6.66681 0)
(2.17758 1.04752 2.30631e-17)
(0.117574 2.29761 0)
(-1.09302 3.84141 0)
(0.351408 3.99927 -3.04841e-16)
(-0.555508 -0.557103 -5.01108e-17)
(0.344132 -0.59589 -3.72912e-16)
(1.31092 1.94325 -6.34038e-17)
(-0.878272 6.87137 -1.32542e-16)
(-0.163083 -0.799885 -1.53515e-16)
(6.75603 5.55943 6.69274e-17)
(-0.397978 1.88344 -5.15922e-16)
(-1.20663 -1.71443 -2.12924e-16)
(0.277985 1.58274 -2.05085e-16)
(-0.147331 0.946428 -1.19114e-16)
(0.037288 1.05628 0)
(-0.0508017 1.72629 1.64195e-16)
(0.202346 3.15162 4.94052e-17)
(2.29257 -0.174506 1.41637e-17)
(4.50205 7.31211 -2.97407e-17)
(-0.0559111 3.17023 1.46986e-18)
(8.04058 -0.0453816 -4.67419e-19)
(9.27993 1.08862 4.18014e-17)
(6.60289 6.34359 -3.45095e-17)
(-1.51472 2.20512 -1.11867e-16)
(-0.064273 6.59083 -4.05941e-17)
(-0.277888 -0.502656 -3.35366e-16)
(2.05001 0.653442 0)
(-0.658521 0.752741 -1.21596e-16)
(0.272076 -0.345781 -5.2732e-17)
(1.40463 0.11776 1.12168e-16)
(1.09184 1.93971 5.90695e-18)
(0.98681 2.10284 0)
(2.41005 -0.772738 1.67225e-16)
(0.792931 2.62586 6.88517e-16)
(2.6191 6.81951 0)
(0.368579 0.450025 -1.25335e-16)
(2.24578 -0.152972 6.62578e-17)
(-1.30299 1.41176 -3.02346e-17)
(0.0166644 4.93296 -7.57659e-18)
(0.867999 1.6663 -5.35202e-17)
(-0.756975 10.2194 2.30829e-17)
(-2.21692 0.425697 -1.03596e-16)
(-0.644114 0.351709 -4.30658e-16)
(0.216312 -0.268079 4.64899e-16)
(-0.223022 -1.49093 0)
(0.257601 -0.57118 1.1577e-17)
(-0.149425 0.462488 8.1178e-17)
(-1.34219 5.5627 1.11526e-16)
(-3.33539 7.41327 2.38392e-17)
(-1.11014 5.27608 4.29977e-19)
(0.467617 2.11931 2.53892e-17)
(9.7437 1.66321 -5.70749e-18)
(2.11376 -0.297441 1.14385e-16)
(-0.9991 -1.93509 0)
(7.46963 5.93253 -1.48952e-16)
(0.654575 3.81228 1.10439e-17)
(5.09591 3.22697 6.48487e-17)
(-0.0978528 6.5552 0)
(5.26366 7.49882 0)
(9.65868 0.848976 1.18107e-16)
(2.44859 0.634052 -3.99305e-16)
(0.244513 6.93351 5.0389e-17)
(-0.77233 -0.603656 1.65689e-16)
(1.4181 3.01617 0)
(0.824546 -0.0282206 2.60369e-16)
(0.853913 0.59801 0)
(2.01645 0.827268 1.12095e-16)
(0.0777751 0.288402 -8.9115e-17)
(4.34334 4.80088 2.55014e-17)
(3.68454 -0.0906296 -8.17098e-18)
(-0.62557 -0.395643 -4.99017e-16)
(-2.07666 3.26702 -7.22439e-17)
(0.962379 -0.49706 0)
(0.0867821 -0.954996 1.81767e-16)
(0.483918 0.71808 4.02205e-17)
(-1.38083 4.32673 1.55742e-16)
(1.38751 1.13971 -9.056e-18)
(1.6703 1.98649 0)
(-0.393839 -1.88914 1.71721e-17)
(-0.525376 -1.27032 8.92087e-18)
(8.36437 0.373371 -2.68947e-16)
(0.0117565 0.513269 6.64817e-17)
(-0.0330673 4.10357 5.45438e-18)
(1.58248 5.85569 0)
(2.06008 -0.116265 0)
(0.236382 4.77267 -1.06609e-17)
(0.346417 0.890282 0)
(1.64101 1.40564 7.27628e-17)
(2.26007 1.11944 1.46084e-16)
(-0.206267 0.361889 -6.7521e-17)
(-1.27372 -0.379432 2.09602e-16)
(2.56883 4.96379 5.60978e-17)
(0.180722 4.59598 -3.10499e-17)
(-0.383271 6.58619 7.09659e-17)
(-0.525681 -2.27112 9.22154e-17)
(-0.361804 9.53127 1.49783e-17)
(0.223108 5.2161 0)
(-1.51152 -1.66469 8.30079e-17)
(0.767382 0.373128 0)
(1.72048 1.42051 8.83654e-17)
(2.11134 0.672024 -1.10408e-16)
(0.536201 0.175686 1.25365e-16)
(0.193937 -0.314588 0)
(5.26194 5.39313 -3.35676e-17)
(3.96953 2.06717 4.45815e-16)
(1.46666 1.41693 -1.01589e-16)
(1.70679 1.48597 7.23777e-17)
(-3.28961 6.72274 -3.90446e-17)
(-0.215881 1.16808 -1.0365e-16)
(8.74075 2.17174 -2.64258e-17)
(0.346732 5.60608 5.44546e-17)
(-2.06604 0.340275 -3.39871e-18)
(2.16924 2.51336 -4.35575e-18)
(9.75882 0.0724542 1.98616e-16)
(-0.259154 9.51007 4.11065e-17)
(-0.54213 -0.563001 0)
(2.45514 3.152 4.18999e-17)
(0.307529 -0.41541 -9.80437e-17)
(2.763 0.0433704 1.01761e-16)
(8.82969 3.67184 -3.5884e-17)
(-0.313974 5.96151 1.84897e-17)
(1.00269 0.0805109 -6.45725e-19)
(-0.541104 5.07735 -9.35458e-18)
(5.92161 -0.360031 2.05042e-16)
(1.23268 0.244126 -1.95277e-17)
(1.36087 0.330466 0)
(2.1656 2.1886 -4.06274e-17)
(-0.29177 -0.470281 2.93626e-16)
(1.19909 0.362826 7.15388e-17)
(-0.653417 6.88133 -3.17453e-17)
(0.178509 1.08918 0)
(-0.13094 2.03447 1.92129e-16)
(-0.115467 0.968999 0)
(9.84158 0.897352 0)
(-0.53752 5.64477 7.02681e-17)
(-1.73885 0.230453 3.54699e-18)
(-2.84763 5.58152 8.48171e-18)
(0.475827 4.0317 -1.27696e-16)
(1.37972 -0.409895 0)
(-2.39673 -2.20919 8.52726e-19)
(10.7718 0.389327 -2.95434e-18)
(-1.72926 5.26226 -2.76064e-18)
(0.861554 2.90833 1.72306e-16)
(-1.33449 -1.04654 -1.53983e-16)
(-2.03216 -1.01363 0)
(3.01175 3.3963 -6.58964e-17)
(0.0460176 4.57566 0)
(10.0001 0.0791638 -9.83568e-17)
(9.78456 1.11724 0)
(9.66373 1.38675 -4.6933e-18)
(1.67879 0.580865 0)
(-0.590783 -0.63626 -7.56066e-17)
(-0.25367 0.197836 8.11531e-17)
(3.24233 5.42089 2.94395e-18)
(1.86834 2.91776 4.62435e-17)
(-0.230933 -1.7988 0)
(0.829263 0.102695 9.78282e-17)
(0.0249259 9.8297 4.37756e-20)
(8.98355 1.88435 1.00547e-17)
(-0.83684 4.44378 -1.19199e-16)
(0.621293 1.11304 -1.00471e-16)
(0.1823 -0.60152 -1.70222e-17)
(9.71061 0.765818 6.41573e-18)
(0.148705 0.829044 2.21392e-16)
(-1.75567 9.18801 -6.22199e-17)
(-0.149529 0.0880185 -1.83288e-16)
(-0.304855 0.179443 -1.93355e-17)
(1.1121 0.245344 1.45772e-16)
(3.58796 4.2984 -1.07561e-16)
(5.50668 7.04895 0)
(3.71666 4.2442 1.51979e-16)
(-0.350391 -0.586902 -1.89441e-16)
(0.0656491 -0.338967 -3.83344e-16)
(-1.64967 -1.23249 0)
(-0.254828 5.52637 -7.56145e-17)
(3.14522 0.840381 3.22221e-16)
(-0.168215 6.96907 1.1719e-20)
(0.455614 6.98757 4.95626e-19)
(-0.190614 6.89135 2.6144e-17)
(-0.179847 6.2519 -1.01242e-16)
(1.7067 5.57201 6.70972e-17)
(0.504725 0.058955 0)
(0.606878 4.47842 -4.37304e-16)
(0.399972 5.66277 0)
(2.98237 -0.718326 -2.64043e-17)
(-0.889553 -0.684114 0)
(0.257227 0.16079 -7.82906e-17)
(0.0504409 0.386253 1.26206e-16)
(0.350787 1.66173 -6.56854e-17)
(1.34303 0.667372 -5.06656e-18)
(-0.387627 10.8384 4.52022e-18)
(-0.152224 -0.290348 -1.0842e-17)
(-2.49336 4.42916 -2.05582e-17)
(1.42208 1.19972 5.34278e-19)
(-0.32037 -1.27613 0)
(-0.701874 -1.79742 -7.49861e-17)
(-0.0978035 1.28091 4.21949e-17)
(0.308781 -2.15641 0)
(2.87115 2.09033 1.67552e-18)
(-0.125271 1.56415 -1.39043e-16)
(1.57755 5.72245 -2.53655e-18)
(-0.206502 8.91849 1.41222e-17)
(2.35415 4.54742 -1.02033e-16)
(-0.46411 -1.82838 1.19054e-16)
(2.12264 -0.878197 -4.44266e-20)
(-1.04491 -0.601201 -1.49996e-16)
(0.646637 0.28335 -3.16685e-16)
(4.30848 2.41375 0)
(8.55776 4.79735 -5.55297e-18)
(-0.279748 -0.633686 5.43046e-17)
(5.50339 1.11324 -4.11445e-17)
(8.39033 4.46601 -6.961e-17)
(3.68681 8.25823 2.87132e-18)
(0.869018 3.46265 -7.03509e-17)
(-0.178396 6.42788 -1.3174e-19)
(-1.93809 5.88247 0)
(0.054851 0.166433 3.7372e-16)
(-1.36909 -1.02921 -1.49072e-16)
(0.168638 -0.189427 2.08324e-16)
(0.603205 1.92663 2.05294e-16)
(6.7905 2.14709 5.75056e-18)
(1.81678 -0.010473 -1.89583e-16)
(0.161416 -1.22806 -1.44832e-16)
(0.393264 1.10274 0)
(1.58781 1.48612 -8.92768e-17)
(-0.359714 -0.973834 -1.7321e-16)
(-1.24667 -1.16408 -8.76749e-17)
(0.35281 -0.346145 -1.47782e-16)
(-0.691494 0.651754 0)
(2.52488 4.61444 4.01336e-16)
(0.527351 4.72885 0)
(-0.923871 -0.252692 1.16115e-19)
(0.73252 1.00565 -1.52942e-16)
(-0.268635 -2.06313 3.30786e-16)
(3.83361 1.57957 0)
(9.92643 0.504459 2.14211e-18)
(1.78084 6.05821 3.19543e-17)
(-0.125348 0.0302845 -1.11542e-17)
(1.16105 2.34925 5.30583e-18)
(6.14043 1.5697 0)
(0.443198 7.52045 0)
(-1.8549 6.0131 4.71624e-18)
(0.049803 3.33033 4.98255e-17)
(9.76277 0.664813 -1.19091e-17)
(0.0928517 4.97196 0)
(6.33006 6.42291 0)
(0.692325 4.57779 0)
(-1.07141 -0.343708 6.47438e-17)
(0.0181289 1.63964 4.72822e-17)
(0.431261 -0.356872 2.50103e-16)
(0.0426657 -0.30976 -3.64735e-16)
(0.097226 -0.00786544 0)
(1.25968 1.67207 -8.9022e-17)
(-1.49904 -2.49467 4.03236e-19)
(3.40993 -1.1259 6.27588e-17)
(5.87952 5.43507 3.642e-17)
(0.184445 -0.232695 -1.89438e-16)
(-1.0664 -1.26133 -7.55353e-18)
(-0.541883 5.65552 0)
(5.82774 4.03353 9.93927e-17)
(0.341984 1.6365 -4.27179e-16)
(1.79819 0.502203 0)
(3.27714 4.43534 1.08403e-16)
(1.14288 2.23488 -2.59178e-16)
(4.25409 2.21087 -1.20463e-16)
(5.5076 5.90855 4.50628e-17)
(0.38562 1.28139 -1.39958e-19)
(-1.67198 0.0973571 2.47361e-16)
(-0.803102 -0.170102 -1.64204e-16)
(0.412515 0.446025 -1.67686e-16)
(3.18867 -1.52872 -3.97432e-17)
(0.00287613 -0.975076 -7.4033e-20)
(2.65129 11.638 4.69601e-18)
(1.01403 -0.579347 -1.22292e-16)
(7.54167 1.44054 0)
(4.06016 4.44583 5.68114e-17)
(0.341702 -1.0252 -3.24835e-19)
(0.135817 -0.0295023 0)
(-0.341071 -0.0957144 -5.12295e-17)
(6.77915 1.61946 -5.6031e-17)
(-0.115073 9.94303 -5.55985e-18)
(3.29707 -1.38523 5.26471e-17)
(-0.701425 -0.563776 7.59324e-17)
(-0.237158 0.388174 0)
(1.48932 1.13006 -1.17348e-16)
(4.30636 7.77344 1.04099e-17)
(1.12493 -0.456958 -2.19234e-16)
(0.946952 -0.671753 2.85729e-16)
(0.505485 0.0480011 -1.01983e-16)
(2.53264 -0.0377741 5.37082e-17)
(0.775507 0.665693 -4.58407e-17)
(0.927008 -0.602187 -7.79101e-17)
(0.17153 -0.504535 -1.22786e-16)
(-0.377887 -2.20811 -1.12145e-17)
(9.7643 0.0500337 0)
(1.10831 -0.0300383 -1.36685e-16)
(7.36879 5.56527 2.02207e-16)
(1.28404 1.54681 0)
(0.0376853 6.50782 -6.38718e-17)
(-0.483721 -2.07597 -1.40241e-17)
(0.253567 -0.399087 5.19681e-17)
(-1.65584 0.0925702 -7.81597e-17)
(0.176877 0.0922767 -2.12229e-17)
(1.1271 0.0914536 1.90617e-17)
(-0.940324 0.0251564 -1.10559e-16)
(0.17284 1.81951 6.16097e-17)
(0.898891 4.73511 2.32149e-16)
(-0.0551391 0.00537529 2.40418e-17)
(-3.00393 5.83851 -1.07719e-17)
(-0.223598 1.47578 -8.81225e-17)
(7.53037 0.137893 -5.06411e-18)
(-0.547458 2.52064 2.05165e-16)
(0.0254259 1.92318 0)
(9.77111 0.0445024 -4.14906e-17)
(1.88433 0.549381 5.37016e-17)
(11.0703 0.135959 -9.73081e-18)
(-1.45954 -2.71372 2.68357e-17)
(0.0724317 -0.190985 8.53192e-18)
(3.14996 -1.1339 -4.99512e-17)
(-0.880318 -0.637203 -7.09756e-17)
(0.212247 0.364866 7.57853e-17)
(9.10673 1.1065 3.34779e-17)
(0.870292 -0.510567 0)
(0.00913777 5.40087 8.17221e-17)
(-0.605473 7.8959 8.00651e-17)
(2.9914 -0.143481 -3.28268e-17)
(0.188622 1.24334 -1.67739e-20)
(1.78755 -0.290567 -5.02968e-17)
(0.628997 1.23861 -1.93257e-16)
(0.290546 -0.148757 3.53785e-17)
(8.84221 1.5018 1.8782e-17)
(1.21648 1.11394 0)
(-1.59177 -1.37136 8.56575e-17)
(-2.23969 2.15626 -8.21888e-17)
(1.2328 3.8899 -2.34862e-17)
(-1.20418 -1.33131 -1.44332e-16)
(0.0575821 0.150927 -3.51818e-16)
(-1.56778 0.0332598 1.89035e-16)
(1.55443 0.794916 -1.65405e-17)
(-0.936371 6.4551 0)
(0.372157 1.61161 -2.6961e-16)
(1.59464 0.542849 -3.91206e-17)
(-1.59455 -2.0339 1.26758e-16)
(-0.411068 0.361146 0)
(0.810364 -0.337317 0)
(9.78479 0.0575788 1.64091e-16)
(0.456996 0.395924 -3.83263e-17)
(-0.16185 -1.42943 0)
(0.0800255 -1.29725 3.12032e-16)
(7.67301 3.5964 9.71601e-17)
(7.55393 1.77751 -9.99712e-17)
(-0.105456 -1.08336 -1.812e-17)
(0.0375936 -0.0109529 0)
(-0.0985511 0.890102 0)
(0.316274 -0.504621 -6.80516e-17)
(0.950818 1.01646 2.00905e-16)
(1.52852 1.6558 0)
(3.43415 0.802398 -1.33365e-17)
(1.9893 1.99986 -2.73844e-16)
(0.398765 5.17228 -5.57162e-17)
(0.655427 4.21615 1.43213e-16)
(7.72518 4.86422 5.66014e-17)
(-0.307369 6.46114 6.63981e-17)
(1.84243 0.917454 2.66064e-17)
(1.86241 2.61033 -6.22135e-17)
(-1.12953 -0.703836 8.50879e-17)
(-3.52873 -2.00901 4.44926e-17)
(-0.276647 2.47562 6.21587e-16)
(1.88066 3.15101 -7.9356e-17)
(-1.88914 5.62061 -1.46498e-16)
(-0.0873836 5.775 -4.09328e-17)
(9.06688 2.94061 5.12168e-17)
(0.746143 -0.117559 -4.58606e-17)
(-1.54227 0.0449111 2.45621e-16)
(-0.172391 0.08487 -2.75059e-18)
(0.0710145 0.874499 4.80149e-21)
(-1.50624 -0.206078 0)
(-0.139027 0.0538766 0)
(1.18334 0.20241 2.22972e-17)
(-0.223856 -0.753668 -6.20361e-18)
(-0.338741 9.76012 -4.74708e-19)
(1.94586 1.18253 -1.44376e-16)
(0.443125 -0.427332 1.26974e-16)
(3.93605 4.90025 -5.76084e-17)
(9.43075 1.64889 3.926e-17)
(8.58077 0.920753 0)
(0.091829 1.09239 0)
(-0.889345 6.23598 7.4651e-17)
(1.56288 1.98162 8.71009e-17)
(-0.607448 -0.592519 1.03397e-16)
(0.204692 -0.126763 -1.09282e-16)
(-0.848631 -2.55784 -5.2179e-17)
(9.76092 0.0721123 7.37181e-17)
(9.90832 0.1738 -2.01493e-17)
(1.62482 1.36517 1.22865e-16)
(-0.219928 -0.719399 -2.61441e-16)
(0.788357 6.47087 0)
(0.436786 -0.229824 -3.90729e-16)
(0.0274389 -1.09235 0)
(-0.232485 -1.83257 -3.43336e-16)
(0.160943 -0.163626 -8.25539e-18)
(1.14148 0.383749 1.68598e-17)
(0.696814 0.0946733 3.46262e-17)
(-0.787373 0.10604 8.80229e-17)
(-0.151067 0.248816 8.97823e-17)
(0.531026 0.0091588 9.49567e-17)
(-1.35047 -0.0967894 3.91179e-16)
(-0.146203 0.179603 1.49449e-16)
(-1.52033 -0.031746 -2.68915e-16)
(-1.53628 -0.0234 -2.02596e-19)
(9.76841 0.141299 0)
(-0.250353 0.00631405 1.63818e-16)
(-0.243712 0.0466869 -1.90136e-16)
(1.4584 0.0638601 -6.85872e-19)
(-3.27122 6.76576 -1.29595e-16)
(0.304694 4.64592 3.87869e-17)
(10.0127 0.0839892 3.45714e-17)
(-2.16227 -2.06606 -3.89867e-17)
(0.572905 -0.412397 1.9486e-20)
(-0.782805 -2.2198 1.1653e-16)
(0.0353419 -0.709727 0)
(-0.151907 9.20328 -1.92302e-17)
(2.86503 1.13063 3.60132e-16)
(3.36056 4.14876 8.28151e-17)
(6.00851 0.561041 -6.74939e-17)
(2.31426 0.155732 1.1633e-16)
(-0.338828 1.03875 -2.42314e-16)
(-0.221312 10.0796 2.92989e-17)
(-0.0364191 6.93527 4.10371e-17)
(0.334704 0.140379 -4.69071e-17)
(-0.794469 -0.33983 -7.6417e-17)
(-0.201055 0.491305 0)
(-0.176429 -0.711415 3.81741e-17)
(-0.849865 -0.144473 3.67943e-21)
(0.103045 0.502953 1.69961e-16)
(9.78527 0.0917043 -2.30781e-17)
(0.857157 1.30337 8.95836e-17)
(0.434045 8.90073 2.70558e-17)
(0.361572 0.0909556 0)
(0.215117 0.127165 1.2957e-16)
(-1.61437 0.0334656 -1.39892e-16)
(0.767784 0.301327 -2.13994e-17)
(8.59142 0.25139 0)
(-0.154872 1.54425 -2.31077e-16)
(0.456355 0.103619 0)
(0.119774 -0.137162 0)
(0.294641 11.0568 4.57548e-18)
(8.7396 0.668959 7.32691e-17)
(3.71623 3.56186 3.56555e-17)
(-0.965214 -0.765579 1.33854e-16)
(-1.35859 -0.922015 5.75436e-17)
(3.1504 -1.47366 0)
(0.67295 0.211807 1.94517e-16)
(8.85449 1.82143 -2.83831e-17)
(0.164027 5.92973 -6.97027e-17)
(0.421878 -0.264039 -1.43988e-16)
(8.22818 5.2947 -8.67924e-17)
(5.27065 2.7187 -2.14927e-16)
(1.85457 -0.0968804 5.20693e-17)
(0.137703 0.0787025 -1.56354e-16)
(0.144837 3.58166 0)
(-0.454831 0.0450693 -4.17023e-17)
(-0.919828 0.0243574 1.39627e-18)
(1.6435 1.02555 -2.35413e-17)
(-0.284782 1.30479 -3.27439e-17)
(0.245701 2.02814 6.71618e-17)
(-1.43603 0.039588 1.63663e-17)
(0.675565 0.277368 -1.11963e-17)
(-0.977677 -1.34084 -1.66564e-16)
(2.21402 0.56217 -1.65454e-19)
(-0.992305 -2.78914 2.68698e-16)
(0.39865 0.665557 2.68012e-16)
(-0.0781997 -0.646075 1.07595e-16)
(0.176901 0.99677 -1.64928e-16)
(-0.219576 0.981245 -4.1032e-17)
(-1.20918 -1.57549 8.34589e-17)
(0.770548 0.689852 3.22462e-17)
(0.464796 0.581106 8.55187e-17)
(0.542981 -0.227451 -1.69761e-16)
(1.55658 1.42343 -3.24891e-17)
(-0.0141586 -0.448391 0)
(-0.997392 0.836159 1.21197e-16)
(-0.650911 6.30433 5.33591e-17)
(2.77262 3.75783 -2.14659e-17)
(0.221902 -0.257352 9.40998e-17)
(7.55787 0.124737 1.98131e-17)
(1.0872 0.639129 0)
(2.0103 3.03097 1.42742e-16)
(0.26258 4.98769 0)
(2.47224 0.785131 1.5765e-16)
(0.0960977 11.0901 2.08172e-18)
(4.9592 6.93356 -2.22007e-17)
(-0.0515137 -0.202142 -2.12891e-16)
(1.77756 1.20325 -1.47222e-17)
(2.93643 3.19146 1.86081e-17)
(-2.06798 2.68173 9.21155e-17)
(1.42634 1.55784 1.9782e-16)
(0.280208 0.140218 -1.6279e-16)
(0.0943172 5.61352 -3.80974e-17)
(0.166656 0.218364 9.18839e-17)
(-3.08715 7.94472 -4.04079e-18)
(0.109938 0.977784 1.77302e-19)
(-0.140062 -0.440544 1.19837e-16)
(8.63971 0.403835 3.78213e-16)
(0.000364287 0.751425 1.73023e-16)
(3.69074 4.42259 -9.87531e-17)
(0.275614 2.53384 -2.05322e-17)
(-0.773333 -0.297382 -5.76958e-17)
(4.05842 0.32969 2.44848e-19)
(1.29955 -0.593311 5.32361e-17)
(1.21944 -1.10876 2.05218e-16)
(0.0401477 0.0991925 0)
(-0.135053 -0.841604 0)
(-0.211648 -1.85758 9.73212e-17)
(-0.262477 0.126394 2.0226e-16)
(1.58141 1.51445 -1.97292e-16)
(1.68261 2.62553 -8.16419e-17)
(3.35706 -1.46032 -2.40817e-17)
(-0.860733 -0.410201 7.56533e-17)
(0.172004 0.479442 -1.62412e-16)
(-0.624824 -0.0321284 -6.70989e-17)
(-0.19274 -0.464482 2.88764e-16)
(-0.359347 0.107888 9.85826e-18)
(-0.270558 1.60643 -2.3923e-16)
(2.96094 0.296428 1.69802e-17)
(2.3553 4.29735 -5.18786e-17)
(0.281255 5.40913 1.37911e-16)
(2.30823 0.34717 1.16158e-16)
(-1.71486 1.58773 0)
(8.54992 0.514816 -1.64267e-16)
(9.78006 0.118527 0)
(8.99874 1.13903 -5.42797e-17)
(-0.421854 6.82926 1.00791e-16)
(1.6158 1.25439 0)
(-0.0203976 -0.0383468 3.32929e-16)
(7.17641 1.55676 1.15925e-17)
(9.42879 1.19441 6.17381e-17)
(0.296337 3.88438 -7.00266e-17)
(2.61366 -1.21163 9.93898e-17)
(-0.891847 -0.395014 0)
(0.540894 0.396564 1.62029e-16)
(-1.36337 4.92644 1.09183e-16)
(9.39156 0.930561 -5.95643e-17)
(3.44519 -1.61668 4.53018e-17)
(0.00117657 -0.0903353 3.02401e-16)
(-0.061092 1.94018 0)
(0.259772 0.501414 0)
(-2.29651 6.06444 3.01928e-16)
(4.95828 0.0423248 4.44788e-18)
(4.8469 2.81707 8.75958e-17)
(-0.232873 -0.600689 3.77862e-16)
(8.65868 4.24217 0)
(0.549985 0.184092 0)
(0.433318 0.227898 1.53638e-16)
(8.74796 1.19319 -2.95801e-19)
(0.203107 -0.946144 -1.75794e-16)
(-0.266107 -1.96561 -1.00271e-16)
(10.0074 0.0971528 -9.92318e-18)
(-0.418517 4.19081 1.31267e-18)
(0.0535793 6.06759 2.48667e-17)
(5.95089 0.329672 2.14452e-16)
(-1.6107 3.15312 0)
(0.682607 0.458208 0)
(0.134102 0.0411995 -4.24963e-16)
(-0.0310095 1.78862 3.69765e-16)
(1.92573 0.680913 0)
(-1.93821 -1.60851 1.83969e-16)
(3.24115 -0.397755 0)
(1.27923 0.357775 -1.60003e-16)
(-0.993648 1.33039 5.21939e-17)
(-2.28423 0.94987 -1.7624e-16)
(2.59842 0.0328689 0)
(1.24478 6.36452 -1.53601e-19)
(0.551214 0.436543 8.67031e-17)
(-0.49163 -0.462879 3.64725e-18)
(3.44684 -0.735065 -6.34379e-17)
(-0.240821 -0.0450217 -8.14294e-17)
(-0.14349 0.0718898 -8.11641e-17)
(-3.00854 -2.4761 -2.1745e-17)
(-1.16579 -0.790435 -1.58082e-16)
(1.00038 1.47502 -8.44665e-17)
(-2.23647 -1.35703 -1.07459e-17)
(-0.573066 -1.14558 -3.88475e-17)
(0.219886 4.0261 5.267e-17)
(4.01534 0.615153 -7.63003e-18)
(8.10319 0.302167 5.62808e-21)
(9.32849 0.459389 0)
(0.527244 0.148358 5.26159e-17)
(0.688263 -0.269112 -2.31288e-16)
(0.0452792 1.36269 1.48089e-16)
(0.848068 1.16678 -1.12704e-17)
(-3.3197 7.19178 0)
(0.280778 1.49183 -2.51458e-16)
(-2.14096 2.2834 -4.5767e-17)
(0.237409 -0.476062 2.77929e-16)
(2.46215 0.553046 -8.16166e-17)
(1.10145 0.612419 5.49281e-17)
(1.14816 2.98482 -9.53802e-17)
(2.42609 -0.949485 0)
(8.85864 1.13732 -8.15603e-19)
(0.743816 0.487826 7.31583e-16)
(0.57471 -0.665454 2.00167e-16)
(-1.1225 -1.29448 -7.70524e-16)
(-1.11108 0.0822212 7.12208e-17)
(0.368789 2.04495 0)
(-0.258298 -0.707037 -2.17322e-16)
(8.48803 0.334412 0)
(9.93466 0.525994 0)
(0.28619 -1.54167 1.1063e-16)
(0.21721 0.0171375 3.11764e-19)
(-0.241772 0.418113 -2.49278e-16)
(0.189882 1.37049 -3.83461e-16)
(1.07637 0.403829 0)
(9.4938 0.132097 2.01317e-17)
(9.75701 0.0938157 1.12853e-17)
(1.26991 0.650784 0)
(-0.91634 3.89455 1.45137e-16)
(1.11912 2.91208 -1.11931e-16)
(1.56393 -0.850423 -3.34068e-16)
(-0.826545 -0.339756 2.24931e-17)
(0.343381 0.0326146 9.22071e-18)
(3.10462 3.6984 1.9668e-17)
(0.326091 0.0355811 -3.44745e-17)
(7.67191 0.298235 -2.09171e-17)
(8.72686 0.399728 0)
(-3.88515 -2.75761 0)
(-0.904209 0.0467839 6.2685e-20)
(0.687537 1.36468 1.05172e-16)
(-3.18485 -1.1233 1.23999e-16)
(-5.09827 -0.181059 -6.69303e-17)
(3.81838 -0.0555236 8.01984e-17)
(0.376664 0.0349904 -9.47272e-18)
(2.33691 0.166042 -2.29939e-16)
(1.30493 0.0507866 0)
(0.325247 0.0341037 0)
(-0.205417 -0.0922063 -2.50786e-16)
(8.13529 3.13119 2.41049e-16)
(-0.63128 9.59576 3.0431e-18)
(-2.64147 4.9029 0)
(-1.50934 -1.862 0)
(-1.76209 0.440314 0)
(1.3059 -0.0774867 3.16472e-16)
(-0.831043 0.0275234 1.31022e-16)
(0.421855 0.0410523 -7.61606e-17)
(0.30459 0.00386464 0)
(0.0838535 0.641693 6.66765e-16)
(-0.0302238 2.14802 1.15955e-16)
(2.8351 0.17219 2.14683e-16)
(-0.412626 1.35735 0)
(3.22507 0.195773 0)
(0.0806455 -1.89655 -1.59717e-17)
(0.357773 -1.30043 1.5341e-16)
(3.18223 0.17651 -5.45229e-18)
(-0.151962 2.90711 -1.92249e-16)
(-0.873316 0.0837345 7.77642e-16)
(0.537296 -0.347348 -2.79917e-16)
(0.219876 0.168554 -3.86779e-16)
(9.48558 0.830927 -6.44589e-18)
(-0.420832 -1.17555 0)
(-0.0310782 2.53209 1.12098e-16)
(-0.0387612 2.66621 -2.14701e-16)
(-1.34375 -0.201409 1.32187e-16)
(0.59806 0.224836 2.33002e-17)
(-0.482269 2.12954 6.46285e-17)
(-0.14217 -1.09842 1.07653e-16)
(-0.284418 0.10215 -3.54546e-16)
(0.33681 -0.844157 0)
(2.93234 0.151914 0)
(0.266099 0.879954 0)
(0.354561 0.0405581 2.35605e-16)
(2.54157 0.0769536 0)
(0.46531 0.19319 0)
(-0.648044 0.0214571 1.98658e-16)
(-3.14605 7.26822 -9.1612e-17)
(4.95472 0.254594 -2.11288e-18)
(0.903743 0.963839 2.04903e-16)
(2.82445 1.24132 7.36962e-18)
(-0.348553 0.151337 7.52633e-17)
(-1.41202 -0.0999733 -2.57438e-16)
(0.776502 0.517711 -2.60279e-16)
(2.40933 0.0255736 1.36039e-17)
(1.0821 0.0756376 1.29758e-16)
(-0.445021 0.277551 1.2519e-16)
(-0.158807 -0.538453 4.49437e-17)
(-0.101424 0.492754 3.82447e-17)
(0.0749648 1.8639 -5.32492e-20)
(5.22481 4.62268 -3.25501e-18)
(1.43242 1.02732 1.26868e-16)
(-0.611063 0.0260277 0)
(4.15173 0.229549 0)
(-1.82295 -1.5243 -1.22225e-18)
(-0.0750664 0.183857 0)
(0.842828 1.10242 1.22319e-16)
(3.42455 4.22429 0)
(6.04493 -0.269664 0)
(-0.36153 0.147511 1.00741e-16)
(-0.0544079 0.554052 4.24734e-17)
(8.22352 2.54431 -3.54614e-17)
(0.0533932 0.502356 0)
(8.59901 3.72222 -1.62496e-16)
(1.908 9.30683 -1.0753e-16)
(0.76593 0.0691208 -8.98177e-20)
(-0.0690204 0.122956 3.44771e-16)
(-0.138487 4.64 -6.34997e-18)
(-0.663622 0.0286108 -6.92782e-16)
(2.71648 0.119938 0)
(0.835547 0.40002 -5.37666e-20)
(-1.35103 0.0412021 0)
(5.34235 0.090984 0)
(-0.11034 0.6339 0)
(1.68004 9.96246 -6.27869e-17)
(1.40557 -1.00806 -8.38317e-17)
(8.92083 0.355884 6.99899e-18)
(10.8013 0.605441 -1.20768e-18)
(0.154052 -0.363974 4.95321e-17)
(0.723983 0.198523 -5.23267e-18)
(0.726659 3.85028 6.58505e-17)
(9.18338 1.44635 9.75848e-18)
(0.041151 7.03905 1.04166e-16)
(10.4527 0.645793 -1.21672e-17)
(0.0503797 0.644056 -3.49341e-16)
(0.213825 0.148586 0)
(-0.635296 0.0193246 1.8256e-16)
(4.53488 0.24218 0)
(9.49716 0.827709 6.5679e-17)
(2.17941 3.13002 -3.51944e-18)
(1.7763 -1.08073 1.61052e-16)
(-0.555716 0.274907 -1.17165e-16)
(0.789151 0.550803 0)
(1.1856 1.37738 4.51632e-17)
(-0.0139413 -0.427213 -6.36074e-17)
(9.02745 1.22318 -1.19602e-16)
(0.0350436 0.470372 -3.34942e-16)
(3.64092 0.194953 0)
(4.34676 0.155699 4.31171e-17)
(0.907396 0.0700422 -2.68963e-16)
(-0.178398 0.207461 0)
(-1.44057 -0.109857 0)
(-0.0474557 -0.030697 0)
(0.652934 4.19245 0)
(-1.20987 -0.00654007 -9.49518e-17)
(-0.57213 0.0448534 -2.21203e-20)
(9.94389 0.0437725 5.28796e-18)
(-0.21911 2.45122 3.4665e-17)
(10.9157 0.0457012 0)
(9.39516 0.107427 4.84878e-18)
(0.261884 2.22531 -1.2611e-16)
(7.22631 0.50887 -1.44762e-16)
(-2.44327 -0.472065 3.33111e-16)
(-1.00178 0.217424 4.85247e-16)
(2.52504 -0.0179643 -2.71666e-16)
(0.412946 3.30511 9.75384e-17)
(0.398307 0.0976397 -4.15751e-16)
(6.89639 0.870878 1.11299e-16)
(1.19047 0.293137 -1.63266e-16)
(-0.273069 1.54219 1.16289e-16)
(4.40639 4.26891 0)
(2.85646 5.0451 1.59211e-18)
(-0.387242 -0.881154 8.37867e-17)
(0.0528065 -0.238896 -2.05955e-17)
(0.429178 -0.288407 1.7303e-16)
(0.236573 0.329617 -2.84221e-17)
(0.657177 0.784601 -1.51754e-16)
(0.165094 0.294325 1.09986e-20)
(-0.692128 0.0370691 3.35927e-16)
(9.52779 0.00465191 9.20994e-17)
(0.75503 3.60356 -8.23117e-17)
(1.20338 2.62012 -1.62574e-16)
(0.437011 2.10683 0)
(0.00324321 4.19339 8.23339e-19)
(0.804298 6.01307 -3.11855e-18)
(-0.197719 7.12868 2.30857e-17)
(-4.37487 0.0395216 -2.97305e-19)
(3.35867 -0.111917 2.11999e-16)
(2.5891 1.70973 -1.3366e-16)
(-0.161826 -1.14571 9.90402e-17)
(-3.76467 -1.32545 4.62382e-16)
(0.384977 0.0829939 -6.05807e-18)
(0.00423187 11.0061 1.67792e-17)
(-0.0174501 7.21588 4.11451e-17)
(-0.664399 4.00406 -3.00703e-16)
(-2.19575 3.99433 -6.31143e-19)
(-0.573843 0.889794 2.61525e-16)
(0.183476 1.22021 -1.79709e-20)
(2.12611 6.34281 -3.34143e-17)
(5.49468 0.153027 6.10416e-19)
(0.532731 0.000246914 -2.71992e-16)
(-0.248221 -0.0590868 0)
(-0.105652 0.153154 8.05814e-17)
(-1.03854 8.88904 1.02271e-16)
(4.02686 0.180769 6.97733e-19)
(-1.02156 -1.08595 -4.78745e-19)
(-0.0616526 0.960453 2.51695e-16)
(-0.4754 3.10358 0)
(-0.0664169 -0.28573 5.43817e-20)
(4.39602 1.35763 -4.34184e-17)
(-0.0555452 6.15582 1.62831e-18)
(0.254766 4.18547 -1.00733e-19)
(9.56544 0.40779 -9.10409e-18)
(-0.831093 -1.43164 -1.25656e-16)
(0.367342 0.0369236 -1.06059e-16)
(0.883482 4.8238 0)
(-0.374259 -0.49089 1.45816e-16)
(2.85704 -0.874935 1.0671e-16)
(-0.681833 0.211315 -7.68866e-17)
(1.67684 0.626401 -1.09057e-16)
(-0.183655 5.45916 0)
(7.06893 -0.0354255 5.43063e-17)
(0.216049 -0.267858 3.97512e-17)
(0.414639 0.542012 -2.76304e-16)
(3.96412 -0.321158 -1.40907e-16)
(-0.00387331 -0.131464 -1.61853e-16)
(0.0318052 1.35949 9.69264e-17)
(-3.00823 1.46788 3.83232e-16)
(4.15151 0.414049 1.44587e-17)
(5.10134 0.08126 0)
(-0.000575862 4.16647 0)
(-1.04921 -0.384018 0)
(0.00147321 3.39238 0)
(-0.71541 0.227365 7.42452e-17)
(0.100628 0.823135 -7.48652e-17)
(0.758994 1.44746 2.91492e-17)
(-2.35999 5.17503 2.33739e-16)
(-0.544023 7.42633 0)
(2.01701 7.45449 0)
(1.87944 8.11583 2.48808e-17)
(-0.384808 -0.664142 -1.56833e-16)
(-0.150054 -0.450063 0)
(-0.265245 7.22068 1.95392e-16)
(-0.366392 9.98896 -1.71116e-17)
(0.677147 0.413472 1.35969e-16)
(-0.648898 0.0413186 1.86721e-16)
(2.61822 -1.31471 -1.25656e-17)
(0.217138 1.40069 2.50185e-16)
(-0.776211 1.03473 -1.71617e-16)
(2.09772 -1.92908 -7.94798e-17)
(4.81612 0.812837 1.79105e-17)
(1.47074 2.72809 0)
(-0.918601 0.0321059 5.22691e-17)
(2.0372 1.71094 0)
(-1.65646 3.02778 -1.80152e-16)
(-1.12983 -0.15229 5.05881e-17)
(0.622575 -1.32487 7.07608e-17)
(-0.2361 3.5602 1.65111e-16)
(-0.363859 -0.998496 2.94537e-16)
(0.421041 -1.85286 0)
(4.62202 0.126129 -4.47825e-17)
(0.283596 -0.745141 -4.00986e-16)
(0.929184 1.24983 0)
(0.165501 0.00824884 2.54191e-19)
(1.56141 0.00880433 -9.49375e-17)
(0.994027 -0.75784 -4.47476e-17)
(0.343482 1.36202 -1.9072e-17)
(-0.196935 2.2902 1.81473e-16)
(-0.457166 1.81904 -6.5815e-17)
(5.36618 0.269939 7.69483e-18)
(8.26587 0.338737 0)
(-1.0092 0.489914 1.38345e-16)
(0.370874 -0.201799 -9.80891e-20)
(3.1628 2.33207 -4.22728e-16)
(3.38834 1.97906 6.00977e-16)
(0.325061 0.930662 2.57143e-16)
(2.23872 -0.209126 -1.63264e-17)
(0.123419 0.990609 -2.22222e-16)
(-0.0231886 2.41776 0)
(-0.053389 3.56445 0)
(-0.14605 7.43608 -8.91433e-21)
(-0.259447 1.68479 0)
(1.29089 0.158529 -1.21477e-16)
(-0.0851797 1.6581 2.22904e-16)
(-0.167158 9.23152 0)
(-0.201833 -0.39773 -8.56817e-17)
(3.04517 -0.564552 -9.21584e-17)
(-0.688141 0.0112726 -8.49743e-17)
(-1.1649 0.039547 -2.69343e-20)
(-0.56916 -0.0476848 3.50758e-17)
(0.842177 1.04483 0)
(6.53942 0.441245 -1.19643e-18)
(-2.27271 4.82313 0)
(-0.131728 -0.132686 -2.55369e-16)
(0.0190571 6.24759 3.82363e-17)
(0.120751 0.696474 2.27979e-17)
(-1.34196 -0.168149 1.34018e-16)
(-1.27269 6.99894 5.68862e-17)
(2.07667 1.75794 -3.72206e-17)
(1.89127 0.338962 9.9064e-17)
(1.41833 0.0376582 0)
(-1.36093 -1.78406 1.34442e-16)
(0.187809 5.69638 0)
(-0.190619 1.31064 7.92213e-17)
(-1.42413 0.448701 1.95633e-16)
(-0.634475 -0.321218 1.51385e-16)
(-1.88874 -0.0931487 3.94423e-16)
(3.49431 -0.407165 1.89007e-16)
(9.55627 0.744044 0)
(-1.1743 5.23814 9.68627e-17)
(1.89793 0.0370394 0)
(1.54775 0.187166 0)
(3.38476 1.70919 -8.93384e-17)
(0.427172 1.2218 1.85058e-17)
(3.62976 0.335945 -4.99173e-17)
(-0.0518415 -1.07836 2.51728e-17)
(0.0131951 1.86156 -1.03895e-16)
(-0.39977 0.0386131 3.80881e-17)
(-1.01952 0.0626809 -3.52393e-16)
(6.32935 1.16852 -9.01268e-18)
(0.581508 1.56395 1.10226e-16)
(9.99399 -0.00960061 2.51701e-18)
(13.0284 2.6293 0)
(9.84633 0.225746 0)
(-0.491546 9.7618 -9.86817e-18)
(-0.194027 1.09986 0)
(1.64649 -0.396841 -8.52619e-17)
(-0.572101 -0.401497 -7.5058e-17)
(-0.619935 0.362091 7.66841e-17)
(2.57013 -1.06636 0)
(-0.808763 3.00153 -1.9643e-16)
(0.220234 2.99157 -1.18039e-16)
(5.5223 -0.42483 -2.46096e-16)
(0.809356 1.89089 2.08443e-16)
(-3.34048 -1.67355 -2.82846e-16)
(9.8086 0.10241 2.26263e-17)
(-0.324125 -1.21068 2.06298e-16)
(-0.754749 0.135008 -1.54973e-19)
(1.08935 1.11822 0)
(8.71746 1.0881 2.58223e-17)
(0.623706 1.47098 1.09341e-16)
(0.436707 1.10194 -9.82035e-19)
(3.06393 -1.46276 -7.21052e-17)
(-0.680097 -0.0145025 7.40946e-17)
(-0.209007 0.0459022 -1.97254e-17)
(-0.579247 -0.19716 -3.06609e-16)
(0.02222 6.46921 1.81326e-16)
(-0.327582 1.70141 1.60608e-17)
(1.53089 0.392346 -1.61522e-16)
(1.02377 1.5552 1.90314e-17)
(10.22 2.20729 3.14772e-18)
(2.89118 0.325789 -1.00897e-16)
(1.34628 1.51997 4.48805e-17)
(-0.222216 2.00501 -6.62658e-17)
(-1.08104 0.912238 3.3828e-16)
(1.60976 7.36921 9.19485e-17)
(0.0165702 -0.404982 -2.779e-16)
(0.560465 1.68527 0)
(-0.0237597 6.29938 0)
(1.74098 6.22326 1.03167e-16)
(0.284995 -0.223026 4.31406e-16)
(0.752618 0.354645 -2.25084e-16)
(0.0808918 1.5261 -5.67823e-17)
(0.0127717 3.20723 -3.24036e-17)
(-0.121554 0.482287 -1.84475e-17)
(-0.0793534 10.0965 0)
(-1.68914 0.264869 -2.98046e-17)
(-0.661069 -1.12746 1.90105e-19)
(2.88158 2.52759 2.99449e-16)
(8.52985 0.964514 -1.1048e-16)
(-0.00472092 1.90433 -5.16755e-17)
(-0.454999 1.16965 0)
(-0.551945 0.0267425 -3.68282e-17)
(-0.042438 1.58106 -2.11884e-16)
(9.65965 0.154937 -7.56919e-17)
(0.126239 2.38642 -8.02545e-17)
(-1.94664 4.17902 -2.66929e-16)
(9.78034 0.0703059 -2.454e-18)
(-0.121006 5.25251 4.96859e-17)
(-0.0761213 6.50099 -4.63209e-18)
(-0.249579 0.930011 2.30251e-16)
(-0.40925 1.6245 1.10488e-16)
(0.0217753 -0.631088 1.56324e-16)
(-0.401355 1.89561 0)
(-0.638591 -1.10265 5.64776e-17)
(-3.75894 -1.68199 -1.30606e-16)
(2.09011 2.26529 -6.83518e-17)
(2.35641 5.03646 7.13946e-17)
(1.11829 0.28622 -2.23346e-20)
(-0.842568 -0.098988 8.29724e-17)
(-0.160884 0.477614 -2.54714e-18)
(3.44563 1.34738 -3.91562e-17)
(0.997251 1.3862 -5.95503e-17)
(2.41258 -0.06376 5.10994e-17)
(0.0730759 -0.205013 8.26245e-17)
(2.42453 -1.6841 -1.04724e-16)
(6.14267 0.0442907 2.95235e-17)
(5.65971 0.214542 -4.08099e-17)
(1.37036 -0.0758076 0)
(4.62917 -0.294732 -1.83888e-16)
(1.49024 -0.0512469 0)
(5.21831 0.170018 0)
(5.58399 0.0548114 -1.35483e-16)
(7.21921 -0.0473432 0)
(6.08283 -0.0799098 3.38169e-17)
(0.376714 7.12863 0)
(-0.432072 3.11492 -1.60473e-16)
(0.484057 0.348057 -6.48366e-16)
(0.144697 2.86797 -2.83029e-18)
(3.48042 4.41327 0)
(4.86889 0.0989515 5.15327e-18)
(0.621567 -0.254362 -3.82929e-16)
(-4.22195 0.0321329 -9.89845e-17)
(0.582461 -0.279889 2.113e-16)
(0.0676805 -0.276741 -7.45877e-16)
(0.641886 0.0547808 -3.6363e-16)
(11.0937 0.442398 4.65245e-17)
(0.0412968 5.36673 0)
(-0.724041 -1.19513 1.13293e-18)
(1.22466 -1.9838 -2.10309e-17)
(3.4723 0.19946 -2.54268e-18)
(0.750071 -0.372113 0)
(1.22958 1.55049 1.7643e-17)
(0.255106 0.528561 0)
(-0.172187 -0.596994 -1.68384e-17)
(0.357382 3.43203 -4.76489e-17)
(9.1719 2.0862 2.02078e-18)
(2.42265 -1.27698 3.93867e-16)
(-0.795812 -0.0421191 -5.16093e-20)
(-0.363084 0.383109 -7.81907e-17)
(-0.685396 -0.241006 0)
(0.437502 -0.0771898 1.22458e-16)
(0.0959056 -0.0610599 -1.93192e-16)
(2.29443 -0.099475 -2.83029e-17)
(-0.855901 -0.184925 1.30273e-16)
(-0.672851 0.074114 0)
(-0.333873 0.0182903 2.75134e-16)
(-0.0916043 0.201653 9.30594e-17)
(5.71922 2.79785 0)
(0.677419 1.53073 -7.01929e-16)
(-0.00630366 -0.477333 0)
(8.9464 0.521823 2.72146e-16)
(1.06802 1.54174 0)
(-0.673443 -1.10053 -2.08743e-16)
(8.27851 -0.0191755 3.71347e-17)
(1.32549 0.289083 -5.42438e-17)
(-0.588926 -1.45465 -1.11951e-16)
(2.56704 5.24071 1.4235e-16)
(-0.113973 7.96348 -1.58487e-17)
(-0.268865 5.81608 -8.52096e-17)
(0.515573 1.02814 -8.73501e-17)
(2.85947 4.7452 0)
(2.57187 2.88517 0)
(1.23168 -1.18731 0)
(0.0472303 -0.196603 -1.2249e-16)
(-0.428379 1.63183 -1.12362e-16)
(0.847335 0.636599 -5.67615e-17)
(-0.23546 -0.266025 0)
(0.53743 -0.321119 -1.5375e-16)
(-0.24331 6.63469 -7.55086e-17)
(0.0210646 5.10002 1.61341e-16)
(1.87004 -0.0159018 -7.1641e-17)
(9.62843 0.651684 0)
(0.0506846 0.116357 5.23252e-19)
(8.55047 0.821887 -3.73297e-17)
(2.95679 1.12454 -1.75742e-16)
(-0.576567 0.278992 1.91764e-16)
(2.08365 -0.227018 1.40594e-16)
(-0.841598 4.00208 1.07433e-16)
(0.87939 0.934634 5.82916e-16)
(-0.844597 0.338305 4.67983e-19)
(0.558026 -0.00338036 -1.03603e-16)
(10.3389 0.409148 0)
(-0.010055 5.05754 -2.58595e-16)
(-0.412024 6.68528 1.65089e-16)
(2.34888 -0.0248095 -2.82853e-17)
(5.89974 0.116108 0)
(1.02593 -0.260295 0)
(1.26224 4.12315 2.29978e-18)
(4.15649 1.96754 2.69003e-17)
(0.170158 6.08274 0)
(1.04676 -0.164188 2.96167e-17)
(0.357104 -0.224121 -2.16305e-16)
(0.411054 0.797104 0)
(0.630952 1.09416 0)
(8.60933 0.983935 1.15082e-19)
(-0.449425 0.0734625 3.64033e-16)
(1.68167 1.4738 1.21409e-16)
(-1.33072 6.18403 1.10352e-16)
(1.41527 3.23815 1.99311e-18)
(1.27368 6.29733 1.52457e-16)
(-0.216627 2.30135 0)
(0.768331 -0.181915 3.73403e-17)
(0.222805 -0.233251 -7.13867e-17)
(0.0808391 1.09725 1.66469e-16)
(3.40816 -0.284081 2.58833e-17)
(0.0320089 7.90592 2.11718e-17)
(-0.23195 6.37644 -2.83811e-17)
(3.00252 0.211635 -1.45372e-17)
(1.56254 0.248604 -3.25085e-16)
(-0.715763 -0.927367 -5.80777e-17)
(0.126868 -2.41441 -1.77688e-16)
(0.582042 0.0238209 1.24471e-16)
(0.40093 0.474248 3.05397e-16)
(0.128518 -0.558667 0)
(-0.122083 1.01362 7.64453e-17)
(0.279732 -0.195605 -2.3866e-16)
(-1.46613 6.60718 0)
(0.304054 3.91778 4.70333e-17)
(2.24781 8.28961 -1.27381e-16)
(-2.11868 5.00521 0)
(1.60429 3.26542 9.07319e-17)
(-2.581 5.26507 5.97759e-17)
(0.828462 0.058244 2.89801e-16)
(0.157921 1.30621 2.16203e-19)
(0.287974 0.0694536 0)
(9.66892 0.0263019 9.7485e-18)
(-0.0412803 -0.515927 1.22131e-16)
(9.72794 7.33467 -1.26859e-18)
(0.262027 -0.32702 -3.68884e-16)
(1.70508 0.331711 2.20047e-16)
(-0.0758659 5.35481 0)
(-0.489978 6.54019 2.35675e-17)
(2.14301 0.57081 1.14674e-16)
(-0.024328 -0.538445 0)
(-0.364883 -0.833681 -3.9506e-16)
(0.340889 -0.528849 4.52895e-17)
(-0.23752 0.138667 -3.12808e-16)
(-0.174362 -0.108924 0)
(-0.30366 2.10691 -1.77191e-17)
(0.281867 7.1444 -5.31669e-17)
(3.17481 4.75944 3.26766e-17)
(0.603702 1.88275 2.30726e-16)
(2.85727 -0.0874634 -9.41236e-18)
(-0.303476 0.182454 2.56077e-17)
(-1.24669 -0.287452 1.88777e-16)
(0.65006 0.063893 1.43649e-16)
(-1.18404 -0.998111 1.30934e-16)
(-3.17742 -1.54385 -3.411e-17)
(2.32094 2.94169 0)
(4.70821 1.73475 2.48041e-18)
(8.376 1.54768 -5.55766e-17)
(9.8745 0.215592 0)
(0.586829 -0.00769113 3.34607e-16)
(-1.34462 -0.116402 -9.81142e-17)
(-0.239986 8.41095 6.71614e-17)
(6.46079 -0.00386117 7.15013e-18)
(-1.15322 -1.19423 -2.00713e-16)
(3.47896 -0.01749 -1.11769e-16)
(-0.0877016 2.14654 -1.46265e-16)
(9.47645 0.0158406 5.31144e-17)
(9.74336 0.0528734 -7.7675e-17)
(-1.35213 -0.218101 -1.7085e-16)
(1.14995 1.96032 0)
(10.7561 0.842408 2.29866e-18)
(0.90627 0.255909 1.609e-16)
(1.19897 -0.682852 -2.99993e-17)
(-0.864893 -0.293244 0)
(-0.644717 1.70885 -3.71527e-17)
(2.08337 0.221766 -2.20569e-16)
(-1.76834 0.237687 2.75698e-17)
(-2.41265 6.22042 4.30042e-17)
(2.52585 0.643568 0)
(8.05966 0.551701 1.14635e-18)
(-2.35471 4.0229 -7.54843e-17)
(-0.385993 -0.864401 -1.42499e-16)
(-0.726702 7.80638 6.40056e-17)
(0.032098 1.95448 -5.75865e-17)
(-0.516912 0.885275 0)
(0.0723771 -1.34269 -1.40878e-16)
(-0.256606 -1.95396 -2.20736e-16)
(-0.707595 -0.0811199 1.63505e-16)
(9.88174 0.228925 5.8066e-17)
(8.51736 1.65662 0)
(5.97975 2.72744 1.72558e-16)
(-3.01862 7.52569 -1.6469e-16)
(-0.173585 1.21534 -5.85283e-20)
(1.36207 0.375091 3.23164e-16)
(1.92486 0.332448 -2.4095e-16)
(1.21502 5.39518 -1.08937e-16)
(0.126103 1.73182 0)
(-0.174373 -0.768027 1.69122e-16)
(8.51501 0.547859 7.43502e-17)
(0.523157 5.61174 -2.49566e-16)
(-1.52959 0.220282 1.64095e-19)
(0.0980205 10.0265 6.18091e-17)
(-0.714763 -0.0260497 -7.44072e-17)
(0.399715 -0.437891 -2.2534e-16)
(-0.390665 0.214127 -1.32935e-16)
(-2.57234 6.59886 -2.81809e-19)
(8.49623 0.375799 1.48091e-17)
(3.80655 0.216595 1.02749e-17)
(1.67519 7.02736 0)
(-1.43485 0.0477196 2.28318e-16)
(-0.0397316 3.76473 -5.25756e-17)
(-0.0791872 7.63794 3.60836e-17)
(-1.65202 4.91081 2.55751e-17)
(-0.0938601 8.5648 -5.18862e-17)
(1.11063 0.0457136 0)
(-0.452432 5.69193 3.44252e-18)
(-0.151671 7.48873 7.76344e-17)
(0.276459 5.06407 -2.08884e-18)
(0.0306344 0.0326781 1.87738e-16)
(-0.660191 -0.384541 0)
(1.39979 0.395031 -8.23428e-20)
(0.547479 -0.0723797 -2.20535e-16)
(-0.0708907 -0.948867 0)
(-0.701952 -1.41274 1.93906e-16)
(-1.06836 -1.59334 0)
(-3.39024 7.45273 -4.92166e-17)
(5.82742 0.283772 1.75631e-18)
(7.84799 0.228586 -1.37082e-17)
(8.65331 2.08346 -9.09954e-17)
(1.10228 -0.1964 -6.83765e-17)
(0.499639 1.64716 0)
(3.14348 1.35557 0)
(-0.557899 -0.454955 -9.01595e-17)
(-1.22877 -0.810197 -1.59697e-16)
(-0.0746845 8.01014 0)
(-0.242401 5.82103 1.23254e-16)
(-0.498044 0.0924702 4.26154e-18)
(0.659676 -0.34018 1.19279e-16)
(0.283343 1.72107 5.52966e-16)
(-0.505235 0.732376 0)
(-0.28882 0.0933376 -1.70293e-16)
(-3.04135 -1.27192 1.20991e-18)
(-0.32234 9.32723 -4.09896e-17)
(2.67517 3.43672 -2.60666e-17)
(1.15483 0.877088 1.62851e-16)
(2.55988 0.00806211 6.82468e-17)
(-1.6748 -0.841848 -5.84491e-17)
(2.74397 -0.0860438 7.62158e-18)
(4.38745 0.617643 -6.51158e-17)
(-2.53542 7.07825 3.35051e-17)
(-0.380214 4.81307 -9.53244e-17)
(0.547263 2.99828 3.61165e-16)
(9.74773 0.0600712 -6.96891e-17)
(0.244265 4.59186 2.9303e-19)
(0.222416 1.27143 -1.42715e-16)
(-0.65109 0.427783 1.64743e-16)
(1.95078 -0.667544 0)
(-0.478688 -0.0792535 3.54757e-17)
(-1.38541 0.0436727 6.58703e-17)
(-0.732516 0.726397 -2.24703e-16)
(2.75645 1.15108 -9.09569e-17)
(0.348812 0.0145299 -1.36073e-16)
(-0.50812 5.65534 -7.95915e-17)
(0.0126578 -0.656919 1.5169e-16)
(-0.317965 0.448677 -7.57952e-17)
(-1.22646 0.188885 1.18066e-16)
(2.66739 -0.397312 1.16809e-16)
(-0.289119 0.866879 0)
(-0.668816 0.410216 -1.06096e-16)
(-0.0246951 3.29383 0)
(-0.424427 5.21424 -7.707e-17)
(0.57012 4.58795 0)
(10.5092 0.0830109 0)
(-0.520662 0.27066 0)
(0.102183 2.15717 3.08281e-17)
(8.75762 1.48211 0)
(7.41175 0.938303 -1.00589e-17)
(-3.46477 0.626677 5.47385e-17)
(5.4071 0.272444 0)
(-0.446374 0.0894815 4.64474e-18)
(-1.27164 -0.11528 1.92168e-16)
(0.0794491 0.873612 -1.02844e-16)
(1.05422 1.06006 0)
(0.0410643 1.96413 -4.06292e-16)
(0.610735 7.26882 0)
(6.18943 2.4726 -2.81633e-17)
(0.801966 1.31655 -1.26638e-16)
(8.2957 1.12543 4.05261e-17)
(-0.20547 7.43613 1.1981e-17)
(0.387149 5.21776 -5.79688e-18)
(-0.317561 5.54555 0)
(3.51941 0.891172 0)
(6.93733 0.0754379 1.65644e-16)
(-1.314 5.97129 0)
(1.40608 1.39652 2.16513e-16)
(0.674573 1.81544 7.07967e-17)
(2.11189 0.787106 -1.79378e-16)
(-0.287665 0.431018 0)
(1.9225 -0.27267 8.14134e-17)
(3.83566 -8.39447e-05 1.24019e-16)
(-4.32713 -0.103147 3.92935e-16)
(-1.92964 -0.540094 -4.67197e-16)
(-0.145937 0.932966 1.01024e-18)
(-1.10534 1.06389 -9.25379e-17)
(9.28418 0.133477 0)
(-0.476691 4.53382 -1.3717e-17)
(-0.822253 -0.317303 2.9895e-16)
(3.75955 0.735351 -8.75361e-17)
(9.69327 0.127827 5.69892e-17)
(0.333559 -0.27498 -9.56616e-17)
(0.669362 -0.400106 -7.83605e-17)
(3.58569 0.13743 -3.62115e-17)
(-0.340297 0.238904 -6.64918e-17)
(-0.63361 -1.37245 -1.42605e-16)
(-0.55534 0.0481452 -3.68522e-16)
(-0.448925 -0.798094 -7.33912e-19)
(-0.488076 -0.577222 0)
(-0.411172 0.306163 -6.69171e-17)
(2.26637 0.234895 6.94757e-17)
(0.27257 5.84711 7.153e-17)
(0.524553 4.27705 2.1793e-17)
(4.88456 2.2141 -2.37735e-16)
(0.459653 0.275725 3.4215e-16)
(-0.125848 -0.173018 -1.17805e-16)
(3.09059 -0.204441 0)
(-0.635174 -0.212576 1.61552e-16)
(-4.46436 0.066864 1.22607e-16)
(3.65825 -0.0653091 1.03835e-19)
(-3.45721 -0.660104 0)
(-1.6665 -1.9664 -1.71965e-16)
(0.287887 -0.228949 1.07792e-16)
(0.667682 -0.707149 0)
(2.9995 -1.5606 2.08403e-17)
(-2.29983 -0.71137 0)
(-2.28113 -0.172128 -1.44051e-17)
(1.16864 2.51563 -6.15857e-17)
(1.9946 8.57351 2.78167e-18)
(0.191236 -0.202741 0)
(-3.12614 -2.32367 1.31787e-16)
(-2.20367 -1.84783 5.17002e-17)
(0.188464 -0.209847 0)
(1.89176 0.0645891 0)
(1.79047 0.15554 -1.40739e-16)
(0.200592 0.442496 -1.62707e-16)
(1.31519 0.309941 2.19874e-16)
(2.15318 -0.000515361 4.20604e-19)
(-1.06867 8.26437 1.14865e-16)
(11.1822 0.167052 -4.36237e-17)
(0.25519 2.61533 -2.12794e-17)
(-0.755999 -0.605019 3.13021e-17)
(-0.275966 0.186407 5.39693e-16)
(-0.236172 -0.605209 -2.64085e-16)
(-1.23118 0.220539 8.31534e-17)
(0.00426141 -0.655929 6.85433e-18)
(0.43825 -0.520447 -7.57201e-17)
(3.21682 4.08808 -1.56375e-18)
(0.298454 1.9383 4.09045e-16)
(0.434818 -0.116797 9.57461e-17)
(4.43187 -0.0542457 0)
(1.91773 0.780146 8.60886e-17)
(0.631747 -0.498286 3.89398e-17)
(2.19179 3.92475 -2.26378e-17)
(1.93893 -0.116114 0)
(-0.862362 -1.21269 -5.48855e-16)
(0.906533 1.37482 1.20327e-16)
(3.31475 -0.586903 1.3818e-16)
(-1.59077 0.0454363 2.70508e-16)
(0.56493 0.071334 0)
(9.75162 0.0750641 5.43321e-17)
(5.90083 0.367055 3.70378e-17)
(0.669441 3.4197 0)
(0.405122 10.3617 -3.89451e-17)
(-1.17087 3.79864 0)
(1.82961 1.70927 1.13727e-16)
(-2.98646 6.39198 0)
(-0.728124 0.350486 1.96973e-18)
(-0.123133 2.48018 1.09178e-16)
(-2.96474 5.95268 5.91589e-17)
(1.64306 -0.689669 0)
(0.571074 0.947463 0)
(-3.26194 -1.94445 -1.35477e-16)
(0.208125 -0.111296 -3.64321e-18)
(9.13271 0.562236 1.4503e-16)
(0.00384421 -0.570198 -2.81258e-16)
(1.18852 0.114083 5.86402e-16)
(1.05849 0.53067 0)
(-0.103944 2.73955 0)
(-3.19104 7.08264 0)
(2.81122 0.417148 -8.51072e-19)
(-0.333273 -0.557225 -8.93772e-17)
(3.57768 4.75546 -2.55253e-18)
(9.4511 0.0326553 8.55899e-20)
(1.40856 0.0608272 0)
(-0.0891003 -0.657061 0)
(0.0384083 0.0495148 0)
(1.33627 1.50445 -4.49188e-16)
(0.30157 1.95547 -1.63506e-16)
(-0.327796 1.28547 -1.19036e-16)
(1.7688 0.286329 0)
(0.44511 0.540208 -3.54139e-18)
(3.04977 -1.1241 3.47764e-18)
(-0.681329 0.538745 -4.25069e-16)
(0.451919 1.15826 -3.17514e-16)
(-0.923833 -1.64156 -8.20512e-17)
(1.24793 1.42889 2.52352e-16)
(9.93469 0.205888 2.56467e-17)
(4.15142 0.155295 4.01194e-16)
(-0.643631 3.34078 1.98464e-16)
(-0.180678 0.556402 1.97301e-16)
(-0.486495 1.11313 -4.69377e-16)
(0.0609984 1.15328 2.89276e-16)
(0.0687653 1.55676 5.66644e-17)
(-1.3208 -0.052343 1.88552e-16)
(3.11963 0.325535 5.45466e-17)
(2.07977 -0.0302856 -2.19987e-16)
(-0.431899 -1.17489 2.00422e-16)
(9.74239 0.0345994 -2.8921e-21)
(-0.270309 11.0875 -7.85745e-17)
(0.370401 2.76158 -2.89288e-16)
(-0.988738 7.30236 -2.29833e-16)
(9.75629 0.1203 0)
(8.62344 0.255694 6.62803e-19)
(0.252231 -0.333812 0)
(0.920061 0.483618 2.32115e-16)
(0.120946 -0.499642 0)
(2.02447 1.78353 -4.08894e-16)
(-0.531461 -0.171551 -1.16367e-17)
(1.70369 -0.0521144 1.42347e-16)
(-0.218243 -0.694294 2.11218e-16)
(0.320137 10.3061 4.22798e-17)
(-0.6335 8.11901 -1.50653e-16)
(-0.000713821 0.517959 0)
(-0.0730427 -0.0896928 8.43063e-16)
(-0.192058 2.3347 9.42622e-20)
(3.00186 -0.0554859 2.18132e-16)
(7.78151 0.150941 4.41689e-17)
(0.333346 1.42227 2.53509e-16)
(-0.637904 0.62485 0)
(2.58902 -0.539406 0)
(5.81492 -0.0466325 -1.81115e-16)
(0.414147 0.0671419 0)
(-1.13763 4.63902 3.77914e-17)
(1.05224 1.73754 -7.0923e-17)
(1.72353 1.40135 1.51911e-16)
(-0.423019 0.0498391 2.07309e-17)
(-0.148574 0.583725 -2.79632e-16)
(7.91852 -0.0381606 -6.75551e-17)
(-2.38774 -1.91775 -1.0642e-16)
(-1.15451 -0.221008 -1.68701e-16)
(2.3017 0.080866 0)
(-1.13577 0.0978111 4.56465e-16)
(-1.28715 -1.01075 -7.79078e-17)
(-0.14449 -0.256491 5.81092e-17)
(0.575834 -0.573543 -1.12736e-16)
(-0.108549 0.0939975 -6.2478e-17)
(-0.0470897 0.943329 4.39668e-16)
(0.38492 1.58417 -1.10341e-16)
(1.27284 2.19669 -6.45975e-17)
(1.01582 0.501222 -1.31766e-16)
(2.38729 2.14014 1.3623e-17)
(1.49467 1.42545 -2.53339e-16)
(6.51146 -0.160503 4.13759e-17)
(-0.359253 0.0255912 -2.71262e-18)
(4.26018 0.292235 -7.08586e-17)
(1.88401 2.18586 2.74575e-18)
(8.54202 1.30453 -1.81226e-17)
(-0.402572 -1.88501 7.75276e-17)
(0.384882 4.63717 0)
(-0.00754892 0.277854 3.20697e-17)
(0.00546995 0.286932 -1.10844e-17)
(0.0880262 0.389753 0)
(0.0428233 0.320309 -4.6349e-17)
(-0.0720809 2.34496 0)
(-0.0470766 2.18865 0)
(-0.048295 2.446 0)
(-0.00041977 2.41649 0)
(-0.0164775 0.289428 0)
(0.0320144 2.3531 0)
(0.178408 7.77151 8.4826e-17)
(0.0312748 5.13286 3.46573e-19)
(0.0527882 5.09263 7.56158e-17)
(0.0245598 4.93533 6.88496e-19)
(0.0433379 5.0149 0)
(0.167307 8.61899 -7.4202e-17)
(-0.0028278 5.0398 -1.45398e-16)
(0.0658699 6.51135 0)
(-0.00506641 2.95707 -9.10773e-19)
(-0.0599934 3.30015 -2.3158e-17)
(-0.0396375 3.03988 0)
(0.0522578 3.06676 5.2351e-17)
(0.188847 7.10399 0)
(0.277046 9.47597 0)
(0.067836 3.21814 -6.89444e-17)
(0.319577 5.82592 -4.28602e-18)
(0.249003 6.48277 -3.97573e-18)
(0.0657398 3.29852 2.18027e-17)
(-0.04452 4.83105 7.68462e-17)
(0.36625 -1.30663 -7.94574e-18)
(0.161166 -2.24735 0)
(0.284557 -1.85996 7.19187e-18)
(0.338665 -0.663336 2.01376e-17)
(0.0316554 6.4753 0)
(0.0438506 2.32967 0)
(0.040918 -2.44152 2.66938e-17)
(0.0481965 6.42231 -3.20184e-17)
(-0.0111562 0.293155 -2.12607e-17)
(-0.207144 6.53097 1.85112e-17)
(-0.0225279 6.35434 0)
(-0.212622 7.01958 0)
(-0.109758 6.35308 0)
(-0.0461049 -2.43513 -5.49684e-17)
(0.160329 7.29498 -7.08681e-17)
(0.0629253 6.42935 0)
(0.184279 6.1671 0)
(-0.0742257 4.64715 0)
(0.21475 6.86877 7.24804e-17)
(0.0901012 7.50916 0)
(0.052455 3.33177 -3.00422e-17)
(0.0286334 7.6 -3.14179e-17)
(0.254011 6.39796 1.81483e-17)
(-0.0587992 6.45102 0)
(0.34126 5.60798 -9.05388e-17)
(0.279706 5.38949 -3.62278e-17)
(0.282466 5.90135 2.18695e-17)
(0.5144 4.74216 1.01646e-16)
(0.630745 3.64653 3.16855e-17)
(0.723155 1.62202 1.77218e-17)
(0.689233 2.60471 -1.90764e-17)
(-0.00168202 7.65537 3.24256e-17)
(-0.074758 4.47223 0)
(-0.0184902 7.70441 0)
(-0.0188748 7.74723 0)
(-0.00812172 6.29875 3.21226e-17)
(-0.0574589 4.39585 0)
(0.0398164 3.34082 2.23846e-17)
(-0.0463867 4.33395 0)
(-2.77377 5.38443 6.30879e-17)
(-0.00247199 0.283495 -2.07657e-17)
(0.0152085 0.254692 2.1159e-17)
(6.04848 3.94844 -5.27366e-17)
(0.224603 2.65923 1.05192e-17)
(0.0365059 0.194413 1.10838e-17)
(0.032929 0.120288 2.847e-18)
(-0.188791 -0.314697 1.87583e-16)
(5.11174 -0.0446926 3.88859e-17)
(8.29036 0.0254202 -2.21023e-18)
(2.48821 1.63325 4.22742e-16)
(-0.673559 0.0131597 0)
(-1.21221 -0.255355 2.68008e-16)
(-0.0462592 -0.0772449 -8.85624e-17)
(1.31462 2.32621 0)
(0.461738 -0.0463999 0)
(-0.79616 -1.29486 2.12642e-16)
(-1.25984 -0.0483023 -2.66589e-16)
(9.71749 0.0721482 9.97693e-18)
(-0.0935894 -2.32174 7.33187e-21)
(0.0454648 2.29785 0)
(-0.929379 -1.34528 -7.15468e-17)
(2.184 1.56927 -1.23101e-16)
(-0.971894 -0.668873 7.44656e-18)
(-1.37848 0.685801 -1.87573e-16)
(-2.74762 1.00847 0)
(2.63035 0.612218 1.89226e-16)
(0.224142 -0.539848 0)
(0.316402 0.826157 1.22974e-17)
(0.0651523 2.0359 -6.03576e-17)
(-0.522907 0.575755 0)
(1.62976 1.7256 -1.2118e-16)
(-0.285632 0.0255355 -1.93968e-17)
(-0.925281 -0.135462 6.39632e-17)
(1.90391 -1.03472 1.82357e-16)
(-0.65636 -0.0502999 1.02398e-16)
(-2.30047 0.242775 0)
(0.323348 1.36238 0)
(0.0664736 7.05624 -1.25903e-16)
(-0.033574 1.86525 1.37888e-16)
(0.381522 -2.69869 1.20497e-18)
(-0.230435 1.51409 -1.72609e-16)
(-1.69268 0.395417 -3.58507e-18)
(-0.295493 -0.0364448 5.526e-16)
(0.291111 -0.362426 0)
(8.34328 1.84782 -1.82817e-17)
(0.148591 0.0954973 -1.28891e-16)
(-0.208322 -0.791971 -1.66954e-16)
(0.0444345 1.69321 -1.34093e-17)
(-1.01174 -1.00306 -7.85937e-17)
(-0.132356 2.03083 -2.23459e-16)
(0.105457 1.01647 -2.33544e-16)
(-0.034428 2.16853 -8.67237e-17)
(0.418146 1.46844 5.90933e-17)
(0.514153 -0.504329 1.39843e-17)
(0.509382 -0.433105 1.91758e-16)
(0.179646 5.61671 -6.60918e-17)
(-0.210085 7.35186 -1.49127e-17)
(0.787355 5.81329 0)
(-0.112843 6.89688 -3.64234e-17)
(0.0344486 1.59631 2.32924e-17)
(-0.405967 -0.633074 3.27576e-16)
(-0.456829 0.100097 5.42558e-16)
(-1.59135 0.643646 -3.74405e-16)
(1.98126 3.9278 0)
(0.720571 -0.564741 -1.40314e-16)
(1.01976 0.15176 1.00992e-17)
(-1.13325 -0.465923 0)
(1.28788 0.204 0)
(-0.124725 -2.16651 -8.13804e-18)
(0.0475768 2.24015 0)
(8.79751 2.25465 -9.42526e-18)
(0.717595 -0.208748 2.93515e-16)
(-1.75891 0.207474 2.98079e-17)
(0.334961 0.60568 0)
(5.44389 -0.0790698 3.22391e-17)
(0.193894 1.19871 1.91679e-17)
(0.260526 -0.515234 -2.50325e-16)
(0.0149193 1.64228 -1.32556e-16)
(0.443478 -0.583418 -1.31831e-16)
(-0.364059 -0.913907 -1.08413e-16)
(-1.5681 0.0881428 -3.31368e-17)
(0.346711 1.49486 -3.11328e-16)
(2.29503 1.4419 1.14887e-16)
(1.68218 1.65548 1.24471e-16)
(-0.122019 -1.31101 -9.19885e-17)
(-1.50395 -0.781375 5.40439e-16)
(0.430173 0.819675 7.57343e-17)
(-0.512201 0.346083 8.00489e-17)
(0.35102 -0.498707 -1.66943e-16)
(-0.175004 -0.0920005 -3.79086e-17)
(-0.652452 -0.298268 2.39465e-16)
(-0.0440934 0.259824 1.12678e-16)
(-1.37875 0.0665843 1.05635e-16)
(1.08746 -0.553785 1.9272e-16)
(0.587367 -0.445856 4.98778e-16)
(6.36273 3.14972 9.62398e-17)
(-1.68145 0.436736 1.76933e-18)
(-1.57496 -1.07695 6.54917e-17)
(0.106609 2.61598 -8.90706e-17)
(0.625605 2.72636 -4.21088e-17)
(0.435622 -0.135024 -2.29213e-17)
(-0.187008 -1.09727 1.50411e-16)
(0.0542982 1.812 0)
(-0.156966 -1.96444 -1.65451e-17)
(0.0549287 2.15258 -5.79292e-17)
(1.344 0.566254 -6.93491e-17)
(0.680547 1.64253 0)
(1.50696 -0.0365743 7.64608e-16)
(0.254185 9.18918 8.2886e-17)
(0.355051 -0.371609 0)
(0.0166607 1.31532 0)
(-1.67937 0.312939 -5.76171e-17)
(-0.0457807 2.02859 0)
(-0.00692667 -0.248067 3.68833e-17)
(0.350834 -0.4265 1.78785e-16)
(-0.756086 -2.00471 -3.4964e-16)
(0.655126 1.21695 9.73375e-17)
(-3.0067 -1.66196 7.14915e-17)
(0.804271 -0.0248366 4.64108e-19)
(-3.05732 6.05704 6.07952e-17)
(4.46121 0.294056 -2.60456e-16)
(-0.063147 1.03694 1.93703e-17)
(-1.71786 -1.48562 3.4863e-17)
(3.15344 -0.0711336 0)
(-2.03221 -1.7164 1.88545e-16)
(0.971886 0.00110508 -5.26463e-17)
(9.74174 0.0454227 -6.6576e-17)
(-0.188026 -1.40145 -3.55367e-17)
(0.0604579 1.92802 0)
(-0.186327 -1.67965 6.59843e-17)
(0.0604036 2.04249 5.73645e-17)
(-1.19686 0.062171 2.03106e-17)
(0.0186796 0.978139 1.91525e-16)
(3.45136 -0.0425004 -7.30772e-17)
(0.524865 -0.34831 -1.29364e-16)
(0.176318 -0.118608 9.24929e-17)
(2.23985 9.79163 2.88734e-16)
(10.8337 0.275421 -6.65213e-20)
(1.30328 1.62031 -3.88848e-19)
(-0.611236 -1.116 1.26627e-16)
(7.83652 0.839608 -2.88688e-19)
(-1.4117 0.30652 -2.61037e-16)
(0.497695 1.51836 -5.10479e-16)
(0.181232 5.6236 0)
(-1.81405 -0.208822 0)
(-0.028856 7.83279 0)
(-0.0516342 4.24132 0)
(0.680535 3.25146 3.46347e-16)
(0.168362 1.42816 -2.36521e-17)
(1.09502 4.74421 -1.09266e-16)
(3.0353 4.33481 4.78754e-19)
(-2.93961 -1.31719 0)
(-0.0305757 1.48387 2.57258e-16)
(-0.645731 0.163348 6.32285e-17)
(0.594526 1.13432 -5.40036e-17)
(-0.0393213 1.28683 -7.84025e-17)
(-1.36758 2.73315 2.02454e-17)
(-0.203877 -0.447858 -1.13251e-16)
(-0.211195 1.6732 0)
(1.43866 -0.264869 6.43545e-17)
(0.720334 0.156184 1.30573e-16)
(9.0184 0.936057 -2.3487e-16)
(10.2716 0.152325 2.91376e-17)
(-0.797129 0.0603383 -1.9441e-16)
(-0.335179 -0.144015 0)
(8.74413 0.594164 -7.37727e-17)
(3.31522 4.84908 1.27349e-16)
(0.279688 1.89277 0)
(-0.166416 2.95065 -1.06312e-16)
(-0.245735 0.171769 0)
(0.0107178 1.34482 6.19281e-17)
(0.0437442 1.41113 0)
(-1.2219 1.52514 0)
(-0.0659681 1.96476 1.75164e-16)
(1.85739 0.415229 0)
(1.47612 0.024891 3.92801e-18)
(-2.72293 5.62121 8.72752e-17)
(-1.97236 -0.754169 -8.99789e-17)
(-0.920849 3.26806 0)
(9.63898 0.0509206 2.96726e-17)
(-0.771142 8.82068 1.32788e-16)
(-0.264923 -0.0214416 0)
(-0.524038 -1.85328 2.3333e-16)
(0.0676982 6.6519 6.08168e-18)
(-0.507806 6.14803 -4.65781e-17)
(8.57986 2.64565 2.48116e-17)
(-0.233764 -0.532282 -1.53825e-16)
(1.19754 0.0393941 -1.54503e-16)
(-1.3106 -1.2544 2.5583e-16)
(-1.60165 0.00974351 -1.93864e-16)
(3.17563 -0.592705 0)
(10.4008 0.212369 1.25852e-17)
(0.535941 -0.0316088 -1.39431e-16)
(-1.38977 -0.985058 -2.27388e-16)
(2.74788 0.35564 0)
(0.495423 -0.406497 1.32702e-16)
(1.1405 -0.00423121 2.08784e-16)
(-1.40709 -0.541495 3.43412e-17)
(0.285761 -0.905162 1.81884e-16)
(-0.118817 -1.40938 0)
(0.00360252 0.12282 3.45575e-17)
(4.74387 0.294154 8.9804e-19)
(-0.339813 8.36173 -3.16562e-17)
(1.37544 -0.715443 -3.05638e-16)
(0.713475 0.164224 2.10048e-16)
(0.00603713 0.00410875 -6.7132e-17)
(2.71314 0.139715 -1.40072e-16)
(0.503981 0.0129578 1.92396e-16)
(0.201405 5.31676 2.9578e-17)
(1.14737 2.47651 -2.88885e-17)
(-0.0775529 5.70574 7.51407e-21)
(0.165377 4.01916 -1.95616e-17)
(-0.129758 4.85394 0)
(7.27237 0.211252 2.96413e-17)
(8.49909 1.98538 0)
(-2.80337 0.942434 0)
(0.798418 0.242594 2.67007e-16)
(1.77852 -0.430644 3.71779e-18)
(2.1403 5.50178 9.36545e-19)
(2.32941 0.903334 -3.13185e-16)
(-2.28024 3.43073 3.94086e-17)
(1.44938 0.601585 -2.57102e-16)
(1.49493 -0.0720662 1.15901e-16)
(0.0108439 -0.86891 0)
(5.9949 0.0895203 0)
(3.37032 1.10384 -2.92283e-16)
(-0.00129545 1.84933 1.36778e-16)
(-1.59292 -1.5042 0)
(-0.069122 1.65218 2.54207e-17)
(0.33757 2.39988 1.52937e-16)
(-1.91814 -0.456087 0)
(0.517182 5.18652 1.11005e-16)
(0.531981 0.701548 0)
(10.8524 0.0671074 4.01394e-17)
(-1.60839 3.48712 -2.55331e-16)
(4.08346 2.35886 3.14116e-17)
(-0.577816 -0.777545 1.55073e-17)
(-1.28343 -0.803008 1.02038e-16)
(1.99098 0.779078 0)
(0.34568 4.70188 0)
(9.72514 0.481722 2.26426e-16)
(-0.428073 0.0961036 4.47775e-16)
(1.34701 0.277068 -1.60869e-16)
(10.6185 0.661139 2.09374e-18)
(0.643579 0.212059 -2.67781e-17)
(-1.01509 -0.0844503 -6.11745e-16)
(-3.99276 -0.723535 -2.13265e-18)
(3.24208 0.229069 2.92732e-16)
(0.459277 -0.580545 3.14652e-16)
(-1.58952 5.86856 0)
(1.56875 5.1194 -5.70935e-17)
(-0.307652 0.414049 1.91075e-16)
(3.13298 1.13011 -1.36237e-16)
(0.550953 -1.35925 -4.50361e-16)
(0.316692 1.04114 -3.99924e-16)
(-0.513632 -0.356284 -1.25409e-17)
(-1.4984 -1.80456 1.91402e-16)
(1.42033 0.00661868 0)
(2.06353 0.11265 4.94254e-17)
(3.75292 -0.0764585 -1.06268e-17)
(9.97359 0.142084 -7.36426e-17)
(0.286187 0.293112 -2.72216e-20)
(-1.41426 -0.0818261 -2.45735e-16)
(4.37809 0.337969 1.44606e-17)
(2.07526 -0.150827 -2.74625e-17)
(0.433711 0.872827 1.20388e-16)
(-3.86768 -2.84511 0)
(-0.764213 0.181001 0)
(9.75337 0.0376614 5.2885e-17)
(0.0921605 6.08172 7.90482e-17)
(4.94592 2.45484 2.41573e-16)
(-0.0559874 7.66033 1.54833e-17)
(-0.0531801 3.81718 3.61137e-19)
(-0.178383 -1.10893 0)
(10.3075 0.565503 -2.97105e-18)
(1.87434 0.031196 0)
(1.82832 0.0957724 1.85121e-16)
(1.97733 0.114474 6.60856e-19)
(2.66072 -0.0699917 0)
(0.0300075 1.29783 2.00174e-16)
(1.09823 5.34613 -1.5927e-16)
(0.226927 4.59375 -3.076e-18)
(-0.0853969 5.10688 -1.7733e-19)
(-0.0548243 6.36611 -8.94048e-18)
(-0.650588 1.81604 -2.33459e-18)
(7.32479 0.0434768 0)
(1.56477 0.868893 1.98254e-16)
(1.11268 0.834211 -1.00508e-16)
(3.66912 -0.16704 1.90309e-16)
(2.06066 -0.0461853 -2.04759e-16)
(-2.2607 -0.55752 0)
(1.16276 0.887213 -7.00347e-16)
(1.62516 3.30203 2.20169e-18)
(1.7523 2.58838 1.07389e-16)
(-2.18563 3.68621 1.9941e-16)
(-1.42104 -0.668972 -3.25761e-16)
(0.187612 1.57923 -3.21162e-17)
(0.0617257 0.0161283 -3.20688e-16)
(-1.15182 0.256537 6.29268e-17)
(0.372811 -0.0372525 -3.18033e-16)
(-0.389671 -0.704539 2.49076e-16)
(0.48882 0.222189 1.84446e-17)
(0.447518 -0.389215 3.21862e-16)
(0.401419 -0.175044 -2.16827e-16)
(-0.120441 -0.934891 5.17954e-17)
(-2.50631 -0.902804 -1.08752e-16)
(2.18679 1.08608 1.4632e-16)
(0.322051 -0.0169849 2.01768e-17)
(2.10191 1.07129 7.33216e-17)
(0.415211 -0.659865 -6.25401e-17)
(-0.772944 0.571035 -8.26224e-18)
(-1.31054 0.115778 2.26885e-16)
(0.57737 0.146892 0)
(-1.08165 0.871135 -1.30535e-16)
(7.83681 5.12955 1.72825e-17)
(-0.138438 2.29678 7.17179e-17)
(-0.148456 4.8427 2.78312e-16)
(0.0663074 1.80409 -2.41884e-16)
(-1.81556 -0.0844625 0)
(9.80884 0.340023 -1.6609e-18)
(-0.0334564 3.11453 3.17558e-17)
(-0.0529084 -0.274861 9.70977e-18)
(-0.0719246 5.1183 -1.65712e-16)
(-0.493645 6.29225 1.54744e-16)
(-0.267228 -0.98648 0)
(2.55221 0.110341 0)
(0.616298 2.00074 -6.51272e-17)
(0.515651 -0.159292 0)
(1.09318 -0.198706 -2.08563e-16)
(-1.50791 -0.395037 0)
(1.33343 0.288187 -3.67757e-17)
(-0.233299 3.2807 0)
(5.95581 1.02203 -1.51527e-17)
(0.804639 -0.400145 8.11642e-17)
(-0.143558 0.252184 5.08721e-16)
(0.164456 -0.218633 4.17948e-16)
(-2.14476 0.0921704 1.75963e-17)
(0.137007 0.128873 0)
(5.53374 0.0505275 0)
(3.66605 -0.0494047 -3.95761e-16)
(0.0612251 0.143766 -1.49062e-16)
(-3.52718 -2.64877 -1.84658e-16)
(-0.170398 0.716585 -5.0203e-16)
(0.555433 0.0561732 0)
(1.16177 -0.415859 -2.1736e-16)
(4.51483 -0.120815 -2.57733e-17)
(0.0808378 -0.548132 0)
(1.20221 0.275245 -5.14251e-16)
(-0.332523 -0.105865 -3.33052e-17)
(2.08921 0.533789 -1.10686e-16)
(-0.965811 9.58783 4.01366e-17)
(2.98942 0.943102 0)
(2.20058 -0.215577 1.17028e-17)
(2.5521 -0.369048 -8.70614e-17)
(1.52154 0.389411 0)
(0.00464942 -0.304205 0)
(-0.249974 -0.649815 0)
(1.15169 1.42799 2.04842e-17)
(-0.33507 -0.838968 2.16648e-16)
(-0.60345 -1.08665 -1.68112e-16)
(0.316499 1.17642 8.02202e-18)
(-0.249718 0.00265713 -5.67675e-16)
(2.18607 1.1293 6.33435e-17)
(9.81506 0.25637 7.09907e-17)
(-4.09226 0.266435 1.07233e-16)
(3.75387 -0.197774 8.1191e-17)
(0.371148 4.45075 8.08882e-17)
(-0.0363893 6.45152 1.15453e-17)
(-0.0709563 5.53401 4.04024e-17)
(-0.411161 2.37697 -2.48695e-16)
(-0.160795 6.33379 -1.99179e-17)
(1.27058 3.46843 -1.54518e-17)
(11.2824 1.38085 -4.32177e-19)
(8.57266 0.16511 -3.57363e-17)
(-0.0490969 7.7414 1.49385e-17)
(-0.0487013 4.02054 0)
(-1.23407 -2.18686 -2.72759e-17)
(-1.60783 0.1388 -1.00666e-16)
(-0.11059 3.10279 -5.51565e-17)
(0.235542 6.09098 2.95384e-17)
(-0.244913 0.0908164 1.0033e-16)
(0.0517922 1.94503 0)
(-2.12721 2.31071 0)
(-0.0763409 1.54083 -2.41437e-16)
(-0.66352 -0.113962 6.60809e-17)
(0.989706 -0.713301 -1.20477e-16)
(-0.615626 0.289574 7.44788e-17)
(4.15314 -0.135839 8.69254e-17)
(-0.0977123 5.5735 1.56838e-16)
(-0.916596 0.638984 2.72008e-16)
(7.28635e-05 4.15304 -1.69391e-16)
(-0.830345 -2.05482 2.75134e-17)
(0.0459558 -0.0326652 1.12704e-17)
(1.51217 0.577223 1.07061e-16)
(0.879625 -0.829207 2.14276e-16)
(-1.08088 0.245719 0)
(-0.8603 0.0477532 3.09938e-16)
(1.42047 0.626844 2.08539e-17)
(-0.228852 -0.467733 5.97873e-17)
(-1.13373 -0.471715 0)
(1.95865 -0.220089 5.15404e-17)
(2.34371 9.09223 -8.51494e-17)
(-0.169067 6.95187 0)
(0.482151 5.90492 -2.67296e-17)
(-0.421559 3.9875 -6.93095e-17)
(0.480771 -0.206369 -5.62107e-16)
(5.8312 0.424843 -1.12528e-16)
(0.817092 0.413333 3.10957e-16)
(-0.0590794 -1.76727 -2.8096e-16)
(8.80738 1.29257 1.33606e-17)
(0.369092 2.37607 1.39637e-16)
(-0.146252 5.92077 4.32615e-17)
(0.732629 5.30664 3.47804e-17)
(1.79056 0.465032 0)
(3.56566 1.41718 -4.07766e-16)
(2.17943 1.63914 0)
(-0.817289 -0.798213 2.08685e-16)
(-0.0496598 -0.626534 7.00286e-19)
(-1.79544 0.958325 -5.40522e-17)
(0.512986 0.000439718 4.5447e-16)
(2.5116 0.0870905 -4.18084e-17)
(0.465329 0.469701 5.40566e-16)
(-1.85953 4.50541 0)
(1.5616 2.94193 2.98941e-18)
(0.231489 10.6864 -1.64903e-17)
(0.440244 0.187802 -1.04493e-18)
(1.16002 -0.443836 -3.8924e-16)
(-1.39758 -0.11952 -1.23611e-16)
(-2.80206 8.49112 -1.10721e-16)
(6.97528 0.249808 0)
(0.868497 0.837361 -9.05322e-17)
(0.104705 -1.26137 0)
(0.607341 -0.403155 0)
(2.23078 0.686287 7.83132e-17)
(0.0448288 -0.142479 3.62769e-16)
(0.248918 -0.20928 1.2769e-17)
(0.906473 0.0193651 0)
(-1.59368 -0.631438 0)
(-1.5424 0.100388 -5.70754e-16)
(0.459271 0.0863552 0)
(2.63119 0.0951156 5.26818e-17)
(10.8214 0.320914 1.33898e-17)
(1.08939 -0.264476 -3.24292e-17)
(-0.729851 -1.60544 6.59221e-18)
(-0.306615 -0.0489337 0)
(-0.764604 0.785849 4.85238e-16)
(1.49596 0.109128 0)
(7.80161 0.854761 -1.70569e-16)
(1.49299 0.0939233 -2.62559e-16)
(-0.832727 -2.41757 -3.80373e-16)
(-0.0777541 2.53427 1.48831e-16)
(-0.373405 -1.2858 1.62186e-16)
(8.53487 0.740672 -1.04986e-17)
(0.417427 -0.751228 -1.74155e-16)
(1.97118 -0.822851 3.22006e-16)
(0.25225 0.182499 1.17243e-16)
(-0.139279 -0.975698 5.32424e-16)
(9.96468 0.256318 -6.43802e-17)
(2.88096 -0.236076 -8.25238e-17)
(2.47429 1.25713 1.95184e-16)
(-0.385734 -0.835481 -1.6661e-16)
(-2.05661 -0.823142 5.04804e-17)
(0.514613 0.171259 -1.20125e-16)
(8.03757 0.0477029 -1.40333e-16)
(-0.33346 3.96917 2.56849e-16)
(0.173885 1.92185 2.09211e-16)
(-1.02524 -0.985951 5.08507e-16)
(-3.49292 -0.479506 0)
(-1.54364 -0.359593 3.08121e-16)
(7.5561 0.248145 -9.09412e-17)
(0.503759 1.37936 2.55694e-16)
(0.69691 3.94101 -9.67044e-17)
(2.39107 2.84837 2.77581e-17)
(-1.20222 -0.0232307 1.9513e-16)
(-1.39167 0.0104672 0)
(0.561971 0.615738 -3.18972e-17)
(2.87149 5.02964 -2.81266e-16)
(0.832444 -0.799052 -9.13281e-18)
(0.40433 5.656 -7.92219e-18)
(1.25805 1.00047 -2.65291e-16)
(0.541758 0.749473 4.20129e-19)
(-1.49005 -0.261144 -1.11935e-16)
(2.48485 1.47114 -9.00387e-17)
(1.84101 4.3288 1.0285e-16)
(10.8015 0.123958 -1.48676e-16)
(0.620201 -0.0331178 8.74407e-17)
(9.85792 0.239915 -5.98089e-17)
(3.15784 4.70545 5.09013e-17)
(0.62983 0.751012 -1.56482e-17)
(0.0732068 -1.18405 0)
(5.17737 -0.136477 -2.81051e-16)
(12.5595 1.10883 -2.38482e-18)
(7.88123 10.3442 6.22601e-18)
(2.69073 1.37929 -1.52005e-17)
(-0.132185 7.85878 -1.1442e-16)
(-1.46613 -0.0162616 -1.35285e-16)
(-0.368487 0.149881 -2.92555e-17)
(1.76297 0.254479 1.37088e-18)
(-0.0894484 5.1005 8.08139e-17)
(0.115891 4.69641 2.68876e-17)
(0.294959 4.73062 -1.8938e-17)
(3.56572 -0.124564 0)
(0.17205 0.402817 -3.95818e-17)
(-1.30821 -0.438173 4.40022e-16)
(-0.48178 3.59801 1.7187e-16)
(9.79335 0.212454 5.48298e-17)
(-1.00302 0.0304682 -2.65258e-16)
(1.49159 2.91313 0)
(3.97137 -0.239437 -8.62681e-17)
(0.359882 0.662743 2.21964e-16)
(-0.213039 9.36113 -7.66394e-17)
(-0.179005 5.22537 -2.55824e-17)
(-0.025389 5.96926 1.53308e-17)
(0.128952 3.82815 0)
(0.171832 2.20622 -5.01842e-17)
(-0.208426 1.93429 -2.54727e-16)
(-0.306768 1.73643 1.84931e-17)
(0.27275 6.35831 -3.35549e-17)
(1.79863 5.30647 -1.72728e-18)
(0.050268 4.96125 1.99775e-18)
(-0.128587 7.74449 -4.8294e-17)
(7.07384 2.4619 -7.49427e-17)
(9.65885 0.036095 7.64069e-18)
(-1.49886 -1.22128 1.18717e-16)
(0.551539 -0.195855 3.70694e-17)
(-0.321554 0.15885 1.62273e-16)
(2.07747 -0.252928 -2.82447e-17)
(9.82313 0.298863 -7.07931e-17)
(0.890859 -0.142889 4.71645e-19)
(-1.2878 -2.13536 6.71496e-17)
(0.0078822 -0.468991 5.25458e-16)
(0.0288721 1.21172 0)
(0.570313 4.7202 0)
(0.0684923 -0.0956542 0)
(0.59531 7.00023 9.48261e-17)
(-0.114929 7.07675 -2.39931e-17)
(1.99107 0.244232 0)
(1.5991 3.89069 -1.56928e-16)
(-0.340581 0.0376567 -1.91458e-17)
(3.36746 1.63563 2.63474e-17)
(10.9414 0.384245 2.7272e-17)
(10.8262 0.38015 -2.89601e-18)
(0.0955328 1.1622 -8.92146e-17)
(-0.0414967 2.16007 9.91315e-17)
(6.26202 0.290626 0)
(-0.899269 -3.57121 0)
(-0.10619 -0.0303773 0)
(0.170099 -0.169604 2.14449e-16)
(10.3337 -0.279842 3.60381e-17)
(-2.19792 -0.285328 0)
(1.10777 2.91571 1.16427e-16)
(2.35907 0.430585 -3.67573e-16)
(-1.9584 -1.0312 0)
(-0.20501 -0.41127 0)
(-2.85055 7.20024 -7.0332e-17)
(-0.381203 0.291703 2.94388e-16)
(0.00048282 -0.361684 -2.65929e-16)
(1.66477 -0.604972 -1.68116e-19)
(8.60808 0.28805 1.49218e-16)
(2.67978 0.439851 2.501e-16)
(3.3398 4.59947 -1.87658e-17)
(7.93795 0.288299 -7.59151e-17)
(0.0743464 1.35803 8.83002e-20)
(-0.0620783 2.1376 8.39884e-17)
(-0.418057 2.35681 -8.08462e-17)
(2.36773 0.114505 -6.11418e-17)
(1.40103 -0.330174 0)
(0.972698 0.220208 6.78776e-16)
(2.05972 0.0848958 3.15584e-18)
(1.98298 0.0279288 2.1733e-16)
(2.09401 0.0859407 -1.72283e-17)
(2.69742 -0.0695921 0)
(0.479786 -0.249724 -1.71718e-16)
(5.1867 7.00926 -3.53469e-17)
(2.78223 -0.0648191 0)
(1.50873 1.46958 2.501e-16)
(-0.287005 -1.67053 4.36679e-16)
(0.0453564 -0.96155 1.91403e-19)
(0.46657 -0.287972 2.91287e-16)
(10.9185 0.163771 -4.14051e-17)
(-0.779418 3.23268 -3.77573e-16)
(0.647812 -0.0294588 -2.28115e-16)
(1.58099 2.67427 7.43367e-18)
(0.813033 1.59507 3.48728e-17)
(-1.36398 0.829614 -1.1568e-16)
(9.86712 0.131267 -2.25252e-17)
(13.1317 0.836312 0)
(0.0380027 -0.113505 4.34404e-17)
(1.29264 0.0724234 0)
(-0.91743 0.0572656 0)
(1.9751 0.409195 -1.13055e-16)
(-2.54819 7.80539 -3.14051e-17)
(-2.13875 -1.27679 8.40935e-17)
(7.52154 0.579663 1.56628e-16)
(5.57282 0.197942 0)
(1.16014 1.31206 1.68438e-16)
(-0.175842 -0.57875 -2.46332e-16)
(0.0270202 1.51786 0)
(0.00641964 6.85771 -7.01139e-17)
(1.6101 0.363796 3.1254e-17)
(1.84399 -0.415145 3.3953e-16)
(-0.199655 0.416864 6.4651e-16)
(-0.571019 -0.0126759 1.57116e-16)
(6.24289 0.213183 1.85076e-17)
(-1.40316 9.25439 5.74748e-19)
(8.43778 2.23529 -4.36558e-17)
(-0.470359 2.75752 -2.05478e-16)
(0.16314 -0.179547 -2.6185e-16)
(2.6072 0.0818392 -2.73704e-17)
(-3.9146 -0.012266 -1.91767e-16)
(3.45829 0.365874 -1.68274e-16)
(-0.0294265 3.1072 4.24632e-17)
(3.51159 -0.116416 -3.36926e-17)
(-0.0493805 0.890627 -1.37267e-16)
(2.02584 0.0413502 0)
(3.54325 0.0093212 -1.90305e-17)
(2.14779 3.01401 0)
(0.0527557 0.0185819 -2.64608e-16)
(10.2587 0.157404 1.23162e-17)
(0.0196105 2.12872 0)
(4.60202 0.138341 3.39646e-16)
(1.93853 0.196854 -1.39605e-16)
(0.566176 -0.259384 -1.688e-16)
(9.82941 1.80116 0)
(-0.816405 0.318744 -2.50805e-16)
(0.234901 2.31161 -1.75084e-16)
(2.15746 -0.195202 -1.27862e-17)
(3.30612 2.40024 0)
(3.78394 -0.0096822 0)
(0.369357 0.9035 -1.52208e-19)
(5.37549 0.901449 5.20349e-17)
(1.34322 4.20908 3.28966e-17)
(-0.0122153 1.31028 -6.21594e-17)
(-0.242108 1.20577 0)
(-3.21527 8.04451 -7.98438e-17)
(0.131014 1.19324 -2.49316e-18)
(-0.0332498 2.79969 -1.10824e-16)
(0.736783 -0.0510339 1.91817e-18)
(-0.733373 0.168259 -8.06281e-17)
(1.01412 0.199749 1.24999e-18)
(2.21774 0.340322 1.62785e-16)
(0.261732 -3.90668 3.76323e-17)
(2.17707 0.0956493 1.39295e-16)
(-0.92486 -0.162669 -7.0287e-17)
(0.350208 0.0260162 0)
(-0.877847 0.0250525 -1.74643e-17)
(-0.543533 -0.00960016 3.70825e-17)
(-0.11413 8.96956 1.40191e-16)
(9.42781 0.056842 -5.43562e-17)
(0.917431 0.922793 2.7815e-16)
(0.588471 0.108414 3.976e-16)
(0.561865 -0.16413 1.68416e-16)
(-0.31832 2.20864 0)
(2.31348 -0.359176 -4.96093e-16)
(-1.05539 0.380807 5.09249e-16)
(-0.725111 -0.219698 -7.57863e-17)
(2.27661 -1.13173 -1.2889e-16)
(-0.500906 0.425868 -9.37876e-18)
(5.51124 0.210061 0)
(-0.191302 -0.0700618 3.50452e-17)
(2.16115 0.382386 -1.35049e-16)
(-1.94528 3.43456 5.56384e-17)
(1.85863 2.50928 1.94066e-16)
(-0.927537 0.0271857 2.00281e-17)
(0.897344 -0.124014 6.68615e-20)
(-2.96083 7.00832 7.82481e-17)
(7.69516 2.25933 6.7084e-17)
(0.891784 0.0804925 1.79472e-16)
(0.0406473 -0.0375285 0)
(0.0678548 0.445401 -3.54906e-16)
(-0.868876 0.272703 3.59224e-16)
(-0.991341 -0.0108468 3.03312e-16)
(-3.7588 -1.19382 0)
(-4.75933 -0.104633 5.50803e-17)
(3.76732 -0.0387557 -6.57933e-17)
(0.282426 1.30783 5.51995e-17)
(-1.28575 -2.54081 -2.77045e-16)
(-0.00339958 -0.169 -4.91553e-18)
(-3.16859 6.64551 -5.09702e-19)
(9.59425 1.90856 0)
(8.69801 0.0879196 3.83411e-18)
(-0.965636 -0.0177522 -5.83233e-16)
(-0.105663 2.59595 -6.90921e-17)
(8.64245 0.0104669 0)
(-1.82779 6.78175 0)
(-2.50796 6.6274 -1.25832e-16)
(-1.01127 -0.0116659 0)
(1.89944 -0.404284 4.56768e-19)
(-0.23203 0.548785 -1.68144e-16)
(8.74382 0.142413 0)
(1.54352 -0.0307599 -2.35558e-16)
(-1.35647 0.0634233 -1.87729e-19)
(8.45709 0.114931 -3.96583e-18)
(-0.0587609 7.59154 -5.94377e-17)
(-0.0262467 3.77973 4.42171e-17)
(-0.902797 -0.0394187 -2.31228e-17)
(-0.947488 -0.0155973 3.456e-16)
(-0.870232 -0.0190011 0)
(-0.934036 -0.031402 -2.32693e-17)
(7.50328 0.249379 0)
(2.66651 0.0707625 -6.51772e-18)
(7.81523 0.200318 1.05907e-17)
(8.01044 0.147255 5.03387e-18)
(8.71722 -0.0969253 2.46139e-17)
(2.67658 0.0351983 6.57912e-18)
(8.44836 -0.138315 -2.84863e-17)
(8.18012 -0.136165 0)
(8.18578 0.122898 -2.23957e-17)
(-0.926673 0.0563202 0)
(-0.993431 0.0423064 0)
(8.81677 -0.14666 1.07353e-16)
(-1.02516 0.0109238 0)
(-1.02453 -0.000762252 -1.8757e-17)
(2.85327 0.0475362 5.24164e-18)
(2.06084 0.0184219 0)
(2.16832 -0.0175214 6.47354e-17)
(2.94032 -0.00357276 5.34707e-18)
(2.75641 -0.0955437 5.01354e-17)
(2.72023 -0.093689 -5.79218e-17)
(2.97912 -0.0657719 -2.36639e-20)
(2.61546 -0.109056 -6.27365e-17)
(2.42328 -0.0432822 -4.24619e-16)
(0.154934 0.390509 -3.208e-16)
(1.54273 0.287883 0)
(0.882979 0.546995 3.81714e-17)
(-0.891986 5.90639 1.69238e-16)
(-0.116489 -0.872393 9.99468e-17)
(7.3415 2.9432 4.27309e-17)
(-0.398969 0.152626 -1.50518e-16)
(-3.46005 7.64661 2.3094e-17)
(8.07308 2.17374 1.83458e-18)
(1.3838 0.599404 -6.86788e-17)
(-1.52123 -0.768723 8.1565e-17)
(-0.0452855 -0.0605087 -1.01115e-16)
(-0.216018 0.723643 -2.00521e-16)
(-2.17478 0.175932 1.04031e-17)
(10.9676 0.401125 -1.26531e-17)
(1.79078 0.204178 -2.95703e-16)
(0.594438 -0.105289 3.80227e-18)
(1.54735 1.56076 0)
(-0.00803401 -0.0668285 -1.88022e-17)
(-0.56029 0.52733 1.45381e-17)
(0.228546 -0.421162 7.4799e-17)
(0.435583 -0.0482557 1.88886e-16)
(-0.0112886 5.26531 -1.02433e-16)
(-0.114397 2.92734 -7.40656e-17)
(0.118287 6.19662 0)
(-1.09531 3.81556 -1.86487e-16)
(0.00542329 1.33928 3.28691e-17)
(-0.15446 1.69453 0)
(-1.0028 -1.35964 0)
(3.21158 -0.143289 -1.61748e-16)
(0.189528 -0.195916 2.08087e-16)
(-0.901846 -4.11479 0)
(-0.190083 5.46949 2.10978e-17)
(0.0013494 5.93924 -4.72675e-17)
(0.106 3.66289 0)
(3.54583 0.102765 8.86562e-17)
(-0.253294 -0.153964 -8.56877e-17)
(0.0201781 1.42428 -6.33254e-17)
(-1.52693 4.10021 1.34129e-16)
(1.77889 2.3093 -2.14483e-16)
(0.612155 0.100169 0)
(-1.84603 -0.486164 5.8531e-17)
(2.18881 -0.564618 1.13214e-16)
(-0.359418 0.137786 -1.24942e-16)
(0.351937 -0.845329 1.94188e-16)
(0.0952983 0.852563 -2.1486e-16)
(0.821519 5.20529 -1.43613e-16)
(-1.03021 0.401475 0)
(-0.673208 -1.49282 0)
(0.461078 -0.431562 -7.39216e-17)
(0.0929514 7.30589 1.19095e-16)
(-0.242703 6.96729 -1.32693e-16)
(0.592367 -0.310006 2.12636e-16)
(3.76551 0.306719 0)
(0.156004 0.262074 1.15505e-16)
(2.62981 -0.0782371 0)
(4.98379 1.43219 0)
(-1.87258 0.527959 0)
(-0.0865892 7.42609 -4.86739e-17)
(0.509841 -0.19014 1.53879e-16)
(4.11039 0.786226 0)
(-1.79218 -0.646102 1.84479e-16)
(-0.821703 -0.82165 0)
(10.9959 0.381959 -2.17681e-17)
(0.0314214 -0.185383 -4.20509e-17)
(-0.702092 0.29787 2.95912e-16)
(4.68402 0.490987 0)
(0.992838 2.31579 -2.46702e-16)
(-1.42293 4.92731 -2.93006e-16)
(-0.740278 0.0489811 0)
(0.103021 2.93954 0)
(0.373585 4.68296 7.54163e-17)
(-0.206713 7.32924 0)
(4.74829 -0.0571204 1.44718e-16)
(0.469497 1.62767 -4.19785e-16)
(-0.746483 0.171978 -3.12907e-16)
(0.267362 -0.0898508 0)
(-0.515771 -0.314746 1.58066e-17)
(0.163686 2.43931 0)
(1.24534 2.6375 0)
(-0.147415 2.81759 -6.12373e-17)
(0.378712 -0.0189351 4.98052e-16)
(0.0366393 1.33483 2.41204e-16)
(-0.726041 -1.70801 0)
(1.12261 0.448469 1.30435e-16)
(1.34658 -0.261697 0)
(0.141378 0.355468 -1.86212e-17)
(1.35522 6.77263 -1.08667e-18)
(-0.249917 0.0392204 1.28272e-16)
(0.858174 0.153101 -9.47898e-18)
(0.581808 -0.356865 -1.4309e-16)
(0.197744 -0.958672 -2.19653e-16)
(0.748437 0.0978929 1.58218e-16)
(3.31762 4.40745 1.36654e-17)
(8.54681 0.66666 -1.08617e-16)
(1.8347 0.606751 1.6303e-16)
(5.46634 3.07655 2.16308e-18)
(4.35251 -0.20881 -1.61166e-16)
(4.87411 -0.110203 3.86215e-17)
(0.511072 0.162355 7.84034e-17)
(-0.196808 7.02714 -1.29712e-17)
(0.254712 7.1376 0)
(-1.69959 1.10655 -9.47302e-17)
(-1.0757 0.288008 -1.93058e-17)
(2.49621 4.9625 -1.94779e-16)
(0.85662 0.090182 -2.70019e-19)
(0.368673 0.294754 -3.85032e-16)
(-0.156577 -0.127182 0)
(0.220022 0.985259 -2.52596e-16)
(-0.0545515 -0.227026 0)
(2.13178 -0.341616 0)
(-0.953278 0.00267997 3.85487e-17)
(1.15423 6.16346 -1.39561e-17)
(4.23287 0.703155 -7.37921e-18)
(-1.40605 0.0167238 -2.73712e-16)
(-0.430568 0.0844067 -2.96341e-17)
(1.63701 1.34993 -7.20359e-17)
(-1.28296 1.1232 -2.43938e-18)
(1.62861 4.11421 9.86721e-17)
(1.38193 2.9538 9.44492e-17)
(-2.0438 -1.17983 1.98529e-16)
(-2.15868 -1.04316 -1.67327e-16)
(2.7204 0.0746778 2.06916e-17)
(12.0391 0.912464 1.43735e-18)
(0.604052 0.902657 2.97127e-16)
(-2.3532 0.603134 -3.57311e-16)
(-0.164729 2.30416 0)
(3.51263 0.00948298 6.76719e-20)
(-0.075164 -0.797942 -2.54494e-16)
(1.00103 -0.226271 0)
(0.0467898 3.34672 -1.54926e-18)
(-0.0358123 5.86742 1.87249e-17)
(-0.18826 5.86101 0)
(-1.24175 -0.123087 -4.7461e-17)
(0.331572 1.48958 -7.89946e-17)
(8.82381 1.05068 3.79686e-17)
(0.886183 -1.53315 -8.03889e-17)
(9.783 0.153943 -2.23715e-17)
(-0.033793 -0.036191 -6.61371e-17)
(-0.0513939 1.36791 7.80686e-17)
(-0.664604 5.05214 -7.17137e-17)
(0.0165346 -0.481963 4.54012e-16)
(2.01998 0.454975 0)
(1.60769 -0.263086 3.61748e-16)
(9.70786 0.0976961 1.87958e-17)
(0.0281007 1.01496 -5.8419e-18)
(1.67846 1.88052 1.00648e-17)
(1.22998 0.57341 8.68221e-17)
(1.2656 -0.0301248 1.61212e-16)
(-0.182878 -1.47933 0)
(-0.509732 -0.216253 1.19274e-18)
(1.45278 -0.710322 1.17838e-16)
(-0.844165 0.275813 -2.28627e-18)
(3.28069 0.125755 3.81288e-17)
(5.66991 0.246354 -1.97262e-16)
(3.50661 0.358852 -6.11867e-18)
(0.699081 1.07892 -2.06679e-17)
(2.65986 0.298975 1.35869e-16)
(-0.881349 0.353954 1.95817e-18)
(2.78436 -0.174012 -2.28078e-16)
(1.5585 -0.101638 6.08145e-16)
(-1.64955 0.120397 1.13589e-16)
(-3.80089 0.254186 8.3414e-17)
(3.46133 -0.190844 1.20715e-16)
(4.51149 0.765555 -1.45013e-17)
(-1.26295 2.78337 -3.25998e-17)
(2.10267 1.11507 0)
(1.07135 3.58725 -3.75471e-17)
(9.6434 0.349858 -6.80366e-18)
(0.716837 0.322439 -1.24533e-16)
(0.361166 -0.2049 -1.28881e-17)
(1.31065 0.0130562 1.8199e-16)
(9.55838 0.11047 -3.86476e-17)
(-3.02788 8.27246 1.98095e-16)
(5.72907 -0.480717 -4.03068e-16)
(3.48238 0.622818 -4.03552e-17)
(-1.08298 9.14987 -2.96873e-17)
(2.81909 -0.300406 -3.05605e-16)
(-3.6144 0.966606 1.81799e-16)
(0.0158866 6.45142 -7.10457e-17)
(0.0204995 1.31049 7.70593e-17)
(-0.0772577 1.93411 8.52052e-18)
(0.0261339 -1.25595 -3.80864e-16)
(2.95903 0.688632 0)
(-0.604304 -0.516502 0)
(-2.43162 -0.319935 -2.59637e-17)
(4.99686 2.51831 -1.44323e-16)
(-0.0152111 0.177707 1.23551e-16)
(2.28135 0.120931 -1.18819e-16)
(-0.580419 -0.370533 0)
(-0.730107 -0.331232 1.65692e-17)
(8.12004 0.306882 0)
(0.979577 8.5771 3.56902e-17)
(-2.1319 -1.36539 0)
(0.0710066 0.957483 2.8593e-16)
(-0.101982 1.38414 0)
(1.3026 0.0876909 3.51582e-17)
(1.06514 5.74606 2.66483e-16)
(1.81371 0.0023104 2.55799e-16)
(2.56942 9.43582 1.75498e-16)
(5.46119 11.5101 9.36202e-19)
(-0.283948 -0.276625 1.96024e-17)
(1.85168 -0.561643 -1.82189e-18)
(-0.9607 0.170921 0)
(0.000606615 1.3054 6.73966e-17)
(-0.255594 0.524319 0)
(9.91325 0.107133 1.75037e-17)
(0.0082714 6.09905 -5.51889e-17)
(-0.943866 -0.546428 1.42857e-16)
(-4.26923 -0.696925 -2.64199e-16)
(4.34104 0.833678 1.9386e-16)
(0.666973 -0.526515 -5.16982e-16)
(0.578943 2.37511 2.95832e-17)
(-1.56397 -1.97349 5.43867e-17)
(0.144636 2.60795 2.61163e-18)
(0.032479 1.08778 -1.75002e-17)
(10.6288 -0.0194541 -1.04505e-16)
(11.4119 0.619185 -2.06006e-18)
(10.2405 0.127615 2.10235e-17)
(14.0963 1.68931 0)
(7.68286 1.44886 0)
(0.504935 -0.377715 -5.51356e-17)
(2.67539 0.00338917 -5.03593e-17)
(2.61487 -0.0289203 5.40133e-17)
(3.58689 0.234966 1.7167e-17)
(-0.452762 0.151065 4.7019e-16)
(0.0745607 -0.104898 0)
(-0.532333 8.58135 -1.69001e-17)
(0.702294 0.130468 -7.09675e-17)
(1.0959 0.465588 7.13206e-17)
(-2.53778 -2.36442 -5.6728e-17)
(1.48541 0.0777099 2.03291e-16)
(3.64 1.70869 -1.99637e-16)
(8.26387 1.25214 6.2458e-18)
(-0.801446 0.756769 -1.13919e-16)
(0.145507 2.11472 1.61587e-16)
(0.0547076 1.13311 0)
(-2.70773 -1.02446 2.56066e-16)
(-0.445952 0.0536693 -2.87091e-16)
(10.006 0.161079 4.42309e-19)
(4.54196 2.78614 -8.40452e-17)
(1.34591 -0.0109029 0)
(0.0416988 -0.0859476 0)
(0.537668 -0.478596 -3.73212e-16)
(9.9307 0.0313212 0)
(0.0616958 2.99897 0)
(1.32788 2.17091 1.55715e-16)
(-2.03303 0.187456 1.01987e-18)
(1.05935 0.892403 -2.57066e-16)
(4.87583 0.252901 -1.51704e-16)
(3.92351 0.335761 8.38146e-19)
(2.36088 -0.106223 4.00949e-19)
(0.0105506 -0.670206 1.14261e-16)
(3.97739 0.833188 -1.12068e-18)
(0.0456112 2.80017 -1.07729e-16)
(7.29694 0.315523 1.80724e-17)
(2.15769 0.0184316 -1.12623e-16)
(-0.411933 -0.129752 -2.78401e-16)
(3.33775 0.206985 2.66988e-16)
(-0.133624 -0.362434 0)
(8.6676 3.36447 6.54128e-17)
(0.562473 -0.14827 -1.23986e-17)
(0.553437 1.27826 -3.61235e-17)
(5.2582 2.73072 1.04009e-16)
(-0.0909554 7.61493 1.29749e-16)
(6.73632 -0.0835097 1.14598e-16)
(3.53593 -0.00824853 3.75782e-17)
(-0.013317 1.34426 1.53662e-17)
(-0.195873 1.48373 0)
(-0.14406 0.41502 4.46626e-17)
(0.157663 2.85733 -7.87703e-18)
(0.299392 3.62377 0)
(-0.518198 -1.38757 2.10395e-16)
(0.483018 0.61585 0)
(0.754604 0.638438 0)
(0.300739 -2.99468 5.33951e-17)
(-3.34544 -2.19666 0)
(1.74985 1.44339 0)
(1.67455 -1.94844 0)
(10.572 0.169752 0)
(8.53887 0.107483 3.10415e-16)
(0.191171 4.39929 -7.27163e-17)
(3.58212 4.30411 -2.85192e-17)
(4.01823 2.76965 3.40713e-17)
(-2.44664 6.18943 4.21142e-17)
(-0.173444 5.64169 0)
(-0.00499528 5.84911 -1.78732e-17)
(0.0849574 3.47756 0)
(-0.13374 3.08509 0)
(-0.622471 4.56051 8.95132e-17)
(0.00553724 0.654657 3.42305e-16)
(6.50441 2.5066 -1.14554e-16)
(-0.0429327 -0.129667 -3.33726e-23)
(-0.145112 -0.60127 0)
(0.237432 1.23264 8.76375e-16)
(0.540407 -0.0851032 -6.49785e-17)
(0.800265 0.746792 -3.61425e-16)
(0.233198 -0.199236 0)
(1.41732 -0.590807 -3.89809e-18)
(-3.36358 -1.13178 3.48101e-16)
(0.0851207 0.683871 -1.27842e-16)
(1.92602 4.83749 3.79227e-16)
(0.785771 -0.890814 0)
(-2.14602 -0.584091 0)
(0.35645 1.88375 0)
(0.558242 -0.264535 3.0526e-16)
(0.875002 6.24885 1.55447e-16)
(-1.97301 5.41642 -9.76367e-17)
(7.56603 -0.209805 1.07779e-16)
(0.47769 6.48831 3.94584e-17)
(-0.0418814 0.110756 7.40238e-17)
(1.94963 -0.398218 1.66389e-17)
(9.93097 0.391942 2.01274e-16)
(0.408859 4.99818 -4.66016e-19)
(1.64407 1.1307 -4.77517e-19)
(-0.820342 3.56746 3.96992e-17)
(1.54667 -0.216982 -6.8395e-16)
(0.825924 0.228235 6.50371e-16)
(-0.599326 -0.539097 3.075e-16)
(6.65689 5.7595 -2.47303e-17)
(5.17105 0.6775 -3.46268e-17)
(0.64899 -1.07361 -1.50036e-16)
(3.31106 -0.239781 1.78612e-16)
(0.277052 0.941692 0)
(-0.74352 0.388552 -4.29077e-16)
(2.99349 -1.09995 -2.85853e-17)
(1.02696 -0.123325 6.35282e-20)
(1.30354 -0.220202 7.22252e-20)
(0.604525 -0.115349 -8.93936e-17)
(-0.285547 -1.98512 1.92502e-16)
(-0.563712 0.215085 0)
(0.199257 1.13715 -2.27176e-16)
(10.0178 0.029768 -5.49061e-18)
(8.0128 0.0635316 0)
(10.6126 0.309396 0)
(13.0121 1.31359 1.07458e-18)
(5.142 0.871697 9.7731e-18)
(0.199396 -0.201739 0)
(7.0662 2.57717 5.65598e-17)
(3.83381 0.416252 -2.40882e-16)
(0.175115 0.645292 -8.63627e-18)
(-0.648754 -1.7553 0)
(-0.229713 7.55302 -3.52924e-17)
(-0.257259 5.95053 -6.28091e-17)
(6.63994 -0.497635 1.99336e-16)
(1.47623 1.78367 -2.30527e-17)
(-0.174876 -2.11937 4.28753e-17)
(-0.254058 5.11147 8.04304e-17)
(-0.121137 1.51173 4.29984e-19)
(0.514944 0.0668381 -2.45106e-16)
(-0.198623 8.0702 -1.57685e-16)
(-2.20784 -0.18032 0)
(-0.474897 0.504805 0)
(0.212228 -0.50759 -3.72728e-17)
(0.11783 -0.2238 -4.12311e-16)
(-0.892737 -0.120935 -1.30327e-18)
(0.603895 1.71506 3.70454e-16)
(0.804028 0.133986 1.31849e-16)
(2.19922 0.627731 3.00299e-17)
(2.25863 0.234734 0)
(-0.238611 1.46865 0)
(3.67884 -0.067533 -3.21022e-16)
(3.34855 -0.0847376 -2.16624e-17)
(-1.75885 0.113337 -2.8665e-17)
(0.159101 2.82014 0)
(3.51528 -0.729983 4.01519e-17)
(-0.379498 1.12028 -8.15043e-18)
(-0.499869 1.41294 7.16244e-17)
(0.283032 -0.445542 -1.16204e-16)
(1.78863 0.399531 2.89913e-19)
(-1.64632 0.210313 2.52734e-16)
(2.79069 -0.275437 -1.02827e-16)
(4.25099 0.0461811 -4.29011e-17)
(2.34807 0.0469798 0)
(-2.73317 -1.11418 0)
(-0.0396916 0.0201102 0)
(-0.535316 -2.08095 -1.20433e-16)
(1.92281 -0.272233 7.90931e-18)
(0.109433 2.23424 -2.13165e-16)
(1.23404 1.44531 1.01747e-16)
(-0.0429794 2.2305 1.21926e-16)
(5.76239 0.126664 4.56903e-17)
(0.418968 9.84349 -9.50036e-18)
(8.46625 0.239102 -2.25478e-17)
(-0.136324 0.0636259 -1.4615e-19)
(8.76137 0.0130103 3.01274e-17)
(0.0852997 1.32058 0)
(-0.154233 0.0119078 5.19049e-17)
(-0.949785 5.65576 -1.30799e-16)
(-0.837591 -0.630341 0)
(8.08619 4.22056 -7.86659e-17)
(0.129078 1.97159 0)
(7.9835 1.11289 0)
(-0.452922 -0.0241401 3.77614e-16)
(4.66241 2.02731 1.42979e-16)
(0.632466 -2.14024 2.16054e-17)
(1.29436 5.17984 -6.72361e-17)
(-0.555999 0.0723646 -2.07181e-16)
(-0.684248 0.454034 6.22958e-17)
(-0.165713 0.0407448 -1.39703e-16)
(-1.23336 0.835684 3.21275e-16)
(-0.229005 1.58507 -1.09732e-16)
(6.40991 2.02618 -8.31103e-17)
(6.35312 2.82706 -2.33109e-19)
(8.15608 0.537894 -1.89169e-16)
(0.08361 2.69358 -4.92743e-17)
(11.1819 -0.0186348 2.00227e-16)
(0.514568 -0.190097 5.06085e-16)
(9.93913 0.134809 9.8982e-17)
(-2.30747 5.99122 5.73001e-17)
(0.273818 0.671304 0)
(0.933989 -0.0554215 0)
(1.88939 3.0008 0)
(-0.135416 4.92104 -8.48418e-17)
(1.64489 5.25551 1.35627e-16)
(7.63773 0.11574 -1.76983e-16)
(10.6605 -0.0304474 9.07163e-17)
(2.14872 0.756494 1.6409e-16)
(0.198946 -0.179095 0)
(1.02678 8.29221 0)
(0.231004 0.188514 -1.13582e-16)
(0.0309392 3.13886 4.42735e-16)
(2.36956 1.3724 -1.23999e-16)
(-1.27149 -0.989315 -3.44046e-16)
(0.00475484 1.8362 -6.03896e-17)
(-1.81847 -1.13333 -1.05134e-16)
(-0.0311625 1.64795 -3.88219e-17)
(-0.498821 0.77493 -1.60037e-16)
(-0.935331 -0.00201024 6.00898e-17)
(3.30353 0.811212 -8.56667e-17)
(-0.421832 -4.57742 -3.80001e-17)
(0.0154093 1.32924 -3.57477e-17)
(-0.105624 1.83522 0)
(1.58688 -0.332534 0)
(-1.22855 -1.9497 3.87061e-16)
(0.281423 -0.0641199 1.90077e-16)
(0.299856 0.952696 -3.69072e-16)
(0.440901 0.319726 -1.41904e-16)
(-1.84776 6.27114 6.91651e-17)
(-0.0572291 1.91096 -5.93936e-17)
(0.110923 -0.105109 -2.37046e-16)
(1.2881 0.800812 -1.15834e-16)
(0.359058 -0.536226 8.31401e-17)
(-0.957219 0.426402 2.43381e-17)
(-0.224242 1.4271 1.38893e-16)
(11.1525 0.373275 1.85251e-17)
(9.1812 0.724226 -4.49956e-18)
(-3.28138 7.66163 -9.99941e-17)
(-0.161545 -0.139784 -3.14137e-21)
(0.540052 0.946341 -1.99777e-17)
(-1.27722 0.104582 0)
(0.0870422 1.84725 -1.70138e-16)
(7.24635 -0.0980388 -1.1316e-16)
(-1.70054 0.329769 1.56677e-17)
(-1.70928 -0.374747 2.6428e-16)
(-1.56362 0.968115 1.2183e-16)
(1.58851 -0.10859 0)
(3.25058 -0.277159 1.6197e-16)
(1.2292 0.172014 0)
(0.452787 -0.0961319 1.87657e-19)
(6.61189 1.0346 0)
(6.1043 0.612876 1.57944e-17)
(0.6563 -0.504595 0)
(1.56281 9.14039 -7.57797e-17)
(-0.165681 2.65732 0)
(2.18229 0.00263297 -6.5384e-17)
(2.39564 1.63333 -7.16605e-17)
(0.790263 -0.842703 2.4039e-17)
(-2.13369 -0.677499 4.68711e-17)
(-2.79895 -2.21746 -3.26153e-16)
(-0.495083 7.98869 0)
(-0.558468 0.256542 0)
(0.153741 1.4667 -1.29908e-16)
(0.0368465 0.396865 -6.48405e-17)
(0.0971679 -0.401576 9.11074e-17)
(-1.45157 4.5848 0)
(-0.469247 7.49681 -1.52212e-16)
(0.368321 4.81607 -2.49455e-16)
(0.875783 -0.153244 2.60776e-16)
(-0.613575 0.548925 -3.48241e-16)
(8.3417 -0.164949 0)
(0.155298 2.06352 1.8373e-16)
(-0.327844 0.838845 -3.29388e-16)
(0.0993234 1.43104 0)
(-1.45552 -1.56439 -1.5344e-16)
(-1.73982 -0.527716 -1.8488e-16)
(9.75989 0.214395 1.90697e-17)
(-1.23358 0.208909 -4.01566e-17)
(1.09479 8.9759 1.0578e-17)
(8.96519 1.23917 -1.67413e-17)
(-0.100652 1.82243 -2.13349e-16)
(2.13534 0.369985 0)
(-0.396836 -1.97108 -2.87697e-16)
(0.505762 -0.533605 0)
(1.25883 -0.0406479 -2.61353e-17)
(3.42313 0.367327 -3.13901e-17)
(5.56122 0.0782516 -1.18467e-17)
(1.60301 1.26275 -1.25819e-16)
(6.1863 0.247721 0)
(0.754543 0.369581 -1.69159e-16)
(-0.264801 -1.79379 -1.19122e-16)
(-1.08837 -0.203731 -1.4088e-16)
(-1.70778 0.149075 -7.92409e-19)
(1.2731 -0.0374323 0)
(0.15072 0.47209 0)
(-0.834751 0.145376 -1.87669e-17)
(3.33353 -1.47069 1.27221e-16)
(4.88042 0.115024 9.1469e-17)
(2.23446 0.704229 -7.69298e-20)
(1.62296 0.171798 2.08347e-16)
(0.343209 -0.319298 1.20924e-16)
(-0.0265058 0.558825 -1.70722e-17)
(0.35795 -0.267439 -4.37821e-16)
(4.23895 -0.21296 -4.73172e-16)
(2.17837 -0.0529025 -1.37817e-16)
(-2.28639 0.235524 -1.32516e-16)
(-1.77482 5.1014 -8.9025e-17)
(0.269559 -0.0676047 1.68773e-17)
(0.0866395 4.00379 1.05442e-16)
(0.471816 -0.271841 1.95363e-16)
(-0.698247 -0.313105 -2.15224e-16)
(1.87209 0.10498 0)
(0.973415 -0.569797 1.71105e-16)
(0.170442 -1.41446 6.39141e-17)
(1.42223 1.30686 -3.18161e-16)
(-1.12805 -0.510789 -5.25857e-16)
(11.0608 -0.0238563 -2.56976e-17)
(9.90178 0.263867 1.34017e-16)
(-0.0871513 -0.722864 -2.75963e-16)
(2.44789 0.862731 6.18046e-16)
(-0.0720366 5.31598 -6.28031e-18)
(0.321691 -0.26576 -1.07788e-16)
(-0.145072 3.68903 -6.7924e-17)
(-0.414038 5.75537 -2.91087e-16)
(8.87072 0.252449 -2.50624e-17)
(-0.756773 0.107063 5.80519e-17)
(-1.81735 5.94484 -7.67391e-17)
(0.0703486 -0.617774 -7.15734e-17)
(2.05483 0.0117292 -4.49558e-16)
(0.173743 0.75715 6.44321e-17)
(-0.209592 0.539153 0)
(-1.50108 -1.30586 -9.26063e-17)
(4.3412 -0.141087 7.13583e-17)
(-1.88211 4.90295 1.58109e-16)
(0.9101 0.523495 -1.61037e-16)
(2.10753 0.388098 -2.46708e-17)
(0.301969 0.65126 7.04365e-17)
(-0.649704 0.328084 2.1298e-16)
(1.25152 -0.193265 0)
(-0.232918 -0.20326 -3.54827e-17)
(-1.24307 -0.118808 1.02898e-16)
(0.422489 3.19283 3.59274e-18)
(0.024652 -0.354947 -3.80459e-20)
(-0.200497 1.32331 -1.3751e-16)
(0.746207 0.667027 8.34408e-17)
(3.03644 0.116112 0)
(0.68561 -0.287974 1.70528e-16)
(-1.37298 -0.402954 -5.93076e-17)
(0.105181 1.35805 -1.28451e-16)
(0.0836541 1.37857 -1.19055e-16)
(-0.187597 -0.260057 1.70832e-16)
(0.339782 -0.168245 1.65527e-16)
(1.02273 0.256668 -5.12324e-16)
(0.914628 1.1159 5.98148e-17)
(0.0117157 10.6013 1.80674e-16)
(0.516555 0.0219109 -1.0843e-16)
(2.56423 -0.0784783 -1.12963e-16)
(-0.157662 0.263013 1.42491e-16)
(-0.269647 -0.429684 -7.07167e-17)
(5.34258 0.549864 -5.34154e-18)
(0.902261 0.35615 3.5175e-20)
(-0.618383 0.0739998 3.84455e-16)
(9.60927 0.0671766 -5.40991e-17)
(0.562391 -2.3211 -1.23792e-17)
(1.42462 2.97583 0)
(-1.39262 -1.44433 -3.37842e-16)
(1.32093 0.590982 -3.02943e-16)
(0.370899 -0.755996 7.61382e-19)
(-1.72455 5.1737 5.13835e-19)
(9.73288 0.0382666 -1.49494e-16)
(10.5556 0.0360401 0)
(0.125683 3.48995 9.38775e-19)
(0.137709 7.88441 0)
(0.339273 2.09109 0)
(9.80264 0.588713 1.05716e-16)
(-2.08435 6.46603 0)
(3.58955 0.562301 2.94993e-17)
(8.76353 0.791812 0)
(1.89919 4.96592 2.00399e-18)
(-1.88909 8.56786 -9.60743e-17)
(-0.42632 -1.85092 2.07279e-16)
(0.281215 0.49175 2.80675e-17)
(10.8274 -0.105965 -2.21737e-17)
(9.90874 0.378603 6.36958e-18)
(-0.982925 9.67964 -1.98334e-18)
(-0.32667 0.195603 -9.88407e-17)
(5.35164 1.07819 2.3811e-16)
(-0.132854 5.00964 3.70296e-17)
(-0.314798 8.33821 1.50498e-17)
(0.514373 0.382088 0)
(7.35003 0.164673 -8.38345e-17)
(-0.485931 0.193524 -8.96064e-17)
(1.29331 -0.282381 -3.70335e-17)
(0.18169 -0.06424 -2.96861e-17)
(-0.0137574 1.92592 0)
(0.106123 0.446255 0)
(5.54938 -0.484879 1.18994e-16)
(2.8012 -0.145334 -6.95913e-17)
(-2.3945 0.354819 1.56502e-16)
(0.663889 0.0265261 2.53444e-17)
(7.1114 0.595108 1.01115e-16)
(0.708856 -0.301035 0)
(-0.735289 9.6722 0)
(-0.214451 2.6005 -6.78381e-17)
(1.38234 1.0552 -7.10847e-17)
(6.53551 0.476082 1.20606e-16)
(6.69764 0.291013 -2.3311e-17)
(0.371803 -0.047121 -2.61476e-16)
(2.15547 0.53186 1.20376e-16)
(3.5695 0.963363 2.80591e-17)
(2.72753 4.38679 7.00834e-19)
(0.093934 0.272123 -4.83946e-16)
(8.71051 3.11481 1.31497e-18)
(0.595412 -0.035797 2.89166e-16)
(3.21922 0.0586527 -1.60603e-16)
(1.69608 0.120579 0)
(0.236705 0.296067 2.63573e-16)
(-2.08309 -2.13001 -1.69737e-16)
(-0.0885056 0.679476 5.39979e-16)
(1.07483 1.93357 1.11137e-16)
(-3.78044 -2.56541 2.62344e-16)
(-1.05992 -0.242397 0)
(-0.263657 5.79859 0)
(0.110058 3.56114 9.59111e-17)
(2.12617 0.62608 3.05412e-16)
(3.51573 0.161085 -1.97521e-17)
(0.532951 0.053829 0)
(1.18006 -0.230567 1.25022e-16)
(3.37109 4.46876 0)
(1.50541 -0.368301 2.55543e-16)
(7.94157 3.23928 4.6637e-17)
(1.42765 0.609931 0)
(3.18313 4.14556 1.11673e-16)
(-1.67935 0.190722 -2.90181e-17)
(0.327927 3.61744 1.65922e-16)
(-0.103828 -0.524243 -5.70769e-17)
(-1.11453 0.697025 1.13076e-19)
(0.731106 2.10701 -1.88923e-18)
(-1.23271 3.81633 -7.96217e-17)
(4.88382 0.0192984 -9.19109e-17)
(0.0808626 0.344906 0)
(-1.35215 4.19058 -2.76565e-16)
(-0.279757 7.04547 -4.08742e-17)
(-0.257464 9.68198 -4.36643e-17)
(0.242684 5.47143 0)
(1.11892 9.59363 4.72327e-17)
(0.189439 -1.45808 -2.08004e-16)
(0.565921 1.10615 4.51516e-16)
(-0.249556 1.14542 -2.45911e-16)
(0.982371 1.08632 -8.3306e-17)
(-0.13419 -0.0673696 -6.41978e-17)
(-0.368307 7.93666 7.47325e-17)
(0.0560972 1.79447 0)
(2.36111 0.293878 -2.32552e-17)
(1.17136 0.219862 1.672e-16)
(-0.551467 -0.101666 -1.06919e-17)
(0.302526 -0.228404 1.44134e-16)
(-0.440534 -0.808772 4.24292e-20)
(8.45412 0.217549 -6.7229e-17)
(-0.842945 -0.00695749 2.4447e-16)
(1.81272 2.47566 1.21544e-17)
(9.98346 0.0888272 3.84515e-17)
(0.0950122 2.09945 1.36771e-16)
(-0.261277 2.39774 -2.49607e-16)
(0.169285 2.66742 -7.24216e-18)
(-1.27187 0.173458 3.67657e-17)
(0.298469 1.01317 -6.97231e-17)
(2.48596 -1.11853 0)
(-0.79966 0.155617 -1.14171e-16)
(-0.0204128 0.447643 9.42653e-17)
(2.48685 0.386197 0)
(-0.152868 -0.06095 1.20387e-16)
(0.557906 0.713879 -3.17127e-19)
(-1.98958 -1.87962 0)
(-0.0975459 0.461192 0)
(1.21105 -0.0789292 5.78125e-17)
(9.98703 0.121559 0)
(1.1493 -0.216219 3.35391e-16)
(1.06141 3.35644 2.22967e-17)
(0.179363 0.251737 4.74916e-16)
(0.839973 1.50061 1.2466e-19)
(-3.49672 -2.59891 5.83458e-17)
(-1.18291 -0.30947 1.3848e-16)
(4.48194 -0.148015 2.60182e-16)
(0.0304223 0.162045 1.40141e-16)
(-3.66162 -2.68729 1.04178e-16)
(-0.360732 0.626977 0)
(1.18579 -0.0292592 -2.58037e-16)
(-1.44806 4.46794 -1.37135e-16)
(11.0275 0.0882799 0)
(0.583092 0.526874 -9.37252e-18)
(-0.236146 1.96045 2.33637e-16)
(1.852 0.427442 -2.87266e-16)
(-0.895384 5.841 -1.46606e-16)
(0.420909 2.14504 0)
(-1.84061 -1.50229 4.34908e-17)
(-0.0125217 -0.292625 0)
(9.78935 0.432056 -1.81927e-16)
(10.8736 0.220871 5.73744e-17)
(1.42903 3.47313 6.86453e-17)
(0.840451 1.92194 1.00508e-16)
(-0.997298 0.238756 0)
(0.263645 1.46472 -8.54074e-17)
(1.00386 4.13918 -1.30219e-16)
(1.71679 0.842563 -6.34681e-19)
(1.64806 -0.110756 -1.5846e-16)
(0.378702 -0.453484 0)
(1.37348 1.21662 -1.14859e-16)
(-0.85645 0.0626513 1.71669e-16)
(-2.23713 -0.195724 -1.0306e-16)
(0.901505 -0.0507528 1.61904e-16)
(-0.822385 0.279859 -1.74353e-16)
(0.318932 0.0137397 0)
(-0.528959 0.460068 -8.45012e-17)
(0.0724903 1.88485 0)
(0.29254 -0.534472 -1.51502e-16)
(0.253955 -0.188569 -3.74098e-17)
(0.17393 5.52976 0)
(0.0375157 1.06765 -2.20344e-16)
(2.82376 1.32715 2.39223e-16)
(-3.51817 -1.2327 0)
(0.555809 -0.452842 -7.36727e-17)
(-0.186913 0.0164979 0)
(1.10456 1.98313 6.71234e-17)
(1.46765 0.044435 -1.51234e-16)
(-0.809878 0.635153 4.96836e-16)
(4.7665 0.74371 -1.92992e-19)
(0.227423 -0.013821 -2.96039e-17)
(-0.94729 0.184804 -5.92278e-16)
(3.21115 4.54345 0)
(0.198219 -0.566858 1.10261e-17)
(1.77422 1.70662 -1.22582e-16)
(2.1443 0.1189 -1.99963e-16)
(2.2992 4.00348 1.10386e-16)
(0.245209 5.00392 2.60349e-16)
(-1.92104 -0.19602 0)
(-0.115343 2.88134 0)
(-0.973316 0.517007 1.30743e-16)
(0.20543 1.98015 -4.761e-17)
(2.16622 4.25079 -7.07634e-17)
(-0.00745506 1.29647 1.29149e-19)
(-0.25726 0.879808 0)
(0.568544 -0.0424571 1.21626e-16)
(0.755382 1.47745 4.74568e-19)
(1.93122 0.866291 1.2545e-16)
(-2.80778 -1.46663 -2.50384e-16)
(-4.14448 -0.185592 0)
(3.77785 -0.127292 0)
(0.945746 -0.00466534 -2.64836e-16)
(-0.186305 1.16318 1.5135e-16)
(0.0181353 -0.144393 -5.20278e-20)
(-2.61573 -2.04532 6.52499e-17)
(-1.48822 -0.906471 1.36027e-16)
(0.0599005 -0.110256 1.96007e-16)
(-0.390486 0.920709 3.00111e-16)
(-0.681862 3.95126 0)
(0.293875 5.86763 3.47785e-17)
(-0.129532 6.77615 -5.68473e-20)
(9.5347 1.53395 -6.7645e-18)
(2.92436 4.19197 -2.49757e-16)
(0.154857 1.446 4.66079e-16)
(-0.164298 1.61821 1.24123e-16)
(-0.797205 2.52379 -2.44846e-16)
(7.13263 0.280494 2.29798e-17)
(1.93931 0.0435284 -1.89067e-16)
(-1.01926 3.87688 3.53087e-16)
(-2.01146 6.42936 0)
(1.53842 2.26812 -2.16788e-16)
(3.36716 0.0401891 -2.55292e-16)
(2.15413 0.786297 -1.28403e-16)
(10.0496 0.114264 -1.85707e-17)
(-0.774295 -0.0508357 -2.79529e-16)
(4.3746 1.75678 2.61306e-17)
(-0.656013 -0.564729 0)
(8.31925 1.17021 0)
(7.59202 0.0999508 -2.76789e-17)
(1.59174 4.47962 1.71412e-16)
(1.35727 0.00673698 -2.77818e-16)
(9.96341 0.295415 -5.44315e-17)
(-0.088461 2.91965 -7.07026e-17)
(0.495083 -0.298448 -5.59693e-16)
(0.340237 5.28916 7.47644e-17)
(-3.14557 -2.16852 1.22979e-16)
(-1.35156 -0.090161 0)
(0.320965 0.713047 -1.113e-17)
(2.03552 0.546943 1.48685e-16)
(-0.273784 -0.071713 3.19007e-16)
(-0.189836 -0.642569 4.4642e-16)
(0.431747 1.42969 -3.25328e-16)
(1.82612 0.370956 -3.27017e-19)
(-0.4243 2.42157 -5.57215e-18)
(1.93584 0.465839 0)
(-0.993657 0.394939 3.95417e-16)
(0.26794 2.16811 1.56202e-16)
(0.0481102 0.0853935 -1.22736e-16)
(0.564334 3.37755 -1.08367e-16)
(-0.120545 3.68849 1.09229e-16)
(-1.76719 -1.3547 1.79392e-16)
(0.31181 -0.353981 6.67104e-17)
(0.299301 0.632386 1.06651e-16)
(-1.06219 0.295331 -2.26033e-16)
(0.0247302 0.799006 -6.38005e-16)
(0.48072 0.0490836 7.92055e-17)
(0.349147 -0.20132 2.78598e-16)
(0.152007 6.57195 -1.03287e-16)
(-2.3317 -0.120614 1.29955e-16)
(9.88482 0.412256 -1.48444e-16)
(1.90509 8.89531 -1.497e-16)
(0.128757 0.50206 1.03434e-17)
(1.35243 0.0726424 -8.36456e-17)
(1.41113 0.0345725 1.47477e-16)
(-0.56335 -0.458447 -8.26549e-18)
(-1.04344 -0.274635 -3.25453e-16)
(0.237739 4.97219 6.8182e-18)
(-0.0366829 4.92683 -1.74902e-17)
(0.324771 5.2281 0)
(-0.281576 5.88411 -1.9071e-16)
(-0.0628192 2.86621 1.32953e-16)
(-0.361796 -0.240817 -4.21875e-16)
(0.323636 -0.0573707 -4.49861e-16)
(1.71405 -1.0139 1.15708e-16)
(2.43563 -0.05047 -5.90694e-17)
(9.68886 0.0254574 -1.13136e-16)
(-0.00594572 1.27541 1.96328e-16)
(0.970325 5.5323 4.80553e-17)
(-0.161334 6.83245 4.54996e-17)
(-0.110063 6.2029 -2.98397e-17)
(0.0791508 2.03801 1.52639e-16)
(-1.6055 2.23955 -2.50962e-16)
(-0.126532 1.17808 1.11944e-16)
(-0.139065 6.9335 -2.53845e-17)
(0.790927 6.84864 -4.9545e-17)
(5.00157 -0.157497 7.42788e-17)
(0.126375 2.58919 0)
(7.66692 0.000505186 2.23468e-16)
(0.41939 5.93863 9.30617e-17)
(0.375115 -0.0984213 4.32226e-16)
(0.222028 0.227587 8.14724e-20)
(-1.73678 -1.39166 0)
(0.0169202 1.3201 -1.90313e-17)
(-1.20699 -2.98247 0)
(-0.0541246 1.98855 0)
(-1.21363 -0.704382 0)
(1.23691 -0.0719713 -3.26372e-16)
(1.90452 -0.0135514 0)
(-0.339944 1.06829 -9.47766e-17)
(3.63782 -0.237138 9.40397e-17)
(1.45495 -0.316782 5.05825e-16)
(-0.526216 -0.0929229 -5.65823e-19)
(-1.71713 -0.327822 -1.59735e-16)
(-1.51601 -3.14958 1.47154e-18)
(9.76807 0.116905 -1.08017e-17)
(-0.48435 3.99031 1.95288e-16)
(1.26095 8.64275 5.98008e-17)
(8.98393 0.460538 0)
(-0.092504 6.06696 -7.65111e-17)
(0.193225 5.93775 0)
(-0.76532 2.97903 0)
(1.1558 -0.110053 1.36619e-16)
(-0.182363 2.84225 3.90338e-17)
(-0.822393 3.44501 1.02958e-16)
(0.496495 -0.0521239 2.76976e-18)
(-0.349985 -1.22938 -6.90481e-17)
(0.622122 -1.82491 7.1049e-17)
(-0.166478 -0.211026 5.41462e-17)
(3.10255 0.0144342 0)
(-1.10596 0.00565694 3.24334e-16)
(2.01249 -0.237128 1.83115e-16)
(-0.605568 1.13765 1.75945e-16)
(1.29341 0.146117 0)
(-0.207956 -0.355591 0)
(-0.733421 -0.135797 1.78166e-16)
(1.16065 1.13959 -3.38329e-16)
(1.37618 -0.273435 -4.39289e-17)
(0.759719 0.0741497 -3.79363e-17)
(0.0857465 1.16847 7.55344e-17)
(1.35066 0.978948 0)
(-1.60328 4.41934 -1.49786e-16)
(1.49473 -0.103425 -3.96196e-16)
(-0.729908 -0.381705 -1.72531e-16)
(-1.45231 -0.401474 3.09155e-16)
(3.41435 -0.194224 0)
(-3.09935 0.1357 -2.73361e-16)
(-2.57788 -1.29955 0)
(5.74563 0.172485 -9.66895e-18)
(-1.12239 -3.28231 0)
(0.0671997 0.229691 3.01233e-16)
(7.70293 2.58894 0)
(0.844763 -0.0302888 -2.85699e-16)
(0.0641255 2.74238 4.41701e-19)
(0.402842 4.12165 -1.5585e-18)
(0.431455 -0.458032 4.15478e-17)
(-1.19907 4.42684 0)
(9.0677 1.5599 3.02927e-18)
(-0.302288 0.882339 1.33207e-16)
(-1.05009 0.0575575 -4.00771e-16)
(0.14014 -0.308133 0)
(0.525645 0.147385 0)
(0.206282 -0.321524 1.84605e-17)
(-2.02098 0.227817 2.63409e-17)
(3.99189 -0.278251 -5.64347e-18)
(0.647705 -0.509533 -8.36092e-17)
(-1.23914 0.191617 1.91002e-17)
(0.0297423 0.452703 1.40811e-16)
(3.97484 -0.195512 0)
(-1.8325 -1.25196 -1.59843e-16)
(-3.06199 -0.0920459 4.14083e-17)
(4.01641 0.265363 0)
(10.5741 -0.141399 -2.37577e-17)
(3.62745 0.240714 1.86906e-17)
(0.0136802 1.6762 -1.07563e-16)
(0.221293 5.52499 -1.18187e-16)
(0.668112 -0.233073 -2.50303e-16)
(-1.27393 0.164716 0)
(1.07555 -0.1336 -3.98309e-16)
(3.37819 0.117339 0)
(0.671548 -0.0267892 0)
(10.4601 0.0886331 4.52439e-17)
(-0.324429 -0.375631 1.23611e-16)
(-0.450072 -0.195757 -1.03575e-16)
(-0.317848 -1.86678 -3.53714e-16)
(0.12573 2.90392 0)
(0.0437596 -0.276271 0)
(3.34974 0.00528774 -5.74813e-17)
(5.01997 0.110967 1.62203e-17)
(-0.317324 -0.386546 1.85701e-17)
(0.0719608 -1.00667 2.40198e-16)
(4.81773 0.955795 -1.14612e-17)
(1.94651 0.554768 -7.07833e-17)
(8.54547 0.443088 0)
(2.78973 -0.0748913 2.35078e-17)
(0.0827412 -0.414122 -4.19509e-17)
(-0.452281 -1.00719 7.87402e-17)
(-1.44809 0.104429 3.06256e-17)
(0.0172494 -0.251517 0)
(0.273092 -1.19884 -3.96463e-16)
(1.53745 0.891126 0)
(3.67787 0.254401 9.50458e-17)
(8.80035 0.0316633 -5.94313e-17)
(0.124161 -0.159695 -3.36197e-16)
(-0.650499 0.658946 4.10919e-16)
(0.681424 -0.880003 2.171e-17)
(2.11776 0.942682 8.83865e-17)
(-0.833473 0.440317 3.29008e-17)
(3.74711 4.41088 -1.7223e-16)
(-0.482474 -0.139902 0)
(6.94777 0.594557 0)
(-2.43735 2.43201 -2.59211e-16)
(0.651586 -0.0982549 -1.47951e-16)
(0.772904 -0.364725 1.60815e-16)
(-1.95501 0.133256 0)
(1.14085 0.140266 -1.00941e-16)
(-0.468838 -0.600255 3.04066e-17)
(1.73135 1.05069 1.0973e-16)
(-0.107839 4.06994 1.63285e-16)
(1.46533 3.16899 -9.65163e-17)
(1.1333 -0.538742 -2.20051e-17)
(1.46124 1.24745 -3.0873e-16)
(-0.261869 -2.05956 -7.87707e-17)
(-1.06089 0.032134 0)
(9.79229 0.570808 0)
(0.299213 4.75313 -7.63772e-17)
(1.02777 0.308259 -1.98244e-16)
(0.996063 -0.506702 -2.62769e-16)
(-0.486154 -0.0218015 1.91854e-16)
(-2.82998 7.58508 1.50589e-16)
(1.22995 -0.213526 -5.70948e-17)
(1.51376 0.797691 1.27203e-16)
(-0.765153 2.62841 3.99272e-17)
(2.16773 0.902698 -5.20017e-17)
(9.38614 0.306267 -6.31822e-18)
(11.392 0.679556 2.83811e-18)
(-1.50013 -0.192797 2.16761e-16)
(-0.378103 -0.403797 -2.65224e-19)
(0.927224 0.211446 1.24405e-16)
(10.2313 0.158746 -1.46489e-17)
(-0.383236 -1.35682 3.55051e-17)
(3.4236 0.0749541 -3.28523e-17)
(0.54905 6.12612 -6.06341e-17)
(1.09031 1.36034 0)
(0.540025 0.817494 1.17881e-16)
(3.93845 0.363933 5.40971e-19)
(-0.491345 -0.034188 -2.78452e-17)
(-0.175871 4.13261 0)
(0.389532 1.49803 2.39337e-16)
(-0.951497 0.0276507 1.91315e-16)
(-0.515313 -0.0363383 0)
(3.59641 -0.432663 3.11697e-17)
(7.34222 3.96926 -5.85704e-17)
(3.51076 -0.0285281 -1.84828e-17)
(4.1439 -0.0673348 -1.09659e-16)
(0.527412 -0.252076 4.18521e-20)
(0.334091 0.941902 2.19392e-16)
(4.39552 0.458772 0)
(-1.49903 9.37913 -9.05171e-17)
(1.73111 0.524368 2.09152e-16)
(0.117482 0.625991 -1.7821e-18)
(6.44577 -0.10168 2.17467e-17)
(0.659563 0.279065 0)
(0.194996 1.60688 -3.97862e-17)
(1.59209 0.563211 -6.30552e-17)
(3.66489 1.04777 -1.41289e-17)
(0.0334593 0.112053 -2.08078e-17)
(2.24645 0.637366 7.19095e-18)
(0.501205 -0.141995 6.75558e-17)
(3.526 -0.0440971 0)
(-2.16645 0.331636 1.20629e-17)
(2.07883 -0.040095 -5.09751e-17)
(2.74708 -0.0667005 0)
(0.0339897 -0.0347585 1.31405e-16)
(0.289263 0.184448 -1.57441e-16)
(-0.0564642 9.61868 -5.8862e-17)
(1.10197 0.268721 -9.65624e-17)
(2.08583 -0.0232242 5.87293e-17)
(-0.640401 -0.15695 -4.73699e-16)
(-0.23906 2.21088 0)
(1.42729 -1.85635 -1.20921e-17)
(-1.87539 -1.93515 -6.3797e-18)
(4.45908 1.66344 -7.58746e-17)
(10.2039 -0.0870405 -4.40068e-17)
(0.570716 -0.235676 -2.56147e-16)
(0.952008 0.134913 2.68812e-16)
(-1.27859 0.0816066 -5.07111e-19)
(1.20681 -0.19533 0)
(4.26275 0.429585 -9.32654e-17)
(2.5369 -0.131743 2.27579e-16)
(0.615339 -0.340217 -2.61917e-16)
(4.17896 0.676162 4.74353e-16)
(0.436751 -0.107662 0)
(-0.0782408 0.0856094 -1.94747e-16)
(0.577066 -0.272662 1.34604e-16)
(2.42507 0.436093 3.47041e-18)
(1.20467 0.405425 -1.02012e-16)
(0.483589 0.0531386 6.14442e-16)
(0.0950476 8.12093 3.43592e-17)
(0.540891 0.708376 1.01657e-16)
(-0.654219 0.361906 -2.63016e-17)
(3.06645 -1.58415 -2.43739e-17)
(4.4097 0.031213 1.25812e-16)
(0.00426856 1.67832 -1.63309e-16)
(0.628331 -0.0320585 4.87468e-17)
(-0.545655 10.1712 9.60084e-18)
(1.80329 1.12703 -2.5549e-18)
(-0.293938 -0.911421 -1.97617e-17)
(5.47448 1.9017 0)
(0.248683 6.07921 4.3677e-17)
(7.33671 0.184002 0)
(3.3256 0.349275 0)
(-1.54988 -0.896383 1.16715e-16)
(-1.85161 -1.88218 1.85253e-16)
(4.2284 0.600942 3.1155e-18)
(0.803552 -2.0807 7.65697e-19)
(2.99597 0.103664 0)
(-0.443167 -0.807408 -1.49958e-16)
(0.266578 0.699492 -4.22447e-16)
(4.52143 3.4577 8.73028e-17)
(0.667536 -0.760102 8.65453e-17)
(1.1458 0.661229 -1.59857e-16)
(-1.068 0.318331 2.68432e-17)
(3.41369 -0.022307 8.084e-17)
(-0.155816 -0.301485 -2.25149e-16)
(5.37391 0.00224465 -7.11682e-17)
(9.75657 0.0492672 1.06173e-16)
(-0.79871 0.0299818 -3.03842e-17)
(-0.0457238 1.26638 -3.2671e-16)
(-1.07055 2.87662 -4.72831e-17)
(5.00133 0.520294 7.47041e-18)
(-0.254314 0.0422379 2.84564e-16)
(-0.806067 0.190102 -6.57899e-17)
(0.578314 -0.00409479 -6.17211e-16)
(10.2462 0.0387464 -2.14347e-18)
(-0.300275 5.52713 9.31209e-17)
(0.0821841 3.45887 0)
(4.3533 0.496925 1.33498e-16)
(9.87911 0.225158 -2.31729e-16)
(4.1272 0.191882 1.21049e-16)
(0.8341 0.197093 0)
(3.06203 0.767642 -8.01237e-16)
(0.298575 -0.0401814 -1.37e-19)
(0.403849 8.43248 9.62282e-18)
(-0.36292 -0.203866 -3.10697e-16)
(0.661376 0.545262 0)
(0.199067 1.86225 9.55982e-17)
(-0.0997237 1.93596 1.32546e-16)
(1.02807 1.751 -2.48895e-17)
(2.6609 0.206121 -2.20322e-16)
(0.394575 -0.168331 9.13834e-17)
(0.788354 0.170037 -1.29525e-16)
(0.115854 0.74421 -2.78668e-17)
(0.0824176 1.75257 0)
(8.40901 0.241442 -4.3468e-17)
(4.49857 -0.0577159 -3.72418e-17)
(5.09901 0.541562 1.18225e-17)
(-0.579687 -1.12942 0)
(0.195405 2.66101 -5.29281e-17)
(4.82585 1.34693 0)
(0.249107 -0.224547 8.16488e-17)
(0.598481 -0.295019 -1.27094e-16)
(-0.0172062 2.99975 -1.04986e-16)
(0.274115 1.17379 -1.38293e-16)
(1.50564 -0.467154 -2.30454e-17)
(-0.0518205 2.79476 -3.67534e-16)
(-1.48676 0.595216 0)
(0.49416 -0.192609 -2.60081e-16)
(-0.726213 2.1209 4.9823e-17)
(3.46817 1.22555 3.34958e-18)
(6.14737 -0.276383 -1.15358e-16)
(6.53042 -0.179124 -5.72346e-20)
(-0.537793 -0.415779 -3.21049e-16)
(0.530201 0.311151 -1.56531e-16)
(-0.93306 -1.78913 1.22198e-16)
(0.360821 0.799294 0)
(-1.51261 -0.940518 6.30539e-17)
(-3.4243 -0.31757 -1.18872e-16)
(4.26623 0.039055 -6.94067e-17)
(2.79421 0.417038 -2.57276e-16)
(0.408341 0.696595 2.68671e-16)
(-0.764323 0.336334 1.63854e-16)
(3.39552 -1.5079 2.46273e-17)
(-0.335195 -0.0969311 0)
(-0.908025 -0.775439 0)
(0.167374 1.67898 -3.45835e-16)
(2.01765 0.0316578 7.04626e-17)
(0.030045 1.86044 0)
(-0.362375 2.78837 2.17347e-16)
(0.35045 1.76543 -5.29862e-16)
(0.491766 1.52438 -5.59957e-16)
(6.48155 1.82166 0)
(0.0848865 7.98886 0)
(-0.182689 6.53341 -1.65234e-17)
(-0.818423 0.12634 -1.66803e-16)
(-2.23713 0.89484 -1.37314e-16)
(-0.164985 2.2371 -3.74154e-17)
(0.136564 0.505692 -9.78536e-18)
(1.01367 0.207827 6.71619e-17)
(0.396128 0.451426 1.94515e-16)
(3.45376 -1.64036 -7.595e-17)
(-0.779321 0.083608 1.90398e-16)
(0.0383436 2.99 0)
(-0.310513 -0.672964 2.81291e-16)
(0.169294 2.55961 1.17739e-17)
(-0.278397 0.344502 3.80145e-17)
(1.5229 3.97164 -1.15477e-16)
(0.362587 -0.764239 1.58743e-16)
(-0.0417558 4.6209 -2.50284e-17)
(-0.227008 8.21056 0)
(0.108911 1.22168 4.06294e-17)
(-0.0879629 2.89436 -5.18987e-17)
(0.930994 -1.56868 -1.66718e-18)
(-0.38895 -1.11146 2.27714e-16)
(0.167275 2.75618 0)
(1.40697 5.01628 1.55205e-16)
(-0.0122254 4.79947 -1.90794e-17)
(-0.170481 7.97482 -5.289e-17)
(0.160962 7.82595 -1.38256e-17)
(-0.192323 6.77525 -1.49027e-17)
(7.73225 0.477023 8.79648e-18)
(0.120772 7.95675 -2.90828e-17)
(-0.185447 6.64307 1.64734e-17)
(5.03709 -0.00692207 -7.57178e-17)
(10.1261 0.0994016 -8.79761e-18)
(3.46137 0.0170489 2.61107e-17)
(-0.0859189 7.0675 -6.24413e-17)
(0.994512 6.76582 -2.08544e-17)
(0.609499 5.95629 -9.68242e-18)
(0.0868227 0.650695 -1.98073e-16)
(1.92127 -0.182098 3.69567e-16)
(3.28555 0.211119 5.77293e-17)
(-0.64289 -0.0155667 -1.76493e-16)
(9.59589 0.0936807 2.82201e-17)
(1.13836 -0.241549 4.2094e-17)
(-0.159588 2.28035 2.04208e-16)
(-0.340292 1.62918 1.93802e-16)
(2.57616 -0.107841 0)
(-0.724333 -0.235285 -1.21487e-16)
(-2.55966 -0.0331559 -1.038e-19)
(-0.571084 0.0625543 -5.77542e-16)
(0.0635337 1.36409 -1.30101e-16)
(-0.340862 -0.119749 1.18685e-16)
(2.54557 3.53354 0)
(4.57059 -0.559306 -1.78526e-16)
(3.87077 0.159049 3.59787e-16)
(-0.357535 6.36589 6.31446e-17)
(-0.136442 7.49325 0)
(0.137317 4.87322 0)
(2.58601 4.0388 0)
(-0.127331 5.59245 3.01498e-16)
(-0.228309 7.81138 -6.20728e-17)
(0.15665 7.39203 1.58007e-17)
(-0.218228 7.03917 3.35318e-17)
(3.52321 0.0150755 -2.02231e-17)
(3.12587 0.00365644 2.36555e-16)
(8.12974 0.379545 2.56045e-17)
(-0.678608 0.000418983 7.01632e-17)
(0.676733 -0.490068 0)
(-0.546728 1.45828 -9.15916e-17)
(-2.18196 -0.530226 1.39002e-17)
(-0.0332985 8.23671 1.61198e-18)
(0.00786515 2.87165 3.42486e-16)
(9.30427 0.0249193 -1.13997e-17)
(-0.641399 0.592789 1.92363e-16)
(0.128279 3.75882 -2.3308e-16)
(3.12876 0.212768 0)
(0.132707 0.21607 0)
(0.096913 1.46367 0)
(0.178028 1.86208 1.48168e-16)
(-0.283038 -0.205219 -5.99594e-17)
(-0.116814 -0.0763892 0)
(0.900416 -0.225316 9.59857e-17)
(-2.56661 0.261884 -3.97941e-17)
(3.17889 -0.188066 -2.5166e-16)
(-2.10163 -0.77155 1.43636e-16)
(-2.34829 -0.0995902 0)
(-0.159737 7.46642 1.78113e-16)
(0.66445 5.32972 -2.44612e-16)
(4.66779 0.285431 -1.03916e-19)
(2.09779 7.48496 0)
(4.00999 -0.0822904 -1.51733e-16)
(4.03275 0.0137773 -3.49799e-17)
(-2.16666 -1.01618 0)
(-1.83116 -0.634653 8.14707e-17)
(-4.49525 -0.290793 -6.53398e-17)
(-4.94128 -0.53571 -1.80423e-16)
(3.16838 0.396112 0)
(3.88307 -0.127586 -3.0201e-16)
(10.3688 -0.0284159 1.68379e-16)
(1.0046 5.15695 -6.6392e-18)
(10.5396 0.097179 0)
(2.70769 -0.102015 -3.68222e-17)
(4.21711 0.0822727 -7.80694e-17)
(-0.627939 -0.00630125 -5.72621e-17)
(10.5136 -0.134951 -2.0552e-16)
(9.75614 0.161296 -1.19302e-17)
(8.01822 0.193674 -7.36967e-17)
(-1.45724 0.0590912 0)
(1.45069 0.282418 -1.20418e-19)
(1.56626 0.315988 -5.9698e-17)
(0.961604 0.128741 0)
(1.70776 0.25357 1.85369e-16)
(2.14034 0.617885 0)
(4.31604 1.35647 0)
(-0.117011 -0.499457 -1.687e-16)
(0.315522 1.36206 6.11015e-16)
(0.532669 -0.022878 5.2808e-16)
(8.25163 0.73063 0)
(-0.134475 7.0998 -7.374e-18)
(0.322557 5.83556 -6.07521e-17)
(0.745794 6.16808 6.30315e-17)
(-1.31664 5.78043 0)
(0.412577 -0.377087 -5.7507e-17)
(-0.399902 0.463232 1.36821e-16)
(-2.58241 -1.60324 6.15168e-17)
(1.047 2.0559 -2.23943e-16)
(-1.37294 -0.411609 -1.42493e-16)
(-3.39944 -2.34738 -9.82107e-17)
(10.6223 0.180682 0)
(5.09431 -0.0991163 -3.73413e-16)
(9.5091 0.169218 0)
(5.04832 -0.235321 -9.48274e-17)
(1.97862 3.80455 1.98484e-16)
(-0.188829 0.0394385 -1.53581e-17)
(2.06446 0.176399 3.33735e-16)
(1.22948 2.5115 -1.11132e-16)
(-2.44639 -1.66326 5.50442e-17)
(-1.78651 -0.920087 -1.46417e-16)
(0.0987758 1.67344 -1.13736e-16)
(0.769922 0.265958 3.59458e-17)
(-0.676081 -0.0280809 -1.97525e-16)
(1.33587 2.56434 1.1194e-19)
(-3.24242 -2.03054 -1.79702e-16)
(-1.542 -0.613984 1.34221e-16)
(0.268368 -0.232816 1.73158e-16)
(4.05174 0.660986 4.41006e-16)
(2.85988 -0.0506342 -4.00277e-16)
(0.874293 -0.332467 6.06053e-17)
(0.835065 0.0319312 -5.91007e-17)
(0.445222 0.275971 -2.36026e-19)
(10.9578 0.0501088 3.11557e-17)
(9.84819 0.500556 0)
(5.24051 -0.142287 7.53939e-17)
(4.36861 -0.0799936 -2.64214e-16)
(0.896396 2.09776 0)
(-2.58829 -0.0983269 -8.30681e-17)
(7.13748 -0.0111453 1.36305e-16)
(5.94298 -0.00741782 1.00942e-16)
(-0.0914973 -1.00499 -6.46991e-17)
(1.80001 4.49408 -1.55749e-16)
(1.24743 -0.0227615 7.47964e-16)
(4.14956 -0.0439519 3.16222e-16)
(5.01756 -0.120638 -1.89801e-16)
(0.25578 1.63112 4.70067e-16)
(1.93043 0.0779541 0)
(1.08574 1.24439 -2.19661e-16)
(0.611302 0.170995 -7.55546e-16)
(3.12317 0.150188 -3.46218e-16)
(1.61345 0.539504 -1.95402e-16)
(-1.26619 -0.415061 0)
(-2.75872 -0.128852 2.06331e-16)
(-3.57408 -0.696019 -5.24921e-16)
(0.456601 -0.513681 4.10586e-17)
(-0.868369 2.7235 2.92644e-16)
(-3.9849 -0.543291 0)
(-0.672528 1.37453 0)
(-0.34598 -0.161264 5.84376e-17)
(-0.0125167 0.0272552 0)
(0.975543 -0.973924 0)
(0.394685 2.94891 -7.09889e-17)
(0.834187 0.00600869 0)
(1.04176 1.35785 0)
(-0.374276 0.330711 0)
(0.607378 0.504433 1.96968e-16)
(-0.94332 0.0419734 1.36509e-16)
(4.43905 3.41834 -1.1728e-16)
(0.482966 0.0644053 1.69473e-16)
(4.04704 0.574573 2.58419e-17)
(2.74001 0.0843447 1.44018e-16)
(-0.722882 -0.0741862 -5.07471e-17)
(-0.693436 0.312812 0)
(0.374935 -0.217875 -4.6817e-16)
(-1.01722 1.42025 -3.74306e-16)
(0.101136 0.285514 0)
(-0.242181 0.217184 -1.29321e-16)
(-0.00297278 1.22719 -4.2582e-16)
(-0.592692 1.4515 3.52617e-17)
(0.780717 0.333319 0)
(-0.34161 0.419987 -2.10653e-16)
(0.194444 -0.263967 -8.90604e-16)
(-0.721164 0.868196 -1.38662e-16)
(0.944366 2.08803 -5.45691e-18)
(-0.151501 0.150844 0)
(0.703381 0.589601 0)
(5.1051 0.10217 1.01923e-16)
(-0.487394 2.24634 9.31131e-17)
(0.729248 2.26602 -8.54512e-16)
(0.0440491 -0.445626 1.06668e-15)
(5.47493 0.450303 -4.64428e-17)
(4.68863 -0.08129 0)
(5.25699 0.0158932 8.57618e-17)
(6.28041 0.0343894 3.06047e-16)
(7.36005 0.0467725 -1.40239e-17)
(0.694427 -0.0821798 1.41881e-16)
(3.44258 -0.0479689 1.7873e-17)
(1.29735 -0.0252531 9.92343e-19)
(-3.54226 -0.0497224 1.62807e-17)
(-1.94072 -0.321896 3.40657e-16)
(2.714 -0.0432144 -7.8908e-17)
(0.633409 -0.00732086 0)
(0.735962 -0.0495737 -9.45986e-17)
(-0.889118 -0.0588886 0)
(4.2111 0.289444 0)
(-0.231647 -0.103804 1.15286e-16)
(-0.680014 -0.0335252 0)
(4.89078 0.396095 -1.03872e-17)
(-1.73239 -0.166327 -2.66513e-18)
(5.00211 -0.202359 2.15851e-16)
(4.09815 0.0659921 -3.56804e-16)
(4.4836 -0.0233079 0)
)
;
boundaryField
{
frontAndBack
{
type empty;
}
wallOuter
{
type noSlip;
}
inlet
{
type fixedValue;
value uniform (10 0 0);
}
outlet
{
type zeroGradient;
}
wallInner
{
type noSlip;
}
}
// ************************************************************************* //
| [
"mohan.2611@gmail.com"
] | mohan.2611@gmail.com | |
4d499f21b4dabf4795ca2b4b295fb5eb9eb237e3 | 23461d6ce7a8bd328eea2e90fa23ad756f316c96 | /src/burstMine/GenerationWork.cpp | b2f5243206f0291f0a4b93f47080d202eb648dbd | [
"BSD-2-Clause-Views"
] | permissive | bhamon/burstMine | ff8504bbf74ebb19aa630f8b25020adb1f44cc5d | c330ff8f69d88013dee533292e1185e0777d8a9d | refs/heads/master | 2020-04-06T04:00:39.300277 | 2015-07-23T10:07:05 | 2015-07-23T10:07:05 | 26,996,920 | 4 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 836 | cpp | /*
Burst mine
Distributed graphical plotter and miner for Burst.
Author: Cryo
Bitcoin: 138gMBhCrNkbaiTCmUhP9HLU9xwn5QKZgD
Burst: BURST-YA29-QCEW-QXC3-BKXDL
*/
#include "GenerationWork.h"
namespace cryo {
namespace burstMine {
GenerationWork::GenerationWork(unsigned long long p_address, unsigned long long p_offset, unsigned int p_size)
: m_address(p_address), m_offset(p_offset), m_size(p_size) {
}
GenerationWork::GenerationWork(const GenerationWork& p_other)
: m_address(p_other.m_address), m_offset(p_other.m_offset), m_size(p_other.m_size) {
}
GenerationWork::~GenerationWork() throw () {
}
GenerationWork& GenerationWork::operator=(const GenerationWork& p_other) {
if(this == &p_other) {
return *this;
}
m_address = p_other.m_address;
m_offset = p_other.m_offset;
m_size = p_other.m_size;
return *this;
}
}}
| [
"bhamon.cryo@gmail.com"
] | bhamon.cryo@gmail.com |
97addd01f52571d2bda2ec12738cbe8759cd2c51 | 4a31e0a80f6998a50807cf812de648d72509d039 | /TangoServer/engine/SocketX.h | fe7324dac38a394b8a6784d6961f08a76ffca469 | [] | no_license | Myriad-Dreamin/Tango | 6103ffe027ee8df6e48b6fcc426189ce8d9c9d59 | e607190f28de7ae99d6989d013956595aa53b64c | refs/heads/master | 2022-01-23T02:28:08.424032 | 2019-05-21T04:10:22 | 2019-05-21T04:10:22 | 181,630,021 | 0 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 561 | h | #ifndef SOCKETX_H
#define SOCKETX_H
#include <QTcpSocket>
#include <QHostAddress>
/* self defined protocal based on QTcpSocket */
/* 基于QTcpSocket自定义协议 */
class SocketX : public QTcpSocket
{
Q_OBJECT
public:
SocketX(qintptr sockDesc, QObject *parent = Q_NULLPTR);
~SocketX();
// c++ stype public lambda slot:
std::function<void (QByteArray)> write_slotter();
signals:
void data_ready(const QString &ip, const QByteArray &data);
private:
long long sock_id;
void make_ready_read_slot(void);
};
#endif // SOCKETX_H
| [
"camiyoru@gmail.com"
] | camiyoru@gmail.com |
47e614d506d970c7267ff35372f36fbd3dcd08d8 | 3588940eabcdff14c840ece824c294f396f92299 | /contentwidget.cpp | 11da49462c8f161f08fd74dc907f148c179b6bfd | [] | no_license | 519984307/PowerAm | 02bc6264f5897f8d87b60da3ba8152cd59d0f8fd | 9b5b32230ae029bc5314ba37ae762554efc24198 | refs/heads/master | 2023-03-18T23:35:12.372517 | 2016-08-12T02:26:56 | 2016-08-12T02:26:56 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,786 | cpp | #include "contentwidget.h"
// 定义保存按钮属性的键值
#define KEY_STATION "STATION"
ContentWidget::ContentWidget(QWidget* parent/* = NULL */)
:QScrollArea(parent)
{
m_widget = NULL;
m_gbox = NULL;
setFrameShape(QScrollArea::NoFrame);
}
ContentWidget::~ContentWidget()
{
}
void ContentWidget::loadData(PBNS::StationTypeMsg_Response& res,int tpid)
{
m_stationList = res;
if (m_gbox != NULL)
{
delete m_gbox;
m_gbox = NULL;
}
if (m_widget != NULL)
{
delete m_widget;
m_widget = NULL;
}
QWidget* m_widget = new QWidget;
m_gbox = new QGridLayout;
//m_gbox->setSpacing(15);
m_gbox->setVerticalSpacing(15);
m_widget->setLayout(m_gbox);
// 查找该类别的站点列表
PBNS::StationTypeBean typebean;
for (int i = 0;i<res.typelist_size();i++)
{
typebean = res.typelist(i);
if (typebean.id() == tpid)
{
break;
}
}
int idx = 0;
int count =typebean.stationlist_size();
int row = count/COL;
if (count%COL>0)
{
row++;
}
// 加载按钮
for (int i = 1;i<=row;i++)
{
for (int j = 1;j<=COL;j++)
{
if (idx>= count)
{
break;
}
PBNS::StationBean bean = typebean.stationlist(idx);
QPushButton* btn = new QPushButton(bean.currentname().c_str());
btn->setObjectName("station");
QVariant val;
val.setValue(bean);
// 保存站点bean
btn->setProperty(KEY_STATION,val);
//btn->setProperty("sname",btn->text());
m_gbox->addWidget(btn,i,j,1,1);
connect(btn,SIGNAL(pressed()),this,SLOT(btnPressed()));
idx++;
}
}
setWidget(m_widget);
}
void ContentWidget::btnPressed()
{
QObject *sd = QObject::sender ();
QVariant val = sd->property(KEY_STATION);
PBNS::StationBean bean = val.value<PBNS::StationBean>();
// 发送打开文件信号
emit openfile(bean);
} | [
"yleesun@163.com"
] | yleesun@163.com |
bb162a2669e3e0cbcdfc47f2cd9e03ceb81ea345 | 01545e2c12e99ae1bcf5e4e63a5d5e74d0dca9db | /Trabalho 1/src/Visu_Info.cpp | 47ea71b2a09a50a749d0284093e9eb53103e8131 | [] | no_license | RuiGuedes/PROG1617_T2 | c9bffb66ddcd7617f3f1db31931172183f3389f7 | d1b667c6c6d6f54c1082cda3847a611812ca2ef6 | refs/heads/master | 2020-03-20T14:22:48.412423 | 2018-06-15T12:20:53 | 2018-06-15T12:20:53 | 137,483,816 | 0 | 1 | null | null | null | null | ISO-8859-1 | C++ | false | false | 17,493 | cpp | #include <iostream>
#include <string>
#include <fstream>
#include <vector>
#include <sstream>
#include "MyTypes.h"
#include<stdio.h>
#include <iomanip>
int work_start_hour = 6; //O trabalho começa as 6:00h da manha
int work_end_hour = 20; //O trabalho termina as 20:00h da tarde
int work_start_min = 0; //O trabalho começa as 6:00h da manha
int work_end_min = 0; //O trabalho termina as 20:00h da tarde
using namespace std;
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//Declaração de Prótotipos relativos às opções possiveis referentes ás linhas
bool valid_number(string number);
bool exist_ID_linha(vector<Line> lines_info, const int ID);
void horarios(vector<Line> &lines_info, string const file_name_lines, vector<Driver> &drivers_info, string const file_name_drivers);
void existe_stop(vector<Line> &lines_info, string const file_name_lines, vector<Driver> &drivers_info, string const file_name_drivers);
void stop_to_stop(vector<Line> &lines_info, string const file_name_lines, vector<Driver> &drivers_info, string const file_name_drivers);
void show_avai_all_drivers(vector<Line> &lines_info, string const file_name_lines, vector<Driver> &drivers_info, string const file_name_drivers);
void horario_stop(vector<Line> &lines_info, string const file_name_lines, vector<Driver> &drivers_info, string const file_name_drivers);
bool exist_stop_linha(vector<Line> lines_info, const int ID, const string stop);
void horario_line(vector<Line> &lines_info, string const file_name_lines, vector<Driver> &drivers_info, string const file_name_drivers);
void write_time_stops(vector<Line> lines_info, int indicator, string stop);
void write_space(int tamanho,int number);
int number_chars(int number);
void visu_info(vector<Line> &lines_info, string const file_name_lines, vector<Driver> &drivers_info, string const file_name_drivers);
void Main_Interface(vector<Line> &lines_info, string const file_name_lines, vector<Driver> &drivers_info, string const file_name_drivers);
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//Mostra os condutores disponiveis
void show_avai_all_drivers(vector<Line> &lines_info, string const file_name_lines, vector<Driver> &drivers_info, string const file_name_drivers)
{
for (int i = 0; i < drivers_info.size(); i++)
{
drivers_info.at(i).available = true;
}
cout << "Condutores disponiveis: " << endl << endl;
for (int i = 0; i < drivers_info.size(); i++)
{
if (drivers_info.at(i).available == true)
{
cout << drivers_info.at(i).ID << " -- " << drivers_info.at(i).name << endl;
}
}
cout << endl << "Condutores disponiveis mostrados com sucesso." << endl << endl;
system("pause");
system("CLS");
Main_Interface(lines_info, file_name_lines, drivers_info, file_name_drivers);
}
//Horarios Interface
void horarios(vector<Line> &lines_info, string const file_name_lines, vector<Driver> &drivers_info, string const file_name_drivers)
{
cout << "Horários" << endl << endl;
int option;
char value[10];
cout << "Funcionalidades disponiveis" << endl << endl;
cout << "1 - Horário de uma paragem" << endl;
cout << "2 - Horário de uma linha" << endl;
cout << "3 - Voltar" << endl;
cout << endl << "Introduza uma opcao (1-3): "; //Opção returnada pelo utilizador
cin.ignore(1000, '\n');
cin.get(value, 10);
//Verifica se existe erro na introdução da opção.
while ((valid_number(value) == false) || (atoi(value) < 1) || (atoi(value) > 3))
{
cin.clear();
cout << "Opcao invalida ! Tente novamente. " << endl;
cout << "Introduza uma opcao (1-3): ";
cin.ignore(1000, '\n');
cin.get(value, 10);
}
option = atoi(value);
//Variantes para as diferentes opções tomadas pelo utilizador
switch (option)
{
case 1:
system("CLS");
horario_stop(lines_info, file_name_lines, drivers_info, file_name_drivers);
break;
case 2:
system("CLS");
horario_line(lines_info, file_name_lines, drivers_info, file_name_drivers);
break;
case 3:
visu_info(lines_info, file_name_lines, drivers_info, file_name_drivers);
break;
}
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//Verifica se existe a paragem
void existe_stop(vector<Line> &lines_info, string const file_name_lines, vector<Driver> &drivers_info, string const file_name_drivers)
{
vector<int> ID_stops;
string stop;
cout << "Verificar se existe uma paragem para uma dada linha" << endl << endl;
cout << "Digite o nome da paragem a verificar: ";
cin.ignore(1000, '\n');
getline(cin, stop);
for (int i = 0; i < lines_info.size(); i++)
{
for (int z = 0; z < lines_info.at(i).stops.size(); z++)
{
if (lines_info.at(i).stops.at(z) == stop)
{
ID_stops.push_back(lines_info.at(i).ID);
break;
}
}
}
if (ID_stops.size() == 0)
{
cout << "Nenhuma linha contem a paragem mencionada" << endl;
}
else
{
cout << "As linhas que contêm a paragem mencionada são: " << endl << endl;
for (int i = 0; i < ID_stops.size(); i++)
{
cout << "-> Linha " << ID_stops.at(i) << endl;
}
cout << endl;
cin.ignore(1000, '\n');
}
system("pause");
system("CLS");
Main_Interface(lines_info, file_name_lines, drivers_info, file_name_drivers);
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//Calcula o tempo e percurso de uma dada linha
void stop_to_stop(vector<Line> &lines_info, string const file_name_lines, vector<Driver> &drivers_info, string const file_name_drivers)
{
int ID, p_line, p_stop_1, p_stop_2, p_stop_1_copy, p_stop_2_copy;
int time_between_stops = 0;
string stop_1, stop_2;
char value[10];
cout << "Calcular o percurso e o tempo entre duas paragens para uma dada linha" << endl << endl;
//Recebe o valor da linha para verificar a condição e verifica se é valida
do
{
cout << "Identificador unico da linha pretendida: ";
cin.ignore(1000, '\n');
cin.get(value, 10);
while (valid_number(value) == false || (atoi(value) > 32767) || (atoi(value) < -32767))
{
cin.clear();
cout << "Identificador unico inválido." << endl << "Tente novamente." << endl << endl;
cout << "Identificador unico da linha pretendida: ";
cin.ignore(1000, '\n');
cin.get(value, 10);
}
ID = atoi(value);
if (!exist_ID_linha(lines_info, ID))
cout << "Esse identificador não existe." << endl << "Tente novamente." << endl << endl;
} while (!exist_ID_linha(lines_info, ID)); //Verifica se o ID é possivel
cout << endl;
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//Recebe duas paragens validas e diferentes pertencentes à linha mencionaa
cout << "Paragens: " << endl;
cout << "1ª Paragem: ";
cin.ignore(1000, '\n');
getline(cin, stop_1);
do
{
exist_stop_linha(lines_info, ID, stop_1);
if (exist_stop_linha(lines_info, ID, stop_1) == true)
{
break;
}
else
{
cout << "Paragem inexistente." << endl << "Tente novamente." << endl << endl;
cout << "1ª Paragem: ";
getline(cin, stop_1);
}
} while (exist_stop_linha(lines_info, ID, stop_1) == false);
cout << "2ª Paragem: ";
getline(cin, stop_2);
do
{
exist_stop_linha(lines_info, ID, stop_2);
if (exist_stop_linha(lines_info, ID, stop_2) == true)
{
if (stop_1 != stop_2)
break;
else
{
cout << "Paragem igual à anterior." << endl << "Tente novamente." << endl << endl;
cout << "2ª Paragem: ";
getline(cin, stop_2);
}
}
else
{
cout << "Paragem inexistente." << endl << "Tente novamente." << endl << endl;
cout << "2ª Paragem: ";
getline(cin, stop_2);
}
} while ((exist_stop_linha(lines_info, ID, stop_2) == false) || (stop_1 == stop_2));
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//Retorna em p_line a linha a verificar as paragens e tempo;
for (int i = 0; i < lines_info.size(); i++)
{
if (lines_info.at(i).ID == ID)
{
p_line = i;
}
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//Retorna os indicadores para as posicoes das paragens
for (int i = 0; i < lines_info.at(p_line).stops.size(); i++)
{
if (lines_info.at(p_line).stops.at(i) == stop_1)
{
p_stop_1 = i;
}
else if (lines_info.at(p_line).stops.at(i) == stop_2)
{
p_stop_2 = i;
}
}
p_stop_1_copy = p_stop_1;
p_stop_2_copy = p_stop_2;
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//Calcula o tempo entre as paragens
if (p_stop_1 < p_stop_2)
{
if ((p_stop_2 - p_stop_1) == 1)
{
time_between_stops = lines_info.at(p_line).time_stops.at(p_stop_1);
}
else
{
for(p_stop_1; p_stop_1 < p_stop_2; p_stop_1++)
{
time_between_stops = time_between_stops + lines_info.at(p_line).time_stops.at(p_stop_1);
}
}
}
else
{
if ((p_stop_1 - p_stop_2) == 1)
{
time_between_stops = lines_info.at(p_line).time_stops.at(p_stop_2);
}
else
{
for (p_stop_2; p_stop_2 < p_stop_1; p_stop_2++)
{
time_between_stops = time_between_stops + lines_info.at(p_line).time_stops.at(p_stop_2);
}
}
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
cout << "Percurso entre paragens: " << endl;
if (p_stop_1_copy < p_stop_2_copy)
{
for (p_stop_1_copy; p_stop_1_copy < p_stop_2_copy; p_stop_1_copy++)
{
cout << lines_info.at(p_line).stops.at(p_stop_1_copy) << " -> ";
}
cout << lines_info.at(p_line).stops.at(p_stop_2_copy) << endl;
cout << "Tempo do respetivo percurso: " << time_between_stops << endl << endl;
}
else
{
for (p_stop_2_copy; p_stop_2_copy < p_stop_1_copy; p_stop_2_copy++)
{
cout << lines_info.at(p_line).stops.at(p_stop_2_copy) << " -> ";
}
cout << lines_info.at(p_line).stops.at(p_stop_1_copy) << endl;
cout << "Tempo do respetivo percurso: " << time_between_stops << endl << endl;
}
system("pause");
system("CLS");
Main_Interface(lines_info, file_name_lines, drivers_info, file_name_drivers);
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//Verifica se a paragem existe na linha
//Devolve TRUE quando existe
//Devolve FALSE quando não existe
bool exist_stop_linha(vector<Line> lines_info, const int ID, const string stop)
{
int indicator;
for (int i = 0; i < lines_info.size(); i++)
{
if (lines_info.at(i).ID == ID)
{
indicator = i;
}
}
for (int i = 0; i < lines_info.at(indicator).stops.size(); i++)
{
if (lines_info.at(indicator).stops.at(i) == stop)
{
return true;
}
}
return false;
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void horario_stop(vector<Line> &lines_info, string const file_name_lines, vector<Driver> &drivers_info, string const file_name_drivers)
{
cout << "Horário de uma paragem " << endl << endl;
string stop;
bool state = false;
cout << "Nome da paragem da qual pretende visualizar o horário: ";
cin.ignore(1000, '\n');
getline(cin, stop);
do
{
for (int i = 0; i < lines_info.size(); i++)
{
for (int z = 0; z < lines_info.at(i).stops.size(); z++)
{
if (lines_info.at(i).stops.at(z) == stop)
{
state = true;
break;
}
}
if (state == true)
{
break;
}
}
if (state == false)
{
cout << "Paragem inexistente." << endl << "Tente novamente." << endl << endl;
cout << "Paragem: ";
getline(cin, stop);
}
} while (state == false); //Verifica se a paragem existe
cout << "Linha" << " " << "Paragem" << " " << " Horas " << endl;
for (int i = 0; i < lines_info.size(); i++)
{
if (exist_stop_linha(lines_info, lines_info.at(i).ID, stop) == true)
{
int number;
number = number_chars(lines_info.at(i).ID);
cout << lines_info.at(i).ID;
write_space(number, 16);
cout << stop;
write_space(stop.length()-1, 25);
write_time_stops(lines_info, i, stop);
}
}
cout << endl;
system("pause");
system("CLS");
Main_Interface(lines_info, file_name_lines, drivers_info, file_name_drivers);
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void horario_line(vector<Line> &lines_info, string const file_name_lines, vector<Driver> &drivers_info, string const file_name_drivers)
{
cout << "Horário de uma linha " << endl << endl;
int ID, indicator;
char value[10];
do
{
cout << "Identificador unico da linha a verificar o horário: ";
cin.ignore(1000, '\n');
cin.get(value, 10);
while (valid_number(value) == false || (atoi(value) > 32767) || (atoi(value) < -32767))
{
cin.clear();
cout << "Identificador unico inválido." << endl << "Tente novamente." << endl << endl;
cout << "Identificador unico da linha a verificar o horário: ";
cin.ignore(1000, '\n');
cin.get(value, 10);
}
ID = atoi(value);
if (!exist_ID_linha(lines_info, ID))
cout << "Este identificador único não existe." << endl << "Tente novamente." << endl << endl;
} while (!exist_ID_linha(lines_info, ID));
cout << endl << "Linha: " << ID << endl;
for (int i = 0; i < lines_info.size(); i++)
{
if (lines_info.at(i).ID == ID)
{
indicator = i;
}
}
cout << "Paragem" << " " << "Horas" << endl;
for (int i = 0; i < lines_info.at(indicator).stops.size(); i++)
{
cout << lines_info.at(indicator).stops.at(i);
write_space(lines_info.at(indicator).stops.at(i).length(), 25);
write_time_stops(lines_info, indicator, lines_info.at(indicator).stops.at(i));
}
cout << endl;
system("pause");
system("CLS");
Main_Interface(lines_info, file_name_lines, drivers_info, file_name_drivers);
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void write_time_stops(vector<Line> lines_info, int indicator, string stop)
{
int freq_circ, time_after, limit, horas, min;
int work_start_hour_copy, work_start_min_copy, work_end_hour_copy, work_end_min_copy;
work_start_hour_copy = work_start_hour;
work_start_min_copy = work_start_min;
work_end_hour_copy = work_end_hour;
work_end_min_copy = work_end_min;
horas = work_start_hour;
min = work_start_min;
freq_circ = 0;
time_after = 0;
//Indicador da posicao da paragem
for (int i = 0; i < lines_info.at(indicator).stops.size(); i++)
{
if (lines_info.at(indicator).stops.at(i) == stop)
{
limit = i;
}
}
//Tempo até chegar à paragem
for (int i = 0; i < limit; i++)
{
freq_circ = freq_circ + lines_info.at(indicator).time_stops.at(i);
}
work_start_min = work_start_min + freq_circ;
//Escreve as horas da paragem
while ((work_start_hour < work_end_hour) || ((work_start_min < work_end_min) && (work_start_hour = work_end_hour)))
{
double var_2;
//Organiza a informação do horário para ser escrita
if (work_start_min >= 60)
{
var_2 = work_start_min / 60.0;
work_start_hour = work_start_hour + int(var_2);
work_start_min = (60 * (var_2 - int(var_2)));
}
//Escreve a informação das horas
if ((work_start_hour > work_end_hour) || ((work_start_min > work_end_min) && (work_start_hour == work_end_hour)))
{
break;
}
if (work_start_hour < 10)
{
if (work_start_min == 0)
{
cout << "0" << work_start_hour << ":" << work_start_min << "0" << " -- ";
}
else if (work_start_min < 10)
{
cout << "0" << work_start_hour << ":0" << work_start_min << " -- ";
}
else
{
cout << "0" << work_start_hour << ":" << work_start_min << " -- ";
}
}
else
{
if (work_start_min == 0)
{
cout << work_start_hour << ":" << work_start_min << "0" << " -- ";
}
else if (work_start_min < 10)
{
cout << work_start_hour << ":0" << work_start_min << " -- ";
}
else
{
cout << work_start_hour << ":" << work_start_min << " -- ";
}
}
work_start_min = work_start_min + lines_info.at(indicator).freq_circ;
}
cout << '\b' << '\b' << '\b' << '\b' << " " << endl;
work_start_hour = work_start_hour_copy;
work_start_min = work_start_min_copy;
work_end_hour = work_end_hour_copy;
work_end_min = work_end_min_copy;
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
int number_chars(int number)
{
int i = 0;
do
{
i++;
number = number / 10;
} while (number != 0);
return i;
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void write_space(int tamanho, int number)
{
number = number - tamanho;
for (number; number > 0; number--)
{
cout << " ";
}
}
| [
"ruiguedes12@hotmail.com"
] | ruiguedes12@hotmail.com |
f94d1f32d737c700d24494fb82a9605d8e656ece | c0ef9f8bc967b155c6b150c0134efc74c0eae0a5 | /Galaxy Model/LenticularGalaxy.h | ae05a1a518008be8e86623eb0102a55dc88a4f96 | [] | no_license | McInnesJ/Galaxy-Model | 9ba64d55c71ac32a175be88be1020fad7a621438 | fa251302ced8ccbee4ca6a9bd44ebca08b51ed57 | refs/heads/master | 2021-04-27T07:50:31.574658 | 2018-02-23T15:48:06 | 2018-02-23T15:48:06 | 122,640,594 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 805 | h | #pragma once
#include "Galaxy.h"
#include "HubbleType.h"
class LenticularGalaxy : public Galaxy {
public:
LenticularGalaxy(std::string name, double redShift, double mass, double stellarMassFraction, std::vector<Galaxy*> satellites);
LenticularGalaxy(std::string name, double redShift, double mass, double stellarMassFraction);
void printInfo() override;
void addSatellite(Galaxy *satellite) override;
std::string getName() override;
double getStellarMass() override;
std::string getHubbleType() override;
double getRedShift() override;
double getMass() override;
double getStellarMassFraction() override;
std::vector<Galaxy*> getSatellites() override;
void setHubbleType(HubbleType hubbleType) override;
void deleteGalaxy() override;
~LenticularGalaxy(){}
};
| [
"noreply@github.com"
] | noreply@github.com |
e50872f2e9b4ab8b507175e65e34d519fc109984 | d93271ea76c3b3b2c867b90b492417bf51a951f1 | /src/plugins/deserializers/compressed.cpp | f86703c371fbe51f5547913067be9450436ee881 | [
"Apache-2.0"
] | permissive | lamanchy/wolf | 93fade4290110931636e765fcddb0c651ed56c8d | 9a068072f20825ee853a9a06dc75b9253496769f | refs/heads/master | 2021-07-09T04:56:57.534369 | 2020-11-26T12:32:14 | 2020-11-26T12:32:14 | 221,057,751 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,863 | cpp | #include <plugins/deserializers/compressed.h>
namespace wolf {
namespace from {
void compressed::process(json &&next) {
bool is_gzip = false;
bool is_line = false;
unsigned p = 0;
auto partition = next.metadata.find("partition");
if (partition != nullptr) {
p = partition->get_unsigned();
}
std::string _message = this->get_previous(p);
_message.append(next.get_string());
while (true) {
if (not is_line and not is_gzip) {
// determine if line or gzip
if (_message.length() >= extras::gzip::get_prefix().length()) {
if (_message.rfind(extras::gzip::get_prefix(), 0) == 0)
is_gzip = true;
else
is_line = true;
} else {
if (_message.find('\n') != std::string::npos)
is_line = true;
}
if (not is_line and not is_gzip) {
break;
}
}
// is line or is gzip
if (is_line) {
auto pos = _message.find('\n');
if (pos == std::string::npos) break;
output(json(_message.substr(0, pos + 1), next.metadata, 1));
_message = _message.substr(pos + 1);
is_line = false;
}
if (is_gzip) {
auto pos = _message.find(extras::gzip::string_serializer_end);
if (pos == std::string::npos) break;
size_t size = extras::gzip::get_deserialized_size(_message.substr(extras::gzip::get_prefix().length(),
pos - extras::gzip::get_prefix().length() + 1));
if (_message.length() < 1 + pos + size) break;
auto test1 = gzip::decompress(_message.substr(pos + 1, size).data(), size);
output(json(gzip::decompress(_message.substr(pos + 1, size).data(), size)));
_message = _message.substr(pos + size + 1);
is_gzip = false;
}
}
if (!_message.empty()) {
this->put_previous(p, _message);
}
}
}
} | [
"ondrej.lomic@ysoft.com"
] | ondrej.lomic@ysoft.com |
6f9a7e205175c63ccdc568f62b4119e2e834b634 | 598edeaeb3e42043d8244e0d495c5eb6bd9e149f | /blacktie/core/src/test/include/TestMultiOrb.h | 23e8d81902f2383bc4d760c9a266217e108f4cc4 | [] | no_license | cris-b/narayana | 21469fa6c2a150a6ed42392d823f251d2441aa54 | 6e9aa3a2fd2147d0082a022d748c1e8f2b904cbe | refs/heads/master | 2021-01-16T20:38:35.298332 | 2013-09-30T06:39:30 | 2013-09-30T06:39:30 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,383 | h | /*
* JBoss, Home of Professional Open Source
* Copyright 2008, Red Hat, Inc., and others contributors as indicated
* by the @authors tag. All rights reserved.
* See the copyright.txt in the distribution for a
* full listing of individual contributors.
* This copyrighted material is made available to anyone wishing to use,
* modify, copy, or redistribute it subject to the terms and conditions
* of the GNU Lesser General Public License, v. 2.1.
* This program is distributed in the hope that it will be useful, but WITHOUT A
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
* You should have received a copy of the GNU Lesser General Public License,
* v.2.1 along with this distribution; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*/
#ifndef TestMultiOrb_H
#define TestMultiOrb_H
#include <cppunit/extensions/HelperMacros.h>
#include "cppunit/TestFixture.h"
class TestMultiOrb: public CppUnit::TestFixture {
CPPUNIT_TEST_SUITE( TestMultiOrb );
CPPUNIT_TEST( test );
CPPUNIT_TEST( test_manyorb );
CPPUNIT_TEST_SUITE_END();
public:
void test();
void test_manyorb();
virtual void setUp();
virtual void tearDown();
private:
char* env;
};
#endif // TestMultiOrb_H
| [
"tom.jenkinson@redhat.com"
] | tom.jenkinson@redhat.com |
edd17d955350aa3ce9a249655d3a597fbd9e3fc4 | 6f49cc2d5112a6b97f82e7828f59b201ea7ec7b9 | /dbswdbe/WdbeQModRef1NSignal.cpp | f181a3a0f88a2898e0a2a5b80b223cb79cf9e9a0 | [
"MIT"
] | permissive | mpsitech/wdbe-WhizniumDBE | d3702800d6e5510e41805d105228d8dd8b251d7a | 89ef36b4c86384429f1e707e5fa635f643e81240 | refs/heads/master | 2022-09-28T10:27:03.683192 | 2022-09-18T22:04:37 | 2022-09-18T22:04:37 | 282,705,449 | 5 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 22,295 | cpp | /**
* \file WdbeQModRef1NSignal.cpp
* Dbs and XML wrapper for table TblWdbeQModRef1NSignal (implementation)
* \copyright (C) 2016-2020 MPSI Technologies GmbH
* \author Alexander Wirthmueller (auto-generation)
* \date created: 12 Sep 2021
*/
// IP header --- ABOVE
#include "WdbeQModRef1NSignal.h"
using namespace std;
using namespace Sbecore;
using namespace Xmlio;
/******************************************************************************
class WdbeQModRef1NSignal
******************************************************************************/
WdbeQModRef1NSignal::WdbeQModRef1NSignal(
const ubigint qref
, const ubigint jref
, const uint jnum
, const ubigint ref
, const string stubRef
, const uint refNum
) {
this->qref = qref;
this->jref = jref;
this->jnum = jnum;
this->ref = ref;
this->stubRef = stubRef;
this->refNum = refNum;
};
void WdbeQModRef1NSignal::writeJSON(
Json::Value& sup
, bool jnumattr
, bool shorttags
) {
Json::Value& me = sup.append(Json::Value(Json::objectValue));
if (jnumattr) me["jnum"] = jnum;
if (shorttags) {
me["ref"] = stubRef;
} else {
me["stubRef"] = stubRef;
};
};
void WdbeQModRef1NSignal::writeXML(
xmlTextWriter* wr
, string difftag
, bool jnumattr
, bool shorttags
) {
if (difftag.length() == 0) difftag = "WdbeQModRef1NSignal";
xmlTextWriterStartElement(wr, BAD_CAST difftag.c_str());
if (jnumattr) xmlTextWriterWriteAttribute(wr, BAD_CAST "jnum", BAD_CAST to_string(jnum).c_str());
if (shorttags) {
writeString(wr, "ref", stubRef);
} else {
writeString(wr, "stubRef", stubRef);
};
xmlTextWriterEndElement(wr);
};
/******************************************************************************
class ListWdbeQModRef1NSignal
******************************************************************************/
ListWdbeQModRef1NSignal::ListWdbeQModRef1NSignal() {
};
ListWdbeQModRef1NSignal::ListWdbeQModRef1NSignal(
const ListWdbeQModRef1NSignal& src
) {
nodes.resize(src.nodes.size(), NULL);
for (unsigned int i = 0; i < nodes.size(); i++) nodes[i] = new WdbeQModRef1NSignal(*(src.nodes[i]));
};
ListWdbeQModRef1NSignal::~ListWdbeQModRef1NSignal() {
clear();
};
void ListWdbeQModRef1NSignal::clear() {
for (unsigned int i = 0; i < nodes.size(); i++) if (nodes[i]) delete nodes[i];
nodes.resize(0);
};
unsigned int ListWdbeQModRef1NSignal::size() const {
return(nodes.size());
};
void ListWdbeQModRef1NSignal::append(
WdbeQModRef1NSignal* rec
) {
nodes.push_back(rec);
};
ListWdbeQModRef1NSignal& ListWdbeQModRef1NSignal::operator=(
const ListWdbeQModRef1NSignal& src
) {
WdbeQModRef1NSignal* rec;
if (&src != this) {
clear();
for (unsigned int i = 0; i < src.size(); i++) {
rec = new WdbeQModRef1NSignal(*(src.nodes[i]));
nodes.push_back(rec);
};
};
return(*this);
};
void ListWdbeQModRef1NSignal::writeJSON(
Json::Value& sup
, std::string difftag
) {
if (difftag == "") difftag = "ListWdbeQModRef1NSignal";
Json::Value& me = sup[difftag] = Json::Value(Json::arrayValue);
for (unsigned int i = 0; i < nodes.size(); i++) nodes[i]->writeJSON(me, true, true);
};
void ListWdbeQModRef1NSignal::writeXML(
xmlTextWriter* wr
, string difftag
) {
// generate top XML tag
if (difftag.length() == 0) difftag = "ListWdbeQModRef1NSignal";
// XML output
xmlTextWriterStartElement(wr, BAD_CAST difftag.c_str());
for (unsigned int i = 0; i < nodes.size(); i++) nodes[i]->writeXML(wr, "row", true, true);
xmlTextWriterEndElement(wr);
};
/******************************************************************************
class TblWdbeQModRef1NSignal
******************************************************************************/
TblWdbeQModRef1NSignal::TblWdbeQModRef1NSignal() {
};
TblWdbeQModRef1NSignal::~TblWdbeQModRef1NSignal() {
};
bool TblWdbeQModRef1NSignal::loadRecBySQL(
const string& sqlstr
, WdbeQModRef1NSignal** rec
) {
return false;
};
ubigint TblWdbeQModRef1NSignal::loadRstBySQL(
const string& sqlstr
, const bool append
, ListWdbeQModRef1NSignal& rst
) {
return 0;
};
ubigint TblWdbeQModRef1NSignal::insertRec(
WdbeQModRef1NSignal* rec
) {
return 0;
};
ubigint TblWdbeQModRef1NSignal::insertNewRec(
WdbeQModRef1NSignal** rec
, const ubigint jref
, const uint jnum
, const ubigint ref
, const string stubRef
, const uint refNum
) {
ubigint retval = 0;
WdbeQModRef1NSignal* _rec = NULL;
_rec = new WdbeQModRef1NSignal(0, jref, jnum, ref, stubRef, refNum);
insertRec(_rec);
retval = _rec->qref;
if (rec == NULL) delete _rec;
else *rec = _rec;
return retval;
};
ubigint TblWdbeQModRef1NSignal::appendNewRecToRst(
ListWdbeQModRef1NSignal& rst
, WdbeQModRef1NSignal** rec
, const ubigint jref
, const uint jnum
, const ubigint ref
, const string stubRef
, const uint refNum
) {
ubigint retval = 0;
WdbeQModRef1NSignal* _rec = NULL;
retval = insertNewRec(&_rec, jref, jnum, ref, stubRef, refNum);
rst.nodes.push_back(_rec);
if (rec != NULL) *rec = _rec;
return retval;
};
void TblWdbeQModRef1NSignal::insertRst(
ListWdbeQModRef1NSignal& rst
) {
};
void TblWdbeQModRef1NSignal::updateRec(
WdbeQModRef1NSignal* rec
) {
};
void TblWdbeQModRef1NSignal::updateRst(
ListWdbeQModRef1NSignal& rst
) {
};
void TblWdbeQModRef1NSignal::removeRecByQref(
ubigint qref
) {
};
void TblWdbeQModRef1NSignal::removeRstByJref(
ubigint jref
) {
};
bool TblWdbeQModRef1NSignal::loadRecByQref(
ubigint qref
, WdbeQModRef1NSignal** rec
) {
return false;
};
ubigint TblWdbeQModRef1NSignal::loadRstByJref(
ubigint jref
, const bool append
, ListWdbeQModRef1NSignal& rst
) {
return 0;
};
#if defined(SBECORE_MAR) || defined(SBECORE_MY)
/******************************************************************************
class MyTblWdbeQModRef1NSignal
******************************************************************************/
MyTblWdbeQModRef1NSignal::MyTblWdbeQModRef1NSignal() :
TblWdbeQModRef1NSignal()
, MyTable()
{
stmtInsertRec = NULL;
stmtUpdateRec = NULL;
stmtRemoveRecByQref = NULL;
stmtRemoveRstByJref = NULL;
};
MyTblWdbeQModRef1NSignal::~MyTblWdbeQModRef1NSignal() {
if (stmtInsertRec) delete(stmtInsertRec);
if (stmtUpdateRec) delete(stmtUpdateRec);
if (stmtRemoveRecByQref) delete(stmtRemoveRecByQref);
if (stmtRemoveRstByJref) delete(stmtRemoveRstByJref);
};
void MyTblWdbeQModRef1NSignal::initStatements() {
stmtInsertRec = createStatement("INSERT INTO TblWdbeQModRef1NSignal (jref, jnum, ref, refNum) VALUES (?,?,?,?)", false);
stmtUpdateRec = createStatement("UPDATE TblWdbeQModRef1NSignal SET jref = ?, jnum = ?, ref = ?, refNum = ? WHERE qref = ?", false);
stmtRemoveRecByQref = createStatement("DELETE FROM TblWdbeQModRef1NSignal WHERE qref = ?", false);
stmtRemoveRstByJref = createStatement("DELETE FROM TblWdbeQModRef1NSignal WHERE jref = ?", false);
};
bool MyTblWdbeQModRef1NSignal::loadRecBySQL(
const string& sqlstr
, WdbeQModRef1NSignal** rec
) {
MYSQL_RES* dbresult; MYSQL_ROW dbrow;
WdbeQModRef1NSignal* _rec = NULL;
bool retval = false;
if (mysql_real_query(dbs, sqlstr.c_str(), sqlstr.length())) {
string dbms = "MyTblWdbeQModRef1NSignal::loadRecBySQL() / " + string(mysql_error(dbs));
throw SbeException(SbeException::DBS_QUERY, {{"dbms",dbms}, {"sql",sqlstr}});
};
dbresult = mysql_store_result(dbs);
if (!dbresult) {
string dbms = "MyTblWdbeQModRef1NSignal::loadRecBySQL() / store result / " + string(mysql_error(dbs));
throw SbeException(SbeException::DBS_QUERY, {{"dbms",dbms}, {"sql",sqlstr}});
};
if (mysql_num_rows(dbresult) == 1) {
dbrow = mysql_fetch_row(dbresult);
_rec = new WdbeQModRef1NSignal();
if (dbrow[0]) _rec->qref = atoll((char*) dbrow[0]); else _rec->qref = 0;
if (dbrow[1]) _rec->jref = atoll((char*) dbrow[1]); else _rec->jref = 0;
if (dbrow[2]) _rec->jnum = atol((char*) dbrow[2]); else _rec->jnum = 0;
if (dbrow[3]) _rec->ref = atoll((char*) dbrow[3]); else _rec->ref = 0;
if (dbrow[4]) _rec->refNum = atol((char*) dbrow[4]); else _rec->refNum = 0;
retval = true;
};
mysql_free_result(dbresult);
*rec = _rec;
return retval;
};
ubigint MyTblWdbeQModRef1NSignal::loadRstBySQL(
const string& sqlstr
, const bool append
, ListWdbeQModRef1NSignal& rst
) {
MYSQL_RES* dbresult; MYSQL_ROW dbrow; ubigint numrow; ubigint numread = 0;
WdbeQModRef1NSignal* rec;
if (!append) rst.clear();
if (mysql_real_query(dbs, sqlstr.c_str(), sqlstr.length())) {
string dbms = "MyTblWdbeQModRef1NSignal::loadRstBySQL() / " + string(mysql_error(dbs));
throw SbeException(SbeException::DBS_QUERY, {{"dbms",dbms}, {"sql",sqlstr}});
};
dbresult = mysql_store_result(dbs);
if (!dbresult) {
string dbms = "MyTblWdbeQModRef1NSignal::loadRstBySQL() / store result / " + string(mysql_error(dbs));
throw SbeException(SbeException::DBS_QUERY, {{"dbms",dbms}, {"sql",sqlstr}});
};
numrow = mysql_num_rows(dbresult);
if (numrow > 0) {
rst.nodes.reserve(rst.nodes.size() + numrow);
while (numread < numrow) {
dbrow = mysql_fetch_row(dbresult);
rec = new WdbeQModRef1NSignal();
if (dbrow[0]) rec->qref = atoll((char*) dbrow[0]); else rec->qref = 0;
if (dbrow[1]) rec->jref = atoll((char*) dbrow[1]); else rec->jref = 0;
if (dbrow[2]) rec->jnum = atol((char*) dbrow[2]); else rec->jnum = 0;
if (dbrow[3]) rec->ref = atoll((char*) dbrow[3]); else rec->ref = 0;
if (dbrow[4]) rec->refNum = atol((char*) dbrow[4]); else rec->refNum = 0;
rst.nodes.push_back(rec);
numread++;
};
};
mysql_free_result(dbresult);
return(numread);
};
ubigint MyTblWdbeQModRef1NSignal::insertRec(
WdbeQModRef1NSignal* rec
) {
unsigned long l[4]; my_bool n[4]; my_bool e[4];
MYSQL_BIND bind[] = {
bindUbigint(&rec->jref,&(l[0]),&(n[0]),&(e[0])),
bindUint(&rec->jnum,&(l[1]),&(n[1]),&(e[1])),
bindUbigint(&rec->ref,&(l[2]),&(n[2]),&(e[2])),
bindUint(&rec->refNum,&(l[3]),&(n[3]),&(e[3]))
};
if (mysql_stmt_bind_param(stmtInsertRec, bind)) {
string dbms = "MyTblWdbeQModRef1NSignal::insertRec() / bind / " + string(mysql_error(dbs));
throw SbeException(SbeException::DBS_STMTEXEC, {{"dbms",dbms}});
};
if (mysql_stmt_execute(stmtInsertRec)) {
string dbms = "MyTblWdbeQModRef1NSignal::insertRec() / " + string(mysql_error(dbs));
throw SbeException(SbeException::DBS_STMTEXEC, {{"dbms",dbms}});
};
rec->qref = mysql_stmt_insert_id(stmtInsertRec);
return rec->qref;
};
void MyTblWdbeQModRef1NSignal::insertRst(
ListWdbeQModRef1NSignal& rst
) {
for (unsigned int i = 0; i < rst.nodes.size(); i++) insertRec(rst.nodes[i]);
};
void MyTblWdbeQModRef1NSignal::updateRec(
WdbeQModRef1NSignal* rec
) {
unsigned long l[5]; my_bool n[5]; my_bool e[5];
MYSQL_BIND bind[] = {
bindUbigint(&rec->jref,&(l[0]),&(n[0]),&(e[0])),
bindUint(&rec->jnum,&(l[1]),&(n[1]),&(e[1])),
bindUbigint(&rec->ref,&(l[2]),&(n[2]),&(e[2])),
bindUint(&rec->refNum,&(l[3]),&(n[3]),&(e[3])),
bindUbigint(&rec->qref,&(l[4]),&(n[4]),&(e[4]))
};
if (mysql_stmt_bind_param(stmtUpdateRec, bind)) {
string dbms = "MyTblWdbeQModRef1NSignal::updateRec() / bind / " + string(mysql_error(dbs));
throw SbeException(SbeException::DBS_STMTEXEC, {{"dbms",dbms}});
};
if (mysql_stmt_execute(stmtUpdateRec)) {
string dbms = "MyTblWdbeQModRef1NSignal::updateRec() / " + string(mysql_error(dbs));
throw SbeException(SbeException::DBS_STMTEXEC, {{"dbms",dbms}});
};
};
void MyTblWdbeQModRef1NSignal::updateRst(
ListWdbeQModRef1NSignal& rst
) {
for (unsigned int i = 0; i < rst.nodes.size(); i++) updateRec(rst.nodes[i]);
};
void MyTblWdbeQModRef1NSignal::removeRecByQref(
ubigint qref
) {
unsigned long l; my_bool n; my_bool e;
MYSQL_BIND bind = bindUbigint(&qref,&l,&n,&e);
if (mysql_stmt_bind_param(stmtRemoveRecByQref, &bind)) {
string dbms = "MyTblWdbeQModRef1NSignal::removeRecByQref() / bind / " + string(mysql_error(dbs));
throw SbeException(SbeException::DBS_STMTEXEC, {{"dbms",dbms}});
};
if (mysql_stmt_execute(stmtRemoveRecByQref)) {
string dbms = "MyTblWdbeQModRef1NSignal::removeRecByQref() / " + string(mysql_error(dbs));
throw SbeException(SbeException::DBS_STMTEXEC, {{"dbms",dbms}});
};
};
void MyTblWdbeQModRef1NSignal::removeRstByJref(
ubigint jref
) {
unsigned long l; my_bool n; my_bool e;
MYSQL_BIND bind = bindUbigint(&jref,&l,&n,&e);
if (mysql_stmt_bind_param(stmtRemoveRstByJref, &bind)) {
string dbms = "MyTblWdbeQModRef1NSignal::removeRstByJref() / bind / " + string(mysql_error(dbs));
throw SbeException(SbeException::DBS_STMTEXEC, {{"dbms",dbms}});
};
if (mysql_stmt_execute(stmtRemoveRstByJref)) {
string dbms = "MyTblWdbeQModRef1NSignal::removeRstByJref() / " + string(mysql_error(dbs));
throw SbeException(SbeException::DBS_STMTEXEC, {{"dbms",dbms}});
};
};
bool MyTblWdbeQModRef1NSignal::loadRecByQref(
ubigint qref
, WdbeQModRef1NSignal** rec
) {
if (qref == 0) {
*rec = NULL;
return false;
};
return loadRecBySQL("SELECT * FROM TblWdbeQModRef1NSignal WHERE qref = " + to_string(qref), rec);
};
ubigint MyTblWdbeQModRef1NSignal::loadRstByJref(
ubigint jref
, const bool append
, ListWdbeQModRef1NSignal& rst
) {
return loadRstBySQL("SELECT * FROM TblWdbeQModRef1NSignal WHERE jref = " + to_string(jref) + " ORDER BY jnum ASC", append, rst);
};
#endif
#if defined(SBECORE_PG)
/******************************************************************************
class PgTblWdbeQModRef1NSignal
******************************************************************************/
PgTblWdbeQModRef1NSignal::PgTblWdbeQModRef1NSignal() :
TblWdbeQModRef1NSignal()
, PgTable()
{
};
PgTblWdbeQModRef1NSignal::~PgTblWdbeQModRef1NSignal() {
};
void PgTblWdbeQModRef1NSignal::initStatements() {
createStatement("TblWdbeQModRef1NSignal_insertRec", "INSERT INTO TblWdbeQModRef1NSignal (jref, jnum, ref, refNum) VALUES ($1,$2,$3,$4) RETURNING qref", 4);
createStatement("TblWdbeQModRef1NSignal_updateRec", "UPDATE TblWdbeQModRef1NSignal SET jref = $1, jnum = $2, ref = $3, refNum = $4 WHERE qref = $5", 5);
createStatement("TblWdbeQModRef1NSignal_removeRecByQref", "DELETE FROM TblWdbeQModRef1NSignal WHERE qref = $1", 1);
createStatement("TblWdbeQModRef1NSignal_removeRstByJref", "DELETE FROM TblWdbeQModRef1NSignal WHERE jref = $1", 1);
createStatement("TblWdbeQModRef1NSignal_loadRecByQref", "SELECT qref, jref, jnum, ref, refNum FROM TblWdbeQModRef1NSignal WHERE qref = $1", 1);
createStatement("TblWdbeQModRef1NSignal_loadRstByJref", "SELECT qref, jref, jnum, ref, refNum FROM TblWdbeQModRef1NSignal WHERE jref = $1 ORDER BY jnum ASC", 1);
};
bool PgTblWdbeQModRef1NSignal::loadRec(
PGresult* res
, WdbeQModRef1NSignal** rec
) {
char* ptr;
WdbeQModRef1NSignal* _rec = NULL;
bool retval = false;
if (PQntuples(res) == 1) {
_rec = new WdbeQModRef1NSignal();
int fnum[] = {
PQfnumber(res, "qref"),
PQfnumber(res, "jref"),
PQfnumber(res, "jnum"),
PQfnumber(res, "ref"),
PQfnumber(res, "refnum")
};
ptr = PQgetvalue(res, 0, fnum[0]); _rec->qref = atoll(ptr);
ptr = PQgetvalue(res, 0, fnum[1]); _rec->jref = atoll(ptr);
ptr = PQgetvalue(res, 0, fnum[2]); _rec->jnum = atol(ptr);
ptr = PQgetvalue(res, 0, fnum[3]); _rec->ref = atoll(ptr);
ptr = PQgetvalue(res, 0, fnum[4]); _rec->refNum = atol(ptr);
retval = true;
};
PQclear(res);
*rec = _rec;
return retval;
};
ubigint PgTblWdbeQModRef1NSignal::loadRst(
PGresult* res
, const bool append
, ListWdbeQModRef1NSignal& rst
) {
ubigint numrow; ubigint numread = 0; char* ptr;
WdbeQModRef1NSignal* rec;
if (!append) rst.clear();
numrow = PQntuples(res);
if (numrow > 0) {
rst.nodes.reserve(rst.nodes.size() + numrow);
int fnum[] = {
PQfnumber(res, "qref"),
PQfnumber(res, "jref"),
PQfnumber(res, "jnum"),
PQfnumber(res, "ref"),
PQfnumber(res, "refnum")
};
while (numread < numrow) {
rec = new WdbeQModRef1NSignal();
ptr = PQgetvalue(res, numread, fnum[0]); rec->qref = atoll(ptr);
ptr = PQgetvalue(res, numread, fnum[1]); rec->jref = atoll(ptr);
ptr = PQgetvalue(res, numread, fnum[2]); rec->jnum = atol(ptr);
ptr = PQgetvalue(res, numread, fnum[3]); rec->ref = atoll(ptr);
ptr = PQgetvalue(res, numread, fnum[4]); rec->refNum = atol(ptr);
rst.nodes.push_back(rec);
numread++;
};
};
PQclear(res);
return numread;
};
bool PgTblWdbeQModRef1NSignal::loadRecByStmt(
const string& srefStmt
, const unsigned int N
, const char** vals
, const int* l
, const int* f
, WdbeQModRef1NSignal** rec
) {
PGresult* res;
res = PQexecPrepared(dbs, srefStmt.c_str(), N, vals, l, f, 0);
if (PQresultStatus(res) != PGRES_TUPLES_OK) {
string dbms = "PgTblWdbeQModRef1NSignal::loadRecByStmt(" + srefStmt + ") / " + string(PQerrorMessage(dbs));
throw SbeException(SbeException::DBS_STMTEXEC, {{"dbms",dbms}});
};
return loadRec(res, rec);
};
ubigint PgTblWdbeQModRef1NSignal::loadRstByStmt(
const string& srefStmt
, const unsigned int N
, const char** vals
, const int* l
, const int* f
, const bool append
, ListWdbeQModRef1NSignal& rst
) {
PGresult* res;
res = PQexecPrepared(dbs, srefStmt.c_str(), N, vals, l, f, 0);
if (PQresultStatus(res) != PGRES_TUPLES_OK) {
string dbms = "PgTblWdbeQModRef1NSignal::loadRstByStmt(" + srefStmt + ") / " + string(PQerrorMessage(dbs));
throw SbeException(SbeException::DBS_STMTEXEC, {{"dbms",dbms}});
};
return loadRst(res, append, rst);
};
bool PgTblWdbeQModRef1NSignal::loadRecBySQL(
const string& sqlstr
, WdbeQModRef1NSignal** rec
) {
PGresult* res;
res = PQexec(dbs, sqlstr.c_str());
if (PQresultStatus(res) != PGRES_TUPLES_OK) {
string dbms = "PgTblWdbeQModRef1NSignal::loadRecBySQL() / " + string(PQerrorMessage(dbs));
throw SbeException(SbeException::DBS_QUERY, {{"dbms",dbms}, {"sql",sqlstr}});
};
return loadRec(res, rec);
};
ubigint PgTblWdbeQModRef1NSignal::loadRstBySQL(
const string& sqlstr
, const bool append
, ListWdbeQModRef1NSignal& rst
) {
PGresult* res;
res = PQexec(dbs, sqlstr.c_str());
if (PQresultStatus(res) != PGRES_TUPLES_OK) {
string dbms = "PgTblWdbeQModRef1NSignal::loadRstBySQL() / " + string(PQerrorMessage(dbs));
throw SbeException(SbeException::DBS_QUERY, {{"dbms",dbms}, {"sql",sqlstr}});
};
return loadRst(res, append, rst);
};
ubigint PgTblWdbeQModRef1NSignal::insertRec(
WdbeQModRef1NSignal* rec
) {
PGresult* res;
char* ptr;
ubigint _jref = htonl64(rec->jref);
uint _jnum = htonl(rec->jnum);
ubigint _ref = htonl64(rec->ref);
uint _refNum = htonl(rec->refNum);
const char* vals[] = {
(char*) &_jref,
(char*) &_jnum,
(char*) &_ref,
(char*) &_refNum
};
const int l[] = {
sizeof(ubigint),
sizeof(uint),
sizeof(ubigint),
sizeof(uint)
};
const int f[] = {1, 1, 1, 1};
res = PQexecPrepared(dbs, "TblWdbeQModRef1NSignal_insertRec", 4, vals, l, f, 0);
if (PQresultStatus(res) != PGRES_TUPLES_OK) {
string dbms = "PgTblWdbeQModRef1NSignal::insertRec() / " + string(PQerrorMessage(dbs));
throw SbeException(SbeException::DBS_STMTEXEC, {{"dbms",dbms}});
};
ptr = PQgetvalue(res, 0, PQfnumber(res, "qref")); rec->qref = atoll(ptr);
PQclear(res);
return rec->qref;
};
void PgTblWdbeQModRef1NSignal::insertRst(
ListWdbeQModRef1NSignal& rst
) {
for (unsigned int i = 0; i < rst.nodes.size(); i++) insertRec(rst.nodes[i]);
};
void PgTblWdbeQModRef1NSignal::updateRec(
WdbeQModRef1NSignal* rec
) {
PGresult* res;
ubigint _jref = htonl64(rec->jref);
uint _jnum = htonl(rec->jnum);
ubigint _ref = htonl64(rec->ref);
uint _refNum = htonl(rec->refNum);
ubigint _qref = htonl64(rec->qref);
const char* vals[] = {
(char*) &_jref,
(char*) &_jnum,
(char*) &_ref,
(char*) &_refNum,
(char*) &_qref
};
const int l[] = {
sizeof(ubigint),
sizeof(uint),
sizeof(ubigint),
sizeof(uint),
sizeof(ubigint)
};
const int f[] = {1, 1, 1, 1, 1};
res = PQexecPrepared(dbs, "TblWdbeQModRef1NSignal_updateRec", 5, vals, l, f, 0);
if (PQresultStatus(res) != PGRES_COMMAND_OK) {
string dbms = "PgTblWdbeQModRef1NSignal::updateRec() / " + string(PQerrorMessage(dbs));
throw SbeException(SbeException::DBS_STMTEXEC, {{"dbms",dbms}});
};
PQclear(res);
};
void PgTblWdbeQModRef1NSignal::updateRst(
ListWdbeQModRef1NSignal& rst
) {
for (unsigned int i = 0; i < rst.nodes.size(); i++) updateRec(rst.nodes[i]);
};
void PgTblWdbeQModRef1NSignal::removeRecByQref(
ubigint qref
) {
PGresult* res;
ubigint _qref = htonl64(qref);
const char* vals[] = {
(char*) &_qref
};
const int l[] = {
sizeof(ubigint)
};
const int f[] = {1};
res = PQexecPrepared(dbs, "TblWdbeQModRef1NSignal_removeRecByQref", 1, vals, l, f, 0);
if (PQresultStatus(res) != PGRES_COMMAND_OK) {
string dbms = "PgTblWdbeQModRef1NSignal::removeRecByQref() / " + string(PQerrorMessage(dbs));
throw SbeException(SbeException::DBS_STMTEXEC, {{"dbms",dbms}});
};
PQclear(res);
};
void PgTblWdbeQModRef1NSignal::removeRstByJref(
ubigint jref
) {
PGresult* res;
ubigint _jref = htonl64(jref);
const char* vals[] = {
(char*) &_jref
};
const int l[] = {
sizeof(ubigint)
};
const int f[] = {1};
res = PQexecPrepared(dbs, "TblWdbeQModRef1NSignal_removeRstByJref", 1, vals, l, f, 0);
if (PQresultStatus(res) != PGRES_COMMAND_OK) {
string dbms = "PgTblWdbeQModRef1NSignal::removeRstByJref() / " + string(PQerrorMessage(dbs));
throw SbeException(SbeException::DBS_STMTEXEC, {{"dbms",dbms}});
};
PQclear(res);
};
bool PgTblWdbeQModRef1NSignal::loadRecByQref(
ubigint qref
, WdbeQModRef1NSignal** rec
) {
if (qref == 0) {
*rec = NULL;
return false;
};
ubigint _qref = htonl64(qref);
const char* vals[] = {
(char*) &_qref
};
const int l[] = {
sizeof(ubigint)
};
const int f[] = {1};
return loadRecByStmt("TblWdbeQModRef1NSignal_loadRecByQref", 1, vals, l, f, rec);
};
ubigint PgTblWdbeQModRef1NSignal::loadRstByJref(
ubigint jref
, const bool append
, ListWdbeQModRef1NSignal& rst
) {
ubigint _jref = htonl64(jref);
const char* vals[] = {
(char*) &_jref
};
const int l[] = {
sizeof(ubigint)
};
const int f[] = {1};
return loadRstByStmt("TblWdbeQModRef1NSignal_loadRstByJref", 1, vals, l, f, append, rst);
};
#endif
| [
"aw@mpsitech.com"
] | aw@mpsitech.com |
48b75fddfdcc68888eda2c905b5848f0eeb0922a | 141218007b3789ee697b75fb560dba848a3d53db | /1004/main.cpp | 193015c8befc9197bec8981390b31f1611fa8a43 | [] | no_license | muzhailong/51nod | 63b503dbe1fc5bd0913ce71a3f7c59207f3477c4 | a5b63fa3ae5b7249839bcbb217717cf8de863506 | refs/heads/master | 2021-07-25T02:21:52.705497 | 2017-11-06T05:02:23 | 2017-11-06T05:02:23 | 109,591,550 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 387 | cpp | #include <iostream>
using namespace std;
int quick_mod(int x, int n, int m)
{
int result = 1;
while (n) {
if (n & 1) {
result = (result * x) % m;
}
n >>= 1;
x = (x * x) % m;
}
return result;
}
int main()
{
ios::sync_with_stdio(false);
int n;
cin >> n;
cout << quick_mod(n % 10, n, 10);
return 0;
} | [
"1993414600@qq.com"
] | 1993414600@qq.com |
a9202012d1c9a8a7bde2556371e9a9c7a3ea77eb | 5ef779887715d0331fb301f286892bb42d5675f8 | /include/components/qtmaterialcircularprogress.h | 2745002ffa48fcb2a6109f926b68a18e085fd58e | [] | no_license | BriFuture/bf_ui_lib | 2243422995be11c3ae47e13f2ef2cfb02ba4530a | 1a16a8e3c591c2242a801a296ce5db7e8827fd9c | refs/heads/master | 2020-06-23T09:24:46.803651 | 2019-10-27T12:15:15 | 2019-10-27T12:15:15 | 198,583,457 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,287 | h | #ifndef QTMATERIALCIRCULARPROGRESS_H
#define QTMATERIALCIRCULARPROGRESS_H
#include <QtWidgets/QProgressBar>
#include "lib/qtmaterialtheme.h"
class QtMaterialCircularProgressPrivate;
#include "builib_components_global.h"
class BUILIB_COMP_EXPORT QtMaterialCircularProgress : public QProgressBar
{
Q_OBJECT
Q_PROPERTY(qreal lineWidth WRITE setLineWidth READ lineWidth)
Q_PROPERTY(qreal size WRITE setSize READ size)
Q_PROPERTY(QColor color WRITE setColor READ color)
public:
explicit QtMaterialCircularProgress(QWidget *parent = 0);
~QtMaterialCircularProgress();
void setProgressType(Material::ProgressType type);
Material::ProgressType progressType() const;
void setUseThemeColors(bool value);
bool useThemeColors() const;
void setLineWidth(qreal width);
qreal lineWidth() const;
void setSize(int size);
int size() const;
void setColor(const QColor &color);
QColor color() const;
QSize sizeHint() const Q_DECL_OVERRIDE;
protected:
void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE;
const QScopedPointer<QtMaterialCircularProgressPrivate> d_ptr;
private:
Q_DISABLE_COPY(QtMaterialCircularProgress)
Q_DECLARE_PRIVATE(QtMaterialCircularProgress)
};
#endif // QTMATERIALCIRCULARPROGRESS_H
| [
"752736341@qq.com"
] | 752736341@qq.com |
2a7025d0a8635e5aaf4473918deef35769f44fb6 | d63a8cd9319832159a99706d3ab37f240ad00859 | /include/dukat/meshdata.h | cdb09cbe4668876ff0356c5beb83ed988d3de697 | [
"MIT"
] | permissive | fromasmtodisasm/dukat | 94d471fda60ca6d82482de73493e97ba6a5f8822 | 6b812d460388c4113d60744d4142251060d6bb0e | refs/heads/master | 2023-08-31T13:24:17.388013 | 2021-09-29T22:36:16 | 2021-09-29T22:36:16 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,730 | h | #pragma once
#include <memory>
#include <string>
#include <vector>
#ifndef OPENGL_VERSION
#include "version.h"
#endif // !OPENGL_VERSION
#include "buffers.h"
namespace dukat
{
// Forward declarations
class ShaderProgram;
struct VertexAttribute
{
const std::string alias;
const int components;
const GLenum type;
int offset;
VertexAttribute(const std::string& alias, int components, int offset = -1, GLenum type = GL_FLOAT)
: alias(alias), components(components), type(type), offset(offset) { };
};
class MeshData
{
private:
const GLenum mode;
const int max_vertices;
const int max_indices;
const bool static_mesh;
std::vector<VertexAttribute> attributes;
// Buffer containing vertex data at index 0, and optionally index data at index 1.
std::unique_ptr<VertexBuffer> buffer;
public:
// Creates a new mesh with given attributes.
MeshData(GLenum mode, int max_vertices, int max_indices,
const std::vector<VertexAttribute>& attributes, bool static_mesh = true);
~MeshData(void) { }
// Sets vertices and indices. If not provided, count is assumed to be
// max count as provided during mesh construction.
void set_vertices(const std::vector<GLfloat>& vertices, int vertex_count = 0);
void set_vertices(const std::vector<GLshort>& vertices, int vertex_count = 0);
void set_vertices(const GLvoid* vertices, int vertex_count = 0);
void set_indices(const std::vector<GLushort>& indicies, int index_count = 0);
void set_indices(const GLvoid* indices, int index_count = 0);
int vertex_count(void) const { return buffer->counts[0]; }
void set_vertex_count(int count) { buffer->counts[0] = count; }
// Renders this mesh.
void render(ShaderProgram* program);
};
} | [
"bdamer@gmail.com"
] | bdamer@gmail.com |
f933ad22af9e881c0e66dbe30980ac6d9f2d99c1 | 05065f8450fffe362a6bc134dcab5727d02de6e7 | /my_lex/lex_sys.cpp | a97dd4d6272d1df5a055d0d676726c14472ab262 | [] | no_license | zmr961006/Compilers_Cool | 2cfed7a2c8c9d2f82cf544c50788e2d01566dd36 | 9d88efe93872f709b18ba96879f6ec5aacf1d518 | refs/heads/master | 2020-09-15T10:44:16.695617 | 2016-11-24T14:12:42 | 2016-11-24T14:12:42 | 67,614,377 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 29,075 | cpp | /*************************************************************************
> File Name: lex_sys.cpp
> Author:
> Mail:
> Created Time: 2016年10月14日 星期五 14时50分47秒
************************************************************************/
#include<iostream>
#include<stack>
#include"./lex_file.h"
#include"./lex_more.h"
#include"./lex_sys.h"
using namespace std;
extern lex_word word_table[LEX_TABLE];
int lex_sys(){
lex_word_enum(); /*构造yy.l.c 的词法定义表*/
lex_RE();
}
int lex_word_enum(){
char buf[30];
memset(buf,0,30);
std::string name("");
const char * eum = "enum Token \n { \n";
memcpy(buf,eum,17);
write_infile(name,buf,17);
lex_word * temp;
temp = word_table[0].next;
while(temp != NULL){
char word_file[20];
memset(word_file,0,20);
memcpy(word_file,temp->val_word,temp->length);
write_infile_all(word_file,temp->length);
write_infile_ch(',');
temp = temp->next;
}
char temp_buf[10];
memcpy(temp_buf,"END",3);
write_infile_all(temp_buf,3);
memcpy(temp_buf,"\n};\n",3);
write_infile(name,temp_buf,3);
}
int lex_RE(){
lex_word *temp;
temp = word_table[1].next;
while(temp != NULL){
//std::cout << temp->val_word << std::endl;
get_RE_tree(temp);
temp = temp->next;
}
//std::cout << "~~~~~~~~" << std::endl;
test_tree();
}
stack<tree_node*> S_data ;
stack<tree_node*> S_opera;
stack<tree_node*> S_temp;
int get_RE_tree(lex_word * temp){
int i = 0;
char re_RE[100];
char re_WORD[100];
memset(re_RE,0,100);
memset(re_WORD,0,100);
//std::cout << "the token " << temp->Token << std::endl;
memcpy(re_RE,temp->val_word,temp->val_length);
memcpy(re_WORD,temp->key_word,temp->length);
int postion = 1;
char buf[100];
memset(buf,0,100);
int index = 0;
char forward;
char start;
char last ;
for(index = 0;index < temp->val_length ;index++){
start = re_RE[index];
forward = re_RE[index + 1];
last = re_RE[index - 1];
buf[i] = start;
if(((start == '}') && (forward == '(')) || (start == '*') || (start == '?')
||((start == '+') && (forward == '(') ) ){
i++;
buf[i] = '_';
}else if(last == '\\'){
i++;
buf[i] = '_';
}else if((start == '+' || start == '?' || start == '*' || start == '}') && (index + 1 >= temp->val_length)){
i++;
buf[i] = '_';
}else if((start == '}') && (forward == '{')){
i++;
buf[i] = '_';
}
//std::cout << start << ":" << std::endl;
i++;
}
buf[i] = '#';
std::cout << buf << std::endl;
if(temp->Token == CHLIST){
tree_node * root ;
root = (tree_node *)malloc(sizeof(tree_node));
temp->root = root;
root->right = NULL;
root->left = NULL;
root->node_length = 1;
char c_start = 0;
char c_forward = 0;
char c_last = 0;
int flag = 0;
while(1){
c_start = buf[flag];
c_forward = buf[flag + 1];
c_last = buf[flag - 1];
if(c_start == ']'){
return 0;
}
if(c_start == '-'){
char begin = c_last;
char end = c_forward;
int num = c_forward - c_last;
flag += 2;
for(int i = 0;i <=num ;i++){
tree_node * elum;
elum = (tree_node *)malloc(sizeof(tree_node));
elum->buf[0] = begin + i;
elum->node_length = 1;
elum->right = NULL;
elum->left = NULL;
if(root->node_length == 1){
root->right = elum;
root->left = elum;
root->node_length = 0;
}else{
root->left->right = elum;
root->left = elum;
}
}
}else if(c_start == '\\'){
tree_node * node ;
node = (tree_node *)malloc(sizeof(tree_node));
node->node_length = 2;
node->buf[0] = c_start;
node->buf[1] = c_forward;
node->left = NULL;
node->right = NULL;
if(root->node_length == 1){
root->right = node;
root->left = node;
root->node_length = 0;
}else{
root->left->right = node;
root->left = node;
}
flag+=2;
}
flag++;
}
}
if(temp->Token == RREEX){
char start = 0;
char forward = 0;
char last = 0;
int num = i;
//std::cout << "hello world" << std::endl;
//std::cout << buf << std::endl;
for(int index = 0;index <= num ;index++){
start = buf[index];
forward = buf[index + 1];
int in_bracket = 0;
if(start == '{'){
char name[10];
int h = 0;
memset(name,0,10);
index++;
while(1){
char obj = buf[index + h];
if(obj == '}'){
break;
}
name[h] = buf[index + h];
h++;
}
//std::cout << "*" <<name << std::endl;
index += h;
tree_node * data;
data = (tree_node *)malloc(sizeof(tree_node));
memcpy(data->buf,name,h);
data->node_length = h;
data->left = NULL;
data->right = NULL;
data->number = postion;
data->firstpos = NULL;
data->lastpos = NULL;
data->fellowpos = NULL;
data->first_num = 0;
data->last_num = 0;
data->operato = 0 ;
postion++;
S_data.push(data);
//std::cout << "push " << data->buf << std::endl;
}else if(start == '_' || start == '?' || start == '*' || start == '+' || start == ')' || start == '('
|| start == '|' || start == '\\'){
if(S_opera.empty()){
tree_node * node;
node = (tree_node *)malloc(sizeof(tree_node));
node->node_length = 1;
node->left = NULL;
node->right = NULL;
node->buf[0] = start;
node->firstpos = NULL;
node->lastpos = NULL;
node->fellowpos = NULL;
node->first_num = 0;
node->last_num = 0;
node->fellow_num = 0;
node->operato = 1;
S_opera.push(node);
//std::cout << "push " << node->buf << std::endl;
}else{
while(1){
char op;
//std::cout << "HHHHHHHHHHHHHHH" << std::endl;
if(S_opera.empty()){
tree_node *node = (tree_node *)malloc(sizeof(tree_node));
node->buf[0] = start;
node->node_length = 0;
node->right = NULL;
node->left = NULL;
node->firstpos = NULL;
node->lastpos = NULL;
node->fellowpos = NULL;
node->first_num = 0;
node->last_num = 0;
node->fellow_num = 0;
node->operato = 1;
S_opera.push(node);
//std::cout << "push " << node->buf << std::endl;
break;
}
tree_node *top = S_opera.top();
if(is_bigger(start,top->buf[0]) < 0){
tree_node * node = (tree_node *)malloc(sizeof(tree_node));
node->node_length = 1;
node->buf[0] = start;
node->left = NULL;
node->right = NULL;
node->firstpos = NULL;
node->lastpos = NULL;
node->fellowpos = NULL;
node->first_num = 0;
node->last_num = 0;
node->fellow_num = 0;
node->operato = 1;
S_opera.push(node);
//std::cout << "push " << node->buf << std::endl;
break;
}else if(is_bigger(start,top->buf[0]) > 0){
do_oper(start,forward);
break;
}else if(is_bigger(start,top->buf[0]) == 0){
tree_node *top_node;
top_node = S_opera.top();
S_opera.pop();
//std::cout << "pop " << top_node->buf << std::endl ;
if(is_onepart(start,top_node->buf[0])){
do_oper(top_node->buf[0],start);
}else{
S_opera.push(top_node);
do_oper(start,top_node->buf[0]);
break;
}
}
/*if(start == '\\'){
std::cout << "next" << start << std::endl;
index++;
}*/
}
if(start == '\\'){
//std::cout << "next" << start << std::endl;
index+=1;
}
}
}else{ /* '#' and other letter*/
tree_node *node = (tree_node *)malloc(sizeof(tree_node));
node->buf[0] = start;
node->node_length = 0;
node->right = NULL;
node->left = NULL;
node->firstpos = NULL;
node->lastpos = NULL;
node->fellowpos = NULL;
node->first_num = 0;
node->last_num = 0;
node->fellow_num = 0;
node->operato = 0;
//std::cout << node->buf << std::endl;
node->number = postion;
postion++;
S_data.push(node);
//std::cout << "push " << node->buf << std::endl;
}
}
while(!S_opera.empty()){
tree_node * node ;
node = (tree_node *)malloc(sizeof(tree_node));
node = S_opera.top();
S_opera.pop();
//std::cout << "pop " << node->buf << std::endl;
do_oper(node->buf[0],' ');
}
temp->root = S_data.top();
S_data.pop();
//std::cout << "pop " << temp->root->buf << std::endl;
//test_tree();
}
}
int test_list(){
lex_word *node;
node = word_table[1].next;
while(node != NULL){
tree_node * temp;
temp = node->root;
int i = 0;
while(temp != NULL){
i = temp->node_length;
for(int j = 0;j < i;j++){
//std::cout << temp->buf[j]<< std::endl;
}
temp = temp->right;
}
node = node->next;
}
}
int is_bigger(char new_char,char top_char){
int level_new = 0;
int level_top = 0;
level_new = get_level(new_char);
level_top = get_level(top_char);
return (level_new - level_top);
}
int get_level(char ch){
if((ch == '\\')){
return 5;
}
if((ch == '(') || (ch == ')') || (ch == '[') || (ch == ']')){
return 4;
}
if((ch == '*') || (ch == '+') || (ch == '?') || (ch == '_')){
return 3;
}
if((ch == '^') || (ch == '$')){
return 2;
}
if((ch == '|')){
return 1;
}
}
int do_oper(char ch,char forward){
if(ch == '+'){
tree_node *node ;
node = (tree_node *)malloc(sizeof(tree_node));
tree_node *obj;
obj = S_data.top();
S_data.pop();
//std::cout << "pop " << obj->buf << std::endl;
node->node_length = 1;
node->buf[0] = '+';
node->left = obj;
node->right = NULL;
node->firstpos = NULL;
node->lastpos = NULL;
node->fellowpos = NULL;
node->first_num = 0;
node->last_num = 0;
node->fellow_num = 0;
node->operato = 1;
S_data.push(node);
//std::cout << "push " << node->buf << std::endl;
}else if(ch == '_'){
tree_node *left = NULL;
tree_node *right = NULL;
left = S_data.top();
S_data.pop();
//std::cout << "left : pop " << left->buf << std::endl;
if(!S_data.empty()){
right = S_data.top();
//std::cout << "right :pop " << right->buf << std::endl;
S_data.pop();
}
tree_node * node = (tree_node *)malloc(sizeof(tree_node));
node->node_length = 1;
node->buf[0] = '_';
node->left = left;
node->right = right;
node->firstpos = NULL;
node->lastpos = NULL;
node->fellowpos = NULL;
node->first_num = 0;
node->last_num = 0;
node->fellow_num = 0;
node->operato = 1;
S_data.push(node);
//std::cout << "push " << node->buf << std::endl;
}else if(ch == '\\'){
tree_node *node;
node = (tree_node *)malloc(sizeof(tree_node));
node->node_length = 1;
node->buf[0] = forward;
node->left = NULL;
node->right = NULL;
node->firstpos = NULL;
node->lastpos = NULL;
node->fellowpos = NULL;
node->first_num = 0;
node->last_num = 0;
node->fellow_num = 0;
node->operato = 0;
S_data.push(node);
//std::cout << "push " << node->buf << std::endl;
}else if(ch == '*'){
tree_node *node;
node = (tree_node *)malloc(sizeof(tree_node));
tree_node *left;
left = S_data.top();
S_data.pop();
//std::cout << "pop " << left->buf << std::endl;
node->buf[0] = '*';
node->node_length = 1;
node->left = left;
node->right = NULL;
node->firstpos = NULL;
node->lastpos = NULL;
node->fellowpos = NULL;
node->first_num = 0;
node->last_num = 0;
node->fellow_num = 0;
node->operato = 1;
S_data.push(node);
//std::cout << "push " << node->buf << std::endl;
}else if(ch == '('){
tree_node *node;
node = (tree_node *)malloc(sizeof(tree_node));
node->node_length = 0;
node->buf[0] = '(';
node->right = NULL;
node->left = NULL;
node->firstpos = NULL;
node->lastpos = NULL;
node->fellowpos = NULL;
node->first_num = 0;
node->last_num = 0;
node->fellow_num = 0;
S_opera.push(node);
//std::cout << "push " << node->buf << std::endl;
}else if(ch == ')'){
while(1){
tree_node * node;
node = S_opera.top();
S_opera.pop();
// std::cout << " pop from s_opera " << node->buf << std::endl;
if(node->buf[0] == '('){
break;
}
S_temp.push(node);
//std::cout << "push to S_temp " << node->buf << std::endl;
//do_oper(node->buf[0],0);
}
while(!S_temp.empty()){
tree_node *node ;
node = S_temp.top();
S_temp.pop();
//std::cout << "pop from s_temp " << node->buf << std::endl;
do_oper(node->buf[0],' ');
}
}else if(ch == '|'){
tree_node *left = NULL;
tree_node *right = NULL;
tree_node *node ;
node = (tree_node *)malloc(sizeof(tree_node));
left = S_data.top();
S_data.pop();
//std::cout << "pop " << left->buf << std::endl;
if(!S_data.empty()){
right = S_data.top();
S_data.pop();
// std::cout << "pop " << right->buf << std::endl;
}
node->buf[0] = '|';
node->node_length = 1;
node->right = right;
node->left = left;
node->firstpos = NULL;
node->lastpos = NULL;
node->fellowpos = NULL;
node->first_num = 0;
node->last_num = 0;
node->fellow_num = 0;
node->operato = 1;
S_data.push(node);
//std::cout << "push " << node->buf << std::endl;
}else if(ch == '?'){
tree_node *node;
node = (tree_node *)malloc(sizeof(tree_node));
tree_node *left;
left = S_data.top();
S_data.pop();
node->buf[0] = '?';
node->node_length = 1;
node->left = left;
node->right = NULL;
node->firstpos = NULL;
node->lastpos = NULL;
node->fellowpos = NULL;
node->first_num = 0;
node->last_num = 0;
node->fellow_num = 0;
S_data.push(node);
}
}
int test_tree(){
lex_word * node;
node = word_table[1].next;
while(node != NULL){
if(node->Token == RREEX){
find_tree(node->root); /*建立语法分析树*/
find_fellow(node->root);
test_fellowpos(node->root);
}
std::cout << "next tree" << std::endl;
node = node->next;
}
}
int find_tree(tree_node *node){
if(node){
find_tree(node->right);
find_tree(node->left);
get_pos(node);
//test_pos(node->lastpos);
}
}
int find_fellow(tree_node * node){
if(node){
find_fellow(node->right);
find_fellow(node->left);
get_and_test_fellow(node);
}
}
int is_onepart(char ch,char ch2){
if(ch == ch2){
return 1;
}
if((ch2 == '*') || (ch2 == '?') || (ch2 == '+') ){
return 1;
}
if( (ch == '*') || (ch == '?') || (ch == '+') ){
return 0;
}
}
int get_pos(tree_node *node){
get_firstpos(node,FIRSTPOS);
get_lastpos(node,LASTPOS);
}
int get_firstpos(tree_node * node, int type){
if((node->left == NULL) && (node->right == NULL)){ /*如果是叶子节点则first 就是自己*/
set *one = (set *)malloc(sizeof(set));
node->first_num = 1;
one->buf[0] = node->buf[0];
one->node = node;
one->next = NULL;
node->nullable = 0;
node->firstpos = one;
return 0;
}
if(node->buf[0] == '|' ){
tree_node * left = node->left;
tree_node * right = node->right;
//std::cout << "the number " << node->left->first_num << " " << node->right->first_num << std::endl;
set * temp = left->firstpos;
while(temp != NULL){
set * num;
num = (set *)malloc(sizeof(set));
num->buf[0] = temp->buf[0];
//std::cout << "the left " << temp->buf[0] << std::endl;
num->node = temp->node;
insert_set(node,num,FIRSTPOS);
node->first_num++;
temp = temp->next;
}
//std::cout << "the firsipos " << node->firstpos->buf[0] << std::endl;
temp = right->firstpos;
while(temp != NULL){
set *num;
num = (set *)malloc(sizeof(set));
num->buf[0] = temp->buf[0];
//std::cout << "the right " << temp->buf[0] << std::endl;
num->node = temp->node;
insert_set(node,num,FIRSTPOS);
node->first_num++;
temp = temp->next;
}
node->nullable = ((left->nullable) | (right->nullable));
}else if(node->buf[0] == '_'){
if(node->right->nullable){ /*这里由于树的左右反掉了,所以我们就按照反方向对待*/
tree_node * left = node->left;
tree_node * right = node->right;
set * temp = left->firstpos;
while(temp != NULL){
set * num;
num = (set *)malloc(sizeof(set));
num->buf[0] = temp->buf[0];
num->node = temp->node;
insert_set(node,num,FIRSTPOS);
node->first_num++;
temp = temp->next;
}
temp = right->firstpos;
while(temp != NULL){
set *num;
num = (set *)malloc(sizeof(set));
num->buf[0] = temp->buf[0];
num->node = temp->node;
insert_set(node,num,FIRSTPOS);
node->first_num++;
temp = temp->next;
}
}else{
set_copy(node,node->right->firstpos,FIRSTPOS);
}
}else if(node->buf[0] == '*'){
node->nullable = 1;
set_copy(node,node->left->firstpos,FIRSTPOS);
}
}
int is_nullable(tree_node * node){
if(node == NULL){
return 1;
}
if((node->buf[0] == '*') || (node->buf[0] == '?')){
return 1;
}
}
int insert_set(tree_node *node,set *num,int type){
set *temp;
if(type == FIRSTPOS){
temp = node->firstpos;
if(node->first_num == 0){
node->firstpos = num;
return 0;
}
while(temp->next != NULL){
temp = temp->next;
}
temp->next = num;
num->next = NULL;
}else if(type == LASTPOS){
temp = node->lastpos;
if(node->last_num == 0){
node->lastpos = num;
return 0;
}
while(temp->next != NULL){
temp = temp->next;
}
temp->next = num;
num->next = NULL;
}else if(type == FELLOWPOS){
temp = node->fellowpos;
if(node->fellow_num == 0){
node->fellowpos = num;
return 0;
}
while(temp->next != NULL){
temp = temp->next;
}
temp->next = num;
num->next = NULL;
}
}
int set_copy(tree_node * node,set * num,int type){
set * temp = num;
if(type == FIRSTPOS){
while(temp != NULL){
set * obj = (set *)malloc(sizeof(set));
obj->buf[0] = temp->buf[0];
obj->node = temp->node;
insert_set(node,obj,FIRSTPOS);
node->first_num++;
temp = temp->next;
}
}else if(type == LASTPOS){
while(temp != NULL){
set *obj = (set *)malloc(sizeof(set));
obj->buf[0] = temp->buf[0];
obj->node = temp->node;
insert_set(node,obj,LASTPOS);
node->last_num++;
temp = temp->next;
}
}else if(type == FELLOWPOS){
while(temp != NULL){
set *obj = (set *)malloc(sizeof(set));
obj->buf[0] = temp->buf[0];
obj->node = temp->node;
insert_set(node,obj,FELLOWPOS);
node->fellow_num++;
temp = temp->next;
}
}
}
int test_pos(set * pos){
set * temp;
temp = pos;
if(pos == NULL){
/*符号节点没有fellow 集合,#就是最后的接受状态*/
//std::cout << "the fellow is NULL" << std::endl;
}
while(temp != NULL){
//std::cout << temp->buf[0] << std::endl;
std::cout << temp->node->buf << std::endl;
temp = temp->next;
}
std::cout << "~~~~~~~~" << std::endl;
}
int get_lastpos(tree_node * node, int type){
if((node->left == NULL) && (node->right == NULL)){ /*如果是叶子节点则first 就是自己*/
set *one = (set *)malloc(sizeof(set));
node->last_num = 1;
one->buf[0] = node->buf[0];
one->node = node;
one->next = NULL;
node->nullable = 0;
node->lastpos = one;
return 0;
}
if(node->buf[0] == '|' ){
tree_node * left = node->left;
tree_node * right = node->right;
//std::cout << "the number " << node->left->first_num << " " << node->right->first_num << std::endl;
set * temp = left->lastpos;
while(temp != NULL){
set * num;
num = (set *)malloc(sizeof(set));
num->buf[0] = temp->buf[0];
//std::cout << "the left " << temp->buf[0] << std::endl;
num->node = temp->node;
insert_set(node,num,LASTPOS);
node->last_num++;
temp = temp->next;
}
//std::cout << "the firsipos " << node->firstpos->buf[0] << std::endl;
temp = right->lastpos;
while(temp != NULL){
set *num;
num = (set *)malloc(sizeof(set));
num->buf[0] = temp->buf[0];
//std::cout << "the right " << temp->buf[0] << std::endl;
num->node = temp->node;
insert_set(node,num,LASTPOS);
node->last_num++;
temp = temp->next;
}
node->nullable = ((left->nullable) | (right->nullable));
//std::cout << "the firsipos " << node->firstpos->next->buf[0] << std::endl;
}else if(node->buf[0] == '_'){
//std::cout << "the cat nullable is " << node->left->nullable << " ~ " << is_nullable(node->left) << std::endl;
if(node->left->nullable){ /*这里由于树的左右反掉了,所以我们就按照反方向对待*/
tree_node * left = node->left;
tree_node * right = node->right;
set * temp = left->lastpos;
while(temp != NULL){
set * num;
num = (set *)malloc(sizeof(set));
num->buf[0] = temp->buf[0];
num->node = temp->node;
insert_set(node,num,LASTPOS);
node->last_num++;
temp = temp->next;
}
temp = right->lastpos;
while(temp != NULL){
set *num;
num = (set *)malloc(sizeof(set));
num->buf[0] = temp->buf[0];
num->node = temp->node;
insert_set(node,num,LASTPOS);
node->last_num++;
temp = temp->next;
}
}else{
set_copy(node,node->left->lastpos,LASTPOS);
}
}else if(node->buf[0] == '*'){
node->nullable = 1;
set_copy(node,node->left->lastpos,LASTPOS);
}
}
int is_opera(tree_node * node){
if(node->operato){
return 1;
}else{
return 0;
}
}
int get_fellow(tree_node *node,int type){
char temp_buf = node->buf[0];
//std::cout << "prove : " << is_opera(node) << std::endl;
if(is_opera(node) && (node->buf[0] == '*')){
set * temp;
temp = node->lastpos;
while(temp != NULL){
set_copy(temp->node,node->firstpos,FELLOWPOS);
//std::cout << "ooooooooo" << std::endl;
//test_pos(temp->node->fellowpos);
//std::cout << "000000000" << std::endl;
temp = temp->next;
}
}else if(is_opera(node) && (node->buf[0] == '_')){
set * temp;
temp = node->right->lastpos;
while(temp != NULL){
set_copy(temp->node,node->left->firstpos,FELLOWPOS);
temp = temp->next;
}
}
}
int get_and_test_fellow(tree_node *node){
get_fellow(node,FELLOWPOS);
}
int test_fellowpos(tree_node *node){
if(node){
test_fellowpos(node->right);
test_fellowpos(node->left);
test_pos(node->fellowpos);
}
}
| [
"1797763610@qq.com"
] | 1797763610@qq.com |
bfedb3b2c3c34ac56bfa6ac7a96c4b478ed6e202 | 4cc0a1192bdbd396659c4cff2f4ecb1e04401ea9 | /devices/nodeMCU/NodeMCU-ReadDHT22-Basic.ino | c0f66d2aed4b0e7cba9deac738002d0c4818f55d | [
"Apache-2.0"
] | permissive | nakernk/thunderbolt | 5b65e0d4833f353403256918fc896f079b5dd77f | 0b0d7c6e1380d9f094d7e2c7fbcb0d79d73bc27a | refs/heads/master | 2021-01-19T09:24:36.790803 | 2017-02-18T16:16:27 | 2017-02-18T16:16:27 | 82,106,482 | 1 | 1 | null | 2017-03-10T18:51:24 | 2017-02-15T21:02:50 | Python | UTF-8 | C++ | false | false | 1,360 | ino | /*
AUTHOR: Fernando Gonzalez
DESCRIPTION:
Programa de lectura sensor dht22 sobre node MCU
DEPENDECIES:
DHT.h
NodeMCU ESP8266
*/
//LIBRERIAS
//#################################################################################
//LIBRERIA PARA DHT22
#include "DHT.h"
//#################################################################################
//CONSTANTES y Vars GLOBALES
#define DHTPIN 2 //GPIO 2 NodeMCU (~D4)
#define DHTTYPE DHT22 //Seleccion de sensor DHT22 (tambien esta el DHT11)
DHT dht(DHTPIN, DHTTYPE); //Declaracion para leer el sensor
//ACTIVA EL MODO DEPURACION
//Con esta variable habilitamos la depuracion con mensajes por puerto serial
const bool debugMode = true;
//################################################################################
void readTempHum(){
float temp = dht.readTemperature();
float hum = dht.readHumidity();
if(debugMode){
Serial.print("Temperatura: ");
Serial.print(temp);
Serial.print("\t\t");
Serial.print("Humedad: ");
Serial.print(hum);
}
}
void setup() {
if(debugMode){
Serial.begin(9600); //Comunicacion serial para depurar
}
dht.begin(); //Comunicacion con el sensor
}
void loop() {
readTempHum();
if(debugMode){
Serial.println(""); //Salto de linea
delay(2000); //Se espera 2 segundos para seguir leyendo
}
}
| [
"fernandogv.inf@gmail.com"
] | fernandogv.inf@gmail.com |
d32eb6efa574064978215d55efe3fe0abc812359 | ce08a32765f39e5c605208f09b600b0e55c96a0d | /include/inviwo/dicom/io/gdcmvolumereader.h | 72578b099d438ce7dad6e629fb1b38eb2f06a0bc | [] | no_license | xeTaiz/inviwo-dicom | cb04466a3e06b74ba26d9752d8b7234a7241d2c6 | 6a9d120f6b9df5d60d7b0cc4f189ac6e6de31ecb | refs/heads/master | 2023-02-15T11:56:12.310080 | 2021-01-14T07:50:39 | 2021-01-14T07:50:39 | 329,543,966 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 5,217 | h | /*********************************************************************************
*
* Inviwo - Interactive Visualization Workshop
*
* Copyright (c) 2014-2018 Inviwo Foundation
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 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.
*
*********************************************************************************/
#pragma once
#include <inviwo/dicom/dicommoduledefine.h>
#include <inviwo/core/common/inviwocoredefine.h>
#include <inviwo/core/common/inviwo.h>
#include <inviwo/core/datastructures/data.h>
#include <inviwo/core/datastructures/volume/volume.h>
#include <inviwo/core/datastructures/volume/volumedisk.h>
#include <inviwo/core/datastructures/volume/volumeramprecision.h>
#include <inviwo/core/io/datareader.h>
#include <inviwo/core/io/datareaderexception.h>
#include <inviwo/dicom/datastructures/dicomdirtypes.h>
namespace gdcm {
class DataSet;
class File;
class Image;
class ImageReader;
} // namespace gdcm
namespace inviwo {
class IVW_MODULE_DICOM_API GdcmVolumeReader : public DataReaderType<VolumeSequence> {
public:
GdcmVolumeReader();
virtual GdcmVolumeReader* clone() const;
virtual ~GdcmVolumeReader() = default;
/**
* Old function that tries to read single volume from single file.
* Apparently this can be applied to the "mevis" format.
*/
std::shared_ptr<Volume> generateVolume(const gdcm::Image& image, const gdcm::File& file);
const DataFormatBase* getFormat() { return format_; }
size3_t getDimension() { return dimension_; }
/**
* Entry point of the reader, called from VolumeSource processor
*/
virtual std::shared_ptr<VolumeSequence> readData(const std::string& filePath);
private:
/**
* Try to read all volumes contained in given path using standard format
*/
static std::shared_ptr<VolumeSequence> tryReadDICOMDIR(const std::string& fileOrDirectory);
/**
* Non-recursive version of tryReadDICOMsequenceRecursive
*/
static std::shared_ptr<VolumeSequence> tryReadDICOMsequence(
const std::string& sequenceDirectory);
/**
* Tries to read all volumes contained in given directory path, including subdirectories.
* Looks only at all the image files and ignores possibly existing DIOCMDIR.
*/
static std::shared_ptr<VolumeSequence> tryReadDICOMsequenceRecursive(
const std::string& directory);
/**
* Creates inviwo volume handle from DICOM series on disk.
* Only metadata, no actual voxels are returned.
*/
static std::shared_ptr<Volume> getVolumeDescription(dicomdir::Series& series,
const std::string& path = "");
std::string file_;
const DataFormatBase* format_;
size3_t dimension_;
std::shared_ptr<VolumeSequence> volumes_;
};
/**
* \brief A loader for dcm files. Used to create VolumeRAM representations.
* This class us used by the GdcmVolumeReader.
*/
class IVW_MODULE_DICOM_API GCDMVolumeRAMLoader
: public DiskRepresentationLoader<VolumeRepresentation> {
public:
GCDMVolumeRAMLoader(std::string file, size3_t dimension, const DataFormatBase* format,
bool isPartOfSequence = false, dicomdir::Series series = {});
virtual GCDMVolumeRAMLoader* clone() const override;
virtual ~GCDMVolumeRAMLoader() = default;
virtual std::shared_ptr<VolumeRepresentation> createRepresentation() const override;
virtual void updateRepresentation(std::shared_ptr<VolumeRepresentation> dest) const override;
using type = std::shared_ptr<VolumeRAM>;
template <class T>
std::shared_ptr<VolumeRAM> dispatch() const;
private:
void getVolumeData(const dicomdir::Series& series, void* outData) const; // static here?
std::string file_; // only relevant for single volumes
size3_t dimension_;
const DataFormatBase* format_;
bool isPartOfSequence_;
dicomdir::Series series_;
};
} // namespace inviwo
| [
"dominik.engel@mail.de"
] | dominik.engel@mail.de |
328daf002cebde28ca188c78948e8801ec32a886 | 1f63dde39fcc5f8be29f2acb947c41f1b6f1683e | /Boss2D/addon/tensorflow-1.2.1_for_boss/tensorflow/compiler/xla/service/hlo_rematerialization.cc | 5d4fd7c2deae7e1b03f49f123e2aff174ab34667 | [
"Apache-2.0",
"MIT"
] | permissive | koobonil/Boss2D | 09ca948823e0df5a5a53b64a10033c4f3665483a | e5eb355b57228a701495f2660f137bd05628c202 | refs/heads/master | 2022-10-20T09:02:51.341143 | 2019-07-18T02:13:44 | 2019-07-18T02:13:44 | 105,999,368 | 7 | 2 | MIT | 2022-10-04T23:31:12 | 2017-10-06T11:57:07 | C++ | UTF-8 | C++ | false | false | 54,886 | cc | /* Copyright 2017 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
#include "tensorflow/compiler/xla/service/hlo_rematerialization.h"
#include <algorithm>
#include <memory>
#include <set>
#include <string>
#include "tensorflow/compiler/xla/map_util.h"
#include "tensorflow/compiler/xla/primitive_util.h"
#include "tensorflow/compiler/xla/service/flatten_call_graph.h"
#include "tensorflow/compiler/xla/service/hlo_computation.h"
#include "tensorflow/compiler/xla/service/hlo_dce.h"
#include "tensorflow/compiler/xla/service/hlo_instruction.h"
#include "tensorflow/compiler/xla/service/hlo_module.h"
#include "tensorflow/compiler/xla/service/hlo_opcode.h"
#include "tensorflow/compiler/xla/service/hlo_ordering.h"
#include "tensorflow/compiler/xla/service/liveness_util.h"
#include "tensorflow/compiler/xla/service/logical_buffer.h"
#include "tensorflow/compiler/xla/status_macros.h"
#include "tensorflow/compiler/xla/statusor.h"
#include "tensorflow/compiler/xla/types.h"
#include "tensorflow/compiler/xla/util.h"
#include "tensorflow/core/lib/strings/str_util.h"
#include "tensorflow/core/lib/strings/strcat.h"
#include "tensorflow/core/lib/strings/stringprintf.h"
#include "tensorflow/core/platform/logging.h"
using ::tensorflow::strings::HumanReadableNumBytes;
namespace xla {
namespace {
// Returns true if the given instruction is rematerializable.
bool IsRematerializable(const HloInstruction* instruction) {
// Conservatively, don't rematerialize instruction with control
// dependencies. For one, control dependencies are added to prevent
// interference of aliased buffers (say, in while bodies) and
// rematerialization is ignorant of liveness and may break the intended
// ordering.
if (!instruction->control_predecessors().empty() ||
!instruction->control_successors().empty()) {
return false;
}
// Don't rematerialize instructions with side effects, those with a cost that
// might not be captured by HloCostAnalysis, or instructions which cannot be
// cloned safely.
switch (instruction->opcode()) {
case HloOpcode::kCall:
case HloOpcode::kConstant:
case HloOpcode::kCrossReplicaSum:
case HloOpcode::kCustomCall:
case HloOpcode::kOutfeed:
case HloOpcode::kInfeed:
case HloOpcode::kParameter:
case HloOpcode::kRecv:
case HloOpcode::kSend:
case HloOpcode::kTrace:
case HloOpcode::kWhile:
return false;
default:
return true;
}
}
// Class which maintains an ordered list of instructions with fast insertion
// before arbitrary elements.
class InstructionList {
public:
explicit InstructionList(const std::vector<const HloInstruction*> order) {
int64 position = 0;
for (const HloInstruction* inst : order) {
instructions_.push_back(const_cast<HloInstruction*>(inst));
instruction_iterators_.insert({const_cast<HloInstruction*>(inst),
std::next(instructions_.end(), -1)});
// Initially position numbers are uniquely assigned in order. Later as
// instructions are added with InsertBefore* methods, some instructions
// may have duplicate position numbers, but the values will be guaranteed
// to be monotonically increasing through the list, and so is still useful
// for quickly(-ish) determining the order of arbitrary instructions in
// the list.
position_number_[inst] = position;
first_at_position_[position] = inst;
position++;
}
}
// Returns the list of instructions.
const std::list<HloInstruction*>& instructions() const {
return instructions_;
}
// Insert instruction 'to_insert' immediately before instruction 'before' in
// the list.
void InsertBefore(HloInstruction* to_insert, HloInstruction* before) {
VLOG(3) << "InsertBefore: " << to_insert->name() << " before "
<< before->name();
auto it = instruction_iterators_.find(before);
CHECK(it != instruction_iterators_.end());
instruction_iterators_.insert(
{to_insert, instructions_.insert(it->second, to_insert)});
// Assign the same position number to the newly added instruction as
// 'before'. This guarantees monotonicity of the position numbers, but not
// uniqueness.
int64 pos = position_number_.at(before);
position_number_[to_insert] = pos;
if (first_at_position_.at(pos) == before) {
first_at_position_[pos] = to_insert;
}
}
// Insert instruction 'to_insert' immediately before the earliest instruction
// in 'before_instructions'.
void InsertBeforeInstructions(
HloInstruction* to_insert,
tensorflow::gtl::ArraySlice<HloInstruction*> before_instructions) {
VLOG(3) << "InsertBeforeInstructions: " << to_insert->name() << " before {"
<< tensorflow::str_util::Join(
before_instructions, ", ",
[](string* out, HloInstruction* inst) {
tensorflow::strings::StrAppend(out, inst->name());
})
<< "}";
// Find the minimal position number of any instruction in
// 'before_instructions'.
CHECK(!before_instructions.empty());
int64 min_position_number = std::numeric_limits<int64>::max();
for (const HloInstruction* instruction : before_instructions) {
min_position_number =
std::min(min_position_number, position_number_.at(instruction));
}
// Because more than one instruction in 'before_instructions' may have a
// position number of 'min_position_number', find the first such instruction
// with position number 'min_position_number'.
for (auto it = instruction_iterators_.at(
first_at_position_.at(min_position_number));
it != instructions_.end() &&
position_number_.at(*it) == min_position_number;
++it) {
if (std::find(before_instructions.begin(), before_instructions.end(),
*it) != before_instructions.end()) {
return InsertBefore(to_insert, *it);
}
}
LOG(FATAL) << "Expected to find instruction in before_instructions with "
"position number "
<< min_position_number;
}
private:
// List of instructions.
std::list<HloInstruction*> instructions_;
// Iterators for each instruction in the list.
tensorflow::gtl::FlatMap<const HloInstruction*,
std::list<HloInstruction*>::iterator>
instruction_iterators_;
// A number assigned to each instruction which increases monotonically through
// 'instructions_'. Used to facilitate fast insertion of an instruction before
// the earliest instruction in a set of instructions
// (InsertBeforeInstructions) by enabling fast-ish ordering queries between
// instructions. If position_number_[a] < position_number_[b] then 'a' comes
// before 'b' in the list. If the position numbers are the same then nothing
// can be said about their order without examining the list.
//
// On object construction this value is precisely the instruction's ordinal
// position in the list. Instructions inserted via InsertBefore receive
// duplicate values. However, monotonicity is preserved.
tensorflow::gtl::FlatMap<const HloInstruction*, int64> position_number_;
// The first instruction in the list assigned a particular position number.
tensorflow::gtl::FlatMap<int64, const HloInstruction*> first_at_position_;
};
// Return the HloInstructions which use the given LogicalBuffer. Sets
// has_indirect_users to whether any of the uses is indirect. A use is indirect
// if the instruction defining logical_buffer is not an operand of the use. This
// can happen via buffer aliasing (eg, tuples).
std::vector<const HloInstruction*> GetUsers(
const LogicalBuffer* logical_buffer,
const TuplePointsToAnalysis& points_to_analysis, bool* has_indirect_users) {
std::vector<const HloInstruction*> users;
// To identify uses iterate through all HloInstruction users of the
// BufferAliases of the logical buffer.
*has_indirect_users = false;
for (const BufferAlias& buffer_alias :
points_to_analysis.GetBufferAliases(*logical_buffer)) {
for (const HloInstruction* user : buffer_alias.instruction()->users()) {
if (DoesNotUseOperandBuffer(buffer_alias.instruction(),
buffer_alias.index(), user,
points_to_analysis)) {
// The alias may be an operand of 'user', but the LogicalBuffer cannot
// possibly be used by the instruction so ignore 'user'. This is the
// case, for example, for the tuple element buffers in a GetTupleElement
// instruction (the GTE instruction only uses the pointer vector).
continue;
}
if (buffer_alias.instruction() != logical_buffer->instruction()) {
*has_indirect_users = true;
}
// A buffer may be used by the instruction via more than one alias. For
// example, a buffer which appears in more than one element of a tuple.
if (std::find(users.begin(), users.end(), user) == users.end()) {
users.push_back(user);
}
}
}
return users;
}
// Class for tracking memory usage of a computation as the instructions are
// placed sequentially. Memory usage is the sum of the sizes of live values
// (LogicalBuffers) at the current point in the instruction sequence.
class MemoryUsageTracker {
public:
MemoryUsageTracker(
const HloComputation* computation,
const HloRematerialization::ShapeSizeFunction& size_function,
const TuplePointsToAnalysis& points_to_analysis,
const InstructionList& instruction_list);
// Starts the placement of the given instruction. This adds the sizes of the
// LogicalBuffers defined by the instruction to the current memory
// usage. Placement is broken into two steps (BeginInstruction and
// EndInstruction) to accurately model memory usage. At BeginInstruction the
// memory for the output value(s) of the current instruction is allocated. At
// EndInstruction memory for dead operand(s) is freed.
Status BeginInstruction(const HloInstruction* instruction);
// Finishes the placement of the current instruction. This frees any dead
// operands or dead result of the instruction. This must be called after
// each call to BeginInstruction.
Status EndInstruction();
// Returns the number of bytes that the current memory usage will be reduced
// if the given instruction is rematerialized.
int64 MemoryReducedIfRematerialized(const HloInstruction* instruction) const;
// Adjusts memory usage to account for the rematerialization of
// original_instruction for all remaining unplaced uses. The rematerialization
// is remat_instruction. This method should be called after the HLO graph has
// been transformed (rematerialization instruction created and connected to
// uses).
Status AddRematerializedInstruction(HloInstruction* original_instruction,
HloInstruction* remat_instruction);
// Returns whether the given instruction has been placed (BeginInstruction
// has been called with 'instruction' as the argument).
bool IsPlaced(const HloInstruction* instruction) const {
return ContainsKey(placed_instructions_, instruction);
}
// Returns the current memory usage. This is the sum of sizes of all live
// values.
int64 memory_usage() const { return memory_usage_; }
// Returns the current instruction being placed.
const HloInstruction* in_progress_instruction() const {
return in_progress_instruction_;
}
// Check invariants of the data structure. This is expensive to call.
bool Check() const;
string ToString() const;
private:
// Type holding a unique identifier for each Buffer object.
using BufferId = int64;
// A Buffer represents a single LogicalBuffer in the computation including
// various metadata useful for tracking liveness of the value. A LogicalBuffer
// is not used directly because the HLO graph is transformed and
// TuplePointsToAnalysis which owns all LogicalBuffers cannot be updated after
// HLO graph transformations.
struct Buffer {
// The unique id of this Buffer. This value is equal to the buffer's index
// in the vector buffers_.
const BufferId id;
// The instruction which defines this buffer.
const HloInstruction* defining_instruction;
// The materialized size of the buffer in bytes.
const int64 size;
// Whether this buffer is live-out of the computation.
bool live_out;
// Whether this buffer has indirect uses. Ie, an instruction which is not a
// user of defining_instruction uses this buffer. This can occur due to
// buffer aliasing (eg, tuples).
bool has_indirect_uses;
// The instructions which use this buffer.
std::vector<const HloInstruction*> users;
// The number of users (HloInstructions) of this buffer which have not yet
// been placed in the sequence.
int64 unfinished_user_count;
string ToString() const {
return tensorflow::strings::StrCat("Buffer ", id, " (defined by ",
defining_instruction->name(),
", size ", size, " bytes)");
}
};
// Creates a Buffer representing the given logical buffer. The buffer is added
// to buffers_ and a reference is returned.
Buffer& CreateBufferFromLogicalBuffer(
const LogicalBuffer* logical_buffer,
const TuplePointsToAnalysis& points_to_analysis,
const HloRematerialization::ShapeSizeFunction& size_function,
bool live_out) {
bool has_indirect_uses = false;
std::vector<const HloInstruction*> users =
GetUsers(logical_buffer, points_to_analysis, &has_indirect_uses);
return NewBuffer(logical_buffer->instruction(),
size_function(logical_buffer->shape()), std::move(users),
live_out, has_indirect_uses);
}
// Create a new buffer representing a rematerialization of given buffer for
// the given uses.
Buffer& RematerializeBuffer(
const Buffer& original_buffer, const HloInstruction* remat_instruction,
std::vector<const HloInstruction*>&& rematerialized_uses) {
CHECK(IsPlaced(original_buffer.defining_instruction));
CHECK(!original_buffer.has_indirect_uses);
CHECK(!original_buffer.live_out);
for (const HloInstruction* use : rematerialized_uses) {
CHECK(!IsPlaced(use));
}
return NewBuffer(remat_instruction, original_buffer.size,
std::move(rematerialized_uses), /*live_out=*/false,
/*has_indirect_uses=*/false);
}
// Return number of bytes allocated for the buffer with the given id. Buffers
// allocated by the calling computation (eg, parameter and output buffers) are
// considered to have zero bytes because the memory is accounted for in a
// different computation.
int64 AllocatedSize(BufferId buffer_id) const {
const Buffer& buffer = buffers_.at(buffer_id);
HloOpcode def_opcode = buffer.defining_instruction->opcode();
if (buffer.live_out || def_opcode == HloOpcode::kParameter) {
return 0;
} else {
return buffer.size;
}
}
// Returns true if BeginInstruction and EndInstruction has been called for the
// given instruction.
bool IsFinished(const HloInstruction* instruction) const {
return IsPlaced(instruction) && instruction != in_progress_instruction_;
}
// Returns whether the given buffer is being used by the in-progress
// instruction.
bool IsInUse(BufferId buffer_id) const {
if (in_progress_instruction_ == nullptr) {
return false;
}
const std::vector<BufferId>& in_progress_uses =
buffers_used_by_instruction_.at(in_progress_instruction_);
return std::find(in_progress_uses.begin(), in_progress_uses.end(),
buffer_id) != in_progress_uses.end();
}
// Returns whether the given instruction is live at the current program
// point.
bool IsCurrentlyLive(BufferId buffer_id) const {
const Buffer& buffer = buffers_[buffer_id];
return (IsPlaced(buffer.defining_instruction) &&
buffer.unfinished_user_count > 0);
}
// Create a new buffer, add it to buffers_, and return a reference.
Buffer& NewBuffer(const HloInstruction* defining_instruction, int64 size,
std::vector<const HloInstruction*>&& users, bool live_out,
bool has_indirect_uses) {
int buffer_id = buffers_.size();
buffers_.push_back(Buffer{buffer_id, defining_instruction, size, live_out,
has_indirect_uses, users,
static_cast<int64>(users.size())});
return buffers_.back();
}
const HloComputation* computation_;
// Instruction list containing the ordering of instructions in
// computation_. This is the order in which instructions are placed
// (BeginInstruction/EndInstruction calls).
const InstructionList& instruction_list_;
// Memory usage at the currently placed instruction.
int64 memory_usage_ = 0;
// The instruction currently being placed. This value is non-null only
// between the calling of BeginInstruction and EndInstruction.
const HloInstruction* in_progress_instruction_ = nullptr;
// The buffers defined by each instruction.
std::unordered_map<const HloInstruction*, std::vector<BufferId>>
buffers_defined_by_instruction_;
// The buffers used by each instruction.
std::unordered_map<const HloInstruction*, std::vector<BufferId>>
buffers_used_by_instruction_;
// The set of instructions which have been placed. That is, BeginInstruction
// has been called with the instruction as an argument.
tensorflow::gtl::FlatSet<const HloInstruction*> placed_instructions_;
// All buffers in the computation.
std::vector<Buffer> buffers_;
};
MemoryUsageTracker::MemoryUsageTracker(
const HloComputation* computation,
const HloRematerialization::ShapeSizeFunction& size_function,
const TuplePointsToAnalysis& points_to_analysis,
const InstructionList& instruction_list)
: computation_(computation), instruction_list_(instruction_list) {
// Iterate through all LogicalBuffers in the computation and gather the
// instructions which define them in buffers_defined_by_instruction_ and the
// instructions which use them in buffers_used_by_instruction_.
for (auto& instruction : computation_->instructions()) {
// Initialize empty vectors for defs and uses of each instruction.
buffers_used_by_instruction_[instruction.get()];
buffers_defined_by_instruction_[instruction.get()];
}
tensorflow::gtl::FlatSet<const LogicalBuffer*> live_out_set =
points_to_analysis.GetPointsToSet(computation_->root_instruction())
.CreateFlattenedSet();
tensorflow::gtl::FlatMap<const LogicalBuffer*, BufferId>
logical_buffer_to_buffer_id;
for (const HloInstruction* instruction : instruction_list_.instructions()) {
for (const LogicalBuffer* logical_buffer :
points_to_analysis.GetBuffersDefinedByInstruction(instruction)) {
Buffer* buffer;
if (instruction->opcode() == HloOpcode::kWhile) {
// The while instruction defines no new buffers. Instead it reuses the
// buffers of its operand. Find the Buffer of its operand at the
// proper ShapeIndex.
const PointsToSet& operand_points_to =
points_to_analysis.GetPointsToSet(instruction->operand(0));
CHECK_EQ(operand_points_to.element(logical_buffer->index()).size(), 1);
const LogicalBuffer* source_logical_buffer =
operand_points_to.element(logical_buffer->index())[0];
buffer =
&buffers_.at(logical_buffer_to_buffer_id.at(source_logical_buffer));
// Mark buffer as has indirect use and live out.
buffer->has_indirect_uses = true;
buffer->live_out =
buffer->live_out || ContainsKey(live_out_set, logical_buffer);
// Add users of while to Buffer users.
bool unused;
for (const HloInstruction* user :
GetUsers(logical_buffer, points_to_analysis, &unused)) {
if (std::find(buffer->users.begin(), buffer->users.end(), user) ==
buffer->users.end()) {
buffer->users.push_back(user);
buffer->unfinished_user_count++;
buffers_used_by_instruction_.at(user).push_back(buffer->id);
}
}
} else {
buffer = &CreateBufferFromLogicalBuffer(
logical_buffer, points_to_analysis, size_function,
ContainsKey(live_out_set, logical_buffer));
buffers_defined_by_instruction_.at(instruction).push_back(buffer->id);
for (const HloInstruction* user : buffer->users) {
buffers_used_by_instruction_.at(user).push_back(buffer->id);
}
}
logical_buffer_to_buffer_id[logical_buffer] = buffer->id;
}
}
XLA_VLOG_LINES(10, ToString());
DCHECK(Check());
}
Status MemoryUsageTracker::BeginInstruction(const HloInstruction* instruction) {
VLOG(3) << "BeginInstruction " << instruction->name();
TF_RET_CHECK(in_progress_instruction_ == nullptr);
in_progress_instruction_ = instruction;
placed_instructions_.insert(in_progress_instruction_);
// All buffers defined by this instruction need memory.
for (BufferId buffer_id : buffers_defined_by_instruction_.at(instruction)) {
VLOG(3) << " Buffer " << buffers_.at(buffer_id).ToString()
<< " is now live.";
memory_usage_ += AllocatedSize(buffer_id);
}
// TODO(b/37686934): Elementwise instructions can share the buffer of a (dead)
// operand. Account for this potential reuse here.
VLOG(3) << " memory usage = " << memory_usage_;
VLOG(10) << ToString();
DCHECK(Check());
return Status::OK();
}
Status MemoryUsageTracker::EndInstruction() {
TF_RET_CHECK(in_progress_instruction_ != nullptr);
VLOG(3) << "EndInstruction " << in_progress_instruction_->name();
for (BufferId buffer_id :
buffers_used_by_instruction_.at(in_progress_instruction_)) {
Buffer& buffer = buffers_.at(buffer_id);
buffer.unfinished_user_count--;
CHECK_GE(buffer.unfinished_user_count, 0)
<< buffer.ToString() << " has negative unfinished use count.";
if (buffer.unfinished_user_count == 0) {
// Buffer is now dead.
VLOG(3) << " " << buffer.ToString() << " is now dead.";
memory_usage_ -= AllocatedSize(buffer_id);
CHECK_GE(memory_usage_, 0);
}
}
// If any buffer defined by this instruction has no uses, then memory can be
// reclaimed immediately.
for (BufferId buffer_id :
buffers_defined_by_instruction_.at(in_progress_instruction_)) {
const Buffer& buffer = buffers_.at(buffer_id);
if (buffer.unfinished_user_count == 0) {
VLOG(3) << " " << buffer.ToString() << " is immediately dead.";
memory_usage_ -= AllocatedSize(buffer_id);
CHECK_GE(memory_usage_, 0);
}
}
in_progress_instruction_ = nullptr;
VLOG(3) << " memory usage = " << memory_usage_;
VLOG(10) << ToString();
DCHECK(Check());
return Status::OK();
}
int64 MemoryUsageTracker::MemoryReducedIfRematerialized(
const HloInstruction* instruction) const {
CHECK_NE(in_progress_instruction_, nullptr);
if (!IsPlaced(instruction) || instruction == in_progress_instruction_) {
return 0;
}
// TODO(b/37687140): Rematerialization can increase peak memory consumption at
// an earlier point in the program if rematerialization extends the live range
// of the operand of the instruction being rematerialized across the live
// range of the value of instruction being rematerialized. Don't rematerialize
// in this case (ie, return 0 here).
// Compute the amount of memory reduced (if any) by rematerializing
// 'instruction'. The LogicalBuffers defined by 'instruction' will no longer
// be live at this program point, so initially set memory_reduced to the
// size of its defined values.
int64 memory_reduced = 0;
for (BufferId buffer_id : buffers_defined_by_instruction_.at(instruction)) {
// Avoid rematerializing instructions with indirect uses as it is difficult
// to reason about liveness after rematerializing the instruction.
// TODO(b/37714814): Consider rematerialzing instructions with indirect
// uses.
if (buffers_.at(buffer_id).has_indirect_uses) {
return 0;
}
if (IsCurrentlyLive(buffer_id) && !IsInUse(buffer_id)) {
memory_reduced += AllocatedSize(buffer_id);
}
}
// Account for any logical buffers whose live range must be extended across
// this program point.
for (BufferId buffer_id : buffers_used_by_instruction_.at(instruction)) {
if (!IsCurrentlyLive(buffer_id)) {
// This logical buffer is used by 'instruction' but is not live at this
// program point. Rematerializing 'instruction' will extend the buffer's
// live range across this program point.
memory_reduced -= AllocatedSize(buffer_id);
}
}
return memory_reduced;
}
Status MemoryUsageTracker::AddRematerializedInstruction(
HloInstruction* original_instruction, HloInstruction* remat_instruction) {
VLOG(3) << "AddRematerializedInstruction: original_instruction = "
<< original_instruction->name()
<< ", remat_instruction = " << remat_instruction->name();
TF_RET_CHECK(in_progress_instruction_ != nullptr);
TF_RET_CHECK(IsPlaced(original_instruction));
TF_RET_CHECK(!IsPlaced(remat_instruction));
CHECK(!ContainsKey(buffers_defined_by_instruction_, remat_instruction));
CHECK(!ContainsKey(buffers_used_by_instruction_, remat_instruction));
// Construct the list of buffers used and defined by the rematerialization.
buffers_defined_by_instruction_[remat_instruction];
buffers_used_by_instruction_[remat_instruction] =
buffers_used_by_instruction_.at(original_instruction);
// Account for the additional buffer uses created by the new rematerialization
// instruction. Update memory usage if the rematerialization makes a dead
// buffer live again.
for (BufferId buffer_id :
buffers_used_by_instruction_.at(original_instruction)) {
Buffer& buffer = buffers_.at(buffer_id);
if (buffer.unfinished_user_count == 0) {
// Buffer used by this instruction was dead, now is alive.
memory_usage_ += AllocatedSize(buffer.id);
}
buffer.unfinished_user_count++;
buffer.users.push_back(remat_instruction);
}
// Create a new set of Buffers defined by the new rematerialization
// instruction. Update the internal data structures and memory use to account
// for them.
for (BufferId old_buffer_id :
buffers_defined_by_instruction_.at(original_instruction)) {
Buffer& old_buffer = buffers_.at(old_buffer_id);
std::vector<const HloInstruction*> placed_users;
std::vector<const HloInstruction*> unplaced_users;
for (const HloInstruction* user : old_buffer.users) {
if (IsPlaced(user)) {
CHECK(IsFinished(user));
placed_users.push_back(user);
} else {
unplaced_users.push_back(user);
}
}
old_buffer.users = std::move(placed_users);
old_buffer.unfinished_user_count = 0;
// Buffer is now dead.
memory_usage_ -= AllocatedSize(old_buffer.id);
Buffer& new_buffer = RematerializeBuffer(old_buffer, remat_instruction,
std::move(unplaced_users));
buffers_defined_by_instruction_.at(remat_instruction)
.push_back(new_buffer.id);
for (const HloInstruction* user : new_buffer.users) {
std::vector<BufferId>& buffers_used =
buffers_used_by_instruction_.at(user);
std::replace(buffers_used.begin(), buffers_used.end(), old_buffer_id,
new_buffer.id);
}
}
VLOG(3) << " memory usage = " << memory_usage_;
XLA_VLOG_LINES(10, ToString());
DCHECK(Check());
return Status::OK();
}
string MemoryUsageTracker::ToString() const {
string output = tensorflow::strings::StrCat("MemoryUsageTracker for ",
computation_->name(), "\n");
tensorflow::strings::StrAppend(
&output, "Memory usage: ", HumanReadableNumBytes(memory_usage()), " (",
memory_usage(), " bytes)");
for (const HloInstruction* instruction : instruction_list_.instructions()) {
string inprogress =
instruction == in_progress_instruction_ ? " in-progress" : "";
string placed = IsPlaced(instruction) ? " placed" : "";
tensorflow::strings::StrAppend(&output, " ", instruction->name(),
inprogress, placed, "\n Defines:\n");
for (BufferId buffer_id : buffers_defined_by_instruction_.at(instruction)) {
const Buffer& buffer = buffers_[buffer_id];
string live = IsCurrentlyLive(buffer_id) ? " live" : "";
tensorflow::strings::StrAppend(&output, " ", buffer.ToString(), live,
", ", buffer.unfinished_user_count,
" unfinished uses\n");
}
tensorflow::strings::StrAppend(&output, " Uses:\n");
for (BufferId buffer_id : buffers_used_by_instruction_.at(instruction)) {
tensorflow::strings::StrAppend(&output, " ",
buffers_[buffer_id].ToString(), "\n");
}
}
return output;
}
bool MemoryUsageTracker::Check() const {
auto elements_are_unique = [](const std::vector<BufferId>& vec) {
return vec.size() == std::set<BufferId>(vec.begin(), vec.end()).size();
};
// Verify buffers_defined_by_instruction_.
for (auto& instruction : computation_->instructions()) {
const std::vector<BufferId>& defined_buffers =
buffers_defined_by_instruction_.at(instruction.get());
CHECK(elements_are_unique(defined_buffers))
<< "Instruction " << instruction->name()
<< " does not have unique defined buffers: "
<< tensorflow::str_util::Join(
defined_buffers, ", ", [this](string* out, BufferId buffer_id) {
tensorflow::strings::StrAppend(
out, buffers_.at(buffer_id).ToString());
});
for (const Buffer& buffer : buffers_) {
if (buffer.defining_instruction == instruction.get()) {
CHECK(std::find(defined_buffers.begin(), defined_buffers.end(),
buffer.id) != defined_buffers.end())
<< "Instruction " << instruction->name()
<< " defined buffers is missing: " << buffer.ToString();
}
}
}
// Verify buffers_used_by_instruction_.
for (auto& instruction : computation_->instructions()) {
const std::vector<BufferId>& used_buffers =
buffers_used_by_instruction_.at(instruction.get());
CHECK(elements_are_unique(used_buffers))
<< "Instruction " << instruction->name()
<< " does not have unique used buffers: "
<< tensorflow::str_util::Join(
used_buffers, ", ", [this](string* out, BufferId buffer_id) {
tensorflow::strings::StrAppend(
out, buffers_.at(buffer_id).ToString());
});
}
for (const Buffer& buffer : buffers_) {
int64 unfinished_uses = 0;
for (const HloInstruction* user : buffer.users) {
const std::vector<BufferId>& used_buffers =
buffers_used_by_instruction_.at(user);
CHECK(std::find(used_buffers.begin(), used_buffers.end(), buffer.id) !=
used_buffers.end())
<< "Instruction " << user->name() << " used buffers is missing "
<< buffer.ToString();
if (!IsFinished(user)) {
unfinished_uses++;
}
}
CHECK_EQ(buffer.unfinished_user_count, unfinished_uses)
<< "Incorrect unplaced use count for " << buffer.ToString();
}
// Verify live set size against memory_usage_.
int64 live_size = 0;
for (const Buffer& buffer : buffers_) {
// The while instruction reuses its input buffers as output buffers so
// don't double count its buffers if it is currently executing.
if (IsCurrentlyLive(buffer.id) &&
!(buffer.defining_instruction == in_progress_instruction_ &&
in_progress_instruction_->opcode() == HloOpcode::kWhile)) {
live_size += AllocatedSize(buffer.id);
}
}
CHECK_EQ(live_size, memory_usage_);
return true;
}
// Computes and returns the cost of rematerializing the given instruction.
// Cost per rematerialized instruction is defined as:
//
// (flop_count + transcendental_count + element_count) / memory_reduced
//
// flop_count: from HloCostAnalysis
// transcendental_count: from HloCostAnalysis
// element_count: number of elements accessed in operands and output of
// instruction
// memory_reduced: The memory usage reduced by rematerializing the
// instruction.
//
// This is a rough estimate of the extra execution time per byte saved by
// rematerializing this instruction for its remaining uses. In general, we
// want the most memory saving for the least latency penalty which is captured
// by this heuristic.
int64 RematerializationCost(const HloInstruction* instruction,
const MemoryUsageTracker& memory_tracker,
const HloCostAnalysis& cost_analysis,
int64 memory_reduced) {
// If none of the users of 'instruction' have been placed in the sequence (as
// tracked by memory_tracker), then rematerialization of 'instruction' is a
// zero-cost move of 'instruction' in the sequence.
if (!std::any_of(instruction->users().begin(), instruction->users().end(),
[&memory_tracker](const HloInstruction* inst) {
return memory_tracker.IsPlaced(inst);
})) {
return 0;
}
CHECK_GT(memory_reduced, 0);
const int64 bytes_accessed = cost_analysis.bytes_accessed(*instruction);
const int64 elements_accessed =
ShapeUtil::IsTuple(instruction->shape())
? bytes_accessed
: bytes_accessed / ShapeUtil::ByteSizeOfPrimitiveType(
instruction->shape().element_type());
// Multiply by 256 to improve precision of cost. Without this factor,
// many instructions such as many elementwise instructions would have
// zero cost because the bytes reduced can be several times greater than
// the element count.
return 256 *
(cost_analysis.flop_count(*instruction) +
cost_analysis.transcendental_count(*instruction) +
elements_accessed) /
memory_reduced;
}
// Selects and returns the best candidate instruction for rematerialization.
// The instruction with lowest rematerialization cost is selected among those
// candidate which reduce memory use at the program point of the current
// instruction as indicated by memory_tracker. nullptr is returned if no
// candidate can be found.
HloInstruction* PickRematerializationCandidate(
const MemoryUsageTracker& memory_tracker,
const InstructionList& instruction_list,
const HloCostAnalysis& cost_analysis,
const tensorflow::gtl::FlatSet<const HloInstruction*>& blacklist) {
HloInstruction* best = nullptr;
int64 best_cost = 0;
// TODO(b/35244891): This is currently quadratic in the number of HLO
// instructions.
for (HloInstruction* candidate : instruction_list.instructions()) {
if (!memory_tracker.IsPlaced(candidate)) {
// Only iterate up to the currently placed instruction as indicated by
// memory_tracker. We are trying to reduce memory usage at the placed
// instruction so rematerializing later values is of no benefit.
break;
}
VLOG(5) << "considering rematerialization candidate " << candidate->name();
if (ContainsKey(blacklist, candidate)) {
// Skip instructions on the blacklist to avoid infinite loops of
// rematerializing the same instruction(s) repeatedly.
VLOG(5) << "candidate " << candidate->name()
<< " is excluded from rematerialization";
continue;
}
if (!IsRematerializable(candidate)) {
VLOG(5) << "candidate " << candidate->name()
<< " not viable: is not rematerializable";
continue;
}
const int64 memory_reduced =
memory_tracker.MemoryReducedIfRematerialized(candidate);
if (memory_reduced <= 0) {
VLOG(5) << "candidate " << candidate->name()
<< " memory reduced = " << memory_reduced << " <= 0";
continue;
}
const int cost = RematerializationCost(candidate, memory_tracker,
cost_analysis, memory_reduced);
VLOG(5) << "candidate " << candidate->name() << ", memory reduced "
<< memory_reduced << ", cost per byte " << cost;
if (best == nullptr || cost < best_cost) {
VLOG(5) << "candidate " << candidate->name() << " now best";
best = candidate;
best_cost = cost;
}
}
return best;
}
} // namespace
StatusOr<int64> HloRematerialization::ComputePeakMemory(
const HloComputation* computation,
const std::vector<const HloInstruction*>& order) const {
InstructionList instruction_list(order);
MemoryUsageTracker tracker(computation, size_function_, *points_to_analysis_,
instruction_list);
int64 peak_memory = tracker.memory_usage();
for (const HloInstruction* instruction : order) {
TF_RETURN_IF_ERROR(tracker.BeginInstruction(instruction));
TF_ASSIGN_OR_RETURN(int64 callee_usage,
CalledComputationsMemoryUsage(instruction));
peak_memory =
std::max<int64>(peak_memory, tracker.memory_usage() + callee_usage);
TF_RETURN_IF_ERROR(tracker.EndInstruction());
}
VLOG(1) << "Peak memory for " << computation->name() << ": "
<< HumanReadableNumBytes(peak_memory);
return peak_memory;
}
StatusOr<int64> HloRematerialization::CalledComputationsMemoryUsage(
const HloInstruction* instruction) const {
const CallSite* callsite =
call_graph_->GetNode(instruction->parent()).GetCallSite(instruction);
if (callsite == nullptr || callsite->context() == CallContext::kParallel) {
return 0;
}
int64 callee_usage = 0;
for (const HloComputation* computation : callsite->called_computations()) {
TF_RET_CHECK(ContainsKey(computation_peak_memory_, computation));
callee_usage += computation_peak_memory_.at(computation);
}
return callee_usage;
}
StatusOr<bool> HloRematerialization::RematerializeComputation(
HloComputation* computation,
SequentialHloOrdering::HloModuleSequence* sequence,
int64 memory_limit_bytes) {
VLOG(1) << "Rematerializing computation " << computation->name()
<< " with limit " << HumanReadableNumBytes(memory_limit_bytes);
VLOG(1) << "peak memory usage is "
<< HumanReadableNumBytes(computation_peak_memory_.at(computation));
CHECK(!ContainsKey(rematerialized_computations_, computation));
InstructionList instruction_list(sequence->at(computation));
MemoryUsageTracker memory_tracker(computation, size_function_,
*points_to_analysis_, instruction_list);
bool changed = false;
// To avoid an infinite loop rematerializing the same set of instructions ad
// infinitum, keep a blacklist of instructions which should not be
// rematerialized.
tensorflow::gtl::FlatSet<const HloInstruction*> blacklist;
// If the rematerialization makes the source instruction dead, then the
// rematerialization is added to 'remat_move_instructions' (the
// rematerialization is essentially a move). If the next rematerialization of
// the instruction is also a move then the rematerialization is added to the
// blacklist.
tensorflow::gtl::FlatSet<const HloInstruction*> remat_move_instructions;
// The peak memory of the computation at any point in the instruction
// sequence.
int64 peak_memory = memory_tracker.memory_usage();
// Total count of instructions rematerialized.
int64 remat_count = 0;
// Total count of clones created minus number of original rematerialized
// instructions which are dead.
int64 net_instructions_added = 0;
const CallGraphNode& call_graph_node = call_graph_->GetNode(computation);
// Iterate through all instructions in the sequence. At each instruction
// (program point) if memory_usage exceeds the specified limit then
// rematerialize HLO instructions until memory_usage is reduced.
int64 instruction_index = 0;
for (auto list_it = instruction_list.instructions().begin();
list_it != instruction_list.instructions().end(); ++list_it) {
HloInstruction* instruction = *list_it;
TF_ASSIGN_OR_RETURN(int64 callee_usage,
CalledComputationsMemoryUsage(instruction));
TF_RETURN_IF_ERROR(memory_tracker.BeginInstruction(instruction));
VLOG(2) << "Program point at " << instruction->name()
<< ", memory usage = " << memory_tracker.memory_usage()
<< ", callee usage = " << callee_usage << ", [" << instruction_index
<< "/" << instruction_list.instructions().size() << "]";
instruction_index++;
while (memory_tracker.memory_usage() + callee_usage > memory_limit_bytes) {
VLOG(2) << "Over memory limit at instruction " << instruction->name()
<< ", using "
<< HumanReadableNumBytes(memory_tracker.memory_usage() +
callee_usage)
<< ", limit is " << HumanReadableNumBytes(memory_limit_bytes);
HloInstruction* best = PickRematerializationCandidate(
memory_tracker, instruction_list, cost_analysis_, blacklist);
if (best == nullptr) {
VLOG(3) << "Unable to find rematerialization candidate at program "
"point "
<< instruction->name() << ". Memory usage = "
<< HumanReadableNumBytes(memory_tracker.memory_usage() +
callee_usage);
break;
}
VLOG(1) << "Rematerializing instruction " << best->name() << " (saving "
<< memory_tracker.MemoryReducedIfRematerialized(best) << ")";
changed = true;
remat_count++;
HloInstruction* remat =
computation->AddInstruction(best->Clone(/*suffix=*/"remat"));
// Replace each remaining use of 'best' with the rematerialization.
std::vector<HloInstruction*> best_users_copy = best->users();
for (HloInstruction* user : best_users_copy) {
if (!memory_tracker.IsPlaced(user)) {
VLOG(2) << " Replacing use of " << best->name() << " in "
<< user->name() << " with " << remat->name();
TF_RETURN_IF_ERROR(best->ReplaceUseWith(user, remat));
}
}
// Account for the rematerialization in the memory tracker.
TF_RETURN_IF_ERROR(
memory_tracker.AddRematerializedInstruction(best, remat));
// Insert rematerialized instruction right before the earliest unplaced
// use of the instruction *and* the earliest unplaced last use of any
// operands of remat. Unplaced uses of the remat's operands are included
// because we don't want to extend the live range of remat's operands as
// this could increase memory usage.
std::vector<HloInstruction*> place_before = remat->users();
for (auto* operand : remat->operands()) {
for (auto* operand_user : operand->users()) {
if (!memory_tracker.IsPlaced(operand_user) && operand_user != remat) {
place_before.push_back(operand_user);
}
}
}
instruction_list.InsertBeforeInstructions(remat, place_before);
// If the rematerialized instruction is dead then rematerialization is
// essentially a move. Don't delete the instruction now because we don't
// want duplicate HloInstruction* values during the course of the
// transformation because we keep maps with HloInstruction* values as
// keys.
if (best->users().empty()) {
VLOG(2) << best->name() << " is now dead";
if (ContainsKey(remat_move_instructions, best)) {
// Previously, 'best' was a rematerialization which killed the
// instruction it was a copying of. Now 'remat' is a rematerialization
// of 'best' and kills 'best'. Stop rematerializing this instruction
// to avoid an infinite loop.
blacklist.insert(remat);
}
remat_move_instructions.insert(remat);
} else {
net_instructions_added++;
}
VLOG(3) << "memory_usage after rematerialization = "
<< memory_tracker.memory_usage();
}
const CallSite* callsite = call_graph_node.GetCallSite(instruction);
if (callsite != nullptr &&
callsite->context() == CallContext::kSequential &&
memory_tracker.memory_usage() + callee_usage > memory_limit_bytes) {
// Memory usage exceeds the limit. Try to rematerialize any
// subcomputation(s) that this instruction calls.
VLOG(1) << "Memory usage still over the limit ("
<< (memory_tracker.memory_usage() + callee_usage) << " > "
<< memory_limit_bytes
<< "). Rematerializing computations called by "
<< instruction->name();
// Recompute callee usage to account for any rematerialization performed
// in the callee computations.
for (HloComputation* called_computation :
callsite->called_computations()) {
if (!ContainsKey(rematerialized_computations_, called_computation)) {
// Memory limit for the subcomputation is the memory limit less the
// amount of memory used at this point in the computation.
int64 subcomputation_memory_limit_bytes = std::max<int64>(
0, memory_limit_bytes - memory_tracker.memory_usage());
TF_ASSIGN_OR_RETURN(
bool subcomputation_changed,
RematerializeComputation(called_computation, sequence,
subcomputation_memory_limit_bytes));
changed |= subcomputation_changed;
}
}
TF_ASSIGN_OR_RETURN(callee_usage,
CalledComputationsMemoryUsage(instruction));
}
peak_memory = std::max<int64>(peak_memory,
memory_tracker.memory_usage() + callee_usage);
VLOG(3) << "peak memory usage = " << HumanReadableNumBytes(peak_memory);
TF_RETURN_IF_ERROR(memory_tracker.EndInstruction());
}
// Verify some invariants on the memory tracker.
CHECK_EQ(memory_tracker.memory_usage(), 0);
for (auto& instruction : computation->instructions()) {
CHECK(memory_tracker.IsPlaced(instruction.get()));
}
VLOG(1) << "In computation " << computation->name() << " rematerialized "
<< remat_count << " instructions; " << net_instructions_added
<< " net instructions added";
VLOG(1) << " peak memory usage now " << HumanReadableNumBytes(peak_memory)
<< " (was "
<< HumanReadableNumBytes(computation_peak_memory_.at(computation))
<< ")";
// Update peak memory used by computation.
computation_peak_memory_.at(computation) = peak_memory;
// Update order to include rematerialized instructions.
sequence->at(computation)
.assign(instruction_list.instructions().begin(),
instruction_list.instructions().end());
rematerialized_computations_.insert(computation);
instructions_rematerialized_ += remat_count;
net_instructions_added_ += net_instructions_added;
return changed;
}
StatusOr<bool> HloRematerialization::Run(
HloModule* module, SequentialHloOrdering::HloModuleSequence* sequence,
int64 memory_limit_bytes) {
// The sequence is constructed entirely by this method.
TF_RET_CHECK(sequence->empty());
VLOG(1) << "HloRematerialization() with memory limit of "
<< HumanReadableNumBytes(memory_limit_bytes);
TF_ASSIGN_OR_RETURN(points_to_analysis_, TuplePointsToAnalysis::Run(module));
// Adjust memory limit to account for the output of the entry
// computation. This is necessary because the per-computation accounting in
// MemoryUsageTracker do not include output as these are typically allocated
// by the caller.
int64 module_output_size = 0;
ShapeUtil::ForEachSubshape(
module->entry_computation()->root_instruction()->shape(),
[&module_output_size, this](const Shape& subshape,
const ShapeIndex& /*index*/) {
module_output_size += size_function_(subshape);
return Status::OK();
})
.IgnoreError();
const int64 adjusted_memory_limit_bytes =
memory_limit_bytes - module_output_size;
VLOG(1) << "Adjusted memory limit accounting for output ("
<< HumanReadableNumBytes(module_output_size)
<< "): " << HumanReadableNumBytes(adjusted_memory_limit_bytes);
XLA_VLOG_LINES(3, "Before HloRematerialization:\n" + module->ToString());
// Create initial sequence of HLO instructions.
TF_ASSIGN_OR_RETURN(*sequence,
CreateMemoryMinimizingSequence(
*module, [this](const LogicalBuffer& buffer) {
return size_function_(buffer.shape());
}));
// Compute peak memory usage of all computations in the module called in a
// sequential context.
call_graph_ = CallGraph::Build(module);
TF_RETURN_IF_ERROR(call_graph_->VisitNodes(
[this, sequence](const CallGraphNode& node) -> Status {
if (node.context() == CallContext::kSequential) {
TF_ASSIGN_OR_RETURN(
computation_peak_memory_[node.computation()],
ComputePeakMemory(node.computation(),
sequence->at(node.computation())));
}
return Status::OK();
}));
// The peak memory usage of the module equals the peak memory use of the entry
// computation plus the output size of the computation. This is because the
// peak memory for a computation does not include the output as this is
// typically accounted for in the caller.
const int64 before_peak_memory =
computation_peak_memory_.at(module->entry_computation()) +
module_output_size;
VLOG(1) << "Peak memory usage of module (before): "
<< HumanReadableNumBytes(before_peak_memory);
// Run cost analysis. Operation cost is used in the heuristic for selecting
// instructions for rematerialization.
TF_RETURN_IF_ERROR(
module->entry_computation()->root_instruction()->Accept(&cost_analysis_));
// Subcomputations called by the entry computation will also be
// rematerialized.
TF_ASSIGN_OR_RETURN(bool changed, RematerializeComputation(
module->entry_computation(), sequence,
adjusted_memory_limit_bytes));
// Rematerialization can introduce dead code. This occurs if all uses of an
// instruction are replaced with rematerializations of the instruction.
TF_ASSIGN_OR_RETURN(bool dead_code_removed, HloDCE().Run(module));
changed |= dead_code_removed;
// After DCE, the module sequence may include instructions which no longer
// exist.
for (const auto& computation : module->computations()) {
if (sequence->at(computation.get()).size() !=
computation->instruction_count()) {
// A size mismatch between the computation instruction count and the size
// of the ordering of instructions can only be caused by DCE. Rebuild the
// order by removing the deleted instructions from the order.
tensorflow::gtl::FlatSet<const HloInstruction*> instruction_set;
for (const auto& instruction : computation->instructions()) {
instruction_set.insert(instruction.get());
}
// Move the old order into a temporary vector, then build new order
// inplace.
std::vector<const HloInstruction*>& order =
sequence->at(computation.get());
std::vector<const HloInstruction*> old_order;
using std::swap;
swap(order, old_order);
std::copy_if(old_order.begin(), old_order.end(),
std::back_inserter(order),
[&instruction_set](const HloInstruction* instruction) {
return ContainsKey(instruction_set, instruction);
});
TF_RET_CHECK(sequence->at(computation.get()).size() ==
computation->instruction_count());
}
}
VLOG(1) << "Rematerialized " << instructions_rematerialized_
<< " instructions in module " << module->name() << "; "
<< net_instructions_added_ << " net instructions added";
const int64 current_peak_memory =
computation_peak_memory_.at(module->entry_computation()) +
module_output_size;
VLOG(1) << "Peak memory usage of module now "
<< HumanReadableNumBytes(current_peak_memory) << " ("
<< current_peak_memory << " bytes), was "
<< HumanReadableNumBytes(before_peak_memory) << " ("
<< before_peak_memory << " bytes)";
const int64 reduced_peak_memory = before_peak_memory - current_peak_memory;
VLOG(1) << "Reduced peak memory by "
<< HumanReadableNumBytes(reduced_peak_memory) << " ("
<< reduced_peak_memory << " bytes)";
XLA_VLOG_LINES(3, "After HloRematerialization:\n" + module->ToString());
if (current_peak_memory > memory_limit_bytes) {
LOG(WARNING) << "Can't reduce memory use below "
<< HumanReadableNumBytes(memory_limit_bytes)
<< " by rematerialization (only reduced to "
<< HumanReadableNumBytes(current_peak_memory) << ")";
}
return changed;
}
/* static */ StatusOr<bool> HloRematerialization::RematerializeAndSchedule(
const HloRematerialization::ShapeSizeFunction& size_function,
int64 memory_limit_bytes, HloModule* hlo_module,
SequentialHloOrdering::HloModuleSequence* sequence) {
HloRematerialization remat(size_function);
return remat.Run(hlo_module, sequence, memory_limit_bytes);
}
} // namespace xla
| [
"slacealic@gmail.com"
] | slacealic@gmail.com |
e56c98b7b927f0e75a6351c461c53f1f56371955 | 977fdc3e44aeedc66bcecabde0b023033aa890e3 | /ch3/3.22.cpp | 073ad6ce1c9944254b2d4ad4615e652fc18b5bdd | [] | no_license | PiNengShaoNian/cpp-primer | c862164dc0121615b83ab561ba62f488ea56cc36 | 6c4aaa12140e40a15fda9190ceb60d35a9956777 | refs/heads/main | 2023-02-10T02:21:57.880526 | 2020-12-27T08:22:00 | 2020-12-27T08:22:00 | 318,971,632 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 581 | cpp | #include <iostream>
#include <vector>
#include <string>
using std::cin;
using std::cout;
using std::string;
using std::vector;
int main()
{
cout << "plase enter numbers"
<< std::endl;
vector<string> nums;
string str;
while (cin >> str)
{
nums.push_back(str);
}
for (auto i = nums.begin(); i != nums.end(); i++)
{
if (!i->empty())
{
char &first = i->at(0);
first = toupper(first);
}
}
for (string word : nums)
{
cout << word << std::endl;
}
return 0;
}
| [
"quguiyou1076@qq.com"
] | quguiyou1076@qq.com |
8ec95e1ec38e989c1c9e15175675e9ab0aefd407 | 58c3114e9d45fde3653ea585d20dddef06e72954 | /example/x.cpp | 39b40d84459386be4c339a9336d57a6d90096aca | [
"MIT"
] | permissive | terencefan/thriftphp | 5c120462a5b16b67115930b02e0d33951d817e53 | 1b59d87969146329c2e95af41dd9cc53759661b7 | refs/heads/master | 2021-09-06T22:18:37.377284 | 2018-02-12T12:15:28 | 2018-02-12T12:15:54 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 92 | cpp | #include<iostream>
using namespace std;
int main() {
cout << "hello world\n" << endl;
}
| [
"stdrickforce@gmail.com"
] | stdrickforce@gmail.com |
72baff56c4ef189ca3cff8086aa69941cd1dfe0f | 76079ac589b21dd52cdb5c92a0ea85b25ef6371a | /GLUtil/include/ncl/gl/Cylinder.h | 0ef940c0884e6433c519160bbb426d254e9d809e | [] | no_license | max3a3/GLUtil | 598bbb8220f3f7a0566023a5eefe9b74b4c6d848 | 68d11cd8a36c1f2114e56b4914ddf11f1c671606 | refs/heads/master | 2023-01-08T21:46:27.711434 | 2020-11-03T21:13:01 | 2020-11-03T21:13:01 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,254 | h | #pragma once
#include "Shape.h"
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/matrix_inverse.hpp>
namespace ncl {
namespace gl {
class Cylinder : public Shape {
public:
Cylinder(GLfloat r = 0.5f, float l = 1.0f, GLuint p = 50, GLuint q = 50, const glm::vec4 color = randomColor(), unsigned instances = 1, glm::mat4 transform = glm::mat4(1)) :
Shape(createMesh(r, l, p, q, color, transform), false, instances) {
}
protected:
std::vector<Mesh> createMesh(float r, float l, int p, int q, const glm::vec4 color, glm::mat4 transform) {
Mesh mesh;
mesh.material.diffuse = color;
mesh.material.ambient = color;
for (int j = 0; j <= q; j++) {
for (int i = 0; i <= p; i++) {
mesh.positions.push_back((transform * glm::vec4(f(i, j, q, p, r), g(i, j, q, p, r), h(i, j, q, p, l), 1.0)).xyz);
mesh.normals.push_back(glm::mat3(transform) * glm::vec3(fn(i, j, q, p, r), gn(i, j, q, p, r), hn(i, j, q, p, l)));
mesh.uvs[0].push_back(glm::vec2(float(i) / p, float(j) / q));
mesh.colors.push_back(color);
}
}
for (int j = 0; j < q; j++) {
for (int i = 0; i <= p; i++) {
mesh.indices.push_back((j + 1)*(p + 1) + i);
mesh.indices.push_back(j*(p + 1) + i);
}
}
mesh.primitiveType = GL_TRIANGLE_STRIP;
Mesh base;
for (int i = 0; i <= p; i++) {
base.positions.push_back((transform * glm::vec4{ r * cos((-1 + 2 * (float)i / p) * PI), r * sin((-1 + 2 * (float)i / p) * PI), 0, 1.0 }).xyz);
base.normals.push_back(glm::mat3(transform) * glm::vec3{ 0.0, 0.0, 1.0 });
base.uvs[0].push_back({ 0.5 + 0.5*cos((-1 + 2 * (float)i / p) * PI), 0.5 + 0.5*sin((-1 + 2 * (float)i / p) * PI) });
base.colors.push_back(color);
}
base.primitiveType = GL_TRIANGLE_FAN;
base.material.diffuse = color;
base.material.ambient = color;
Mesh top;
for (int i = 0; i <= p; i++) {
top.positions.push_back((transform * glm::vec4{ r * cos((-1 + 2 * (float)i / p) * PI), r * sin((-1 + 2 * (float)i / p) * PI), -l, 1.0 }).xyz);
top.normals.push_back(glm::mat3(transform) * glm::vec3{ 0.0, 0.0, -1.0 });
top.uvs[0].push_back({ 0.5 + 0.5*cos((-1 + 2 * (float)i / p) * PI), 0.5 + 0.5*sin((-1 + 2 * (float)i / p) * PI) });
top.colors.push_back(color);
}
top.primitiveType = GL_TRIANGLE_FAN;
top.material.diffuse = color;
top.material.ambient = color;
std::vector<Mesh> meshes;
meshes.push_back(mesh);
meshes.push_back(base);
meshes.push_back(top);
return meshes;
}
float f(int i, int j, int q, int p, float r) {
return r * (cos((-1 + 2 * (float)i / p) * PI));
}
float g(int i, int j, int q, int p, float r) {
return r * (sin((-1 + 2 * (float)i / p) * PI));
}
float h(int i, int j, int q, int p, float l) {
return l * (-1 + (float)j / q);
}
float fn(int i, int j, int q, int p, float r) {
return cos((-1 + 2 * (float)i / p) * PI);
}
float gn(int i, int j, int q, int p, float r) {
return sin((-1 + 2 * (float)i / p) * PI);
}
float hn(int i, int j, int q, int p, float h) {
return 0;
}
private:
static const float PI;
};
const float Cylinder::PI = 3.14159265358979324f;
}
} | [
"josiah.ebhomenye@news.co.uk"
] | josiah.ebhomenye@news.co.uk |
e16929a34a869e7be480eebd5b4b2b3ed7e3dab6 | 521b1719c9d3da52dfb63635b638771075a095a6 | /Ex5_Pong/SimpleRenderEngineProject-master/project/lua-example.cpp | a571011f433fcfdb5a2f6020212be4a04e92d7d8 | [
"MIT"
] | permissive | fdfragoso/GameEngines | 836ea2787c9b90b3bb6e0593a0feda4ce44ab3a5 | c1dfcb03e009b0aca9803a9de5806e003aaf364e | refs/heads/master | 2020-07-16T20:29:40.503249 | 2019-09-02T14:00:28 | 2019-09-02T14:00:28 | 205,862,573 | 3 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,513 | cpp | #include <iostream>
#include "sre/SDLRenderer.hpp"
#include "sre/SpriteAtlas.hpp"
#include "sre/Texture.hpp"
#include "sre/Material.hpp"
#include "sre/Profiler.hpp"
#include "glm/gtc/random.hpp"
#include "glm/ext.hpp"
// lua headers
#include "sol.hpp"
using namespace sre;
using namespace std;
using namespace sol;
// Captures debug information from Box2D as lines (polygon fill and color is discarded)
class ScriptableSphereObject {
private:
std::shared_ptr<Mesh> mesh;
std::shared_ptr<Material> material;
public:
int x;
int z;
float pos_x;
float pos_y;
float pos_z;
string objectName;
ScriptableSphereObject(std::shared_ptr<Mesh> mesh,std::shared_ptr<Material> material, int x, int z)
:mesh(mesh), material(material), x(x), z(z)
{
pos_x = x;
pos_y = 0;
pos_z = z;
objectName = string("o")+to_string(x)+"_"+to_string(z);
}
void draw(RenderPass& renderPass){
renderPass.draw(mesh, glm::translate(glm::vec3{pos_x,pos_y,pos_z}), material);
}
};
class LuaExample {
public:
LuaExample()
{
r.init();
r.setWindowTitle("Lua example");
l.addLight(Light::create().withDirectionalLight({1,1,1}).withColor({1,1,1}).build());
auto mat = Shader::getStandard()->createMaterial();
mat->setColor({1,0,0,1});
auto sphere = Mesh::create().withSphere().build();
lua.open_libraries(sol::lib::base, sol::lib::package, sol::lib::math);
// callback set title
lua.set_function("setTitle", [&](sol::this_state, sol::variadic_args va){
string s = va[0];
r.setWindowTitle(s);
});
lua.script("setTitle('callback to setTitle')");
updateLuaScript();
// create objects
for (int x = -5;x<=5;x++){
for (int y = -5;y<=5;y++) {
objects.emplace_back(sphere, mat, x, y);
}
}
camera.setPerspectiveProjection(45,0.1,100);
camera.lookAt({0,15,-20},{0,0,0},{0,1,0});
r.frameUpdate = [&](float deltaTime){
update(deltaTime);
};
r.frameRender = [&](){
render();
};
r.startEventLoop();
}
void updateLuaScript() {
lua.script(luaScript); // evaluate lua script
sol::function fn = lua["updatepos"]; // get lua function update pos
updatepos = fn; // get C++ functional reference to lua script
}
void update(float deltaTime){
static float totalTime = 0;
totalTime += deltaTime;
for (auto & o : objects){
o.pos_y = (float)updatepos(o.x,o.z,totalTime);
}
}
void render(){
RenderPass rp = RenderPass::create()
.withCamera(camera)
.withWorldLights(&l)
.build();
for (auto & o : objects){
o.draw(rp);
}
ImGui::InputTextMultiline("Lua script", luaScript , 2048);
if (ImGui::Button("Update")){
updateLuaScript();
}
}
private:
static const int luaScriptSize = 2048;
char luaScript[luaScriptSize] = "function updatepos (x, z, time) \n return math.sin(x + z*9 + time) \nend";
std::vector<ScriptableSphereObject> objects;
SDLRenderer r;
WorldLights l;
Camera camera;
sol::state lua;
std::function<double(int, int, double)> updatepos;
};
int main() {
new LuaExample();
return 0;
} | [
"fefragoso@gmail.com"
] | fefragoso@gmail.com |
cbff8de0ec0b80533f7c08de8dbb3312b674d050 | b728e5c5ddabbed1cf9bcb65d19d4e13b2c2da6c | /Space-Crusade-0.6A/weapon.h | e84732f4fca6945444b08e57f2e10d5867a42dc8 | [] | no_license | Geowil/Space-Crusade-0.6 | 2d6858e97c1eee597445521e26f3a8fe3d7195eb | 8d1e67f955b9b595562aac339510493360d4a9a3 | refs/heads/master | 2020-03-30T07:14:53.051537 | 2014-07-16T00:00:55 | 2014-07-16T00:00:55 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,246 | h | #ifndef WEAPON_H
#define WEAPON_H
#include "range.h"
#include <string>
using std::string;
/*
All other weapon types inherit most of their functions and variables from this class.
Where there are variables and by realtion functions for those variables they will be
defined within the child classes where these variables and functions are only defined
within those specific child classes. If a certain variable/function combination is present
in more then one child class it should be placed into Weapon to cut down on excess code lines
*/
class Weapon
{
public:
int getWDRLow(); //get weapon damage range low
int getWDRHigh(); //get weapon damage range high
int getWDROLow(); //get weapon damage range optimum low
int getWDROHigh(); // get weapon damage range optimum high
int getWALow(); //get weapon accuracy range low
int getWAHigh(); //get weapon accuracy range high
int getWAOLow(); //get weapon accuracy range optimum low
int getWAOHigh(); //get weapon accuracy range optimum high
int getWTLevel(); //get weapon tech level
int getWType(); //get weapon damage type
//int getWASpeed(); //get weapon attack speed
int getWID(); //Get weapon id
string getWName(); //get weapon name
string getWDType(); //get weapon damage type
string getWClass(); //get weapon class
void toggleWeapon(int time); //Disable weapon
bool isWDisabled(); //Is this weapon disabled?
void initWeapon(); //Set weapon name for checks
void wSetup(int wCode); //Get weapon data from database
float getSG2();
void setSG2(float sg2);
string data; //string data container
protected:
Range wAcc; //accuracy
Range wDRange; //damage range
string wDType; //damage type
string wName; //name
int wTLevel; //technology level
string wClass; //weapon class
int wType; //weapon type
//int wASpeed; //weapon attack speed
bool wStatus; //weapon activity status
int wDTimer; //weapon disable timer
int wID; //Weapon ID
float wSG2; //Amount of space this weapon takes up
};
class Laser : public Weapon
{
public:
Laser(); //laser constructor
Laser* getWeapon();
void iWeapon(); //install weapon
int getCLength();
float getCMAmount();
private:
int wMCLength; //Length of mining cycle
float wMCAmount; //Amount of ore this laser mines per cycle
};
class Missile : public Weapon
{
public:
Missile(); //missile contructor
Missile* getWeapon();
void iWeapon(); //install weapon
/*
For Real Time version of game
string setAName(string name); //Set ammo name
string setMLName(string name); //Set missile launcher name
int setLAAmount(int i); //Set current launcher ammo amount
int setLMAmmo(int i); //Set max launcher ammo
*/
private:
/*
For Real Time version of game
int mLAmmo; //Current launcher ammo
int mLMAmmo; //Max launcher ammo
string mAName; //ammo name
string mLName; //Missile launcher name
*/
};
class Bomb : public Weapon
{
public:
Bomb(); //bomb contructor
Bomb* getWeapon();
void iWeapon(); //install weapon
int getWeight(); //get bomb weight
private:
int bWeight; //weight
};
class Rail : public Weapon
{
public:
Rail(); //rail constructor
Rail* getWeapon();
void iWeapon(); //install weapon
void setAName(string name); //Set ammo name
void updateAAmount(int newAmmo, string operation); //Set current ammo left
void setACon(int i); //Set ammo consumption
string getAName(); //Set ammo name
int getAAmount(); //Set current ammo left
int getACon(); //Set ammo consumption
private:
int rAmmo; //ammo left
int rAConsume; //rate of ammo consumption
string rAName; //ammo name
//TODO: Add rate of fire for full version
};
class Heavy : public Weapon
{
public:
Heavy(); //heavy constructor
Heavy* getWeapon();
void iWeapon(); //install weapon
float getDILow(); //get weapon damage intensity range low
float getDIHigh(); //get weapon damage intensity range high
void setDIRange(float l, float h); //Set damage intensity range
private:
Range hDInt; //damage intensity
};
#endif
/* Other Weapon's Information */
/*
There are several identifiers used above that need explaining. Some will be covered multiple times in different files depending on relevency.
Weapon Types:
1: Lasers
2: Missiles
3: Bombs
5: Heavys
6: Rails
*/
| [
"geowil11@gmail.com"
] | geowil11@gmail.com |
10ce7fb9f6e9944c043522f8eeb3b7f718222de5 | 28e9f79335a6e88ea9a020f80f24e0f715b64ad7 | /proccore/src/CPUDynamic/DynamicFunctiontable.h | 85a2c3aee6475669a8bb25b7c094a410cc2c6e52 | [
"MIT"
] | permissive | crest01/ShapeGenetics | 701a0702dacb38660da3471bd187f590edfc3c5e | 7321f6484be668317ad763c0ca5e4d6cbfef8cd1 | refs/heads/master | 2021-01-12T01:59:29.067964 | 2019-05-20T21:08:47 | 2019-05-20T21:08:47 | 78,453,093 | 18 | 2 | null | null | null | null | UTF-8 | C++ | false | false | 1,244 | h | #ifndef CPUDYNAMIC_FUNCTION_TABLE
#define CPUDYNAMIC_FUNCTION_TABLE
#pragma once
#include "DynamicScope.h"
#include "DynamicCall.h"
#include "SupportedShapes.h"
namespace PGG
{
namespace CPU
{
template<>
void(*DynamicCallFunction(const PGG::Shapes::SBox& scopedShape, int id))(const PGG::Shapes::SBox&);
template<>
void(*DynamicCallFunction(const PGG::Shapes::SQuad& scopedShape, int id))(const PGG::Shapes::SQuad&);
template<>
void(*DynamicCallFunction(const PGG::Shapes::SPolygon& scopedShape, int id))(const PGG::Shapes::SPolygon&);
template<>
void(*DynamicCallFunction(const PGG::Shapes::SPrism& scopedShape, int id))(const PGG::Shapes::SPrism&);
template<>
void(*DynamicCallFunction(const PGG::Shapes::STetrahedron& scopedShape, int id))(const PGG::Shapes::STetrahedron&);
template<>
void(*DynamicCallFunction(const PGG::Shapes::SOctahedron& scopedShape, int id))(const PGG::Shapes::SOctahedron&);
template<>
void(*DynamicCallFunction(const PGG::Shapes::SDodecahedron& scopedShape, int id))(const PGG::Shapes::SDodecahedron&);
template<>
void(*DynamicCallFunction(const PGG::Shapes::SIcosahedron& scopedShape, int id))(const PGG::Shapes::SIcosahedron&);
}
}
#endif | [
"karl.haubenwallner@student.tugraz.at"
] | karl.haubenwallner@student.tugraz.at |
aeb3810fd616bfd2c6723c683ddc95f290fff091 | 80f52a93aa300f0b7180ace7e42796232a80f235 | /thrift/compiler/test/fixtures/visitation/gen-cpp2/service_with_special_names.tcc | 3ee74a9fb72b9c8a83af9f8d1ea30b48cc01f4a2 | [
"Apache-2.0"
] | permissive | joway/fbthrift | b23b3299797cabf3e7f2367ce57f846f3257f170 | e0d568ec7084502c653537a50f150428786d8037 | refs/heads/master | 2023-06-28T05:57:17.911824 | 2020-11-15T09:42:29 | 2020-11-15T09:43:48 | 313,297,638 | 0 | 0 | Apache-2.0 | 2020-11-16T12:50:25 | 2020-11-16T12:39:03 | null | UTF-8 | C++ | false | false | 93,592 | tcc | /**
* Autogenerated by Thrift for src/module.thrift
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
#pragma once
#include "thrift/compiler/test/fixtures/visitation/gen-cpp2/service_with_special_names.h"
#include <thrift/lib/cpp2/gen/service_tcc.h>
namespace test_cpp2 { namespace cpp_reflection {
typedef apache::thrift::ThriftPresult<false> service_with_special_names_get_pargs;
typedef apache::thrift::ThriftPresult<true, apache::thrift::FieldData<0, apache::thrift::protocol::T_I32, int32_t*>> service_with_special_names_get_presult;
typedef apache::thrift::ThriftPresult<false> service_with_special_names_getter_pargs;
typedef apache::thrift::ThriftPresult<true, apache::thrift::FieldData<0, apache::thrift::protocol::T_I32, int32_t*>> service_with_special_names_getter_presult;
typedef apache::thrift::ThriftPresult<false> service_with_special_names_lists_pargs;
typedef apache::thrift::ThriftPresult<true, apache::thrift::FieldData<0, apache::thrift::protocol::T_I32, int32_t*>> service_with_special_names_lists_presult;
typedef apache::thrift::ThriftPresult<false> service_with_special_names_maps_pargs;
typedef apache::thrift::ThriftPresult<true, apache::thrift::FieldData<0, apache::thrift::protocol::T_I32, int32_t*>> service_with_special_names_maps_presult;
typedef apache::thrift::ThriftPresult<false> service_with_special_names_name_pargs;
typedef apache::thrift::ThriftPresult<true, apache::thrift::FieldData<0, apache::thrift::protocol::T_I32, int32_t*>> service_with_special_names_name_presult;
typedef apache::thrift::ThriftPresult<false> service_with_special_names_name_to_value_pargs;
typedef apache::thrift::ThriftPresult<true, apache::thrift::FieldData<0, apache::thrift::protocol::T_I32, int32_t*>> service_with_special_names_name_to_value_presult;
typedef apache::thrift::ThriftPresult<false> service_with_special_names_names_pargs;
typedef apache::thrift::ThriftPresult<true, apache::thrift::FieldData<0, apache::thrift::protocol::T_I32, int32_t*>> service_with_special_names_names_presult;
typedef apache::thrift::ThriftPresult<false> service_with_special_names_prefix_tree_pargs;
typedef apache::thrift::ThriftPresult<true, apache::thrift::FieldData<0, apache::thrift::protocol::T_I32, int32_t*>> service_with_special_names_prefix_tree_presult;
typedef apache::thrift::ThriftPresult<false> service_with_special_names_sets_pargs;
typedef apache::thrift::ThriftPresult<true, apache::thrift::FieldData<0, apache::thrift::protocol::T_I32, int32_t*>> service_with_special_names_sets_presult;
typedef apache::thrift::ThriftPresult<false> service_with_special_names_setter_pargs;
typedef apache::thrift::ThriftPresult<true, apache::thrift::FieldData<0, apache::thrift::protocol::T_I32, int32_t*>> service_with_special_names_setter_presult;
typedef apache::thrift::ThriftPresult<false> service_with_special_names_str_pargs;
typedef apache::thrift::ThriftPresult<true, apache::thrift::FieldData<0, apache::thrift::protocol::T_I32, int32_t*>> service_with_special_names_str_presult;
typedef apache::thrift::ThriftPresult<false> service_with_special_names_strings_pargs;
typedef apache::thrift::ThriftPresult<true, apache::thrift::FieldData<0, apache::thrift::protocol::T_I32, int32_t*>> service_with_special_names_strings_presult;
typedef apache::thrift::ThriftPresult<false> service_with_special_names_type_pargs;
typedef apache::thrift::ThriftPresult<true, apache::thrift::FieldData<0, apache::thrift::protocol::T_I32, int32_t*>> service_with_special_names_type_presult;
typedef apache::thrift::ThriftPresult<false> service_with_special_names_value_pargs;
typedef apache::thrift::ThriftPresult<true, apache::thrift::FieldData<0, apache::thrift::protocol::T_I32, int32_t*>> service_with_special_names_value_presult;
typedef apache::thrift::ThriftPresult<false> service_with_special_names_value_to_name_pargs;
typedef apache::thrift::ThriftPresult<true, apache::thrift::FieldData<0, apache::thrift::protocol::T_I32, int32_t*>> service_with_special_names_value_to_name_presult;
typedef apache::thrift::ThriftPresult<false> service_with_special_names_values_pargs;
typedef apache::thrift::ThriftPresult<true, apache::thrift::FieldData<0, apache::thrift::protocol::T_I32, int32_t*>> service_with_special_names_values_presult;
typedef apache::thrift::ThriftPresult<false> service_with_special_names_id_pargs;
typedef apache::thrift::ThriftPresult<true, apache::thrift::FieldData<0, apache::thrift::protocol::T_I32, int32_t*>> service_with_special_names_id_presult;
typedef apache::thrift::ThriftPresult<false> service_with_special_names_ids_pargs;
typedef apache::thrift::ThriftPresult<true, apache::thrift::FieldData<0, apache::thrift::protocol::T_I32, int32_t*>> service_with_special_names_ids_presult;
typedef apache::thrift::ThriftPresult<false> service_with_special_names_descriptor_pargs;
typedef apache::thrift::ThriftPresult<true, apache::thrift::FieldData<0, apache::thrift::protocol::T_I32, int32_t*>> service_with_special_names_descriptor_presult;
typedef apache::thrift::ThriftPresult<false> service_with_special_names_descriptors_pargs;
typedef apache::thrift::ThriftPresult<true, apache::thrift::FieldData<0, apache::thrift::protocol::T_I32, int32_t*>> service_with_special_names_descriptors_presult;
typedef apache::thrift::ThriftPresult<false> service_with_special_names_key_pargs;
typedef apache::thrift::ThriftPresult<true, apache::thrift::FieldData<0, apache::thrift::protocol::T_I32, int32_t*>> service_with_special_names_key_presult;
typedef apache::thrift::ThriftPresult<false> service_with_special_names_keys_pargs;
typedef apache::thrift::ThriftPresult<true, apache::thrift::FieldData<0, apache::thrift::protocol::T_I32, int32_t*>> service_with_special_names_keys_presult;
typedef apache::thrift::ThriftPresult<false> service_with_special_names_annotation_pargs;
typedef apache::thrift::ThriftPresult<true, apache::thrift::FieldData<0, apache::thrift::protocol::T_I32, int32_t*>> service_with_special_names_annotation_presult;
typedef apache::thrift::ThriftPresult<false> service_with_special_names_annotations_pargs;
typedef apache::thrift::ThriftPresult<true, apache::thrift::FieldData<0, apache::thrift::protocol::T_I32, int32_t*>> service_with_special_names_annotations_presult;
typedef apache::thrift::ThriftPresult<false> service_with_special_names_member_pargs;
typedef apache::thrift::ThriftPresult<true, apache::thrift::FieldData<0, apache::thrift::protocol::T_I32, int32_t*>> service_with_special_names_member_presult;
typedef apache::thrift::ThriftPresult<false> service_with_special_names_members_pargs;
typedef apache::thrift::ThriftPresult<true, apache::thrift::FieldData<0, apache::thrift::protocol::T_I32, int32_t*>> service_with_special_names_members_presult;
typedef apache::thrift::ThriftPresult<false> service_with_special_names_field_pargs;
typedef apache::thrift::ThriftPresult<true, apache::thrift::FieldData<0, apache::thrift::protocol::T_I32, int32_t*>> service_with_special_names_field_presult;
typedef apache::thrift::ThriftPresult<false> service_with_special_names_fields_pargs;
typedef apache::thrift::ThriftPresult<true, apache::thrift::FieldData<0, apache::thrift::protocol::T_I32, int32_t*>> service_with_special_names_fields_presult;
template <typename ProtocolIn_, typename ProtocolOut_>
void service_with_special_namesAsyncProcessor::setUpAndProcess_get(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm) {
if (!setUpRequestProcessing(req, ctx, eb, tm, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, iface_)) {
return;
}
auto pri = iface_->getRequestPriority(ctx, apache::thrift::concurrency::NORMAL);
processInThread(std::move(req), std::move(serializedRequest), ctx, eb, tm, pri, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, &service_with_special_namesAsyncProcessor::process_get<ProtocolIn_, ProtocolOut_>, this);
}
template <typename ProtocolIn_, typename ProtocolOut_>
void service_with_special_namesAsyncProcessor::process_get(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm) {
// make sure getConnectionContext is null
// so async calls don't accidentally use it
iface_->setConnectionContext(nullptr);
service_with_special_names_get_pargs args;
std::unique_ptr<apache::thrift::ContextStack> ctxStack(this->getContextStack(this->getServiceName(), "service_with_special_names.get", ctx));
try {
deserializeRequest<ProtocolIn_>(args, ctx->getMethodName(), serializedRequest, ctxStack.get());
}
catch (const std::exception& ex) {
apache::thrift::detail::ap::process_handle_exn_deserialization<ProtocolOut_>(
ex, std::move(req), ctx, eb, "get");
return;
}
req->setStartedProcessing();
auto callback = std::make_unique<apache::thrift::HandlerCallback<int32_t>>(std::move(req), std::move(ctxStack), return_get<ProtocolIn_,ProtocolOut_>, throw_wrapped_get<ProtocolIn_, ProtocolOut_>, ctx->getProtoSeqId(), eb, tm, ctx);
if (!callback->isRequestActive()) {
return;
}
iface_->async_tm_get(std::move(callback));
}
template <class ProtocolIn_, class ProtocolOut_>
folly::IOBufQueue service_with_special_namesAsyncProcessor::return_get(int32_t protoSeqId, apache::thrift::ContextStack* ctx, int32_t const& _return) {
ProtocolOut_ prot;
service_with_special_names_get_presult result;
result.get<0>().value = const_cast<int32_t*>(&_return);
result.setIsSet(0, true);
return serializeResponse("get", &prot, protoSeqId, ctx, result);
}
template <class ProtocolIn_, class ProtocolOut_>
void service_with_special_namesAsyncProcessor::throw_wrapped_get(apache::thrift::ResponseChannelRequest::UniquePtr req,int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx) {
if (!ew) {
return;
}
{
(void)protoSeqId;
apache::thrift::detail::ap::process_throw_wrapped_handler_error<ProtocolOut_>(
ew, std::move(req), reqCtx, ctx, "get");
return;
}
}
template <typename ProtocolIn_, typename ProtocolOut_>
void service_with_special_namesAsyncProcessor::setUpAndProcess_getter(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm) {
if (!setUpRequestProcessing(req, ctx, eb, tm, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, iface_)) {
return;
}
auto pri = iface_->getRequestPriority(ctx, apache::thrift::concurrency::NORMAL);
processInThread(std::move(req), std::move(serializedRequest), ctx, eb, tm, pri, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, &service_with_special_namesAsyncProcessor::process_getter<ProtocolIn_, ProtocolOut_>, this);
}
template <typename ProtocolIn_, typename ProtocolOut_>
void service_with_special_namesAsyncProcessor::process_getter(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm) {
// make sure getConnectionContext is null
// so async calls don't accidentally use it
iface_->setConnectionContext(nullptr);
service_with_special_names_getter_pargs args;
std::unique_ptr<apache::thrift::ContextStack> ctxStack(this->getContextStack(this->getServiceName(), "service_with_special_names.getter", ctx));
try {
deserializeRequest<ProtocolIn_>(args, ctx->getMethodName(), serializedRequest, ctxStack.get());
}
catch (const std::exception& ex) {
apache::thrift::detail::ap::process_handle_exn_deserialization<ProtocolOut_>(
ex, std::move(req), ctx, eb, "getter");
return;
}
req->setStartedProcessing();
auto callback = std::make_unique<apache::thrift::HandlerCallback<int32_t>>(std::move(req), std::move(ctxStack), return_getter<ProtocolIn_,ProtocolOut_>, throw_wrapped_getter<ProtocolIn_, ProtocolOut_>, ctx->getProtoSeqId(), eb, tm, ctx);
if (!callback->isRequestActive()) {
return;
}
iface_->async_tm_getter(std::move(callback));
}
template <class ProtocolIn_, class ProtocolOut_>
folly::IOBufQueue service_with_special_namesAsyncProcessor::return_getter(int32_t protoSeqId, apache::thrift::ContextStack* ctx, int32_t const& _return) {
ProtocolOut_ prot;
service_with_special_names_getter_presult result;
result.get<0>().value = const_cast<int32_t*>(&_return);
result.setIsSet(0, true);
return serializeResponse("getter", &prot, protoSeqId, ctx, result);
}
template <class ProtocolIn_, class ProtocolOut_>
void service_with_special_namesAsyncProcessor::throw_wrapped_getter(apache::thrift::ResponseChannelRequest::UniquePtr req,int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx) {
if (!ew) {
return;
}
{
(void)protoSeqId;
apache::thrift::detail::ap::process_throw_wrapped_handler_error<ProtocolOut_>(
ew, std::move(req), reqCtx, ctx, "getter");
return;
}
}
template <typename ProtocolIn_, typename ProtocolOut_>
void service_with_special_namesAsyncProcessor::setUpAndProcess_lists(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm) {
if (!setUpRequestProcessing(req, ctx, eb, tm, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, iface_)) {
return;
}
auto pri = iface_->getRequestPriority(ctx, apache::thrift::concurrency::NORMAL);
processInThread(std::move(req), std::move(serializedRequest), ctx, eb, tm, pri, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, &service_with_special_namesAsyncProcessor::process_lists<ProtocolIn_, ProtocolOut_>, this);
}
template <typename ProtocolIn_, typename ProtocolOut_>
void service_with_special_namesAsyncProcessor::process_lists(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm) {
// make sure getConnectionContext is null
// so async calls don't accidentally use it
iface_->setConnectionContext(nullptr);
service_with_special_names_lists_pargs args;
std::unique_ptr<apache::thrift::ContextStack> ctxStack(this->getContextStack(this->getServiceName(), "service_with_special_names.lists", ctx));
try {
deserializeRequest<ProtocolIn_>(args, ctx->getMethodName(), serializedRequest, ctxStack.get());
}
catch (const std::exception& ex) {
apache::thrift::detail::ap::process_handle_exn_deserialization<ProtocolOut_>(
ex, std::move(req), ctx, eb, "lists");
return;
}
req->setStartedProcessing();
auto callback = std::make_unique<apache::thrift::HandlerCallback<int32_t>>(std::move(req), std::move(ctxStack), return_lists<ProtocolIn_,ProtocolOut_>, throw_wrapped_lists<ProtocolIn_, ProtocolOut_>, ctx->getProtoSeqId(), eb, tm, ctx);
if (!callback->isRequestActive()) {
return;
}
iface_->async_tm_lists(std::move(callback));
}
template <class ProtocolIn_, class ProtocolOut_>
folly::IOBufQueue service_with_special_namesAsyncProcessor::return_lists(int32_t protoSeqId, apache::thrift::ContextStack* ctx, int32_t const& _return) {
ProtocolOut_ prot;
service_with_special_names_lists_presult result;
result.get<0>().value = const_cast<int32_t*>(&_return);
result.setIsSet(0, true);
return serializeResponse("lists", &prot, protoSeqId, ctx, result);
}
template <class ProtocolIn_, class ProtocolOut_>
void service_with_special_namesAsyncProcessor::throw_wrapped_lists(apache::thrift::ResponseChannelRequest::UniquePtr req,int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx) {
if (!ew) {
return;
}
{
(void)protoSeqId;
apache::thrift::detail::ap::process_throw_wrapped_handler_error<ProtocolOut_>(
ew, std::move(req), reqCtx, ctx, "lists");
return;
}
}
template <typename ProtocolIn_, typename ProtocolOut_>
void service_with_special_namesAsyncProcessor::setUpAndProcess_maps(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm) {
if (!setUpRequestProcessing(req, ctx, eb, tm, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, iface_)) {
return;
}
auto pri = iface_->getRequestPriority(ctx, apache::thrift::concurrency::NORMAL);
processInThread(std::move(req), std::move(serializedRequest), ctx, eb, tm, pri, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, &service_with_special_namesAsyncProcessor::process_maps<ProtocolIn_, ProtocolOut_>, this);
}
template <typename ProtocolIn_, typename ProtocolOut_>
void service_with_special_namesAsyncProcessor::process_maps(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm) {
// make sure getConnectionContext is null
// so async calls don't accidentally use it
iface_->setConnectionContext(nullptr);
service_with_special_names_maps_pargs args;
std::unique_ptr<apache::thrift::ContextStack> ctxStack(this->getContextStack(this->getServiceName(), "service_with_special_names.maps", ctx));
try {
deserializeRequest<ProtocolIn_>(args, ctx->getMethodName(), serializedRequest, ctxStack.get());
}
catch (const std::exception& ex) {
apache::thrift::detail::ap::process_handle_exn_deserialization<ProtocolOut_>(
ex, std::move(req), ctx, eb, "maps");
return;
}
req->setStartedProcessing();
auto callback = std::make_unique<apache::thrift::HandlerCallback<int32_t>>(std::move(req), std::move(ctxStack), return_maps<ProtocolIn_,ProtocolOut_>, throw_wrapped_maps<ProtocolIn_, ProtocolOut_>, ctx->getProtoSeqId(), eb, tm, ctx);
if (!callback->isRequestActive()) {
return;
}
iface_->async_tm_maps(std::move(callback));
}
template <class ProtocolIn_, class ProtocolOut_>
folly::IOBufQueue service_with_special_namesAsyncProcessor::return_maps(int32_t protoSeqId, apache::thrift::ContextStack* ctx, int32_t const& _return) {
ProtocolOut_ prot;
service_with_special_names_maps_presult result;
result.get<0>().value = const_cast<int32_t*>(&_return);
result.setIsSet(0, true);
return serializeResponse("maps", &prot, protoSeqId, ctx, result);
}
template <class ProtocolIn_, class ProtocolOut_>
void service_with_special_namesAsyncProcessor::throw_wrapped_maps(apache::thrift::ResponseChannelRequest::UniquePtr req,int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx) {
if (!ew) {
return;
}
{
(void)protoSeqId;
apache::thrift::detail::ap::process_throw_wrapped_handler_error<ProtocolOut_>(
ew, std::move(req), reqCtx, ctx, "maps");
return;
}
}
template <typename ProtocolIn_, typename ProtocolOut_>
void service_with_special_namesAsyncProcessor::setUpAndProcess_name(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm) {
if (!setUpRequestProcessing(req, ctx, eb, tm, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, iface_)) {
return;
}
auto pri = iface_->getRequestPriority(ctx, apache::thrift::concurrency::NORMAL);
processInThread(std::move(req), std::move(serializedRequest), ctx, eb, tm, pri, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, &service_with_special_namesAsyncProcessor::process_name<ProtocolIn_, ProtocolOut_>, this);
}
template <typename ProtocolIn_, typename ProtocolOut_>
void service_with_special_namesAsyncProcessor::process_name(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm) {
// make sure getConnectionContext is null
// so async calls don't accidentally use it
iface_->setConnectionContext(nullptr);
service_with_special_names_name_pargs args;
std::unique_ptr<apache::thrift::ContextStack> ctxStack(this->getContextStack(this->getServiceName(), "service_with_special_names.name", ctx));
try {
deserializeRequest<ProtocolIn_>(args, ctx->getMethodName(), serializedRequest, ctxStack.get());
}
catch (const std::exception& ex) {
apache::thrift::detail::ap::process_handle_exn_deserialization<ProtocolOut_>(
ex, std::move(req), ctx, eb, "name");
return;
}
req->setStartedProcessing();
auto callback = std::make_unique<apache::thrift::HandlerCallback<int32_t>>(std::move(req), std::move(ctxStack), return_name<ProtocolIn_,ProtocolOut_>, throw_wrapped_name<ProtocolIn_, ProtocolOut_>, ctx->getProtoSeqId(), eb, tm, ctx);
if (!callback->isRequestActive()) {
return;
}
iface_->async_tm_name(std::move(callback));
}
template <class ProtocolIn_, class ProtocolOut_>
folly::IOBufQueue service_with_special_namesAsyncProcessor::return_name(int32_t protoSeqId, apache::thrift::ContextStack* ctx, int32_t const& _return) {
ProtocolOut_ prot;
service_with_special_names_name_presult result;
result.get<0>().value = const_cast<int32_t*>(&_return);
result.setIsSet(0, true);
return serializeResponse("name", &prot, protoSeqId, ctx, result);
}
template <class ProtocolIn_, class ProtocolOut_>
void service_with_special_namesAsyncProcessor::throw_wrapped_name(apache::thrift::ResponseChannelRequest::UniquePtr req,int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx) {
if (!ew) {
return;
}
{
(void)protoSeqId;
apache::thrift::detail::ap::process_throw_wrapped_handler_error<ProtocolOut_>(
ew, std::move(req), reqCtx, ctx, "name");
return;
}
}
template <typename ProtocolIn_, typename ProtocolOut_>
void service_with_special_namesAsyncProcessor::setUpAndProcess_name_to_value(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm) {
if (!setUpRequestProcessing(req, ctx, eb, tm, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, iface_)) {
return;
}
auto pri = iface_->getRequestPriority(ctx, apache::thrift::concurrency::NORMAL);
processInThread(std::move(req), std::move(serializedRequest), ctx, eb, tm, pri, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, &service_with_special_namesAsyncProcessor::process_name_to_value<ProtocolIn_, ProtocolOut_>, this);
}
template <typename ProtocolIn_, typename ProtocolOut_>
void service_with_special_namesAsyncProcessor::process_name_to_value(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm) {
// make sure getConnectionContext is null
// so async calls don't accidentally use it
iface_->setConnectionContext(nullptr);
service_with_special_names_name_to_value_pargs args;
std::unique_ptr<apache::thrift::ContextStack> ctxStack(this->getContextStack(this->getServiceName(), "service_with_special_names.name_to_value", ctx));
try {
deserializeRequest<ProtocolIn_>(args, ctx->getMethodName(), serializedRequest, ctxStack.get());
}
catch (const std::exception& ex) {
apache::thrift::detail::ap::process_handle_exn_deserialization<ProtocolOut_>(
ex, std::move(req), ctx, eb, "name_to_value");
return;
}
req->setStartedProcessing();
auto callback = std::make_unique<apache::thrift::HandlerCallback<int32_t>>(std::move(req), std::move(ctxStack), return_name_to_value<ProtocolIn_,ProtocolOut_>, throw_wrapped_name_to_value<ProtocolIn_, ProtocolOut_>, ctx->getProtoSeqId(), eb, tm, ctx);
if (!callback->isRequestActive()) {
return;
}
iface_->async_tm_name_to_value(std::move(callback));
}
template <class ProtocolIn_, class ProtocolOut_>
folly::IOBufQueue service_with_special_namesAsyncProcessor::return_name_to_value(int32_t protoSeqId, apache::thrift::ContextStack* ctx, int32_t const& _return) {
ProtocolOut_ prot;
service_with_special_names_name_to_value_presult result;
result.get<0>().value = const_cast<int32_t*>(&_return);
result.setIsSet(0, true);
return serializeResponse("name_to_value", &prot, protoSeqId, ctx, result);
}
template <class ProtocolIn_, class ProtocolOut_>
void service_with_special_namesAsyncProcessor::throw_wrapped_name_to_value(apache::thrift::ResponseChannelRequest::UniquePtr req,int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx) {
if (!ew) {
return;
}
{
(void)protoSeqId;
apache::thrift::detail::ap::process_throw_wrapped_handler_error<ProtocolOut_>(
ew, std::move(req), reqCtx, ctx, "name_to_value");
return;
}
}
template <typename ProtocolIn_, typename ProtocolOut_>
void service_with_special_namesAsyncProcessor::setUpAndProcess_names(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm) {
if (!setUpRequestProcessing(req, ctx, eb, tm, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, iface_)) {
return;
}
auto pri = iface_->getRequestPriority(ctx, apache::thrift::concurrency::NORMAL);
processInThread(std::move(req), std::move(serializedRequest), ctx, eb, tm, pri, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, &service_with_special_namesAsyncProcessor::process_names<ProtocolIn_, ProtocolOut_>, this);
}
template <typename ProtocolIn_, typename ProtocolOut_>
void service_with_special_namesAsyncProcessor::process_names(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm) {
// make sure getConnectionContext is null
// so async calls don't accidentally use it
iface_->setConnectionContext(nullptr);
service_with_special_names_names_pargs args;
std::unique_ptr<apache::thrift::ContextStack> ctxStack(this->getContextStack(this->getServiceName(), "service_with_special_names.names", ctx));
try {
deserializeRequest<ProtocolIn_>(args, ctx->getMethodName(), serializedRequest, ctxStack.get());
}
catch (const std::exception& ex) {
apache::thrift::detail::ap::process_handle_exn_deserialization<ProtocolOut_>(
ex, std::move(req), ctx, eb, "names");
return;
}
req->setStartedProcessing();
auto callback = std::make_unique<apache::thrift::HandlerCallback<int32_t>>(std::move(req), std::move(ctxStack), return_names<ProtocolIn_,ProtocolOut_>, throw_wrapped_names<ProtocolIn_, ProtocolOut_>, ctx->getProtoSeqId(), eb, tm, ctx);
if (!callback->isRequestActive()) {
return;
}
iface_->async_tm_names(std::move(callback));
}
template <class ProtocolIn_, class ProtocolOut_>
folly::IOBufQueue service_with_special_namesAsyncProcessor::return_names(int32_t protoSeqId, apache::thrift::ContextStack* ctx, int32_t const& _return) {
ProtocolOut_ prot;
service_with_special_names_names_presult result;
result.get<0>().value = const_cast<int32_t*>(&_return);
result.setIsSet(0, true);
return serializeResponse("names", &prot, protoSeqId, ctx, result);
}
template <class ProtocolIn_, class ProtocolOut_>
void service_with_special_namesAsyncProcessor::throw_wrapped_names(apache::thrift::ResponseChannelRequest::UniquePtr req,int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx) {
if (!ew) {
return;
}
{
(void)protoSeqId;
apache::thrift::detail::ap::process_throw_wrapped_handler_error<ProtocolOut_>(
ew, std::move(req), reqCtx, ctx, "names");
return;
}
}
template <typename ProtocolIn_, typename ProtocolOut_>
void service_with_special_namesAsyncProcessor::setUpAndProcess_prefix_tree(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm) {
if (!setUpRequestProcessing(req, ctx, eb, tm, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, iface_)) {
return;
}
auto pri = iface_->getRequestPriority(ctx, apache::thrift::concurrency::NORMAL);
processInThread(std::move(req), std::move(serializedRequest), ctx, eb, tm, pri, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, &service_with_special_namesAsyncProcessor::process_prefix_tree<ProtocolIn_, ProtocolOut_>, this);
}
template <typename ProtocolIn_, typename ProtocolOut_>
void service_with_special_namesAsyncProcessor::process_prefix_tree(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm) {
// make sure getConnectionContext is null
// so async calls don't accidentally use it
iface_->setConnectionContext(nullptr);
service_with_special_names_prefix_tree_pargs args;
std::unique_ptr<apache::thrift::ContextStack> ctxStack(this->getContextStack(this->getServiceName(), "service_with_special_names.prefix_tree", ctx));
try {
deserializeRequest<ProtocolIn_>(args, ctx->getMethodName(), serializedRequest, ctxStack.get());
}
catch (const std::exception& ex) {
apache::thrift::detail::ap::process_handle_exn_deserialization<ProtocolOut_>(
ex, std::move(req), ctx, eb, "prefix_tree");
return;
}
req->setStartedProcessing();
auto callback = std::make_unique<apache::thrift::HandlerCallback<int32_t>>(std::move(req), std::move(ctxStack), return_prefix_tree<ProtocolIn_,ProtocolOut_>, throw_wrapped_prefix_tree<ProtocolIn_, ProtocolOut_>, ctx->getProtoSeqId(), eb, tm, ctx);
if (!callback->isRequestActive()) {
return;
}
iface_->async_tm_prefix_tree(std::move(callback));
}
template <class ProtocolIn_, class ProtocolOut_>
folly::IOBufQueue service_with_special_namesAsyncProcessor::return_prefix_tree(int32_t protoSeqId, apache::thrift::ContextStack* ctx, int32_t const& _return) {
ProtocolOut_ prot;
service_with_special_names_prefix_tree_presult result;
result.get<0>().value = const_cast<int32_t*>(&_return);
result.setIsSet(0, true);
return serializeResponse("prefix_tree", &prot, protoSeqId, ctx, result);
}
template <class ProtocolIn_, class ProtocolOut_>
void service_with_special_namesAsyncProcessor::throw_wrapped_prefix_tree(apache::thrift::ResponseChannelRequest::UniquePtr req,int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx) {
if (!ew) {
return;
}
{
(void)protoSeqId;
apache::thrift::detail::ap::process_throw_wrapped_handler_error<ProtocolOut_>(
ew, std::move(req), reqCtx, ctx, "prefix_tree");
return;
}
}
template <typename ProtocolIn_, typename ProtocolOut_>
void service_with_special_namesAsyncProcessor::setUpAndProcess_sets(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm) {
if (!setUpRequestProcessing(req, ctx, eb, tm, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, iface_)) {
return;
}
auto pri = iface_->getRequestPriority(ctx, apache::thrift::concurrency::NORMAL);
processInThread(std::move(req), std::move(serializedRequest), ctx, eb, tm, pri, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, &service_with_special_namesAsyncProcessor::process_sets<ProtocolIn_, ProtocolOut_>, this);
}
template <typename ProtocolIn_, typename ProtocolOut_>
void service_with_special_namesAsyncProcessor::process_sets(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm) {
// make sure getConnectionContext is null
// so async calls don't accidentally use it
iface_->setConnectionContext(nullptr);
service_with_special_names_sets_pargs args;
std::unique_ptr<apache::thrift::ContextStack> ctxStack(this->getContextStack(this->getServiceName(), "service_with_special_names.sets", ctx));
try {
deserializeRequest<ProtocolIn_>(args, ctx->getMethodName(), serializedRequest, ctxStack.get());
}
catch (const std::exception& ex) {
apache::thrift::detail::ap::process_handle_exn_deserialization<ProtocolOut_>(
ex, std::move(req), ctx, eb, "sets");
return;
}
req->setStartedProcessing();
auto callback = std::make_unique<apache::thrift::HandlerCallback<int32_t>>(std::move(req), std::move(ctxStack), return_sets<ProtocolIn_,ProtocolOut_>, throw_wrapped_sets<ProtocolIn_, ProtocolOut_>, ctx->getProtoSeqId(), eb, tm, ctx);
if (!callback->isRequestActive()) {
return;
}
iface_->async_tm_sets(std::move(callback));
}
template <class ProtocolIn_, class ProtocolOut_>
folly::IOBufQueue service_with_special_namesAsyncProcessor::return_sets(int32_t protoSeqId, apache::thrift::ContextStack* ctx, int32_t const& _return) {
ProtocolOut_ prot;
service_with_special_names_sets_presult result;
result.get<0>().value = const_cast<int32_t*>(&_return);
result.setIsSet(0, true);
return serializeResponse("sets", &prot, protoSeqId, ctx, result);
}
template <class ProtocolIn_, class ProtocolOut_>
void service_with_special_namesAsyncProcessor::throw_wrapped_sets(apache::thrift::ResponseChannelRequest::UniquePtr req,int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx) {
if (!ew) {
return;
}
{
(void)protoSeqId;
apache::thrift::detail::ap::process_throw_wrapped_handler_error<ProtocolOut_>(
ew, std::move(req), reqCtx, ctx, "sets");
return;
}
}
template <typename ProtocolIn_, typename ProtocolOut_>
void service_with_special_namesAsyncProcessor::setUpAndProcess_setter(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm) {
if (!setUpRequestProcessing(req, ctx, eb, tm, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, iface_)) {
return;
}
auto pri = iface_->getRequestPriority(ctx, apache::thrift::concurrency::NORMAL);
processInThread(std::move(req), std::move(serializedRequest), ctx, eb, tm, pri, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, &service_with_special_namesAsyncProcessor::process_setter<ProtocolIn_, ProtocolOut_>, this);
}
template <typename ProtocolIn_, typename ProtocolOut_>
void service_with_special_namesAsyncProcessor::process_setter(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm) {
// make sure getConnectionContext is null
// so async calls don't accidentally use it
iface_->setConnectionContext(nullptr);
service_with_special_names_setter_pargs args;
std::unique_ptr<apache::thrift::ContextStack> ctxStack(this->getContextStack(this->getServiceName(), "service_with_special_names.setter", ctx));
try {
deserializeRequest<ProtocolIn_>(args, ctx->getMethodName(), serializedRequest, ctxStack.get());
}
catch (const std::exception& ex) {
apache::thrift::detail::ap::process_handle_exn_deserialization<ProtocolOut_>(
ex, std::move(req), ctx, eb, "setter");
return;
}
req->setStartedProcessing();
auto callback = std::make_unique<apache::thrift::HandlerCallback<int32_t>>(std::move(req), std::move(ctxStack), return_setter<ProtocolIn_,ProtocolOut_>, throw_wrapped_setter<ProtocolIn_, ProtocolOut_>, ctx->getProtoSeqId(), eb, tm, ctx);
if (!callback->isRequestActive()) {
return;
}
iface_->async_tm_setter(std::move(callback));
}
template <class ProtocolIn_, class ProtocolOut_>
folly::IOBufQueue service_with_special_namesAsyncProcessor::return_setter(int32_t protoSeqId, apache::thrift::ContextStack* ctx, int32_t const& _return) {
ProtocolOut_ prot;
service_with_special_names_setter_presult result;
result.get<0>().value = const_cast<int32_t*>(&_return);
result.setIsSet(0, true);
return serializeResponse("setter", &prot, protoSeqId, ctx, result);
}
template <class ProtocolIn_, class ProtocolOut_>
void service_with_special_namesAsyncProcessor::throw_wrapped_setter(apache::thrift::ResponseChannelRequest::UniquePtr req,int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx) {
if (!ew) {
return;
}
{
(void)protoSeqId;
apache::thrift::detail::ap::process_throw_wrapped_handler_error<ProtocolOut_>(
ew, std::move(req), reqCtx, ctx, "setter");
return;
}
}
template <typename ProtocolIn_, typename ProtocolOut_>
void service_with_special_namesAsyncProcessor::setUpAndProcess_str(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm) {
if (!setUpRequestProcessing(req, ctx, eb, tm, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, iface_)) {
return;
}
auto pri = iface_->getRequestPriority(ctx, apache::thrift::concurrency::NORMAL);
processInThread(std::move(req), std::move(serializedRequest), ctx, eb, tm, pri, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, &service_with_special_namesAsyncProcessor::process_str<ProtocolIn_, ProtocolOut_>, this);
}
template <typename ProtocolIn_, typename ProtocolOut_>
void service_with_special_namesAsyncProcessor::process_str(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm) {
// make sure getConnectionContext is null
// so async calls don't accidentally use it
iface_->setConnectionContext(nullptr);
service_with_special_names_str_pargs args;
std::unique_ptr<apache::thrift::ContextStack> ctxStack(this->getContextStack(this->getServiceName(), "service_with_special_names.str", ctx));
try {
deserializeRequest<ProtocolIn_>(args, ctx->getMethodName(), serializedRequest, ctxStack.get());
}
catch (const std::exception& ex) {
apache::thrift::detail::ap::process_handle_exn_deserialization<ProtocolOut_>(
ex, std::move(req), ctx, eb, "str");
return;
}
req->setStartedProcessing();
auto callback = std::make_unique<apache::thrift::HandlerCallback<int32_t>>(std::move(req), std::move(ctxStack), return_str<ProtocolIn_,ProtocolOut_>, throw_wrapped_str<ProtocolIn_, ProtocolOut_>, ctx->getProtoSeqId(), eb, tm, ctx);
if (!callback->isRequestActive()) {
return;
}
iface_->async_tm_str(std::move(callback));
}
template <class ProtocolIn_, class ProtocolOut_>
folly::IOBufQueue service_with_special_namesAsyncProcessor::return_str(int32_t protoSeqId, apache::thrift::ContextStack* ctx, int32_t const& _return) {
ProtocolOut_ prot;
service_with_special_names_str_presult result;
result.get<0>().value = const_cast<int32_t*>(&_return);
result.setIsSet(0, true);
return serializeResponse("str", &prot, protoSeqId, ctx, result);
}
template <class ProtocolIn_, class ProtocolOut_>
void service_with_special_namesAsyncProcessor::throw_wrapped_str(apache::thrift::ResponseChannelRequest::UniquePtr req,int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx) {
if (!ew) {
return;
}
{
(void)protoSeqId;
apache::thrift::detail::ap::process_throw_wrapped_handler_error<ProtocolOut_>(
ew, std::move(req), reqCtx, ctx, "str");
return;
}
}
template <typename ProtocolIn_, typename ProtocolOut_>
void service_with_special_namesAsyncProcessor::setUpAndProcess_strings(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm) {
if (!setUpRequestProcessing(req, ctx, eb, tm, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, iface_)) {
return;
}
auto pri = iface_->getRequestPriority(ctx, apache::thrift::concurrency::NORMAL);
processInThread(std::move(req), std::move(serializedRequest), ctx, eb, tm, pri, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, &service_with_special_namesAsyncProcessor::process_strings<ProtocolIn_, ProtocolOut_>, this);
}
template <typename ProtocolIn_, typename ProtocolOut_>
void service_with_special_namesAsyncProcessor::process_strings(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm) {
// make sure getConnectionContext is null
// so async calls don't accidentally use it
iface_->setConnectionContext(nullptr);
service_with_special_names_strings_pargs args;
std::unique_ptr<apache::thrift::ContextStack> ctxStack(this->getContextStack(this->getServiceName(), "service_with_special_names.strings", ctx));
try {
deserializeRequest<ProtocolIn_>(args, ctx->getMethodName(), serializedRequest, ctxStack.get());
}
catch (const std::exception& ex) {
apache::thrift::detail::ap::process_handle_exn_deserialization<ProtocolOut_>(
ex, std::move(req), ctx, eb, "strings");
return;
}
req->setStartedProcessing();
auto callback = std::make_unique<apache::thrift::HandlerCallback<int32_t>>(std::move(req), std::move(ctxStack), return_strings<ProtocolIn_,ProtocolOut_>, throw_wrapped_strings<ProtocolIn_, ProtocolOut_>, ctx->getProtoSeqId(), eb, tm, ctx);
if (!callback->isRequestActive()) {
return;
}
iface_->async_tm_strings(std::move(callback));
}
template <class ProtocolIn_, class ProtocolOut_>
folly::IOBufQueue service_with_special_namesAsyncProcessor::return_strings(int32_t protoSeqId, apache::thrift::ContextStack* ctx, int32_t const& _return) {
ProtocolOut_ prot;
service_with_special_names_strings_presult result;
result.get<0>().value = const_cast<int32_t*>(&_return);
result.setIsSet(0, true);
return serializeResponse("strings", &prot, protoSeqId, ctx, result);
}
template <class ProtocolIn_, class ProtocolOut_>
void service_with_special_namesAsyncProcessor::throw_wrapped_strings(apache::thrift::ResponseChannelRequest::UniquePtr req,int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx) {
if (!ew) {
return;
}
{
(void)protoSeqId;
apache::thrift::detail::ap::process_throw_wrapped_handler_error<ProtocolOut_>(
ew, std::move(req), reqCtx, ctx, "strings");
return;
}
}
template <typename ProtocolIn_, typename ProtocolOut_>
void service_with_special_namesAsyncProcessor::setUpAndProcess_type(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm) {
if (!setUpRequestProcessing(req, ctx, eb, tm, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, iface_)) {
return;
}
auto pri = iface_->getRequestPriority(ctx, apache::thrift::concurrency::NORMAL);
processInThread(std::move(req), std::move(serializedRequest), ctx, eb, tm, pri, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, &service_with_special_namesAsyncProcessor::process_type<ProtocolIn_, ProtocolOut_>, this);
}
template <typename ProtocolIn_, typename ProtocolOut_>
void service_with_special_namesAsyncProcessor::process_type(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm) {
// make sure getConnectionContext is null
// so async calls don't accidentally use it
iface_->setConnectionContext(nullptr);
service_with_special_names_type_pargs args;
std::unique_ptr<apache::thrift::ContextStack> ctxStack(this->getContextStack(this->getServiceName(), "service_with_special_names.type", ctx));
try {
deserializeRequest<ProtocolIn_>(args, ctx->getMethodName(), serializedRequest, ctxStack.get());
}
catch (const std::exception& ex) {
apache::thrift::detail::ap::process_handle_exn_deserialization<ProtocolOut_>(
ex, std::move(req), ctx, eb, "type");
return;
}
req->setStartedProcessing();
auto callback = std::make_unique<apache::thrift::HandlerCallback<int32_t>>(std::move(req), std::move(ctxStack), return_type<ProtocolIn_,ProtocolOut_>, throw_wrapped_type<ProtocolIn_, ProtocolOut_>, ctx->getProtoSeqId(), eb, tm, ctx);
if (!callback->isRequestActive()) {
return;
}
iface_->async_tm_type(std::move(callback));
}
template <class ProtocolIn_, class ProtocolOut_>
folly::IOBufQueue service_with_special_namesAsyncProcessor::return_type(int32_t protoSeqId, apache::thrift::ContextStack* ctx, int32_t const& _return) {
ProtocolOut_ prot;
service_with_special_names_type_presult result;
result.get<0>().value = const_cast<int32_t*>(&_return);
result.setIsSet(0, true);
return serializeResponse("type", &prot, protoSeqId, ctx, result);
}
template <class ProtocolIn_, class ProtocolOut_>
void service_with_special_namesAsyncProcessor::throw_wrapped_type(apache::thrift::ResponseChannelRequest::UniquePtr req,int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx) {
if (!ew) {
return;
}
{
(void)protoSeqId;
apache::thrift::detail::ap::process_throw_wrapped_handler_error<ProtocolOut_>(
ew, std::move(req), reqCtx, ctx, "type");
return;
}
}
template <typename ProtocolIn_, typename ProtocolOut_>
void service_with_special_namesAsyncProcessor::setUpAndProcess_value(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm) {
if (!setUpRequestProcessing(req, ctx, eb, tm, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, iface_)) {
return;
}
auto pri = iface_->getRequestPriority(ctx, apache::thrift::concurrency::NORMAL);
processInThread(std::move(req), std::move(serializedRequest), ctx, eb, tm, pri, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, &service_with_special_namesAsyncProcessor::process_value<ProtocolIn_, ProtocolOut_>, this);
}
template <typename ProtocolIn_, typename ProtocolOut_>
void service_with_special_namesAsyncProcessor::process_value(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm) {
// make sure getConnectionContext is null
// so async calls don't accidentally use it
iface_->setConnectionContext(nullptr);
service_with_special_names_value_pargs args;
std::unique_ptr<apache::thrift::ContextStack> ctxStack(this->getContextStack(this->getServiceName(), "service_with_special_names.value", ctx));
try {
deserializeRequest<ProtocolIn_>(args, ctx->getMethodName(), serializedRequest, ctxStack.get());
}
catch (const std::exception& ex) {
apache::thrift::detail::ap::process_handle_exn_deserialization<ProtocolOut_>(
ex, std::move(req), ctx, eb, "value");
return;
}
req->setStartedProcessing();
auto callback = std::make_unique<apache::thrift::HandlerCallback<int32_t>>(std::move(req), std::move(ctxStack), return_value<ProtocolIn_,ProtocolOut_>, throw_wrapped_value<ProtocolIn_, ProtocolOut_>, ctx->getProtoSeqId(), eb, tm, ctx);
if (!callback->isRequestActive()) {
return;
}
iface_->async_tm_value(std::move(callback));
}
template <class ProtocolIn_, class ProtocolOut_>
folly::IOBufQueue service_with_special_namesAsyncProcessor::return_value(int32_t protoSeqId, apache::thrift::ContextStack* ctx, int32_t const& _return) {
ProtocolOut_ prot;
service_with_special_names_value_presult result;
result.get<0>().value = const_cast<int32_t*>(&_return);
result.setIsSet(0, true);
return serializeResponse("value", &prot, protoSeqId, ctx, result);
}
template <class ProtocolIn_, class ProtocolOut_>
void service_with_special_namesAsyncProcessor::throw_wrapped_value(apache::thrift::ResponseChannelRequest::UniquePtr req,int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx) {
if (!ew) {
return;
}
{
(void)protoSeqId;
apache::thrift::detail::ap::process_throw_wrapped_handler_error<ProtocolOut_>(
ew, std::move(req), reqCtx, ctx, "value");
return;
}
}
template <typename ProtocolIn_, typename ProtocolOut_>
void service_with_special_namesAsyncProcessor::setUpAndProcess_value_to_name(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm) {
if (!setUpRequestProcessing(req, ctx, eb, tm, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, iface_)) {
return;
}
auto pri = iface_->getRequestPriority(ctx, apache::thrift::concurrency::NORMAL);
processInThread(std::move(req), std::move(serializedRequest), ctx, eb, tm, pri, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, &service_with_special_namesAsyncProcessor::process_value_to_name<ProtocolIn_, ProtocolOut_>, this);
}
template <typename ProtocolIn_, typename ProtocolOut_>
void service_with_special_namesAsyncProcessor::process_value_to_name(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm) {
// make sure getConnectionContext is null
// so async calls don't accidentally use it
iface_->setConnectionContext(nullptr);
service_with_special_names_value_to_name_pargs args;
std::unique_ptr<apache::thrift::ContextStack> ctxStack(this->getContextStack(this->getServiceName(), "service_with_special_names.value_to_name", ctx));
try {
deserializeRequest<ProtocolIn_>(args, ctx->getMethodName(), serializedRequest, ctxStack.get());
}
catch (const std::exception& ex) {
apache::thrift::detail::ap::process_handle_exn_deserialization<ProtocolOut_>(
ex, std::move(req), ctx, eb, "value_to_name");
return;
}
req->setStartedProcessing();
auto callback = std::make_unique<apache::thrift::HandlerCallback<int32_t>>(std::move(req), std::move(ctxStack), return_value_to_name<ProtocolIn_,ProtocolOut_>, throw_wrapped_value_to_name<ProtocolIn_, ProtocolOut_>, ctx->getProtoSeqId(), eb, tm, ctx);
if (!callback->isRequestActive()) {
return;
}
iface_->async_tm_value_to_name(std::move(callback));
}
template <class ProtocolIn_, class ProtocolOut_>
folly::IOBufQueue service_with_special_namesAsyncProcessor::return_value_to_name(int32_t protoSeqId, apache::thrift::ContextStack* ctx, int32_t const& _return) {
ProtocolOut_ prot;
service_with_special_names_value_to_name_presult result;
result.get<0>().value = const_cast<int32_t*>(&_return);
result.setIsSet(0, true);
return serializeResponse("value_to_name", &prot, protoSeqId, ctx, result);
}
template <class ProtocolIn_, class ProtocolOut_>
void service_with_special_namesAsyncProcessor::throw_wrapped_value_to_name(apache::thrift::ResponseChannelRequest::UniquePtr req,int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx) {
if (!ew) {
return;
}
{
(void)protoSeqId;
apache::thrift::detail::ap::process_throw_wrapped_handler_error<ProtocolOut_>(
ew, std::move(req), reqCtx, ctx, "value_to_name");
return;
}
}
template <typename ProtocolIn_, typename ProtocolOut_>
void service_with_special_namesAsyncProcessor::setUpAndProcess_values(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm) {
if (!setUpRequestProcessing(req, ctx, eb, tm, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, iface_)) {
return;
}
auto pri = iface_->getRequestPriority(ctx, apache::thrift::concurrency::NORMAL);
processInThread(std::move(req), std::move(serializedRequest), ctx, eb, tm, pri, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, &service_with_special_namesAsyncProcessor::process_values<ProtocolIn_, ProtocolOut_>, this);
}
template <typename ProtocolIn_, typename ProtocolOut_>
void service_with_special_namesAsyncProcessor::process_values(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm) {
// make sure getConnectionContext is null
// so async calls don't accidentally use it
iface_->setConnectionContext(nullptr);
service_with_special_names_values_pargs args;
std::unique_ptr<apache::thrift::ContextStack> ctxStack(this->getContextStack(this->getServiceName(), "service_with_special_names.values", ctx));
try {
deserializeRequest<ProtocolIn_>(args, ctx->getMethodName(), serializedRequest, ctxStack.get());
}
catch (const std::exception& ex) {
apache::thrift::detail::ap::process_handle_exn_deserialization<ProtocolOut_>(
ex, std::move(req), ctx, eb, "values");
return;
}
req->setStartedProcessing();
auto callback = std::make_unique<apache::thrift::HandlerCallback<int32_t>>(std::move(req), std::move(ctxStack), return_values<ProtocolIn_,ProtocolOut_>, throw_wrapped_values<ProtocolIn_, ProtocolOut_>, ctx->getProtoSeqId(), eb, tm, ctx);
if (!callback->isRequestActive()) {
return;
}
iface_->async_tm_values(std::move(callback));
}
template <class ProtocolIn_, class ProtocolOut_>
folly::IOBufQueue service_with_special_namesAsyncProcessor::return_values(int32_t protoSeqId, apache::thrift::ContextStack* ctx, int32_t const& _return) {
ProtocolOut_ prot;
service_with_special_names_values_presult result;
result.get<0>().value = const_cast<int32_t*>(&_return);
result.setIsSet(0, true);
return serializeResponse("values", &prot, protoSeqId, ctx, result);
}
template <class ProtocolIn_, class ProtocolOut_>
void service_with_special_namesAsyncProcessor::throw_wrapped_values(apache::thrift::ResponseChannelRequest::UniquePtr req,int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx) {
if (!ew) {
return;
}
{
(void)protoSeqId;
apache::thrift::detail::ap::process_throw_wrapped_handler_error<ProtocolOut_>(
ew, std::move(req), reqCtx, ctx, "values");
return;
}
}
template <typename ProtocolIn_, typename ProtocolOut_>
void service_with_special_namesAsyncProcessor::setUpAndProcess_id(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm) {
if (!setUpRequestProcessing(req, ctx, eb, tm, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, iface_)) {
return;
}
auto pri = iface_->getRequestPriority(ctx, apache::thrift::concurrency::NORMAL);
processInThread(std::move(req), std::move(serializedRequest), ctx, eb, tm, pri, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, &service_with_special_namesAsyncProcessor::process_id<ProtocolIn_, ProtocolOut_>, this);
}
template <typename ProtocolIn_, typename ProtocolOut_>
void service_with_special_namesAsyncProcessor::process_id(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm) {
// make sure getConnectionContext is null
// so async calls don't accidentally use it
iface_->setConnectionContext(nullptr);
service_with_special_names_id_pargs args;
std::unique_ptr<apache::thrift::ContextStack> ctxStack(this->getContextStack(this->getServiceName(), "service_with_special_names.id", ctx));
try {
deserializeRequest<ProtocolIn_>(args, ctx->getMethodName(), serializedRequest, ctxStack.get());
}
catch (const std::exception& ex) {
apache::thrift::detail::ap::process_handle_exn_deserialization<ProtocolOut_>(
ex, std::move(req), ctx, eb, "id");
return;
}
req->setStartedProcessing();
auto callback = std::make_unique<apache::thrift::HandlerCallback<int32_t>>(std::move(req), std::move(ctxStack), return_id<ProtocolIn_,ProtocolOut_>, throw_wrapped_id<ProtocolIn_, ProtocolOut_>, ctx->getProtoSeqId(), eb, tm, ctx);
if (!callback->isRequestActive()) {
return;
}
iface_->async_tm_id(std::move(callback));
}
template <class ProtocolIn_, class ProtocolOut_>
folly::IOBufQueue service_with_special_namesAsyncProcessor::return_id(int32_t protoSeqId, apache::thrift::ContextStack* ctx, int32_t const& _return) {
ProtocolOut_ prot;
service_with_special_names_id_presult result;
result.get<0>().value = const_cast<int32_t*>(&_return);
result.setIsSet(0, true);
return serializeResponse("id", &prot, protoSeqId, ctx, result);
}
template <class ProtocolIn_, class ProtocolOut_>
void service_with_special_namesAsyncProcessor::throw_wrapped_id(apache::thrift::ResponseChannelRequest::UniquePtr req,int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx) {
if (!ew) {
return;
}
{
(void)protoSeqId;
apache::thrift::detail::ap::process_throw_wrapped_handler_error<ProtocolOut_>(
ew, std::move(req), reqCtx, ctx, "id");
return;
}
}
template <typename ProtocolIn_, typename ProtocolOut_>
void service_with_special_namesAsyncProcessor::setUpAndProcess_ids(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm) {
if (!setUpRequestProcessing(req, ctx, eb, tm, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, iface_)) {
return;
}
auto pri = iface_->getRequestPriority(ctx, apache::thrift::concurrency::NORMAL);
processInThread(std::move(req), std::move(serializedRequest), ctx, eb, tm, pri, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, &service_with_special_namesAsyncProcessor::process_ids<ProtocolIn_, ProtocolOut_>, this);
}
template <typename ProtocolIn_, typename ProtocolOut_>
void service_with_special_namesAsyncProcessor::process_ids(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm) {
// make sure getConnectionContext is null
// so async calls don't accidentally use it
iface_->setConnectionContext(nullptr);
service_with_special_names_ids_pargs args;
std::unique_ptr<apache::thrift::ContextStack> ctxStack(this->getContextStack(this->getServiceName(), "service_with_special_names.ids", ctx));
try {
deserializeRequest<ProtocolIn_>(args, ctx->getMethodName(), serializedRequest, ctxStack.get());
}
catch (const std::exception& ex) {
apache::thrift::detail::ap::process_handle_exn_deserialization<ProtocolOut_>(
ex, std::move(req), ctx, eb, "ids");
return;
}
req->setStartedProcessing();
auto callback = std::make_unique<apache::thrift::HandlerCallback<int32_t>>(std::move(req), std::move(ctxStack), return_ids<ProtocolIn_,ProtocolOut_>, throw_wrapped_ids<ProtocolIn_, ProtocolOut_>, ctx->getProtoSeqId(), eb, tm, ctx);
if (!callback->isRequestActive()) {
return;
}
iface_->async_tm_ids(std::move(callback));
}
template <class ProtocolIn_, class ProtocolOut_>
folly::IOBufQueue service_with_special_namesAsyncProcessor::return_ids(int32_t protoSeqId, apache::thrift::ContextStack* ctx, int32_t const& _return) {
ProtocolOut_ prot;
service_with_special_names_ids_presult result;
result.get<0>().value = const_cast<int32_t*>(&_return);
result.setIsSet(0, true);
return serializeResponse("ids", &prot, protoSeqId, ctx, result);
}
template <class ProtocolIn_, class ProtocolOut_>
void service_with_special_namesAsyncProcessor::throw_wrapped_ids(apache::thrift::ResponseChannelRequest::UniquePtr req,int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx) {
if (!ew) {
return;
}
{
(void)protoSeqId;
apache::thrift::detail::ap::process_throw_wrapped_handler_error<ProtocolOut_>(
ew, std::move(req), reqCtx, ctx, "ids");
return;
}
}
template <typename ProtocolIn_, typename ProtocolOut_>
void service_with_special_namesAsyncProcessor::setUpAndProcess_descriptor(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm) {
if (!setUpRequestProcessing(req, ctx, eb, tm, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, iface_)) {
return;
}
auto pri = iface_->getRequestPriority(ctx, apache::thrift::concurrency::NORMAL);
processInThread(std::move(req), std::move(serializedRequest), ctx, eb, tm, pri, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, &service_with_special_namesAsyncProcessor::process_descriptor<ProtocolIn_, ProtocolOut_>, this);
}
template <typename ProtocolIn_, typename ProtocolOut_>
void service_with_special_namesAsyncProcessor::process_descriptor(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm) {
// make sure getConnectionContext is null
// so async calls don't accidentally use it
iface_->setConnectionContext(nullptr);
service_with_special_names_descriptor_pargs args;
std::unique_ptr<apache::thrift::ContextStack> ctxStack(this->getContextStack(this->getServiceName(), "service_with_special_names.descriptor", ctx));
try {
deserializeRequest<ProtocolIn_>(args, ctx->getMethodName(), serializedRequest, ctxStack.get());
}
catch (const std::exception& ex) {
apache::thrift::detail::ap::process_handle_exn_deserialization<ProtocolOut_>(
ex, std::move(req), ctx, eb, "descriptor");
return;
}
req->setStartedProcessing();
auto callback = std::make_unique<apache::thrift::HandlerCallback<int32_t>>(std::move(req), std::move(ctxStack), return_descriptor<ProtocolIn_,ProtocolOut_>, throw_wrapped_descriptor<ProtocolIn_, ProtocolOut_>, ctx->getProtoSeqId(), eb, tm, ctx);
if (!callback->isRequestActive()) {
return;
}
iface_->async_tm_descriptor(std::move(callback));
}
template <class ProtocolIn_, class ProtocolOut_>
folly::IOBufQueue service_with_special_namesAsyncProcessor::return_descriptor(int32_t protoSeqId, apache::thrift::ContextStack* ctx, int32_t const& _return) {
ProtocolOut_ prot;
service_with_special_names_descriptor_presult result;
result.get<0>().value = const_cast<int32_t*>(&_return);
result.setIsSet(0, true);
return serializeResponse("descriptor", &prot, protoSeqId, ctx, result);
}
template <class ProtocolIn_, class ProtocolOut_>
void service_with_special_namesAsyncProcessor::throw_wrapped_descriptor(apache::thrift::ResponseChannelRequest::UniquePtr req,int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx) {
if (!ew) {
return;
}
{
(void)protoSeqId;
apache::thrift::detail::ap::process_throw_wrapped_handler_error<ProtocolOut_>(
ew, std::move(req), reqCtx, ctx, "descriptor");
return;
}
}
template <typename ProtocolIn_, typename ProtocolOut_>
void service_with_special_namesAsyncProcessor::setUpAndProcess_descriptors(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm) {
if (!setUpRequestProcessing(req, ctx, eb, tm, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, iface_)) {
return;
}
auto pri = iface_->getRequestPriority(ctx, apache::thrift::concurrency::NORMAL);
processInThread(std::move(req), std::move(serializedRequest), ctx, eb, tm, pri, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, &service_with_special_namesAsyncProcessor::process_descriptors<ProtocolIn_, ProtocolOut_>, this);
}
template <typename ProtocolIn_, typename ProtocolOut_>
void service_with_special_namesAsyncProcessor::process_descriptors(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm) {
// make sure getConnectionContext is null
// so async calls don't accidentally use it
iface_->setConnectionContext(nullptr);
service_with_special_names_descriptors_pargs args;
std::unique_ptr<apache::thrift::ContextStack> ctxStack(this->getContextStack(this->getServiceName(), "service_with_special_names.descriptors", ctx));
try {
deserializeRequest<ProtocolIn_>(args, ctx->getMethodName(), serializedRequest, ctxStack.get());
}
catch (const std::exception& ex) {
apache::thrift::detail::ap::process_handle_exn_deserialization<ProtocolOut_>(
ex, std::move(req), ctx, eb, "descriptors");
return;
}
req->setStartedProcessing();
auto callback = std::make_unique<apache::thrift::HandlerCallback<int32_t>>(std::move(req), std::move(ctxStack), return_descriptors<ProtocolIn_,ProtocolOut_>, throw_wrapped_descriptors<ProtocolIn_, ProtocolOut_>, ctx->getProtoSeqId(), eb, tm, ctx);
if (!callback->isRequestActive()) {
return;
}
iface_->async_tm_descriptors(std::move(callback));
}
template <class ProtocolIn_, class ProtocolOut_>
folly::IOBufQueue service_with_special_namesAsyncProcessor::return_descriptors(int32_t protoSeqId, apache::thrift::ContextStack* ctx, int32_t const& _return) {
ProtocolOut_ prot;
service_with_special_names_descriptors_presult result;
result.get<0>().value = const_cast<int32_t*>(&_return);
result.setIsSet(0, true);
return serializeResponse("descriptors", &prot, protoSeqId, ctx, result);
}
template <class ProtocolIn_, class ProtocolOut_>
void service_with_special_namesAsyncProcessor::throw_wrapped_descriptors(apache::thrift::ResponseChannelRequest::UniquePtr req,int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx) {
if (!ew) {
return;
}
{
(void)protoSeqId;
apache::thrift::detail::ap::process_throw_wrapped_handler_error<ProtocolOut_>(
ew, std::move(req), reqCtx, ctx, "descriptors");
return;
}
}
template <typename ProtocolIn_, typename ProtocolOut_>
void service_with_special_namesAsyncProcessor::setUpAndProcess_key(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm) {
if (!setUpRequestProcessing(req, ctx, eb, tm, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, iface_)) {
return;
}
auto pri = iface_->getRequestPriority(ctx, apache::thrift::concurrency::NORMAL);
processInThread(std::move(req), std::move(serializedRequest), ctx, eb, tm, pri, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, &service_with_special_namesAsyncProcessor::process_key<ProtocolIn_, ProtocolOut_>, this);
}
template <typename ProtocolIn_, typename ProtocolOut_>
void service_with_special_namesAsyncProcessor::process_key(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm) {
// make sure getConnectionContext is null
// so async calls don't accidentally use it
iface_->setConnectionContext(nullptr);
service_with_special_names_key_pargs args;
std::unique_ptr<apache::thrift::ContextStack> ctxStack(this->getContextStack(this->getServiceName(), "service_with_special_names.key", ctx));
try {
deserializeRequest<ProtocolIn_>(args, ctx->getMethodName(), serializedRequest, ctxStack.get());
}
catch (const std::exception& ex) {
apache::thrift::detail::ap::process_handle_exn_deserialization<ProtocolOut_>(
ex, std::move(req), ctx, eb, "key");
return;
}
req->setStartedProcessing();
auto callback = std::make_unique<apache::thrift::HandlerCallback<int32_t>>(std::move(req), std::move(ctxStack), return_key<ProtocolIn_,ProtocolOut_>, throw_wrapped_key<ProtocolIn_, ProtocolOut_>, ctx->getProtoSeqId(), eb, tm, ctx);
if (!callback->isRequestActive()) {
return;
}
iface_->async_tm_key(std::move(callback));
}
template <class ProtocolIn_, class ProtocolOut_>
folly::IOBufQueue service_with_special_namesAsyncProcessor::return_key(int32_t protoSeqId, apache::thrift::ContextStack* ctx, int32_t const& _return) {
ProtocolOut_ prot;
service_with_special_names_key_presult result;
result.get<0>().value = const_cast<int32_t*>(&_return);
result.setIsSet(0, true);
return serializeResponse("key", &prot, protoSeqId, ctx, result);
}
template <class ProtocolIn_, class ProtocolOut_>
void service_with_special_namesAsyncProcessor::throw_wrapped_key(apache::thrift::ResponseChannelRequest::UniquePtr req,int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx) {
if (!ew) {
return;
}
{
(void)protoSeqId;
apache::thrift::detail::ap::process_throw_wrapped_handler_error<ProtocolOut_>(
ew, std::move(req), reqCtx, ctx, "key");
return;
}
}
template <typename ProtocolIn_, typename ProtocolOut_>
void service_with_special_namesAsyncProcessor::setUpAndProcess_keys(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm) {
if (!setUpRequestProcessing(req, ctx, eb, tm, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, iface_)) {
return;
}
auto pri = iface_->getRequestPriority(ctx, apache::thrift::concurrency::NORMAL);
processInThread(std::move(req), std::move(serializedRequest), ctx, eb, tm, pri, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, &service_with_special_namesAsyncProcessor::process_keys<ProtocolIn_, ProtocolOut_>, this);
}
template <typename ProtocolIn_, typename ProtocolOut_>
void service_with_special_namesAsyncProcessor::process_keys(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm) {
// make sure getConnectionContext is null
// so async calls don't accidentally use it
iface_->setConnectionContext(nullptr);
service_with_special_names_keys_pargs args;
std::unique_ptr<apache::thrift::ContextStack> ctxStack(this->getContextStack(this->getServiceName(), "service_with_special_names.keys", ctx));
try {
deserializeRequest<ProtocolIn_>(args, ctx->getMethodName(), serializedRequest, ctxStack.get());
}
catch (const std::exception& ex) {
apache::thrift::detail::ap::process_handle_exn_deserialization<ProtocolOut_>(
ex, std::move(req), ctx, eb, "keys");
return;
}
req->setStartedProcessing();
auto callback = std::make_unique<apache::thrift::HandlerCallback<int32_t>>(std::move(req), std::move(ctxStack), return_keys<ProtocolIn_,ProtocolOut_>, throw_wrapped_keys<ProtocolIn_, ProtocolOut_>, ctx->getProtoSeqId(), eb, tm, ctx);
if (!callback->isRequestActive()) {
return;
}
iface_->async_tm_keys(std::move(callback));
}
template <class ProtocolIn_, class ProtocolOut_>
folly::IOBufQueue service_with_special_namesAsyncProcessor::return_keys(int32_t protoSeqId, apache::thrift::ContextStack* ctx, int32_t const& _return) {
ProtocolOut_ prot;
service_with_special_names_keys_presult result;
result.get<0>().value = const_cast<int32_t*>(&_return);
result.setIsSet(0, true);
return serializeResponse("keys", &prot, protoSeqId, ctx, result);
}
template <class ProtocolIn_, class ProtocolOut_>
void service_with_special_namesAsyncProcessor::throw_wrapped_keys(apache::thrift::ResponseChannelRequest::UniquePtr req,int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx) {
if (!ew) {
return;
}
{
(void)protoSeqId;
apache::thrift::detail::ap::process_throw_wrapped_handler_error<ProtocolOut_>(
ew, std::move(req), reqCtx, ctx, "keys");
return;
}
}
template <typename ProtocolIn_, typename ProtocolOut_>
void service_with_special_namesAsyncProcessor::setUpAndProcess_annotation(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm) {
if (!setUpRequestProcessing(req, ctx, eb, tm, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, iface_)) {
return;
}
auto pri = iface_->getRequestPriority(ctx, apache::thrift::concurrency::NORMAL);
processInThread(std::move(req), std::move(serializedRequest), ctx, eb, tm, pri, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, &service_with_special_namesAsyncProcessor::process_annotation<ProtocolIn_, ProtocolOut_>, this);
}
template <typename ProtocolIn_, typename ProtocolOut_>
void service_with_special_namesAsyncProcessor::process_annotation(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm) {
// make sure getConnectionContext is null
// so async calls don't accidentally use it
iface_->setConnectionContext(nullptr);
service_with_special_names_annotation_pargs args;
std::unique_ptr<apache::thrift::ContextStack> ctxStack(this->getContextStack(this->getServiceName(), "service_with_special_names.annotation", ctx));
try {
deserializeRequest<ProtocolIn_>(args, ctx->getMethodName(), serializedRequest, ctxStack.get());
}
catch (const std::exception& ex) {
apache::thrift::detail::ap::process_handle_exn_deserialization<ProtocolOut_>(
ex, std::move(req), ctx, eb, "annotation");
return;
}
req->setStartedProcessing();
auto callback = std::make_unique<apache::thrift::HandlerCallback<int32_t>>(std::move(req), std::move(ctxStack), return_annotation<ProtocolIn_,ProtocolOut_>, throw_wrapped_annotation<ProtocolIn_, ProtocolOut_>, ctx->getProtoSeqId(), eb, tm, ctx);
if (!callback->isRequestActive()) {
return;
}
iface_->async_tm_annotation(std::move(callback));
}
template <class ProtocolIn_, class ProtocolOut_>
folly::IOBufQueue service_with_special_namesAsyncProcessor::return_annotation(int32_t protoSeqId, apache::thrift::ContextStack* ctx, int32_t const& _return) {
ProtocolOut_ prot;
service_with_special_names_annotation_presult result;
result.get<0>().value = const_cast<int32_t*>(&_return);
result.setIsSet(0, true);
return serializeResponse("annotation", &prot, protoSeqId, ctx, result);
}
template <class ProtocolIn_, class ProtocolOut_>
void service_with_special_namesAsyncProcessor::throw_wrapped_annotation(apache::thrift::ResponseChannelRequest::UniquePtr req,int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx) {
if (!ew) {
return;
}
{
(void)protoSeqId;
apache::thrift::detail::ap::process_throw_wrapped_handler_error<ProtocolOut_>(
ew, std::move(req), reqCtx, ctx, "annotation");
return;
}
}
template <typename ProtocolIn_, typename ProtocolOut_>
void service_with_special_namesAsyncProcessor::setUpAndProcess_annotations(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm) {
if (!setUpRequestProcessing(req, ctx, eb, tm, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, iface_)) {
return;
}
auto pri = iface_->getRequestPriority(ctx, apache::thrift::concurrency::NORMAL);
processInThread(std::move(req), std::move(serializedRequest), ctx, eb, tm, pri, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, &service_with_special_namesAsyncProcessor::process_annotations<ProtocolIn_, ProtocolOut_>, this);
}
template <typename ProtocolIn_, typename ProtocolOut_>
void service_with_special_namesAsyncProcessor::process_annotations(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm) {
// make sure getConnectionContext is null
// so async calls don't accidentally use it
iface_->setConnectionContext(nullptr);
service_with_special_names_annotations_pargs args;
std::unique_ptr<apache::thrift::ContextStack> ctxStack(this->getContextStack(this->getServiceName(), "service_with_special_names.annotations", ctx));
try {
deserializeRequest<ProtocolIn_>(args, ctx->getMethodName(), serializedRequest, ctxStack.get());
}
catch (const std::exception& ex) {
apache::thrift::detail::ap::process_handle_exn_deserialization<ProtocolOut_>(
ex, std::move(req), ctx, eb, "annotations");
return;
}
req->setStartedProcessing();
auto callback = std::make_unique<apache::thrift::HandlerCallback<int32_t>>(std::move(req), std::move(ctxStack), return_annotations<ProtocolIn_,ProtocolOut_>, throw_wrapped_annotations<ProtocolIn_, ProtocolOut_>, ctx->getProtoSeqId(), eb, tm, ctx);
if (!callback->isRequestActive()) {
return;
}
iface_->async_tm_annotations(std::move(callback));
}
template <class ProtocolIn_, class ProtocolOut_>
folly::IOBufQueue service_with_special_namesAsyncProcessor::return_annotations(int32_t protoSeqId, apache::thrift::ContextStack* ctx, int32_t const& _return) {
ProtocolOut_ prot;
service_with_special_names_annotations_presult result;
result.get<0>().value = const_cast<int32_t*>(&_return);
result.setIsSet(0, true);
return serializeResponse("annotations", &prot, protoSeqId, ctx, result);
}
template <class ProtocolIn_, class ProtocolOut_>
void service_with_special_namesAsyncProcessor::throw_wrapped_annotations(apache::thrift::ResponseChannelRequest::UniquePtr req,int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx) {
if (!ew) {
return;
}
{
(void)protoSeqId;
apache::thrift::detail::ap::process_throw_wrapped_handler_error<ProtocolOut_>(
ew, std::move(req), reqCtx, ctx, "annotations");
return;
}
}
template <typename ProtocolIn_, typename ProtocolOut_>
void service_with_special_namesAsyncProcessor::setUpAndProcess_member(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm) {
if (!setUpRequestProcessing(req, ctx, eb, tm, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, iface_)) {
return;
}
auto pri = iface_->getRequestPriority(ctx, apache::thrift::concurrency::NORMAL);
processInThread(std::move(req), std::move(serializedRequest), ctx, eb, tm, pri, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, &service_with_special_namesAsyncProcessor::process_member<ProtocolIn_, ProtocolOut_>, this);
}
template <typename ProtocolIn_, typename ProtocolOut_>
void service_with_special_namesAsyncProcessor::process_member(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm) {
// make sure getConnectionContext is null
// so async calls don't accidentally use it
iface_->setConnectionContext(nullptr);
service_with_special_names_member_pargs args;
std::unique_ptr<apache::thrift::ContextStack> ctxStack(this->getContextStack(this->getServiceName(), "service_with_special_names.member", ctx));
try {
deserializeRequest<ProtocolIn_>(args, ctx->getMethodName(), serializedRequest, ctxStack.get());
}
catch (const std::exception& ex) {
apache::thrift::detail::ap::process_handle_exn_deserialization<ProtocolOut_>(
ex, std::move(req), ctx, eb, "member");
return;
}
req->setStartedProcessing();
auto callback = std::make_unique<apache::thrift::HandlerCallback<int32_t>>(std::move(req), std::move(ctxStack), return_member<ProtocolIn_,ProtocolOut_>, throw_wrapped_member<ProtocolIn_, ProtocolOut_>, ctx->getProtoSeqId(), eb, tm, ctx);
if (!callback->isRequestActive()) {
return;
}
iface_->async_tm_member(std::move(callback));
}
template <class ProtocolIn_, class ProtocolOut_>
folly::IOBufQueue service_with_special_namesAsyncProcessor::return_member(int32_t protoSeqId, apache::thrift::ContextStack* ctx, int32_t const& _return) {
ProtocolOut_ prot;
service_with_special_names_member_presult result;
result.get<0>().value = const_cast<int32_t*>(&_return);
result.setIsSet(0, true);
return serializeResponse("member", &prot, protoSeqId, ctx, result);
}
template <class ProtocolIn_, class ProtocolOut_>
void service_with_special_namesAsyncProcessor::throw_wrapped_member(apache::thrift::ResponseChannelRequest::UniquePtr req,int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx) {
if (!ew) {
return;
}
{
(void)protoSeqId;
apache::thrift::detail::ap::process_throw_wrapped_handler_error<ProtocolOut_>(
ew, std::move(req), reqCtx, ctx, "member");
return;
}
}
template <typename ProtocolIn_, typename ProtocolOut_>
void service_with_special_namesAsyncProcessor::setUpAndProcess_members(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm) {
if (!setUpRequestProcessing(req, ctx, eb, tm, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, iface_)) {
return;
}
auto pri = iface_->getRequestPriority(ctx, apache::thrift::concurrency::NORMAL);
processInThread(std::move(req), std::move(serializedRequest), ctx, eb, tm, pri, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, &service_with_special_namesAsyncProcessor::process_members<ProtocolIn_, ProtocolOut_>, this);
}
template <typename ProtocolIn_, typename ProtocolOut_>
void service_with_special_namesAsyncProcessor::process_members(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm) {
// make sure getConnectionContext is null
// so async calls don't accidentally use it
iface_->setConnectionContext(nullptr);
service_with_special_names_members_pargs args;
std::unique_ptr<apache::thrift::ContextStack> ctxStack(this->getContextStack(this->getServiceName(), "service_with_special_names.members", ctx));
try {
deserializeRequest<ProtocolIn_>(args, ctx->getMethodName(), serializedRequest, ctxStack.get());
}
catch (const std::exception& ex) {
apache::thrift::detail::ap::process_handle_exn_deserialization<ProtocolOut_>(
ex, std::move(req), ctx, eb, "members");
return;
}
req->setStartedProcessing();
auto callback = std::make_unique<apache::thrift::HandlerCallback<int32_t>>(std::move(req), std::move(ctxStack), return_members<ProtocolIn_,ProtocolOut_>, throw_wrapped_members<ProtocolIn_, ProtocolOut_>, ctx->getProtoSeqId(), eb, tm, ctx);
if (!callback->isRequestActive()) {
return;
}
iface_->async_tm_members(std::move(callback));
}
template <class ProtocolIn_, class ProtocolOut_>
folly::IOBufQueue service_with_special_namesAsyncProcessor::return_members(int32_t protoSeqId, apache::thrift::ContextStack* ctx, int32_t const& _return) {
ProtocolOut_ prot;
service_with_special_names_members_presult result;
result.get<0>().value = const_cast<int32_t*>(&_return);
result.setIsSet(0, true);
return serializeResponse("members", &prot, protoSeqId, ctx, result);
}
template <class ProtocolIn_, class ProtocolOut_>
void service_with_special_namesAsyncProcessor::throw_wrapped_members(apache::thrift::ResponseChannelRequest::UniquePtr req,int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx) {
if (!ew) {
return;
}
{
(void)protoSeqId;
apache::thrift::detail::ap::process_throw_wrapped_handler_error<ProtocolOut_>(
ew, std::move(req), reqCtx, ctx, "members");
return;
}
}
template <typename ProtocolIn_, typename ProtocolOut_>
void service_with_special_namesAsyncProcessor::setUpAndProcess_field(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm) {
if (!setUpRequestProcessing(req, ctx, eb, tm, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, iface_)) {
return;
}
auto pri = iface_->getRequestPriority(ctx, apache::thrift::concurrency::NORMAL);
processInThread(std::move(req), std::move(serializedRequest), ctx, eb, tm, pri, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, &service_with_special_namesAsyncProcessor::process_field<ProtocolIn_, ProtocolOut_>, this);
}
template <typename ProtocolIn_, typename ProtocolOut_>
void service_with_special_namesAsyncProcessor::process_field(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm) {
// make sure getConnectionContext is null
// so async calls don't accidentally use it
iface_->setConnectionContext(nullptr);
service_with_special_names_field_pargs args;
std::unique_ptr<apache::thrift::ContextStack> ctxStack(this->getContextStack(this->getServiceName(), "service_with_special_names.field", ctx));
try {
deserializeRequest<ProtocolIn_>(args, ctx->getMethodName(), serializedRequest, ctxStack.get());
}
catch (const std::exception& ex) {
apache::thrift::detail::ap::process_handle_exn_deserialization<ProtocolOut_>(
ex, std::move(req), ctx, eb, "field");
return;
}
req->setStartedProcessing();
auto callback = std::make_unique<apache::thrift::HandlerCallback<int32_t>>(std::move(req), std::move(ctxStack), return_field<ProtocolIn_,ProtocolOut_>, throw_wrapped_field<ProtocolIn_, ProtocolOut_>, ctx->getProtoSeqId(), eb, tm, ctx);
if (!callback->isRequestActive()) {
return;
}
iface_->async_tm_field(std::move(callback));
}
template <class ProtocolIn_, class ProtocolOut_>
folly::IOBufQueue service_with_special_namesAsyncProcessor::return_field(int32_t protoSeqId, apache::thrift::ContextStack* ctx, int32_t const& _return) {
ProtocolOut_ prot;
service_with_special_names_field_presult result;
result.get<0>().value = const_cast<int32_t*>(&_return);
result.setIsSet(0, true);
return serializeResponse("field", &prot, protoSeqId, ctx, result);
}
template <class ProtocolIn_, class ProtocolOut_>
void service_with_special_namesAsyncProcessor::throw_wrapped_field(apache::thrift::ResponseChannelRequest::UniquePtr req,int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx) {
if (!ew) {
return;
}
{
(void)protoSeqId;
apache::thrift::detail::ap::process_throw_wrapped_handler_error<ProtocolOut_>(
ew, std::move(req), reqCtx, ctx, "field");
return;
}
}
template <typename ProtocolIn_, typename ProtocolOut_>
void service_with_special_namesAsyncProcessor::setUpAndProcess_fields(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm) {
if (!setUpRequestProcessing(req, ctx, eb, tm, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, iface_)) {
return;
}
auto pri = iface_->getRequestPriority(ctx, apache::thrift::concurrency::NORMAL);
processInThread(std::move(req), std::move(serializedRequest), ctx, eb, tm, pri, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, &service_with_special_namesAsyncProcessor::process_fields<ProtocolIn_, ProtocolOut_>, this);
}
template <typename ProtocolIn_, typename ProtocolOut_>
void service_with_special_namesAsyncProcessor::process_fields(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm) {
// make sure getConnectionContext is null
// so async calls don't accidentally use it
iface_->setConnectionContext(nullptr);
service_with_special_names_fields_pargs args;
std::unique_ptr<apache::thrift::ContextStack> ctxStack(this->getContextStack(this->getServiceName(), "service_with_special_names.fields", ctx));
try {
deserializeRequest<ProtocolIn_>(args, ctx->getMethodName(), serializedRequest, ctxStack.get());
}
catch (const std::exception& ex) {
apache::thrift::detail::ap::process_handle_exn_deserialization<ProtocolOut_>(
ex, std::move(req), ctx, eb, "fields");
return;
}
req->setStartedProcessing();
auto callback = std::make_unique<apache::thrift::HandlerCallback<int32_t>>(std::move(req), std::move(ctxStack), return_fields<ProtocolIn_,ProtocolOut_>, throw_wrapped_fields<ProtocolIn_, ProtocolOut_>, ctx->getProtoSeqId(), eb, tm, ctx);
if (!callback->isRequestActive()) {
return;
}
iface_->async_tm_fields(std::move(callback));
}
template <class ProtocolIn_, class ProtocolOut_>
folly::IOBufQueue service_with_special_namesAsyncProcessor::return_fields(int32_t protoSeqId, apache::thrift::ContextStack* ctx, int32_t const& _return) {
ProtocolOut_ prot;
service_with_special_names_fields_presult result;
result.get<0>().value = const_cast<int32_t*>(&_return);
result.setIsSet(0, true);
return serializeResponse("fields", &prot, protoSeqId, ctx, result);
}
template <class ProtocolIn_, class ProtocolOut_>
void service_with_special_namesAsyncProcessor::throw_wrapped_fields(apache::thrift::ResponseChannelRequest::UniquePtr req,int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx) {
if (!ew) {
return;
}
{
(void)protoSeqId;
apache::thrift::detail::ap::process_throw_wrapped_handler_error<ProtocolOut_>(
ew, std::move(req), reqCtx, ctx, "fields");
return;
}
}
}} // test_cpp2::cpp_reflection
| [
"facebook-github-bot@users.noreply.github.com"
] | facebook-github-bot@users.noreply.github.com |
39f9a207051f7484e2861b6050603f1a8fdfcf6d | 8544dff2ecccbc7ea7750105f10e4a99cb46a453 | /src/Address.cpp | 452afa47816a8eab225d16a023d5b300537a5fc7 | [] | no_license | BrianYi/socket_programming | e223c82e0a8fc4766b07376da29652976ed51129 | 18e23cfbd6d9b36221d2d77f96f2839749ee1e46 | refs/heads/master | 2022-10-26T22:42:15.100075 | 2020-06-08T15:51:34 | 2020-06-08T15:51:34 | 270,727,415 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,144 | cpp | /*
* Copyright (C) 2020 BrianYi, All rights reserved
*/
#include "Address.h"
Address::Address( )
{
_address( "0.0.0.0", 0 );
}
Address::Address( const uint16_t& inPort )
{
_address( "0.0.0.0", inPort );
}
Address::Address( const std::string& inIP, const uint16_t& inPort )
{
_address( inIP, inPort );
}
Address::Address( struct sockaddr_in inSockAddr )
{
_address( ::inet_ntoa( inSockAddr.sin_addr ), inSockAddr.sin_port );
}
Address::~Address( )
{ }
std::string Address::ip( ) const
{
return ::inet_ntoa( this->sin_addr );
}
void Address::set_ip( const std::string& inIP )
{
uint32_t address = ::inet_addr( inIP.c_str( ) );
if ( address == INADDR_NONE )
{
printf( "Invalid ip address!\n" );
}
else
{
this->sin_addr.s_addr = address;
}
}
uint16_t Address::port( ) const
{
return ntohs( this->sin_port );
}
void Address::set_port( const uint16_t& inPort )
{
this->sin_port = htons( inPort );
}
void Address::_address( const std::string& inIP, const uint16_t& inPort )
{
this->sin_family = AF_INET;
this->set_ip( inIP );
this->set_port( inPort );
}
| [
"yijiazhen123@gmail.com"
] | yijiazhen123@gmail.com |
2443c210cc062433128f2c12136f30f2fb21808b | cf29290852260ebf505f0593b773fa89b2261554 | /729.cpp | 500ef4600e45e177f228668f9feefd4c2e33e279 | [] | no_license | mrinmoysarkar/UVA | 5b59dd7c92a3c724ee6426faa250c8359e5122ce | ce7b039d93dc70c27e80c58ed4ef2632caebdfc0 | refs/heads/master | 2021-07-25T07:51:22.165504 | 2021-02-11T01:20:14 | 2021-02-11T01:20:14 | 79,657,990 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 654 | cpp | #include<stdio.h>
#include<iostream>
using namespace std;
int N, H;
int out[100];
void solve(int indx)
{
if (indx == N)
{
int x = 0;
for (int i = 0; i < N; i++)
{
x += out[i] == 1 ? 1 : 0;
}
if (x == H)
{
for (int i = 0; i < N; i++)
{
cout << out[i];
}
cout << endl;
}
return;
}
out[indx] = 0;
solve(indx + 1);
out[indx] = 1;
solve(indx + 1);
}
int main()
{
//freopen("input.txt", "r", stdin);
//freopen("output.txt", "w", stdout);
int t;
cin >> t;
for (int tt = 0; tt < t; tt++)
{
cin >> N >> H;
solve(0);
if (tt != (t - 1))cout << endl;
}
return 0;
} | [
"noreply@github.com"
] | noreply@github.com |
c549f3485de396efaf3153caf8cf0eae51b1f459 | beaae49f5387605d0f1a3837f89d9f355f716215 | /userbase/PE/DisguiseProcess.cpp | 045d976849d0a8cf6db1c7a9b8dad2dca646eb31 | [] | no_license | xiaoccao/userbase | 0e9377e3bc7784166311bcb4a613621014a2701e | ba7dd261b80611e01ce7ff53342f5312e5c2c4e2 | refs/heads/master | 2020-05-29T09:03:03.470719 | 2019-05-04T15:41:20 | 2019-05-04T15:41:20 | null | 0 | 0 | null | null | null | null | GB18030 | C++ | false | false | 2,606 | cpp | #include "DisguiseProcess.h"
void ShowError(char *pszText)
{
char szErr[MAX_PATH] = { 0 };
::wsprintf(szErr, "%s Error[%d]\n", pszText, ::GetLastError());
OutputDebugStringA(szErr);
}
// 修改指定进程的进程环境块PEB中的路径和命令行信息, 实现进程伪装
BOOL DisguiseProcess(DWORD dwProcessId, wchar_t *lpwszPath, wchar_t *lpwszCmd)
{
// 打开进程获取句柄
HANDLE hProcess = ::OpenProcess(PROCESS_ALL_ACCESS, FALSE, dwProcessId);
if (NULL == hProcess)
{
ShowError("OpenProcess");
return FALSE;
}
typedef_NtQueryInformationProcess NtQueryInformationProcess = NULL;
PROCESS_BASIC_INFORMATION pbi = { 0 };
PEB peb = { 0 };
RTL_USER_PROCESS_PARAMETERS Param = { 0 };
USHORT usCmdLen = 0;
USHORT usPathLen = 0;
// 需要通过 LoadLibrary、GetProcessAddress 从 ntdll.dll 中获取地址
NtQueryInformationProcess = (typedef_NtQueryInformationProcess)::GetProcAddress(
::LoadLibrary("ntdll.dll"), "NtQueryInformationProcess");
if (NULL == NtQueryInformationProcess)
{
ShowError("GetProcAddress");
return FALSE;
}
// 获取指定进程的基本信息
NTSTATUS status = NtQueryInformationProcess(hProcess, ProcessBasicInformation, &pbi, sizeof(pbi), NULL);
if (!NT_SUCCESS(status))
{
ShowError("NtQueryInformationProcess");
return FALSE;
}
/*
注意在读写其他进程的时候,注意要使用ReadProcessMemory/WriteProcessMemory进行操作,
每个指针指向的内容都需要获取,因为指针只能指向本进程的地址空间,必须要读取到本进程空间。
要不然一直提示位置访问错误!
*/
// 获取指定进程进本信息结构中的PebBaseAddress
::ReadProcessMemory(hProcess, pbi.PebBaseAddress, &peb, sizeof(peb), NULL);
// 获取指定进程环境块结构中的ProcessParameters, 注意指针指向的是指定进程空间中
::ReadProcessMemory(hProcess, peb.ProcessParameters, &Param, sizeof(Param), NULL);
// 修改指定进程环境块PEB中命令行信息, 注意指针指向的是指定进程空间中
usCmdLen = 2 + 2 * ::wcslen(lpwszCmd);
::WriteProcessMemory(hProcess, Param.CommandLine.Buffer, lpwszCmd, usCmdLen, NULL);
::WriteProcessMemory(hProcess, &Param.CommandLine.Length, &usCmdLen, sizeof(usCmdLen), NULL);
// 修改指定进程环境块PEB中路径信息, 注意指针指向的是指定进程空间中
usPathLen = 2 + 2 * ::wcslen(lpwszPath);
::WriteProcessMemory(hProcess, Param.ImagePathName.Buffer, lpwszPath, usPathLen, NULL);
::WriteProcessMemory(hProcess, &Param.ImagePathName.Length, &usPathLen, sizeof(usPathLen), NULL);
return TRUE;
} | [
"sunxiaoyu@xiaoduotech.com"
] | sunxiaoyu@xiaoduotech.com |
6d3420ff6d124d56bdae6501d57435d4eedf6226 | fab908b80545e942e44a10526e32773dacc37d8b | /common/config.cpp | da0497cef9be35a46557f07ed4c47e375fd27023 | [] | no_license | wouthuib/genROSE | 9e2a8ee6e3d3cd050e0dc544f0815da43538201d | a6e82c998dd0564491a5883f25551268805453b9 | refs/heads/master | 2021-05-14T04:28:28.306163 | 2018-01-16T11:21:00 | 2018-01-16T11:21:00 | 116,644,097 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,560 | cpp | /*
Rose Online Server Emulator
Copyright (C) 2006,2007 OSRose Team http://www.dev-osrose.com
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
depeloped with Main erose/hrose source server + some change from the original eich source
*/
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <ctype.h>
// Find the entry
bool ConfigGetEntry( const char *pcFile, const char *pcNameMust, char* &pcResult )
{
char pcBuffer[ 512 ];
char *pcName, *pcPar, *pcPoint;
unsigned len;
pcResult=0;
// Open file
FILE *fh;
fh = fopen(pcFile, "r" );
if ( fh==NULL ) return false;
do
{
if ( fgets( pcBuffer, 510, fh ) == NULL ) return false;
len = (unsigned)strlen( pcBuffer );
if ( pcBuffer[ len-1 ] == '\n' ) --len;
pcBuffer[ len ] = 0;
pcName = pcBuffer;
while ( *pcName==' ' || *pcName=='\t' ) ++pcName;
if ( *pcName==0 || *pcName=='#' ) continue;
pcPoint = pcName;
while ( *pcPoint!=' ' && *pcPoint!='\t' && *pcPoint!='#' && *pcPoint!='=' && *pcPoint!=0 ) ++pcPoint;
if ( *pcPoint==0 || *pcPoint=='#' ) continue;
pcPar = pcPoint;
while ( *pcPar==' ' || *pcPar=='\t' || *pcPar=='=' ) ++pcPar;
*pcPoint=0;
#ifdef _WIN32
if ( !_strcmpi( pcName, pcNameMust ) )
{
pcResult = _strdup( pcPar );
pcPoint = pcResult + strlen( pcPar );
if ( *pcPoint==0 ) return true;
--pcPoint;
while( *pcPoint==' ' || *pcPoint=='\t' ) *pcPoint--=0;
return true;
}
#else
if ( strcasecmp( pcName, pcNameMust )==0 )
{
pcResult = strdup( pcPar );
pcPoint = pcResult + strlen( pcPar );
if ( *pcPoint==0 ) return true;
--pcPoint;
while( *pcPoint==' ' || *pcPoint=='\t' ) *pcPoint--=0;
return true;
}
#endif
} while ( !feof( fh ) );
// Close file
fclose( fh );
return true;
}
// -----------------------------------------------------------------------------------------
// Returns a text
// -----------------------------------------------------------------------------------------
char *ConfigGetString( const char *pcFile, const char *pcName, const char *pcDefault )
{
char *pcRet, *pcRetReal, *pcRetOld;
if ( !ConfigGetEntry( pcFile, pcName, pcRet ) ) return strdup( pcDefault );
if (pcRet==0) return strdup( pcDefault );
pcRetOld = pcRet;
if ( *pcRet=='"' )
{
++pcRet;
pcRet[ strlen(pcRet) - 1 ] = 0;
}
pcRetReal = strdup( pcRet );
free( pcRetOld );
return pcRetReal;
}
// Returns a number
unsigned ConfigGetInt( const char *pcFile, const char *pcName, unsigned uDefault )
{
char *pcRet;
unsigned uRet;
if ( !ConfigGetEntry( pcFile, pcName, pcRet ) ) return uDefault;
if (pcRet==0) return uDefault;
uRet = atoi( pcRet );
free( pcRet );
return uRet;
}
// -----------------------------------------------------------------------------------------
| [
"wouthuib@gmail.com"
] | wouthuib@gmail.com |
fa980f0d650bf761ee35e9edcbc54c8d816a1c99 | 2a70a7d4ca33c80139a56e881b69e2ac24dcd730 | /Random_Query_Codeforces.cpp | ccd67e65210ed1211209f36166c0d234b36e7280 | [] | no_license | parvezaalam786/3.Mathematics | 8f511d294a7b7d4616c02f34d57cb82beec000e7 | 037d59c603a82b0c789f3a133730c0b6e5bf5673 | refs/heads/master | 2020-09-11T22:15:44.965169 | 2019-11-17T06:34:58 | 2019-11-17T06:34:58 | 222,207,820 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 594 | cpp | #include<bits/stdc++.h>
using namespace std;
#define ll long long
ll arr[1000006] = {0};
ll lastocc[1000006] = {0};
ll ans[1000006] = {0};
int main()
{
ll n;
cin>>n;
for(ll i=1;i<=n;i++)
cin>>arr[i];
memset(lastocc, 0 ,sizeof(lastocc));
memset(ans, 0 ,sizeof(ans));
ans[0] = 0;
double sum = 0.00;
for(ll i=1;i<=n;i++)
{
ans[i] = ans[i-1]+(i-lastocc[arr[i]]);
lastocc[arr[i]] = i;
sum = sum + ans[i];
}
double ans1=0.00;
ans1 = (2*(sum-n)+n)/(n*n*1.0);
cout<<fixed<<setprecision(6)<<ans1<<endl;
return 0;
} | [
"parvezaalam786.p@gmail.com"
] | parvezaalam786.p@gmail.com |
1644bc5fecc81118372c13ecadb52896946dbc21 | b8376621d63394958a7e9535fc7741ac8b5c3bdc | /lib/lib_XT12/Source/PropertyGrid/XTPPropertyGridView.h | 5b9077a44569fceff6878d773275c614de9fb1b4 | [] | no_license | 15831944/job_mobile | 4f1b9dad21cb7866a35a86d2d86e79b080fb8102 | ebdf33d006025a682e9f2dbb670b23d5e3acb285 | refs/heads/master | 2021-12-02T10:58:20.932641 | 2013-01-09T05:20:33 | 2013-01-09T05:20:33 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 15,127 | h | // XTPPropertyGridView.h interface for the CXTPPropertyGridView class.
//
// This file is a part of the XTREME PROPERTYGRID MFC class library.
// (c)1998-2008 Codejock Software, All Rights Reserved.
//
// THIS SOURCE FILE IS THE PROPERTY OF CODEJOCK SOFTWARE AND IS NOT TO BE
// RE-DISTRIBUTED BY ANY MEANS WHATSOEVER WITHOUT THE EXPRESSED WRITTEN
// CONSENT OF CODEJOCK SOFTWARE.
//
// THIS SOURCE CODE CAN ONLY BE USED UNDER THE TERMS AND CONDITIONS OUTLINED
// IN THE XTREME TOOLKIT PRO LICENSE AGREEMENT. CODEJOCK SOFTWARE GRANTS TO
// YOU (ONE SOFTWARE DEVELOPER) THE LIMITED RIGHT TO USE THIS SOFTWARE ON A
// SINGLE COMPUTER.
//
// CONTACT INFORMATION:
// support@codejock.com
// http://www.codejock.com
//
/////////////////////////////////////////////////////////////////////////////
//{{AFX_CODEJOCK_PRIVATE
#if !defined(__XTPPROPERTYGRIDVIEW_H__)
#define __XTPPROPERTYGRIDVIEW_H__
//}}AFX_CODEJOCK_PRIVATE
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "XTPPropertyGridPaintManager.h"
#include "Common/XTPSystemHelpers.h"
class CXTPPropertyGridView;
class CXTPPropertyGridPaintManager;
class CXTPPropertyGrid;
class CXTPImageManager;
//===========================================================================
// Summary:
// CXTPPropertyGridToolTip is a CWnd derived class.
// It is an internal class used by Property Grid control
//===========================================================================
class _XTP_EXT_CLASS CXTPPropertyGridToolTip : public CWnd
{
public:
//-----------------------------------------------------------------------
// Summary:
// Constructs a CXTPPropertyGridToolTip object
//-----------------------------------------------------------------------
CXTPPropertyGridToolTip();
//-----------------------------------------------------------------------
// Summary:
// Activate Tooltip control.
// Parameters:
// bActive - TRUE to activate.
// pItem - Item which tooltip to show
// bValuePart - TRUE if tooltip of value part will be visible
//-----------------------------------------------------------------------
void Activate(BOOL bActive, CXTPPropertyGridItem* pItem, BOOL bValuePart);
//-----------------------------------------------------------------------
// Summary:
// Creates Tooltip control.
// Parameters:
// pParentWnd - Points to a CXTPPropertyGridView object.
//-----------------------------------------------------------------------
void Create(CXTPPropertyGridView* pParentWnd);
protected:
//{{AFX_CODEJOCK_PRIVATE
DECLARE_MESSAGE_MAP()
//{{AFX_MSG(CXTPPropertyGridView)
afx_msg BOOL OnEraseBkgnd(CDC*);
afx_msg void OnPaint();
afx_msg LRESULT OnNcHitTest(CPoint point);
//}}AFX_MSG
//}}AFX_CODEJOCK_PRIVATE
private:
BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext = NULL);
protected:
CXTPPropertyGridView* m_pGrid; // Parent window.
CFont m_fnt; // Font used to display the tool tip
friend class CXTPPropertyGridView;
};
AFX_INLINE BOOL CXTPPropertyGridToolTip::Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext) {
return CWnd::Create(lpszClassName, lpszWindowName, dwStyle, rect, pParentWnd, nID, pContext);
}
//===========================================================================
// Summary:
// CXTPPropertyGridView is a CListBox derived class.
// It is an internal class used by Property Grid control
//===========================================================================
class _XTP_EXT_CLASS CXTPPropertyGridView : public CListBox, public CXTPAccessible
{
struct WNDRECT;
DECLARE_DYNAMIC(CXTPPropertyGridView)
public:
//-----------------------------------------------------------------------
// Summary:
// Constructs a CXTPPropertyGridView object
//-----------------------------------------------------------------------
CXTPPropertyGridView();
//-----------------------------------------------------------------------
// Summary:
// Destroys a CXTPPropertyGridView object, handles cleanup and
// deallocation.
//-----------------------------------------------------------------------
virtual ~CXTPPropertyGridView();
public:
//-----------------------------------------------------------------------
// Summary:
// Call this method to get the position of the divider.
// Returns:
// Position of the divider
//-----------------------------------------------------------------------
int GetDividerPos() const;
//-----------------------------------------------------------------------
// Summary:
// Call this method to set the position of the divider.
// Parameters:
// nDivider - Position of the divider
//-----------------------------------------------------------------------
void SetDividerPos(int nDivider);
//-----------------------------------------------------------------------
// Summary:
// Call this method to disable auto calculating divider position
//-----------------------------------------------------------------------
void LockDivider();
//-----------------------------------------------------------------------
// Summary:
// This method determines where a point lies in a specified item.
// Parameters:
// point - Specifies the point to be tested.
// Returns:
// A pointer to a CXTPPropertyGridItem object
//-----------------------------------------------------------------------
CXTPPropertyGridItem* ItemFromPoint(CPoint point) const;
//-----------------------------------------------------------------------
// Summary:
// Call this method to refresh items in the list.
//-----------------------------------------------------------------------
void Refresh();
//-----------------------------------------------------------------------
// Summary:
// Call this method to remove all items in the list.
//-----------------------------------------------------------------------
void ResetContent();
//-----------------------------------------------------------------------
// Summary:
// This method retrieves an item with the specified index.
// Parameters:
// nIndex - Specifies the zero-based index of the item to retrieve.
// Returns:
// A pointer to a CXTPPropertyGridItem object
//-----------------------------------------------------------------------
CXTPPropertyGridItem* GetItem(int nIndex) const;
//-----------------------------------------------------------------------
// Summary:
// Call this member function to add a new category to a Property
// Grid Control.
// Parameters:
// strCaption - Name of the category to add.
// pCategory - Points to a CXTPPropertyGridItem object.
// Returns:
// A pointer to a CXTPPropertyGridItem object.
//-----------------------------------------------------------------------
CXTPPropertyGridItem* AddCategory(LPCTSTR strCaption, CXTPPropertyGridItem* pCategory = NULL);
//-----------------------------------------------------------------------
// Summary:
// Call this member function to insert a new category to the Property Grid control.
// Parameters:
// strCaption - Name of the category to add.
// nIndex - Index of category to be inserted
// pCategory - Points to a CXTPPropertyGridItem object.
// Returns:
// The pointer to the item object of the newly inserted category.
//-----------------------------------------------------------------------
CXTPPropertyGridItem* InsertCategory(int nIndex, LPCTSTR strCaption, CXTPPropertyGridItem* pCategory = NULL);
//-----------------------------------------------------------------------
// Summary:
// Returns the currently used control's Paint Manager.
// Remarks:
// Call this member function to get the paint manager object used
// for drawing a property grid control window.
// Returns:
// Pointer to the paint manager object.
//-----------------------------------------------------------------------
CXTPPropertyGridPaintManager* GetPaintManager() const;
//-----------------------------------------------------------------------
// Summary:
// Retrieves Image manager associated with property grid
// Returns:
// Pointer to the image manager object that stores the images in
// the property grid.
//-----------------------------------------------------------------------
CXTPImageManager* GetImageManager() const;
//-----------------------------------------------------------------------
// Summary:
// Sends the specified message to the owner window.
// Parameters:
// wParam - Specifies additional message-dependent information.
// lParam - Specifies additional message-dependent information
// Returns:
// The result of the message processing; its value depends on the message sent.
//-----------------------------------------------------------------------
LRESULT SendNotifyMessage(WPARAM wParam = 0, LPARAM lParam = 0);
//-----------------------------------------------------------------------
// Summary:
// Call this method to get parent property grid class
// Returns:
// Returns parent CXTPPropertyGrid object.
//-----------------------------------------------------------------------
CXTPPropertyGrid* GetPropertyGrid() const;
//-----------------------------------------------------------------------
// Summary:
// This method is called to move focus to in-place button
// Parameters:
// pButton - Button to move focus
//-----------------------------------------------------------------------
void FocusInplaceButton(CXTPPropertyGridInplaceButton* pButton);
protected:
//-----------------------------------------------------------------------
// Summary:
// This method is called to show tooltip under item
// Parameters:
// pt - Mouse position
//-----------------------------------------------------------------------
virtual void ShowToolTip(CPoint pt);
protected:
//{{AFX_CODEJOCK_PRIVATE
DECLARE_MESSAGE_MAP()
//{{AFX_VIRTUAL(CXTPPropertyGridView)
virtual void DrawItem(LPDRAWITEMSTRUCT);
virtual void MeasureItem(LPMEASUREITEMSTRUCT);
virtual int CompareItem(LPCOMPAREITEMSTRUCT) { return 0;}
virtual BOOL OnWndMsg(UINT message, WPARAM wParam, LPARAM lParam, LRESULT* pResult);
virtual INT_PTR OnToolHitTest(CPoint point, TOOLINFO* pTI) const;
//}}AFX_VIRTUAL
//{{AFX_MSG(CXTPPropertyGridView)
afx_msg BOOL OnEraseBkgnd(CDC* pDC);
afx_msg void OnPaint();
afx_msg void OnNcPaint();
afx_msg void OnNcCalcSize(BOOL bCalcValidRects, NCCALCSIZE_PARAMS* lpncsp);
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
afx_msg void OnSelectionChanged();
afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
afx_msg void OnCaptureChanged(CWnd* pWnd);
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnChar(UINT nChar, UINT nRepCntr, UINT nFlags);
afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
afx_msg void OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags);
afx_msg UINT OnGetDlgCode();
afx_msg void OnSysKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
afx_msg void OnSysKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags);
afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
afx_msg BOOL OnMouseWheel(UINT nFlags, short zDelta, CPoint pt);
afx_msg void OnSetFocus(CWnd* pOldWnd);
afx_msg void OnKillFocus (CWnd* pNewWnd);
afx_msg LRESULT OnGetObject(WPARAM wParam, LPARAM lParam);
//}}AFX_MSG
//}}AFX_CODEJOCK_PRIVATE
protected:
//{{AFX_CODEJOCK_PRIVATE
// System accessibility support.
virtual HRESULT GetAccessibleParent(IDispatch** ppdispParent);
virtual HRESULT GetAccessibleChildCount(long* pcountChildren);
virtual HRESULT GetAccessibleChild(VARIANT varChild, IDispatch** ppdispChild);
virtual HRESULT GetAccessibleName(VARIANT varChild, BSTR* pszName);
virtual HRESULT GetAccessibleRole(VARIANT varChild, VARIANT* pvarRole);
virtual HRESULT AccessibleLocation(long *pxLeft, long *pyTop, long *pcxWidth, long* pcyHeight, VARIANT varChild);
virtual HRESULT AccessibleHitTest(long xLeft, long yTop, VARIANT* pvarChild);
virtual HRESULT GetAccessibleState(VARIANT varChild, VARIANT* pvarState);
virtual CCmdTarget* GetAccessible();
DECLARE_INTERFACE_MAP()
//}}AFX_CODEJOCK_PRIVATE
private:
CXTPPropertyGridItem* GetSelectedItem();
void SetPropertySort(XTPPropertyGridSortOrder sort, BOOL bRrefresh = FALSE, BOOL bSetRedraw = TRUE);
int InsertItem(CXTPPropertyGridItem* pItem, int nIndex);
int _DoExpand(CXTPPropertyGridItem* pItem, int nIndex);
void _DoCollapse(CXTPPropertyGridItem* pItem);
void _RefreshIndexes();
void SwitchExpandState(int nItem);
int HitTest(CPoint point) const;
void _ShowToolTip(CRect rcBound, CRect rcText, CXTPPropertyGridItem* pItem, BOOL bValuePart);
CSize _GetTextExtent(const CString& str, CXTPPropertyGridItem* pItem, BOOL bValuePart);
void RelayToolTipEvent(UINT message);
LRESULT OnScrollControl();
public: //mech12 protected:
CXTPPropertyGrid* m_pGrid; // Parent CXTPPropertyGrid class.
BOOL m_bTracking; // TRUE if grid in tracking mode.
CRect m_rcToolTip; // Position of the Tooltip.
double m_dDivider; // Divider position.
BOOL m_bAutoDivider; // TRUE to auto calculate divider
HCURSOR m_hCursor; // Handle of the cursor.
CString m_strTipText; // Tooltip text.
XTPPropertyGridSortOrder m_properetySort; // Current sort order.
CXTPPropertyGridItem* m_pSelected; // Current selected item.
CXTPPropertyGridItems* m_pCategories; // Collection of the categories.
CXTPPropertyGridToolTip m_wndTip; // Tooltip control.
int m_nLockUpdate; // TRUE to lock update.
UINT m_nItemHeight; // Default height of the item
BOOL m_bVariableSplitterPos; // TRUE to allow the user to resize the splitter with the mouse.
CXTPPropertyGridInplaceButton* m_pFocusedButton; // Currently focused button
CXTPPropertyGridInplaceButton* m_pHotButton; // Currently highlighted button
private:
friend class CXTPPropertyGridItem;
friend class CXTPPropertyGridItems;
friend class CXTPPropertyGrid;
friend class CXTPPropertyGridInplaceEdit;
friend class CPropertyGridCtrl;
friend class CXTPPropertyGridToolTip;
friend class CXTPPropertyGridInplaceButton;
};
AFX_INLINE CXTPPropertyGrid* CXTPPropertyGridView::GetPropertyGrid() const {
return m_pGrid;
}
#endif // #if !defined(__XTPPROPERTYGRIDVIEW_H__)
| [
"whdnrfo@gmail.com"
] | whdnrfo@gmail.com |
c1b16346bb5335ff343cb415113c89380cd081e9 | 7eb0a3429f021f1a046bed8e667a6911d789d065 | /StrategyPattern/cpp/src/computer.cpp | 3638afac292317dee90fdf6a1c1030f4c278fc55 | [
"MIT"
] | permissive | gama79530/DesignPattern | d99431711fda65cfb7d790b2959ba0a712fa3f86 | 4730c50cdd839072ae50eef975cbed62b5a2a41c | refs/heads/master | 2023-08-03T04:35:54.561642 | 2023-06-08T03:13:08 | 2023-07-31T12:32:13 | 269,562,362 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 903 | cpp | #include <iostream>
#include "header/computer.h"
using namespace std;
string AMD_Ryzen7_3700X::showInfo(){
return "AMD Ryzen7 3700X";
}
string NVIDIA_GeForce_GTX_1660_SUPER::showInfo(){
return "NVIDIA GeForce GTX 1660 SUPER";
}
shared_ptr<CPU> Computer::getCpu(){
return cpu;
}
void Computer::setCpu(shared_ptr<CPU> &cpu){
this->cpu = cpu;
}
shared_ptr<GPU> Computer::getGpu1(){
return gpu1;
}
void Computer::setGpu1(shared_ptr<GPU> &gpu){
gpu1 = gpu;
}
shared_ptr<GPU> Computer::getGpu2(){
return gpu2;
}
void Computer::setGpu2(shared_ptr<GPU> &gpu){
gpu2 = gpu;
}
void Computer::showInfo(){
cout << "The component of this computer" << endl;
cout << "CPU : " << cpu->showInfo() << endl;
cout << "GPU 1 : " << (gpu1 == nullptr ? "None" : gpu1->showInfo()) << endl;
cout << "GPU 2 : " << (gpu2 == nullptr ? "None" : gpu2->showInfo()) << endl;
} | [
"gama79530@gmail.com"
] | gama79530@gmail.com |
67dd7df060a2171314128e2888f00e3602128ff6 | 0728e9230916b0a980404af83d2c8bc2b071a19a | /mergetwosortedarrays.cpp | 8a222b77c7e12ad8aadc3646172e7812e3aaead9 | [] | no_license | anurag1912/Programming-Challenges | 95b22f0befdb484c9092cc7ef55bbf062dc213f5 | ff84863553515d51231db7aae7b3afa7baa1a5f2 | refs/heads/master | 2020-04-16T02:59:13.520351 | 2016-03-26T21:57:23 | 2016-03-26T21:57:23 | 50,316,361 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 542 | cpp | /*
You are given two sorted arrays, A and B, where A has a large enough buffer at
the end to hold B. Write a method to merge B into A in sorted order.
*/
#include<iostream>
int main()
{
int a[] = {1,1,1,1,65000,0,0,0,0,0};
int b[] = {-1,-1,-1,-1,2};
int end = 9;
int _b=4;
int _a = 4;
while(_a>=0 && _b>=0)
{
if(b[_b]>a[_a])
{
a[end] = b[_b];
_b--;
}
else
{
a[end] = a[_a];
_a--;
}
end--;
}
if(_b>=0)
{
for(int i=0;i<=_b;i++)
a[i] = b[i];
}
for(int i=0;i<10;i++)
{
std::cout<<a[i]<<" ";
}
return 0;
}
| [
"anuragm@bu.edu"
] | anuragm@bu.edu |
9e45e9b465be1a5bc234b359e8e49d8afa9932aa | b4a62ce03c7dbf3cac4bed88e3d64372f807386e | /0121_Best_Time_to_Buy_and_Sell_Stock/1.cpp | 87d05976300a049f5e40db5ad7dbcd3ec5bed708 | [] | no_license | xinlin192/myleetcode | f2f58c42e29e55673c91d8384d6727e913b69286 | 7c3227b059f931a176772c4bfd203c56da6d61fe | refs/heads/master | 2021-09-10T20:05:05.816976 | 2018-04-01T09:01:10 | 2018-04-01T09:01:10 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 433 | cpp | class Solution {
public:
int maxProfit(vector<int>& prices) {
if (prices.empty()) {
return 0;
}
int prev_min_price = prices[0];
int max_profit = 0;
for (int i = 1 ; i < (int) prices.size() ; i ++) {
max_profit = max (max_profit, prices[i]-prev_min_price);
prev_min_price = min ( prev_min_price, prices[i]);
}
return max_profit;
}
};
| [
"jlin@snapchat.com"
] | jlin@snapchat.com |
2d5849651319fcf12b3a9fbd314969de9fdb4399 | b19a7758ecdb1d6db61d5f5698925f868fe06f1e | /src/price/provider/pixie/fields/field_encoding.cpp | d0fa64f4c048ae2cd94173b2235909e1964b54ce | [
"Apache-2.0"
] | permissive | bidfx/bidfx-api-cpp | c531d595e711b891b17c7796fe116cacb8fc3095 | 3d938c9f61057033612a869a9c530392991dca0b | refs/heads/master | 2023-08-31T15:37:02.503457 | 2023-08-24T16:36:57 | 2023-08-24T16:36:57 | 207,352,970 | 5 | 2 | null | 2023-09-14T15:45:55 | 2019-09-09T16:21:43 | C++ | UTF-8 | C++ | false | false | 4,932 | cpp | /** Copyright 2019 BidFX
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 <src/tools/varint.h>
#include <stdexcept>
#include "field_encoding.h"
namespace bidfx_public_api::price::pixie
{
using bidfx_public_api::tools::Varint;
void FieldEncodingMethods::SkipFieldValue(FieldEncodingEnum field_encoding, ByteBuffer& buffer)
{
switch (field_encoding)
{
case NOOP:
break;
case FIXED1:
buffer.Seek(1, 1);
break;
case FIXED2:
buffer.Seek(2, 1);
break;
case FIXED3:
buffer.Seek(3, 1);
break;
case FIXED4:
buffer.Seek(4, 1);
break;
case FIXED8:
buffer.Seek(8, 1);
break;
case FIXED16:
buffer.Seek(16, 1);
break;
case BYTE_ARRAY:
{
uint32_t byte_array_size = Varint::ReadU32(buffer);
buffer.Seek(byte_array_size, 1);
break;
}
case VARINT:
{
uint32_t varint_string_size = Varint::ReadU32(buffer);
buffer.Seek(varint_string_size - 1, 1);
break;
}
case VARINT_STRING:
{
while (!Varint::IsFinalByte(buffer.GetNextByte()))
{
}
break;
}
case ZIGZAG:
{
while (!Varint::IsFinalByte(buffer.GetNextByte()))
{
}
break;
}
default:
{
throw std::invalid_argument("unrecognised field encoding code: " + std::to_string(field_encoding) + " ('" +
(char) field_encoding + "')."
);
}
}
}
std::string FieldEncodingMethods::ToString(FieldEncodingEnum field_encoding)
{
switch (field_encoding)
{
case FieldEncodingEnum::NOOP:
return "NOOP";
case FieldEncodingEnum::FIXED1:
return "FIXED1";
case FieldEncodingEnum::FIXED2:
return "FIXED2";
case FieldEncodingEnum::FIXED3:
return "FIXED3";
case FieldEncodingEnum::FIXED4:
return "FIXED4";
case FieldEncodingEnum::FIXED8:
return "FIXED8";
case FieldEncodingEnum::FIXED16:
return "FIXED16";
case FieldEncodingEnum::BYTE_ARRAY:
return "BYTE_ARRAY";
case FieldEncodingEnum::VARINT:
return "VARINT";
case FieldEncodingEnum::VARINT_STRING:
return "VARINT_STRING";
case FieldEncodingEnum::ZIGZAG:
return "ZIGZAG";
case FieldEncodingEnum::NOT_DEFINED:
return "NOT_DEFINED";
default:
throw std::invalid_argument("unrecognised field encoding code: " +
std::to_string(field_encoding) + " ('" + (char) field_encoding + "').");
}
}
FieldEncodingEnum FieldEncodingMethods::ValueOf(int code)
{
switch (code)
{
case (char) FieldEncodingEnum::NOOP:
return FieldEncodingEnum::NOOP;
case (char) FieldEncodingEnum::FIXED1:
return FieldEncodingEnum::FIXED1;
case (char) FieldEncodingEnum::FIXED2:
return FieldEncodingEnum::FIXED2;
case (char) FieldEncodingEnum::FIXED3:
return FieldEncodingEnum::FIXED3;
case (char) FieldEncodingEnum::FIXED4:
return FieldEncodingEnum::FIXED4;
case (char) FieldEncodingEnum::FIXED8:
return FieldEncodingEnum::FIXED8;
case (char) FieldEncodingEnum::FIXED16:
return FieldEncodingEnum::FIXED16;
case (char) FieldEncodingEnum::BYTE_ARRAY:
return FieldEncodingEnum::BYTE_ARRAY;
case (char) FieldEncodingEnum::VARINT:
return FieldEncodingEnum::VARINT;
case (char) FieldEncodingEnum::VARINT_STRING:
return FieldEncodingEnum::VARINT_STRING;
case (char) FieldEncodingEnum::ZIGZAG:
return FieldEncodingEnum::ZIGZAG;
case (char) FieldEncodingEnum::NOT_DEFINED:
return FieldEncodingEnum::NOT_DEFINED;
default:
throw std::invalid_argument("unrecognised field encoding code: " +
std::to_string(code) + " ('" + (char) code + "').");
}
}
} // namespace bidfx_public_api::price::pixie | [
"Liam.Asman@tradingscreen.com"
] | Liam.Asman@tradingscreen.com |
1cd0d7e743b834c85cf6b84e29948870f142fd55 | c5f52e0085bc56d3252bd079ea9070f5998ab818 | /Coding_From_School/Class_11_programs/5/1.cpp | 86f05eb1becd9d699a1eda03427756869af760f5 | [] | no_license | vishalkumarsingh999/CPP_Practice | 4e2ebd866c8587c02b49dd45211b45e584e711f0 | 5136b56dea9061d1a8c9910b409d01b20b8ead8e | refs/heads/main | 2023-08-31T14:14:53.323406 | 2021-10-19T14:07:20 | 2021-10-19T14:07:20 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 657 | cpp | /*
* File: main.cpp
* Author: Vishal Kumar Singh
*
* Created on 30 January, 2013, 12:14 PM
*/
#include <cstdlib>
#include<iostream>
using namespace std;
class square
{
int a;
float b;
double c;
public:
int sq(int x)
{
return (x*x);
}
float sq(float y)
{
return (y*y);
}
double sq(double z)
{
return (z*z);
}
};
/*
*
*/
int main(int argc, char** argv)
{
square s;
int p=s.sq(2);
float q=s.sq(3.0);
double r=s.sq(75.0);
cout<<"Square of 2 is "<<p<<"\n";
cout<<"Square of 3.0 is "<<q<<"\n";
cout<<"Square of 75.0 is "<<r<<"\n";
return 0;
}
| [
"54959304+vishalkumarsingh999@users.noreply.github.com"
] | 54959304+vishalkumarsingh999@users.noreply.github.com |
a5e7014a985db47a036b85c7baf59241be942291 | 91a882547e393d4c4946a6c2c99186b5f72122dd | /Source/XPSP1/NT/ds/security/cryptoapi/pki/rpor/urlprov.cpp | 335f58fab3a7fa9d4c926910713c1c21d6cfb42f | [] | no_license | IAmAnubhavSaini/cryptoAlgorithm-nt5src | 94f9b46f101b983954ac6e453d0cf8d02aa76fc7 | d9e1cdeec650b9d6d3ce63f9f0abe50dabfaf9e2 | refs/heads/master | 2023-09-02T10:14:14.795579 | 2021-11-20T13:47:06 | 2021-11-20T13:47:06 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 43,977 | cpp | //+---------------------------------------------------------------------------
//
// Microsoft Windows NT Security
// Copyright (C) Microsoft Corporation, 1997 - 1999
//
// File: urlprov.cpp
//
// Contents: CryptGetObjectUrl provider implementation
//
// History: 16-Sep-97 kirtd Created
//
//----------------------------------------------------------------------------
#include <global.hxx>
//+---------------------------------------------------------------------------
//
// Function: CertificateIssuerGetObjectUrl
//
// Synopsis: get certificate issuer URL
//
//----------------------------------------------------------------------------
BOOL WINAPI
CertificateIssuerGetObjectUrl (
IN LPCSTR pszUrlOid,
IN LPVOID pvPara,
IN DWORD dwFlags,
OUT OPTIONAL PCRYPT_URL_ARRAY pUrlArray,
IN OUT DWORD* pcbUrlArray,
OUT OPTIONAL PCRYPT_URL_INFO pUrlInfo,
IN OUT OPTIONAL DWORD* pcbUrlInfo,
IN OPTIONAL LPVOID pvReserved
)
{
return( ObjectContextUrlFromInfoAccess(
CONTEXT_OID_CERTIFICATE,
pvPara,
(DWORD) -1L,
szOID_AUTHORITY_INFO_ACCESS,
dwFlags,
szOID_PKIX_CA_ISSUERS,
pUrlArray,
pcbUrlArray,
pUrlInfo,
pcbUrlInfo,
pvReserved
) );
}
//+---------------------------------------------------------------------------
//
// Function: CertificateCrlDistPointGetObjectUrl
//
// Synopsis: get certificate CRL URL
//
//----------------------------------------------------------------------------
BOOL WINAPI
CertificateCrlDistPointGetObjectUrl (
IN LPCSTR pszUrlOid,
IN LPVOID pvPara,
IN DWORD dwFlags,
OUT OPTIONAL PCRYPT_URL_ARRAY pUrlArray,
IN OUT DWORD* pcbUrlArray,
OUT OPTIONAL PCRYPT_URL_INFO pUrlInfo,
IN OUT OPTIONAL DWORD* pcbUrlInfo,
IN LPVOID pvReserved
)
{
return( ObjectContextUrlFromCrlDistPoint(
CONTEXT_OID_CERTIFICATE,
pvPara,
(DWORD) -1L,
dwFlags,
szOID_CRL_DIST_POINTS,
pUrlArray,
pcbUrlArray,
pUrlInfo,
pcbUrlInfo,
pvReserved
) );
}
//+---------------------------------------------------------------------------
//
// Function: CertificateFreshestCrlGetObjectUrl
//
// Synopsis: get certificate freshest CRL URL
//
//----------------------------------------------------------------------------
BOOL WINAPI
CertificateFreshestCrlGetObjectUrl(
IN LPCSTR pszUrlOid,
IN LPVOID pvPara,
IN DWORD dwFlags,
OUT OPTIONAL PCRYPT_URL_ARRAY pUrlArray,
IN OUT DWORD* pcbUrlArray,
OUT OPTIONAL PCRYPT_URL_INFO pUrlInfo,
IN OUT OPTIONAL DWORD* pcbUrlInfo,
IN OPTIONAL LPVOID pvReserved
)
{
return( ObjectContextUrlFromCrlDistPoint(
CONTEXT_OID_CERTIFICATE,
pvPara,
(DWORD) -1L,
dwFlags,
szOID_FRESHEST_CRL,
pUrlArray,
pcbUrlArray,
pUrlInfo,
pcbUrlInfo,
pvReserved
) );
}
//+---------------------------------------------------------------------------
//
// Function: CrlFreshestCrlGetObjectUrl
//
// Synopsis: get freshest CRL URL from the certificate's base CRL
//
//----------------------------------------------------------------------------
BOOL WINAPI
CrlFreshestCrlGetObjectUrl(
IN LPCSTR pszUrlOid,
IN LPVOID pvPara,
IN DWORD dwFlags,
OUT OPTIONAL PCRYPT_URL_ARRAY pUrlArray,
IN OUT DWORD* pcbUrlArray,
OUT OPTIONAL PCRYPT_URL_INFO pUrlInfo,
IN OUT OPTIONAL DWORD* pcbUrlInfo,
IN OPTIONAL LPVOID pvReserved
)
{
PCCERT_CRL_CONTEXT_PAIR pCertCrlPair = (PCCERT_CRL_CONTEXT_PAIR) pvPara;
return( ObjectContextUrlFromCrlDistPoint(
CONTEXT_OID_CRL,
(LPVOID) pCertCrlPair->pCrlContext,
(DWORD) -1L,
dwFlags,
szOID_FRESHEST_CRL,
pUrlArray,
pcbUrlArray,
pUrlInfo,
pcbUrlInfo,
pvReserved
) );
}
//+---------------------------------------------------------------------------
//
// Function: CtlIssuerGetObjectUrl
//
// Synopsis: get CTL issuer URL
//
//----------------------------------------------------------------------------
BOOL WINAPI
CtlIssuerGetObjectUrl (
IN LPCSTR pszUrlOid,
IN LPVOID pvPara,
IN DWORD dwFlags,
OUT OPTIONAL PCRYPT_URL_ARRAY pUrlArray,
IN OUT DWORD* pcbUrlArray,
OUT OPTIONAL PCRYPT_URL_INFO pUrlInfo,
IN OUT OPTIONAL DWORD* pcbUrlInfo,
IN LPVOID pvReserved
)
{
PURL_OID_CTL_ISSUER_PARAM pParam = (PURL_OID_CTL_ISSUER_PARAM)pvPara;
return( ObjectContextUrlFromInfoAccess(
CONTEXT_OID_CTL,
(LPVOID)pParam->pCtlContext,
pParam->SignerIndex,
szOID_AUTHORITY_INFO_ACCESS,
CRYPT_GET_URL_FROM_AUTH_ATTRIBUTE |
CRYPT_GET_URL_FROM_UNAUTH_ATTRIBUTE,
szOID_PKIX_CA_ISSUERS,
pUrlArray,
pcbUrlArray,
pUrlInfo,
pcbUrlInfo,
pvReserved
) );
}
//+---------------------------------------------------------------------------
//
// Function: CtlNextUpdateGetObjectUrl
//
// Synopsis: get CTL renewal URL
//
//----------------------------------------------------------------------------
BOOL WINAPI
CtlNextUpdateGetObjectUrl (
IN LPCSTR pszUrlOid,
IN LPVOID pvPara,
IN DWORD dwFlags,
OUT OPTIONAL PCRYPT_URL_ARRAY pUrlArray,
IN OUT DWORD* pcbUrlArray,
OUT OPTIONAL PCRYPT_URL_INFO pUrlInfo,
IN OUT OPTIONAL DWORD* pcbUrlInfo,
IN LPVOID pvReserved
)
{
LPVOID* apv = (LPVOID *)pvPara;
return( ObjectContextUrlFromNextUpdateLocation(
CONTEXT_OID_CTL,
apv[0],
(DWORD)(DWORD_PTR)apv[1],
dwFlags,
pUrlArray,
pcbUrlArray,
pUrlInfo,
pcbUrlInfo,
pvReserved
) );
}
//+---------------------------------------------------------------------------
//
// Function: CrlIssuerGetObjectUrl
//
// Synopsis: get CRL issuer URL
//
//----------------------------------------------------------------------------
BOOL WINAPI
CrlIssuerGetObjectUrl (
IN LPCSTR pszUrlOid,
IN LPVOID pvPara,
IN DWORD dwFlags,
OUT OPTIONAL PCRYPT_URL_ARRAY pUrlArray,
IN OUT DWORD* pcbUrlArray,
OUT OPTIONAL PCRYPT_URL_INFO pUrlInfo,
IN OUT OPTIONAL DWORD* pcbUrlInfo,
IN LPVOID pvReserved
)
{
return( ObjectContextUrlFromInfoAccess(
CONTEXT_OID_CRL,
pvPara,
(DWORD) -1L,
szOID_AUTHORITY_INFO_ACCESS,
dwFlags,
szOID_PKIX_CA_ISSUERS,
pUrlArray,
pcbUrlArray,
pUrlInfo,
pcbUrlInfo,
pvReserved
) );
}
//+---------------------------------------------------------------------------
//
// Function: ObjectContextUrlFromInfoAccess
//
// Synopsis: get the URLs specified by the access method OID from the given
// context and format it as a CRYPT_URL_ARRAY
//
//----------------------------------------------------------------------------
BOOL WINAPI
ObjectContextUrlFromInfoAccess (
IN LPCSTR pszContextOid,
IN LPVOID pvContext,
IN DWORD Index,
IN LPCSTR pszInfoAccessOid,
IN DWORD dwFlags,
IN LPCSTR pszAccessMethodOid,
OUT OPTIONAL PCRYPT_URL_ARRAY pUrlArray,
IN OUT DWORD* pcbUrlArray,
OUT OPTIONAL PCRYPT_URL_INFO pUrlInfo,
IN OUT OPTIONAL DWORD* pcbUrlInfo,
IN LPVOID pvReserved
)
{
BOOL fResult = FALSE;
CRYPT_RAW_URL_DATA RawData[MAX_RAW_URL_DATA];
ULONG cRawData = MAX_RAW_URL_DATA;
fResult = ObjectContextGetRawUrlData(
pszContextOid,
pvContext,
Index,
dwFlags,
pszInfoAccessOid,
RawData,
&cRawData
);
if ( fResult == TRUE )
{
fResult = GetUrlArrayAndInfoFromInfoAccess(
cRawData,
RawData,
pszAccessMethodOid,
pUrlArray,
pcbUrlArray,
pUrlInfo,
pcbUrlInfo
);
ObjectContextFreeRawUrlData( cRawData, RawData );
}
return( fResult );
}
//+---------------------------------------------------------------------------
//
// Function: ObjectContextUrlFromCrlDistPoint
//
// Synopsis: get the URLs from the CRL distribution point on the object and
// format as a CRYPT_URL_ARRAY
//
//----------------------------------------------------------------------------
BOOL WINAPI
ObjectContextUrlFromCrlDistPoint (
IN LPCSTR pszContextOid,
IN LPVOID pvContext,
IN DWORD Index,
IN DWORD dwFlags,
IN LPCSTR pszSourceOid,
OUT OPTIONAL PCRYPT_URL_ARRAY pUrlArray,
IN OUT DWORD* pcbUrlArray,
OUT OPTIONAL PCRYPT_URL_INFO pUrlInfo,
IN OUT OPTIONAL DWORD* pcbUrlInfo,
IN LPVOID pvReserved
)
{
BOOL fResult = FALSE;
CRYPT_RAW_URL_DATA RawData[MAX_RAW_URL_DATA];
ULONG cRawData = MAX_RAW_URL_DATA;
fResult = ObjectContextGetRawUrlData(
pszContextOid,
pvContext,
Index,
dwFlags,
pszSourceOid,
RawData,
&cRawData
);
if ( fResult == TRUE )
{
fResult = GetUrlArrayAndInfoFromCrlDistPoint(
cRawData,
RawData,
pUrlArray,
pcbUrlArray,
pUrlInfo,
pcbUrlInfo
);
ObjectContextFreeRawUrlData( cRawData, RawData );
}
return( fResult );
}
//+---------------------------------------------------------------------------
//
// Function: ObjectContextUrlFromNextUpdateLocation
//
// Synopsis: get the URLs from the next update location
//
//----------------------------------------------------------------------------
BOOL WINAPI
ObjectContextUrlFromNextUpdateLocation (
IN LPCSTR pszContextOid,
IN LPVOID pvContext,
IN DWORD Index,
IN DWORD dwFlags,
OUT OPTIONAL PCRYPT_URL_ARRAY pUrlArray,
IN OUT DWORD* pcbUrlArray,
OUT OPTIONAL PCRYPT_URL_INFO pUrlInfo,
IN OUT OPTIONAL DWORD* pcbUrlInfo,
IN LPVOID pvReserved
)
{
BOOL fResult = FALSE;
CRYPT_RAW_URL_DATA RawData[MAX_RAW_URL_DATA];
ULONG cRawData = MAX_RAW_URL_DATA;
fResult = ObjectContextGetRawUrlData(
pszContextOid,
pvContext,
Index,
dwFlags,
szOID_NEXT_UPDATE_LOCATION,
RawData,
&cRawData
);
if ( fResult == TRUE )
{
fResult = GetUrlArrayAndInfoFromNextUpdateLocation(
cRawData,
RawData,
pUrlArray,
pcbUrlArray,
pUrlInfo,
pcbUrlInfo
);
ObjectContextFreeRawUrlData( cRawData, RawData );
}
return( fResult );
}
//+---------------------------------------------------------------------------
//
// Function: InitializeDefaultUrlInfo
//
// Synopsis: initialize default URL info
//
//----------------------------------------------------------------------------
VOID WINAPI
InitializeDefaultUrlInfo (
OUT OPTIONAL PCRYPT_URL_INFO pUrlInfo,
IN OUT DWORD* pcbUrlInfo
)
{
if ( pUrlInfo == NULL )
{
*pcbUrlInfo = sizeof( CRYPT_URL_INFO );
return;
}
if (*pcbUrlInfo >= sizeof( CRYPT_URL_INFO ))
{
*pcbUrlInfo = sizeof( CRYPT_URL_INFO );
memset( pUrlInfo, 0, sizeof( CRYPT_URL_INFO ) );
pUrlInfo->cbSize = sizeof( CRYPT_URL_INFO );
}
else if (*pcbUrlInfo >= sizeof( DWORD ))
{
*pcbUrlInfo = sizeof( DWORD );
pUrlInfo->cbSize = sizeof( DWORD );
}
}
//+---------------------------------------------------------------------------
//
// Function: ObjectContextGetRawUrlData
//
// Synopsis: Raw URL data is a decoded extension, property or attribute
// specified by a source OID that contains locator information.
// This API retrieves and decodes such data
//
//----------------------------------------------------------------------------
BOOL WINAPI
ObjectContextGetRawUrlData (
IN LPCSTR pszContextOid,
IN LPVOID pvContext,
IN DWORD Index,
IN DWORD dwFlags,
IN LPCSTR pszSourceOid,
OUT PCRYPT_RAW_URL_DATA aRawUrlData,
IN OUT DWORD* pcRawUrlData
)
{
BOOL fResult = TRUE;
DWORD cCount;
DWORD cError = 0;
DWORD cRawData = 0;
CRYPT_RAW_URL_DATA RawData[MAX_RAW_URL_DATA];
CRYPT_DATA_BLOB DataBlob = {0, NULL};
BOOL fFreeDataBlob = FALSE;
DWORD cbDecoded;
LPBYTE pbDecoded = NULL;
PCRYPT_ATTRIBUTE pAttr = NULL;
DWORD cbAttr;
if ( dwFlags & CRYPT_GET_URL_FROM_PROPERTY )
{
RawData[cRawData].dwFlags = CRYPT_GET_URL_FROM_PROPERTY;
RawData[cRawData].pvData = NULL;
cRawData += 1;
}
if ( dwFlags & CRYPT_GET_URL_FROM_EXTENSION )
{
RawData[cRawData].dwFlags = CRYPT_GET_URL_FROM_EXTENSION;
RawData[cRawData].pvData = NULL;
cRawData += 1;
}
if ( dwFlags & CRYPT_GET_URL_FROM_UNAUTH_ATTRIBUTE )
{
RawData[cRawData].dwFlags = CRYPT_GET_URL_FROM_UNAUTH_ATTRIBUTE;
RawData[cRawData].pvData = NULL;
cRawData += 1;
}
if ( dwFlags & CRYPT_GET_URL_FROM_AUTH_ATTRIBUTE )
{
RawData[cRawData].dwFlags = CRYPT_GET_URL_FROM_AUTH_ATTRIBUTE;
RawData[cRawData].pvData = NULL;
cRawData += 1;
}
if ( *pcRawUrlData < cRawData )
{
SetLastError( (DWORD) E_INVALIDARG );
return( FALSE );
}
for ( cCount = 0; cCount < cRawData; cCount++ )
{
switch ( RawData[cCount].dwFlags )
{
case CRYPT_GET_URL_FROM_PROPERTY:
{
DWORD PropId;
fResult = MapOidToPropertyId( pszSourceOid, &PropId );
if ( fResult == TRUE )
{
fResult = ObjectContextGetProperty(
pszContextOid,
pvContext,
PropId,
NULL,
&DataBlob.cbData
);
}
if ( fResult == TRUE )
{
DataBlob.pbData = new BYTE [ DataBlob.cbData ];
if ( DataBlob.pbData != NULL )
{
fFreeDataBlob = TRUE;
fResult = ObjectContextGetProperty(
pszContextOid,
pvContext,
PropId,
DataBlob.pbData,
&DataBlob.cbData
);
}
else
{
fResult = FALSE;
SetLastError( (DWORD) E_OUTOFMEMORY );
}
}
}
break;
case CRYPT_GET_URL_FROM_EXTENSION:
{
PCERT_EXTENSION pExt;
pExt = ObjectContextFindExtension(
pszContextOid,
pvContext,
pszSourceOid
);
if ( pExt != NULL )
{
DataBlob.cbData = pExt->Value.cbData;
DataBlob.pbData = pExt->Value.pbData;
fResult = TRUE;
}
else
{
fResult = FALSE;
}
}
break;
case CRYPT_GET_URL_FROM_UNAUTH_ATTRIBUTE:
case CRYPT_GET_URL_FROM_AUTH_ATTRIBUTE:
{
fResult = ObjectContextGetAttribute(
pszContextOid,
pvContext,
Index,
RawData[cCount].dwFlags,
pszSourceOid,
NULL,
&cbAttr
);
if ( fResult == TRUE )
{
pAttr = (PCRYPT_ATTRIBUTE)new BYTE [cbAttr];
if ( pAttr != NULL )
{
fResult = ObjectContextGetAttribute(
pszContextOid,
pvContext,
Index,
RawData[cCount].dwFlags,
pszSourceOid,
pAttr,
&cbAttr
);
}
else
{
fResult = FALSE;
SetLastError( (DWORD) E_OUTOFMEMORY );
}
}
if ( fResult == TRUE )
{
// We only deal with single valued attributes
DataBlob.cbData = pAttr->rgValue[0].cbData;
DataBlob.pbData = pAttr->rgValue[0].pbData;
}
}
break;
}
if ( fResult == TRUE )
{
fResult = CryptDecodeObject(
X509_ASN_ENCODING,
pszSourceOid,
DataBlob.pbData,
DataBlob.cbData,
0,
NULL,
&cbDecoded
);
if ( fResult == TRUE )
{
pbDecoded = new BYTE [ cbDecoded ];
if ( pbDecoded != NULL )
{
fResult = CryptDecodeObject(
X509_ASN_ENCODING,
pszSourceOid,
DataBlob.pbData,
DataBlob.cbData,
0,
pbDecoded,
&cbDecoded
);
}
else
{
fResult = FALSE;
}
}
}
if ( fResult == TRUE )
{
RawData[cCount].pvData = (LPVOID)pbDecoded;
}
else
{
cError += 1;
}
if ( fFreeDataBlob == TRUE )
{
delete DataBlob.pbData;
fFreeDataBlob = FALSE;
}
if ( pAttr != NULL )
{
delete (LPBYTE)pAttr;
pAttr = NULL;
}
}
if ( cError != cRawData )
{
memcpy( aRawUrlData, RawData, cRawData * sizeof( CRYPT_RAW_URL_DATA ) );
*pcRawUrlData = cRawData;
fResult = TRUE;
}
else
{
SetLastError( (DWORD) CRYPT_E_NOT_FOUND );
fResult = FALSE;
}
return( fResult );
}
//+---------------------------------------------------------------------------
//
// Function: ObjectContextFreeRawUrlData
//
// Synopsis: free the raw URL data
//
//----------------------------------------------------------------------------
VOID WINAPI
ObjectContextFreeRawUrlData (
IN DWORD cRawUrlData,
IN PCRYPT_RAW_URL_DATA aRawUrlData
)
{
DWORD cCount;
for ( cCount = 0; cCount < cRawUrlData; cCount++ )
{
delete aRawUrlData[cCount].pvData;
}
}
//+---------------------------------------------------------------------------
//
// Function: GetUrlArrayAndInfoFromAuthInfoAccess
//
// Synopsis: get URL data using decoded info access data
//
//----------------------------------------------------------------------------
BOOL WINAPI
GetUrlArrayAndInfoFromInfoAccess (
IN DWORD cRawUrlData,
IN PCRYPT_RAW_URL_DATA aRawUrlData,
IN LPCSTR pszAccessMethodOid,
OUT OPTIONAL PCRYPT_URL_ARRAY pUrlArray,
IN OUT DWORD* pcbUrlArray,
OUT OPTIONAL PCRYPT_URL_INFO pUrlInfo,
IN OUT OPTIONAL DWORD* pcbUrlInfo
)
{
BOOL fResult = FALSE;
PCERT_AUTHORITY_INFO_ACCESS pAuthInfoAccess = NULL;
PCERT_ACCESS_DESCRIPTION rgAccDescr = NULL;
DWORD cRaw;
DWORD cCount;
BOOL fAnyFound = FALSE;
CCryptUrlArray cua( 1, 5, fResult );
for ( cRaw = 0; ( fResult == TRUE ) && ( cRaw < cRawUrlData ); cRaw++ )
{
pAuthInfoAccess = (PCERT_AUTHORITY_INFO_ACCESS)aRawUrlData[cRaw].pvData;
if ( pAuthInfoAccess != NULL )
{
rgAccDescr = pAuthInfoAccess->rgAccDescr;
for ( cCount = 0;
( cCount < pAuthInfoAccess->cAccDescr ) &&
( fResult == TRUE );
cCount++ )
{
if ( !strcmp(
pszAccessMethodOid,
rgAccDescr[cCount].pszAccessMethod
) )
{
if ( rgAccDescr[cCount].AccessLocation.dwAltNameChoice ==
CERT_ALT_NAME_URL )
{
fResult = cua.AddUrl(
rgAccDescr[cCount].AccessLocation.pwszURL,
TRUE
);
fAnyFound = TRUE;
}
}
}
}
}
if ( ( fAnyFound == FALSE ) && ( fResult == TRUE ) )
{
SetLastError( (DWORD) CRYPT_E_NOT_FOUND );
fResult = FALSE;
}
if ( fResult == TRUE )
{
PCRYPT_URL_ARRAY* ppUrlArray = NULL;
if ( pUrlArray != NULL )
{
ppUrlArray = &pUrlArray;
}
fResult = cua.GetArrayInSingleBufferEncodedForm(
ppUrlArray,
pcbUrlArray
);
}
if ( ( fResult == TRUE ) && ( pcbUrlInfo != NULL ) )
{
InitializeDefaultUrlInfo( pUrlInfo, pcbUrlInfo );
}
cua.FreeArray( TRUE );
return( fResult );
}
#define DIR_NAME_LDAP_URL_PREFIX L"ldap://"
#define URL_OID_CDP_DIR_NAME_LDAP_HOST_PORTS_VALUE_NAME \
L"DirectoryNameLdapHostPorts"
#define URL_OID_CDP_DIR_NAME_LDAP_SUFFIX_VALUE_NAME \
L"DirectoryNameLdapSuffix"
LPCWSTR pwszDefaultCDPDirNameLdapUrlHostPorts = L"\0\0";
LPCWSTR pwszDefaultCDPDirNameLdapUrlSuffix=
L"?certificateRevocationList;binary,authorityRevocationList;binary,deltaRevocationList;binary";
LPWSTR WINAPI
GetCDPOIDFunctionValue(
IN LPCWSTR pwszValueName
)
{
BOOL fResult;
DWORD dwType;
DWORD cchValue;
DWORD cbValue = 0;
LPWSTR pwszValue = NULL;
fResult = CryptGetOIDFunctionValue(
X509_ASN_ENCODING,
URL_OID_GET_OBJECT_URL_FUNC,
URL_OID_CERTIFICATE_CRL_DIST_POINT,
pwszValueName,
&dwType,
NULL,
&cbValue
);
cchValue = cbValue / sizeof(WCHAR);
if (!fResult || 0 == cchValue ||
!(REG_MULTI_SZ == dwType || REG_SZ == dwType ||
REG_EXPAND_SZ == dwType))
goto ErrorReturn;
pwszValue = new WCHAR [cchValue + 2];
if (NULL == pwszValue)
goto OutOfMemory;
fResult = CryptGetOIDFunctionValue(
X509_ASN_ENCODING,
URL_OID_GET_OBJECT_URL_FUNC,
URL_OID_CERTIFICATE_CRL_DIST_POINT,
pwszValueName,
&dwType,
(BYTE *) pwszValue,
&cbValue
);
if (!fResult)
goto ErrorReturn;
// Ensure the value has two null terminators
pwszValue[cchValue] = L'\0';
pwszValue[cchValue + 1] = L'\0';
CommonReturn:
return pwszValue;
ErrorReturn:
if (pwszValue) {
delete pwszValue;
pwszValue = NULL;
}
goto CommonReturn;
OutOfMemory:
SetLastError( (DWORD) E_OUTOFMEMORY );
goto ErrorReturn;
}
// For an error or no found registry value,
// returns pwszDefaultCDPDirNameLdapUrlHostPorts
LPWSTR WINAPI
GetCDPDirNameLdapUrlHostPorts()
{
LPWSTR pwszHostPorts;
pwszHostPorts = GetCDPOIDFunctionValue(
URL_OID_CDP_DIR_NAME_LDAP_HOST_PORTS_VALUE_NAME);
if (NULL == pwszHostPorts)
pwszHostPorts = (LPWSTR) pwszDefaultCDPDirNameLdapUrlHostPorts;
return pwszHostPorts;
}
// For an error or no found registry value,
// returns pwszDefaultCDPDirNameLdapUrlSuffix
LPWSTR WINAPI
GetCDPDirNameLdapUrlSuffix()
{
LPWSTR pwszSuffix = NULL;
pwszSuffix = GetCDPOIDFunctionValue(
URL_OID_CDP_DIR_NAME_LDAP_SUFFIX_VALUE_NAME);
if (NULL == pwszSuffix)
pwszSuffix = (LPWSTR) pwszDefaultCDPDirNameLdapUrlSuffix;
return pwszSuffix;
}
BOOL WINAPI
AddUrlsFromCDPDirectoryName (
IN PCERT_NAME_BLOB pDirNameBlob,
IN OUT CCryptUrlArray *pcua
)
{
BOOL fResult;
LPWSTR pwszHP;
LPWSTR pwszHostPorts;
LPWSTR pwszSuffix;
LPWSTR pwszDirName = NULL;
DWORD cchDirName;
pwszHostPorts = GetCDPDirNameLdapUrlHostPorts();
pwszSuffix = GetCDPDirNameLdapUrlSuffix();
assert(NULL != pwszHostPorts && NULL != pwszSuffix);
cchDirName = CertNameToStrW(
X509_ASN_ENCODING,
pDirNameBlob,
CERT_X500_NAME_STR | CERT_NAME_STR_REVERSE_FLAG,
NULL, // pwsz
0 // cch
);
if (1 >= cchDirName)
goto ErrorReturn;
pwszDirName = new WCHAR [cchDirName];
if (NULL == pwszDirName)
goto OutOfMemory;
cchDirName = CertNameToStrW(
X509_ASN_ENCODING,
pDirNameBlob,
CERT_X500_NAME_STR | CERT_NAME_STR_REVERSE_FLAG,
pwszDirName,
cchDirName
);
if (1 >= cchDirName)
goto ErrorReturn;
cchDirName--; // exclude trailing L'\0'
pwszHP = pwszHostPorts;
while (TRUE) {
DWORD cchHP;
LPWSTR pwszUrl;
DWORD cchUrl;
// Skip past any spaces in the HostPort
while (L' ' == *pwszHP)
pwszHP++;
cchHP = wcslen(pwszHP);
cchUrl = wcslen(DIR_NAME_LDAP_URL_PREFIX);
cchUrl += cchHP;
cchUrl += 1; // L'/'
cchUrl += cchDirName;
cchUrl += wcslen(pwszSuffix);
cchUrl += 1; // L'\0'
pwszUrl = new WCHAR [cchUrl];
if (NULL == pwszUrl)
goto OutOfMemory;
wcscpy(pwszUrl, DIR_NAME_LDAP_URL_PREFIX);
wcscat(pwszUrl, pwszHP);
wcscat(pwszUrl, L"/");
wcscat(pwszUrl, pwszDirName);
wcscat(pwszUrl, pwszSuffix);
fResult = pcua->AddUrl(pwszUrl, TRUE);
delete pwszUrl;
if (!fResult)
goto ErrorReturn;
pwszHP += cchHP + 1;
if (L'\0' == *pwszHP)
break;
}
fResult = TRUE;
CommonReturn:
if (pwszDirName)
delete pwszDirName;
if (pwszHostPorts != pwszDefaultCDPDirNameLdapUrlHostPorts)
delete pwszHostPorts;
if (pwszSuffix != pwszDefaultCDPDirNameLdapUrlSuffix)
delete pwszSuffix;
return fResult;
ErrorReturn:
fResult = FALSE;
goto CommonReturn;
OutOfMemory:
SetLastError( (DWORD) E_OUTOFMEMORY );
goto ErrorReturn;
}
//+---------------------------------------------------------------------------
//
// Function: GetUrlArrayAndInfoFromCrlDistPoint
//
// Synopsis: get URL data using decoded CRL distribution point info
//
//----------------------------------------------------------------------------
BOOL WINAPI
GetUrlArrayAndInfoFromCrlDistPoint (
IN DWORD cRawUrlData,
IN PCRYPT_RAW_URL_DATA aRawUrlData,
OUT OPTIONAL PCRYPT_URL_ARRAY pUrlArray,
IN OUT DWORD* pcbUrlArray,
OUT OPTIONAL PCRYPT_URL_INFO pUrlInfo,
IN OUT OPTIONAL DWORD* pcbUrlInfo
)
{
BOOL fResult = FALSE;
PCRL_DIST_POINTS_INFO pDistPointsInfo;
PCRL_DIST_POINT rgDistPoint;
PCRL_DIST_POINT_NAME pDistPointName;
PCERT_ALT_NAME_ENTRY rgAltEntry;
DWORD cRaw;
DWORD cCount;
DWORD cEntry;
BOOL fAnyFound = FALSE;
CCryptUrlArray cua( 1, 5, fResult );
for ( cRaw = 0; ( fResult == TRUE ) && ( cRaw < cRawUrlData ); cRaw++ )
{
pDistPointsInfo = (PCRL_DIST_POINTS_INFO)aRawUrlData[cRaw].pvData;
if ( pDistPointsInfo != NULL )
{
rgDistPoint = pDistPointsInfo->rgDistPoint;
for ( cCount = 0;
( cCount < pDistPointsInfo->cDistPoint ) &&
( fResult == TRUE );
cCount++ )
{
// Assumption:: don't support partial reasons
// For now, will ignore CRL issuers, they might
// be the same as the cert's issuer. That was the case
// with a Netscape CDP
if (rgDistPoint[cCount].ReasonFlags.cbData)
continue;
pDistPointName = &rgDistPoint[cCount].DistPointName;
if ( pDistPointName->dwDistPointNameChoice ==
CRL_DIST_POINT_FULL_NAME )
{
rgAltEntry = pDistPointName->FullName.rgAltEntry;
for ( cEntry = 0;
( fResult == TRUE ) &&
( cEntry < pDistPointName->FullName.cAltEntry );
cEntry++ )
{
switch (rgAltEntry[cEntry].dwAltNameChoice) {
case CERT_ALT_NAME_URL:
fResult = cua.AddUrl(
rgAltEntry[cEntry].pwszURL,
TRUE
);
fAnyFound = TRUE;
break;
case CERT_ALT_NAME_DIRECTORY_NAME:
fResult = AddUrlsFromCDPDirectoryName(
&rgAltEntry[cEntry].DirectoryName,
&cua
);
fAnyFound = TRUE;
break;
default:
break;
}
}
}
}
}
}
if ( ( fAnyFound == FALSE ) && ( fResult == TRUE ) )
{
SetLastError( (DWORD) CRYPT_E_NOT_FOUND );
fResult = FALSE;
}
if ( fResult == TRUE )
{
PCRYPT_URL_ARRAY* ppUrlArray = NULL;
if ( pUrlArray != NULL )
{
ppUrlArray = &pUrlArray;
}
fResult = cua.GetArrayInSingleBufferEncodedForm(
ppUrlArray,
pcbUrlArray
);
}
if ( ( fResult == TRUE ) && ( pcbUrlInfo != NULL ) )
{
InitializeDefaultUrlInfo( pUrlInfo, pcbUrlInfo );
}
cua.FreeArray( TRUE );
return( fResult );
}
//+---------------------------------------------------------------------------
//
// Function: GetUrlArrayAndInfoFromNextUpdateLocation
//
// Synopsis: get URL data using decoded next update location data
//
//----------------------------------------------------------------------------
BOOL WINAPI
GetUrlArrayAndInfoFromNextUpdateLocation (
IN DWORD cRawUrlData,
IN PCRYPT_RAW_URL_DATA aRawUrlData,
OUT OPTIONAL PCRYPT_URL_ARRAY pUrlArray,
IN OUT DWORD* pcbUrlArray,
OUT OPTIONAL PCRYPT_URL_INFO pUrlInfo,
IN OUT OPTIONAL DWORD* pcbUrlInfo
)
{
BOOL fResult = FALSE;
PCERT_ALT_NAME_INFO pAltNameInfo;
PCERT_ALT_NAME_ENTRY rgAltEntry;
DWORD cRaw;
DWORD cEntry;
BOOL fAnyFound = FALSE;
CCryptUrlArray cua( 1, 5, fResult );
for ( cRaw = 0; ( fResult == TRUE ) && ( cRaw < cRawUrlData ); cRaw++ )
{
pAltNameInfo = (PCERT_ALT_NAME_INFO)aRawUrlData[cRaw].pvData;
if ( pAltNameInfo != NULL )
{
rgAltEntry = pAltNameInfo->rgAltEntry;
for ( cEntry = 0;
( cEntry < pAltNameInfo->cAltEntry ) &&
( fResult == TRUE );
cEntry++ )
{
if ( rgAltEntry[cEntry].dwAltNameChoice == CERT_ALT_NAME_URL )
{
fResult = cua.AddUrl( rgAltEntry[cEntry].pwszURL, TRUE );
fAnyFound = TRUE;
}
}
}
}
if ( ( fAnyFound == FALSE ) && ( fResult == TRUE ) )
{
SetLastError( (DWORD) CRYPT_E_NOT_FOUND );
fResult = FALSE;
}
if ( fResult == TRUE )
{
PCRYPT_URL_ARRAY* ppUrlArray = NULL;
if ( pUrlArray != NULL )
{
ppUrlArray = &pUrlArray;
}
fResult = cua.GetArrayInSingleBufferEncodedForm(
ppUrlArray,
pcbUrlArray
);
}
if ( ( fResult == TRUE ) && ( pcbUrlInfo != NULL ) )
{
InitializeDefaultUrlInfo( pUrlInfo, pcbUrlInfo );
}
cua.FreeArray( TRUE );
return( fResult );
}
//+---------------------------------------------------------------------------
//
// Function: CopyUrlArray
//
// Synopsis: copy URL array
//
//----------------------------------------------------------------------------
VOID WINAPI
CopyUrlArray (
IN PCRYPT_URL_ARRAY pDest,
IN PCRYPT_URL_ARRAY pSource,
IN DWORD cbSource
)
{
DWORD cCount;
DWORD cb;
DWORD cbStruct;
DWORD cbPointers;
DWORD cbUrl;
cbStruct = sizeof( CRYPT_URL_ARRAY );
cbPointers = pSource->cUrl * sizeof( LPWSTR );
pDest->cUrl = pSource->cUrl;
pDest->rgwszUrl = (LPWSTR *)( (LPBYTE)pDest + cbStruct );
for ( cCount = 0, cb = 0; cCount < pSource->cUrl; cCount++ )
{
pDest->rgwszUrl[cCount] = (LPWSTR)((LPBYTE)pDest+cbStruct+cbPointers+cb);
cbUrl = ( wcslen( pSource->rgwszUrl[cCount] ) + 1 ) * sizeof( WCHAR );
memcpy( pDest->rgwszUrl[cCount], pSource->rgwszUrl[cCount], cbUrl );
cb += cbUrl;
}
}
//+---------------------------------------------------------------------------
//
// Function: GetUrlArrayIndex
//
// Synopsis: get index of an URL in the URL array
//
//----------------------------------------------------------------------------
VOID WINAPI
GetUrlArrayIndex (
IN PCRYPT_URL_ARRAY pUrlArray,
IN LPWSTR pwszUrl,
IN DWORD DefaultIndex,
OUT DWORD* pUrlIndex,
OUT BOOL* pfHintInArray
)
{
DWORD cCount;
if ( pUrlIndex != NULL )
{
*pUrlIndex = DefaultIndex;
}
if ( pfHintInArray != NULL )
{
*pfHintInArray = FALSE;
}
if ( pwszUrl == NULL )
{
return;
}
for ( cCount = 0; cCount < pUrlArray->cUrl; cCount++ )
{
if ( wcscmp( pUrlArray->rgwszUrl[cCount], pwszUrl ) == 0 )
{
if ( pUrlIndex != NULL )
{
*pUrlIndex = cCount;
}
if ( pfHintInArray != NULL )
{
*pfHintInArray = TRUE;
}
break;
}
}
}
//+---------------------------------------------------------------------------
//
// Function: GetUrlArrayAndInfoFromCrossCertDistPoint
//
// Synopsis: get URL data using decoded Cross Cert distribution point info
//
//----------------------------------------------------------------------------
BOOL WINAPI
GetUrlArrayAndInfoFromCrossCertDistPoint (
IN DWORD cRawUrlData,
IN PCRYPT_RAW_URL_DATA aRawUrlData,
OUT OPTIONAL PCRYPT_URL_ARRAY pUrlArray,
IN OUT DWORD* pcbUrlArray,
OUT OPTIONAL PCRYPT_URL_INFO pUrlInfo,
IN OUT OPTIONAL DWORD* pcbUrlInfo
)
{
BOOL fResult = FALSE;
PCROSS_CERT_DIST_POINTS_INFO pDistPointsInfo;
PCERT_ALT_NAME_INFO rgDistPoint;
PCERT_ALT_NAME_ENTRY rgAltEntry;
DWORD cRaw;
DWORD cCount;
DWORD cEntry;
BOOL fAnyFound = FALSE;
CCryptUrlArray cua( 1, 5, fResult );
DWORD dwSyncDeltaTime = 0;
DWORD cMaxGroup = 0;
DWORD cGroup = 0;
DWORD *pcGroupEntry = NULL;
DWORD cGroupEntry;
DWORD cbUrlInfo;
// Get maximum number of groups
for ( cRaw = 0; cRaw < cRawUrlData; cRaw++ )
{
pDistPointsInfo =
(PCROSS_CERT_DIST_POINTS_INFO)aRawUrlData[cRaw].pvData;
if ( pDistPointsInfo != NULL )
{
cMaxGroup += pDistPointsInfo->cDistPoint;
}
}
if (cMaxGroup > 0)
{
pcGroupEntry = new DWORD [cMaxGroup];
if ( pcGroupEntry == NULL)
{
fResult = FALSE;
SetLastError( (DWORD) E_OUTOFMEMORY );
}
}
for ( cRaw = 0; ( fResult == TRUE ) && ( cRaw < cRawUrlData ); cRaw++ )
{
pDistPointsInfo =
(PCROSS_CERT_DIST_POINTS_INFO)aRawUrlData[cRaw].pvData;
if ( pDistPointsInfo != NULL )
{
if ( dwSyncDeltaTime == 0 )
{
dwSyncDeltaTime = pDistPointsInfo->dwSyncDeltaTime;
}
rgDistPoint = pDistPointsInfo->rgDistPoint;
for ( cCount = 0;
( cCount < pDistPointsInfo->cDistPoint ) &&
( fResult == TRUE );
cCount++ )
{
rgAltEntry = rgDistPoint[cCount].rgAltEntry;
cGroupEntry = 0;
for ( cEntry = 0;
( fResult == TRUE ) &&
( cEntry < rgDistPoint[cCount].cAltEntry );
cEntry++ )
{
switch (rgAltEntry[cEntry].dwAltNameChoice) {
case CERT_ALT_NAME_URL:
fResult = cua.AddUrl(
rgAltEntry[cEntry].pwszURL,
TRUE
);
fAnyFound = TRUE;
cGroupEntry++;
break;
default:
break;
}
}
if ( cGroupEntry > 0 )
{
if (cGroup < cMaxGroup)
{
pcGroupEntry[cGroup] = cGroupEntry;
cGroup++;
}
else
{
fResult = FALSE;
SetLastError( (DWORD) E_UNEXPECTED );
}
}
}
}
}
if ( ( fAnyFound == FALSE ) && ( fResult == TRUE ) )
{
SetLastError( (DWORD) CRYPT_E_NOT_FOUND );
fResult = FALSE;
}
if ( fResult == TRUE )
{
PCRYPT_URL_ARRAY* ppUrlArray = NULL;
if ( pUrlArray != NULL )
{
ppUrlArray = &pUrlArray;
}
fResult = cua.GetArrayInSingleBufferEncodedForm(
ppUrlArray,
pcbUrlArray
);
}
if ( ( fResult == TRUE ) && ( pcbUrlInfo != NULL ) )
{
cbUrlInfo = sizeof( CRYPT_URL_INFO ) + cGroup * sizeof(DWORD);
if ( pUrlInfo != NULL )
{
if (*pcbUrlInfo < cbUrlInfo)
{
fResult = FALSE;
SetLastError( (DWORD) E_INVALIDARG );
}
else
{
pUrlInfo->cbSize = sizeof( CRYPT_URL_INFO );
pUrlInfo->dwSyncDeltaTime = dwSyncDeltaTime;
pUrlInfo->cGroup = cGroup;
if ( cGroup > 0 )
{
pUrlInfo->rgcGroupEntry = (DWORD *) &pUrlInfo[ 1 ];
memcpy(pUrlInfo->rgcGroupEntry, pcGroupEntry,
cGroup * sizeof(DWORD));
}
else
{
pUrlInfo->rgcGroupEntry = NULL;
}
}
}
*pcbUrlInfo = cbUrlInfo;
}
cua.FreeArray( TRUE );
if (pcGroupEntry)
{
delete pcGroupEntry;
}
return( fResult );
}
//+---------------------------------------------------------------------------
//
// Function: CertificateCrossCertDistPointGetObjectUrl
//
// Synopsis: get certificate cross certificate URL
//
//----------------------------------------------------------------------------
BOOL WINAPI
CertificateCrossCertDistPointGetObjectUrl(
IN LPCSTR pszUrlOid,
IN LPVOID pvPara,
IN DWORD dwFlags,
OUT OPTIONAL PCRYPT_URL_ARRAY pUrlArray,
IN OUT DWORD* pcbUrlArray,
OUT OPTIONAL PCRYPT_URL_INFO pUrlInfo,
IN OUT OPTIONAL DWORD* pcbUrlInfo,
IN LPVOID pvReserved
)
{
BOOL fResult = FALSE;
CRYPT_RAW_URL_DATA RawData[MAX_RAW_URL_DATA];
ULONG cRawData = MAX_RAW_URL_DATA;
fResult = ObjectContextGetRawUrlData(
CONTEXT_OID_CERTIFICATE,
pvPara,
(DWORD) -1L, // Index
dwFlags,
szOID_CROSS_CERT_DIST_POINTS,
RawData,
&cRawData
);
if ( fResult == TRUE )
{
fResult = GetUrlArrayAndInfoFromCrossCertDistPoint(
cRawData,
RawData,
pUrlArray,
pcbUrlArray,
pUrlInfo,
pcbUrlInfo
);
ObjectContextFreeRawUrlData( cRawData, RawData );
}
return( fResult );
}
| [
"support@cryptoalgo.cf"
] | support@cryptoalgo.cf |
491eb63afe979cad02ee9d09f0bf980a515f3133 | e950d3fdd8531bdacf8b47d6a90af632bb47893b | /Binary Trees/preorder_build_print.cpp | 6c1269df8e972d8ff861c67e5bc1e57e66170b27 | [] | no_license | sartajsehgal/DS-ALGO | c9e55abc8d9706276eb5c4b5727e4e4d60cbde00 | 415a5f2fa8931a72ef4e1f44e9b330f1d0d50539 | refs/heads/master | 2023-08-31T09:37:04.173420 | 2021-10-01T07:02:15 | 2021-10-01T07:02:15 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 860 | cpp | #include <iostream>
using namespace std;
class node
{
public:
int data;
node *left;
node *right;
node(int d)
{
data = d;
left=NULL;
right=NULL;
}
};
node* buildTree()
{
int data;
cin>>data;
if(data==-1)
{
return NULL;
}
node *root = new node(data);
root->left = buildTree();
root->right = buildTree();
return root;
}
void Preorder(node *root)
{
if(root==NULL)
{
return;
}
cout<<root->data<<" ";
Preorder(root->left);
Preorder(root->right);
}
void Inorder(node *root)
{
if(root==NULL)
return;
Inorder(root->left);
cout<<root->data<<" ";
Inorder(root->right);
}
void Postorder(node *root)
{
if(root==NULL)
return;
Postorder(root->left);
Postorder(root->right);
cout<<root->data<<" ";
}
int main()
{
node *root=buildTree();
Preorder(root);
cout<<endl;
Inorder(root);
cout<<endl;
Postorder(root);
} | [
"sartajsehgal16@gmail.com"
] | sartajsehgal16@gmail.com |
e84c977d4736b44fb1804add3915d78aa0d7955a | 3cf196c4c227c6194e8bef88a03238d5d1d9b740 | /src/cpu/mmucache.cpp | 18e0331b1985f15a15d960c6cb7a5eafbc14a7e6 | [
"MIT"
] | permissive | cualquiercosa327/Wii-U-Firmware-Emulator | a28c4e2b6e1f1e3350d9fcf72b29746d8b65e45d | 7395acc3b4c8bceda9fdf8d6491a63d979aa6b8b | refs/heads/master | 2023-04-01T05:40:10.940197 | 2021-04-01T12:08:44 | 2021-04-01T12:08:44 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 922 | cpp |
#include "mmucache.h"
#include "common/logger.h"
#include <cstring>
MMUCache::MMUCache() {
reset();
}
void MMUCache::reset() {
invalidate();
#if STATS
hits = 0;
misses = 0;
#endif
}
void MMUCache::invalidate() {
memset(entries, 0xFF, sizeof(entries));
}
void MMUCache::update(MemoryAccess type, bool supervisor, uint32_t vaddr, uint32_t paddr, uint32_t mask) {
int index = (int)type * 2 + supervisor;
entries[index].vaddr = vaddr & ~mask;
entries[index].paddr = paddr;
entries[index].mask = mask;
}
bool MMUCache::translate(uint32_t *addr, MemoryAccess type, bool supervisor) {
int index = (int)type * 2 + supervisor;
uint32_t mask = entries[index].mask;
if ((*addr & ~mask) == entries[index].vaddr) {
*addr = (*addr & mask) | entries[index].paddr;
#if STATS
hits++;
#endif
return true;
}
#if STATS
misses++;
#endif
return false;
}
| [
"ymarchand@me.com"
] | ymarchand@me.com |
4ee96cbdd23bebb0b6887804baa8023b3983094c | 580fbfd3c4cc03dd82a549cc8a60b99721501c92 | /src/httpserver/qhttpserver_p.h | 5c84ebe7f552f7c6441d5dd10fe2ef58af45c75d | [] | no_license | john-haugland/qthttpserver | 7b9fcae5a0d1ee84c0ad618be617b3d63893051a | 540daf882faa0e6ac2030835042445a598ca1e74 | refs/heads/master | 2020-04-19T09:24:51.805005 | 2018-10-30T15:23:23 | 2019-01-25T11:49:44 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,664 | h | /****************************************************************************
**
** Copyright (C) 2018 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtHttpServer module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or (at your option) the GNU General
** Public license version 3 or any later version approved by the KDE Free
** Qt Foundation. The licenses are as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
** https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QHTTPSERVER_P_H
#define QHTTPSERVER_P_H
//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists for the convenience
// of QHttpServer. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
#include <private/qabstracthttpserver_p.h>
#include <QtHttpServer/qhttpserver.h>
#include <QtHttpServer/qhttpserverresponse.h>
#include <QtHttpServer/qhttpserverrequest.h>
#include <QtHttpServer/qhttpserverrouter.h>
#include <QtCore/qmap.h>
class QHttpServerPrivate: public QAbstractHttpServerPrivate
{
Q_DECLARE_PUBLIC(QHttpServer)
public:
QHttpServerPrivate() = default;
QHttpServerRouter router;
};
#endif // QHTTPSERVER_P_H
| [
"mikhail.svetkin@qt.io"
] | mikhail.svetkin@qt.io |
0e8a0014df6495f46ee05ac15d3284b3ed9ba332 | a9636f0d96503b890f0f80d52de6fa7beb3ffe29 | /drivers/devices/amed_platform/amedplatform01.h | d0d0777e223e011d5c0813bc9eab09b846d32d50 | [] | no_license | grigp/a-analyser | 5d14e8f91e2104fbc8ffbf47a28d20fd95eb667e | 026badde88531b13a788140f8a3e13f08d4a5371 | refs/heads/master | 2023-09-01T08:09:35.475413 | 2023-06-14T11:37:22 | 2023-06-14T11:37:22 | 244,710,881 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 10,500 | h | #ifndef AMEDPLATFORM01_H
#define AMEDPLATFORM01_H
#include <QObject>
#include <QCoreApplication>
#include <QThread>
#include <QByteArray>
#include "driver.h"
#include "deviceprotocols.h"
#include "devicesdefines.h"
/*!
* \brief Класс драйвера стабилоплатформы А-Мед The AMedPlatform01 class
*/
class AMedPlatform01 : public Driver
, public DeviceProtocols::StabControl
, public DeviceProtocols::TensoControl
, public DeviceProtocols::FrequencyControl
, public DeviceProtocols::FiltrationControl
{
public:
explicit AMedPlatform01(QObject *parent = nullptr);
~AMedPlatform01() override;
static QString uid() {return DevicesDefines::uid_amed_platform01;}
static QString name() {return tr("Стабилоанализатор А-Мед");} //DevicesDefines::name_amed_platform01);} Не локализуется через константу
/*!
* \brief Перекрытые методы, возвращающие uid и name драйверов
* uid и name можно использовать, как методы класса, а эти - только с экземпляром
*/
QString driverUid() const override {return uid();}
QString driverName() const override {return name();}
/*!
* \brief Устанавливает параметры драйвера
* для использования при работе
* \param params - параметры
* \param port - порт
*/
void setParams(const DeviceProtocols::Ports port, const QJsonObject ¶ms) override;
/*!
* \brief Вызывает диалог редактирования параметров
* \param params - редактируемые параметры
* \return true, если диалог закончился командой сохранить параметры
*/
static bool editParams(QJsonObject ¶ms);
/*!
* \brief Запуск передачи данных
*/
void start() override;
/*!
* \brief Останов передачи данных
*/
void stop() override;
/*!
* \brief Возвращает частоту дискретизации для канала по его id
* \param channelId - идентификатор канала
*/
int frequency(const QString &channelId) const override;
/*!
* \brief Возвращает список доступных частот дискретизации для драйвера
*/
QVector<int> frequencyList() const override;
/*!
* \brief Устанавливает частоту дискретизации по конкретному значению.
* Если частота не поддерживается, то игнорируется
* \param frequency - устанавливаемая частота
*/
void setFrequency(const int frequency) override;
/*!
* \brief Возвращает true, если включена фильтрацию
*/
bool isFiltration() const override;
/*!
* \brief Включает и выключает фильтрацию
* \param isFlt - признак
*/
void setIsFiltration(const bool isFlt) override;
/*!
* \brief Возвращает список uid-ов каналов, передаваемых драйвером по uid протокола
* \param protocolUid - uid протокола
*/
QList<QString> getChannelsByProtocol(const QString &protocolUid) const override;
/*!
* \brief Возвращает список uid-ов каналов, передаваемых драйвером по uid формата данных
* \param protocolUid - uid формата данных
*/
QList<QString> getChannelsByFormat(const QString &formatUid) const override;
/*!
* \brief Возвращает список всех каналов, передаваемых драйвером
*/
QList<QString> getChannels() const override;
/*!
* \brief Возвращает кол-во подканалов для канала с заданным uid
* \param channelUid - uid канала
*/
int getSubChannelsCount(const QString &channelUid) const override;
/*!
* \brief Возвращает true, если канал записывается по умолчанию (установлено в драйвере)
* \param channelUid - uid канала
* \param subChan - номер подканала
*/
bool isChannelRecordingDefault(const QString &channelUid, const int subChan = -1) const override;
/*!
* \brief Возвращает интерфейс управления устройством для заданного канала
* \param controlId - uid интерфейса управления устройством
* \param channelId - идентификатор канала
*/
DeviceProtocols::DeviceControl* getDeviceControl(const QString &controlId, const QString &channelId = "") override;
/*!
* \brief Возвращает список протоколов
*/
static QStringList getProtocols();
/*!
* \brief Возвращает список допустимых портов для драйвера
*/
static QList<DeviceProtocols::Ports> getPorts();
void calibrate(const QString &channelUid) override;
void zeroing(const QString &channelUid) override;
/*!
* \brief Возвращает размеры стабилоплатформы
*/
QSize stabSize() override;
void calibrateTenso(const QString &channelUid) override;
/*!
* \brief запрос / установка диапазонов значений для каналов
* \param chanNumber - номер канала 0 - ...
* \param min - минимальное значение
* \param max - максимальное значение
*/
void getTensoValueDiapasone(const int chanNumber, double &min, double &max) override;
void getTensoValueDiapasone(const QString channelId, double &min, double &max) override;
void setTensoValueDiapasone(const int chanNumber, const double min, const double max) override;
bool isCalibrated() const override;
DeviceProtocols::TensoChannel tenso1Params() const {return m_tenso1;}
DeviceProtocols::TensoChannel tenso2Params() const {return m_tenso2;}
DeviceProtocols::TensoChannel tenso3Params() const {return m_tenso3;}
protected:
/*!
* \brief Возвращает настройки порта
*/
SerialPortDefines::Settings getSerialPortSettings() override;
protected slots:
void on_readData(const QByteArray data) override;
void on_error(const QString &err) override;
private:
/*!
* \brief Вовзращает true, если найдена последовательность маркера
*/
bool isMarkerFound();
/*!
* \brief Обрабатывает принятый байт из пакета данных байт
* \param b - текущий байт
*/
void assignByteFromDevice(quint8 b);
/*!
* \brief Фильтрация сигнала онлайн
* \param value - текущее значение исходного сигнала
* \param chan - значения сигнала исходные
* \param useBlock - будет ли блок использоваться (записиываться)
* \return текущее значение фильтрованного сигнала
*/
double filtration(const double value, QVector<double> &chan, const bool useBlock);
/*!
* \brief Возвращает true, если этот блок необходимо учитывать
*/
bool isUseBlock() const;
/*!
* \brief Передача данных пакета
*/
void sendDataBlock();
/*!
* \brief Передача данных стабилограммы
*/
void sendStab();
static QMap<QString, bool> getChanRecordingDefault(const QJsonObject &obj);
static QJsonObject setChanRecordingDefault(const QMap<QString, bool>& recMap);
void cmdStartSinus();
void cmdStartImpulse();
void cmdStop();
DeviceProtocols::TensoChannel m_tenso1 {DeviceProtocols::TensoChannel(DeviceProtocols::tdDynHand, 1.7, 100)};
DeviceProtocols::TensoChannel m_tenso2 {DeviceProtocols::TensoChannel(DeviceProtocols::tdDynStand, 1.7, 500)};
DeviceProtocols::TensoChannel m_tenso3 {DeviceProtocols::TensoChannel(DeviceProtocols::tdBreath, 1.7, 1)};
QMap<QString, bool> m_chanRecordingDefault;
///< Разбор принятых данных
QList<quint8> m_markerCollect;
int m_markerCnt {0}; ///< Счетчик байтов маркера
bool m_isPackage {false}; ///< true - идет разбор пакета, false - нет разбора пакета
int m_countBytePack {0}; ///< Счетчик байтов пакета
quint8 m_circleCounter {0}; ///< Кольцевой счетчик пакетов
bool m_isFirstCycle {true};
int m_countChannels {8}; ///< Кол-во каналов. Должно инициализироваться как параметр драйвера
quint8 m_byteLo; ///< Первый принятый байт - младший
quint8 m_byteMid; ///< Второй принятый байт - средний
double m_X, m_Y, m_A, m_B, m_C, m_D, m_Z; ///< Принятые и разобранные данные
double m_t1, m_t2, m_t3; ///< Значения тензоканалов
///< Фильтрация стабилограммы онлайн
QVector<double> m_chanA; ///< Буфер исходного сигнала опоры A
QVector<double> m_chanB; ///< Буфер исходного сигнала опоры B
QVector<double> m_chanC; ///< Буфер исходного сигнала опоры C
QVector<double> m_chanD; ///< Буфер исходного сигнала опоры D
int m_frequency {50}; ///< Текущая установленная частота дискретизации
bool m_isFiltration {true}; ///< Признак фильтрации
};
#endif // AMEDPLATFORM01_H
| [
"grig_p@mail.ru"
] | grig_p@mail.ru |
d52dd38b0e1b88805f21f62835e8c364aa4be927 | a1fdf55be58ba28fbed60fb9b65eb8fbf5d67af6 | /src/Externals/gdcm/Source/MediaStorageAndFileFormat/gdcmBitmap.h | d2abc09c55e6b61b7a2412f72d809717700d7735 | [
"BSD-3-Clause",
"BSD-2-Clause"
] | permissive | rblake/seg3d2 | a8a28907207f5a95cfca1e47e4e0aa40a65d7d3b | aa65235b577732f506991021f16576332c64c4ae | refs/heads/master | 2016-09-07T18:49:54.102440 | 2015-03-26T19:17:53 | 2015-03-26T19:17:53 | 16,261,878 | 3 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 5,699 | h | /*=========================================================================
Program: GDCM (Grassroots DICOM). A DICOM library
Module: $URL$
Copyright (c) 2006-2010 Mathieu Malaterre
All rights reserved.
See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
#ifndef GDCMBITMAP_H
#define GDCMBITMAP_H
#include "gdcmObject.h"
#include "gdcmCurve.h"
#include "gdcmDataElement.h"
//#include "gdcmIconImage.h"
#include "gdcmLookupTable.h"
#include "gdcmOverlay.h"
#include "gdcmPhotometricInterpretation.h"
#include "gdcmPixelFormat.h"
#include "gdcmSmartPointer.h"
#include "gdcmTransferSyntax.h"
#include <vector>
namespace gdcm
{
/**
* \brief Bitmap class
* A bitmap based image. Used as parent for both IconImage and the main Pixel Data Image
* It does not contains any World Space information (IPP, IOP)
*/
class GDCM_EXPORT Bitmap : public Object
{
public:
Bitmap();
~Bitmap();
void Print(std::ostream &) const {}
virtual bool AreOverlaysInPixelData() const { return false; }
/// Return the number of dimension of the pixel data bytes; for example 2 for a 2D matrices of values
unsigned int GetNumberOfDimensions() const;
void SetNumberOfDimensions(unsigned int dim);
/// return the planar configuration
unsigned int GetPlanarConfiguration() const;
/// \warning you need to call SetPixelFormat first (before SetPlanarConfiguration) for consistency checking
void SetPlanarConfiguration(unsigned int pc);
bool GetNeedByteSwap() const
{
return NeedByteSwap;
}
void SetNeedByteSwap(bool b)
{
NeedByteSwap = b;
}
/// Transfer syntax
void SetTransferSyntax(TransferSyntax const &ts) {
TS = ts;
}
const TransferSyntax &GetTransferSyntax() const {
return TS;
}
bool IsTransferSyntaxCompatible( TransferSyntax const & ts ) const;
void SetDataElement(DataElement const &de) {
PixelData = de;
}
const DataElement& GetDataElement() const { return PixelData; }
DataElement& GetDataElement() { return PixelData; }
/// Set/Get LUT
void SetLUT(LookupTable const &lut)
{
LUT = SmartPointer<LookupTable>( const_cast<LookupTable*>(&lut) );
}
const LookupTable &GetLUT() const
{
return *LUT;
}
LookupTable &GetLUT()
{
return *LUT;
}
/// Return the dimension of the pixel data, first dimension (x), then 2nd (y), then 3rd (z)...
const unsigned int *GetDimensions() const;
unsigned int GetDimension(unsigned int idx) const;
void SetColumns(unsigned int col) { SetDimension(0,col); }
unsigned int GetColumns() const { return GetDimension(0); }
void SetRows(unsigned int rows) { SetDimension(1,rows); }
unsigned int GetRows() const { return GetDimension(1); }
void SetDimensions(const unsigned int dims[3]);
void SetDimension(unsigned int idx, unsigned int dim);
/// Get/Set PixelFormat
const PixelFormat &GetPixelFormat() const
{
return PF;
}
PixelFormat &GetPixelFormat()
{
return PF;
}
void SetPixelFormat(PixelFormat const &pf)
{
PF = pf;
PF.Validate();
}
/// return the photometric interpretation
const PhotometricInterpretation &GetPhotometricInterpretation() const;
void SetPhotometricInterpretation(PhotometricInterpretation const &pi);
bool IsEmpty() const { return Dimensions.size() == 0; }
void Clear();
/// Return the length of the image after decompression
/// WARNING for palette color: It will NOT take into account the Palette Color
/// thus you need to multiply this length by 3 if computing the size of equivalent RGB image
unsigned long GetBufferLength() const;
/// Acces the raw data
bool GetBuffer(char *buffer) const;
/// Return whether or not the image was compressed using a lossy compressor or not
bool IsLossy() const;
/// Specifically set that the image was compressed using a lossy compression mechanism
void SetLossyFlag(bool f) { LossyFlag = f; }
protected:
bool TryRAWCodec(char *buffer, bool &lossyflag) const;
bool TryJPEGCodec(char *buffer, bool &lossyflag) const;
bool TryPVRGCodec(char *buffer, bool &lossyflag) const;
bool TryKAKADUCodec(char *buffer, bool &lossyflag) const;
bool TryJPEGLSCodec(char *buffer, bool &lossyflag) const;
bool TryJPEG2000Codec(char *buffer, bool &lossyflag) const;
bool TryRLECodec(char *buffer, bool &lossyflag) const;
bool TryJPEGCodec2(std::ostream &os) const;
bool TryJPEG2000Codec2(std::ostream &os) const;
bool GetBuffer2(std::ostream &os) const;
friend class PixmapReader;
friend class ImageChangeTransferSyntax;
bool ComputeLossyFlag();
//private:
protected:
unsigned int PlanarConfiguration;
unsigned int NumberOfDimensions;
TransferSyntax TS;
PixelFormat PF; // SamplesPerPixel, BitsAllocated, BitsStored, HighBit, PixelRepresentation
PhotometricInterpretation PI;
// Mind dump: unsigned int is required here, since we are reading (0028,0008) Number Of Frames
// which is VR::IS, so I cannot simply assumed that unsigned short is enough... :(
std::vector<unsigned int> Dimensions; // Col/Row
DataElement PixelData; // copied from 7fe0,0010
typedef SmartPointer<LookupTable> LUTPtr;
LUTPtr LUT;
// I believe the following 3 ivars can be derived from TS ...
bool NeedByteSwap;
bool LossyFlag;
private:
bool GetBufferInternal(char *buffer, bool &lossyflag) const;
};
} // end namespace gdcm
#endif //GDCMBITMAP_H
| [
"jshu@305cdda6-5ce1-45b3-a98d-dfc68c8b3305"
] | jshu@305cdda6-5ce1-45b3-a98d-dfc68c8b3305 |
df4cc87422d1dc9bec4108bf505b27333dd460c5 | ee948e2bbfa08b79323cb28b99b63f09d5e39682 | /old/oldcode/micro/gather-minerals-task.h | 1718029a272e74bebbf022dfe4d4a969030a472f | [] | no_license | LordBlackhawk/bw-karl | 6c8808cd0472a6fcf6500b03c218fcc01b76908c | 20ca5958781b856c5861882cddd4c0f8838542fd | refs/heads/master | 2016-09-05T23:57:30.543228 | 2014-11-13T20:17:50 | 2014-11-13T20:17:50 | 35,498,576 | 1 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 1,173 | h | #pragma once
#include "base-task.h"
#include "utils/random-chooser.h"
#include <BWAPI.h>
#include <BWTA.h>
class GatherMineralsTask : public BaseTask
{
public:
GatherMineralsTask(BaseLocationInfoPtr l) : BaseTask(MicroTaskEnum::GatherMinerals), location(l)
{ }
virtual void activate(UnitInfoPtr unit)
{
if (unit->getType().isWorker()) {
worker.insert(unit);
unit->get()->rightClick(getMineral());
} else {
failed(unit);
}
}
virtual void deactivate(UnitInfoPtr unit)
{
worker.erase(unit);
}
virtual TaskStatus::Type tick()
{
for (auto unit : worker)
if (unit->get()->isIdle()) {
if (unit->getType().isWorker())
unit->get()->rightClick(getMineral());
else
LOG1 << "GatherMineralsTask has none worker unit of type '" << unit->getType().getName() << "' in list!";
}
return TaskStatus::running;
}
BWAPI::Position getPosition() const
{
return location->getPosition();
}
protected:
std::set<UnitInfoPtr> worker;
BaseLocationInfoPtr location;
BWAPI::Unit* getMineral() const
{
// TODO BETTER:
return getRandomSomething(location->get()->getMinerals());
}
};
| [
"lordblackhawk@gmail.com"
] | lordblackhawk@gmail.com |
fb3b9a4a22a14b4f976b7a7fa638d0ebef0428f1 | 39546305c8001d6166f4c7b3b0c7b3970d263d4f | /experiment/DefaultClock.cpp | 418fff7960b3654cf19e8b6bbfa1dc1ed733b3ba | [] | no_license | bryo4321/ProcessorOverhead | 748f8a90371ef1af47736d8edb048a50fb2dc4fc | c59ebf2e1df8576f5b8e9d6895e4fc742b25df1f | refs/heads/master | 2020-03-17T12:47:51.013004 | 2018-05-16T03:33:20 | 2018-05-16T03:33:20 | 133,603,564 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,608 | cpp | //
// Created by sarah on 9/29/17.
//
#include "DefaultClock.h"
namespace AccurateClock {
Time::Time(const timespec &timeValue) : timeValue(timeValue) {
}
void Time::print(std::ostream &out) const {
const double oneThousand = 1000;
auto milliseconds = getTotalMilliseconds();
auto secondsPart = (long)(milliseconds / oneThousand);
auto millisecondsPart = (long)(milliseconds - (secondsPart * oneThousand));
auto nsPart = (long)(
(milliseconds * oneThousand) -
(secondsPart * oneThousand * oneThousand) -
(millisecondsPart * oneThousand));
out << secondsPart << "sec, " << millisecondsPart << "ms, " << nsPart << "ns since the computer booted";
}
double Time::getTotalMilliseconds() const {
const double oneThousand = 1000;
auto milliseconds =
(timeValue.tv_sec * oneThousand) +
(timeValue.tv_nsec / oneThousand) / oneThousand;
return milliseconds;
}
const Duration Time::operator-(const Time &a) const {
auto difference = ((getTotalMilliseconds() - a.getTotalMilliseconds())/1000);
auto duration = Duration(difference);
return duration;
}
const Time DefaultClock::getTime() {
auto value = timespec();
clock_gettime(CLOCK_BOOTTIME, &value);
auto time = Time(value);
return time;
}
Duration::Duration(double value) : valueInSeconds(value) {
}
void Duration::print(std::ostream &out) const {
out << valueInSeconds << "sec";
}
}
| [
"bryo4321@yahoo.com"
] | bryo4321@yahoo.com |
1ed941a2313ad0bfeead2f791c9c9c8363bd638f | b522ef7197ce1908bd8d09d35e2033b53df7a903 | /src/condition.cpp | 5b8cecaae5f0c87041f30787595a434a10fd6d49 | [] | no_license | EGSilver/Review | a60b539dc468bde5a724897886f6fd25bcc3b9f2 | ff291c05377663aa35802c80ca7ddb2d1bede4b7 | refs/heads/master | 2023-03-17T05:51:06.430857 | 2021-03-08T14:34:35 | 2021-03-08T14:34:35 | 340,983,471 | 0 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 42,410 | cpp | /**
* The Forgotten Server - a free and open-source MMORPG server emulator
* Copyright (C) 2015 Mark Samman <mark.samman@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "otpch.h"
#include "condition.h"
#include "game.h"
extern Game g_game;
Condition::Condition(ConditionId_t _id, ConditionType_t _type, int32_t _ticks, bool _buff, uint32_t _subId) :
subId(_subId),
ticks(_ticks),
conditionType(_type),
id(_id),
isBuff(_buff)
{
if (_ticks == -1) {
endTime = std::numeric_limits<int64_t>::max();
} else {
endTime = 0;
}
}
bool Condition::setParam(ConditionParam_t param, int32_t value)
{
switch (param) {
case CONDITION_PARAM_TICKS: {
ticks = value;
return true;
}
case CONDITION_PARAM_BUFF_SPELL: {
isBuff = (value != 0);
return true;
}
case CONDITION_PARAM_SUBID: {
subId = value;
return true;
}
default: {
return false;
}
}
}
bool Condition::unserialize(PropStream& propStream)
{
uint8_t attr_type;
while (propStream.read<uint8_t>(attr_type) && attr_type != CONDITIONATTR_END) {
if (!unserializeProp(static_cast<ConditionAttr_t>(attr_type), propStream)) {
return false;
}
}
return true;
}
bool Condition::unserializeProp(ConditionAttr_t attr, PropStream& propStream)
{
switch (attr) {
case CONDITIONATTR_TYPE: {
int32_t value;
if (!propStream.read<int32_t>(value)) {
return false;
}
conditionType = static_cast<ConditionType_t>(value);
return true;
}
case CONDITIONATTR_ID: {
int32_t value;
if (!propStream.read<int32_t>(value)) {
return false;
}
id = static_cast<ConditionId_t>(value);
return true;
}
case CONDITIONATTR_TICKS: {
return propStream.read<int32_t>(ticks);
}
case CONDITIONATTR_ISBUFF: {
uint8_t value;
if (!propStream.read<uint8_t>(value)) {
return false;
}
isBuff = (value != 0);
return true;
}
case CONDITIONATTR_SUBID: {
return propStream.read<uint32_t>(subId);
}
case CONDITIONATTR_END:
return true;
default:
return false;
}
}
void Condition::serialize(PropWriteStream& propWriteStream)
{
propWriteStream.write<uint8_t>(CONDITIONATTR_TYPE);
propWriteStream.write<uint32_t>(conditionType);
propWriteStream.write<uint8_t>(CONDITIONATTR_ID);
propWriteStream.write<uint32_t>(id);
propWriteStream.write<uint8_t>(CONDITIONATTR_TICKS);
propWriteStream.write<uint32_t>(ticks);
propWriteStream.write<uint8_t>(CONDITIONATTR_ISBUFF);
propWriteStream.write<uint8_t>(isBuff);
propWriteStream.write<uint8_t>(CONDITIONATTR_SUBID);
propWriteStream.write<uint32_t>(subId);
}
void Condition::setTicks(int32_t newTicks)
{
ticks = newTicks;
endTime = ticks + OTSYS_TIME();
}
bool Condition::executeCondition(Creature*, int32_t interval)
{
if (ticks == -1) {
return true;
}
//Not using set ticks here since it would reset endTime
ticks = std::max<int32_t>(0, ticks - interval);
return getEndTime() >= OTSYS_TIME();
}
Condition* Condition::createCondition(ConditionId_t _id, ConditionType_t _type, int32_t _ticks, int32_t param/* = 0*/, bool _buff/* = false*/, uint32_t _subId/* = 0*/)
{
switch (_type) {
case CONDITION_POISON:
case CONDITION_FIRE:
case CONDITION_ENERGY:
case CONDITION_DROWN:
case CONDITION_FREEZING:
case CONDITION_DAZZLED:
case CONDITION_CURSED:
case CONDITION_BLEEDING:
return new ConditionDamage(_id, _type, _buff, _subId);
case CONDITION_HASTE:
case CONDITION_PARALYZE:
return new ConditionSpeed(_id, _type, _ticks, _buff, _subId, param);
case CONDITION_INVISIBLE:
return new ConditionInvisible(_id, _type, _ticks, _buff, _subId);
case CONDITION_OUTFIT:
return new ConditionOutfit(_id, _type, _ticks, _buff, _subId);
case CONDITION_LIGHT:
return new ConditionLight(_id, _type, _ticks, _buff, _subId, param & 0xFF, (param & 0xFF00) >> 8);
case CONDITION_REGENERATION:
return new ConditionRegeneration(_id, _type, _ticks, _buff, _subId);
case CONDITION_SOUL:
return new ConditionSoul(_id, _type, _ticks, _buff, _subId);
case CONDITION_ATTRIBUTES:
return new ConditionAttributes(_id, _type, _ticks, _buff, _subId);
case CONDITION_SPELLCOOLDOWN:
return new ConditionSpellCooldown(_id, _type, _ticks, _buff, _subId);
case CONDITION_SPELLGROUPCOOLDOWN:
return new ConditionSpellGroupCooldown(_id, _type, _ticks, _buff, _subId);
case CONDITION_INFIGHT:
case CONDITION_DRUNK:
case CONDITION_EXHAUST_WEAPON:
case CONDITION_EXHAUST_COMBAT:
case CONDITION_EXHAUST_HEAL:
case CONDITION_MUTED:
case CONDITION_CHANNELMUTEDTICKS:
case CONDITION_YELLTICKS:
case CONDITION_PACIFIED:
case CONDITION_MANASHIELD:
return new ConditionGeneric(_id, _type, _ticks, _buff, _subId);
default:
return nullptr;
}
}
Condition* Condition::createCondition(PropStream& propStream)
{
uint8_t attr;
if (!propStream.read<uint8_t>(attr) || attr != CONDITIONATTR_TYPE) {
return nullptr;
}
uint32_t _type;
if (!propStream.read<uint32_t>(_type)) {
return nullptr;
}
if (!propStream.read<uint8_t>(attr) || attr != CONDITIONATTR_ID) {
return nullptr;
}
uint32_t _id;
if (!propStream.read<uint32_t>(_id)) {
return nullptr;
}
if (!propStream.read<uint8_t>(attr) || attr != CONDITIONATTR_TICKS) {
return nullptr;
}
uint32_t _ticks;
if (!propStream.read<uint32_t>(_ticks)) {
return nullptr;
}
if (!propStream.read<uint8_t>(attr) || attr != CONDITIONATTR_ISBUFF) {
return nullptr;
}
uint8_t _buff;
if (!propStream.read<uint8_t>(_buff)) {
return nullptr;
}
if (!propStream.read<uint8_t>(attr) || attr != CONDITIONATTR_SUBID) {
return nullptr;
}
uint32_t _subId;
if (!propStream.read<uint32_t>(_subId)) {
return nullptr;
}
return createCondition(static_cast<ConditionId_t>(_id), static_cast<ConditionType_t>(_type), _ticks, 0, _buff != 0, _subId);
}
bool Condition::startCondition(Creature*)
{
if (ticks > 0) {
endTime = ticks + OTSYS_TIME();
}
return true;
}
bool Condition::isPersistent() const
{
if (ticks == -1) {
return false;
}
if (!(id == CONDITIONID_DEFAULT || id == CONDITIONID_COMBAT)) {
return false;
}
return true;
}
uint32_t Condition::getIcons() const
{
return isBuff ? ICON_PARTY_BUFF : 0;
}
bool Condition::updateCondition(const Condition* addCondition)
{
if (conditionType != addCondition->getType()) {
return false;
}
if (ticks == -1 && addCondition->getTicks() > 0) {
return false;
}
if (addCondition->getTicks() >= 0 && getEndTime() > (OTSYS_TIME() + addCondition->getTicks())) {
return false;
}
return true;
}
ConditionGeneric::ConditionGeneric(ConditionId_t _id, ConditionType_t _type, int32_t _ticks, bool _buff, uint32_t _subId) :
Condition(_id, _type, _ticks, _buff, _subId)
{
//
}
bool ConditionGeneric::startCondition(Creature* creature)
{
return Condition::startCondition(creature);
}
bool ConditionGeneric::executeCondition(Creature* creature, int32_t interval)
{
return Condition::executeCondition(creature, interval);
}
void ConditionGeneric::endCondition(Creature*)
{
//
}
void ConditionGeneric::addCondition(Creature*, const Condition* addCondition)
{
if (updateCondition(addCondition)) {
setTicks(addCondition->getTicks());
}
}
uint32_t ConditionGeneric::getIcons() const
{
uint32_t icons = Condition::getIcons();
switch (conditionType) {
case CONDITION_MANASHIELD:
icons |= ICON_MANASHIELD;
break;
case CONDITION_INFIGHT:
icons |= ICON_SWORDS;
break;
case CONDITION_DRUNK:
icons |= ICON_DRUNK;
break;
default:
break;
}
return icons;
}
ConditionAttributes::ConditionAttributes(ConditionId_t _id, ConditionType_t _type, int32_t _ticks, bool _buff, uint32_t _subId) :
ConditionGeneric(_id, _type, _ticks, _buff, _subId), skills(), skillsPercent(), stats(), statsPercent()
{
currentSkill = 0;
currentStat = 0;
}
void ConditionAttributes::addCondition(Creature* creature, const Condition* addCondition)
{
if (updateCondition(addCondition)) {
setTicks(addCondition->getTicks());
const ConditionAttributes& conditionAttrs = static_cast<const ConditionAttributes&>(*addCondition);
//Remove the old condition
endCondition(creature);
//Apply the new one
memcpy(skills, conditionAttrs.skills, sizeof(skills));
memcpy(specialSkills, conditionAttrs.specialSkills, sizeof(specialSkills));
memcpy(skillsPercent, conditionAttrs.skillsPercent, sizeof(skillsPercent));
memcpy(stats, conditionAttrs.stats, sizeof(stats));
memcpy(statsPercent, conditionAttrs.statsPercent, sizeof(statsPercent));
if (Player* player = creature->getPlayer()) {
updatePercentSkills(player);
updateSkills(player);
updatePercentStats(player);
updateStats(player);
}
}
}
bool ConditionAttributes::unserializeProp(ConditionAttr_t attr, PropStream& propStream)
{
if (attr == CONDITIONATTR_SKILLS) {
return propStream.read<int32_t>(skills[currentSkill++]);
} else if (attr == CONDITIONATTR_STATS) {
return propStream.read<int32_t>(stats[currentStat++]);
}
return Condition::unserializeProp(attr, propStream);
}
void ConditionAttributes::serialize(PropWriteStream& propWriteStream)
{
Condition::serialize(propWriteStream);
for (int32_t i = SKILL_FIRST; i <= SKILL_LAST; ++i) {
propWriteStream.write<uint8_t>(CONDITIONATTR_SKILLS);
propWriteStream.write<int32_t>(skills[i]);
}
for (int32_t i = STAT_FIRST; i <= STAT_LAST; ++i) {
propWriteStream.write<uint8_t>(CONDITIONATTR_STATS);
propWriteStream.write<int32_t>(stats[i]);
}
}
bool ConditionAttributes::startCondition(Creature* creature)
{
if (!Condition::startCondition(creature)) {
return false;
}
if (Player* player = creature->getPlayer()) {
updatePercentSkills(player);
updateSkills(player);
updatePercentStats(player);
updateStats(player);
}
return true;
}
void ConditionAttributes::updatePercentStats(Player* player)
{
for (int32_t i = STAT_FIRST; i <= STAT_LAST; ++i) {
if (statsPercent[i] == 0) {
continue;
}
switch (i) {
case STAT_MAXHITPOINTS:
stats[i] = static_cast<int32_t>(player->getMaxHealth() * ((statsPercent[i] - 100) / 100.f));
break;
case STAT_MAXMANAPOINTS:
stats[i] = static_cast<int32_t>(player->getMaxMana() * ((statsPercent[i] - 100) / 100.f));
break;
case STAT_MAGICPOINTS:
stats[i] = static_cast<int32_t>(player->getMagicLevel() * ((statsPercent[i] - 100) / 100.f));
break;
}
}
}
void ConditionAttributes::updateStats(Player* player)
{
bool needUpdateStats = false;
for (int32_t i = STAT_FIRST; i <= STAT_LAST; ++i) {
if (stats[i]) {
needUpdateStats = true;
player->setVarStats(static_cast<stats_t>(i), stats[i]);
}
}
if (needUpdateStats) {
player->sendStats();
}
}
void ConditionAttributes::updatePercentSkills(Player* player)
{
for (uint8_t i = SKILL_FIRST; i <= SKILL_LAST; ++i) {
if (skillsPercent[i] == 0) {
continue;
}
int32_t unmodifiedSkill = player->getBaseSkill(i);
skills[i] = static_cast<int32_t>(unmodifiedSkill * ((skillsPercent[i] - 100) / 100.f));
}
}
void ConditionAttributes::updateSkills(Player* player)
{
bool needUpdateSkills = false;
for (int32_t i = SKILL_FIRST; i <= SKILL_LAST; ++i) {
if (skills[i]) {
needUpdateSkills = true;
player->setVarSkill(static_cast<skills_t>(i), skills[i]);
}
}
for (int32_t i = SPECIALSKILL_FIRST; i <= SPECIALSKILL_LAST; ++i) {
if (specialSkills[i]) {
needUpdateSkills = true;
player->setVarSpecialSkill(static_cast<SpecialSkills_t>(i), specialSkills[i]);
}
}
if (needUpdateSkills) {
player->sendSkills();
}
}
bool ConditionAttributes::executeCondition(Creature* creature, int32_t interval)
{
return ConditionGeneric::executeCondition(creature, interval);
}
void ConditionAttributes::endCondition(Creature* creature)
{
Player* player = creature->getPlayer();
if (player) {
bool needUpdateSkills = false;
for (int32_t i = SKILL_FIRST; i <= SKILL_LAST; ++i) {
if (skills[i] || skillsPercent[i]) {
needUpdateSkills = true;
player->setVarSkill(static_cast<skills_t>(i), -skills[i]);
}
}
for (int32_t i = SPECIALSKILL_FIRST; i <= SPECIALSKILL_LAST; ++i) {
if (specialSkills[i]) {
needUpdateSkills = true;
player->setVarSpecialSkill(static_cast<SpecialSkills_t>(i), -specialSkills[i]);
}
}
if (needUpdateSkills) {
player->sendSkills();
}
bool needUpdateStats = false;
for (int32_t i = STAT_FIRST; i <= STAT_LAST; ++i) {
if (stats[i]) {
needUpdateStats = true;
player->setVarStats(static_cast<stats_t>(i), -stats[i]);
}
}
if (needUpdateStats) {
player->sendStats();
}
}
}
bool ConditionAttributes::setParam(ConditionParam_t param, int32_t value)
{
bool ret = ConditionGeneric::setParam(param, value);
switch (param) {
case CONDITION_PARAM_SKILL_MELEE: {
skills[SKILL_CLUB] = value;
skills[SKILL_AXE] = value;
skills[SKILL_SWORD] = value;
return true;
}
case CONDITION_PARAM_SKILL_MELEEPERCENT: {
skillsPercent[SKILL_CLUB] = value;
skillsPercent[SKILL_AXE] = value;
skillsPercent[SKILL_SWORD] = value;
return true;
}
case CONDITION_PARAM_SKILL_FIST: {
skills[SKILL_FIST] = value;
return true;
}
case CONDITION_PARAM_SKILL_FISTPERCENT: {
skillsPercent[SKILL_FIST] = value;
return true;
}
case CONDITION_PARAM_SKILL_CLUB: {
skills[SKILL_CLUB] = value;
return true;
}
case CONDITION_PARAM_SKILL_CLUBPERCENT: {
skillsPercent[SKILL_CLUB] = value;
return true;
}
case CONDITION_PARAM_SKILL_SWORD: {
skills[SKILL_SWORD] = value;
return true;
}
case CONDITION_PARAM_SKILL_SWORDPERCENT: {
skillsPercent[SKILL_SWORD] = value;
return true;
}
case CONDITION_PARAM_SKILL_AXE: {
skills[SKILL_AXE] = value;
return true;
}
case CONDITION_PARAM_SKILL_AXEPERCENT: {
skillsPercent[SKILL_AXE] = value;
return true;
}
case CONDITION_PARAM_SKILL_DISTANCE: {
skills[SKILL_DISTANCE] = value;
return true;
}
case CONDITION_PARAM_SKILL_DISTANCEPERCENT: {
skillsPercent[SKILL_DISTANCE] = value;
return true;
}
case CONDITION_PARAM_SKILL_SHIELD: {
skills[SKILL_SHIELD] = value;
return true;
}
case CONDITION_PARAM_SKILL_SHIELDPERCENT: {
skillsPercent[SKILL_SHIELD] = value;
return true;
}
case CONDITION_PARAM_SKILL_FISHING: {
skills[SKILL_FISHING] = value;
return true;
}
case CONDITION_PARAM_SKILL_FISHINGPERCENT: {
skillsPercent[SKILL_FISHING] = value;
return true;
}
case CONDITION_PARAM_STAT_MAXHITPOINTS: {
stats[STAT_MAXHITPOINTS] = value;
return true;
}
case CONDITION_PARAM_STAT_MAXMANAPOINTS: {
stats[STAT_MAXMANAPOINTS] = value;
return true;
}
case CONDITION_PARAM_STAT_MAGICPOINTS: {
stats[STAT_MAGICPOINTS] = value;
return true;
}
case CONDITION_PARAM_STAT_MAXHITPOINTSPERCENT: {
statsPercent[STAT_MAXHITPOINTS] = std::max<int32_t>(0, value);
return true;
}
case CONDITION_PARAM_STAT_MAXMANAPOINTSPERCENT: {
statsPercent[STAT_MAXMANAPOINTS] = std::max<int32_t>(0, value);
return true;
}
case CONDITION_PARAM_STAT_MAGICPOINTSPERCENT: {
statsPercent[STAT_MAGICPOINTS] = std::max<int32_t>(0, value);
return true;
}
case CONDITION_PARAM_SPECIALSKILL_CRITICALHITCHANCE: {
specialSkills[SPECIALSKILL_CRITICALHITCHANCE] = value;
return true;
}
case CONDITION_PARAM_SPECIALSKILL_CRITICALHITAMOUNT: {
specialSkills[SPECIALSKILL_CRITICALHITAMOUNT] = value;
return true;
}
case CONDITION_PARAM_SPECIALSKILL_HITPOINTSLEECHCHANCE: {
specialSkills[SPECIALSKILL_HITPOINTSLEECHCHANCE] = value;
return true;
}
case CONDITION_PARAM_SPECIALSKILL_HITPOINTSLEECHAMOUNT: {
specialSkills[SPECIALSKILL_HITPOINTSLEECHAMOUNT] = value;
return true;
}
case CONDITION_PARAM_SPECIALSKILL_MANAPOINTSLEECHCHANCE: {
specialSkills[SPECIALSKILL_MANAPOINTSLEECHCHANCE] = value;
return true;
}
case CONDITION_PARAM_SPECIALSKILL_MANAPOINTSLEECHAMOUNT: {
specialSkills[SPECIALSKILL_MANAPOINTSLEECHAMOUNT] = value;
return true;
}
default:
return ret;
}
}
ConditionRegeneration::ConditionRegeneration(ConditionId_t _id, ConditionType_t _type, int32_t _ticks, bool _buff, uint32_t _subId) :
ConditionGeneric(_id, _type, _ticks, _buff, _subId)
{
internalHealthTicks = 0;
internalManaTicks = 0;
healthTicks = 1000;
manaTicks = 1000;
healthGain = 0;
manaGain = 0;
}
void ConditionRegeneration::addCondition(Creature*, const Condition* addCondition)
{
if (updateCondition(addCondition)) {
setTicks(addCondition->getTicks());
const ConditionRegeneration& conditionRegen = static_cast<const ConditionRegeneration&>(*addCondition);
healthTicks = conditionRegen.healthTicks;
manaTicks = conditionRegen.manaTicks;
healthGain = conditionRegen.healthGain;
manaGain = conditionRegen.manaGain;
}
}
bool ConditionRegeneration::unserializeProp(ConditionAttr_t attr, PropStream& propStream)
{
if (attr == CONDITIONATTR_HEALTHTICKS) {
return propStream.read<uint32_t>(healthTicks);
} else if (attr == CONDITIONATTR_HEALTHGAIN) {
return propStream.read<uint32_t>(healthGain);
} else if (attr == CONDITIONATTR_MANATICKS) {
return propStream.read<uint32_t>(manaTicks);
} else if (attr == CONDITIONATTR_MANAGAIN) {
return propStream.read<uint32_t>(manaGain);
}
return Condition::unserializeProp(attr, propStream);
}
void ConditionRegeneration::serialize(PropWriteStream& propWriteStream)
{
Condition::serialize(propWriteStream);
propWriteStream.write<uint8_t>(CONDITIONATTR_HEALTHTICKS);
propWriteStream.write<uint32_t>(healthTicks);
propWriteStream.write<uint8_t>(CONDITIONATTR_HEALTHGAIN);
propWriteStream.write<uint32_t>(healthGain);
propWriteStream.write<uint8_t>(CONDITIONATTR_MANATICKS);
propWriteStream.write<uint32_t>(manaTicks);
propWriteStream.write<uint8_t>(CONDITIONATTR_MANAGAIN);
propWriteStream.write<uint32_t>(manaGain);
}
bool ConditionRegeneration::executeCondition(Creature* creature, int32_t interval)
{
internalHealthTicks += interval;
internalManaTicks += interval;
if (creature->getZone() != ZONE_PROTECTION) {
if (internalHealthTicks >= healthTicks) {
internalHealthTicks = 0;
int32_t realHealthGain = creature->getHealth();
creature->changeHealth(healthGain);
realHealthGain = creature->getHealth() - realHealthGain;
if (isBuff && realHealthGain > 0) {
Player* player = creature->getPlayer();
if (player) {
std::string healString = std::to_string(realHealthGain) + (realHealthGain != 1 ? " hitpoints." : " hitpoint.");
TextMessage message(MESSAGE_HEALED, "You were healed for " + healString);
message.position = player->getPosition();
message.primary.value = realHealthGain;
message.primary.color = TEXTCOLOR_MAYABLUE;
player->sendTextMessage(message);
SpectatorVec list;
g_game.map.getSpectators(list, player->getPosition(), false, true);
list.erase(player);
if (!list.empty()) {
message.type = MESSAGE_HEALED_OTHERS;
message.text = player->getName() + " was healed for " + healString;
for (Creature* spectator : list) {
spectator->getPlayer()->sendTextMessage(message);
}
}
}
}
}
if (internalManaTicks >= manaTicks) {
internalManaTicks = 0;
creature->changeMana(manaGain);
}
}
return ConditionGeneric::executeCondition(creature, interval);
}
bool ConditionRegeneration::setParam(ConditionParam_t param, int32_t value)
{
bool ret = ConditionGeneric::setParam(param, value);
switch (param) {
case CONDITION_PARAM_HEALTHGAIN:
healthGain = value;
return true;
case CONDITION_PARAM_HEALTHTICKS:
healthTicks = value;
return true;
case CONDITION_PARAM_MANAGAIN:
manaGain = value;
return true;
case CONDITION_PARAM_MANATICKS:
manaTicks = value;
return true;
default:
return ret;
}
}
ConditionSoul::ConditionSoul(ConditionId_t _id, ConditionType_t _type, int32_t _ticks, bool _buff, uint32_t _subId) :
ConditionGeneric(_id, _type, _ticks, _buff, _subId)
{
internalSoulTicks = 0;
soulTicks = 0;
soulGain = 0;
}
void ConditionSoul::addCondition(Creature*, const Condition* addCondition)
{
if (updateCondition(addCondition)) {
setTicks(addCondition->getTicks());
const ConditionSoul& conditionSoul = static_cast<const ConditionSoul&>(*addCondition);
soulTicks = conditionSoul.soulTicks;
soulGain = conditionSoul.soulGain;
}
}
bool ConditionSoul::unserializeProp(ConditionAttr_t attr, PropStream& propStream)
{
if (attr == CONDITIONATTR_SOULGAIN) {
return propStream.read<uint32_t>(soulGain);
} else if (attr == CONDITIONATTR_SOULTICKS) {
return propStream.read<uint32_t>(soulTicks);
}
return Condition::unserializeProp(attr, propStream);
}
void ConditionSoul::serialize(PropWriteStream& propWriteStream)
{
Condition::serialize(propWriteStream);
propWriteStream.write<uint8_t>(CONDITIONATTR_SOULGAIN);
propWriteStream.write<uint32_t>(soulGain);
propWriteStream.write<uint8_t>(CONDITIONATTR_SOULTICKS);
propWriteStream.write<uint32_t>(soulTicks);
}
bool ConditionSoul::executeCondition(Creature* creature, int32_t interval)
{
internalSoulTicks += interval;
if (Player* player = creature->getPlayer()) {
if (player->getZone() != ZONE_PROTECTION) {
if (internalSoulTicks >= soulTicks) {
internalSoulTicks = 0;
player->changeSoul(soulGain);
}
}
}
return ConditionGeneric::executeCondition(creature, interval);
}
bool ConditionSoul::setParam(ConditionParam_t param, int32_t value)
{
bool ret = ConditionGeneric::setParam(param, value);
switch (param) {
case CONDITION_PARAM_SOULGAIN:
soulGain = value;
return true;
case CONDITION_PARAM_SOULTICKS:
soulTicks = value;
return true;
default:
return ret;
}
}
ConditionDamage::ConditionDamage(ConditionId_t _id, ConditionType_t _type, bool _buff, uint32_t _subId) :
Condition(_id, _type, 0, _buff, _subId)
{
delayed = false;
forceUpdate = false;
field = false;
owner = 0;
minDamage = 0;
maxDamage = 0;
startDamage = 0;
periodDamage = 0;
periodDamageTick = 0;
tickInterval = 2000;
}
bool ConditionDamage::setParam(ConditionParam_t param, int32_t value)
{
bool ret = Condition::setParam(param, value);
switch (param) {
case CONDITION_PARAM_OWNER:
owner = value;
return true;
case CONDITION_PARAM_FORCEUPDATE:
forceUpdate = (value != 0);
return true;
case CONDITION_PARAM_DELAYED:
delayed = (value != 0);
return true;
case CONDITION_PARAM_MAXVALUE:
maxDamage = std::abs(value);
break;
case CONDITION_PARAM_MINVALUE:
minDamage = std::abs(value);
break;
case CONDITION_PARAM_STARTVALUE:
startDamage = std::abs(value);
break;
case CONDITION_PARAM_TICKINTERVAL:
tickInterval = std::abs(value);
break;
case CONDITION_PARAM_PERIODICDAMAGE:
periodDamage = value;
break;
case CONDITION_PARAM_FIELD:
field = (value != 0);
break;
default:
return false;
}
return ret;
}
bool ConditionDamage::unserializeProp(ConditionAttr_t attr, PropStream& propStream)
{
if (attr == CONDITIONATTR_DELAYED) {
uint8_t value;
if (!propStream.read<uint8_t>(value)) {
return false;
}
delayed = (value != 0);
return true;
} else if (attr == CONDITIONATTR_PERIODDAMAGE) {
return propStream.read<int32_t>(periodDamage);
} else if (attr == CONDITIONATTR_OWNER) {
return propStream.skip(4);
} else if (attr == CONDITIONATTR_INTERVALDATA) {
IntervalInfo damageInfo;
if (!propStream.read<IntervalInfo>(damageInfo)) {
return false;
}
damageList.push_back(damageInfo);
if (ticks != -1) {
setTicks(ticks + damageInfo.interval);
}
return true;
}
return Condition::unserializeProp(attr, propStream);
}
void ConditionDamage::serialize(PropWriteStream& propWriteStream)
{
Condition::serialize(propWriteStream);
propWriteStream.write<uint8_t>(CONDITIONATTR_DELAYED);
propWriteStream.write<uint8_t>(delayed);
propWriteStream.write<uint8_t>(CONDITIONATTR_PERIODDAMAGE);
propWriteStream.write<int32_t>(periodDamage);
for (const IntervalInfo& intervalInfo : damageList) {
propWriteStream.write<uint8_t>(CONDITIONATTR_INTERVALDATA);
propWriteStream.write<IntervalInfo>(intervalInfo);
}
}
bool ConditionDamage::updateCondition(const Condition* addCondition)
{
const ConditionDamage& conditionDamage = static_cast<const ConditionDamage&>(*addCondition);
if (conditionDamage.doForceUpdate()) {
return true;
}
if (ticks == -1 && conditionDamage.ticks > 0) {
return false;
}
return conditionDamage.getTotalDamage() > getTotalDamage();
}
bool ConditionDamage::addDamage(int32_t rounds, int32_t time, int32_t value)
{
time = std::max<int32_t>(time, EVENT_CREATURE_THINK_INTERVAL);
if (rounds == -1) {
//periodic damage
periodDamage = value;
setParam(CONDITION_PARAM_TICKINTERVAL, time);
setParam(CONDITION_PARAM_TICKS, -1);
return true;
}
if (periodDamage > 0) {
return false;
}
//rounds, time, damage
for (int32_t i = 0; i < rounds; ++i) {
IntervalInfo damageInfo;
damageInfo.interval = time;
damageInfo.timeLeft = time;
damageInfo.value = value;
damageList.push_back(damageInfo);
if (ticks != -1) {
setTicks(ticks + damageInfo.interval);
}
}
return true;
}
bool ConditionDamage::init()
{
if (periodDamage != 0) {
return true;
}
if (damageList.empty()) {
setTicks(0);
int32_t amount = uniform_random(minDamage, maxDamage);
if (amount != 0) {
if (startDamage > maxDamage) {
startDamage = maxDamage;
} else if (startDamage == 0) {
startDamage = std::max<int32_t>(1, std::ceil(amount / 20.0));
}
std::list<int32_t> list;
ConditionDamage::generateDamageList(amount, startDamage, list);
for (int32_t value : list) {
addDamage(1, tickInterval, -value);
}
}
}
return !damageList.empty();
}
bool ConditionDamage::startCondition(Creature* creature)
{
if (!Condition::startCondition(creature)) {
return false;
}
if (!delayed) {
// delayed condition does no initial damage
if (!doDamage(creature, initDamage)) {
return false;
}
}
if (!init()) {
return false;
}
return true;
}
bool ConditionDamage::executeCondition(Creature* creature, int32_t interval)
{
if (periodDamage != 0) {
periodDamageTick += interval;
if (periodDamageTick >= tickInterval) {
periodDamageTick = 0;
doDamage(creature, periodDamage);
}
} else if (!damageList.empty()) {
IntervalInfo& damageInfo = damageList.front();
bool bRemove = (ticks != -1);
creature->onTickCondition(getType(), bRemove);
damageInfo.timeLeft -= interval;
if (damageInfo.timeLeft <= 0) {
int32_t damage = damageInfo.value;
if (bRemove) {
damageList.pop_front();
} else {
damageInfo.timeLeft = damageInfo.interval;
}
doDamage(creature, damage);
}
if (!bRemove) {
if (ticks > 0) {
endTime += interval;
}
interval = 0;
}
}
return Condition::executeCondition(creature, interval);
}
bool ConditionDamage::getNextDamage(int32_t& damage)
{
if (periodDamage != 0) {
damage = periodDamage;
return true;
} else if (!damageList.empty()) {
IntervalInfo& damageInfo = damageList.front();
damage = damageInfo.value;
if (ticks != -1) {
damageList.pop_front();
}
return true;
}
return false;
}
bool ConditionDamage::doDamage(Creature* creature, int32_t healthChange)
{
if (creature->isSuppress(getType()) || creature->isImmune(getType())) {
return false;
}
CombatDamage damage;
damage.origin = ORIGIN_CONDITION;
damage.primary.value = healthChange;
damage.primary.type = Combat::ConditionToDamageType(conditionType);
Creature* attacker = g_game.getCreatureByID(owner);
if (field && creature->getPlayer() && attacker && attacker->getPlayer()) {
damage.primary.value = static_cast<int32_t>(std::round(damage.primary.value / 2.));
}
if (!creature->isAttackable() || Combat::canDoCombat(attacker, creature) != RETURNVALUE_NOERROR) {
if (!creature->isInGhostMode()) {
g_game.addMagicEffect(creature->getPosition(), CONST_ME_POFF);
}
return false;
}
if (g_game.combatBlockHit(damage, attacker, creature, false, false, field)) {
return false;
}
return g_game.combatChangeHealth(attacker, creature, damage);
}
void ConditionDamage::endCondition(Creature*)
{
//
}
void ConditionDamage::addCondition(Creature* creature, const Condition* addCondition)
{
if (addCondition->getType() != conditionType) {
return;
}
if (!updateCondition(addCondition)) {
return;
}
const ConditionDamage& conditionDamage = static_cast<const ConditionDamage&>(*addCondition);
setTicks(addCondition->getTicks());
owner = conditionDamage.owner;
maxDamage = conditionDamage.maxDamage;
minDamage = conditionDamage.minDamage;
startDamage = conditionDamage.startDamage;
tickInterval = conditionDamage.tickInterval;
periodDamage = conditionDamage.periodDamage;
int32_t nextTimeLeft = tickInterval;
if (!damageList.empty()) {
//save previous timeLeft
IntervalInfo& damageInfo = damageList.front();
nextTimeLeft = damageInfo.timeLeft;
damageList.clear();
}
damageList = conditionDamage.damageList;
if (init()) {
if (!damageList.empty()) {
//restore last timeLeft
IntervalInfo& damageInfo = damageList.front();
damageInfo.timeLeft = nextTimeLeft;
}
if (!delayed) {
int32_t damage;
if (getNextDamage(damage)) {
doDamage(creature, damage);
}
}
}
}
int32_t ConditionDamage::getTotalDamage() const
{
int32_t result;
if (!damageList.empty()) {
result = 0;
for (const IntervalInfo& intervalInfo : damageList) {
result += intervalInfo.value;
}
} else {
result = minDamage + (maxDamage - minDamage) / 2;
}
return std::abs(result);
}
uint32_t ConditionDamage::getIcons() const
{
uint32_t icons = Condition::getIcons();
switch (conditionType) {
case CONDITION_FIRE:
icons |= ICON_BURN;
break;
case CONDITION_ENERGY:
icons |= ICON_ENERGY;
break;
case CONDITION_DROWN:
icons |= ICON_DROWNING;
break;
case CONDITION_POISON:
icons |= ICON_POISON;
break;
case CONDITION_FREEZING:
icons |= ICON_FREEZING;
break;
case CONDITION_DAZZLED:
icons |= ICON_DAZZLED;
break;
case CONDITION_CURSED:
icons |= ICON_CURSED;
break;
case CONDITION_BLEEDING:
icons |= ICON_BLEEDING;
break;
default:
break;
}
return icons;
}
void ConditionDamage::generateDamageList(int32_t amount, int32_t start, std::list<int32_t>& list)
{
amount = std::abs(amount);
int32_t sum = 0;
double x1, x2;
for (int32_t i = start; i > 0; --i) {
int32_t n = start + 1 - i;
int32_t med = (n * amount) / start;
do {
sum += i;
list.push_back(i);
x1 = std::fabs(1.0 - ((static_cast<float>(sum)) + i) / med);
x2 = std::fabs(1.0 - (static_cast<float>(sum) / med));
} while (x1 < x2);
}
}
ConditionSpeed::ConditionSpeed(ConditionId_t _id, ConditionType_t _type, int32_t _ticks, bool _buff, uint32_t _subId, int32_t changeSpeed) :
Condition(_id, _type, _ticks, _buff, _subId)
{
speedDelta = changeSpeed;
mina = 0.0f;
minb = 0.0f;
maxa = 0.0f;
maxb = 0.0f;
}
void ConditionSpeed::setFormulaVars(float _mina, float _minb, float _maxa, float _maxb)
{
mina = _mina;
minb = _minb;
maxa = _maxa;
maxb = _maxb;
}
void ConditionSpeed::getFormulaValues(int32_t var, int32_t& min, int32_t& max) const
{
min = (var * mina) + minb;
max = (var * maxa) + maxb;
}
bool ConditionSpeed::setParam(ConditionParam_t param, int32_t value)
{
Condition::setParam(param, value);
if (param != CONDITION_PARAM_SPEED) {
return false;
}
speedDelta = value;
if (value > 0) {
conditionType = CONDITION_HASTE;
} else {
conditionType = CONDITION_PARALYZE;
}
return true;
}
bool ConditionSpeed::unserializeProp(ConditionAttr_t attr, PropStream& propStream)
{
if (attr == CONDITIONATTR_SPEEDDELTA) {
return propStream.read<int32_t>(speedDelta);
} else if (attr == CONDITIONATTR_FORMULA_MINA) {
return propStream.read<float>(mina);
} else if (attr == CONDITIONATTR_FORMULA_MINB) {
return propStream.read<float>(minb);
} else if (attr == CONDITIONATTR_FORMULA_MAXA) {
return propStream.read<float>(maxa);
} else if (attr == CONDITIONATTR_FORMULA_MAXB) {
return propStream.read<float>(maxb);
}
return Condition::unserializeProp(attr, propStream);
}
void ConditionSpeed::serialize(PropWriteStream& propWriteStream)
{
Condition::serialize(propWriteStream);
propWriteStream.write<uint8_t>(CONDITIONATTR_SPEEDDELTA);
propWriteStream.write<int32_t>(speedDelta);
propWriteStream.write<uint8_t>(CONDITIONATTR_FORMULA_MINA);
propWriteStream.write<float>(mina);
propWriteStream.write<uint8_t>(CONDITIONATTR_FORMULA_MINB);
propWriteStream.write<float>(minb);
propWriteStream.write<uint8_t>(CONDITIONATTR_FORMULA_MAXA);
propWriteStream.write<float>(maxa);
propWriteStream.write<uint8_t>(CONDITIONATTR_FORMULA_MAXB);
propWriteStream.write<float>(maxb);
}
bool ConditionSpeed::startCondition(Creature* creature)
{
if (!Condition::startCondition(creature)) {
return false;
}
if (speedDelta == 0) {
int32_t min, max;
getFormulaValues(creature->getBaseSpeed(), min, max);
speedDelta = uniform_random(min, max);
}
g_game.changeSpeed(creature, speedDelta);
return true;
}
bool ConditionSpeed::executeCondition(Creature* creature, int32_t interval)
{
return Condition::executeCondition(creature, interval);
}
void ConditionSpeed::endCondition(Creature* creature)
{
g_game.changeSpeed(creature, -speedDelta);
}
void ConditionSpeed::addCondition(Creature* creature, const Condition* addCondition)
{
if (conditionType != addCondition->getType()) {
return;
}
if (ticks == -1 && addCondition->getTicks() > 0) {
return;
}
setTicks(addCondition->getTicks());
const ConditionSpeed& conditionSpeed = static_cast<const ConditionSpeed&>(*addCondition);
int32_t oldSpeedDelta = speedDelta;
speedDelta = conditionSpeed.speedDelta;
mina = conditionSpeed.mina;
maxa = conditionSpeed.maxa;
minb = conditionSpeed.minb;
maxb = conditionSpeed.maxb;
if (speedDelta == 0) {
int32_t min;
int32_t max;
getFormulaValues(creature->getBaseSpeed(), min, max);
speedDelta = uniform_random(min, max);
}
int32_t newSpeedChange = (speedDelta - oldSpeedDelta);
if (newSpeedChange != 0) {
g_game.changeSpeed(creature, newSpeedChange);
}
}
uint32_t ConditionSpeed::getIcons() const
{
uint32_t icons = Condition::getIcons();
switch (conditionType) {
case CONDITION_HASTE:
icons |= ICON_HASTE;
break;
case CONDITION_PARALYZE:
icons |= ICON_PARALYZE;
break;
default:
break;
}
return icons;
}
ConditionInvisible::ConditionInvisible(ConditionId_t _id, ConditionType_t _type, int32_t _ticks, bool _buff, uint32_t _subId) :
ConditionGeneric(_id, _type, _ticks, _buff, _subId)
{
//
}
bool ConditionInvisible::startCondition(Creature* creature)
{
if (!Condition::startCondition(creature)) {
return false;
}
g_game.internalCreatureChangeVisible(creature, false);
return true;
}
void ConditionInvisible::endCondition(Creature* creature)
{
if (!creature->isInvisible()) {
g_game.internalCreatureChangeVisible(creature, true);
}
}
ConditionOutfit::ConditionOutfit(ConditionId_t _id, ConditionType_t _type, int32_t _ticks, bool _buff, uint32_t _subId) :
Condition(_id, _type, _ticks, _buff, _subId)
{
//
}
void ConditionOutfit::setOutfit(const Outfit_t& outfit)
{
this->outfit = outfit;
}
bool ConditionOutfit::unserializeProp(ConditionAttr_t attr, PropStream& propStream)
{
if (attr == CONDITIONATTR_OUTFIT) {
return propStream.read<Outfit_t>(outfit);
}
return Condition::unserializeProp(attr, propStream);
}
void ConditionOutfit::serialize(PropWriteStream& propWriteStream)
{
Condition::serialize(propWriteStream);
propWriteStream.write<uint8_t>(CONDITIONATTR_OUTFIT);
propWriteStream.write<Outfit_t>(outfit);
}
bool ConditionOutfit::startCondition(Creature* creature)
{
if (!Condition::startCondition(creature)) {
return false;
}
g_game.internalCreatureChangeOutfit(creature, outfit);
return true;
}
bool ConditionOutfit::executeCondition(Creature* creature, int32_t interval)
{
return Condition::executeCondition(creature, interval);
}
void ConditionOutfit::endCondition(Creature* creature)
{
g_game.internalCreatureChangeOutfit(creature, creature->getDefaultOutfit());
}
void ConditionOutfit::addCondition(Creature* creature, const Condition* addCondition)
{
if (updateCondition(addCondition)) {
setTicks(addCondition->getTicks());
const ConditionOutfit& conditionOutfit = static_cast<const ConditionOutfit&>(*addCondition);
outfit = conditionOutfit.outfit;
g_game.internalCreatureChangeOutfit(creature, outfit);
}
}
ConditionLight::ConditionLight(ConditionId_t _id, ConditionType_t _type, int32_t _ticks, bool _buff, uint32_t _subId, uint8_t _lightlevel, uint8_t _lightcolor) :
Condition(_id, _type, _ticks, _buff, _subId)
{
lightInfo.level = _lightlevel;
lightInfo.color = _lightcolor;
internalLightTicks = 0;
lightChangeInterval = 0;
}
bool ConditionLight::startCondition(Creature* creature)
{
if (!Condition::startCondition(creature)) {
return false;
}
internalLightTicks = 0;
lightChangeInterval = ticks / lightInfo.level;
creature->setCreatureLight(lightInfo);
g_game.changeLight(creature);
return true;
}
bool ConditionLight::executeCondition(Creature* creature, int32_t interval)
{
internalLightTicks += interval;
if (internalLightTicks >= lightChangeInterval) {
internalLightTicks = 0;
LightInfo creatureLight;
creature->getCreatureLight(creatureLight);
if (creatureLight.level > 0) {
--creatureLight.level;
creature->setCreatureLight(creatureLight);
g_game.changeLight(creature);
}
}
return Condition::executeCondition(creature, interval);
}
void ConditionLight::endCondition(Creature* creature)
{
creature->setNormalCreatureLight();
g_game.changeLight(creature);
}
void ConditionLight::addCondition(Creature* creature, const Condition* addCondition)
{
if (updateCondition(addCondition)) {
setTicks(addCondition->getTicks());
const ConditionLight& conditionLight = static_cast<const ConditionLight&>(*addCondition);
lightInfo.level = conditionLight.lightInfo.level;
lightInfo.color = conditionLight.lightInfo.color;
lightChangeInterval = ticks / lightInfo.level;
internalLightTicks = 0;
creature->setCreatureLight(lightInfo);
g_game.changeLight(creature);
}
}
bool ConditionLight::setParam(ConditionParam_t param, int32_t value)
{
bool ret = Condition::setParam(param, value);
if (ret) {
return false;
}
switch (param) {
case CONDITION_PARAM_LIGHT_LEVEL:
lightInfo.level = value;
return true;
case CONDITION_PARAM_LIGHT_COLOR:
lightInfo.color = value;
return true;
default:
return false;
}
}
bool ConditionLight::unserializeProp(ConditionAttr_t attr, PropStream& propStream)
{
if (attr == CONDITIONATTR_LIGHTCOLOR) {
uint32_t value;
if (!propStream.read<uint32_t>(value)) {
return false;
}
lightInfo.color = value;
return true;
} else if (attr == CONDITIONATTR_LIGHTLEVEL) {
uint32_t value;
if (!propStream.read<uint32_t>(value)) {
return false;
}
lightInfo.level = value;
return true;
} else if (attr == CONDITIONATTR_LIGHTTICKS) {
return propStream.read<uint32_t>(internalLightTicks);
} else if (attr == CONDITIONATTR_LIGHTINTERVAL) {
return propStream.read<uint32_t>(lightChangeInterval);
}
return Condition::unserializeProp(attr, propStream);
}
void ConditionLight::serialize(PropWriteStream& propWriteStream)
{
Condition::serialize(propWriteStream);
// TODO: color and level could be serialized as 8-bit if we can retain backwards
// compatibility, but perhaps we should keep it like this in case they increase
// in the future...
propWriteStream.write<uint8_t>(CONDITIONATTR_LIGHTCOLOR);
propWriteStream.write<uint32_t>(lightInfo.color);
propWriteStream.write<uint8_t>(CONDITIONATTR_LIGHTLEVEL);
propWriteStream.write<uint32_t>(lightInfo.level);
propWriteStream.write<uint8_t>(CONDITIONATTR_LIGHTTICKS);
propWriteStream.write<uint32_t>(internalLightTicks);
propWriteStream.write<uint8_t>(CONDITIONATTR_LIGHTINTERVAL);
propWriteStream.write<uint32_t>(lightChangeInterval);
}
ConditionSpellCooldown::ConditionSpellCooldown(ConditionId_t _id, ConditionType_t _type, int32_t _ticks, bool _buff, uint32_t _subId) :
ConditionGeneric(_id, _type, _ticks, _buff, _subId)
{
//
}
void ConditionSpellCooldown::addCondition(Creature* creature, const Condition* addCondition)
{
if (updateCondition(addCondition)) {
setTicks(addCondition->getTicks());
if (subId != 0 && ticks > 0) {
Player* player = creature->getPlayer();
if (player) {
player->sendSpellCooldown(subId, ticks);
}
}
}
}
bool ConditionSpellCooldown::startCondition(Creature* creature)
{
if (!Condition::startCondition(creature)) {
return false;
}
if (subId != 0 && ticks > 0) {
Player* player = creature->getPlayer();
if (player) {
player->sendSpellCooldown(subId, ticks);
}
}
return true;
}
ConditionSpellGroupCooldown::ConditionSpellGroupCooldown(ConditionId_t _id, ConditionType_t _type, int32_t _ticks, bool _buff, uint32_t _subId) :
ConditionGeneric(_id, _type, _ticks, _buff, _subId)
{
//
}
void ConditionSpellGroupCooldown::addCondition(Creature* creature, const Condition* addCondition)
{
if (updateCondition(addCondition)) {
setTicks(addCondition->getTicks());
if (subId != 0 && ticks > 0) {
Player* player = creature->getPlayer();
if (player) {
player->sendSpellGroupCooldown(static_cast<SpellGroup_t>(subId), ticks);
}
}
}
}
bool ConditionSpellGroupCooldown::startCondition(Creature* creature)
{
if (!Condition::startCondition(creature)) {
return false;
}
if (subId != 0 && ticks > 0) {
Player* player = creature->getPlayer();
if (player) {
player->sendSpellGroupCooldown(static_cast<SpellGroup_t>(subId), ticks);
}
}
return true;
}
| [
"dean.vervaeck@outlook.com"
] | dean.vervaeck@outlook.com |
fd744d9cbb02a291dfcf2fca8928d439130e7d5a | c993b955f1d0e77952c53a2abfe8f582a32a802c | /ref-impl/include/OM/OMBufferedIStream.h | 01be6ec89d3e2c2c19cb47e5a895b121af554c75 | [] | no_license | christianscheuer/aaf | 6d67e767f439d6f43c3b7fba64336876bcbc0b8d | 0b76dd5bf4f70b0e7b3c33fd6d923ce6f67c71aa | refs/heads/master | 2020-05-01T03:08:19.586353 | 2019-05-01T09:34:40 | 2019-05-01T09:34:40 | 177,238,098 | 0 | 0 | null | 2019-03-23T03:12:02 | 2019-03-23T03:12:02 | null | UTF-8 | C++ | false | false | 4,247 | h | //=---------------------------------------------------------------------=
//
// $Id$ $Name$
//
// The contents of this file are subject to the AAF SDK Public Source
// License Agreement Version 2.0 (the "License"); You may not use this
// file except in compliance with the License. The License is available
// in AAFSDKPSL.TXT, or you may obtain a copy of the License from the
// Advanced Media Workflow Association, Inc., or its successor.
//
// Software distributed under the License is distributed on an "AS IS"
// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
// the License for the specific language governing rights and limitations
// under the License. Refer to Section 3.3 of the License for proper use
// of this Exhibit.
//
// WARNING: Please contact the Advanced Media Workflow Association,
// Inc., for more information about any additional licenses to
// intellectual property covering the AAF Standard that may be required
// to create and distribute AAF compliant products.
// (http://www.amwa.tv/policies).
//
// Copyright Notices:
// The Original Code of this file is Copyright 1998-2009, licensor of the
// Advanced Media Workflow Association. All rights reserved.
//
// The Initial Developer of the Original Code of this file and the
// licensor of the Advanced Media Workflow Association is
// Avid Technology.
// All rights reserved.
//
//=---------------------------------------------------------------------=
// @doc OMINTERNAL
#ifndef OMBUFFEREDISTREAM_H
#define OMBUFFEREDISTREAM_H
#ifndef OM_NO_STRUCTURED_STORAGE
#include "OMMSStructuredStorage.h"
#include "OMBufferedStream.h"
#include "OMDataTypes.h"
// @class IStream with buffering.
//
// @cauthor Tim Bingham | tjb | Avid Technology, Inc.
class OMBufferedIStream : public IStream, public OMBufferedStream {
public:
// @access Public members.
virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid,
void** ppvObject);
virtual ULONG STDMETHODCALLTYPE AddRef(void);
virtual ULONG STDMETHODCALLTYPE Release(void);
virtual HRESULT STDMETHODCALLTYPE Read(void *pv,
ULONG cb,
ULONG *pcbRead);
virtual HRESULT STDMETHODCALLTYPE Write(const void *pv,
ULONG cb,
ULONG *pcbWritten);
virtual HRESULT STDMETHODCALLTYPE Seek(LARGE_INTEGER dlibMove,
DWORD dwOrigin,
ULARGE_INTEGER *plibNewPosition);
virtual HRESULT STDMETHODCALLTYPE SetSize(ULARGE_INTEGER libNewSize);
virtual HRESULT STDMETHODCALLTYPE CopyTo(IStream *pstm,
ULARGE_INTEGER cb,
ULARGE_INTEGER *pcbRead,
ULARGE_INTEGER *pcbWritten);
virtual HRESULT STDMETHODCALLTYPE Commit(DWORD grfCommitFlags);
virtual HRESULT STDMETHODCALLTYPE Revert(void);
virtual HRESULT STDMETHODCALLTYPE LockRegion(ULARGE_INTEGER libOffset,
ULARGE_INTEGER cb,
DWORD dwLockType);
virtual HRESULT STDMETHODCALLTYPE UnlockRegion(ULARGE_INTEGER libOffset,
ULARGE_INTEGER cb,
DWORD dwLockType);
virtual HRESULT STDMETHODCALLTYPE Stat(STATSTG *pstatstg,
DWORD grfStatFlag);
virtual HRESULT STDMETHODCALLTYPE Clone(IStream **ppstm);
// @cmember Constructor.
OMBufferedIStream(IStream* stream, OMUInt32 bufferSize);
// @cmember Destructor.
virtual ~OMBufferedIStream(void);
private:
// @access Private members.
virtual void read(OMByte* bytes,
OMUInt32 byteCount,
OMUInt32& bytesRead);
virtual void write(const OMByte* bytes,
OMUInt32 byteCount,
OMUInt32& bytesWritten);
IStream* _stream;
ULONG _referenceCount;
};
#endif // !OM_NO_STRUCTURED_STORAGE
#endif // !OMBUFFEREDISTREAM_H
| [
""
] | |
d1108b287c9b1ecc14e65ef148d150102f46b0b7 | 2274aa4ef2e0069aa770d7f5f28aa3dd0c6e275b | /Binary Tree Level Order Traversal II.cpp | b38a6b839b573b82d879151eaba90a86f18e7e1e | [] | no_license | zhaoxiaohui/LeetCode | 0b68349aac6431df5f06baea9202c520cab5a01f | 13a2be605070f7d4e7f8798b8d312e91de78fd45 | refs/heads/master | 2021-01-10T01:45:55.062641 | 2016-01-25T03:51:11 | 2016-01-25T03:51:11 | 45,035,293 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,302 | cpp | /**
* Description:
* Author: zhaoxiaohui
* Site: zhaoxiaohui.sinaapp.com
* Date: 2014
*/
/**
* Definition for binary tree
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode(int x) : val(x), left(NULL), right(NULL) {}
* };
*/
class Solution {
public:
vector<vector<int> > levelOrderBottom(TreeNode *root) {
vector<vector<int> > ret;
if(!root) return ret;
queue<TreeNode *> nodes;
deque<TreeNode *> nodeslist;
nodes.push(root);
nodes.push(NULL);
nodeslist.push_back(NULL);
nodeslist.push_back(root);
TreeNode *t;
while(!nodes.empty()){
t = nodes.front();
nodes.pop();
if(!t){
if(nodes.empty() || nodes.front() == NULL)break;
nodeslist.push_front(NULL);
nodes.push(NULL);
}else{
if(t->right){
nodes.push(t->right);
nodeslist.push_front(t->right);
}
if(t->left){
nodes.push(t->left);
nodeslist.push_front(t->left);
}
}
}
vector<int> level;
while(!nodeslist.empty()){
t = nodeslist.front();
nodeslist.pop_front();
if(!t){
if(level.size() != 0){
ret.push_back(level);
level.clear();
}
}else{
level.push_back(t->val);
}
}
if(level.size() != 0)ret.push_back(level);
return ret;
}
}; | [
"fire.guy@163.com"
] | fire.guy@163.com |
764c8c01ed00d9faa826a435efcc2bf120a46d04 | 6f872bc18768df951fd53d9e6c86fa90cc028adb | /Window.cpp | f9beaa63b74adb13e2e8a3dca2bf8a1fe9cd1d0a | [
"MIT"
] | permissive | aciokler/opengl-model-viewer-mingw-vscode | c8e31dd968cb034c77d80bf31530a308e331fc1d | 71c20a30d95771b05291a9e6660c72a0a0026119 | refs/heads/master | 2022-02-09T16:16:45.612897 | 2022-01-30T02:54:05 | 2022-01-30T02:54:05 | 233,518,518 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 6,391 | cpp | //
// Window.cpp
// OpenGLOtherTest
//
// Created by Abraham-mac on 7/1/14.
// Copyright (c) 2014 Abraham-mac. All rights reserved.
//
#include "Window.h"
Window::Window( GLint width, GLint height, std::string windowTitle )
{
GLint glfwStatus = glfwInit();
if ( glfwStatus != GL_TRUE )
{
std::cout << "glfw failed! :(" << std::endl;
throw std::runtime_error("glfwInit failed");
}
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
handle = glfwCreateWindow(width, height, windowTitle.c_str(), NULL, NULL);
if (!handle)
{
std::cout << "failed to create window! :(" << std::endl;
glfwTerminate();
throw std::runtime_error("failed to create window!");
}
glfwMakeContextCurrent(handle);
gladLoadGLLoader((GLADloadproc) glfwGetProcAddress); // add GLAD init
std::cout << glGetString(GL_VERSION) << std::endl;
std::cout << glGetString(GL_VENDOR) << std::endl;
std::cout << glGetString(GL_RENDERER) << std::endl;
// disable cursor and set mouse in center view...
glfwSetInputMode(handle, GLFW_CURSOR, GLFW_CURSOR_DISABLED);
glfwSetCursorPos(handle, 0, 0);
glClearColor(0.0, 0.0, 0.0, 1.0);
glEnable(GL_DEPTH_TEST);
glEnable(GL_BLEND);
//glEnable(GL_CULL_FACE);
//glEnable(GL_BACK);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
// render_function = func_ptr;
}
GLFWwindow * Window::getHandle() const
{
return handle;
}
void Window::setScene( Scene * pScene )
{
scene = pScene;
}
void Window::runRenderLoop()
{
const float INITIAL_FOV = 45.0f;
float mouseSpeed = 400;
float horizontalAngle = 0;
float verticalAngle = 0;
float lastTime = glfwGetTime();
float deltaTime = 0;
float movementSpeed = 10000.0f;
glm::vec3 position(0.0, 2.0, -10.0);
while (!glfwWindowShouldClose(handle))
{
deltaTime = float(glfwGetTime() - lastTime);
GLint viewPortWidth, viewPortHeight;
glfwGetFramebufferSize(handle, &viewPortWidth, &viewPortHeight);
glViewport(0, 0, viewPortWidth, viewPortHeight);
// clear color and depth...
glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
// rotation calculation...
float move = 0; //sinf(glfwGetTime() * ((4*3.14) / 5) * 0); // -1<->+1 every 5 seconds
float angle = glfwGetTime() * 45 * 0; // 45° per second
glm::vec3 axis_y(0.0, 1.0, 0.0);
//glm::mat4 anim = glm::translate(glm::mat4(1.0f), glm::vec3(0.0, 0.0, 0.0)) * glm::rotate(glm::mat4(1.0f), angle, axis_y);
glm::vec3 axis_z(0, 0, 1);
glm::mat4 model = glm::translate(glm::mat4(1.0f), glm::vec3(0.0, 0.0, -4.0));
glm::mat4 anim = glm::translate(glm::mat4(1.0f), glm::vec3(move, 0.0, 0.0)) * glm::rotate(glm::mat4(1.0f), angle, axis_y);
// camera movement...
double mousePosX, mousePosY;
glfwGetCursorPos(handle, &mousePosX, &mousePosY);
horizontalAngle += mouseSpeed * deltaTime * float(viewPortWidth/2 - mousePosX );
verticalAngle += mouseSpeed * deltaTime * float( viewPortHeight/2 - mousePosY );
glm::vec3 direction(std::cos(verticalAngle) * std::sin(horizontalAngle),
std::sin(verticalAngle),
std::cos(verticalAngle) * std::cos(horizontalAngle));
glm::vec3 right = glm::vec3(sin(horizontalAngle - 3.14f/2.0f),
0,
cos(horizontalAngle - 3.14f/2.0f));
glm::vec3 up = glm::cross( right, direction );
// reset cursor...
glfwSetCursorPos(handle, viewPortWidth/2, viewPortHeight/2);
// get camera positionign with keys...
if ( glfwGetKey(handle, GLFW_KEY_W))
{
position += direction * deltaTime * movementSpeed;
}
else if ( glfwGetKey(handle, GLFW_KEY_S))
{
position -= direction * deltaTime * movementSpeed;
}
if ( glfwGetKey(handle, GLFW_KEY_A))
{
position -= right * deltaTime * movementSpeed;
}
else if ( glfwGetKey(handle, GLFW_KEY_D))
{
position += right * deltaTime * movementSpeed;
}
//glm::mat4 view = glm::lookAt(glm::vec3(0.0, 2.0, 0.0), glm::vec3(0.0, 0.0, -4.0), glm::vec3(0.0, 1.0, 0.0));
glm::mat4 view = glm::lookAt(position, position+direction, up);
//double xoffset, yoffset;
float fov = INITIAL_FOV; // - 5 * glfwSetScrollCallback(handle, &xoffset, &yoffset);
glm::mat4 projection = glm::perspective(fov, 1.0f*viewPortWidth/viewPortHeight, 0.1f, 10000.0f);
//glm::mat4 model = glm::translate(glm::mat4(1.0f), glm::vec3(0.0, 0.0, -4.0));
//glm::mat4 view = glm::lookAt(glm::vec3(0.0, 2.0, 0.0), glm::vec3(0.0, 0.0, -4.0), glm::vec3(0.0, 1.0, 0.0));
//glm::mat4 projection = glm::perspective(45.0f, 1.0f*viewPortWidth/viewPortHeight, 0.1f, 10.0f);
glm::mat4 m_transform = projection * view * model * anim;
std::vector<Shape*> objects = scene->getObjects();
for ( std::vector<Shape*>::iterator it = objects.begin(); it != objects.end(); it++ )
{
(*it)->draw( m_transform );
}
//printf("after the thing\n");
glfwPollEvents();
glfwSwapBuffers(handle);
lastTime = glfwGetTime();
//exit program if escape key is pressed
if(glfwGetKey(handle, GLFW_KEY_ESCAPE))
glfwSetWindowShouldClose(handle, GL_TRUE);
// if ( glGetError() != GL_NO_ERROR )
// {
// printf( "10 error?: %d - %d\n", glGetError(), GL_NO_ERROR );
// }
//
// if ( glGetError() == GL_INVALID_OPERATION )
// {
// printf("invalid operation!\n");
// }
// else if ( glGetError() != GL_NO_ERROR )
// {
// printf( "some other eroor occured: %d", glGetError() );
// }
}
} | [
"aciokler007@yahoo.com"
] | aciokler007@yahoo.com |
b4584988777bc4ed4f3ad441a41c21c441795340 | 1b38af12a5cc0493efc96d791e0b0ea5cb98389b | /KindVision3D/src/KPoint3D.cpp | b216d6dcc8570b9ded7e43bd1bdc002b553f9951 | [] | no_license | shenyczz/KLibrary | efce0689d496f2097d00da7faf46fb73f5102eb7 | 98eab1108f650253d243795222044989432c4d0e | refs/heads/master | 2022-12-14T10:05:58.636127 | 2020-09-18T02:05:17 | 2020-09-18T02:05:17 | 296,487,674 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 354 | cpp | #include "StdAfx.h"
#include "KPoint3D.h"
namespace Vision3D
{
KPoint3D::KPoint3D(void)
{
X = 0;
Y = 0;
Z = 0;
}
KPoint3D::KPoint3D(const KPoint3D& rhs)
{
X = rhs.X;
Y = rhs.Y;
Z = rhs.Z;
}
KPoint3D::KPoint3D(double x, double y, double z)
{
X = x;
Y = y;
Z = z;
}
KPoint3D::~KPoint3D(void)
{
}
}// namespace Vision3D
| [
"shenyczz@163.com"
] | shenyczz@163.com |
5d881f493118e078017fa86b54008e25d6358821 | 76b1001c962aae8dadfd44ee9a1f0a32eb6391c6 | /lab03/task1.ino | 0960de8133fea4ebcc67f93f8225e18182d070bc | [] | no_license | Shawonskh/Robotics | 9c2fbfad4f699e923724aff36f98d322b9591b38 | 75a0e97cbfe0a86719492f08f6f98fad22f07493 | refs/heads/main | 2023-01-24T14:57:31.432155 | 2020-11-05T22:34:31 | 2020-11-05T22:34:31 | 310,401,480 | 1 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 168 | ino | void setup() {
Serial.begin(9600);
Serial.println("Hello!");
Serial.println("Please enter a number and press ENTER.");
}
void loop() {
// YOUR CODE GOES HERE
} | [
"noreply@github.com"
] | noreply@github.com |
5463af6b007f43c8d441b8b81d996b81aeba0c84 | 2c15a21c15a184e99d1735f2ddc16d7dad2bd314 | /src/GameChipRemover.h | af22739d2a4a91819833c41b8135d2aee21e3f10 | [] | no_license | vitaliyshlyahovchuk/4-Elements-Test | 793142efeea907c08ea4e1c5c897ca71d035a0f5 | 9c86e640c17d3357ec80eea164c463cd62ddb696 | refs/heads/master | 2020-04-09T07:32:30.382959 | 2014-08-17T12:33:19 | 2014-08-17T12:33:19 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,491 | h | #ifndef _GAME_CHIP_REMOVER_H_
#define _GAME_CHIP_REMOVER_H_
#include "GameFieldController.h"
#include "GameFieldAddress.h"
namespace Game {
// Риcует иcчезающую фишку
// (фишка в том, что иcчезающая фишка не риcуетcя вмеcте c оcтальными фишками
// и ее нужно отриcовывать отдельно)
class ChipRemover
: public GameFieldController
{
FPoint _pos;
FRect _uv;
enum CRState
{
CR_DELAY,
CR_STAY,
CR_HIDE,
CR_FINISH,
}_state;
float _timeState;
public:
ChipRemover(FPoint pos, int color, float pause);
void Update(float dt);
virtual bool isFinish();
virtual void Draw();
};
class ChipRemoverByBonus
: public GameFieldController
{
FPoint _pos;
FRect _uv;
enum CRState
{
CR_DELAY,
CR_STAY,
CR_HIDE,
CR_FINISH,
}_state;
float _timeState;
public:
ChipRemoverByBonus(FPoint pos, int color, float pause);
void Update(float dt);
virtual bool isFinish();
virtual void Draw();
};
// Рисует фишку, летящую к замку/приемнику с заказом
class ChipOrderRemover
: public GameFieldController
{
SplinePath<FPoint> _path;
FRect _uv;
Game::FieldAddress _square;
int _color;
public:
ChipOrderRemover(FPoint pos, FPoint to, int color, Game::FieldAddress square);
void Update(float dt);
bool isFinish();
void Draw();
};
} // namespace Game
#endif //_GAME_CHIP_REMOVER_H_ | [
"renatsh@playrix.com"
] | renatsh@playrix.com |
28cb713094a65f79e753115b691a41140638df4c | 786cea57a8b0c0a1f1766844e4e6fca6236972fa | /_Assignment 2019/Assignment_1 StudentNo_45562660/Q2/companylst.h | e711e6c725acc4a4002d606616c998379a5ada2a | [] | no_license | Rhdr/C_UNISA | 6a55f83b2ddf5b8716d2681e45c829dfb8278d8b | 52f13c1d8dc48636484e10b0449160c767091402 | refs/heads/master | 2023-08-22T09:23:26.195354 | 2021-09-17T20:47:46 | 2021-09-17T20:47:46 | 407,675,223 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 722 | h | #ifndef COMPANYLST_H
#define COMPANYLST_H
#include <QObject>
#include <QList>
#include <QMetaObject>
#include <QDebug>
#include "company.h"
class CompanyLst : public QObject
{
Q_OBJECT
Q_PROPERTY(QList<Company*> companyProfitLst READ getCompanyProfitLst)
Q_PROPERTY(QList<Company*> companyNonProfitLst READ getCompanyNonProfitLst)
public:
explicit CompanyLst(QObject *parent = 0);
~CompanyLst();
bool append(Company *company);
bool remove(bool isNPO, QString toString);
QList<Company *> getCompanyProfitLst() const;
QList<Company *> getCompanyNonProfitLst() const;
private:
QList<Company *> companyProfitLst;
QList<Company *> companyNonProfitLst;
};
#endif // COMPANYLST_H
| [
"rhdr0011@gmail.com"
] | rhdr0011@gmail.com |
087405a8329473e4b59b3b356a4f793dadac69b0 | d93324fbe00a7d01383e4c2d05dc4eb75637513a | /src/test/unit/lang/generator/generate_quoted_test.cpp | f8986dc99a44521624357183bdfad6bdc7095fb3 | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference",
"GPL-3.0-only"
] | permissive | drezap/stan | 534cd43eb8410e2ce2c665b13c53e8b49f51fdc5 | 9b319ed125e2a7d14d0c9c246d2f462dad668537 | refs/heads/develop | 2020-03-26T08:00:12.094035 | 2019-03-13T20:49:39 | 2019-03-13T20:49:39 | 144,681,530 | 0 | 0 | BSD-3-Clause | 2019-03-13T20:49:41 | 2018-08-14T06:59:47 | R | UTF-8 | C++ | false | false | 2,151 | cpp | #include <stan/lang/generator.hpp>
#include <test/unit/lang/utility.hpp>
#include <gtest/gtest.h>
#include <sstream>
void test_generate_quoted_string(const std::string& s,
const std::string& quoted_s) {
std::stringstream ss;
stan::lang::generate_quoted_string(s, ss);
EXPECT_EQ(quoted_s, ss.str());
}
void test_generate_quoted_string_quote(const std::string& s,
const std::string& expected_output_content) {
std::stringstream ss;
stan::lang::generate_quoted_string(s,ss);
std::string s_rendered = ss.str();
EXPECT_EQ("\"" + expected_output_content + "\"", ss.str());
}
void test_generate_quoted_expression(const stan::lang::expression& e,
const std::string& e_exp) {
std::stringstream ss;
stan::lang::generate_quoted_expression(e, ss);
EXPECT_EQ(e_exp, ss.str());
}
TEST(langGenerator, quotedString) {
test_generate_quoted_string_quote("","");
test_generate_quoted_string_quote("abc", "abc");
test_generate_quoted_string_quote("abc'def", "abc\\'def");
test_generate_quoted_string_quote("\"abc", "\\\"abc");
test_generate_quoted_string_quote("abc\"", "abc\\\"");
test_generate_quoted_string_quote("abc\"def", "abc\\\"def");
test_generate_quoted_string_quote("abc\"def\"ghi", "abc\\\"def\\\"ghi");
}
TEST(lang,printStringLiteral) {
test_generate_quoted_string("", "\"\"");
test_generate_quoted_string("\\d\\", "\"\\\\d\\\\\"");
test_generate_quoted_string("ab\"c", "\"ab\\\"c\"");
test_generate_quoted_string("'hey,' he said.","\"\\'hey,\\' he said.\"");
}
TEST(lang,printQuotedExpression) {
using stan::lang::expression;
using stan::lang::index_op;
using stan::lang::int_literal;
using stan::lang::variable;
using std::vector;
test_generate_quoted_expression(int_literal(1), "\"1\"");
vector<expression> args;
expression expr(variable("foo"));
vector<vector<expression> > dimss;
vector<expression> dim;
dim.push_back(int_literal(1));
dimss.push_back(dim);
std::string s_exp = "\"get_base1(foo,1,\\\"foo\\\",1)\"";
test_generate_quoted_expression(index_op(expr,dimss), s_exp);
}
| [
"mitzi@panix.com"
] | mitzi@panix.com |
62f2dae14319908ab69caeaf5baa601bf31523a4 | a6ac70e65f2bbf876e08f2de48fd95cf076ba434 | /ash/login/ui/lock_debug_view.cc | 5b89fce05a01fb7497c9d6e65273fde3427f1ce5 | [
"BSD-3-Clause"
] | permissive | deter2003/chromium | 6f456a44794ea31fc330468c59770e95158fa4f8 | 6048aabe0b5a5f1515bcc88a2aff19ce8ccaa5b5 | refs/heads/master | 2023-01-08T18:57:26.397662 | 2018-08-08T05:45:21 | 2018-08-08T05:45:21 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 41,034 | cc | // Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ash/login/ui/lock_debug_view.h"
#include <algorithm>
#include <map>
#include <memory>
#include <utility>
#include "ash/detachable_base/detachable_base_pairing_status.h"
#include "ash/ime/ime_controller.h"
#include "ash/login/login_screen_controller.h"
#include "ash/login/ui/lock_contents_view.h"
#include "ash/login/ui/lock_screen.h"
#include "ash/login/ui/login_data_dispatcher.h"
#include "ash/login/ui/login_detachable_base_model.h"
#include "ash/login/ui/non_accessible_view.h"
#include "ash/login/ui/views_utils.h"
#include "ash/public/interfaces/kiosk_app_info.mojom.h"
#include "ash/shelf/login_shelf_view.h"
#include "ash/shelf/shelf.h"
#include "ash/shelf/shelf_widget.h"
#include "ash/shell.h"
#include "base/optional.h"
#include "base/strings/utf_string_conversions.h"
#include "ui/base/ime/chromeos/ime_keyboard.h"
#include "ui/views/controls/button/md_text_button.h"
#include "ui/views/controls/scroll_view.h"
#include "ui/views/controls/scrollbar/overlay_scroll_bar.h"
#include "ui/views/layout/box_layout.h"
#include "ui/views/view.h"
namespace ash {
namespace {
namespace ButtonId {
enum {
kGlobalAddUser = 1,
kGlobalRemoveUser,
kGlobalToggleBlur,
kGlobalToggleNoteAction,
kGlobalToggleCapsLock,
kGlobalAddDevChannelInfo,
kGlobalToggleAuth,
kGlobalAddKioskApp,
kGlobalRemoveKioskApp,
kGlobalToggleDebugDetachableBase,
kGlobalCycleDetachableBaseStatus,
kGlobalCycleDetachableBaseId,
kGlobalCycleAuthErrorMessage,
kGlobalToggleWarningBanner,
kPerUserTogglePin,
kPerUserToggleTap,
kPerUserCycleEasyUnlockState,
kPerUserCycleFingerprintState,
kPerUserForceOnlineSignIn,
kPerUserToggleAuthEnabled,
kPerUserUseDetachableBase,
kPerUserTogglePublicAccount,
};
} // namespace ButtonId
constexpr const char* kDebugUserNames[] = {
"Angelina Johnson", "Marcus Cohen", "Chris Wallace",
"Debbie Craig", "Stella Wong", "Stephanie Wade",
};
constexpr const char* kDebugPublicAccountNames[] = {
"Seattle Public Library", "San Jose Public Library",
"Sunnyvale Public Library", "Mountain View Public Library",
};
constexpr const char* kDebugDetachableBases[] = {"Base A", "Base B", "Base C"};
constexpr const char kDebugOsVersion[] =
"Chromium 64.0.3279.0 (Platform 10146.0.0 dev-channel peppy test)";
constexpr const char kDebugEnterpriseInfo[] = "Asset ID: 1111";
constexpr const char kDebugBluetoothName[] = "Bluetooth adapter";
constexpr const char kDebugKioskAppId[] = "asdf1234";
constexpr const char kDebugKioskAppName[] = "Test App Name";
constexpr const char kDebugDefaultLocaleCode[] = "en-GB";
constexpr const char kDebugDefaultLocaleTitle[] = "English";
constexpr const char kDebugEnterpriseDomain[] = "library.com";
// Additional state for a user that the debug UI needs to reference.
struct UserMetadata {
explicit UserMetadata(const mojom::UserInfoPtr& user_info)
: account_id(user_info->account_id),
display_name(user_info->display_name),
type(user_info->type) {}
AccountId account_id;
std::string display_name;
bool enable_pin = false;
bool enable_tap_to_unlock = false;
bool enable_auth = true;
user_manager::UserType type = user_manager::USER_TYPE_REGULAR;
mojom::EasyUnlockIconId easy_unlock_id = mojom::EasyUnlockIconId::NONE;
mojom::FingerprintUnlockState fingerprint_state =
mojom::FingerprintUnlockState::UNAVAILABLE;
};
std::string DetachableBasePairingStatusToString(
DetachableBasePairingStatus pairing_status) {
switch (pairing_status) {
case DetachableBasePairingStatus::kNone:
return "No device";
case DetachableBasePairingStatus::kAuthenticated:
return "Authenticated";
case DetachableBasePairingStatus::kNotAuthenticated:
return "Not authenticated";
case DetachableBasePairingStatus::kInvalidDevice:
return "Invalid device";
}
return "Unknown";
}
// Update the user data based on |type| and |user_index|.
mojom::LoginUserInfoPtr PopulateUserData(const mojom::LoginUserInfoPtr& user,
user_manager::UserType type,
int user_index) {
mojom::LoginUserInfoPtr result = user->Clone();
result->basic_user_info->type = type;
bool is_public_account = type == user_manager::USER_TYPE_PUBLIC_ACCOUNT;
// Set debug user names and email. Useful for the stub user, which does not
// have a name and email set.
result->basic_user_info->display_name =
is_public_account
? kDebugPublicAccountNames[user_index %
base::size(kDebugPublicAccountNames)]
: kDebugUserNames[user_index % base::size(kDebugUserNames)];
result->basic_user_info->display_email =
result->basic_user_info->account_id.GetUserEmail();
if (is_public_account) {
result->public_account_info = ash::mojom::PublicAccountInfo::New();
result->public_account_info->enterprise_domain = kDebugEnterpriseDomain;
result->public_account_info->default_locale = kDebugDefaultLocaleCode;
std::vector<ash::mojom::LocaleItemPtr> locales;
mojom::LocaleItemPtr locale_item = ash::mojom::LocaleItem::New();
locale_item->language_code = kDebugDefaultLocaleCode;
locale_item->title = kDebugDefaultLocaleTitle;
locales.push_back(std::move(locale_item));
result->public_account_info->available_locales = std::move(locales);
// Request keyboard layouts for the default locale.
Shell::Get()
->login_screen_controller()
->RequestPublicSessionKeyboardLayouts(
result->basic_user_info->account_id, kDebugDefaultLocaleCode);
} else {
result->public_account_info.reset();
}
return result;
}
} // namespace
// Applies a series of user-defined transformations to a |LoginDataDispatcher|
// instance; this is used for debugging and development. The debug overlay uses
// this class to change what data is exposed to the UI.
class LockDebugView::DebugDataDispatcherTransformer
: public LoginDataDispatcher::Observer {
public:
DebugDataDispatcherTransformer(
mojom::TrayActionState initial_lock_screen_note_state,
LoginDataDispatcher* dispatcher,
const base::RepeatingClosure& on_users_received)
: root_dispatcher_(dispatcher),
lock_screen_note_state_(initial_lock_screen_note_state),
on_users_received_(on_users_received) {
root_dispatcher_->AddObserver(this);
}
~DebugDataDispatcherTransformer() override {
root_dispatcher_->RemoveObserver(this);
}
LoginDataDispatcher* debug_dispatcher() { return &debug_dispatcher_; }
// Changes the number of displayed users to |count|.
void SetUserCount(int count) { NotifyUsers(BuildUserList(count)); }
// Create user list.
std::vector<mojom::LoginUserInfoPtr> BuildUserList(int count) {
DCHECK(!root_users_.empty());
count = std::max(count, 0);
// Trim any extra debug users.
if (debug_users_.size() > size_t{count})
debug_users_.erase(debug_users_.begin() + count, debug_users_.end());
// Build |users|, add any new users to |debug_users|.
std::vector<mojom::LoginUserInfoPtr> users;
for (size_t i = 0; i < size_t{count}; ++i) {
users.push_back(root_users_[i % root_users_.size()]->Clone());
if (i >= root_users_.size()) {
users[i]->basic_user_info->account_id = AccountId::FromUserEmailGaiaId(
users[i]->basic_user_info->account_id.GetUserEmail() +
std::to_string(i),
users[i]->basic_user_info->account_id.GetGaiaId() +
std::to_string(i));
}
// Setup user data based on the user type in debug_users_.
user_manager::UserType type = (i < debug_users_.size())
? debug_users_[i].type
: users[i]->basic_user_info->type;
users[i] = PopulateUserData(users[i], type, i);
if (i >= debug_users_.size())
debug_users_.push_back(UserMetadata(users[i]->basic_user_info));
}
return users;
}
void NotifyUsers(std::vector<mojom::LoginUserInfoPtr> users) {
// User notification resets PIN state.
for (UserMetadata& user : debug_users_)
user.enable_pin = false;
debug_dispatcher_.NotifyUsers(users);
}
int GetUserCount() const { return debug_users_.size(); }
base::string16 GetDisplayNameForUserIndex(size_t user_index) {
DCHECK(user_index >= 0 && user_index < debug_users_.size());
return base::UTF8ToUTF16(debug_users_[user_index].display_name);
}
const AccountId& GetAccountIdForUserIndex(size_t user_index) {
DCHECK(user_index >= 0 && user_index < debug_users_.size());
UserMetadata* debug_user = &debug_users_[user_index];
return debug_user->account_id;
}
// Activates or deactivates PIN for the user at |user_index|.
void TogglePinStateForUserIndex(size_t user_index) {
DCHECK(user_index >= 0 && user_index < debug_users_.size());
UserMetadata* debug_user = &debug_users_[user_index];
debug_user->enable_pin = !debug_user->enable_pin;
debug_dispatcher_.SetPinEnabledForUser(debug_user->account_id,
debug_user->enable_pin);
}
// Activates or deactivates tap unlock for the user at |user_index|.
void ToggleTapStateForUserIndex(size_t user_index) {
DCHECK(user_index >= 0 && user_index < debug_users_.size());
UserMetadata* debug_user = &debug_users_[user_index];
debug_user->enable_tap_to_unlock = !debug_user->enable_tap_to_unlock;
debug_dispatcher_.SetTapToUnlockEnabledForUser(
debug_user->account_id, debug_user->enable_tap_to_unlock);
}
// Enables click to auth for the user at |user_index|.
void CycleEasyUnlockForUserIndex(size_t user_index) {
DCHECK(user_index >= 0 && user_index < debug_users_.size());
UserMetadata* debug_user = &debug_users_[user_index];
// EasyUnlockIconId state transition.
auto get_next_id = [](mojom::EasyUnlockIconId id) {
switch (id) {
case mojom::EasyUnlockIconId::NONE:
return mojom::EasyUnlockIconId::SPINNER;
case mojom::EasyUnlockIconId::SPINNER:
return mojom::EasyUnlockIconId::LOCKED;
case mojom::EasyUnlockIconId::LOCKED:
return mojom::EasyUnlockIconId::LOCKED_TO_BE_ACTIVATED;
case mojom::EasyUnlockIconId::LOCKED_TO_BE_ACTIVATED:
return mojom::EasyUnlockIconId::LOCKED_WITH_PROXIMITY_HINT;
case mojom::EasyUnlockIconId::LOCKED_WITH_PROXIMITY_HINT:
return mojom::EasyUnlockIconId::HARDLOCKED;
case mojom::EasyUnlockIconId::HARDLOCKED:
return mojom::EasyUnlockIconId::UNLOCKED;
case mojom::EasyUnlockIconId::UNLOCKED:
return mojom::EasyUnlockIconId::NONE;
}
return mojom::EasyUnlockIconId::NONE;
};
debug_user->easy_unlock_id = get_next_id(debug_user->easy_unlock_id);
// Enable/disable click to unlock.
debug_user->enable_tap_to_unlock =
debug_user->easy_unlock_id == mojom::EasyUnlockIconId::UNLOCKED;
// Prepare icon that we will show.
auto icon = mojom::EasyUnlockIconOptions::New();
icon->icon = debug_user->easy_unlock_id;
if (icon->icon == mojom::EasyUnlockIconId::SPINNER) {
icon->aria_label = base::ASCIIToUTF16("Icon is spinning");
} else if (icon->icon == mojom::EasyUnlockIconId::LOCKED ||
icon->icon == mojom::EasyUnlockIconId::LOCKED_TO_BE_ACTIVATED) {
icon->autoshow_tooltip = true;
icon->tooltip = base::ASCIIToUTF16(
"This is a long message to trigger overflow. This should show up "
"automatically. icon_id=" +
std::to_string(static_cast<int>(icon->icon)));
} else {
icon->tooltip =
base::ASCIIToUTF16("This should not show up automatically.");
}
// Show icon and enable/disable click to unlock.
debug_dispatcher_.ShowEasyUnlockIcon(debug_user->account_id, icon);
debug_dispatcher_.SetTapToUnlockEnabledForUser(
debug_user->account_id, debug_user->enable_tap_to_unlock);
}
// Enables fingerprint auth for the user at |user_index|.
void CycleFingerprintUnlockForUserIndex(size_t user_index) {
DCHECK(user_index >= 0 && user_index < debug_users_.size());
UserMetadata* debug_user = &debug_users_[user_index];
// FingerprintUnlockState transition.
auto get_next_state = [](mojom::FingerprintUnlockState state) {
switch (state) {
case mojom::FingerprintUnlockState::UNAVAILABLE:
return mojom::FingerprintUnlockState::AVAILABLE;
case mojom::FingerprintUnlockState::AVAILABLE:
return mojom::FingerprintUnlockState::AUTH_SUCCESS;
case mojom::FingerprintUnlockState::AUTH_SUCCESS:
return mojom::FingerprintUnlockState::AUTH_FAILED;
case mojom::FingerprintUnlockState::AUTH_FAILED:
return mojom::FingerprintUnlockState::AUTH_DISABLED;
case mojom::FingerprintUnlockState::AUTH_DISABLED:
return mojom::FingerprintUnlockState::UNAVAILABLE;
}
};
debug_user->fingerprint_state =
get_next_state(debug_user->fingerprint_state);
debug_dispatcher_.SetFingerprintUnlockState(debug_user->account_id,
debug_user->fingerprint_state);
}
// Force online sign-in for the user at |user_index|.
void ForceOnlineSignInForUserIndex(size_t user_index) {
DCHECK(user_index >= 0 && user_index < debug_users_.size());
debug_dispatcher_.SetForceOnlineSignInForUser(
debug_users_[user_index].account_id);
}
// Toggle the unlock allowed state for the user at |user_index|.
void ToggleAuthEnabledForUserIndex(size_t user_index) {
DCHECK(user_index >= 0 && user_index < debug_users_.size());
UserMetadata& user = debug_users_[user_index];
user.enable_auth = !user.enable_auth;
debug_dispatcher_.SetAuthEnabledForUser(
user.account_id, user.enable_auth,
base::Time::Now() + base::TimeDelta::FromHours(user_index) +
base::TimeDelta::FromHours(8));
}
// Convert user type to regular user or public account for the user at
// |user_index|.
void TogglePublicAccountForUserIndex(size_t user_index) {
DCHECK(user_index >= 0 && user_index < debug_users_.size());
UserMetadata& user = debug_users_[user_index];
// Swap the type between regular and public account.
user.type = user.type == user_manager::USER_TYPE_REGULAR
? user_manager::USER_TYPE_PUBLIC_ACCOUNT
: user_manager::USER_TYPE_REGULAR;
std::vector<mojom::LoginUserInfoPtr> users =
BuildUserList(debug_users_.size());
// Update display name and email in debug users.
debug_users_[user_index] = UserMetadata(users[user_index]->basic_user_info);
NotifyUsers(std::move(users));
}
void ToggleLockScreenNoteButton() {
if (lock_screen_note_state_ == mojom::TrayActionState::kAvailable) {
lock_screen_note_state_ = mojom::TrayActionState::kNotAvailable;
} else {
lock_screen_note_state_ = mojom::TrayActionState::kAvailable;
}
debug_dispatcher_.SetLockScreenNoteState(lock_screen_note_state_);
}
void AddKioskApp(ShelfWidget* shelf_widget) {
mojom::KioskAppInfoPtr app_info = mojom::KioskAppInfo::New();
app_info->identifier = mojom::KioskAppIdentifier::New();
app_info->identifier->set_app_id(kDebugKioskAppId);
app_info->name = base::UTF8ToUTF16(kDebugKioskAppName);
kiosk_apps_.push_back(std::move(app_info));
shelf_widget->login_shelf_view()->SetKioskApps(mojo::Clone(kiosk_apps_));
}
void RemoveKioskApp(ShelfWidget* shelf_widget) {
if (kiosk_apps_.empty())
return;
kiosk_apps_.pop_back();
shelf_widget->login_shelf_view()->SetKioskApps(mojo::Clone(kiosk_apps_));
}
void AddLockScreenDevChannelInfo(const std::string& os_version,
const std::string& enterprise_info,
const std::string& bluetooth_name) {
debug_dispatcher_.SetDevChannelInfo(os_version, enterprise_info,
bluetooth_name);
}
void ShowWarningBanner(const base::string16& message) {
debug_dispatcher_.ShowWarningBanner(message);
}
void HideWarningBanner() { debug_dispatcher_.HideWarningBanner(); }
// LoginDataDispatcher::Observer:
void OnUsersChanged(
const std::vector<mojom::LoginUserInfoPtr>& users) override {
// Update root_users_ to new source data.
root_users_.clear();
for (auto& user : users)
root_users_.push_back(user->Clone());
// Rebuild debug users using new source data.
SetUserCount(root_users_.size());
on_users_received_.Run();
}
void OnPinEnabledForUserChanged(const AccountId& user,
bool enabled) override {
// Forward notification only if the user is currently being shown.
for (size_t i = 0u; i < debug_users_.size(); ++i) {
if (debug_users_[i].account_id == user) {
debug_users_[i].enable_pin = enabled;
debug_dispatcher_.SetPinEnabledForUser(user, enabled);
break;
}
}
}
void OnTapToUnlockEnabledForUserChanged(const AccountId& user,
bool enabled) override {
// Forward notification only if the user is currently being shown.
for (size_t i = 0u; i < debug_users_.size(); ++i) {
if (debug_users_[i].account_id == user) {
debug_users_[i].enable_tap_to_unlock = enabled;
debug_dispatcher_.SetTapToUnlockEnabledForUser(user, enabled);
break;
}
}
}
void OnLockScreenNoteStateChanged(mojom::TrayActionState state) override {
lock_screen_note_state_ = state;
debug_dispatcher_.SetLockScreenNoteState(state);
}
void OnShowEasyUnlockIcon(
const AccountId& user,
const mojom::EasyUnlockIconOptionsPtr& icon) override {
debug_dispatcher_.ShowEasyUnlockIcon(user, icon);
}
void OnDetachableBasePairingStatusChanged(
DetachableBasePairingStatus pairing_status) override {
debug_dispatcher_.SetDetachableBasePairingStatus(pairing_status);
}
void OnPublicSessionKeyboardLayoutsChanged(
const AccountId& account_id,
const std::string& locale,
const std::vector<mojom::InputMethodItemPtr>& keyboard_layouts) override {
debug_dispatcher_.SetPublicSessionKeyboardLayouts(account_id, locale,
keyboard_layouts);
}
private:
// The debug overlay UI takes ground-truth data from |root_dispatcher_|,
// applies a series of transformations to it, and exposes it to the UI via
// |debug_dispatcher_|.
LoginDataDispatcher* root_dispatcher_; // Unowned.
LoginDataDispatcher debug_dispatcher_;
// Original set of users from |root_dispatcher_|.
std::vector<mojom::LoginUserInfoPtr> root_users_;
// Metadata for users that the UI is displaying.
std::vector<UserMetadata> debug_users_;
// The current lock screen note action state.
mojom::TrayActionState lock_screen_note_state_;
// List of kiosk apps loaded.
std::vector<mojom::KioskAppInfoPtr> kiosk_apps_;
// Called when a new user list has been received.
base::RepeatingClosure on_users_received_;
DISALLOW_COPY_AND_ASSIGN(DebugDataDispatcherTransformer);
};
// In-memory wrapper around LoginDetachableBaseModel used by lock UI.
// It provides, methods to override the detachable base pairing state seen by
// the UI.
class LockDebugView::DebugLoginDetachableBaseModel
: public LoginDetachableBaseModel {
public:
static constexpr int kNullBaseId = -1;
explicit DebugLoginDetachableBaseModel(LoginDataDispatcher* data_dispatcher)
: data_dispatcher_(data_dispatcher) {}
~DebugLoginDetachableBaseModel() override = default;
bool debugging_pairing_state() const { return pairing_status_.has_value(); }
// Calculates the pairing status to which the model should be changed when
// button for cycling detachable base pairing statuses is clicked.
DetachableBasePairingStatus NextPairingStatus() const {
if (!pairing_status_.has_value())
return DetachableBasePairingStatus::kNone;
switch (*pairing_status_) {
case DetachableBasePairingStatus::kNone:
return DetachableBasePairingStatus::kAuthenticated;
case DetachableBasePairingStatus::kAuthenticated:
return DetachableBasePairingStatus::kNotAuthenticated;
case DetachableBasePairingStatus::kNotAuthenticated:
return DetachableBasePairingStatus::kInvalidDevice;
case DetachableBasePairingStatus::kInvalidDevice:
return DetachableBasePairingStatus::kNone;
}
return DetachableBasePairingStatus::kNone;
}
// Calculates the debugging detachable base ID that should become the paired
// base in the model when the button for cycling paired bases is clicked.
int NextBaseId() const {
return (base_id_ + 1) % arraysize(kDebugDetachableBases);
}
// Gets the descripting text for currently paired base, if any.
std::string BaseButtonText() const {
if (base_id_ < 0)
return "No base";
return kDebugDetachableBases[base_id_];
}
// Sets the model's pairing state - base pairing status, and the currently
// paired base ID. ID should be an index in |kDebugDetachableBases| array, and
// it should be set if pairing status is kAuthenticated. The base ID is
// ignored if pairing state is different than kAuthenticated.
void SetPairingState(DetachableBasePairingStatus pairing_status,
int base_id) {
pairing_status_ = pairing_status;
if (pairing_status == DetachableBasePairingStatus::kAuthenticated) {
CHECK_GE(base_id, 0);
CHECK_LT(base_id, static_cast<int>(arraysize(kDebugDetachableBases)));
base_id_ = base_id;
} else {
base_id_ = kNullBaseId;
}
data_dispatcher_->SetDetachableBasePairingStatus(pairing_status);
}
// Marks the paired base (as seen by the model) as the user's last used base.
// No-op if the current pairing status is different than kAuthenticated.
void SetBaseLastUsedForUser(const AccountId& account_id) {
if (GetPairingStatus() != DetachableBasePairingStatus::kAuthenticated)
return;
DCHECK_GE(base_id_, 0);
last_used_bases_[account_id] = base_id_;
data_dispatcher_->SetDetachableBasePairingStatus(*pairing_status_);
}
// Clears all in-memory pairing state.
void ClearDebugPairingState() {
pairing_status_ = base::nullopt;
base_id_ = kNullBaseId;
last_used_bases_.clear();
data_dispatcher_->SetDetachableBasePairingStatus(
DetachableBasePairingStatus::kNone);
}
// LoginDetachableBaseModel:
DetachableBasePairingStatus GetPairingStatus() override {
if (!pairing_status_.has_value())
return DetachableBasePairingStatus::kNone;
return *pairing_status_;
}
bool PairedBaseMatchesLastUsedByUser(
const mojom::UserInfo& user_info) override {
if (GetPairingStatus() != DetachableBasePairingStatus::kAuthenticated)
return false;
if (last_used_bases_.count(user_info.account_id) == 0)
return true;
return last_used_bases_[user_info.account_id] == base_id_;
}
bool SetPairedBaseAsLastUsedByUser(
const mojom::UserInfo& user_info) override {
if (GetPairingStatus() != DetachableBasePairingStatus::kAuthenticated)
return false;
last_used_bases_[user_info.account_id] = base_id_;
return true;
}
private:
LoginDataDispatcher* data_dispatcher_;
// In-memory detachable base pairing state.
base::Optional<DetachableBasePairingStatus> pairing_status_;
int base_id_ = kNullBaseId;
// Maps user account to the last used detachable base ID (base ID being the
// base's index in kDebugDetachableBases array).
std::map<AccountId, int> last_used_bases_;
DISALLOW_COPY_AND_ASSIGN(DebugLoginDetachableBaseModel);
};
LockDebugView::LockDebugView(mojom::TrayActionState initial_note_action_state,
LockScreen::ScreenType screen_type,
LoginDataDispatcher* data_dispatcher)
: debug_data_dispatcher_(std::make_unique<DebugDataDispatcherTransformer>(
initial_note_action_state,
data_dispatcher,
base::BindRepeating(
&LockDebugView::UpdatePerUserActionContainerAndLayout,
base::Unretained(this)))),
next_auth_error_type_(AuthErrorType::kFirstUnlockFailed) {
SetLayoutManager(
std::make_unique<views::BoxLayout>(views::BoxLayout::kHorizontal));
auto debug_detachable_base_model =
std::make_unique<DebugLoginDetachableBaseModel>(data_dispatcher);
debug_detachable_base_model_ = debug_detachable_base_model.get();
lock_ = new LockContentsView(initial_note_action_state, screen_type,
debug_data_dispatcher_->debug_dispatcher(),
std::move(debug_detachable_base_model));
AddChildView(lock_);
container_ = new NonAccessibleView();
container_->SetLayoutManager(
std::make_unique<views::BoxLayout>(views::BoxLayout::kVertical));
AddChildView(container_);
auto* margin = new NonAccessibleView();
margin->SetPreferredSize(gfx::Size(10, 10));
container_->AddChildView(margin);
global_action_view_container_ = new NonAccessibleView();
global_action_view_container_->SetLayoutManager(
std::make_unique<views::BoxLayout>(views::BoxLayout::kVertical));
auto add_horizontal_container = [&]() {
auto* container = new NonAccessibleView();
container->SetLayoutManager(
std::make_unique<views::BoxLayout>(views::BoxLayout::kHorizontal));
global_action_view_container_->AddChildView(container);
return container;
};
auto* change_users_container = add_horizontal_container();
AddButton("Add user", ButtonId::kGlobalAddUser, change_users_container);
AddButton("Remove user", ButtonId::kGlobalRemoveUser, change_users_container);
auto* toggle_container = add_horizontal_container();
AddButton("Blur", ButtonId::kGlobalToggleBlur, toggle_container);
AddButton("Toggle note action", ButtonId::kGlobalToggleNoteAction,
toggle_container);
AddButton("Toggle caps lock", ButtonId::kGlobalToggleCapsLock,
toggle_container);
AddButton("Add dev channel info", ButtonId::kGlobalAddDevChannelInfo,
toggle_container);
global_action_toggle_auth_ = AddButton(
"Auth (allowed)", ButtonId::kGlobalToggleAuth, toggle_container);
AddButton("Cycle auth error", ButtonId::kGlobalCycleAuthErrorMessage,
toggle_container);
AddButton("Toggle warning banner", ButtonId::kGlobalToggleWarningBanner,
toggle_container);
auto* kiosk_container = add_horizontal_container();
AddButton("Add kiosk app", ButtonId::kGlobalAddKioskApp, kiosk_container);
AddButton("Remove kiosk app", ButtonId::kGlobalRemoveKioskApp,
kiosk_container);
global_action_detachable_base_group_ = add_horizontal_container();
UpdateDetachableBaseColumn();
per_user_action_view_container_ = new NonAccessibleView();
per_user_action_view_container_->SetLayoutManager(
std::make_unique<views::BoxLayout>(views::BoxLayout::kVertical));
UpdatePerUserActionContainer();
auto make_scroll = [](views::View* content, int height) -> views::View* {
views::ScrollView* scroll = views::ScrollView::CreateScrollViewWithBorder();
scroll->SetPreferredSize(gfx::Size(600, height));
scroll->SetContents(content);
scroll->SetBackgroundColor(SK_ColorTRANSPARENT);
scroll->SetVerticalScrollBar(new views::OverlayScrollBar(false));
scroll->SetHorizontalScrollBar(new views::OverlayScrollBar(true));
return scroll;
};
container_->AddChildView(make_scroll(global_action_view_container_, 110));
container_->AddChildView(make_scroll(per_user_action_view_container_, 100));
Layout();
}
LockDebugView::~LockDebugView() {
// Make sure debug_data_dispatcher_ lives longer than LockContentsView so
// pointer debug_dispatcher_ is always valid for LockContentsView.
RemoveChildView(lock_);
}
void LockDebugView::Layout() {
global_action_view_container_->SizeToPreferredSize();
per_user_action_view_container_->SizeToPreferredSize();
views::View::Layout();
lock_->SetBoundsRect(GetLocalBounds());
container_->SetPosition(gfx::Point());
container_->SizeToPreferredSize();
}
void LockDebugView::CycleAuthErrorMessage() {
switch (next_auth_error_type_) {
case AuthErrorType::kFirstUnlockFailed:
next_auth_error_type_ = AuthErrorType::kFirstUnlockFailedCapsLockOn;
Shell::Get()->ime_controller()->UpdateCapsLockState(
false /*caps_enabled*/);
debug_detachable_base_model_->SetPairingState(
DetachableBasePairingStatus::kNone,
DebugLoginDetachableBaseModel::kNullBaseId);
lock_->ShowAuthErrorMessageForDebug(1 /*unlock_attempt*/);
return;
case AuthErrorType::kFirstUnlockFailedCapsLockOn:
next_auth_error_type_ = AuthErrorType::kSecondUnlockFailed;
Shell::Get()->ime_controller()->UpdateCapsLockState(
true /*caps_enabled*/);
lock_->ShowAuthErrorMessageForDebug(1 /*unlock_attempt*/);
return;
case AuthErrorType::kSecondUnlockFailed:
next_auth_error_type_ = AuthErrorType::kSecondUnlockFailedCapsLockOn;
Shell::Get()->ime_controller()->UpdateCapsLockState(
false /*caps_enabled*/);
lock_->ShowAuthErrorMessageForDebug(2 /*unlock_attempt*/);
return;
case AuthErrorType::kSecondUnlockFailedCapsLockOn:
next_auth_error_type_ = AuthErrorType::kDetachableBaseFailed;
Shell::Get()->ime_controller()->UpdateCapsLockState(
true /*caps_enabled*/);
lock_->ShowAuthErrorMessageForDebug(2 /*unlock_attempt*/);
return;
case AuthErrorType::kDetachableBaseFailed:
next_auth_error_type_ = AuthErrorType::kFirstUnlockFailed;
debug_detachable_base_model_->SetPairingState(
DetachableBasePairingStatus::kNotAuthenticated,
DebugLoginDetachableBaseModel::kNullBaseId);
return;
default:
NOTREACHED();
}
}
void LockDebugView::ButtonPressed(views::Button* sender,
const ui::Event& event) {
// Add or remove a user.
bool is_add_user = sender->id() == ButtonId::kGlobalAddUser;
bool is_remove_user = sender->id() == ButtonId::kGlobalRemoveUser;
if (is_add_user || is_remove_user) {
int num_users = debug_data_dispatcher_->GetUserCount();
if (is_add_user)
++num_users;
else if (is_remove_user)
--num_users;
if (num_users < 0)
num_users = 0;
debug_data_dispatcher_->SetUserCount(num_users);
UpdatePerUserActionContainer();
Layout();
return;
}
// Enable or disable wallpaper blur.
if (sender->id() == ButtonId::kGlobalToggleBlur) {
LockScreen::Get()->ToggleBlurForDebug();
return;
}
// Enable or disable note action.
if (sender->id() == ButtonId::kGlobalToggleNoteAction) {
debug_data_dispatcher_->ToggleLockScreenNoteButton();
return;
}
// Enable or disable caps lock.
if (sender->id() == ButtonId::kGlobalToggleCapsLock) {
ImeController* ime_controller = Shell::Get()->ime_controller();
ime_controller->SetCapsLockEnabled(!ime_controller->IsCapsLockEnabled());
return;
}
// Iteratively adds more info to the dev channel labels to test 7 permutations
// and then disables the button.
if (sender->id() == ButtonId::kGlobalAddDevChannelInfo) {
DCHECK_LT(num_dev_channel_info_clicks_, 7u);
++num_dev_channel_info_clicks_;
if (num_dev_channel_info_clicks_ == 7u)
sender->SetEnabled(false);
std::string os_version =
num_dev_channel_info_clicks_ / 4 ? kDebugOsVersion : "";
std::string enterprise_info =
(num_dev_channel_info_clicks_ % 4) / 2 ? kDebugEnterpriseInfo : "";
std::string bluetooth_name =
num_dev_channel_info_clicks_ % 2 ? kDebugBluetoothName : "";
debug_data_dispatcher_->AddLockScreenDevChannelInfo(
os_version, enterprise_info, bluetooth_name);
return;
}
// Enable/disable auth. This is useful for testing auth failure scenarios on
// Linux Desktop builds, where the cryptohome dbus stub accepts all passwords
// as valid.
if (sender->id() == ButtonId::kGlobalToggleAuth) {
auto get_next_auth_state = [](LoginScreenController::ForceFailAuth auth) {
switch (auth) {
case LoginScreenController::ForceFailAuth::kOff:
return LoginScreenController::ForceFailAuth::kImmediate;
case LoginScreenController::ForceFailAuth::kImmediate:
return LoginScreenController::ForceFailAuth::kDelayed;
case LoginScreenController::ForceFailAuth::kDelayed:
return LoginScreenController::ForceFailAuth::kOff;
}
NOTREACHED();
return LoginScreenController::ForceFailAuth::kOff;
};
auto get_auth_label = [](LoginScreenController::ForceFailAuth auth) {
switch (auth) {
case LoginScreenController::ForceFailAuth::kOff:
return "Auth (allowed)";
case LoginScreenController::ForceFailAuth::kImmediate:
return "Auth (immediate fail)";
case LoginScreenController::ForceFailAuth::kDelayed:
return "Auth (delayed fail)";
}
NOTREACHED();
return "Auth (allowed)";
};
force_fail_auth_ = get_next_auth_state(force_fail_auth_);
global_action_toggle_auth_->SetText(
base::ASCIIToUTF16(get_auth_label(force_fail_auth_)));
Layout();
Shell::Get()
->login_screen_controller()
->set_force_fail_auth_for_debug_overlay(force_fail_auth_);
return;
}
if (sender->id() == ButtonId::kGlobalAddKioskApp) {
debug_data_dispatcher_->AddKioskApp(
Shelf::ForWindow(GetWidget()->GetNativeWindow())->shelf_widget());
}
if (sender->id() == ButtonId::kGlobalRemoveKioskApp) {
debug_data_dispatcher_->RemoveKioskApp(
Shelf::ForWindow(GetWidget()->GetNativeWindow())->shelf_widget());
}
if (sender->id() == ButtonId::kGlobalToggleDebugDetachableBase) {
if (debug_detachable_base_model_->debugging_pairing_state()) {
debug_detachable_base_model_->ClearDebugPairingState();
// In authenticated state, per user column has a button to mark the
// current base as last used for the user - it should get removed when the
// detachable base debugging gets disabled.
UpdatePerUserActionContainer();
} else {
debug_detachable_base_model_->SetPairingState(
DetachableBasePairingStatus::kNone,
DebugLoginDetachableBaseModel::kNullBaseId);
}
UpdateDetachableBaseColumn();
Layout();
return;
}
if (sender->id() == ButtonId::kGlobalCycleDetachableBaseStatus) {
debug_detachable_base_model_->SetPairingState(
debug_detachable_base_model_->NextPairingStatus(),
debug_detachable_base_model_->NextBaseId());
UpdatePerUserActionContainer();
UpdateDetachableBaseColumn();
Layout();
return;
}
if (sender->id() == ButtonId::kGlobalCycleDetachableBaseId) {
debug_detachable_base_model_->SetPairingState(
DetachableBasePairingStatus::kAuthenticated,
debug_detachable_base_model_->NextBaseId());
UpdateDetachableBaseColumn();
Layout();
return;
}
if (sender->id() == ButtonId::kGlobalCycleAuthErrorMessage) {
CycleAuthErrorMessage();
return;
}
// Show or hide warning banner.
if (sender->id() == ButtonId::kGlobalToggleWarningBanner) {
if (is_warning_banner_shown_) {
debug_data_dispatcher_->HideWarningBanner();
} else {
debug_data_dispatcher_->ShowWarningBanner(base::ASCIIToUTF16(
"A critical update is ready to install. Sign in to get started."));
}
is_warning_banner_shown_ = !is_warning_banner_shown_;
}
// Enable or disable PIN.
if (sender->id() == ButtonId::kPerUserTogglePin)
debug_data_dispatcher_->TogglePinStateForUserIndex(sender->tag());
// Enable or disable tap.
if (sender->id() == ButtonId::kPerUserToggleTap)
debug_data_dispatcher_->ToggleTapStateForUserIndex(sender->tag());
// Cycle easy unlock.
if (sender->id() == ButtonId::kPerUserCycleEasyUnlockState)
debug_data_dispatcher_->CycleEasyUnlockForUserIndex(sender->tag());
// Cycle fingerprint unlock state.
if (sender->id() == ButtonId::kPerUserCycleFingerprintState)
debug_data_dispatcher_->CycleFingerprintUnlockForUserIndex(sender->tag());
// Force online sign-in.
if (sender->id() == ButtonId::kPerUserForceOnlineSignIn)
debug_data_dispatcher_->ForceOnlineSignInForUserIndex(sender->tag());
// Enable or disable auth.
if (sender->id() == ButtonId::kPerUserToggleAuthEnabled)
debug_data_dispatcher_->ToggleAuthEnabledForUserIndex(sender->tag());
// Update the last used detachable base.
if (sender->id() == ButtonId::kPerUserUseDetachableBase) {
debug_detachable_base_model_->SetBaseLastUsedForUser(
debug_data_dispatcher_->GetAccountIdForUserIndex(sender->tag()));
}
// Convert this user to regular user or public account.
if (sender->id() == ButtonId::kPerUserTogglePublicAccount) {
debug_data_dispatcher_->TogglePublicAccountForUserIndex(sender->tag());
UpdatePerUserActionContainer();
Layout();
}
}
void LockDebugView::UpdatePerUserActionContainer() {
per_user_action_view_container_->RemoveAllChildViews(
true /*delete_children*/);
int num_users = debug_data_dispatcher_->GetUserCount();
for (int i = 0; i < num_users; ++i) {
auto* row = new NonAccessibleView();
row->SetLayoutManager(
std::make_unique<views::BoxLayout>(views::BoxLayout::kHorizontal));
auto* name = new views::Label();
name->SetText(debug_data_dispatcher_->GetDisplayNameForUserIndex(i));
name->SetSubpixelRenderingEnabled(false);
name->SetEnabledColor(SK_ColorWHITE);
name->SetAutoColorReadabilityEnabled(false);
// name->SetFontList(name->font_list().DeriveWithSizeDelta(3));
row->AddChildView(name);
AddButton("Toggle PIN", ButtonId::kPerUserTogglePin, row)->set_tag(i);
AddButton("Toggle Tap", ButtonId::kPerUserToggleTap, row)->set_tag(i);
AddButton("Cycle easy unlock", ButtonId::kPerUserCycleEasyUnlockState, row)
->set_tag(i);
AddButton("Cycle fingerprint unlock",
ButtonId::kPerUserCycleFingerprintState, row)
->set_tag(i);
AddButton("Force online sign-in", ButtonId::kPerUserForceOnlineSignIn, row)
->set_tag(i);
AddButton("Toggle auth enabled", ButtonId::kPerUserToggleAuthEnabled, row)
->set_tag(i);
if (debug_detachable_base_model_->debugging_pairing_state() &&
debug_detachable_base_model_->GetPairingStatus() ==
DetachableBasePairingStatus::kAuthenticated) {
AddButton("Set base used", ButtonId::kPerUserUseDetachableBase, row)
->set_tag(i);
}
AddButton("Toggle Public Account", ButtonId::kPerUserTogglePublicAccount,
row)
->set_tag(i);
per_user_action_view_container_->AddChildView(row);
}
}
void LockDebugView::UpdatePerUserActionContainerAndLayout() {
UpdatePerUserActionContainer();
Layout();
}
void LockDebugView::UpdateDetachableBaseColumn() {
global_action_detachable_base_group_->RemoveAllChildViews(
true /*delete_children*/);
AddButton("Debug detachable base", ButtonId::kGlobalToggleDebugDetachableBase,
global_action_detachable_base_group_);
if (!debug_detachable_base_model_->debugging_pairing_state())
return;
const std::string kPairingStatusText =
"Pairing status: " +
DetachableBasePairingStatusToString(
debug_detachable_base_model_->GetPairingStatus());
AddButton(kPairingStatusText, ButtonId::kGlobalCycleDetachableBaseStatus,
global_action_detachable_base_group_);
views::LabelButton* cycle_detachable_base_id =
AddButton(debug_detachable_base_model_->BaseButtonText(),
ButtonId::kGlobalCycleDetachableBaseId,
global_action_detachable_base_group_);
bool base_authenticated = debug_detachable_base_model_->GetPairingStatus() ==
DetachableBasePairingStatus::kAuthenticated;
cycle_detachable_base_id->SetEnabled(base_authenticated);
}
views::LabelButton* LockDebugView::AddButton(const std::string& text,
int id,
views::View* container) {
// Creates a button with |text| that cannot be focused.
auto* button = views::MdTextButton::CreateSecondaryUiButton(
this, base::ASCIIToUTF16(text));
button->set_id(id);
button->SetFocusBehavior(views::View::FocusBehavior::NEVER);
container->AddChildView(login_views_utils::WrapViewForPreferredSize(button));
return button;
}
} // namespace ash
| [
"commit-bot@chromium.org"
] | commit-bot@chromium.org |
16e45ee130ecdf3c4194d1adf35f2c12c524ed61 | b94c64ae597229793b17f6738413537d886892f4 | /Demo_4/Source/OgrePhysX/OgrePhysXNodeRenderable.h | 4d7fbcdaa6a897233116a96d296becbc7fafd94e | [] | no_license | psxcode/demo4 | 118c25939d14c4ce7f69533a0dbf7a1c961674a6 | 8c0e808b81fe53a49533490620ea980d1196ad21 | refs/heads/master | 2021-01-17T17:37:41.988215 | 2016-05-30T11:56:46 | 2016-05-30T11:56:46 | 60,006,844 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 653 | h | #pragma once
#include "DemoPrerequisites.h"
#if DBS_LM_PHYSX
#include <OgreSceneNode.h>
#include "OgrePhysXPointRenderable.h"
namespace Demo {
namespace OgrePhysX {
//------------------------------------------------------------
class NodeRenderable : public PointRenderable
{
public:
NodeRenderable(Ogre::SceneNode* node)
: mNode(node)
{
}
virtual ~NodeRenderable() {}
virtual void setTransform(const Ogre::Vector3 &position, const Ogre::Quaternion &rotation) {
mNode->setPosition(position);
mNode->setOrientation(rotation);
}
private:
Ogre::SceneNode *mNode;
};
//------------------------------------------------------------
}
}
#endif | [
"psxcode@gmail.com"
] | psxcode@gmail.com |
5b203d06bfb710467d4ccf3a10ec680b59dd273c | 1f032ac06a2fc792859a57099e04d2b9bc43f387 | /10/03/c9/45/9824829fad53573b9c10957f700f4300eb07716a4b7a10f3633bddaef2e3c25cd389a34d15aa25c01c1aba28b74076c5786038dc18b2b704b90aa5eb/sw.cpp | 83157792e6dc2f087e541af985cf7d8d1ae6968a | [] | no_license | SoftwareNetwork/specifications | 9d6d97c136d2b03af45669bad2bcb00fda9d2e26 | ba960f416e4728a43aa3e41af16a7bdd82006ec3 | refs/heads/master | 2023-08-16T13:17:25.996674 | 2023-08-15T10:45:47 | 2023-08-15T10:45:47 | 145,738,888 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,801 | cpp | void build(Solution &s)
{
auto &openexr = s.addProject("AcademySoftwareFoundation.openexr", "3.1.10");
openexr += Git("https://github.com/AcademySoftwareFoundation/openexr", "v{v}");
auto &Config = openexr.addLibrary("Config");
{
Config.HeaderOnly = true;
Config.configureFile("cmake/IexConfigInternal.h.in", "IexConfigInternal.h");
Config.Variables["OPENEXR_VERSION_STRING"] = "\"" + Config.Variables["PACKAGE_VERSION"].toString() + "\"";
Config.Variables["OPENEXR_PACKAGE_STRING"] = "\"IlmBase " + Config.Variables["PACKAGE_VERSION"].toString() + "\"";
Config.Variables["OPENEXR_VERSION_MAJOR"] = Config.Variables["PACKAGE_VERSION_MAJOR"];
Config.Variables["OPENEXR_VERSION_MINOR"] = Config.Variables["PACKAGE_VERSION_MINOR"];
Config.Variables["OPENEXR_VERSION_PATCH"] = Config.Variables["PACKAGE_VERSION_PATCH"];
Config.Variables["OPENEXR_IMF_NAMESPACE"] = "Imf";
Config.Variables["OPENEXR_INTERNAL_IMF_NAMESPACE"] = "Imf";
Config.configureFile("cmake/OpenEXRConfig.h.in", "OpenEXRConfig.h");
Config.configureFile("cmake/OpenEXRConfigInternal.h.in", "OpenEXRConfigInternal.h");
Config.Variables["IEX_INTERNAL_NAMESPACE"] = "Iex";
Config.Variables["IEX_NAMESPACE"] = "Iex";
Config.configureFile("cmake/IexConfig.h.in", "IexConfig.h");
Config.Variables["ILMTHREAD_INTERNAL_NAMESPACE"] = "IlmThread";
Config.Variables["ILMTHREAD_NAMESPACE"] = "IlmThread";
Config.Variables["ILMTHREAD_THREADING_ENABLED"] = 1;
if (!(Config.getBuildSettings().TargetOS.Type == OSType::Windows ||
Config.getBuildSettings().TargetOS.Type == OSType::Mingw))
Config.Variables["ILMTHREAD_HAVE_POSIX_SEMAPHORES"] = 1;
Config.configureFile("cmake/IlmThreadConfig.h.in", "IlmThreadConfig.h");
}
auto &Iex = openexr.addLibrary("Iex");
{
Iex.setRootDirectory("src/lib/Iex");
Iex.Public += sw::Shared, "OPENEXR_DLL"_def;
Iex += sw::Shared, "IEX_EXPORTS"_def;
Iex.Public += Config;
}
auto &IlmThread = openexr.addLibrary("IlmThread");
{
IlmThread.setRootDirectory("src/lib/IlmThread");
IlmThread.Public += sw::Shared, "OPENEXR_DLL"_def;
IlmThread += sw::Shared, "ILMTHREAD_EXPORTS"_def;
IlmThread.Public += Iex;
}
auto &OpenEXR = openexr.addLibrary("OpenEXR");
{
OpenEXR.setRootDirectory("src/lib/OpenEXR");
OpenEXR -= "b44ExpLogTable.cpp", "dwaLookups.cpp";
OpenEXR.Public += sw::Shared, "OPENEXR_DLL"_def;
OpenEXR += sw::Shared, "OPENEXR_EXPORTS"_def;
OpenEXR.Public += IlmThread, "org.sw.demo.AcademySoftwareFoundation.Imath"_dep;
OpenEXR += "org.sw.demo.madler.zlib"_dep;
}
}
| [
"cppanbot@gmail.com"
] | cppanbot@gmail.com |
8cda66c8191ea5dec53c5161edbac83264d56471 | f23fea7b41150cc5037ddf86cd7a83a4a225b68b | /SDK/BP_WorldMarkerManager_parameters.h | 4ddcc862db828a99c86f72526aa2a7ed9dbf69c9 | [] | no_license | zH4x/SoT-SDK-2.2.0.1 | 36e1cf7f23ece6e6b45e5885f01ec7e9cd50625e | f2464e2e733637b9fa0075cde6adb5ed2be8cdbd | refs/heads/main | 2023-06-06T04:21:06.057614 | 2021-06-27T22:12:34 | 2021-06-27T22:12:34 | 380,845,087 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 535 | h | #pragma once
// Name: SoT, Version: 2.2.0b
/*!!DEFINE!!*/
/*!!HELPER_DEF!!*/
/*!!HELPER_INC!!*/
#ifdef _MSC_VER
#pragma pack(push, 0x01)
#endif
namespace CG
{
//---------------------------------------------------------------------------
// Parameters
//---------------------------------------------------------------------------
// Function BP_WorldMarkerManager.BP_WorldMarkerManager_C.UserConstructionScript
struct ABP_WorldMarkerManager_C_UserConstructionScript_Params
{
};
}
#ifdef _MSC_VER
#pragma pack(pop)
#endif
| [
"Massimo.linker@gmail.com"
] | Massimo.linker@gmail.com |
8738946b657c60e7920ac882ecf2b371ad304e4b | ff4a5bb87b90e72a55d2322045d428438b4ce59d | /rendererDX9/draw2d.h | 5bf063366a236442e0f025b241d278d9a42070b6 | [] | no_license | k3a/Panther3D-1 | 88f9f862c961d119153055b9d63f9819a06406b3 | 4dfd596be5710f958db628ea5cecc5d5ff784937 | refs/heads/master | 2016-09-06T06:44:01.803465 | 2013-02-02T21:57:57 | 2013-02-02T21:57:57 | 7,982,518 | 1 | 0 | null | null | null | null | WINDOWS-1252 | C++ | false | false | 1,890 | h | //----------- Copyright © 2005-2007, 7thSquad, all rights reserved ------------
//
// This contents is the property of 7thSquad team.
// The contents may be used and/or copied only with the written permission of
// 7thSquad team, or in accordance with the terms and conditions stipulated in
// the agreement/contract under which the contents have been supplied.
//
// Author: KEXIK
// Purpose: Class for drawing 2d objects (line, texture, sphere, ...)
//-----------------------------------------------------------------------------
#pragma once
#include "IP3DDraw2D.h"
#include <d3dx9.h>
class CP3DDraw2D : public IP3DDraw2D
{
public:
CP3DDraw2D();
~CP3DDraw2D();
void DrawTexture(IP3DTexture *pTexture, int x1, int y1, int x2, int y2, float tu1=0, float tv1=0, float tu2=1, float tv2=1);
void DrawSquare(int x1, int y1, int x2, int y2, unsigned long color1);
void Line_Begin();
void Line_End();
void Line_SetWidth(int w);
void Line_DrawSimple(int x1, int y1, int x2, int y2, unsigned long color);
void Line_DrawFilledRect(int x, int y, int w, int h, unsigned long color);
void Line_Draw(P3DVector2D *points, DWORD numPoints, unsigned long color);
void Line_DrawRect(int x, int y, int w, int h, unsigned long color);
void Line_Draw3DRect(int x, int y, int w, int h, unsigned long colorLeftTop, unsigned long colorRightBottom);
void Draw3DLine(P3DXVector3D &start, P3DXVector3D &end, unsigned long color=0);
void DrawAABB(P3DAABB &aabb, unsigned long color);
bool Sprite_Begin(DWORD flags);
bool Sprite_End();
bool Sprite_Draw(IP3DTexture *pTexture, CONST RECT *pSrcRect, P3DXVector3D *pCenter, P3DXVector3D *pPosition, DWORD color);
void Sprite_SetTransform(P3DXMatrix &mat);
void DrawText(const char* text, int x, int y, unsigned long color);
private:
ID3DXLine *m_pLine;
ID3DXSprite *m_pSprite;
ID3DXFont *m_pFont;
//
bool m_bNeedSetWidth;
int m_fLineWidth;
}; | [
"kexik@molybdenum.l"
] | kexik@molybdenum.l |
6d3f655f211a1838f1ab0ead40a05c68f345fda3 | 108c8fa38da3371571068f353888f20d8fd729c0 | /voxel-cutting/Transformer_Cutting/OpenGLView/AnimationWindow.cpp | c66661356c59a68c7ab2e6df4f442756cb3ab57c | [] | no_license | pigoblock/TFYP | 2dd0acf1bb5591fb31b2d78a1bed764cd4a7d166 | 11ba29fd0d75a6b92080fd80b24064898b8f980f | refs/heads/master | 2021-01-17T10:07:10.149542 | 2016-04-19T07:41:53 | 2016-04-19T07:41:53 | 41,845,421 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,780 | cpp | #include "stdafx.h"
#include "AnimationWindow.h"
#include "resource.h"
IMPLEMENT_DYNCREATE(AnimationWindow, CFrameWnd)
BEGIN_MESSAGE_MAP(AnimationWindow, CFrameWnd)
ON_WM_CREATE()
//ON_COMMAND(ID_PLAY, &AnimationWindow::OnPlayBtn)
END_MESSAGE_MAP()
AnimationWindow::AnimationWindow()
{
}
AnimationWindow::~AnimationWindow()
{
}
int AnimationWindow::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CFrameWnd::OnCreate(lpCreateStruct) == -1){
return -1;
}
//AfxMessageBox(_T("here"));
if (!m_wndToolBar.Create(this) ||
!m_wndToolBar.LoadToolBar(ID_ANIMATION_TOOLBAR))
{
TRACE0("Failed to create toolbar\n");
return -1; // fail to create
}
m_wndToolBar.SetBarStyle(m_wndToolBar.GetBarStyle() |
CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC);
CRect rect;
int nIndex = m_wndToolBar.GetToolBarCtrl().CommandToIndex(IDD_EDIT_BOX_1);
m_wndToolBar.SetButtonInfo(nIndex, IDD_EDIT_BOX_1, TBBS_SEPARATOR, 400);
m_wndToolBar.GetToolBarCtrl().GetItemRect(nIndex, &rect);
toolbarText.Create(WS_VISIBLE, rect, &m_wndToolBar, IDD_EDIT_BOX_1);
CString text;
text += "Transformer opening animation window.";
toolbarText.SetWindowText(text);
m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
EnableDocking(CBRS_ALIGN_ANY);
DockControlBar(&m_wndToolBar, AFX_IDW_DOCKBAR_BOTTOM);
return 0;
}
BOOL AnimationWindow::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)
{
AnimationView *pview;
// Assign custom view.
pContext->m_pNewViewClass = RUNTIME_CLASS(AnimationView);
// Create the view.
pview = (AnimationView *)CreateView(pContext, AFX_IDW_PANE_FIRST);
if (pview == NULL)
return FALSE;
// Notify the view.
pview->SendMessage(WM_INITIALUPDATE);
SetActiveView(pview, FALSE);
return TRUE;
}
void AnimationWindow::OnPlayBtn()
{
} | [
"kowanling@hotmail.com"
] | kowanling@hotmail.com |
6706f78bcba1ea855f1ef235fd5e39683ae7ef14 | dbf800ed0cfdba65abf2d4289847818d7e6fce32 | /MatrixUnitTest/stdafx.cpp | 502ff2de248ad35d6559dd8afe055871540b299e | [] | no_license | simplydesigner/matrix-1 | 5300f4deae40652633c09600835e74281198c1ea | a686ef45953df1a4caa4edb46acf855ad0a8da22 | refs/heads/master | 2020-12-31T01:47:01.380153 | 2016-03-14T08:34:55 | 2016-03-14T08:34:55 | null | 0 | 0 | null | null | null | null | WINDOWS-1251 | C++ | false | false | 580 | cpp | // stdafx.cpp: файл исходного кода, содержащий стандартные включаемые элементы
// MatrixUnitTest.pch будет предкомпилированным заголовком
// stdafx.obj будет содержать предварительно откомпилированные сведения о типе
#include "stdafx.h"
// TODO: Установите ссылки на любые требующиеся дополнительные заголовки в файле STDAFX.H
// , а не в данном файле
| [
"anon5007@gmail.com"
] | anon5007@gmail.com |
a1782995f70d01f2db42d546347c014ce8e42fd4 | 2e41f3722e7f61c426fe4b6e3079f9f4a6c78a03 | /CODEFORCES Contests/Problem_Set/General_Problem/1000-1500/5-C-Removing_multiples.cpp | 5ca049812cc74b0f6fd8b9c657cc985a2c0cbe31 | [] | no_license | Stenardt-9002/CODEFORCES-CONTESTS | 09858b06c83670d51d1de253e0b0940a01188c77 | adaf7d1f1cc4a2ac82e015198fd1e6629c1e0806 | refs/heads/master | 2022-12-14T18:45:04.078368 | 2022-12-01T18:47:09 | 2022-12-01T18:47:09 | 192,413,232 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,865 | cpp | // https://codeforces.com/problemset/problem/1734/C
#include <bits/stdc++.h>
#include<ext/pb_ds/tree_policy.hpp>
#include<ext/pb_ds/assoc_container.hpp>
using namespace std;
using namespace __gnu_pbds ;
typedef long long int ll;
#define DEBUG_var 1
#define fastIO ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
// ll solve(ll n , string s , vector<ll> prime_numbers_vec)
// {
// ll sum1 = 0 ;
// unordered_set<ll> s1 ;
// for (ll i1 = 0; i1 < n; i1++)
// if (s[i1]=='1')
// s1.insert(i1+1) ;
// unordered_map<ll,ll> dp1 ;
// for (ll i1 = n; i1 >=1; i1--)
// for (ll j1 = i1; j1 <=n; j1+=i1)
// {
// if(s1.find(j1)!=s1.end())
// break ;
// dp1[j1] = i1;
// }
// for (ll i1 = 1; i1 <= n; i1++)
// if(s1.find(i1)==s1.end())
// sum1+=dp1[i1];
// return sum1 ;
// }
ll solve(ll n , string s )
{
ll sum1 = 0 ;
unordered_set<ll> s1 ;
for (ll i1 = 0; i1 < n; i1++)
if (s[i1]=='1')
s1.insert(i1+1) ;
unordered_map<ll,ll> dp1 ;
for (ll i1 = n; i1 >=1; i1--)
for (ll j1 = i1; j1 <=n; j1+=i1)
{
if(s1.find(j1)!=s1.end())
break ;
dp1[j1] = i1;
}
for (ll i1 = 1; i1 <= n; i1++)
if(s1.find(i1)==s1.end())
sum1+=dp1[i1];
return sum1 ;
}
int main(int argc, char const *argv[])
{
fastIO
#ifndef ONLINE_JUDGE
freopen("input.txt","r",stdin);
freopen("output1.txt","w",stdout);
#endif
ll testcases=1 ;
cin>>testcases;
while (testcases--)
{
ll n;//,m ;
string s ;
cin>> n>>s;
cout<<solve(n,s )<<endl ;//<<" "<<execute(n,m)<< endl;
}
return 0;
}
| [
"ritvikraj.iiitdm@gmail.com"
] | ritvikraj.iiitdm@gmail.com |
79581c175e9637b520e257dd70fdeca752339c4b | 33238ea20104f9613ec0a800333877987f95e3a5 | /App/FCam/include/FCam/F2/Sensor.h | ad864ff45ad9999a6ed3a878f88d607178fc9ba5 | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | ahaug/CamSync | 7a4ab9523087c6bba30f223ccd119aaa69aa679e | 13b97cd3a9323f35e2d6ca9fc0eaea43bc63fda7 | refs/heads/master | 2021-01-20T04:32:20.280844 | 2010-11-24T01:27:01 | 2010-11-24T01:27:01 | 1,108,216 | 0 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 5,146 | h | #ifndef FCAM_F2_SENSOR_H
#define FCAM_F2_SENSOR_H
//! \file
//! F2::Sensor manages the Aptina MT9P031 image sensor on the F2
//! Frankencamera. Using F2-specific Shot and Frame classes with
//! F2::Sensor exposes the additional functionality of the Aptina
//! sensor relative to the FCam base requirements. This includes the
//! ability to control the sensor region-of-interest on a per-frame
//! basis.
#include "../Sensor.h"
#include "Frame.h"
#include "Shot.h"
#include <vector>
#include <pthread.h>
namespace FCam { namespace F2 {
class Daemon;
//! F2::Sensor manages the Aptina MT9P031 image sensor on the F2
//! Frankencamera. Using F2-specific F2::Shot and F2::Frame classes with
//! F2::Sensor exposes the additional functionality of the Aptina
//! sensor relative to the FCam base requirements. This includes the
//! ability to control the sensor region-of-interest on a per-frame
//! basis.
class Sensor : public FCam::Sensor {
public:
Sensor();
~Sensor();
void capture(const FCam::Shot &);
//! Overloaded capture for a F2::Shot
void capture(const Shot &);
void capture(const std::vector<FCam::Shot> &);
//! Overloaded capture for a burst of F2::Shot
void capture(const std::vector<Shot> &);
void stream(const FCam::Shot &);
//! Overloaded stream for a F2::Shot
void stream(const Shot &);
void stream(const std::vector<FCam::Shot> &);
//! Overloaded stream for a burst of F2::Shot
void stream(const std::vector<Shot> &);
bool streaming();
void stopStreaming();
void start();
void stop();
/** \todo Fix below functions to be correct for Aptina instead of N900 */
/** The maximum exposure time on the N900 is 1080842 us (just
* over a second) for small resolutions (height <= 960), and
* 2489140 us for larger resolutions (about 2.5 seconds). */
virtual int maxExposure() const {return 2489140;}
/** The minimum exposure time on the N900 is 38 us for small
* resolutions (height <= 960) and 66 us for larger
* resolutions. */
virtual int minExposure() const {return 38;}
/** The maximum frame time on the N900 is 1081250 us for small
* resolutions (just over a second), and 2490072 us for larger
* resolutions (about 2.5 seconds). */
virtual int maxFrameTime() const {return 2490072;}
/** The minimum frame time on the N900 is the 33414 us for
* smaller resolutions (height <= 960), and 77412 us for larger
* resolutions. */
virtual int minFrameTime() const {return 33414;}
/** The maximum gain on the N900 is 32, which can be considered ISO 3200. */
virtual float maxGain() const {return 32.0f;}
/** The minimum supported gain is 1, which can be considered ISO 100. */
virtual float minGain() const {return 1.0f;}
//! minimum image 640x480
Size minImageSize() const;
//! maximum image without black calibration areas is 2592x1944
Size maxImageSize() const;
//! all pixels on the array, including black pixels: 2752x2004
static Size pixelArraySize();
//! The rect describing the active (imaging) pixel array, in the
//! coordinate system used by F2::Shot::roiStartX/Y
static Rect activeArrayRect();
//! The rect describing the entire pixel array, including
//! black pixels, in the coordinate system used by
//! F2::Shot::roiStartX/Y
static Rect pixelArrayRect();
/** Overloaded version for F2::Shot. */
int rollingShutterTime(const Shot&) const;
int rollingShutterTime(const FCam::Shot&) const;
int framesPending() const;
int shotsPending() const;
unsigned short minRawValue() const;
unsigned short maxRawValue() const;
BayerPattern bayerPattern() const;
const std::string &manufacturer() const;
const std::string &model() const;
void rawToRGBColorMatrix(int kelvin, float *matrix) const;
FCam::F2::Frame getFrame();
void debugTiming(bool);
protected:
FCam::Frame getBaseFrame() {return getFrame();}
private:
// The currently streaming shot
std::vector<Shot> streamingShot;
// The daemon that manages the F2's sensor
friend class Daemon;
Daemon *daemon;
// the Daemon calls this when it's time for new frames to be queued up
void generateRequest();
pthread_mutex_t requestMutex;
// enforce the specified drop policy
void enforceDropPolicy();
// allow tagFrames to get at color matrix information
const std::vector<int> &getColorTemps() const;
const float *getColorMatrix(int i) const;
// the number of outstanding shots
int shotsPending_;
};
}
}
#endif
| [
"etherealmachine@gmail.com"
] | etherealmachine@gmail.com |
4ae72371c88d3b34769448a4f6946bf67f597a52 | 1e60b1b311e4e1ced836f43ef055c65f5e78f7ef | /src/qt/transactionfilterproxy.h | cba5633b15a912184b0129e5d435b0dcd1f96277 | [
"MIT"
] | permissive | liufile/BlackHatWallet | 529bd4b492dbf672aa3d7b1f7dd456e53508fdc4 | 0e6b310fb6cb9bdb3b51a81ab55e606efed891f2 | refs/heads/master | 2023-04-24T13:49:07.117712 | 2021-05-01T12:34:50 | 2021-05-01T12:34:50 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,831 | h | // Copyright (c) 2011-2013 The Bitcoin developers
// Copyright (c) 2017-2019 The PIVX developers
// Copyright (c) 2021 The BlackHat developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef BITCOIN_QT_TRANSACTIONFILTERPROXY_H
#define BITCOIN_QT_TRANSACTIONFILTERPROXY_H
#include "amount.h"
#include <QDateTime>
#include <QSortFilterProxyModel>
/** Filter the transaction list according to pre-specified rules. */
class TransactionFilterProxy : public QSortFilterProxyModel
{
Q_OBJECT
public:
explicit TransactionFilterProxy(QObject* parent = 0);
/** Earliest date that can be represented (far in the past) */
static const QDateTime MIN_DATE;
/** Last date that can be represented (far in the future) */
static const QDateTime MAX_DATE;
/** Type filter bit field (all types) */
static const quint32 ALL_TYPES = 0xFFFFFFFF;
/** Type filter bit field (all types but Obfuscation-SPAM ... enum 0-14 are common) */
static const quint32 COMMON_TYPES = 0x0005FFFF;
static quint32 TYPE(int type) { return 1 << type; }
enum WatchOnlyFilter {
WatchOnlyFilter_All,
WatchOnlyFilter_Yes,
WatchOnlyFilter_No
};
void setDateRange(const QDateTime& from, const QDateTime& to);
void clearDateRange() {
if (dateFrom != MIN_DATE || dateTo == MAX_DATE)
setDateRange(MIN_DATE, MAX_DATE);
}
void setAddressPrefix(const QString& addrPrefix);
/**
@note Type filter takes a bit field created with TYPE() or ALL_TYPES
*/
void setTypeFilter(quint32 modes);
void setMinAmount(const CAmount& minimum);
void setWatchOnlyFilter(WatchOnlyFilter filter);
/** Set maximum number of rows returned, -1 if unlimited. */
void setLimit(int limit);
/** Set whether to show conflicted transactions. */
void setShowInactive(bool showInactive);
/** Set whether to hide orphan stakes. */
void setHideOrphans(bool fHide);
/** Only stakes txes **/
void setOnlyStakes(bool fOnlyStakes);
int rowCount(const QModelIndex& parent = QModelIndex()) const;
static bool isOrphan(const int status, const int type);
protected:
bool filterAcceptsRow(int source_row, const QModelIndex& source_parent) const;
private:
QDateTime dateFrom;
QDateTime dateTo;
QString addrPrefix;
quint32 typeFilter;
WatchOnlyFilter watchOnlyFilter;
CAmount minAmount;
int limitRows;
bool showInactive;
bool fHideOrphans = true;
bool fOnlyZc = false;
bool fOnlyStakes = false;
bool fOnlyColdStaking = false;
bool isZcTx(int type) const;
bool isStakeTx(int type) const;
bool isColdStake(int type) const;
};
#endif // BITCOIN_QT_TRANSACTIONFILTERPROXY_H
| [
"contact@blackhatco.in"
] | contact@blackhatco.in |
5b58dedea7dae55f8bd222a69a95f96cf3a209b0 | 0c91e068321f11f9d313e59793a8e8f347e9a8cb | /Semana 6/Controladora.cpp | 56d5be668fd5a6ae4d8cd36cc83ff13560507f92 | [] | no_license | wolf2lyon/Clases_progra2_2021 | c0e4379de22d702b0a48e5e5b2e5324066342c82 | cc751046abb54399278d20cfac2ecf852441f16f | refs/heads/main | 2023-04-18T03:32:58.814662 | 2021-05-08T23:28:41 | 2021-05-08T23:28:41 | 354,059,389 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 963 | cpp | #include <iostream>
using namespace System;
using namespace std;
#include "Controladora.h"
Controladora::Controladora()
{
cant_gatos = 0;
cant_perros = 0;
animales = new ArrBase_Movimiento();
}
Controladora::~Controladora() {
delete animales;
}
void Controladora::Crear_Animales(char opt)
{
if (toupper(opt) == 'P')
{
animales->Insertar(new Perro());
animales->Cambiar_dy(cant_gatos + cant_perros, 1);
animales->Cambiar_x(cant_gatos + cant_perros, 10);
animales->Cambiar_y(cant_gatos + cant_perros, 10);
animales->Cambiar_dx(cant_gatos + cant_perros, 1);
cant_perros++;
}
else
{
animales->Insertar(new Gato());
animales->Cambiar_dx(cant_gatos + cant_perros, 0);
animales->Cambiar_x(cant_gatos + cant_perros, 20);
animales->Cambiar_y(cant_gatos + cant_perros, 20);
animales->Cambiar_dx(cant_gatos + cant_perros, 1);
cant_gatos++;
}
}
void Controladora::Mover_Animales(int MAXW, int MAXH)
{
animales->Mover_todos(MAXW, MAXH);
} | [
"81819401+wolf2lyon@users.noreply.github.com"
] | 81819401+wolf2lyon@users.noreply.github.com |
a624b0c60d2eaf637d807f2b7886ca8e7f78b226 | efa1cddfa8b779306af6837552ca70cac99672b0 | /OldProjects/维修终端/MainPro/SocketManager.cpp | 5dde68f02ec5a62f160c880a3d3bcea62cda34a3 | [] | no_license | lanicon/MyRepository | f21cee83a2fb97e730b1e324d807b51495f4d64e | 6f2e61343fccbaa7ad1f4213df5efc9eb6502c65 | refs/heads/master | 2023-03-14T05:01:01.114757 | 2021-02-26T03:17:01 | 2021-02-26T03:17:01 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,725 | cpp | // SocketManager.cpp: implementation of the CSocketManager class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include <atlconv.h>
//#include "SocketManager.h"
//#include "SyncSocket.h"
#include "mainfrm.h"
//#include "StatusLink.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
/*
const UINT EVT_CONSUCCESS = 0x0000; // Connection established
const UINT EVT_CONFAILURE = 0x0001; // General failure - Wait Connection failed
const UINT EVT_CONDROP = 0x0002; // Connection dropped
const UINT EVT_ZEROLENGTH = 0x0003; // Zero length message
*/
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CSocketManager::CSocketManager()
: m_pMsgView(NULL),m_pMsgWnd(NULL)
{
}
CSocketManager::~CSocketManager()
{
}
void CSocketManager::DisplayData(const LPBYTE lpData, DWORD dwCount, const SockAddrIn& sfrom)
{
CString strData;
memcpy(strData.GetBuffer(dwCount), A2CT((LPSTR)lpData), dwCount);
strData.ReleaseBuffer();
SockAddrIn addrin;
GetPeerName( addrin );
LONG uAddr = addrin.GetIPAddr();
BYTE* sAddr = (BYTE*) &uAddr;
short nPort = ntohs( addrin.GetPort() );
CString strAddr;
// Address is stored in network format...
strAddr.Format(_T("%u.%u.%u.%u"),
(UINT)(sAddr[0]), (UINT)(sAddr[1]),
(UINT)(sAddr[2]), (UINT)(sAddr[3]));
if (m_pMsgView != NULL)
{
CMessageItem mi;
mi.dwCount = dwCount;
mi.Buffertype = BYTE(*lpData);
mi.BufferVersion = BYTE(*(lpData+1));
mi.dwTimeout = INFINITE;
mi.strIPM = strAddr;
memcpy(mi.lpBuffer, lpData, dwCount);
(((CMainFrame *)m_pMsgView)->m_receiveQueue).addReceiveMessage(&mi,true);
}
}
void CSocketManager::AppendMessage(LPCTSTR strText)
{
if (NULL == m_pMsgWnd)
return;
CString strTextMain = strText;
}
void CSocketManager::SetMessageWindow(CWnd* pMsgView)
{
m_pMsgView = pMsgView;
}
void CSocketManager::SetMessageWnd(CWnd* pMsgWnd)
{
m_pMsgWnd = pMsgWnd;
}
void CSocketManager::OnDataReceived(const LPBYTE lpBuffer, DWORD dwCount)
{
LPBYTE lpData = lpBuffer;
SockAddrIn origAddr;
stMessageProxy msgProxy;
if (IsSmartAddressing())
{
dwCount = __min(sizeof(msgProxy), dwCount);
memcpy(&msgProxy, lpBuffer, dwCount);
origAddr = msgProxy.address;
if (IsServer())
{
// broadcast message to all
msgProxy.address.sin_addr.s_addr = htonl(INADDR_BROADCAST);
WriteComm(255,1,(const LPBYTE)&msgProxy, dwCount, 0L);
}
dwCount -= sizeof(msgProxy.address);
lpData = msgProxy.byData;
}
if (lpBuffer[0] == 0xe0)
{
// CSyncSocket * pReceive = CSyncSocket::GetInstance();
// pReceive->receiveBuffer(lpBuffer+4,dwCount-4);
}
else if (lpBuffer[0] == 0xd0)
{
// CStatusLink * pReceive = CStatusLink::GetInstance();
// pReceive->ReceiveStatus(lpBuffer,dwCount);
}
else
{
// Display data to message list
DisplayData( lpData, dwCount, origAddr );
}
// Display data to message list
// DisplayData( lpData, dwCount, origAddr );
}
///////////////////////////////////////////////////////////////////////////////
// OnEvent
// Send message to parent window to indicate connection status
void CSocketManager::OnEvent(UINT uEvent)
{
if (NULL == m_pMsgView)
return;
CWnd* pParent = m_pMsgView;
if (!::IsWindow( pParent->GetSafeHwnd()))
return;
switch( uEvent )
{
case EVT_CONSUCCESS:
// AppendMessage( _T("Connection Established\r\n"),1 );
break;
case EVT_CONFAILURE:
if (!m_bConnect)
return;
m_bConnect = false;
// AppendMessage( _T("Connection Failed\r\n"),1 );
// StopComm();
break;
case EVT_CONDROP:
if (!m_bConnect)
return;
m_bConnect = false;
// AppendMessage( _T("Connection Abandonned\r\n"),1 );
// StopComm();
break;
case EVT_ZEROLENGTH:
// AppendMessage( _T("Zero Length Message\r\n"),1 );
break;
default:
// TRACE("Unknown Socket event\n");
break;
}
pParent->PostMessage( WM_UPDATE_CONNECTION, uEvent, (LPARAM) this);
}
CString CSocketManager::getConnectString()
{
if (IsOpen())
{
SockAddrIn addrin;
GetPeerName( addrin );
LONG uAddr = addrin.GetIPAddr();
BYTE* sAddr = (BYTE*) &uAddr;
short nPort = ntohs( addrin.GetPort() );
CString strAddr;
// Address is stored in network format...
strAddr.Format(_T("IP: %u.%u.%u.%u, Port: %d"),
(UINT)(sAddr[0]), (UINT)(sAddr[1]),
(UINT)(sAddr[2]), (UINT)(sAddr[3]), nPort);
return strAddr;
}
else
{
return "NULL";
}
}
| [
"heng222_z@163.com"
] | heng222_z@163.com |
0e308a8af0ec50bce2d958a667fa43c1e76a34a3 | 07a994ab35df9d9076c32f836edc5ce216704702 | /Chapter_3/student_grade_solution_video10/student_grade_solution_video10.cpp | 575fb4b11793e0ea4734a8a627666dc8c25bcd77 | [
"MIT"
] | permissive | BjornChrisnach/Udemy_C_plusplus_Programming_From_Zero_to_Hero | 9113156385bf805801a3fbf3db06ef7cb3685c81 | f3d7b46ac652eec5d6057b802c612217be2e01cb | refs/heads/main | 2023-06-16T16:32:30.658159 | 2021-07-07T03:30:37 | 2021-07-07T03:30:37 | 381,035,816 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 692 | cpp | // Programming chalenge and it's solution
// Finding the grade of a student
#include <iostream>
using namespace std;
int main()
{
int m1, m2, m3, total, Avg;
cout << "Enter the marks of 3 subjects: ";
cin >> m1 >> m2 >> m3;
total = m1 + m2 + m3;
Avg = total / 3;
if(m1 < 35 || m2 < 35 || m3 < 35)
{
cout << "The student fails.."<<endl;
}
else if(Avg >= 75)
{
cout << "Ohh Distinction !! "<<endl;
}
else if(Avg < 75 && Avg >= 60)
{
cout << "Grade A"<<endl;
}
else if(Avg < 60 && Avg >= 50)
{
cout << "Grade B"<<endl;
}
else
{
cout << "Grade C"<<endl;
}
return 0;
} | [
"41198499+BjornChrisnach@users.noreply.github.com"
] | 41198499+BjornChrisnach@users.noreply.github.com |
cba14eeb54af37a9438579420cd3305ed232a3b4 | c51febc209233a9160f41913d895415704d2391f | /library/ATF/CClientDC.hpp | d8e49df072661290f52dca1de90905d4dc31737f | [
"MIT"
] | permissive | roussukke/Yorozuya | 81f81e5e759ecae02c793e65d6c3acc504091bc3 | d9a44592b0714da1aebf492b64fdcb3fa072afe5 | refs/heads/master | 2023-07-08T03:23:00.584855 | 2023-06-29T08:20:25 | 2023-06-29T08:20:25 | 463,330,454 | 0 | 0 | MIT | 2022-02-24T23:15:01 | 2022-02-24T23:15:00 | null | UTF-8 | C++ | false | false | 433 | hpp | // This file auto generated by plugin for ida pro. Generated code only for x64. Please, dont change manually
#pragma once
#include <common/common.h>
#include <CDC.hpp>
#include <HWND__.hpp>
START_ATF_NAMESPACE
struct CClientDC : CDC
{
HWND__ *m_hWnd;
public:
~CClientDC();
int64_t dtor_CClientDC();
};
static_assert(ATF::checkSize<CClientDC, 40>(), "CClientDC");
END_ATF_NAMESPACE
| [
"b1ll.cipher@yandex.ru"
] | b1ll.cipher@yandex.ru |
5ae1190617280c84ae0945ae1b6dc73ae3d90202 | cefd6c17774b5c94240d57adccef57d9bba4a2e9 | /WebKit/Source/WebCore/page/CaptionUserPreferences.cpp | adb570ea7a6d84f98f929ce47754b3e6f987b0a8 | [
"BSD-2-Clause",
"LGPL-2.0-only",
"LGPL-2.1-only",
"BSL-1.0"
] | permissive | adzhou/oragle | 9c054c25b24ff0a65cb9639bafd02aac2bcdce8b | 5442d418b87d0da161429ffa5cb83777e9b38e4d | refs/heads/master | 2022-11-01T05:04:59.368831 | 2014-03-12T15:50:08 | 2014-03-12T15:50:08 | 17,238,063 | 0 | 1 | BSL-1.0 | 2022-10-18T04:23:53 | 2014-02-27T05:39:44 | C++ | UTF-8 | C++ | false | false | 8,293 | cpp | /*
* Copyright (C) 2013 Apple 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:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "config.h"
#if ENABLE(VIDEO_TRACK)
#include "CaptionUserPreferences.h"
#include "DOMWrapperWorld.h"
#include "Page.h"
#include "PageGroup.h"
#include "Settings.h"
#include "TextTrackList.h"
#include "UserStyleSheetTypes.h"
namespace WebCore {
CaptionUserPreferences::CaptionUserPreferences(PageGroup& group)
: m_pageGroup(group)
, m_displayMode(ForcedOnly)
, m_timer(this, &CaptionUserPreferences::timerFired)
, m_testingMode(false)
, m_havePreferences(false)
{
}
CaptionUserPreferences::~CaptionUserPreferences()
{
}
void CaptionUserPreferences::timerFired(Timer<CaptionUserPreferences>&)
{
captionPreferencesChanged();
}
void CaptionUserPreferences::notify()
{
m_havePreferences = true;
if (!m_timer.isActive())
m_timer.startOneShot(0);
}
CaptionUserPreferences::CaptionDisplayMode CaptionUserPreferences::captionDisplayMode() const
{
return m_displayMode;
}
void CaptionUserPreferences::setCaptionDisplayMode(CaptionUserPreferences::CaptionDisplayMode mode)
{
m_displayMode = mode;
if (m_testingMode && mode != AlwaysOn) {
setUserPrefersCaptions(false);
setUserPrefersSubtitles(false);
}
notify();
}
bool CaptionUserPreferences::userPrefersCaptions() const
{
Page* page = *(m_pageGroup.pages().begin());
if (!page)
return false;
return page->settings().shouldDisplayCaptions();
}
void CaptionUserPreferences::setUserPrefersCaptions(bool preference)
{
Page* page = *(m_pageGroup.pages().begin());
if (!page)
return;
page->settings().setShouldDisplayCaptions(preference);
notify();
}
bool CaptionUserPreferences::userPrefersSubtitles() const
{
Page* page = *(pageGroup().pages().begin());
if (!page)
return false;
return page->settings().shouldDisplaySubtitles();
}
void CaptionUserPreferences::setUserPrefersSubtitles(bool preference)
{
Page* page = *(m_pageGroup.pages().begin());
if (!page)
return;
page->settings().setShouldDisplaySubtitles(preference);
notify();
}
bool CaptionUserPreferences::userPrefersTextDescriptions() const
{
Page* page = *(m_pageGroup.pages().begin());
if (!page)
return false;
return page->settings().shouldDisplayTextDescriptions();
}
void CaptionUserPreferences::setUserPrefersTextDescriptions(bool preference)
{
Page* page = *(m_pageGroup.pages().begin());
if (!page)
return;
page->settings().setShouldDisplayTextDescriptions(preference);
notify();
}
void CaptionUserPreferences::captionPreferencesChanged()
{
m_pageGroup.captionPreferencesChanged();
}
Vector<String> CaptionUserPreferences::preferredLanguages() const
{
Vector<String> languages = userPreferredLanguages();
if (m_testingMode && !m_userPreferredLanguage.isEmpty())
languages.insert(0, m_userPreferredLanguage);
return languages;
}
void CaptionUserPreferences::setPreferredLanguage(const String& language)
{
m_userPreferredLanguage = language;
notify();
}
static String trackDisplayName(TextTrack* track)
{
if (track == TextTrack::captionMenuOffItem())
return textTrackOffMenuItemText();
if (track == TextTrack::captionMenuAutomaticItem())
return textTrackAutomaticMenuItemText();
if (track->label().isEmpty() && track->language().isEmpty())
return textTrackNoLabelText();
if (!track->label().isEmpty())
return track->label();
return track->language();
}
String CaptionUserPreferences::displayNameForTrack(TextTrack* track) const
{
return trackDisplayName(track);
}
Vector<RefPtr<TextTrack>> CaptionUserPreferences::sortedTrackListForMenu(TextTrackList* trackList)
{
ASSERT(trackList);
Vector<RefPtr<TextTrack>> tracksForMenu;
for (unsigned i = 0, length = trackList->length(); i < length; ++i) {
TextTrack* track = trackList->item(i);
const AtomicString& kind = track->kind();
if (kind == TextTrack::captionsKeyword() || kind == TextTrack::descriptionsKeyword() || kind == TextTrack::subtitlesKeyword())
tracksForMenu.append(track);
}
std::sort(tracksForMenu.begin(), tracksForMenu.end(), [](const RefPtr<TextTrack>& a, const RefPtr<TextTrack>& b) {
return codePointCompare(trackDisplayName(a.get()), trackDisplayName(b.get())) < 0;
});
tracksForMenu.insert(0, TextTrack::captionMenuOffItem());
tracksForMenu.insert(1, TextTrack::captionMenuAutomaticItem());
return tracksForMenu;
}
int CaptionUserPreferences::textTrackSelectionScore(TextTrack* track, HTMLMediaElement*) const
{
int trackScore = 0;
if (track->kind() != TextTrack::captionsKeyword() && track->kind() != TextTrack::subtitlesKeyword())
return trackScore;
if (!userPrefersSubtitles() && !userPrefersCaptions())
return trackScore;
if (track->kind() == TextTrack::subtitlesKeyword() && userPrefersSubtitles())
trackScore = 1;
else if (track->kind() == TextTrack::captionsKeyword() && userPrefersCaptions())
trackScore = 1;
return trackScore + textTrackLanguageSelectionScore(track, preferredLanguages());
}
int CaptionUserPreferences::textTrackLanguageSelectionScore(TextTrack* track, const Vector<String>& preferredLanguages) const
{
if (track->language().isEmpty())
return 0;
size_t languageMatchIndex = indexOfBestMatchingLanguageInList(track->language(), preferredLanguages);
if (languageMatchIndex >= preferredLanguages.size())
return 0;
// Matching a track language is more important than matching track type, so this multiplier must be
// greater than the maximum value returned by textTrackSelectionScore.
return (preferredLanguages.size() - languageMatchIndex) * 10;
}
void CaptionUserPreferences::setCaptionsStyleSheetOverride(const String& override)
{
m_captionsStyleSheetOverride = override;
updateCaptionStyleSheetOveride();
}
void CaptionUserPreferences::updateCaptionStyleSheetOveride()
{
// Identify our override style sheet with a unique URL - a new scheme and a UUID.
DEFINE_STATIC_LOCAL(URL, captionsStyleSheetURL, (ParsedURLString, "user-captions-override:01F6AF12-C3B0-4F70-AF5E-A3E00234DC23"));
m_pageGroup.removeUserStyleSheetFromWorld(mainThreadNormalWorld(), captionsStyleSheetURL);
String captionsOverrideStyleSheet = captionsStyleSheetOverride();
if (captionsOverrideStyleSheet.isEmpty())
return;
m_pageGroup.addUserStyleSheetToWorld(mainThreadNormalWorld(), captionsOverrideStyleSheet, captionsStyleSheetURL, Vector<String>(),
Vector<String>(), InjectInAllFrames, UserStyleAuthorLevel, InjectInExistingDocuments);
}
String CaptionUserPreferences::primaryAudioTrackLanguageOverride() const
{
if (!m_primaryAudioTrackLanguageOverride.isEmpty())
return m_primaryAudioTrackLanguageOverride;
return defaultLanguage();
}
}
#endif // ENABLE(VIDEO_TRACK)
| [
"adzhou@hp.com"
] | adzhou@hp.com |
5b9246c5ce2ca41a7f1b86963c569ec06fb10365 | c2ade80654d1c3e3656a543db9970a306cb4d0c1 | /ch03/t3-24b.cc | d70dcadd6f0f76e2faa2d7a0515f6f4eade3383f | [] | no_license | YuhuiYin/CPP-Primer-Notes | 7bddd9f9b1f8b4979763f7d1decb5e3b4ac0ca7a | 0260c4f1f5ed295f29c7a097d4cc2a587d15bbd8 | refs/heads/master | 2022-03-22T18:27:49.055380 | 2019-12-05T11:36:59 | 2019-12-05T11:36:59 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 414 | cc | #include <iostream>
#include <vector>
using std::vector;
int main() {
vector<int> ivec;
int i;
while (std::cin >> i) {
ivec.push_back(i);
}
if (ivec.empty()) {
std::cout << "empty" << std::endl;
} else {
for (auto beg = ivec.cbegin(), end = ivec.cend() - 1; beg <= end; ++beg, --end)
std::cout << *beg + *end << std::endl;
}
return 0;
}
| [
"skd2278@gmail.com"
] | skd2278@gmail.com |
1b4d443844f33fb6ff76fe56d9633777455c4f9f | 3525924500ad4ad37acc2d683a58144d2f04b0ff | /src/compiler/code-assembler.cc | b0c916f29ea61e129914052231177b028b9b4799 | [
"BSD-3-Clause",
"SunPro",
"bzip2-1.0.6"
] | permissive | philipszdavido/v8 | cb3b6a552f5445d24ff70b6826713bf68d531c2a | de7a3174282a48fab9c167155ffc8ff20c37214d | refs/heads/master | 2021-04-28T09:48:21.333830 | 2018-02-17T06:00:51 | 2018-02-17T07:44:59 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 57,975 | cc | // Copyright 2015 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "src/compiler/code-assembler.h"
#include <ostream>
#include "src/code-factory.h"
#include "src/compiler/graph.h"
#include "src/compiler/instruction-selector.h"
#include "src/compiler/linkage.h"
#include "src/compiler/node-matchers.h"
#include "src/compiler/pipeline.h"
#include "src/compiler/raw-machine-assembler.h"
#include "src/compiler/schedule.h"
#include "src/frames.h"
#include "src/interface-descriptors.h"
#include "src/interpreter/bytecodes.h"
#include "src/machine-type.h"
#include "src/macro-assembler.h"
#include "src/objects-inl.h"
#include "src/utils.h"
#include "src/zone/zone.h"
#define REPEAT_1_TO_2(V, T) V(T) V(T, T)
#define REPEAT_1_TO_3(V, T) REPEAT_1_TO_2(V, T) V(T, T, T)
#define REPEAT_1_TO_4(V, T) REPEAT_1_TO_3(V, T) V(T, T, T, T)
#define REPEAT_1_TO_5(V, T) REPEAT_1_TO_4(V, T) V(T, T, T, T, T)
#define REPEAT_1_TO_6(V, T) REPEAT_1_TO_5(V, T) V(T, T, T, T, T, T)
#define REPEAT_1_TO_7(V, T) REPEAT_1_TO_6(V, T) V(T, T, T, T, T, T, T)
#define REPEAT_1_TO_8(V, T) REPEAT_1_TO_7(V, T) V(T, T, T, T, T, T, T, T)
#define REPEAT_1_TO_9(V, T) REPEAT_1_TO_8(V, T) V(T, T, T, T, T, T, T, T, T)
#define REPEAT_1_TO_10(V, T) REPEAT_1_TO_9(V, T) V(T, T, T, T, T, T, T, T, T, T)
#define REPEAT_1_TO_11(V, T) \
REPEAT_1_TO_10(V, T) V(T, T, T, T, T, T, T, T, T, T, T)
#define REPEAT_1_TO_12(V, T) \
REPEAT_1_TO_11(V, T) V(T, T, T, T, T, T, T, T, T, T, T, T)
namespace v8 {
namespace internal {
constexpr MachineType MachineTypeOf<Smi>::value;
constexpr MachineType MachineTypeOf<Object>::value;
namespace compiler {
static_assert(std::is_convertible<TNode<Number>, TNode<Object>>::value,
"test subtyping");
static_assert(std::is_convertible<TNode<UnionT<Smi, HeapNumber>>,
TNode<UnionT<Smi, HeapObject>>>::value,
"test subtyping");
static_assert(
!std::is_convertible<TNode<UnionT<Smi, HeapObject>>, TNode<Number>>::value,
"test subtyping");
CodeAssemblerState::CodeAssemblerState(
Isolate* isolate, Zone* zone, const CallInterfaceDescriptor& descriptor,
Code::Kind kind, const char* name, size_t result_size, uint32_t stub_key,
int32_t builtin_index)
// TODO(rmcilroy): Should we use Linkage::GetBytecodeDispatchDescriptor for
// bytecode handlers?
: CodeAssemblerState(
isolate, zone,
Linkage::GetStubCallDescriptor(
isolate, zone, descriptor, descriptor.GetStackParameterCount(),
CallDescriptor::kNoFlags, Operator::kNoProperties,
MachineType::AnyTagged(), result_size),
kind, name, stub_key, builtin_index) {}
CodeAssemblerState::CodeAssemblerState(Isolate* isolate, Zone* zone,
int parameter_count, Code::Kind kind,
const char* name, int32_t builtin_index)
: CodeAssemblerState(
isolate, zone,
Linkage::GetJSCallDescriptor(zone, false, parameter_count,
kind == Code::BUILTIN
? CallDescriptor::kPushArgumentCount
: CallDescriptor::kNoFlags),
kind, name, 0, builtin_index) {}
CodeAssemblerState::CodeAssemblerState(Isolate* isolate, Zone* zone,
CallDescriptor* call_descriptor,
Code::Kind kind, const char* name,
uint32_t stub_key, int32_t builtin_index)
: raw_assembler_(new RawMachineAssembler(
isolate, new (zone) Graph(zone), call_descriptor,
MachineType::PointerRepresentation(),
InstructionSelector::SupportedMachineOperatorFlags(),
InstructionSelector::AlignmentRequirements())),
kind_(kind),
name_(name),
stub_key_(stub_key),
builtin_index_(builtin_index),
code_generated_(false),
variables_(zone) {}
CodeAssemblerState::~CodeAssemblerState() {}
int CodeAssemblerState::parameter_count() const {
return static_cast<int>(raw_assembler_->call_descriptor()->ParameterCount());
}
CodeAssembler::~CodeAssembler() {}
#if DEBUG
void CodeAssemblerState::PrintCurrentBlock(std::ostream& os) {
raw_assembler_->PrintCurrentBlock(os);
}
bool CodeAssemblerState::InsideBlock() { return raw_assembler_->InsideBlock(); }
#endif
void CodeAssemblerState::SetInitialDebugInformation(const char* msg,
const char* file,
int line) {
#if DEBUG
AssemblerDebugInfo debug_info = {msg, file, line};
raw_assembler_->SetInitialDebugInformation(debug_info);
#endif // DEBUG
}
class BreakOnNodeDecorator final : public GraphDecorator {
public:
explicit BreakOnNodeDecorator(NodeId node_id) : node_id_(node_id) {}
void Decorate(Node* node) final {
if (node->id() == node_id_) {
base::OS::DebugBreak();
}
}
private:
NodeId node_id_;
};
void CodeAssembler::BreakOnNode(int node_id) {
Graph* graph = raw_assembler()->graph();
Zone* zone = graph->zone();
GraphDecorator* decorator =
new (zone) BreakOnNodeDecorator(static_cast<NodeId>(node_id));
graph->AddDecorator(decorator);
}
void CodeAssembler::RegisterCallGenerationCallbacks(
const CodeAssemblerCallback& call_prologue,
const CodeAssemblerCallback& call_epilogue) {
// The callback can be registered only once.
DCHECK(!state_->call_prologue_);
DCHECK(!state_->call_epilogue_);
state_->call_prologue_ = call_prologue;
state_->call_epilogue_ = call_epilogue;
}
void CodeAssembler::UnregisterCallGenerationCallbacks() {
state_->call_prologue_ = nullptr;
state_->call_epilogue_ = nullptr;
}
void CodeAssembler::CallPrologue() {
if (state_->call_prologue_) {
state_->call_prologue_();
}
}
void CodeAssembler::CallEpilogue() {
if (state_->call_epilogue_) {
state_->call_epilogue_();
}
}
bool CodeAssembler::Word32ShiftIsSafe() const {
return raw_assembler()->machine()->Word32ShiftIsSafe();
}
// static
Handle<Code> CodeAssembler::GenerateCode(CodeAssemblerState* state) {
DCHECK(!state->code_generated_);
RawMachineAssembler* rasm = state->raw_assembler_.get();
Schedule* schedule = rasm->Export();
JumpOptimizationInfo jump_opt;
bool should_optimize_jumps =
rasm->isolate()->serializer_enabled() && FLAG_turbo_rewrite_far_jumps;
Handle<Code> code = Pipeline::GenerateCodeForCodeStub(
rasm->isolate(), rasm->call_descriptor(), rasm->graph(), schedule,
state->kind_, state->name_, state->stub_key_, state->builtin_index_,
should_optimize_jumps ? &jump_opt : nullptr);
if (jump_opt.is_optimizable()) {
jump_opt.set_optimizing();
// Regenerate machine code
code = Pipeline::GenerateCodeForCodeStub(
rasm->isolate(), rasm->call_descriptor(), rasm->graph(), schedule,
state->kind_, state->name_, state->stub_key_, state->builtin_index_,
&jump_opt);
}
state->code_generated_ = true;
return code;
}
bool CodeAssembler::Is64() const { return raw_assembler()->machine()->Is64(); }
bool CodeAssembler::IsFloat64RoundUpSupported() const {
return raw_assembler()->machine()->Float64RoundUp().IsSupported();
}
bool CodeAssembler::IsFloat64RoundDownSupported() const {
return raw_assembler()->machine()->Float64RoundDown().IsSupported();
}
bool CodeAssembler::IsFloat64RoundTiesEvenSupported() const {
return raw_assembler()->machine()->Float64RoundTiesEven().IsSupported();
}
bool CodeAssembler::IsFloat64RoundTruncateSupported() const {
return raw_assembler()->machine()->Float64RoundTruncate().IsSupported();
}
bool CodeAssembler::IsInt32AbsWithOverflowSupported() const {
return raw_assembler()->machine()->Int32AbsWithOverflow().IsSupported();
}
bool CodeAssembler::IsInt64AbsWithOverflowSupported() const {
return raw_assembler()->machine()->Int64AbsWithOverflow().IsSupported();
}
bool CodeAssembler::IsIntPtrAbsWithOverflowSupported() const {
return Is64() ? IsInt64AbsWithOverflowSupported()
: IsInt32AbsWithOverflowSupported();
}
TNode<Int32T> CodeAssembler::Int32Constant(int32_t value) {
return UncheckedCast<Int32T>(raw_assembler()->Int32Constant(value));
}
TNode<Int64T> CodeAssembler::Int64Constant(int64_t value) {
return UncheckedCast<Int64T>(raw_assembler()->Int64Constant(value));
}
TNode<IntPtrT> CodeAssembler::IntPtrConstant(intptr_t value) {
return UncheckedCast<IntPtrT>(raw_assembler()->IntPtrConstant(value));
}
TNode<Number> CodeAssembler::NumberConstant(double value) {
int smi_value;
if (DoubleToSmiInteger(value, &smi_value)) {
return UncheckedCast<Number>(SmiConstant(smi_value));
} else {
return UncheckedCast<Number>(raw_assembler()->NumberConstant(value));
}
}
TNode<Smi> CodeAssembler::SmiConstant(Smi* value) {
return UncheckedCast<Smi>(
BitcastWordToTaggedSigned(IntPtrConstant(bit_cast<intptr_t>(value))));
}
TNode<Smi> CodeAssembler::SmiConstant(int value) {
return SmiConstant(Smi::FromInt(value));
}
TNode<HeapObject> CodeAssembler::UntypedHeapConstant(
Handle<HeapObject> object) {
return UncheckedCast<HeapObject>(raw_assembler()->HeapConstant(object));
}
TNode<String> CodeAssembler::StringConstant(const char* str) {
return UncheckedCast<String>(
HeapConstant(factory()->NewStringFromAsciiChecked(str, TENURED)));
}
TNode<Oddball> CodeAssembler::BooleanConstant(bool value) {
return UncheckedCast<Oddball>(raw_assembler()->BooleanConstant(value));
}
TNode<ExternalReference> CodeAssembler::ExternalConstant(
ExternalReference address) {
return UncheckedCast<ExternalReference>(
raw_assembler()->ExternalConstant(address));
}
TNode<Float64T> CodeAssembler::Float64Constant(double value) {
return UncheckedCast<Float64T>(raw_assembler()->Float64Constant(value));
}
TNode<HeapNumber> CodeAssembler::NaNConstant() {
return UncheckedCast<HeapNumber>(LoadRoot(Heap::kNanValueRootIndex));
}
bool CodeAssembler::ToInt32Constant(Node* node, int32_t& out_value) {
Int64Matcher m(node);
if (m.HasValue() &&
m.IsInRange(std::numeric_limits<int32_t>::min(),
std::numeric_limits<int32_t>::max())) {
out_value = static_cast<int32_t>(m.Value());
return true;
}
return false;
}
bool CodeAssembler::ToInt64Constant(Node* node, int64_t& out_value) {
Int64Matcher m(node);
if (m.HasValue()) out_value = m.Value();
return m.HasValue();
}
bool CodeAssembler::ToSmiConstant(Node* node, Smi*& out_value) {
if (node->opcode() == IrOpcode::kBitcastWordToTaggedSigned) {
node = node->InputAt(0);
}
IntPtrMatcher m(node);
if (m.HasValue()) {
intptr_t value = m.Value();
// Make sure that the value is actually a smi
CHECK_EQ(0, value & ((static_cast<intptr_t>(1) << kSmiShiftSize) - 1));
out_value = Smi::cast(bit_cast<Object*>(value));
return true;
}
return false;
}
bool CodeAssembler::ToIntPtrConstant(Node* node, intptr_t& out_value) {
if (node->opcode() == IrOpcode::kBitcastWordToTaggedSigned ||
node->opcode() == IrOpcode::kBitcastWordToTagged) {
node = node->InputAt(0);
}
IntPtrMatcher m(node);
if (m.HasValue()) out_value = m.Value();
return m.HasValue();
}
Node* CodeAssembler::Parameter(int value) {
return raw_assembler()->Parameter(value);
}
TNode<Context> CodeAssembler::GetJSContextParameter() {
auto call_descriptor = raw_assembler()->call_descriptor();
DCHECK(call_descriptor->IsJSFunctionCall());
return CAST(Parameter(Linkage::GetJSCallContextParamIndex(
static_cast<int>(call_descriptor->JSParameterCount()))));
}
void CodeAssembler::Return(SloppyTNode<Object> value) {
return raw_assembler()->Return(value);
}
void CodeAssembler::Return(SloppyTNode<Object> value1,
SloppyTNode<Object> value2) {
return raw_assembler()->Return(value1, value2);
}
void CodeAssembler::Return(SloppyTNode<Object> value1,
SloppyTNode<Object> value2,
SloppyTNode<Object> value3) {
return raw_assembler()->Return(value1, value2, value3);
}
void CodeAssembler::PopAndReturn(Node* pop, Node* value) {
return raw_assembler()->PopAndReturn(pop, value);
}
void CodeAssembler::ReturnIf(Node* condition, Node* value) {
Label if_return(this), if_continue(this);
Branch(condition, &if_return, &if_continue);
Bind(&if_return);
Return(value);
Bind(&if_continue);
}
void CodeAssembler::DebugAbort(Node* message) {
raw_assembler()->DebugAbort(message);
}
void CodeAssembler::DebugBreak() { raw_assembler()->DebugBreak(); }
void CodeAssembler::Unreachable() {
DebugBreak();
raw_assembler()->Unreachable();
}
void CodeAssembler::Comment(const char* format, ...) {
if (!FLAG_code_comments) return;
char buffer[4 * KB];
StringBuilder builder(buffer, arraysize(buffer));
va_list arguments;
va_start(arguments, format);
builder.AddFormattedList(format, arguments);
va_end(arguments);
// Copy the string before recording it in the assembler to avoid
// issues when the stack allocated buffer goes out of scope.
const int prefix_len = 2;
int length = builder.position() + 1;
char* copy = reinterpret_cast<char*>(malloc(length + prefix_len));
MemCopy(copy + prefix_len, builder.Finalize(), length);
copy[0] = ';';
copy[1] = ' ';
raw_assembler()->Comment(copy);
}
void CodeAssembler::Bind(Label* label) { return label->Bind(); }
#if DEBUG
void CodeAssembler::Bind(Label* label, AssemblerDebugInfo debug_info) {
return label->Bind(debug_info);
}
#endif // DEBUG
Node* CodeAssembler::LoadFramePointer() {
return raw_assembler()->LoadFramePointer();
}
Node* CodeAssembler::LoadParentFramePointer() {
return raw_assembler()->LoadParentFramePointer();
}
Node* CodeAssembler::LoadStackPointer() {
return raw_assembler()->LoadStackPointer();
}
Node* CodeAssembler::SpeculationPoison() {
return raw_assembler()->SpeculationPoison();
}
#define DEFINE_CODE_ASSEMBLER_BINARY_OP(name, ResType, Arg1Type, Arg2Type) \
TNode<ResType> CodeAssembler::name(SloppyTNode<Arg1Type> a, \
SloppyTNode<Arg2Type> b) { \
return UncheckedCast<ResType>(raw_assembler()->name(a, b)); \
}
CODE_ASSEMBLER_BINARY_OP_LIST(DEFINE_CODE_ASSEMBLER_BINARY_OP)
#undef DEFINE_CODE_ASSEMBLER_BINARY_OP
TNode<WordT> CodeAssembler::IntPtrAdd(SloppyTNode<WordT> left,
SloppyTNode<WordT> right) {
intptr_t left_constant;
bool is_left_constant = ToIntPtrConstant(left, left_constant);
intptr_t right_constant;
bool is_right_constant = ToIntPtrConstant(right, right_constant);
if (is_left_constant) {
if (is_right_constant) {
return IntPtrConstant(left_constant + right_constant);
}
if (left_constant == 0) {
return right;
}
} else if (is_right_constant) {
if (right_constant == 0) {
return left;
}
}
return UncheckedCast<WordT>(raw_assembler()->IntPtrAdd(left, right));
}
TNode<WordT> CodeAssembler::IntPtrSub(SloppyTNode<WordT> left,
SloppyTNode<WordT> right) {
intptr_t left_constant;
bool is_left_constant = ToIntPtrConstant(left, left_constant);
intptr_t right_constant;
bool is_right_constant = ToIntPtrConstant(right, right_constant);
if (is_left_constant) {
if (is_right_constant) {
return IntPtrConstant(left_constant - right_constant);
}
} else if (is_right_constant) {
if (right_constant == 0) {
return left;
}
}
return UncheckedCast<IntPtrT>(raw_assembler()->IntPtrSub(left, right));
}
TNode<WordT> CodeAssembler::IntPtrMul(SloppyTNode<WordT> left,
SloppyTNode<WordT> right) {
intptr_t left_constant;
bool is_left_constant = ToIntPtrConstant(left, left_constant);
intptr_t right_constant;
bool is_right_constant = ToIntPtrConstant(right, right_constant);
if (is_left_constant) {
if (is_right_constant) {
return IntPtrConstant(left_constant * right_constant);
}
if (base::bits::IsPowerOfTwo(left_constant)) {
return WordShl(right, WhichPowerOf2(left_constant));
}
} else if (is_right_constant) {
if (base::bits::IsPowerOfTwo(right_constant)) {
return WordShl(left, WhichPowerOf2(right_constant));
}
}
return UncheckedCast<IntPtrT>(raw_assembler()->IntPtrMul(left, right));
}
TNode<WordT> CodeAssembler::WordShl(SloppyTNode<WordT> value, int shift) {
return (shift != 0) ? WordShl(value, IntPtrConstant(shift)) : value;
}
TNode<WordT> CodeAssembler::WordShr(SloppyTNode<WordT> value, int shift) {
return (shift != 0) ? WordShr(value, IntPtrConstant(shift)) : value;
}
TNode<Word32T> CodeAssembler::Word32Shr(SloppyTNode<Word32T> value, int shift) {
return (shift != 0) ? Word32Shr(value, Int32Constant(shift)) : value;
}
TNode<WordT> CodeAssembler::WordOr(SloppyTNode<WordT> left,
SloppyTNode<WordT> right) {
intptr_t left_constant;
bool is_left_constant = ToIntPtrConstant(left, left_constant);
intptr_t right_constant;
bool is_right_constant = ToIntPtrConstant(right, right_constant);
if (is_left_constant) {
if (is_right_constant) {
return IntPtrConstant(left_constant | right_constant);
}
if (left_constant == 0) {
return right;
}
} else if (is_right_constant) {
if (right_constant == 0) {
return left;
}
}
return UncheckedCast<WordT>(raw_assembler()->WordOr(left, right));
}
TNode<WordT> CodeAssembler::WordAnd(SloppyTNode<WordT> left,
SloppyTNode<WordT> right) {
intptr_t left_constant;
bool is_left_constant = ToIntPtrConstant(left, left_constant);
intptr_t right_constant;
bool is_right_constant = ToIntPtrConstant(right, right_constant);
if (is_left_constant) {
if (is_right_constant) {
return IntPtrConstant(left_constant & right_constant);
}
}
return UncheckedCast<WordT>(raw_assembler()->WordAnd(left, right));
}
TNode<WordT> CodeAssembler::WordXor(SloppyTNode<WordT> left,
SloppyTNode<WordT> right) {
intptr_t left_constant;
bool is_left_constant = ToIntPtrConstant(left, left_constant);
intptr_t right_constant;
bool is_right_constant = ToIntPtrConstant(right, right_constant);
if (is_left_constant) {
if (is_right_constant) {
return IntPtrConstant(left_constant ^ right_constant);
}
}
return UncheckedCast<WordT>(raw_assembler()->WordXor(left, right));
}
TNode<WordT> CodeAssembler::WordShl(SloppyTNode<WordT> left,
SloppyTNode<IntegralT> right) {
intptr_t left_constant;
bool is_left_constant = ToIntPtrConstant(left, left_constant);
intptr_t right_constant;
bool is_right_constant = ToIntPtrConstant(right, right_constant);
if (is_left_constant) {
if (is_right_constant) {
return IntPtrConstant(left_constant << right_constant);
}
} else if (is_right_constant) {
if (right_constant == 0) {
return left;
}
}
return UncheckedCast<WordT>(raw_assembler()->WordShl(left, right));
}
TNode<WordT> CodeAssembler::WordShr(SloppyTNode<WordT> left,
SloppyTNode<IntegralT> right) {
intptr_t left_constant;
bool is_left_constant = ToIntPtrConstant(left, left_constant);
intptr_t right_constant;
bool is_right_constant = ToIntPtrConstant(right, right_constant);
if (is_left_constant) {
if (is_right_constant) {
return IntPtrConstant(static_cast<uintptr_t>(left_constant) >>
right_constant);
}
} else if (is_right_constant) {
if (right_constant == 0) {
return left;
}
}
return UncheckedCast<WordT>(raw_assembler()->WordShr(left, right));
}
TNode<WordT> CodeAssembler::WordSar(SloppyTNode<WordT> left,
SloppyTNode<IntegralT> right) {
intptr_t left_constant;
bool is_left_constant = ToIntPtrConstant(left, left_constant);
intptr_t right_constant;
bool is_right_constant = ToIntPtrConstant(right, right_constant);
if (is_left_constant) {
if (is_right_constant) {
return IntPtrConstant(left_constant >> right_constant);
}
} else if (is_right_constant) {
if (right_constant == 0) {
return left;
}
}
return UncheckedCast<WordT>(raw_assembler()->WordSar(left, right));
}
TNode<Word32T> CodeAssembler::Word32Or(SloppyTNode<Word32T> left,
SloppyTNode<Word32T> right) {
int32_t left_constant;
bool is_left_constant = ToInt32Constant(left, left_constant);
int32_t right_constant;
bool is_right_constant = ToInt32Constant(right, right_constant);
if (is_left_constant) {
if (is_right_constant) {
return Int32Constant(left_constant | right_constant);
}
if (left_constant == 0) {
return right;
}
} else if (is_right_constant) {
if (right_constant == 0) {
return left;
}
}
return UncheckedCast<Word32T>(raw_assembler()->Word32Or(left, right));
}
TNode<Word32T> CodeAssembler::Word32And(SloppyTNode<Word32T> left,
SloppyTNode<Word32T> right) {
int32_t left_constant;
bool is_left_constant = ToInt32Constant(left, left_constant);
int32_t right_constant;
bool is_right_constant = ToInt32Constant(right, right_constant);
if (is_left_constant) {
if (is_right_constant) {
return Int32Constant(left_constant & right_constant);
}
}
return UncheckedCast<Word32T>(raw_assembler()->Word32And(left, right));
}
TNode<Word32T> CodeAssembler::Word32Xor(SloppyTNode<Word32T> left,
SloppyTNode<Word32T> right) {
int32_t left_constant;
bool is_left_constant = ToInt32Constant(left, left_constant);
int32_t right_constant;
bool is_right_constant = ToInt32Constant(right, right_constant);
if (is_left_constant) {
if (is_right_constant) {
return Int32Constant(left_constant ^ right_constant);
}
}
return UncheckedCast<Word32T>(raw_assembler()->Word32Xor(left, right));
}
TNode<Word32T> CodeAssembler::Word32Shl(SloppyTNode<Word32T> left,
SloppyTNode<Word32T> right) {
int32_t left_constant;
bool is_left_constant = ToInt32Constant(left, left_constant);
int32_t right_constant;
bool is_right_constant = ToInt32Constant(right, right_constant);
if (is_left_constant) {
if (is_right_constant) {
return Int32Constant(left_constant << right_constant);
}
} else if (is_right_constant) {
if (right_constant == 0) {
return left;
}
}
return UncheckedCast<Word32T>(raw_assembler()->Word32Shl(left, right));
}
TNode<Word32T> CodeAssembler::Word32Shr(SloppyTNode<Word32T> left,
SloppyTNode<Word32T> right) {
int32_t left_constant;
bool is_left_constant = ToInt32Constant(left, left_constant);
int32_t right_constant;
bool is_right_constant = ToInt32Constant(right, right_constant);
if (is_left_constant) {
if (is_right_constant) {
return Int32Constant(static_cast<uint32_t>(left_constant) >>
right_constant);
}
} else if (is_right_constant) {
if (right_constant == 0) {
return left;
}
}
return UncheckedCast<Word32T>(raw_assembler()->Word32Shr(left, right));
}
TNode<Word32T> CodeAssembler::Word32Sar(SloppyTNode<Word32T> left,
SloppyTNode<Word32T> right) {
int32_t left_constant;
bool is_left_constant = ToInt32Constant(left, left_constant);
int32_t right_constant;
bool is_right_constant = ToInt32Constant(right, right_constant);
if (is_left_constant) {
if (is_right_constant) {
return Int32Constant(left_constant >> right_constant);
}
} else if (is_right_constant) {
if (right_constant == 0) {
return left;
}
}
return UncheckedCast<Word32T>(raw_assembler()->Word32Sar(left, right));
}
TNode<Word64T> CodeAssembler::Word64Or(SloppyTNode<Word64T> left,
SloppyTNode<Word64T> right) {
int64_t left_constant;
bool is_left_constant = ToInt64Constant(left, left_constant);
int64_t right_constant;
bool is_right_constant = ToInt64Constant(right, right_constant);
if (is_left_constant) {
if (is_right_constant) {
return Int64Constant(left_constant | right_constant);
}
if (left_constant == 0) {
return right;
}
} else if (is_right_constant) {
if (right_constant == 0) {
return left;
}
}
return UncheckedCast<Word64T>(raw_assembler()->Word64Or(left, right));
}
TNode<Word64T> CodeAssembler::Word64And(SloppyTNode<Word64T> left,
SloppyTNode<Word64T> right) {
int64_t left_constant;
bool is_left_constant = ToInt64Constant(left, left_constant);
int64_t right_constant;
bool is_right_constant = ToInt64Constant(right, right_constant);
if (is_left_constant) {
if (is_right_constant) {
return Int64Constant(left_constant & right_constant);
}
}
return UncheckedCast<Word64T>(raw_assembler()->Word64And(left, right));
}
TNode<Word64T> CodeAssembler::Word64Xor(SloppyTNode<Word64T> left,
SloppyTNode<Word64T> right) {
int64_t left_constant;
bool is_left_constant = ToInt64Constant(left, left_constant);
int64_t right_constant;
bool is_right_constant = ToInt64Constant(right, right_constant);
if (is_left_constant) {
if (is_right_constant) {
return Int64Constant(left_constant ^ right_constant);
}
}
return UncheckedCast<Word64T>(raw_assembler()->Word64Xor(left, right));
}
TNode<Word64T> CodeAssembler::Word64Shl(SloppyTNode<Word64T> left,
SloppyTNode<Word64T> right) {
int64_t left_constant;
bool is_left_constant = ToInt64Constant(left, left_constant);
int64_t right_constant;
bool is_right_constant = ToInt64Constant(right, right_constant);
if (is_left_constant) {
if (is_right_constant) {
return Int64Constant(left_constant << right_constant);
}
} else if (is_right_constant) {
if (right_constant == 0) {
return left;
}
}
return UncheckedCast<Word64T>(raw_assembler()->Word64Shl(left, right));
}
TNode<Word64T> CodeAssembler::Word64Shr(SloppyTNode<Word64T> left,
SloppyTNode<Word64T> right) {
int64_t left_constant;
bool is_left_constant = ToInt64Constant(left, left_constant);
int64_t right_constant;
bool is_right_constant = ToInt64Constant(right, right_constant);
if (is_left_constant) {
if (is_right_constant) {
return Int64Constant(static_cast<uint64_t>(left_constant) >>
right_constant);
}
} else if (is_right_constant) {
if (right_constant == 0) {
return left;
}
}
return UncheckedCast<Word64T>(raw_assembler()->Word64Shr(left, right));
}
TNode<Word64T> CodeAssembler::Word64Sar(SloppyTNode<Word64T> left,
SloppyTNode<Word64T> right) {
int64_t left_constant;
bool is_left_constant = ToInt64Constant(left, left_constant);
int64_t right_constant;
bool is_right_constant = ToInt64Constant(right, right_constant);
if (is_left_constant) {
if (is_right_constant) {
return Int64Constant(left_constant >> right_constant);
}
} else if (is_right_constant) {
if (right_constant == 0) {
return left;
}
}
return UncheckedCast<Word64T>(raw_assembler()->Word64Sar(left, right));
}
TNode<UintPtrT> CodeAssembler::ChangeUint32ToWord(SloppyTNode<Word32T> value) {
if (raw_assembler()->machine()->Is64()) {
return UncheckedCast<UintPtrT>(
raw_assembler()->ChangeUint32ToUint64(value));
}
return ReinterpretCast<UintPtrT>(value);
}
TNode<IntPtrT> CodeAssembler::ChangeInt32ToIntPtr(SloppyTNode<Word32T> value) {
if (raw_assembler()->machine()->Is64()) {
return ReinterpretCast<IntPtrT>(raw_assembler()->ChangeInt32ToInt64(value));
}
return ReinterpretCast<IntPtrT>(value);
}
TNode<UintPtrT> CodeAssembler::ChangeFloat64ToUintPtr(
SloppyTNode<Float64T> value) {
if (raw_assembler()->machine()->Is64()) {
return ReinterpretCast<UintPtrT>(
raw_assembler()->ChangeFloat64ToUint64(value));
}
return ReinterpretCast<UintPtrT>(
raw_assembler()->ChangeFloat64ToUint32(value));
}
Node* CodeAssembler::RoundIntPtrToFloat64(Node* value) {
if (raw_assembler()->machine()->Is64()) {
return raw_assembler()->RoundInt64ToFloat64(value);
}
return raw_assembler()->ChangeInt32ToFloat64(value);
}
#define DEFINE_CODE_ASSEMBLER_UNARY_OP(name, ResType, ArgType) \
TNode<ResType> CodeAssembler::name(SloppyTNode<ArgType> a) { \
return UncheckedCast<ResType>(raw_assembler()->name(a)); \
}
CODE_ASSEMBLER_UNARY_OP_LIST(DEFINE_CODE_ASSEMBLER_UNARY_OP)
#undef DEFINE_CODE_ASSEMBLER_UNARY_OP
Node* CodeAssembler::Load(MachineType rep, Node* base) {
return raw_assembler()->Load(rep, base);
}
Node* CodeAssembler::Load(MachineType rep, Node* base, Node* offset) {
return raw_assembler()->Load(rep, base, offset);
}
Node* CodeAssembler::AtomicLoad(MachineType rep, Node* base, Node* offset) {
return raw_assembler()->AtomicLoad(rep, base, offset);
}
TNode<Object> CodeAssembler::LoadRoot(Heap::RootListIndex root_index) {
if (isolate()->heap()->RootCanBeTreatedAsConstant(root_index)) {
Handle<Object> root = isolate()->heap()->root_handle(root_index);
if (root->IsSmi()) {
return SmiConstant(Smi::cast(*root));
} else {
return HeapConstant(Handle<HeapObject>::cast(root));
}
}
Node* roots_array_start =
ExternalConstant(ExternalReference::roots_array_start(isolate()));
return UncheckedCast<Object>(Load(MachineType::AnyTagged(), roots_array_start,
IntPtrConstant(root_index * kPointerSize)));
}
Node* CodeAssembler::Store(Node* base, Node* value) {
return raw_assembler()->Store(MachineRepresentation::kTagged, base, value,
kFullWriteBarrier);
}
Node* CodeAssembler::Store(Node* base, Node* offset, Node* value) {
return raw_assembler()->Store(MachineRepresentation::kTagged, base, offset,
value, kFullWriteBarrier);
}
Node* CodeAssembler::StoreWithMapWriteBarrier(Node* base, Node* offset,
Node* value) {
return raw_assembler()->Store(MachineRepresentation::kTagged, base, offset,
value, kMapWriteBarrier);
}
Node* CodeAssembler::StoreNoWriteBarrier(MachineRepresentation rep, Node* base,
Node* value) {
return raw_assembler()->Store(rep, base, value, kNoWriteBarrier);
}
Node* CodeAssembler::StoreNoWriteBarrier(MachineRepresentation rep, Node* base,
Node* offset, Node* value) {
return raw_assembler()->Store(rep, base, offset, value, kNoWriteBarrier);
}
Node* CodeAssembler::AtomicStore(MachineRepresentation rep, Node* base,
Node* offset, Node* value) {
return raw_assembler()->AtomicStore(rep, base, offset, value);
}
#define ATOMIC_FUNCTION(name) \
Node* CodeAssembler::Atomic##name(MachineType type, Node* base, \
Node* offset, Node* value) { \
return raw_assembler()->Atomic##name(type, base, offset, value); \
}
ATOMIC_FUNCTION(Exchange);
ATOMIC_FUNCTION(Add);
ATOMIC_FUNCTION(Sub);
ATOMIC_FUNCTION(And);
ATOMIC_FUNCTION(Or);
ATOMIC_FUNCTION(Xor);
#undef ATOMIC_FUNCTION
Node* CodeAssembler::AtomicCompareExchange(MachineType type, Node* base,
Node* offset, Node* old_value,
Node* new_value) {
return raw_assembler()->AtomicCompareExchange(type, base, offset, old_value,
new_value);
}
Node* CodeAssembler::StoreRoot(Heap::RootListIndex root_index, Node* value) {
DCHECK(Heap::RootCanBeWrittenAfterInitialization(root_index));
Node* roots_array_start =
ExternalConstant(ExternalReference::roots_array_start(isolate()));
return StoreNoWriteBarrier(MachineRepresentation::kTagged, roots_array_start,
IntPtrConstant(root_index * kPointerSize), value);
}
Node* CodeAssembler::Retain(Node* value) {
return raw_assembler()->Retain(value);
}
Node* CodeAssembler::Projection(int index, Node* value) {
return raw_assembler()->Projection(index, value);
}
void CodeAssembler::GotoIfException(Node* node, Label* if_exception,
Variable* exception_var) {
DCHECK(!node->op()->HasProperty(Operator::kNoThrow));
if (if_exception == nullptr) {
// If no handler is supplied, don't add continuations
return;
}
Label success(this), exception(this, Label::kDeferred);
success.MergeVariables();
exception.MergeVariables();
raw_assembler()->Continuations(node, success.label_, exception.label_);
Bind(&exception);
const Operator* op = raw_assembler()->common()->IfException();
Node* exception_value = raw_assembler()->AddNode(op, node, node);
if (exception_var != nullptr) {
exception_var->Bind(exception_value);
}
Goto(if_exception);
Bind(&success);
}
template <class... TArgs>
TNode<Object> CodeAssembler::CallRuntimeImpl(Runtime::FunctionId function,
SloppyTNode<Object> context,
TArgs... args) {
int argc = static_cast<int>(sizeof...(args));
auto call_descriptor = Linkage::GetRuntimeCallDescriptor(
zone(), function, argc, Operator::kNoProperties,
CallDescriptor::kNoFlags);
int return_count = static_cast<int>(call_descriptor->ReturnCount());
Node* centry =
HeapConstant(CodeFactory::RuntimeCEntry(isolate(), return_count));
Node* ref = ExternalConstant(ExternalReference(function, isolate()));
Node* arity = Int32Constant(argc);
Node* nodes[] = {centry, args..., ref, arity, context};
CallPrologue();
Node* return_value =
raw_assembler()->CallN(call_descriptor, arraysize(nodes), nodes);
CallEpilogue();
return UncheckedCast<Object>(return_value);
}
// Instantiate CallRuntime() for argument counts used by CSA-generated code
#define INSTANTIATE(...) \
template V8_EXPORT_PRIVATE TNode<Object> CodeAssembler::CallRuntimeImpl( \
Runtime::FunctionId, __VA_ARGS__);
REPEAT_1_TO_7(INSTANTIATE, SloppyTNode<Object>)
#undef INSTANTIATE
template <class... TArgs>
TNode<Object> CodeAssembler::TailCallRuntimeImpl(Runtime::FunctionId function,
SloppyTNode<Object> context,
TArgs... args) {
int argc = static_cast<int>(sizeof...(args));
auto call_descriptor = Linkage::GetRuntimeCallDescriptor(
zone(), function, argc, Operator::kNoProperties,
CallDescriptor::kNoFlags);
int return_count = static_cast<int>(call_descriptor->ReturnCount());
Node* centry =
HeapConstant(CodeFactory::RuntimeCEntry(isolate(), return_count));
Node* ref = ExternalConstant(ExternalReference(function, isolate()));
Node* arity = Int32Constant(argc);
Node* nodes[] = {centry, args..., ref, arity, context};
return UncheckedCast<Object>(
raw_assembler()->TailCallN(call_descriptor, arraysize(nodes), nodes));
}
// Instantiate TailCallRuntime() for argument counts used by CSA-generated code
#define INSTANTIATE(...) \
template V8_EXPORT_PRIVATE TNode<Object> CodeAssembler::TailCallRuntimeImpl( \
Runtime::FunctionId, __VA_ARGS__);
REPEAT_1_TO_7(INSTANTIATE, SloppyTNode<Object>)
#undef INSTANTIATE
template <class... TArgs>
Node* CodeAssembler::CallStubR(const CallInterfaceDescriptor& descriptor,
size_t result_size, Node* target, Node* context,
TArgs... args) {
Node* nodes[] = {target, args..., context};
int input_count = arraysize(nodes);
if (context == nullptr) --input_count;
return CallStubN(descriptor, result_size, input_count, nodes,
context != nullptr);
}
// Instantiate CallStubR() for argument counts used by CSA-generated code.
#define INSTANTIATE(...) \
template V8_EXPORT_PRIVATE Node* CodeAssembler::CallStubR( \
const CallInterfaceDescriptor& descriptor, size_t, Node*, __VA_ARGS__);
REPEAT_1_TO_11(INSTANTIATE, Node*)
#undef INSTANTIATE
Node* CodeAssembler::CallStubN(const CallInterfaceDescriptor& descriptor,
size_t result_size, int input_count,
Node* const* inputs, bool pass_context) {
// implicit nodes are target and optionally context.
int implicit_nodes = pass_context ? 2 : 1;
DCHECK_LE(implicit_nodes, input_count);
int argc = input_count - implicit_nodes;
DCHECK_LE(descriptor.GetParameterCount(), argc);
// Extra arguments not mentioned in the descriptor are passed on the stack.
int stack_parameter_count = argc - descriptor.GetRegisterParameterCount();
DCHECK_LE(descriptor.GetStackParameterCount(), stack_parameter_count);
auto call_descriptor = Linkage::GetStubCallDescriptor(
isolate(), zone(), descriptor, stack_parameter_count,
CallDescriptor::kNoFlags, Operator::kNoProperties,
MachineType::AnyTagged(), result_size,
pass_context ? Linkage::kPassContext : Linkage::kNoContext);
CallPrologue();
Node* return_value =
raw_assembler()->CallN(call_descriptor, input_count, inputs);
CallEpilogue();
return return_value;
}
template <class... TArgs>
Node* CodeAssembler::TailCallStubImpl(const CallInterfaceDescriptor& descriptor,
Node* target, Node* context,
TArgs... args) {
DCHECK_EQ(descriptor.GetParameterCount(), sizeof...(args));
size_t result_size = 1;
auto call_descriptor = Linkage::GetStubCallDescriptor(
isolate(), zone(), descriptor, descriptor.GetStackParameterCount(),
CallDescriptor::kNoFlags, Operator::kNoProperties,
MachineType::AnyTagged(), result_size);
Node* nodes[] = {target, args..., context};
CHECK_EQ(descriptor.GetParameterCount() + 2, arraysize(nodes));
return raw_assembler()->TailCallN(call_descriptor, arraysize(nodes), nodes);
}
// Instantiate TailCallStub() for argument counts used by CSA-generated code
#define INSTANTIATE(...) \
template V8_EXPORT_PRIVATE Node* CodeAssembler::TailCallStubImpl( \
const CallInterfaceDescriptor& descriptor, Node*, __VA_ARGS__);
REPEAT_1_TO_12(INSTANTIATE, Node*)
#undef INSTANTIATE
template <class... TArgs>
Node* CodeAssembler::TailCallStubThenBytecodeDispatch(
const CallInterfaceDescriptor& descriptor, Node* target, Node* context,
TArgs... args) {
DCHECK_LE(descriptor.GetParameterCount(), sizeof...(args));
// Extra arguments not mentioned in the descriptor are passed on the stack.
int stack_parameter_count =
sizeof...(args) - descriptor.GetRegisterParameterCount();
DCHECK_LE(descriptor.GetStackParameterCount(), stack_parameter_count);
auto call_descriptor = Linkage::GetStubCallDescriptor(
isolate(), zone(), descriptor, stack_parameter_count,
CallDescriptor::kNoFlags, Operator::kNoProperties,
MachineType::AnyTagged(), 0);
Node* nodes[] = {target, args..., context};
return raw_assembler()->TailCallN(call_descriptor, arraysize(nodes), nodes);
}
// Instantiate TailCallJSAndBytecodeDispatch() for argument counts used by
// CSA-generated code
#define INSTANTIATE(...) \
template V8_EXPORT_PRIVATE Node* \
CodeAssembler::TailCallStubThenBytecodeDispatch( \
const CallInterfaceDescriptor&, Node*, Node*, Node*, __VA_ARGS__);
REPEAT_1_TO_7(INSTANTIATE, Node*)
#undef INSTANTIATE
template <class... TArgs>
Node* CodeAssembler::TailCallBytecodeDispatch(
const CallInterfaceDescriptor& descriptor, Node* target, TArgs... args) {
DCHECK_EQ(descriptor.GetParameterCount(), sizeof...(args));
auto call_descriptor = Linkage::GetBytecodeDispatchCallDescriptor(
isolate(), zone(), descriptor, descriptor.GetStackParameterCount());
Node* nodes[] = {target, args...};
CHECK_EQ(descriptor.GetParameterCount() + 1, arraysize(nodes));
return raw_assembler()->TailCallN(call_descriptor, arraysize(nodes), nodes);
}
// Instantiate TailCallBytecodeDispatch() for argument counts used by
// CSA-generated code
template V8_EXPORT_PRIVATE Node* CodeAssembler::TailCallBytecodeDispatch(
const CallInterfaceDescriptor& descriptor, Node* target, Node*, Node*,
Node*, Node*);
Node* CodeAssembler::CallCFunctionN(Signature<MachineType>* signature,
int input_count, Node* const* inputs) {
auto call_descriptor = Linkage::GetSimplifiedCDescriptor(zone(), signature);
return raw_assembler()->CallN(call_descriptor, input_count, inputs);
}
Node* CodeAssembler::CallCFunction1(MachineType return_type,
MachineType arg0_type, Node* function,
Node* arg0) {
return raw_assembler()->CallCFunction1(return_type, arg0_type, function,
arg0);
}
Node* CodeAssembler::CallCFunction1WithCallerSavedRegisters(
MachineType return_type, MachineType arg0_type, Node* function, Node* arg0,
SaveFPRegsMode mode) {
DCHECK(return_type.LessThanOrEqualPointerSize());
return raw_assembler()->CallCFunction1WithCallerSavedRegisters(
return_type, arg0_type, function, arg0, mode);
}
Node* CodeAssembler::CallCFunction2(MachineType return_type,
MachineType arg0_type,
MachineType arg1_type, Node* function,
Node* arg0, Node* arg1) {
return raw_assembler()->CallCFunction2(return_type, arg0_type, arg1_type,
function, arg0, arg1);
}
Node* CodeAssembler::CallCFunction3(MachineType return_type,
MachineType arg0_type,
MachineType arg1_type,
MachineType arg2_type, Node* function,
Node* arg0, Node* arg1, Node* arg2) {
return raw_assembler()->CallCFunction3(return_type, arg0_type, arg1_type,
arg2_type, function, arg0, arg1, arg2);
}
Node* CodeAssembler::CallCFunction3WithCallerSavedRegisters(
MachineType return_type, MachineType arg0_type, MachineType arg1_type,
MachineType arg2_type, Node* function, Node* arg0, Node* arg1, Node* arg2,
SaveFPRegsMode mode) {
DCHECK(return_type.LessThanOrEqualPointerSize());
return raw_assembler()->CallCFunction3WithCallerSavedRegisters(
return_type, arg0_type, arg1_type, arg2_type, function, arg0, arg1, arg2,
mode);
}
Node* CodeAssembler::CallCFunction4(
MachineType return_type, MachineType arg0_type, MachineType arg1_type,
MachineType arg2_type, MachineType arg3_type, Node* function, Node* arg0,
Node* arg1, Node* arg2, Node* arg3) {
return raw_assembler()->CallCFunction4(return_type, arg0_type, arg1_type,
arg2_type, arg3_type, function, arg0,
arg1, arg2, arg3);
}
Node* CodeAssembler::CallCFunction5(
MachineType return_type, MachineType arg0_type, MachineType arg1_type,
MachineType arg2_type, MachineType arg3_type, MachineType arg4_type,
Node* function, Node* arg0, Node* arg1, Node* arg2, Node* arg3,
Node* arg4) {
return raw_assembler()->CallCFunction5(
return_type, arg0_type, arg1_type, arg2_type, arg3_type, arg4_type,
function, arg0, arg1, arg2, arg3, arg4);
}
Node* CodeAssembler::CallCFunction6(
MachineType return_type, MachineType arg0_type, MachineType arg1_type,
MachineType arg2_type, MachineType arg3_type, MachineType arg4_type,
MachineType arg5_type, Node* function, Node* arg0, Node* arg1, Node* arg2,
Node* arg3, Node* arg4, Node* arg5) {
return raw_assembler()->CallCFunction6(
return_type, arg0_type, arg1_type, arg2_type, arg3_type, arg4_type,
arg5_type, function, arg0, arg1, arg2, arg3, arg4, arg5);
}
Node* CodeAssembler::CallCFunction9(
MachineType return_type, MachineType arg0_type, MachineType arg1_type,
MachineType arg2_type, MachineType arg3_type, MachineType arg4_type,
MachineType arg5_type, MachineType arg6_type, MachineType arg7_type,
MachineType arg8_type, Node* function, Node* arg0, Node* arg1, Node* arg2,
Node* arg3, Node* arg4, Node* arg5, Node* arg6, Node* arg7, Node* arg8) {
return raw_assembler()->CallCFunction9(
return_type, arg0_type, arg1_type, arg2_type, arg3_type, arg4_type,
arg5_type, arg6_type, arg7_type, arg8_type, function, arg0, arg1, arg2,
arg3, arg4, arg5, arg6, arg7, arg8);
}
void CodeAssembler::Goto(Label* label) {
label->MergeVariables();
raw_assembler()->Goto(label->label_);
}
void CodeAssembler::GotoIf(SloppyTNode<IntegralT> condition,
Label* true_label) {
Label false_label(this);
Branch(condition, true_label, &false_label);
Bind(&false_label);
}
void CodeAssembler::GotoIfNot(SloppyTNode<IntegralT> condition,
Label* false_label) {
Label true_label(this);
Branch(condition, &true_label, false_label);
Bind(&true_label);
}
void CodeAssembler::Branch(SloppyTNode<IntegralT> condition, Label* true_label,
Label* false_label) {
true_label->MergeVariables();
false_label->MergeVariables();
return raw_assembler()->Branch(condition, true_label->label_,
false_label->label_);
}
void CodeAssembler::Switch(Node* index, Label* default_label,
const int32_t* case_values, Label** case_labels,
size_t case_count) {
RawMachineLabel** labels =
new (zone()->New(sizeof(RawMachineLabel*) * case_count))
RawMachineLabel*[case_count];
for (size_t i = 0; i < case_count; ++i) {
labels[i] = case_labels[i]->label_;
case_labels[i]->MergeVariables();
}
default_label->MergeVariables();
return raw_assembler()->Switch(index, default_label->label_, case_values,
labels, case_count);
}
bool CodeAssembler::UnalignedLoadSupported(MachineRepresentation rep) const {
return raw_assembler()->machine()->UnalignedLoadSupported(rep);
}
bool CodeAssembler::UnalignedStoreSupported(MachineRepresentation rep) const {
return raw_assembler()->machine()->UnalignedStoreSupported(rep);
}
// RawMachineAssembler delegate helpers:
Isolate* CodeAssembler::isolate() const { return raw_assembler()->isolate(); }
Factory* CodeAssembler::factory() const { return isolate()->factory(); }
Zone* CodeAssembler::zone() const { return raw_assembler()->zone(); }
RawMachineAssembler* CodeAssembler::raw_assembler() const {
return state_->raw_assembler_.get();
}
// The core implementation of Variable is stored through an indirection so
// that it can outlive the often block-scoped Variable declarations. This is
// needed to ensure that variable binding and merging through phis can
// properly be verified.
class CodeAssemblerVariable::Impl : public ZoneObject {
public:
explicit Impl(MachineRepresentation rep)
:
#if DEBUG
debug_info_(AssemblerDebugInfo(nullptr, nullptr, -1)),
#endif
value_(nullptr),
rep_(rep) {
}
#if DEBUG
AssemblerDebugInfo debug_info() const { return debug_info_; }
void set_debug_info(AssemblerDebugInfo debug_info) {
debug_info_ = debug_info;
}
AssemblerDebugInfo debug_info_;
#endif // DEBUG
Node* value_;
MachineRepresentation rep_;
};
CodeAssemblerVariable::CodeAssemblerVariable(CodeAssembler* assembler,
MachineRepresentation rep)
: impl_(new (assembler->zone()) Impl(rep)), state_(assembler->state()) {
state_->variables_.insert(impl_);
}
CodeAssemblerVariable::CodeAssemblerVariable(CodeAssembler* assembler,
MachineRepresentation rep,
Node* initial_value)
: CodeAssemblerVariable(assembler, rep) {
Bind(initial_value);
}
#if DEBUG
CodeAssemblerVariable::CodeAssemblerVariable(CodeAssembler* assembler,
AssemblerDebugInfo debug_info,
MachineRepresentation rep)
: impl_(new (assembler->zone()) Impl(rep)), state_(assembler->state()) {
impl_->set_debug_info(debug_info);
state_->variables_.insert(impl_);
}
CodeAssemblerVariable::CodeAssemblerVariable(CodeAssembler* assembler,
AssemblerDebugInfo debug_info,
MachineRepresentation rep,
Node* initial_value)
: CodeAssemblerVariable(assembler, debug_info, rep) {
impl_->set_debug_info(debug_info);
Bind(initial_value);
}
#endif // DEBUG
CodeAssemblerVariable::~CodeAssemblerVariable() {
state_->variables_.erase(impl_);
}
void CodeAssemblerVariable::Bind(Node* value) { impl_->value_ = value; }
Node* CodeAssemblerVariable::value() const {
#if DEBUG
if (!IsBound()) {
std::stringstream str;
str << "#Use of unbound variable:"
<< "#\n Variable: " << *this << "#\n Current Block: ";
state_->PrintCurrentBlock(str);
FATAL("%s", str.str().c_str());
}
if (!state_->InsideBlock()) {
std::stringstream str;
str << "#Accessing variable value outside a block:"
<< "#\n Variable: " << *this;
FATAL("%s", str.str().c_str());
}
#endif // DEBUG
return impl_->value_;
}
MachineRepresentation CodeAssemblerVariable::rep() const { return impl_->rep_; }
bool CodeAssemblerVariable::IsBound() const { return impl_->value_ != nullptr; }
std::ostream& operator<<(std::ostream& os,
const CodeAssemblerVariable::Impl& impl) {
#if DEBUG
AssemblerDebugInfo info = impl.debug_info();
if (info.name) os << "V" << info;
#endif // DEBUG
return os;
}
std::ostream& operator<<(std::ostream& os,
const CodeAssemblerVariable& variable) {
os << *variable.impl_;
return os;
}
CodeAssemblerLabel::CodeAssemblerLabel(CodeAssembler* assembler,
size_t vars_count,
CodeAssemblerVariable* const* vars,
CodeAssemblerLabel::Type type)
: bound_(false),
merge_count_(0),
state_(assembler->state()),
label_(nullptr) {
void* buffer = assembler->zone()->New(sizeof(RawMachineLabel));
label_ = new (buffer)
RawMachineLabel(type == kDeferred ? RawMachineLabel::kDeferred
: RawMachineLabel::kNonDeferred);
for (size_t i = 0; i < vars_count; ++i) {
variable_phis_[vars[i]->impl_] = nullptr;
}
}
CodeAssemblerLabel::~CodeAssemblerLabel() { label_->~RawMachineLabel(); }
void CodeAssemblerLabel::MergeVariables() {
++merge_count_;
for (CodeAssemblerVariable::Impl* var : state_->variables_) {
size_t count = 0;
Node* node = var->value_;
if (node != nullptr) {
auto i = variable_merges_.find(var);
if (i != variable_merges_.end()) {
i->second.push_back(node);
count = i->second.size();
} else {
count = 1;
variable_merges_[var] = std::vector<Node*>(1, node);
}
}
// If the following asserts, then you've jumped to a label without a bound
// variable along that path that expects to merge its value into a phi.
DCHECK(variable_phis_.find(var) == variable_phis_.end() ||
count == merge_count_);
USE(count);
// If the label is already bound, we already know the set of variables to
// merge and phi nodes have already been created.
if (bound_) {
auto phi = variable_phis_.find(var);
if (phi != variable_phis_.end()) {
DCHECK_NOT_NULL(phi->second);
state_->raw_assembler_->AppendPhiInput(phi->second, node);
} else {
auto i = variable_merges_.find(var);
if (i != variable_merges_.end()) {
// If the following assert fires, then you've declared a variable that
// has the same bound value along all paths up until the point you
// bound this label, but then later merged a path with a new value for
// the variable after the label bind (it's not possible to add phis to
// the bound label after the fact, just make sure to list the variable
// in the label's constructor's list of merged variables).
#if DEBUG
if (find_if(i->second.begin(), i->second.end(),
[node](Node* e) -> bool { return node != e; }) !=
i->second.end()) {
std::stringstream str;
str << "Unmerged variable found when jumping to block. \n"
<< "# Variable: " << *var;
if (bound_) {
str << "\n# Target block: " << *label_->block();
}
str << "\n# Current Block: ";
state_->PrintCurrentBlock(str);
FATAL("%s", str.str().c_str());
}
#endif // DEBUG
}
}
}
}
}
#if DEBUG
void CodeAssemblerLabel::Bind(AssemblerDebugInfo debug_info) {
if (bound_) {
std::stringstream str;
str << "Cannot bind the same label twice:"
<< "\n# current: " << debug_info
<< "\n# previous: " << *label_->block();
FATAL("%s", str.str().c_str());
}
state_->raw_assembler_->Bind(label_, debug_info);
UpdateVariablesAfterBind();
}
#endif // DEBUG
void CodeAssemblerLabel::Bind() {
DCHECK(!bound_);
state_->raw_assembler_->Bind(label_);
UpdateVariablesAfterBind();
}
void CodeAssemblerLabel::UpdateVariablesAfterBind() {
// Make sure that all variables that have changed along any path up to this
// point are marked as merge variables.
for (auto var : state_->variables_) {
Node* shared_value = nullptr;
auto i = variable_merges_.find(var);
if (i != variable_merges_.end()) {
for (auto value : i->second) {
DCHECK_NOT_NULL(value);
if (value != shared_value) {
if (shared_value == nullptr) {
shared_value = value;
} else {
variable_phis_[var] = nullptr;
}
}
}
}
}
for (auto var : variable_phis_) {
CodeAssemblerVariable::Impl* var_impl = var.first;
auto i = variable_merges_.find(var_impl);
#if DEBUG
bool not_found = i == variable_merges_.end();
if (not_found || i->second.size() != merge_count_) {
std::stringstream str;
str << "A variable that has been marked as beeing merged at the label"
<< "\n# doesn't have a bound value along all of the paths that "
<< "\n# have been merged into the label up to this point."
<< "\n#"
<< "\n# This can happen in the following cases:"
<< "\n# - By explicitly marking it so in the label constructor"
<< "\n# - By having seen different bound values at branches"
<< "\n#"
<< "\n# Merge count: expected=" << merge_count_
<< " vs. found=" << (not_found ? 0 : i->second.size())
<< "\n# Variable: " << *var_impl
<< "\n# Current Block: " << *label_->block();
FATAL("%s", str.str().c_str());
}
#endif // DEBUG
Node* phi = state_->raw_assembler_->Phi(
var.first->rep_, static_cast<int>(merge_count_), &(i->second[0]));
variable_phis_[var_impl] = phi;
}
// Bind all variables to a merge phi, the common value along all paths or
// null.
for (auto var : state_->variables_) {
auto i = variable_phis_.find(var);
if (i != variable_phis_.end()) {
var->value_ = i->second;
} else {
auto j = variable_merges_.find(var);
if (j != variable_merges_.end() && j->second.size() == merge_count_) {
var->value_ = j->second.back();
} else {
var->value_ = nullptr;
}
}
}
bound_ = true;
}
} // namespace compiler
Smi* CheckObjectType(Object* value, Smi* type, String* location) {
#ifdef DEBUG
const char* expected;
switch (static_cast<ObjectType>(type->value())) {
#define TYPE_CASE(Name) \
case ObjectType::k##Name: \
if (value->Is##Name()) return Smi::FromInt(0); \
expected = #Name; \
break;
#define TYPE_STRUCT_CASE(NAME, Name, name) \
case ObjectType::k##Name: \
if (value->Is##Name()) return Smi::FromInt(0); \
expected = #Name; \
break;
TYPE_CASE(Object)
OBJECT_TYPE_LIST(TYPE_CASE)
HEAP_OBJECT_TYPE_LIST(TYPE_CASE)
STRUCT_LIST(TYPE_STRUCT_CASE)
#undef TYPE_CASE
#undef TYPE_STRUCT_CASE
}
std::stringstream value_description;
value->Print(value_description);
V8_Fatal(__FILE__, __LINE__,
"Type cast failed in %s\n"
" Expected %s but found %s",
location->ToAsciiArray(), expected, value_description.str().c_str());
#else
UNREACHABLE();
#endif
}
} // namespace internal
} // namespace v8
| [
"commit-bot@chromium.org"
] | commit-bot@chromium.org |
374333943e35fc1edff7860bcdd343d5e86b5e62 | cffc460605febc80e8bb7c417266bde1bd1988eb | /before2020/ZeroJudge/ZJ b183.cpp | 72bc9c6326397a63eead814714ca401b1c951bae | [] | 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 | 786 | cpp | #include <iostream>
#include <string>
#include <map>
using namespace std;
int n,m,a[6];
map <string,int> mm;
struct pair{
int first,second;
}v[30];
bool dfs(int x) {
bool ox1=0,ox2=0,ox=0;
if (x==m) return 1;
if (!(a[v[x].first]+1>n)) {
ox1=1;
a[v[x].first]++;
if (dfs(x+1)) ox=1;
}
if (ox1) a[v[x].first]--;
if (!(a[v[x].second]+1>n)) {
ox2=1;
a[v[x].second]++;
if (dfs(x+1)) ox=1;
}
if (ox2) a[v[x].second]--;
return ox;
}
int main() {
string t1,t2,s[6]={"XXL","XL","L","M","S","XS"};
int i;
for (i=0;i<6;i++) mm[s[i]]=i;
while (cin>>n>>m) {
n/=6;
for (i=0;i<m;i++) {
cin>>t1>>t2;
v[i].first=mm[t1],v[i].second=mm[t2];
}
memset(a,0,sizeof(a));
if (dfs(0)) cout<<"YES\n";
else cout<<"NO\n";
}
} | [
"m80126colin@gmail.com"
] | m80126colin@gmail.com |
c75bec3161ae3c762a5399779eed5598b701e9ca | cb80a8562d90eb969272a7ff2cf52c1fa7aeb084 | /inletTest3/0.133/turbulenceProperties.I | e15e5777108fb69f0c4ddf404e2d2fbb9590a179 | [] | no_license | mahoep/inletCFD | eb516145fad17408f018f51e32aa0604871eaa95 | 0df91e3fbfa60d5db9d52739e212ca6d3f0a28b2 | refs/heads/main | 2023-08-30T22:07:41.314690 | 2021-10-14T19:23:51 | 2021-10-14T19:23:51 | 314,657,843 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 154,355 | i | /*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2006 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0.133";
object turbulenceProperties:I;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField nonuniform List<scalar>
16277
(
0.149977
0.149976
0.149984
0.149986
0.149992
0.149991
0.149992
0.149995
0.150002
0.15001
0.150016
0.150018
0.150018
0.150017
0.150015
0.150013
0.150011
0.150009
0.150008
0.150007
0.150006
0.150005
0.150005
0.150004
0.150004
0.150003
0.150003
0.150003
0.150002
0.150002
0.150002
0.150002
0.150002
0.150002
0.150002
0.150002
0.150002
0.150002
0.150002
0.150001
0.150001
0.150001
0.150001
0.150001
0.150001
0.150001
0.150001
0.150001
0.150001
0.150001
0.150001
0.150001
0.150001
0.150001
0.150001
0.150001
0.150001
0.150001
0.150001
0.150001
0.150001
0.150001
0.150001
0.150001
0.150001
0.150001
0.150001
0.150001
0.15
0.15
0.15
0.15
0.15
0.15
0.149999
0.149999
0.149998
0.149997
0.149996
0.149995
0.149998
0.150005
0.150018
0.150031
0.150035
0.150024
0.150006
0.149987
0.149966
0.149968
0.149981
0.149977
0.149989
0.150008
0.149873
0.149304
0.14506
0.13908
0.145978
0.148746
0.14598
0.139197
0.133277
0.129405
0.135533
0.143821
0.139875
0.129548
0.125376
0.123121
0.127253
0.138208
0.13454
0.122608
0.120471
0.119191
0.121243
0.133289
0.130277
0.117866
0.11744
0.116712
0.117167
0.12941
0.126995
0.114912
0.115549
0.115163
0.114556
0.126377
0.124398
0.112921
0.11435
0.114172
0.112769
0.123968
0.122297
0.111519
0.113571
0.113515
0.111487
0.121994
0.120553
0.110494
0.113058
0.113089
0.110551
0.12035
0.119086
0.109736
0.112727
0.112809
0.10985
0.118957
0.11782
0.109151
0.112502
0.112616
0.109299
0.117745
0.116713
0.108685
0.112351
0.112489
0.10886
0.116682
0.115736
0.10831
0.112254
0.112407
0.108505
0.115741
0.114868
0.108006
0.112194
0.112358
0.108219
0.114904
0.114093
0.107762
0.112163
0.112336
0.10799
0.114157
0.113401
0.107571
0.112155
0.112336
0.107813
0.11349
0.112785
0.107427
0.112167
0.112356
0.107684
0.112899
0.112242
0.107327
0.112198
0.112393
0.107599
0.112381
0.111771
0.107272
0.112246
0.112448
0.10756
0.111934
0.111369
0.10726
0.112309
0.112519
0.107565
0.111556
0.111032
0.107291
0.11239
0.112607
0.107613
0.111242
0.110757
0.107364
0.112486
0.112712
0.107701
0.11099
0.110542
0.107476
0.112599
0.112833
0.10783
0.110797
0.110383
0.107626
0.112727
0.11297
0.107998
0.11066
0.11028
0.107814
0.112871
0.113123
0.108203
0.110579
0.11023
0.108038
0.11303
0.113293
0.108445
0.110551
0.110233
0.108298
0.113205
0.113478
0.108725
0.110578
0.110288
0.108595
0.113396
0.11368
0.109042
0.110657
0.110395
0.108928
0.113603
0.113898
0.109396
0.110788
0.110554
0.109299
0.113826
0.114132
0.109789
0.110973
0.110766
0.109707
0.114065
0.114384
0.110221
0.11121
0.111031
0.110154
0.114319
0.114651
0.110692
0.111502
0.111349
0.11064
0.11459
0.114935
0.111205
0.111849
0.111721
0.111167
0.114875
0.115234
0.111759
0.112249
0.112147
0.111736
0.115175
0.115547
0.112355
0.112704
0.112626
0.112344
0.115487
0.115871
0.11299
0.113211
0.113156
0.112989
0.115808
0.116204
0.113661
0.113768
0.113732
0.113668
0.116135
0.11654
0.114364
0.114369
0.11435
0.114376
0.116461
0.116873
0.115093
0.115009
0.115002
0.115106
0.116781
0.117194
0.115838
0.115677
0.115676
0.115845
0.117083
0.117493
0.116586
0.116362
0.116359
0.116581
0.117356
0.117756
0.117319
0.117045
0.11703
0.117292
0.117584
0.117965
0.118014
0.117702
0.117661
0.117952
0.117748
0.118098
0.11864
0.118304
0.118222
0.118528
0.117825
0.118132
0.11916
0.118814
0.118673
0.118984
0.117788
0.118038
0.119532
0.119191
0.118972
0.119276
0.117618
0.117758
0.119687
0.119392
0.119067
0.119301
0.117292
0.117289
0.119541
0.119349
0.118902
0.119016
0.116784
0.116626
0.119064
0.119022
0.118442
0.118398
0.116129
0.115785
0.118244
0.118387
0.117674
0.117448
0.115301
0.114826
0.11711
0.117455
0.116628
0.1162
0.114282
0.113753
0.115654
0.116221
0.115268
0.114595
0.113077
0.112522
0.113851
0.114676
0.113623
0.112689
0.111785
0.111302
0.111846
0.112929
0.111839
0.11067
0.110575
0.110161
0.109779
0.111081
0.109992
0.108639
0.109473
0.109134
0.107752
0.109212
0.108158
0.106689
0.108506
0.108247
0.105842
0.107385
0.106395
0.104875
0.107691
0.107513
0.10411
0.105656
0.104749
0.103217
0.107034
0.106929
0.102576
0.104078
0.10325
0.101771
0.106532
0.106492
0.101258
0.10266
0.101904
0.100547
0.106178
0.106194
0.10016
0.10142
0.100743
0.0995472
0.105959
0.10602
0.0992794
0.100363
0.0997671
0.0987652
0.105857
0.105953
0.0986081
0.0994843
0.0989693
0.0981815
0.105849
0.105974
0.098106
0.0987696
0.0983279
0.0977583
0.105921
0.106063
0.0977559
0.0981982
0.097823
0.0974803
0.106051
0.106201
0.0975403
0.0977502
0.097434
0.0973278
0.106223
0.106371
0.0974343
0.0974038
0.0971381
0.0972767
0.106419
0.106559
0.0974157
0.0971365
0.0969123
0.0973027
0.106624
0.106751
0.0974611
0.0969271
0.0967345
0.0973827
0.106826
0.106936
0.0975476
0.0967535
0.0965856
0.0974946
0.107016
0.107102
0.0976556
0.0966019
0.0964457
0.0976201
0.107187
0.107253
0.0977701
0.0964629
0.096312
0.0977465
0.107341
0.107388
0.0978813
0.0963278
0.0961785
0.0978652
0.107475
0.107511
0.0979831
0.0961941
0.0960366
0.0979664
0.107589
0.107618
0.0980697
0.0960527
0.0958824
0.098044
0.107673
0.107702
0.0981385
0.0958975
0.0957158
0.0981039
0.107743
0.107767
0.0981873
0.095728
0.0955336
0.0981435
0.107796
0.107818
0.0982161
0.0955417
0.0953363
0.0981618
0.107834
0.107854
0.0982258
0.095342
0.0951245
0.0981639
0.107866
0.10788
0.0982145
0.0951248
0.0948983
0.0981452
0.107883
0.10789
0.0981829
0.0948888
0.0946466
0.0980982
0.107879
0.107887
0.0981311
0.0946348
0.0943873
0.0980421
0.10788
0.107886
0.0980709
0.0943717
0.0941186
0.0979678
0.107864
0.107861
0.0979849
0.0940886
0.0938188
0.0978683
0.107831
0.107826
0.0978724
0.093782
0.0934811
0.0977226
0.10779
0.107694
0.0976854
0.0934192
0.0931374
0.0976261
0.107653
0.107433
0.0972557
0.0928872
0.0926391
0.0971346
0.106993
0.106284
0.0955902
0.0919003
0.0928387
0.0958808
0.104147
0.105092
0.0933924
0.0906039
0.0953321
0.100926
0.107143
0.11269
0.11635
0.120711
0.12352
0.125771
0.127337
0.128392
0.128919
0.12895
0.128437
0.127318
0.125554
0.122568
0.120264
0.115108
0.110276
0.105085
0.10038
0.0991331
0.102179
0.115982
0.1313
0.133443
0.117524
0.103067
0.104101
0.119196
0.135199
0.136229
0.120353
0.104787
0.105261
0.12096
0.13711
0.137398
0.121289
0.105466
0.105776
0.121503
0.137712
0.137763
0.12171
0.105908
0.105988
0.121782
0.137805
0.137803
0.121782
0.106078
0.106108
0.121799
0.137781
0.137783
0.121815
0.106202
0.106219
0.121806
0.137756
0.137706
0.1218
0.106309
0.106333
0.121789
0.137688
0.137643
0.121799
0.106424
0.106447
0.12177
0.137597
0.137575
0.1218
0.106547
0.106558
0.121755
0.137506
0.137486
0.121786
0.106668
0.106681
0.121782
0.137454
0.137402
0.121768
0.106777
0.106799
0.121777
0.137374
0.137333
0.121766
0.106879
0.10689
0.121766
0.137303
0.137276
0.121753
0.106988
0.106999
0.121731
0.137212
0.137169
0.121727
0.107117
0.107138
0.12172
0.137118
0.137065
0.121707
0.10725
0.10727
0.121717
0.137032
0.136982
0.121711
0.107389
0.107411
0.121724
0.136943
0.13689
0.121713
0.107526
0.107547
0.121725
0.136851
0.136818
0.121731
0.107663
0.107684
0.121729
0.136769
0.136749
0.121761
0.107798
0.107813
0.121737
0.1367
0.136666
0.121756
0.107934
0.107955
0.121748
0.136627
0.136571
0.121757
0.108077
0.108101
0.121734
0.136523
0.136483
0.12176
0.108227
0.108247
0.121755
0.136433
0.136398
0.12179
0.108381
0.108403
0.121766
0.136343
0.136291
0.121796
0.108539
0.108562
0.121806
0.136254
0.136221
0.121848
0.108683
0.108696
0.12183
0.136172
0.136153
0.121877
0.108819
0.10883
0.121875
0.136112
0.136084
0.121913
0.108947
0.108955
0.121881
0.136029
0.135994
0.121919
0.109071
0.109071
0.121907
0.135946
0.135921
0.121955
0.109168
0.109153
0.121928
0.135877
0.135861
0.121971
0.109242
0.109225
0.12196
0.135828
0.135793
0.121992
0.109293
0.109251
0.121954
0.135749
0.135745
0.121982
0.109283
0.109226
0.121941
0.135711
0.135675
0.121913
0.109244
0.109161
0.121865
0.135626
0.135604
0.121814
0.109101
0.108982
0.121723
0.13557
0.135514
0.121583
0.108889
0.108739
0.121442
0.135449
0.135379
0.121257
0.108606
0.108422
0.121048
0.135289
0.135202
0.120811
0.108223
0.107941
0.120519
0.135102
0.135009
0.120183
0.107671
0.107306
0.119783
0.134897
0.134741
0.11932
0.106989
0.106534
0.118765
0.134555
0.134383
0.1182
0.106139
0.105595
0.117509
0.134173
0.133899
0.116718
0.105167
0.104593
0.115809
0.133532
0.133143
0.114856
0.104102
0.103366
0.113788
0.132768
0.132358
0.11266
0.10278
0.101964
0.111372
0.131899
0.131483
0.110152
0.101295
0.100391
0.108673
0.131041
0.130469
0.10715
0.099718
0.0989491
0.10537
0.129747
0.128944
0.103611
0.0982588
0.097381
0.101601
0.127989
0.126813
0.0998284
0.0965767
0.0957688
0.0981526
0.125393
0.124069
0.0961394
0.0951033
0.0945377
0.0943259
0.122894
0.121691
0.0932382
0.0945228
0.0942436
0.0923206
0.120609
0.119627
0.0909341
0.0945623
0.0946072
0.0902086
0.118533
0.117292
0.08963
0.0953064
0.0956677
0.0893849
0.116072
0.115171
0.089804
0.0969587
0.0975098
0.0898529
0.114355
0.113499
0.0910436
0.0992501
0.100453
0.0925164
0.112454
0.112698
0.0959863
0.103301
0.104922
0.0986722
0.113872
0.133767
0.0908455
0.0856267
0.0975329
0.0948897
0.126313
0.125665
0.0914832
0.0967056
0.0975407
0.0904367
0.125207
0.123895
0.0892167
0.0970143
0.0983232
0.0889878
0.122695
0.120828
0.0882907
0.0982957
0.100832
0.0891746
0.118891
0.117242
0.0893088
0.10122
0.104685
0.0920157
0.11576
0.114713
0.093261
0.105957
0.111211
0.0983869
0.114745
0.115516
0.101384
0.11388
0.0882161
0.0888218
0.129751
0.12145
0.0945263
0.106343
0.107032
0.0936294
0.119346
0.117141
0.0964871
0.112742
0.114329
0.0971912
0.11593
0.114931
0.100664
0.118792
0.120883
0.102443
0.114467
0.115867
0.108142
0.126416
0.128462
0.112548
0.118398
0.127177
0.0937429
0.0971741
0.120617
0.10091
0.121072
0.119321
0.100646
0.122153
0.12815
0.105678
0.119172
0.119035
0.107445
0.129696
0.138102
0.116139
0.120645
0.123897
0.122325
0.14185
0.107906
0.09912
0.129539
0.122506
0.111476
0.137925
0.141561
0.114253
0.121343
0.12288
0.12517
0.15284
0.157779
0.131911
0.125808
0.13204
0.142364
0.163951
0.125962
0.110457
0.131317
0.127848
0.129662
0.161757
0.166007
0.133542
0.129246
0.134589
0.15242
0.182422
0.189745
0.163225
0.141465
0.136072
0.12547
0.152086
0.196031
0.158021
0.137598
0.141532
0.166944
0.206019
0.229897
0.195524
0.153602
0.161896
0.208455
0.240856
0.209347
0.166366
0.151508
0.170512
0.228367
0.267237
0.28776
0.249561
0.184624
0.172596
0.206003
0.266193
0.345889
0.302699
0.212397
0.245548
0.354257
0.399022
0.438217
0.347753
0.237668
0.414148
0.610386
0.648316
0.918114
0.847387
0.51078
1
1
1
0.825079
0.797033
0.508903
0.27549
0.42458
0.471737
0.342329
0.308897
0.213223
0.211396
0.276991
0.289243
0.239448
0.199205
0.171733
0.17771
0.216382
0.232987
0.192696
0.164842
0.149213
0.150088
0.178024
0.198244
0.187317
0.162086
0.141332
0.133054
0.123699
0.146836
0.16612
0.148543
0.136915
0.129409
0.123767
0.138805
0.155765
0.136869
0.12773
0.122632
0.128004
0.149019
0.116992
0.105506
0.122093
0.12129
0.120456
0.13963
0.134055
0.114074
0.117116
0.119341
0.0969892
0.104862
0.128777
0.109745
0.115985
0.114875
0.105686
0.122847
0.0976801
0.0942911
0.119791
0.114301
0.103192
0.118893
0.113046
0.099712
0.112927
0.118128
0.090423
0.0914651
0.111987
0.0975027
0.110527
0.110799
0.0941903
0.106247
0.0866523
0.0873293
0.117763
0.108797
0.093001
0.105126
0.0997428
0.0900133
0.10958
0.117069
0.0847065
0.0827904
0.099433
0.0892437
0.106979
0.107306
0.0864784
0.0949739
0.0797336
0.0816686
0.114454
0.104134
0.0867644
0.0970222
0.0896112
0.0831275
0.105068
0.108406
0.0802655
0.0840396
0.0741777
0.0782762
0.11996
0.104928
0.0782925
0.0846911
0.0815811
0.0770776
0.108087
0.11853
0.0762258
0.071644
0.0807508
0.0750584
0.102714
0.106608
0.0747445
0.0776497
0.0690466
0.0744797
0.117702
0.101474
0.0723526
0.0764071
0.0743774
0.0725335
0.105244
0.116516
0.0730613
0.06725
0.0741437
0.0706283
0.100703
0.104794
0.0709136
0.0717121
0.0652173
0.0717672
0.115554
0.0987861
0.0679785
0.0704101
0.0688723
0.0687216
0.103362
0.115764
0.0713196
0.0638046
0.0684285
0.0665401
0.0986279
0.103318
0.06754
0.0669644
0.0628508
0.0713605
0.115306
0.0981984
0.0643422
0.065857
0.0646057
0.0655309
0.103452
0.117123
0.0707362
0.060701
0.0635157
0.0643418
0.100419
0.109894
0.0671781
0.0594557
0.0654753
0.063207
0.0936569
0.0976728
0.0635785
0.063327
0.0599913
0.0684143
0.108488
0.0935421
0.0630379
0.0639125
0.0622417
0.0631555
0.0985946
0.109868
0.0691637
0.0595029
0.0630882
0.0626763
0.0939248
0.0986544
0.0621679
0.0609473
0.0588964
0.070115
0.110202
0.094673
0.061439
0.0602862
0.0586746
0.0610108
0.100172
0.112039
0.0706796
0.0577236
0.0583317
0.060264
0.0947457
0.0997524
0.0597189
0.0566197
0.05646
0.0710727
0.112444
0.096406
0.0573902
0.0564124
0.0548874
0.0653745
0.106552
0.0921004
0.057793
0.0566322
0.054995
0.0574655
0.0969347
0.107178
0.0677458
0.054867
0.0551497
0.0570975
0.091485
0.0969181
0.0565948
0.0526142
0.0539493
0.06939
0.10942
0.0937007
0.0541734
0.0528146
0.0521487
0.0637898
0.104536
0.0895618
0.054986
0.0532129
0.0510784
0.0548604
0.0940787
0.10476
0.0666757
0.0521865
0.0525303
0.0549567
0.0899011
0.0955275
0.0549646
0.0503874
0.052317
0.06859
0.10803
0.0926275
0.0520601
0.0502863
0.0502232
0.062762
0.103891
0.0888429
0.0530808
0.0510179
0.0487596
0.0531642
0.0935825
0.104394
0.0661109
0.0503383
0.0498438
0.0527702
0.0894092
0.0951892
0.0529958
0.0476783
0.0506501
0.0681939
0.107393
0.0920201
0.0499924
0.0476044
0.0481894
0.0617395
0.103342
0.0874975
0.0503257
0.0480444
0.0461076
0.0511655
0.0928268
0.104862
0.0668708
0.0490818
0.0463185
0.0486293
0.0896992
0.101181
0.0607112
0.046967
0.0468906
0.0491858
0.0859137
0.091852
0.0499388
0.0450509
0.0484726
0.0667983
0.103798
0.089468
0.0486263
0.045629
0.0464236
0.060384
0.100306
0.084483
0.0484196
0.0460252
0.0444884
0.0494986
0.0902761
0.102128
0.0661984
0.047948
0.045053
0.0476501
0.0875934
0.0992438
0.0598476
0.0459043
0.0456774
0.0478721
0.084313
0.0905443
0.0492469
0.0437847
0.0475315
0.0663855
0.103379
0.0885566
0.0471485
0.0443847
0.0453701
0.0597234
0.0992098
0.0845502
0.0472634
0.0447654
0.0431641
0.0483729
0.0903189
0.102173
0.0660557
0.0472102
0.0437971
0.0462326
0.0879295
0.0999786
0.0615118
0.0459549
0.0433652
0.0445519
0.0850919
0.0955135
0.0582742
0.0446143
0.0443087
0.0465203
0.0821887
0.0876714
0.047897
0.042604
0.0462989
0.0648126
0.0992557
0.0853631
0.0458911
0.0430246
0.0442923
0.0587608
0.0967036
0.0826626
0.0460235
0.043593
0.0420106
0.0476473
0.0888658
0.101021
0.0654784
0.0462992
0.0426785
0.0454138
0.0874976
0.0994781
0.0608263
0.0451816
0.0423563
0.0437735
0.0852002
0.0945165
0.0572829
0.0435117
0.0427574
0.045071
0.0804523
0.0862788
0.0463703
0.0412309
0.0454226
0.0642076
0.0981737
0.0848232
0.0447268
0.0419714
0.044378
0.0593282
0.0966306
0.0828623
0.0426521
0.0415683
0.0430773
0.0570143
0.0925363
0.0800196
0.0447549
0.0424251
0.0411952
0.0467723
0.0861621
0.0975003
0.0641703
0.0453835
0.0417933
0.0445834
0.0841566
0.0957094
0.0591601
0.0441818
0.0412108
0.0423617
0.0818767
0.0913881
0.0564591
0.0426813
0.0418057
0.044109
0.078433
0.0840978
0.0457619
0.0404433
0.044708
0.0632095
0.0956843
0.0830484
0.0441601
0.0412915
0.0438932
0.0587745
0.0946039
0.081915
0.0424193
0.0409727
0.0425953
0.0566285
0.0910902
0.0782055
0.043932
0.0414865
0.0401961
0.0456567
0.0840191
0.0960589
0.0630279
0.044627
0.0410079
0.0436598
0.0836826
0.0953532
0.0583131
0.0436231
0.0403362
0.041315
0.0817269
0.0912058
0.0563501
0.0421824
0.0407941
0.0433525
0.0780744
0.0838529
0.0450982
0.0396146
0.0442756
0.0631374
0.0957837
0.083097
0.0436464
0.040678
0.0433482
0.0584271
0.0943407
0.0803057
0.0410054
0.0398638
0.0423265
0.0561537
0.0902025
0.0780436
0.0407463
0.0394165
0.0414472
0.0552295
0.0873502
0.0754541
0.042493
0.0401065
0.0390662
0.0446729
0.0812311
0.0927479
0.0622002
0.0437281
0.040069
0.0430682
0.0814446
0.0931735
0.0577834
0.0429018
0.0395878
0.0410603
0.0805159
0.090212
0.0559333
0.0421497
0.0391623
0.0405192
0.0774898
0.0865666
0.0551545
0.0412168
0.0396036
0.0422034
0.0747042
0.0802802
0.0437781
0.0384025
0.0430855
0.0611132
0.0918023
0.0800616
0.0423673
0.0394505
0.0422943
0.0568443
0.0915224
0.0786866
0.0400929
0.0389227
0.0415299
0.0550485
0.0882378
0.0763491
0.039982
0.0385512
0.0407636
0.054641
0.0852678
0.074113
0.0418493
0.0391354
0.0381637
0.0436889
0.079517
0.0907091
0.0608684
0.0430203
0.0391093
0.0422691
0.0793743
0.0907702
0.0564293
0.042078
0.0385279
0.0396055
0.0781443
0.0879498
0.0549405
0.0412686
0.0381459
0.0397574
0.0761069
0.0850671
0.0542615
0.0403927
0.038485
0.0411995
0.0733902
0.0789935
0.0433258
0.0375903
0.0427638
0.0604193
0.0901715
0.0791068
0.0416486
0.0386974
0.0418145
0.0561924
0.090044
0.0771582
0.0393359
0.0380768
0.0408953
0.0542824
0.0865635
0.0751562
0.0390783
0.0377069
0.0404638
0.0535564
0.08478
0.0738607
0.0392405
0.0374928
0.0398351
0.053217
0.0824902
0.0719091
0.0408553
0.0378618
0.0370677
0.0427928
0.0774434
0.088934
0.0598242
0.0422834
0.0380096
0.0413134
0.077773
0.0890843
0.0554744
0.0414367
0.0376164
0.0388112
0.0767421
0.0861888
0.0540394
0.0406237
0.0371914
0.0387928
0.074502
0.0835142
0.0530573
0.0399103
0.0369158
0.038682
0.0728506
0.081364
0.052497
0.0391841
0.0372447
0.0401555
0.0705256
0.075761
0.0418544
0.0364017
0.0415782
0.0584351
0.0865034
0.0752486
0.0404717
0.0374663
0.0409137
0.0546576
0.0860284
0.0741403
0.0385181
0.0371452
0.0401088
0.0529491
0.0836096
0.0727108
0.0383034
0.0367827
0.0396202
0.052409
0.0816306
0.0713083
0.0384894
0.0366581
0.038952
0.0516889
0.079593
0.0695141
0.0398152
0.0369039
0.0361946
0.0417616
0.0747093
0.0854742
0.0580171
0.0413749
0.0370127
0.0403141
0.0752048
0.0858458
0.0539467
0.040503
0.0365924
0.0378934
0.0743843
0.083695
0.0524427
0.0398325
0.0361988
0.0376731
0.0726193
0.0812746
0.0517438
0.0391342
0.0359567
0.0376802
0.0707974
0.078769
0.051293
0.0384571
0.0362861
0.0392
0.0683569
0.0736014
0.0411253
0.0355885
0.0408176
0.0572404
0.0840529
0.0736448
0.0397306
0.036463
0.040059
0.0532489
0.0840055
0.0725234
0.0373776
0.036032
0.0392229
0.0514765
0.0815336
0.070909
0.0371737
0.0356934
0.0387208
0.0508669
0.0793892
0.0694572
0.0372788
0.0354829
0.038064
0.0505434
0.0774553
0.0675341
0.0387521
0.0357373
0.0351309
0.0408667
0.0729803
0.0837362
0.0569306
0.0406058
0.0359163
0.0393355
0.0733098
0.083662
0.0529633
0.0397938
0.0354012
0.036917
0.0721048
0.0810397
0.0511628
0.0389024
0.0350106
0.0366882
0.0706004
0.0790636
0.0504665
0.0382812
0.0348317
0.036563
0.0690203
0.0772931
0.0499123
0.0379638
0.0347472
0.0366713
0.0675632
0.0753376
0.0495492
0.0372731
0.0349987
0.0379347
0.0654185
0.0706837
0.0398071
0.0343824
0.0396926
0.0553634
0.0806411
0.0705144
0.0383899
0.0352479
0.0388821
0.0515115
0.0801504
0.0692919
0.0363321
0.0347571
0.0380414
0.0498153
0.077545
0.0674951
0.0360939
0.0345346
0.0376592
0.0492619
0.0754919
0.0661706
0.0364496
0.034481
0.0371084
0.0487217
0.0737043
0.0644261
0.0374937
0.0346013
0.0340539
0.039463
0.0697788
0.0796256
0.0547792
0.03948
0.034896
0.0382056
0.0697134
0.0793441
0.0511398
0.0387136
0.0343436
0.0361037
0.0689443
0.0772427
0.0494492
0.0378246
0.033959
0.0356714
0.0673581
0.0751042
0.048757
0.0372699
0.0337061
0.0356885
0.0656563
0.0732164
0.048166
0.0365007
0.0337836
0.0367515
0.0635989
0.0690384
0.038704
0.033245
0.0388595
0.0542703
0.0786011
0.0685738
0.037583
0.0341565
0.0379968
0.0503561
0.0777855
0.0673602
0.0355068
0.0336333
0.0371292
0.048642
0.0751883
0.0654917
0.0351008
0.0332923
0.0365824
0.0478043
0.0732923
0.0641634
0.0351446
0.0331525
0.0359931
0.0474387
0.071781
0.0625458
0.0362547
0.0332241
0.0327199
0.0382801
0.0678285
0.0772223
0.0534246
0.0383378
0.0336572
0.0371092
0.0675232
0.0766654
0.0497507
0.0376249
0.0331392
0.0351173
0.0664704
0.0745564
0.0482971
0.0368216
0.0328307
0.034866
0.0649661
0.0728419
0.047595
0.0363441
0.0326103
0.03477
0.0635608
0.0712788
0.0470713
0.0356064
0.0326655
0.0357371
0.0620777
0.067297
0.0376457
0.0321486
0.0378087
0.0527485
0.0761989
0.0666239
0.0366798
0.0331422
0.0370427
0.0490219
0.0750945
0.0648975
0.0346419
0.0326412
0.0361845
0.0472662
0.0727568
0.0630344
0.034219
0.0322748
0.0354911
0.0467584
0.070896
0.0621696
0.0355856
0.03225
0.0318606
0.0376982
0.0677117
0.0767871
0.0531168
0.0380454
0.0329274
0.0367839
0.0670721
0.0757865
0.0491047
0.0370568
0.0322982
0.0343523
0.0654458
0.0735137
0.0474226
0.0361661
0.0318888
0.0340582
0.0635063
0.071293
0.0469103
0.0353256
0.0317203
0.0351751
0.061819
0.0671115
0.03708
0.0312279
0.0373938
0.0525155
0.0757264
0.0659162
0.0359063
0.0322601
0.0363655
0.0482509
0.0745176
0.0638241
0.0335892
0.0316102
0.0354924
0.0467347
0.0720119
0.0627488
0.0336264
0.0313636
0.0349871
0.0464152
0.0706423
0.0614891
0.0348919
0.0313039
0.0309967
0.0371795
0.0671032
0.0758359
0.0525893
0.0375571
0.0320269
0.0361998
0.0658111
0.0747305
0.0484648
0.0363916
0.0314142
0.0335732
0.0641326
0.0721177
0.0465537
0.0354099
0.0309715
0.0332594
0.0623864
0.0703517
0.0461175
0.0345599
0.0307542
0.0343864
0.0610885
0.0663156
0.0361655
0.0302819
0.0365957
0.0511848
0.0743727
0.064334
0.0350896
0.0313321
0.0357903
0.0477717
0.0733689
0.0632645
0.0333776
0.0310234
0.0350517
0.0461442
0.0713358
0.0619524
0.0330389
0.0307924
0.0345336
0.0459372
0.0699434
0.0609663
0.0344531
0.0306853
0.0303887
0.0365777
0.0664143
0.0747542
0.0518167
0.0370782
0.0315177
0.0356066
0.0645726
0.073052
0.0477422
0.0359156
0.0308299
0.033365
0.0626761
0.0705914
0.0460204
0.0346059
0.0303249
0.0339872
0.0610109
0.0659873
0.035484
0.0298799
0.0366696
0.0515904
0.0745528
0.0642332
0.0352323
0.0310483
0.0357002
0.0476662
0.0729481
0.0628826
0.0331796
0.0306567
0.0348124
0.0459718
0.0709546
0.061457
0.0327088
0.030384
0.0342094
0.0456446
0.0694174
0.0603082
0.0340031
0.0301725
0.0299206
0.0361155
0.0655484
0.0737339
0.0515421
0.0367396
0.0310859
0.0353648
0.0636416
0.0720618
0.0473741
0.0356264
0.0305045
0.033072
0.061987
0.0697682
0.0456972
0.0343145
0.0299432
0.0335737
0.0596995
0.0648348
0.035451
0.0296118
0.0365454
0.0511847
0.0737817
0.0640982
0.0350794
0.0309236
0.0356332
0.0475717
0.0726127
0.0625385
0.0332728
0.0304868
0.0344897
0.0460486
0.0703601
0.0608985
0.0338942
0.0300675
0.0298576
0.0360173
0.0660862
0.0742455
0.0518137
0.0368681
0.0309712
0.0355026
0.0637718
0.0720548
0.0477788
0.0354967
0.0302187
0.0341183
0.0617459
0.0668248
0.0358385
0.029814
0.0367752
0.0514974
0.074896
0.0635468
0.0346897
0.0307074
0.0357083
0.0476907
0.0724023
0.0626321
0.0332896
0.0302056
0.0345894
0.0463482
0.0707626
0.0613255
0.033915
0.0297872
0.0296258
0.0361715
0.0666599
0.0749717
0.0519209
0.0369598
0.030721
0.0353408
0.0644667
0.0727293
0.0477091
0.0354092
0.029766
0.0337834
0.0621821
0.0672523
0.0354934
0.0294297
0.0367534
0.0517699
0.0754932
0.0643942
0.0348273
0.0304209
0.0351274
0.0473816
0.0724448
0.0613537
0.033586
0.0293719
0.0291657
0.0356932
0.0669275
0.0762011
0.0524401
0.0370632
0.0305344
0.0351021
0.0652085
0.0736412
0.0482591
0.035586
0.0295006
0.0338287
0.0627545
0.06797
0.0356915
0.0292397
0.036949
0.0522613
0.0762913
0.0650066
0.0349396
0.0302551
0.0353019
0.0477969
0.0732592
0.0623469
0.0335676
0.0292296
0.0289053
0.0353424
0.0674589
0.0757068
0.0518088
0.0365404
0.0298092
0.0337535
0.0628741
0.0716679
0.0472501
0.0349212
0.0287865
0.0333325
0.0617293
0.0673355
0.0352013
0.0286778
0.0365799
0.052063
0.0760087
0.0648636
0.0345986
0.0298957
0.0349939
0.0475926
0.0730325
0.0622912
0.0333208
0.0289296
0.0286863
0.0351856
0.0673161
0.0755138
0.0518386
0.0364535
0.0296838
0.0344488
0.0640367
0.0719006
0.0470135
0.0345361
0.0283537
0.0326424
0.0602809
0.0642355
0.0333848
0.0278481
0.0352041
0.0504693
0.0729408
0.062885
0.0342664
0.0287902
0.028661
0.0357506
0.0684041
0.0771091
0.0527445
0.0369465
0.0298862
0.0346708
0.0654648
0.0733663
0.0476934
0.0350477
0.0285409
0.032926
0.0621783
0.0667899
0.0346395
0.0282696
0.0357185
0.0512996
0.0745901
0.0631503
0.0345979
0.0288538
0.0282346
0.0346151
0.0672626
0.0753166
0.0514561
0.0358022
0.0285681
0.0342919
0.0637485
0.0693411
0.0353416
0.0283375
0.0369535
0.0530515
0.0783279
0.0660305
0.0344704
0.0295996
0.034972
0.0478673
0.0738019
0.0621081
0.0327309
0.0282052
0.0279261
0.0343112
0.0664638
0.0738679
0.0509008
0.0353038
0.0283285
0.0340665
0.0620847
0.065751
0.0337857
0.0276746
0.035009
0.0501757
0.0735623
0.0622729
0.0334921
0.0279362
0.0277709
0.0346848
0.0676382
0.0763693
0.0519369
0.0358233
0.0284761
0.0344946
0.0642156
0.0687332
0.0351393
0.0281462
0.0359358
0.0518504
0.0763999
0.0637555
0.0341669
0.0283152
0.0277751
0.0345558
0.0677211
0.0747021
0.0505112
0.0351497
0.0275234
0.0330107
0.061741
0.0660997
0.0359606
0.0276588
0.0278461
0.0378782
0.0723564
0.0813538
0.0546766
0.0372882
0.0285378
0.0351835
0.0673057
0.0716575
0.0353045
0.0280266
0.0359197
0.0523997
0.0790193
0.0643877
0.0334483
0.0275036
0.0268832
0.034338
0.066374
0.0706929
0.0359523
0.0266776
0.0361691
0.0538207
0.080264
0.0669152
0.034116
0.0274246
0.0276178
0.0367118
0.0711469
0.0763378
0.03823
0.0276866
0.0371032
0.0551638
0.0834105
0.0656803
0.0339545
0.0274065
0.026715
0.0348751
0.0684178
0.0732372
0.0363174
0.0264415
0.0358966
0.0539253
0.083062
0.0680788
0.0338327
0.0267704
0.026243
0.0333106
0.0715665
0.0766263
0.0394364
0.0269313
0.0259985
0.0352233
0.0770592
0.085042
0.056028
0.0364206
0.0265259
0.033944
0.0698259
0.0749703
0.0347875
0.0262788
0.0263765
0.0384858
0.0791535
0.0820077
0.0360908
0.0254604
0.0259813
0.0406478
0.085374
0.0895013
0.0400979
0.0252632
0.0365752
0.0589618
0.0979677
0.0728919
0.0340126
0.0257758
0.0252904
0.0338537
0.0749153
0.0797369
0.0377658
0.025313
0.0252557
0.0382411
0.0857428
0.0914134
0.0397179
0.0255243
0.0260508
0.0424308
0.0960196
0.100928
0.0447589
0.026631
0.0272195
0.0469971
0.104724
0.106711
0.0493933
0.0278054
0.0283262
0.0514444
0.107905
0.108632
0.0536925
0.0289332
0.0295152
0.0559199
0.109046
0.109232
0.0584649
0.0303034
0.0309959
0.0609486
0.109315
0.109335
0.0633871
0.0319863
0.0328253
0.0657688
0.109315
0.109285
0.0681029
0.0339724
0.034947
0.0703805
0.109244
0.109217
0.0726085
0.036224
0.0374479
0.0746555
0.109199
0.109205
0.0766396
0.0389629
0.0403653
0.0784554
0.109223
0.109262
0.0802285
0.041995
0.0433978
0.0819169
0.109313
0.109384
0.0835565
0.0450196
0.0464143
0.0851051
0.109466
0.109568
0.0866029
0.0480241
0.0494138
0.0880078
0.109677
0.109799
0.0893589
0.0510164
0.0524084
0.090612
0.109922
0.110056
0.091809
0.0540059
0.0554002
0.0929046
0.110186
0.110324
0.093944
0.0569949
0.058381
0.0948841
0.110452
0.110583
0.095769
0.0599652
0.0613067
0.0965656
0.1107
0.110815
0.0973119
0.0628161
0.0640808
0.097973
0.110914
0.11101
0.0985898
0.0654956
0.0666656
0.0991308
0.111091
0.111167
0.0996351
0.0679733
0.0690367
0.100072
0.111228
0.111282
0.100468
0.0702316
0.0711867
0.100822
0.11132
0.111357
0.101145
0.0722731
0.073123
0.101403
0.111377
0.111394
0.101663
0.0740987
0.0748442
0.101845
0.111399
0.111399
0.102039
0.0757087
0.0763513
0.102163
0.11139
0.111375
0.102298
0.0771079
0.0776541
0.102371
0.111356
0.11133
0.102457
0.078311
0.0787715
0.102491
0.111303
0.111267
0.102535
0.0793357
0.0797176
0.102536
0.111233
0.11119
0.102546
0.0801972
0.0805116
0.102523
0.111152
0.111101
0.102504
0.0809117
0.0811697
0.102461
0.111058
0.111004
0.10242
0.0814996
0.0817133
0.102365
0.110959
0.1109
0.102304
0.0819783
0.082154
0.102236
0.110852
0.110793
0.102162
0.0823637
0.0825079
0.102087
0.110746
0.110687
0.102004
0.0826647
0.0827832
0.10192
0.110639
0.110581
0.101832
0.0829036
0.0829941
0.101743
0.110534
0.110477
0.101653
0.083092
0.083154
0.10156
0.110429
0.110375
0.101472
0.08323
0.0832607
0.101379
0.110329
0.110276
0.101291
0.0833188
0.0833264
0.101197
0.110231
0.11018
0.10111
0.0833719
0.0833638
0.101018
0.110139
0.110089
0.10093
0.0833987
0.0833794
0.100841
0.110048
0.110001
0.100753
0.0834071
0.0833825
0.100669
0.109963
0.109917
0.100581
0.0834022
0.0833753
0.100501
0.10988
0.109837
0.100415
0.0833898
0.0833663
0.100341
0.109804
0.109762
0.100258
0.0833755
0.0833533
0.100189
0.10973
0.109691
0.100109
0.0833623
0.0833428
0.100047
0.109663
0.109625
0.0999719
0.0833511
0.0833339
0.0999145
0.109598
0.109562
0.0998444
0.083343
0.0833307
0.099793
0.109539
0.109506
0.0997292
0.0833417
0.0833333
0.0996837
0.109485
0.109454
0.0996253
0.0833461
0.083343
0.0995855
0.109435
0.109406
0.0995331
0.0833585
0.0833598
0.0994989
0.109391
0.109363
0.0994514
0.0833778
0.0833845
0.0994226
0.109349
0.109325
0.0993804
0.0834052
0.0834163
0.0993564
0.109312
0.10929
0.0993186
0.0834393
0.0834549
0.099299
0.109278
0.109259
0.0992655
0.0834806
0.0834988
0.0992492
0.109247
0.10923
0.099219
0.0835256
0.0835482
0.0992057
0.109218
0.109204
0.0991794
0.0835759
0.0836014
0.0991678
0.109192
0.10918
0.0991452
0.0836296
0.0836581
0.0991348
0.109169
0.109158
0.0991162
0.0836868
0.0837173
0.0991066
0.109148
0.109137
0.0990912
0.0837461
0.0837786
0.0990824
0.109128
0.109117
0.0990701
0.0838076
0.0838412
0.0990617
0.109111
0.109099
0.0990526
0.0838697
0.0839047
0.0990452
0.109094
0.109084
0.0990377
0.0839329
0.0839683
0.0990309
0.109079
0.109069
0.0990235
0.0839958
0.0840318
0.0990189
0.109065
0.109055
0.0990118
0.0840587
0.0840945
0.0990087
0.109052
0.109042
0.0990016
0.0841204
0.0841562
0.0990001
0.10904
0.10903
0.0989931
0.0841814
0.0842164
0.0989926
0.109028
0.109019
0.0989855
0.0842405
0.084275
0.0989861
0.109017
0.109008
0.0989789
0.0842982
0.0843317
0.0989802
0.109007
0.108998
0.0989729
0.0843537
0.0843861
0.0989748
0.108997
0.108988
0.0989671
0.0844069
0.0844379
0.0989692
0.108987
0.108978
0.098961
0.0844574
0.0844868
0.0989634
0.108977
0.108969
0.0989548
0.0845051
0.0845329
0.0989571
0.108967
0.108959
0.0989481
0.0845497
0.0845759
0.0989505
0.108958
0.108949
0.0989411
0.0845916
0.084616
0.0989433
0.108948
0.10894
0.0989334
0.0846303
0.0846531
0.0989355
0.108938
0.10893
0.0989251
0.0846661
0.084687
0.0989269
0.108929
0.108921
0.0989159
0.0846986
0.0847177
0.0989175
0.108919
0.108911
0.0989062
0.0847281
0.0847453
0.0989073
0.10891
0.108902
0.0988955
0.0847544
0.0847697
0.0988962
0.1089
0.108892
0.098884
0.0847776
0.0847911
0.0988842
0.108891
0.108882
0.0988718
0.0847978
0.0848096
0.0988717
0.108881
0.108873
0.0988589
0.0848152
0.0848252
0.0988582
0.108871
0.108863
0.098845
0.0848296
0.0848379
0.0988438
0.108861
0.108853
0.0988302
0.0848412
0.0848477
0.0988284
0.108851
0.108843
0.0988143
0.0848498
0.0848546
0.0988119
0.10884
0.108832
0.0987973
0.0848556
0.0848587
0.0987941
0.108829
0.10882
0.0987789
0.0848586
0.08486
0.0987752
0.108818
0.108809
0.0987593
0.0848588
0.0848583
0.0987545
0.108806
0.108796
0.098738
0.0848559
0.0848538
0.0987324
0.108793
0.108783
0.0987152
0.0848502
0.0848462
0.0987085
0.108779
0.108769
0.0986905
0.0848413
0.0848357
0.098683
0.108765
0.108754
0.0986643
0.0848296
0.0848221
0.0986557
0.10875
0.108739
0.0986364
0.0848149
0.084806
0.0986272
0.108735
0.108724
0.0986076
0.0847978
0.0847876
0.098598
0.108721
0.10871
0.0985784
0.0847788
0.0847679
0.098569
0.108707
0.108696
0.0985496
0.0847586
0.0847463
0.0985402
0.108694
0.108683
0.0985212
0.0847369
0.0847246
0.0985127
0.108682
0.108671
0.0984938
0.0847138
0.0847032
0.098486
0.108671
0.10866
0.0984672
0.0846929
0.0846789
0.0984573
0.108657
0.108645
0.0984396
0.084669
0.0846501
0.0984341
0.108649
0.108636
0.0984149
0.0846417
0.0846234
0.0984018
0.108634
0.108613
0.0983774
0.0846061
0.0845916
0.0983617
0.108606
0.108563
0.098354
0.0846023
0.0846353
0.0983371
0.108582
0.108578
0.0983189
0.0847466
0.0845161
0.0981053
0.10866
0.108525
0.0976405
0.0839739
0.083703
0.0974564
0.108325
0.0718646
0.0515605
0.0378989
0.0362706
0.0365055
0.0377131
0.0388535
0.0408164
0.0414212
0.043451
0.0444679
0.0445156
0.0443238
0.0439833
0.0436886
0.043504
0.0434124
0.0433826
0.0433869
0.0434075
0.0434347
0.0434631
0.0434904
0.0435152
0.0435372
0.0435562
0.0435722
0.0435853
0.0435955
0.0436029
0.0436078
0.0436107
0.043612
0.0436154
0.0436198
0.0436264
0.0436352
0.0436458
0.0436582
0.0436722
0.043688
0.0437057
0.0437255
0.0437474
0.0437715
0.0438036
0.0438549
0.0439305
0.0440229
0.0441204
0.0442154
0.0443052
0.0443896
0.0444691
0.0445446
0.0446164
0.0446852
0.0447514
0.0448156
0.0448785
0.0449408
0.0450036
0.0450676
0.0451341
0.0452041
0.0452788
0.0453591
0.0454464
0.0455418
0.0456467
0.0457624
0.0458905
0.0460325
0.0461901
0.0463651
0.0465593
0.0467746
0.0470131
0.0472765
0.0475668
0.0478858
0.0482352
0.0486165
0.0490313
0.0494803
0.0499649
0.0504852
0.0510422
0.0516356
0.0522657
0.0529318
0.0536338
0.0543705
0.0551418
0.0559459
0.0567826
0.0576498
0.0585472
0.0594728
0.0604255
0.0614044
0.0624076
0.0634338
0.0644823
0.0655509
0.0666391
0.0677455
0.0688683
0.0700069
0.0711601
0.0723262
0.073505
0.0746945
0.0758945
0.0771031
0.0783204
0.0795442
0.0807747
0.0820101
0.0832501
0.0844939
0.0857399
0.0869883
0.0882373
0.0894872
0.0907361
0.0919843
0.0932304
0.0944737
0.0957141
0.0969501
0.098182
0.0994082
0.100629
0.101843
0.10305
0.104249
0.10544
0.106622
0.107795
0.108958
0.110111
0.111253
0.112384
0.113502
0.114609
0.115702
0.116783
0.117851
0.118904
0.119943
0.120968
0.121978
0.122972
0.123951
0.124914
0.125861
0.126792
0.127706
0.128603
0.129483
0.130346
0.131192
0.13202
0.13283
0.133622
0.134396
0.135152
0.13589
0.13661
0.137311
0.137994
0.138658
0.139304
0.139931
0.14054
0.14113
0.141701
0.142253
0.142787
0.143303
0.143799
0.144278
0.144737
0.145178
0.1456
0.146004
0.146389
0.146756
0.147104
0.147434
0.147745
0.148037
0.148311
0.148565
0.148801
0.149017
0.149213
0.149388
0.14954
0.149669
0.149773
0.149851
0.149905
0.149936
0.149949
0.149959
0.149966
0.149967
0.149967
0.149966
0.149961
0.149957
0.149959
0.149968
0.149981
0.149992
0.149998
0.15
0.149998
0.149995
0.149991
0.149988
0.149985
0.149983
0.149981
0.14998
0.149979
0.149978
0.149977
0.149976
0.149975
0.149975
0.149974
0.149974
0.149974
0.149974
0.149974
0.149974
0.149974
0.149975
0.149975
0.149976
0.149977
0.149978
0.149979
0.14998
0.149981
0.149983
0.149984
0.149986
0.149987
0.149989
0.149991
0.149993
0.149995
0.149997
0.149999
0.150001
0.150003
0.150006
0.150008
0.15001
0.150013
0.150015
0.150018
0.150021
0.150023
0.150026
0.150029
0.150032
0.150034
0.150037
0.15004
0.150043
0.150047
0.150051
0.150055
0.150059
0.150064
0.150069
0.150075
0.150083
0.150096
0.150117
0.150149
0.15019
0.150224
0.150221
0.150169
0.150086
0.149996
0.149908
0.149802
0.149559
0.14828
0.146064
0.144271
0.143617
0.141804
0.141329
0.139564
0.139225
0.137543
0.137324
0.135704
0.135582
0.134031
0.134001
0.132513
0.132557
0.131118
0.131225
0.129836
0.129999
0.128657
0.128869
0.127579
0.127827
0.12658
0.126862
0.125657
0.125974
0.124812
0.125164
0.124045
0.124432
0.123356
0.123775
0.122738
0.123189
0.12219
0.122671
0.121706
0.122217
0.121286
0.121825
0.120926
0.121494
0.120625
0.121223
0.120384
0.12101
0.1202
0.120856
0.120074
0.12076
0.120005
0.120721
0.119993
0.120741
0.120039
0.120819
0.120144
0.120957
0.120308
0.121154
0.12053
0.12141
0.120811
0.121724
0.121148
0.122094
0.121539
0.122517
0.121981
0.122989
0.122468
0.123502
0.122992
0.124046
0.123542
0.124608
0.124102
0.125172
0.124655
0.125714
0.125175
0.126206
0.125631
0.126614
0.125988
0.126899
0.126205
0.127021
0.126244
0.126943
0.126065
0.126623
0.125633
0.126036
0.124928
0.125185
0.12398
0.124064
0.122759
0.122661
0.121287
0.12109
0.119694
0.119428
0.118038
0.117739
0.116377
0.116071
0.114759
0.114473
0.113227
0.112981
0.11181
0.111619
0.110511
0.110395
0.109359
0.109324
0.108363
0.108407
0.107518
0.107632
0.106811
0.106984
0.106222
0.10644
0.105727
0.105977
0.105303
0.105574
0.104929
0.105211
0.104568
0.104865
0.104228
0.104534
0.103896
0.104206
0.103564
0.103874
0.103226
0.103533
0.102879
0.103181
0.10252
0.102816
0.102148
0.102436
0.101761
0.10204
0.101358
0.101628
0.10094
0.101201
0.100507
0.100752
0.10005
0.100289
0.0995841
0.0998114
0.0991052
0.0993191
0.0985989
0.0988151
0.0980859
0.0982864
0.0975686
0.0976821
0.0970571
0.0978492
0.0963296
0.100343
0.10594
0.105071
0.103735
0.113531
0.102824
0.104865
0.11399
0.103408
0.105563
0.114818
0.103995
0.106185
0.115639
0.104623
0.10685
0.116484
0.105265
0.107515
0.117324
0.105892
0.108161
0.11815
0.106507
0.108798
0.118965
0.107109
0.109418
0.119768
0.107691
0.110018
0.120559
0.108257
0.110604
0.121337
0.108807
0.111172
0.122101
0.10934
0.111725
0.122849
0.109858
0.112253
0.123579
0.110362
0.11277
0.124292
0.110852
0.113281
0.124988
0.111324
0.113792
0.125679
0.111785
0.114289
0.126384
0.112237
0.114781
0.127096
0.112686
0.115275
0.127815
0.113141
0.115781
0.128547
0.113613
0.116311
0.129302
0.114118
0.116881
0.130091
0.114672
0.117504
0.130925
0.115288
0.118194
0.131781
0.115989
0.118971
0.132687
0.116796
0.119851
0.133666
0.117718
0.120846
0.134723
0.118769
0.121964
0.135878
0.11995
0.123206
0.137143
0.121257
0.124569
0.138519
0.122679
0.126034
0.139998
0.124191
0.127573
0.141544
0.125758
0.129148
0.143096
0.127342
0.130709
0.144606
0.128927
0.13224
0.146182
0.130372
0.133646
0.147546
0.13156
0.134755
0.148579
0.13247
0.135605
0.149362
0.133181
0.13621
0.149885
0.13364
0.13656
0.150123
0.133856
0.13667
0.150099
0.133861
0.136576
0.149859
0.133691
0.136321
0.149455
0.133388
0.135946
0.148927
0.13299
0.135488
0.148319
0.132532
0.134981
0.147665
0.132042
0.134453
0.146993
0.131544
0.133924
0.146321
0.131055
0.133411
0.145665
0.13059
0.132923
0.14504
0.13016
0.13247
0.144455
0.129771
0.132062
0.143916
0.12943
0.131704
0.143426
0.12914
0.131397
0.142989
0.128903
0.131145
0.142606
0.128721
0.130948
0.142277
0.128593
0.130806
0.142001
0.12852
0.130718
0.141775
0.128502
0.130684
0.141601
0.128538
0.130703
0.141476
0.128627
0.130774
0.141398
0.128768
0.130897
0.141366
0.128961
0.13107
0.14138
0.129204
0.131293
0.141435
0.129499
0.131566
0.141532
0.129845
0.131888
0.141669
0.130242
0.132261
0.141843
0.130693
0.132685
0.142053
0.131197
0.133161
0.142297
0.131757
0.133691
0.142575
0.132375
0.134279
0.142884
0.133057
0.13493
0.143221
0.133812
0.13566
0.143579
0.134632
0.136454
0.143965
0.135507
0.137299
0.144386
0.136437
0.138193
0.144836
0.137424
0.139137
0.145314
0.138468
0.140132
0.145819
0.139569
0.141172
0.146339
0.140724
0.142262
0.146877
0.141947
0.14341
0.147436
0.143229
0.144595
0.148
0.144556
0.14581
0.148559
0.145962
0.147049
0.149098
0.147387
0.149634
0.149419
0.149187
0.148955
0.148733
0.148525
0.148333
0.148158
0.148003
0.14787
0.14776
0.147673
0.147612
0.147576
0.147567
0.147588
0.147638
0.14772
0.147836
0.147987
0.148176
0.148407
0.14868
0.148999
0.149366
0.149784
0.150256
0.150784
0.15137
0.152018
0.152727
0.153497
0.154326
0.155214
0.156161
0.15716
0.158204
0.159283
0.160382
0.161482
0.162551
0.163542
0.1644
0.165065
0.165469
0.16554
0.165223
0.164555
0.163535
0.162076
0.160373
0.158664
0.15692
0.155266
0.153735
0.152337
0.151032
0.149802
0.148609
0.14744
0.146309
0.145261
0.14422
0.143193
0.142188
0.141199
0.140221
0.139249
0.138279
0.137313
0.136347
0.13538
0.134413
0.133442
0.13247
0.131496
0.130521
0.129543
0.128571
0.127582
0.126632
0.125607
0.124784
0.123668
0.123477
0.121369
0.115955
0.112568
0.112613
0.11616
0.121018
0.12376
0.123934
0.126445
0.126082
0.127625
0.127928
0.128054
0.128789
0.129945
0.130947
0.13206
0.133137
0.134244
0.135348
0.136463
0.137581
0.138707
0.139837
0.140971
0.142107
0.143247
0.147303
0.146006
0.144716
0.143435
0.142163
0.140902
0.139652
0.138413
0.13719
0.135972
0.134785
0.133575
0.132452
0.131194
0.130254
0.129082
0.128703
0.129232
0.129609
0.129676
0.12928
0.128773
0.129164
0.130393
0.131385
0.13275
0.13032
0.128839
0.128087
0.127922
0.127612
0.125806
0.126163
0.12212
0.122206
0.118857
0.119032
0.12053
0.121368
0.122879
0.124177
0.131552
0.133953
0.135269
0.136556
0.137887
0.13581
0.134361
0.13299
0.1257
0.127134
0.128684
0.117643
0.115093
0.116235
0.11372
0.114871
0.11239
0.113521
0.11108
0.112226
0.109831
0.110871
0.108589
0.109159
0.110225
0.110704
0.11204
0.109209
0.109128
0.103883
0.10428
0.0999837
0.0998486
0.0996554
0.102819
0.102107
0.0997819
0.100105
0.103454
0.102574
0.10012
0.100592
0.10391
0.103282
0.100597
0.101106
0.100998
0.100803
0.100607
0.100353
0.0999894
0.0998067
0.099419
0.101306
0.101102
0.104803
0.103663
0.101038
0.101547
0.105046
0.104396
0.101527
0.102038
0.105947
0.104756
0.101966
0.102482
0.106162
0.105503
0.102463
0.102277
0.102206
0.101982
0.101907
0.10168
0.101611
0.101384
0.102498
0.102987
0.107097
0.105878
0.102901
0.103433
0.107324
0.106654
0.103407
0.103949
0.108297
0.107049
0.103859
0.104412
0.108521
0.107843
0.104389
0.103454
0.103377
0.103139
0.103072
0.102854
0.102789
0.102558
0.103698
0.104956
0.109515
0.108233
0.104857
0.10543
0.109733
0.10904
0.105401
0.105982
0.110752
0.109437
0.105876
0.106462
0.110973
0.116496
0.110271
0.106428
0.104749
0.104676
0.104419
0.104351
0.1041
0.104022
0.103764
0.104998
0.107025
0.112036
0.119086
0.130221
0.137262
0.139225
0.14059
0.141969
0.143369
0.141819
0.140271
0.138756
0.131829
0.133459
0.135143
0.13687
0.143393
0.144785
0.146218
0.147665
0.149123
0.148277
0.146626
0.144997
0.138648
0.140462
0.142316
0.130523
0.127619
0.128719
0.125868
0.12698
0.124176
0.125298
0.12254
0.123671
0.12096
0.122098
0.119431
0.120573
0.117944
0.112267
0.110695
0.106912
0.107521
0.107486
0.111557
0.113367
0.111993
0.10799
0.10811
0.105669
0.1054
0.105324
0.105062
0.105736
0.106018
0.108622
0.113591
0.112869
0.108582
0.106097
0.10637
0.10922
0.114714
0.113304
0.10909
0.109736
0.114936
0.1142
0.10969
0.110346
0.116097
0.114653
0.110208
0.110873
0.116327
0.115583
0.110822
0.107477
0.107407
0.107126
0.107069
0.106793
0.106718
0.106436
0.107751
0.111499
0.117539
0.116061
0.111349
0.112036
0.11777
0.117015
0.111979
0.112676
0.119017
0.1175
0.112513
0.113217
0.119245
0.118474
0.113149
0.108805
0.108752
0.108474
0.10843
0.108156
0.108089
0.107803
0.10907
0.113862
0.120525
0.118972
0.113682
0.114404
0.12076
0.119974
0.114325
0.115055
0.122085
0.1205
0.114856
0.115597
0.122338
0.129442
0.12154
0.115505
0.109884
0.109875
0.109638
0.109637
0.1094
0.109363
0.109097
0.110092
0.116259
0.123715
0.132402
0.144212
0.149944
0.150591
0.148605
0.144389
0.145533
0.146679
0.147828
0.148983
0.150148
0.151334
0.152551
0.15381
0.155118
0.156423
0.157769
0.159204
0.1606
0.161992
0.163392
0.170543
0.169046
0.167451
0.16576
0.164151
0.162525
0.160918
0.159381
0.157922
0.156528
0.155178
0.153851
0.152535
0.151222
0.149911
0.152066
0.153547
0.155033
0.15501
0.153315
0.151624
0.146143
0.148094
0.150048
0.151986
0.156692
0.156523
0.158022
0.15955
0.161145
0.161863
0.160073
0.158371
0.153902
0.155816
0.157891
0.147778
0.144603
0.145489
0.142339
0.143193
0.140027
0.140891
0.137728
0.138621
0.135483
0.136438
0.133356
0.134369
0.13135
0.123978
0.122096
0.116039
0.116805
0.116699
0.123164
0.125401
0.123746
0.117245
0.117487
0.11044
0.110254
0.11027
0.110063
0.110382
0.11056
0.118046
0.125682
0.124847
0.11792
0.110507
0.110651
0.11874
0.127168
0.125488
0.118473
0.119309
0.127487
0.126635
0.119165
0.120031
0.129047
0.127339
0.119737
0.120626
0.12939
0.12851
0.120462
0.110579
0.110694
0.110559
0.110703
0.110592
0.110685
0.110546
0.110705
0.121395
0.13099
0.129242
0.121072
0.12202
0.131348
0.130445
0.121826
0.12282
0.133017
0.131256
0.122459
0.123476
0.133396
0.132466
0.123257
0.110472
0.110624
0.110426
0.110633
0.110503
0.110657
0.110527
0.110698
0.124343
0.135078
0.133291
0.123927
0.125012
0.135422
0.13444
0.124702
0.125872
0.137147
0.135372
0.125407
0.126786
0.137646
0.147134
0.136867
0.126701
0.11119
0.111185
0.110518
0.110787
0.110472
0.110708
0.110471
0.112312
0.128318
0.139804
0.150583
0.160355
0.163847
0.162852
0.164695
0.166658
0.168698
0.171361
0.16861
0.166096
0.163326
0.1668
0.170751
0.174802
0.174254
0.170776
0.172801
0.174806
0.176747
0.182757
0.180129
0.177246
0.179284
0.183882
0.188541
0.187958
0.184624
0.181485
0.177574
0.175153
0.171081
0.169551
0.165902
0.164172
0.159724
0.158676
0.154608
0.154239
0.150428
0.140978
0.138385
0.128221
0.130181
0.1305
0.140569
0.143736
0.14278
0.132877
0.132558
0.116246
0.11455
0.114033
0.112555
0.117063
0.119059
0.135186
0.145525
0.145499
0.135852
0.120025
0.122224
0.138223
0.148736
0.148275
0.138973
0.141957
0.151258
0.151773
0.143521
0.147497
0.155164
0.154745
0.155866
0.148833
0.136359
0.135974
0.128585
0.126475
0.123436
0.113057
0.118896
0.118577
0.120797
0.138505
0.137816
0.120722
0.124312
0.14372
0.158789
0.162213
0.166695
0.170696
0.157981
0.151457
0.152301
0.146275
0.147672
0.141766
0.124272
0.128457
0.128661
0.133359
0.13421
0.140333
0.143001
0.158226
0.165988
0.176615
0.180827
0.185502
0.190025
0.191715
0.194936
0.192885
0.185416
0.178506
0.172072
0.16495
0.16672
0.168612
0.170604
0.172545
0.174177
0.17525
0.175811
0.175886
0.175443
0.174592
0.173454
0.172126
0.170686
0.169188
0.167678
0.172378
0.174211
0.176077
0.177948
0.179763
0.181422
0.182782
0.183648
0.183827
0.183339
0.182151
0.180227
0.177908
0.175735
0.173791
0.180169
0.182072
0.184402
0.19232
0.189814
0.18769
0.196564
0.200397
0.203998
0.207627
0.195203
0.186954
0.189097
0.190264
0.190535
0.19824
0.198443
0.197464
0.210444
0.210985
0.209326
0.224713
0.2293
0.230328
0.226334
0.220518
0.212786
0.204706
0.199166
0.199022
0.19459
0.189219
0.185297
0.182995
0.178768
0.177203
0.172717
0.171596
0.166292
0.155136
0.154097
0.135069
0.125064
0.135761
0.142315
0.16084
0.162676
0.144249
0.149248
0.167363
0.169655
0.174386
0.177676
0.161861
0.1578
0.152044
0.142371
0.153084
0.172889
0.1832
0.185955
0.19128
0.193741
0.179553
0.175357
0.155171
0.16115
0.163243
0.181244
0.189255
0.199707
0.207863
0.200536
0.19174
0.177078
0.172537
0.191265
0.195219
0.204104
0.210196
0.214383
0.222258
0.219562
0.214491
0.208359
0.203331
0.187004
0.176514
0.172144
0.158468
0.192755
0.202004
0.215363
0.2218
0.224642
0.231178
0.22791
0.235707
0.242372
0.237546
0.228337
0.220291
0.21502
0.197277
0.18202
0.203111
0.215876
0.227632
0.24338
0.246669
0.253766
0.2515
0.240826
0.247978
0.260504
0.264939
0.250587
0.256733
0.26056
0.270623
0.299129
0.290085
0.27783
0.26853
0.262214
0.263763
0.252855
0.242119
0.23058
0.210482
0.259707
0.273709
0.272977
0.282623
0.292053
0.29583
0.266226
0.317489
0.306766
0.322943
0.341408
0.360038
0.331474
0.336209
0.366541
0.420938
0.396696
0.362489
0.319858
0.448019
0.511326
0.705007
0.705957
0.492077
0.408327
0.360243
0.334547
0.299748
0.287129
0.323735
0.330176
0.351183
0.388813
0.434772
0.388293
0.367458
0.339435
0.315762
0.351634
0.361116
0.414328
0.508981
0.579967
1
0.720089
0.506278
0.404302
0.478746
0.360067
0.330114
0.283705
0.298697
0.265364
0.245401
0.234508
0.218764
0.217825
0.20861
0.182531
0.19726
0.178967
0.189525
0.18243
0.159605
0.176072
0.169489
0.146841
0.165359
0.160034
0.13648
0.156671
0.150993
0.127165
0.149403
0.144076
0.120542
0.143276
0.137335
0.113412
0.137905
0.132136
0.108243
0.136772
0.123774
0.115923
0.0950896
0.119301
0.113881
0.0911159
0.117412
0.110098
0.086314
0.113189
0.106944
0.083575
0.11145
0.103343
0.0798327
0.107561
0.101
0.0775426
0.105908
0.0976248
0.0738869
0.101613
0.0945895
0.0691188
0.101918
0.0766513
0.106776
0.0976512
0.0728913
0.102878
0.0939584
0.0723225
0.0983668
0.0901499
0.0674068
0.095585
0.086848
0.0651266
0.0919432
0.0799083
0.060616
0.0877588
0.0642741
0.0913941
0.0789821
0.0598752
0.0870999
0.0719536
0.0561488
0.0829881
0.0595784
0.0898875
0.0758415
0.057163
0.0837104
0.0675351
0.0536955
0.0771641
0.0565764
0.0824341
0.0668862
0.0528028
0.0757853
0.0612297
0.050654
0.0703055
0.0524099
0.0790085
0.061332
0.0498269
0.0682087
0.0510814
0.0757083
0.0593113
0.0487245
0.0667579
0.0500486
0.0747266
0.0580965
0.0481984
0.0642254
0.0491688
0.0705792
0.0555862
0.047067
0.0624166
0.0480631
0.0685053
0.0537347
0.0464755
0.058562
0.0471152
0.0625188
0.0476346
0.0672517
0.0528736
0.0455091
0.0584073
0.0463952
0.0621005
0.0499155
0.0448433
0.0544782
0.0454573
0.0582962
0.0456088
0.0618293
0.0492608
0.0440531
0.0541524
0.0447562
0.0569635
0.0451044
0.0596627
0.0481091
0.0437799
0.0518519
0.0440408
0.055053
0.0441843
0.0584715
0.0470653
0.043104
0.0510413
0.0436583
0.0534324
0.0437271
0.0556686
0.0454278
0.0426916
0.0484138
0.0428064
0.0508278
0.0426286
0.0540458
0.0443603
0.0421881
0.0471932
0.0422259
0.0487385
0.0419381
0.0502629
0.0420131
0.052473
0.0431652
0.0415165
0.0455024
0.0416249
0.0468596
0.0414552
0.0480058
0.0411913
0.0505982
0.0420149
0.0406817
0.0443079
0.0409057
0.0456046
0.0406935
0.0467306
0.0406246
0.0485278
0.0410255
0.0397708
0.0424888
0.040307
0.0437076
0.0400958
0.0443659
0.0397531
0.0462005
0.0398432
0.0386984
0.0410932
0.0393899
0.0421419
0.0394272
0.0428453
0.0393247
0.0434003
0.0391797
0.0444009
0.0387998
0.0378176
0.0398519
0.0382551
0.04047
0.0386409
0.0414676
0.0385963
0.0421353
0.0383703
0.0437081
0.0381702
0.0372571
0.0391398
0.03759
0.039779
0.0380678
0.0404921
0.0381869
0.041055
0.0380044
0.0419123
0.0373271
0.0366251
0.038054
0.0365828
0.0382213
0.0366483
0.0387128
0.0370785
0.0393145
0.0371603
0.0408598
0.0365769
0.0360147
0.037158
0.0359192
0.0374713
0.0359631
0.0377119
0.0361646
0.0381333
0.0364085
0.039043
0.0355661
0.0352186
0.0360002
0.0351134
0.036171
0.0348873
0.0364483
0.0349845
0.0365809
0.0351297
0.0371577
0.0355537
0.0384169
0.034931
0.0345715
0.0354617
0.0345266
0.0356905
0.0344432
0.0359098
0.0345489
0.0362518
0.0348073
0.0372546
0.0342929
0.0340805
0.0345456
0.0338627
0.0346852
0.033738
0.0346822
0.0335718
0.0350239
0.0336859
0.0358465
0.0332705
0.0332061
0.0336898
0.0330802
0.0337864
0.0329705
0.033973
0.0329927
0.034282
0.0330679
0.0350368
0.0326484
0.0326532
0.032866
0.0324235
0.0329884
0.0323459
0.0330269
0.0322545
0.0334164
0.0323441
0.0341361
0.031979
0.0320394
0.0323273
0.0319066
0.0324069
0.0317984
0.0325779
0.0317352
0.032988
0.0313249
0.0315482
0.0314857
0.0313142
0.0314547
0.0311104
0.031766
0.0310455
0.0321894
0.0306215
0.0308607
0.0308319
0.0306474
0.0308486
0.0305499
0.031026
0.0305323
0.0314215
0.0300182
0.0303761
0.0301493
0.0301949
0.030161
0.0300147
0.0304811
0.0299388
0.0309071
0.02949
0.0297651
0.0297077
0.0297922
0.0299144
0.029816
0.0301498
0.029791
0.030564
0.0292884
0.0296851
0.0294363
0.0295116
0.0294996
0.0292296
0.0299972
0.0287852
0.0292342
0.0290136
0.0291963
0.0291747
0.0292296
0.0294392
0.0291854
0.0299238
0.0287799
0.0292389
0.0289442
0.0290555
0.0290574
0.0288473
0.0293735
0.0283459
0.0288647
0.0286912
0.0288913
0.0288933
0.0288438
0.0293487
0.0284007
0.0289439
0.0285634
0.02861
0.0288143
0.0279345
0.0285477
0.0279553
0.0282729
0.0281464
0.0282938
0.0284841
0.0277039
0.0284013
0.0277797
0.0279206
0.0279902
0.0272764
0.0279328
0.0274249
0.0275789
0.0275438
0.0269244
0.0278674
0.0270674
0.0273782
0.0273583
0.0267129
0.0276588
0.0268842
0.0271725
0.0270075
0.0263167
0.027222
0.0263095
0.0265971
0.0266575
0.0260953
0.0271573
0.0264384
0.0267761
0.0266691
0.026032
0.02699
0.0261059
0.0262586
0.0263062
0.0255898
0.0262036
0.0261016
0.0255682
0.0268927
0.0258075
0.0261464
0.0260978
0.0254488
0.0261725
0.0257546
0.0249921
0.0258114
0.0253909
0.0247784
0.026303
0.0252397
0.0256277
0.0255305
0.0249001
0.0255885
0.0252697
0.0244784
0.0251986
0.024964
0.024405
0.0254044
0.0249333
0.0242991
0.0252807
0.0247042
0.0239771
0.0248653
0.0242453
0.0238014
0.0235414
0.0248591
0.0239607
0.0233078
0.0244529
0.0237605
0.0231189
0.0226813
0.0239418
0.0231198
0.0229102
0.0225978
0.0238936
0.0226894
0.0221091
0.0217091
0.0228561
0.0223018
0.0219294
0.0218433
0.0212355
0.022455
0.0215994
0.021349
0.0212189
0.020929
0.0205922
0.0204737
0.0210988
0.0214226
0.0212287
0.0212161
0.0212766
0.0213939
0.0215594
0.0217467
0.0219004
0.0220261
0.0220835
0.022135
0.0221464
0.0221833
0.0221859
0.0222297
0.0222442
0.0223072
0.0223447
0.0224316
0.0224992
0.0226226
0.0227596
0.0229241
0.0230959
0.023341
0.0235442
0.023863
0.0240965
0.0244855
0.0247495
0.0252091
0.025505
0.0260379
0.0263675
0.0269776
0.0273407
0.0280248
0.0284195
0.0291758
0.029589
0.0303864
0.0308129
0.0316427
0.0320798
0.0329368
0.0333825
0.034261
0.0347124
0.0356067
0.0360607
0.0369704
0.0374101
0.0383245
0.0387761
0.0396893
0.0401239
0.0410406
0.0414692
0.042376
0.0427979
0.0436879
0.0441152
0.0449912
0.0453977
0.0462621
0.0466716
0.0475151
0.0479141
0.0487429
0.0491304
0.0499407
0.050315
0.0511056
0.0514659
0.0522334
0.0525788
0.0533241
0.053655
0.0543763
0.0546921
0.055391
0.0556924
0.0563714
0.0566491
0.057306
0.0575783
0.0582066
0.0584641
0.0590695
0.0593131
0.0598953
0.0601245
0.0606834
0.0608992
0.061437
0.0616396
0.0621552
0.0623453
0.0628414
0.0630196
0.0634959
0.0636632
0.0641221
0.0642786
0.0647194
0.0648655
0.0652894
0.065425
0.0658311
0.0659569
0.066347
0.0664632
0.0668369
0.0669444
0.0673037
0.0674025
0.0677468
0.0678377
0.0681674
0.0682504
0.0685648
0.0686408
0.0689419
0.0690109
0.0692983
0.0693611
0.0696367
0.0696932
0.0699563
0.0700072
0.0702595
0.0703048
0.0705457
0.0705859
0.070817
0.0708521
0.0710729
0.0711036
0.0713153
0.071341
0.071543
0.0715642
0.0717575
0.071774
0.0719584
0.071971
0.0721477
0.0721561
0.0723248
0.0723298
0.0724917
0.072493
0.0726476
0.0726458
0.072794
0.0727887
0.0729298
0.0729217
0.0730569
0.0730457
0.0731746
0.0731611
0.073284
0.073268
0.0733846
0.0733669
0.0734781
0.0734582
0.0735638
0.0735423
0.073643
0.0736195
0.073715
0.07369
0.0737809
0.073754
0.0738399
0.0738115
0.0738933
0.073863
0.0739401
0.0739086
0.0739818
0.0739486
0.0740174
0.0739829
0.0740483
0.0740124
0.0740739
0.0740374
0.0740959
0.0740567
0.0741134
0.0740698
0.0741258
0.0740873
0.0741366
0.0740975
0.0741451
0.0741032
0.0741469
0.0740975
0.0741351
0.0740883
0.0741418
0.0741743
0.0742865
0.0739751
0.0732039
0.0525288
0.0378627
0.038069
0.0537304
0.0547357
0.0387705
0.0365167
0.0363414
0.0361809
0.0376483
0.0407566
0.0410168
0.0406422
0.037441
0.0363752
0.0381833
0.0541961
0.0544504
0.0387262
0.0379065
0.0538923
0.0543411
0.0386625
0.036258
0.0364301
0.0369053
0.0362103
0.0378689
0.0538748
0.0542977
0.0386042
0.0377956
0.0538062
0.0542077
0.0385221
0.0361265
0.0365059
0.0393334
0.0394757
0.0369202
0.0360456
0.0376849
0.0536963
0.0540939
0.0384157
0.0375818
0.0535794
0.0539727
0.0383085
0.0359419
0.0364866
0.0369341
0.0358557
0.0374628
0.0534402
0.0538359
0.0381825
0.0373486
0.0533031
0.0536898
0.0380652
0.0357467
0.0365246
0.0393363
0.0440825
0.0440184
0.0440277
0.044221
0.0446417
0.0446933
0.0448185
0.0449219
0.0450552
0.0442279
0.039459
0.0369756
0.0356602
0.037229
0.0531556
0.0535391
0.0379403
0.0371115
0.0530017
0.0533827
0.0378209
0.0355485
0.0365476
0.0370265
0.0354633
0.0369919
0.0528411
0.053222
0.0376908
0.0368693
0.0526724
0.0530482
0.0375658
0.035348
0.0365773
0.0396074
0.039762
0.0370822
0.0352644
0.0367477
0.0524969
0.0528718
0.0374343
0.0366248
0.0523136
0.0526831
0.0373085
0.0351463
0.0366112
0.037142
0.0350642
0.0365008
0.0521234
0.0524914
0.0371724
0.0363728
0.0519236
0.0522855
0.037041
0.034943
0.0366498
0.0399177
0.0446428
0.044506
0.0443507
0.0451653
0.0452923
0.0454075
0.0450578
0.0449745
0.0448854
0.0448068
0.0447115
0.0446354
0.0445279
0.0444672
0.0440687
0.0441109
0.0441723
0.044219
0.0437938
0.0437743
0.0437493
0.0437285
0.0435193
0.043526
0.0435305
0.0435331
0.0435347
0.0438138
0.0442716
0.0443174
0.044367
0.044415
0.0438675
0.0438499
0.0438315
0.0435348
0.0435343
0.0435328
0.0433756
0.043386
0.0433951
0.043403
0.0434096
0.0434147
0.0434179
0.0434191
0.0433862
0.0433828
0.0433773
0.0433702
0.0433749
0.0433815
0.0433867
0.0433899
0.0434107
0.0434086
0.0434048
0.0433999
0.0433938
0.0433669
0.0433615
0.0433514
0.0433399
0.043327
0.0433347
0.0433469
0.0433576
0.0433866
0.0433781
0.0433682
0.0433568
0.0433209
0.0433124
0.0433638
0.0435305
0.0438854
0.0444654
0.0451477
0.0455349
0.0447989
0.0400775
0.0372059
0.0348627
0.0362454
0.0517155
0.0520754
0.0369009
0.0361173
0.0514982
0.0518522
0.0367702
0.0347393
0.0366927
0.0372745
0.034662
0.0359905
0.0512742
0.0516261
0.0366283
0.0358586
0.0510406
0.0513859
0.036493
0.0345346
0.0367408
0.0402398
0.0404083
0.0373484
0.0344615
0.0357273
0.0507986
0.051141
0.036345
0.0355953
0.0505465
0.0508823
0.036212
0.034329
0.0367942
0.0374283
0.0342638
0.0354679
0.0502878
0.0506207
0.0360654
0.035335
0.0500197
0.0503453
0.0359307
0.034126
0.0368537
0.0405823
0.0452494
0.0450995
0.044943
0.0456554
0.0457831
0.0459069
0.0460359
0.0454085
0.0407624
0.0375149
0.0340679
0.0352024
0.049743
0.0500649
0.0357751
0.0350654
0.0494552
0.0497694
0.0356391
0.0339231
0.0369209
0.0376097
0.033874
0.0349366
0.04916
0.0494705
0.0354861
0.0348045
0.0488557
0.0491584
0.0353559
0.0337251
0.0369967
0.0409483
0.04114
0.0377129
0.0336852
0.0346767
0.0485442
0.0488423
0.0351994
0.0345405
0.0482215
0.0485111
0.0350661
0.0335291
0.0370813
0.0378248
0.0334978
0.0344113
0.0478905
0.048175
0.0349059
0.0342756
0.0475485
0.0478242
0.0347752
0.033334
0.037175
0.0413373
0.0458867
0.0457264
0.0455644
0.0461633
0.0462942
0.0464241
0.0465561
0.046051
0.0415404
0.0379461
0.0333121
0.0341484
0.047199
0.0474692
0.0346139
0.0340135
0.0468386
0.0470995
0.0344854
0.0331446
0.037279
0.038077
0.033137
0.0338893
0.0464705
0.0467252
0.0343234
0.033756
0.0460908
0.0463354
0.0341984
0.0329607
0.0373934
0.041749
0.0419634
0.0382185
0.0329668
0.0336315
0.0457032
0.0459409
0.0340305
0.0334944
0.0453038
0.0455311
0.0339044
0.0327798
0.037519
0.0383713
0.0328008
0.0333712
0.0448971
0.0451171
0.0337347
0.0332385
0.044479
0.0446883
0.0336159
0.0326078
0.037657
0.0421836
0.0465479
0.0463814
0.0462148
0.0466878
0.0468208
0.0469536
0.047087
0.0467162
0.0424094
0.0385358
0.0326465
0.0331201
0.0440543
0.0442557
0.0334449
0.0329849
0.0436188
0.0438092
0.0333243
0.032445
0.037808
0.0387128
0.0325004
0.0328621
0.0431774
0.0433597
0.0331425
0.0327208
0.0427254
0.0428965
0.0330169
0.0322922
0.0379729
0.0426406
0.0428768
0.0389027
0.0323688
0.0325933
0.0422681
0.042431
0.0328223
0.0324415
0.0418011
0.0419531
0.0326833
0.0321593
0.0381523
0.0391058
0.0322604
0.0323112
0.0413289
0.0414725
0.0324901
0.0321671
0.0408461
0.0409782
0.0323361
0.0320382
0.0383462
0.0431176
0.047222
0.0470534
0.0468844
0.0472201
0.0473531
0.0474855
0.0465848
0.0464844
0.0463843
0.0462844
0.046185
0.0460861
0.0459878
0.0458905
0.0457936
0.0456982
0.0456032
0.0455101
0.0454173
0.045327
0.0452354
0.0445155
0.0445673
0.044619
0.0439378
0.0439206
0.043903
0.0435272
0.0435228
0.0435172
0.0435103
0.0439549
0.0446716
0.0447245
0.0447786
0.0448333
0.0440041
0.0439878
0.0439715
0.0435023
0.0434929
0.0434821
0.0432319
0.0432566
0.0432793
0.0432999
0.0433186
0.0433354
0.0433505
0.043296
0.0432778
0.0432574
0.0432678
0.0432876
0.0433053
0.0433437
0.0433285
0.0433112
0.0432915
0.0432456
0.0432348
0.0432099
0.0431825
0.0431526
0.0431631
0.0431934
0.0432208
0.0432692
0.043244
0.0432158
0.0431845
0.0431299
0.04312
0.043205
0.0434701
0.0440203
0.0448887
0.0449447
0.0450015
0.0450587
0.0440683
0.0440523
0.0440364
0.0434569
0.0434425
0.0434269
0.0434102
0.0440841
0.0451165
0.0451748
0.0452333
0.0452919
0.0441314
0.0441158
0.0441
0.0433924
0.0433736
0.0433538
0.0429558
0.042998
0.0430379
0.0430757
0.0431113
0.0431447
0.043176
0.0430847
0.0430467
0.0430058
0.0430116
0.0430542
0.0430937
0.0431498
0.0431117
0.04307
0.0430246
0.0429656
0.042962
0.0429153
0.0428655
0.0428126
0.0428064
0.0428632
0.0429162
0.0429755
0.0429223
0.0428651
0.042952
0.0430083
0.0430601
0.0431075
0.0431509
0.0431902
0.0432257
0.0432575
0.0432858
0.0433106
0.0433324
0.0433512
0.0433674
0.0433813
0.043393
0.0434029
0.0434112
0.0434182
0.0434239
0.0434286
0.0434324
0.0434352
0.0434374
0.0434381
0.0434668
0.0434673
0.0434668
0.043466
0.0434978
0.0434967
0.0434956
0.0434941
0.043519
0.0435213
0.0435236
0.0435264
0.0435291
0.0434985
0.0434646
0.0434625
0.0434596
0.0434557
0.043498
0.0434988
0.0434989
0.0435318
0.0435342
0.0435362
0.04357
0.0435654
0.0435606
0.0435559
0.0435514
0.0435472
0.0435438
0.0435409
0.0435598
0.0435632
0.0435675
0.0435729
0.0435908
0.0435844
0.0435794
0.0435757
0.0435887
0.0435927
0.0435983
0.0436055
0.0436139
0.0435981
0.0435789
0.0435853
0.0435921
0.0435992
0.043624
0.0436147
0.0436061
0.0436232
0.0436334
0.0436445
0.043661
0.0436483
0.0436367
0.0436263
0.0436171
0.0436091
0.0436031
0.0435989
0.0436063
0.0436107
0.043617
0.0436254
0.0436309
0.0436222
0.0436156
0.0436112
0.043614
0.0436185
0.0436251
0.0436339
0.0436445
0.0436412
0.0436353
0.0436466
0.0436592
0.0436733
0.0436814
0.0436665
0.0436531
0.0436567
0.0436705
0.043686
0.0437034
0.0436981
0.0436888
0.0436749
0.0436565
0.0436336
0.0436064
0.0435744
0.0435377
0.0434963
0.0434508
0.0434444
0.0434363
0.0434264
0.0434833
0.0434892
0.0434934
0.0435383
0.0435379
0.043536
0.0435323
0.0434753
0.0434141
0.0433993
0.0433816
0.0433607
0.0434349
0.0434515
0.0434648
0.0435264
0.0435177
0.0435058
0.0435724
0.0435792
0.0435831
0.0435844
0.0435838
0.0435817
0.0435784
0.0436135
0.0436203
0.0436264
0.0436638
0.0436539
0.0436437
0.0436692
0.0436826
0.0436962
0.0437098
0.0436731
0.0436314
0.0436347
0.0436359
0.0436342
0.0436916
0.0436874
0.0436813
0.0437226
0.0437351
0.0437502
0.0437734
0.0436958
0.0436289
0.043562
0.0434904
0.0434148
0.0433363
0.0433081
0.043276
0.0432398
0.0433302
0.0433627
0.0433908
0.0434711
0.0434473
0.0434191
0.0433858
0.0432931
0.0431993
0.0431543
0.0431048
0.0430494
0.0431598
0.0432048
0.0432511
0.0433527
0.0433218
0.0433028
0.0435131
0.0434864
0.0434787
0.0434888
0.043508
0.0435285
0.0435478
0.0436214
0.0436143
0.043613
0.0437591
0.0437227
0.0437033
0.0438107
0.0438662
0.0439359
0.0440106
0.0438131
0.0436269
0.04366
0.0437085
0.0437627
0.0440023
0.0439418
0.0438771
0.0440828
0.0441492
0.0442105
0.0443832
0.04432
0.0442532
0.044181
0.0441026
0.0440199
0.0439391
0.0438698
0.0438181
0.0437831
0.0437595
0.0437409
0.0437233
0.0437063
0.0436901
0.0437059
0.0437245
0.0437444
0.043759
0.0437369
0.0437165
0.0437227
0.0437442
0.0437676
0.0437976
0.0437851
0.043766
0.0437933
0.0438338
0.0438931
0.0439591
0.0438807
0.0438229
0.0438442
0.0439141
0.0440027
0.0440988
0.0440503
0.0439705
0.0440585
0.0441476
0.044232
0.0443183
0.0442342
0.0441441
0.0441937
0.0442836
0.0443678
0.0444469
0.0443967
0.04431
0.0443826
0.044451
0.0445166
0.0446081
0.0445407
0.0444705
0.0445218
0.0445931
0.0446615
0.0447275
0.0446734
0.0445804
0.0444443
0.0442686
0.0440581
0.0438157
0.0435519
0.043304
0.043118
0.0429924
0.0428915
0.0428034
0.0427457
0.0427565
0.0429116
0.0433331
0.0441469
0.0453505
0.046685
0.047617
0.0473903
0.043363
0.0393232
0.0321619
0.0320262
0.0403572
0.0404795
0.032162
0.0318812
0.0398582
0.0399695
0.0320163
0.0319392
0.0385563
0.0395506
0.0320786
0.0317674
0.0393542
0.039454
0.0318629
0.0316287
0.0388405
0.0389294
0.0317327
0.0318543
0.0387779
0.0436122
0.0438649
0.0397876
0.0320083
0.0315342
0.0383241
0.0384011
0.0315886
0.0314016
0.0377997
0.0378656
0.0314653
0.0317808
0.0390101
0.0400349
0.0319521
0.0313108
0.037273
0.0373262
0.0313174
0.0311906
0.0367384
0.0367801
0.0312138
0.0317254
0.0392542
0.0441203
0.0478882
0.0477239
0.0475577
0.0477474
0.0478762
0.0480029
0.048127
0.0480499
0.0443778
0.0402927
0.0319152
0.0311048
0.0362029
0.0362316
0.0310566
0.0310049
0.0356608
0.0356777
0.0309538
0.0316902
0.0395102
0.0405607
0.0319056
0.0309159
0.0351193
0.0351229
0.0307983
0.0307996
0.0345693
0.0345586
0.0307129
0.0316895
0.0397776
0.0446366
0.0448959
0.0408373
0.0319263
0.0307276
0.0340231
0.0339945
0.0305635
0.0306194
0.0334773
0.0334291
0.0304744
0.0317153
0.0400551
0.0411217
0.031979
0.0305434
0.0329314
0.0328708
0.0303141
0.0304275
0.032388
0.0323143
0.0302135
0.031783
0.0403419
0.0451542
0.0485114
0.0483624
0.0482082
0.0482478
0.0483645
0.0484764
0.0485822
0.0486539
0.0454096
0.0414101
0.0320809
0.0303409
0.0318526
0.0317618
0.0300303
0.0302037
0.0313201
0.0312181
0.0298959
0.031908
0.0406343
0.0416977
0.0322449
0.0300832
0.0307999
0.0306843
0.0296589
0.0298988
0.0302911
0.0301716
0.0294681
0.0320984
0.040926
0.0456606
0.0459057
0.0419763
0.0324853
0.0297437
0.0298025
0.0296751
0.0291929
0.0295645
0.0293265
0.0291962
0.0290211
0.0323569
0.0412078
0.0422385
0.0327385
0.0294592
0.0288676
0.0287283
0.0288092
0.0293473
0.0284232
0.0282759
0.0287296
0.0325979
0.0414714
0.0461425
0.0490275
0.0489137
0.0487886
0.0486809
0.0487711
0.0488512
0.0489194
0.0491276
0.0463686
0.0424866
0.0329644
0.0293357
0.0279909
0.027834
0.028633
0.0293254
0.0275718
0.0274033
0.0286418
0.0327964
0.0417191
0.0427261
0.0331608
0.0293841
0.027183
0.0269826
0.028628
0.0294145
0.0268312
0.0265959
0.028686
0.0329959
0.0419565
0.046581
0.0467755
0.0429562
0.0333721
0.0294899
0.0265066
0.0262566
0.0286926
0.0295379
0.0261919
0.0259475
0.0287706
0.0332163
0.0421846
0.0431735
0.0336011
0.0296293
0.0259032
0.0256587
0.028795
0.0296927
0.0256311
0.0253992
0.0288908
0.0334505
0.0424002
0.0469471
0.0493158
0.0492755
0.0492114
0.0489738
0.0490117
0.0490303
0.0478322
0.0478126
0.0477768
0.0477281
0.0476686
0.0476005
0.0475251
0.0474438
0.0473578
0.0472679
0.047175
0.0470798
0.0469827
0.0468843
0.0467848
0.0454087
0.0454663
0.0455228
0.0441901
0.0441766
0.044162
0.0433115
0.0432892
0.0432661
0.0432418
0.0442022
0.0455777
0.0456305
0.0456802
0.0457263
0.0442215
0.0442188
0.0442119
0.043216
0.0431881
0.0431571
0.0425551
0.0426094
0.0426636
0.0427164
0.0427676
0.0428172
0.0428653
0.0426971
0.0426346
0.0425693
0.0425381
0.0426115
0.0426807
0.0427363
0.0426639
0.0425872
0.0425061
0.0424582
0.0425007
0.0424289
0.0423532
0.0422681
0.042176
0.0422782
0.0423726
0.0424195
0.0423336
0.042252
0.0421788
0.0420708
0.0421699
0.0424941
0.0431212
0.044219
0.0457674
0.0458029
0.0458308
0.0458501
0.0441642
0.044193
0.0442101
0.0430806
0.043039
0.0429757
0.0428889
0.0441261
0.0458592
0.0458556
0.0458363
0.0457993
0.0438961
0.0440086
0.0440765
0.0427722
0.0426273
0.0424522
0.0415981
0.0417609
0.0419239
0.0420784
0.0422105
0.0423244
0.0424195
0.042059
0.0419338
0.0418059
0.0417796
0.0418692
0.0419673
0.0421148
0.0420649
0.0420296
0.0420083
0.0417003
0.0416804
0.041559
0.0414449
0.041337
0.0415474
0.0415843
0.0416356
0.0420022
0.042011
0.0420308
0.0420602
0.0415256
0.0412443
0.0414388
0.0422473
0.0437416
0.0457372
0.0478317
0.0490254
0.0493271
0.0470921
0.0433743
0.0338479
0.0297985
0.0253867
0.0251682
0.0289305
0.0298756
0.0251742
0.0249741
0.0290438
0.0337
0.0425991
0.0435553
0.0341114
0.029995
0.0250045
0.0248057
0.0290974
0.0300863
0.0248572
0.0246594
0.0292303
0.0339655
0.0427783
0.0472026
0.0472716
0.0437127
0.0343866
0.0302206
0.0247325
0.0245351
0.0292991
0.0303245
0.0246243
0.0244239
0.0294469
0.0342402
0.0429336
0.0438377
0.0346675
0.0304699
0.0245278
0.0243306
0.029527
0.0305828
0.0244448
0.0242431
0.029685
0.0345165
0.0430555
0.0472837
0.0491265
0.0492366
0.0493028
0.0489932
0.0489326
0.0488468
0.0487314
0.0489737
0.0472288
0.0439176
0.0349503
0.0307354
0.024367
0.024179
0.029771
0.030838
0.024338
0.0241317
0.0299164
0.0347964
0.0431263
0.043925
0.035212
0.0309604
0.0243378
0.0241215
0.0299699
0.0310289
0.0243642
0.0241452
0.0300746
0.0350481
0.0431119
0.0470876
0.0468076
0.0438233
0.0354333
0.0311101
0.0244227
0.0242013
0.0300815
0.0311265
0.0245061
0.0242815
0.0301231
0.0352515
0.0429758
0.0435675
0.035575
0.0311417
0.0246046
0.0243735
0.0300575
0.0310728
0.0247041
0.0244654
0.0300015
0.0353407
0.0426416
0.0462873
0.0476077
0.048328
0.0487494
0.0485123
0.0480922
0.0475329
0.0470136
0.0468324
0.0454596
0.0430016
0.0355548
0.0309889
0.0247985
0.0245461
0.0298265
0.0307949
0.0248684
0.0245972
0.0296381
0.0352432
0.0419792
0.0421763
0.035307
0.0305567
0.0248906
0.0245761
0.0292801
0.0301273
0.0248043
0.0244389
0.0288038
0.0348489
0.0410288
0.0446406
0.0441995
0.0412519
0.0349032
0.0296372
0.024648
0.0243344
0.0282697
0.0292908
0.0247381
0.0246921
0.0281865
0.0348397
0.0405024
0.0409568
0.035745
0.0294508
0.0255378
0.0260168
0.0284706
0.0296666
0.0274007
0.0219607
0.0225895
0.0278098
0.0291188
0.0284763
0.0365346
0.0405553
0.0441152
0.0457226
0.0459225
0.046297
0.0466359
0.0463138
0.0460893
0.0459883
0.0457563
0.0444163
0.0412323
0.0384052
0.0385643
0.0311306
0.0242522
0.0227491
0.0231362
0.0237129
0.0264282
0.0217844
0.0229349
0.0261194
0.0331323
0.0415927
0.0342735
0.0288483
0.0238739
0.0252963
0.028778
0.0312025
0.0274673
0.0225063
0.0238538
0.0249054
0.031871
0.0262283
0.0229076
0.0242736
0.0254027
0.0295808
0.0358539
0.0294882
0.0383786
0.0326704
0.0282544
0.0233464
0.024809
0.030505
0.0341288
0.0326906
0.0261006
0.0279153
0.0242283
0.0264494
0.0289831
0.0241814
0.0256363
0.032787
0.0265926
0.029658
0.0248046
0.0268945
0.032271
0.0385568
0.0434284
0.0465377
0.0420002
0.0388665
0.0312451
0.0311378
0.0432708
0.0417458
0.0445102
0.0468323
0.0454274
0.0452773
0.0416356
0.0392522
0.0435291
0.0378173
0.0306708
0.0292402
0.0458268
0.0451051
0.0460966
0.046009
0.0460139
0.0465646
0.0472218
0.0467827
0.0477271
0.0488261
0.0483287
0.0497711
0.0488308
0.0461248
0.0420132
0.036334
0.0302805
0.0252151
0.0275056
0.0302846
0.0252981
0.0273277
0.033146
0.0385521
0.0342701
0.0367962
0.0433293
0.0371823
0.0308681
0.0256063
0.0281539
0.0315031
0.025936
0.0283892
0.0350056
0.0397163
0.0350909
0.0376266
0.0460055
0.0484603
0.0456381
0.0472231
0.0506164
0.0522274
0.0513839
0.0487321
0.0445653
0.039233
0.0329207
0.0266994
0.0298648
0.0256602
0.0279202
0.0312475
0.0259798
0.0282194
0.0382333
0.0316312
0.0264401
0.0292539
0.0336246
0.0275189
0.0308441
0.02633
0.028512
0.0351741
0.0420506
0.0387557
0.0444139
0.0366413
0.0487478
0.0515473
0.0471324
0.0419686
0.0339796
0.03525
0.0376296
0.0399608
0.0476666
0.049953
0.0543416
0.0518451
0.0483272
0.0509651
0.0470548
0.0406062
0.0327415
0.0270567
0.0301126
0.0345541
0.0280469
0.0319806
0.0269738
0.0293412
0.0412996
0.0343049
0.0279774
0.0320882
0.0272877
0.030246
0.0349119
0.0281734
0.0321314
0.0271978
0.0295537
0.0428375
0.0383705
0.0448492
0.0379733
0.0415931
0.0477034
0.0400254
0.0545511
0.0501728
0.0441935
0.0372695
0.0383475
0.041554
0.0508451
0.0546441
0.0524088
0.0530272
0.0563321
0.0564538
0.05503
0.0533445
0.0535665
0.0547859
0.0558545
0.0536831
0.0536885
0.0531545
0.0522134
0.051022
0.0506288
0.0498234
0.0483527
0.0482996
0.0477739
0.0457103
0.0459293
0.0432115
0.043357
0.0436615
0.0440318
0.044457
0.0449141
0.0453872
0.045836
0.0463064
0.0468125
0.0472739
0.0475299
0.0476822
0.0477613
0.0478078
0.0456403
0.0454982
0.0452745
0.0430109
0.0433054
0.0435439
0.0420339
0.041812
0.0415612
0.0412996
0.0426696
0.0449734
0.0445286
0.0440399
0.0435833
0.041623
0.0419396
0.0422825
0.0410566
0.04084
0.040658
0.0406608
0.0406673
0.0407226
0.0408171
0.0409446
0.0411129
0.0412808
0.041164
0.0410977
0.0410499
0.0415595
0.0415324
0.0415207
0.0421045
0.0421595
0.042232
0.0423247
0.0416138
0.0410284
0.041034
0.0410763
0.0411585
0.0419721
0.0418156
0.041698
0.0424426
0.0425909
0.0427755
0.0430029
0.0421761
0.0412975
0.0407082
0.0405413
0.0413234
0.0431667
0.042744
0.0423406
0.0419959
0.0407555
0.0408188
0.0410405
0.0404965
0.0405574
0.0407271
0.0410155
0.0408092
0.0417366
0.0416104
0.0416992
0.0419507
0.0419759
0.0414302
0.0410516
0.0414181
0.0419235
0.0425336
0.0433902
0.0426948
0.0421157
0.0416437
0.0412763
0.0410103
0.0408224
0.0415025
0.0417845
0.042149
0.0431258
0.0427448
0.0424315
0.0432792
0.0436105
0.0440019
0.0444565
0.0435759
0.0425988
0.0431307
0.0437436
0.0444249
0.045352
0.0446904
0.044098
0.044976
0.0455603
0.0462085
0.0469178
0.0460797
0.0451784
0.0441803
0.0432406
0.0426435
0.0424176
0.0432667
0.0434863
0.0455062
0.0453137
0.0456255
0.0481507
0.0479012
0.0510751
0.0509389
0.050567
0.0504162
0.048781
0.0482589
0.0479026
0.0465934
0.0458921
0.0454326
0.0446101
0.0439477
0.0438219
0.0430354
0.043407
0.0440568
0.0449761
0.0442597
0.0451843
0.0447148
0.0456821
0.0467186
0.0464028
0.0474561
0.0474039
0.048407
0.049516
0.0496457
0.0506932
0.0531459
0.0564003
0.0576546
0.058023
0.0575455
0.0594579
0.0583996
0.0551679
0.0509609
0.053824
0.0493204
0.0410166
0.0326486
0.0278375
0.0308596
0.0388292
0.0466447
0.0431021
0.0355716
0.0289167
0.0329029
0.0279343
0.03031
0.0439956
0.0361942
0.0291527
0.0338404
0.0286777
0.032163
0.037761
0.02989
0.0343335
0.0289252
0.0317081
0.0471812
0.0421084
0.0487082
0.0403852
0.0448851
0.0509267
0.0425154
0.0586918
0.0555046
0.0591888
0.0548675
0.0580388
0.0537376
0.0460615
0.0362509
0.0298855
0.0347155
0.0291667
0.0323936
0.0378453
0.0311186
0.0360465
0.0299722
0.0336307
0.0429033
0.050301
0.0453555
0.0517938
0.0414122
0.0444414
0.0482936
0.0578752
0.0634256
0.0605135
0.0632851
0.058421
0.0608201
0.0628802
0.0655662
0.0674569
0.0668618
0.0690396
0.0677367
0.0641589
0.0605578
0.0540822
0.0443382
0.0348015
0.0303764
0.0366259
0.0311719
0.038828
0.0322107
0.0411622
0.0488161
0.05483
0.0471192
0.0499007
0.0517515
0.0562641
0.0499544
0.0606987
0.0417743
0.0322459
0.0382781
0.0315551
0.0369721
0.0305751
0.0347634
0.0449147
0.0527299
0.0470075
0.0602723
0.0634861
0.0682141
0.0657851
0.0632981
0.0586361
0.0525318
0.0432334
0.0334641
0.0412347
0.0323364
0.0390839
0.0315567
0.0375172
0.0306974
0.0350339
0.0421153
0.0336011
0.040404
0.0318619
0.0373801
0.0313119
0.0354368
0.0531582
0.0464334
0.0554601
0.0499403
0.0564449
0.0455573
0.0481949
0.0525323
0.057919
0.0498414
0.0513556
0.0546332
0.0633427
0.0687543
0.0657607
0.0627756
0.0691241
0.0623277
0.0658181
0.0606975
0.0534139
0.0427116
0.0334507
0.0411168
0.0326888
0.0392061
0.032049
0.0375192
0.0458461
0.0349246
0.0426244
0.0342279
0.0416357
0.0326395
0.0384816
0.0321862
0.036602
0.0563066
0.0464519
0.0352336
0.0443529
0.0347197
0.0429464
0.0340235
0.0409551
0.0333923
0.0393263
0.0482429
0.0366075
0.044795
0.0359949
0.0439196
0.0343556
0.0406501
0.0339246
0.0389806
0.0594518
0.0497719
0.0376966
0.0481797
0.0372436
0.0469056
0.036399
0.0444443
0.0356653
0.0426628
0.0527536
0.0397221
0.0496042
0.0390538
0.04887
0.0374799
0.0461159
0.037237
0.0452589
0.0360917
0.0426016
0.0558763
0.0648447
0.0567318
0.0658477
0.0588788
0.0665254
0.0550534
0.0612594
0.0674159
0.0585452
0.0629852
0.0676032
0.0595726
0.072997
0.0763949
0.0689425
0.0614747
0.0514783
0.0544386
0.0620759
0.0505111
0.0569466
0.0634793
0.0532853
0.0548661
0.0592121
0.0639046
0.0559691
0.0694281
0.0758353
0.0723575
0.0752231
0.0694409
0.0654881
0.0581434
0.051619
0.0591316
0.0482118
0.0542126
0.0601293
0.0524711
0.056256
0.050908
0.0663855
0.0695372
0.0662874
0.0699951
0.0739766
0.0717695
0.0744785
0.06962
0.0658344
0.0693056
0.072018
0.0786393
0.0810246
0.0799723
0.0826736
0.081073
0.0842113
0.0816807
0.0773217
0.0737455
0.0770365
0.0739172
0.0774136
0.073603
0.077268
0.0735779
0.0775364
0.0722039
0.0648351
0.0547589
0.0414565
0.0536375
0.0402254
0.0513985
0.0394066
0.0501853
0.0383578
0.0472292
0.0375832
0.0452548
0.056146
0.0422011
0.0531634
0.0415461
0.0523754
0.0399263
0.0496084
0.0397574
0.0488014
0.038482
0.0457291
0.0598188
0.069037
0.0605049
0.0693295
0.0622165
0.0708574
0.0583401
0.0652432
0.0712379
0.0609888
0.0616529
0.0666311
0.0722394
0.0628177
0.0633211
0.0678683
0.0780383
0.0843292
0.0811499
0.0774713
0.0852272
0.0779875
0.081503
0.0772992
0.0860325
0.0767449
0.0689251
0.0590348
0.0445703
0.0582017
0.0433911
0.056108
0.0425914
0.0550486
0.0415235
0.0522796
0.0404812
0.0493157
0.0615394
0.045953
0.0588433
0.0452997
0.058103
0.0437058
0.0558572
0.043739
0.0555479
0.0416962
0.051816
0.0409613
0.0489007
0.0732447
0.0641634
0.0740124
0.0657118
0.0748336
0.0675909
0.0755573
0.0630744
0.0698096
0.076525
0.0659555
0.071409
0.0766199
0.0670588
0.0673447
0.0719785
0.0828857
0.0867912
0.0830387
0.0866902
0.0833539
0.0873422
0.0829971
0.0872676
0.0832551
0.0877031
0.0824285
0.0871932
0.082095
0.0729502
0.0617266
0.0462997
0.0612251
0.0454206
0.0589109
0.0444438
0.0570814
0.0429
0.0521848
0.0655
0.0500118
0.0639791
0.0475186
0.0612941
0.0473989
0.0607302
0.0454123
0.0572857
0.0446044
0.0542403
0.0777724
0.0679654
0.0509755
0.0678552
0.0506397
0.0673625
0.0496694
0.0655384
0.0485936
0.0637812
0.0467911
0.0581662
0.0716549
0.0548884
0.0701553
0.0521578
0.0677366
0.0516568
0.0671839
0.0491905
0.0633458
0.0480882
0.0593524
0.0841683
0.075127
0.0848245
0.0768002
0.0857229
0.0791961
0.0866451
0.0736876
0.074903
0.0809774
0.08728
0.0770232
0.0820124
0.0870403
0.0783955
0.0933096
0.0971601
0.0882931
0.0795088
0.0686935
0.0711994
0.0795704
0.0731833
0.0813417
0.0681114
0.0695479
0.0757212
0.0813919
0.0710827
0.0714771
0.0764335
0.0879498
0.0961745
0.0918118
0.0951971
0.0885063
0.091045
0.0938992
0.0902015
0.0927081
0.0892983
0.0914764
0.096429
0.0993724
0.0977363
0.101147
0.0991869
0.102795
0.100474
0.104509
0.101907
0.1061
0.102917
0.098214
0.0942191
0.0979899
0.0945953
0.0987509
0.0941151
0.0987353
0.0945113
0.0992423
0.0936637
0.0986028
0.0932218
0.0839303
0.073833
0.0548541
0.0731493
0.053518
0.0708897
0.0520934
0.0690733
0.0500841
0.0628816
0.0765566
0.058801
0.074914
0.0553511
0.0717303
0.0546529
0.0710289
0.0522546
0.0659324
0.0808713
0.0901654
0.081751
0.0904563
0.0840501
0.0924401
0.0785515
0.0801159
0.0865169
0.0924657
0.0816782
0.0821288
0.0872398
0.0993894
0.108245
0.103564
0.107162
0.100021
0.10275
0.105705
0.10183
0.104346
0.100771
0.109408
0.113102
0.111057
0.114887
0.112579
0.116752
0.114225
0.109361
0.0985437
0.0903268
0.0811169
0.0633918
0.0803523
0.060397
0.0784959
0.0577505
0.0766045
0.0553025
0.0707073
0.0823636
0.066887
0.0816526
0.0617393
0.0792585
0.0599999
0.0780214
0.0571496
0.0728501
0.0865186
0.0958757
0.0879893
0.0967082
0.0901253
0.0979201
0.0861952
0.0922301
0.098195
0.087727
0.0884352
0.0931522
0.105549
0.110236
0.105674
0.109976
0.10593
0.110677
0.105163
0.110039
0.104697
0.0958752
0.0868017
0.0702678
0.0857715
0.0668559
0.0838683
0.0635332
0.0820767
0.0600605
0.0764084
0.0871644
0.0722925
0.0858202
0.0662709
0.0833118
0.0622861
0.0784956
0.0996003
0.0900474
0.0741896
0.0898287
0.0717322
0.0883617
0.0676834
0.0830952
0.0941136
0.0795311
0.0916166
0.073666
0.0892587
0.0687945
0.0844302
0.105011
0.0959721
0.080651
0.0951702
0.0778345
0.0932003
0.0734085
0.0879752
0.0991043
0.0846633
0.0957544
0.0784401
0.0930166
0.0731855
0.0878155
0.109513
0.0991152
0.0836305
0.0971208
0.0804536
0.0932434
0.104538
0.0898975
0.100077
0.0857848
0.0985244
0.0794999
0.0930904
0.106527
0.116234
0.109011
0.117771
0.104613
0.111891
0.119051
0.108166
0.130923
0.126314
0.131366
0.125775
0.130421
0.124697
0.115462
0.106515
0.0918064
0.103312
0.085817
0.0969172
0.109332
0.0938716
0.104455
0.0875693
0.0981355
0.111626
0.120356
0.114961
0.122635
0.1107
0.11187
0.117791
0.129845
0.139683
0.129263
0.120226
0.111596
0.0980385
0.108307
0.0922988
0.101552
0.114382
0.0990755
0.108964
0.0928224
0.102058
0.115975
0.124896
0.119715
0.127364
0.11544
0.116525
0.122229
0.135368
0.140178
0.134918
0.139381
0.134115
0.124731
0.11575
0.101806
0.111885
0.095191
0.104444
0.117284
0.0995036
0.107408
0.128104
0.119067
0.104715
0.115099
0.101233
0.109202
0.121812
0.105515
0.113259
0.125722
0.135203
0.121696
0.129775
0.1375
0.126434
0.147809
0.138426
0.131415
0.119095
0.122961
0.120703
0.126837
0.139959
0.146573
0.143284
0.142888
0.144957
0.149066
0.149594
0.146869
0.14349
0.138482
0.13439
0.136867
0.139443
0.135557
0.129846
0.121466
0.110902
0.101799
0.105304
0.113738
0.100772
0.102867
0.108433
0.114337
0.104867
0.120985
0.125263
0.12847
0.121465
0.116346
0.106972
0.100865
0.108114
0.0957116
0.0975023
0.10278
0.109105
0.0995044
0.12084
0.109707
0.100856
0.0918838
0.0945606
0.103176
0.0892941
0.0917571
0.0975839
0.103517
0.0939501
0.0987158
0.0932944
0.110488
0.119704
0.111102
0.115346
0.114926
0.11848
0.114093
0.116979
0.113147
0.115411
0.120455
0.122094
0.118475
0.12004
0.122475
0.12428
0.12467
0.123976
0.122174
0.125944
0.123907
0.127929
0.125673
0.129793
0.126904
0.121489
0.116298
0.121038
0.12449
0.116379
0.131902
0.135352
0.133746
0.137435
0.140428
0.140254
0.138194
0.137848
0.135923
0.133343
0.13364
0.131177
0.131308
0.129047
0.128966
0.126865
0.126627
0.125747
0.126811
0.12816
0.129337
0.130564
0.131862
0.133002
0.134359
0.135437
0.136848
0.137886
0.139308
0.140441
0.141773
0.142646
0.142665
0.141624
0.144757
0.14499
0.146694
0.147312
0.149108
0.147945
0.148856
0.150386
0.151488
0.151774
0.151051
0.153961
0.152586
0.148056
0.142093
0.134452
0.12581
0.113369
0.121511
0.106842
0.1138
0.126342
0.10948
0.1166
0.1365
0.128035
0.114536
0.123553
0.109871
0.117114
0.130471
0.143601
0.138538
0.145429
0.135078
0.151303
0.154318
0.147373
0.140645
0.128329
0.131787
0.130137
0.136324
0.14715
0.150745
0.158006
0.155133
0.15163
0.154757
0.150287
0.142042
0.131599
0.117583
0.124047
0.135904
0.148352
0.144078
0.135402
0.119899
0.126003
0.13867
0.146881
0.137738
0.124819
0.13121
0.14166
0.152879
0.148896
0.153882
0.158166
0.160011
0.155282
0.157104
0.162862
0.161165
0.158858
0.161289
0.158408
0.149559
0.12788
0.122125
0.135253
0.12918
0.141518
0.143918
0.138995
0.124927
0.132423
0.143632
0.127959
0.133671
0.153399
0.144088
0.130193
0.137408
0.148361
0.133222
0.138841
0.158182
0.149379
0.135628
0.142788
0.153552
0.138815
0.144094
0.163413
0.154262
0.14039
0.1473
0.15711
0.165439
0.169834
0.160996
0.173535
0.173835
0.169833
0.164491
0.15354
0.158783
0.168057
0.157406
0.162518
0.171078
0.175385
0.168031
0.172082
0.178679
0.176177
0.171933
0.162374
0.167639
0.175212
0.181169
0.178172
0.176165
0.167816
0.172797
0.179344
0.18356
0.181256
0.174197
0.179248
0.184404
0.188233
0.185612
0.184214
0.18606
0.182301
0.187525
0.190676
0.19257
0.192857
0.190666
0.195623
0.195477
0.197212
0.194635
0.200421
0.200718
0.204903
0.208397
0.213794
0.207198
0.218083
0.225454
0.228087
0.243567
0.237258
0.254276
0.2538
0.27646
0.309056
0.354372
0.403577
0.431082
0.363321
0.325781
0.328721
0.301412
0.279117
0.299625
0.293021
0.316215
0.348421
0.321176
0.29313
0.270629
0.267706
0.281855
0.299746
0.282815
0.2691
0.240514
0.253604
0.270443
0.258886
0.24156
0.252134
0.240679
0.223162
0.240825
0.226152
0.219944
0.208162
0.218563
0.210164
0.206501
0.226353
0.222901
0.234637
0.220355
0.21076
0.220875
0.225819
0.223649
0.217192
0.209435
0.201669
0.194663
0.188745
0.190018
0.196862
0.205813
0.216773
0.229336
0.247897
0.273128
0.25729
0.243445
0.267233
0.290833
0.27764
0.251623
0.186939
0.184794
0.189271
0.192072
0.197485
0.193532
0.189871
0.18642
0.182494
0.180177
0.177925
0.175778
0.178524
0.180993
0.183635
0.186516
0.183457
0.180675
0.182264
0.185331
0.18881
0.192806
0.197464
0.202941
0.20786
0.200711
0.202733
0.211261
0.211975
0.202989
0.196297
0.196295
0.19504
0.190445
0.186595
0.183298
0.18377
0.187194
0.191281
0.191188
0.187084
0.183675
0.180764
0.180827
0.180423
0.179535
0.178146
0.176232
0.173742
0.170604
0.16621
0.164797
0.16345
0.162175
0.160975
0.159851
0.158802
0.157824
0.156914
0.156068
0.155288
0.154572
0.153917
0.153319
0.152776
0.152284
0.154305
0.154903
0.155555
0.156264
0.157034
0.157868
0.158769
0.15974
0.160784
0.161912
0.163125
0.164429
0.165828
0.167323
0.168916
0.17183
0.170041
0.168373
0.170336
0.17215
0.174111
0.175843
0.173739
0.17181
0.170037
0.168659
0.166821
0.165377
0.164037
0.162792
0.164332
0.165666
0.167106
0.168403
0.166892
0.165495
0.166349
0.167785
0.169339
0.171026
0.172864
0.174875
0.177087
0.17788
0.175604
0.173548
0.1739
0.175959
0.17825
0.178224
0.175971
0.173948
0.172115
0.172032
0.171679
0.169968
0.168395
0.166945
0.167315
0.16876
0.170326
0.17044
0.168902
0.167483
0.166169
0.165979
0.165603
0.16502
0.1642
0.163094
0.161638
0.160569
0.159577
0.158656
0.15989
0.160879
0.161945
0.162998
0.161883
0.160848
0.159885
0.158971
0.157803
0.157013
0.156284
0.15561
0.156599
0.15733
0.158119
0.158992
0.158162
0.157392
0.158027
0.15882
0.159675
0.160593
0.161581
0.162644
0.163788
0.164359
0.163204
0.16213
0.162519
0.163589
0.16474
0.16495
0.163816
0.16276
0.161775
0.161522
0.161131
0.160201
0.159336
0.158531
0.158922
0.159728
0.160593
0.160857
0.16
0.159201
0.159352
0.160141
0.160984
0.161885
0.16285
0.163882
0.164989
0.166178
0.167456
0.168833
0.170324
0.171943
0.173713
0.17566
0.177824
0.180257
0.183035
0.186271
0.19014
0.194904
0.201076
0.209238
0.203245
0.197323
0.19263
0.196505
0.200605
0.204306
0.193906
0.194512
0.191967
0.193457
0.19891
0.200565
0.203962
0.192029
0.18853
0.1836
0.190112
0.178212
0.177566
0.176805
0.17942
0.180748
0.181929
0.180552
0.178276
0.175621
0.176545
0.172694
0.171728
0.170252
0.169011
0.1653
0.156053
0.159101
0.169475
0.170954
0.165464
0.167565
0.160655
0.150785
0.153694
0.161573
0.156231
0.146186
0.149073
0.161847
0.165146
0.162761
0.164354
0.167455
0.16599
0.164845
0.163498
0.16239
0.160757
0.16004
0.158417
0.156227
0.156193
0.157661
0.158651
0.159326
0.161064
0.161755
0.16208
0.164202
0.164549
0.166738
0.168684
0.169478
0.169995
0.170287
0.173355
0.173777
0.174197
0.170793
0.170479
0.167476
0.167394
0.167326
0.167147
0.164658
0.164641
0.164596
0.161832
0.161941
0.162068
0.16214
0.159583
0.159689
0.159658
0.157252
0.157232
0.15689
0.156245
0.155269
0.153855
0.152842
0.15382
0.154441
0.15229
0.151971
0.151366
0.149471
0.149761
0.149763
0.14962
0.152304
0.154779
0.154797
0.154667
0.154443
0.157129
0.156922
0.156683
0.159405
0.159216
0.15906
0.158992
0.161784
0.164609
0.164714
0.167687
0.167982
0.171307
0.174944
0.179153
0.184357
0.186589
0.180606
0.175815
0.171773
0.172068
0.17615
0.180892
0.186593
0.186024
0.192479
0.190228
0.18776
0.185163
0.188964
0.192324
0.188258
0.184831
0.181897
0.18031
0.182867
0.185747
0.182713
0.180395
0.178257
0.175905
0.177667
0.179507
0.181362
0.183178
0.184735
0.179892
0.180684
0.176119
0.172127
0.171838
0.175633
0.174959
0.178891
0.177621
0.176244
0.174814
0.173392
0.170819
0.171952
0.173053
0.174072
0.170757
0.171375
0.16812
0.168429
0.168572
0.168472
0.168237
0.165057
0.16486
0.161952
0.161812
0.159068
0.159257
0.159493
0.162153
0.162349
0.165254
0.165379
0.165352
0.165171
0.162507
0.162568
0.162503
0.159913
0.159721
0.157343
0.157063
0.156775
0.156518
0.156349
0.156323
0.156452
0.15375
0.153906
0.154174
0.151385
0.15164
0.151938
0.152171
0.149368
0.149086
0.148861
0.146273
0.146331
0.146503
0.146745
0.147011
0.14717
0.14719
0.146924
0.146326
0.145477
0.144247
0.142974
0.14378
0.144346
0.141899
0.141735
0.141228
0.139092
0.138651
0.136414
0.136047
0.135317
0.133416
0.132764
0.130765
0.130217
0.1281
0.127647
0.125401
0.125062
0.124311
0.123327
0.121928
0.120242
0.118016
0.118009
0.115931
0.115769
0.113847
0.111232
0.107915
0.109435
0.111741
0.113517
0.112656
0.111289
0.109649
0.107513
0.107551
0.105564
0.105404
0.10357
0.103262
0.101583
0.10119
0.099603
0.0976109
0.094709
0.0908354
0.0932346
0.0896941
0.0916238
0.088484
0.0833831
0.0806686
0.0776804
0.0799625
0.082464
0.0793623
0.0872063
0.0899628
0.091984
0.0935759
0.093866
0.0955573
0.0957456
0.0975819
0.096971
0.0957784
0.0947941
0.0935331
0.0926156
0.0915421
0.0900435
0.0882248
0.0857612
0.0864478
0.0881132
0.0895112
0.0883931
0.0873964
0.0862121
0.0846586
0.084272
0.0828008
0.0822549
0.0809716
0.0793373
0.0772191
0.0775566
0.0756898
0.0731824
0.074125
0.0719357
0.0724433
0.0705149
0.0707306
0.072158
0.0712583
0.0701789
0.0690149
0.0682952
0.0671897
0.0658267
0.0641589
0.0620744
0.0587116
0.0540059
0.0559408
0.0530619
0.0564999
0.0608266
0.0626283
0.064157
0.0652802
0.0663386
0.0668182
0.0666567
0.0691049
0.0693911
0.0658923
0.0657284
0.0687481
0.0717595
0.0732087
0.0740072
0.0751577
0.0758004
0.0771805
0.0782013
0.0790834
0.0801863
0.0811749
0.0792132
0.0789717
0.076583
0.0766757
0.0762008
0.0743217
0.0740306
0.0717106
0.0683169
0.0658411
0.0663528
0.0681355
0.0709034
0.0707004
0.0737102
0.0732654
0.0730989
0.0758484
0.0756157
0.0785594
0.0816022
0.0832767
0.0839286
0.0853091
0.0861915
0.086533
0.0861126
0.0888954
0.0905022
0.0912436
0.0914759
0.0909101
0.0939225
0.0936357
0.0963227
0.0979591
0.0990723
0.100156
0.101066
0.102412
0.103392
0.104684
0.105667
0.106892
0.107953
0.109108
0.110297
0.11125
0.10924
0.108835
0.106661
0.106401
0.103986
0.103938
0.101254
0.101476
0.0985146
0.0989807
0.0987207
0.0963493
0.0958355
0.0956257
0.095683
0.0982688
0.098188
0.100913
0.100767
0.103581
0.103405
0.106295
0.106095
0.109059
0.11178
0.113631
0.114978
0.116017
0.117306
0.118444
0.119614
0.120889
0.119346
0.117227
0.116843
0.114558
0.114321
0.111825
0.111533
0.111384
0.114283
0.114132
0.117083
0.11985
0.121835
0.122463
0.122673
0.122469
0.119552
0.119681
0.11989
0.116898
0.116811
0.116916
0.114672
0.114285
0.114106
0.1117
0.111446
0.109175
0.108822
0.108696
0.108802
0.106049
0.106256
0.106691
0.107343
0.108159
0.109731
0.110472
0.112176
0.112829
0.111349
0.110172
0.109122
0.108044
0.106947
0.105915
0.105007
0.104274
0.103739
0.103462
0.10129
0.10091
0.0988919
0.0984159
0.0965578
0.0959714
0.0942766
0.0936148
0.0931996
0.0930471
0.0932123
0.0905276
0.0906153
0.0880832
0.0880269
0.0882439
0.0888513
0.0856509
0.0854886
0.085683
0.0839337
0.083345
0.0830254
0.0830962
0.0833747
0.0840732
0.0807282
0.0813605
0.0781801
0.0756905
0.0760816
0.0780429
0.0783471
0.0805406
0.0806637
0.0810627
0.0818342
0.0828512
0.0821372
0.0809244
0.079815
0.078903
0.0778851
0.0768595
0.0760249
0.0748994
0.0739709
0.0733969
0.0719893
0.0711891
0.0707333
0.0691352
0.068535
0.0672441
0.0683299
0.069549
0.0701075
0.0712573
0.0725003
0.0730398
0.0742353
0.0754941
0.0751209
0.0737747
0.0735297
0.0721272
0.0708181
0.0705626
0.0691904
0.0679022
0.0666446
0.0654569
0.0644232
0.063734
0.0631789
0.0633102
0.0635849
0.0643764
0.0641513
0.0634815
0.0623157
0.0610517
0.0605556
0.0593647
0.0586466
0.0564103
0.0557956
0.0591443
0.0589301
0.0614155
0.0618106
0.0613185
0.0607695
0.0607211
0.0590195
0.058348
0.0581946
0.058317
0.0557872
0.0556347
0.0537591
0.0531983
0.053056
0.0511714
0.0520329
0.0530737
0.0529812
0.0517779
0.0506425
0.0506741
0.0518829
0.0531425
0.0545048
0.0542312
0.0542362
0.0545767
0.0556287
0.0563487
0.0571992
0.0582815
0.0580518
0.0568085
0.0567241
0.055461
0.0555277
0.0559723
0.0574301
0.0569127
0.0584092
0.0580448
0.0594536
0.0593288
0.0594769
0.0598905
0.0610111
0.0616684
0.062651
0.0637895
0.0634932
0.0622258
0.061002
0.0607343
0.0620294
0.0633982
0.0648751
0.0648032
0.0650341
0.0663109
0.0676494
0.0690768
0.0692636
0.0677191
0.066203
0.066425
0.0679344
0.0694385
0.0696363
0.0681506
0.0666649
0.0651682
0.0636577
0.0621126
0.0606748
0.0609819
0.062484
0.0639675
0.0642818
0.0628257
0.0613635
0.0598988
0.0603085
0.0588707
0.059317
0.0579136
0.0565097
0.0551058
0.0536961
0.0522822
0.0509555
0.0497307
0.0485596
0.048994
0.0478096
0.0485411
0.0473181
0.0462052
0.0470896
0.0460095
0.0469465
0.0459779
0.0450479
0.0459974
0.0468755
0.0478066
0.0486154
0.0477158
0.0468691
0.0476852
0.0485066
0.0493789
0.0502968
0.0495626
0.0487884
0.047974
0.049035
0.0482251
0.0493627
0.0505522
0.049781
0.0510532
0.0502803
0.0516226
0.0529803
0.0543119
0.0549015
0.0536138
0.0523122
0.0529801
0.0517482
0.0524334
0.0512723
0.0501367
0.0508751
0.0498106
0.0505527
0.0512579
0.0522571
0.0515825
0.0526463
0.0519713
0.0531001
0.0542561
0.0536266
0.0548361
0.0542262
0.0554917
0.0567766
0.0562292
0.0556715
0.0570231
0.0583985
0.0597703
0.0602302
0.0588901
0.057541
0.0580673
0.0593804
0.0606946
0.0611582
0.0598666
0.0585879
0.0573207
0.056072
0.056638
0.0554355
0.0560161
0.0548663
0.0537424
0.0543572
0.0532913
0.0539019
0.0528948
0.0519226
0.0509879
0.0500952
0.0492468
0.0484467
0.0476978
0.0470033
0.0463657
0.0457869
0.0452677
0.0448077
0.0444058
0.044059
0.0437633
0.0435138
0.0433053
0.0431322
0.042989
0.042871
0.0427734
0.0426925
0.0426245
0.0425674
0.0425204
0.0424811
0.0424534
0.0424332
0.0424224
0.0424248
0.0424399
0.0424676
0.0425086
0.0425596
0.0426193
0.042685
0.0427547
0.0428236
0.042936
0.042883
0.0428427
0.0430786
0.0430787
0.0430907
0.0433194
0.0433435
0.0433711
0.0434008
0.0430857
0.0428133
0.0427931
0.0427825
0.0427822
0.043145
0.043119
0.0430996
0.0434334
0.0434695
0.04351
0.0438534
0.0438041
0.0437583
0.0437154
0.0436746
0.0436344
0.0435935
0.0438652
0.0439125
0.0439593
0.0442151
0.0441628
0.0441109
0.0443251
0.0443814
0.0444381
0.0444956
0.0442686
0.0440073
0.0440572
0.0441097
0.0441651
0.0444408
0.044381
0.0443238
0.0445542
0.0446146
0.0446777
0.0447444
0.0445039
0.0442238
0.0439063
0.043555
0.0431778
0.0427934
0.0428131
0.0428396
0.0428751
0.0433098
0.0432601
0.0432161
0.0436045
0.0436587
0.0437181
0.0437836
0.0433653
0.042917
0.042966
0.0430228
0.0430877
0.0435763
0.0434974
0.0434275
0.0438561
0.0439371
0.0440282
0.0444399
0.0443381
0.0442473
0.0441658
0.0440921
0.044025
0.0439633
0.0442866
0.0443543
0.0444279
0.0447235
0.0446442
0.0445714
0.0448158
0.0448929
0.0449772
0.0450698
0.0448107
0.0445088
0.0445983
0.0446978
0.0448091
0.0451337
0.0450142
0.0449071
0.0451721
0.0452856
0.0454121
0.0456411
0.0455089
0.0453901
0.0452828
0.0451858
0.0450975
0.0450167
0.0449421
0.0448725
0.0448069
0.0447442
0.0446833
0.0446235
0.044564
0.0445044
0.0446428
0.0447042
0.0447652
0.044861
0.0447992
0.0447369
0.0447915
0.0448542
0.0449164
0.0449789
0.0449231
0.0448264
0.0448888
0.0449532
0.0450207
0.0451208
0.0450519
0.0449864
0.0450428
0.045109
0.0451786
0.0452528
0.0451941
0.0450925
0.0451696
0.0452533
0.0453447
0.0454522
0.0453586
0.045273
0.0453327
0.0454195
0.0455144
0.0456186
0.045555
0.0454452
0.0455562
0.045679
0.0458156
0.0459337
0.0457942
0.0456686
0.0457337
0.045861
0.0460022
0.046159
0.0460887
0.0459674
0.0457883
0.0455532
0.0452674
0.0449339
0.0445545
0.044131
0.0436661
0.0431627
0.0432492
0.04335
0.0434684
0.0440234
0.0438868
0.0437687
0.0442479
0.0443813
0.0445339
0.0447091
0.0441821
0.043608
0.0437731
0.0439682
0.0441976
0.0448278
0.0445803
0.0443663
0.04491
0.0451401
0.045403
0.0459214
0.0456456
0.0454016
0.0451866
0.0449972
0.0448307
0.044684
0.0450743
0.0452325
0.045411
0.0457739
0.0455853
0.0454172
0.0457109
0.0458872
0.0460843
0.0463045
0.0459856
0.0456125
0.0458396
0.0460952
0.0463819
0.0467839
0.0464881
0.0462228
0.0465501
0.0468234
0.0471266
0.047462
0.0471127
0.0467026
0.0462323
0.0457021
0.0451131
0.0444664
0.0447789
0.045139
0.0455502
0.0462302
0.0458111
0.0454397
0.0460407
0.0464215
0.0468472
0.0473194
0.046699
0.046015
0.0465343
0.0471087
0.0477376
0.0484108
0.0477893
0.0472185
0.0478389
0.0484067
0.049022
0.0495704
0.0489605
0.0483953
0.0478758
0.0474007
0.0469696
0.0465809
0.0470595
0.0474548
0.0478904
0.0483166
0.0478772
0.0474765
0.0478314
0.0482366
0.0486791
0.0491601
0.048796
0.0483679
0.0488875
0.0494505
0.0500559
0.0504788
0.0498769
0.0493157
0.0496799
0.0502397
0.0508386
0.0511329
0.0505362
0.0499775
0.0494576
0.0489753
0.0485304
0.0481218
0.0477479
0.0474073
0.047098
0.0468183
0.0465661
0.0463391
0.0461353
0.0459524
0.0461363
0.0463242
0.0465332
0.0466646
0.0464522
0.0462608
0.0463331
0.0465265
0.0467409
0.0469785
0.0469002
0.0467653
0.0470224
0.0473068
0.0476205
0.0477649
0.0474483
0.0471607
0.0472411
0.0475305
0.0478488
0.0481974
0.048112
0.047965
0.0483422
0.0487536
0.0492002
0.0493525
0.0489047
0.0484914
0.0485782
0.0489925
0.0494411
0.0499256
0.0498366
0.0496836
0.0502036
0.0507615
0.0513566
0.0515082
0.0509142
0.0503567
0.0504458
0.051003
0.0515964
0.0522271
0.0521397
0.0519897
0.0517684
0.0514775
0.051122
0.0507044
0.0502252
0.0496842
0.0490821
0.0484196
0.0491526
0.0499343
0.0507621
0.0513771
0.0505672
0.0498016
0.0503921
0.0511441
0.0519385
0.0527732
0.0522284
0.0516326
0.0525439
0.0534922
0.0544748
0.0550073
0.0540463
0.0531193
0.0536459
0.0545545
0.0554964
0.0559399
0.0550147
0.054122
0.0532651
0.0524447
0.0516639
0.0509231
0.0513941
0.052125
0.0528946
0.0532877
0.0525275
0.0518048
0.0521548
0.0528708
0.0536233
0.0544124
0.0540855
0.0537027
0.0545463
0.0554252
0.056336
0.0566836
0.0557848
0.054918
0.0552359
0.0560926
0.0569815
0.0579012
0.0576136
0.0572785
0.056897
0.0564705
0.0560007
0.0554899
0.0549409
0.0560091
0.055452
0.0565733
0.0577174
0.0571878
0.0583801
0.0578575
0.0590962
0.0603476
0.061614
0.0620583
0.0608174
0.0595909
0.0600685
0.0588835
0.0593647
0.058223
0.0571044
0.0576052
0.0565337
0.0570227
0.0574732
0.058504
0.0580728
0.0591471
0.0587007
0.0598196
0.0609587
0.0605255
0.0617051
0.0612708
0.0624884
0.0637207
0.0633125
0.062892
0.0624636
0.0620295
0.0615916
0.0611536
0.0607247
0.0621349
0.0617422
0.0631797
0.0646146
0.0660534
0.0657397
0.065445
0.0669192
0.0683896
0.0698597
0.0701036
0.0686503
0.0671955
0.0674897
0.068928
0.0703632
0.0717986
0.0715551
0.0713261
0.0711154
0.0709275
0.0707671
0.0706291
0.0721497
0.072032
0.073584
0.0750913
0.0750456
0.0765753
0.0765572
0.0767808
0.0772522
0.0785166
0.0790641
0.0803112
0.0815795
0.0812522
0.079841
0.079646
0.0781643
0.0780979
0.0780782
0.0795754
0.079594
0.081101
0.0811665
0.0826557
0.0827712
0.0829461
0.0833897
0.0840167
0.0848432
0.0861392
0.0869099
0.0884166
0.0890656
0.0907824
0.0912981
0.0899748
0.0890804
0.0879282
0.0871405
0.0859407
0.0852496
0.0865039
0.0878516
0.0883774
0.0896689
0.0902975
0.0910649
0.0920897
0.0931044
0.0942449
0.0952055
0.0962852
0.0973656
0.0983767
0.0996045
0.100525
0.101903
0.102733
0.103723
0.10272
0.101587
0.100666
0.0994954
0.0986402
0.0974477
0.0966586
0.0954414
0.0947386
0.0934665
0.0922482
0.091535
0.0928632
0.0942669
0.0956939
0.0960854
0.0975024
0.0979599
0.0993336
0.099889
0.101203
0.101856
0.103129
0.103881
0.104813
0.105947
0.107105
0.108338
0.109164
0.110338
0.111264
0.112342
0.113628
0.115242
0.117221
0.119601
0.122342
0.125295
0.125146
0.128125
0.127961
0.130932
0.130775
0.133684
0.133598
0.133446
0.136414
0.136246
0.13918
0.13904
0.136087
0.133304
0.133321
0.130623
0.130569
0.130635
0.127833
0.127835
0.125121
0.12506
0.122447
0.122312
0.119809
0.117697
0.118336
0.120205
0.120755
0.122754
0.123217
0.125344
0.125717
0.127969
0.128252
0.128674
0.13082
0.131149
0.133412
0.136
0.138852
0.141808
0.144568
0.144517
0.144323
0.144091
0.141275
0.141404
0.141598
0.138702
0.138648
0.138707
0.138887
0.141249
0.143895
0.143793
0.143805
0.143946
0.141893
0.141559
0.141343
0.139185
0.139592
0.140093
0.138511
0.137876
0.137308
0.136825
0.136441
0.136172
0.136023
0.133651
0.134011
0.13448
0.132792
0.132153
0.1316
0.129848
0.129212
0.127567
0.126851
0.126227
0.124519
0.123813
0.12222
0.121436
0.119956
0.119095
0.117735
0.116799
0.115958
0.114545
0.115545
0.11658
0.115581
0.11446
0.113389
0.112376
0.11356
0.114772
0.115983
0.116747
0.117637
0.118723
0.119733
0.120891
0.12186
0.123087
0.124004
0.12531
0.126168
0.127059
0.128354
0.129189
0.130562
0.131335
0.132144
0.133498
0.135041
0.135678
0.136371
0.137103
0.135845
0.135034
0.134251
0.132975
0.133852
0.134731
0.133717
0.132795
0.131869
0.130945
0.13005
0.128932
0.12797
0.126931
0.125922
0.124943
0.123893
0.122847
0.121881
0.12079
0.119896
0.118756
0.11793
0.117195
0.118396
0.119105
0.120274
0.121033
0.12217
0.122984
0.12408
0.124949
0.126006
0.127058
0.127947
0.128958
0.129901
0.13087
0.131834
0.132787
0.13193
0.130954
0.129962
0.129129
0.1281
0.127313
0.126249
0.12517
0.124408
0.123295
0.12258
0.121434
0.120765
0.119588
0.118963
0.117757
0.116537
0.115305
0.114064
0.112821
0.111566
0.11089
0.109615
0.108993
0.10769
0.106374
0.105096
0.104457
0.105791
0.107126
0.106632
0.105284
0.103926
0.102576
0.102098
0.100715
0.100296
0.0988935
0.0985238
0.0971125
0.0967868
0.0953617
0.0939214
0.0924957
0.0910391
0.0907463
0.0892828
0.0890342
0.0875775
0.0860885
0.0846968
0.0844008
0.0858977
0.0873692
0.088839
0.0903074
0.0905024
0.0919553
0.0921962
0.0936387
0.0934078
0.0932181
0.0917645
0.0916136
0.0901552
0.0886898
0.0872135
0.0857423
0.0842501
0.0841431
0.0856296
0.0871042
0.0870316
0.0855566
0.0840769
0.0825858
0.0825578
0.0810726
0.0810801
0.0795923
0.0780957
0.0766019
0.0766613
0.0751595
0.0736638
0.0737688
0.0722737
0.0724223
0.0739049
0.0753896
0.0752609
0.0767508
0.0782319
0.0781489
0.0796394
0.0811181
0.0811814
0.0797119
0.0798059
0.0783389
0.0768662
0.0770037
0.0755399
0.0740675
0.0725958
0.0727912
0.0742504
0.0757083
0.075892
0.0744493
0.0730042
0.073231
0.0746611
0.0760883
0.0775117
0.0773294
0.0771592
0.0786075
0.0784652
0.0799189
0.0813681
0.0812659
0.0827213
0.0826484
0.0825945
0.0825629
0.0840401
0.0840441
0.0855178
0.0869883
0.0884476
0.0884989
0.0885785
0.0900401
0.0914954
0.0929395
0.0930635
0.0945021
0.0946602
0.094852
0.0950835
0.0965145
0.0979413
0.09821
0.099624
0.0999349
0.101334
0.101688
0.103072
0.103469
0.10484
0.106197
0.105812
0.104449
0.104103
0.102725
0.102418
0.101027
0.100758
0.0993552
0.099123
0.0977111
0.096286
0.0960926
0.0975137
0.098922
0.100318
0.100523
0.101909
0.102148
0.103523
0.103796
0.10516
0.105467
0.106818
0.107162
0.107545
0.107971
0.108451
0.10977
0.110296
0.111593
0.11217
0.113437
0.112876
0.112371
0.111078
0.110614
0.1093
0.108877
0.110195
0.111496
0.111913
0.113196
0.11365
0.114149
0.114697
0.115944
0.117176
0.118391
0.117864
0.116644
0.115404
0.114911
0.116155
0.117379
0.11693
0.115705
0.114459
0.114044
0.11278
0.112398
0.111115
0.109815
0.108496
0.108151
0.109468
0.110767
0.112049
0.11331
0.113661
0.114906
0.11529
0.116514
0.11613
0.115774
0.114553
0.114227
0.112987
0.111728
0.11045
0.109153
0.107839
0.106508
0.106228
0.104884
0.104637
0.103281
0.103065
0.101699
0.101514
0.100139
0.0987489
0.0973457
0.0959302
0.095795
0.094373
0.0942692
0.0928423
0.0914051
0.089956
0.0898985
0.0913395
0.0927694
0.0941885
0.0955953
0.0956839
0.0970865
0.0972042
0.0986009
0.0984761
0.0983724
0.0969903
0.0969143
0.0955274
0.0941285
0.0927177
0.091296
0.0898636
0.0884204
0.0869699
0.0855075
0.0855211
0.0840613
0.0841046
0.084167
0.0856073
0.0855552
0.0869967
0.0869735
0.0884154
0.0898491
0.0912724
0.0926854
0.0926709
0.0912673
0.0898535
0.0884298
0.0884609
0.0870381
0.0870949
0.0856749
0.0842459
0.0828111
0.0829159
0.0814854
0.0800484
0.0801916
0.0787637
0.0789317
0.0803464
0.0817574
0.0816158
0.0830339
0.0844454
0.0843393
0.0857566
0.0871657
0.0872489
0.0858509
0.0859562
0.0845624
0.0831631
0.083302
0.0819087
0.0805109
0.0791095
0.0777038
0.0762949
0.0748832
0.0734688
0.0720531
0.0706348
0.0692176
0.0677981
0.066381
0.0649634
0.0635484
0.0639291
0.0625387
0.0629476
0.0633606
0.0647087
0.0643181
0.0656866
0.0653225
0.0667182
0.0681162
0.0695159
0.0709152
0.0712011
0.0698203
0.0684393
0.067063
0.0674104
0.0660535
0.0664208
0.0650964
0.0637737
0.064181
0.0654796
0.0667845
0.0671409
0.0658555
0.064579
0.0649654
0.0662211
0.0674873
0.0687621
0.0684345
0.0680983
0.0677563
0.0690921
0.0687654
0.0701282
0.07149
0.07178
0.070436
0.070741
0.0694161
0.0697343
0.0700445
0.071334
0.0710411
0.0723519
0.0720681
0.0734006
0.0731288
0.0728557
0.072584
0.0723157
0.0737148
0.0751131
0.0765095
0.0767301
0.0753489
0.0739666
0.0742218
0.0755885
0.0769546
0.07832
0.0781098
0.0779038
0.0792953
0.0806833
0.0820681
0.082234
0.080862
0.0794873
0.0796839
0.0810455
0.082405
0.0825795
0.0812321
0.0798831
0.0785327
0.0771811
0.0758299
0.0744783
0.0747342
0.0760707
0.0774078
0.0776329
0.0763089
0.0749872
0.0736685
0.0739306
0.0726295
0.072898
0.0716176
0.0703442
0.069078
0.0678208
0.0665732
0.0653359
0.0641119
0.0629007
0.0632923
0.062117
0.0625033
0.0613642
0.0602454
0.0606393
0.0595594
0.0599353
0.0588966
0.0578827
0.0582494
0.0592486
0.0602726
0.0605699
0.0595582
0.058572
0.0588492
0.0598246
0.0608259
0.061852
0.0616066
0.0613216
0.0609987
0.0620834
0.0617401
0.0628619
0.0640014
0.06366
0.0648338
0.064484
0.0656892
0.0669085
0.0681389
0.0684392
0.0672248
0.066022
0.0663312
0.065159
0.065457
0.064314
0.0631896
0.0634847
0.0623922
0.0626652
0.0629006
0.0639703
0.0637454
0.0648452
0.0645957
0.0657257
0.0668715
0.0666152
0.0677891
0.0675188
0.0687191
0.0699311
0.0696649
0.0693796
0.0706304
0.0718892
0.0731554
0.0733995
0.0721466
0.0709009
0.0711539
0.0723871
0.073628
0.073839
0.0726089
0.071387
0.0701758
0.0689764
0.0692093
0.0680334
0.06825
0.0670987
0.0659636
0.0661691
0.0650607
0.0652395
0.0641571
0.0630951
0.0620548
0.0610375
0.0600446
0.0590778
0.0581381
0.057227
0.0563462
0.0554971
0.0546809
0.0538985
0.053152
0.0524413
0.0526594
0.0533662
0.0541081
0.0542505
0.0535116
0.0528073
0.0528934
0.0535962
0.0543335
0.0551058
0.0550247
0.0548856
0.0556963
0.0565399
0.0574145
0.057542
0.0566716
0.0558316
0.0559106
0.0567484
0.0576165
0.058515
0.0584429
0.0583193
0.0592527
0.0602129
0.0611998
0.0613107
0.0603281
0.059372
0.0594417
0.0603953
0.0613755
0.0623797
0.0623172
0.0622104
0.0632446
0.0643008
0.0653771
0.065471
0.064399
0.063347
0.0634068
0.0644564
0.0655259
0.0666151
0.0665622
0.0664722
0.0663404
0.0674592
0.0672954
0.0684379
0.0695954
0.0694161
0.0705953
0.0703977
0.0715984
0.0728103
0.074031
0.0742023
0.0729897
0.0717868
0.0719505
0.0707668
0.0709095
0.0697451
0.0685945
0.0687152
0.0675856
0.067672
0.0677226
0.0688461
0.0687977
0.0699395
0.0698605
0.0710198
0.072192
0.0720868
0.0732758
0.0731456
0.0743511
0.0755661
0.075424
0.075261
0.0750783
0.0748775
0.0746603
0.0744287
0.0741848
0.0754755
0.075235
0.0765432
0.0778541
0.0791667
0.0789579
0.078746
0.0800835
0.0814202
0.0827559
0.0829327
0.0816081
0.0802831
0.0804803
0.0817941
0.083108
0.0832802
0.0819762
0.080673
0.0793704
0.0780696
0.0767712
0.0769902
0.0757067
0.0759265
0.0761328
0.0773946
0.0771985
0.0784753
0.0782773
0.0795672
0.0808594
0.0821528
0.0834474
0.083608
0.082322
0.0810377
0.0797551
0.0799322
0.0786615
0.0788341
0.0775765
0.0763241
0.0764982
0.0777425
0.078992
0.0791336
0.0778908
0.0766536
0.0767894
0.0780201
0.0792573
0.0805001
0.0803822
0.0802473
0.0800968
0.0813627
0.081206
0.082482
0.0837602
0.0839023
0.0826312
0.0827678
0.0815061
0.0816349
0.0817476
0.0829988
0.0828909
0.08415
0.0840325
0.085299
0.085175
0.0850397
0.084895
0.0847426
0.0845841
0.0844215
0.0842562
0.0840901
0.0839247
0.0837618
0.0836027
0.083449
0.0848243
0.0846892
0.0860712
0.0874472
0.0873432
0.0887228
0.0886393
0.088567
0.0885071
0.0899102
0.0898743
0.0912784
0.0926724
0.0926887
0.0913043
0.0913438
0.0899598
0.0900216
0.0900947
0.0914585
0.0913954
0.0927601
0.0927183
0.0940827
0.0940627
0.0940559
0.0940636
0.0940872
0.0954776
0.0968561
0.0982221
0.0982882
0.0996497
0.0997415
0.0998525
0.0999844
0.101354
0.102708
0.102875
0.104221
0.104416
0.105752
0.105977
0.1073
0.107556
0.108867
0.11016
0.109896
0.108607
0.108372
0.10707
0.106863
0.105551
0.105372
0.104048
0.103896
0.102563
0.101215
0.101097
0.102438
0.103764
0.105075
0.105214
0.106515
0.106679
0.10797
0.10816
0.10944
0.109656
0.110923
0.111167
0.111435
0.11269
0.113927
0.115144
0.115446
0.116646
0.116976
0.117333
0.117718
0.118134
0.118582
0.119065
0.119587
0.120151
0.121322
0.121925
0.123067
0.12371
0.124823
0.125507
0.126588
0.127649
0.128361
0.129389
0.130142
0.131136
0.130396
0.129706
0.128689
0.128035
0.126986
0.125915
0.12529
0.124189
0.1236
0.122471
0.121918
0.120763
0.120245
0.119764
0.120924
0.121404
0.12254
0.123052
0.124162
0.124707
0.12579
0.126368
0.127423
0.128454
0.12906
0.130059
0.130699
0.13138
0.132109
0.132888
0.133726
0.13463
0.135612
0.136684
0.137861
0.139192
0.140671
0.142333
0.144215
0.146349
0.148747
0.148774
0.151233
0.151234
0.151392
0.15375
0.153906
0.154177
0.154508
0.154856
0.152858
0.152448
0.152044
0.151678
0.14966
0.149259
0.148951
0.146905
0.146564
0.1446
0.145077
0.145618
0.147341
0.147838
0.148365
0.150112
0.150583
0.151052
0.151492
0.153254
0.155193
0.155499
0.157588
0.15779
0.160053
0.160104
0.16006
0.162349
0.16489
0.167693
0.167159
0.17001
0.169173
0.168286
0.16586
0.166539
0.164087
0.164528
0.162127
0.159953
0.159793
0.161838
0.161493
0.163588
0.163047
0.165146
0.167373
0.169683
0.172003
0.174232
0.176286
0.178027
0.179339
0.177073
0.175041
0.1732
0.172393
0.174102
0.17597
0.174469
0.17279
0.171234
0.169787
0.17082
0.171519
0.169974
0.168548
0.167224
0.166757
0.168016
0.169366
0.168438
0.167176
0.165993
0.164998
0.166092
0.167251
0.168481
0.169787
0.171176
0.172657
0.170663
0.16938
0.168157
0.166419
0.167473
0.168563
0.166457
0.165549
0.16466
0.163796
0.165406
0.166994
0.16589
0.164843
0.163849
0.162621
0.163506
0.164435
0.162958
0.162153
0.16138
0.160639
0.161776
0.162905
0.163966
0.164883
0.165581
0.165993
0.164845
0.163771
0.162767
0.16247
0.163443
0.164478
0.163837
0.162851
0.161922
0.161044
0.161554
0.161827
0.160945
0.160116
0.159338
0.159111
0.159879
0.160692
0.160214
0.159428
0.158684
0.158131
0.158836
0.15958
0.160364
0.161192
0.162066
0.16299
0.16201
0.161161
0.160354
0.159477
0.160205
0.160971
0.15993
0.159253
0.158607
0.157991
0.158784
0.159589
0.158864
0.158175
0.157523
0.15691
0.157502
0.158126
0.157404
0.156846
0.156315
0.155747
0.156219
0.156713
0.15723
0.15777
0.158335
0.158924
0.159537
0.160174
0.160835
0.161517
0.16222
0.162943
0.163676
0.164413
0.162481
0.161896
0.161307
0.159783
0.160235
0.160678
0.161103
0.159312
0.159573
0.157829
0.157928
0.157988
0.158
0.157935
0.155975
0.155763
0.15393
0.153618
0.151905
0.15229
0.152628
0.154204
0.15444
0.156126
0.156215
0.156254
0.156252
0.154814
0.154741
0.154622
0.153162
0.152918
0.151536
0.151194
0.150806
0.150373
0.149903
0.149403
0.148891
0.147352
0.14677
0.146193
0.144695
0.14406
0.143445
0.142857
0.141304
0.141966
0.14265
0.143345
0.144033
0.145333
0.145967
0.146576
0.147921
0.148468
0.14898
0.149454
0.149885
0.148684
0.148216
0.147706
0.147159
0.145958
0.145345
0.144702
0.14354
0.142842
0.142121
0.141385
0.140635
0.139905
0.138652
0.139441
0.140227
0.139163
0.138348
0.137519
0.136483
0.137341
0.138181
0.138998
0.139959
0.140996
0.141745
0.142469
0.143163
0.144211
0.14485
0.145455
0.146535
0.147076
0.147576
0.148035
0.149109
0.150272
0.150614
0.151831
0.152082
0.153356
0.1535
0.1536
0.154847
0.156206
0.157688
0.157508
0.159023
0.158708
0.158372
0.158021
0.159324
0.160724
0.160147
0.159581
0.159027
0.157948
0.158402
0.158862
0.157662
0.1573
0.156935
0.155984
0.156268
0.156545
0.156812
0.157067
0.1573
0.156002
0.15612
0.154842
0.153663
0.153693
0.154804
0.154735
0.155857
0.155689
0.155502
0.155302
0.15509
0.154247
0.154394
0.154527
0.154642
0.153665
0.153693
0.15272
0.152662
0.152574
0.152452
0.152289
0.151167
0.150911
0.149832
0.149492
0.148453
0.148829
0.149166
0.15013
0.15039
0.151384
0.151562
0.151702
0.15181
0.150958
0.150802
0.150613
0.149727
0.149465
0.148599
0.148265
0.147895
0.147486
0.147038
0.146549
0.146021
0.145042
0.144452
0.143825
0.142871
0.14219
0.141475
0.140731
0.139789
0.140551
0.141282
0.14198
0.142645
0.143518
0.144128
0.144702
0.145594
0.146108
0.146583
0.147021
0.147421
0.146629
0.146202
0.145739
0.145239
0.144424
0.143867
0.143274
0.142472
0.141826
0.141146
0.140433
0.139687
0.13891
0.138103
0.137269
0.13641
0.135529
0.134646
0.135545
0.13642
0.135625
0.134738
0.133825
0.133058
0.133982
0.13488
0.13575
0.136485
0.137268
0.138088
0.138878
0.139637
0.138888
0.138118
0.137316
0.136591
0.137403
0.138184
0.13752
0.13673
0.135909
0.135059
0.13418
0.133274
0.13234
0.131666
0.132608
0.133522
0.132902
0.131981
0.131034
0.130439
0.129459
0.128895
0.127885
0.12685
0.126313
0.12525
0.124743
0.123653
0.123178
0.122062
0.121617
0.120478
0.119317
0.118901
0.120062
0.121201
0.120814
0.119676
0.118515
0.118157
0.119316
0.120453
0.121569
0.12193
0.122318
0.122733
0.123826
0.124269
0.125337
0.125809
0.126851
0.127352
0.128365
0.129353
0.129879
0.130837
0.131392
0.132318
0.133218
0.133795
0.134408
0.135266
0.136095
0.136894
0.136304
0.135496
0.13466
0.134089
0.134932
0.135747
0.136533
0.137082
0.137663
0.13828
0.138934
0.139627
0.140364
0.141057
0.141718
0.142344
0.143082
0.143658
0.144199
0.144945
0.145432
0.145883
0.14518
0.144707
0.144023
0.143497
0.142937
0.142258
0.141649
0.141008
0.140334
0.139652
0.140339
0.140994
0.141617
0.142208
0.142834
0.143378
0.14389
0.144517
0.144979
0.145621
0.146301
0.147021
0.147786
0.148116
0.148897
0.149162
0.149956
0.150154
0.150322
0.151083
0.15189
0.152749
0.152754
0.153613
0.153541
0.153452
0.153349
0.154088
0.154869
0.155695
0.156571
0.157501
0.158489
0.157967
0.157462
0.156975
0.156222
0.156637
0.157063
0.156211
0.155856
0.155507
0.155165
0.155819
0.156506
0.156055
0.155621
0.155206
0.154688
0.155052
0.155429
0.154832
0.154507
0.154192
0.153717
0.153986
0.154262
0.154542
0.154827
0.155115
0.155405
0.154643
0.154413
0.154181
0.153564
0.153745
0.15392
0.153233
0.153108
0.152975
0.152836
0.15338
0.153948
0.153716
0.153487
0.15326
0.152821
0.153007
0.153194
0.152693
0.152546
0.152398
0.151991
0.152103
0.152212
0.152316
0.152413
0.152501
0.15258
0.152647
0.1527
0.152737
0.151977
0.151945
0.151182
0.150462
0.150577
0.151258
0.151312
0.151988
0.151981
0.151958
0.151922
0.151874
0.151359
0.151369
0.151366
0.151348
0.150744
0.150671
0.150062
0.149932
0.149778
0.149601
0.149396
0.148681
0.148414
0.147708
0.147381
0.146687
0.147041
0.147366
0.148006
0.148274
0.148919
0.149131
0.149317
0.14948
0.148928
0.148734
0.148516
0.147934
0.147663
0.147083
0.146761
0.14641
0.146031
0.145411
0.145813
0.146187
0.145643
0.145248
0.144824
0.144372
0.143798
0.143298
0.142769
0.142193
0.141617
0.141011
0.140375
0.139708
0.139009
0.138403
0.139112
0.139791
0.139239
0.138549
0.13783
0.13729
0.138018
0.138718
0.139389
0.1399
0.14044
0.141059
0.141648
0.142209
0.142739
0.143255
0.143744
0.144269
0.144712
0.145128
0.145517
0.146012
0.146534
0.146855
0.14738
0.147652
0.148179
0.148402
0.148603
0.1491
0.149623
0.15017
0.15026
0.1508
0.15084
0.150865
0.150878
0.151337
0.151816
0.15175
0.151677
0.151598
0.151219
0.151266
0.151306
0.150879
0.150871
0.150854
0.150503
0.150491
0.150469
0.150437
0.150392
0.150334
0.149851
0.149746
0.149253
0.148784
0.148946
0.149388
0.149506
0.149939
0.150014
0.150075
0.150125
0.150164
0.149839
0.149774
0.149698
0.149609
0.149221
0.149091
0.148695
0.148524
0.148336
0.148129
0.147901
0.147425
0.147151
0.146675
0.146356
0.145882
0.146223
0.146541
0.146972
0.147247
0.147677
0.147909
0.148121
0.148316
0.147954
0.147737
0.147501
0.147113
0.146838
0.146448
0.146131
0.145793
0.145432
0.145048
0.144639
0.144205
0.143724
0.143246
0.142742
0.142255
0.141708
0.141134
0.140531
0.140032
0.140647
0.141235
0.141795
0.14233
0.142775
0.143269
0.143738
0.144176
0.144603
0.145006
0.145385
0.145742
0.145372
0.144997
0.144601
0.144181
0.143781
0.143322
0.142838
0.14243
0.141908
0.14136
0.140787
0.140187
0.139561
0.138907
0.138226
0.137517
0.13678
0.136014
0.135221
0.1344
0.13355
0.132673
0.131769
0.131251
0.130315
0.129824
0.128858
0.127867
0.1274
0.126381
0.12594
0.124895
0.124481
0.123411
0.123023
0.122661
0.123731
0.124093
0.12514
0.125527
0.126549
0.126961
0.127957
0.128394
0.129362
0.130305
0.130764
0.131677
0.13216
0.133042
0.133898
0.134725
0.134258
0.133424
0.132564
0.132113
0.131222
0.130794
0.129874
0.128928
0.12852
0.127547
0.127162
0.126163
0.125802
0.124778
0.124441
0.123394
0.122324
0.121232
0.120118
0.118982
0.117824
0.117517
0.116341
0.11606
0.114866
0.113652
0.112419
0.112171
0.1134
0.11461
0.114376
0.11317
0.111945
0.110701
0.110501
0.109244
0.109069
0.107801
0.10765
0.10637
0.106244
0.104955
0.103651
0.102332
0.100998
0.100916
0.0995757
0.0995183
0.0981728
0.096815
0.0954449
0.0954281
0.0967897
0.098139
0.0994764
0.100801
0.100851
0.10217
0.102243
0.103555
0.103475
0.10341
0.102112
0.102069
0.100766
0.0994488
0.0981196
0.0967787
0.0954261
0.0954377
0.0967814
0.0981136
0.0981202
0.0967962
0.0954613
0.0941153
0.0941595
0.0928134
0.0928772
0.0915315
0.0901777
0.0888159
0.088918
0.0875599
0.0861953
0.0863261
0.0849662
0.0851139
0.0864628
0.087806
0.0876799
0.0890281
0.0903699
0.0902699
0.0916138
0.0929504
0.0930323
0.0917047
0.0918027
0.090477
0.0891447
0.0892666
0.0879374
0.0866042
0.0852658
0.0854206
0.0867489
0.0880725
0.0882098
0.0868953
0.0855766
0.0857323
0.087042
0.088348
0.0896511
0.0895213
0.0893926
0.0907071
0.0905898
0.0919069
0.093218
0.0931217
0.0944334
0.0943519
0.0942786
0.0942142
0.0955426
0.0954965
0.0968228
0.0981387
0.099444
0.0994333
0.0994347
0.100744
0.10204
0.103324
0.10336
0.104637
0.104694
0.104766
0.104853
0.106135
0.107402
0.107518
0.108775
0.108913
0.110159
0.110321
0.111555
0.11174
0.112961
0.114163
0.113968
0.112771
0.1126
0.111388
0.111239
0.110016
0.109889
0.108653
0.108548
0.107302
0.106042
0.105963
0.107218
0.108457
0.109681
0.109778
0.11099
0.111107
0.112308
0.112445
0.113635
0.113793
0.114968
0.115148
0.115346
0.115563
0.115801
0.116971
0.117233
0.118386
0.118673
0.119806
0.119518
0.119251
0.118122
0.117878
0.11673
0.11651
0.117654
0.118778
0.119005
0.120111
0.12036
0.120629
0.120919
0.12201
0.123079
0.124126
0.123832
0.122786
0.121718
0.121448
0.122514
0.123559
0.123306
0.122262
0.121198
0.120966
0.119882
0.119672
0.11857
0.117449
0.116308
0.116124
0.117262
0.11838
0.119478
0.120557
0.120753
0.121814
0.122029
0.123071
0.122855
0.122655
0.121616
0.121435
0.120378
0.119302
0.118206
0.117091
0.115958
0.114805
0.114659
0.113492
0.113366
0.112187
0.11208
0.110889
0.110802
0.1096
0.108382
0.107148
0.1059
0.10585
0.104594
0.104564
0.1033
0.102024
0.100735
0.100738
0.10202
0.103289
0.103291
0.102028
0.100753
0.0994661
0.0981685
0.0968607
0.0969087
0.0955986
0.0956638
0.0957373
0.0970321
0.0969661
0.0982587
0.0982087
0.099499
0.100779
0.102047
0.103304
0.103328
0.102077
0.100815
0.099542
0.0995947
0.0983181
0.0983855
0.0971056
0.0958179
0.0945216
0.0946152
0.0933192
0.0920159
0.0921289
0.0908276
0.0909498
0.0922438
0.0935325
0.0934245
0.0947135
0.0959966
0.0959048
0.097186
0.0984595
0.0985389
0.0972717
0.0973611
0.0960918
0.0948151
0.0949182
0.0936415
0.0923592
0.091072
0.0897806
0.0884854
0.0871873
0.0858861
0.0860361
0.0873294
0.0886201
0.0887505
0.0874668
0.0861808
0.0863184
0.0875976
0.0888749
0.0901506
0.090032
0.0899081
0.0911928
0.0924736
0.0937499
0.0938562
0.0925855
0.0913105
0.0914234
0.092693
0.0939587
0.0940559
0.0927947
0.09153
0.0902623
0.0889917
0.0877204
0.0864473
0.0865659
0.0878336
0.0890998
0.0891975
0.0879358
0.0866731
0.085411
0.0855093
0.0842531
0.0843397
0.0830894
0.0818422
0.0805991
0.0793609
0.0781285
0.0769029
0.0756849
0.0744755
0.0745716
0.0733766
0.0734459
0.0722642
0.0710955
0.07114
0.0699856
0.0723067
0.0734866
0.0746766
0.0746376
0.0758404
0.0757769
0.0769907
0.0782127
0.0794411
0.0794964
0.0782707
0.0770511
0.0770867
0.0758776
0.0783049
0.0795291
0.0807604
0.0807292
0.080676
0.0819156
0.0831596
0.0844072
0.0844538
0.0832081
0.0819662
0.0819962
0.0832368
0.0844813
0.0857276
0.0857012
0.0856568
0.0855921
0.0868464
0.0867671
0.0880258
0.0892836
0.0905415
0.0904591
0.0903656
0.0916287
0.0928892
0.0941461
0.0942284
0.0929749
0.0917182
0.0917972
0.0930505
0.0943012
0.0955479
0.0954777
0.0953987
0.0953125
0.0952198
0.0951221
0.095021
0.0962862
0.0961889
0.0974528
0.0987092
0.0986225
0.0998763
0.0997977
0.0997238
0.0996558
0.100916
0.100861
0.102117
0.103363
0.103407
0.102167
0.102224
0.100979
0.101047
0.101121
0.102357
0.102288
0.103519
0.103459
0.104684
0.104636
0.104597
0.104567
0.104549
0.104542
0.104546
0.10579
0.105814
0.10705
0.107092
0.10832
0.108272
0.108237
0.10702
0.107004
0.105779
0.105781
0.107
0.108206
0.108215
0.109412
0.109438
0.109479
0.109533
0.110729
0.111911
0.111988
0.113158
0.113255
0.114413
0.114528
0.115673
0.115807
0.116937
0.118049
0.117907
0.116799
0.116675
0.115553
0.115447
0.114312
0.114225
0.113076
0.113007
0.111847
0.11067
0.110625
0.111797
0.112953
0.114094
0.114152
0.11528
0.115356
0.116471
0.116566
0.117667
0.117779
0.118866
0.118996
0.119142
0.120215
0.121269
0.122304
0.122471
0.123488
0.123673
0.123874
0.124092
0.124328
0.124582
0.124856
0.12515
0.125465
0.126465
0.126802
0.127779
0.128137
0.129088
0.129468
0.130392
0.13129
0.131689
0.132559
0.132979
0.133817
0.133402
0.133012
0.132164
0.131792
0.130916
0.130014
0.129659
0.128731
0.128396
0.127443
0.127129
0.126151
0.125857
0.125583
0.126562
0.126835
0.127791
0.128083
0.129015
0.129327
0.130233
0.130563
0.131443
0.132299
0.132644
0.133471
0.133834
0.13422
0.13463
0.135064
0.135525
0.136298
0.137043
0.137761
0.137323
0.136597
0.135844
0.135416
0.136175
0.136909
0.137616
0.138022
0.138452
0.139116
0.139753
0.140364
0.139964
0.139342
0.138695
0.138298
0.138955
0.139586
0.139229
0.138588
0.137923
0.137234
0.136519
0.135778
0.135012
0.134631
0.135404
0.136151
0.135804
0.135051
0.134273
0.133937
0.13313
0.132809
0.131974
0.131115
0.130808
0.129924
0.129634
0.128724
0.128452
0.127518
0.127263
0.126307
0.125328
0.125092
0.12607
0.127026
0.126807
0.12585
0.124873
0.12467
0.125647
0.126603
0.127538
0.127742
0.127961
0.128198
0.12911
0.129363
0.130252
0.130521
0.131385
0.13167
0.132508
0.133322
0.13362
0.134407
0.134719
0.135477
0.136212
0.136532
0.136873
0.13757
0.138243
0.138891
0.138573
0.137917
0.137237
0.136922
0.137609
0.138273
0.13799
0.137319
0.136626
0.13591
0.13517
0.134881
0.134114
0.133838
0.133043
0.132225
0.131961
0.131118
0.130868
0.13
0.129766
0.128874
0.128655
0.128452
0.129345
0.129547
0.130418
0.130635
0.131482
0.131713
0.132537
0.132782
0.13358
0.134355
0.13461
0.135359
0.135626
0.136348
0.137046
0.137723
0.137471
0.13679
0.136086
0.135839
0.135108
0.134873
0.134116
0.133338
0.133111
0.132308
0.132094
0.131267
0.131066
0.130216
0.130029
0.129157
0.128264
0.12735
0.126415
0.12546
0.124484
0.124313
0.123318
0.123164
0.122151
0.121119
0.120067
0.119933
0.120983
0.122013
0.121889
0.120861
0.119815
0.11875
0.118648
0.117568
0.117485
0.11639
0.116325
0.115217
0.115169
0.114049
0.112913
0.111761
0.110593
0.110575
0.109398
0.109397
0.108209
0.107008
0.105794
0.105818
0.107028
0.108224
0.109408
0.110578
0.11057
0.11173
0.111739
0.112887
0.112874
0.112875
0.111734
0.11175
0.110597
0.109431
0.10825
0.107058
0.105853
0.105896
0.107098
0.108286
0.108331
0.107145
0.105947
0.104739
0.1048
0.103584
0.103653
0.102431
0.101199
0.0999583
0.100041
0.0987969
0.097545
0.0976365
0.0963825
0.0964758
0.0977257
0.0989697
0.0988843
0.100125
0.101357
0.101278
0.102506
0.103725
0.103798
0.102582
0.102657
0.101436
0.100206
0.100284
0.0990512
0.0978105
0.0965646
0.0966474
0.09789
0.0991273
0.099197
0.0979626
0.0967231
0.0967902
0.0980273
0.0992592
0.100485
0.100425
0.100358
0.101581
0.101511
0.102729
0.103939
0.103869
0.105073
0.105004
0.104934
0.104866
0.106067
0.106005
0.107199
0.108382
0.109552
0.109504
0.109463
0.110626
0.111776
0.112912
0.112888
0.114012
0.114002
0.114004
0.11402
0.115136
0.116238
0.116274
0.117361
0.117416
0.118489
0.118561
0.11962
0.11971
0.120754
0.121779
0.121684
0.120661
0.120583
0.119545
0.119485
0.118431
0.11839
0.117322
0.117298
0.116216
0.115118
0.115113
0.116209
0.117288
0.118352
0.118363
0.119413
0.119441
0.120475
0.120521
0.121539
0.121603
0.122606
0.122688
0.122786
0.122898
0.123024
0.124015
0.124157
0.125131
0.125288
0.126242
0.126084
0.12594
0.124987
0.124858
0.123887
0.123773
0.124742
0.125692
0.125809
0.126741
0.126873
0.127018
0.127177
0.12809
0.128984
0.129856
0.129697
0.128824
0.127931
0.127785
0.128678
0.129551
0.129418
0.128546
0.127653
0.127534
0.126623
0.126519
0.125589
0.124641
0.123674
0.12359
0.124555
0.125502
0.12643
0.127339
0.127429
0.12832
0.128426
0.129298
0.129192
0.1291
0.128228
0.128153
0.127264
0.126357
0.12543
0.124485
0.123521
0.122539
0.122489
0.121491
0.121459
0.120444
0.12043
0.119399
0.1194
0.118354
0.117292
0.116214
0.115121
0.11514
0.114033
0.114065
0.112945
0.111812
0.110664
0.11071
0.111855
0.112986
0.114104
0.115208
0.11517
0.11626
0.116232
0.117308
0.117335
0.11737
0.116296
0.11634
0.115252
0.11415
0.113034
0.111905
0.110762
0.109606
0.108438
0.107259
0.107321
0.106133
0.106199
0.106266
0.107449
0.107385
0.10856
0.108498
0.109664
0.110817
0.111958
0.113086
0.11314
0.112014
0.110875
0.109723
0.109784
0.108622
0.108683
0.107512
0.106331
0.10514
0.105203
0.104004
0.102797
0.10286
0.101646
0.101704
0.102915
0.104118
0.104064
0.105261
0.106449
0.106392
0.107571
0.108741
0.108794
0.107626
0.107676
0.106499
0.105313
0.105358
0.104165
0.102963
0.101753
0.100536
0.0993122
0.0980824
0.0968471
0.0956071
0.0943626
0.0931143
0.091864
0.090611
0.0893566
0.0881015
0.0881606
0.0869086
0.0869514
0.0869767
0.088226
0.0882017
0.0894532
0.0894138
0.0906654
0.0919165
0.0931649
0.0944107
0.0944444
0.0932002
0.091953
0.0907033
0.0907257
0.0894765
0.0919745
0.0932209
0.0944643
0.0957053
0.0956861
0.0956537
0.0968917
0.0981259
0.0993539
0.0993829
0.098156
0.0969229
0.0969414
0.0981738
0.0994
0.100621
0.100604
0.100577
0.101792
0.103
0.104201
0.104227
0.103027
0.101819
0.101835
0.103042
0.104242
0.105434
0.105419
0.105394
0.106577
0.106543
0.107718
0.108883
0.108842
0.109998
0.109951
0.109899
0.109843
0.11099
0.110933
0.112071
0.113196
0.11325
0.112127
0.11218
0.111045
0.111096
0.111142
0.112275
0.11223
0.113351
0.113303
0.114413
0.114362
0.114308
0.114254
0.114201
0.115301
0.116388
0.117459
0.117412
0.11847
0.118429
0.118394
0.118369
0.119413
0.120442
0.120429
0.121441
0.121442
0.122438
0.122456
0.123434
0.123469
0.124431
0.125376
0.125339
0.124395
0.124376
0.123416
0.123413
0.122436
0.122447
0.121453
0.121476
0.120465
0.119438
0.119472
0.120498
0.121509
0.122503
0.12247
0.123447
0.123424
0.124384
0.124373
0.125315
0.125319
0.126242
0.126263
0.126301
0.127208
0.128095
0.128964
0.129023
0.129874
0.129951
0.130044
0.130151
0.130271
0.130404
0.130549
0.130708
0.13088
0.13171
0.131895
0.132703
0.1329
0.133684
0.133893
0.134653
0.135392
0.135608
0.136321
0.136548
0.137235
0.137013
0.136805
0.136109
0.13591
0.135189
0.134447
0.134255
0.133489
0.133308
0.13252
0.13235
0.131539
0.131382
0.131237
0.13205
0.132194
0.132985
0.13314
0.13391
0.134076
0.134823
0.135
0.135723
0.136427
0.136609
0.137288
0.137479
0.137683
0.1379
0.138131
0.138377
0.138637
0.138913
0.139206
0.139516
0.139844
0.140192
0.14056
0.140949
0.141509
0.142044
0.142555
0.142928
0.143401
0.143852
0.144216
0.144629
0.14502
0.145389
0.145725
0.146077
0.146392
0.146744
0.14702
0.14737
0.147608
0.147829
0.148154
0.148494
0.148849
0.148988
0.149335
0.149437
0.149527
0.149226
0.149114
0.148804
0.148656
0.148338
0.148034
0.148223
0.148507
0.148663
0.148938
0.149061
0.149327
0.149605
0.149894
0.150194
0.150506
0.15083
0.151166
0.151515
0.151875
0.152249
0.152636
0.153037
0.153454
0.153887
0.154337
0.154807
0.155298
0.155811
0.156349
0.156906
0.157464
0.157979
0.158385
0.158605
0.158612
0.158455
0.158171
0.157782
0.15729
0.156679
0.155923
0.15499
0.153758
0.15184
0.151442
0.151088
0.150773
0.150496
0.150254
0.150045
0.149866
0.149717
0.149598
0.149506
0.14944
0.149398
0.149378
0.14938
0.149404
0.150003
0.15006
0.150138
0.150238
0.150362
0.150511
0.150688
0.150893
0.151128
0.151395
0.151693
0.152025
0.152395
0.152806
0.153259
0.154421
0.153898
0.153421
0.154198
0.154726
0.1553
0.156018
0.155408
0.154846
0.154328
0.153715
0.152986
0.152593
0.152238
0.151919
0.152512
0.152873
0.153274
0.153853
0.153419
0.153025
0.153481
0.153896
0.154351
0.154848
0.155388
0.155973
0.156606
0.157087
0.156442
0.155844
0.156221
0.156823
0.157473
0.157759
0.157109
0.156504
0.155939
0.155662
0.155292
0.154782
0.154314
0.153884
0.154222
0.154665
0.155144
0.155411
0.154919
0.154458
0.154025
0.153812
0.153491
0.153103
0.152668
0.152186
0.151633
0.151378
0.151152
0.150956
0.151403
0.151633
0.151893
0.152347
0.152058
0.151802
0.151574
0.151202
0.150787
0.150642
0.150519
0.150417
0.150748
0.150879
0.151028
0.151375
0.1512
0.151045
0.15131
0.151494
0.151697
0.151923
0.152174
0.152452
0.152761
0.153132
0.152802
0.152501
0.152746
0.153077
0.153431
0.153618
0.153234
0.15287
0.152525
0.152436
0.152223
0.151967
0.15173
0.151508
0.151605
0.151867
0.152144
0.152199
0.151889
0.151594
0.151319
0.151356
0.151297
0.151139
0.150907
0.150635
0.150334
0.149967
0.149447
0.149507
0.149584
0.149671
0.149763
0.149844
0.149983
0.14997
0.149956
0.149947
0.149949
0.150269
0.150218
0.150177
0.150379
0.150454
0.150538
0.150781
0.150664
0.150552
0.150439
0.150305
0.150141
0.150111
0.150234
0.150326
0.150361
0.150512
0.150668
0.150822
0.150977
0.151095
0.150898
0.150704
0.150669
0.150889
0.151118
0.151063
0.150825
0.150604
0.150406
0.150465
0.150513
0.150338
0.150289
0.150242
0.150206
0.150355
0.15054
0.15075
0.15098
0.151233
0.15151
0.151812
0.152137
0.152484
0.152854
0.153247
0.153659
0.154092
0.154549
0.155031
0.155542
0.156084
0.156659
0.15727
0.15792
0.157914
0.157261
0.156643
0.156427
0.157046
0.157697
0.157311
0.156678
0.156078
0.155511
0.15584
0.156057
0.155499
0.154971
0.15447
0.154262
0.154758
0.155284
0.154975
0.154471
0.153996
0.15372
0.154162
0.154634
0.155136
0.155669
0.156234
0.156832
0.156322
0.15577
0.155249
0.15484
0.155315
0.155817
0.155332
0.154878
0.154448
0.15404
0.154391
0.154757
0.154295
0.153859
0.153451
0.153193
0.153569
0.153968
0.153655
0.15329
0.152946
0.152623
0.152841
0.153068
0.153306
0.153552
0.153794
0.153997
0.153549
0.153127
0.15273
0.152562
0.152945
0.153356
0.153136
0.152749
0.152389
0.152055
0.152207
0.152359
0.152015
0.151697
0.151405
0.151302
0.151577
0.151879
0.151747
0.151465
0.151207
0.15112
0.151361
0.151624
0.151911
0.152222
0.152558
0.152918
0.15271
0.152375
0.152064
0.151913
0.152201
0.15251
0.152318
0.152033
0.151767
0.151519
0.151644
0.151775
0.151508
0.151262
0.151038
0.15096
0.151168
0.151396
0.15129
0.151078
0.150885
0.150814
0.150992
0.151187
0.151399
0.151627
0.151872
0.152134
0.152412
0.152709
0.153022
0.153354
0.153704
0.154073
0.154461
0.154869
0.154426
0.154061
0.153713
0.153366
0.153677
0.154
0.153592
0.153307
0.153032
0.152769
0.153069
0.153381
0.153065
0.152764
0.152479
0.152258
0.152515
0.152785
0.152516
0.152274
0.152043
0.151836
0.152041
0.152255
0.152478
0.15271
0.15295
0.153198
0.152819
0.152606
0.152399
0.152097
0.152273
0.152453
0.1521
0.151952
0.151805
0.151661
0.151925
0.152197
0.152003
0.151815
0.151635
0.151439
0.151596
0.151758
0.15152
0.151383
0.15125
0.151121
0.151289
0.151462
0.15164
0.151824
0.152014
0.15221
0.151955
0.151716
0.151492
0.151361
0.151565
0.151783
0.151616
0.15142
0.151235
0.151062
0.15117
0.151282
0.151088
0.150909
0.150745
0.15068
0.15083
0.150993
0.150901
0.150753
0.150617
0.150556
0.150679
0.150813
0.150957
0.151113
0.151279
0.151455
0.151298
0.151142
0.150994
0.150879
0.151008
0.151145
0.150997
0.150879
0.150767
0.150661
0.150757
0.150856
0.150726
0.150607
0.150497
0.150441
0.150537
0.150643
0.150562
0.15047
0.150385
0.150309
0.150353
0.150398
0.150445
0.150494
0.150544
0.150597
0.150652
0.15071
0.150771
0.150835
0.150902
0.150973
0.151052
0.151139
0.150898
0.150682
0.150486
0.150442
0.150624
0.150827
0.150763
0.150574
0.150405
0.150261
0.150285
0.150316
0.150181
0.150163
0.150149
0.150137
0.150239
0.150372
0.150529
0.150706
0.150652
0.150488
0.150342
0.150314
0.150449
0.150601
0.150553
0.150412
0.150287
0.150184
0.150201
0.15022
0.150126
0.150115
0.150106
0.150097
0.150169
0.150263
0.150377
0.150508
0.150464
0.150345
0.15024
0.150219
0.150314
0.150423
0.150384
0.150285
0.150198
0.150128
0.15014
0.150154
0.150089
0.150082
0.150075
0.150068
0.150116
0.150179
0.150257
0.150346
0.150309
0.15023
0.150161
0.150143
0.150205
0.150274
0.150241
0.15018
0.150126
0.150083
0.150093
0.150104
0.150062
0.150056
0.15005
0.150044
0.150072
0.15011
0.150156
0.150208
0.150266
0.150332
0.150404
0.150483
0.150568
0.150658
0.150753
0.150853
0.150957
0.151065
0.151176
0.15129
0.151405
0.151522
0.15164
0.151758
0.151428
0.151339
0.151248
0.150983
0.151047
0.151109
0.1508
0.150765
0.150726
0.150683
0.150916
0.151157
0.151066
0.150975
0.150885
0.150711
0.15078
0.150848
0.150638
0.150591
0.150542
0.150379
0.150408
0.150434
0.150458
0.150477
0.150493
0.150503
0.150216
0.15023
0.150237
0.150006
0.149976
0.149939
0.149673
0.149732
0.149783
0.149826
0.150029
0.15024
0.150237
0.15023
0.15022
0.150067
0.150059
0.150047
0.149863
0.149894
0.14992
0.149941
0.150072
0.150208
0.150348
0.150493
0.150643
0.150798
0.150713
0.150631
0.150552
0.150449
0.150512
0.150577
0.150445
0.150396
0.150349
0.150304
0.150389
0.150477
0.150407
0.150341
0.15028
0.15023
0.150279
0.150332
0.15026
0.15022
0.150182
0.150135
0.150162
0.150191
0.150221
0.150253
0.150285
0.150317
0.150193
0.150177
0.150159
0.150069
0.150072
0.150073
0.149958
0.149971
0.149982
0.14999
0.150064
0.150142
0.150124
0.150106
0.15009
0.150046
0.150052
0.150059
0.149996
0.150001
0.150004
0.149963
0.14995
0.149936
0.149918
0.149898
0.149874
0.149847
0.149814
0.149777
0.149735
0.149686
0.149631
0.149568
0.149497
0.149417
0.149171
0.149271
0.149362
0.149164
0.149055
0.148935
0.148805
0.14856
0.148399
0.148146
0.147952
0.147743
0.147519
0.147279
0.146964
0.146687
0.14637
0.146057
0.145739
0.146068
0.14638
0.146665
0.146942
0.147224
0.147466
0.147693
0.147904
0.147673
0.147445
0.147201
0.146949
0.146673
0.146417
0.146108
0.145781
0.145436
0.145071
0.144686
0.14428
0.143948
0.143506
0.143042
0.142701
0.142201
0.141678
0.141131
0.140774
0.141332
0.141867
0.142378
0.142868
0.143178
0.143634
0.144068
0.144369
0.144768
0.145148
0.145508
0.145849
0.145603
0.145248
0.144874
0.144481
0.144208
0.143782
0.143336
0.143053
0.142574
0.142073
0.14155
0.141005
0.140436
0.140117
0.140695
0.14125
0.140967
0.140402
0.139816
0.139531
0.140126
0.140699
0.141251
0.14151
0.141783
0.142295
0.142785
0.143254
0.143511
0.143949
0.144367
0.144614
0.145001
0.145369
0.145719
0.14594
0.146173
0.146479
0.146708
0.146983
0.147209
0.147453
0.147682
0.147887
0.148102
0.148326
0.148493
0.148709
0.148847
0.148973
0.149089
0.149263
0.149443
0.149516
0.149582
0.14964
0.149509
0.149435
0.149353
0.149196
0.149293
0.149382
0.14926
0.149157
0.149045
0.148923
0.148791
0.148648
0.148457
0.148286
0.148087
0.147898
0.148099
0.148274
0.148448
0.148616
0.148763
0.1489
0.149027
0.149143
0.149031
0.148901
0.148761
0.14861
0.148464
0.148288
0.148134
0.147932
0.147716
0.147487
0.147243
0.147042
0.146768
0.146563
0.14626
0.146052
0.146368
0.146667
0.14685
0.147121
0.1473
0.147543
0.147772
0.147987
0.147847
0.147619
0.147377
0.147219
0.146951
0.146788
0.146493
0.146181
0.145854
0.145509
0.145147
0.144766
0.144543
0.144133
0.143703
0.14347
0.143011
0.142531
0.142031
0.141781
0.142291
0.14278
0.143249
0.143699
0.14391
0.144331
0.144734
0.144935
0.145309
0.145665
0.146004
0.146327
0.146168
0.145835
0.145485
0.145118
0.144937
0.144543
0.14413
0.143939
0.143499
0.14304
0.142561
0.142063
0.141545
0.141006
0.140446
0.139865
0.139262
0.139008
0.139618
0.140207
0.139981
0.139386
0.138769
0.138544
0.139167
0.139769
0.14035
0.140556
0.140774
0.141321
0.141848
0.142354
0.142158
0.141644
0.14111
0.140911
0.141451
0.141973
0.141798
0.14127
0.140722
0.140155
0.139568
0.13896
0.138332
0.138133
0.138766
0.139379
0.139202
0.138584
0.137946
0.137771
0.137109
0.136942
0.136256
0.13555
0.135389
0.13466
0.134508
0.133757
0.133616
0.132843
0.132712
0.131918
0.131105
0.130985
0.131799
0.132593
0.132486
0.131692
0.130878
0.130784
0.131598
0.132393
0.133168
0.133262
0.133368
0.133486
0.134241
0.134369
0.135102
0.135239
0.135951
0.136098
0.136786
0.137455
0.137608
0.138254
0.138414
0.139036
0.139638
0.1398
0.139972
0.140545
0.141098
0.141632
0.141477
0.140937
0.140378
0.140221
0.140785
0.14133
0.141856
0.141997
0.142148
0.142307
0.142475
0.142653
0.142841
0.143309
0.143758
0.144188
0.144361
0.144765
0.145151
0.145314
0.145674
0.146017
0.145873
0.14552
0.145374
0.144996
0.144601
0.144446
0.144025
0.143586
0.143129
0.142958
0.143423
0.143869
0.144298
0.144709
0.144849
0.145235
0.145605
0.145736
0.14608
0.146209
0.146344
0.146485
0.146633
0.146924
0.147068
0.147333
0.147473
0.147712
0.147938
0.148061
0.148189
0.148324
0.148501
0.148628
0.148782
0.148924
0.149056
0.149151
0.149251
0.149355
0.149463
0.149576
0.149693
0.149739
0.149781
0.149817
0.149739
0.149691
0.149636
0.149537
0.149604
0.149664
0.149719
0.149783
0.149849
0.149878
0.149902
0.149924
0.149886
0.149856
0.149822
0.149768
0.149811
0.14985
0.149815
0.149768
0.149716
0.149657
0.149592
0.149521
0.149442
0.14935
0.149441
0.149523
0.149457
0.149364
0.149262
0.149178
0.14929
0.149393
0.149487
0.149542
0.149598
0.149666
0.149727
0.149782
0.149749
0.149688
0.149619
0.149573
0.14965
0.149719
0.149779
0.149804
0.149829
0.149856
0.149884
0.149913
0.149943
0.149974
0.150006
0.150039
0.150074
0.15011
0.150147
0.150186
0.150225
0.150176
0.150133
0.150094
0.150079
0.15011
0.150146
0.150116
0.150088
0.150064
0.150043
0.150053
0.150062
0.150038
0.150033
0.150027
0.150022
0.150034
0.150049
0.150067
0.150087
0.15006
0.150047
0.150035
0.150021
0.150027
0.150033
0.150007
0.150008
0.150008
0.150008
0.150016
0.150025
0.150017
0.150012
0.150007
0.150002
0.15
0.149995
0.14999
0.149982
0.149959
0.149972
0.149983
0.149971
0.149955
0.149936
0.149913
0.149939
0.149959
0.149976
0.149984
0.149992
0.149998
0.149993
0.149989
0.149985
0.149969
0.149949
0.149923
0.149892
0.149871
0.149908
0.149938
0.149928
0.149893
0.149852
0.149833
0.149879
0.149918
0.149949
0.149956
0.149962
0.149981
0.149977
0.149973
0.149969
0.149943
0.149909
0.149866
0.149815
0.149756
0.149689
0.149613
0.149529
0.149435
0.149332
0.149219
0.149097
0.148964
0.148821
0.148667
0.148556
0.148379
0.148262
0.14815
0.14835
0.148451
0.148627
0.148722
0.148876
0.149019
0.149151
0.149273
0.149217
0.149086
0.148944
0.148792
0.148711
0.148536
0.148449
0.148253
0.148043
0.14782
0.147584
0.147461
0.1472
0.147072
0.146786
0.146655
0.14695
0.147231
0.147343
0.1476
0.147708
0.14794
0.14816
0.148365
0.148285
0.14807
0.147842
0.147748
0.147496
0.147397
0.147123
0.146834
0.146529
0.146409
0.146722
0.14702
0.146921
0.146616
0.146295
0.145958
0.145841
0.14548
0.145103
0.144977
0.144576
0.144158
0.143722
0.143268
0.142797
0.142644
0.143122
0.143582
0.14345
0.142984
0.1425
0.142364
0.142854
0.143325
0.14378
0.143899
0.144025
0.14445
0.144858
0.145249
0.145361
0.145729
0.146081
0.146185
0.146514
0.146827
0.147125
0.147212
0.147303
0.147571
0.147657
0.147903
0.147985
0.148208
0.148417
0.148486
0.148558
0.148633
0.148804
0.148873
0.149023
0.149163
0.14929
0.149337
0.149385
0.149486
0.149578
0.149661
0.149633
0.149545
0.149446
0.149407
0.149512
0.149607
0.149582
0.149481
0.149369
0.149246
0.14911
0.148963
0.148905
0.148738
0.148675
0.148613
0.148796
0.14885
0.149012
0.14906
0.149203
0.149333
0.149452
0.149558
0.149534
0.149423
0.149298
0.149162
0.149122
0.148965
0.148921
0.148744
0.148555
0.148351
0.148134
0.148063
0.147824
0.147748
0.147487
0.147408
0.147675
0.147928
0.147994
0.148226
0.148287
0.148498
0.148694
0.148877
0.148835
0.148646
0.148443
0.14839
0.148166
0.148109
0.147865
0.147605
0.147331
0.147042
0.146737
0.146417
0.146324
0.145982
0.145623
0.145522
0.145141
0.144744
0.14433
0.144217
0.144636
0.14504
0.144943
0.144535
0.144109
0.143667
0.143208
0.142731
0.142236
0.141723
0.141192
0.140642
0.140074
0.139487
0.13888
0.138735
0.138105
0.137966
0.137314
0.136642
0.136509
0.135815
0.135691
0.134975
0.13486
0.134124
0.134018
0.133925
0.134662
0.134755
0.135473
0.135577
0.136274
0.136387
0.137063
0.137183
0.137838
0.138474
0.138599
0.139213
0.139345
0.139936
0.140509
0.141063
0.140942
0.140385
0.139808
0.139689
0.139091
0.138979
0.138359
0.137721
0.137613
0.136953
0.136853
0.136172
0.136081
0.135381
0.135301
0.134582
0.133845
0.133089
0.132313
0.131519
0.130706
0.130646
0.129815
0.129774
0.128924
0.128056
0.127169
0.127148
0.128035
0.128903
0.128899
0.128031
0.127144
0.126239
0.126249
0.125326
0.125349
0.124407
0.12444
0.12348
0.12352
0.122543
0.121549
0.120539
0.119512
0.119558
0.118517
0.118566
0.11751
0.116439
0.115353
0.115406
0.116491
0.117561
0.118617
0.119659
0.119608
0.120634
0.120584
0.121595
0.121644
0.121694
0.120684
0.120734
0.119709
0.118668
0.117613
0.116543
0.115459
0.115509
0.116593
0.117662
0.117708
0.116639
0.115557
0.114461
0.114504
0.113396
0.113434
0.112313
0.111181
0.110038
0.110069
0.108916
0.107751
0.107775
0.106602
0.106616
0.107789
0.108952
0.108939
0.110091
0.111234
0.111212
0.112344
0.113463
0.113484
0.112365
0.112378
0.111247
0.110105
0.113496
0.114603
0.114591
0.114571
0.114541
0.115636
0.115599
0.116681
0.117749
0.118804
0.118763
0.118717
0.119758
0.120783
0.121793
0.121745
0.122739
0.122689
0.122638
0.122589
0.123566
0.124527
0.12448
0.125423
0.125382
0.126307
0.126273
0.12718
0.127155
0.128043
0.128912
0.128937
0.128067
0.128103
0.127214
0.127257
0.126349
0.126397
0.12547
0.125521
0.124576
0.123616
0.123666
0.124628
0.125572
0.1265
0.126448
0.127358
0.127306
0.128196
0.128147
0.129019
0.128974
0.129826
0.129789
0.129762
0.129749
0.129752
0.130583
0.130605
0.131416
0.131458
0.132252
0.132209
0.132187
0.131394
0.131391
0.13058
0.130593
0.131406
0.1322
0.132184
0.132958
0.13296
0.132983
0.133026
0.133782
0.134518
0.135237
0.135191
0.134474
0.133738
0.133715
0.13445
0.135167
0.135165
0.134448
0.133713
0.13373
0.132974
0.133006
0.13223
0.131435
0.130621
0.13066
0.131476
0.132272
0.133049
0.133808
0.133762
0.1345
0.134466
0.135183
0.135219
0.135268
0.134547
0.134604
0.133863
0.133102
0.132323
0.131525
0.130708
0.129873
0.129925
0.12907
0.129124
0.12825
0.128304
0.127411
0.127464
0.126553
0.125624
0.124679
0.123717
0.123765
0.122787
0.122833
0.121838
0.120828
0.119803
0.119844
0.120869
0.121879
0.121914
0.120904
0.119879
0.118839
0.117785
0.116718
0.116746
0.115665
0.115685
0.115697
0.116778
0.116766
0.117834
0.117814
0.118867
0.119907
0.120932
0.121942
0.121961
0.120951
0.119926
0.118887
0.118899
0.117845
0.119938
0.120963
0.121972
0.122967
0.122956
0.122936
0.122909
0.122874
0.123852
0.123811
0.124774
0.124728
0.125673
0.12572
0.125762
0.124815
0.12485
0.123888
0.123915
0.124878
0.125825
0.125797
0.126727
0.126691
0.126649
0.126603
0.127514
0.128409
0.128358
0.129234
0.129179
0.130037
0.12998
0.130818
0.130761
0.13158
0.13238
0.13244
0.131638
0.131698
0.130876
0.130933
0.130093
0.130146
0.129286
0.129335
0.128457
0.127562
0.127604
0.1285
0.129379
0.13024
0.130196
0.131039
0.130988
0.131812
0.131756
0.132561
0.132501
0.133285
0.133223
0.133161
0.133923
0.134667
0.135391
0.135326
0.136029
0.135969
0.135918
0.135881
0.135862
0.135865
0.13589
0.135936
0.136001
0.136683
0.136762
0.137425
0.137514
0.138157
0.138254
0.138876
0.139479
0.13958
0.140162
0.140269
0.14083
0.140727
0.140632
0.140065
0.139975
0.139387
0.138781
0.138696
0.138069
0.137992
0.137346
0.137281
0.136618
0.13657
0.136544
0.137205
0.137232
0.137876
0.137926
0.138553
0.138619
0.139228
0.139303
0.139893
0.140465
0.140545
0.141096
0.141181
0.141273
0.141373
0.141482
0.141598
0.142116
0.142615
0.143097
0.142993
0.142507
0.142003
0.141898
0.142406
0.142896
0.143368
0.143462
0.143561
0.144008
0.144438
0.144852
0.144766
0.144348
0.143913
0.143824
0.144263
0.144685
0.144609
0.144183
0.143741
0.143282
0.142805
0.142312
0.141801
0.141712
0.142226
0.142722
0.142646
0.142147
0.141631
0.141556
0.14102
0.140949
0.140393
0.139819
0.139754
0.139162
0.139111
0.138502
0.138472
0.137847
0.137842
0.137201
0.136541
0.13656
0.13722
0.137861
0.137901
0.137259
0.136598
0.136651
0.137313
0.137957
0.138581
0.138523
0.138483
0.138465
0.13907
0.139079
0.139668
0.139702
0.140276
0.140329
0.140886
0.141426
0.141488
0.142009
0.142075
0.142577
0.143062
0.143129
0.143202
0.143664
0.14411
0.144539
0.144474
0.144042
0.143594
0.14353
0.143981
0.144415
0.144362
0.143925
0.143471
0.143001
0.142514
0.142456
0.141949
0.141897
0.141373
0.140833
0.140795
0.14024
0.140226
0.139657
0.139672
0.139087
0.139127
0.139186
0.139772
0.139712
0.140278
0.140239
0.140788
0.140778
0.141314
0.141333
0.141855
0.142361
0.142404
0.142894
0.142945
0.143418
0.143874
0.144313
0.144268
0.143826
0.143368
0.143325
0.142851
0.142822
0.142335
0.141832
0.141835
0.14132
0.141355
0.140826
0.140886
0.140338
0.140414
0.139845
0.139257
0.13865
0.138024
0.137378
0.136714
0.136783
0.136097
0.136167
0.135459
0.134732
0.133987
0.134052
0.134799
0.135528
0.135595
0.134864
0.134115
0.133347
0.133406
0.132618
0.132671
0.131864
0.13191
0.131084
0.131123
0.130278
0.129416
0.128537
0.12764
0.127669
0.126756
0.126775
0.125844
0.124898
0.123934
0.123946
0.124909
0.125856
0.126787
0.127701
0.127689
0.128586
0.128566
0.129446
0.129466
0.129478
0.128598
0.130341
0.130329
0.130308
0.131153
0.13198
0.131949
0.132758
0.132718
0.133508
0.13346
0.13423
0.134175
0.134926
0.135658
0.135716
0.134983
0.135033
0.13428
0.134322
0.133549
0.133581
0.13279
0.132811
0.132001
0.131174
0.131186
0.132014
0.132824
0.133616
0.133603
0.134377
0.134354
0.13511
0.135076
0.135812
0.135768
0.136485
0.136432
0.136372
0.136307
0.136238
0.136929
0.136856
0.137525
0.13745
0.138098
0.138176
0.138254
0.137601
0.137674
0.137
0.137067
0.137743
0.1384
0.138329
0.138966
0.138888
0.138807
0.138727
0.139337
0.139927
0.140498
0.140587
0.140013
0.13942
0.139503
0.140099
0.140675
0.140761
0.140181
0.139583
0.139659
0.139039
0.139106
0.138466
0.137806
0.137128
0.137183
0.137863
0.138523
0.139166
0.139789
0.139728
0.140331
0.140259
0.140841
0.140915
0.140979
0.140394
0.140447
0.13984
0.139216
0.138572
0.13791
0.137229
0.13653
0.136565
0.135847
0.13587
0.135133
0.135146
0.13439
0.135884
0.136604
0.13659
0.13729
0.137265
0.137947
0.13861
0.138636
0.137973
0.137987
0.137305
0.138652
0.139297
0.139281
0.139255
0.139881
0.140488
0.141076
0.141034
0.141602
0.141546
0.14148
0.141404
0.141321
0.141233
0.141142
0.14105
0.140963
0.141494
0.141415
0.141926
0.141867
0.142362
0.142334
0.142816
0.143283
0.143294
0.14375
0.143784
0.144226
0.144191
0.144172
0.143735
0.143746
0.143301
0.142839
0.142893
0.142418
0.142497
0.142005
0.142096
0.141583
0.141677
0.141771
0.142291
0.142193
0.14269
0.142591
0.143066
0.142971
0.143427
0.14335
0.14379
0.144214
0.144177
0.144593
0.144594
0.144618
0.144653
0.144693
0.144736
0.144783
0.144833
0.14489
0.144951
0.145018
0.14509
0.145167
0.145249
0.145335
0.145426
0.145797
0.145887
0.146235
0.146568
0.146651
0.146962
0.147257
0.147538
0.147804
0.147745
0.147473
0.147187
0.146885
0.146812
0.146489
0.146151
0.146071
0.145711
0.14563
0.145994
0.146343
0.146414
0.146742
0.147055
0.147119
0.147411
0.147688
0.14795
0.148001
0.148054
0.14829
0.148339
0.148554
0.1486
0.148794
0.148975
0.14901
0.149046
0.149083
0.149232
0.149265
0.149395
0.149512
0.14949
0.149368
0.149342
0.149201
0.14917
0.149141
0.149292
0.149317
0.149449
0.149469
0.149582
0.149599
0.149616
0.149634
0.149652
0.149671
0.149691
0.149712
0.149733
0.149797
0.149853
0.1499
0.149892
0.149841
0.149781
0.149765
0.149829
0.149883
0.149927
0.149932
0.149938
0.149966
0.149963
0.14996
0.149957
0.149922
0.149876
0.149818
0.14975
0.149735
0.149807
0.149868
0.149861
0.149797
0.149721
0.149708
0.149787
0.149855
0.149908
0.149913
0.149917
0.149954
0.149952
0.149949
0.149947
0.149904
0.149849
0.149778
0.149695
0.149682
0.149769
0.149843
0.149837
0.149761
0.14967
0.149566
0.149551
0.149429
0.149409
0.149268
0.149112
0.148941
0.148755
0.148717
0.148511
0.148468
0.148242
0.148196
0.148427
0.148643
0.148679
0.148875
0.148908
0.149084
0.149245
0.14939
0.149372
0.149222
0.149056
0.149029
0.148844
0.148813
0.148608
0.148387
0.148151
0.1479
0.147634
0.147352
0.147295
0.146993
0.146676
0.146612
0.146275
0.145922
0.145553
0.14548
0.145853
0.146211
0.146552
0.146878
0.146934
0.14724
0.147531
0.147581
0.147852
0.148108
0.148349
0.148574
0.14854
0.148311
0.148067
0.147807
0.147763
0.147483
0.147188
0.147139
0.146825
0.146495
0.14615
0.145789
0.145412
0.145348
0.145728
0.146093
0.14604
0.145672
0.145289
0.145235
0.145621
0.145991
0.146346
0.146392
0.146442
0.146775
0.147092
0.147394
0.147437
0.147721
0.147988
0.148027
0.148275
0.148508
0.148725
0.148754
0.148783
0.148977
0.149003
0.149177
0.149199
0.149353
0.149491
0.149506
0.149521
0.149535
0.149647
0.149659
0.149753
0.149832
0.149894
0.149897
0.149901
0.149945
0.149943
0.149941
0.14994
0.149891
0.149826
0.149745
0.149737
0.149636
0.149625
0.149615
0.149722
0.14973
0.149816
0.149821
0.149888
0.149939
0.149938
0.149885
0.149882
0.149811
0.149807
0.149715
0.149604
0.149477
0.149335
0.149317
0.149155
0.149134
0.148952
0.148927
0.149113
0.149282
0.149299
0.149449
0.149463
0.149593
0.149707
0.149802
0.149797
0.1497
0.149583
0.149572
0.149434
0.14942
0.149265
0.149092
0.148903
0.148698
0.148477
0.14824
0.148207
0.147952
0.147681
0.147643
0.147353
0.147048
0.146728
0.146684
0.147008
0.147315
0.147607
0.147884
0.147917
0.148175
0.148418
0.148447
0.148671
0.14888
0.149072
0.149248
0.149231
0.149052
0.148857
0.148646
0.148621
0.148391
0.148145
0.148118
0.147854
0.147575
0.147281
0.146971
0.146645
0.146304
0.145948
0.145575
0.145187
0.145143
0.145534
0.145908
0.145872
0.145495
0.145102
0.145064
0.145459
0.145838
0.146202
0.146233
0.146267
0.14661
0.146938
0.14725
0.147222
0.146908
0.146579
0.146549
0.146881
0.147197
0.147173
0.146854
0.14652
0.146171
0.145805
0.145425
0.145029
0.145002
0.145396
0.145776
0.145758
0.145383
0.144995
0.145017
0.144623
0.144687
0.144284
0.143864
0.14396
0.143522
0.143627
0.143168
0.143272
0.142791
0.142888
0.142385
0.141863
0.141948
0.142473
0.142979
0.143062
0.142553
0.142026
0.142095
0.142624
0.143135
0.143626
0.143551
0.143466
0.143372
0.143837
0.143734
0.144176
0.144067
0.144487
0.144379
0.14478
0.145163
0.145074
0.145446
0.145397
0.145764
0.146118
0.14612
0.146141
0.146492
0.146827
0.147148
0.147123
0.146802
0.146468
0.146459
0.146788
0.147104
0.147408
0.147429
0.147453
0.147475
0.147497
0.14752
0.147546
0.147827
0.148093
0.148343
0.148366
0.148598
0.148815
0.148835
0.149033
0.149215
0.149199
0.149015
0.148999
0.148796
0.148577
0.148559
0.148322
0.148071
0.147803
0.147782
0.148051
0.148305
0.148543
0.148765
0.148779
0.148984
0.149172
0.149185
0.149355
0.149367
0.14938
0.149393
0.149407
0.149551
0.149561
0.149685
0.149693
0.149793
0.149873
0.149876
0.149878
0.14988
0.149936
0.149937
0.149935
0.149935
0.149934
0.149934
0.149871
0.149788
0.149783
0.149677
0.14967
0.14954
0.149529
0.149662
0.149774
0.149779
0.149867
0.149869
0.149934
0.149934
0.149933
0.149865
0.149862
0.149769
0.149654
0.149519
0.149509
0.149647
0.149765
0.14976
0.14964
0.1495
0.149344
0.149334
0.149161
0.148971
0.14896
0.148752
0.148529
0.148289
0.148034
0.147762
0.147742
0.148016
0.148273
0.148256
0.147995
0.14772
0.147698
0.147974
0.148236
0.148482
0.1485
0.148515
0.148741
0.148951
0.149144
0.149152
0.149327
0.149486
0.149492
0.149634
0.149757
0.149857
0.149858
0.14986
0.149933
0.149933
0.149933
0.149933
0.149934
0.149856
0.149754
0.14963
0.149626
0.149481
0.14932
0.149314
0.149136
0.14894
0.148728
0.148713
0.148927
0.149125
0.149306
0.149471
0.149476
0.149624
0.149752
0.149753
0.149856
0.149936
0.149939
0.149857
0.149858
0.149751
0.14962
0.149615
0.149462
0.149295
0.149112
0.148911
0.148694
0.148463
0.148217
0.147957
0.147685
0.147401
0.147105
0.146797
0.146478
0.146147
0.145803
0.145879
0.145529
0.145637
0.145272
0.144889
0.145004
0.1446
0.14471
0.144283
0.144383
0.143934
0.144022
0.144099
0.144553
0.144474
0.144907
0.144813
0.145224
0.145117
0.145506
0.145389
0.145756
0.146103
0.145984
0.146313
0.146214
0.146535
0.146842
0.147138
0.14721
0.146925
0.146627
0.146743
0.146432
0.146556
0.146225
0.145875
0.145988
0.145616
0.145716
0.14532
0.145405
0.144989
0.145058
0.14462
0.144164
0.143689
0.143196
0.142683
0.142152
0.142197
0.141646
0.141676
0.141105
0.140516
0.139908
0.139924
0.140532
0.141122
0.141693
0.142246
0.142228
0.142761
0.142729
0.143243
0.143275
0.143294
0.142779
0.143791
0.143771
0.143738
0.144214
0.144672
0.145111
0.145147
0.144707
0.144249
0.144269
0.144728
0.145169
0.145591
0.145569
0.145531
0.145477
0.145877
0.145803
0.146182
0.146092
0.146448
0.146342
0.146676
0.146991
0.146868
0.147162
0.147037
0.147314
0.147437
0.147564
0.147287
0.147404
0.147105
0.146786
0.146883
0.146542
0.14662
0.146258
0.146316
0.145933
0.145972
0.145994
0.146379
0.146356
0.146722
0.146681
0.147026
0.146964
0.147289
0.147205
0.147508
0.147791
0.147684
0.147945
0.147822
0.147696
0.147577
0.147481
0.147422
0.147695
0.147958
0.14821
0.14823
0.147991
0.147741
0.147826
0.148062
0.148287
0.148502
0.148459
0.148451
0.148679
0.148894
0.149095
0.149084
0.148887
0.148679
0.148707
0.148903
0.149089
0.149125
0.148953
0.148772
0.148581
0.148379
0.148165
0.147938
0.148063
0.148286
0.148494
0.148615
0.14841
0.148187
0.1483
0.148055
0.148149
0.147881
0.147595
0.147662
0.147353
0.147397
0.147069
0.147093
0.146745
0.147423
0.147733
0.147707
0.147998
0.147951
0.148221
0.148472
0.148397
0.148625
0.148525
0.148731
0.148919
0.148804
0.148687
0.148867
0.149035
0.149193
0.149284
0.149137
0.148978
0.14909
0.149244
0.149383
0.149478
0.149343
0.149192
0.149022
0.148833
0.148914
0.148703
0.148756
0.148523
0.14827
0.148298
0.148025
0.148552
0.148787
0.149002
0.14897
0.149163
0.149105
0.149276
0.149426
0.149557
0.149615
0.149486
0.149336
0.149372
0.149197
0.149524
0.149652
0.149757
0.149723
0.149669
0.149596
0.149509
0.149419
0.14934
0.149287
0.149265
0.149267
0.149281
0.14945
0.149605
0.149742
0.149749
0.149858
0.149943
0.149941
0.149942
0.149855
0.149848
0.149732
0.149593
0.149436
0.149429
0.149583
0.149721
0.149837
0.149929
0.149938
0.149918
0.149829
0.149717
0.149584
0.14944
0.149478
0.149609
0.149728
0.14976
0.149657
0.149543
0.149621
0.149721
0.149806
0.149874
0.149845
0.149829
0.14991
0.149911
0.149923
0.149939
0.149906
0.149855
0.149786
0.149698
0.149763
0.149839
0.149895
0.149919
0.149876
0.14981
0.149839
0.149897
0.14993
0.149949
0.149943
0.14993
0.149951
0.149958
0.149958
0.203606
0.186656
0.181691
0.186476
0.189727
0.119056
0.112614
0.129408
0.132889
0.143477
0.111256
0.0975853
0.120186
0.125619
0.131333
0.134854
0.0843457
0.0992361
0.104121
0.0999817
0.0552176
0.0735957
0.0885287
0.0923437
0.0879012
0.0763935
0.0464876
0.0621158
0.0653019
0.0487917
0.0696578
0.0725223
0.0690636
0.0574937
0.03408
0.0445729
0.0632057
0.0658124
0.0304662
0.038668
0.0391494
0.0283863
0.0349555
0.0516804
0.042474
0.0411054
0.146849
0.148715
0.14933
0.148346
0.149133
0.149672
0.149828
0.1499
0.149953
0.150005
0.15006
0.150105
0.150123
0.150108
0.150078
0.150051
0.150035
0.150027
0.150024
0.150022
0.150021
0.150021
0.150019
0.150018
0.150017
0.150016
0.150015
0.150015
0.150014
0.150013
0.150012
0.150012
0.150011
0.15001
0.150009
0.150008
0.150007
0.150006
0.150006
0.150005
0.150004
0.150003
0.150002
0.150002
0.150001
0.15
0.15
0.149999
0.149998
0.149998
0.149997
0.149997
0.149996
0.149996
0.149995
0.149995
0.149995
0.149994
0.149994
0.149994
0.149994
0.149994
0.149994
0.149994
0.149994
0.149994
0.149994
0.149995
0.149995
0.149996
0.149997
0.149998
0.149999
0.15
0.150002
0.150003
0.150005
0.150007
0.15001
0.150013
0.150017
0.150021
0.150023
0.150024
0.15002
0.150012
0.150001
0.149989
0.14998
0.149977
0.149978
0.149977
0.149917
0.149897
0.149783
0.14994
)
;
boundaryField
{
bottomEmptyFaces
{
type empty;
}
topEmptyFaces
{
type empty;
}
inlet
{
type calculated;
value nonuniform List<scalar>
95
(
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
0.15
)
;
}
outlet
{
type calculated;
value nonuniform List<scalar>
36
(
0.0436107
0.0436078
0.0436029
0.0435955
0.0435853
0.0435722
0.0435562
0.0435372
0.0435152
0.0434904
0.0434631
0.0434347
0.0434075
0.0433869
0.0433826
0.0434124
0.043504
0.0436886
0.0439833
0.0443238
0.0445156
0.0444679
0.0414212
0.043451
0.0408164
0.0388535
0.0365055
0.0377131
0.0362706
0.0378989
0.0515605
0.0718646
0.108325
0.0974564
0.083703
0.043612
)
;
}
walls
{
type calculated;
value uniform 1;
}
rightWall
{
type calculated;
value nonuniform List<scalar>
28
(
0.0991331
0.10038
0.105085
0.110276
0.115108
0.120264
0.122568
0.125554
0.127318
0.128437
0.12895
0.128919
0.128392
0.127337
0.125771
0.12352
0.120711
0.11635
0.11269
0.107143
0.100926
0.0953321
0.105092
0.0933924
0.0906039
0.1313
0.115982
0.102179
)
;
}
symmetryLine
{
type symmetryPlane;
}
}
// ************************************************************************* //
| [
"mhoeper3234@gmail.com"
] | mhoeper3234@gmail.com |
75dfcd340ec3920f3adc542a8a1c3eb94b38abd8 | 0a4c3feeb55198e29b7b996385375b61a4fd27e3 | /jasonT.cpp | 1a6ccedc3bf35ca0881e9982dab2c5927146f797 | [] | no_license | brianle192/CS335---Project | 40b391d04b2441ddee90905f00b6f71cdd040998 | 8aae445ac890eafa2680a229d4389dbea805699d | refs/heads/master | 2021-01-10T14:23:43.275921 | 2015-06-01T05:49:00 | 2015-06-01T05:49:00 | 36,640,442 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 11,910 | cpp | // Jason Thai
// Duck Hunt
// Lab 6 / Homework 3
//
// what i'm working on:
// movement and physics
// collision detection
// score keeping
// allocation/deallocation
// mouse/keyboard inputs
#include "header.h"
void makeDuck(Game *game, float x, float y)
{
if(game->n >= MAX_DUCKS)
return;
struct timespec dt;
clock_gettime(CLOCK_REALTIME, &dt);
timeCopy(&game->duckTimer, &dt);
int directionNum = rand() % 101;
Duck *d;
try
{
d = new Duck;
}
catch(std::bad_alloc)
{
return;
}
timeCopy(&d->time, &dt);
d->s.center.x = x;
d->s.center.y = y;
d->s.center.z = 0.0;
if(directionNum >= 50)
d->velocity.x = 4.0 * (game->rounds * .5);
else
d->velocity.x = -4.0 * (game->rounds * .5);
d->velocity.y = 4.0 * (game->rounds * .5);
d->velocity.z = 0.0;
d->s.width = 50.0;
d->s.height = 50.0;
d->next = game->duck;
if(game->duck != NULL)
{
game->duck->prev = d;
}
game->duck = d;
game->n++;
}
void makeDeadDuck(Game *game, Duck *duck)
{
if(game->onScreen >= MAX_DUCKS)
return;
struct timespec dt;
clock_gettime(CLOCK_REALTIME, &dt);
timeCopy(&game->duckTimer, &dt);
deadDuck *dd;
try
{
dd = new deadDuck;
}
catch(std::bad_alloc)
{
return;
}
timeCopy(&dd->time, &dt);
dd->s.center.x = duck->s.center.x;
dd->s.center.y = duck->s.center.y;
dd->s.center.z = 0.0;
dd->velocity.x = 0.0;
//dd->velocity.y = -3.5;
dd->velocity.z = 0.0;
dd->s.width = 50.0;
dd->s.height = 50.0;
dd->next = game->deadD;
if(game->deadD != NULL)
{
game->deadD->prev = dd;
}
game->deadD = dd;
game->onScreen++;
}
void makeFreeDuck(Game *game, Duck *duck)
{
if(game->onScreen >= MAX_DUCKS)
return;
//struct timespec dt;
//clock_gettime(CLOCK_REALTIME, &dt);
//timeCopy(&game->duckTimer, &dt);
freeDuck *fd;
try
{
fd = new freeDuck;
}
catch(std::bad_alloc)
{
return;
}
//timeCopy(&dd->time, &dt);
fd->s.center.x = duck->s.center.x;
fd->s.center.y = duck->s.center.y;
fd->s.center.z = 0.0;
fd->velocity.x = duck->velocity.x;
fd->velocity.y = duck->velocity.y;
fd->velocity.z = 0.0;
fd->s.width = 50.0;
fd->s.height = 50.0;
fd->next = game->freeD;
if(game->freeD != NULL)
{
game->freeD->prev = fd;
}
game->freeD = fd;
game->onScreen++;
}
void makeDog(Game *game, float x, float y)
{
//if(!game->dogGone)
// return;
struct timespec dt;
clock_gettime(CLOCK_REALTIME, &dt);
timeCopy(&game->dogTimer, &dt);
Dog *doge;
try
{
doge = new Dog;
}
catch(std::bad_alloc)
{
return;
}
timeCopy(&doge->time, &dt);
doge->s.center.x = x;
doge->s.center.y = y;
doge->s.center.z = 0.0;
doge->velocity.x = 1.0;
doge->velocity.y = 0.0;
doge->velocity.z = 0.0;
doge->s.width = 50.0;
doge->s.height = 50.0;
doge->next = game->dog;
if(game->dog != NULL)
{
game->dog->prev = doge;
}
game->dog = doge;
game->animateDog = true;
//game->dogGone = false;
}
void makeHappyDog(Game *game, float x, float y)
{
//if(!game->afterDog)
// return;
struct timespec dt;
clock_gettime(CLOCK_REALTIME, &dt);
timeCopy(&game->dogTimer, &dt);
happyDog *hdoge;
try
{
hdoge = new happyDog;
}
catch(std::bad_alloc)
{
return;
}
timeCopy(&hdoge->time, &dt);
hdoge->s.center.x = x;
hdoge->s.center.y = y;
hdoge->s.center.z = 0.0;
hdoge->velocity.x = 0.0;
hdoge->velocity.y = 2.0;
hdoge->velocity.z = 0.0;
hdoge->s.width = 50.0;
hdoge->s.height = 50.0;
hdoge->next = game->hdog;
if(game->hdog != NULL)
{
game->hdog->prev = hdoge;
}
game->hdog = hdoge;
//game->animateDog = true;
game->afterDog = true;
game->waitForDog = true;
}
void makeLaughingDog(Game *game, float x, float y)
{
//if(!game->afterDog)
// return;
struct timespec dt;
clock_gettime(CLOCK_REALTIME, &dt);
timeCopy(&game->dogTimer, &dt);
laughingDog *ldoge;
try
{
ldoge = new laughingDog;
}
catch(std::bad_alloc)
{
return;
}
timeCopy(&ldoge->time, &dt);
ldoge->s.center.x = x;
ldoge->s.center.y = y;
ldoge->s.center.z = 0.0;
ldoge->velocity.x = 0.0;
ldoge->velocity.y = 2.0;
ldoge->velocity.z = 0.0;
ldoge->s.width = 50.0;
ldoge->s.height = 50.0;
ldoge->next = game->ldog;
if(game->ldog != NULL)
{
game->ldog->prev = ldoge;
}
game->ldog = ldoge;
//game->animateDog = true;
game->afterDog = true;
game->waitForDog = true;
}
void movement(Game *game)
{
Duck *d = game->duck;
deadDuck *dd = game->deadD;
freeDuck *fd = game->freeD;
Dog *doge = game->dog;
happyDog *hdoge = game->hdog;
laughingDog *ldoge = game->ldog;
struct timespec dt;
clock_gettime(CLOCK_REALTIME, &dt);
int randDirectionNumX, randDirectionNumY;
//std::cout << doge << std::endl;
//if (game->n <= 0)
// return;
//std::cout << doge << std::endl;
while(d)
{
double ts = timeDiff(&d->time, &dt);
randDirectionNumX = rand() % 101;
randDirectionNumY = rand() % 101;
if(ts > 5.0)
{
makeFreeDuck(game, d);
Duck *saved = d->next;
deleteDuck(game, d);
d = saved;
continue;
}
if(1.0 < ts && ts < 1.01)
{
if(randDirectionNumX >= 50)
d->velocity.x *= -1;
if(randDirectionNumY >= 50)
d->velocity.y *= -1;
}
if(2.0 < ts && ts < 2.01)
{
if(randDirectionNumX >= 50)
d->velocity.x *= -1;
if(randDirectionNumY >= 50)
d->velocity.y *= -1;
}
if(3.0 < ts && ts < 3.01)
{
if(randDirectionNumX >= 50)
d->velocity.x *= -1;
if(randDirectionNumY >= 50)
d->velocity.y *= -1;
}
if(4.0 < ts && ts < 4.01)
{
if(randDirectionNumX >= 50)
d->velocity.x *= -1;
if(randDirectionNumY >= 50)
d->velocity.y *= -1;
}
if(d->s.center.x - d->s.width <= 0.0)
{
d->s.center.x = d->s.width + 0.1;
d->velocity.x *= -1.0;
}
if(d->s.center.x + d->s.width >= WINDOW_WIDTH)
{
d->s.center.x = WINDOW_WIDTH - d->s.width - 0.1;
d->velocity.x *= -1.0;
}
if(d->s.center.y - d->s.height <= game->floor)
{
d->s.center.y = game->floor + d->s.height + 0.1;
d->velocity.y *= -1.0;
}
if(d->s.center.y + d->s.height >= WINDOW_HEIGHT)
{
d->s.center.y = WINDOW_HEIGHT - d->s.height - 0.1;
d->velocity.y *= -1.0;
}
d->s.center.x += d->velocity.x;
d->s.center.y += d->velocity.y;
d = d->next;
}
while(dd)
{
double ts = timeDiff(&dd->time, &dt);
float velocity = -4.0;
if(ts < 0.3)
dd->velocity.y = 0.0;
if(ts > 0.3)
dd->velocity.y = velocity;
if(dd->s.center.y - dd->s.height <= game->floor)
{
game->waitForDog = true;
deleteDeadDuck(game, dd);
if(game->n == 0)
{
game->afterDog = true;
return;
}
}
dd->s.center.y += dd->velocity.y;
dd = dd->next;
}
while(fd)
{
if(fd->s.center.x + fd->s.width <= 0.0)
{
game->waitForDog = true;
deleteFreeDuck(game, fd);
if(game->n == 0)
{
game->afterDog = true;
return;
}
}
if(fd->s.center.x - fd->s.width >= WINDOW_WIDTH)
{
game->waitForDog = true;
deleteFreeDuck(game, fd);
if(game->n == 0)
{
game->afterDog = true;
return;
}
}
if(fd->velocity.y < 0.0)
fd->velocity.y *= -1.0;
if(fd->s.center.y - fd->s.height >= WINDOW_HEIGHT)
{
game->waitForDog = true;
deleteFreeDuck(game, fd);
if(game->n == 0)
{
game->afterDog = true;
return;
}
}
fd->s.center.x += fd->velocity.x;
fd->s.center.y += fd->velocity.y;
fd = fd->next;
}
while(doge)
{
double ts = timeDiff(&doge->time, &dt);
//std::cout << ts << std::endl;
if(2.0 < ts && ts < 2.1)
doge->velocity.x = 0.0;
if(3.0 < ts && ts < 3.1)
doge->velocity.x = 1.0;
if(5.0 < ts && ts < 5.1)
doge->velocity.x = 0.0;
if(6.0 < ts && ts < 6.1)
{
doge->velocity.x = 1.5;
doge->velocity.y = 2.0;
}
if(6.5 < ts && ts < 6.6)
{
doge->velocity.x = 0.5;
doge->velocity.y = -2.0;
}
if(doge->s.center.y - doge->s.height <= game->floor)
{
deleteDog(game, doge);
//game->dogGone = true;
return;
}
doge->s.center.x += doge->velocity.x;
doge->s.center.y += doge->velocity.y;
doge = doge->next;
}
while(hdoge)
{
double ts = timeDiff(&hdoge->time, &dt);
if(0.5 < ts && ts < 0.6)
hdoge->velocity.y = 0.0;
if(1.5 < ts && ts < 1.6)
hdoge->velocity.y = -2.0;
if(hdoge->s.center.y - hdoge->s.height <= game->floor)
{
deleteHappyDog(game, hdoge);
//game->afterDog = false;
return;
}
hdoge->s.center.y += hdoge->velocity.y;
hdoge = hdoge->next;
}
while(ldoge)
{
double ts = timeDiff(&ldoge->time, &dt);
if(0.5 < ts && ts < 0.6)
ldoge->velocity.y = 0.0;
if(1.5 < ts && ts < 1.6)
ldoge->velocity.y = -2.0;
if(ldoge->s.center.y - ldoge->s.height <= game->floor)
{
deleteLaughingDog(game, ldoge);
//game->afterDog = false;
return;
}
ldoge->s.center.y += ldoge->velocity.y;
ldoge = ldoge->next;
}
}
void deleteDuck(Game *game, Duck *node)
{
if(node->prev == NULL)
{
if(node->next == NULL)
{
game->duck = NULL;
}
else
{
node->next->prev = NULL;
game->duck = node->next;
}
}
else
{
if(node->next == NULL)
{
node->prev->next = NULL;
}
else
{
node->prev->next = node->next;
node->next->prev = node->prev;
}
}
delete node;
node = NULL;
game->n--;
}
void deleteDeadDuck(Game *game, deadDuck *node)
{
if(node->prev == NULL)
{
if(node->next == NULL)
{
game->deadD = NULL;
}
else
{
node->next->prev = NULL;
game->deadD = node->next;
}
}
else
{
if(node->next == NULL)
{
node->prev->next = NULL;
}
else
{
node->prev->next = node->next;
node->next->prev = node->prev;
}
}
delete node;
node = NULL;
game->onScreen--;
}
void deleteFreeDuck(Game *game, freeDuck *node)
{
if(node->prev == NULL)
{
if(node->next == NULL)
{
game->freeD = NULL;
}
else
{
node->next->prev = NULL;
game->freeD = node->next;
}
}
else
{
if(node->next == NULL)
{
node->prev->next = NULL;
}
else
{
node->prev->next = node->next;
node->next->prev = node->prev;
}
}
delete node;
node = NULL;
game->onScreen--;
}
void deleteDog(Game *game, Dog *node)
{
if(node->prev == NULL)
{
if(node->next == NULL)
{
game->dog = NULL;
}
else
{
node->next->prev = NULL;
game->dog = node->next;
}
}
else
{
if(node->next == NULL)
{
node->prev->next = NULL;
}
else
{
node->prev->next = node->next;
node->next->prev = node->prev;
}
}
delete node;
node = NULL;
game->animateDog = false;
game->dogGone = true;
}
void deleteHappyDog(Game *game, happyDog *node)
{
if(node->prev == NULL)
{
if(node->next == NULL)
{
game->hdog = NULL;
}
else
{
node->next->prev = NULL;
game->hdog = node->next;
}
}
else
{
if(node->next == NULL)
{
node->prev->next = NULL;
}
else
{
node->prev->next = node->next;
node->next->prev = node->prev;
}
}
delete node;
node = NULL;
game->afterDog = false;
game->waitForDog = false;
}
void deleteLaughingDog(Game *game, laughingDog *node)
{
if(node->prev == NULL)
{
if(node->next == NULL)
{
game->ldog = NULL;
}
else
{
node->next->prev = NULL;
game->ldog = node->next;
}
}
else
{
if(node->next == NULL)
{
node->prev->next = NULL;
}
else
{
node->prev->next = node->next;
node->next->prev = node->prev;
}
}
delete node;
node = NULL;
game->afterDog = false;
game->waitForDog = false;
}
| [
"jthai@Desktop"
] | jthai@Desktop |
be2eb8e9f0568e3c87c816d22b68de4065d8d3bf | 9f3cc020259f7822e004afb286c3961d522f1f7f | /CS6366ComputerGraphics/Assignment0A/Shader.h | 5e3d6eeeb6de93b95c8250aec2bd13a3f435a6b8 | [] | no_license | N33MO/OpenGL-Animation-Graphics | 1c314f17b7fa4722e212fbdc1fd35610411717a2 | f111b8742dd2e6d701fa2132bc26641e8d2a54c6 | refs/heads/master | 2021-01-03T12:12:07.799818 | 2020-03-06T00:05:01 | 2020-03-06T00:05:01 | 240,079,577 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,497 | h | //
// Shader.h
// OpenGLProjects
//
// Created by Dayuan Chen on 1/31/20.
// Copyright © 2020 N33MO. All rights reserved.
//
#ifndef SHADER_H
#define SHADER_H
#include <GL/glew.h>
#include <string>
#include <iostream>
#include <sstream>
#include <fstream>
class Shader
{
public:
GLuint program;
Shader(const GLchar* vertex_shader_path, const GLchar* fragment_shader_path, const GLchar* geometry_shader_path = nullptr)
{
std::string vertex_code;
std::string fragment_code;
std::string geometry_code;
std::ifstream v_shader_file;
std::ifstream f_shader_file;
std::ifstream g_shader_file;
v_shader_file.exceptions(std::ifstream::failbit | std::ifstream::badbit);
f_shader_file.exceptions(std::ifstream::failbit | std::ifstream::badbit);
g_shader_file.exceptions(std::ifstream::failbit | std::ifstream::badbit);
try{
v_shader_file.open(vertex_shader_path);
f_shader_file.open(fragment_shader_path);
std::stringstream v_shader_stream, f_shader_stream;
v_shader_stream << v_shader_file.rdbuf();
f_shader_stream << f_shader_file.rdbuf();
v_shader_file.close();
f_shader_file.close();
vertex_code = v_shader_stream.str();
fragment_code = f_shader_stream.str();
if( geometry_shader_path != nullptr )
{
g_shader_file.open(geometry_shader_path);
std::stringstream g_shader_stream;
g_shader_stream << g_shader_file.rdbuf();
g_shader_file.close();
geometry_code = g_shader_stream.str();
}
}
catch(const std::exception&)
{
std::cout << "Error: Shader not read.\n";
}
const char* v_shader_code = vertex_code.c_str();
const char* f_shader_code = fragment_code.c_str();
GLuint vertex, fragment, geometry;
GLchar info_log[512];
vertex = glCreateShader(GL_VERTEX_SHADER);
fragment = glCreateShader(GL_FRAGMENT_SHADER);
glShaderSource(vertex, 1, &v_shader_code, NULL);
glShaderSource(fragment, 1, &f_shader_code, NULL);
glCompileShader(vertex);
glCompileShader(fragment);
check_compile_error(vertex, "VERTEX");
check_compile_error(fragment, "FRAGMENT");
if( geometry_shader_path != nullptr )
{
const char* g_shader_code = geometry_code.c_str();
geometry = glCreateShader(GL_GEOMETRY_SHADER);
glShaderSource(geometry, 1, &g_shader_code, NULL);
glCompileShader(geometry);
check_compile_error(geometry, "GEOMETRY");
}
this->program = glCreateProgram();
glAttachShader(this->program, vertex);
glAttachShader(this->program, fragment);
if( geometry_shader_path != nullptr )
{
glAttachShader(this->program, geometry);
}
glLinkProgram(this->program);
check_compile_error(this->program, "PROGRAM");
glDeleteShader(vertex);
glDeleteShader(fragment);
if( geometry_shader_path != nullptr )
{
glDeleteShader(geometry);
}
}
void use()
{
glUseProgram(this->program);
}
private:
void check_compile_error(GLuint shader, std::string type)
{
GLint success;
GLchar info_log[1024];
if( type == "PROGRAM" )
{
glGetProgramiv(shader, GL_LINK_STATUS, &success);
if( !success )
{
glGetShaderInfoLog(shader, 1024, NULL, info_log);
std::cout << "| Error:: PROGRAM_LINKING_ERROR of type: " << type << "|\n" << info_log << "\n| -- --------------------------------------------------- -- |\n";
}
}
else if( type == "VERTEX" || type == "FRAGMENT" || type == "GEOMETRY" )
{
glGetShaderiv(shader, GL_COMPILE_STATUS, &success);
if( !success )
{
glGetShaderInfoLog(shader, 1024, NULL, info_log);
std::cout << "| Error:: SHADER_COMPILATION_ERROR of type: " << type << "|\n" << info_log << "\n| -- --------------------------------------------------- -- |\n";
}
}
else
{
std::cout << "Error:: INCORRECT INPUT TYPE.\n";
}
}
};
#endif
| [
"neemo.cdy@gmail.com"
] | neemo.cdy@gmail.com |
5d3c0134fb7a83a654b61a2de6a5edfb30884ff3 | 7a4aad4222fbf57953457a31017b107482b2df76 | /amazon/leftmost_and_rightmost_nodes_of_binary_tree.cpp | b7559041e542c0ab6db934dfe30413f3afed8028 | [] | no_license | krshubham/algorithms | 594c40d01ca84dc5b3b41ccd6511556f4b349195 | 9f6f7f777308efe5677616fc9dcbc742aa0d23b4 | refs/heads/master | 2020-03-30T10:42:13.511610 | 2019-10-15T06:31:31 | 2019-10-15T06:31:31 | 151,132,259 | 0 | 0 | null | 2018-10-01T17:50:25 | 2018-10-01T17:50:24 | null | UTF-8 | C++ | false | false | 1,248 | cpp |
/*Please note that it's Function problem i.e.
you need to write your solution in the form of Function(s) only.
Driver Code to call/invoke your function is mentioned above.*/
/* Function to print corner node at each level */
int get_height(Node *node){
if (node->left == NULL && node->right == NULL)
return 0;
int lcount = 0;
int rcount = 0;
if (node->left != NULL)
lcount = 1+get_height(node->left);
if (node->right != NULL)
rcount = 1+get_height(node->right);
return max(lcount,rcount);
}
void levelordertraversal(Node *node,int cnt,vector<int>&v1){
if (cnt == 0){
v1.push_back(node->key);
return;
}
if (cnt>0){
if (node->left != NULL)
levelordertraversal(node->left,cnt-1,v1);
if (node->right != NULL)
levelordertraversal(node->right,cnt-1,v1);
}
}
void printCorner(Node *node)
{
int h = get_height(node);
cout<<node->key<<" ";
for (int i=1;i<=h;i++){
vector<int>v1;
levelordertraversal(node,i,v1);
if (v1.size() == 1)
cout<<v1[0]<<" ";
else if (v1.size() == 0)
continue;
else
cout<<v1[0]<<" "<<v1[v1.size()-1]<<" ";
}
} | [
"raghavalagh@raghavs-MacBook-Pro.local"
] | raghavalagh@raghavs-MacBook-Pro.local |
3f8c88fbe12fa46cf19b67995ce98420d7ddf55a | d0fb46aecc3b69983e7f6244331a81dff42d9595 | /rds/src/model/DescribeSQLCollectorPolicyResult.cc | 78b7799b706e2ec24fda3cddf621e9a1c1191877 | [
"Apache-2.0"
] | permissive | aliyun/aliyun-openapi-cpp-sdk | 3d8d051d44ad00753a429817dd03957614c0c66a | e862bd03c844bcb7ccaa90571bceaa2802c7f135 | refs/heads/master | 2023-08-29T11:54:00.525102 | 2023-08-29T03:32:48 | 2023-08-29T03:32:48 | 115,379,460 | 104 | 82 | NOASSERTION | 2023-09-14T06:13:33 | 2017-12-26T02:53:27 | C++ | UTF-8 | C++ | false | false | 1,709 | cc | /*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/rds/model/DescribeSQLCollectorPolicyResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Rds;
using namespace AlibabaCloud::Rds::Model;
DescribeSQLCollectorPolicyResult::DescribeSQLCollectorPolicyResult() :
ServiceResult()
{}
DescribeSQLCollectorPolicyResult::DescribeSQLCollectorPolicyResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DescribeSQLCollectorPolicyResult::~DescribeSQLCollectorPolicyResult()
{}
void DescribeSQLCollectorPolicyResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["SQLCollectorStatus"].isNull())
sQLCollectorStatus_ = value["SQLCollectorStatus"].asString();
if(!value["StoragePeriod"].isNull())
storagePeriod_ = std::stoi(value["StoragePeriod"].asString());
}
int DescribeSQLCollectorPolicyResult::getStoragePeriod()const
{
return storagePeriod_;
}
std::string DescribeSQLCollectorPolicyResult::getSQLCollectorStatus()const
{
return sQLCollectorStatus_;
}
| [
"sdk-team@alibabacloud.com"
] | sdk-team@alibabacloud.com |
ac4020ad45a7b4ad0b9d97c6f7ae9a5328ddba6b | 17e6891e863fba80ad6080f802351c9514f8f33d | /barber_wait_time.cc | 7a3969242487f87298e367b6a9ac6eb3727ac81a | [] | no_license | bbhavsar/ltc | de88aed97a31f7d5731ef1ab68875a8a95201ffa | f6a5617e652ced1513d48b4a1ad8204b28e3ddd1 | refs/heads/master | 2021-10-29T16:21:03.129286 | 2021-10-22T23:18:18 | 2021-10-22T23:23:43 | 127,701,900 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,366 | cc | #include "common.hh"
// Given number of barbers and amount of time each barber takes to cut
// hair for every person. Amount of time each barber takes is fixed and does not vary
// by the person.
// Return wait time for person in position p in the queue and which barber that
// person in position p will be assigned too.
// Typically num_barbers << p
struct BW {
int barber_idx;
int wait_time;
BW(int idx, int t) : barber_idx(idx), wait_time(t) {}
};
struct Compare {
bool operator()(const BW& lhs, const BW& rhs) const {
return lhs.wait_time == rhs.wait_time ? lhs.barber_idx > rhs.barber_idx :
lhs.wait_time > rhs.wait_time;
}
};
// O(p * log(b)) solution where b is number of barbers and p is the position in the queue
BW compute_barber_wait_time(const vector<int>& barbers, int p) {
const int num_barbers = barbers.size();
if (num_barbers == 0) {
BW(-1, INT_MAX);
}
priority_queue<BW, vector<BW>, Compare> min_heap;
int pos = 0;
while (pos < num_barbers) {
if (pos == p) {
return BW(pos, 0);
}
min_heap.push(BW(pos, barbers[pos]));
pos++;
}
while (pos < p) {
BW curr_finished_bw = min_heap.top();
min_heap.pop();
min_heap.emplace(curr_finished_bw.barber_idx,
curr_finished_bw.wait_time + barbers[curr_finished_bw.barber_idx]);
pos++;
}
return min_heap.top();
}
int main() {
vector<int> barbers = { 3, 4, 5};
BW bw = compute_barber_wait_time(barbers, 2);
cout << "2nd person will wait for " << bw.wait_time << "mins and go to barber " << bw.barber_idx << endl;
bw = compute_barber_wait_time(barbers, 3);
cout << "3rd person will wait for " << bw.wait_time << "mins and go to barber " << bw.barber_idx << endl;
bw = compute_barber_wait_time(barbers, 4);
cout << "4th person will wait for " << bw.wait_time << "mins and go to barber " << bw.barber_idx << endl;
bw = compute_barber_wait_time(barbers, 6);
cout << "6th perosn will wait for " << bw.wait_time << "mins and go to barber " << bw.barber_idx << endl;
bw = compute_barber_wait_time(barbers, 11);
cout << "11th person will wait for " << bw.wait_time << "mins and go to barber " << bw.barber_idx << endl;
return 0;
}
| [
"bankim@cloudera.com"
] | bankim@cloudera.com |
c0a96d40f511522630a1dce0f684dc27e7d2a599 | bd97313d71d720bde7301afad7b7533502b76f77 | /dream/filter_video.cc | 3a4963a4696adf797dd3b7f83271baeac06e1edd | [] | no_license | liupengh3c/myffmpeg | 98e20ca04fa04b84b98063f2c8d70e155ffa58dd | 68bac032b3a41d34819891dc3fb65edf763a0977 | refs/heads/master | 2020-12-01T01:45:33.473240 | 2020-11-28T15:20:00 | 2020-11-28T15:20:00 | 272,191,390 | 3 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 9,057 | cc | #include "iostream"
#define _XOPEN_SOURCE 600 /* for usleep */
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
extern "C"
{
#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>
#include <libavfilter/buffersink.h>
#include <libavfilter/buffersrc.h>
#include <libavutil/opt.h>
const char *filter_descr = "scale=78:24,transpose=cclock";
/* other way:
scale=78:24 [scl]; [scl] transpose=cclock // assumes "[in]" and "[out]" to be input output pads respectively
*/
static AVFormatContext *fmt_ctx;
static AVCodecContext *dec_ctx;
AVFilterContext *buffersink_ctx;
AVFilterContext *buffersrc_ctx;
AVFilterGraph *filter_graph;
static int video_stream_index = -1;
static int64_t last_pts = AV_NOPTS_VALUE;
static int open_input_file(const char *filename)
{
int ret;
AVCodec *dec;
if ((ret = avformat_open_input(&fmt_ctx, filename, NULL, NULL)) < 0)
{
av_log(NULL, AV_LOG_ERROR, "Cannot open input file\n");
return ret;
}
if ((ret = avformat_find_stream_info(fmt_ctx, NULL)) < 0)
{
av_log(NULL, AV_LOG_ERROR, "Cannot find stream information\n");
return ret;
}
/* select the video stream */
ret = av_find_best_stream(fmt_ctx, AVMEDIA_TYPE_VIDEO, -1, -1, &dec, 0);
if (ret < 0)
{
av_log(NULL, AV_LOG_ERROR, "Cannot find a video stream in the input file\n");
return ret;
}
video_stream_index = ret;
/* create decoding context */
dec_ctx = avcodec_alloc_context3(dec);
if (!dec_ctx)
return AVERROR(ENOMEM);
avcodec_parameters_to_context(dec_ctx, fmt_ctx->streams[video_stream_index]->codecpar);
/* init the video decoder */
if ((ret = avcodec_open2(dec_ctx, dec, NULL)) < 0)
{
av_log(NULL, AV_LOG_ERROR, "Cannot open video decoder\n");
return ret;
}
return 0;
}
static int init_filters(const char *filters_descr)
{
char args[512];
int ret = 0;
const AVFilter *buffersrc = avfilter_get_by_name("buffer");
const AVFilter *buffersink = avfilter_get_by_name("buffersink");
AVFilterInOut *outputs = avfilter_inout_alloc();
AVFilterInOut *inputs = avfilter_inout_alloc();
AVRational time_base = fmt_ctx->streams[video_stream_index]->time_base;
enum AVPixelFormat pix_fmts[] = {AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE};
filter_graph = avfilter_graph_alloc();
if (!outputs || !inputs || !filter_graph)
{
ret = AVERROR(ENOMEM);
goto end;
}
/* buffer video source: the decoded frames from the decoder will be inserted here. */
snprintf(args, sizeof(args),
"video_size=%dx%d:pix_fmt=%d:time_base=%d/%d:pixel_aspect=%d/%d",
dec_ctx->width, dec_ctx->height, dec_ctx->pix_fmt,
time_base.num, time_base.den,
dec_ctx->sample_aspect_ratio.num, dec_ctx->sample_aspect_ratio.den);
ret = avfilter_graph_create_filter(&buffersrc_ctx, buffersrc, "in",
args, NULL, filter_graph);
if (ret < 0)
{
av_log(NULL, AV_LOG_ERROR, "Cannot create buffer source\n");
goto end;
}
/* buffer video sink: to terminate the filter chain. */
ret = avfilter_graph_create_filter(&buffersink_ctx, buffersink, "out",
NULL, NULL, filter_graph);
if (ret < 0)
{
av_log(NULL, AV_LOG_ERROR, "Cannot create buffer sink\n");
goto end;
}
ret = av_opt_set_int_list(buffersink_ctx, "pix_fmts", pix_fmts,
AV_PIX_FMT_NONE, AV_OPT_SEARCH_CHILDREN);
if (ret < 0)
{
av_log(NULL, AV_LOG_ERROR, "Cannot set output pixel format\n");
goto end;
}
/*
* Set the endpoints for the filter graph. The filter_graph will
* be linked to the graph described by filters_descr.
*/
/*
* The buffer source output must be connected to the input pad of
* the first filter described by filters_descr; since the first
* filter input label is not specified, it is set to "in" by
* default.
*/
outputs->name = av_strdup("in");
outputs->filter_ctx = buffersrc_ctx;
outputs->pad_idx = 0;
outputs->next = NULL;
/*
* The buffer sink input must be connected to the output pad of
* the last filter described by filters_descr; since the last
* filter output label is not specified, it is set to "out" by
* default.
*/
inputs->name = av_strdup("out");
inputs->filter_ctx = buffersink_ctx;
inputs->pad_idx = 0;
inputs->next = NULL;
if ((ret = avfilter_graph_parse_ptr(filter_graph, filters_descr,
&inputs, &outputs, NULL)) < 0)
goto end;
if ((ret = avfilter_graph_config(filter_graph, NULL)) < 0)
goto end;
end:
avfilter_inout_free(&inputs);
avfilter_inout_free(&outputs);
return ret;
}
int filter_video(std::string in_yuv, std::string out_yuv)
{
int ret;
AVPacket packet;
AVFrame *frame;
AVFrame *filt_frame;
FILE *f = fopen(out_yuv.data(), "rb");
frame = av_frame_alloc();
filt_frame = av_frame_alloc();
if (!frame || !filt_frame)
{
perror("Could not allocate frame");
exit(1);
}
if ((ret = open_input_file(in_yuv.data())) < 0)
goto end;
if ((ret = init_filters(filter_descr)) < 0)
goto end;
/* read all packets */
while (1)
{
if ((ret = av_read_frame(fmt_ctx, &packet)) < 0)
break;
if (packet.stream_index == video_stream_index)
{
ret = avcodec_send_packet(dec_ctx, &packet);
if (ret < 0)
{
av_log(NULL, AV_LOG_ERROR, "Error while sending a packet to the decoder\n");
break;
}
while (ret >= 0)
{
ret = avcodec_receive_frame(dec_ctx, frame);
if (ret == AVERROR(EAGAIN) || ret == AVERROR_EOF)
{
break;
}
else if (ret < 0)
{
av_log(NULL, AV_LOG_ERROR, "Error while receiving a frame from the decoder\n");
goto end;
}
frame->pts = frame->best_effort_timestamp;
/* push the decoded frame into the filtergraph */
if (av_buffersrc_add_frame_flags(buffersrc_ctx, frame, AV_BUFFERSRC_FLAG_KEEP_REF) < 0)
{
av_log(NULL, AV_LOG_ERROR, "Error while feeding the filtergraph\n");
break;
}
/* pull filtered frames from the filtergraph */
while (1)
{
ret = av_buffersink_get_frame(buffersink_ctx, filt_frame);
if (ret == AVERROR(EAGAIN) || ret == AVERROR_EOF)
break;
if (ret < 0)
goto end;
// 写Y分量
for (size_t i = 0; i < filt_frame->height; i++)
{
fwrite(filt_frame->data[0] + filt_frame->linesize[0] * i, 1, filt_frame->width, f);
}
// 写U分量
for (size_t i = 0; i < filt_frame->height / 2; i++)
{
fwrite(filt_frame->data[1] + filt_frame->linesize[1] * i, 1, filt_frame->width / 2, f);
}
// 写V分量
for (size_t i = 0; i < filt_frame->height / 2; i++)
{
fwrite(filt_frame->data[2] + filt_frame->linesize[2] * i, 1, filt_frame->width / 2, f);
}
av_frame_unref(filt_frame);
}
av_frame_unref(frame);
}
}
av_packet_unref(&packet);
}
end:
avfilter_graph_free(&filter_graph);
avcodec_free_context(&dec_ctx);
avformat_close_input(&fmt_ctx);
av_frame_free(&frame);
av_frame_free(&filt_frame);
fclose(f);
if (ret < 0 && ret != AVERROR_EOF)
{
exit(1);
}
exit(0);
}
} | [
"liupenglily@163.com"
] | liupenglily@163.com |
09675aa26e691b2bc9970cd26ee2d9b8102250c7 | a2ebb05ff3d17a94d153c86720378520a89dc6af | /runCodes/aStar/ratInAMaze/maze_a_star.cpp | 7367906b3eccc5c153b5bf09e7e49977899c7a30 | [] | no_license | renatasarmet/algorithms | 8576956d837874e3a0443627e217b4bf19aa5eef | f7d136cfe26abd545ad04a5685f7350ee8b9526c | refs/heads/master | 2022-01-23T09:36:31.225233 | 2022-01-13T20:45:20 | 2022-01-13T20:45:20 | 191,887,590 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,110 | cpp | #include <cstring>
#include <cstdio>
#include <iostream>
#include <queue>
#include <cmath>
using namespace std;
#define MAX 510
#define WITH_DEPTH true
#define H_MANHATTAN true
typedef pair<int,int> pi;
struct state{
pi p;
int depth;
};
int n;
short int maze[MAX][MAX];
short int sol[MAX][MAX];
short int path[MAX][MAX];
int h_manhattan(state const& s){
// manhattan distance
return abs(s.p.first - (n-1)) + abs(s.p.second - (n-1));
}
int h_euclidiana(state const& s){
// euclidean distance
return sqrt(pow(((n-1) - s.p.first),2) + pow(((n-1) - s.p.second),2));
}
// this is an strucure which implements the operator overloading
struct CompareState {
bool operator()(state const& s1, state const& s2)
{
// g = distance from initial (depth if WITH_DEPTH == true else always 0)
int g1, g2, h1, h2, f1, f2;
if(WITH_DEPTH){
g1 = s1.depth;
g2 = s2.depth;
}
else{
g1 = 0;
g2 = 0;
}
// h = manhattan distance or euclidean distance
if(H_MANHATTAN){
h1 = h_manhattan(s1);
h2 = h_manhattan(s2);
}
else{
h1 = h_euclidiana(s1);
h2 = h_euclidiana(s2);
}
// f = g + h
f1 = g1 + h1;
f2 = g2 + h2;
return f1 > f2;
}
};
int moves[4][2] = {1,0,
0,1,
-1,0,
0,-1};
void printMat(short int mat[MAX][MAX]){
cout << "------" << endl;
for (int i = 0; i < n; ++i){
for (int j = 0; j < n; ++j)
{
cout << mat[i][j] << " ";
}
cout << endl;
}
cout << "------" << endl;
}
int countMat(short int mat[MAX][MAX]){
int sum = 0;
for (int i = 0; i < n; ++i){
for (int j = 0; j < n; ++j)
{
sum += mat[i][j];
}
}
return sum;
}
bool valido(int x, int y){
if (x < n && x >= 0 && y < n && y >= 0 && maze[x][y] == 1 && sol[x][y]==0)
return true;
return false;
}
bool achaCaminho(int x, int y){
int nx, ny;
priority_queue<state, vector<state>, CompareState> pq;
state par;
par.p = make_pair(x,y);
par.depth = 0;
pq.push(par);
state new_state;
sol[x][y] = 1;
while (!pq.empty()){
par = pq.top(); pq.pop();
path[par.p.first][par.p.second] = 1;
// se chegou ao fim...
if (par.p.first == n-1 && par.p.second == n-1 && maze[par.p.first][par.p.second] == 1){
return true;
}
//para todos os movimentos possiveis
for (int i = 0; i < 4; ++i)
{
nx = par.p.first + moves[i][0];
ny = par.p.second + moves[i][1];
if (valido(nx,ny)){
sol[nx][ny] = 1;
new_state.p = make_pair(nx,ny);
new_state.depth = par.depth+1;
pq.push(new_state);
}
}
}
return false;
}
int main(int argc, char const *argv[])
{
memset(sol, 0, sizeof sol);
memset(path, 0, sizeof path);
cin >> n;
for (int i = 0; i < n; ++i)
for (int j = 0; j < n; ++j)
{
cin >> maze[i][j];
}
// printMat(maze);
if (achaCaminho(0,0))
cout << "Encontrei um caminho" << endl;
else cout << "Nao existe um caminho para este caso" << endl;
// printMat(sol);
// printMat(path);
cout << "Total de quadradinhos visitados: " << countMat(path) << endl;
return 0;
}
| [
"renatassmendes@hotmail.com"
] | renatassmendes@hotmail.com |
bcc02cb4a87e458700441466f0fa9e011c000e5e | e549df34d081084f334a0e3924c61d0330c4b3c4 | /main.cpp | 68bc69a1e1ebc17297a4a251e3183d84a7c29287 | [] | no_license | ahmadkybora/qt_project_1 | 6979d5ff37b65c7437920ce6abe294880125f887 | 107b3c5806c9a5cf69a3ef559fd3e2cf8361260e | refs/heads/master | 2023-08-10T23:08:07.066966 | 2021-10-03T18:36:14 | 2021-10-03T18:36:14 | 413,164,730 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 177 | cpp | #include <QCoreApplication>
#include <qdebug.h>
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
qDebug() << "hello";
return a.exec();
}
| [
"ahmadkybora@gmail.com"
] | ahmadkybora@gmail.com |
a179396287de7cfb943446fa77f90e222cc9a1f7 | 1d3d97f3d4f81ec33b777fba786ee4fc97a1506c | /c082402.cpp | a9440f5649d17c04aacab9a94688c95b522812f0 | [] | no_license | ai999934/c062901 | 9c99d10dfe73451360d3a2dd424c7d43081521ba | 1760f036007e09af24d6b452596a8ed356863394 | refs/heads/master | 2021-01-20T22:31:20.573567 | 2016-12-26T04:27:57 | 2016-12-26T04:27:57 | 62,205,478 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 946 | cpp | // External reference http://www11.atwiki.jp/kenichiro/pages/32.html
#include <stdio.h>
#include "glibw32.h"
using namespace std;
const int N = 50;
void euler(double&, double&, double, double);
main()
{
ginit(500, 500, WHITE);
GRAPH g;
g.window(0, -N, 2 * N, N);
g.line(0, 0, 2 * N, 0);
g.line(0, N, 0, -N);
double x, v, f, h, t, tend;
int step;
x = 1.0;
v = 0.0;
f = 0;
tend = 100;
h = 0.1;
step = (int)(tend / h);
for(int i = 0; i < step; i++)
{
euler(x, v, f, h);
g.pset(t, x);
t += h;
}
gend();
}
void euler(double &x, double &v, double f, double h)
{
double dx, dv;
dx = v;
dv = x;
x = x + h * dx;
v = v + h * dv;
}
// g++ c082402.cpp libglibw32-3.a -IC:\mingw-jp-20040217\include\ -LC:\mingw-jp-20040217\lib\ -IC:\Glibw32\ -LC:\Glibw32\ -luser
// 32 -lgdi32
// rename a.exe c082402.*
// c082402.exe
| [
"noreply@github.com"
] | noreply@github.com |
4fd66bad8f484d26dda843b890068b551c96942d | e1a84cb3300878c6620940a1245fdf16ef66ff67 | /src/common/boost_serialization_helper.h | 1c540a509a626b813c185c45e949f72f6faee3fd | [
"BSD-3-Clause"
] | permissive | holodnak/masari | e66e7b626c19fb53495b53ce8e02f34af616473d | d6e438dd711119b60aeea5e77f7a138d40fbaf88 | refs/heads/master | 2020-03-08T02:27:28.189846 | 2018-03-26T17:13:11 | 2018-03-26T17:13:11 | 127,860,263 | 0 | 0 | null | 2018-04-03T06:16:15 | 2018-04-03T06:16:15 | null | UTF-8 | C++ | false | false | 4,440 | h | // Copyright (c) 2017-2018, The Masari Project
// Copyright (c) 2014-2017, The Monero Project
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification, are
// permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice, this list of
// conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
// of conditions and the following disclaimer in the documentation and/or other
// materials provided with the distribution.
//
// 3. Neither the name of the copyright holder nor the names of its contributors may be
// used to endorse or promote products derived from this software without specific
// prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Parts of this file are originally copyright (c) 2012-2013 The Cryptonote developers
#pragma once
#include <boost/archive/binary_iarchive.hpp>
#include <boost/archive/portable_binary_oarchive.hpp>
#include <boost/archive/portable_binary_iarchive.hpp>
namespace tools
{
template<class t_object>
bool serialize_obj_to_file(t_object& obj, const std::string& file_path)
{
TRY_ENTRY();
#if defined(_MSC_VER)
// Need to know HANDLE of file to call FlushFileBuffers
HANDLE data_file_handle = ::CreateFile(file_path.c_str(), GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
if (INVALID_HANDLE_VALUE == data_file_handle)
return false;
int data_file_descriptor = _open_osfhandle((intptr_t)data_file_handle, 0);
if (-1 == data_file_descriptor)
{
::CloseHandle(data_file_handle);
return false;
}
const std::unique_ptr<FILE, tools::close_file> data_file_file{_fdopen(data_file_descriptor, "wb")};
if (nullptr == data_file_file)
{
// Call CloseHandle is not necessary
_close(data_file_descriptor);
return false;
}
// HACK: undocumented constructor, this code may not compile
std::ofstream data_file(data_file_file.get());
if (data_file.fail())
{
// Call CloseHandle and _close are not necessary
return false;
}
#else
std::ofstream data_file;
data_file.open(file_path , std::ios_base::binary | std::ios_base::out| std::ios::trunc);
if (data_file.fail())
return false;
#endif
boost::archive::portable_binary_oarchive a(data_file);
a << obj;
if (data_file.fail())
return false;
data_file.flush();
#if defined(_MSC_VER)
// To make sure the file is fully stored on disk
::FlushFileBuffers(data_file_handle);
#endif
return true;
CATCH_ENTRY_L0("serialize_obj_to_file", false);
}
template<class t_object>
bool unserialize_obj_from_file(t_object& obj, const std::string& file_path)
{
TRY_ENTRY();
std::ifstream data_file;
data_file.open( file_path, std::ios_base::binary | std::ios_base::in);
if(data_file.fail())
return false;
try
{
// first try reading in portable mode
boost::archive::portable_binary_iarchive a(data_file);
a >> obj;
}
catch(...)
{
// if failed, try reading in unportable mode
boost::filesystem::copy_file(file_path, file_path + ".unportable", boost::filesystem::copy_option::overwrite_if_exists);
data_file.close();
data_file.open( file_path, std::ios_base::binary | std::ios_base::in);
if(data_file.fail())
return false;
boost::archive::binary_iarchive a(data_file);
a >> obj;
}
return !data_file.fail();
CATCH_ENTRY_L0("unserialize_obj_from_file", false);
}
}
| [
"thaer.khawaja@gmail.com"
] | thaer.khawaja@gmail.com |
baaff0ab8170c53f52c32763f2d4b37a13cf8437 | 8a359cf909f3ed99d0995b190671904c9e9b176e | /SPOJ/TRSTAGE.cpp | b933213772c6d8fa0d992f154cb62044710057a9 | [] | no_license | andreqi/programming | b7249fb5434f964274b9c04da7310a6237799f14 | df01d7cfc1a17e7f7fccf7360a4056c7b5b3e51a | refs/heads/master | 2021-01-15T09:32:22.033834 | 2013-09-12T15:39:39 | 2013-09-12T15:39:39 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,049 | cpp | #include <iostream>
#include <cstdio>
#include <algorithm>
#include <set>
#include <cstring>
#include <cstdlib>
#include <cctype>
#include <map>
#include <string>
#include <sstream>
#include <vector>
#include <queue>
#include <stack>
#include <cmath>
#include <numeric>
#define repn( i , a , b ) for( int i = ( int ) a ; i < ( int ) b ; i ++ )
#define rep( i , n ) repn( i , 0 , n )
#define all( x ) x.begin() , x.end()
#define rall( x ) x.rbegin() , x.rend()
#define mp make_pair
#define fst first
#define snd second
using namespace std;
typedef long long int64;
typedef long double ldouble;
typedef pair< int , int > pii;
typedef pair< int , double > node;
int ticket[ 20 ];
node dp[ 1 << 8 ][ 30 ];
int target , t_size ;
vector< int > adj[ 30 ];
vector< int > wei[ 30 ];
node path( int mask, int cur ){
node & ans = dp[ mask ][ cur ];
if( ans.fst != -1 ) return ans;
if( cur == target ) return ans = node( 1 , 0 );
if( mask == 0 ) return ans = node( 0 , 0 );
rep( i , adj[ cur ].size() ){
int nxt = adj[ cur ][ i ];
rep( j , t_size ) if ( ( 1 << j ) & mask ) {
node nxt_ans = path( mask ^ ( 1 << j ) , nxt );
if( not nxt_ans.fst ) continue;
nxt_ans.snd += (double) ( wei[ cur ][ i ] ) / ( double ) ticket[ j ];
if( ans.fst == -1 or ans.snd > nxt_ans.snd ) {
ans = nxt_ans;
}
}
}
if( ans.fst == -1 ) ans = node( 0 , 0 );
return ans;
}
int main(){
int n , m , p , a , b , u , v , w;
while( scanf("%d%d%d%d%d" , & n , &m , &p , & a , &b ) == 5 and n + m + a + b + p ){
target = b - 1;
t_size = n;
rep( i , n ) scanf("%d" , ticket + i ) ;
rep( i , ( 1 << 8 ) ) rep( j , 30 ) dp[ i ][ j ] = node( -1 , 0 );
rep( i , m ) adj[ i ].clear();
rep( i , m ) wei[ i ].clear();
rep( i , p ) {
scanf("%d%d%d" , &u , &v , &w );
u--,v--;
adj[ u ].push_back( v );
adj[ v ].push_back( u );
wei[ u ].push_back( w );
wei[ v ].push_back( w );
}
node ans = path( ( 1 << n ) - 1 , a - 1 );
if( ans.fst == 0 ) printf("Impossible\n");
else printf("%.6lf\n" , ans.snd );
}
return 0;
}
| [
"drol.005@gmail.com"
] | drol.005@gmail.com |
60951403372225d2ec5e5e39ceb571ed8d5a302f | 52bc6ff5ebcfd7e60d8ec06016d2a53295746d54 | /Práctica 5/ejercicio5/include/MatrizDispersa.h | aedc72c142003649cb95a7c23ddc9500a45d6127 | [] | no_license | DavidGmezHdez/MP | 24e818377a9c8a51d4d878e5bd628c2224b25e4b | cbc6d34893ef40cfe43d53fa8aea537534315203 | refs/heads/master | 2020-04-27T17:09:07.712164 | 2019-05-22T14:08:47 | 2019-05-22T14:08:47 | 174,506,532 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,696 | h | /**
* @author Luis Miguel Aguilar González
* @author David Gómez Hernández
*/
#ifndef MATRIZDISPERSA_H
#define MATRIZDISPERSA_H
#include <iostream>
#include "Valor.h"
class MatrizDispersa{
private:
int nfilas;
int ncolumnas;
Valor *valores;
int numeroValores;
public:
/**
* @brief Constructor de la clase por parámetros
* @param filas tamaño en filas de la matriz dispersa
* @param columnas tamaño en columnas de la matriz dispersa
* param nvalores tamaño del array de valores
*/
MatrizDispersa(int filas, int columnas, int nvalores);
/**
* @brief destructor de la clase
*/
~MatrizDispersa();
/**
* @brief Constructor copia de la clase
* @param Objeto de la clase MatrizDispersa a copiar
*/
MatrizDispersa(const MatrizDispersa &matriz);
/**
* @brief Constructor de la clase por parámetros
* @param filas array de filas
* @param utilfilas tamaño en filas de la matriz dispersa
* @param columnas array de columnas
* @param utilcols tamaño en columnas de la matriz dispersa
* @param valores array de valores
* param utilval tamaño del array de valores
*/
MatrizDispersa(int *filas,int utilfilas,int *columnas,int utilcols, double *valores,int utilval);
/**
* @brief Método que devuelve el valor en función de la fila y columna de la matriz. Si en el array de valores hay
* algún Valor con esa fila y columna, devuelve ese valor, si no, devuelve un Valor con su valor 0
* @param posfila la fila en la que se encuentra el elemento
* @param poscolumna la columna en la que se encuentra el elemento
* @return El valor en función de si existe en el array o no.
*/
Valor devolverValor(int posfila, int poscolumna);
/**
* @brief Método para mostrar la matriz por consola
*/
void mostrarMatiz();
/**
* @brief suma dos matrices sumando sus valores si se encuentran en la misma posición
* @param Objeto de la clase MatrizDispersa con el que sumar
* @return Devuelve el objeto de la clase MatrizDispersa resultado
*/
MatrizDispersa operator +(const MatrizDispersa &matriz );
/**
* @brief Iguala una matriz a otra
* @param Objeto de la clase MatrizDispersa con el que igualar
* @return Devuelve el objeto de la clase MatrizDispersa resultado
*/
MatrizDispersa operator=(const MatrizDispersa &matriz);
};
#endif | [
"davidgmezhdez@gmail.com"
] | davidgmezhdez@gmail.com |
0b2eaeccac303fdece8c119fe35708ed3779ebd2 | 5b1e5f21e3f176b75dfd967bc237f99beb98f27c | /src/resource/ResourceManager.h | 22b07ce82e601e00f590907b19bea9f9d15e6698 | [
"MIT"
] | permissive | JaCzekanski/crane | 2ce67c20d9825dd5275355169c496f749fdbfaf7 | bb47b94790cfbbce9de25122aa8cb2d617e74e4b | refs/heads/master | 2020-03-17T07:00:09.913046 | 2018-05-14T14:57:18 | 2018-05-14T15:32:41 | 133,378,228 | 2 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 2,304 | h | #pragma once
#include <unordered_map>
#include <memory>
#include <SDL.h>
#include "texture/Texture.h"
#include "shader\Program.h"
#include "model\Model.h"
#include "../Logger.h"
#include "texture\Texture.h"
#include <sys/types.h>
#include <sys/stat.h>
class ResourceManager
{
private:
const std::string dataFolder = "data";
const std::string programFolder = "shader";
const std::string modelFolder = "model";
const std::string textureFolder = "texture";
std::unordered_map<std::string, std::shared_ptr<Program>> programs;
std::unordered_map<std::string, std::shared_ptr<Model>> models;
std::unordered_map<std::string, std::shared_ptr<Texture>> textures;
bool checkFile(const std::string file);
bool loadProgram(std::string name);
bool loadModel(std::string name);
bool loadTexture(std::string name);
public:
ResourceManager();
~ResourceManager();
std::shared_ptr<Program> getProgram(const std::string& id)
{
auto p = programs.find(id);
if (p == programs.end()) {
if (!loadProgram(id)) {
logger.Error("Cannot load program %s", id.c_str());
programs.emplace(id, std::shared_ptr<Program>(new Program("")));
return programs.find(id)->second; // Return null program
}
logger.Success("Program %s loaded", id.c_str());
return programs.find(id)->second;
}
return p->second;
}
std::shared_ptr<Model> getModel(const std::string& id)
{
auto p = models.find(id);
if (p == models.end()) {
if (!loadModel(id)) {
logger.Error("Cannot load model %s", id.c_str());
models.emplace(id, std::shared_ptr<Model>(new Model("")));
return models.find(id)->second; // Return null model
}
logger.Success("Model %s loaded", id.c_str());
return models.find(id)->second;
}
return p->second;
}
std::shared_ptr<Texture> getTexture(const std::string& id)
{
auto p = textures.find(id);
if (p == textures.end()) {
if (!loadTexture(id)) {
logger.Error("Cannot load texture %s", id.c_str());
textures.emplace(id, std::shared_ptr<Texture>(new Texture("")));
return textures.find(id)->second; // Return null texture (shouldn't crash program)
}
logger.Success("Texture %s loaded", id.c_str());
return textures.find(id)->second;
}
return p->second;
}
void scanAndReload();
};
static ResourceManager resourceManager; | [
"ja.czekanski@gmail.com"
] | ja.czekanski@gmail.com |
476dd1d146503c882379a3de8b91302fb8eb6640 | a084f3a7409206e67177f65cb36a1c9edfcecc39 | /HackerRank/Algorithms/Warmup - Plus Minus.cpp | e18106a121ba658cc0c832083b944bb553395bd7 | [] | no_license | cris-ronaldo7/Competitive-programming | 292d308785a0ac7df91dd33f6a9c8ebdb555b223 | 5a0b98e5207b46597621688bbc32bf48bf8cf315 | refs/heads/master | 2022-12-27T01:37:25.333356 | 2020-10-01T17:36:44 | 2020-10-01T17:36:44 | 299,814,467 | 1 | 1 | null | 2020-10-01T18:48:01 | 2020-09-30T05:08:00 | C++ | UTF-8 | C++ | false | false | 1,632 | cpp | #include <bits/stdc++.h>
using namespace std;
vector<string> split_string(string);
// Complete the plusMinus function below.
void plusMinus(vector<int> arr) {
int i;
float a=0,b=0,c=0;
for(i=0;i<arr.size();i++)
{
if(arr[i]==0)
c++;
else if(arr[i]>0)
a++;
else
b++;
}
a=a/arr.size();
b=b/arr.size();
c=c/arr.size();
cout << fixed << setprecision(6) <<a<<endl;
cout << fixed << setprecision(6) <<b<<endl;
cout << fixed << setprecision(6) <<c<<endl;
}
int main()
{
int n;
cin >> n;
cin.ignore(numeric_limits<streamsize>::max(), '\n');
string arr_temp_temp;
getline(cin, arr_temp_temp);
vector<string> arr_temp = split_string(arr_temp_temp);
vector<int> arr(n);
for (int i = 0; i < n; i++) {
int arr_item = stoi(arr_temp[i]);
arr[i] = arr_item;
}
plusMinus(arr);
return 0;
}
vector<string> split_string(string input_string) {
string::iterator new_end = unique(input_string.begin(), input_string.end(), [] (const char &x, const char &y) {
return x == y and x == ' ';
});
input_string.erase(new_end, input_string.end());
while (input_string[input_string.length() - 1] == ' ') {
input_string.pop_back();
}
vector<string> splits;
char delimiter = ' ';
size_t i = 0;
size_t pos = input_string.find(delimiter);
while (pos != string::npos) {
splits.push_back(input_string.substr(i, pos - i));
i = pos + 1;
pos = input_string.find(delimiter, i);
}
splits.push_back(input_string.substr(i, min(pos, input_string.length()) - i + 1));
return splits;
} | [
"007sauravsoni@gmail.com"
] | 007sauravsoni@gmail.com |
c85d51313bbda7b023f86fdf62f962a62f21ee81 | f83ef53177180ebfeb5a3e230aa29794f52ce1fc | /opencv/opencv-3.4.2/modules/core/perf/perf_norm.cpp | 666a17eb05662c04cb58218c4959f7312bc89922 | [
"BSD-3-Clause",
"Apache-2.0"
] | permissive | msrLi/portingSources | fe7528b3fd08eed4a1b41383c88ee5c09c2294ef | 57d561730ab27804a3172b33807f2bffbc9e52ae | refs/heads/master | 2021-07-08T01:22:29.604203 | 2019-07-10T13:07:06 | 2019-07-10T13:07:06 | 196,183,165 | 2 | 1 | Apache-2.0 | 2020-10-13T14:30:53 | 2019-07-10T10:16:46 | null | UTF-8 | C++ | false | false | 7,091 | cpp | #include "perf_precomp.hpp"
namespace opencv_test
{
using namespace perf;
#define HAMMING_NORM_SIZES cv::Size(640, 480), cv::Size(1920, 1080)
#define HAMMING_NORM_TYPES CV_8UC1
CV_FLAGS(NormType, NORM_HAMMING2, NORM_HAMMING, NORM_INF, NORM_L1, NORM_L2, NORM_TYPE_MASK, NORM_RELATIVE, NORM_MINMAX)
typedef tuple<Size, MatType, NormType> Size_MatType_NormType_t;
typedef perf::TestBaseWithParam<Size_MatType_NormType_t> Size_MatType_NormType;
PERF_TEST_P(Size_MatType_NormType, norm,
testing::Combine(
testing::Values(TYPICAL_MAT_SIZES),
testing::Values(TYPICAL_MAT_TYPES),
testing::Values((int)NORM_INF, (int)NORM_L1, (int)NORM_L2)
)
)
{
Size sz = get<0>(GetParam());
int matType = get<1>(GetParam());
int normType = get<2>(GetParam());
Mat src(sz, matType);
double n;
declare.in(src, WARMUP_RNG);
TEST_CYCLE() n = cv::norm(src, normType);
SANITY_CHECK(n, 1e-6, ERROR_RELATIVE);
}
PERF_TEST_P(Size_MatType_NormType, norm_mask,
testing::Combine(
testing::Values(TYPICAL_MAT_SIZES),
testing::Values(TYPICAL_MAT_TYPES),
testing::Values((int)NORM_INF, (int)NORM_L1, (int)NORM_L2)
)
)
{
Size sz = get<0>(GetParam());
int matType = get<1>(GetParam());
int normType = get<2>(GetParam());
Mat src(sz, matType);
Mat mask = Mat::ones(sz, CV_8U);
double n;
declare.in(src, WARMUP_RNG).in(mask);
TEST_CYCLE() n = cv::norm(src, normType, mask);
SANITY_CHECK(n, 1e-6, ERROR_RELATIVE);
}
PERF_TEST_P(Size_MatType_NormType, norm2,
testing::Combine(
testing::Values(TYPICAL_MAT_SIZES),
testing::Values(TYPICAL_MAT_TYPES),
testing::Values((int)NORM_INF, (int)NORM_L1, (int)NORM_L2, (int)(NORM_RELATIVE+NORM_INF), (int)(NORM_RELATIVE+NORM_L1), (int)(NORM_RELATIVE+NORM_L2))
)
)
{
Size sz = get<0>(GetParam());
int matType = get<1>(GetParam());
int normType = get<2>(GetParam());
Mat src1(sz, matType);
Mat src2(sz, matType);
double n;
declare.in(src1, src2, WARMUP_RNG);
TEST_CYCLE() n = cv::norm(src1, src2, normType);
SANITY_CHECK(n, 1e-5, ERROR_RELATIVE);
}
PERF_TEST_P(Size_MatType_NormType, norm2_mask,
testing::Combine(
testing::Values(TYPICAL_MAT_SIZES),
testing::Values(TYPICAL_MAT_TYPES),
testing::Values((int)NORM_INF, (int)NORM_L1, (int)NORM_L2, (int)(NORM_RELATIVE|NORM_INF), (int)(NORM_RELATIVE|NORM_L1), (int)(NORM_RELATIVE|NORM_L2))
)
)
{
Size sz = get<0>(GetParam());
int matType = get<1>(GetParam());
int normType = get<2>(GetParam());
Mat src1(sz, matType);
Mat src2(sz, matType);
Mat mask = Mat::ones(sz, CV_8U);
double n;
declare.in(src1, src2, WARMUP_RNG).in(mask);
TEST_CYCLE() n = cv::norm(src1, src2, normType, mask);
SANITY_CHECK(n, 1e-5, ERROR_RELATIVE);
}
namespace {
typedef tuple<NormType, MatType, Size> PerfHamming_t;
typedef perf::TestBaseWithParam<PerfHamming_t> PerfHamming;
PERF_TEST_P(PerfHamming, norm,
testing::Combine(
testing::Values(NORM_HAMMING, NORM_HAMMING2),
testing::Values(HAMMING_NORM_TYPES),
testing::Values(HAMMING_NORM_SIZES)
)
)
{
Size sz = get<2>(GetParam());
int matType = get<1>(GetParam());
int normType = get<0>(GetParam());
Mat src(sz, matType);
double n;
declare.in(src, WARMUP_RNG);
TEST_CYCLE() n = cv::norm(src, normType);
(void)n;
SANITY_CHECK_NOTHING();
}
PERF_TEST_P(PerfHamming, norm2,
testing::Combine(
testing::Values(NORM_HAMMING, NORM_HAMMING2),
testing::Values(HAMMING_NORM_TYPES),
testing::Values(HAMMING_NORM_SIZES)
)
)
{
Size sz = get<2>(GetParam());
int matType = get<1>(GetParam());
int normType = get<0>(GetParam());
Mat src1(sz, matType);
Mat src2(sz, matType);
double n;
declare.in(src1, src2, WARMUP_RNG);
TEST_CYCLE() n = cv::norm(src1, src2, normType);
(void)n;
SANITY_CHECK_NOTHING();
}
}
PERF_TEST_P(Size_MatType_NormType, normalize,
testing::Combine(
testing::Values(TYPICAL_MAT_SIZES),
testing::Values(TYPICAL_MAT_TYPES),
testing::Values((int)NORM_INF, (int)NORM_L1, (int)NORM_L2)
)
)
{
Size sz = get<0>(GetParam());
int matType = get<1>(GetParam());
int normType = get<2>(GetParam());
Mat src(sz, matType);
Mat dst(sz, matType);
double alpha = 100.;
if(normType==NORM_L1) alpha = (double)src.total() * src.channels();
if(normType==NORM_L2) alpha = (double)src.total()/10;
declare.in(src, WARMUP_RNG).out(dst);
TEST_CYCLE() cv::normalize(src, dst, alpha, 0., normType);
SANITY_CHECK(dst, 1e-6);
}
PERF_TEST_P(Size_MatType_NormType, normalize_mask,
testing::Combine(
testing::Values(::perf::szVGA, ::perf::sz1080p),
testing::Values(TYPICAL_MAT_TYPES),
testing::Values((int)NORM_INF, (int)NORM_L1, (int)NORM_L2)
)
)
{
Size sz = get<0>(GetParam());
int matType = get<1>(GetParam());
int normType = get<2>(GetParam());
Mat src(sz, matType);
Mat dst(sz, matType);
Mat mask = Mat::ones(sz, CV_8U);
double alpha = 100.;
if(normType==NORM_L1) alpha = (double)src.total() * src.channels();
if(normType==NORM_L2) alpha = (double)src.total()/10;
declare.in(src, WARMUP_RNG).in(mask).out(dst);
declare.time(100);
TEST_CYCLE() cv::normalize(src, dst, alpha, 0., normType, -1, mask);
SANITY_CHECK(dst, 1e-6);
}
PERF_TEST_P(Size_MatType_NormType, normalize_32f,
testing::Combine(
testing::Values(TYPICAL_MAT_SIZES),
testing::Values(TYPICAL_MAT_TYPES),
testing::Values((int)NORM_INF, (int)NORM_L1, (int)NORM_L2)
)
)
{
Size sz = get<0>(GetParam());
int matType = get<1>(GetParam());
int normType = get<2>(GetParam());
Mat src(sz, matType);
Mat dst(sz, CV_32F);
double alpha = 100.;
if(normType==NORM_L1) alpha = (double)src.total() * src.channels();
if(normType==NORM_L2) alpha = (double)src.total()/10;
declare.in(src, WARMUP_RNG).out(dst);
TEST_CYCLE() cv::normalize(src, dst, alpha, 0., normType, CV_32F);
SANITY_CHECK(dst, 1e-6, ERROR_RELATIVE);
}
PERF_TEST_P( Size_MatType, normalize_minmax, TYPICAL_MATS )
{
Size sz = get<0>(GetParam());
int matType = get<1>(GetParam());
Mat src(sz, matType);
Mat dst(sz, matType);
declare.in(src, WARMUP_RNG).out(dst);
declare.time(30);
TEST_CYCLE() cv::normalize(src, dst, 20., 100., NORM_MINMAX);
SANITY_CHECK(dst, 1e-6, ERROR_RELATIVE);
}
} // namespace
| [
"lihuibin705@163.com"
] | lihuibin705@163.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.