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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
dfad83227b312de8302c16b7454481069efe6b79 | c2a4d5d8f15e289463d5e0cf58fdae9db776416b | /caffe_3d/src/caffe/layers/reduction_layer.cpp | 8ae6329ebe404a7887282d963ce1efa096284724 | [
"LicenseRef-scancode-generic-cla",
"BSD-2-Clause",
"MIT"
] | permissive | wzmsltw/ECO-efficient-video-understanding | 412310c114f58765cf775df8e141d3adcb69aa58 | 465e3af0c187d8f6c77651a5c6ad599bb4cfc466 | refs/heads/master | 2020-03-24T19:56:55.212935 | 2018-07-30T16:26:31 | 2018-07-30T16:26:31 | 142,951,813 | 2 | 1 | MIT | 2018-07-31T02:28:09 | 2018-07-31T02:28:09 | null | UTF-8 | C++ | false | false | 4,364 | cpp | #include <algorithm>
#include <cfloat>
#include <vector>
#include "caffe/layer.hpp"
#include "caffe/util/math_functions.hpp"
#include "caffe/vision_layers.hpp"
namespace caffe {
template <typename Dtype>
void ReductionLayer<Dtype>::LayerSetUp(const vector<Blob<Dtype>*>& bottom,
const vector<Blob<Dtype>*>& top) {
op_ = this->layer_param_.reduction_param().operation();
}
template <typename Dtype>
void ReductionLayer<Dtype>::Reshape(const vector<Blob<Dtype>*>& bottom,
const vector<Blob<Dtype>*>& top) {
axis_ = bottom[0]->CanonicalAxisIndex(
this->layer_param_.reduction_param().axis());
// In the output, we'll keep all axes up to the reduction axis, but
// throw away any after that.
// Note: currently reducing along non-tail axes is not supported; otherwise,
// we'd need to also copy any axes following an "end_axis".
vector<int> top_shape(bottom[0]->shape().begin(),
bottom[0]->shape().begin() + axis_);
top[0]->Reshape(top_shape);
num_ = bottom[0]->count(0, axis_);
dim_ = bottom[0]->count(axis_);
CHECK_EQ(num_, top[0]->count());
if (op_ == ReductionParameter_ReductionOp_SUM ||
op_ == ReductionParameter_ReductionOp_MEAN) {
vector<int> sum_mult_shape(1, dim_);
sum_multiplier_.Reshape(sum_mult_shape);
caffe_set(dim_, Dtype(1), sum_multiplier_.mutable_cpu_data());
}
coeff_ = this->layer_param().reduction_param().coeff();
if (op_ == ReductionParameter_ReductionOp_MEAN) {
coeff_ /= dim_;
}
}
template <typename Dtype>
void ReductionLayer<Dtype>::Forward_cpu(
const vector<Blob<Dtype>*>& bottom, const vector<Blob<Dtype>*>& top) {
const Dtype* bottom_data = bottom[0]->cpu_data();
const Dtype* mult_data = NULL;
if (sum_multiplier_.count() > 0) {
mult_data = sum_multiplier_.cpu_data();
}
Dtype* top_data = top[0]->mutable_cpu_data();
for (int i = 0; i < num_; ++i) {
switch (op_) {
case ReductionParameter_ReductionOp_SUM:
case ReductionParameter_ReductionOp_MEAN:
*top_data = caffe_cpu_dot(dim_, mult_data, bottom_data);
break;
case ReductionParameter_ReductionOp_ASUM:
*top_data = caffe_cpu_asum(dim_, bottom_data);
break;
case ReductionParameter_ReductionOp_SUMSQ:
*top_data = caffe_cpu_dot(dim_, bottom_data, bottom_data);
break;
default:
LOG(FATAL) << "Unknown reduction op: "
<< ReductionParameter_ReductionOp_Name(op_);
}
bottom_data += dim_;
++top_data;
}
if (coeff_ != Dtype(1)) {
// Reset the top_data pointer.
top_data = top[0]->mutable_cpu_data();
caffe_scal(num_, coeff_, top_data);
}
}
template <typename Dtype>
void ReductionLayer<Dtype>::Backward_cpu(const vector<Blob<Dtype>*>& top,
const vector<bool>& propagate_down, const vector<Blob<Dtype>*>& bottom) {
if (!propagate_down[0]) { return; }
// Get bottom_data, if needed.
const Dtype* bottom_data = NULL;
switch (op_) {
// Operations that don't need bottom_data
case ReductionParameter_ReductionOp_SUM:
case ReductionParameter_ReductionOp_MEAN:
break;
// Operations that need bottom_data
case ReductionParameter_ReductionOp_ASUM:
case ReductionParameter_ReductionOp_SUMSQ:
bottom_data = bottom[0]->cpu_data();
break;
default:
LOG(FATAL) << "Unknown reduction op: "
<< ReductionParameter_ReductionOp_Name(op_);
}
const Dtype* top_diff = top[0]->cpu_diff();
Dtype* bottom_diff = bottom[0]->mutable_cpu_diff();
for (int i = 0; i < num_; ++i) {
const Dtype bottom_coeff = (*top_diff) * coeff_;
switch (op_) {
case ReductionParameter_ReductionOp_SUM:
case ReductionParameter_ReductionOp_MEAN:
caffe_set(dim_, bottom_coeff, bottom_diff);
break;
case ReductionParameter_ReductionOp_ASUM:
caffe_cpu_sign(dim_, bottom_data, bottom_diff);
caffe_scal(dim_, bottom_coeff, bottom_diff);
break;
case ReductionParameter_ReductionOp_SUMSQ:
caffe_cpu_scale(dim_, 2 * bottom_coeff, bottom_data, bottom_diff);
break;
default:
LOG(FATAL) << "Unknown reduction op: "
<< ReductionParameter_ReductionOp_Name(op_);
}
bottom_data += dim_;
bottom_diff += dim_;
++top_diff;
}
}
#ifdef CPU_ONLY
STUB_GPU(ReductionLayer);
#endif
INSTANTIATE_CLASS(ReductionLayer);
REGISTER_LAYER_CLASS(Reduction);
} // namespace caffe
| [
"zolfagha@bret.informatik.uni-freiburg.de"
] | zolfagha@bret.informatik.uni-freiburg.de |
05862f75c2ed2cb5193a638ee5deb9d1f05ef821 | dc61e8c951f9e91930c2edff8a53c32d7a99bb94 | /modules/base/processors/imagesourceseries.cpp | 31469fa2d2743e2cf4d5a00e58988f97662790b2 | [
"BSD-2-Clause"
] | permissive | johti626/inviwo | d4b2766742522d3c8d57c894a60e345ec35beafc | c429a15b972715157b99f3686b05d581d3e89e92 | refs/heads/master | 2021-01-17T08:14:10.118104 | 2016-05-25T14:38:33 | 2016-05-25T14:46:31 | 31,444,269 | 2 | 0 | null | 2015-02-27T23:45:02 | 2015-02-27T23:45:01 | null | UTF-8 | C++ | false | false | 6,969 | cpp | /*********************************************************************************
*
* Inviwo - Interactive Visualization Workshop
*
* Copyright (c) 2013-2015 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.
*
*********************************************************************************/
#include "imagesourceseries.h"
#include <inviwo/core/common/inviwoapplication.h>
#include <inviwo/core/datastructures/image/imagedisk.h>
#include <inviwo/core/datastructures/image/layerdisk.h>
#include <inviwo/core/datastructures/image/imageram.h>
#include <inviwo/core/io/datareaderfactory.h>
#include <inviwo/core/util/filesystem.h>
#include <inviwo/core/io/datareaderexception.h>
namespace inviwo {
const ProcessorInfo ImageSourceSeries::processorInfo_{
"org.inviwo.ImageSourceSeries", // Class identifier
"Image Series Source", // Display name
"Data Input", // Category
CodeState::Experimental, // Code state
Tags::CPU, // Tags
};
const ProcessorInfo ImageSourceSeries::getProcessorInfo() const { return processorInfo_; }
ImageSourceSeries::ImageSourceSeries()
: Processor()
, outport_("image.outport", DataVec4UInt8::get(), false)
, findFilesButton_("findFiles", "Update File List")
, imageFileDirectory_("imageFileDirectory", "Image file directory", "",
filesystem::getPath(PathType::Images, "/images"))
, currentImageIndex_("currentImageIndex", "Image index", 1, 1, 1, 1)
, imageFileName_("imageFileName", "Image file name") {
addPort(outport_);
addProperty(imageFileDirectory_);
addProperty(findFilesButton_);
addProperty(currentImageIndex_);
addProperty(imageFileName_);
validExtensions_ =
InviwoApplication::getPtr()->getDataReaderFactory()->getExtensionsForType<Layer>();
imageFileDirectory_.onChange([&]() { onFindFiles(); });
findFilesButton_.onChange([&]() { onFindFiles(); });
imageFileName_.setReadOnly(true);
onFindFiles();
}
void ImageSourceSeries::onFindFiles() {
std::string path{imageFileDirectory_.get()};
if (!path.empty()) {
std::vector<std::string> files = filesystem::getDirectoryContents(path);
fileList_.clear();
for (std::size_t i = 0; i < files.size(); i++) {
if (isValidImageFile(files[i])) {
std::string fileName = filesystem::getFileNameWithExtension(files[i]);
fileList_.push_back(fileName);
}
}
if (fileList_.empty()) {
LogWarn("No images found in \"" << imageFileDirectory_.get() << "\"");
}
}
updateProperties();
}
/**
* Creates a ImageDisk representation if there isn't an object already defined.
**/
void ImageSourceSeries::process() {
if (fileList_.empty()) return;
std::string basePath{imageFileDirectory_.get()};
long currentIndex = currentImageIndex_.get() - 1;
if ((currentIndex < 0) || (currentIndex >= static_cast<long>(fileList_.size()))) {
LogError("Invalid image index. Exceeded number of files.");
return;
}
std::string currentFileName{basePath + "/" + fileList_[currentIndex]};
imageFileName_.set(fileList_[currentIndex]);
std::string fileExtension = filesystem::getFileExtension(currentFileName);
auto factory = getNetwork()->getApplication()->getDataReaderFactory();
if (auto reader = factory->getReaderForTypeAndExtension<Layer>(fileExtension)) {
try {
auto outLayer = reader->readData(currentFileName);
// Call getRepresentation here to force read a ram representation.
// Otherwise the default image size, i.e. 256x265, will be reported
// until you do the conversion. Since the LayerDisk does not have any metadata.
auto ram = outLayer->getRepresentation<LayerRAM>();
// Hack needs to set format here since LayerDisk does not have a format.
outLayer->setDataFormat(ram->getDataFormat());
auto outImage = std::make_shared<Image>(outLayer);
outImage->getRepresentation<ImageRAM>();
outport_.setData(outImage);
} catch (DataReaderException const& e) {
util::log(e.getContext(),
"Could not load data: " + imageFileName_.get() + ", " + e.getMessage(),
LogLevel::Error);
}
} else {
LogWarn("Could not find a data reader for file: " << currentFileName);
// remove file from list
fileList_.erase(fileList_.begin() + currentIndex);
// adjust index property
updateProperties();
}
}
void ImageSourceSeries::updateProperties() {
currentImageIndex_.setReadOnly(fileList_.empty());
if (fileList_.size() < static_cast<std::size_t>(currentImageIndex_.get()))
currentImageIndex_.set(1);
// clamp the number of files since setting the maximum to 0 will reset the min value to 0
int numFiles = std::max(static_cast<const int>(fileList_.size()), 1);
currentImageIndex_.setMaxValue(numFiles);
updateFileName();
}
void ImageSourceSeries::updateFileName() {
int index = currentImageIndex_.get() - 1;
if ((index < 0) || (static_cast<std::size_t>(index) >= fileList_.size())) {
imageFileName_.set("<no images found>");
} else {
imageFileName_.set(fileList_[index]);
}
}
bool ImageSourceSeries::isValidImageFile(std::string fileName) {
std::string fileExtension = filesystem::getFileExtension(fileName);
return util::contains_if(validExtensions_, [&](const FileExtension& f){
return f.extension_ == fileExtension;});
}
} // namespace
| [
"eriksunden85@gmail.com"
] | eriksunden85@gmail.com |
0ec479b4ef95ec1e1741ce8fd6428f31692b01a5 | 2e181d44cce9a3dadb75c815a2f73d237eaa28d9 | /color.h | eecb54267edddeb5784ebd7119c6d9142c5800ee | [] | no_license | vache/CataMapMaker | b42c2c2593495ab2c966b69a6484d731bfde20ff | d7f55c6a892fbd6f69600002fb94de0deeae9144 | refs/heads/master | 2021-01-25T12:08:41.471668 | 2013-10-14T02:42:26 | 2013-10-14T02:42:26 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 5,663 | h | #ifndef _COLOR_H_
#define _COLOR_H_
#ifndef _COLOR_LIST_
#define _COLOR_LIST_
#include "cursesdef.h"
#include <string>
void init_colors();
enum col_attribute {
WA_NULL = 0,
HI = 1,
INV = 2
};
enum nc_color {
c_black = COLOR_PAIR(30),
c_white = COLOR_PAIR(1) | A_BOLD,
c_ltgray = COLOR_PAIR(1),
c_dkgray = COLOR_PAIR(30) | A_BOLD,
c_red = COLOR_PAIR(2),
c_green = COLOR_PAIR(3),
c_blue = COLOR_PAIR(4),
c_cyan = COLOR_PAIR(5),
c_magenta = COLOR_PAIR(6),
c_brown = COLOR_PAIR(7),
c_ltred = COLOR_PAIR(2) | A_BOLD,
c_ltgreen = COLOR_PAIR(3) | A_BOLD,
c_ltblue = COLOR_PAIR(4) | A_BOLD,
c_ltcyan = COLOR_PAIR(5) | A_BOLD,
c_pink = COLOR_PAIR(6) | A_BOLD,
c_yellow = COLOR_PAIR(7) | A_BOLD,
h_black = COLOR_PAIR(20),
h_white = COLOR_PAIR(15) | A_BOLD,
h_ltgray = COLOR_PAIR(15),
h_dkgray = COLOR_PAIR(20) | A_BOLD,
h_red = COLOR_PAIR(16),
h_green = COLOR_PAIR(17),
h_blue = COLOR_PAIR(20),
h_cyan = COLOR_PAIR(19),
h_magenta = COLOR_PAIR(21),
h_brown = COLOR_PAIR(22),
h_ltred = COLOR_PAIR(16) | A_BOLD,
h_ltgreen = COLOR_PAIR(17) | A_BOLD,
h_ltblue = COLOR_PAIR(18) | A_BOLD,
h_ltcyan = COLOR_PAIR(19) | A_BOLD,
h_pink = COLOR_PAIR(21) | A_BOLD,
h_yellow = COLOR_PAIR(22) | A_BOLD,
i_black = COLOR_PAIR(30),
i_white = COLOR_PAIR(8) | A_BLINK,
i_ltgray = COLOR_PAIR(8),
i_dkgray = COLOR_PAIR(30) | A_BLINK,
i_red = COLOR_PAIR(9),
i_green = COLOR_PAIR(10),
i_blue = COLOR_PAIR(11),
i_cyan = COLOR_PAIR(12),
i_magenta = COLOR_PAIR(13),
i_brown = COLOR_PAIR(14),
i_ltred = COLOR_PAIR(9) | A_BLINK,
i_ltgreen = COLOR_PAIR(10) | A_BLINK,
i_ltblue = COLOR_PAIR(11) | A_BLINK,
i_ltcyan = COLOR_PAIR(12) | A_BLINK,
i_pink = COLOR_PAIR(13) | A_BLINK,
i_yellow = COLOR_PAIR(14) | A_BLINK,
c_white_red = COLOR_PAIR(23) | A_BOLD,
c_ltgray_red = COLOR_PAIR(23),
c_dkgray_red = COLOR_PAIR(9),
c_red_red = COLOR_PAIR(9),
c_green_red = COLOR_PAIR(25),
c_blue_red = COLOR_PAIR(26),
c_cyan_red = COLOR_PAIR(27),
c_magenta_red = COLOR_PAIR(28),
c_brown_red = COLOR_PAIR(29),
c_ltred_red = COLOR_PAIR(24) | A_BOLD,
c_ltgreen_red = COLOR_PAIR(25) | A_BOLD,
c_ltblue_red = COLOR_PAIR(26) | A_BOLD,
c_ltcyan_red = COLOR_PAIR(27) | A_BOLD,
c_pink_red = COLOR_PAIR(28) | A_BOLD,
c_yellow_red = COLOR_PAIR(29) | A_BOLD,
c_unset = COLOR_PAIR(31),
c_black_white = COLOR_PAIR(32),
c_dkgray_white = COLOR_PAIR(32) | A_BOLD,
c_ltgray_white = COLOR_PAIR(33),
c_white_white = COLOR_PAIR(33) | A_BOLD,
c_red_white = COLOR_PAIR(34),
c_ltred_white = COLOR_PAIR(34) | A_BOLD,
c_green_white = COLOR_PAIR(35),
c_ltgreen_white = COLOR_PAIR(35) | A_BOLD,
c_brown_white = COLOR_PAIR(36),
c_yellow_white = COLOR_PAIR(36) | A_BOLD,
c_blue_white = COLOR_PAIR(37),
c_ltblue_white = COLOR_PAIR(37) | A_BOLD,
c_magenta_white = COLOR_PAIR(38),
c_pink_white = COLOR_PAIR(38) | A_BOLD,
c_cyan_white = COLOR_PAIR(39),
c_ltcyan_white = COLOR_PAIR(39) | A_BOLD,
c_black_green = COLOR_PAIR(40),
c_dkgray_green = COLOR_PAIR(40) | A_BOLD,
c_ltgray_green = COLOR_PAIR(41),
c_white_green = COLOR_PAIR(41) | A_BOLD,
c_red_green = COLOR_PAIR(42),
c_ltred_green = COLOR_PAIR(42) | A_BOLD,
c_green_green = COLOR_PAIR(43),
c_ltgreen_green = COLOR_PAIR(43) | A_BOLD,
c_brown_green = COLOR_PAIR(44),
c_yellow_green = COLOR_PAIR(44) | A_BOLD,
c_blue_green = COLOR_PAIR(45),
c_ltblue_green = COLOR_PAIR(45) | A_BOLD,
c_magenta_green = COLOR_PAIR(46),
c_pink_green = COLOR_PAIR(46) | A_BOLD,
c_cyan_green = COLOR_PAIR(47),
c_ltcyan_green = COLOR_PAIR(47) | A_BOLD,
c_black_yellow = COLOR_PAIR(48),
c_dkgray_yellow = COLOR_PAIR(48) | A_BOLD,
c_ltgray_yellow = COLOR_PAIR(49),
c_white_yellow = COLOR_PAIR(49) | A_BOLD,
c_red_yellow = COLOR_PAIR(50),
c_ltred_yellow = COLOR_PAIR(50) | A_BOLD,
c_green_yellow = COLOR_PAIR(51),
c_ltgreen_yellow = COLOR_PAIR(51) | A_BOLD,
c_brown_yellow = COLOR_PAIR(52),
c_yellow_yellow = COLOR_PAIR(52) | A_BOLD,
c_blue_yellow = COLOR_PAIR(53),
c_ltblue_yellow = COLOR_PAIR(53) | A_BOLD,
c_magenta_yellow = COLOR_PAIR(54),
c_pink_yellow = COLOR_PAIR(54) | A_BOLD,
c_cyan_yellow = COLOR_PAIR(55),
c_ltcyan_yellow = COLOR_PAIR(55) | A_BOLD,
c_black_magenta = COLOR_PAIR(56),
c_dkgray_magenta = COLOR_PAIR(56) | A_BOLD,
c_ltgray_magenta = COLOR_PAIR(57),
c_white_magenta = COLOR_PAIR(57) | A_BOLD,
c_red_magenta = COLOR_PAIR(58),
c_ltred_magenta = COLOR_PAIR(58) | A_BOLD,
c_green_magenta = COLOR_PAIR(59),
c_ltgreen_magenta = COLOR_PAIR(59) | A_BOLD,
c_brown_magenta = COLOR_PAIR(60),
c_yellow_magenta = COLOR_PAIR(60) | A_BOLD,
c_blue_magenta = COLOR_PAIR(61),
c_ltblue_magenta = COLOR_PAIR(61) | A_BOLD,
c_magenta_magenta = COLOR_PAIR(62),
c_pink_magenta = COLOR_PAIR(62) | A_BOLD,
c_cyan_magenta = COLOR_PAIR(63),
c_ltcyan_magenta = COLOR_PAIR(63) | A_BOLD,
c_black_cyan = COLOR_PAIR(64),
c_dkgray_cyan = COLOR_PAIR(64) | A_BOLD,
c_ltgray_cyan = COLOR_PAIR(65),
c_white_cyan = COLOR_PAIR(65) | A_BOLD,
c_red_cyan = COLOR_PAIR(66),
c_ltred_cyan = COLOR_PAIR(66) | A_BOLD,
c_green_cyan = COLOR_PAIR(67),
c_ltgreen_cyan = COLOR_PAIR(67) | A_BOLD,
c_brown_cyan = COLOR_PAIR(68),
c_yellow_cyan = COLOR_PAIR(68) | A_BOLD,
c_blue_cyan = COLOR_PAIR(69),
c_ltblue_cyan = COLOR_PAIR(69) | A_BOLD,
c_magenta_cyan = COLOR_PAIR(70),
c_pink_cyan = COLOR_PAIR(70) | A_BOLD,
c_cyan_cyan = COLOR_PAIR(71),
c_ltcyan_cyan = COLOR_PAIR(71) | A_BOLD
};
int color_to_int(nc_color col);
nc_color int_to_color(int key);
nc_color color_from_string(std::string color);
void setattr(nc_color &col, col_attribute attr);
#endif
#endif
| [
"patrickegilbert@gmail.com"
] | patrickegilbert@gmail.com |
01b4e1f081dc4d633a8c655babee34f1123f3f9d | 86b5b0f6335f4b3b78e9c2def1135b503c7c528d | /Л.Р 21 (5к)/Л.Р 21 (5к)/Triad.h | bd3966f3196af319fe633a34c296a2d2f4c98027 | [] | no_license | Yzpoo/Labs_PSTU | 7ddd8691f33954817bfbcd4e7e7245b417940dac | ada7cba9672fc0197ae76f3f4745df45adf459b8 | refs/heads/master | 2022-10-05T08:14:05.732998 | 2020-06-05T11:24:49 | 2020-06-05T11:24:49 | 255,867,321 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 687 | h | #pragma once
#include "Object.h"
#include <iostream>
using namespace std;
class Triad :
public Object
{
public:
Triad();
public:
virtual ~Triad();
void Show();
Triad(int, int, int);
Triad(const Triad&);
int Get_First() { return First; }
int Get_Second() { return Second; }
int Get_Third() { return Third; }
void set_First(int);
void set_Second(int);
void set_Third(int);
void Set_FirstPlus();
void Set_SecondPlus();
void Set_ThirdPlus();
Triad& operator=(const Triad& c);
friend istream& operator>>(istream& in, Triad& c);
friend ostream& operator<<(ostream& out, const Triad& c);
protected:
int First;
int Second;
int Third;
};
| [
"noreply@github.com"
] | noreply@github.com |
67fe8c911434f8bcc98df2ed767ba2f644d3dcb3 | fd900bb8f6ab02f7b4a1397ecd5137896c8ff2c6 | /LongestCommonSubsequence.cpp | 8d5b086723503d047ec6392486aa8e054a3ae0ca | [] | no_license | farhad-aman/Algorithms | ff308bcbbcbe82ed0f3cfb7d856d54a52af708b5 | b759829948c0e66f755f99b96cdcc99778a17b29 | refs/heads/master | 2023-02-26T16:51:31.012851 | 2021-02-04T06:42:26 | 2021-02-04T06:42:26 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 809 | cpp | /*
LCS Problem Statement:
Given two sequences,
find the length of longest subsequence present in both of them.
A subsequence is a sequence that appears in the same relative order,
but not necessarily contiguous. For example, “abc”, “abg”, “bdf”, “aeg”, ‘”acefg”, .. etc
are subsequences of “abcdefg”.
So a string of length n has 2^n different possible subsequences.
Link: https://www.geeksforgeeks.org/longest-common-subsequence-dp-4/
*/
#include<bits/stdc++.h>
using namespace std;
const int maxn=2000+10;
int n,m,dp[maxn][maxn];
string s,t;
int32_t main(){
cin>>n>>m;
cin>>s>>t;
for(int i=1;i<=n;i++){
for(int j=1;j<=m;j++){
if(s[i-1]==t[j-1]){
dp[i][j]=dp[i-1][j-1]+1;
}else{
dp[i][j]=max(dp[i-1][j],dp[i][j-1]);
}
}
}
cout<<dp[n][m]<<endl;
} | [
"bigfarhad7780@gmail.com"
] | bigfarhad7780@gmail.com |
78fbd6e0beeb7ec8d200d398be58a630a1ae422f | 66bfa5827cee4f00e3b17fb1b595382893fe8542 | /venus.cs.qc.cuny.edu/~alayev/cs211/code/lecture19/testBinarySearch.cpp | 7e1a247efb725628946dbc1a955b21219aad330b | [] | no_license | brushstrokes/cs211 | 4059f3bd743cf0368fa590fd0852c43201e81c75 | 560d489b994d8403ffa42dda1609580072fa8fae | refs/heads/master | 2020-06-29T02:30:42.932237 | 2019-08-04T01:31:05 | 2019-08-04T01:31:05 | 200,412,361 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,411 | cpp | // testBinarySearch.cpp
#include "functionDemo.h"
#include <cstdio>
#include <string>
const int MAX_LENGTH = 256;
int main(int argc, char* argv[]) {
if (argc < 2) {
cout << "Enter, as command line arguments: "
<< "contents of array, "
<< "then value to search for." << endl;
return 0;
}
int nums[argc-2];
for( int i = 1; i < argc-1; i++)
{
if (!sscanf(argv[i], "%d", nums + i - 1)) {
cout << "Input error at argument " << i << endl;
return 1;
} // if
} // for i
int toFind;
if (!sscanf(argv[argc-1], "%d", &toFind)) {
cout << "Input error at argument " << (argc-1) << endl;
return 1;
} // if
cout << "Contents of array: ";
for (int j = 0; j < argc-2; j++)
cout << nums[j] << " ";
cout << endl;
for (int j = 0; j < argc-3; j++)
if ( nums[j] > nums[j+1] ) {
cout << "Element at " << j << ", " << nums[j] << ", >"
<< "element at" << (j+1) << ", " << nums[j+1]
<< ". Can't do binary search." << endl;
return 1;
} // if
int index = binarySearch(nums, toFind, 0, argc - 2);
if ( index == -1 )
cout << toFind << " was not found.";
else
cout << toFind << " was found at " << index;
cout << endl;
return 0;
} // function main
| [
"gil.s4@outlook.com"
] | gil.s4@outlook.com |
f39b7b548383207104048d70d00a28d60c88d5dd | 1ac73f06240f625923c36f6b94c35b94eff19867 | /Server/Server/P2PServer.cpp | 821677acfc9ce7b01ab45a82b17ba1d91f7476a9 | [] | no_license | MingxinChen/Pharos-windows | 42741af7dd83c86ab21fcacdf6e84850af0f0500 | badcac8ef3020e1198cbd57d47122650cd5b5ab7 | refs/heads/master | 2020-03-27T20:07:22.691387 | 2018-09-02T00:16:22 | 2018-09-02T00:16:22 | 147,040,693 | 0 | 0 | null | null | null | null | GB18030 | C++ | false | false | 10,423 | cpp | /********************************************************************
created: 2006/08/11
filename: P2PServer.cpp
author: 李创
http://www.cppblog.com/converse/
purpose:
*********************************************************************/
#include <Winsock2.h>
#include <assert.h>
#include <stdio.h>
#include <ctime>
#include <string.h>
#include "P2PServer.h"
P2PServer::P2PServer()
: m_sSocket(INVALID_SOCKET)
, m_hThread(NULL)
{
// 初始化占用的roomid
memset(roomIdOccupy, false, 10000);
Initialize();
}
P2PServer::~P2PServer()
{
printf("P2P Server shutdown. \n");
// 通知接收线程退出
if (m_hThread != NULL)
{
::WaitForSingleObject(m_hThread, 300);
::CloseHandle(m_hThread);
}
if (INVALID_SOCKET != m_sSocket)
{
::closesocket(m_sSocket);
}
::DeleteCriticalSection(&m_PeerListLock);
::WSACleanup();
}
bool P2PServer::Initialize()
{
if (INVALID_SOCKET != m_sSocket)
{
printf("Error: Socket Already Been Initialized!\n");
return false;
}
// 初始化WS2_32.dll
WSADATA wsaData;
WORD sockVersion = MAKEWORD(2, 2);
if (::WSAStartup(sockVersion, &wsaData) != 0)
{
printf("Error: Initialize WS2_32.dll Failed!\n");
exit(-1);
}
// 创建Socket
m_sSocket = ::WSASocketW(AF_INET, SOCK_DGRAM, IPPROTO_UDP, NULL, 0, WSA_FLAG_OVERLAPPED);
if (INVALID_SOCKET == m_sSocket)
{
printf("Error: Initialize Socket Failed!\n");
return false;
}
//
sockaddr_in sockAddr = { 0 };
sockAddr.sin_family = AF_INET;
sockAddr.sin_addr.S_un.S_addr = INADDR_ANY;
sockAddr.sin_port = htons(SERVER_PORT);
if (SOCKET_ERROR == (::bind(m_sSocket, (sockaddr*)(&sockAddr), sizeof(sockaddr_in))))
{
printf("Error: Bind Socket Failed!\n");
::closesocket(m_sSocket);
return false;
}
//
char szHostName[256];
::gethostname(szHostName, 256);
hostent* pHost = ::gethostbyname(szHostName);
in_addr addr;
char *p;
for (int i = 0; ; ++i)
{
p = pHost->h_addr_list[i];
if (NULL == p)
{
break;
}
memcpy(&addr.S_un.S_addr, p, pHost->h_length);
printf("Bind To Local Address -> %s:%ld \n", ::inet_ntoa(addr), SERVER_PORT);
}
// 创建接受线程
if (NULL == (m_hThread = ::CreateThread(NULL, 0, RecvThreadProc, this, 0, NULL)))
{
printf("Error: Create Thread Failed!\n");
return false;
}
// 创建临界区对象
::InitializeCriticalSection(&m_PeerListLock);
printf("P2P Server Running...\n");
return true;
}
bool P2PServer::ProcMsg()
{
int nRet;
while (true)
{
nRet = ::WaitForSingleObject(m_hThread, 1000 * 15);
if (WAIT_TIMEOUT == nRet) // 等待超时
{
DWORD dwTick = ::GetTickCount();
Peer_Info* pPeerInfo;
int nCurrentsize = m_PeerList.GetCurrentSize();
for (int i = 0; i < nCurrentsize; ++i)
{
if (NULL != (pPeerInfo = m_PeerList[i]))
{
if (dwTick - pPeerInfo->dwActiveTime >= 2 * 15 * 1000 + 600)
{
printf("Delete A Non-Active User: %s \n", pPeerInfo->szUserName);
::EnterCriticalSection(&m_PeerListLock);
m_PeerList.DeleteAPeer(pPeerInfo->szUserName);
::LeaveCriticalSection(&m_PeerListLock);
--i;
}
else
{
MSGDef::TMSG_USERACTIVEQUERY tUserActiveQuery;
int nAddrNum = pPeerInfo->nAddrNum - 1;
sockaddr_in peerAddr = { 0 };
peerAddr.sin_family = AF_INET;
peerAddr.sin_addr.S_un.S_addr = pPeerInfo->IPAddr[nAddrNum].dwIP;
peerAddr.sin_port = htons(pPeerInfo->IPAddr[nAddrNum].usPort);
::sendto(m_sSocket, (char*)(&tUserActiveQuery), sizeof(tUserActiveQuery), 0, (sockaddr*)&peerAddr, sizeof(peerAddr));
printf("Sending Active Ack Message To %s (%s:%ld) \n",
tUserActiveQuery.PeerInfo.szUserName, ::inet_ntoa(peerAddr.sin_addr), ntohs(peerAddr.sin_port));
}
}
}
}
else
{
break;
}
}
return true;
}
DWORD WINAPI P2PServer::RecvThreadProc(LPVOID lpParam)
{
P2PServer* pThisP2PServer = (P2PServer*)lpParam;
char szBuff[MAX_PACKET_SIZE];
MSGDef::TMSG_HEADER *pMsgHeader = (MSGDef::TMSG_HEADER *)szBuff;
sockaddr_in remoteAddr;
int nRecv, nAddrLen = sizeof(sockaddr_in);
while (true)
{
nRecv = ::recvfrom(pThisP2PServer->m_sSocket, szBuff, MAX_PACKET_SIZE, 0, (sockaddr*)(&remoteAddr), &nAddrLen);
if (SOCKET_ERROR == nRecv)
{
printf("Error: Receive Message From Client Failed!\n");
continue;
}
switch (pMsgHeader->cMsgID)
{
case MSG_USERLOGIN: // 用户登陆
{
pThisP2PServer->ProcUserLoginMsg(pMsgHeader, remoteAddr);
}
break;
case MSG_GETUSERLIST: // 发出当前的用户列表
{
pThisP2PServer->ProcGetUserListMsg(pMsgHeader, remoteAddr);
}
break;
case MSG_P2PCONNECT: // 有用户请求让另一个用户向它发送打洞消息
{
pThisP2PServer->ProcP2PConnectMsg(pMsgHeader, remoteAddr);
}
break;
case MSG_USERLOGOUT: // 用户退出
{
pThisP2PServer->ProcUserLogoutMsg(pMsgHeader, remoteAddr);
}
break;
case MSG_USERACTIVEQUERY: // 查询用户是否存在的答复
{
pThisP2PServer->ProcUserActiveQueryMsg(pMsgHeader, remoteAddr);
}
break;
case MSG_NEWROOMIDAPPLY: // 查询用户是否存在的答复
{
pThisP2PServer->ProcNewRoomIdApply(pMsgHeader, remoteAddr);
}
break;
}
}
return 0;
}
// 用户登陆
bool P2PServer::ProcUserLoginMsg(MSGDef::TMSG_HEADER *pMsgHeader, const sockaddr_in& remoteAddr)
{
MSGDef::TMSG_USERLOGIN *pUserLogin = (MSGDef::TMSG_USERLOGIN*)pMsgHeader;
int nAddrNum = pUserLogin->PeerInfo.nAddrNum;
// IPAddr数组的最后一个元素保存的是公有的端口和IP地址
pUserLogin->PeerInfo.IPAddr[nAddrNum].dwIP = remoteAddr.sin_addr.S_un.S_addr;
pUserLogin->PeerInfo.IPAddr[nAddrNum].usPort = ntohs(remoteAddr.sin_port);
++pUserLogin->PeerInfo.nAddrNum;
pUserLogin->PeerInfo.dwActiveTime = GetTickCount(); // 登陆的时间为活跃时间
// 检查是否存在该id
Peer_Info* check = m_PeerList.GetAPeer(pUserLogin->PeerInfo.szUserName);
if (check != NULL) {
return false;
}
::EnterCriticalSection(&m_PeerListLock);
bool bRet = m_PeerList.AddPeer(pUserLogin->PeerInfo);
::LeaveCriticalSection(&m_PeerListLock);
if (true == bRet)
{
MSGDef::TMSG_USERLOGACK tMsgUserLogAck(pUserLogin->PeerInfo);
::sendto(m_sSocket, (char*)(&tMsgUserLogAck), sizeof(MSGDef::TMSG_USERLOGACK), 0, (sockaddr*)(&remoteAddr), sizeof(sockaddr_in));
printf("%s Login: (%s:%ld) \n", pUserLogin->PeerInfo.szUserName, ::inet_ntoa(remoteAddr.sin_addr), ntohs(remoteAddr.sin_port));
return true;
}
else
{
return false;
}
}
// 发出当前的用户列表
bool P2PServer::ProcGetUserListMsg(MSGDef::TMSG_HEADER *pMsgHeader, const sockaddr_in& remoteAddr)
{
MSGDef::TMSG_GETUSERLIST *pMsgGetUserList = (MSGDef::TMSG_GETUSERLIST *)pMsgHeader;
printf("Sending User List Information To %s (%s: %ld)...\n",
pMsgGetUserList->PeerInfo.szUserName, ::inet_ntoa(remoteAddr.sin_addr), ::ntohs(remoteAddr.sin_port));
// 把当前用户链表中的用户信息发送出去
for (int i = 0, nPeerListSize = m_PeerList.GetCurrentSize(); i < nPeerListSize; ++i)
{
pMsgGetUserList->PeerInfo = *(m_PeerList[i]);
::sendto(m_sSocket, (char*)(pMsgGetUserList), sizeof(MSGDef::TMSG_GETUSERLIST), 0, (sockaddr*)(&remoteAddr), sizeof(remoteAddr));
}
// 发送结束封包
MSGDef::TMSG_USERLISTCMP tMsgUserListCmp;
::sendto(m_sSocket, (char*)(&tMsgUserListCmp), sizeof(tMsgUserListCmp), 0, (sockaddr*)(&remoteAddr), sizeof(remoteAddr));
return true;
}
// 有用户请求让另一个用户向它发送打洞消息
bool P2PServer::ProcP2PConnectMsg(MSGDef::TMSG_HEADER *pMsgHeader, sockaddr_in& remoteAddr)
{
MSGDef::TMSG_P2PCONNECT* pP2PConnect = (MSGDef::TMSG_P2PCONNECT*)pMsgHeader;
printf("%s Wants To Connect To %s \n", pP2PConnect->PeerInfo.szUserName, pP2PConnect->szUserName);
::EnterCriticalSection(&m_PeerListLock);
Peer_Info* pPeerInfo = m_PeerList.GetAPeer(pP2PConnect->szUserName);
::LeaveCriticalSection(&m_PeerListLock);
if (NULL != pPeerInfo)
{
int nAddrNum = pPeerInfo->nAddrNum;
remoteAddr.sin_addr.S_un.S_addr = pPeerInfo->IPAddr[nAddrNum - 1].dwIP;
remoteAddr.sin_port = htons(pPeerInfo->IPAddr[nAddrNum - 1].usPort);
::sendto(m_sSocket, (char*)(pP2PConnect), sizeof(MSGDef::TMSG_P2PCONNECT), 0, (sockaddr*)(&remoteAddr), sizeof(remoteAddr));
}
return true;
}
// 有用户退出
bool P2PServer::ProcUserLogoutMsg(MSGDef::TMSG_HEADER *pMsgHeader, sockaddr_in& remoteAddr)
{
MSGDef::TMSG_USERLOGOUT *pUserLogout = (MSGDef::TMSG_USERLOGOUT *)pMsgHeader;
::EnterCriticalSection(&m_PeerListLock);
m_PeerList.DeleteAPeer(pUserLogout->PeerInfo.szUserName);
::LeaveCriticalSection(&m_PeerListLock);
printf("%s Logout : (%s:%ld) \n", pUserLogout->PeerInfo.szUserName,
::inet_ntoa(remoteAddr.sin_addr), ntohs(remoteAddr.sin_port));
return true;
}
// 用户对服务器轮询的应答
bool P2PServer::ProcUserActiveQueryMsg(MSGDef::TMSG_HEADER *pMsgHeader, const sockaddr_in& remoteAddr)
{
MSGDef::TMSG_USERACTIVEQUERY *pUserActiveQuery = (MSGDef::TMSG_USERACTIVEQUERY *)pMsgHeader;
printf("Receive Active Ack Message from %s (%s:%ld) \n",
pUserActiveQuery->PeerInfo.szUserName, ::inet_ntoa(remoteAddr.sin_addr), ntohs(remoteAddr.sin_port));
::EnterCriticalSection(&m_PeerListLock);
Peer_Info* pPeerInfo = m_PeerList.GetAPeer(pUserActiveQuery->PeerInfo.szUserName);
// 更新用户的激活时间
if (NULL != pPeerInfo)
{
pPeerInfo->dwActiveTime = ::GetTickCount();
}
::LeaveCriticalSection(&m_PeerListLock);
return true;
}
// 用户申请一个房间id
bool P2PServer::ProcNewRoomIdApply(MSGDef::TMSG_HEADER *pMsgHeader, const sockaddr_in& remoteAddr)
{
srand(time(0));
int temp = rand() % 10000;
while (roomIdOccupy[temp] == true) {
temp = rand() % 10000;
}
roomIdOccupy[temp] = true;
char id[5];
itoa(temp, id, 10);
MSGDef::TMSG_NEWROOMIDAPPLY *pNewRoomIdApply = (MSGDef::TMSG_NEWROOMIDAPPLY *)pMsgHeader;
printf("send roomid[%s] to %s", id, pNewRoomIdApply->PeerInfo.szUserName);
MSGDef::TMSG_NEWROOMIDREPLY tMsgIdReply;
strcpy(tMsgIdReply.roomId, id);
::sendto(m_sSocket, (char*)(&tMsgIdReply), sizeof(tMsgIdReply), 0, (sockaddr*)(&remoteAddr), sizeof(remoteAddr));
return true;
} | [
"noreply@github.com"
] | noreply@github.com |
136ece0ffb9b139b3e308646a9ea45efaac31d39 | 6e4a96db328ae318af1c42435083076cbac594c5 | /openframeworks/addon/ofxGui/ofxGuiObject.cpp | f6a9f42e4e509a59ca4a9befe8898ebf932ab501 | [] | no_license | echa/libopenframeworks | 03c74498fe6c895c8530d435743296cc9dd65efa | 075bf0060137839b71b0e284d90948a02ba3e3c5 | refs/heads/master | 2021-01-19T05:01:20.437181 | 2013-03-14T15:10:04 | 2013-03-14T15:10:04 | 6,373,233 | 4 | 0 | null | 2013-06-12T21:21:52 | 2012-10-24T16:04:24 | C++ | UTF-8 | C++ | false | false | 6,372 | cpp | /*
* ofxGuiObject.cpp
* openFrameworks
*
* Created by Stefan Kirch on 18.06.08.
* Copyright 2008 alphakanal. All rights reserved.
*
*/
// ----------------------------------------------------------------------------------------------------
#include <ofxGuiObject.h>
// ----------------------------------------------------------------------------------------------------
ofxGuiObject::ofxGuiObject()
{
mParamId = -1;
mParamType = kofxGui_Object_Base;
mParamName = "";
mObjX = 0;
mObjY = 0;
mObjWidth = 0;
mObjHeight = 0;
mDisplay = kofxGui_Display_Float2;
mSteps = 0;
mMouseIsDown = false;
mGlobals = ofxGuiGlobals::Instance();
setControlRegion(0, 0, 0, 0);
}
// ----------------------------------------------------------------------------------------------------
void ofxGuiObject::drawHeadString(float x, float y, string text, bool center)
{
glColor4f(mGlobals->mTextColor.r, mGlobals->mTextColor.g, mGlobals->mTextColor.b, mGlobals->mTextColor.a);
if(center)
x -= roundInt(mGlobals->mHeadFont.stringWidth(text) / 2.0f);
else
x += mGlobals->mHeadFontXOffset;
y += mGlobals->mHeadFontYOffset;
mGlobals->mHeadFont.drawString(text, x, y);
// debug rect to position font
/*
ofRectangle rect = uiGlobals->headFont.getStringBoundingBox(text, x, y);
ofNoFill();
glColor4f(1.0, 0.0, 0.0, 1.0);
ofRect(x, y, rect.width, OFXGUI_HEAD_HEIGHT);
*/
}
// ----------------------------------------------------------------------------------------------------
void ofxGuiObject::drawParamString(float x, float y, string text, bool center)
{
glColor4f(mGlobals->mTextColor.r, mGlobals->mTextColor.g, mGlobals->mTextColor.b, mGlobals->mTextColor.a);
if(center)
x -= roundInt(mGlobals->mParamFont.stringWidth(text) / 2.0f);
else
x += mGlobals->mParamFontXOffset;
y += mGlobals->mParamFontYOffset;
mGlobals->mParamFont.drawString(text, x, y);
// debug rect to position font
/*
ofRectangle rect = mGlobals->mParamFont.getStringBoundingBox(text, x, y);
ofNoFill();
glColor4f(1.0, 0.0, 0.0, 1.0);
ofRect(x, y, rect.width, mGlobals->mParamFontHeight);
*/
}
// ----------------------------------------------------------------------------------------------------
string ofxGuiObject::floatToString(float value, int display)
{
string stringValue = "";
switch(display)
{
case kofxGui_Display_Int:
stringValue = ofToString((int)value, 0);
break;
case kofxGui_Display_Hex:
char hex[64];
sprintf(hex, "%X", (int)value);
stringValue = hex;
break;
case kofxGui_Display_Float2:
stringValue = ofToString(value, 2);
break;
case kofxGui_Display_Float4:
stringValue = ofToString(value, 4);
break;
default:
stringValue = ofToString(value);
break;
}
return stringValue;
}
// ----------------------------------------------------------------------------------------------------
string ofxGuiObject::pointToString(ofVec2f value, int display)
{
return floatToString(value.x, display) + " " + floatToString(value.y, display);
}
// ----------------------------------------------------------------------------------------------------
bool ofxGuiObject::isPointInsideMe(int x, int y)
{
return (x >= mCtrX && x <= mCtrRight && y >= mCtrY && y <= mCtrBottom);
}
// ----------------------------------------------------------------------------------------------------
bool ofxGuiObject::isPointInsideMe(ofVec2f p)
{
return (p.x >= mCtrX && p.x <= mCtrRight && p.y >= mCtrY && p.y <= mCtrBottom);
}
// ----------------------------------------------------------------------------------------------------
ofVec2f ofxGuiObject::mouseToLocal(int x, int y)
{
return ofVec2f((float)(x - mObjX), (float)(y - mObjY));
}
// ----------------------------------------------------------------------------------------------------
ofVec2f ofxGuiObject::mouseToFraction(ofVec2f p)
{
p.x = CLAMP(p.x, mCtrX, mCtrRight);
p.y = CLAMP(p.y, mCtrY, mCtrBottom);
p.x = (p.x - mCtrX) / mCtrWidth;
p.y = (p.y - mCtrY) / mCtrHeight;
return p;
}
// ----------------------------------------------------------------------------------------------------
ofVec2f ofxGuiObject::fractionToLocal(ofVec2f p)
{
return ofVec2f(mCtrX + mCtrWidth * p.x, mCtrY + mCtrHeight * p.y);
}
// ----------------------------------------------------------------------------------------------------
void ofxGuiObject::setControlRegion(int x, int y, int width, int height)
{
mCtrX = x;
mCtrY = y;
mCtrWidth = width;
mCtrHeight = height;
mCtrRight = mCtrX + mCtrWidth;
mCtrBottom = mCtrY + mCtrHeight;
}
// ----------------------------------------------------------------------------------------------------
int ofxGuiObject::saveObjectData()
{
int id = mGlobals->mXml.addTag("OBJECT");
mGlobals->mXml.setValue("OBJECT:ID", mParamId, id);
mGlobals->mXml.setValue("OBJECT:TYPE", getTagName(), id);
mGlobals->mXml.setValue("OBJECT:NAME", mParamName, id);
mGlobals->mXml.setValue("OBJECT:LEFT", mObjX, id);
mGlobals->mXml.setValue("OBJECT:TOP", mObjY, id);
// mGlobals->mXml.setValue("OBJECT:WIDTh>, mObjWidth, id);
// mGlobals->mXml.setValue("OBJECT:HEIGHT", mObjHeight, id);
// mGlobals->mXml.setValue("OBJECT:CTRX", mCtrX, id);
// mGlobals->mXml.setValue("OBJECT:CTRY", mCtrY, id);
mGlobals->mXml.setValue("OBJECT:WIDTh", mCtrWidth, id);
mGlobals->mXml.setValue("OBJECT:HEIGHT", mCtrHeight, id);
mGlobals->mXml.setValue("OBJECT:DISPLAY", mDisplay, id);
mGlobals->mXml.setValue("OBJECT:STEPS", mSteps, id);
return id;
}
// ----------------------------------------------------------------------------------------------------
string ofxGuiObject::getTagName()
{
return kofxGui_Tags[mParamType];
}
// ----------------------------------------------------------------------------------------------------
| [
"echa@kidtsunami.com"
] | echa@kidtsunami.com |
e7c126b07985c89c468d02b247d4524c77384814 | 4135d95e06a8dd39417a0798948b9819bfbd8298 | /B5/firstTask.hpp | f4f81a4939baf6cf37415b32fa259cff0020464b | [] | no_license | dm-stulov/SpbStu_cpp_second_year | b72cd40d9db1f688a23c2bc050a38bbd4b5bc5c0 | 2b6ceccb8679f26838e37f0c3bb744781960c664 | refs/heads/master | 2022-04-09T17:08:48.116959 | 2020-03-17T17:22:02 | 2020-03-17T17:22:02 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 198 | hpp | #ifndef FIRSTTASK_HPP
#define FIRSTTASK_HPP
#include <iostream>
#include <string>
#include <fstream>
#include <sstream>
#include <set>
void firstTask();
std::set<std::string> readData();
#endif
| [
"dm-stulov@yandex.ru"
] | dm-stulov@yandex.ru |
f40b78b1b38814e0a30927ac2972a2ccababf6d2 | cc7a2f20fc32b402c88f1f7ae6085aadb59c09ba | /jni/Source/Handlers/soundshandler.h | db579744ea006838f3ee0ef16a43496aacdec90d | [] | no_license | muneebahmad/BreakfastMakerFreeCpp | 3e780c527be6288c167550e52809951b459c8f46 | 3f08a7a2192334ee950789cdb63c1f2fd37d7797 | refs/heads/master | 2021-01-22T12:12:39.664532 | 2015-07-13T02:04:23 | 2015-07-13T02:04:23 | 38,984,147 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 399 | h | /*
* soundshandler.h
*
* Created on: 05-Jun-2015
* Author: muneebahmad
*/
#ifndef SOUNDSHANDLER_H_
#define SOUNDSHANDLER_H_
#include "WiEngine.h"
#include "WiEngine-WiSound.h"
class SoundsHandler {
public:
SoundsHandler();
~SoundsHandler();
static SoundsHandler* getInstance();
void preLoadSounds();
void playBackgroundMusic();
};/** end class */
#endif /* SOUNDSHANDLER_H_ */
| [
"ahmadgallian@yahoo.com"
] | ahmadgallian@yahoo.com |
ae6c1c11d9d5dc0f1f4d90fa05e221dbd56251b5 | 53700448a09a28fa7979954599e9c2e3395b8223 | /src/KSegmentor/include/KoupledKurvolver.h | bb6cb49a874048fa3a8502fdc4bf6f3c2409fb12 | [] | no_license | radinhamidi/kslice | 8f417f287daa92f2cd24a5b56774e9d239ae83b3 | b5d71ddaadd67f0bdef6b0869cc272e7b69deb07 | refs/heads/master | 2021-01-13T03:39:34.365630 | 2015-05-16T13:52:21 | 2015-05-16T13:52:21 | 77,254,540 | 1 | 0 | null | 2016-12-23T22:49:23 | 2016-12-23T22:49:23 | null | UTF-8 | C++ | false | false | 364 | h | #ifndef KOUPLED_KURVOLVER_H
#define KOUPLED_KURVOLVER_H
class KoupledKurvolver
{
public:
struct Options {
Options(int ac, char* av [] );
// use Boost Program Options to parse and setup
};
public:
KoupledKurvolver(const KoupledKurvolver::Options& opts_in);
void Print();
private:
KoupledKurvolver() { }
};
#endif // KOUPLED_KURVOLVER_H
| [
"pkarasev@gatech.edu"
] | pkarasev@gatech.edu |
f0a72471dccad29da64d94c2610a3202fb862546 | eca5d45a8af48128f17fd01dcc8c0d0a6322b4ed | /BasicLevel/1077.cpp | f13480d9f31869d215e1c5f920043b2cb3cf713f | [] | no_license | YGYtl/PAT-Code | 4e797a1a765e058908eb799c11ed94668433e121 | 60f6029ec85618f4f5916ae44b640af198c5c118 | refs/heads/master | 2021-10-21T20:45:41.268901 | 2019-03-06T08:46:51 | 2019-03-06T08:46:51 | 111,386,235 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 469 | cpp | #include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int main()
{
int n, m;
int k, g1, g2;
vector<int> v;
scanf("%d %d", &n, &m);
for(int i=0; i<n; i++)
{
g1 = 0;
for(int j=0; j<n; j++)
{
scanf("%d", &k);
if(j==0) { g2 = k; continue; }
if(k>=0&&k<=m) v.push_back(k);
}
sort(v.begin(), v.end());
for(int j=1; j<v.size()-1; j++) g1 += v[j];
printf("%.0f\n", ((g1/(v.size()-2)+g2)+0.5)/2);
v.clear();
}
return 0;
}
| [
"ygy.cs06@outlook.com"
] | ygy.cs06@outlook.com |
a4ddae100768a39f9371da9d0c233f0b425247d1 | 18e4b5ca2d2d0b98f2aa1611766ffcebd6ff1007 | /D4-Greedy/fractional_knapsack.cpp | 7ea322561de3867c2ece6b9c2f6b09a50ab0979b | [] | no_license | webdeveloper13/Leetcode_practiceForSDE | 3cb4b2575825ced624daa13b0cd7a46a536cb88a | 04131f2bcf9cf4dd946419275a47e937472d0757 | refs/heads/master | 2023-08-23T06:53:26.743144 | 2021-10-13T15:04:23 | 2021-10-13T15:04:23 | 274,382,785 | 3 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 2,467 | cpp | /*
Given weights and values of N items, we need to put these items in a knapsack of capacity W to get the maximum total value in the knapsack.
Note: Unlike 0/1 knapsack, you are allowed to break the item.
Input:
First line consists of an integer T denoting the number of test cases. First line consists of two integers N and W, denoting number of items and weight respectively. Second line of every test case consists of 2*N spaced integers denoting Values and weight respectively. (Value1 Weight1 Value2 Weight2.... ValueN WeightN)
Output:
Print the maximum value possible to put items in a knapsack, upto 2 decimal place.
Constraints:
1 <= T <= 100
1 <= N <= 100
1 <= W <= 100
Example:
Input:
2
3 50
60 10 100 20 120 30
2 50
60 10 100 20
Output:
240.00
160.00
Explanation:
Test Case 1: We can have a total value of 240 in the following manner:
W = 50 (total weight the Knapsack can carry)
Val = 0
Include the first item. Hence we have: W = 50-10 = 40, Val = 60
Include the second item. W = 40-20 = 20, Val = 160
Include 2/3rd of the third item. W = 20-20 = 0, Val = 160 + (2/3)*120 = 160 + 80 = 240.
Test Case 2: We can have a total value of 160 in the following manner:
W = 50 (total weight the Knapsack can carry)
Val = 0
Include both the items. W = 50-10-20 = 20. Val = 0+60+100 = 160.
** For More Input/Output Examples Use 'Expected Output' option **
*/
/*
Approach: Find val/weight ratio
and sort in descending.
*/
#include <bits/stdc++.h>
using namespace std;
struct item
{
int value;
int weight;
double ratio;
};
bool comparator(struct item I1,struct item I2)
{
return I1.ratio>I2.ratio;
}
int main() {
int T;
cin>>T;
for(int s=0;s<T;s++)
{
int cap;
int N;
cin>>N;
cin>>cap;
struct item I[N];
for(int i=0;i<N;i++)
{
cin>>I[i].value;
cin>>I[i].weight;
}
for(int i=0;i<N;i++)
{
I[i].ratio = (double)I[i].value/I[i].weight;
}
sort(I,I+N,comparator);
double final_value = 0.0;
int curr_weight = 0;
for(int i=0;i<N;i++)
{
if(curr_weight+I[i].weight<=cap)
{
curr_weight += I[i].weight;
final_value += I[i].value;
}
else
{
int remain = cap - curr_weight;
final_value += I[i].value * ((double) remain/I[i].weight);
break;
}
}
cout<<final_value<<endl;
}
return 0;
}
| [
"suryanshsharma132@gmail.com"
] | suryanshsharma132@gmail.com |
5e96bc0b14c586193365df794936a8d651b0bf9f | 555976c1722b31bc4dfd72ef75d96f392371744f | /src/image.cpp | 0d3b9c06e2cb5033d97eba2d04f08dee01d61aba | [] | no_license | Kedreals/RayTracer | 2ffe94cb074d60b45308391fbb4db31f233852a7 | bd07792c9bed6c436c0038745d1803517836c06f | refs/heads/master | 2021-04-29T14:16:33.347261 | 2018-03-05T17:17:26 | 2018-03-05T17:17:26 | 121,769,900 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,491 | cpp | #include "image.hpp"
#include "fileWriter.hpp"
#include <cmath>
using namespace ray_tracer::light;
namespace ray_tracer
{
namespace core
{
Image::Image(unsigned int width, unsigned int height) : m_width(width), m_height(height), m_index_highest(0), m_highest(0)
{
m_data = new Color[width*height];
}
Image::~Image()
{
if(m_data)
{
delete[] m_data;
m_data = nullptr;
}
}
const Color& Image::GetPixel(unsigned int x, unsigned int y) const
{
return m_data[y*m_width + x];
}
void SearchHighest(Color* arr, unsigned int size, float* res, unsigned int* res_index)
{
float r = 0;
int index = 0;
for(unsigned int i = 0; i < size; ++i)
{
if(arr[i].GetR() > r)
{
r = arr[i].GetR();
index = i;
}
if(arr[i].GetG() > r)
{
r = arr[i].GetG();
index = i;
}
if(arr[i].GetB() >r)
{
r = arr[i].GetB();
index = i;
}
}
*res = r;
*res_index = index;
}
void Image::SetPixel(unsigned int x, unsigned int y, const Color& value)
{
if(y>= m_height || x >= m_width)
return;
bool wasSet = false;
if(value.GetR() > m_highest){
m_highest = value.GetR();
m_index_highest = y*m_width+x;
wasSet = true;
}
if(value.GetG() > m_highest){
m_highest = value.GetG();
m_index_highest = y*m_width+x;
wasSet = true;
}
if(value.GetB() > m_highest){
m_highest = value.GetB();
m_index_highest = y*m_width+x;
wasSet = true;
}
m_data[y*m_width + x] = value;
if(y*m_width + x == m_index_highest && !wasSet)
{
SearchHighest(m_data, m_width*m_height, &m_highest, &m_index_highest);
}
}
inline Color Colorlog(const Color& c)
{
return Color(log(c.GetR()+1), log(c.GetG() + 1), log(c.GetB() + 1));
}
Color* ScaleLog(const Color* input, unsigned int size, float highest)
{
Color* res = new Color[size];
highest = log(highest+1);
for(unsigned int i = 0; i < size; ++i)
{
res[i] = Colorlog(input[i])* (1.0f / highest);
}
return res;
}
void Image::Save(const std::string& fileName) const
{
std::string ending = fileName.substr(fileName.find("."));
Color* scaledImage = ScaleLog(m_data, m_width*m_height, m_highest);
if(ending == ".ppm")
SavePPM(scaledImage, m_width, m_height, fileName);
delete[] scaledImage;
}
}
}
| [
"ebert.mueden1@freenet.de"
] | ebert.mueden1@freenet.de |
685fc5abd454d7b73fbee832ae84a4ff5dcf6a72 | 1e55d309a9671113412dff6f8f25eaf8c0678a7a | /10.0.17134.0/um/encdec.h | eecc7c7e86828a0a60fd55c99934bc129a983234 | [] | no_license | NoOne-hub/avc_save | 8757e3e209ff705067fa99f92a735a89ac946eb1 | f216a197cd76dd639d509c4d89a88eead73d008c | refs/heads/main | 2022-12-27T20:53:34.861466 | 2020-10-13T03:30:01 | 2020-10-13T03:30:01 | 303,577,691 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 73,471 | h |
/* this ALWAYS GENERATED file contains the definitions for the interfaces */
/* File created by MIDL compiler version 8.01.0622 */
/* @@MIDL_FILE_HEADING( ) */
/* verify that the <rpcndr.h> version is high enough to compile this file*/
#ifndef __REQUIRED_RPCNDR_H_VERSION__
#define __REQUIRED_RPCNDR_H_VERSION__ 500
#endif
/* verify that the <rpcsal.h> version is high enough to compile this file*/
#ifndef __REQUIRED_RPCSAL_H_VERSION__
#define __REQUIRED_RPCSAL_H_VERSION__ 100
#endif
#include "rpc.h"
#include "rpcndr.h"
#ifndef __RPCNDR_H_VERSION__
#error this stub requires an updated version of <rpcndr.h>
#endif /* __RPCNDR_H_VERSION__ */
#ifndef COM_NO_WINDOWS_H
#include "Windows.h"
#include "Ole2.h"
#endif /*COM_NO_WINDOWS_H*/
#ifndef __encdec_h__
#define __encdec_h__
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
#pragma once
#endif
/* Forward Declarations */
#ifndef __IETFilterConfig_FWD_DEFINED__
#define __IETFilterConfig_FWD_DEFINED__
typedef interface IETFilterConfig IETFilterConfig;
#endif /* __IETFilterConfig_FWD_DEFINED__ */
#ifndef __IDTFilterConfig_FWD_DEFINED__
#define __IDTFilterConfig_FWD_DEFINED__
typedef interface IDTFilterConfig IDTFilterConfig;
#endif /* __IDTFilterConfig_FWD_DEFINED__ */
#ifndef __IXDSCodecConfig_FWD_DEFINED__
#define __IXDSCodecConfig_FWD_DEFINED__
typedef interface IXDSCodecConfig IXDSCodecConfig;
#endif /* __IXDSCodecConfig_FWD_DEFINED__ */
#ifndef __IDTFilterLicenseRenewal_FWD_DEFINED__
#define __IDTFilterLicenseRenewal_FWD_DEFINED__
typedef interface IDTFilterLicenseRenewal IDTFilterLicenseRenewal;
#endif /* __IDTFilterLicenseRenewal_FWD_DEFINED__ */
#ifndef __IPTFilterLicenseRenewal_FWD_DEFINED__
#define __IPTFilterLicenseRenewal_FWD_DEFINED__
typedef interface IPTFilterLicenseRenewal IPTFilterLicenseRenewal;
#endif /* __IPTFilterLicenseRenewal_FWD_DEFINED__ */
#ifndef __IMceBurnerControl_FWD_DEFINED__
#define __IMceBurnerControl_FWD_DEFINED__
typedef interface IMceBurnerControl IMceBurnerControl;
#endif /* __IMceBurnerControl_FWD_DEFINED__ */
#ifndef __IETFilter_FWD_DEFINED__
#define __IETFilter_FWD_DEFINED__
typedef interface IETFilter IETFilter;
#endif /* __IETFilter_FWD_DEFINED__ */
#ifndef __IETFilterEvents_FWD_DEFINED__
#define __IETFilterEvents_FWD_DEFINED__
typedef interface IETFilterEvents IETFilterEvents;
#endif /* __IETFilterEvents_FWD_DEFINED__ */
#ifndef __ETFilter_FWD_DEFINED__
#define __ETFilter_FWD_DEFINED__
#ifdef __cplusplus
typedef class ETFilter ETFilter;
#else
typedef struct ETFilter ETFilter;
#endif /* __cplusplus */
#endif /* __ETFilter_FWD_DEFINED__ */
#ifndef __IDTFilter_FWD_DEFINED__
#define __IDTFilter_FWD_DEFINED__
typedef interface IDTFilter IDTFilter;
#endif /* __IDTFilter_FWD_DEFINED__ */
#ifndef __IDTFilter2_FWD_DEFINED__
#define __IDTFilter2_FWD_DEFINED__
typedef interface IDTFilter2 IDTFilter2;
#endif /* __IDTFilter2_FWD_DEFINED__ */
#ifndef __IDTFilter3_FWD_DEFINED__
#define __IDTFilter3_FWD_DEFINED__
typedef interface IDTFilter3 IDTFilter3;
#endif /* __IDTFilter3_FWD_DEFINED__ */
#ifndef __IDTFilterEvents_FWD_DEFINED__
#define __IDTFilterEvents_FWD_DEFINED__
typedef interface IDTFilterEvents IDTFilterEvents;
#endif /* __IDTFilterEvents_FWD_DEFINED__ */
#ifndef __DTFilter_FWD_DEFINED__
#define __DTFilter_FWD_DEFINED__
#ifdef __cplusplus
typedef class DTFilter DTFilter;
#else
typedef struct DTFilter DTFilter;
#endif /* __cplusplus */
#endif /* __DTFilter_FWD_DEFINED__ */
#ifndef __IXDSCodec_FWD_DEFINED__
#define __IXDSCodec_FWD_DEFINED__
typedef interface IXDSCodec IXDSCodec;
#endif /* __IXDSCodec_FWD_DEFINED__ */
#ifndef __IXDSCodecEvents_FWD_DEFINED__
#define __IXDSCodecEvents_FWD_DEFINED__
typedef interface IXDSCodecEvents IXDSCodecEvents;
#endif /* __IXDSCodecEvents_FWD_DEFINED__ */
#ifndef __XDSCodec_FWD_DEFINED__
#define __XDSCodec_FWD_DEFINED__
#ifdef __cplusplus
typedef class XDSCodec XDSCodec;
#else
typedef struct XDSCodec XDSCodec;
#endif /* __cplusplus */
#endif /* __XDSCodec_FWD_DEFINED__ */
#ifndef __CXDSData_FWD_DEFINED__
#define __CXDSData_FWD_DEFINED__
#ifdef __cplusplus
typedef class CXDSData CXDSData;
#else
typedef struct CXDSData CXDSData;
#endif /* __cplusplus */
#endif /* __CXDSData_FWD_DEFINED__ */
/* header files for imported files */
#include "OAIdl.h"
#include "OCIdl.h"
#include "tvratings.h"
#ifdef __cplusplus
extern "C"{
#endif
/* interface __MIDL_itf_encdec_0000_0000 */
/* [local] */
//+-------------------------------------------------------------------------
//
// Microsoft Windows
// Copyright (C) Microsoft Corporation, 2002.
//
//--------------------------------------------------------------------------
#pragma once
#include <winapifamily.h>
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
// {C4C4C4C4-0049-4E2B-98FB-9537F6CE516D}
DEFINE_GUID(SID_DRMSecureServiceChannel,
0xC4C4C4C4, 0x0049, 0x4E2B, 0x98, 0xFB, 0x95, 0x37, 0xF6, 0xCE, 0x51, 0x6D);
// {C4C4C481-0049-4E2B-98FB-9537F6CE516D}
DEFINE_GUID(CLSID_ETFilterEncProperties,
0xC4C4C481, 0x0049, 0x4E2B, 0x98, 0xFB, 0x95, 0x37, 0xF6, 0xCE, 0x51, 0x6D);
// {C4C4C491-0049-4E2B-98FB-9537F6CE516D}
DEFINE_GUID(CLSID_ETFilterTagProperties,
0xC4C4C491, 0x0049, 0x4E2B, 0x98, 0xFB, 0x95, 0x37, 0xF6, 0xCE, 0x51, 0x6D);
// {9CD31617-B303-4f96-8330-2EB173EA4DC6}
DEFINE_GUID(CLSID_PTFilter,
0x9cd31617, 0xb303, 0x4f96, 0x83, 0x30, 0x2e, 0xb1, 0x73, 0xea, 0x4d, 0xc6);
// {C4C4C482-0049-4E2B-98FB-9537F6CE516D}
DEFINE_GUID(CLSID_DTFilterEncProperties,
0xC4C4C482, 0x0049, 0x4E2B, 0x98, 0xFB, 0x95, 0x37, 0xF6, 0xCE, 0x51, 0x6D);
// {C4C4C492-0049-4E2B-98FB-9537F6CE516D}
DEFINE_GUID(CLSID_DTFilterTagProperties,
0xC4C4C492, 0x0049, 0x4E2B, 0x98, 0xFB, 0x95, 0x37, 0xF6, 0xCE, 0x51, 0x6D);
// {C4C4C483-0049-4E2B-98FB-9537F6CE516D}
DEFINE_GUID(CLSID_XDSCodecProperties,
0xC4C4C483, 0x0049, 0x4E2B, 0x98, 0xFB, 0x95, 0x37, 0xF6, 0xCE, 0x51, 0x6D);
// {C4C4C493-0049-4E2B-98FB-9537F6CE516D}
DEFINE_GUID(CLSID_XDSCodecTagProperties,
0xC4C4C493, 0x0049, 0x4E2B, 0x98, 0xFB, 0x95, 0x37, 0xF6, 0xCE, 0x51, 0x6D);
// {C4C4C4FC-0049-4E2B-98FB-9537F6CE516D}
DEFINE_GUID(CLSID_CPCAFiltersCategory,
0xC4C4C4FC, 0x0049, 0x4E2B, 0x98, 0xFB, 0x95, 0x37, 0xF6, 0xCE, 0x51, 0x6D);
// {C4C4C4E0-0049-4E2B-98FB-9537F6CE516D}
DEFINE_GUID(EVENTID_XDSCodecNewXDSRating,
0xC4C4C4E0, 0x0049, 0x4E2B, 0x98, 0xFB, 0x95, 0x37, 0xF6, 0xCE, 0x51, 0x6D);
// {C4C4C4DF-0049-4E2B-98FB-9537F6CE516D}
DEFINE_GUID(EVENTID_XDSCodecDuplicateXDSRating,
0xC4C4C4DF, 0x0049, 0x4E2B, 0x98, 0xFB, 0x95, 0x37, 0xF6, 0xCE, 0x51, 0x6D);
// {C4C4C4E1-0049-4E2B-98FB-9537F6CE516D}
DEFINE_GUID(EVENTID_XDSCodecNewXDSPacket,
0xC4C4C4E1, 0x0049, 0x4E2B, 0x98, 0xFB, 0x95, 0x37, 0xF6, 0xCE, 0x51, 0x6D);
// {C4C4C4E2-0049-4E2B-98FB-9537F6CE516D}
DEFINE_GUID(EVENTID_DTFilterRatingChange,
0xC4C4C4E2, 0x0049, 0x4E2B, 0x98, 0xFB, 0x95, 0x37, 0xF6, 0xCE, 0x51, 0x6D);
// {C4C4C4E3-0049-4E2B-98FB-9537F6CE516D}
DEFINE_GUID(EVENTID_DTFilterRatingsBlock,
0xC4C4C4E3, 0x0049, 0x4E2B, 0x98, 0xFB, 0x95, 0x37, 0xF6, 0xCE, 0x51, 0x6D);
// {C4C4C4E4-0049-4E2B-98FB-9537F6CE516D}
DEFINE_GUID(EVENTID_DTFilterRatingsUnblock,
0xC4C4C4E4, 0x0049, 0x4E2B, 0x98, 0xFB, 0x95, 0x37, 0xF6, 0xCE, 0x51, 0x6D);
// {C4C4C4E5-0049-4E2B-98FB-9537F6CE516D}
DEFINE_GUID(EVENTID_DTFilterXDSPacket,
0xC4C4C4E5, 0x0049, 0x4E2B, 0x98, 0xFB, 0x95, 0x37, 0xF6, 0xCE, 0x51, 0x6D);
// {C4C4C4E6-0049-4E2B-98FB-9537F6CE516D}
DEFINE_GUID(EVENTID_ETFilterEncryptionOn,
0xC4C4C4E6, 0x0049, 0x4E2B, 0x98, 0xFB, 0x95, 0x37, 0xF6, 0xCE, 0x51, 0x6D);
// {C4C4C4E7-0049-4E2B-98FB-9537F6CE516D}
DEFINE_GUID(EVENTID_ETFilterEncryptionOff,
0xC4C4C4E7, 0x0049, 0x4E2B, 0x98, 0xFB, 0x95, 0x37, 0xF6, 0xCE, 0x51, 0x6D);
// {C4C4C4E8-0049-4E2B-98FB-9537F6CE516D}
DEFINE_GUID(EVENTID_DTFilterCOPPUnblock,
0xC4C4C4E8, 0x0049, 0x4E2B, 0x98, 0xFB, 0x95, 0x37, 0xF6, 0xCE, 0x51, 0x6D);
// {C4C4C4E9-0049-4E2B-98FB-9537F6CE516D}
DEFINE_GUID(EVENTID_EncDecFilterError,
0xC4C4C4E9, 0x0049, 0x4E2B, 0x98, 0xFB, 0x95, 0x37, 0xF6, 0xCE, 0x51, 0x6D);
// {C4C4C4EA-0049-4E2B-98FB-9537F6CE516D}
DEFINE_GUID(EVENTID_DTFilterCOPPBlock ,
0xC4C4C4EA, 0x0049, 0x4E2B, 0x98, 0xFB, 0x95, 0x37, 0xF6, 0xCE, 0x51, 0x6D);
// {C4C4C4EB-0049-4E2B-98FB-9537F6CE516D}
DEFINE_GUID(EVENTID_ETFilterCopyOnce,
0xC4C4C4EB, 0x0049, 0x4E2B, 0x98, 0xFB, 0x95, 0x37, 0xF6, 0xCE, 0x51, 0x6D);
// {C4C4C4F0-0049-4E2B-98FB-9537F6CE516D}
DEFINE_GUID(EVENTID_ETFilterCopyNever,
0xC4C4C4F0, 0x0049, 0x4E2B, 0x98, 0xFB, 0x95, 0x37, 0xF6, 0xCE, 0x51, 0x6D);
// {C4C4C4EC-0049-4E2B-98FB-9537F6CE516D}
DEFINE_GUID(EVENTID_DTFilterDataFormatOK,
0xC4C4C4EC, 0x0049, 0x4E2B, 0x98, 0xFB, 0x95, 0x37, 0xF6, 0xCE, 0x51, 0x6D);
// {C4C4C4ED-0049-4E2B-98FB-9537F6CE516D}
DEFINE_GUID(EVENTID_DTFilterDataFormatFailure,
0xC4C4C4ED, 0x0049, 0x4E2B, 0x98, 0xFB, 0x95, 0x37, 0xF6, 0xCE, 0x51, 0x6D);
// {C4C4C4EE-0049-4E2B-98FB-9537F6CE516D}
DEFINE_GUID(EVENTID_ETDTFilterLicenseOK,
0xC4C4C4EE, 0x0049, 0x4E2B, 0x98, 0xFB, 0x95, 0x37, 0xF6, 0xCE, 0x51, 0x6D);
// {C4C4C4EF-0049-4E2B-98FB-9537F6CE516D}
DEFINE_GUID(EVENTID_ETDTFilterLicenseFailure,
0xC4C4C4EF, 0x0049, 0x4E2B, 0x98, 0xFB, 0x95, 0x37, 0xF6, 0xCE, 0x51, 0x6D);
// {C4C4C4D0-0049-4E2B-98FB-9537F6CE516D}
DEFINE_GUID(MEDIASUBTYPE_ETDTFilter_Tagged,
0xC4C4C4D0, 0x0049, 0x4E2B, 0x98, 0xFB, 0x95, 0x37, 0xF6, 0xCE, 0x51, 0x6D);
// {C4C4C4D1-0049-4E2B-98FB-9537F6CE516D}
DEFINE_GUID(FORMATTYPE_ETDTFilter_Tagged,
0xC4C4C4D1, 0x0049, 0x4E2B, 0x98, 0xFB, 0x95, 0x37, 0xF6, 0xCE, 0x51, 0x6D);
// {46adbd28-6fd0-4796-93b2-155c51dc048d}
DEFINE_GUID( MEDIASUBTYPE_CPFilters_Processed, 0x46adbd28, 0x6fd0, 0x4796, 0x93, 0xb2, 0x15, 0x5c, 0x51, 0xdc, 0x4, 0x8d );
// {6739b36f-1d5f-4ac2-8192-28bb0e73d16a}
DEFINE_GUID( FORMATTYPE_CPFilters_Processed, 0x6739b36f, 0x1d5f, 0x4ac2, 0x81, 0x92, 0x28, 0xbb, 0xe, 0x73, 0xd1, 0x6a );
// {4A1B465B-0FB9-4159-AFBD-E33006A0F9F4}
DEFINE_GUID(EVENTID_EncDecFilterEvent,
0x4a1b465b, 0xfb9, 0x4159, 0xaf, 0xbd, 0xe3, 0x30, 0x6, 0xa0, 0xf9, 0xf4);
enum FormatNotSupportedEvents
{
FORMATNOTSUPPORTED_CLEAR = 0,
FORMATNOTSUPPORTED_NOTSUPPORTED = 1
} ;
// {24B2280A-B2AA-4777-BF65-63F35E7B024A}
DEFINE_GUID(EVENTID_FormatNotSupportedEvent,
0x24b2280a, 0xb2aa, 0x4777, 0xbf, 0x65, 0x63, 0xf3, 0x5e, 0x7b, 0x2, 0x4a);
// {16155770-AED5-475c-BB98-95A33070DF0C}
DEFINE_GUID(EVENTID_DemultiplexerFilterDiscontinuity,
0x16155770, 0xaed5, 0x475c, 0xbb, 0x98, 0x95, 0xa3, 0x30, 0x70, 0xdf, 0xc);
// {40749583-6b9d-4eec-b43c-67a1801e1a9b}
DEFINE_GUID( DSATTRIB_WMDRMProtectionInfo, 0x40749583, 0x6b9d, 0x4eec, 0xb4, 0x3c, 0x67, 0xa1, 0x80, 0x1e, 0x1a, 0x9b );
// {e4846dda-5838-42b4-b897-6f7e5faa2f2f}
DEFINE_GUID( DSATTRIB_BadSampleInfo, 0xe4846dda, 0x5838, 0x42b4, 0xb8, 0x97, 0x6f, 0x7e, 0x5f, 0xaa, 0x2f, 0x2f );
#pragma pack(push, 1)
typedef /* [public] */ struct __MIDL___MIDL_itf_encdec_0000_0000_0001
{
unsigned short wszKID[ 25 ];
unsigned __int64 qwCounter;
unsigned __int64 qwIndex;
unsigned char bOffset;
} WMDRMProtectionInfo;
typedef /* [public] */ struct __MIDL___MIDL_itf_encdec_0000_0000_0002
{
HRESULT hrReason;
} BadSampleInfo;
#pragma pack(pop)
typedef LONGLONG REFERENCE_TIME;
typedef LONG PackedTvRating;
#pragma warning(push)
#pragma warning(disable:4001)
#pragma once
#pragma warning(push)
#pragma warning(disable:4001)
#pragma once
#pragma warning(pop)
#pragma warning(pop)
#pragma region Desktop Family
#pragma region Desktop Family
#pragma endregion
typedef /* [v1_enum][uuid] */ DECLSPEC_UUID("25AEE876-3D61-4486-917E-7C0CB3D9983C")
enum ProtType
{
PROT_COPY_FREE = 1,
PROT_COPY_ONCE = 2,
PROT_COPY_NEVER = 3,
PROT_COPY_NEVER_REALLY = 4,
PROT_COPY_NO_MORE = 5,
PROT_COPY_FREE_CIT = 6,
PROT_COPY_BF = 7,
PROT_COPY_CN_RECORDING_STOP = 8,
PROT_COPY_FREE_SECURE = 9,
PROT_COPY_INVALID = 50
} ProtType;
typedef /* [v1_enum] */
enum EncDecEvents
{
ENCDEC_CPEVENT = 0,
ENCDEC_RECORDING_STATUS = ( ENCDEC_CPEVENT + 1 )
} EncDecEvents;
typedef /* [v1_enum] */
enum CPRecordingStatus
{
RECORDING_STOPPED = 0,
RECORDING_STARTED = 1
} CPRecordingStatus;
typedef /* [v1_enum] */
enum CPEventBitShift
{
CPEVENT_BITSHIFT_RATINGS = 0,
CPEVENT_BITSHIFT_COPP = ( CPEVENT_BITSHIFT_RATINGS + 1 ) ,
CPEVENT_BITSHIFT_LICENSE = ( CPEVENT_BITSHIFT_COPP + 1 ) ,
CPEVENT_BITSHIFT_ROLLBACK = ( CPEVENT_BITSHIFT_LICENSE + 1 ) ,
CPEVENT_BITSHIFT_SAC = ( CPEVENT_BITSHIFT_ROLLBACK + 1 ) ,
CPEVENT_BITSHIFT_DOWNRES = ( CPEVENT_BITSHIFT_SAC + 1 ) ,
CPEVENT_BITSHIFT_STUBLIB = ( CPEVENT_BITSHIFT_DOWNRES + 1 ) ,
CPEVENT_BITSHIFT_UNTRUSTEDGRAPH = ( CPEVENT_BITSHIFT_STUBLIB + 1 ) ,
CPEVENT_BITSHIFT_PENDING_CERTIFICATE = ( CPEVENT_BITSHIFT_UNTRUSTEDGRAPH + 1 ) ,
CPEVENT_BITSHIFT_NO_PLAYREADY = ( CPEVENT_BITSHIFT_PENDING_CERTIFICATE + 1 )
} CPEventBitShift;
typedef /* [v1_enum] */
enum CPEvents
{
CPEVENT_NONE = 0,
CPEVENT_RATINGS = ( CPEVENT_NONE + 1 ) ,
CPEVENT_COPP = ( CPEVENT_RATINGS + 1 ) ,
CPEVENT_LICENSE = ( CPEVENT_COPP + 1 ) ,
CPEVENT_ROLLBACK = ( CPEVENT_LICENSE + 1 ) ,
CPEVENT_SAC = ( CPEVENT_ROLLBACK + 1 ) ,
CPEVENT_DOWNRES = ( CPEVENT_SAC + 1 ) ,
CPEVENT_STUBLIB = ( CPEVENT_DOWNRES + 1 ) ,
CPEVENT_UNTRUSTEDGRAPH = ( CPEVENT_STUBLIB + 1 ) ,
CPEVENT_PROTECTWINDOWED = ( CPEVENT_UNTRUSTEDGRAPH + 1 )
} CPEvents;
typedef /* [v1_enum] */
enum RevokedComponent
{
REVOKED_COPP = 0,
REVOKED_SAC = ( REVOKED_COPP + 1 ) ,
REVOKED_APP_STUB = ( REVOKED_SAC + 1 ) ,
REVOKED_SECURE_PIPELINE = ( REVOKED_APP_STUB + 1 ) ,
REVOKED_MAX_TYPES = ( REVOKED_SECURE_PIPELINE + 1 )
} RevokedComponent;
typedef /* [v1_enum] */
enum EnTag_Mode
{
EnTag_Remove = 0,
EnTag_Once = 0x1,
EnTag_Repeat = 0x2
} EnTag_Mode;
typedef /* [v1_enum][uuid] */ DECLSPEC_UUID("6F8C2442-2BFB-4180-9EE5-EA1FB47AE35C")
enum COPPEventBlockReason
{
COPP_Unknown = -1,
COPP_BadDriver = 0,
COPP_NoCardHDCPSupport = 1,
COPP_NoMonitorHDCPSupport = 2,
COPP_BadCertificate = 3,
COPP_InvalidBusProtection = 4,
COPP_AeroGlassOff = 5,
COPP_RogueApp = 6,
COPP_ForbiddenVideo = 7,
COPP_Activate = 8,
COPP_DigitalAudioUnprotected = 9
} COPPEventBlockReason;
typedef /* [v1_enum][uuid] */ DECLSPEC_UUID("57BCA1BE-DF7A-434e-8B89-26D6A0541FDA")
enum LicenseEventBlockReason
{
LIC_BadLicense = 0,
LIC_NeedIndiv = 1,
LIC_Expired = 2,
LIC_NeedActivation = 3,
LIC_ExtenderBlocked = 4
} LicenseEventBlockReason;
typedef /* [v1_enum][uuid] */ DECLSPEC_UUID("D5CC1CDC-EF31-48dc-95B8-AFD34C08036B")
enum DownResEventParam
{
DOWNRES_Always = 0,
DOWNRES_InWindowOnly = 1,
DOWNRES_Undefined = 2
} DownResEventParam;
#pragma region Desktop Family
#pragma endregion
#pragma endregion
extern RPC_IF_HANDLE __MIDL_itf_encdec_0000_0000_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_encdec_0000_0000_v0_0_s_ifspec;
#ifndef __IETFilterConfig_INTERFACE_DEFINED__
#define __IETFilterConfig_INTERFACE_DEFINED__
/* interface IETFilterConfig */
/* [unique][helpstring][uuid][object][restricted] */
EXTERN_C const IID IID_IETFilterConfig;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("C4C4C4D1-0049-4E2B-98FB-9537F6CE516D")
IETFilterConfig : public IUnknown
{
public:
virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE InitLicense(
/* [in] */ int LicenseId) = 0;
virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetSecureChannelObject(
/* [out] */ __RPC__deref_out_opt IUnknown **ppUnkDRMSecureChannel) = 0;
};
#else /* C style interface */
typedef struct IETFilterConfigVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in IETFilterConfig * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in IETFilterConfig * This);
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in IETFilterConfig * This);
/* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *InitLicense )(
__RPC__in IETFilterConfig * This,
/* [in] */ int LicenseId);
/* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetSecureChannelObject )(
__RPC__in IETFilterConfig * This,
/* [out] */ __RPC__deref_out_opt IUnknown **ppUnkDRMSecureChannel);
END_INTERFACE
} IETFilterConfigVtbl;
interface IETFilterConfig
{
CONST_VTBL struct IETFilterConfigVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IETFilterConfig_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IETFilterConfig_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IETFilterConfig_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IETFilterConfig_InitLicense(This,LicenseId) \
( (This)->lpVtbl -> InitLicense(This,LicenseId) )
#define IETFilterConfig_GetSecureChannelObject(This,ppUnkDRMSecureChannel) \
( (This)->lpVtbl -> GetSecureChannelObject(This,ppUnkDRMSecureChannel) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __IETFilterConfig_INTERFACE_DEFINED__ */
#ifndef __IDTFilterConfig_INTERFACE_DEFINED__
#define __IDTFilterConfig_INTERFACE_DEFINED__
/* interface IDTFilterConfig */
/* [unique][helpstring][uuid][object][restricted] */
EXTERN_C const IID IID_IDTFilterConfig;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("C4C4C4D2-0049-4E2B-98FB-9537F6CE516D")
IDTFilterConfig : public IUnknown
{
public:
virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetSecureChannelObject(
/* [out] */ __RPC__deref_out_opt IUnknown **ppUnkDRMSecureChannel) = 0;
};
#else /* C style interface */
typedef struct IDTFilterConfigVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in IDTFilterConfig * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in IDTFilterConfig * This);
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in IDTFilterConfig * This);
/* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetSecureChannelObject )(
__RPC__in IDTFilterConfig * This,
/* [out] */ __RPC__deref_out_opt IUnknown **ppUnkDRMSecureChannel);
END_INTERFACE
} IDTFilterConfigVtbl;
interface IDTFilterConfig
{
CONST_VTBL struct IDTFilterConfigVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IDTFilterConfig_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IDTFilterConfig_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IDTFilterConfig_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IDTFilterConfig_GetSecureChannelObject(This,ppUnkDRMSecureChannel) \
( (This)->lpVtbl -> GetSecureChannelObject(This,ppUnkDRMSecureChannel) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __IDTFilterConfig_INTERFACE_DEFINED__ */
#ifndef __IXDSCodecConfig_INTERFACE_DEFINED__
#define __IXDSCodecConfig_INTERFACE_DEFINED__
/* interface IXDSCodecConfig */
/* [unique][helpstring][uuid][object] */
EXTERN_C const IID IID_IXDSCodecConfig;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("C4C4C4D3-0049-4E2B-98FB-9537F6CE516D")
IXDSCodecConfig : public IUnknown
{
public:
virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetSecureChannelObject(
/* [out] */ __RPC__deref_out_opt IUnknown **ppUnkDRMSecureChannel) = 0;
virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE SetPauseBufferTime(
/* [in] */ DWORD dwPauseBufferTime) = 0;
};
#else /* C style interface */
typedef struct IXDSCodecConfigVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in IXDSCodecConfig * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in IXDSCodecConfig * This);
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in IXDSCodecConfig * This);
/* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetSecureChannelObject )(
__RPC__in IXDSCodecConfig * This,
/* [out] */ __RPC__deref_out_opt IUnknown **ppUnkDRMSecureChannel);
/* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetPauseBufferTime )(
__RPC__in IXDSCodecConfig * This,
/* [in] */ DWORD dwPauseBufferTime);
END_INTERFACE
} IXDSCodecConfigVtbl;
interface IXDSCodecConfig
{
CONST_VTBL struct IXDSCodecConfigVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IXDSCodecConfig_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IXDSCodecConfig_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IXDSCodecConfig_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IXDSCodecConfig_GetSecureChannelObject(This,ppUnkDRMSecureChannel) \
( (This)->lpVtbl -> GetSecureChannelObject(This,ppUnkDRMSecureChannel) )
#define IXDSCodecConfig_SetPauseBufferTime(This,dwPauseBufferTime) \
( (This)->lpVtbl -> SetPauseBufferTime(This,dwPauseBufferTime) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __IXDSCodecConfig_INTERFACE_DEFINED__ */
#ifndef __IDTFilterLicenseRenewal_INTERFACE_DEFINED__
#define __IDTFilterLicenseRenewal_INTERFACE_DEFINED__
/* interface IDTFilterLicenseRenewal */
/* [unique][helpstring][uuid][object] */
EXTERN_C const IID IID_IDTFilterLicenseRenewal;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("8A78B317-E405-4a43-994A-620D8F5CE25E")
IDTFilterLicenseRenewal : public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE GetLicenseRenewalData(
/* [out] */ __RPC__deref_out_opt LPWSTR *ppwszFileName,
/* [out] */ __RPC__deref_out_opt LPWSTR *ppwszExpiredKid,
/* [out] */ __RPC__deref_out_opt LPWSTR *ppwszTunerId) = 0;
};
#else /* C style interface */
typedef struct IDTFilterLicenseRenewalVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in IDTFilterLicenseRenewal * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in IDTFilterLicenseRenewal * This);
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in IDTFilterLicenseRenewal * This);
HRESULT ( STDMETHODCALLTYPE *GetLicenseRenewalData )(
__RPC__in IDTFilterLicenseRenewal * This,
/* [out] */ __RPC__deref_out_opt LPWSTR *ppwszFileName,
/* [out] */ __RPC__deref_out_opt LPWSTR *ppwszExpiredKid,
/* [out] */ __RPC__deref_out_opt LPWSTR *ppwszTunerId);
END_INTERFACE
} IDTFilterLicenseRenewalVtbl;
interface IDTFilterLicenseRenewal
{
CONST_VTBL struct IDTFilterLicenseRenewalVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IDTFilterLicenseRenewal_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IDTFilterLicenseRenewal_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IDTFilterLicenseRenewal_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IDTFilterLicenseRenewal_GetLicenseRenewalData(This,ppwszFileName,ppwszExpiredKid,ppwszTunerId) \
( (This)->lpVtbl -> GetLicenseRenewalData(This,ppwszFileName,ppwszExpiredKid,ppwszTunerId) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __IDTFilterLicenseRenewal_INTERFACE_DEFINED__ */
#ifndef __IPTFilterLicenseRenewal_INTERFACE_DEFINED__
#define __IPTFilterLicenseRenewal_INTERFACE_DEFINED__
/* interface IPTFilterLicenseRenewal */
/* [unique][helpstring][uuid][object] */
EXTERN_C const IID IID_IPTFilterLicenseRenewal;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("26D836A5-0C15-44c7-AC59-B0DA8728F240")
IPTFilterLicenseRenewal : public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE RenewLicenses(
/* [in] */ __RPC__in WCHAR *wszFileName,
/* [in] */ __RPC__in WCHAR *wszExpiredKid,
/* [in] */ DWORD dwCallersId,
/* [in] */ BOOL bHighPriority) = 0;
virtual HRESULT STDMETHODCALLTYPE CancelLicenseRenewal( void) = 0;
};
#else /* C style interface */
typedef struct IPTFilterLicenseRenewalVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in IPTFilterLicenseRenewal * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in IPTFilterLicenseRenewal * This);
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in IPTFilterLicenseRenewal * This);
HRESULT ( STDMETHODCALLTYPE *RenewLicenses )(
__RPC__in IPTFilterLicenseRenewal * This,
/* [in] */ __RPC__in WCHAR *wszFileName,
/* [in] */ __RPC__in WCHAR *wszExpiredKid,
/* [in] */ DWORD dwCallersId,
/* [in] */ BOOL bHighPriority);
HRESULT ( STDMETHODCALLTYPE *CancelLicenseRenewal )(
__RPC__in IPTFilterLicenseRenewal * This);
END_INTERFACE
} IPTFilterLicenseRenewalVtbl;
interface IPTFilterLicenseRenewal
{
CONST_VTBL struct IPTFilterLicenseRenewalVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IPTFilterLicenseRenewal_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IPTFilterLicenseRenewal_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IPTFilterLicenseRenewal_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IPTFilterLicenseRenewal_RenewLicenses(This,wszFileName,wszExpiredKid,dwCallersId,bHighPriority) \
( (This)->lpVtbl -> RenewLicenses(This,wszFileName,wszExpiredKid,dwCallersId,bHighPriority) )
#define IPTFilterLicenseRenewal_CancelLicenseRenewal(This) \
( (This)->lpVtbl -> CancelLicenseRenewal(This) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __IPTFilterLicenseRenewal_INTERFACE_DEFINED__ */
#ifndef __IMceBurnerControl_INTERFACE_DEFINED__
#define __IMceBurnerControl_INTERFACE_DEFINED__
/* interface IMceBurnerControl */
/* [unique][helpstring][uuid][object] */
EXTERN_C const IID IID_IMceBurnerControl;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("5A86B91A-E71E-46c1-88A9-9BB338710552")
IMceBurnerControl : public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE GetBurnerNoDecryption( void) = 0;
};
#else /* C style interface */
typedef struct IMceBurnerControlVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in IMceBurnerControl * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in IMceBurnerControl * This);
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in IMceBurnerControl * This);
HRESULT ( STDMETHODCALLTYPE *GetBurnerNoDecryption )(
__RPC__in IMceBurnerControl * This);
END_INTERFACE
} IMceBurnerControlVtbl;
interface IMceBurnerControl
{
CONST_VTBL struct IMceBurnerControlVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IMceBurnerControl_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IMceBurnerControl_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IMceBurnerControl_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IMceBurnerControl_GetBurnerNoDecryption(This) \
( (This)->lpVtbl -> GetBurnerNoDecryption(This) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __IMceBurnerControl_INTERFACE_DEFINED__ */
#ifndef __EncDec_LIBRARY_DEFINED__
#define __EncDec_LIBRARY_DEFINED__
/* library EncDec */
/* [helpstring][version][uuid] */
EXTERN_C const IID LIBID_EncDec;
#ifndef __IETFilter_INTERFACE_DEFINED__
#define __IETFilter_INTERFACE_DEFINED__
/* interface IETFilter */
/* [unique][helpstring][uuid][object] */
EXTERN_C const IID IID_IETFilter;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("C4C4C4B1-0049-4E2B-98FB-9537F6CE516D")
IETFilter : public IUnknown
{
public:
virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_EvalRatObjOK(
/* [retval][out] */ __RPC__out HRESULT *pHrCoCreateRetVal) = 0;
virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetCurrRating(
/* [out] */ __RPC__out EnTvRat_System *pEnSystem,
/* [out] */ __RPC__out EnTvRat_GenericLevel *pEnRating,
/* [out] */ __RPC__out LONG *plbfEnAttr) = 0;
virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetCurrLicenseExpDate(
/* [in] */ __RPC__in ProtType *protType,
/* [out] */ __RPC__out long *lpDateTime) = 0;
virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetLastErrorCode( void) = 0;
virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE SetRecordingOn(
BOOL fRecState) = 0;
};
#else /* C style interface */
typedef struct IETFilterVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in IETFilter * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in IETFilter * This);
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in IETFilter * This);
/* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_EvalRatObjOK )(
__RPC__in IETFilter * This,
/* [retval][out] */ __RPC__out HRESULT *pHrCoCreateRetVal);
/* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetCurrRating )(
__RPC__in IETFilter * This,
/* [out] */ __RPC__out EnTvRat_System *pEnSystem,
/* [out] */ __RPC__out EnTvRat_GenericLevel *pEnRating,
/* [out] */ __RPC__out LONG *plbfEnAttr);
/* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetCurrLicenseExpDate )(
__RPC__in IETFilter * This,
/* [in] */ __RPC__in ProtType *protType,
/* [out] */ __RPC__out long *lpDateTime);
/* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetLastErrorCode )(
__RPC__in IETFilter * This);
/* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetRecordingOn )(
__RPC__in IETFilter * This,
BOOL fRecState);
END_INTERFACE
} IETFilterVtbl;
interface IETFilter
{
CONST_VTBL struct IETFilterVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IETFilter_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IETFilter_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IETFilter_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IETFilter_get_EvalRatObjOK(This,pHrCoCreateRetVal) \
( (This)->lpVtbl -> get_EvalRatObjOK(This,pHrCoCreateRetVal) )
#define IETFilter_GetCurrRating(This,pEnSystem,pEnRating,plbfEnAttr) \
( (This)->lpVtbl -> GetCurrRating(This,pEnSystem,pEnRating,plbfEnAttr) )
#define IETFilter_GetCurrLicenseExpDate(This,protType,lpDateTime) \
( (This)->lpVtbl -> GetCurrLicenseExpDate(This,protType,lpDateTime) )
#define IETFilter_GetLastErrorCode(This) \
( (This)->lpVtbl -> GetLastErrorCode(This) )
#define IETFilter_SetRecordingOn(This,fRecState) \
( (This)->lpVtbl -> SetRecordingOn(This,fRecState) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __IETFilter_INTERFACE_DEFINED__ */
#ifndef __IETFilterEvents_DISPINTERFACE_DEFINED__
#define __IETFilterEvents_DISPINTERFACE_DEFINED__
/* dispinterface IETFilterEvents */
/* [helpstring][uuid] */
EXTERN_C const IID DIID_IETFilterEvents;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("C4C4C4C1-0049-4E2B-98FB-9537F6CE516D")
IETFilterEvents : public IDispatch
{
};
#else /* C style interface */
typedef struct IETFilterEventsVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in IETFilterEvents * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in IETFilterEvents * This);
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in IETFilterEvents * This);
HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )(
__RPC__in IETFilterEvents * This,
/* [out] */ __RPC__out UINT *pctinfo);
HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )(
__RPC__in IETFilterEvents * This,
/* [in] */ UINT iTInfo,
/* [in] */ LCID lcid,
/* [out] */ __RPC__deref_out_opt ITypeInfo **ppTInfo);
HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )(
__RPC__in IETFilterEvents * This,
/* [in] */ __RPC__in REFIID riid,
/* [size_is][in] */ __RPC__in_ecount_full(cNames) LPOLESTR *rgszNames,
/* [range][in] */ __RPC__in_range(0,16384) UINT cNames,
/* [in] */ LCID lcid,
/* [size_is][out] */ __RPC__out_ecount_full(cNames) DISPID *rgDispId);
/* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )(
IETFilterEvents * This,
/* [annotation][in] */
_In_ DISPID dispIdMember,
/* [annotation][in] */
_In_ REFIID riid,
/* [annotation][in] */
_In_ LCID lcid,
/* [annotation][in] */
_In_ WORD wFlags,
/* [annotation][out][in] */
_In_ DISPPARAMS *pDispParams,
/* [annotation][out] */
_Out_opt_ VARIANT *pVarResult,
/* [annotation][out] */
_Out_opt_ EXCEPINFO *pExcepInfo,
/* [annotation][out] */
_Out_opt_ UINT *puArgErr);
END_INTERFACE
} IETFilterEventsVtbl;
interface IETFilterEvents
{
CONST_VTBL struct IETFilterEventsVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IETFilterEvents_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IETFilterEvents_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IETFilterEvents_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IETFilterEvents_GetTypeInfoCount(This,pctinfo) \
( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) )
#define IETFilterEvents_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \
( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) )
#define IETFilterEvents_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \
( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) )
#define IETFilterEvents_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \
( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __IETFilterEvents_DISPINTERFACE_DEFINED__ */
EXTERN_C const CLSID CLSID_ETFilter;
#ifdef __cplusplus
class DECLSPEC_UUID("C4C4C4F1-0049-4E2B-98FB-9537F6CE516D")
ETFilter;
#endif
#ifndef __IDTFilter_INTERFACE_DEFINED__
#define __IDTFilter_INTERFACE_DEFINED__
/* interface IDTFilter */
/* [unique][helpstring][uuid][object] */
EXTERN_C const IID IID_IDTFilter;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("C4C4C4B2-0049-4E2B-98FB-9537F6CE516D")
IDTFilter : public IUnknown
{
public:
virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_EvalRatObjOK(
/* [retval][out] */ __RPC__out HRESULT *pHrCoCreateRetVal) = 0;
virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetCurrRating(
/* [out] */ __RPC__out EnTvRat_System *pEnSystem,
/* [out] */ __RPC__out EnTvRat_GenericLevel *pEnRating,
/* [out] */ __RPC__out LONG *plbfEnAttr) = 0;
virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_BlockedRatingAttributes(
/* [in] */ EnTvRat_System enSystem,
/* [in] */ EnTvRat_GenericLevel enLevel,
/* [retval][out] */ __RPC__out LONG *plbfEnAttr) = 0;
virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_BlockedRatingAttributes(
/* [in] */ EnTvRat_System enSystem,
/* [in] */ EnTvRat_GenericLevel enLevel,
/* [in] */ LONG lbfAttrs) = 0;
virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_BlockUnRated(
/* [retval][out] */ __RPC__out BOOL *pfBlockUnRatedShows) = 0;
virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_BlockUnRated(
/* [in] */ BOOL fBlockUnRatedShows) = 0;
virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_BlockUnRatedDelay(
/* [retval][out] */ __RPC__out LONG *pmsecsDelayBeforeBlock) = 0;
virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_BlockUnRatedDelay(
/* [in] */ LONG msecsDelayBeforeBlock) = 0;
};
#else /* C style interface */
typedef struct IDTFilterVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in IDTFilter * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in IDTFilter * This);
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in IDTFilter * This);
/* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_EvalRatObjOK )(
__RPC__in IDTFilter * This,
/* [retval][out] */ __RPC__out HRESULT *pHrCoCreateRetVal);
/* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetCurrRating )(
__RPC__in IDTFilter * This,
/* [out] */ __RPC__out EnTvRat_System *pEnSystem,
/* [out] */ __RPC__out EnTvRat_GenericLevel *pEnRating,
/* [out] */ __RPC__out LONG *plbfEnAttr);
/* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_BlockedRatingAttributes )(
__RPC__in IDTFilter * This,
/* [in] */ EnTvRat_System enSystem,
/* [in] */ EnTvRat_GenericLevel enLevel,
/* [retval][out] */ __RPC__out LONG *plbfEnAttr);
/* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_BlockedRatingAttributes )(
__RPC__in IDTFilter * This,
/* [in] */ EnTvRat_System enSystem,
/* [in] */ EnTvRat_GenericLevel enLevel,
/* [in] */ LONG lbfAttrs);
/* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_BlockUnRated )(
__RPC__in IDTFilter * This,
/* [retval][out] */ __RPC__out BOOL *pfBlockUnRatedShows);
/* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_BlockUnRated )(
__RPC__in IDTFilter * This,
/* [in] */ BOOL fBlockUnRatedShows);
/* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_BlockUnRatedDelay )(
__RPC__in IDTFilter * This,
/* [retval][out] */ __RPC__out LONG *pmsecsDelayBeforeBlock);
/* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_BlockUnRatedDelay )(
__RPC__in IDTFilter * This,
/* [in] */ LONG msecsDelayBeforeBlock);
END_INTERFACE
} IDTFilterVtbl;
interface IDTFilter
{
CONST_VTBL struct IDTFilterVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IDTFilter_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IDTFilter_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IDTFilter_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IDTFilter_get_EvalRatObjOK(This,pHrCoCreateRetVal) \
( (This)->lpVtbl -> get_EvalRatObjOK(This,pHrCoCreateRetVal) )
#define IDTFilter_GetCurrRating(This,pEnSystem,pEnRating,plbfEnAttr) \
( (This)->lpVtbl -> GetCurrRating(This,pEnSystem,pEnRating,plbfEnAttr) )
#define IDTFilter_get_BlockedRatingAttributes(This,enSystem,enLevel,plbfEnAttr) \
( (This)->lpVtbl -> get_BlockedRatingAttributes(This,enSystem,enLevel,plbfEnAttr) )
#define IDTFilter_put_BlockedRatingAttributes(This,enSystem,enLevel,lbfAttrs) \
( (This)->lpVtbl -> put_BlockedRatingAttributes(This,enSystem,enLevel,lbfAttrs) )
#define IDTFilter_get_BlockUnRated(This,pfBlockUnRatedShows) \
( (This)->lpVtbl -> get_BlockUnRated(This,pfBlockUnRatedShows) )
#define IDTFilter_put_BlockUnRated(This,fBlockUnRatedShows) \
( (This)->lpVtbl -> put_BlockUnRated(This,fBlockUnRatedShows) )
#define IDTFilter_get_BlockUnRatedDelay(This,pmsecsDelayBeforeBlock) \
( (This)->lpVtbl -> get_BlockUnRatedDelay(This,pmsecsDelayBeforeBlock) )
#define IDTFilter_put_BlockUnRatedDelay(This,msecsDelayBeforeBlock) \
( (This)->lpVtbl -> put_BlockUnRatedDelay(This,msecsDelayBeforeBlock) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __IDTFilter_INTERFACE_DEFINED__ */
#ifndef __IDTFilter2_INTERFACE_DEFINED__
#define __IDTFilter2_INTERFACE_DEFINED__
/* interface IDTFilter2 */
/* [unique][helpstring][uuid][object] */
EXTERN_C const IID IID_IDTFilter2;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("C4C4C4B4-0049-4E2B-98FB-9537F6CE516D")
IDTFilter2 : public IDTFilter
{
public:
virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_ChallengeUrl(
/* [out] */ __RPC__deref_out_opt BSTR *pbstrChallengeUrl) = 0;
virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetCurrLicenseExpDate(
/* [in] */ __RPC__in ProtType *protType,
/* [out] */ __RPC__out long *lpDateTime) = 0;
virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetLastErrorCode( void) = 0;
};
#else /* C style interface */
typedef struct IDTFilter2Vtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in IDTFilter2 * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in IDTFilter2 * This);
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in IDTFilter2 * This);
/* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_EvalRatObjOK )(
__RPC__in IDTFilter2 * This,
/* [retval][out] */ __RPC__out HRESULT *pHrCoCreateRetVal);
/* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetCurrRating )(
__RPC__in IDTFilter2 * This,
/* [out] */ __RPC__out EnTvRat_System *pEnSystem,
/* [out] */ __RPC__out EnTvRat_GenericLevel *pEnRating,
/* [out] */ __RPC__out LONG *plbfEnAttr);
/* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_BlockedRatingAttributes )(
__RPC__in IDTFilter2 * This,
/* [in] */ EnTvRat_System enSystem,
/* [in] */ EnTvRat_GenericLevel enLevel,
/* [retval][out] */ __RPC__out LONG *plbfEnAttr);
/* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_BlockedRatingAttributes )(
__RPC__in IDTFilter2 * This,
/* [in] */ EnTvRat_System enSystem,
/* [in] */ EnTvRat_GenericLevel enLevel,
/* [in] */ LONG lbfAttrs);
/* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_BlockUnRated )(
__RPC__in IDTFilter2 * This,
/* [retval][out] */ __RPC__out BOOL *pfBlockUnRatedShows);
/* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_BlockUnRated )(
__RPC__in IDTFilter2 * This,
/* [in] */ BOOL fBlockUnRatedShows);
/* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_BlockUnRatedDelay )(
__RPC__in IDTFilter2 * This,
/* [retval][out] */ __RPC__out LONG *pmsecsDelayBeforeBlock);
/* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_BlockUnRatedDelay )(
__RPC__in IDTFilter2 * This,
/* [in] */ LONG msecsDelayBeforeBlock);
/* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_ChallengeUrl )(
__RPC__in IDTFilter2 * This,
/* [out] */ __RPC__deref_out_opt BSTR *pbstrChallengeUrl);
/* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetCurrLicenseExpDate )(
__RPC__in IDTFilter2 * This,
/* [in] */ __RPC__in ProtType *protType,
/* [out] */ __RPC__out long *lpDateTime);
/* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetLastErrorCode )(
__RPC__in IDTFilter2 * This);
END_INTERFACE
} IDTFilter2Vtbl;
interface IDTFilter2
{
CONST_VTBL struct IDTFilter2Vtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IDTFilter2_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IDTFilter2_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IDTFilter2_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IDTFilter2_get_EvalRatObjOK(This,pHrCoCreateRetVal) \
( (This)->lpVtbl -> get_EvalRatObjOK(This,pHrCoCreateRetVal) )
#define IDTFilter2_GetCurrRating(This,pEnSystem,pEnRating,plbfEnAttr) \
( (This)->lpVtbl -> GetCurrRating(This,pEnSystem,pEnRating,plbfEnAttr) )
#define IDTFilter2_get_BlockedRatingAttributes(This,enSystem,enLevel,plbfEnAttr) \
( (This)->lpVtbl -> get_BlockedRatingAttributes(This,enSystem,enLevel,plbfEnAttr) )
#define IDTFilter2_put_BlockedRatingAttributes(This,enSystem,enLevel,lbfAttrs) \
( (This)->lpVtbl -> put_BlockedRatingAttributes(This,enSystem,enLevel,lbfAttrs) )
#define IDTFilter2_get_BlockUnRated(This,pfBlockUnRatedShows) \
( (This)->lpVtbl -> get_BlockUnRated(This,pfBlockUnRatedShows) )
#define IDTFilter2_put_BlockUnRated(This,fBlockUnRatedShows) \
( (This)->lpVtbl -> put_BlockUnRated(This,fBlockUnRatedShows) )
#define IDTFilter2_get_BlockUnRatedDelay(This,pmsecsDelayBeforeBlock) \
( (This)->lpVtbl -> get_BlockUnRatedDelay(This,pmsecsDelayBeforeBlock) )
#define IDTFilter2_put_BlockUnRatedDelay(This,msecsDelayBeforeBlock) \
( (This)->lpVtbl -> put_BlockUnRatedDelay(This,msecsDelayBeforeBlock) )
#define IDTFilter2_get_ChallengeUrl(This,pbstrChallengeUrl) \
( (This)->lpVtbl -> get_ChallengeUrl(This,pbstrChallengeUrl) )
#define IDTFilter2_GetCurrLicenseExpDate(This,protType,lpDateTime) \
( (This)->lpVtbl -> GetCurrLicenseExpDate(This,protType,lpDateTime) )
#define IDTFilter2_GetLastErrorCode(This) \
( (This)->lpVtbl -> GetLastErrorCode(This) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __IDTFilter2_INTERFACE_DEFINED__ */
#ifndef __IDTFilter3_INTERFACE_DEFINED__
#define __IDTFilter3_INTERFACE_DEFINED__
/* interface IDTFilter3 */
/* [unique][helpstring][uuid][object] */
EXTERN_C const IID IID_IDTFilter3;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("513998cc-e929-4cdf-9fbd-bad1e0314866")
IDTFilter3 : public IDTFilter2
{
public:
virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetProtectionType(
/* [out] */ __RPC__out ProtType *pProtectionType) = 0;
virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE LicenseHasExpirationDate(
/* [out] */ __RPC__out BOOL *pfLicenseHasExpirationDate) = 0;
virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE SetRights(
/* [in] */ __RPC__in BSTR bstrRights) = 0;
};
#else /* C style interface */
typedef struct IDTFilter3Vtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in IDTFilter3 * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in IDTFilter3 * This);
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in IDTFilter3 * This);
/* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_EvalRatObjOK )(
__RPC__in IDTFilter3 * This,
/* [retval][out] */ __RPC__out HRESULT *pHrCoCreateRetVal);
/* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetCurrRating )(
__RPC__in IDTFilter3 * This,
/* [out] */ __RPC__out EnTvRat_System *pEnSystem,
/* [out] */ __RPC__out EnTvRat_GenericLevel *pEnRating,
/* [out] */ __RPC__out LONG *plbfEnAttr);
/* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_BlockedRatingAttributes )(
__RPC__in IDTFilter3 * This,
/* [in] */ EnTvRat_System enSystem,
/* [in] */ EnTvRat_GenericLevel enLevel,
/* [retval][out] */ __RPC__out LONG *plbfEnAttr);
/* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_BlockedRatingAttributes )(
__RPC__in IDTFilter3 * This,
/* [in] */ EnTvRat_System enSystem,
/* [in] */ EnTvRat_GenericLevel enLevel,
/* [in] */ LONG lbfAttrs);
/* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_BlockUnRated )(
__RPC__in IDTFilter3 * This,
/* [retval][out] */ __RPC__out BOOL *pfBlockUnRatedShows);
/* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_BlockUnRated )(
__RPC__in IDTFilter3 * This,
/* [in] */ BOOL fBlockUnRatedShows);
/* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_BlockUnRatedDelay )(
__RPC__in IDTFilter3 * This,
/* [retval][out] */ __RPC__out LONG *pmsecsDelayBeforeBlock);
/* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_BlockUnRatedDelay )(
__RPC__in IDTFilter3 * This,
/* [in] */ LONG msecsDelayBeforeBlock);
/* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_ChallengeUrl )(
__RPC__in IDTFilter3 * This,
/* [out] */ __RPC__deref_out_opt BSTR *pbstrChallengeUrl);
/* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetCurrLicenseExpDate )(
__RPC__in IDTFilter3 * This,
/* [in] */ __RPC__in ProtType *protType,
/* [out] */ __RPC__out long *lpDateTime);
/* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetLastErrorCode )(
__RPC__in IDTFilter3 * This);
/* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetProtectionType )(
__RPC__in IDTFilter3 * This,
/* [out] */ __RPC__out ProtType *pProtectionType);
/* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *LicenseHasExpirationDate )(
__RPC__in IDTFilter3 * This,
/* [out] */ __RPC__out BOOL *pfLicenseHasExpirationDate);
/* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetRights )(
__RPC__in IDTFilter3 * This,
/* [in] */ __RPC__in BSTR bstrRights);
END_INTERFACE
} IDTFilter3Vtbl;
interface IDTFilter3
{
CONST_VTBL struct IDTFilter3Vtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IDTFilter3_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IDTFilter3_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IDTFilter3_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IDTFilter3_get_EvalRatObjOK(This,pHrCoCreateRetVal) \
( (This)->lpVtbl -> get_EvalRatObjOK(This,pHrCoCreateRetVal) )
#define IDTFilter3_GetCurrRating(This,pEnSystem,pEnRating,plbfEnAttr) \
( (This)->lpVtbl -> GetCurrRating(This,pEnSystem,pEnRating,plbfEnAttr) )
#define IDTFilter3_get_BlockedRatingAttributes(This,enSystem,enLevel,plbfEnAttr) \
( (This)->lpVtbl -> get_BlockedRatingAttributes(This,enSystem,enLevel,plbfEnAttr) )
#define IDTFilter3_put_BlockedRatingAttributes(This,enSystem,enLevel,lbfAttrs) \
( (This)->lpVtbl -> put_BlockedRatingAttributes(This,enSystem,enLevel,lbfAttrs) )
#define IDTFilter3_get_BlockUnRated(This,pfBlockUnRatedShows) \
( (This)->lpVtbl -> get_BlockUnRated(This,pfBlockUnRatedShows) )
#define IDTFilter3_put_BlockUnRated(This,fBlockUnRatedShows) \
( (This)->lpVtbl -> put_BlockUnRated(This,fBlockUnRatedShows) )
#define IDTFilter3_get_BlockUnRatedDelay(This,pmsecsDelayBeforeBlock) \
( (This)->lpVtbl -> get_BlockUnRatedDelay(This,pmsecsDelayBeforeBlock) )
#define IDTFilter3_put_BlockUnRatedDelay(This,msecsDelayBeforeBlock) \
( (This)->lpVtbl -> put_BlockUnRatedDelay(This,msecsDelayBeforeBlock) )
#define IDTFilter3_get_ChallengeUrl(This,pbstrChallengeUrl) \
( (This)->lpVtbl -> get_ChallengeUrl(This,pbstrChallengeUrl) )
#define IDTFilter3_GetCurrLicenseExpDate(This,protType,lpDateTime) \
( (This)->lpVtbl -> GetCurrLicenseExpDate(This,protType,lpDateTime) )
#define IDTFilter3_GetLastErrorCode(This) \
( (This)->lpVtbl -> GetLastErrorCode(This) )
#define IDTFilter3_GetProtectionType(This,pProtectionType) \
( (This)->lpVtbl -> GetProtectionType(This,pProtectionType) )
#define IDTFilter3_LicenseHasExpirationDate(This,pfLicenseHasExpirationDate) \
( (This)->lpVtbl -> LicenseHasExpirationDate(This,pfLicenseHasExpirationDate) )
#define IDTFilter3_SetRights(This,bstrRights) \
( (This)->lpVtbl -> SetRights(This,bstrRights) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __IDTFilter3_INTERFACE_DEFINED__ */
#ifndef __IDTFilterEvents_DISPINTERFACE_DEFINED__
#define __IDTFilterEvents_DISPINTERFACE_DEFINED__
/* dispinterface IDTFilterEvents */
/* [helpstring][uuid] */
EXTERN_C const IID DIID_IDTFilterEvents;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("C4C4C4C2-0049-4E2B-98FB-9537F6CE516D")
IDTFilterEvents : public IDispatch
{
};
#else /* C style interface */
typedef struct IDTFilterEventsVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in IDTFilterEvents * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in IDTFilterEvents * This);
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in IDTFilterEvents * This);
HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )(
__RPC__in IDTFilterEvents * This,
/* [out] */ __RPC__out UINT *pctinfo);
HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )(
__RPC__in IDTFilterEvents * This,
/* [in] */ UINT iTInfo,
/* [in] */ LCID lcid,
/* [out] */ __RPC__deref_out_opt ITypeInfo **ppTInfo);
HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )(
__RPC__in IDTFilterEvents * This,
/* [in] */ __RPC__in REFIID riid,
/* [size_is][in] */ __RPC__in_ecount_full(cNames) LPOLESTR *rgszNames,
/* [range][in] */ __RPC__in_range(0,16384) UINT cNames,
/* [in] */ LCID lcid,
/* [size_is][out] */ __RPC__out_ecount_full(cNames) DISPID *rgDispId);
/* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )(
IDTFilterEvents * This,
/* [annotation][in] */
_In_ DISPID dispIdMember,
/* [annotation][in] */
_In_ REFIID riid,
/* [annotation][in] */
_In_ LCID lcid,
/* [annotation][in] */
_In_ WORD wFlags,
/* [annotation][out][in] */
_In_ DISPPARAMS *pDispParams,
/* [annotation][out] */
_Out_opt_ VARIANT *pVarResult,
/* [annotation][out] */
_Out_opt_ EXCEPINFO *pExcepInfo,
/* [annotation][out] */
_Out_opt_ UINT *puArgErr);
END_INTERFACE
} IDTFilterEventsVtbl;
interface IDTFilterEvents
{
CONST_VTBL struct IDTFilterEventsVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IDTFilterEvents_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IDTFilterEvents_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IDTFilterEvents_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IDTFilterEvents_GetTypeInfoCount(This,pctinfo) \
( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) )
#define IDTFilterEvents_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \
( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) )
#define IDTFilterEvents_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \
( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) )
#define IDTFilterEvents_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \
( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __IDTFilterEvents_DISPINTERFACE_DEFINED__ */
EXTERN_C const CLSID CLSID_DTFilter;
#ifdef __cplusplus
class DECLSPEC_UUID("C4C4C4F2-0049-4E2B-98FB-9537F6CE516D")
DTFilter;
#endif
#ifndef __IXDSCodec_INTERFACE_DEFINED__
#define __IXDSCodec_INTERFACE_DEFINED__
/* interface IXDSCodec */
/* [unique][helpstring][uuid][object] */
EXTERN_C const IID IID_IXDSCodec;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("C4C4C4B3-0049-4E2B-98FB-9537F6CE516D")
IXDSCodec : public IUnknown
{
public:
virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_XDSToRatObjOK(
/* [retval][out] */ __RPC__out HRESULT *pHrCoCreateRetVal) = 0;
virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_CCSubstreamService(
/* [in] */ long SubstreamMask) = 0;
virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_CCSubstreamService(
/* [retval][out] */ __RPC__out long *pSubstreamMask) = 0;
virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetContentAdvisoryRating(
/* [out] */ __RPC__out PackedTvRating *pRat,
/* [out] */ __RPC__out long *pPktSeqID,
/* [out] */ __RPC__out long *pCallSeqID,
/* [out] */ __RPC__out REFERENCE_TIME *pTimeStart,
/* [out] */ __RPC__out REFERENCE_TIME *pTimeEnd) = 0;
virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetXDSPacket(
/* [out] */ __RPC__out long *pXDSClassPkt,
/* [out] */ __RPC__out long *pXDSTypePkt,
/* [out] */ __RPC__deref_out_opt BSTR *pBstrXDSPkt,
/* [out] */ __RPC__out long *pPktSeqID,
/* [out] */ __RPC__out long *pCallSeqID,
/* [out] */ __RPC__out REFERENCE_TIME *pTimeStart,
/* [out] */ __RPC__out REFERENCE_TIME *pTimeEnd) = 0;
virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetCurrLicenseExpDate(
/* [in] */ __RPC__in ProtType *protType,
/* [out] */ __RPC__out long *lpDateTime) = 0;
virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetLastErrorCode( void) = 0;
};
#else /* C style interface */
typedef struct IXDSCodecVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in IXDSCodec * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in IXDSCodec * This);
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in IXDSCodec * This);
/* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_XDSToRatObjOK )(
__RPC__in IXDSCodec * This,
/* [retval][out] */ __RPC__out HRESULT *pHrCoCreateRetVal);
/* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_CCSubstreamService )(
__RPC__in IXDSCodec * This,
/* [in] */ long SubstreamMask);
/* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_CCSubstreamService )(
__RPC__in IXDSCodec * This,
/* [retval][out] */ __RPC__out long *pSubstreamMask);
/* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetContentAdvisoryRating )(
__RPC__in IXDSCodec * This,
/* [out] */ __RPC__out PackedTvRating *pRat,
/* [out] */ __RPC__out long *pPktSeqID,
/* [out] */ __RPC__out long *pCallSeqID,
/* [out] */ __RPC__out REFERENCE_TIME *pTimeStart,
/* [out] */ __RPC__out REFERENCE_TIME *pTimeEnd);
/* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetXDSPacket )(
__RPC__in IXDSCodec * This,
/* [out] */ __RPC__out long *pXDSClassPkt,
/* [out] */ __RPC__out long *pXDSTypePkt,
/* [out] */ __RPC__deref_out_opt BSTR *pBstrXDSPkt,
/* [out] */ __RPC__out long *pPktSeqID,
/* [out] */ __RPC__out long *pCallSeqID,
/* [out] */ __RPC__out REFERENCE_TIME *pTimeStart,
/* [out] */ __RPC__out REFERENCE_TIME *pTimeEnd);
/* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetCurrLicenseExpDate )(
__RPC__in IXDSCodec * This,
/* [in] */ __RPC__in ProtType *protType,
/* [out] */ __RPC__out long *lpDateTime);
/* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetLastErrorCode )(
__RPC__in IXDSCodec * This);
END_INTERFACE
} IXDSCodecVtbl;
interface IXDSCodec
{
CONST_VTBL struct IXDSCodecVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IXDSCodec_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IXDSCodec_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IXDSCodec_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IXDSCodec_get_XDSToRatObjOK(This,pHrCoCreateRetVal) \
( (This)->lpVtbl -> get_XDSToRatObjOK(This,pHrCoCreateRetVal) )
#define IXDSCodec_put_CCSubstreamService(This,SubstreamMask) \
( (This)->lpVtbl -> put_CCSubstreamService(This,SubstreamMask) )
#define IXDSCodec_get_CCSubstreamService(This,pSubstreamMask) \
( (This)->lpVtbl -> get_CCSubstreamService(This,pSubstreamMask) )
#define IXDSCodec_GetContentAdvisoryRating(This,pRat,pPktSeqID,pCallSeqID,pTimeStart,pTimeEnd) \
( (This)->lpVtbl -> GetContentAdvisoryRating(This,pRat,pPktSeqID,pCallSeqID,pTimeStart,pTimeEnd) )
#define IXDSCodec_GetXDSPacket(This,pXDSClassPkt,pXDSTypePkt,pBstrXDSPkt,pPktSeqID,pCallSeqID,pTimeStart,pTimeEnd) \
( (This)->lpVtbl -> GetXDSPacket(This,pXDSClassPkt,pXDSTypePkt,pBstrXDSPkt,pPktSeqID,pCallSeqID,pTimeStart,pTimeEnd) )
#define IXDSCodec_GetCurrLicenseExpDate(This,protType,lpDateTime) \
( (This)->lpVtbl -> GetCurrLicenseExpDate(This,protType,lpDateTime) )
#define IXDSCodec_GetLastErrorCode(This) \
( (This)->lpVtbl -> GetLastErrorCode(This) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __IXDSCodec_INTERFACE_DEFINED__ */
#ifndef __IXDSCodecEvents_DISPINTERFACE_DEFINED__
#define __IXDSCodecEvents_DISPINTERFACE_DEFINED__
/* dispinterface IXDSCodecEvents */
/* [helpstring][uuid] */
EXTERN_C const IID DIID_IXDSCodecEvents;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("C4C4C4C3-0049-4E2B-98FB-9537F6CE516D")
IXDSCodecEvents : public IDispatch
{
};
#else /* C style interface */
typedef struct IXDSCodecEventsVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in IXDSCodecEvents * This,
/* [in] */ __RPC__in REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in IXDSCodecEvents * This);
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in IXDSCodecEvents * This);
HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )(
__RPC__in IXDSCodecEvents * This,
/* [out] */ __RPC__out UINT *pctinfo);
HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )(
__RPC__in IXDSCodecEvents * This,
/* [in] */ UINT iTInfo,
/* [in] */ LCID lcid,
/* [out] */ __RPC__deref_out_opt ITypeInfo **ppTInfo);
HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )(
__RPC__in IXDSCodecEvents * This,
/* [in] */ __RPC__in REFIID riid,
/* [size_is][in] */ __RPC__in_ecount_full(cNames) LPOLESTR *rgszNames,
/* [range][in] */ __RPC__in_range(0,16384) UINT cNames,
/* [in] */ LCID lcid,
/* [size_is][out] */ __RPC__out_ecount_full(cNames) DISPID *rgDispId);
/* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )(
IXDSCodecEvents * This,
/* [annotation][in] */
_In_ DISPID dispIdMember,
/* [annotation][in] */
_In_ REFIID riid,
/* [annotation][in] */
_In_ LCID lcid,
/* [annotation][in] */
_In_ WORD wFlags,
/* [annotation][out][in] */
_In_ DISPPARAMS *pDispParams,
/* [annotation][out] */
_Out_opt_ VARIANT *pVarResult,
/* [annotation][out] */
_Out_opt_ EXCEPINFO *pExcepInfo,
/* [annotation][out] */
_Out_opt_ UINT *puArgErr);
END_INTERFACE
} IXDSCodecEventsVtbl;
interface IXDSCodecEvents
{
CONST_VTBL struct IXDSCodecEventsVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IXDSCodecEvents_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IXDSCodecEvents_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IXDSCodecEvents_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IXDSCodecEvents_GetTypeInfoCount(This,pctinfo) \
( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) )
#define IXDSCodecEvents_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \
( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) )
#define IXDSCodecEvents_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \
( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) )
#define IXDSCodecEvents_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \
( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __IXDSCodecEvents_DISPINTERFACE_DEFINED__ */
EXTERN_C const CLSID CLSID_XDSCodec;
#ifdef __cplusplus
class DECLSPEC_UUID("C4C4C4F3-0049-4E2B-98FB-9537F6CE516D")
XDSCodec;
#endif
EXTERN_C const CLSID CLSID_CXDSData;
#ifdef __cplusplus
class DECLSPEC_UUID("C4C4C4F4-0049-4E2B-98FB-9537F6CE516D")
CXDSData;
#endif
#endif /* __EncDec_LIBRARY_DEFINED__ */
/* interface __MIDL_itf_encdec_0000_0007 */
/* [local] */
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
extern RPC_IF_HANDLE __MIDL_itf_encdec_0000_0007_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_encdec_0000_0007_v0_0_s_ifspec;
/* Additional Prototypes for ALL interfaces */
/* end of Additional Prototypes */
#ifdef __cplusplus
}
#endif
#endif
| [
"NoOne@NoOne.com"
] | NoOne@NoOne.com |
4145a2db46270d799e57a682969b109a6d19a640 | 2719135d828d9f72a4a795d03049516eacfbcd3b | /dxGameEngine/Main.cpp | ea91bccc69c39bb1c089f4a512ac98d6723387f3 | [] | no_license | ratache/dxGameEngine | de6d961325bbe238b943b5e6ae8d1f7442f29013 | b0d5b8f6b664d819f255a82238fa36bfe13da7f1 | refs/heads/master | 2021-01-10T20:51:09.963029 | 2015-03-17T10:56:21 | 2015-03-17T10:56:21 | 32,387,598 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,973 | cpp | #include <time.h>
#include <stdio.h>
#include <windows.h>
#include "Game.h"
#define APPTITLE "dxGameEngine Source Code"
#define SCREEN_WIDTH 800
#define SCREEN_HEIGHT 600
ATOM MyRegisterClass(HINSTANCE);
//entry point for a Windows program
int WINAPI WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
MSG msg;
HWND hWnd;
// register the class
MyRegisterClass(hInstance);
//set up the screen in windowed or fullscreen mode?
DWORD style;
//style = WS_EX_TOPMOST | WS_VISIBLE | WS_POPUP;
style = WS_OVERLAPPED;
//create a new window
hWnd = CreateWindow(
APPTITLE, //window class
APPTITLE, //title bar
style, //window style
CW_USEDEFAULT, //x position of window
CW_USEDEFAULT, //y position of window
SCREEN_WIDTH, //width of the window
SCREEN_HEIGHT, //height of the window
NULL, //parent window
NULL, //menu
hInstance, //application instance
NULL); //window parameters
//was there an error creating the window?
if (!hWnd)
return FALSE;
//display the window
ShowWindow(hWnd, nCmdShow);
UpdateWindow(hWnd);
/////////////////////////////////////////////////
//DIRECTX INITS
/////////////////////////////////////////////////
//initialize DirectInput
if (!Init_Graphics(hWnd)){
MessageBox(hWnd, "Error initializing Direct3d", "Error", MB_OK);
return 0;
}
if (!Init_DirectInput(hWnd))
{
MessageBox(hWnd, "Error initializing DirectInput", "Error", MB_OK);
return 0;
}
if (!Init_DirectSound(hWnd))
{
MessageBox(hWnd, "Error initializing DirectSound", "Error", MB_OK);
return 0;
}
//initialize the game
if (!Game_Init(hWnd))
{
MessageBox(hWnd, "Error initializing the game", "Error", MB_OK);
return 0;
}
// main message loop
int done = 0;
while (!done)
{
if (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
{
//look for quit message
if (msg.message == WM_QUIT)
done = 1;
//decode and pass messages on to WndProc
TranslateMessage(&msg);
DispatchMessage(&msg);
}
else
//process game loop (prevents running after window is closed)
Game_Run(hWnd);
}
return msg.wParam;
}
//window event callback function
LRESULT WINAPI WinProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
switch (msg)
{
case WM_DESTROY:
Game_End(hWnd);
PostQuitMessage(0);
return 0;
}
return DefWindowProc(hWnd, msg, wParam, lParam);
}
//helper function to set up the window properties
ATOM MyRegisterClass(HINSTANCE hInstance)
{
//create the window class structure
WNDCLASSEX wc;
wc.cbSize = sizeof(WNDCLASSEX);
//fill the struct with info
wc.style = CS_HREDRAW | CS_VREDRAW;
wc.lpfnWndProc = (WNDPROC)WinProc;
wc.cbClsExtra = 0;
wc.cbWndExtra = 0;
wc.hInstance = hInstance;
wc.hIcon = NULL;
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
wc.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH);
wc.lpszMenuName = NULL;
wc.lpszClassName = APPTITLE;
wc.hIconSm = NULL;
//set up the window with the class info
return RegisterClassEx(&wc);
} | [
"ratache@gmail.com"
] | ratache@gmail.com |
1b17af61ae8bb399468effa38996f03eaac57fb7 | 4307abf5227b58aee0a9a4240c193476c8853c3d | /UI/PlayerUI.h | eb0b424c6394e6ca5a31f003e70c7cc2fd865819 | [] | no_license | ljm3994/NecroDancer- | 11b85afbff54fb2f5eaf023ea084a784e970f490 | 5fae52438130f1a554995108bd888bb62cc5a3e7 | refs/heads/master | 2022-11-29T15:46:17.104310 | 2020-08-07T09:09:59 | 2020-08-07T09:09:59 | 279,656,644 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 732 | h | #pragma once
#include "GameNode.h"
class PlayerUI : public GameNode
{
int m_PlayerLife;
int m_PlayerMaxLife;
int m_BeatCount;
bool m_IsPlayerDie;
int m_Beat;
bool m_IsInven[5];
bool m_IsPack;
int CurrentCoin;
float m_DelayTime;
bool m_IsTempo;
int CurrentDiamond;
public:
PlayerUI();
~PlayerUI() override;
HRESULT init() override;
void release() override;
void update() override;
void render() override;
void HpRender();
void CoinRender();
void InventoryOpen(int i);
void InventoryRender();
void HpBeatOn();
MAKEGETSET(bool, m_IsPlayerDie);
MAKEGETSET(int, m_PlayerMaxLife);
MAKEGETSET(int, m_PlayerLife);
MAKEGETSET(int, CurrentCoin);
MAKEGETSET(int, CurrentDiamond);
MAKEGETSET(bool, m_IsTempo);
};
| [
"ljm3994@gmail.com"
] | ljm3994@gmail.com |
fab2c0555966c868a6923c7647c3bbe312b3c386 | fea336a3d0c77d015f33c2a4099403ef48eff4dc | /Container/BorderContainer.h | 9bb8f4924836392c35399e93ef888ab6e08b3142 | [] | no_license | mdanswan/Splashkit_Desktop_API | 9a023b7c47a26930a2cb9a0cb6ce120131f6c57f | 33f85480a629176d9931da368045d66f05329f9b | refs/heads/master | 2020-03-29T21:46:15.487851 | 2018-10-24T14:48:35 | 2018-10-24T14:48:35 | 150,386,577 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,164 | h | #ifndef SKD_BORDERCONTAINER
#define SKD_BORDERCONTAINER
#include "Container.h"
#include "../Component/Component.h"
namespace splashkit_desktop
{
class BorderContainer : public Container
{
private:
/**
* Members
*/
Component *top_left = nullptr;
Component *bottom_left = nullptr;
Component *top_right = nullptr;
Component *bottom_right = nullptr;
public:
/****************
* Constructors *
****************/
BorderContainer();
/**
* @param Bound The Bound of the Border Container
*/
BorderContainer(Bound bound);
/*******************************
* Super Class Virtual Methods *
*******************************/
/** [VIRTUAL -> OVERRIDEN]
* Manages the drawing process for Components
*/
virtual void draw_components();
/** [VIRTUAL -> OVERRIDEN]
* Checks the events for the Container object. Only events registered to this object will be checked.
*/
virtual void check_events();
/******************
* Public Getters *
******************/
/**
* Retrieves the top left Component
*
* @returns The top left Component
*/
Component* get_top_left();
/**
* Retrieves the top right Component
*
* @returns The top right Component
*/
Component* get_top_right();
/**
* Retrieves the bottom left Component
*
* @returns The bottom left Component
*/
Component* get_bottom_left();
/**
* Retrieves the bottom right Component
*
* @returns The bottom right Component
*/
Component* get_bottom_right();
/******************
* Public Setters *
******************/
/**
* Sets the top left Component of the Container
*
* @param Component* The new top left Component
*/
void set_top_left(Component *top_left);
/**
* Sets the top right Component of the Container
*
* @param Component* The new top right Component
*/
void set_top_right(Component *top_right);
/**
* Sets the bottom left Component of the Container
*
* @param Component* The new bottom left Component
*/
void set_bottom_left(Component *bottom_left);
/**
* Sets the bottom right Component of the Container
*
* @param Component* The new bottom right Component
*/
void set_bottom_right(Component *bottom_right);
};
} // namespace splashkit_desktop
#endif | [
"miles.danswan@gmail.com"
] | miles.danswan@gmail.com |
4dd5ac4b4c09fc931638466c7b4474f3729127c3 | 385cfbb27ee3bcc219ec2ac60fa22c2aa92ed8a0 | /Tools/MedusaExport/max9/include/maxscrpt/excepinf.h | 36c924384509b477cb950c2edea5ddac023cb8ba | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | palestar/medusa | edbddf368979be774e99f74124b9c3bc7bebb2a8 | 7f8dc717425b5cac2315e304982993354f7cb27e | refs/heads/develop | 2023-05-09T19:12:42.957288 | 2023-05-05T12:43:35 | 2023-05-05T12:43:35 | 59,434,337 | 35 | 18 | MIT | 2018-01-21T01:34:01 | 2016-05-22T21:05:17 | C++ | UTF-8 | C++ | false | false | 352 | h | #ifndef _H_EXCEPINF
#define _H_EXCEPINF
// Helper class wrapping EXCEPINFO
// ctor initializes EXCEPINFO fields to null
// dtor calls Clear(), which calls SysFreeString on non-null BSTR fields
class CExcepInfo :
public EXCEPINFO
{
public:
ScripterExport CExcepInfo();
ScripterExport ~CExcepInfo();
ScripterExport void Clear();
};
#endif
| [
"rlyle@palestar.com"
] | rlyle@palestar.com |
6ad772edf3c11ad21f9d27ac45f3f318f158b700 | eed9cf1a6d3fbe78b5a68350fc6c612ba86fa7b4 | /Codes/sub_code/goldstein_GPU/search_universal.cpp | 4216e55d83b25d2dcfce66a565b1cd16bc073b70 | [
"MIT"
] | permissive | ni-chen/Inverse_solver | b7fde72de26d4dd4ff1c86a9622f94a3e5dc7c49 | 2522f5a762c83826d480f9c355d93ded7a4dae94 | refs/heads/main | 2023-07-16T11:03:16.160602 | 2021-08-25T01:37:51 | 2021-08-25T01:37:51 | 405,051,491 | 1 | 0 | MIT | 2021-09-10T11:05:25 | 2021-09-10T11:05:24 | null | UTF-8 | C++ | false | false | 10,203 | cpp |
#ifdef GPU_COMPUTE
__device__
int binarySearch_array_2_size(int arr[], int x, int low, int high)
#else
int binarySearch_array_2_size(int arr[], int x, int low, int high)
#endif
{
int mid;
while (low < high) {
mid = (high + low) / 2;
if (arr[2 * mid + 1] == x) {
break;
}
else if (arr[2 * mid + 1] > x) {
high = mid - 1;
}
else {
low = mid + 1;
}
}
mid = (high + low) / 2;
if (x <= arr[2 * mid + 1])
return mid;
else
return mid + 1;
}
#ifdef GPU_COMPUTE
__device__
void search_in_case(int32_t const * const pLookup, int32_t const * const pResidue, int * const current_shortest, const int square_size, const int box_1, const int box_2, const int start_lookup, const int residue_number_1D, const int lookup_size, const int x_current_residue, const int y_current_residue, const int precompute_number, const int last_dist, const int id_1D)
#else
void search_in_case(std::vector<unsigned char>& states, int32_t const * const pLookup, int32_t const * const pResidue, int * const current_shortest, const int square_size, const int box_1, const int box_2, const int start_lookup, const int residue_number_1D, const int lookup_size, const int x_current_residue, const int y_current_residue, const int precompute_number, const int last_dist, const int id_1D)
#endif
{
if (box_1 >= square_size || box_2 >= square_size) {
//out of the region
return;
}
int case_look_id = start_lookup + box_1 + box_2 * square_size;
int start_look = pLookup[case_look_id];
if (start_look == -1) {
// this box is empty
return;
}
int end_look = residue_number_1D;
int next_full = 1;
int val_look;
while (case_look_id + next_full < lookup_size && end_look == residue_number_1D) {
val_look = pLookup[case_look_id + next_full];
if (val_look >= 0) {//because if next box is empty reading would be erronous
end_look = val_look;
break;
}
next_full++;
}
//if(case_look_id + 1 < lookup_size)end_look = pLookup[case_look_id + 1];
const int x_ID_colomn = 3;
const int y_ID_colomn = 4;
const int row_num = 6;
int dim1, dim2, distance, insertion;
int exec = 0;
for (int i = start_look; i < end_look; i++) {
#ifdef GPU_COMPUTE
#else
if (!(states[i] & mask_active)) {
#endif
dim1 = pResidue[x_ID_colomn + row_num * i];
dim2 = pResidue[y_ID_colomn + row_num * i];
exec++;
int x_coor = abs(x_current_residue - dim1);
int y_coor = abs(y_current_residue - dim2);
//distance = max(x_coor,y_coor);//manhattan distance
distance = sqrtf(x_coor*x_coor + y_coor * y_coor);//euclidian distance
int current_last_dist = current_shortest[precompute_number * 2 - 1];
if (distance < current_last_dist && i != id_1D) {//also check that it is not itself
insertion = binarySearch_array_2_size(current_shortest, distance, 0, precompute_number - 1);
// if found an insertion point
if (insertion < precompute_number) {
for (int k = precompute_number - 1; k > insertion; k--) {
current_shortest[2 * k] = current_shortest[2 * (k - 1)];
current_shortest[2 * k + 1] = current_shortest[2 * (k - 1) + 1];
}
current_shortest[2 * insertion] = i;
current_shortest[2 * insertion + 1] = distance;
}
}
#ifdef GPU_COMPUTE
#else
}
#endif
}
}
#ifdef GPU_COMPUTE
__global__
void shortest_compute_kernel(int32_t const * const pResidue, int32_t const * const pLookup, int32_t const * const pLookup_z, int32_t const * const pSquareSize, int32_t * const pNearest_res, const int residue_number_1D, const int precompute_number, int32_t const size_3D_1, int32_t const size_3D_2, int32_t const size_3D_3, int lookup_size)
#else
const int precompute_number = 1;
std::array<int, 2*precompute_number> shortest_compute_kernel(const int id_1D, std::vector<unsigned char>& states, int32_t const * const pResidue, int32_t const * const pLookup, int32_t const * const pLookup_z, int32_t const * const pSquareSize, const int residue_number_1D, int lookup_size, const std::array<int, 3>& size_residue_3D)
#endif
{
#ifdef GPU_COMPUTE
int id_1D = threadIdx.x + blockIdx.x * blockDim.x;
#else
//precompute only one new near residue
std::array<int, 2*precompute_number> pNearest_res;
#endif
if (id_1D < residue_number_1D) { // because can be change to negative if all use when removing dipole along another direction
#ifdef GPU_COMPUTE
#else
const int size_3D_1 = size_residue_3D[0];
const int size_3D_2 = size_residue_3D[1];
#endif
const int case_ID_colomn = 2;
const int x_ID_colomn = 3;
const int y_ID_colomn = 4;
const int z_ID_colomn = 5;
const int row_num = 6;
//current residue data
int case_current_residue = pResidue[case_ID_colomn + row_num * id_1D];
int x_current_residue = pResidue[x_ID_colomn + row_num * id_1D];
int y_current_residue = pResidue[y_ID_colomn + row_num * id_1D];
int z_current_residue = pResidue[z_ID_colomn + row_num * id_1D];
// starting point of the current z section in the lookup
const int start_lookup = pLookup_z[z_current_residue];
//square size at the current z depth
int square_size = pSquareSize[z_current_residue];
// get the number of case per side at the current depth
int case_side_1 = (int)ceilf(((float)size_3D_1) / ((float)square_size));
int case_side_2 = (int)ceilf(((float)size_3D_2) / ((float)square_size));
//bicoordinate of case in which the residue is
int case_current_residue_1 = case_current_residue % square_size;
int case_current_residue_2 = case_current_residue / square_size;
int max_border_distance = max(max(square_size - case_current_residue_1, square_size - case_current_residue_2), max(case_current_residue_1, case_current_residue_2));
//search in adjacent cases
int * current_shortest = new int[2 * precompute_number];
//finding algorithm
int box_search_distance = 0;
int distance_max = 200000;// just a big number
// the maximum distance is the distance to border
distance_max = min(min(
x_current_residue, y_current_residue
), min(
size_3D_1 - x_current_residue, size_3D_2 - y_current_residue
));
//distance_max = distance_max + 5;
for (int ii = 0; ii < precompute_number; ++ii) {
current_shortest[ii * 2] = -1;
current_shortest[ii * 2 + 1] = distance_max;// initialise to -1 --> not found
}
int last_dist = distance_max;
int box_1[4] = { -1,-1,-1,-1 };// the coordinate of the search box along dimenssion 1
int box_2[4] = { -1,-1,-1,-1 };// the coordinate of the search box along dimenssion 1
int min_dist_in_search_box[4] = { distance_max,distance_max,distance_max,distance_max };//the min distance in the searched box
int executed_searches = 0;
while (box_search_distance < max_border_distance && box_search_distance < square_size) {
//search in the area for shorter matches
if (box_search_distance == 0) {
//search the center
box_1[0] = case_current_residue_1;
box_2[0] = case_current_residue_2;
search_in_case(
#ifdef GPU_COMPUTE
#else
states,
#endif
pLookup, pResidue, current_shortest, square_size, box_1[0], box_2[0], start_lookup, residue_number_1D, lookup_size, x_current_residue, y_current_residue, precompute_number, last_dist, id_1D);
executed_searches++;
}
else {
for (int ii = 1 - box_search_distance; ii <= box_search_distance; ++ii) {
//top part
box_1[0] = case_current_residue_1 - box_search_distance;
box_2[0] = case_current_residue_2 - ii;
min_dist_in_search_box[0] = max(abs(
(box_1[0] + 1)*case_side_1 - x_current_residue
), abs(
((box_2[0] + (ii > 0 ? 1 : 0))*case_side_2 - y_current_residue)*(ii == 0 ? 0 : 1)
));
//right part
box_1[1] = case_current_residue_1 + ii;
box_2[1] = case_current_residue_2 - box_search_distance;
min_dist_in_search_box[1] = max(abs(
((box_1[1] + (ii > 0 ? 0 : 1))*case_side_1 - x_current_residue)*(ii == 0 ? 0 : 1)
), abs(
(box_2[1] + 1)*case_side_2 - y_current_residue
));
//left part
box_1[2] = case_current_residue_1 - ii;
box_2[2] = case_current_residue_2 + box_search_distance;
min_dist_in_search_box[2] = max(abs(
((box_1[2] + (ii > 0 ? 1 : 0))*case_side_1 - x_current_residue)*(ii == 0 ? 0 : 1)
), abs(
(box_2[2])*case_side_2 - y_current_residue
));
//bottom part
box_1[3] = case_current_residue_1 + box_search_distance;
box_2[3] = case_current_residue_2 + ii;
min_dist_in_search_box[3] = max(abs(
(box_1[3])*case_side_1 - x_current_residue
), abs(
((box_2[3] + (ii > 0 ? 0 : 1))*case_side_2 - y_current_residue)*(ii == 0 ? 0 : 1)
));
bool to_eval[4] = { min_dist_in_search_box[0] < last_dist ,min_dist_in_search_box[1] < last_dist ,min_dist_in_search_box[2] < last_dist ,min_dist_in_search_box[3] < last_dist };
int eval_num = 0;
while (eval_num < 4) {//this strange loop is to avoid branche which can reduce performances in warps
while (!to_eval[eval_num] && eval_num < 4) { eval_num++; }
if (eval_num < 4) {
search_in_case(
#ifdef GPU_COMPUTE
#else
states,
#endif
pLookup, pResidue, current_shortest, square_size, box_1[eval_num], box_2[eval_num], start_lookup, residue_number_1D, lookup_size, x_current_residue, y_current_residue, precompute_number, last_dist, id_1D);
executed_searches++;
}
eval_num++;
}
last_dist = current_shortest[precompute_number * 2 - 1];//update the farvest element in the list
}
}
//if all the shortest ar found and next iteration wont give shorter then exit
last_dist = current_shortest[precompute_number * 2 - 1];//update the farvest element in the list
if (box_search_distance * case_side_1 >= last_dist && box_search_distance * case_side_2 >= last_dist) {
break;
}
// increase the search radius to fing more
box_search_distance++;
}
//udate the result to the mattrix
#ifdef GPU_COMPUTE
for (int ii = 0; ii < precompute_number * 2; ++ii) pNearest_res[2 * precompute_number*id_1D + ii] = current_shortest[ii];// return result
#else
for (int ii = 0; ii < precompute_number * 2; ++ii) pNearest_res[ii] = current_shortest[ii];// no need for offset
#endif
delete[] current_shortest;
}
#ifdef GPU_COMPUTE
#else
return pNearest_res;
#endif
}
| [
"lkaaamo@gmail.com"
] | lkaaamo@gmail.com |
bd063b8326a207e6765d1aa9482ab9ebc44d5d01 | b5454299ea931784fd3e768712a6c15cce552fe3 | /src/qt/spectregui.h | 8b1b9cd6a9f0085da5c9f2530370d101726231e7 | [
"MIT"
] | permissive | dragononcrypto/spectre | 3aa33d75762e984a72c4980030735a60b876cc86 | e8492d8e2c0f5e2f100bb4b187661333634c1751 | refs/heads/master | 2020-03-07T00:06:49.600112 | 2018-03-28T15:35:53 | 2018-03-28T15:35:53 | 127,150,127 | 1 | 2 | null | 2018-03-28T14:09:48 | 2018-03-28T14:09:47 | null | UTF-8 | C++ | false | false | 5,721 | h | // Copyright (c) 2014 The ShadowCoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file license.txt or http://www.opensource.org/licenses/mit-license.php.
#ifndef SPECTREGUI_H
#define SPECTREGUI_H
#include <QMainWindow>
#include <QWebView>
#include <QWebElement>
#include <QSystemTrayIcon>
#include <QLabel>
#include <QModelIndex>
#include "spectrebridge.h"
#include "rpcconsole.h"
#include <stdint.h>
class TransactionTableModel;
class ClientModel;
class WalletModel;
class MessageModel;
class Notificator;
QT_BEGIN_NAMESPACE
class QLabel;
class QMenuBar;
class QToolBar;
class QUrl;
QT_END_NAMESPACE
/**
Spectre GUI main class. This class represents the main window of the Spectre UI. It communicates with both the client and
wallet models to give the user an up-to-date view of the current core state.
*/
class SpectreGUI : public QMainWindow
{
Q_OBJECT
public:
explicit SpectreGUI(QWidget *parent = 0);
~SpectreGUI();
/** Set the client model.
The client model represents the part of the core that communicates with the P2P network, and is wallet-agnostic.
*/
void setClientModel(ClientModel *clientModel);
/** Set the wallet model.
The wallet model represents a bitcoin wallet, and offers access to the list of transactions, address book and sending
functionality.
*/
void setWalletModel(WalletModel *walletModel);
/** Set the message model.
The message model represents encryption message database, and offers access to the list of messages, address book and sending
functionality.
*/
void setMessageModel(MessageModel *messageModel);
protected:
void changeEvent(QEvent *e);
void closeEvent(QCloseEvent *event);
void dragEnterEvent(QDragEnterEvent *event);
void dragMoveEvent(QDragMoveEvent *event);
void dropEvent(QDropEvent *event);
private:
QWebView *webView;
QWebFrame *documentFrame;
SpectreBridge *bridge;
ClientModel *clientModel;
WalletModel *walletModel;
MessageModel *messageModel;
QMenuBar *appMenuBar;
QAction *quitAction;
QAction *aboutAction;
QAction *optionsAction;
QAction *toggleHideAction;
QAction *exportAction;
QAction *encryptWalletAction;
QAction *backupWalletAction;
QAction *changePassphraseAction;
QAction *unlockWalletAction;
QAction *lockWalletAction;
QAction *aboutQtAction;
QAction *openRPCConsoleAction;
QSystemTrayIcon *trayIcon;
Notificator *notificator;
RPCConsole *rpcConsole;
uint64_t nWeight;
/** Create the main UI actions. */
void createActions();
/** Create the menu bar and sub-menus. */
void createMenuBar();
/** Create system tray (notification) icon */
void createTrayIcon();
friend class SpectreBridge;
private slots:
/** Page finished loading */
void pageLoaded(bool ok);
/** Add JavaScript objects to page */
void addJavascriptObjects();
/** Handle external URLs **/
void urlClicked(const QUrl & link);
/** Set number of connections shown in the UI */
void setNumConnections(int count);
/** Set number of blocks shown in the UI */
void setNumBlocks(int count, int nTotalBlocks);
/** Set the encryption status as shown in the UI.
@param[in] status current encryption status
@see WalletModel::EncryptionStatus
*/
void setEncryptionStatus(int status);
/** Notify the user of an error in the network or transaction handling code. */
void error(const QString &title, const QString &message, bool modal);
/** Asks the user whether to pay the transaction fee or to cancel the transaction.
It is currently not possible to pass a return value to another thread through
BlockingQueuedConnection, so an indirected pointer is used.
https://bugreports.qt-project.org/browse/QTBUG-10440
@param[in] nFeeRequired the required fee
@param[out] payFee true to pay the fee, false to not pay the fee
*/
void askFee(qint64 nFeeRequired, bool *payFee);
void handleURI(QString strURI);
#ifndef Q_OS_MAC
/** Handle tray icon clicked */
void trayIconActivated(QSystemTrayIcon::ActivationReason reason);
#endif
/** Show incoming transaction notification for new transactions.
The new items are those between start and end inclusive, under the given parent item.
*/
void incomingTransaction(const QModelIndex & parent, int start, int end);
/** Show incoming message notification for new messages.
The new items are those between start and end inclusive, under the given parent item.
*/
void incomingMessage(const QModelIndex & parent, int start, int end);
/** Show configuration dialog */
void optionsClicked();
/** Show about dialog */
void aboutClicked();
/** Unlock wallet */
void unlockWallet();
/** Lock wallet */
void lockWallet();
/** Toggle whether wallet is locked or not */
void toggleLock();
/** Encrypt the wallet */
void encryptWallet(bool status);
/** Backup the wallet */
void backupWallet();
/** Change encrypted wallet passphrase */
void changePassphrase();
/** Show window if hidden, unminimize when minimized, rise when obscured or show if hidden and fToggleHidden is true */
void showNormalIfMinimized(bool fToggleHidden = false);
/** simply calls showNormalIfMinimized(true) for use in SLOT() macro */
void toggleHidden();
void updateWeight();
void updateStakingIcon();
/** called by a timer to check if fRequestShutdown has been set **/
void detectShutdown();
};
#endif
| [
"lulworm@gmail.com"
] | lulworm@gmail.com |
71e4944751680c5aed2b6a5841d5ae263de9909e | b8b3b430a1aefc72387764531e55f831e3201b23 | /src/logic/Game.h | 74d7df7b0ec2cd27b964307d4b91b1d9ebcadf10 | [] | no_license | DamnCoder/bit-them-all | 3a8061295b5cdd8b1f83230c9a7882f27a859393 | d146922221fffb9f3d2a9b035132a93f2601bc72 | refs/heads/master | 2020-07-02T01:11:17.115084 | 2015-06-23T09:08:51 | 2015-06-23T09:08:51 | 35,829,684 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 6,330 | h | /**
* CGame.h
*
* Created on: 22/01/2010
* Author: jorge
*/
#ifndef PARTIDA_H_
#define PARTIDA_H_
#include "LogicFacade.h"
#include "logic/modes/ModeBT.h"
namespace logic {
class CGame : public ILogicFacade {
public:
CGame();
~CGame();
void init();
void finish();
void actualize(float dt);
void insertCommand(tCommand command);
/*****************************************************************************************/
/** METODOS DE ACCESO A LA LOGICA DE LA APLICACION POR PARTE DEL RESTO DE CAPAS *********/
const bool endRound() const;
const string roundExplanation() const;
CScreen* screen() const;
CScenario* scenario() const { return _scenario; }
int modesNumber() const { return (int)_modes.size(); }
CQuestion* getQuestion() const { return 0; }
CQuizShowHost* host() const;
CPlayer* roundWinner() const { return 0; }
CPlayer* currentPlayer() const;
vector<CPlayer*> players() const;
vector<CAvatar*> audience() const;
TAnimationsMap animationsMap() const { return _animationsMap; }
CModeBT* currentMode() const { return _currentMode; }
void setAnimationMap(TAnimationsMap animationsMap);
void setScenario(CScenario* scenario);
void setPlayerAppearance(int numPlayer, const string& id, const string& skin, const string& name, int scale);
void setAudienceAppearance(int numPlayer, const string& id, const string& skin, int scale);
/*****************************************************************************************/
void returnToMenu() {emitEndGameEvent();}
// Gestion de camaras
void setCameraActive(bool cameraActive) { _cameraActive = cameraActive; }
void addCamera(const string& camID);
void clearCameras();
const bool cameraActive() const { return _cameraActive; }
// FLAGS DE JUEGO
void setEndIntro(const bool endIntro) { _endIntro = endIntro; }
void setEndModeIntro(const bool endModeIntro) { _endModeIntro = endModeIntro; }
const bool endIntro() const { return _endIntro; }
const bool endModeIntro() const { return _endModeIntro; }
void terminateIntro();
void changeState(const std::string& state);
// CONTROL DEL HUD
void setTimeInHud(const std::string& time);
void setHostTextBoxVisibility(const bool visible);
void setPlayerHudVisibility(const bool visible, const int numPlayer);
void setPlayerPointsInHud(const int numPlayer, const int numPoints);
void createRankingFromScoreHud();
void setQuestionInHud(CQuestion* question);
void cleanHud();
CTextBox* hostTextBox() const { return _tbHost; }
CButton* clockGui() const { return _bClock; }
CFrame* questionsGui() const { return _fQuestionsGui; }
CButton* const* playerNameGui() const { return _bPlayerName; }
CButton* const* colorButton() const { return _bColorAnswers; }
CButton* colorButton(int i) const { return _bColorAnswers[i]; }
protected:
void processCommandQueue();
void processEventQueue();
private:
///--------------------------------------------------------------------------
/// ATRIBUTOS DEL JUEGOS
///--------------------------------------------------------------------------
typedef vector<tCommand>::iterator TCommandIterator;
typedef vector<TGameEvent>::iterator TGameEventIterator;
vector<tCommand> _commandQueue; // Cola de comandos
vector<TGameEvent> _eventQueue; // Cola de eventos
// Entidades del juegos
vector<CPlayer*> _players; // Lista de jugadores
vector<CPlayer*> _ranking; // Ranking de la pruebas
vector<CPlayer*> _tiedPlayers; // Lista de jugadores empatados en el primer puesto
CScenario* _scenario;
// Gestores de animaciones de personajes
TAnimationsMap _animationsMap;
//------------------
// Comportamientos
// Comportamientos de los modos
uint _nMode; // Ronda que se esta jugando en estos momentos
vector<CModeBT*> _modes;
CModeBT* _currentMode;
// Comportamientos de las secuencias animadas
vector<CIntroBehavior*> _intros;
CBTABehavior* _currentBehavior; // Comportamiento actual en ejecucion
//------------------
// Preguntas
CQuestionManager* _questionManager;
vector<CQuestion*> _questions; // Listas de preguntas
// Flags del juego
bool _cameraActive;
bool _endIntro;
bool _endModeIntro;
///--------------------------------------------------------------------------
/// FUNCIONES PRIVADAS
///--------------------------------------------------------------------------
void nextMode();
void registerAnswer(int answer);
void actualizeEntitys(float dt);
void actualizeBehavior(float dt);
void emitPlayers();
void emitPublic();
void destroyAnimatedEntitys();
///--------------------------------------------------------------------------
/// COMPORTAMIENTOS
///--------------------------------------------------------------------------
BehaviorTreeNode* getIntroSequence();
BehaviorTreeNode* getEndIntroSequence();
BehaviorTreeNode* getPlayersPresentationSequence();
BehaviorTreeNode* getEndPlayersPresentation();
BehaviorTreeNode* getEndModeSequence();
BehaviorTreeNode* getEndEndModeSequence();
BehaviorTreeNode* getEndDemoSequence();
BehaviorTreeNode* getEndEndDemoSequence();
BehaviorTreeNode* initQuizShowCharactersAnimation() const;
///--------------------------------------------------------------------------
/// HUD
///--------------------------------------------------------------------------
void createGui();
void destroyGui();
void createHostTextBox();
void destroyHostTextBox();
void createScoreHud();
void destroyScoreHud();
void createQuestionsHud();
void destroyQuestionsHud();
//void setPlayerHudVisibility(const bool visible, const int numPlayer);
// GUI DEL JUEGO
CFrame* _introGui;
CFrame* _fWhiteFlash;
CFrame* _fLogoTv;
CLabel* _lQuit;
//
// Gui de dialogos del Host
CTextBox* _tbHost;
// Gui de puntos
CFrame* _scoreGui;
CFrame* _fIconFrame[4]; // Marco de los iconos
CFrame* _fPlayerIcon[4]; // Iconos de los jugadores
CButton* _bPlayerPoints[4];
CButton* _bPlayerName[4];
// Gui de preguntas
CFrame* _fQuestionsGui;
CButton* _bColorAnswers[4];
CButton* _bAnswers[4];
CButton* _bQuestion;
CButton* _bClock;
};
}
#endif /* PARTIDA_H_ */
| [
"jorge2402@gmail.com"
] | jorge2402@gmail.com |
bd3d00d49cc7ffa2929bfa9e085467762e9abe1d | c001671e2443acc2023693ff22df266f8c4c746b | /meta/sai_extra_neighbor.cpp | b5dd69f6221db047619657979c5a8a0a6bf9ff8c | [
"Apache-2.0"
] | permissive | ZeroInfinite/sonic-sairedis | 6783f9198912a8dbe6edebef6b6303f98490d6bd | 257b1397eee5756348edb003a9adf5f275a411a7 | refs/heads/master | 2021-06-25T12:00:49.708616 | 2017-09-06T19:07:58 | 2017-09-06T19:07:58 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 856 | cpp | #include "sai_meta.h"
#include "sai_extra.h"
sai_status_t meta_pre_create_neighbor_entry(
_In_ const sai_neighbor_entry_t* neighbor_entry,
_In_ uint32_t attr_count,
_In_ const sai_attribute_t *attr_list)
{
SWSS_LOG_ENTER();
return SAI_STATUS_SUCCESS;
}
sai_status_t meta_pre_remove_neighbor_entry(
_In_ const sai_neighbor_entry_t* neighbor_entry)
{
SWSS_LOG_ENTER();
return SAI_STATUS_SUCCESS;
}
sai_status_t meta_pre_set_neighbor_attribute(
_In_ const sai_neighbor_entry_t* neighbor_entry,
_In_ const sai_attribute_t *attr)
{
SWSS_LOG_ENTER();
return SAI_STATUS_SUCCESS;
}
sai_status_t meta_pre_get_neighbor_attribute(
_In_ const sai_neighbor_entry_t* neighbor_entry,
_In_ uint32_t attr_count,
_Inout_ sai_attribute_t *attr_list)
{
SWSS_LOG_ENTER();
return SAI_STATUS_SUCCESS;
}
| [
"kcudnik@microsoft.com"
] | kcudnik@microsoft.com |
cda69fb0196698af9944ee6c4affe6c48c820194 | 304ff6d39a8eaa896317a34ec31787606a71656f | /P203PROD.cpp | 919fa156319d2bb5b0b97f16b0f94a6c68a39eba | [] | no_license | S4ltF1sh/SPOJ | 4ed70e86d47371f436efd4080991bfc8ed3a9e65 | b7694fb770d973649e7804def0352dc075c822c8 | refs/heads/main | 2023-06-01T19:10:05.737305 | 2021-06-22T11:09:46 | 2021-06-22T11:09:46 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 903 | cpp | //P203PROD - Giải đố
#include <iostream>
#include <vector>
#include <string>
#include <cmath>
#include <algorithm>
#include <stack>
using namespace std;
vector<bool> Check(1e6 + 1, true);
void isEtosthenes()
{
Check.at(0) = Check.at(1) = false;
for (int i = 2; i * i <= 1e6; i++)
{
if (Check.at(i) == true)
{
for (long long j = i * i; j <= 1e6; j += i)
{
Check.at(j) = false;
}
}
}
}
void Run()
{
int n;
cin >> n;
int Count = 0;
for (int i = 2; i <= 1e6; i++)
{
if (Check.at(i) == true)
Count++;
if (Count == n)
{
cout << i << endl;
break;
}
}
}
int main()
{
int t;
cin >> t;
isEtosthenes();
while (t--)
{
Run();
}
return 0;
} | [
"noreply@github.com"
] | noreply@github.com |
c2b900384c8082e3ae32664a88929620342e309b | e5a71cd94fbcc1a0d04fd1fafbcff7284a7271c8 | /raygame/WithinRangeCondition.h | 0ec3554db3a2c99290476d6667c10121c2a86d34 | [
"MIT"
] | permissive | MatthewRagas/AI_Agents | 84ac46fbb33716f05723360499a798f0781c0adb | 7c513fe63956929bb55ee1f5e6fdf756422497fc | refs/heads/master | 2021-04-18T13:38:09.467012 | 2020-04-01T17:16:10 | 2020-04-01T17:16:10 | 249,550,619 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 307 | h | #pragma once
#include "Condition.h"
class WithinRangeCondition : public Condition
{
public:
WithinRangeCondition(Agent* target, float range)
: m_target(target), m_range(range) {}
virtual ~WithinRangeCondition() {}
virtual bool test(Agent* agent) const;
private:
Agent* m_target;
float m_range;
};
| [
"mjrag310@hotmail.com"
] | mjrag310@hotmail.com |
06520e6d0cbfbcdc474c879132b969b4a08988f3 | 42db895487a8337f7ff030a2091d5d4c277851b0 | /Timestamp.cc | ed1652a2ac2c4aa77ed9e7042a44583e6ceaefc9 | [] | no_license | Jason-Ltiger/libNet | 93255b32f59cbba5bf1f15367e28325360a88cbe | 3b6d07fd02e1fa6b605e789e9b0ee46191ead0d4 | refs/heads/main | 2023-07-05T14:53:47.907269 | 2021-08-16T01:47:27 | 2021-08-16T01:47:27 | 390,765,244 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 616 | cc | #include "Timestamp.h"
#include <sys/time.h>
#include <stdio.h>
Timestamp::Timestamp()
{
}
Timestamp::Timestamp(__int64_t micoroSecondsSinceEpoch):
micoroSecondsSinceEpoch_(micoroSecondsSinceEpoch)
{
}
Timestamp Timestamp::now()
{
return Timestamp(time(NULL));
}
std::string Timestamp::toString() const
{
char buf[64] = {0};
struct tm* tm_time = localtime(&micoroSecondsSinceEpoch_);
snprintf(buf, sizeof(buf), "%4d%02d%02d %02d:%02d:%02d",
tm_time->tm_year + 1900, tm_time->tm_mon + 1, tm_time->tm_mday,
tm_time->tm_hour, tm_time->tm_min, tm_time->tm_sec);
return buf;
} | [
"351990237@qq.com"
] | 351990237@qq.com |
d2706875200348c9f82bfcf6f1e04a4a6d26f45c | 6ad5d8c41a990bb4abafecac34a358330a4b6fe2 | /cpp_code/vec_str.cpp | f20127b95ce8905c05e2b72cce96318f49db433c | [] | no_license | linux2014linux/some_tmp | ba1dde6cf77de3d7d994c54ecd2255170e65c579 | 9a294783355912c7c561781c60110572f34f9700 | refs/heads/master | 2020-05-30T00:58:12.928356 | 2018-08-07T10:07:50 | 2018-08-07T10:21:04 | 82,621,872 | 3 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 231 | cpp | #include <stdio.h>
#include <stdlib.h>
#include <string>
#include <vector>
int main(int argc, char* argv[])
{
//std::vector< std::string> vec_str;
//vec_str.push_back(NULL);
std::string str = NULL;
return 0;
}
| [
"2319179516@qq.com"
] | 2319179516@qq.com |
e8e453c3eaf941321e82f0d6c93f9339c1932cef | fdc302e4f54a71616d29636abb6957a1ae4e1e5a | /pt1/functions.cpp | 323d0e90b8d5a38b684253042a6e77a69c681d31 | [] | no_license | SVerma19/Cplusplus | c45268f55d4f6a2a05a9163c5bc1dfe430258dbc | 2f3eaa378a9bc008164c62e7df3b16490297d0ae | refs/heads/master | 2022-06-26T14:42:30.868639 | 2020-05-11T18:42:09 | 2020-05-11T18:42:09 | 263,125,455 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 475 | cpp | #include <iostream>
using namespace std;
void myFunction();
void myLittleLeagueTeam(string fname, int age);
int main() {
myFunction(); // call the function
myLittleLeagueTeam("Liam", 3);
myLittleLeagueTeam("Jenny", 14);
myLittleLeagueTeam("Anja", 30);
return 0;
}
// Create a function
void myFunction() {
cout << "I just got executed!";
}
void myLittleLeagueTeam(string fname, int age) {
cout << fname << " Refsnes. " << age << " years old. \n";
}
| [
"noreply@github.com"
] | noreply@github.com |
a0121f6de745327c6e10f62589fcd209b393dfdc | 56fd26e8fa5f4ccedbb12be0789fcc024411785d | /game/src/tests/TestTriangle2D.cpp | 6faa6c67c06f84d53f23d307fd069662df46403b | [] | no_license | raviverma2791747/OpenGL-SandBox | 7d0be41d79a22e0e4dfea083319d06cb367b5aff | 51a4cf0a639516faff8dccda657d72d730707fcf | refs/heads/master | 2022-09-27T09:05:13.715323 | 2020-06-07T07:43:06 | 2020-06-07T07:43:06 | 269,150,692 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,224 | cpp | #include"TestTriangle2D.h"
#include"../Renderer.h"
#include"../vendor/imgui/imgui.h"
#include"../vendor/glm/glm/glm.hpp"
#include"../vendor/glm/glm/gtc/matrix_transform.hpp"
namespace test
{
TestTriangle2D::TestTriangle2D()
:
m_Proj(glm::ortho(0.0f, 960.0f, 0.0f, 540.0f, -1.0f, 1.0f)),
// m_Proj(glm::perspective(0.0f,960.0f/540.0f,1.0f,-150.0f)),
m_View(glm::translate(glm::mat4(1.0f), glm::vec3(0, 0, 0))),
m_Translation(0,0,0)
{
GLCall(glEnable(GL_BLEND));
GLCall(glEnable(GL_DEPTH_TEST));
GLCall(glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA));
m_VAO = std::make_unique<VertexArray>();
float positions[] =
{
50.0f, 50.0f, 1.0f, 1.0f, // 0
200.0f, 50.0f, 1.0f , 1.0f,// 1
200.0f, 200.0f, 1.0f , 1.0f// 2
};
unsigned int indices[] = {
0, 1, 2
};
m_VertexBuffer = std::make_unique<VertexBuffer>(positions, 3 * 4 * sizeof(float));
VertexBufferLayout layout;
layout.Push<float>(4);
m_VAO->AddBuffer(*m_VertexBuffer, layout);
m_IndexBuffer = std::make_unique<IndexBuffer>(indices, 3);
m_Shader = std::make_unique<Shader>("Res/shaders/TestTriangle2D.shader");
m_Shader->Bind();
m_Shader->SetUniform4f("u_Color", glm::vec4( 0.8f, 0.3f, 0.8f, 1.0f ));
}
TestTriangle2D::~TestTriangle2D()
{
}
void TestTriangle2D::OnUpdate(float deltaTime)
{
}
void TestTriangle2D::OnRender()
{
GLCall(glClearColor(0.0f,0.0f,0.0f,1.0f));
GLCall(glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT));
Renderer renderer;
{
glm::mat4 model = glm::translate(glm::mat4(1.0f), m_Translation);
glm::mat4 mvp = m_Proj * m_View * model;
m_Shader->Bind();
m_Shader->SetUniformMat4f("u_MVP", mvp);
renderer.Draw(*m_VAO, *m_IndexBuffer, *m_Shader);
}
}
void TestTriangle2D::OnImGuiRender()
{
ImGui::SliderFloat3("Translation", &m_Translation.x, 0.0f, 960.0f);
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
} | [
"ravivermaj488@gmail.com"
] | ravivermaj488@gmail.com |
dddbe181772b7b1b5768dfa5aacd9d10bb92380d | 2583abb58f29a383c84dfd41c0bdb37329ccc7fb | /GalaxyECS/Galaxy.cpp | 7f21bfd6f0275db71c75e7dca5f740734bdc6890 | [] | no_license | Wantonfury/Procedural-Galaxy | 0ddb74f776bc7ed0ca88c678f03da62ba5d06a60 | 5defc367bdf75637f14b21bd4346eef3b6ba9047 | refs/heads/master | 2022-12-16T13:58:40.518950 | 2020-09-23T16:32:41 | 2020-09-23T16:32:41 | 276,370,532 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,408 | cpp | #include "Galaxy.hpp"
void Galaxy::updateStars(int oldId, int starId, CGalaxy& galaxy)
{
glBindBuffer(GL_ARRAY_BUFFER, galaxy.colourBuffer);
if (oldId >= 0) glBufferSubData(GL_ARRAY_BUFFER, oldId * sizeof(glm::vec4), sizeof(glm::vec4), &galaxy.colours[oldId]);
if (starId >= 0) glBufferSubData(GL_ARRAY_BUFFER, starId * sizeof(glm::vec4), sizeof(glm::vec4), &galaxy.colours[starId]);
glBindBuffer(GL_ARRAY_BUFFER, 0);
}
void Galaxy::update(float dt)
{
auto suns = reg.view<CSun>();
if (suns.empty()) return;
auto cameras = reg.view<CController>();
if (cameras.empty()) return;
auto& sunTransform = reg.get<CTransform>(suns.front());
auto& sun = reg.get<CSun>(suns.front());
auto& cameraTransform = reg.get<CTransform>(cameras.front());
auto view = reg.view<CGalaxy, CTransform>();
glm::vec3 cameraPos = cameraTransform.position.getVec3f();
Point cameraPoint = Point(cameraPos.x, cameraPos.y, cameraPos.z);
float distanceMin = 1000000000.0f;
for (const auto& entity : view)
{
auto& galaxy = view.get<CGalaxy>(entity);
auto& transform = view.get<CTransform>(entity);
if (points.empty() && galaxy.vao)
{
points.reserve(galaxy.starCount);
for (std::uint32_t i = 0; i < galaxy.starCount; ++i)
{
points.push_back(Point(-galaxy.stars[i].x, -galaxy.stars[i].y, -galaxy.stars[i].z));
}
kdtree.build(points);
}
if (!points.empty())
{
auto star = kdtree.nnSearch(cameraPoint);
float distance = glm::distance(cameraPos, -galaxy.stars[star]);
if (starCurrent != star && distance <= distanceMin)
{
galaxy.colours[star].w = 0.0f;
if (starCurrent >= 0) galaxy.colours[starCurrent].w = 1.0f;
sunTransform.position = vec64(-galaxy.stars[star].x, -galaxy.stars[star].y, -galaxy.stars[star].z);
sun.color = glm::vec3(galaxy.colours[star].x, galaxy.colours[star].y, galaxy.colours[star].z);
generateSystem(star, galaxy);
updateStars(starCurrent, star, galaxy);
starCurrent = star;
}
if (starCurrent >= 0)
{
if (galaxy.colours[starCurrent].w == 1.0f && distance <= distanceMin)
{
galaxy.colours[starCurrent].w = 0.0f;
updateStars(starCurrent, -1, galaxy);
}
if (galaxy.colours[starCurrent].w == 0.0f && distance > distanceMin)
{
galaxy.colours[starCurrent].w = 1.0f;
updateStars(starCurrent, -1, galaxy);
starCurrent = -1;
}
}
}
}
}
void Galaxy::generateSystem(int star, CGalaxy& galaxy)
{
std::mt19937 rand(galaxy.seeds[star]);
std::uniform_real_distribution<float> color(-0.5f, 0.5f);
std::uniform_real_distribution<float> randomDistance(10000000000000.0f, 30000000000000.0f);
std::uniform_real_distribution<float> randomAngle(10.0f, 20.0f);
float distance = 30000000000000.0f + randomDistance(rand);
float angle = glm::radians(-10.0f) + glm::radians(randomAngle(rand));
auto view = reg.view<CPlanet, COrbit>();
for (const auto& entity : view)
{
auto& planet = view.get<CPlanet>(entity);
auto& orbit = view.get<COrbit>(entity);
planet.terrainColor1 = glm::vec3(1.0f - color(rand), 1.0f - color(rand), 1.0f - color(rand));
planet.terrainColor2 = glm::vec3(0.0f - color(rand), 1.0f - color(rand), 0.0f - color(rand));
planet.oceanColor = glm::vec3(0.25f - color(rand), 0.25f - color(rand), 1.0f - color(rand));
orbit.distance = distance;
orbit.angle = angle;
distance += randomDistance(rand);
angle += randomAngle(rand);
}
} | [
"67692680+Wantonfury@users.noreply.github.com"
] | 67692680+Wantonfury@users.noreply.github.com |
9f823a27cc0edd1c2232c11b2371d65790be19ac | 0b346b57e6aa13536b1912b430034de8b2bb70b0 | /Drivers/Adafruit_FT6206_Library/Adafruit_FT6206.h | a1dd54aeccab779f5c758a0ab91607cd79083f6e | [
"MIT"
] | permissive | giltal/MakersPlatfrom | a14beb9a7649840d9b0f34b6e305101c48edaa38 | b8c83ea7d5faf24d9ae5511e150accc5092749e9 | refs/heads/master | 2022-10-07T00:16:51.304076 | 2022-09-11T13:15:16 | 2022-09-11T13:15:16 | 232,785,766 | 2 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,084 | h | /***************************************************
This is a library for the Adafruit Capacitive Touch Screens
----> http://www.adafruit.com/products/1947
Check out the links above for our tutorials and wiring diagrams
This chipset uses I2C to communicate
Adafruit invests time and resources providing this open source code,
please support Adafruit and open-source hardware by purchasing
products from Adafruit!
Written by Limor Fried/Ladyada for Adafruit Industries.
MIT license, all text above must be included in any redistribution
****************************************************/
#ifndef ADAFRUIT_FT6206_LIBRARY
#define ADAFRUIT_FT6206_LIBRARY
#if ARDUINO >= 100
#include "Arduino.h"
#else
#include "WProgram.h"
#endif
#include <Wire.h>
#define FT6206_ADDR 0x38
//#define FT6206_ADDR 0x71
#define FT6206_G_FT5201ID 0xA8
#define FT6206_REG_NUMTOUCHES 0x02
#define FT6206_NUM_X 0x33
#define FT6206_NUM_Y 0x34
#define FT6206_REG_MODE 0x00
#define FT6206_REG_CALIBRATE 0x02
#define FT6206_REG_WORKMODE 0x00
#define FT6206_REG_FACTORYMODE 0x40
#define FT6206_REG_THRESHHOLD 0x80
#define FT6206_REG_POINTRATE 0x88
#define FT6206_REG_FIRMVERS 0xA6
#define FT6206_REG_CHIPID 0xA3
#define FT6206_REG_VENDID 0xA8
// calibrated for Adafruit 2.8" ctp screen
#define FT6206_DEFAULT_THRESSHOLD 128
class TS_Point {
public:
TS_Point(void);
TS_Point(int16_t x, int16_t y, int16_t z);
bool operator==(TS_Point);
bool operator!=(TS_Point);
int16_t x, y, z;
};
class Adafruit_FT6206 {
public:
Adafruit_FT6206(void);
boolean begin(uint8_t thresh = FT6206_DEFAULT_THRESSHOLD);
void writeRegister8(uint8_t reg, uint8_t val);
uint8_t readRegister8(uint8_t reg);
void readData(uint16_t *x, uint16_t *y);
void autoCalibrate(void);
int getTouchedPoints(uint16_t *x1, uint16_t *y1, uint16_t *x2, uint16_t *y2);
boolean touched(void);
TS_Point getPoint(void);
private:
uint8_t touches;
uint16_t touchX[2], touchY[2], touchID[2];
};
#endif //ADAFRUIT_FT6206_LIBRARY
| [
"36598787+giltal@users.noreply.github.com"
] | 36598787+giltal@users.noreply.github.com |
b764220a1335bab71616130ca5a6ba00da7babb7 | 189f52bf5454e724d5acc97a2fa000ea54d0e102 | /ras/fluidisedBed/1.29/Ur | bf6018d970d323f52eb7e4a439c9ab8f1486440d | [] | no_license | pyotr777/openfoam_samples | 5399721dd2ef57545ffce68215d09c49ebfe749d | 79c70ac5795decff086dd16637d2d063fde6ed0d | refs/heads/master | 2021-01-12T16:52:18.126648 | 2016-11-05T08:30:29 | 2016-11-05T08:30:29 | 71,456,654 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 145,167 | /*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v1606+ |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
location "1.29";
object Ur;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];
internalField nonuniform List<vector>
6000
(
(0.0410173 -0.680738 0)
(0.0666387 -0.655758 0)
(0.0655105 -0.658045 0)
(0.0397288 -0.639121 0)
(0.000380055 -0.61833 0)
(-0.0280682 -0.602687 0)
(-0.0394492 -0.661366 0)
(-0.0452651 -0.654786 0)
(-0.0555393 -0.64768 0)
(-0.0573831 -0.616078 0)
(-0.0548751 -0.57934 0)
(-0.0447829 -0.583488 0)
(-0.0268507 -0.594646 0)
(-0.0123676 -0.604917 0)
(-0.00655715 -0.608528 0)
(-0.00349234 -0.60883 0)
(0.00205331 -0.606588 0)
(0.00736209 -0.60804 0)
(0.0121346 -0.619747 0)
(0.0171812 -0.643356 0)
(0.0288145 -0.663123 0)
(0.0418679 -0.633195 0)
(0.0422076 -0.62803 0)
(0.0110403 -0.631587 0)
(-0.0298793 -0.64585 0)
(-0.0547381 -0.646987 0)
(-0.0741474 -0.645558 0)
(-0.0787534 -0.641451 0)
(-0.0837851 -0.630411 0)
(-0.0549745 -0.661342 0)
(0.0374419 -1.14394 0)
(0.0768895 -1.03573 0)
(0.101554 -1.0211 0)
(0.123887 -0.959678 0)
(0.106041 -0.898823 0)
(0.0574748 -0.857515 0)
(-4.93258e-05 -0.8793 0)
(-0.0470218 -0.870737 0)
(-0.0775108 -0.874432 0)
(-0.0957455 -0.87264 0)
(-0.0989619 -0.876459 0)
(-0.0898222 -0.893599 0)
(-0.0713643 -0.907743 0)
(-0.0478424 -0.914806 0)
(-0.0245099 -0.915432 0)
(-0.00275173 -0.916443 0)
(0.0165352 -0.912682 0)
(0.0315161 -0.902423 0)
(0.0367599 -0.893084 0)
(0.0257486 -0.896672 0)
(-0.000557529 -0.912061 0)
(-0.0234154 -0.910628 0)
(-0.0377886 -0.921282 0)
(-0.0509179 -0.942438 0)
(-0.0541786 -1.00433 0)
(-0.0515758 -1.01338 0)
(-0.0520582 -1.01838 0)
(-0.049524 -1.02435 0)
(-0.051646 -1.01263 0)
(-0.0296915 -1.13683 0)
(0.00937784 -1.10013 0)
(0.0390186 -0.979239 0)
(0.0993778 -0.966406 0)
(0.164163 -0.893202 0)
(0.170476 -0.774161 0)
(0.0901486 -0.661709 0)
(0.00398967 -0.685841 0)
(-0.0409533 -0.692924 0)
(-0.0720425 -0.715597 0)
(-0.0897102 -0.743425 0)
(-0.0941367 -0.780096 0)
(-0.083976 -0.819199 0)
(-0.0644684 -0.842636 0)
(-0.0447992 -0.851595 0)
(-0.0251984 -0.860491 0)
(-0.00320384 -0.864378 0)
(0.0181235 -0.855894 0)
(0.0349789 -0.830717 0)
(0.0383838 -0.797924 0)
(0.0231402 -0.772732 0)
(-0.00428692 -0.764385 0)
(-0.0473887 -0.764793 0)
(-0.109778 -0.810272 0)
(-0.114855 -0.902259 0)
(-0.0473542 -0.979432 0)
(0.01017 -0.956071 0)
(0.0268568 -0.931444 0)
(0.027451 -0.929848 0)
(0.0380143 -0.934424 0)
(0.0247662 -1.03175 0)
(-0.024422 -1.02258 0)
(-0.0373822 -1.01247 0)
(-0.00742589 -1.05273 0)
(0.0577681 -1.00914 0)
(0.127267 -0.870357 0)
(0.0932811 -0.688263 0)
(0.000652631 -0.714044 0)
(-0.0642238 -0.738862 0)
(-0.108956 -0.77877 0)
(-0.14173 -0.844047 0)
(-0.159244 -0.929285 0)
(-0.145867 -1.02305 0)
(-0.102978 -1.07312 0)
(-0.064716 -1.09259 0)
(-0.032417 -1.1063 0)
(0.0058397 -1.1077 0)
(0.0495052 -1.08708 0)
(0.0834283 -1.03626 0)
(0.090338 -0.966562 0)
(0.0637765 -0.90252 0)
(0.00561682 -0.871513 0)
(-0.0865505 -0.875508 0)
(-0.13551 -0.955941 0)
(-0.0216068 -1.12549 0)
(0.172109 -1.15179 0)
(0.254446 -1.02463 0)
(0.228851 -0.917632 0)
(0.16893 -0.885444 0)
(0.124359 -0.878143 0)
(0.0549709 -0.884 0)
(-0.0252316 -0.909993 0)
(-0.0628042 -0.918816 0)
(-0.0866606 -0.963487 0)
(-0.0881064 -1.00594 0)
(-0.0478905 -0.911623 0)
(-0.0155855 -0.700702 0)
(-0.043762 -0.737287 0)
(-0.107094 -0.777271 0)
(-0.180606 -0.840317 0)
(-0.247211 -0.944409 0)
(-0.24904 -1.03992 0)
(-0.191551 -1.14002 0)
(-0.120197 -1.17955 0)
(-0.0677416 -1.18262 0)
(-0.0259505 -1.19545 0)
(0.0210346 -1.20116 0)
(0.0715267 -1.17926 0)
(0.113159 -1.11479 0)
(0.135871 -1.02646 0)
(0.114514 -0.941537 0)
(0.0294065 -0.894416 0)
(-0.044982 -0.902986 0)
(0.0309313 -1.10467 0)
(0.297664 -1.35745 0)
(0.495038 -1.23365 0)
(0.465658 -0.943999 0)
(0.356828 -0.785254 0)
(0.245758 -0.736098 0)
(0.150452 -0.73853 0)
(0.0553665 -0.7222 0)
(-0.0357379 -0.794729 0)
(-0.104069 -0.814804 0)
(-0.168075 -0.866455 0)
(-0.239542 -0.928948 0)
(-0.289801 -0.925452 0)
(-0.217944 -0.836289 0)
(-0.136603 -0.838385 0)
(-0.175745 -0.868491 0)
(-0.246764 -0.916113 0)
(-0.248647 -1.00261 0)
(-0.190392 -1.1347 0)
(-0.125679 -1.25008 0)
(-0.0612904 -1.29176 0)
(-0.00803836 -1.29341 0)
(0.0188786 -1.31192 0)
(0.0459161 -1.32198 0)
(0.0714762 -1.30057 0)
(0.0976106 -1.22933 0)
(0.120001 -1.10812 0)
(0.136987 -0.960236 0)
(0.141334 -0.892291 0)
(0.185871 -1.01579 0)
(0.354979 -1.34283 0)
(0.584259 -1.5101 0)
(0.623639 -1.16332 0)
(0.483883 -0.773268 0)
(0.339509 -0.617937 0)
(0.222173 -0.577111 0)
(0.129863 -0.596493 0)
(0.045274 -0.56895 0)
(-0.0408364 -0.65251 0)
(-0.120913 -0.676349 0)
(-0.219013 -0.711564 0)
(-0.354327 -0.778659 0)
(-0.490919 -0.884595 0)
(-0.482976 -0.999679 0)
(-0.310679 -0.965406 0)
(-0.199112 -0.903318 0)
(-0.150509 -0.951719 0)
(-0.0624079 -1.12163 0)
(0.0313893 -1.19252 0)
(0.0539982 -1.19652 0)
(0.0527403 -1.2155 0)
(0.0572283 -1.12354 0)
(0.0556827 -1.11981 0)
(0.053325 -1.12504 0)
(0.0575758 -1.12314 0)
(0.0741399 -1.11062 0)
(0.11087 -1.06462 0)
(0.192614 -1.05548 0)
(0.308545 -1.02004 0)
(0.438778 -1.16829 0)
(0.49334 -1.42576 0)
(0.563013 -1.49418 0)
(0.501131 -0.996013 0)
(0.357987 -0.57554 0)
(0.241015 -0.469229 0)
(0.153124 -0.458415 0)
(0.0894718 -0.494288 0)
(0.0311177 -0.462522 0)
(-0.0352526 -0.537123 0)
(-0.106812 -0.556959 0)
(-0.20322 -0.56068 0)
(-0.352758 -0.602688 0)
(-0.527316 -0.753043 0)
(-0.600612 -1.06828 0)
(-0.440756 -1.20529 0)
(-0.187447 -1.12817 0)
(0.021687 -1.10567 0)
(0.148454 -1.11998 0)
(0.168618 -1.06425 0)
(0.123316 -1.02632 0)
(0.0573525 -1.05992 0)
(0.034593 -0.991914 0)
(0.0437621 -1.00204 0)
(0.0500949 -1.02284 0)
(0.0725594 -1.02757 0)
(0.107108 -1.02088 0)
(0.160947 -0.99159 0)
(0.219054 -0.964359 0)
(0.318247 -1.04976 0)
(0.380389 -1.14278 0)
(0.349843 -1.3397 0)
(0.344775 -1.43177 0)
(0.293069 -0.863127 0)
(0.229186 -0.422467 0)
(0.156759 -0.367717 0)
(0.103065 -0.385197 0)
(0.0605075 -0.420014 0)
(0.0195133 -0.391996 0)
(-0.0277894 -0.452018 0)
(-0.087179 -0.464075 0)
(-0.164993 -0.441658 0)
(-0.280756 -0.438542 0)
(-0.408586 -0.579943 0)
(-0.456047 -1.07523 0)
(-0.25534 -1.29268 0)
(-0.0529704 -1.19153 0)
(0.0877436 -1.08082 0)
(0.166347 -0.998281 0)
(0.189324 -0.965634 0)
(0.130551 -0.902665 0)
(0.0480552 -0.929698 0)
(-0.00379738 -0.973141 0)
(-0.00137719 -0.932597 0)
(0.025709 -0.970707 0)
(0.0631574 -0.994485 0)
(0.115389 -1.00899 0)
(0.182609 -0.996427 0)
(0.24615 -0.978376 0)
(0.303029 -1.05464 0)
(0.240712 -1.08125 0)
(0.157261 -1.24549 0)
(0.110434 -1.33954 0)
(0.121725 -0.829923 0)
(0.130186 -0.333596 0)
(0.0966444 -0.297238 0)
(0.0631201 -0.332103 0)
(0.0362716 -0.357084 0)
(0.0106352 -0.337864 0)
(-0.0201848 -0.380295 0)
(-0.064882 -0.384587 0)
(-0.118985 -0.352566 0)
(-0.189625 -0.314774 0)
(-0.241065 -0.462706 0)
(-0.240124 -1.11488 0)
(-0.0687245 -1.31025 0)
(0.0214355 -1.25066 0)
(0.105855 -1.136 0)
(0.206143 -1.06762 0)
(0.199292 -0.877151 0)
(0.131977 -0.781687 0)
(0.0624182 -0.79297 0)
(-0.00271362 -0.855556 0)
(-0.0278132 -0.915076 0)
(-0.0157036 -0.978923 0)
(0.0227181 -0.957559 0)
(0.106951 -0.989008 0)
(0.197773 -0.975151 0)
(0.274156 -0.958893 0)
(0.281886 -0.970584 0)
(0.129396 -0.934066 0)
(-0.00991611 -1.12481 0)
(-0.0686026 -1.24316 0)
(-0.0115179 -0.866658 0)
(0.0443255 -0.316374 0)
(0.0405009 -0.245832 0)
(0.0224524 -0.294864 0)
(0.0125678 -0.310958 0)
(0.0029966 -0.301291 0)
(-0.0113831 -0.321736 0)
(-0.0373776 -0.31984 0)
(-0.0681703 -0.288917 0)
(-0.111031 -0.234548 0)
(-0.117681 -0.446588 0)
(-0.0647294 -1.09998 0)
(0.0329871 -1.3149 0)
(0.101766 -1.27188 0)
(0.161182 -1.14127 0)
(0.196343 -1.01172 0)
(0.150353 -0.776396 0)
(0.0984215 -0.683635 0)
(0.0589093 -0.698668 0)
(0.022738 -0.75433 0)
(-0.00588626 -0.82693 0)
(-0.0159443 -0.906185 0)
(0.0156006 -0.990259 0)
(0.10779 -1.05591 0)
(0.20383 -0.967321 0)
(0.298901 -0.937197 0)
(0.250014 -0.808673 0)
(0.0740508 -0.703629 0)
(-0.111561 -0.925709 0)
(-0.20257 -1.13715 0)
(-0.142348 -0.891462 0)
(-0.0549835 -0.37656 0)
(-0.0243784 -0.221353 0)
(-0.0228066 -0.271491 0)
(-0.0129984 -0.286263 0)
(-0.00465285 -0.282973 0)
(-0.00156399 -0.278753 0)
(-0.00607654 -0.273285 0)
(-0.0123306 -0.245065 0)
(-0.0379714 -0.183054 0)
(-0.0428524 -0.491413 0)
(0.0227058 -1.12194 0)
(0.114711 -1.29057 0)
(0.16812 -1.23349 0)
(0.19499 -1.08111 0)
(0.164921 -0.892958 0)
(0.0822074 -0.657099 0)
(0.039033 -0.593759 0)
(0.0246968 -0.63146 0)
(0.0198602 -0.686255 0)
(0.014919 -0.77314 0)
(0.0261961 -0.859093 0)
(0.0673849 -0.971557 0)
(0.137843 -1.05401 0)
(0.227519 -1.01661 0)
(0.240401 -0.848673 0)
(0.121046 -0.616061 0)
(0.013859 -0.547269 0)
(-0.103388 -0.757293 0)
(-0.246727 -1.02089 0)
(-0.256421 -0.914508 0)
(-0.15463 -0.493196 0)
(-0.0877258 -0.241965 0)
(-0.0669806 -0.267772 0)
(-0.0377331 -0.283922 0)
(-0.0118494 -0.282431 0)
(0.00775045 -0.253087 0)
(0.0242485 -0.247435 0)
(0.0432877 -0.221257 0)
(0.0324454 -0.163849 0)
(0.0216696 -0.525155 0)
(0.0748554 -1.11736 0)
(0.186107 -1.25904 0)
(0.238286 -1.15496 0)
(0.216198 -0.980333 0)
(0.0670963 -0.692639 0)
(-0.0226129 -0.541793 0)
(-0.0347694 -0.533301 0)
(-0.0214128 -0.588544 0)
(-0.00102732 -0.64598 0)
(0.0212405 -0.742821 0)
(0.0579962 -0.848409 0)
(0.118285 -0.979872 0)
(0.18172 -1.03912 0)
(0.18369 -0.920777 0)
(0.0785966 -0.68846 0)
(-0.00579133 -0.496151 0)
(-0.0227998 -0.472426 0)
(-0.0578101 -0.633805 0)
(-0.187965 -0.881682 0)
(-0.279307 -0.89264 0)
(-0.222942 -0.606688 0)
(-0.143088 -0.319353 0)
(-0.0989425 -0.290476 0)
(-0.0558732 -0.299222 0)
(-0.017479 -0.297319 0)
(0.0146427 -0.246898 0)
(0.0485024 -0.244592 0)
(0.0890009 -0.220894 0)
(0.0915672 -0.186026 0)
(0.089703 -0.578667 0)
(0.139407 -1.12377 0)
(0.256904 -1.24114 0)
(0.258456 -1.08653 0)
(0.075511 -0.767738 0)
(-0.0539032 -0.557234 0)
(-0.0793622 -0.491877 0)
(-0.0607931 -0.502426 0)
(-0.0379198 -0.558133 0)
(-0.0111433 -0.622155 0)
(0.0214144 -0.726339 0)
(0.0762381 -0.862896 0)
(0.144207 -0.978094 0)
(0.160926 -0.970449 0)
(0.0729799 -0.781521 0)
(-0.0280477 -0.57181 0)
(-0.0562724 -0.446443 0)
(-0.033267 -0.434762 0)
(-0.0327215 -0.536462 0)
(-0.118854 -0.71889 0)
(-0.236952 -0.817597 0)
(-0.257873 -0.67603 0)
(-0.190568 -0.446787 0)
(-0.115098 -0.339008 0)
(-0.0654151 -0.325005 0)
(-0.0212447 -0.324027 0)
(0.018296 -0.262685 0)
(0.0645503 -0.268334 0)
(0.121678 -0.24526 0)
(0.145802 -0.249298 0)
(0.18554 -0.678376 0)
(0.244585 -1.17227 0)
(0.258529 -1.21103 0)
(0.0951834 -0.877305 0)
(-0.0614908 -0.607255 0)
(-0.106838 -0.493297 0)
(-0.091281 -0.468223 0)
(-0.0593106 -0.484446 0)
(-0.0306439 -0.534751 0)
(-0.000952767 -0.605533 0)
(0.03484 -0.721525 0)
(0.0884509 -0.872742 0)
(0.12949 -0.94429 0)
(0.0843676 -0.850499 0)
(-0.0186045 -0.647319 0)
(-0.0840054 -0.497574 0)
(-0.0815498 -0.435348 0)
(-0.0424823 -0.436662 0)
(-0.0212964 -0.488572 0)
(-0.0693131 -0.59026 0)
(-0.175382 -0.701572 0)
(-0.250392 -0.68006 0)
(-0.216656 -0.581484 0)
(-0.123055 -0.425636 0)
(-0.0683473 -0.358778 0)
(-0.0230876 -0.360017 0)
(0.0176897 -0.302393 0)
(0.0770035 -0.322307 0)
(0.14682 -0.295574 0)
(0.193371 -0.375829 0)
(0.26973 -0.790353 0)
(0.29503 -1.10014 0)
(0.140481 -0.997102 0)
(-0.0401883 -0.698325 0)
(-0.112809 -0.530792 0)
(-0.108375 -0.468501 0)
(-0.076366 -0.458137 0)
(-0.0407566 -0.471451 0)
(-0.0108691 -0.513116 0)
(0.0164008 -0.586852 0)
(0.0501897 -0.711456 0)
(0.0867002 -0.858317 0)
(0.0808853 -0.867947 0)
(-0.00222109 -0.72065 0)
(-0.0896812 -0.558747 0)
(-0.118918 -0.480527 0)
(-0.0974703 -0.459629 0)
(-0.0567177 -0.466567 0)
(-0.0251471 -0.49117 0)
(-0.0319923 -0.532725 0)
(-0.100915 -0.590438 0)
(-0.192227 -0.622203 0)
(-0.208963 -0.635289 0)
(-0.1457 -0.535388 0)
(-0.0753423 -0.407489 0)
(-0.0247437 -0.42291 0)
(0.0239998 -0.375473 0)
(0.0921416 -0.468675 0)
(0.158254 -0.417233 0)
(0.252203 -0.583049 0)
(0.325939 -0.842498 0)
(0.246038 -0.960427 0)
(0.0442974 -0.795975 0)
(-0.0931404 -0.609538 0)
(-0.116726 -0.519261 0)
(-0.0881353 -0.481407 0)
(-0.0497406 -0.468374 0)
(-0.0147915 -0.472414 0)
(0.0138805 -0.502385 0)
(0.0364338 -0.571129 0)
(0.0574693 -0.693989 0)
(0.062262 -0.816177 0)
(0.00953678 -0.768866 0)
(-0.0828158 -0.629603 0)
(-0.139215 -0.536551 0)
(-0.136342 -0.506082 0)
(-0.103641 -0.499999 0)
(-0.0674193 -0.505312 0)
(-0.0374147 -0.516068 0)
(-0.020867 -0.527563 0)
(-0.0374418 -0.533796 0)
(-0.0935091 -0.538057 0)
(-0.155088 -0.5969 0)
(-0.156765 -0.569885 0)
(-0.0977648 -0.525643 0)
(-0.0299661 -0.541306 0)
(0.0363752 -0.509171 0)
(0.128491 -0.695377 0)
(0.214462 -0.616414 0)
(0.320566 -0.754843 0)
(0.302203 -0.778707 0)
(0.133436 -0.780372 0)
(-0.0330566 -0.674544 0)
(-0.106548 -0.593674 0)
(-0.0977961 -0.547263 0)
(-0.0607212 -0.51753 0)
(-0.0219204 -0.496157 0)
(0.0101213 -0.488756 0)
(0.0336563 -0.504835 0)
(0.0472899 -0.562801 0)
(0.0510786 -0.677048 0)
(0.0217166 -0.756301 0)
(-0.0602627 -0.686372 0)
(-0.13736 -0.59312 0)
(-0.157393 -0.552759 0)
(-0.13631 -0.541005 0)
(-0.105243 -0.538684 0)
(-0.07346 -0.542819 0)
(-0.0431957 -0.547249 0)
(-0.0158921 -0.546292 0)
(0.00258106 -0.527216 0)
(-0.000890178 -0.496892 0)
(-0.0541289 -0.511105 0)
(-0.129023 -0.518252 0)
(-0.101645 -0.677756 0)
(-0.0151378 -0.636666 0)
(0.0260265 -0.649344 0)
(0.0931754 -0.75018 0)
(0.183699 -0.772934 0)
(0.22637 -0.757302 0)
(0.144853 -0.649285 0)
(0.00705716 -0.652887 0)
(-0.0769499 -0.631347 0)
(-0.0909033 -0.608725 0)
(-0.0699953 -0.584232 0)
(-0.0370884 -0.560826 0)
(-8.54699e-05 -0.533649 0)
(0.0292527 -0.513531 0)
(0.0449437 -0.514387 0)
(0.0463664 -0.555876 0)
(0.0305335 -0.650123 0)
(-0.023153 -0.689083 0)
(-0.104193 -0.632427 0)
(-0.153311 -0.585361 0)
(-0.154081 -0.573732 0)
(-0.133148 -0.569949 0)
(-0.108208 -0.570555 0)
(-0.0806516 -0.577032 0)
(-0.0470499 -0.583642 0)
(-0.00772066 -0.582526 0)
(0.0319825 -0.555959 0)
(0.0568481 -0.514479 0)
(0.0462481 -0.478246 0)
(0.00740103 -0.452921 0)
(0.000352489 -0.635003 0)
(0.00743393 -0.605738 0)
(0.00267149 -0.654861 0)
(0.0279977 -0.719901 0)
(0.0628359 -0.784762 0)
(0.023847 -0.683988 0)
(-0.0400374 -0.588397 0)
(-0.0695304 -0.615368 0)
(-0.0841216 -0.622904 0)
(-0.0764966 -0.625345 0)
(-0.0522843 -0.618093 0)
(-0.0200916 -0.604142 0)
(0.0181032 -0.576316 0)
(0.0467139 -0.538749 0)
(0.0548668 -0.519152 0)
(0.0418616 -0.534376 0)
(0.0046063 -0.598382 0)
(-0.0580674 -0.61877 0)
(-0.120586 -0.590633 0)
(-0.153804 -0.577744 0)
(-0.153201 -0.58638 0)
(-0.133586 -0.59231 0)
(-0.11441 -0.594877 0)
(-0.0953361 -0.601059 0)
(-0.0581622 -0.619387 0)
(-0.00123325 -0.625714 0)
(0.0603652 -0.604841 0)
(0.10325 -0.563603 0)
(0.125105 -0.509004 0)
(0.129998 -0.445961 0)
(0.0651545 -0.529667 0)
(-1.41027e-05 -0.550011 0)
(-0.00598433 -0.651515 0)
(-0.0129597 -0.718713 0)
(-0.0311713 -0.775994 0)
(-0.0808746 -0.684878 0)
(-0.102047 -0.614846 0)
(-0.0876591 -0.614968 0)
(-0.0873419 -0.6232 0)
(-0.0787245 -0.642035 0)
(-0.0485951 -0.651495 0)
(-0.00792384 -0.645634 0)
(0.0399698 -0.623038 0)
(0.0774929 -0.56849 0)
(0.0791773 -0.5139 0)
(0.045061 -0.490134 0)
(-0.0134053 -0.520696 0)
(-0.079833 -0.540685 0)
(-0.133623 -0.545057 0)
(-0.166213 -0.560075 0)
(-0.167546 -0.587681 0)
(-0.140049 -0.609425 0)
(-0.112207 -0.632482 0)
(-0.0955803 -0.643499 0)
(-0.0622099 -0.711446 0)
(-0.00149614 -0.727885 0)
(0.0568103 -0.711746 0)
(0.125607 -0.647727 0)
(0.18923 -0.535268 0)
(0.188989 -0.464815 0)
(0.114967 -0.466491 0)
(0.0303824 -0.472159 0)
(-0.0476873 -0.739594 0)
(-0.0574295 -0.893394 0)
(-0.0391594 -0.855284 0)
(-0.0628232 -0.709252 0)
(-0.0695251 -0.623123 0)
(-0.0802841 -0.61267 0)
(-0.0915753 -0.646766 0)
(-0.0865595 -0.705472 0)
(-0.0521148 -0.72843 0)
(-0.00104758 -0.721938 0)
(0.0581078 -0.707259 0)
(0.125376 -0.641019 0)
(0.139652 -0.490346 0)
(0.0700399 -0.424563 0)
(-0.0220576 -0.42741 0)
(-0.101179 -0.452222 0)
(-0.164215 -0.486963 0)
(-0.185795 -0.5596 0)
(-0.169025 -0.642291 0)
(-0.134799 -0.687429 0)
(-0.113406 -0.761032 0)
(-0.106011 -0.809817 0)
(-0.0727558 -1.0353 0)
(0.01399 -1.08874 0)
(0.1083 -1.01614 0)
(0.197776 -0.826875 0)
(0.221199 -0.608455 0)
(0.21266 -0.441523 0)
(0.151314 -0.385965 0)
(0.0476722 -0.379732 0)
(-0.0893182 -0.791082 0)
(-0.179567 -1.11922 0)
(-0.117877 -1.05259 0)
(-0.0693684 -0.79876 0)
(-0.084685 -0.697988 0)
(-0.123148 -0.696581 0)
(-0.167761 -0.774678 0)
(-0.182307 -0.918387 0)
(-0.127976 -0.980341 0)
(-0.02486 -0.968023 0)
(0.0892492 -0.941714 0)
(0.199443 -0.811219 0)
(0.209866 -0.508383 0)
(0.108645 -0.340064 0)
(-0.0255076 -0.331093 0)
(-0.131394 -0.357437 0)
(-0.200089 -0.487288 0)
(-0.242152 -0.654243 0)
(-0.26527 -0.936682 0)
(-0.232022 -1.19088 0)
(-0.150536 -1.32207 0)
(-0.0525029 -1.38498 0)
(0.0435953 -1.5178 0)
(0.133051 -1.52259 0)
(0.23486 -1.46286 0)
(0.376249 -1.35492 0)
(0.499726 -1.05314 0)
(0.326985 -0.455304 0)
(0.169642 -0.291423 0)
(0.0488808 -0.277436 0)
(-0.113995 -0.684275 0)
(-0.321485 -1.1395 0)
(-0.400615 -1.38386 0)
(-0.378127 -1.26935 0)
(-0.398271 -1.17893 0)
(-0.453514 -1.20661 0)
(-0.481967 -1.26195 0)
(-0.465583 -1.41993 0)
(-0.337649 -1.49739 0)
(-0.137668 -1.50977 0)
(0.0831224 -1.49526 0)
(0.311994 -1.34937 0)
(0.326572 -0.750984 0)
(0.141936 -0.301357 0)
(-0.0275394 -0.228526 0)
(-0.171475 -0.336643 0)
(-0.320845 -0.695361 0)
(-0.362306 -1.18551 0)
(-0.233241 -1.38219 0)
(-0.115658 -1.42304 0)
(-0.0172062 -1.40082 0)
(0.0892206 -1.37238 0)
(0.168565 -1.38242 0)
(0.214483 -1.37431 0)
(0.275637 -1.34308 0)
(0.356532 -1.28838 0)
(0.510169 -1.11673 0)
(0.402964 -0.660583 0)
(0.153221 -0.190296 0)
(0.0357507 -0.174135 0)
(-0.0647298 -0.40396 0)
(-0.239212 -0.820292 0)
(-0.398264 -1.07128 0)
(-0.490997 -1.13601 0)
(-0.518983 -1.10713 0)
(-0.547976 -1.10023 0)
(-0.568907 -1.16084 0)
(-0.550267 -1.32496 0)
(-0.447541 -1.4877 0)
(-0.253513 -1.55155 0)
(-0.043216 -1.5435 0)
(0.140085 -1.41742 0)
(0.236696 -1.04091 0)
(0.113329 -0.508159 0)
(-0.0778433 -0.208601 0)
(-0.296431 -0.603024 0)
(-0.358752 -1.06749 0)
(-0.215203 -1.22842 0)
(-0.117176 -1.29477 0)
(-0.0468703 -1.32656 0)
(0.0205529 -1.33688 0)
(0.0980844 -1.34308 0)
(0.16839 -1.35983 0)
(0.227222 -1.35321 0)
(0.282987 -1.32362 0)
(0.302132 -1.23432 0)
(0.331583 -0.996825 0)
(0.276804 -0.56994 0)
(0.0890539 -0.111651 0)
(0.00931161 -0.0907725 0)
(-0.0241786 -0.292608 0)
(-0.129371 -0.612949 0)
(-0.251357 -0.868187 0)
(-0.335312 -0.961272 0)
(-0.388556 -0.963332 0)
(-0.412775 -0.969797 0)
(-0.444118 -1.04458 0)
(-0.471745 -1.26315 0)
(-0.425588 -1.52721 0)
(-0.276392 -1.65078 0)
(-0.113034 -1.62391 0)
(-0.0297438 -1.4051 0)
(-0.0482779 -0.959978 0)
(-0.0994503 -0.694207 0)
(-0.18692 -0.485936 0)
(-0.288925 -0.754302 0)
(-0.190807 -1.00771 0)
(-0.115206 -1.18987 0)
(-0.0732085 -1.29335 0)
(-0.0298183 -1.34835 0)
(0.030872 -1.36995 0)
(0.102242 -1.37644 0)
(0.170869 -1.37902 0)
(0.223238 -1.36539 0)
(0.250214 -1.304 0)
(0.238417 -1.17186 0)
(0.231949 -0.9271 0)
(0.218183 -0.514733 0)
(0.0602251 -0.0851594 0)
(-0.00413907 -0.0435793 0)
(-0.00577518 -0.241348 0)
(-0.0584263 -0.468645 0)
(-0.161756 -0.788266 0)
(-0.212872 -0.855906 0)
(-0.251724 -0.896594 0)
(-0.260999 -0.917936 0)
(-0.275544 -0.991772 0)
(-0.332198 -1.22109 0)
(-0.349082 -1.56686 0)
(-0.246644 -1.75955 0)
(-0.126672 -1.71077 0)
(-0.0965072 -1.39978 0)
(-0.15916 -0.884027 0)
(-0.228369 -0.618149 0)
(-0.233965 -0.569889 0)
(-0.196584 -0.723891 0)
(-0.127783 -1.01076 0)
(-0.0767721 -1.18729 0)
(-0.0400527 -1.29238 0)
(-0.00651759 -1.34954 0)
(0.0412887 -1.38202 0)
(0.100494 -1.39138 0)
(0.157152 -1.38184 0)
(0.196438 -1.34132 0)
(0.207398 -1.2487 0)
(0.191977 -1.09864 0)
(0.179017 -0.8652 0)
(0.207889 -0.495436 0)
(0.0682616 -0.0811375 0)
(-0.001407 -0.0116374 0)
(-0.00136883 -0.214872 0)
(-0.0209844 -0.373418 0)
(-0.0917558 -0.659887 0)
(-0.135105 -0.770724 0)
(-0.146194 -0.841496 0)
(-0.152473 -0.87932 0)
(-0.16262 -0.935095 0)
(-0.206793 -1.14882 0)
(-0.247822 -1.54983 0)
(-0.192267 -1.80152 0)
(-0.112041 -1.74452 0)
(-0.112381 -1.35419 0)
(-0.167454 -0.816048 0)
(-0.209117 -0.578566 0)
(-0.212431 -0.557847 0)
(-0.165503 -0.75673 0)
(-0.0916643 -1.01883 0)
(-0.0465849 -1.18176 0)
(-0.0136317 -1.27416 0)
(0.0124651 -1.33806 0)
(0.0477535 -1.38086 0)
(0.0895344 -1.39358 0)
(0.128642 -1.37353 0)
(0.150173 -1.31072 0)
(0.150641 -1.19623 0)
(0.150436 -1.04195 0)
(0.15695 -0.810419 0)
(0.220594 -0.511992 0)
(0.109907 -0.0985425 0)
(0.0248315 -0.00338857 0)
(0.00378056 -0.207006 0)
(0.000934215 -0.314429 0)
(-0.0411983 -0.551005 0)
(-0.0909207 -0.73912 0)
(-0.0888874 -0.778776 0)
(-0.0810687 -0.836385 0)
(-0.0808853 -0.882035 0)
(-0.114429 -1.07889 0)
(-0.153508 -1.51796 0)
(-0.130279 -1.81497 0)
(-0.0967333 -1.752 0)
(-0.126323 -1.31178 0)
(-0.168811 -0.781929 0)
(-0.196731 -0.566545 0)
(-0.190411 -0.586182 0)
(-0.126379 -0.795998 0)
(-0.0605081 -1.02879 0)
(-0.0232944 -1.17415 0)
(0.00783868 -1.25876 0)
(0.0294148 -1.31712 0)
(0.0530388 -1.36143 0)
(0.0778639 -1.37387 0)
(0.0991031 -1.34307 0)
(0.109741 -1.26435 0)
(0.114561 -1.14497 0)
(0.125124 -0.992597 0)
(0.13839 -0.775648 0)
(0.19423 -0.515918 0)
(0.131545 -0.136135 0)
(0.0485241 -0.0351425 0)
(0.00576858 -0.209128 0)
(0.0161102 -0.287183 0)
(0.0051072 -0.462501 0)
(-0.042816 -0.637811 0)
(-0.073496 -0.76835 0)
(-0.0472112 -0.798136 0)
(-0.0244716 -0.845486 0)
(-0.0371566 -1.02663 0)
(-0.0752281 -1.46233 0)
(-0.0898337 -1.78042 0)
(-0.0945058 -1.71706 0)
(-0.138834 -1.25131 0)
(-0.15804 -0.756043 0)
(-0.156914 -0.56342 0)
(-0.144507 -0.609496 0)
(-0.0957714 -0.813888 0)
(-0.0476688 -1.0242 0)
(-0.0146174 -1.15773 0)
(0.012523 -1.2351 0)
(0.0301245 -1.29175 0)
(0.046919 -1.33282 0)
(0.0613138 -1.34204 0)
(0.0716017 -1.30343 0)
(0.0766485 -1.21811 0)
(0.0813375 -1.09891 0)
(0.0920564 -0.950701 0)
(0.110034 -0.738303 0)
(0.118674 -0.469796 0)
(0.0884221 -0.150906 0)
(0.0401154 -0.0821609 0)
(0.0100308 -0.220708 0)
(0.0295636 -0.278431 0)
(0.0342491 -0.402403 0)
(0.00413635 -0.541428 0)
(-0.0408757 -0.6822 0)
(-0.0341505 -0.821278 0)
(0.00966354 -0.833643 0)
(0.0250566 -1.01189 0)
(-0.000731771 -1.41436 0)
(-0.045246 -1.72135 0)
(-0.086056 -1.65942 0)
(-0.136383 -1.19674 0)
(-0.153585 -0.793203 0)
(-0.13452 -0.558351 0)
(-0.12189 -0.632597 0)
(-0.0741825 -0.821412 0)
(-0.0382915 -1.01375 0)
(-0.0120067 -1.13617 0)
(0.00921906 -1.20678 0)
(0.023085 -1.25861 0)
(0.0350402 -1.29482 0)
(0.0436038 -1.29943 0)
(0.0482477 -1.25507 0)
(0.0501015 -1.16613 0)
(0.0532558 -1.04757 0)
(0.0553346 -0.897126 0)
(0.0728323 -0.683782 0)
(0.0603376 -0.398438 0)
(0.0309261 -0.137696 0)
(0.0142033 -0.10132 0)
(0.0146166 -0.237675 0)
(0.0407661 -0.277263 0)
(0.0497847 -0.352456 0)
(0.0299286 -0.451292 0)
(-0.00197966 -0.593849 0)
(-0.00421732 -0.781856 0)
(0.0352154 -0.82974 0)
(0.0725716 -1.01026 0)
(0.0544764 -1.35975 0)
(-0.00566366 -1.63429 0)
(-0.0729912 -1.58411 0)
(-0.118462 -1.14196 0)
(-0.133418 -0.787551 0)
(-0.11323 -0.558223 0)
(-0.0988074 -0.644122 0)
(-0.062441 -0.816198 0)
(-0.0360323 -0.994192 0)
(-0.0151587 -1.10725 0)
(2.14046e-05 -1.17198 0)
(0.0103214 -1.21752 0)
(0.0190794 -1.25028 0)
(0.0247283 -1.25037 0)
(0.0269455 -1.20144 0)
(0.027838 -1.1105 0)
(0.0305817 -0.991996 0)
(0.0348567 -0.840088 0)
(0.0436672 -0.668675 0)
(0.0168487 -0.322676 0)
(-0.00202773 -0.125432 0)
(-0.00105187 -0.1073 0)
(0.0199252 -0.261218 0)
(0.0493242 -0.276177 0)
(0.0584231 -0.311358 0)
(0.0520228 -0.3803 0)
(0.0408475 -0.525545 0)
(0.0473975 -0.74718 0)
(0.0732392 -0.823851 0)
(0.0962383 -1.00248 0)
(0.0849345 -1.30882 0)
(0.0220224 -1.53838 0)
(-0.0591765 -1.49633 0)
(-0.105175 -1.07732 0)
(-0.116973 -0.768868 0)
(-0.0954619 -0.55917 0)
(-0.0826752 -0.64483 0)
(-0.0560028 -0.803049 0)
(-0.0361175 -0.966995 0)
(-0.0211064 -1.07143 0)
(-0.0113856 -1.13071 0)
(-0.00482395 -1.17358 0)
(0.00123102 -1.20239 0)
(0.00466582 -1.19676 0)
(0.00510789 -1.14391 0)
(0.00428353 -1.05234 0)
(0.00586594 -0.934353 0)
(0.0253683 -0.776413 0)
(0.0183757 -0.578114 0)
(-0.0187737 -0.258715 0)
(-0.0259122 -0.121014 0)
(-0.0116374 -0.119214 0)
(0.0247726 -0.292124 0)
(0.0570978 -0.275725 0)
(0.0735568 -0.286477 0)
(0.0924593 -0.339472 0)
(0.104792 -0.471599 0)
(0.101919 -0.690461 0)
(0.0897286 -0.802367 0)
(0.115009 -1.00501 0)
(0.106299 -1.26354 0)
(0.0407275 -1.43261 0)
(-0.0521598 -1.38954 0)
(-0.103049 -1.01048 0)
(-0.113492 -0.748202 0)
(-0.0878769 -0.557704 0)
(-0.0757956 -0.633523 0)
(-0.0544211 -0.783321 0)
(-0.0369195 -0.93232 0)
(-0.0282797 -1.0285 0)
(-0.0236923 -1.0831 0)
(-0.0214451 -1.12316 0)
(-0.0185134 -1.14987 0)
(-0.0163937 -1.13909 0)
(-0.0184557 -1.08194 0)
(-0.0221371 -0.989489 0)
(-0.00888598 -0.872158 0)
(0.0093605 -0.75587 0)
(-0.0146741 -0.489227 0)
(-0.0415921 -0.220469 0)
(-0.0402841 -0.123978 0)
(-0.0168238 -0.127917 0)
(0.0272549 -0.328047 0)
(0.0674581 -0.28987 0)
(0.108896 -0.299266 0)
(0.165209 -0.337499 0)
(0.190992 -0.417305 0)
(0.141929 -0.594167 0)
(0.0827853 -0.756669 0)
(0.0893914 -0.978904 0)
(0.0837232 -1.19118 0)
(0.0312181 -1.33028 0)
(-0.0508748 -1.27848 0)
(-0.113434 -0.946015 0)
(-0.118669 -0.729276 0)
(-0.0893334 -0.556077 0)
(-0.0794617 -0.613253 0)
(-0.0597517 -0.760123 0)
(-0.0419779 -0.891123 0)
(-0.0383128 -0.981187 0)
(-0.0370553 -1.03089 0)
(-0.0408472 -1.06768 0)
(-0.0411235 -1.09565 0)
(-0.0374605 -1.07911 0)
(-0.0413358 -1.01424 0)
(-0.0333194 -0.922633 0)
(-0.0162507 -0.855384 0)
(-0.0285182 -0.660923 0)
(-0.0560919 -0.417184 0)
(-0.0621136 -0.210876 0)
(-0.0500632 -0.141468 0)
(-0.0193574 -0.143306 0)
(0.0249448 -0.373092 0)
(0.0727922 -0.331886 0)
(0.139189 -0.353461 0)
(0.214122 -0.360407 0)
(0.228035 -0.346474 0)
(0.129327 -0.429662 0)
(0.0254638 -0.678972 0)
(0.0390276 -0.942115 0)
(0.0601828 -1.11257 0)
(2.24768e-05 -1.18229 0)
(-0.0833137 -1.13749 0)
(-0.132169 -0.865368 0)
(-0.130622 -0.69154 0)
(-0.101589 -0.547618 0)
(-0.083492 -0.585713 0)
(-0.0793607 -0.75841 0)
(-0.0655162 -0.835659 0)
(-0.0545654 -0.919002 0)
(-0.0511022 -0.962742 0)
(-0.0650979 -0.995191 0)
(-0.0692705 -1.02379 0)
(-0.0561691 -1.00191 0)
(-0.0468921 -0.935539 0)
(-0.041438 -0.901154 0)
(-0.054651 -0.756824 0)
(-0.0858782 -0.572535 0)
(-0.0956929 -0.376832 0)
(-0.0846814 -0.227078 0)
(-0.0596161 -0.179417 0)
(-0.0211417 -0.177469 0)
(0.0247877 -0.424006 0)
(0.0754514 -0.381564 0)
(0.14337 -0.40731 0)
(0.205594 -0.384486 0)
(0.220667 -0.329686 0)
(0.151464 -0.32136 0)
(0.0241299 -0.643743 0)
(0.00649938 -0.945324 0)
(0.0313263 -1.0364 0)
(-0.0255903 -1.04572 0)
(-0.103648 -0.996573 0)
(-0.13466 -0.800067 0)
(-0.122734 -0.654037 0)
(-0.0976392 -0.524323 0)
(-0.0793577 -0.538598 0)
(-0.081849 -0.685317 0)
(-0.087638 -0.809609 0)
(-0.0825471 -0.902272 0)
(-0.0820969 -0.902511 0)
(-0.0826478 -0.915122 0)
(-0.0903344 -1.00941 0)
(-0.0882714 -0.986197 0)
(-0.079604 -0.908372 0)
(-0.0884812 -0.801051 0)
(-0.118254 -0.66011 0)
(-0.136168 -0.508172 0)
(-0.130789 -0.363161 0)
(-0.107792 -0.261779 0)
(-0.0698837 -0.232661 0)
(-0.0230364 -0.22637 0)
(0.022864 -0.461013 0)
(0.07008 -0.421037 0)
(0.116877 -0.431091 0)
(0.154139 -0.391307 0)
(0.196455 -0.354545 0)
(0.222773 -0.371256 0)
(0.181354 -0.621415 0)
(0.0780476 -0.950715 0)
(0.0607161 -0.968045 0)
(0.00318233 -0.982814 0)
(-0.0934774 -0.934074 0)
(-0.129523 -0.785747 0)
(-0.108483 -0.62413 0)
(-0.0793781 -0.511694 0)
(-0.0518055 -0.511182 0)
(-0.0416661 -0.619699 0)
(-0.0549275 -0.720606 0)
(-0.0777731 -0.799189 0)
(-0.0952544 -0.842082 0)
(-0.0954134 -0.874372 0)
(-0.103473 -0.906318 0)
(-0.124949 -0.887455 0)
(-0.137886 -0.816402 0)
(-0.153274 -0.711542 0)
(-0.169798 -0.588585 0)
(-0.173313 -0.472532 0)
(-0.157699 -0.374125 0)
(-0.124221 -0.309953 0)
(-0.0755946 -0.291331 0)
(-0.0238209 -0.279575 0)
(0.015425 -0.49814 0)
(0.0552254 -0.463042 0)
(0.0953355 -0.457287 0)
(0.137812 -0.426079 0)
(0.20546 -0.414132 0)
(0.293376 -0.467693 0)
(0.32116 -0.630859 0)
(0.232655 -0.835337 0)
(0.136742 -0.879232 0)
(0.0517766 -0.810635 0)
(-0.0505325 -0.773628 0)
(-0.109426 -0.69924 0)
(-0.107793 -0.593245 0)
(-0.0726198 -0.512441 0)
(-0.0294587 -0.505974 0)
(-0.00501481 -0.576744 0)
(-0.00984575 -0.650383 0)
(-0.0337407 -0.71056 0)
(-0.0616968 -0.749852 0)
(-0.0865526 -0.779231 0)
(-0.115913 -0.805398 0)
(-0.149058 -0.797373 0)
(-0.174624 -0.739111 0)
(-0.19202 -0.647105 0)
(-0.200082 -0.547867 0)
(-0.194967 -0.465308 0)
(-0.171618 -0.403556 0)
(-0.129661 -0.36339 0)
(-0.0766236 -0.348974 0)
(-0.0241088 -0.332988 0)
(0.0194614 -0.540116 0)
(0.058016 -0.499423 0)
(0.0950614 -0.487066 0)
(0.145796 -0.48167 0)
(0.225648 -0.504002 0)
(0.319406 -0.560619 0)
(0.35121 -0.644353 0)
(0.269694 -0.745726 0)
(0.142849 -0.769393 0)
(0.0499549 -0.711772 0)
(-0.0190385 -0.684665 0)
(-0.0703483 -0.646196 0)
(-0.0812395 -0.580813 0)
(-0.0536878 -0.525885 0)
(-0.0102437 -0.515792 0)
(0.0178372 -0.554532 0)
(0.01801 -0.601943 0)
(-0.00142648 -0.645383 0)
(-0.0288549 -0.678861 0)
(-0.0588686 -0.704236 0)
(-0.0959437 -0.721228 0)
(-0.140772 -0.71411 0)
(-0.179929 -0.674513 0)
(-0.203753 -0.609534 0)
(-0.209297 -0.53715 0)
(-0.197726 -0.479838 0)
(-0.16822 -0.43961 0)
(-0.12467 -0.412255 0)
(-0.0747546 -0.399873 0)
(-0.0243199 -0.384279 0)
(0.0230038 -0.568913 0)
(0.0615755 -0.522739 0)
(0.0967221 -0.516488 0)
(0.14655 -0.534686 0)
(0.213142 -0.571146 0)
(0.260342 -0.614931 0)
(0.260603 -0.664 0)
(0.212217 -0.738065 0)
(0.125834 -0.766599 0)
(0.0539116 -0.727567 0)
(0.00970697 -0.699399 0)
(-0.0240477 -0.664738 0)
(-0.0360632 -0.613488 0)
(-0.0195499 -0.5686 0)
(0.011321 -0.551794 0)
(0.0326777 -0.565656 0)
(0.0331731 -0.590688 0)
(0.0172163 -0.618703 0)
(-0.00785066 -0.645255 0)
(-0.0373593 -0.665996 0)
(-0.072689 -0.676129 0)
(-0.116487 -0.667245 0)
(-0.161991 -0.639714 0)
(-0.192163 -0.597018 0)
(-0.196752 -0.547045 0)
(-0.180031 -0.503561 0)
(-0.149899 -0.472263 0)
(-0.112039 -0.451648 0)
(-0.069462 -0.441501 0)
(-0.0235638 -0.432645 0)
(0.0214614 -0.592167 0)
(0.0556111 -0.539893 0)
(0.0857491 -0.542574 0)
(0.120596 -0.571763 0)
(0.143704 -0.607266 0)
(0.145944 -0.644918 0)
(0.14583 -0.69156 0)
(0.136668 -0.755579 0)
(0.100461 -0.791447 0)
(0.0631398 -0.776731 0)
(0.0401471 -0.751678 0)
(0.0227648 -0.716419 0)
(0.0163501 -0.669266 0)
(0.0256052 -0.627296 0)
(0.0420091 -0.603569 0)
(0.0521353 -0.600131 0)
(0.0486548 -0.608693 0)
(0.0323836 -0.623485 0)
(0.00690616 -0.641018 0)
(-0.0238298 -0.65592 0)
(-0.0577011 -0.661787 0)
(-0.0945566 -0.650764 0)
(-0.131366 -0.624931 0)
(-0.158159 -0.593068 0)
(-0.163681 -0.558351 0)
(-0.149456 -0.52402 0)
(-0.125472 -0.497637 0)
(-0.0961035 -0.481747 0)
(-0.061345 -0.475817 0)
(-0.0212788 -0.475665 0)
(0.0145017 -0.609979 0)
(0.0368648 -0.55374 0)
(0.052918 -0.562089 0)
(0.0622173 -0.593999 0)
(0.0602921 -0.628906 0)
(0.0612061 -0.666916 0)
(0.0735005 -0.713641 0)
(0.0843227 -0.762914 0)
(0.0834537 -0.793035 0)
(0.077212 -0.789535 0)
(0.071798 -0.767882 0)
(0.0664124 -0.734162 0)
(0.0639513 -0.693694 0)
(0.0667229 -0.65717 0)
(0.0716671 -0.632552 0)
(0.0725635 -0.621556 0)
(0.064871 -0.620889 0)
(0.0476816 -0.626874 0)
(0.0221311 -0.636175 0)
(-0.00882996 -0.644441 0)
(-0.041061 -0.645578 0)
(-0.0704276 -0.633168 0)
(-0.0950157 -0.609529 0)
(-0.113951 -0.584057 0)
(-0.122602 -0.560512 0)
(-0.117217 -0.536351 0)
(-0.10162 -0.515441 0)
(-0.0803405 -0.503559 0)
(-0.0533195 -0.50335 0)
(-0.0190693 -0.512307 0)
(0.00288278 -0.614367 0)
(0.00655377 -0.560933 0)
(0.00628905 -0.570978 0)
(0.00130925 -0.601317 0)
(-0.00108667 -0.637832 0)
(0.0103381 -0.684526 0)
(0.0338749 -0.733244 0)
(0.0601802 -0.771824 0)
(0.0819801 -0.79064 0)
(0.0967165 -0.783871 0)
(0.104287 -0.75954 0)
(0.105427 -0.725163 0)
(0.103094 -0.688292 0)
(0.0997212 -0.655828 0)
(0.095212 -0.632219 0)
(0.0882476 -0.617939 0)
(0.0770075 -0.612177 0)
(0.0595699 -0.612353 0)
(0.0358611 -0.616034 0)
(0.00799878 -0.619659 0)
(-0.0202295 -0.618337 0)
(-0.044446 -0.607566 0)
(-0.0628779 -0.589251 0)
(-0.0770531 -0.571235 0)
(-0.0868796 -0.556849 0)
(-0.0883029 -0.541719 0)
(-0.0801883 -0.526641 0)
(-0.0657441 -0.518321 0)
(-0.0459574 -0.523316 0)
(-0.0172911 -0.542283 0)
(-0.00928204 -0.600909 0)
(-0.0242404 -0.558257 0)
(-0.0351233 -0.567332 0)
(-0.0462631 -0.597239 0)
(-0.0495267 -0.64169 0)
(-0.0261469 -0.703744 0)
(0.0174642 -0.750323 0)
(0.0603797 -0.777591 0)
(0.0971537 -0.784643 0)
(0.124446 -0.769442 0)
(0.138778 -0.739999 0)
(0.141407 -0.704099 0)
(0.136154 -0.669093 0)
(0.126676 -0.639546 0)
(0.114971 -0.617506 0)
(0.101769 -0.602787 0)
(0.0866989 -0.594659 0)
(0.068862 -0.590962 0)
(0.0474599 -0.590958 0)
(0.0230893 -0.591918 0)
(-0.00135204 -0.590336 0)
(-0.0223663 -0.58297 0)
(-0.0382235 -0.570718 0)
(-0.0501567 -0.55901 0)
(-0.0594752 -0.550737 0)
(-0.0640402 -0.542324 0)
(-0.0613641 -0.532657 0)
(-0.0525561 -0.527596 0)
(-0.0389877 -0.53634 0)
(-0.0155329 -0.566116 0)
(-0.017345 -0.572062 0)
(-0.0441664 -0.544145 0)
(-0.0649854 -0.553661 0)
(-0.0845551 -0.582884 0)
(-0.0793894 -0.64307 0)
(-0.0258795 -0.724734 0)
(0.042497 -0.742566 0)
(0.0905546 -0.748853 0)
(0.12631 -0.747414 0)
(0.151721 -0.726718 0)
(0.164619 -0.697306 0)
(0.165841 -0.665228 0)
(0.157679 -0.635337 0)
(0.144034 -0.610951 0)
(0.128016 -0.592816 0)
(0.110977 -0.580654 0)
(0.0932027 -0.573287 0)
(0.0749106 -0.568959 0)
(0.0554868 -0.567379 0)
(0.0344256 -0.567329 0)
(0.0133449 -0.566341 0)
(-0.00512183 -0.562055 0)
(-0.0194341 -0.554693 0)
(-0.0302797 -0.547741 0)
(-0.0389713 -0.543558 0)
(-0.0446964 -0.539908 0)
(-0.0453613 -0.534872 0)
(-0.0407998 -0.532777 0)
(-0.0320972 -0.54386 0)
(-0.0134527 -0.584574 0)
(-0.0193836 -0.533302 0)
(-0.0534218 -0.520797 0)
(-0.0814073 -0.529752 0)
(-0.093446 -0.559583 0)
(-0.0496696 -0.654896 0)
(0.0411351 -0.740622 0)
(0.10683 -0.707196 0)
(0.132595 -0.684533 0)
(0.143964 -0.678238 0)
(0.152449 -0.657513 0)
(0.159563 -0.635398 0)
(0.16304 -0.612012 0)
(0.158057 -0.590764 0)
(0.14588 -0.574022 0)
(0.130029 -0.561944 0)
(0.112738 -0.553994 0)
(0.0949433 -0.549241 0)
(0.0770875 -0.546722 0)
(0.0593206 -0.545472 0)
(0.0413182 -0.545544 0)
(0.0234426 -0.545537 0)
(0.00742608 -0.543808 0)
(-0.00545918 -0.540279 0)
(-0.0155004 -0.537104 0)
(-0.0236799 -0.536061 0)
(-0.0297561 -0.535853 0)
(-0.03225 -0.534554 0)
(-0.0304978 -0.535162 0)
(-0.0249747 -0.547974 0)
(-0.0107344 -0.598528 0)
(-0.0198634 -0.490582 0)
(-0.0540382 -0.492193 0)
(-0.0661699 -0.503447 0)
(-0.038201 -0.552497 0)
(0.0514353 -0.684949 0)
(0.125955 -0.738044 0)
(0.145908 -0.684489 0)
(0.149185 -0.631739 0)
(0.136978 -0.614833 0)
(0.125191 -0.597452 0)
(0.125172 -0.58279 0)
(0.132418 -0.562464 0)
(0.13503 -0.546904 0)
(0.130115 -0.536318 0)
(0.11933 -0.529895 0)
(0.105485 -0.526348 0)
(0.0903104 -0.524795 0)
(0.0746061 -0.524758 0)
(0.058974 -0.525229 0)
(0.0437407 -0.526191 0)
(0.0289858 -0.527365 0)
(0.0154904 -0.527776 0)
(0.00420647 -0.527266 0)
(-0.00490175 -0.527143 0)
(-0.0124873 -0.528679 0)
(-0.0185026 -0.531109 0)
(-0.0218926 -0.532792 0)
(-0.0218447 -0.535887 0)
(-0.0183198 -0.550651 0)
(-0.00790895 -0.608077 0)
(-0.0208389 -0.447773 0)
(-0.0400502 -0.467834 0)
(-0.00526474 -0.511745 0)
(0.0739139 -0.581003 0)
(0.136487 -0.687555 0)
(0.147002 -0.702827 0)
(0.143286 -0.680029 0)
(0.13679 -0.613658 0)
(0.118896 -0.579706 0)
(0.0984754 -0.562929 0)
(0.091647 -0.551725 0)
(0.0955634 -0.530528 0)
(0.101307 -0.514206 0)
(0.102873 -0.505403 0)
(0.0987235 -0.501876 0)
(0.0902966 -0.501321 0)
(0.0793997 -0.502388 0)
(0.0672104 -0.504472 0)
(0.0545315 -0.506943 0)
(0.0420849 -0.509345 0)
(0.030269 -0.511766 0)
(0.0193922 -0.513947 0)
(0.00995772 -0.515794 0)
(0.00205555 -0.518104 0)
(-0.00470665 -0.521756 0)
(-0.0103345 -0.526285 0)
(-0.0140415 -0.530371 0)
(-0.0150156 -0.535705 0)
(-0.0130553 -0.552519 0)
(-0.00571985 -0.613557 0)
(-0.018735 -0.402522 0)
(-0.0155477 -0.471924 0)
(0.0763266 -0.597717 0)
(0.174189 -0.634213 0)
(0.181721 -0.661869 0)
(0.149699 -0.662784 0)
(0.127574 -0.666266 0)
(0.11364 -0.611867 0)
(0.101444 -0.560791 0)
(0.0804324 -0.539519 0)
(0.0666932 -0.529346 0)
(0.064956 -0.511578 0)
(0.0694615 -0.492842 0)
(0.0730503 -0.483474 0)
(0.07347 -0.480444 0)
(0.0700684 -0.481103 0)
(0.0637268 -0.483661 0)
(0.0555097 -0.487211 0)
(0.0462914 -0.491196 0)
(0.0368487 -0.49513 0)
(0.0278245 -0.49883 0)
(0.0195549 -0.502442 0)
(0.0122019 -0.506085 0)
(0.00579978 -0.510283 0)
(0.000140474 -0.515624 0)
(-0.00478317 -0.521816 0)
(-0.00836736 -0.52784 0)
(-0.00984732 -0.535118 0)
(-0.00904396 -0.553597 0)
(-0.00408437 -0.61552 0)
(-0.0202031 -0.359917 0)
(0.00441702 -0.528989 0)
(0.144849 -0.750222 0)
(0.260979 -0.714212 0)
(0.240475 -0.620328 0)
(0.163039 -0.610252 0)
(0.108943 -0.626368 0)
(0.0828239 -0.605655 0)
(0.0761457 -0.552005 0)
(0.0639287 -0.520977 0)
(0.0473813 -0.508115 0)
(0.0404692 -0.495254 0)
(0.0419222 -0.477734 0)
(0.0451449 -0.468198 0)
(0.0475076 -0.465187 0)
(0.0475922 -0.466084 0)
(0.0451107 -0.469235 0)
(0.0406212 -0.473608 0)
(0.0348576 -0.478575 0)
(0.0285089 -0.483701 0)
(0.022241 -0.488604 0)
(0.0165034 -0.49339 0)
(0.0113604 -0.498361 0)
(0.00671915 -0.503965 0)
(0.00243793 -0.510594 0)
(-0.00147697 -0.518062 0)
(-0.00455678 -0.525624 0)
(-0.00610358 -0.534547 0)
(-0.00597204 -0.554199 0)
(-0.00278808 -0.614941 0)
(-0.0202297 -0.32276 0)
(0.0299267 -0.652977 0)
(0.180535 -0.902837 0)
(0.303952 -0.782039 0)
(0.286598 -0.5714 0)
(0.180562 -0.538954 0)
(0.0934092 -0.565556 0)
(0.0439116 -0.582327 0)
(0.0396499 -0.553197 0)
(0.0417297 -0.506678 0)
(0.0287873 -0.488735 0)
(0.0189051 -0.478219 0)
(0.0170234 -0.465456 0)
(0.0194848 -0.456944 0)
(0.0224068 -0.454604 0)
(0.0245658 -0.455641 0)
(0.0249486 -0.458992 0)
(0.0235908 -0.463773 0)
(0.0209506 -0.469342 0)
(0.0175882 -0.475246 0)
(0.0140566 -0.481123 0)
(0.0107707 -0.486895 0)
(0.0078641 -0.492813 0)
(0.00518213 -0.499398 0)
(0.00252151 -0.506944 0)
(-0.000108446 -0.515333 0)
(-0.00234704 -0.524066 0)
(-0.00358411 -0.534334 0)
(-0.00369782 -0.554724 0)
(-0.00177576 -0.612799 0)
(-0.00962683 -0.303577 0)
(0.0444574 -0.794122 0)
(0.159293 -0.998099 0)
(0.2718 -0.83807 0)
(0.271281 -0.536563 0)
(0.181636 -0.474254 0)
(0.086423 -0.49644 0)
(0.0122826 -0.533197 0)
(-0.00435142 -0.553205 0)
(0.00583413 -0.498078 0)
(0.003238 -0.472724 0)
(-0.00424525 -0.462257 0)
(-0.00697591 -0.455193 0)
(-0.0049504 -0.448615 0)
(-0.00165038 -0.44752 0)
(0.00171323 -0.44897 0)
(0.00407785 -0.452521 0)
(0.0051895 -0.457557 0)
(0.00524226 -0.463511 0)
(0.00462257 -0.469921 0)
(0.00371456 -0.476484 0)
(0.0028387 -0.483 0)
(0.00216979 -0.489597 0)
(0.00154625 -0.496793 0)
(0.000700208 -0.504904 0)
(-0.000410135 -0.513882 0)
(-0.001519 -0.523439 0)
(-0.00212089 -0.534735 0)
(-0.00212471 -0.555466 0)
(-0.00102119 -0.609658 0)
(0.00954056 -0.353493 0)
(0.0388781 -0.861807 0)
(0.0929125 -1.06537 0)
(0.190603 -0.921512 0)
(0.221111 -0.560184 0)
(0.181754 -0.444415 0)
(0.106313 -0.436605 0)
(0.000553904 -0.469877 0)
(-0.0522897 -0.529777 0)
(-0.0410381 -0.495577 0)
(-0.0320569 -0.462556 0)
(-0.0321035 -0.451584 0)
(-0.031534 -0.448022 0)
(-0.0287354 -0.443145 0)
(-0.0249576 -0.443351 0)
(-0.0208152 -0.445485 0)
(-0.0171023 -0.449428 0)
(-0.0140874 -0.454763 0)
(-0.0117579 -0.461021 0)
(-0.0099204 -0.467784 0)
(-0.00834559 -0.474757 0)
(-0.0068353 -0.481749 0)
(-0.0052892 -0.488811 0)
(-0.00382583 -0.496306 0)
(-0.00272612 -0.50466 0)
(-0.00213498 -0.513908 0)
(-0.00188012 -0.523951 0)
(-0.00157045 -0.535934 0)
(-0.00115956 -0.556624 0)
(-0.000492192 -0.606115 0)
(0.0453917 -0.485613 0)
(0.0601703 -0.878493 0)
(0.0438835 -1.12013 0)
(0.118593 -1.01865 0)
(0.178409 -0.629881 0)
(0.173047 -0.430582 0)
(0.12324 -0.410682 0)
(0.029272 -0.431048 0)
(-0.070312 -0.492496 0)
(-0.0876316 -0.495996 0)
(-0.0710389 -0.460118 0)
(-0.0629284 -0.448132 0)
(-0.0570973 -0.44562 0)
(-0.0522451 -0.440481 0)
(-0.0479696 -0.441923 0)
(-0.0431862 -0.444921 0)
(-0.0384746 -0.449501 0)
(-0.0339368 -0.455276 0)
(-0.0296555 -0.46184 0)
(-0.0255994 -0.468844 0)
(-0.0216845 -0.476016 0)
(-0.0178498 -0.483226 0)
(-0.0141088 -0.4905 0)
(-0.0105564 -0.498049 0)
(-0.00745523 -0.506346 0)
(-0.00504036 -0.515557 0)
(-0.00324785 -0.525747 0)
(-0.00180534 -0.538059 0)
(-0.000724906 -0.558337 0)
(-0.00016272 -0.602642 0)
(0.0636856 -0.652081 0)
(0.0878618 -0.843633 0)
(0.0529562 -1.11669 0)
(0.0801693 -1.05683 0)
(0.131802 -0.698902 0)
(0.138968 -0.434871 0)
(0.125841 -0.407977 0)
(0.0784205 -0.407184 0)
(-0.0453419 -0.451262 0)
(-0.117836 -0.495792 0)
(-0.10642 -0.468409 0)
(-0.0920838 -0.448099 0)
(-0.0831822 -0.448209 0)
(-0.0761522 -0.440484 0)
(-0.0713652 -0.443383 0)
(-0.0657841 -0.447354 0)
(-0.0600694 -0.452762 0)
(-0.0541369 -0.459104 0)
(-0.0480825 -0.465983 0)
(-0.0419759 -0.473125 0)
(-0.0358587 -0.480321 0)
(-0.0297915 -0.487497 0)
(-0.023883 -0.494696 0)
(-0.0182648 -0.502081 0)
(-0.0131727 -0.510051 0)
(-0.00887661 -0.518927 0)
(-0.00543667 -0.52893 0)
(-0.00270296 -0.541195 0)
(-0.000757556 -0.560698 0)
(-1.5672e-05 -0.599616 0)
(0.0520946 -0.764114 0)
(0.0997023 -0.812168 0)
(0.0715121 -1.04421 0)
(0.0404657 -1.02094 0)
(0.0588109 -0.72573 0)
(0.088079 -0.47816 0)
(0.116053 -0.413782 0)
(0.102661 -0.388496 0)
(-0.0148147 -0.419947 0)
(-0.133551 -0.493382 0)
(-0.143472 -0.497853 0)
(-0.121983 -0.450107 0)
(-0.110345 -0.455058 0)
(-0.101376 -0.443909 0)
(-0.0957384 -0.448395 0)
(-0.0889523 -0.453397 0)
(-0.0819568 -0.459565 0)
(-0.074479 -0.46639 0)
(-0.0666313 -0.473481 0)
(-0.0585509 -0.480623 0)
(-0.0503604 -0.48767 0)
(-0.0421896 -0.494583 0)
(-0.0341945 -0.501432 0)
(-0.0265717 -0.508416 0)
(-0.0195446 -0.51582 0)
(-0.0133789 -0.524078 0)
(-0.00825048 -0.533556 0)
(-0.00413608 -0.545395 0)
(-0.0011967 -0.563772 0)
(-3.61749e-05 -0.597331 0)
(0.0405555 -0.810639 0)
(0.0935381 -0.802386 0)
(0.0653973 -0.928261 0)
(-0.000998342 -0.93579 0)
(-0.01575 -0.729916 0)
(0.0385282 -0.562225 0)
(0.10475 -0.440072 0)
(0.119086 -0.386993 0)
(0.0242534 -0.413929 0)
(-0.136099 -0.487563 0)
(-0.185259 -0.540601 0)
(-0.154583 -0.461623 0)
(-0.138899 -0.465091 0)
(-0.128263 -0.453198 0)
(-0.120837 -0.45832 0)
(-0.112419 -0.464086 0)
(-0.103748 -0.470594 0)
(-0.0945145 -0.477545 0)
(-0.0848254 -0.484547 0)
(-0.074831 -0.49142 0)
(-0.0646855 -0.498063 0)
(-0.0545489 -0.504459 0)
(-0.0446026 -0.510702 0)
(-0.0350793 -0.517015 0)
(-0.0262137 -0.52364 0)
(-0.0182661 -0.531024 0)
(-0.0114806 -0.539666 0)
(-0.00596597 -0.5507 0)
(-0.00197104 -0.567601 0)
(-0.000204443 -0.596006 0)
(0.0214447 -0.807294 0)
(0.046818 -0.777888 0)
(0.0216828 -0.825055 0)
(-0.031324 -0.861313 0)
(-0.0472002 -0.732399 0)
(0.0130476 -0.636105 0)
(0.0932662 -0.460371 0)
(0.11802 -0.390674 0)
(0.0662951 -0.433818 0)
(-0.106653 -0.497235 0)
(-0.212843 -0.575861 0)
(-0.183106 -0.487208 0)
(-0.167969 -0.479492 0)
(-0.156615 -0.471662 0)
(-0.145638 -0.474871 0)
(-0.13512 -0.480405 0)
(-0.124454 -0.486431 0)
(-0.113371 -0.492877 0)
(-0.101883 -0.499309 0)
(-0.0901033 -0.505523 0)
(-0.0781829 -0.511432 0)
(-0.066287 -0.517028 0)
(-0.0546006 -0.522412 0)
(-0.0433574 -0.527794 0)
(-0.032816 -0.53344 0)
(-0.0232403 -0.539731 0)
(-0.0149033 -0.547243 0)
(-0.00803781 -0.557109 0)
(-0.00298875 -0.572211 0)
(-0.000489543 -0.595773 0)
(-0.0174829 -0.752752 0)
(-0.0240734 -0.746466 0)
(-0.0196337 -0.763806 0)
(-0.0349472 -0.807145 0)
(-0.0334532 -0.718902 0)
(0.0109419 -0.645446 0)
(0.0581933 -0.451256 0)
(0.0681382 -0.396395 0)
(0.0624256 -0.463141 0)
(-0.047112 -0.544463 0)
(-0.188971 -0.608943 0)
(-0.206936 -0.523354 0)
(-0.197408 -0.502325 0)
(-0.18444 -0.500506 0)
(-0.168484 -0.499212 0)
(-0.155412 -0.502519 0)
(-0.142753 -0.507019 0)
(-0.129943 -0.512231 0)
(-0.116844 -0.517559 0)
(-0.10352 -0.522701 0)
(-0.0901038 -0.527536 0)
(-0.0767495 -0.532055 0)
(-0.0636264 -0.536345 0)
(-0.0509462 -0.540591 0)
(-0.0389759 -0.545068 0)
(-0.0279908 -0.550097 0)
(-0.0182828 -0.556249 0)
(-0.0101819 -0.564626 0)
(-0.00413592 -0.577609 0)
(-0.000847506 -0.596572 0)
(-0.0405561 -0.659099 0)
(-0.0484791 -0.75453 0)
(-0.0164097 -0.715548 0)
(-0.018545 -0.747892 0)
(-0.0100506 -0.68567 0)
(-0.0029387 -0.602178 0)
(-0.0186282 -0.439378 0)
(-0.018041 -0.427612 0)
(0.0139048 -0.508652 0)
(0.0106114 -0.609513 0)
(-0.10529 -0.63862 0)
(-0.208049 -0.571497 0)
(-0.216593 -0.53636 0)
(-0.203831 -0.53495 0)
(-0.186524 -0.529607 0)
(-0.171519 -0.52914 0)
(-0.157352 -0.531358 0)
(-0.143188 -0.534846 0)
(-0.128806 -0.538689 0)
(-0.114267 -0.542436 0)
(-0.0997069 -0.545921 0)
(-0.0852678 -0.549129 0)
(-0.0710936 -0.552137 0)
(-0.0573568 -0.555099 0)
(-0.0442986 -0.558262 0)
(-0.0322021 -0.56192 0)
(-0.0213795 -0.566566 0)
(-0.0122239 -0.573197 0)
(-0.0052848 -0.583762 0)
(-0.00122551 -0.598692 0)
(-0.0329673 -0.580969 0)
(-0.0166511 -0.804736 0)
(0.0252571 -0.684108 0)
(0.0112599 -0.704494 0)
(-0.0176892 -0.640564 0)
(-0.0691213 -0.559408 0)
(-0.113092 -0.471412 0)
(-0.0948762 -0.495516 0)
(-0.0273643 -0.579951 0)
(0.0327217 -0.682381 0)
(-0.0446725 -0.666375 0)
(-0.174532 -0.62568 0)
(-0.207786 -0.574785 0)
(-0.207067 -0.566386 0)
(-0.196051 -0.560502 0)
(-0.182028 -0.557617 0)
(-0.167475 -0.557788 0)
(-0.152495 -0.559547 0)
(-0.13718 -0.561784 0)
(-0.121744 -0.56397 0)
(-0.106382 -0.565931 0)
(-0.0912382 -0.567664 0)
(-0.0764324 -0.569256 0)
(-0.0620845 -0.57084 0)
(-0.0483735 -0.572619 0)
(-0.0355624 -0.57486 0)
(-0.0239694 -0.577951 0)
(-0.0140167 -0.582696 0)
(-0.00634018 -0.590589 0)
(-0.00158269 -0.601483 0)
(0.000205997 -0.587177 0)
(0.0427594 -0.83584 0)
(0.0541608 -0.671214 0)
(-0.00340187 -0.675593 0)
(-0.0719598 -0.617505 0)
(-0.157132 -0.554377 0)
(-0.184486 -0.534583 0)
(-0.134622 -0.57661 0)
(-0.0477304 -0.670134 0)
(0.0271082 -0.74402 0)
(-0.0206 -0.700649 0)
(-0.12915 -0.663962 0)
(-0.181936 -0.605341 0)
(-0.198432 -0.589726 0)
(-0.197037 -0.586958 0)
(-0.187021 -0.58523 0)
(-0.173279 -0.5847 0)
(-0.157885 -0.585143 0)
(-0.141835 -0.585848 0)
(-0.125701 -0.586422 0)
(-0.109791 -0.586771 0)
(-0.0942577 -0.586945 0)
(-0.0791976 -0.587048 0)
(-0.0646882 -0.587203 0)
(-0.0508252 -0.587574 0)
(-0.0377969 -0.588401 0)
(-0.0258824 -0.589974 0)
(-0.0154877 -0.592842 0)
(-0.00728509 -0.59795 0)
(-0.00191677 -0.604733 0)
(0.0435127 -0.701173 0)
(0.0809271 -0.852597 0)
(0.0212243 -0.672458 0)
(-0.0695583 -0.668924 0)
(-0.158378 -0.613144 0)
(-0.209254 -0.579719 0)
(-0.21287 -0.586319 0)
(-0.158094 -0.653985 0)
(-0.0468526 -0.754448 0)
(0.0241111 -0.763859 0)
(-0.0107654 -0.705399 0)
(-0.0985534 -0.67758 0)
(-0.166141 -0.624476 0)
(-0.194487 -0.6072 0)
(-0.197639 -0.609085 0)
(-0.189559 -0.61095 0)
(-0.175934 -0.611108 0)
(-0.159853 -0.610662 0)
(-0.143017 -0.609887 0)
(-0.12629 -0.608793 0)
(-0.110043 -0.607477 0)
(-0.0944007 -0.606073 0)
(-0.0794002 -0.604686 0)
(-0.0650828 -0.603417 0)
(-0.0515029 -0.602408 0)
(-0.0387558 -0.601855 0)
(-0.0270176 -0.601968 0)
(-0.0166074 -0.603046 0)
(-0.00812847 -0.605474 0)
(-0.00223327 -0.608769 0)
(0.071354 -0.860191 0)
(0.0540882 -0.837443 0)
(-0.072136 -0.697055 0)
(-0.140718 -0.668035 0)
(-0.186931 -0.614028 0)
(-0.217908 -0.585756 0)
(-0.228138 -0.609007 0)
(-0.155647 -0.75279 0)
(-0.0376547 -0.783558 0)
(0.0163626 -0.749097 0)
(-0.0103518 -0.676227 0)
(-0.0956804 -0.67129 0)
(-0.172302 -0.63552 0)
(-0.202993 -0.624612 0)
(-0.203759 -0.630838 0)
(-0.192495 -0.635721 0)
(-0.176547 -0.636486 0)
(-0.15898 -0.63507 0)
(-0.141239 -0.63273 0)
(-0.124046 -0.629929 0)
(-0.107702 -0.626965 0)
(-0.092247 -0.624039 0)
(-0.0776263 -0.621238 0)
(-0.0637971 -0.618646 0)
(-0.0507593 -0.616372 0)
(-0.0385516 -0.614518 0)
(-0.0272864 -0.613219 0)
(-0.0172196 -0.612576 0)
(-0.00883319 -0.612565 0)
(-0.00256672 -0.612981 0)
(0.0300358 -0.983658 0)
(-0.0342772 -0.81664 0)
(-0.134083 -0.717609 0)
(-0.152408 -0.659238 0)
(-0.172353 -0.603965 0)
(-0.199916 -0.578691 0)
(-0.22227 -0.619753 0)
(-0.147699 -0.859433 0)
(-0.0419661 -0.786794 0)
(-0.00757222 -0.724223 0)
(-0.037905 -0.647119 0)
(-0.131529 -0.666574 0)
(-0.202575 -0.650938 0)
(-0.222216 -0.64815 0)
(-0.212824 -0.65564 0)
(-0.194546 -0.660482 0)
(-0.174781 -0.660317 0)
(-0.155463 -0.657379 0)
(-0.137068 -0.653378 0)
(-0.119775 -0.648968 0)
(-0.103658 -0.644507 0)
(-0.0886638 -0.640194 0)
(-0.0746731 -0.636101 0)
(-0.0615372 -0.632315 0)
(-0.0491616 -0.628907 0)
(-0.0375522 -0.625876 0)
(-0.0268333 -0.623272 0)
(-0.0172646 -0.621019 0)
(-0.00920214 -0.618872 0)
(-0.00279639 -0.617096 0)
(-0.0436281 -1.05498 0)
(-0.107227 -0.823233 0)
(-0.128308 -0.719747 0)
(-0.128414 -0.655145 0)
(-0.133532 -0.604348 0)
(-0.148793 -0.584475 0)
(-0.172635 -0.679139 0)
(-0.12853 -0.881614 0)
(-0.048303 -0.820424 0)
(-0.0476168 -0.720789 0)
(-0.110434 -0.658423 0)
(-0.194415 -0.683536 0)
(-0.241667 -0.680029 0)
(-0.239384 -0.679025 0)
(-0.217039 -0.682988 0)
(-0.192428 -0.684632 0)
(-0.169931 -0.682163 0)
(-0.149645 -0.677277 0)
(-0.131143 -0.671632 0)
(-0.114185 -0.665762 0)
(-0.0986311 -0.659949 0)
(-0.0843475 -0.65434 0)
(-0.0711592 -0.649011 0)
(-0.0588095 -0.64413 0)
(-0.0471217 -0.639726 0)
(-0.0360998 -0.635705 0)
(-0.0259194 -0.631975 0)
(-0.0168701 -0.628275 0)
(-0.00919403 -0.624307 0)
(-0.00286027 -0.620886 0)
(-0.0466993 -1.0536 0)
(-0.0979308 -0.822069 0)
(-0.0993047 -0.720387 0)
(-0.093481 -0.661242 0)
(-0.0898296 -0.621639 0)
(-0.0893057 -0.622798 0)
(-0.0971067 -0.776489 0)
(-0.0669284 -0.933951 0)
(-0.0490813 -0.849742 0)
(-0.120502 -0.760213 0)
(-0.208448 -0.712809 0)
(-0.258006 -0.721632 0)
(-0.26493 -0.717167 0)
(-0.242597 -0.712284 0)
(-0.212996 -0.709936 0)
(-0.185568 -0.707061 0)
(-0.162234 -0.701699 0)
(-0.14204 -0.694725 0)
(-0.124014 -0.687517 0)
(-0.107752 -0.680308 0)
(-0.0930331 -0.673198 0)
(-0.0797044 -0.666261 0)
(-0.0674698 -0.659645 0)
(-0.0559117 -0.653781 0)
(-0.0448688 -0.648623 0)
(-0.0344244 -0.643977 0)
(-0.0247936 -0.639431 0)
(-0.0162716 -0.634492 0)
(-0.00900534 -0.628977 0)
(-0.00284445 -0.624317 0)
(-0.0267187 -0.985897 0)
(-0.0565358 -0.808712 0)
(-0.0618324 -0.717988 0)
(-0.0657421 -0.668765 0)
(-0.0647472 -0.647355 0)
(-0.0567195 -0.676871 0)
(-0.0212495 -0.89317 0)
(0.00357548 -1.01531 0)
(-0.0793511 -0.900544 0)
(-0.208043 -0.820523 0)
(-0.274767 -0.777905 0)
(-0.284379 -0.763533 0)
(-0.264609 -0.754208 0)
(-0.235302 -0.743764 0)
(-0.203823 -0.735103 0)
(-0.175821 -0.72711 0)
(-0.15274 -0.718334 0)
(-0.133256 -0.70925 0)
(-0.116054 -0.700633 0)
(-0.100674 -0.692279 0)
(-0.0870013 -0.683948 0)
(-0.074886 -0.67561 0)
(-0.0637568 -0.667693 0)
(-0.0530427 -0.661146 0)
(-0.0427404 -0.655709 0)
(-0.0330488 -0.651063 0)
(-0.024113 -0.646168 0)
(-0.0160811 -0.640178 0)
(-0.00910482 -0.633245 0)
(-0.00294823 -0.627678 0)
(-0.0065355 -0.907936 0)
(-0.0178602 -0.780046 0)
(-0.0346831 -0.704559 0)
(-0.0565102 -0.668468 0)
(-0.0675613 -0.666846 0)
(-0.0572412 -0.722105 0)
(0.0144458 -1.02589 0)
(0.016638 -1.0751 0)
(-0.131835 -0.93568 0)
(-0.253959 -0.858115 0)
(-0.289756 -0.819997 0)
(-0.278008 -0.80084 0)
(-0.2514 -0.786195 0)
(-0.220095 -0.770727 0)
(-0.189356 -0.756553 0)
(-0.163011 -0.74349 0)
(-0.141675 -0.730973 0)
(-0.123662 -0.719945 0)
(-0.107502 -0.710388 0)
(-0.0929838 -0.70141 0)
(-0.0803984 -0.692191 0)
(-0.0696447 -0.682586 0)
(-0.0598277 -0.673763 0)
(-0.0504119 -0.667167 0)
(-0.0414651 -0.66211 0)
(-0.0330542 -0.658137 0)
(-0.0250738 -0.653296 0)
(-0.0172939 -0.646253 0)
(-0.0101257 -0.637734 0)
(-0.0034019 -0.631689 0)
(0.00674426 -0.843943 0)
(0.00610613 -0.745559 0)
(-0.025229 -0.681323 0)
(-0.0670732 -0.658255 0)
(-0.0882998 -0.6752 0)
(-0.0749237 -0.756428 0)
(-0.00969493 -1.10272 0)
(-0.0333634 -1.07919 0)
(-0.180566 -0.923306 0)
(-0.266409 -0.866391 0)
(-0.277285 -0.845447 0)
(-0.259725 -0.828385 0)
(-0.230359 -0.809011 0)
(-0.199339 -0.789908 0)
(-0.171202 -0.77161 0)
(-0.147922 -0.753938 0)
(-0.129426 -0.737933 0)
(-0.113698 -0.72576 0)
(-0.098864 -0.716306 0)
(-0.0849852 -0.70759 0)
(-0.073127 -0.698025 0)
(-0.0635969 -0.687545 0)
(-0.0553837 -0.678557 0)
(-0.0481317 -0.672652 0)
(-0.041758 -0.668697 0)
(-0.0355235 -0.665957 0)
(-0.0287361 -0.66167 0)
(-0.0208262 -0.653825 0)
(-0.0123922 -0.643544 0)
(-0.00411754 -0.637732 0)
(0.0155484 -0.792085 0)
(0.0176705 -0.711795 0)
(-0.0336468 -0.650603 0)
(-0.0953748 -0.641129 0)
(-0.123597 -0.680052 0)
(-0.105293 -0.793773 0)
(-0.0495656 -1.10383 0)
(-0.101417 -1.01141 0)
(-0.22632 -0.895111 0)
(-0.268289 -0.872446 0)
(-0.261021 -0.860155 0)
(-0.236351 -0.842317 0)
(-0.206745 -0.821472 0)
(-0.177789 -0.800187 0)
(-0.152731 -0.778521 0)
(-0.132762 -0.757066 0)
(-0.117486 -0.73808 0)
(-0.10446 -0.725959 0)
(-0.0908608 -0.718097 0)
(-0.0769127 -0.710993 0)
(-0.0650828 -0.70217 0)
(-0.0564608 -0.691538 0)
(-0.0504752 -0.683376 0)
(-0.0468032 -0.678618 0)
(-0.0446385 -0.676002 0)
(-0.0420197 -0.674497 0)
(-0.0370001 -0.671175 0)
(-0.028302 -0.663942 0)
(-0.0155129 -0.653862 0)
(-0.00405217 -0.648618 0)
(0.0236983 -0.744095 0)
(0.0228579 -0.674163 0)
(-0.0566531 -0.609521 0)
(-0.139945 -0.619765 0)
(-0.167366 -0.685004 0)
(-0.128138 -0.830452 0)
(-0.0989353 -1.04585 0)
(-0.178751 -0.950088 0)
(-0.2579 -0.892612 0)
(-0.25881 -0.879646 0)
(-0.236732 -0.86317 0)
(-0.210458 -0.843299 0)
(-0.184842 -0.821928 0)
(-0.160629 -0.799782 0)
(-0.138862 -0.777431 0)
(-0.120778 -0.753087 0)
(-0.107738 -0.731927 0)
(-0.097072 -0.720844 0)
(-0.0837693 -0.715668 0)
(-0.0685307 -0.711227 0)
(-0.056222 -0.704954 0)
(-0.0488294 -0.69532 0)
(-0.0461805 -0.688482 0)
(-0.0471503 -0.684463 0)
(-0.0501373 -0.68215 0)
(-0.0528603 -0.68075 0)
(-0.0522477 -0.678677 0)
(-0.0441906 -0.676085 0)
(-0.0211296 -0.676976 0)
(-0.00233131 -0.668424 0)
(0.030995 -0.682813 0)
(0.0248435 -0.623145 0)
(-0.0912706 -0.555858 0)
(-0.202953 -0.601235 0)
(-0.221446 -0.700896 0)
(-0.170157 -0.866619 0)
(-0.172726 -1.00136 0)
(-0.229466 -0.944416 0)
(-0.242121 -0.902686 0)
(-0.224061 -0.877621 0)
(-0.200452 -0.85231 0)
(-0.181952 -0.826705 0)
(-0.168232 -0.805104 0)
(-0.155501 -0.784974 0)
(-0.137787 -0.766194 0)
(-0.116292 -0.745878 0)
(-0.101355 -0.725385 0)
(-0.092 -0.714399 0)
(-0.0761178 -0.71003 0)
(-0.0576919 -0.704572 0)
(-0.0465156 -0.703085 0)
(-0.0424589 -0.695433 0)
(-0.0440472 -0.689471 0)
(-0.0489283 -0.685059 0)
(-0.0566537 -0.680175 0)
(-0.0669524 -0.675688 0)
(-0.0767993 -0.673483 0)
(-0.0788611 -0.679846 0)
(-0.0405156 -0.719872 0)
(-0.00228422 -0.690406 0)
(0.0311978 -0.642955 0)
(0.0175689 -0.578855 0)
(-0.142261 -0.501561 0)
(-0.300319 -0.609327 0)
(-0.319692 -0.743917 0)
(-0.258824 -0.921654 0)
(-0.212854 -1.00863 0)
(-0.200292 -0.955114 0)
(-0.185585 -0.90494 0)
(-0.166625 -0.863487 0)
(-0.153757 -0.822037 0)
(-0.150131 -0.791187 0)
(-0.155337 -0.772076 0)
(-0.168228 -0.755641 0)
(-0.163406 -0.744675 0)
(-0.12679 -0.743513 0)
(-0.0964267 -0.74234 0)
(-0.0858947 -0.726358 0)
(-0.0602864 -0.699252 0)
(-0.037496 -0.672977 0)
(-0.0373553 -0.679837 0)
(-0.0406712 -0.679914 0)
(-0.0444209 -0.675162 0)
(-0.0487983 -0.669313 0)
(-0.0592542 -0.656198 0)
(-0.0799263 -0.642631 0)
(-0.104859 -0.637179 0)
(-0.133167 -0.649319 0)
(-0.0837767 -0.771507 0)
(-0.00839873 -0.679218 0)
(0.0243026 -0.890671 0)
(-0.0196389 -0.700455 0)
(-0.249372 -0.508955 0)
(-0.452476 -0.686496 0)
(-0.460636 -0.831266 0)
(-0.342181 -1.00188 0)
(-0.191374 -1.04548 0)
(-0.109303 -0.96988 0)
(-0.090109 -0.904718 0)
(-0.0898313 -0.832141 0)
(-0.0994955 -0.76883 0)
(-0.118195 -0.736421 0)
(-0.14346 -0.72177 0)
(-0.183611 -0.708594 0)
(-0.214966 -0.681422 0)
(-0.183709 -0.708974 0)
(-0.109123 -0.826382 0)
(-0.0471533 -0.811372 0)
(0.00349904 -0.642536 0)
(0.000892048 -0.559734 0)
(-0.0418532 -0.60093 0)
(-0.0529863 -0.624827 0)
(-0.047064 -0.622137 0)
(-0.0406716 -0.612769 0)
(-0.051861 -0.581856 0)
(-0.0857817 -0.554568 0)
(-0.113714 -0.551675 0)
(-0.137528 -0.595719 0)
(-0.0811945 -0.808087 0)
(0.000920054 -0.681602 0)
(0.0463109 -1.40439 0)
(-0.122183 -0.916082 0)
(-0.468941 -0.595087 0)
(-0.63024 -0.844427 0)
(-0.570643 -0.886057 0)
(-0.384413 -1.0411 0)
(-0.149535 -1.07989 0)
(-0.0118437 -1.00249 0)
(0.0261793 -0.892524 0)
(0.00921445 -0.756337 0)
(-0.0383802 -0.6653 0)
(-0.0908304 -0.634644 0)
(-0.134367 -0.643588 0)
(-0.152729 -0.69758 0)
(-0.168781 -0.759547 0)
(-0.223038 -0.859335 0)
(-0.230527 -1.29887 0)
(-0.0635555 -1.39501 0)
(0.027925 -0.861308 0)
(-0.0711653 -0.655975 0)
(-0.141444 -0.650383 0)
(-0.126108 -0.64234 0)
(-0.0972477 -0.599736 0)
(-0.0637242 -0.542438 0)
(-0.0451645 -0.488089 0)
(-0.0656595 -0.457834 0)
(-0.0847576 -0.431387 0)
(-0.0544381 -0.55633 0)
(0.0476809 -1.04421 0)
(0.0702933 -0.960425 0)
(0.0575845 -1.6647 0)
(-0.308316 -1.06211 0)
(-0.799438 -0.743819 0)
(-0.740676 -0.955336 0)
(-0.474748 -1.03462 0)
(-0.37585 -1.13993 0)
(-0.219268 -1.35148 0)
(-0.0184939 -1.38167 0)
(0.0678348 -1.16813 0)
(0.0326319 -0.956076 0)
(-0.0556035 -0.862439 0)
(-0.162595 -0.838184 0)
(-0.303067 -0.842012 0)
(-0.474402 -0.978275 0)
(-0.613705 -1.51997 0)
(-0.590416 -2.03329 0)
(-0.490061 -2.56703 0)
(-0.387932 -2.50372 0)
(-0.473725 -2.10739 0)
(-0.637002 -1.63537 0)
(-0.726212 -1.34675 0)
(-0.671006 -1.19062 0)
(-0.513701 -1.00937 0)
(-0.374615 -0.799753 0)
(-0.256463 -0.678416 0)
(-0.186097 -0.666459 0)
(-0.0987932 -0.628539 0)
(0.0355631 -0.804093 0)
(0.158535 -1.19357 0)
(0.119557 -1.33596 0)
(-0.0904465 -1.59836 0)
(-0.531159 -1.33099 0)
(-1.17317 -1.16778 0)
(-1.40645 -1.11188 0)
(-1.26413 -1.79166 0)
(-0.847421 -2.23116 0)
(-0.668848 -2.39629 0)
(-0.542966 -2.38442 0)
(-0.518136 -2.27435 0)
(-0.579869 -2.14067 0)
(-0.69967 -2.05232 0)
(-0.860115 -2.0342 0)
(-1.0125 -2.06393 0)
(-1.09426 -2.18034 0)
(-1.01532 -2.29634 0)
(-0.822262 -2.3666 0)
(-0.708773 -2.38692 0)
(-0.767789 -2.21704 0)
(-1.00566 -1.91565 0)
(-1.29407 -1.67903 0)
(-1.55648 -1.57428 0)
(-1.64189 -1.60661 0)
(-1.48381 -1.56523 0)
(-1.20648 -1.29633 0)
(-0.925316 -1.1027 0)
(-0.66644 -1.01522 0)
(-0.40136 -0.941794 0)
(-0.180527 -0.93821 0)
(-0.0708467 -1.05898 0)
(-0.00278665 -1.18497 0)
(-0.280618 -1.25845 0)
(-0.829678 -1.21409 0)
(-1.37531 -1.45749 0)
(-1.80451 -1.7603 0)
(-1.73506 -2.26476 0)
(-1.12638 -2.34135 0)
(-0.956172 -2.32465 0)
(-0.946888 -2.21142 0)
(-1.039 -2.10739 0)
(-1.16685 -2.02856 0)
(-1.28372 -1.98936 0)
(-1.36997 -1.9639 0)
(-1.39814 -1.96587 0)
(-1.34595 -2.03883 0)
(-1.21614 -2.19256 0)
(-1.04221 -2.32352 0)
(-0.921607 -2.31261 0)
(-0.922069 -2.03762 0)
(-1.06489 -1.59032 0)
(-1.33494 -1.26552 0)
(-1.66251 -1.15627 0)
(-1.8741 -1.26696 0)
(-1.88396 -1.39923 0)
(-1.75105 -1.42337 0)
(-1.50456 -1.33427 0)
(-1.19603 -1.24303 0)
(-0.86779 -1.17694 0)
(-0.545273 -1.171 0)
(-0.271535 -1.2235 0)
(-0.0680679 -1.25898 0)
(-0.222063 -0.790228 0)
(-0.63485 -0.68478 0)
(-0.992163 -1.06141 0)
(-1.32534 -1.74683 0)
(-1.16962 -2.15534 0)
(-0.965268 -2.31289 0)
(-0.976264 -2.25497 0)
(-1.05171 -2.08313 0)
(-1.17252 -1.90653 0)
(-1.29854 -1.78319 0)
(-1.40512 -1.74358 0)
(-1.47529 -1.76988 0)
(-1.48396 -1.86584 0)
(-1.42282 -2.05535 0)
(-1.30882 -2.28418 0)
(-1.1656 -2.43088 0)
(-1.04156 -2.38051 0)
(-0.960326 -2.06227 0)
(-0.957431 -1.5254 0)
(-1.10912 -1.08946 0)
(-1.3819 -0.898491 0)
(-1.61851 -1.02448 0)
(-1.7439 -1.29413 0)
(-1.75222 -1.46499 0)
(-1.6137 -1.52597 0)
(-1.36593 -1.52199 0)
(-1.05795 -1.50679 0)
(-0.72893 -1.50648 0)
(-0.422374 -1.51114 0)
(-0.148655 -1.45927 0)
(-0.132374 -0.462737 0)
(-0.350308 -0.353803 0)
(-0.550616 -0.664719 0)
(-0.757141 -1.4554 0)
(-0.753045 -2.10394 0)
(-0.803606 -2.32098 0)
(-0.909779 -2.20521 0)
(-1.04785 -1.9844 0)
(-1.18557 -1.80624 0)
(-1.29981 -1.70573 0)
(-1.38955 -1.68319 0)
(-1.44298 -1.7348 0)
(-1.44778 -1.87054 0)
(-1.39766 -2.0893 0)
(-1.31137 -2.33206 0)
(-1.21151 -2.48892 0)
(-1.10882 -2.46054 0)
(-1.00136 -2.17402 0)
(-0.890606 -1.612 0)
(-0.88145 -1.0648 0)
(-1.02297 -0.746629 0)
(-1.19182 -0.772264 0)
(-1.37033 -1.10384 0)
(-1.48579 -1.41837 0)
(-1.44392 -1.61875 0)
(-1.28631 -1.72142 0)
(-1.04827 -1.77422 0)
(-0.764095 -1.8005 0)
(-0.478872 -1.8006 0)
(-0.208306 -1.73335 0)
(-0.0629398 -0.286314 0)
(-0.16853 -0.223949 0)
(-0.277101 -0.516241 0)
(-0.430648 -1.33225 0)
(-0.524541 -1.97724 0)
(-0.705189 -2.20753 0)
(-0.869789 -2.0881 0)
(-1.02223 -1.87562 0)
(-1.15242 -1.70728 0)
(-1.25239 -1.61101 0)
(-1.32853 -1.60037 0)
(-1.37152 -1.67716 0)
(-1.37141 -1.84449 0)
(-1.33073 -2.0792 0)
(-1.27376 -2.32704 0)
(-1.21919 -2.49948 0)
(-1.155 -2.5038 0)
(-1.05604 -2.28218 0)
(-0.900462 -1.79141 0)
(-0.742326 -1.20857 0)
(-0.736186 -0.805866 0)
(-0.815712 -0.646145 0)
(-0.961913 -0.90396 0)
(-1.1099 -1.27577 0)
(-1.13591 -1.61342 0)
(-1.06937 -1.82613 0)
(-0.914754 -1.9585 0)
(-0.697066 -2.03386 0)
(-0.456623 -2.06162 0)
(-0.219956 -2.00391 0)
(-0.00907315 -0.198624 0)
(-0.0490461 -0.183348 0)
(-0.122175 -0.482563 0)
(-0.244468 -1.19865 0)
(-0.399851 -1.78797 0)
(-0.637276 -2.03534 0)
(-0.826445 -1.94209 0)
(-0.972722 -1.76486 0)
(-1.09076 -1.60642 0)
(-1.18165 -1.51939 0)
(-1.2476 -1.52592 0)
(-1.28343 -1.63012 0)
(-1.27968 -1.81901 0)
(-1.24856 -2.05071 0)
(-1.21655 -2.28974 0)
(-1.20004 -2.46821 0)
(-1.17432 -2.50147 0)
(-1.11203 -2.35187 0)
(-0.969186 -2.00149 0)
(-0.766689 -1.46663 0)
(-0.579387 -0.958101 0)
(-0.568922 -0.683602 0)
(-0.650436 -0.758575 0)
(-0.767474 -1.08677 0)
(-0.799515 -1.51849 0)
(-0.799078 -1.84179 0)
(-0.719206 -2.06442 0)
(-0.570346 -2.20397 0)
(-0.385038 -2.27621 0)
(-0.198386 -2.24746 0)
(0.0208898 -0.165641 0)
(0.0184262 -0.180317 0)
(-0.0296412 -0.508877 0)
(-0.1094 -1.09639 0)
(-0.28216 -1.57341 0)
(-0.556518 -1.83757 0)
(-0.759963 -1.79035 0)
(-0.902652 -1.65372 0)
(-1.01754 -1.5081 0)
(-1.10145 -1.43874 0)
(-1.15629 -1.46811 0)
(-1.17806 -1.59027 0)
(-1.16348 -1.78254 0)
(-1.13111 -2.00966 0)
(-1.12154 -2.23719 0)
(-1.13749 -2.40969 0)
(-1.14828 -2.47406 0)
(-1.12764 -2.38018 0)
(-1.03418 -2.11186 0)
(-0.838289 -1.70601 0)
(-0.58233 -1.20784 0)
(-0.426046 -0.778026 0)
(-0.424622 -0.680509 0)
(-0.509783 -0.875981 0)
(-0.490567 -1.36332 0)
(-0.530639 -1.79141 0)
(-0.508096 -2.10504 0)
(-0.420182 -2.31369 0)
(-0.291015 -2.43486 0)
(-0.158121 -2.4422 0)
(0.0356873 -0.17476 0)
(0.0551307 -0.189295 0)
(0.0379497 -0.577587 0)
(0.00783865 -1.03267 0)
(-0.147854 -1.35639 0)
(-0.442757 -1.62001 0)
(-0.670771 -1.64096 0)
(-0.817586 -1.54987 0)
(-0.925029 -1.41929 0)
(-1.00109 -1.36698 0)
(-1.04159 -1.41571 0)
(-1.04859 -1.55456 0)
(-1.02543 -1.75276 0)
(-1.00046 -1.97343 0)
(-1.00681 -2.18364 0)
(-1.03972 -2.34686 0)
(-1.06687 -2.42225 0)
(-1.06274 -2.37293 0)
(-1.00791 -2.18063 0)
(-0.836918 -1.84195 0)
(-0.585878 -1.42462 0)
(-0.359802 -0.993365 0)
(-0.249417 -0.712201 0)
(-0.299042 -0.775068 0)
(-0.238276 -1.20051 0)
(-0.287726 -1.704 0)
(-0.307042 -2.09533 0)
(-0.270889 -2.36847 0)
(-0.194517 -2.53735 0)
(-0.115672 -2.57595 0)
(0.0477737 -0.202161 0)
(0.0762568 -0.196829 0)
(0.0854097 -0.693184 0)
(0.107143 -1.02896 0)
(-0.00118835 -1.17554 0)
(-0.277717 -1.38118 0)
(-0.550176 -1.4717 0)
(-0.713018 -1.43297 0)
(-0.813785 -1.33099 0)
(-0.879699 -1.29819 0)
(-0.91392 -1.37002 0)
(-0.915062 -1.52998 0)
(-0.893682 -1.73265 0)
(-0.877398 -1.942 0)
(-0.888218 -2.13258 0)
(-0.920807 -2.28373 0)
(-0.953837 -2.36927 0)
(-0.956275 -2.36017 0)
(-0.909244 -2.23621 0)
(-0.78881 -1.97343 0)
(-0.552944 -1.62797 0)
(-0.285339 -1.24687 0)
(-0.101236 -0.86208 0)
(-0.120227 -0.83022 0)
(-0.0788631 -1.06995 0)
(-0.0644905 -1.5902 0)
(-0.11876 -2.04295 0)
(-0.130805 -2.37352 0)
(-0.104901 -2.58763 0)
(-0.071245 -2.6536 0)
(0.0558022 -0.220695 0)
(0.0843416 -0.212829 0)
(0.105183 -0.862983 0)
(0.176139 -1.0692 0)
(0.14349 -1.05663 0)
(-0.0754727 -1.13103 0)
(-0.382661 -1.2645 0)
(-0.589099 -1.29891 0)
(-0.694469 -1.24025 0)
(-0.759366 -1.23443 0)
(-0.790939 -1.32979 0)
(-0.790605 -1.50519 0)
(-0.772206 -1.7104 0)
(-0.762884 -1.90949 0)
(-0.773947 -2.08468 0)
(-0.801008 -2.22869 0)
(-0.827198 -2.32603 0)
(-0.830386 -2.34626 0)
(-0.787517 -2.27368 0)
(-0.691016 -2.10581 0)
(-0.507571 -1.83293 0)
(-0.228406 -1.48468 0)
(0.013879 -1.09282 0)
(0.0878874 -0.949436 0)
(0.0306532 -1.06142 0)
(0.127583 -1.46328 0)
(0.0628548 -1.95105 0)
(0.00127747 -2.33031 0)
(-0.0261997 -2.59031 0)
(-0.0401549 -2.68121 0)
(0.0507489 -0.218775 0)
(0.0756348 -0.249619 0)
(0.101861 -0.96892 0)
(0.239389 -1.15646 0)
(0.262235 -0.994367 0)
(0.112764 -0.908882 0)
(-0.170395 -1.01217 0)
(-0.44887 -1.13953 0)
(-0.574666 -1.14403 0)
(-0.641612 -1.16944 0)
(-0.674698 -1.28613 0)
(-0.677201 -1.47382 0)
(-0.668254 -1.68213 0)
(-0.665893 -1.8756 0)
(-0.675383 -2.04309 0)
(-0.692648 -2.184 0)
(-0.705391 -2.29012 0)
(-0.701017 -2.3407 0)
(-0.662369 -2.31324 0)
(-0.566308 -2.21226 0)
(-0.418593 -2.02494 0)
(-0.188767 -1.73381 0)
(0.088939 -1.34289 0)
(0.256414 -1.09257 0)
(0.215257 -1.11846 0)
(0.249948 -1.34512 0)
(0.239653 -1.82091 0)
(0.133035 -2.22769 0)
(0.0478668 -2.54423 0)
(-0.00348262 -2.66946 0)
(0.039245 -0.199872 0)
(0.0585629 -0.325624 0)
(0.0989103 -1.13023 0)
(0.287905 -1.25952 0)
(0.34033 -0.959377 0)
(0.267494 -0.80895 0)
(0.0252457 -0.735998 0)
(-0.289184 -0.935167 0)
(-0.458459 -1.03066 0)
(-0.530976 -1.09492 0)
(-0.572029 -1.23442 0)
(-0.585591 -1.43531 0)
(-0.587589 -1.64817 0)
(-0.588905 -1.84035 0)
(-0.594156 -2.00513 0)
(-0.601087 -2.14691 0)
(-0.603265 -2.26423 0)
(-0.590347 -2.3397 0)
(-0.547751 -2.35181 0)
(-0.464151 -2.29515 0)
(-0.325996 -2.17118 0)
(-0.151717 -1.96494 0)
(0.124722 -1.63755 0)
(0.363711 -1.32345 0)
(0.407543 -1.22514 0)
(0.334942 -1.31696 0)
(0.391148 -1.66731 0)
(0.252986 -2.06714 0)
(0.104414 -2.41761 0)
(0.0102265 -2.60882 0)
(0.0249424 -0.177373 0)
(0.0502195 -0.457682 0)
(0.0907244 -1.26142 0)
(0.26537 -1.34572 0)
(0.361209 -0.951872 0)
(0.354267 -0.701842 0)
(0.159315 -0.53219 0)
(-0.128419 -0.689955 0)
(-0.347962 -0.894059 0)
(-0.438016 -1.00968 0)
(-0.492918 -1.17508 0)
(-0.516703 -1.38723 0)
(-0.526021 -1.60501 0)
(-0.530802 -1.80039 0)
(-0.531928 -1.96845 0)
(-0.530212 -2.11584 0)
(-0.522279 -2.24363 0)
(-0.502751 -2.33799 0)
(-0.465217 -2.38245 0)
(-0.389486 -2.367 0)
(-0.272609 -2.28938 0)
(-0.122384 -2.14627 0)
(0.0975717 -1.90755 0)
(0.369334 -1.60056 0)
(0.503446 -1.39384 0)
(0.45608 -1.41366 0)
(0.469581 -1.58025 0)
(0.355574 -1.89345 0)
(0.17287 -2.22651 0)
(0.0343994 -2.47531 0)
(0.0122235 -0.16437 0)
(0.0507721 -0.662055 0)
(0.0970917 -1.3411 0)
(0.189908 -1.39718 0)
(0.324228 -0.995965 0)
(0.373932 -0.636556 0)
(0.231654 -0.370695 0)
(0.00522181 -0.471814 0)
(-0.245635 -0.741057 0)
(-0.366211 -0.912598 0)
(-0.432183 -1.10421 0)
(-0.463641 -1.32779 0)
(-0.479698 -1.55099 0)
(-0.489662 -1.75415 0)
(-0.490799 -1.93179 0)
(-0.482981 -2.0895 0)
(-0.465536 -2.228 0)
(-0.439875 -2.33951 0)
(-0.40066 -2.40709 0)
(-0.342977 -2.41995 0)
(-0.258926 -2.37972 0)
(-0.134438 -2.28039 0)
(0.0269623 -2.1113 0)
(0.273347 -1.89473 0)
(0.504356 -1.68643 0)
(0.548796 -1.6306 0)
(0.480504 -1.69098 0)
(0.401798 -1.77889 0)
(0.208736 -2.06147 0)
(0.0567575 -2.32262 0)
(0.003061 -0.166313 0)
(0.0629858 -0.801577 0)
(0.114329 -1.34328 0)
(0.118828 -1.35737 0)
(0.241235 -1.0301 0)
(0.335785 -0.608106 0)
(0.254328 -0.287134 0)
(0.0946142 -0.254382 0)
(-0.137916 -0.567624 0)
(-0.304868 -0.802708 0)
(-0.387962 -1.02115 0)
(-0.426954 -1.25981 0)
(-0.447768 -1.4912 0)
(-0.461643 -1.70226 0)
(-0.465244 -1.89255 0)
(-0.453173 -2.06362 0)
(-0.429206 -2.21357 0)
(-0.398897 -2.33633 0)
(-0.361746 -2.42011 0)
(-0.313274 -2.45261 0)
(-0.253917 -2.43458 0)
(-0.179335 -2.36997 0)
(-0.0653418 -2.26497 0)
(0.104358 -2.12007 0)
(0.339016 -1.952 0)
(0.510006 -1.81577 0)
(0.529057 -1.83228 0)
(0.440722 -1.87289 0)
(0.286062 -2.0101 0)
(0.0857376 -2.21342 0)
(0.00459775 -0.213973 0)
(0.0948446 -0.982215 0)
(0.121946 -1.27669 0)
(0.0943752 -1.26052 0)
(0.150614 -1.0183 0)
(0.262785 -0.591615 0)
(0.246076 -0.245055 0)
(0.1321 -0.141451 0)
(-0.0297049 -0.390602 0)
(-0.244458 -0.676591 0)
(-0.362649 -0.929171 0)
(-0.405745 -1.1883 0)
(-0.426918 -1.42904 0)
(-0.44203 -1.64842 0)
(-0.446484 -1.85082 0)
(-0.432218 -2.03588 0)
(-0.404679 -2.19773 0)
(-0.372896 -2.33248 0)
(-0.337894 -2.42691 0)
(-0.298073 -2.46469 0)
(-0.257959 -2.45611 0)
(-0.220149 -2.41371 0)
(-0.162627 -2.3395 0)
(-0.0701855 -2.24952 0)
(0.0869269 -2.14471 0)
(0.283693 -2.01775 0)
(0.450443 -1.94164 0)
(0.468048 -1.96023 0)
(0.346978 -2.04997 0)
(0.124688 -2.14161 0)
(0.0184 -0.385885 0)
(0.119386 -1.03474 0)
(0.126069 -1.13389 0)
(0.10238 -1.11238 0)
(0.0873754 -0.935491 0)
(0.189008 -0.604784 0)
(0.221408 -0.225769 0)
(0.153361 -0.108514 0)
(0.0511378 -0.246161 0)
(-0.163396 -0.524029 0)
(-0.3431 -0.825244 0)
(-0.399097 -1.11138 0)
(-0.41553 -1.36829 0)
(-0.428779 -1.597 0)
(-0.431018 -1.81013 0)
(-0.414496 -2.0078 0)
(-0.385279 -2.17934 0)
(-0.355013 -2.3211 0)
(-0.325882 -2.41928 0)
(-0.304212 -2.46193 0)
(-0.283208 -2.4547 0)
(-0.256789 -2.4184 0)
(-0.239427 -2.36516 0)
(-0.201544 -2.31047 0)
(-0.123336 -2.25482 0)
(0.019777 -2.17953 0)
(0.208914 -2.1043 0)
(0.369569 -2.02661 0)
(0.336854 -1.97333 0)
(0.138715 -1.98245 0)
(0.0207454 -0.547646 0)
(0.136068 -0.946903 0)
(0.129854 -0.95869 0)
(0.10346 -0.947554 0)
(0.0476451 -0.8186 0)
(0.0907553 -0.577985 0)
(0.189238 -0.244452 0)
(0.164677 -0.111986 0)
(0.0944698 -0.139704 0)
(-0.0555477 -0.352425 0)
(-0.308181 -0.697998 0)
(-0.403817 -1.02786 0)
(-0.410898 -1.30961 0)
(-0.419531 -1.55017 0)
(-0.416816 -1.77352 0)
(-0.394838 -1.98115 0)
(-0.365239 -2.15877 0)
(-0.337675 -2.30217 0)
(-0.317389 -2.39784 0)
(-0.304648 -2.4385 0)
(-0.301435 -2.43658 0)
(-0.296811 -2.39858 0)
(-0.293208 -2.35534 0)
(-0.286186 -2.31912 0)
(-0.257892 -2.29705 0)
(-0.177055 -2.27602 0)
(-0.0354786 -2.23232 0)
(0.133081 -2.12963 0)
(0.236754 -1.92992 0)
(0.12846 -1.76656 0)
(0.0139285 -0.61317 0)
(0.151803 -0.910658 0)
(0.129681 -0.826284 0)
(0.0934821 -0.800237 0)
(0.0110327 -0.681824 0)
(-0.00172377 -0.538342 0)
(0.140499 -0.300501 0)
(0.150192 -0.112481 0)
(0.116372 -0.100129 0)
(0.0388993 -0.206032 0)
(-0.237304 -0.539283 0)
(-0.411969 -0.941424 0)
(-0.40837 -1.25048 0)
(-0.410813 -1.50857 0)
(-0.401585 -1.74181 0)
(-0.372695 -1.95738 0)
(-0.344215 -2.13691 0)
(-0.322702 -2.2778 0)
(-0.308423 -2.36552 0)
(-0.306539 -2.4037 0)
(-0.307892 -2.39951 0)
(-0.320428 -2.36827 0)
(-0.327996 -2.32426 0)
(-0.336126 -2.29576 0)
(-0.332055 -2.29709 0)
(-0.291781 -2.3129 0)
(-0.19521 -2.30711 0)
(-0.0672414 -2.21501 0)
(0.0670335 -1.95588 0)
(0.0773338 -1.63079 0)
(-0.011906 -0.648705 0)
(0.119602 -0.928288 0)
(0.108818 -0.706556 0)
(0.058489 -0.662163 0)
(0.000158242 -0.546441 0)
(-0.034061 -0.482563 0)
(0.0810777 -0.329704 0)
(0.122852 -0.113635 0)
(0.124657 -0.0891685 0)
(0.085504 -0.110454 0)
(-0.130002 -0.352087 0)
(-0.399814 -0.8473 0)
(-0.402787 -1.18886 0)
(-0.396314 -1.47162 0)
(-0.382941 -1.71448 0)
(-0.348472 -1.93632 0)
(-0.321756 -2.11334 0)
(-0.304219 -2.24488 0)
(-0.295056 -2.32225 0)
(-0.299973 -2.35461 0)
(-0.311694 -2.35496 0)
(-0.322013 -2.32627 0)
(-0.340528 -2.2865 0)
(-0.352479 -2.26334 0)
(-0.354898 -2.27575 0)
(-0.333063 -2.31869 0)
(-0.271288 -2.34043 0)
(-0.183634 -2.26987 0)
(-0.0801887 -2.01758 0)
(-0.00575851 -1.60314 0)
(-0.0562179 -0.634475 0)
(-0.00214595 -0.935707 0)
(0.0302702 -0.614727 0)
(0.0305451 -0.567225 0)
(0.0261941 -0.48491 0)
(-0.00272207 -0.441008 0)
(0.0522437 -0.32573 0)
(0.0999778 -0.119049 0)
(0.119491 -0.079223 0)
(0.109475 -0.0816265 0)
(-0.0246464 -0.179515 0)
(-0.359167 -0.738275 0)
(-0.38943 -1.12517 0)
(-0.372091 -1.43772 0)
(-0.357858 -1.6897 0)
(-0.319933 -1.91552 0)
(-0.295912 -2.08716 0)
(-0.281886 -2.20867 0)
(-0.275099 -2.27819 0)
(-0.281257 -2.30658 0)
(-0.296049 -2.30353 0)
(-0.316806 -2.27647 0)
(-0.333948 -2.24305 0)
(-0.347211 -2.22264 0)
(-0.353926 -2.24581 0)
(-0.335184 -2.31101 0)
(-0.284222 -2.35475 0)
(-0.217072 -2.30355 0)
(-0.139616 -2.08392 0)
(-0.054472 -1.6875 0)
(-0.0914854 -0.540477 0)
(-0.159249 -0.875752 0)
(-0.0776705 -0.575506 0)
(-0.00340926 -0.559766 0)
(0.0357443 -0.416378 0)
(0.0340245 -0.371442 0)
(0.0544309 -0.282353 0)
(0.0814918 -0.110571 0)
(0.0994267 -0.0644629 0)
(0.114956 -0.0685669 0)
(0.0237647 -0.0674252 0)
(-0.308263 -0.627205 0)
(-0.373187 -1.06723 0)
(-0.338058 -1.4055 0)
(-0.325812 -1.66596 0)
(-0.286023 -1.8936 0)
(-0.2657 -2.05819 0)
(-0.253543 -2.16893 0)
(-0.248613 -2.2293 0)
(-0.255363 -2.25224 0)
(-0.271912 -2.24742 0)
(-0.29328 -2.22561 0)
(-0.312038 -2.19495 0)
(-0.325406 -2.18099 0)
(-0.328923 -2.21069 0)
(-0.313226 -2.28836 0)
(-0.270342 -2.34537 0)
(-0.21169 -2.30979 0)
(-0.15014 -2.13354 0)
(-0.06828 -1.7964 0)
(-0.116484 -0.274695 0)
(-0.255469 -0.684561 0)
(-0.190892 -0.618615 0)
(-0.0711891 -0.539224 0)
(0.00820914 -0.38686 0)
(0.0470038 -0.330957 0)
(0.0726534 -0.236066 0)
(0.0749194 -0.092284 0)
(0.0818987 -0.053571 0)
(0.114171 -0.0500296 0)
(0.0398651 -0.0341491 0)
(-0.26773 -0.55499 0)
(-0.354644 -1.02725 0)
(-0.298284 -1.37741 0)
(-0.287802 -1.64361 0)
(-0.245967 -1.87004 0)
(-0.230426 -2.02699 0)
(-0.219355 -2.12818 0)
(-0.215831 -2.18102 0)
(-0.223244 -2.20022 0)
(-0.24055 -2.19474 0)
(-0.260677 -2.17096 0)
(-0.279432 -2.14809 0)
(-0.289462 -2.13989 0)
(-0.294572 -2.17619 0)
(-0.276426 -2.26714 0)
(-0.234708 -2.33066 0)
(-0.183619 -2.31159 0)
(-0.12846 -2.17398 0)
(-0.0605259 -1.89378 0)
(-0.0848521 -0.0812237 0)
(-0.259625 -0.396292 0)
(-0.229914 -0.528261 0)
(-0.131617 -0.518779 0)
(-0.0227697 -0.377854 0)
(0.0438863 -0.306418 0)
(0.0860579 -0.207444 0)
(0.0813525 -0.0807248 0)
(0.0779049 -0.0460356 0)
(0.112763 -0.0294695 0)
(0.0457856 -0.0307109 0)
(-0.230646 -0.53344 0)
(-0.320219 -1.00994 0)
(-0.251468 -1.35431 0)
(-0.242947 -1.62242 0)
(-0.20145 -1.84422 0)
(-0.190556 -1.99374 0)
(-0.181008 -2.0872 0)
(-0.178429 -2.13407 0)
(-0.183624 -2.14892 0)
(-0.200504 -2.13947 0)
(-0.223286 -2.12066 0)
(-0.239014 -2.09995 0)
(-0.247675 -2.09748 0)
(-0.249539 -2.14119 0)
(-0.23523 -2.23786 0)
(-0.193409 -2.3102 0)
(-0.14465 -2.30654 0)
(-0.0953166 -2.20279 0)
(-0.0430758 -1.96558 0)
(-0.0231198 -0.0453904 0)
(-0.092475 -0.119535 0)
(-0.152233 -0.285869 0)
(-0.116266 -0.413523 0)
(-0.028053 -0.353686 0)
(0.04735 -0.282432 0)
(0.10259 -0.189582 0)
(0.10299 -0.0789793 0)
(0.0920412 -0.041691 0)
(0.116897 -0.0118799 0)
(0.0453408 -0.0320743 0)
(-0.205652 -0.553573 0)
(-0.261014 -1.00047 0)
(-0.197982 -1.33174 0)
(-0.192798 -1.59925 0)
(-0.154612 -1.81421 0)
(-0.14764 -1.95832 0)
(-0.140454 -2.04658 0)
(-0.138423 -2.08879 0)
(-0.143917 -2.10095 0)
(-0.159088 -2.09102 0)
(-0.177729 -2.07044 0)
(-0.193716 -2.05352 0)
(-0.202074 -2.05479 0)
(-0.204498 -2.10558 0)
(-0.188912 -2.21049 0)
(-0.151566 -2.28746 0)
(-0.106634 -2.29418 0)
(-0.0647621 -2.21373 0)
(-0.0268467 -2.00745 0)
(-0.0142345 -0.0394624 0)
(-0.0392385 -0.0457078 0)
(-0.0653099 -0.106792 0)
(-0.0607686 -0.212698 0)
(0.00166743 -0.261996 0)
(0.0665053 -0.229826 0)
(0.122408 -0.160616 0)
(0.133497 -0.0760453 0)
(0.126309 -0.0393156 0)
(0.127968 0.00995462 0)
(0.0383879 -0.0442865 0)
(-0.197167 -0.611984 0)
(-0.195361 -0.989905 0)
(-0.149811 -1.30701 0)
(-0.143197 -1.571 0)
(-0.110331 -1.77966 0)
(-0.106445 -1.92083 0)
(-0.100932 -2.00683 0)
(-0.0989328 -2.046 0)
(-0.105044 -2.05387 0)
(-0.119336 -2.04278 0)
(-0.133653 -2.0267 0)
(-0.142973 -2.00965 0)
(-0.15124 -2.01168 0)
(-0.15479 -2.06656 0)
(-0.144604 -2.17681 0)
(-0.110531 -2.26283 0)
(-0.0690263 -2.28047 0)
(-0.0364392 -2.21553 0)
(-0.0136954 -2.02362 0)
(-0.00056234 -0.0212051 0)
(-0.029231 0.00147717 0)
(-0.0491288 -0.0227094 0)
(-0.0309047 -0.0675124 0)
(0.0170652 -0.112167 0)
(0.081637 -0.124981 0)
(0.138828 -0.0974148 0)
(0.166032 -0.0556191 0)
(0.178038 -0.0315556 0)
(0.158081 0.0252593 0)
(0.0574982 -0.100391 0)
(-0.180564 -0.65987 0)
(-0.128517 -0.976966 0)
(-0.113177 -1.27922 0)
(-0.100109 -1.53825 0)
(-0.073358 -1.74228 0)
(-0.0709685 -1.88234 0)
(-0.0666909 -1.96847 0)
(-0.0667661 -2.00719 0)
(-0.0739117 -2.01258 0)
(-0.0860253 -2.00214 0)
(-0.0918338 -1.99012 0)
(-0.0946778 -1.97486 0)
(-0.0974782 -1.97477 0)
(-0.0992015 -2.02674 0)
(-0.0945693 -2.13968 0)
(-0.0690567 -2.23382 0)
(-0.0349236 -2.25886 0)
(-0.0147729 -2.20396 0)
(-0.00604053 -2.02324 0)
(0.0109644 0.00269535 0)
(-0.0208346 0.0186267 0)
(-0.0624375 0.0242468 0)
(-0.0369195 0.00314515 0)
(0.0073318 -0.00179642 0)
(0.0522054 -0.0069968 0)
(0.111754 -0.00516932 0)
(0.168011 -0.00335705 0)
(0.219401 -0.00537915 0)
(0.168271 0.0166567 0)
(0.0188812 -0.240577 0)
(-0.161888 -0.68723 0)
(-0.0777245 -0.963164 0)
(-0.0933222 -1.24768 0)
(-0.0702496 -1.50355 0)
(-0.0479244 -1.70465 0)
(-0.044989 -1.84435 0)
(-0.0428007 -1.93114 0)
(-0.0459198 -1.97201 0)
(-0.0533077 -1.98239 0)
(-0.0624354 -1.9768 0)
(-0.0620304 -1.96522 0)
(-0.0526616 -1.95243 0)
(-0.0446994 -1.95002 0)
(-0.038626 -1.99268 0)
(-0.0361461 -2.09731 0)
(-0.0200086 -2.20002 0)
(0.00132179 -2.22896 0)
(0.00259806 -2.18001 0)
(-0.0047286 -2.01531 0)
(0.0214806 0.0129521 0)
(-0.00107429 0.0124894 0)
(-0.0554034 0.0305631 0)
(-0.0403683 0.0363279 0)
(7.4965e-05 0.0435061 0)
(0.0252321 0.0511885 0)
(0.0602018 0.0544474 0)
(0.120339 0.0584951 0)
(0.207022 0.0477915 0)
(0.144071 0.00371257 0)
(-0.103647 -0.363256 0)
(-0.158628 -0.682213 0)
(-0.0779564 -0.944891 0)
(-0.0923086 -1.2181 0)
(-0.0603022 -1.47198 0)
(-0.0369249 -1.67043 0)
(-0.0315329 -1.80849 0)
(-0.0323644 -1.89467 0)
(-0.0405295 -1.9395 0)
(-0.0499489 -1.95773 0)
(-0.0582477 -1.96482 0)
(-0.0515069 -1.96165 0)
(-0.0317695 -1.95162 0)
(-0.00822263 -1.94841 0)
(0.0170987 -1.98017 0)
(0.0327443 -2.06789 0)
(0.0378072 -2.15975 0)
(0.0450017 -2.18933 0)
(0.0232936 -2.14591 0)
(-0.00517999 -2.00797 0)
(0.0200044 0.04164 0)
(0.00537465 0.0135793 0)
(-0.0381036 0.0205557 0)
(-0.0297975 0.041074 0)
(0.000682389 0.0519874 0)
(0.0205955 0.062416 0)
(0.0441799 0.066291 0)
(0.0808793 0.075131 0)
(0.151244 0.0899461 0)
(0.0788105 0.00459213 0)
(-0.243023 -0.425994 0)
(-0.205159 -0.665733 0)
(-0.121622 -0.941682 0)
(-0.110745 -1.19847 0)
(-0.0717792 -1.45054 0)
(-0.0401565 -1.64341 0)
(-0.0305415 -1.77574 0)
(-0.0342388 -1.85923 0)
(-0.0502409 -1.90668 0)
(-0.0660994 -1.93415 0)
(-0.0738765 -1.95765 0)
(-0.0638834 -1.97033 0)
(-0.0379483 -1.96993 0)
(-0.0025049 -1.97454 0)
(0.0407341 -2.00303 0)
(0.0772399 -2.06759 0)
(0.0867157 -2.12986 0)
(0.088661 -2.14903 0)
(0.0504194 -2.10233 0)
(0.00103668 -2.00095 0)
(0.006831 0.0304046 0)
(-0.00871268 -0.00729834 0)
(-0.0280435 0.00952699 0)
(-0.0147602 0.0309385 0)
(0.00674637 0.045061 0)
(0.0210609 0.0599396 0)
(0.0429661 0.0603438 0)
(0.0712149 0.064835 0)
(0.0976304 0.0768591 0)
(0.00717278 -0.00738726 0)
(-0.411323 -0.460644 0)
(-0.273134 -0.699848 0)
(-0.187792 -0.957262 0)
(-0.144493 -1.19975 0)
(-0.0979614 -1.44273 0)
(-0.0543129 -1.62685 0)
(-0.040177 -1.74888 0)
(-0.0459974 -1.82596 0)
(-0.0712773 -1.87369 0)
(-0.0958633 -1.91242 0)
(-0.108754 -1.95264 0)
(-0.101366 -1.98687 0)
(-0.0753372 -2.00594 0)
(-0.0345405 -2.02113 0)
(0.0191018 -2.04916 0)
(0.0645374 -2.09935 0)
(0.0905937 -2.14397 0)
(0.10217 -2.14071 0)
(0.0707834 -2.07624 0)
(0.0147281 -1.99403 0)
(-0.0128811 -0.0447637 0)
(-0.0126678 -0.0287119 0)
(-0.00384042 0.00126256 0)
(0.00213798 0.0187046 0)
(0.0182345 0.0350085 0)
(0.0227717 0.050215 0)
(0.0453664 0.0693497 0)
(0.0779589 0.0717483 0)
(0.048715 0.0610936 0)
(-0.0967207 -0.111762 0)
(-0.525233 -0.542218 0)
(-0.340162 -0.779106 0)
(-0.241015 -0.992797 0)
(-0.180125 -1.22538 0)
(-0.127315 -1.4501 0)
(-0.0745478 -1.62073 0)
(-0.0561485 -1.72896 0)
(-0.0628698 -1.79495 0)
(-0.0956484 -1.84049 0)
(-0.130475 -1.88995 0)
(-0.152531 -1.95106 0)
(-0.153003 -2.00661 0)
(-0.136503 -2.04865 0)
(-0.10054 -2.0816 0)
(-0.0462952 -2.11916 0)
(0.00866185 -2.16482 0)
(0.0489124 -2.2087 0)
(0.0690762 -2.2033 0)
(0.0653988 -2.12522 0)
(0.0240658 -2.01969 0)
(0.0154228 -0.0532177 0)
(0.0246063 -0.00700627 0)
(0.0128732 0.00153486 0)
(0.0182848 0.0130887 0)
(0.0306691 0.0219975 0)
(0.0365244 0.0353453 0)
(0.0607687 0.0714705 0)
(0.0750402 0.077682 0)
(-0.0950573 -0.0448426 0)
(-0.567038 -0.433575 0)
(-0.534367 -0.637874 0)
(-0.366798 -0.849427 0)
(-0.259943 -1.04604 0)
(-0.204248 -1.26104 0)
(-0.151341 -1.46794 0)
(-0.0962115 -1.62295 0)
(-0.0735172 -1.7148 0)
(-0.0798476 -1.76482 0)
(-0.116047 -1.80429 0)
(-0.16009 -1.86171 0)
(-0.192441 -1.94307 0)
(-0.205922 -2.01945 0)
(-0.205436 -2.08507 0)
(-0.182252 -2.13977 0)
(-0.137064 -2.19292 0)
(-0.0848284 -2.24555 0)
(-0.035882 -2.28221 0)
(0.00377501 -2.27697 0)
(0.0365938 -2.19919 0)
(0.0333008 -2.09233 0)
(0.0272645 0.00309804 0)
(0.0327359 0.0184234 0)
(0.0159899 0.0120076 0)
(0.0255546 0.0127475 0)
(0.0386283 0.00824361 0)
(0.0517258 0.0158815 0)
(0.0711868 0.0314262 0)
(-0.035772 0.02634 0)
(-0.491757 -0.314733 0)
(-0.645158 -0.506373 0)
(-0.507324 -0.681905 0)
(-0.378778 -0.901248 0)
(-0.269366 -1.10588 0)
(-0.216527 -1.29418 0)
(-0.169019 -1.49145 0)
(-0.115535 -1.63084 0)
(-0.0874658 -1.70477 0)
(-0.0919983 -1.73459 0)
(-0.126663 -1.76189 0)
(-0.175716 -1.8215 0)
(-0.217688 -1.91884 0)
(-0.246506 -2.01533 0)
(-0.265491 -2.10531 0)
(-0.262133 -2.18363 0)
(-0.232738 -2.2493 0)
(-0.189815 -2.30582 0)
(-0.135974 -2.34013 0)
(-0.0811678 -2.33138 0)
(-0.00781634 -2.24427 0)
(0.0210403 -2.07648 0)
(0.0347786 0.0160104 0)
(0.0362783 0.00382951 0)
(0.010735 -0.00670331 0)
(0.0237907 -0.0326545 0)
(0.0385028 -0.0157616 0)
(0.0498278 -0.00661623 0)
(0.0685427 0.000617666 0)
(-0.0664941 -0.00350057 0)
(-0.595069 -0.318621 0)
(-0.636077 -0.48918 0)
(-0.498087 -0.737903 0)
(-0.383026 -0.970463 0)
(-0.273849 -1.15619 0)
(-0.214801 -1.33058 0)
(-0.17778 -1.5159 0)
(-0.128959 -1.63994 0)
(-0.094545 -1.69629 0)
(-0.0932894 -1.70291 0)
(-0.123524 -1.71452 0)
(-0.172104 -1.76738 0)
(-0.220307 -1.87199 0)
(-0.263011 -1.984 0)
(-0.302792 -2.0992 0)
(-0.322572 -2.2074 0)
(-0.31049 -2.28524 0)
(-0.282943 -2.34154 0)
(-0.234317 -2.37948 0)
(-0.163643 -2.38033 0)
(-0.0721959 -2.30169 0)
(-0.00881421 -2.08519 0)
(0.0305384 -0.015814 0)
(0.0283584 -0.118476 0)
(-0.0139841 -0.134686 0)
(0.0328458 -0.163053 0)
(0.0718515 -0.05774 0)
(0.0688536 -0.0288373 0)
(0.0760347 0.00234873 0)
(-0.0892324 0.0125175 0)
(-0.615091 -0.284991 0)
(-0.608985 -0.523673 0)
(-0.501168 -0.787089 0)
(-0.381438 -1.04066 0)
(-0.263602 -1.21317 0)
(-0.20314 -1.36823 0)
(-0.173612 -1.53568 0)
(-0.133965 -1.6476 0)
(-0.09572 -1.69219 0)
(-0.0842368 -1.6766 0)
(-0.104336 -1.66809 0)
(-0.146332 -1.70596 0)
(-0.194724 -1.80497 0)
(-0.248314 -1.92307 0)
(-0.306839 -2.05894 0)
(-0.349029 -2.19719 0)
(-0.356654 -2.30217 0)
(-0.339929 -2.36881 0)
(-0.302475 -2.42063 0)
(-0.233948 -2.43388 0)
(-0.138424 -2.36951 0)
(-0.0360794 -2.12976 0)
(0.0017541 -0.0574725 0)
(0.0170676 -0.359954 0)
(0.00903314 -0.434863 0)
(0.0965663 -0.393722 0)
(0.136163 -0.109022 0)
(0.112343 -0.0325649 0)
(0.0905405 0.000443418 0)
(-0.115423 0.00833512 0)
(-0.587465 -0.286437 0)
(-0.588484 -0.553347 0)
(-0.471967 -0.837586 0)
(-0.377765 -1.0995 0)
(-0.250801 -1.28069 0)
(-0.182285 -1.40656 0)
(-0.156778 -1.55037 0)
(-0.12833 -1.65279 0)
(-0.0899527 -1.68931 0)
(-0.0670307 -1.66052 0)
(-0.0715376 -1.63121 0)
(-0.100599 -1.648 0)
(-0.142489 -1.72832 0)
(-0.200656 -1.83954 0)
(-0.272927 -1.98438 0)
(-0.336679 -2.14994 0)
(-0.366094 -2.29257 0)
(-0.363947 -2.3937 0)
(-0.327775 -2.46587 0)
(-0.263016 -2.49923 0)
(-0.176216 -2.44987 0)
(-0.0629935 -2.226 0)
(-0.00588458 -0.0990178 0)
(0.0170901 -0.4911 0)
(0.073635 -0.515929 0)
(0.204726 -0.435606 0)
(0.24444 -0.203035 0)
(0.179217 -0.0329327 0)
(0.103779 -0.0261878 0)
(-0.131253 -0.0105955 0)
(-0.553371 -0.279744 0)
(-0.542844 -0.573717 0)
(-0.453303 -0.880238 0)
(-0.362338 -1.16389 0)
(-0.24234 -1.34156 0)
(-0.157462 -1.4506 0)
(-0.130903 -1.56226 0)
(-0.112034 -1.65475 0)
(-0.0777662 -1.68719 0)
(-0.0432524 -1.65513 0)
(-0.0313417 -1.60861 0)
(-0.0417393 -1.60135 0)
(-0.0709237 -1.65507 0)
(-0.124805 -1.74645 0)
(-0.201759 -1.88431 0)
(-0.283734 -2.06387 0)
(-0.341641 -2.24505 0)
(-0.364702 -2.40121 0)
(-0.328723 -2.50582 0)
(-0.265674 -2.56348 0)
(-0.177697 -2.53409 0)
(-0.0719104 -2.34353 0)
(-0.00184045 -0.156907 0)
(0.0421935 -0.502175 0)
(0.134697 -0.443897 0)
(0.268561 -0.380311 0)
(0.388092 -0.279194 0)
(0.241884 -0.0784267 0)
(0.130957 -0.0312991 0)
(-0.110067 -0.0392138 0)
(-0.486079 -0.275111 0)
(-0.485007 -0.593206 0)
(-0.415485 -0.904495 0)
(-0.345956 -1.21188 0)
(-0.229666 -1.4056 0)
(-0.139937 -1.49661 0)
(-0.101477 -1.5752 0)
(-0.087856 -1.65537 0)
(-0.0588829 -1.68856 0)
(-0.0169504 -1.66068 0)
(0.0112237 -1.60213 0)
(0.0197432 -1.57396 0)
(0.00809342 -1.59623 0)
(-0.0323301 -1.65994 0)
(-0.100706 -1.77426 0)
(-0.192244 -1.94727 0)
(-0.281199 -2.15738 0)
(-0.340336 -2.37012 0)
(-0.321619 -2.53358 0)
(-0.255763 -2.61759 0)
(-0.16754 -2.61903 0)
(-0.0698273 -2.46625 0)
(-0.00189825 -0.210394 0)
(0.0840834 -0.468151 0)
(0.194407 -0.402619 0)
(0.264922 -0.3638 0)
(0.389969 -0.273741 0)
(0.323654 -0.150041 0)
(0.175329 -0.0417316 0)
(-0.0888582 -0.0618976 0)
(-0.356477 -0.229421 0)
(-0.40409 -0.588011 0)
(-0.359096 -0.912906 0)
(-0.32054 -1.23942 0)
(-0.221628 -1.45365 0)
(-0.126695 -1.5462 0)
(-0.0767486 -1.59762 0)
(-0.0596049 -1.65873 0)
(-0.0359402 -1.69148 0)
(0.00895869 -1.6739 0)
(0.0514053 -1.61158 0)
(0.0757441 -1.56587 0)
(0.0841119 -1.55968 0)
(0.0660064 -1.5923 0)
(0.013154 -1.6719 0)
(-0.0737509 -1.81619 0)
(-0.183788 -2.03099 0)
(-0.282803 -2.29659 0)
(-0.305761 -2.53533 0)
(-0.24431 -2.66367 0)
(-0.157461 -2.69685 0)
(-0.0681541 -2.58359 0)
(-0.00467836 -0.223424 0)
(0.115502 -0.450634 0)
(0.212804 -0.41004 0)
(0.213765 -0.357205 0)
(0.255662 -0.260593 0)
(0.312675 -0.188587 0)
(0.207388 -0.0994751 0)
(-0.0349092 -0.0558538 0)
(-0.256778 -0.172613 0)
(-0.345181 -0.56873 0)
(-0.309818 -0.898802 0)
(-0.288987 -1.24434 0)
(-0.212989 -1.48914 0)
(-0.118322 -1.59253 0)
(-0.058454 -1.63095 0)
(-0.0316324 -1.66748 0)
(-0.00978533 -1.69877 0)
(0.0341971 -1.68963 0)
(0.0847405 -1.63263 0)
(0.122575 -1.57472 0)
(0.145078 -1.5473 0)
(0.150938 -1.55069 0)
(0.123069 -1.59183 0)
(0.0525071 -1.69287 0)
(-0.0566099 -1.88179 0)
(-0.184273 -2.17036 0)
(-0.270292 -2.48794 0)
(-0.240547 -2.68887 0)
(-0.153104 -2.76201 0)
(-0.0660786 -2.69247 0)
(-0.0161371 -0.205958 0)
(0.0894468 -0.467656 0)
(0.131845 -0.342558 0)
(0.128568 -0.320866 0)
(0.166103 -0.257247 0)
(0.236063 -0.199411 0)
(0.208177 -0.114492 0)
(0.0189981 -0.060743 0)
(-0.219194 -0.156813 0)
(-0.315285 -0.568316 0)
(-0.260058 -0.885327 0)
(-0.250543 -1.23425 0)
(-0.196498 -1.50786 0)
(-0.109758 -1.62985 0)
(-0.0420788 -1.66926 0)
(-0.00504166 -1.68731 0)
(0.0197306 -1.71041 0)
(0.0586423 -1.70533 0)
(0.112123 -1.65829 0)
(0.157521 -1.59479 0)
(0.19032 -1.55191 0)
(0.211796 -1.53504 0)
(0.210253 -1.54276 0)
(0.170464 -1.5968 0)
(0.0820662 -1.73725 0)
(-0.0486315 -2.00391 0)
(-0.195414 -2.37628 0)
(-0.234064 -2.68506 0)
(-0.156724 -2.81627 0)
(-0.0655886 -2.79526 0)
(-0.012872 -0.171268 0)
(0.034328 -0.494499 0)
(0.0647082 -0.297063 0)
(0.0889081 -0.289376 0)
(0.131405 -0.247741 0)
(0.195958 -0.204916 0)
(0.200706 -0.10916 0)
(0.0516011 -0.0699644 0)
(-0.196802 -0.183992 0)
(-0.285593 -0.602592 0)
(-0.200174 -0.884718 0)
(-0.191514 -1.21366 0)
(-0.163809 -1.51051 0)
(-0.0898097 -1.65815 0)
(-0.0223809 -1.70181 0)
(0.0240376 -1.71379 0)
(0.0528417 -1.72523 0)
(0.0851083 -1.72041 0)
(0.133985 -1.68284 0)
(0.182674 -1.6197 0)
(0.222527 -1.56622 0)
(0.251025 -1.53333 0)
(0.267775 -1.52117 0)
(0.259534 -1.53918 0)
(0.20746 -1.62402 0)
(0.0990273 -1.83078 0)
(-0.0742163 -2.20077 0)
(-0.208255 -2.62155 0)
(-0.17123 -2.84841 0)
(-0.0681985 -2.8963 0)
(0.00273303 -0.152963 0)
(0.0171012 -0.391579 0)
(0.0365118 -0.257124 0)
(0.071549 -0.246084 0)
(0.10533 -0.225786 0)
(0.153908 -0.208633 0)
(0.189913 -0.119053 0)
(0.0642443 -0.0814531 0)
(-0.191952 -0.240054 0)
(-0.251306 -0.669482 0)
(-0.124036 -0.902553 0)
(-0.106778 -1.19097 0)
(-0.101336 -1.49465 0)
(-0.0511702 -1.67063 0)
(0.00941729 -1.72613 0)
(0.0580012 -1.7376 0)
(0.0889201 -1.73965 0)
(0.115339 -1.73196 0)
(0.153871 -1.70161 0)
(0.200934 -1.64401 0)
(0.243772 -1.5856 0)
(0.278341 -1.54433 0)
(0.299887 -1.52091 0)
(0.313201 -1.5169 0)
(0.298536 -1.55842 0)
(0.231 -1.68966 0)
(0.0779542 -1.99151 0)
(-0.124682 -2.47054 0)
(-0.176184 -2.86473 0)
(-0.0809888 -2.99623 0)
(0.00798634 -0.143573 0)
(0.0212795 -0.249908 0)
(0.03633 -0.209735 0)
(0.0605403 -0.201068 0)
(0.0837233 -0.204162 0)
(0.122525 -0.213089 0)
(0.178998 -0.156411 0)
(0.0802641 -0.107563 0)
(-0.16304 -0.308329 0)
(-0.222195 -0.828482 0)
(-0.0456782 -0.956357 0)
(-0.000139597 -1.17953 0)
(-0.00325316 -1.46311 0)
(0.018115 -1.665 0)
(0.063551 -1.74094 0)
(0.102768 -1.75135 0)
(0.129641 -1.74918 0)
(0.150336 -1.73704 0)
(0.177073 -1.71071 0)
(0.2152 -1.66124 0)
(0.255761 -1.60498 0)
(0.291975 -1.55982 0)
(0.319777 -1.53147 0)
(0.339554 -1.5211 0)
(0.347645 -1.53578 0)
(0.323901 -1.60491 0)
(0.218244 -1.8091 0)
(0.0190174 -2.25655 0)
(-0.147024 -2.80745 0)
(-0.0991195 -3.09964 0)
(0.0232103 -0.157739 0)
(0.0292172 -0.162153 0)
(0.0259105 -0.16515 0)
(0.0475192 -0.168582 0)
(0.0669991 -0.188451 0)
(0.0928836 -0.223265 0)
(0.168094 -0.223218 0)
(0.111232 -0.165996 0)
(-0.0843115 -0.414284 0)
(-0.128744 -0.985091 0)
(0.0565058 -1.05137 0)
(0.137145 -1.18812 0)
(0.133332 -1.4227 0)
(0.122008 -1.63331 0)
(0.144107 -1.73286 0)
(0.164341 -1.75169 0)
(0.179384 -1.745 0)
(0.191348 -1.73368 0)
(0.207158 -1.70882 0)
(0.231432 -1.66676 0)
(0.262732 -1.61661 0)
(0.29509 -1.57257 0)
(0.326364 -1.54395 0)
(0.349394 -1.5304 0)
(0.364096 -1.54309 0)
(0.366907 -1.57847 0)
(0.315047 -1.69669 0)
(0.174576 -2.04372 0)
(-0.0515272 -2.64423 0)
(-0.120869 -3.1855 0)
(0.038843 -0.188777 0)
(0.0500397 -0.174815 0)
(0.0289406 -0.16056 0)
(0.0405368 -0.162777 0)
(0.0561448 -0.182515 0)
(0.0726039 -0.229449 0)
(0.127587 -0.284183 0)
(0.139202 -0.285603 0)
(0.0742308 -0.591338 0)
(0.0644422 -1.17395 0)
(0.219957 -1.17723 0)
(0.308549 -1.2121 0)
(0.302375 -1.37364 0)
(0.259527 -1.57346 0)
(0.248164 -1.69592 0)
(0.245976 -1.73255 0)
(0.24296 -1.72737 0)
(0.242017 -1.71582 0)
(0.246608 -1.69564 0)
(0.257504 -1.6599 0)
(0.273994 -1.61517 0)
(0.293827 -1.57606 0)
(0.316904 -1.55049 0)
(0.338988 -1.53847 0)
(0.356142 -1.55044 0)
(0.37077 -1.58386 0)
(0.363517 -1.6603 0)
(0.299635 -1.90176 0)
(0.101262 -2.43182 0)
(-0.0550415 -3.20043 0)
(0.0316085 -0.194502 0)
(0.0557385 -0.228402 0)
(0.049927 -0.203447 0)
(0.0503176 -0.187735 0)
(0.0582892 -0.193153 0)
(0.066233 -0.223464 0)
(0.0938558 -0.324014 0)
(0.209425 -0.52697 0)
(0.308232 -0.883428 0)
(0.347047 -1.35912 0)
(0.435555 -1.29864 0)
(0.50462 -1.23771 0)
(0.4871 -1.31547 0)
(0.420379 -1.48676 0)
(0.368447 -1.62998 0)
(0.3443 -1.69106 0)
(0.323305 -1.69806 0)
(0.307574 -1.68669 0)
(0.298905 -1.66914 0)
(0.295851 -1.63729 0)
(0.295003 -1.59651 0)
(0.297483 -1.55954 0)
(0.300646 -1.53706 0)
(0.307984 -1.53103 0)
(0.32034 -1.54948 0)
(0.344071 -1.59072 0)
(0.368441 -1.66727 0)
(0.365725 -1.84679 0)
(0.250956 -2.30405 0)
(0.0287388 -3.10174 0)
(-0.024596 -0.116261 0)
(0.0204491 -0.235863 0)
(0.0813431 -0.255785 0)
(0.0772551 -0.227243 0)
(0.0840599 -0.209678 0)
(0.0749605 -0.202737 0)
(0.0977703 -0.393319 0)
(0.307495 -0.884995 0)
(0.501101 -1.22072 0)
(0.565127 -1.45598 0)
(0.663284 -1.3893 0)
(0.698777 -1.25096 0)
(0.669801 -1.25021 0)
(0.589369 -1.37894 0)
(0.505175 -1.53542 0)
(0.455184 -1.62447 0)
(0.416142 -1.65235 0)
(0.386386 -1.64864 0)
(0.364299 -1.62942 0)
(0.347037 -1.59919 0)
(0.327803 -1.55802 0)
(0.308184 -1.5219 0)
(0.288252 -1.5028 0)
(0.274565 -1.50665 0)
(0.271408 -1.54182 0)
(0.294045 -1.60259 0)
(0.33819 -1.68724 0)
(0.368682 -1.84749 0)
(0.329125 -2.22302 0)
(0.119224 -2.86156 0)
(-0.0767818 -0.0246485 0)
(-0.0704258 -0.113138 0)
(0.0563381 -0.207422 0)
(0.109309 -0.22081 0)
(0.124507 -0.192925 0)
(0.0886177 -0.165887 0)
(0.124963 -0.541298 0)
(0.392789 -1.19552 0)
(0.601547 -1.45771 0)
(0.744401 -1.61561 0)
(0.860013 -1.44835 0)
(0.870991 -1.25211 0)
(0.832748 -1.19605 0)
(0.751615 -1.26546 0)
(0.649648 -1.41412 0)
(0.573486 -1.53376 0)
(0.516801 -1.58602 0)
(0.472798 -1.59396 0)
(0.436728 -1.57783 0)
(0.40485 -1.54367 0)
(0.369329 -1.50169 0)
(0.326646 -1.46415 0)
(0.282024 -1.44772 0)
(0.243211 -1.46261 0)
(0.22139 -1.51665 0)
(0.231701 -1.60855 0)
(0.270978 -1.70934 0)
(0.319885 -1.859 0)
(0.302191 -2.15862 0)
(0.133755 -2.62467 0)
(-0.0552933 -0.0014588 0)
(-0.0932646 0.0148866 0)
(-0.0227063 -0.0686226 0)
(0.0928438 -0.136494 0)
(0.159719 -0.145439 0)
(0.11382 -0.127762 0)
(0.143448 -0.770265 0)
(0.410021 -1.4891 0)
(0.660297 -1.71971 0)
(0.855316 -1.76091 0)
(0.980016 -1.47265 0)
(0.987095 -1.22548 0)
(0.955458 -1.14119 0)
(0.893892 -1.16421 0)
(0.793722 -1.28266 0)
(0.69402 -1.42087 0)
(0.621213 -1.50193 0)
(0.560398 -1.52161 0)
(0.50863 -1.50693 0)
(0.461764 -1.47067 0)
(0.410766 -1.42299 0)
(0.347034 -1.38072 0)
(0.27655 -1.3646 0)
(0.210695 -1.39492 0)
(0.171006 -1.47972 0)
(0.169361 -1.60055 0)
(0.193051 -1.72595 0)
(0.230621 -1.86234 0)
(0.216226 -2.10202 0)
(0.102688 -2.45066 0)
(-0.0281869 -0.00728409 0)
(-0.0722261 0.0390998 0)
(-0.0560859 0.0279713 0)
(0.0389258 -0.0228298 0)
(0.152402 -0.0781601 0)
(0.121286 -0.0963744 0)
(0.0841798 -0.929584 0)
(0.304684 -1.6767 0)
(0.569123 -1.92216 0)
(0.836028 -1.87843 0)
(1.01187 -1.50396 0)
(1.05802 -1.20536 0)
(1.1047 -1.16324 0)
(1.00684 -1.0812 0)
(0.923099 -1.15221 0)
(0.807705 -1.29003 0)
(0.717692 -1.39685 0)
(0.640875 -1.43373 0)
(0.571022 -1.41745 0)
(0.507252 -1.3783 0)
(0.440513 -1.32379 0)
(0.360699 -1.27395 0)
(0.266851 -1.25579 0)
(0.183247 -1.30399 0)
(0.130875 -1.42371 0)
(0.115799 -1.57437 0)
(0.123203 -1.71913 0)
(0.141358 -1.85642 0)
(0.124537 -2.0489 0)
(0.0569361 -2.33813 0)
(-0.00579082 0.00251399 0)
(-0.0398929 0.0336595 0)
(-0.0621348 0.0496501 0)
(-0.0133299 0.0266719 0)
(0.107188 -0.0102037 0)
(0.0895757 -0.0825802 0)
(-0.0333432 -1.06609 0)
(0.115797 -1.7871 0)
(0.371786 -2.10658 0)
(0.670188 -2.0113 0)
(0.951358 -1.58601 0)
(1.08385 -1.22251 0)
(1.16554 -1.13974 0)
(1.12351 -1.0641 0)
(1.00162 -1.02855 0)
(0.898293 -1.14929 0)
(0.790912 -1.27378 0)
(0.700471 -1.32653 0)
(0.615613 -1.3136 0)
(0.535462 -1.2695 0)
(0.453599 -1.20814 0)
(0.360296 -1.15146 0)
(0.256808 -1.13325 0)
(0.16748 -1.20074 0)
(0.110824 -1.35458 0)
(0.0840726 -1.53141 0)
(0.0742681 -1.68664 0)
(0.0720299 -1.82615 0)
(0.0442153 -1.99713 0)
(0.00831437 -2.28267 0)
(0.00346779 0.0220249 0)
(-0.022998 0.0285014 0)
(-0.0609208 0.0434215 0)
(-0.0356133 0.0362385 0)
(0.049709 0.0169302 0)
(0.0455589 -0.0962059 0)
(-0.11221 -1.14607 0)
(-0.0513458 -1.8944 0)
(0.148194 -2.26624 0)
(0.424115 -2.18129 0)
(0.794021 -1.74992 0)
(1.04572 -1.29987 0)
(1.15626 -1.13244 0)
(1.12395 -1.00828 0)
(1.02455 -0.935465 0)
(0.944262 -1.02225 0)
(0.834042 -1.14083 0)
(0.733304 -1.20494 0)
(0.635142 -1.19451 0)
(0.543467 -1.14878 0)
(0.450551 -1.08266 0)
(0.350471 -1.02456 0)
(0.25097 -1.01443 0)
(0.171149 -1.10164 0)
(0.116564 -1.27839 0)
(0.080539 -1.47237 0)
(0.0513508 -1.63313 0)
(0.0323506 -1.77697 0)
(-0.00127084 -1.94585 0)
(-0.0214607 -2.26901 0)
(0.00451644 -0.00591193 0)
(-0.014548 -0.00143527 0)
(-0.0528859 0.0212634 0)
(-0.0482827 0.0313154 0)
(0.00840818 0.0143983 0)
(0.0205302 -0.148445 0)
(-0.152286 -1.19798 0)
(-0.135717 -1.9632 0)
(-0.0232785 -2.38954 0)
(0.185552 -2.33262 0)
(0.548136 -1.95168 0)
(0.911954 -1.43877 0)
(1.05172 -1.10328 0)
(1.12338 -0.996555 0)
(1.07837 -0.908886 0)
(0.959243 -0.899414 0)
(0.856516 -1.00299 0)
(0.742429 -1.07075 0)
(0.632878 -1.06694 0)
(0.533753 -1.02138 0)
(0.437611 -0.955622 0)
(0.341585 -0.904126 0)
(0.255919 -0.909066 0)
(0.196337 -1.01498 0)
(0.147511 -1.19814 0)
(0.0990753 -1.3941 0)
(0.0528964 -1.5631 0)
(0.022851 -1.71817 0)
(-0.00434643 -1.89791 0)
(-0.0220562 -2.25974 0)
(0.00922578 -0.0765009 0)
(0.00464368 -0.0898984 0)
(-0.0307676 -0.0270379 0)
(-0.0448107 0.00992214 0)
(-0.0284634 0.0140036 0)
(-0.0361967 -0.209231 0)
(-0.206298 -1.2397 0)
(-0.187191 -1.99097 0)
(-0.130069 -2.46798 0)
(0.00659028 -2.46218 0)
(0.291667 -2.1356 0)
(0.69488 -1.64282 0)
(0.983589 -1.20453 0)
(1.09447 -1.0064 0)
(1.06366 -0.865054 0)
(0.999106 -0.833268 0)
(0.847762 -0.852546 0)
(0.731424 -0.927122 0)
(0.614772 -0.934506 0)
(0.514 -0.893582 0)
(0.423234 -0.836551 0)
(0.341129 -0.798857 0)
(0.279833 -0.825642 0)
(0.239656 -0.939943 0)
(0.19528 -1.11096 0)
(0.131833 -1.29705 0)
(0.0663599 -1.47975 0)
(0.0276415 -1.65491 0)
(0.0124941 -1.85844 0)
(-0.00375254 -2.23116 0)
(0.00262153 -0.134075 0)
(0.0153786 -0.208136 0)
(0.0130059 -0.0826364 0)
(-0.0136334 -0.0164293 0)
(-0.0823807 -0.0245506 0)
(-0.204046 -0.391096 0)
(-0.220607 -1.25617 0)
(-0.213802 -1.99073 0)
(-0.182528 -2.50315 0)
(-0.101309 -2.56121 0)
(0.0986378 -2.28459 0)
(0.434157 -1.84249 0)
(0.815348 -1.3699 0)
(0.980424 -0.999698 0)
(1.03622 -0.858842 0)
(0.959267 -0.737971 0)
(0.853609 -0.740451 0)
(0.697579 -0.770664 0)
(0.590609 -0.804113 0)
(0.495373 -0.777829 0)
(0.41776 -0.736794 0)
(0.357685 -0.720987 0)
(0.323098 -0.765816 0)
(0.295155 -0.869975 0)
(0.247866 -1.01453 0)
(0.170941 -1.18248 0)
(0.0864657 -1.3767 0)
(0.0326367 -1.58768 0)
(0.0226817 -1.82095 0)
(0.0086497 -2.1762 0)
(0.00221823 -0.168731 0)
(0.0213815 -0.237069 0)
(0.0321206 -0.117873 0)
(0.000133896 -0.0540887 0)
(-0.118922 -0.133277 0)
(-0.223225 -0.510394 0)
(-0.185539 -1.23298 0)
(-0.22544 -1.96649 0)
(-0.198936 -2.512 0)
(-0.15424 -2.62581 0)
(-0.0185598 -2.41315 0)
(0.219619 -2.01712 0)
(0.587673 -1.56946 0)
(0.899143 -1.10967 0)
(1.00121 -0.855589 0)
(0.927122 -0.671743 0)
(0.812409 -0.602907 0)
(0.697134 -0.654365 0)
(0.56309 -0.676727 0)
(0.490298 -0.680149 0)
(0.431565 -0.664018 0)
(0.393389 -0.670091 0)
(0.375901 -0.715303 0)
(0.3488 -0.796222 0)
(0.291519 -0.90541 0)
(0.206517 -1.05332 0)
(0.111191 -1.25663 0)
(0.0394582 -1.50758 0)
(0.0154349 -1.77754 0)
(0.00917132 -2.11933 0)
(0.000878121 -0.177809 0)
(0.0260468 -0.238176 0)
(0.038908 -0.117442 0)
(-0.00575817 -0.106797 0)
(-0.0626042 -0.17029 0)
(-0.0883767 -0.4661 0)
(-0.130051 -1.1664 0)
(-0.216155 -1.92566 0)
(-0.191205 -2.50263 0)
(-0.169214 -2.66067 0)
(-0.0758163 -2.51325 0)
(0.0923458 -2.18389 0)
(0.37899 -1.72807 0)
(0.761339 -1.26436 0)
(0.973173 -0.887962 0)
(0.892312 -0.614837 0)
(0.768181 -0.489528 0)
(0.655413 -0.512257 0)
(0.582852 -0.609115 0)
(0.493417 -0.605708 0)
(0.460708 -0.612389 0)
(0.437129 -0.627635 0)
(0.420303 -0.656878 0)
(0.38253 -0.708446 0)
(0.318077 -0.790963 0)
(0.232735 -0.921437 0)
(0.139063 -1.12414 0)
(0.0525351 -1.40548 0)
(0.00630715 -1.72664 0)
(0.00447052 -2.06044 0)
(0.00250715 -0.176475 0)
(0.0290238 -0.236084 0)
(0.0383047 -0.127518 0)
(0.0232929 -0.109641 0)
(0.013455 -0.130498 0)
(-0.000994414 -0.38819 0)
(-0.0807944 -1.07665 0)
(-0.205431 -1.86916 0)
(-0.172358 -2.47615 0)
(-0.165713 -2.67245 0)
(-0.102001 -2.57913 0)
(0.021427 -2.31901 0)
(0.215696 -1.89972 0)
(0.547345 -1.42439 0)
(0.830878 -0.907937 0)
(0.857448 -0.574777 0)
(0.740934 -0.413859 0)
(0.637608 -0.413011 0)
(0.566265 -0.505227 0)
(0.498594 -0.543226 0)
(0.484874 -0.570866 0)
(0.467046 -0.575065 0)
(0.438172 -0.582997 0)
(0.389218 -0.612453 0)
(0.326655 -0.679641 0)
(0.251061 -0.798258 0)
(0.167109 -0.989059 0)
(0.0761033 -1.27863 0)
(-0.000231523 -1.65395 0)
(-0.00864955 -2.0103 0)
(0.00139609 -0.16881 0)
(0.0322456 -0.235427 0)
(0.0536182 -0.135162 0)
(0.0535855 -0.100525 0)
(0.0548919 -0.110274 0)
(0.0501513 -0.322151 0)
(-0.0332348 -0.974142 0)
(-0.189492 -1.80988 0)
(-0.149583 -2.439 0)
(-0.153947 -2.66979 0)
(-0.112556 -2.61826 0)
(-0.0228514 -2.40888 0)
(0.115154 -2.03525 0)
(0.356191 -1.55934 0)
(0.69091 -1.01502 0)
(0.825116 -0.579662 0)
(0.726701 -0.366641 0)
(0.617892 -0.325291 0)
(0.558593 -0.42096 0)
(0.537118 -0.512052 0)
(0.487012 -0.502272 0)
(0.465492 -0.492828 0)
(0.427971 -0.494762 0)
(0.381854 -0.518469 0)
(0.323171 -0.57613 0)
(0.258013 -0.685272 0)
(0.186868 -0.86372 0)
(0.108405 -1.14488 0)
(0.00984858 -1.54989 0)
(-0.0309901 -1.95724 0)
(0.00225805 -0.155801 0)
(0.0418722 -0.226538 0)
(0.0735682 -0.137943 0)
(0.0815481 -0.099564 0)
(0.0869234 -0.0988305 0)
(0.0889659 -0.262653 0)
(0.0118942 -0.876396 0)
(-0.178361 -1.74384 0)
(-0.128143 -2.38812 0)
(-0.13996 -2.64771 0)
(-0.117348 -2.62427 0)
(-0.0528122 -2.45108 0)
(0.0426757 -2.12376 0)
(0.215809 -1.69997 0)
(0.524642 -1.16191 0)
(0.7387 -0.623143 0)
(0.662858 -0.323443 0)
(0.567609 -0.257222 0)
(0.526346 -0.355316 0)
(0.50809 -0.443049 0)
(0.490241 -0.453472 0)
(0.472442 -0.438771 0)
(0.43257 -0.430659 0)
(0.3594 -0.416588 0)
(0.310644 -0.474942 0)
(0.250775 -0.580706 0)
(0.194021 -0.752405 0)
(0.137308 -1.01641 0)
(0.0436499 -1.41967 0)
(-0.0354425 -1.89903 0)
(0.00538691 -0.134194 0)
(0.0513492 -0.211166 0)
(0.0891805 -0.135613 0)
(0.105918 -0.100946 0)
(0.115079 -0.0942558 0)
(0.117448 -0.212931 0)
(0.0440845 -0.77429 0)
(-0.166106 -1.68098 0)
(-0.112375 -2.32675 0)
(-0.126611 -2.60961 0)
(-0.124634 -2.6069 0)
(-0.0832395 -2.46123 0)
(-0.023423 -2.17157 0)
(0.0879693 -1.80039 0)
(0.327103 -1.30116 0)
(0.583604 -0.678306 0)
(0.560103 -0.305178 0)
(0.484441 -0.217098 0)
(0.454554 -0.307823 0)
(0.43301 -0.389768 0)
(0.411055 -0.390478 0)
(0.392358 -0.355537 0)
(0.359335 -0.322959 0)
(0.324841 -0.333904 0)
(0.2658 -0.372433 0)
(0.224787 -0.488388 0)
(0.187204 -0.662178 0)
(0.159528 -0.914849 0)
(0.102561 -1.29821 0)
(0.00627034 -1.80378 0)
(0.00916451 -0.10476 0)
(0.0560916 -0.176308 0)
(0.0982035 -0.125272 0)
(0.123909 -0.0984657 0)
(0.137509 -0.0875636 0)
(0.138785 -0.167876 0)
(0.0716166 -0.677352 0)
(-0.158809 -1.61494 0)
(-0.102276 -2.25682 0)
(-0.117053 -2.55988 0)
(-0.131705 -2.57428 0)
(-0.117223 -2.44874 0)
(-0.0824409 -2.1904 0)
(-0.0140338 -1.86269 0)
(0.139974 -1.39796 0)
(0.446684 -0.813833 0)
(0.480591 -0.331174 0)
(0.414111 -0.202002 0)
(0.374529 -0.262793 0)
(0.344811 -0.330718 0)
(0.320691 -0.328505 0)
(0.302006 -0.283216 0)
(0.271163 -0.237885 0)
(0.24238 -0.237493 0)
(0.214326 -0.303759 0)
(0.178748 -0.411244 0)
(0.169965 -0.59705 0)
(0.168502 -0.849177 0)
(0.147236 -1.2021 0)
(0.0583568 -1.63873 0)
(0.00749 -0.0701895 0)
(0.0484621 -0.117223 0)
(0.0966394 -0.104989 0)
(0.129674 -0.0894594 0)
(0.148982 -0.0764247 0)
(0.146302 -0.126193 0)
(0.0857655 -0.574048 0)
(-0.165441 -1.54256 0)
(-0.0958561 -2.17851 0)
(-0.113013 -2.49718 0)
(-0.142501 -2.52157 0)
(-0.152797 -2.40998 0)
(-0.13261 -2.1862 0)
(-0.0963582 -1.88798 0)
(0.0133167 -1.47817 0)
(0.281676 -0.94265 0)
(0.412875 -0.400863 0)
(0.356413 -0.19624 0)
(0.294802 -0.211688 0)
(0.255309 -0.267018 0)
(0.229559 -0.264008 0)
(0.208989 -0.216506 0)
(0.189157 -0.175406 0)
(0.173214 -0.170689 0)
(0.15288 -0.224733 0)
(0.140369 -0.382989 0)
(0.137272 -0.559697 0)
(0.161469 -0.807795 0)
(0.154579 -1.11941 0)
(0.0727314 -1.45645 0)
(0.00499461 -0.0412052 0)
(0.0329306 -0.059637 0)
(0.0804833 -0.0724657 0)
(0.123951 -0.072089 0)
(0.150844 -0.0634113 0)
(0.149825 -0.096066 0)
(0.0993749 -0.511207 0)
(-0.173831 -1.4747 0)
(-0.100608 -2.09185 0)
(-0.115098 -2.42117 0)
(-0.154042 -2.45512 0)
(-0.183391 -2.35422 0)
(-0.171262 -2.1585 0)
(-0.163471 -1.88646 0)
(-0.0647367 -1.53502 0)
(0.124338 -1.04921 0)
(0.337329 -0.54044 0)
(0.285927 -0.1931 0)
(0.227722 -0.169363 0)
(0.187365 -0.212912 0)
(0.163007 -0.208584 0)
(0.144347 -0.164126 0)
(0.13206 -0.131239 0)
(0.122762 -0.125508 0)
(0.110018 -0.166241 0)
(0.0931775 -0.322442 0)
(0.102596 -0.533377 0)
(0.149011 -0.774389 0)
(0.14201 -1.03635 0)
(0.0653375 -1.27948 0)
(0.00398697 -0.0265295 0)
(0.021576 -0.029376 0)
(0.0586589 -0.0383712 0)
(0.106522 -0.0479629 0)
(0.143004 -0.0499542 0)
(0.146167 -0.072666 0)
(0.0987404 -0.417412 0)
(-0.16543 -1.42047 0)
(-0.105461 -2.01252 0)
(-0.114524 -2.34345 0)
(-0.162928 -2.37828 0)
(-0.209405 -2.28512 0)
(-0.203751 -2.10999 0)
(-0.210276 -1.86705 0)
(-0.127834 -1.56074 0)
(-0.00711693 -1.12898 0)
(0.17889 -0.630509 0)
(0.225684 -0.224454 0)
(0.194688 -0.152075 0)
(0.148163 -0.169237 0)
(0.122123 -0.160839 0)
(0.10606 -0.124372 0)
(0.0984237 -0.104077 0)
(0.0940282 -0.10119 0)
(0.0874742 -0.128383 0)
(0.077077 -0.274389 0)
(0.0909654 -0.557594 0)
(0.121992 -0.744491 0)
(0.12287 -0.957362 0)
(0.0560937 -1.11653 0)
(0.00551719 -0.0283755 0)
(0.0204919 -0.0240872 0)
(0.0455274 -0.0235984 0)
(0.085528 -0.0269159 0)
(0.127958 -0.0355105 0)
(0.136999 -0.0560104 0)
(0.0997993 -0.349316 0)
(-0.11511 -1.36966 0)
(-0.095934 -1.94595 0)
(-0.100944 -2.26481 0)
(-0.159793 -2.29682 0)
(-0.227774 -2.20405 0)
(-0.237747 -2.04921 0)
(-0.242791 -1.83922 0)
(-0.17707 -1.56523 0)
(-0.0960681 -1.18032 0)
(0.0332055 -0.724527 0)
(0.173133 -0.328506 0)
(0.158787 -0.148489 0)
(0.124946 -0.137281 0)
(0.0999291 -0.125088 0)
(0.0871543 -0.101533 0)
(0.0824482 -0.0934009 0)
(0.0811867 -0.0939664 0)
(0.0767643 -0.114838 0)
(0.0767979 -0.243142 0)
(0.0766295 -0.510626 0)
(0.0838637 -0.695273 0)
(0.104285 -0.86765 0)
(0.0549825 -0.970851 0)
(0.00904666 -0.0458585 0)
(0.0257922 -0.0344058 0)
(0.0453041 -0.0278093 0)
(0.0738418 -0.0230152 0)
(0.11204 -0.0228521 0)
(0.12436 -0.0439939 0)
(0.0974093 -0.315091 0)
(-0.0638553 -1.30596 0)
(-0.065799 -1.87935 0)
(-0.0768629 -2.18053 0)
(-0.153387 -2.20365 0)
(-0.23164 -2.11309 0)
(-0.267123 -1.98023 0)
(-0.266939 -1.80294 0)
(-0.216378 -1.5553 0)
(-0.152231 -1.20845 0)
(-0.0567309 -0.794337 0)
(0.0859927 -0.417336 0)
(0.135358 -0.176977 0)
(0.116375 -0.122164 0)
(0.0918359 -0.110449 0)
(0.0838891 -0.100173 0)
(0.078069 -0.0986319 0)
(0.0745089 -0.102893 0)
(0.0763021 -0.130573 0)
(0.0887437 -0.240887 0)
(0.0925118 -0.460767 0)
(0.0890698 -0.685226 0)
(0.0770545 -0.85359 0)
(0.0265434 -0.824163 0)
(0.0171076 -0.0829431 0)
(0.0385755 -0.0567937 0)
(0.0527628 -0.0423151 0)
(0.0758466 -0.0335499 0)
(0.104772 -0.0220575 0)
(0.111319 -0.0335138 0)
(0.0907732 -0.312161 0)
(-0.0186905 -1.24624 0)
(-0.0193647 -1.80667 0)
(-0.0507706 -2.08798 0)
(-0.149718 -2.10019 0)
(-0.224681 -2.015 0)
(-0.280155 -1.90747 0)
(-0.281688 -1.76007 0)
(-0.24114 -1.53781 0)
(-0.18225 -1.22632 0)
(-0.089797 -0.854365 0)
(0.0368894 -0.491365 0)
(0.134332 -0.235753 0)
(0.132193 -0.125665 0)
(0.108579 -0.11912 0)
(0.0861323 -0.114509 0)
(0.0746189 -0.113649 0)
(0.0704686 -0.124493 0)
(0.0828964 -0.166577 0)
(0.108702 -0.264629 0)
(0.120092 -0.41834 0)
(0.0984261 -0.586859 0)
(0.0466223 -0.722146 0)
(0.0058199 -0.774982 0)
(0.0350508 -0.117905 0)
(0.0663814 -0.0937246 0)
(0.0678886 -0.0681044 0)
(0.0872306 -0.0514172 0)
(0.112409 -0.0318484 0)
(0.101461 -0.0265547 0)
(0.0825087 -0.346107 0)
(0.0177653 -1.19095 0)
(0.0236071 -1.71722 0)
(-0.0349029 -1.97986 0)
(-0.14784 -1.99083 0)
(-0.212767 -1.91779 0)
(-0.276426 -1.83397 0)
(-0.278392 -1.71058 0)
(-0.251063 -1.52005 0)
(-0.193787 -1.24891 0)
(-0.0848313 -0.913908 0)
(0.0480529 -0.550106 0)
(0.115897 -0.25642 0)
(0.105542 -0.114947 0)
(0.10115 -0.114523 0)
(0.0876254 -0.124155 0)
(0.0702413 -0.125015 0)
(0.0722494 -0.149638 0)
(0.0915607 -0.196502 0)
(0.114896 -0.282101 0)
(0.117861 -0.383705 0)
(0.0869254 -0.518366 0)
(0.03772 -0.639184 0)
(0.00536654 -0.704535 0)
(0.0242136 -0.289239 0)
(0.0678357 -0.130171 0)
(0.0950625 -0.0997138 0)
(0.11056 -0.072965 0)
(0.13497 -0.0449085 0)
(0.0979174 -0.0283963 0)
(0.0609387 -0.411896 0)
(0.0333119 -1.13461 0)
(0.049915 -1.60863 0)
(-0.037413 -1.85326 0)
(-0.148743 -1.87968 0)
(-0.199631 -1.82805 0)
(-0.259859 -1.76116 0)
(-0.266633 -1.66236 0)
(-0.243678 -1.50244 0)
(-0.186906 -1.27227 0)
(-0.0701827 -0.976492 0)
(0.0724403 -0.601378 0)
(0.0789952 -0.229307 0)
(0.031617 -0.0778541 0)
(0.0218236 -0.0866821 0)
(0.0262414 -0.115116 0)
(0.0411446 -0.135156 0)
(0.0668614 -0.168387 0)
(0.0856301 -0.207639 0)
(0.0967114 -0.274916 0)
(0.0935095 -0.34728 0)
(0.0667391 -0.45978 0)
(0.0217651 -0.579115 0)
(-0.00253584 -0.684947 0)
(0.0798558 -0.775614 0)
(0.109142 -0.262525 0)
(0.120476 -0.120642 0)
(0.145194 -0.0959183 0)
(0.17103 -0.0603676 0)
(0.108779 -0.0498043 0)
(0.0387448 -0.478138 0)
(0.0313616 -1.05471 0)
(0.0520142 -1.49105 0)
(-0.0522248 -1.71755 0)
(-0.152077 -1.77165 0)
(-0.187408 -1.7472 0)
(-0.238014 -1.6911 0)
(-0.24924 -1.61272 0)
(-0.233526 -1.48499 0)
(-0.175627 -1.30125 0)
(-0.0608106 -1.0426 0)
(0.069085 -0.641248 0)
(0.0151738 -0.187126 0)
(-0.0273175 -0.073415 0)
(-0.016575 -0.101118 0)
(0.00556319 -0.127202 0)
(0.0247054 -0.147366 0)
(0.0443999 -0.175819 0)
(0.0614432 -0.208902 0)
(0.0743802 -0.257167 0)
(0.0697097 -0.301999 0)
(0.0475474 -0.390191 0)
(0.0141279 -0.515327 0)
(-0.00314312 -0.661832 0)
(0.0209562 -0.856872 0)
(0.163941 -0.617462 0)
(0.175071 -0.200914 0)
(0.188366 -0.119482 0)
(0.22469 -0.0904372 0)
(0.1619 -0.110852 0)
(0.0762086 -0.501916 0)
(0.0594887 -0.96843 0)
(0.0333954 -1.3673 0)
(-0.0745648 -1.58944 0)
(-0.146577 -1.67559 0)
(-0.173967 -1.67223 0)
(-0.21502 -1.6229 0)
(-0.23232 -1.5598 0)
(-0.223036 -1.46214 0)
(-0.187044 -1.32629 0)
(-0.0682554 -1.0931 0)
(0.0114657 -0.671611 0)
(-0.0225024 -0.183766 0)
(-0.0562295 -0.0864381 0)
(-0.0509804 -0.111851 0)
(-0.0231269 -0.13577 0)
(0.00297269 -0.15701 0)
(0.0248037 -0.181759 0)
(0.0428146 -0.208113 0)
(0.0555285 -0.241513 0)
(0.059798 -0.272951 0)
(0.0552217 -0.334928 0)
(0.0354186 -0.445032 0)
(0.0104161 -0.605139 0)
(0.0147495 -0.833612 0)
(0.132536 -0.844759 0)
(0.238148 -0.43811 0)
(0.239908 -0.201061 0)
(0.264847 -0.158364 0)
(0.248777 -0.210827 0)
(0.191063 -0.470215 0)
(0.116151 -0.856219 0)
(0.0376728 -1.22723 0)
(-0.070751 -1.47212 0)
(-0.124377 -1.58978 0)
(-0.152792 -1.59768 0)
(-0.190415 -1.55238 0)
(-0.214644 -1.49979 0)
(-0.218192 -1.42741 0)
(-0.197712 -1.33141 0)
(-0.102767 -1.13282 0)
(-0.052695 -0.728116 0)
(-0.0656202 -0.189899 0)
(-0.0888408 -0.104369 0)
(-0.0789309 -0.118168 0)
(-0.0517189 -0.137646 0)
(-0.0236794 -0.155731 0)
(0.000182952 -0.177975 0)
(0.0200532 -0.203672 0)
(0.0375573 -0.23232 0)
(0.0536747 -0.259618 0)
(0.0632969 -0.302439 0)
(0.0560716 -0.391109 0)
(0.0242343 -0.526963 0)
(0.0235015 -0.889396 0)
(0.0343875 -0.842605 0)
(0.172398 -0.706151 0)
(0.310295 -0.414277 0)
(0.334361 -0.298918 0)
(0.325414 -0.319977 0)
(0.28588 -0.420061 0)
(0.19978 -0.751219 0)
(0.0760431 -1.07324 0)
(-0.0235459 -1.35431 0)
(-0.0809718 -1.50295 0)
(-0.11804 -1.51799 0)
(-0.160916 -1.47333 0)
(-0.196624 -1.42684 0)
(-0.217586 -1.37203 0)
(-0.221394 -1.31715 0)
(-0.153725 -1.14843 0)
(-0.114729 -0.747286 0)
(-0.105107 -0.216107 0)
(-0.114276 -0.113699 0)
(-0.0990567 -0.118609 0)
(-0.0745619 -0.136254 0)
(-0.049447 -0.154839 0)
(-0.0269607 -0.178527 0)
(-0.00706461 -0.205388 0)
(0.013115 -0.231798 0)
(0.0360031 -0.258902 0)
(0.0566048 -0.293794 0)
(0.0608919 -0.359874 0)
(0.0288094 -0.455611 0)
(0.00678709 -0.838631 0)
(0.00134093 -0.792886 0)
(0.044189 -0.770441 0)
(0.244233 -0.690907 0)
(0.389524 -0.500285 0)
(0.420961 -0.436976 0)
(0.363977 -0.438193 0)
(0.284714 -0.62555 0)
(0.171139 -0.978269 0)
(0.0508193 -1.22865 0)
(-0.0149054 -1.40636 0)
(-0.0669536 -1.4259 0)
(-0.122335 -1.3798 0)
(-0.174991 -1.33529 0)
(-0.219005 -1.29321 0)
(-0.258633 -1.27186 0)
(-0.226839 -1.14782 0)
(-0.180464 -0.810773 0)
(-0.130645 -0.27148 0)
(-0.125836 -0.120669 0)
(-0.11523 -0.118716 0)
(-0.0956477 -0.142486 0)
(-0.0754675 -0.16867 0)
(-0.0548646 -0.193604 0)
(-0.0337019 -0.219312 0)
(-0.0120806 -0.241794 0)
(0.0104538 -0.265727 0)
(0.0329406 -0.293331 0)
(0.0428803 -0.337875 0)
(0.0211964 -0.40004 0)
(0.00420265 -0.810546 0)
(0.0116464 -0.765386 0)
(0.0366492 -0.794764 0)
(0.131022 -0.772862 0)
(0.34258 -0.703241 0)
(0.473086 -0.560757 0)
(0.489954 -0.52891 0)
(0.425142 -0.606677 0)
(0.314827 -0.826175 0)
(0.162911 -1.09451 0)
(0.0718669 -1.28175 0)
(0.00202775 -1.31172 0)
(-0.0725622 -1.26802 0)
(-0.14385 -1.22249 0)
(-0.213443 -1.18683 0)
(-0.2915 -1.1735 0)
(-0.304792 -1.11288 0)
(-0.271077 -0.866408 0)
(-0.173329 -0.374351 0)
(-0.138949 -0.152763 0)
(-0.141857 -0.112067 0)
(-0.133747 -0.133102 0)
(-0.11213 -0.169685 0)
(-0.0871504 -0.197354 0)
(-0.064235 -0.224471 0)
(-0.0403714 -0.245679 0)
(-0.0156201 -0.267353 0)
(0.00614057 -0.289836 0)
(0.0173525 -0.317755 0)
(0.00973224 -0.354452 0)
(0.0111665 -0.799581 0)
(0.037724 -0.761234 0)
(0.0708099 -0.808785 0)
(0.134737 -0.836688 0)
(0.267192 -0.803222 0)
(0.463228 -0.707623 0)
(0.56943 -0.623502 0)
(0.574311 -0.657672 0)
(0.466728 -0.735903 0)
(0.324678 -0.959676 0)
(0.177344 -1.18476 0)
(0.0628871 -1.16135 0)
(-0.019158 -1.11898 0)
(-0.101518 -1.07072 0)
(-0.186797 -1.03361 0)
(-0.274539 -1.02289 0)
(-0.362517 -1.06751 0)
(-0.358624 -0.878657 0)
(-0.265138 -0.498683 0)
(-0.165645 -0.222852 0)
(-0.146073 -0.128115 0)
(-0.157413 -0.126696 0)
(-0.143414 -0.158258 0)
(-0.117114 -0.182332 0)
(-0.095246 -0.208885 0)
(-0.0727248 -0.23541 0)
(-0.0481408 -0.259496 0)
(-0.0248625 -0.278971 0)
(-0.00863011 -0.297201 0)
(-0.00151036 -0.320033 0)
(0.0215359 -0.816367 0)
(0.068565 -0.782384 0)
(0.119108 -0.822025 0)
(0.174834 -0.870837 0)
(0.251582 -0.857058 0)
(0.401564 -0.81918 0)
(0.559353 -0.727576 0)
(0.613875 -0.684169 0)
(0.567745 -0.709012 0)
(0.440193 -0.804606 0)
(0.280158 -0.979717 0)
(0.139166 -1.04545 0)
(0.038505 -1.0118 0)
(-0.0601185 -0.957115 0)
(-0.157563 -0.915945 0)
(-0.247154 -0.899081 0)
(-0.346197 -0.906744 0)
(-0.391968 -0.832053 0)
(-0.310837 -0.598027 0)
(-0.195777 -0.342537 0)
(-0.167181 -0.213599 0)
(-0.158725 -0.181412 0)
(-0.134865 -0.194608 0)
(-0.114325 -0.207012 0)
(-0.101792 -0.222399 0)
(-0.0875771 -0.242632 0)
(-0.0702291 -0.26255 0)
(-0.0503602 -0.278491 0)
(-0.0296518 -0.290192 0)
(-0.0100211 -0.303071 0)
(0.0310573 -0.84884 0)
(0.0958226 -0.814965 0)
(0.161556 -0.84094 0)
(0.214856 -0.881749 0)
(0.268103 -0.887996 0)
(0.34619 -0.861952 0)
(0.472539 -0.800674 0)
(0.567679 -0.716081 0)
(0.568676 -0.684238 0)
(0.471621 -0.700545 0)
(0.343037 -0.8018 0)
(0.203708 -0.854883 0)
(0.0840735 -0.823525 0)
(-0.0183627 -0.772496 0)
(-0.110975 -0.737671 0)
(-0.197594 -0.728543 0)
(-0.289588 -0.74532 0)
(-0.367822 -0.751209 0)
(-0.34546 -0.669875 0)
(-0.258256 -0.498048 0)
(-0.211801 -0.343475 0)
(-0.177391 -0.269744 0)
(-0.137282 -0.262979 0)
(-0.108397 -0.263163 0)
(-0.0940329 -0.266203 0)
(-0.0842567 -0.275748 0)
(-0.0741157 -0.29012 0)
(-0.0592528 -0.303052 0)
(-0.0372784 -0.310161 0)
(-0.0123788 -0.315676 0)
(0.0388762 -0.889786 0)
(0.117005 -0.855894 0)
(0.192327 -0.864832 0)
(0.245315 -0.880271 0)
(0.277862 -0.881906 0)
(0.306443 -0.863082 0)
(0.35817 -0.813315 0)
(0.434003 -0.727932 0)
(0.458602 -0.64087 0)
(0.414644 -0.619973 0)
(0.319536 -0.663913 0)
(0.198581 -0.69426 0)
(0.0856186 -0.672983 0)
(-0.00465472 -0.638558 0)
(-0.0780929 -0.617163 0)
(-0.143279 -0.613475 0)
(-0.212551 -0.627021 0)
(-0.288545 -0.651234 0)
(-0.340179 -0.657631 0)
(-0.322928 -0.59837 0)
(-0.268661 -0.472642 0)
(-0.215471 -0.373522 0)
(-0.159053 -0.328929 0)
(-0.117825 -0.310042 0)
(-0.0987367 -0.29844 0)
(-0.0918319 -0.304871 0)
(-0.0844314 -0.322253 0)
(-0.0680788 -0.341548 0)
(-0.0430555 -0.357078 0)
(-0.0144934 -0.37104 0)
(0.0449014 -0.931948 0)
(0.132521 -0.895429 0)
(0.207238 -0.883166 0)
(0.249868 -0.867834 0)
(0.264583 -0.84647 0)
(0.260758 -0.816131 0)
(0.257132 -0.776745 0)
(0.274886 -0.703826 0)
(0.298785 -0.605343 0)
(0.286311 -0.546883 0)
(0.224524 -0.549279 0)
(0.136741 -0.569969 0)
(0.0519754 -0.568075 0)
(-0.0142349 -0.557005 0)
(-0.0645049 -0.551121 0)
(-0.106816 -0.551869 0)
(-0.150677 -0.558089 0)
(-0.205723 -0.572461 0)
(-0.270925 -0.588847 0)
(-0.318179 -0.590809 0)
(-0.31252 -0.540831 0)
(-0.259843 -0.463021 0)
(-0.19286 -0.398377 0)
(-0.142707 -0.356598 0)
(-0.116481 -0.311101 0)
(-0.113706 -0.312223 0)
(-0.109948 -0.340834 0)
(-0.0940786 -0.380549 0)
(-0.0682895 -0.427284 0)
(-0.0269592 -0.49093 0)
(0.0520273 -0.97115 0)
(0.141463 -0.925972 0)
(0.196936 -0.879589 0)
(0.218934 -0.833709 0)
(0.216775 -0.790355 0)
(0.197637 -0.743371 0)
(0.166 -0.695 0)
(0.13944 -0.640554 0)
(0.133529 -0.563067 0)
(0.127431 -0.487333 0)
(0.101011 -0.471979 0)
(0.0569437 -0.495359 0)
(0.00961244 -0.511281 0)
(-0.0298917 -0.516758 0)
(-0.0606423 -0.519224 0)
(-0.0867961 -0.520422 0)
(-0.112921 -0.519865 0)
(-0.145583 -0.518593 0)
(-0.191638 -0.518965 0)
(-0.247718 -0.527431 0)
(-0.283127 -0.526344 0)
(-0.270026 -0.495852 0)
(-0.225318 -0.457508 0)
(-0.169944 -0.412383 0)
(-0.143637 -0.335034 0)
(-0.152657 -0.306079 0)
(-0.162333 -0.344449 0)
(-0.161545 -0.399498 0)
(-0.15593 -0.465901 0)
(-0.0773074 -0.655201 0)
(0.059419 -1.00364 0)
(0.133227 -0.926855 0)
(0.151773 -0.843393 0)
(0.151539 -0.777187 0)
(0.138075 -0.721997 0)
(0.113892 -0.664859 0)
(0.0805854 -0.609827 0)
(0.0436178 -0.563485 0)
(0.0153125 -0.514615 0)
(0.00413353 -0.45713 0)
(0.00166837 -0.44256 0)
(-0.00660941 -0.463461 0)
(-0.0227953 -0.48188 0)
(-0.040953 -0.491053 0)
(-0.0578243 -0.49466 0)
(-0.073855 -0.494307 0)
(-0.0901759 -0.490331 0)
(-0.108665 -0.481544 0)
(-0.133877 -0.468346 0)
(-0.172826 -0.462395 0)
(-0.219546 -0.473 0)
(-0.242788 -0.482724 0)
(-0.228901 -0.482515 0)
(-0.199509 -0.4612 0)
(-0.177906 -0.393559 0)
(-0.193077 -0.305161 0)
(-0.222619 -0.332635 0)
(-0.229311 -0.375978 0)
(-0.229345 -0.522145 0)
(-0.13624 -0.895612 0)
(0.0512127 -1.03033 0)
(0.0893714 -0.879136 0)
(0.0744115 -0.777861 0)
(0.0617652 -0.709302 0)
(0.0458814 -0.65175 0)
(0.0258338 -0.595997 0)
(0.00346545 -0.546991 0)
(-0.0206405 -0.512295 0)
(-0.0439417 -0.485163 0)
(-0.0534781 -0.453456 0)
(-0.0467571 -0.442424 0)
(-0.039626 -0.451907 0)
(-0.0404565 -0.462372 0)
(-0.0463526 -0.468089 0)
(-0.0543111 -0.469821 0)
(-0.0634127 -0.467988 0)
(-0.0734836 -0.462957 0)
(-0.0844421 -0.453079 0)
(-0.0973241 -0.436472 0)
(-0.117869 -0.417974 0)
(-0.154074 -0.414425 0)
(-0.195617 -0.43581 0)
(-0.214795 -0.47094 0)
(-0.216393 -0.472329 0)
(-0.210668 -0.443022 0)
(-0.222204 -0.318639 0)
(-0.242613 -0.324841 0)
(-0.257953 -0.409477 0)
(-0.281148 -0.738485 0)
(-0.159346 -1.41673 0)
(0.0194309 -1.01396 0)
(0.0163291 -0.799377 0)
(-0.0120897 -0.701479 0)
(-0.0261367 -0.646627 0)
(-0.0352167 -0.598287 0)
(-0.0445133 -0.553121 0)
(-0.0532637 -0.516635 0)
(-0.0610903 -0.49285 0)
(-0.0677296 -0.475539 0)
(-0.067583 -0.456441 0)
(-0.05929 -0.446042 0)
(-0.0510714 -0.445994 0)
(-0.04753 -0.448153 0)
(-0.0476272 -0.449346 0)
(-0.0497971 -0.448416 0)
(-0.0535684 -0.4449 0)
(-0.0587624 -0.439125 0)
(-0.065002 -0.42978 0)
(-0.0721471 -0.414445 0)
(-0.0823407 -0.392881 0)
(-0.102728 -0.373258 0)
(-0.140007 -0.377249 0)
(-0.184741 -0.420896 0)
(-0.213895 -0.446246 0)
(-0.228127 -0.432297 0)
(-0.257382 -0.350393 0)
(-0.316822 -0.395 0)
(-0.343243 -0.659629 0)
(-0.186776 -1.05977 0)
(-0.0116827 -1.32381 0)
(-0.0106184 -0.949471 0)
(-0.0461608 -0.718179 0)
(-0.0785768 -0.640523 0)
(-0.0870597 -0.610103 0)
(-0.0866444 -0.574807 0)
(-0.0844118 -0.540552 0)
(-0.0800356 -0.511422 0)
(-0.0752337 -0.49 0)
(-0.0712857 -0.472543 0)
(-0.0663844 -0.456365 0)
(-0.0596857 -0.445419 0)
(-0.0533478 -0.440095 0)
(-0.0487941 -0.437069 0)
(-0.0458153 -0.434683 0)
(-0.043778 -0.431182 0)
(-0.0431615 -0.425527 0)
(-0.0444559 -0.418553 0)
(-0.0471813 -0.409618 0)
(-0.0511265 -0.396045 0)
(-0.0571219 -0.376053 0)
(-0.0677712 -0.350925 0)
(-0.0899052 -0.333607 0)
(-0.134609 -0.350541 0)
(-0.185092 -0.385655 0)
(-0.240863 -0.379156 0)
(-0.333931 -0.3755 0)
(-0.40771 -0.597224 0)
(-0.266464 -0.924592 0)
(-0.0713414 -1.06513 0)
(-0.0365849 -1.22952 0)
(-0.0266584 -0.869027 0)
(-0.0784495 -0.660879 0)
(-0.10869 -0.616359 0)
(-0.109833 -0.602245 0)
(-0.102136 -0.573873 0)
(-0.0920149 -0.54475 0)
(-0.0807827 -0.516187 0)
(-0.0717506 -0.491276 0)
(-0.0661134 -0.470691 0)
(-0.0618512 -0.453799 0)
(-0.0573401 -0.441502 0)
(-0.0523686 -0.433038 0)
(-0.0471688 -0.427114 0)
(-0.0418964 -0.422336 0)
(-0.0367257 -0.417087 0)
(-0.0321641 -0.409285 0)
(-0.0297256 -0.4001 0)
(-0.02971 -0.390865 0)
(-0.031417 -0.37875 0)
(-0.0353421 -0.361291 0)
(-0.04235 -0.336938 0)
(-0.054331 -0.311868 0)
(-0.08006 -0.29751 0)
(-0.127845 -0.306292 0)
(-0.188236 -0.299842 0)
(-0.249941 -0.351006 0)
(-0.279043 -0.700504 0)
(-0.12494 -0.943765 0)
(-0.0650911 -1.02347 0)
(-0.0543942 -1.18481 0)
(-0.0373449 -0.785775 0)
(-0.0858795 -0.648753 0)
(-0.0963302 -0.620647 0)
(-0.0931069 -0.6048 0)
(-0.0872235 -0.578137 0)
(-0.0774868 -0.550377 0)
(-0.0678949 -0.521198 0)
(-0.0606357 -0.491511 0)
(-0.0570525 -0.467469 0)
(-0.0554136 -0.448414 0)
(-0.0535039 -0.434738 0)
(-0.0499967 -0.424978 0)
(-0.0442766 -0.417813 0)
(-0.0369443 -0.412089 0)
(-0.0288967 -0.406341 0)
(-0.0206712 -0.397074 0)
(-0.0139587 -0.383932 0)
(-0.0112988 -0.372282 0)
(-0.0123609 -0.36118 0)
(-0.0154514 -0.346764 0)
(-0.0201874 -0.325634 0)
(-0.0265161 -0.300861 0)
(-0.0350991 -0.274645 0)
(-0.0528416 -0.253661 0)
(-0.0745904 -0.232455 0)
(-0.0899921 -0.299962 0)
(-0.111164 -0.681213 0)
(-0.0562582 -0.931179 0)
(-0.00491545 -0.951404 0)
(-0.00382313 -1.13258 0)
(-0.0370591 -0.717147 0)
(-0.0613483 -0.674402 0)
(-0.0460196 -0.630007 0)
(-0.0488825 -0.601843 0)
(-0.0541869 -0.576726 0)
(-0.052035 -0.55183 0)
(-0.0489787 -0.524085 0)
(-0.0461547 -0.490883 0)
(-0.0450387 -0.461163 0)
(-0.0471602 -0.439011 0)
(-0.048972 -0.424114 0)
(-0.0480729 -0.414366 0)
(-0.0428051 -0.40841 0)
(-0.0331453 -0.403986 0)
(-0.0207952 -0.400096 0)
(-0.00726253 -0.39059 0)
(0.00471802 -0.372179 0)
(0.00953806 -0.353625 0)
(0.00682419 -0.341436 0)
(0.00183129 -0.33047 0)
(-0.00187408 -0.315133 0)
(-0.00290282 -0.294089 0)
(-0.000234292 -0.270685 0)
(0.00720814 -0.243981 0)
(0.0187922 -0.220219 0)
(0.0259224 -0.286064 0)
(0.0172995 -0.655533 0)
(0.0266662 -0.956894 0)
(0.0554001 -0.959799 0)
(0.0313675 -0.966555 0)
(-0.0325822 -0.688137 0)
(-0.0227361 -0.721395 0)
(0.0181183 -0.634591 0)
(0.0069651 -0.594456 0)
(-0.0108838 -0.56591 0)
(-0.021381 -0.541952 0)
(-0.024033 -0.513804 0)
(-0.0255225 -0.483483 0)
(-0.0294539 -0.449722 0)
(-0.0369145 -0.424257 0)
(-0.0444754 -0.408114 0)
(-0.0488034 -0.399278 0)
(-0.0469681 -0.39666 0)
(-0.0354599 -0.397275 0)
(-0.0157118 -0.398527 0)
(0.00871658 -0.392274 0)
(0.0297162 -0.365766 0)
(0.0356839 -0.335416 0)
(0.02815 -0.318769 0)
(0.0171774 -0.309773 0)
(0.0110931 -0.302547 0)
(0.0128377 -0.290322 0)
(0.0223702 -0.276266 0)
(0.0429029 -0.261084 0)
(0.0757551 -0.249586 0)
(0.0989229 -0.313055 0)
(0.112632 -0.643264 0)
(0.114642 -0.883288 0)
(0.0943282 -0.858204 0)
(0.0413682 -0.837392 0)
(-0.0226089 -0.698249 0)
(0.0198841 -0.803813 0)
(0.0762856 -0.633148 0)
(0.0578824 -0.58525 0)
(0.0371081 -0.554603 0)
(0.019757 -0.528497 0)
(0.00962457 -0.495408 0)
(0.000831814 -0.464624 0)
(-0.0105507 -0.430187 0)
(-0.0242758 -0.402548 0)
(-0.039323 -0.384935 0)
(-0.0523602 -0.376611 0)
(-0.058891 -0.377393 0)
(-0.0507147 -0.386616 0)
(-0.0214186 -0.39406 0)
(0.0275323 -0.401461 0)
(0.0662525 -0.358601 0)
(0.0688268 -0.315832 0)
(0.0521024 -0.294661 0)
(0.0321743 -0.285523 0)
(0.0183189 -0.285732 0)
(0.0175544 -0.286289 0)
(0.0289574 -0.286037 0)
(0.0533343 -0.28751 0)
(0.0951379 -0.300434 0)
(0.138268 -0.373255 0)
(0.162547 -0.637509 0)
(0.144427 -0.794452 0)
(0.107438 -0.744381 0)
(0.0461599 -0.646987 0)
(-0.0163136 -0.725183 0)
(0.0243912 -0.878772 0)
(0.0654397 -0.617287 0)
(0.0517099 -0.568285 0)
(0.044781 -0.554179 0)
(0.0448947 -0.538847 0)
(0.0392822 -0.505642 0)
(0.0297018 -0.468773 0)
(0.0146365 -0.425099 0)
(-0.00554009 -0.38523 0)
(-0.0288821 -0.361708 0)
(-0.0514312 -0.35434 0)
(-0.0629065 -0.367019 0)
(-0.046732 -0.394762 0)
(-0.0119685 -0.426962 0)
(0.0339568 -0.463349 0)
(0.0792478 -0.379771 0)
(0.0919792 -0.29543 0)
(0.0733147 -0.265527 0)
(0.0448009 -0.258363 0)
(0.0204755 -0.265253 0)
(0.0112515 -0.277912 0)
(0.018087 -0.29295 0)
(0.0356579 -0.308291 0)
(0.069288 -0.349578 0)
(0.11779 -0.4405 0)
(0.153572 -0.654811 0)
(0.130329 -0.73327 0)
(0.0857648 -0.693539 0)
(0.0373337 -0.551653 0)
(-0.0202709 -0.989108 0)
(-0.000693306 -1.13045 0)
(0.0456162 -0.808767 0)
(0.0576948 -0.701208 0)
(0.059781 -0.694392 0)
(0.0553361 -0.635819 0)
(0.0466855 -0.560515 0)
(0.0367926 -0.492179 0)
(0.0252881 -0.426447 0)
(0.00883226 -0.371915 0)
(-0.0143053 -0.34611 0)
(-0.0410571 -0.347473 0)
(-0.0661266 -0.413375 0)
(-0.06753 -0.588153 0)
(-0.0157124 -0.754929 0)
(0.0751041 -0.858935 0)
(0.123616 -0.538712 0)
(0.0950651 -0.290279 0)
(0.0688886 -0.250278 0)
(0.0406346 -0.247664 0)
(0.0143108 -0.266488 0)
(0.000106376 -0.289038 0)
(-0.000190899 -0.312072 0)
(0.00516279 -0.334109 0)
(0.022157 -0.397525 0)
(0.0714548 -0.519405 0)
(0.128419 -0.715282 0)
(0.110227 -0.742512 0)
(0.0880007 -0.750575 0)
(0.0498819 -0.552421 0)
(-0.0212804 -1.00829 0)
(-0.101173 -1.06249 0)
(-0.104523 -0.880697 0)
(-0.0555709 -0.833335 0)
(-0.0359377 -0.822521 0)
(-0.0249963 -0.799378 0)
(-0.00838463 -0.748435 0)
(0.00647986 -0.678936 0)
(0.0169609 -0.588772 0)
(0.012044 -0.500931 0)
(-0.00674266 -0.472224 0)
(-0.0244625 -0.525878 0)
(-0.0284859 -0.694818 0)
(-0.00865464 -0.936839 0)
(0.026851 -1.15357 0)
(0.0633559 -1.21774 0)
(0.0955755 -0.886862 0)
(0.0997167 -0.467731 0)
(0.0701397 -0.288577 0)
(0.0344551 -0.254229 0)
(0.0100623 -0.281942 0)
(-0.000391529 -0.313527 0)
(-0.00122923 -0.343987 0)
(0.00216772 -0.37561 0)
(0.0192618 -0.47162 0)
(0.0689629 -0.645251 0)
(0.110746 -0.785188 0)
(0.0898118 -0.736067 0)
(0.0739787 -0.76725 0)
(0.034582 -0.559854 0)
(-0.00780337 -0.905222 0)
(-0.0978052 -0.908495 0)
(-0.126231 -0.761284 0)
(-0.10745 -0.700333 0)
(-0.0959987 -0.675318 0)
(-0.0896589 -0.647935 0)
(-0.0789757 -0.613903 0)
(-0.0657179 -0.57405 0)
(-0.0443343 -0.52737 0)
(-0.0147217 -0.484147 0)
(0.0174993 -0.481336 0)
(0.0474336 -0.54641 0)
(0.0582237 -0.694815 0)
(0.0559691 -0.872226 0)
(0.0406658 -0.997392 0)
(0.00734261 -1.00922 0)
(-0.0310045 -0.833022 0)
(-0.0433117 -0.559895 0)
(-0.024004 -0.412928 0)
(-0.0112236 -0.381404 0)
(-0.00582675 -0.412202 0)
(0.0045573 -0.451284 0)
(0.0143482 -0.495342 0)
(0.0243821 -0.556807 0)
(0.0455259 -0.671151 0)
(0.0757894 -0.85638 0)
(0.0899535 -0.962763 0)
(0.0902927 -0.901857 0)
(0.0934595 -0.91398 0)
(0.0394295 -0.667491 0)
(-0.00213656 -0.927014 0)
(-0.0679116 -0.886666 0)
(-0.0933137 -0.78035 0)
(-0.0934124 -0.718234 0)
(-0.0924141 -0.677737 0)
(-0.0908343 -0.639182 0)
(-0.0836334 -0.59715 0)
(-0.0664728 -0.553412 0)
(-0.0385222 -0.512397 0)
(-0.0038734 -0.488388 0)
(0.0332424 -0.505182 0)
(0.0643115 -0.577967 0)
(0.0780395 -0.699486 0)
(0.0667573 -0.829502 0)
(0.0285238 -0.914033 0)
(-0.0289737 -0.905192 0)
(-0.0823628 -0.771627 0)
(-0.102243 -0.571095 0)
(-0.0942064 -0.418983 0)
(-0.0650343 -0.350285 0)
(-0.0272076 -0.348072 0)
(0.00982632 -0.370842 0)
(0.0389496 -0.40859 0)
(0.0635036 -0.470216 0)
(0.0882693 -0.567105 0)
(0.0977666 -0.700626 0)
(0.079813 -0.791533 0)
(0.0659508 -0.800081 0)
(0.0580971 -0.831552 0)
(0.0244898 -0.733751 0)
(-0.012332 -0.924114 0)
(-0.0631631 -0.865668 0)
(-0.0869769 -0.785336 0)
(-0.0925944 -0.727815 0)
(-0.0924367 -0.683806 0)
(-0.0880247 -0.644368 0)
(-0.0773895 -0.60582 0)
(-0.0580381 -0.570071 0)
(-0.029947 -0.54405 0)
(0.00352923 -0.537424 0)
(0.0369928 -0.562332 0)
(0.0622942 -0.624119 0)
(0.069452 -0.713194 0)
(0.051461 -0.802566 0)
(0.00871898 -0.853812 0)
(-0.0480156 -0.837971 0)
(-0.0983053 -0.743779 0)
(-0.121055 -0.607156 0)
(-0.115097 -0.487221 0)
(-0.0879258 -0.41121 0)
(-0.0482374 -0.383243 0)
(-0.0066719 -0.38903 0)
(0.0295771 -0.420755 0)
(0.0602356 -0.474312 0)
(0.0836128 -0.554495 0)
(0.0860319 -0.647928 0)
(0.0676225 -0.711315 0)
(0.0592468 -0.716162 0)
(0.0522784 -0.690817 0)
(0.00274721 -0.569341 0)
(-0.0169516 -0.902013 0)
(-0.0628832 -0.839728 0)
(-0.0830526 -0.773832 0)
(-0.0901353 -0.723358 0)
(-0.0896067 -0.682472 0)
(-0.0831858 -0.646971 0)
(-0.0706112 -0.615331 0)
(-0.051058 -0.589438 0)
(-0.0249826 -0.574243 0)
(0.00455586 -0.576319 0)
(0.0320105 -0.601215 0)
(0.0499277 -0.649308 0)
(0.0506809 -0.711704 0)
(0.0296295 -0.768956 0)
(-0.0103461 -0.797669 0)
(-0.0595945 -0.780488 0)
(-0.102308 -0.714049 0)
(-0.123609 -0.619011 0)
(-0.120236 -0.527832 0)
(-0.0971339 -0.461347 0)
(-0.0616854 -0.427822 0)
(-0.0220924 -0.42417 0)
(0.0148084 -0.446253 0)
(0.0453844 -0.489678 0)
(0.0655071 -0.55197 0)
(0.0674776 -0.619665 0)
(0.0517504 -0.666678 0)
(0.0344909 -0.6772 0)
(0.0160073 -0.670227 0)
(-0.0199409 -0.594054 0)
(-0.0250721 -0.859655 0)
(-0.0619809 -0.814742 0)
(-0.0779054 -0.762712 0)
(-0.0844876 -0.720179 0)
(-0.0834648 -0.684164 0)
(-0.0762631 -0.653272 0)
(-0.0634536 -0.627396 0)
(-0.045233 -0.60823 0)
(-0.0226665 -0.599074 0)
(0.00132026 -0.603864 0)
(0.0218568 -0.624939 0)
(0.0329421 -0.660531 0)
(0.029202 -0.702833 0)
(0.00846906 -0.738537 0)
(-0.0261663 -0.753019 0)
(-0.066638 -0.736199 0)
(-0.101284 -0.687419 0)
(-0.11968 -0.619067 0)
(-0.118374 -0.550296 0)
(-0.100046 -0.495813 0)
(-0.070208 -0.463821 0)
(-0.0353454 -0.45548 0)
(-0.00146181 -0.469 0)
(0.0267788 -0.500758 0)
(0.0449667 -0.546176 0)
(0.0482595 -0.595075 0)
(0.0376253 -0.632112 0)
(0.0218749 -0.648103 0)
(0.00416513 -0.650313 0)
(-0.0161896 -0.619963 0)
(-0.0279493 -0.823922 0)
(-0.0572956 -0.794444 0)
(-0.0707045 -0.754177 0)
(-0.0766886 -0.719035 0)
(-0.0755416 -0.68835 0)
(-0.0686031 -0.662055 0)
(-0.0568627 -0.640788 0)
(-0.0411372 -0.626005 0)
(-0.0228488 -0.619828 0)
(-0.00466271 -0.624341 0)
(0.00949988 -0.640133 0)
(0.0152302 -0.664803 0)
(0.00906291 -0.692179 0)
(-0.00979618 -0.713212 0)
(-0.0384401 -0.718754 0)
(-0.0705694 -0.702916 0)
(-0.0978422 -0.665921 0)
(-0.112964 -0.615459 0)
(-0.112953 -0.563433 0)
(-0.0988809 -0.519855 0)
(-0.0746974 -0.491742 0)
(-0.0454042 -0.48144 0)
(-0.0160933 -0.488543 0)
(0.00877975 -0.510372 0)
(0.0252821 -0.542529 0)
(0.0304539 -0.57755 0)
(0.0250392 -0.606106 0)
(0.0144788 -0.622389 0)
(0.00289825 -0.628389 0)
(-0.0109538 -0.61317 0)
(-0.0261946 -0.790504 0)
(-0.0505884 -0.776098 0)
(-0.0629563 -0.746545 0)
(-0.0682489 -0.718095 0)
(-0.0673952 -0.6926 0)
(-0.0614591 -0.670565 0)
(-0.0515963 -0.65296 0)
(-0.0389262 -0.64099 0)
(-0.0249708 -0.635964 0)
(-0.0120069 -0.638819 0)
(-0.00301114 -0.649251 0)
(-0.00102784 -0.664933 0)
(-0.00815223 -0.681279 0)
(-0.0244392 -0.692249 0)
(-0.0473935 -0.692117 0)
(-0.0722951 -0.67746 0)
(-0.0932676 -0.648753 0)
(-0.105208 -0.610859 0)
(-0.105675 -0.57126 0)
(-0.0950512 -0.537045 0)
(-0.0759206 -0.513426 0)
(-0.0520546 -0.502927 0)
(-0.0275391 -0.505757 0)
(-0.00616442 -0.52008 0)
(0.0088721 -0.542412 0)
(0.0155675 -0.567499 0)
(0.0144596 -0.589481 0)
(0.00897314 -0.60463 0)
(0.00290392 -0.613206 0)
(-0.00591624 -0.605499 0)
(-0.022618 -0.758444 0)
(-0.0434614 -0.758478 0)
(-0.0547358 -0.738178 0)
(-0.0599285 -0.716445 0)
(-0.059801 -0.695726 0)
(-0.0553518 -0.677389 0)
(-0.0477631 -0.662583 0)
(-0.0382342 -0.652314 0)
(-0.0282113 -0.647372 0)
(-0.0195421 -0.648059 0)
(-0.0144156 -0.653719 0)
(-0.0148047 -0.662373 0)
(-0.0219175 -0.670749 0)
(-0.0354572 -0.674876 0)
(-0.0534109 -0.671192 0)
(-0.0723296 -0.657725 0)
(-0.0881005 -0.63497 0)
(-0.0971576 -0.60607 0)
(-0.097599 -0.575823 0)
(-0.0894735 -0.549115 0)
(-0.0744717 -0.529765 0)
(-0.0553165 -0.519954 0)
(-0.0351485 -0.52012 0)
(-0.0169883 -0.529083 0)
(-0.00333402 -0.544342 0)
(0.00435992 -0.562359 0)
(0.0063882 -0.57946 0)
(0.00484163 -0.593231 0)
(0.00266806 -0.603532 0)
(-0.00252464 -0.601062 0)
(-0.0187268 -0.730419 0)
(-0.0368896 -0.742208 0)
(-0.0469876 -0.730049 0)
(-0.0522542 -0.713875 0)
(-0.0530767 -0.69728 0)
(-0.050314 -0.682019 0)
(-0.0450613 -0.669297 0)
(-0.0384508 -0.659978 0)
(-0.0317528 -0.654566 0)
(-0.026418 -0.653064 0)
(-0.0239846 -0.654776 0)
(-0.0257234 -0.658148 0)
(-0.032256 -0.660897 0)
(-0.0431685 -0.660452 0)
(-0.0569011 -0.654617 0)
(-0.0709764 -0.642269 0)
(-0.0825294 -0.623853 0)
(-0.0890726 -0.601432 0)
(-0.0891809 -0.578142 0)
(-0.0827583 -0.557299 0)
(-0.0709009 -0.541652 0)
(-0.0555356 -0.532909 0)
(-0.0389962 -0.531547 0)
(-0.0235917 -0.536854 0)
(-0.0112308 -0.547154 0)
(-0.00303003 -0.560165 0)
(0.00105852 -0.573656 0)
(0.00223614 -0.585773 0)
(0.00266689 -0.596382 0)
(-0.000507078 -0.595539 0)
(-0.015125 -0.706538 0)
(-0.0312182 -0.727579 0)
(-0.0401024 -0.721961 0)
(-0.0454871 -0.710303 0)
(-0.0472568 -0.69715 0)
(-0.0461282 -0.684379 0)
(-0.0430332 -0.673193 0)
(-0.0389489 -0.664366 0)
(-0.0349221 -0.65827 0)
(-0.0320557 -0.654822 0)
(-0.0314077 -0.65342 0)
(-0.0337763 -0.652925 0)
(-0.0394494 -0.651786 0)
(-0.0480033 -0.648352 0)
(-0.0582651 -0.641284 0)
(-0.0684785 -0.629962 0)
(-0.0766565 -0.614763 0)
(-0.0810688 -0.597061 0)
(-0.0806789 -0.578922 0)
(-0.0753445 -0.562595 0)
(-0.065773 -0.550012 0)
(-0.0533111 -0.542448 0)
(-0.0396528 -0.54034 0)
(-0.026517 -0.543289 0)
(-0.0153441 -0.550236 0)
(-0.00702601 -0.559736 0)
(-0.00170942 -0.570392 0)
(0.00117934 -0.580834 0)
(0.00328846 -0.59055 0)
(0.00119887 -0.588022 0)
(-0.0122004 -0.685899 0)
(-0.0261746 -0.714598 0)
(-0.0340978 -0.713836 0)
(-0.0395613 -0.705826 0)
(-0.0421627 -0.695442 0)
(-0.0424702 -0.684633 0)
(-0.0412254 -0.674574 0)
(-0.0392141 -0.665983 0)
(-0.0372524 -0.659189 0)
(-0.0361515 -0.654132 0)
(-0.0366302 -0.650371 0)
(-0.0391774 -0.647112 0)
(-0.0439021 -0.643334 0)
(-0.0504289 -0.637995 0)
(-0.0578966 -0.630288 0)
(-0.0650757 -0.619895 0)
(-0.0705923 -0.607126 0)
(-0.0732468 -0.592904 0)
(-0.0723036 -0.578598 0)
(-0.0676257 -0.565725 0)
(-0.0596714 -0.555627 0)
(-0.0493736 -0.54923 0)
(-0.0379444 -0.5469 0)
(-0.0266443 -0.548445 0)
(-0.0165585 -0.55322 0)
(-0.00841424 -0.560313 0)
(-0.00252003 -0.568732 0)
(0.00142303 -0.577586 0)
(0.00444142 -0.585603 0)
(0.00293089 -0.579366 0)
(-0.0096811 -0.668233 0)
(-0.0217483 -0.702991 0)
(-0.0288637 -0.705823 0)
(-0.0343066 -0.700611 0)
(-0.0375653 -0.692369 0)
(-0.0390437 -0.68306 0)
(-0.039295 -0.673821 0)
(-0.038912 -0.665334 0)
(-0.0384981 -0.657929 0)
(-0.0386288 -0.651615 0)
(-0.0397837 -0.646117 0)
(-0.0422573 -0.640926 0)
(-0.0460701 -0.635395 0)
(-0.0509169 -0.628883 0)
(-0.056183 -0.620916 0)
(-0.0610163 -0.611348 0)
(-0.064471 -0.60046 0)
(-0.065721 -0.588845 0)
(-0.0642553 -0.577418 0)
(-0.0599658 -0.567201 0)
(-0.0531525 -0.559118 0)
(-0.0444591 -0.553829 0)
(-0.0347455 -0.55163 0)
(-0.0249284 -0.552442 0)
(-0.0158256 -0.555878 0)
(-0.00804141 -0.561338 0)
(-0.0019326 -0.568103 0)
(0.00248164 -0.575306 0)
(0.00584604 -0.581014 0)
(0.00446569 -0.569925 0)
(-0.0074964 -0.65328 0)
(-0.0178909 -0.692615 0)
(-0.0242712 -0.698003 0)
(-0.0295841 -0.694838 0)
(-0.0332989 -0.688185 0)
(-0.0356632 -0.679983 0)
(-0.0370574 -0.671324 0)
(-0.0379018 -0.662871 0)
(-0.0386139 -0.654973 0)
(-0.0395838 -0.647719 0)
(-0.0411236 -0.640983 0)
(-0.0434071 -0.634472 0)
(-0.0464173 -0.627807 0)
(-0.0499213 -0.620611 0)
(-0.0534908 -0.612608 0)
(-0.0565437 -0.603792 0)
(-0.0584375 -0.594375 0)
(-0.0586064 -0.584761 0)
(-0.0567091 -0.575535 0)
(-0.0526691 -0.567394 0)
(-0.0466862 -0.56097 0)
(-0.0392048 -0.556725 0)
(-0.0308319 -0.554886 0)
(-0.0222319 -0.555427 0)
(-0.0140226 -0.558095 0)
(-0.00670975 -0.56245 0)
(-0.000684643 -0.567877 0)
(0.00383484 -0.573447 0)
(0.00728017 -0.576476 0)
(0.00572708 -0.559288 0)
(-0.00565066 -0.640653 0)
(-0.0145606 -0.683347 0)
(-0.0202413 -0.690448 0)
(-0.0253229 -0.688692 0)
(-0.0292963 -0.683148 0)
(-0.0322737 -0.675718 0)
(-0.0344821 -0.667441 0)
(-0.0362091 -0.658973 0)
(-0.0377119 -0.650696 0)
(-0.0392358 -0.642761 0)
(-0.0409772 -0.635166 0)
(-0.0430356 -0.627781 0)
(-0.0453839 -0.620413 0)
(-0.0478525 -0.612859 0)
(-0.0501451 -0.604978 0)
(-0.0518631 -0.596829 0)
(-0.0526218 -0.588599 0)
(-0.0519978 -0.580547 0)
(-0.0497924 -0.573045 0)
(-0.0459514 -0.566567 0)
(-0.0406123 -0.56154 0)
(-0.0340838 -0.558281 0)
(-0.0267949 -0.556948 0)
(-0.0192271 -0.557521 0)
(-0.01185 -0.559804 0)
(-0.00508857 -0.563419 0)
(0.000655565 -0.567757 0)
(0.00504282 -0.571716 0)
(0.00836627 -0.571891 0)
(0.006708 -0.547589 0)
(-0.0041524 -0.630092 0)
(-0.0117477 -0.675102 0)
(-0.016754 -0.683222 0)
(-0.0215188 -0.682347 0)
(-0.0255825 -0.677497 0)
(-0.0289385 -0.670548 0)
(-0.0316974 -0.662491 0)
(-0.0339739 -0.653949 0)
(-0.036007 -0.645379 0)
(-0.0378745 -0.636961 0)
(-0.0397012 -0.62879 0)
(-0.0415387 -0.620845 0)
(-0.0433655 -0.613068 0)
(-0.0450623 -0.605375 0)
(-0.0464265 -0.597714 0)
(-0.0472283 -0.590113 0)
(-0.0471248 -0.582921 0)
(-0.0459604 -0.576117 0)
(-0.043573 -0.57 0)
(-0.0399291 -0.564891 0)
(-0.0351286 -0.561071 0)
(-0.0293897 -0.558743 0)
(-0.0230175 -0.558 0)
(-0.0163637 -0.558799 0)
(-0.00978849 -0.56095 0)
(-0.0036492 -0.56408 0)
(0.00166782 -0.567515 0)
(0.00575627 -0.569946 0)
(0.00880697 -0.567238 0)
(0.00709968 -0.535341 0)
(-0.00302069 -0.621116 0)
(-0.00945703 -0.667761 0)
(-0.0138205 -0.676375 0)
(-0.018213 -0.675932 0)
(-0.0222286 -0.671426 0)
(-0.0257679 -0.664706 0)
(-0.0288384 -0.656728 0)
(-0.0315071 -0.64808 0)
(-0.0337716 -0.63925 0)
(-0.0358098 -0.630477 0)
(-0.0376444 -0.621929 0)
(-0.0392765 -0.613644 0)
(-0.0406995 -0.605658 0)
(-0.0418332 -0.597969 0)
(-0.0425487 -0.590547 0)
(-0.0426501 -0.583605 0)
(-0.0420065 -0.577189 0)
(-0.0405106 -0.571396 0)
(-0.0380543 -0.566423 0)
(-0.0346268 -0.562469 0)
(-0.0303076 -0.559708 0)
(-0.0252561 -0.558257 0)
(-0.0196938 -0.558143 0)
(-0.0138811 -0.559287 0)
(-0.00809741 -0.561475 0)
(-0.00264305 -0.5643 0)
(0.00213241 -0.567006 0)
(0.0058177 -0.568022 0)
(0.00847481 -0.562577 0)
(0.00676247 -0.523245 0)
(-0.00225814 -0.613553 0)
(-0.00771528 -0.661238 0)
(-0.0114777 -0.669929 0)
(-0.015468 -0.669554 0)
(-0.0193247 -0.665099 0)
(-0.0228823 -0.658386 0)
(-0.0260777 -0.650342 0)
(-0.028885 -0.641569 0)
(-0.0313204 -0.632497 0)
(-0.0333951 -0.623437 0)
(-0.035131 -0.614645 0)
(-0.0365643 -0.606166 0)
(-0.0376644 -0.5981 0)
(-0.0383814 -0.590507 0)
(-0.0386222 -0.583433 0)
(-0.0382881 -0.576982 0)
(-0.0373144 -0.571251 0)
(-0.0356334 -0.56632 0)
(-0.0331927 -0.562312 0)
(-0.0300018 -0.559349 0)
(-0.0261289 -0.557528 0)
(-0.0216966 -0.556895 0)
(-0.016871 -0.557421 0)
(-0.0118486 -0.558981 0)
(-0.00684857 -0.561317 0)
(-0.00212133 -0.563974 0)
(0.00202625 -0.566114 0)
(0.0052194 -0.565848 0)
(0.00744784 -0.557964 0)
(0.00580943 -0.511997 0)
(-0.00187357 -0.606703 0)
(-0.00651498 -0.65535 0)
(-0.00975091 -0.663865 0)
(-0.0133386 -0.663281 0)
(-0.016959 -0.658635 0)
(-0.0204064 -0.65174 0)
(-0.02357 -0.643504 0)
(-0.0263767 -0.634524 0)
(-0.0287897 -0.625245 0)
(-0.0308005 -0.61599 0)
(-0.032421 -0.606996 0)
(-0.0336578 -0.598407 0)
(-0.034491 -0.590345 0)
(-0.0348923 -0.582897 0)
(-0.034813 -0.576137 0)
(-0.0342043 -0.570156 0)
(-0.033034 -0.565034 0)
(-0.0312737 -0.560842 0)
(-0.0289109 -0.557658 0)
(-0.0259705 -0.555553 0)
(-0.0225165 -0.554567 0)
(-0.0186494 -0.554692 0)
(-0.0144995 -0.555849 0)
(-0.0102198 -0.557863 0)
(-0.00598303 -0.560428 0)
(-0.00199322 -0.563028 0)
(0.00148838 -0.564737 0)
(0.00416948 -0.563452 0)
(0.00596942 -0.553473 0)
(0.00454081 -0.502128 0)
(-0.00180962 -0.600695 0)
(-0.00586218 -0.650021 0)
(-0.00864757 -0.658153 0)
(-0.0118515 -0.657143 0)
(-0.0151874 -0.652109 0)
(-0.0184303 -0.644874 0)
(-0.0214423 -0.636335 0)
(-0.0241228 -0.627089 0)
(-0.0264108 -0.617577 0)
(-0.0282806 -0.608134 0)
(-0.0297293 -0.599008 0)
(-0.0307565 -0.590372 0)
(-0.0313534 -0.582362 0)
(-0.031508 -0.575084 0)
(-0.0312006 -0.568625 0)
(-0.0304126 -0.563066 0)
(-0.0291354 -0.558479 0)
(-0.0273676 -0.554923 0)
(-0.0251219 -0.552448 0)
(-0.0224351 -0.551088 0)
(-0.0193707 -0.550844 0)
(-0.0160168 -0.551664 0)
(-0.0124814 -0.553428 0)
(-0.00888788 -0.555919 0)
(-0.00537322 -0.558778 0)
(-0.00209788 -0.561429 0)
(0.00073148 -0.562855 0)
(0.00291142 -0.56083 0)
(0.00435008 -0.549201 0)
(0.00321258 -0.493835 0)
(-0.00205213 -0.594365 0)
(-0.00565939 -0.644957 0)
(-0.00811325 -0.652699 0)
(-0.0109781 -0.651126 0)
(-0.0140093 -0.645552 0)
(-0.0169825 -0.637847 0)
(-0.0197525 -0.628914 0)
(-0.0222091 -0.619349 0)
(-0.0242831 -0.609589 0)
(-0.0259412 -0.599968 0)
(-0.0271732 -0.590735 0)
(-0.0279777 -0.582077 0)
(-0.0283546 -0.574138 0)
(-0.0283037 -0.567032 0)
(-0.0278235 -0.560848 0)
(-0.0269148 -0.555666 0)
(-0.0255858 -0.551547 0)
(-0.0238524 -0.54854 0)
(-0.0217424 -0.546676 0)
(-0.0193009 -0.545964 0)
(-0.0165916 -0.546374 0)
(-0.0136955 -0.547827 0)
(-0.0107071 -0.550168 0)
(-0.00772964 -0.553144 0)
(-0.00487268 -0.556354 0)
(-0.00225691 -0.559165 0)
(-2.91518e-05 -0.560489 0)
(0.00169218 -0.558015 0)
(0.00284363 -0.545247 0)
(0.00205958 -0.48714 0)
(-0.0024118 -0.588718 0)
(-0.00584733 -0.640216 0)
(-0.00808773 -0.647446 0)
(-0.0106515 -0.645191 0)
(-0.0133715 -0.63896 0)
(-0.0160292 -0.630687 0)
(-0.0184897 -0.621292 0)
(-0.0206482 -0.611367 0)
(-0.0224389 -0.601343 0)
(-0.0238292 -0.591543 0)
(-0.0248084 -0.582213 0)
(-0.025377 -0.573541 0)
(-0.0255406 -0.565674 0)
(-0.0253077 -0.558725 0)
(-0.0246877 -0.552787 0)
(-0.0236938 -0.547933 0)
(-0.0223448 -0.54422 0)
(-0.0206672 -0.541686 0)
(-0.0186972 -0.540347 0)
(-0.0164843 -0.540196 0)
(-0.0140918 -0.541182 0)
(-0.0115956 -0.543205 0)
(-0.00908108 -0.546087 0)
(-0.00663778 -0.549549 0)
(-0.00435482 -0.553159 0)
(-0.00231949 -0.556243 0)
(-0.000622697 -0.557657 0)
(0.000691397 -0.555036 0)
(0.00160516 -0.541635 0)
(0.0011135 -0.481801 0)
(-0.00292344 -0.58162 0)
(-0.0062521 -0.635246 0)
(-0.0084098 -0.642197 0)
(-0.0107452 -0.639246 0)
(-0.0131661 -0.632294 0)
(-0.0154819 -0.623397 0)
(-0.0175866 -0.613499 0)
(-0.0193946 -0.60319 0)
(-0.0208531 -0.592889 0)
(-0.0219363 -0.582905 0)
(-0.0226372 -0.573475 0)
(-0.0229598 -0.564784 0)
(-0.022914 -0.556975 0)
(-0.0225135 -0.550161 0)
(-0.0217747 -0.544433 0)
(-0.0207175 -0.53986 0)
(-0.0193671 -0.536493 0)
(-0.017755 -0.534363 0)
(-0.0159215 -0.533475 0)
(-0.0139169 -0.533809 0)
(-0.0118023 -0.535299 0)
(-0.00964865 -0.537832 0)
(-0.00753382 -0.541217 0)
(-0.0055373 -0.545158 0)
(-0.00373362 -0.549208 0)
(-0.00218543 -0.55267 0)
(-0.000939428 -0.554363 0)
(1.86216e-05 -0.551895 0)
(0.000718007 -0.538335 0)
(0.000467225 -0.477651 0)
(-0.00326097 -0.575924 0)
(-0.00684624 -0.630541 0)
(-0.00899776 -0.636958 0)
(-0.0111445 -0.633222 0)
(-0.0132686 -0.625511 0)
(-0.0152229 -0.615969 0)
(-0.0169405 -0.605554 0)
(-0.0183647 -0.594852 0)
(-0.019461 -0.584264 0)
(-0.0202145 -0.574087 0)
(-0.0206243 -0.564546 0)
(-0.0206981 -0.55582 0)
(-0.0204489 -0.548047 0)
(-0.0198937 -0.541338 0)
(-0.0190521 -0.53578 0)
(-0.0179475 -0.53144 0)
(-0.0166076 -0.528364 0)
(-0.0150657 -0.526576 0)
(-0.0133622 -0.526074 0)
(-0.0115456 -0.526826 0)
(-0.0096728 -0.528759 0)
(-0.00780869 -0.53175 0)
(-0.00602344 -0.535599 0)
(-0.00438797 -0.540009 0)
(-0.00296663 -0.544528 0)
(-0.00180698 -0.548453 0)
(-0.000927311 -0.550597 0)
(-0.000276582 -0.54856 0)
(0.000211774 -0.53528 0)
(2.57499e-06 -0.474368 0)
(-0.00366435 -0.567427 0)
(-0.00741258 -0.624853 0)
(-0.00966574 -0.631306 0)
(-0.0116841 -0.626947 0)
(-0.0135295 -0.618541 0)
(-0.0151159 -0.608382 0)
(-0.0164315 -0.597464 0)
(-0.0174569 -0.58637 0)
(-0.0181804 -0.575489 0)
(-0.0185998 -0.565105 0)
(-0.0187206 -0.555434 0)
(-0.0185537 -0.546648 0)
(-0.018114 -0.538881 0)
(-0.0174196 -0.532241 0)
(-0.0164914 -0.526813 0)
(-0.0153532 -0.52266 0)
(-0.0140331 -0.519824 0)
(-0.0125636 -0.518323 0)
(-0.0109828 -0.518149 0)
(-0.00933532 -0.519265 0)
(-0.00767222 -0.52159 0)
(-0.00605072 -0.524996 0)
(-0.00453231 -0.529281 0)
(-0.00317915 -0.534147 0)
(-0.00204796 -0.539152 0)
(-0.00118005 -0.543604 0)
(-0.000585538 -0.546328 0)
(-0.000208563 -0.544935 0)
(2.27998e-05 -0.532259 0)
(-0.000248198 -0.471641 0)
(-0.00383176 -0.562116 0)
(-0.0081374 -0.619997 0)
(-0.0105476 -0.625762 0)
(-0.0123841 -0.620529 0)
(-0.0138852 -0.611373 0)
(-0.0150617 -0.600596 0)
(-0.015958 -0.589181 0)
(-0.0165853 -0.577695 0)
(-0.016948 -0.566516 0)
(-0.0170522 -0.555915 0)
(-0.0169064 -0.546101 0)
(-0.0165225 -0.537237 0)
(-0.0159154 -0.529454 0)
(-0.0151026 -0.522858 0)
(-0.0141043 -0.517528 0)
(-0.0129439 -0.513525 0)
(-0.0116482 -0.510887 0)
(-0.0102477 -0.509628 0)
(-0.00877759 -0.509735 0)
(-0.00727762 -0.511165 0)
(-0.00579235 -0.513835 0)
(-0.00437048 -0.517611 0)
(-0.00306346 -0.522297 0)
(-0.00192287 -0.527599 0)
(-0.000996014 -0.533091 0)
(-0.000318733 -0.538107 0)
(9.74784e-05 -0.541515 0)
(0.000292225 -0.54098 0)
(0.000315274 -0.529359 0)
(-0.000186748 -0.469736 0)
(-0.0041652 -0.549958 0)
(-0.0088916 -0.611458 0)
(-0.0113362 -0.618272 0)
(-0.0129301 -0.613077 0)
(-0.0140869 -0.603609 0)
(-0.0149011 -0.592458 0)
(-0.015446 -0.580705 0)
(-0.0157483 -0.568944 0)
(-0.0158205 -0.557554 0)
(-0.0156716 -0.546808 0)
(-0.0153115 -0.536906 0)
(-0.0147517 -0.528011 0)
(-0.0140063 -0.520248 0)
(-0.0130921 -0.513718 0)
(-0.0120286 -0.5085 0)
(-0.0108385 -0.504649 0)
(-0.00954768 -0.5022 0)
(-0.00818542 -0.50116 0)
(-0.00678466 -0.501514 0)
(-0.00538203 -0.503212 0)
(-0.00401751 -0.506169 0)
(-0.00273381 -0.510249 0)
(-0.00157496 -0.515258 0)
(-0.000584228 -0.520912 0)
(0.000198956 -0.526801 0)
(0.000743299 -0.532289 0)
(0.00103225 -0.536284 0)
(0.00107627 -0.536498 0)
(0.000884744 -0.525784 0)
(7.07318e-05 -0.46704 0)
)
;
boundaryField
{
inlet
{
type calculated;
value nonuniform List<vector>
30
(
(0 -0.444532 0)
(0 -0.444532 0)
(0 -0.444532 0)
(0 -0.444532 0)
(0 -0.444532 0)
(0 -0.444531 0)
(0 -0.417529 0)
(0 -0.418368 0)
(0 -0.420735 0)
(0 -0.431521 0)
(0 -0.445199 0)
(0 -0.446709 0)
(0 -0.446762 0)
(0 -0.446762 0)
(0 -0.446762 0)
(0 -0.446762 0)
(0 -0.446762 0)
(0 -0.44463 0)
(0 -0.438373 0)
(0 -0.429448 0)
(0 -0.424473 0)
(0 -0.441032 0)
(0 -0.447812 0)
(0 -0.447813 0)
(0 -0.447816 0)
(0 -0.447813 0)
(0 -0.447811 0)
(0 -0.447796 0)
(0 -0.447793 0)
(0 -0.447791 0)
)
;
}
outlet
{
type calculated;
value nonuniform List<vector>
30
(
(-0.0043204 -0.549297 0)
(-0.00903068 -0.609823 0)
(-0.0114644 -0.615907 0)
(-0.0130034 -0.610132 0)
(-0.014081 -0.600184 0)
(-0.0148061 -0.588626 0)
(-0.0152606 -0.576523 0)
(-0.0154757 -0.564458 0)
(-0.0154662 -0.552808 0)
(-0.0152428 -0.541839 0)
(-0.0148159 -0.531752 0)
(-0.0141975 -0.522707 0)
(-0.0134018 -0.514829 0)
(-0.0124457 -0.50822 0)
(-0.0113484 -0.502959 0)
(-0.0101324 -0.4991 0)
(-0.00882296 -0.496679 0)
(-0.00744878 -0.495703 0)
(-0.0060422 -0.496158 0)
(-0.00463914 -0.497993 0)
(-0.00327899 -0.501123 0)
(-0.00200399 -0.505415 0)
(-0.000858093 -0.510676 0)
(0.000114889 -0.516628 0)
(0.000873769 -0.522863 0)
(0.00138322 -0.528758 0)
(0.00161853 -0.533238 0)
(0.00157581 -0.534041 0)
(0.00124534 -0.524078 0)
(0.000296461 -0.46636 0)
)
;
}
walls
{
type calculated;
value uniform (0 0 0);
}
frontAndBackPlanes
{
type empty;
}
}
// ************************************************************************* //
| [
"peterbryz@yahoo.com"
] | peterbryz@yahoo.com | |
bd74087f67c3701e7867221ac24d222abc7c3dda | 2a46a53c76f7d40e3733b1f7f661ceeb3928ad23 | /POS/parser/Sharp0SParser.h | c4a6569a2e39612ad77b6c0c13d3004c7fcc8d94 | [] | no_license | sronzheng/dvr-pos | 37192137d27de4a72f513def39b5ed55634fc40d | 5a456232a049a6a358d87b44db8fb75c8d44c345 | refs/heads/master | 2020-05-22T22:17:24.300074 | 2017-03-12T14:10:18 | 2017-03-12T14:10:18 | 84,729,658 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,187 | h | // Sharp0SParser.h: interface for the CSharp0SParser class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_SHARP0SPARSER_H__58AF7AC2_9FBB_4B76_BB22_73597A911DCB__INCLUDED_)
#define AFX_SHARP0SPARSER_H__58AF7AC2_9FBB_4B76_BB22_73597A911DCB__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "parser.h"
/*
* enum type for states of the CSharp0SParser.
*/
enum SHARP0S_PARSE_STATE
{
SHARP0S_STATE_BEGINNING,
SHARP0S_STATE_DATE_GOTTEN,
SHARP0S_STATE_TIME_GOTTEN,
SHARP0S_STATE_SALE_ITEM_GOTTEN,
SHARP0S_STATE_SUBTOTAL_GOTTEN,
SHARP0S_STATE_TAX_GOTTEN,
SHARP0S_STATE_TOTAL_GOTTEN,
SHARP0S_STATE_PAYMENT_TYPE_GOTTEN,
SHARP0S_STATE_CHANGE_GOTTEN = SHARP0S_STATE_BEGINNING,
SHARP0S_STATE_NO_SALE_GOTTEN = SHARP0S_STATE_BEGINNING,
};
class CSharp0SParser : public CParser
{
public:
/*
* Function:
* constructor.
* Parameters:
* receiver: pointer to receiver object.
*/
CSharp0SParser( CReceiver *receiver );
virtual ~CSharp0SParser();
// I need access the setXXX function and some member variables
// in unit-test project, for test purpose.
#ifndef _UNIT_TEST_
private:
#else
public:
#endif
/*
* Refer to CParser
*/
virtual void parseLine( char buf[] );
/*
* Function:
* look for data information.
* Parameters:
* buffer: pointer to buffer to be parsed.
* Return Value:
* true if found, false if not.
*/
bool setDate( char *buffer );
/*
* Function:
* look for time information.
* Parameters:
* buffer: pointer to buffer to be parsed.
* Return Value:
* true if found, false if not.
*/
bool setTime( char *buffer );
/*
* Function:
* look for sale item or item voided.
* Parameters:
* buffer: pointer to buffer to be parsed.
* Return Value:
* true if found, false if not.
*/
bool setItem( char *buffer );
/*
* Function:
* look for subtotal information.
* Parameters:
* buffer: pointer to buffer to be parsed.
* Return Value:
* true if found, false if not.
*/
bool setSubtotal( char *buffer );
/*
* Function:
* look for tax information.
* Parameters:
* buffer: pointer to buffer to be parsed.
* Return Value:
* true if found, false if not.
*/
bool setTax( char *buffer );
/*
* Function:
* look for total information.
* Parameters:
* buffer: pointer to buffer to be parsed.
* Return Value:
* true if found, false if not.
*/
bool setTotal( char *buffer );
/*
* Function:
* look for payment type.
* Parameters:
* buffer: pointer to buffer to be parsed.
* Return Value:
* true if found, false if not.
*/
bool setPaymentType( char *buffer );
/*
* Function:
* look for change information.
* Parameters:
* buffer: pointer to buffer to be parsed.
* Return Value:
* true if found, false if not.
*/
bool setChange( char *buffer );
SHARP0S_PARSE_STATE m_state;
private:
int m_year, m_month, m_day;
};
#endif // !defined(AFX_SHARP0SPARSER_H__58AF7AC2_9FBB_4B76_BB22_73597A911DCB__INCLUDED_)
| [
"ronzheng@163.com"
] | ronzheng@163.com |
cda531c18feccc1bc6ef848dceb60b4684865979 | 0d6f07c2f7d56a3787757b18aaa1202fb08943f2 | /C程序设计进阶/Assignment/指针/寻找山顶.cpp | e2dc5a15cacd8e74065695295b8bb76c875edf2f | [] | no_license | jameslouiszhang/Peking_University_Coursera | 6f4ff7068a37c62041e97a007818d10d2492ab09 | e1dffa540b46ed8bc4b9162fbda1cef34560be07 | refs/heads/master | 2021-05-11T01:57:59.166834 | 2015-10-28T05:42:50 | 2015-10-28T05:42:50 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,354 | cpp | //
// main.cpp
// cpluspluscoursera
//
// Created by JUNXIAO YI on 9/25/15.
// Copyright (c) 2015 JUNXIAO YI. All rights reserved.
/*
描述
在一个m×n的山地上,已知每个地块的平均高程,请求出所有山顶所在的地块(所谓山顶,就是其地块平均高程不比其上下左右相邻的四个地块每个地块的平均高程小的地方)。
输入
第一行是两个整数,表示山地的长m(5≤m≤20)和宽n(5≤n≤20)。
其后m行为一个m×n的整数矩阵,表示每个地块的平均高程。每行的整数间用一个空格分隔。
输出
输出所有上顶所在地块的位置。每行一个。按先m值从小到大,再n值从小到大的顺序输出。
样例输入
10 5
0 76 81 34 66
1 13 58 4 40
5 24 17 6 65
13 13 76 3 20
8 36 12 60 37
42 53 87 10 65
42 25 47 41 33
71 69 94 24 12
92 11 71 3 82
91 90 20 95 44
样例输出
0 2
0 4
2 1
2 4
3 0
3 2
4 3
5 2
5 4
7 2
8 0
8 4
9 3
*/
#include <iostream>
using namespace std;
int main(void)
{
int m, n; // 山地的长为m, 宽为n, 5≤m≤20, 5≤n≤20;
cin >> m >> n;
int *matrix = new int[m*n]; // 用来存放输入矩阵
int *flag = new int[m*n]; // 用来表示每个山地是否为山顶
for ( int i = 0; i < m; i++ )
{
for ( int j = 0; j < n; j++ )
{
cin >> *(matrix + n*i + j);
*(flag + n*i + j) = 1; // 先假设所有的山地均为山顶
}
}
for ( int i = 0; i < m; i++ )
{
for ( int j = 0; j < n; j++ )
{
if ( *(flag + n*i +j) == 0 ) // 已经遍历过或不为该区域最大值, 即已被证明不可能为山顶, 略过
continue;
else
{
if ( j > 0 && *(matrix + n*i + j-1) > *(matrix + n*i + j) ) // 遍历左边值大于当前值则略过并设当前山flag=0
*(flag + n*i + j) = 0;
else if ( j > 0 && *(matrix + n*i + j-1) < *(matrix + n*i + j) )
*(flag + n*i + j-1) = 0;
if ( i > 0 && *(matrix + (i-1)*n + j) > *(matrix + n*i + j) ) // 上边
*(flag + n*i + j) = 0;
else if ( i > 0 && *(matrix + (i-1)*n + j) < *(matrix + n*i + j) ) // 上边
*(flag + n*(i-1) + j) = 0;
if ( j < (n-1) && *(matrix + i*n + j+1) > *(matrix + n*i + j) ) // 右边
*(flag + n*i + j) = 0;
else if ( j < (n-1) && *(matrix + i*n + j+1) > *(matrix + n*i + j) ) // 右边
*(flag + n*i + j+1) = 0;
if ( i < (m-1) && *(matrix + (i+1)*n + j) > *(matrix + n*i + j) ) // 下边
*(flag + n*i + j) = 0;
else if ( i < (m-1) && *(matrix + (i+1)*n + j) > *(matrix + n*i + j) ) // 下边
*(flag + n*(i+1) + j) = 0;
// 上下左右遍历完为最大, 可以不做任何处理, 因为初始化时默认为山顶
}
}
}
for ( int i = 0; i < m; i++ )
{
for ( int j = 0; j < n; j++ )
{
if ( *(flag + n*i +j) == 1 )
cout << i << " " << j << endl;
}
}
return 0;
} | [
"yijunxiao88@gmail.com"
] | yijunxiao88@gmail.com |
9d7ac4264a5354eb1e06286462a34b525efab52e | 2279c0e2cd9b6b7fe9e6c583863c52196ba842c0 | /src_ordenacao_alianca_rebelde_algoritmo1/classes/Civilization.cpp | 0ef9d1ce2a76f701f6f9a6130ac668af1cbae6c5 | [
"MIT"
] | permissive | victormagalhaess/TP2-ED-2020 | 490eb85cc985b00a8a729a0acbe56f55f1603860 | 78d020c6da1c036fd6643d6ed066f3440a45a981 | refs/heads/main | 2022-12-29T20:51:05.785730 | 2020-10-11T14:49:01 | 2020-10-11T14:49:01 | 302,933,136 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 999 | cpp | #include "../include/Civilization.hpp"
using namespace Aliance1;
Civilization::Civilization(std::string name, int distance, int population)
{
this->name = name;
this->distance = distance;
this->population = population;
}
Civilization::Civilization()
{
}
Civilization::~Civilization() {}
void Civilization::setName(std::string _name)
{
this->name = _name;
}
void Civilization::setDistance(int _distance)
{
this->distance = _distance;
}
void Civilization::setPopulation(int _population)
{
this->population = _population;
}
std::string Civilization::getName()
{
return this->name;
}
int Civilization::getDistance()
{
return this->distance;
}
int Civilization::getPopulation()
{
return this->population;
}
void Civilization::read()
{
std::cin >> this->name;
std::cin >> this->distance;
std::cin >> this->population;
}
void Civilization::print()
{
std::cout << this->name << " " << this->distance << " " << this->population << std::endl;
}
| [
"victormagalhaes00@outlook.com"
] | victormagalhaes00@outlook.com |
3931275b9728da081d28d90fec62bca8fa3f8454 | 57c012ba54ded9ca34ee31c559d707349a1e6cfc | /mod01/ex06/Karen.hpp | 8ef77276b2c72533dd6cddca50834adeb281171e | [] | no_license | mikirosario/cpp | 61944a4e39f9d2c06b26c4076e5a76834e6fdb4f | 12d1e6ea4f4478805379babe75b4285661bf79f8 | refs/heads/main | 2023-08-23T16:43:28.100491 | 2021-11-06T17:29:03 | 2021-11-06T17:29:03 | 412,053,059 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,377 | hpp | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* Karen.hpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: mrosario <mrosario@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/10/06 13:28:08 by mrosario #+# #+# */
/* Updated: 2021/10/06 17:09:21 by mrosario ### ########.fr */
/* */
/* ************************************************************************** */
#include <iostream>
# define RED "\e[0;31m"
# define YEL "\e[0;33m"
# define MAG "\e[0;35m"
# define CYN "\e[0;36m"
# define RESET "\e[0m"
class Karen
{
private:
void debug(void);
void info(void);
void warning(void);
void error(void);
void level_does_not_exist(void);
std::pair<std::string[4], void (Karen::*[5])(void)> _pair;
public:
Karen();
void complain(std::string level);
void karenFilter(std::string level);
};
| [
"mrosario@c2r6s3.42madrid.com"
] | mrosario@c2r6s3.42madrid.com |
9333831d7f1a881b64539557e5b31c063ea76dec | 28f32057fce8ea807936d50fe4d1aaf4ecb9af98 | /Config/Config.cpp | 30e46dd61d425a9d8f5ca46f2073c4534e2164e3 | [] | no_license | bhankey/webserver | 293d57c6409d8b1fb7f73a7bc817caf921f28231 | 833a1e491911006e76e28d0a45dc18db44117bdb | refs/heads/main | 2023-05-06T02:41:48.627937 | 2021-05-29T20:19:36 | 2021-05-29T20:19:36 | 372,060,556 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,470 | cpp | //
// Created by sergey on 17.03.2021.
//
#include "../includes/Config.hpp"
#include "../includes/Reader.hpp"
#include "../includes/StringUtils.hpp"
Config::Config(const Config &config) :
servers(config.servers),
workerProcesses(config.workerProcesses),
workerConnections(config.workerConnections) {
}
Config::Config():
servers(),
workerProcesses(0),
workerConnections(0) {
}
Config &Config::operator=(const Config &config) {
if (this != &config) {
servers = config.servers;
workerProcesses = config.workerProcesses;
workerConnections = config.workerConnections;
}
return *this;
}
Config::~Config() {
}
void Config::parseConfig(const std::string &pathConfig) {
Reader reader(pathConfig);
std::vector<std::string> file;
try {
file = reader.parseFile();
}
catch (std::exception &exception) {
throw (std::runtime_error("Config file can't be open"));
}
for (size_t i = 0; i < file.size(); i++) {
if (file[i].empty()) {
continue;
}
std::vector<std::string> tokens(split(file[i], " \t\v\f\r"));
if (tokens[0] == "server") {
if (tokens.size() != 2 || tokens[1] != "{") {
throw parsing::ConfigException(
"new block don't open with bracket or open bracket don't follow by new line:",
i);
}
servers.push_back(ServerConfig());
servers[servers.size() - 1].parseServerBlock(file, ++i);
} else {
parseParameters(tokens, file[i], i);
}
}
checkParameters();
if (servers.empty()) {
throw parsing::ConfigException("no servers blocks in config file", 0);
}
}
const ServerConfig &Config::GetServer(size_t idx) const {
return servers.at(idx);
}
size_t Config::GetServerCount() const {
return servers.size();
}
const std::vector<ServerConfig> &Config::GetServers() {
return servers;
}
unsigned int Config::GetWorkerProcesses() const {
return workerProcesses;
}
unsigned int Config::GetWorkerConnections() const {
return workerConnections;
}
void Config::parseWorkerProcesses(std::vector<std::string> &tokens, int lineNumber) {
if (workerProcesses != 0) {
throw parsing::ConfigException("more than one worker_process directive in config", lineNumber);
}
if (tokens.size() != 2 || !isNum(tokens[1])) {
throw parsing::ConfigException("invalid arguments in \"worker_processes\" directive", lineNumber);
}
try {
workerProcesses = ft_stoi(tokens[1]);
}
catch (...) {
throw parsing::ConfigException("invalid arguments in \"worker_processes\" directive", lineNumber);
}
if (workerProcesses <= 0) {
throw parsing::ConfigException("invalid arguments in \"worker_processes\" directive", lineNumber);
}
}
void Config::parseWorkerConnections(std::vector<std::string> &tokens, int lineNumber) {
if (workerConnections != 0) {
throw parsing::ConfigException("more than one worker_process directive in config", lineNumber);
}
if (tokens.size() != 2 || !isNum(tokens[1])) {
throw parsing::ConfigException("invalid argument in \"worker_connections\" directive", lineNumber);
}
try {
workerConnections = ft_stoi(tokens[1]);
}
catch (...) {
throw parsing::ConfigException("invalid argument in \"worker_connections\" directive", lineNumber);
}
if (workerConnections <= 0 || workerConnections > FD_SETSIZE) {
throw parsing::ConfigException("invalid argument in \"worker_connections\" directive", lineNumber);
}
}
void Config::checkParameters() {
if (workerProcesses == 0) {
workerProcesses = 1;
}
if (workerConnections == 0) {
workerConnections = 512;
}
}
void Config::parseParameters(std::vector<std::string> &tokens, std::string &line, int lineNum) {
trimString(line);
if (line[line.size() - 1] != ';') {
throw parsing::ConfigException("';' not on the end of line:", lineNum);
}
line.erase(--line.end(), line.end());
tokens = split(line, " \t\v\f\r");
static const size_t parametersCount = 2;
static const std::string parameters[parametersCount] = {
"worker_processes", "worker_connections"
};
static void (Config::*parsingParametersFunc[parametersCount])(std::vector<std::string> &, int) = {
&Config::parseWorkerProcesses, &Config::parseWorkerConnections
};
for (size_t j = 0; j < parametersCount; ++j) {
if (parameters[j] == tokens[0]) {
(this->*parsingParametersFunc[j])(tokens, lineNum);
return;
}
}
throw parsing::ConfigException("invalid directive \"" + tokens[0] +"\"",lineNum);
}
| [
"sergeysh2001@gmail.com"
] | sergeysh2001@gmail.com |
153655b62a8beb9bc81f0f8bc640be922f3b77f3 | 4ef47905c0929f8579ef8247c516b4e3c15d0a70 | /src/stdafx.cpp | c8493276fb696ca246d0b2e95827b3abbea61b54 | [] | no_license | death/sde | aef44c38b15bf30b0d901f4eadcf66fb76a125a5 | d1fa15ca039405a91b258e809a9b108c8ca793d5 | refs/heads/master | 2021-01-20T04:25:45.176512 | 2008-05-22T03:26:12 | 2008-05-22T03:26:12 | 18,783 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 282 | cpp | // stdafx.cpp : source file that includes just the standard includes
// SDE.pch will be the pre-compiled header
// stdafx.obj will contain the pre-compiled type information
#include "stdafx.h"
// TODO: reference any additional headers you need in STDAFX.H
// and not in this file
| [
"death@nessers.org"
] | death@nessers.org |
4daf31804f48e82cae603fc5168870b340d9e069 | 880c7c2446b0bc7516434664b5ff33f7cc20a94c | /alloc.cpp | 4f7adfd0262102cb9c1cd41e7ecfc9a7a726ecdd | [
"MIT"
] | permissive | irazozulya/OS_lab2 | 70751cdb39c12938b656d0761b5230875c460d24 | b443a7be4628a0de4b187b2d956550e0fe408fc5 | refs/heads/main | 2023-01-30T06:49:29.392344 | 2020-12-09T17:21:15 | 2020-12-09T17:21:15 | 320,001,571 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 10,368 | cpp | #include <iostream>
#include <list>
#include <math.h>
#include "alloc.h"
using namespace std;
Memory_Allocator::Memory_Allocator() {
beginingPtr = (uint8_t*)malloc(PAGE_SIZE*PAGE_QUANTITY);
create_pages();
}
void* Memory_Allocator::mem_alloc(size_t size) {
if (size <= PAGE_SIZE / 2) {
size_t expectableSize = calc_size(size);
for (int i = 0; i < PAGE_QUANTITY; i++){
if (!pageDescriptions[i].access) {
uint8_t* beginingFrame = beginingPtr + (i * PAGE_SIZE);
size_t frameSize = calc_size(get_size(beginingFrame + ACCESSIBILITY_INDENT));
if (frameSize == expectableSize && pageDescriptions[i].freeFramesQuan > 0) {
uint8_t* frameCurrPtr = pageDescriptions[i].firstAcFramePtr;
*frameCurrPtr = false;
create_header(size, frameCurrPtr + ACCESSIBILITY_INDENT);
pageDescriptions[i].firstAcFramePtr += frameSize;
pageDescriptions[i].freeFramesQuan--;
return (void*)frameCurrPtr;
}
}
}
for (int i = 0; i < PAGE_QUANTITY; i++) {
if (pageDescriptions[i].access) {
uint8_t* frameCurrPtr = pageDescriptions[i].firstAcFramePtr;
*frameCurrPtr = false;
create_header(size, frameCurrPtr + ACCESSIBILITY_INDENT);
pageDescriptions[i].firstAcFramePtr += expectableSize;
pageDescriptions[i].access = false;
pageDescriptions[i].freeFramesQuan = (PAGE_SIZE / expectableSize) - 1;
return (void*)frameCurrPtr;
}
}
}
else {
if (size + HEADER_SIZE < PAGE_SIZE) {
for (int i = 0; i < PAGE_QUANTITY; i++) {
if (pageDescriptions[i].access) {
uint8_t* frameCurrPtr = pageDescriptions[i].firstAcFramePtr;
uint8_t* result = frameCurrPtr;
*frameCurrPtr = false;
create_header(size, frameCurrPtr + ACCESSIBILITY_INDENT);
frameCurrPtr += (PAGE_SIZE - 1);
pageDescriptions[i].firstAcFramePtr = frameCurrPtr + HEADER_SIZE + size;
pageDescriptions[i].access = false;
pageDescriptions[i].freeFramesQuan = 0;
return (void*)result;
}
}
}
else {
int beginingPage = search_for_page(size);
int numbOfPages = ceil(size / PAGE_SIZE);
int currSize = size;
uint8_t* resultAddr = pageDescriptions[beginingPage].firstAcFramePtr;
for (int i = beginingPage; i < beginingPage + numbOfPages + 1; i++) {
pageDescriptions[i].access = false;
pageDescriptions[i].freeFramesQuan = 0;
uint8_t* currPtr = pageDescriptions[i].firstAcFramePtr;
*currPtr = false;
if (currSize >= PAGE_SIZE) {
create_header(PAGE_SIZE, currPtr + ACCESSIBILITY_INDENT);
pageDescriptions[i].firstAcFramePtr += PAGE_SIZE - 1;
currSize -= PAGE_SIZE;
}
else {
create_header(currSize, currPtr + ACCESSIBILITY_INDENT);
pageDescriptions[i].firstAcFramePtr += (currSize + HEADER_SIZE);
return (void*)resultAddr;
}
}
}
}
}
void Memory_Allocator::mem_free(void* addr) {
uint8_t* foundAddr = (uint8_t*)addr;
bool accessible = *foundAddr;
size_t size = get_size(foundAddr + ACCESSIBILITY_INDENT);
int numbOfPage = search_for_page(foundAddr);
if (pageDescriptions[numbOfPage].access || numbOfPage == -1)
return;
if (size < PAGE_SIZE / 2) {
*foundAddr = true;
pageDescriptions[numbOfPage].freeFramesQuan += 1;
if (pageDescriptions[numbOfPage].freeFramesQuan == PAGE_SIZE / calc_size(size))
pageDescriptions[numbOfPage].access = true;
}
else if (size < PAGE_SIZE) {
*foundAddr = true;
create_header(0, foundAddr + ACCESSIBILITY_INDENT);
pageDescriptions[numbOfPage].access = true;
pageDescriptions[numbOfPage].firstAcFramePtr = foundAddr;
}
else {
int pageCurrNum = numbOfPage;
uint8_t* currPtr = foundAddr;
while (size == PAGE_SIZE) {
*currPtr = true;
pageDescriptions[pageCurrNum].access = true;
pageDescriptions[pageCurrNum].firstAcFramePtr = currPtr;
pageCurrNum++;
currPtr += PAGE_SIZE;
size = get_size(currPtr + ACCESSIBILITY_INDENT);
}
if (!pageDescriptions[pageCurrNum].access) {
*currPtr = true;
pageDescriptions[pageCurrNum].access = true;
pageDescriptions[pageCurrNum].firstAcFramePtr = currPtr;
}
}
}
void* Memory_Allocator::mem_realloc(void* addr, size_t size) {
uint8_t* foundAddr = (uint8_t*)addr;
bool accessible = *foundAddr;
size_t oldSize = get_size(foundAddr + ACCESSIBILITY_INDENT);
int numbOfPage = search_for_page(foundAddr);
if (pageDescriptions[numbOfPage].access || size == oldSize)
return nullptr;
if (calc_size(oldSize) == calc_size(size)) {
create_header(size, foundAddr + ACCESSIBILITY_INDENT);
return (void*)foundAddr;
}
else {
mem_free(addr);
void* result = mem_alloc(size);
return result;
}
}
void Memory_Allocator::mem_show() {
for (int i = 0; i < PAGE_QUANTITY; i++) {
cout << "Page " << i + 1;
if (pageDescriptions[i].access) {
cout << "\t|\t Address " << (void*)pageDescriptions[i].firstAcFramePtr;
cout << "\t|\t Is accessible" << endl;
}
else {
uint8_t* currPagePtr = beginingPtr + (i * PAGE_SIZE);
cout << "\t|\t Address " << (void*)currPagePtr;
cout << "\t|\t Isn't accessible" << endl;
size_t frameSize = get_size(currPagePtr + ACCESSIBILITY_INDENT);
size_t currFrameSize = calc_size(frameSize);
int frame = 1;
if (currFrameSize == PAGE_SIZE) {
cout << "\t Frame " << frame;
cout << "\t|\t address " << (void*)currPagePtr;
if((bool)*currPagePtr) {
cout << "\t|\t is accessible ";
}
else {
cout << "\t|\t isn't accessible ";
}
cout << "\t|\t size " << frameSize;
cout << endl;
continue;
}
while (currPagePtr != pageDescriptions[i].firstAcFramePtr) {
cout << "\t Frame " << frame;
cout << "\t|\t address " << (void*)currPagePtr;
if((bool)*currPagePtr) {
cout << "\t|\t is accessible ";
}
else {
cout << "\t|\t isn't accessible ";
}
cout << "\t|\t size " << get_size(currPagePtr + ACCESSIBILITY_INDENT);
cout << endl;
frame++;
if (get_size(currPagePtr + ACCESSIBILITY_INDENT + currFrameSize) == 0) {
break;
} else {
currPagePtr += currFrameSize;
}
}
}
cout << "__________________________________________________________________________________________________________" << endl << endl;
}
}
void Memory_Allocator::create_pages() {
uint8_t* currPtr = beginingPtr;
for (int i = 0; i < PAGE_QUANTITY; i++) {
PageDescription description = PageDescription();
description.firstAcFramePtr = currPtr;
*(currPtr) = true;
*(currPtr + HEADER_SIZE) = PAGE_SIZE - ACCESSIBILITY_INDENT;
pageDescriptions[i] = description;
currPtr += PAGE_SIZE;
}
}
void Memory_Allocator::create_header(size_t size, uint8_t* begining) {
int indent = 0;
int maxP = floor(size / CELL_MAX_SIZE);
if (maxP == 4) {
while (maxP > 0) {
*(begining + indent) = CELL_MAX_SIZE - 1;
maxP--;
indent++;
}
return;
}
int rest = size - (maxP * CELL_MAX_SIZE);
while (maxP > 0 || indent != 3) {
if (maxP == 0)
*(begining + indent) = 0;
else {
*(begining + indent) = CELL_MAX_SIZE - 1;
maxP--;
}
indent++;
}
*(begining + indent) = rest;
}
int Memory_Allocator::search_for_page(size_t size) {
int numbOfPages = ceil(size / PAGE_SIZE);
int beginingPage;
for (int i = 0; i < PAGE_QUANTITY; i++) {
if (pageDescriptions[i].access) {
beginingPage = i;
for (int j = i; j < PAGE_QUANTITY; j++) {
if (j == PAGE_QUANTITY - 1)
return -1;
if (pageDescriptions[j].access && pageDescriptions[j+1].access) {
numbOfPages--;
if (numbOfPages == 0)
return beginingPage;
}
}
}
}
}
int Memory_Allocator::search_for_page(uint8_t* addr) {
uint8_t* currPtr = beginingPtr;
for (int i = 0; i < PAGE_QUANTITY; i++) {
if (addr >= currPtr && addr < currPtr + PAGE_SIZE) {
return i;
}
currPtr += PAGE_SIZE;
}
return -1;
}
size_t Memory_Allocator::calc_size(size_t size) {
size_t expSize = size + HEADER_SIZE;
size_t currSize = FRAME_MIN_SIZE;
while (currSize != FRAME_MAX_SIZE) {
if (currSize > expSize)
return currSize;
else {
currSize *= INCREASE_NUMBER;
}
}
}
size_t Memory_Allocator::get_size(uint8_t* begining) {
int indent = 0;
size_t size = 0;
while (indent < SIZE_INDENT) {
if ((size_t) *(begining + indent) == CELL_MAX_SIZE - 1) {
size += CELL_MAX_SIZE;
}
else {
size += (size_t) *(begining + indent);
}
indent++;
}
return size;
} | [
"45012463+irazozulya@users.noreply.github.com"
] | 45012463+irazozulya@users.noreply.github.com |
07bb22f3639fa0f2a47bd3443b0fd8ea8e312cdf | 228f9e8c6a66bbf2e64d8f3a9d88d4ef8d03062c | /example_snare/src/Synth.cpp | 70cde3faeb329a6b281334e765dbd181081b7309 | [] | no_license | leozimmerman/ofxStk | 8cfaa30f99c29b1bb3f1d35caedb26bb52a86493 | f30276163f9fcb24208878b01c5c93574028510d | refs/heads/master | 2020-12-24T06:50:14.888023 | 2016-11-24T21:11:31 | 2016-11-24T21:11:31 | 73,395,175 | 0 | 0 | null | 2016-11-10T15:32:02 | 2016-11-10T15:32:01 | null | UTF-8 | C++ | false | false | 1,622 | cpp | #include "Synth.h"
Synth::Synth(){
stk::Stk::setRawwavePath(ofToDataPath("rawwaves",true));
setFrequency(440.0);
generatorType = SINE;
lowPass.setPole(0.0);
highPass.setZero(0.0);
}
void Synth::noteOn(StkFloat frequency, StkFloat amplitude){
setFrequency(frequency);
//gain = amplitude;
sineAdsr.keyOn();
pitchAdsr.keyOn();
noiseAdsr.keyOn();
}
void Synth::noteOff(StkFloat amplitude){
sineAdsr.keyOff();
pitchAdsr.keyOff();
noiseAdsr.keyOff();
}
void Synth::setFrequency(StkFloat frequency){
sinewave.setFrequency(frequency);
sinewaveOctave.setFrequency(frequency*2);
}
//Inside tick you are responsible for setting lastFrame_
StkFloat Synth::tick(unsigned int channel){
//Sine
StkFloat sineFrame;
StkFloat noiseFrame;
if (pitchAdsr.tick() > 0.0){
setFrequency(pitchAdsr.tick() * baseFrequency);
}
sineFrame = sinewave.tick() + sinewaveOctave.tick();
sineFrame *= 0.5;
sineFrame *= sineAdsr.tick();
sineFrame = lowPass.tick(sineFrame);
//Noise
noiseFrame = noise.tick();
noiseFrame *= noiseAdsr.tick();
noiseFrame = highPass.tick(noiseFrame);
//Mix
lastFrame_[0] = sineFrame*gain + noiseFrame*(1-gain);
return lastFrame_[0];
}
StkFrames& Synth::tick(StkFrames &frames,unsigned int channel){
StkFloat *samples = &frames[channel];
unsigned int hop = frames.channels();
for ( unsigned int i=0; i<frames.frames(); i++, samples += hop )
*samples = tick();
return frames;
}
| [
"leozimmerman@gmail.com"
] | leozimmerman@gmail.com |
240af29d480bdc69b0aa957e319b4f4672e2a846 | 08cf73a95743dc3036af0f31a00c7786a030d7c0 | /Editor source/OtE/Edgewalker/EWScript/BasicScriptInstructions.h | bf2ed4eb100dabc463f1b1317823263b4dd04e11 | [
"MIT"
] | permissive | errantti/ontheedge-editor | a0779777492b47f4425d6155e831df549f83d4c9 | 678d2886d068351d7fdd68927b272e75da687484 | refs/heads/main | 2023-03-04T02:52:36.538407 | 2021-01-23T19:42:22 | 2021-01-23T19:42:22 | 332,293,357 | 0 | 0 | null | null | null | null | ISO-8859-1 | C++ | false | false | 6,482 | h | // On the Edge Editor
//
// Copyright © 2004-2021 Jukka Tykkyläinen
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software
// and associated documentation files (the "Software"), to deal in the Software without
// restriction, including without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
// BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifndef __BASICSCRIPTINSTRUCTIONS_H__
#define __BASICSCRIPTINSTRUCTIONS_H__
#include "InstructionTemplate.h"
class CBasicScriptInstructions
{
public:
void AddBasicCommands(CScriptEngine *scriptEngine);
private:
class Script_IF_BOOL : public CInstructionTemplate::IInstructionHandler
{
public:
virtual ScriptReturn ExecuteInstruction(SScriptVariable *param, SScriptVariable *modifyVar);
};
class Script_IF_NBOOL : public CInstructionTemplate::IInstructionHandler
{
public:
virtual ScriptReturn ExecuteInstruction(SScriptVariable *param, SScriptVariable *modifyVar);
};
class Script_IF_INTEQ : public CInstructionTemplate::IInstructionHandler
{
public:
virtual ScriptReturn ExecuteInstruction(SScriptVariable *param, SScriptVariable *modifyVar);
};
class Script_IF_NINTEQ : public CInstructionTemplate::IInstructionHandler
{
public:
virtual ScriptReturn ExecuteInstruction(SScriptVariable *param, SScriptVariable *modifyVar);
};
class Script_IF_STREQ : public CInstructionTemplate::IInstructionHandler
{
public:
virtual ScriptReturn ExecuteInstruction(SScriptVariable *param, SScriptVariable *modifyVar);
};
class Script_IF_NSTREQ : public CInstructionTemplate::IInstructionHandler
{
public:
virtual ScriptReturn ExecuteInstruction(SScriptVariable *param, SScriptVariable *modifyVar);
};
class Script_IF_GENERIC : public CInstructionTemplate::IInstructionHandler
{
public:
virtual ScriptReturn ExecuteInstruction(SScriptVariable *param, SScriptVariable *modifyVar);
};
class Script_IF_NGENERIC : public CInstructionTemplate::IInstructionHandler
{
public:
virtual ScriptReturn ExecuteInstruction(SScriptVariable *param, SScriptVariable *modifyVar);
};
class Script_IF_LESSERTHAN : public CInstructionTemplate::IInstructionHandler
{
public:
virtual ScriptReturn ExecuteInstruction(SScriptVariable *param, SScriptVariable *modifyVar);
};
class Script_IF_GREATERTHAN : public CInstructionTemplate::IInstructionHandler
{
public:
virtual ScriptReturn ExecuteInstruction(SScriptVariable *param, SScriptVariable *modifyVar);
};
class Script_WHILE : public CInstructionTemplate::IInstructionHandler
{
public:
virtual ScriptReturn ExecuteInstruction(SScriptVariable *param, SScriptVariable *modifyVar);
};
class Script_FOR : public CInstructionTemplate::IInstructionHandler
{
public:
virtual ScriptReturn ExecuteInstruction(SScriptVariable *param, SScriptVariable *modifyVar);
};
class Script_INCREMENT : public CInstructionTemplate::IInstructionHandler
{
public:
virtual ScriptReturn ExecuteInstruction(SScriptVariable *param, SScriptVariable *modifyVar);
};
class Script_subtract : public CInstructionTemplate::IInstructionHandler
{
public:
virtual ScriptReturn ExecuteInstruction(SScriptVariable *param, SScriptVariable *modifyVar);
};
class Script_MULTIPLY : public CInstructionTemplate::IInstructionHandler
{
public:
virtual ScriptReturn ExecuteInstruction(SScriptVariable *param, SScriptVariable *modifyVar);
};
class Script_round : public CInstructionTemplate::IInstructionHandler
{
public:
virtual ScriptReturn ExecuteInstruction(SScriptVariable *param, SScriptVariable *modifyVar);
};
class Script_END_SCRIPT : public CInstructionTemplate::IInstructionHandler
{
public:
virtual ScriptReturn ExecuteInstruction(SScriptVariable *param, SScriptVariable *modifyVar);
};
class Script_constructVector3 : public CInstructionTemplate::IInstructionHandler
{
public:
virtual ScriptReturn ExecuteInstruction(SScriptVariable *param, SScriptVariable *modifyVar);
};
class Script_concatenate : public CInstructionTemplate::IInstructionHandler
{
public:
virtual ScriptReturn ExecuteInstruction(SScriptVariable *param, SScriptVariable *modifyVar);
};
class Script_concatenateInt : public CInstructionTemplate::IInstructionHandler
{
public:
virtual ScriptReturn ExecuteInstruction(SScriptVariable *param, SScriptVariable *modifyVar);
};
class Script_randomInt : public CInstructionTemplate::IInstructionHandler
{
public:
virtual ScriptReturn ExecuteInstruction(SScriptVariable *param, SScriptVariable *modifyVar);
};
class Script_randomDecimal : public CInstructionTemplate::IInstructionHandler
{
public:
virtual ScriptReturn ExecuteInstruction(SScriptVariable *param, SScriptVariable *modifyVar);
};
class Script_getVector3Length : public CInstructionTemplate::IInstructionHandler
{
public:
virtual ScriptReturn ExecuteInstruction(SScriptVariable *param, SScriptVariable *modifyVar);
};
class Script_getVec3X : public CInstructionTemplate::IInstructionHandler
{
public:
virtual ScriptReturn ExecuteInstruction(SScriptVariable *param, SScriptVariable *modifyVar);
};
class Script_getVec3Y : public CInstructionTemplate::IInstructionHandler
{
public:
virtual ScriptReturn ExecuteInstruction(SScriptVariable *param, SScriptVariable *modifyVar);
};
class Script_getVec3Z : public CInstructionTemplate::IInstructionHandler
{
public:
virtual ScriptReturn ExecuteInstruction(SScriptVariable *param, SScriptVariable *modifyVar);
};
class Script_addLongString : public CInstructionTemplate::IInstructionHandler
{
public:
virtual ScriptReturn ExecuteInstruction(SScriptVariable *param, SScriptVariable *modifyVar);
};
};
#endif // #ifndef __BASICSCRIPTINSTRUCTIONS_H__ | [
"jukka.tykkylainen@gmail.com"
] | jukka.tykkylainen@gmail.com |
dca5de1dbcea9be4a9b144c5fc46d7f3fe476af9 | 07ad26c1f7de7770ca33929015f6631e7b423ef6 | /dllmain.cpp | 266512d332104a6c15686ede3b9b6e9000d3ed8a | [] | no_license | workcartersmith/osrs-reversing | d4b936608e60421aa6192ed6ed188542ebeb0e22 | 67f7c2519c90a72e667aad57173950499e61578e | refs/heads/main | 2023-04-10T08:02:37.204331 | 2021-04-20T03:00:49 | 2021-04-20T03:00:49 | 359,644,530 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,401 | cpp | // dllmain.cpp : Defines the entry point for the DLL application.
#include "pch.h"
#include <Windows.h>
#include <cstdio>
#include "Addresses.h"
#include <iostream>
class SkillBase
{
public:
char pad_0000[72]; //0x0000
int8_t defense; //0x0048
char pad_0049[7]; //0x0049
int8_t health; //0x0050
char pad_0051[7]; //0x0051
int8_t prayer; //0x0058
char pad_0059[7]; //0x0059
int8_t cooking; //0x0060
char pad_0061[7]; //0x0061
int8_t fletching; //0x0068
char pad_0069[7]; //0x0069
int8_t firemaking; //0x0070
char pad_0071[7]; //0x0071
int8_t N00000433; //0x0078
char pad_0079[15]; //0x0079
int8_t thieving; //0x0088
char pad_0089[183]; //0x0089
}; //Size: 0x0140
DWORD WINAPI Oldschool(HMODULE hModule) {
AllocConsole();
freopen("CONOUT$", "w", stdout);
Addresses addresses = Addresses();
// Static address is still relative to base module entry point. i.e <dynamic module entry point + staticAddress>
uintptr_t* skillsAddress = (uintptr_t*)(addresses.getBase() + addresses.getSkillBase());
// Declare & define pointer to the location in memory where Jagex stores skill levels.
SkillBase* mySkills = (SkillBase*)(uintptr_t*)(addresses.getBase() + addresses.getSkillBase());
// We can now access those values as if they were structs we constructed ourselves.
std::cout << "Skill list base address: " << skillsAddress << std::endl;
std::cout << "Defense Level: " << static_cast<int16_t>(mySkills->defense) << std::endl;
std::cout << "Cooking Level: " << static_cast<int16_t>(mySkills->cooking) << std::endl;
std::cout << "Health Level: " << static_cast<int16_t>(mySkills->health) << std::endl;
std::cout << "Thieving Level: " << static_cast<int16_t>(mySkills->thieving) << std::endl;
for (;;) {
int* fletchingExp = (int*)(addresses.getBase() + addresses.getFletchingExp());
std::cout << *fletchingExp << std::endl;
Sleep(5);
}
}
BOOL APIENTRY DllMain( HMODULE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
CloseHandle(CreateThread(nullptr, 0, (LPTHREAD_START_ROUTINE)Oldschool, hModule, 0, nullptr));
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}
| [
"noreply@github.com"
] | noreply@github.com |
f47ea2d25c9cf1e2c43786d51ec6bbb2f18a5309 | 41b4adb10cc86338d85db6636900168f55e7ff18 | /aws-cpp-sdk-autoscaling/include/aws/autoscaling/model/ExitStandbyRequest.h | 7d81a1b61a5d5012c3f798e87d971cb8519b13bf | [
"JSON",
"MIT",
"Apache-2.0"
] | permissive | totalkyos/AWS | 1c9ac30206ef6cf8ca38d2c3d1496fa9c15e5e80 | 7cb444814e938f3df59530ea4ebe8e19b9418793 | refs/heads/master | 2021-01-20T20:42:09.978428 | 2016-07-16T00:03:49 | 2016-07-16T00:03:49 | 63,465,708 | 1 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 4,474 | h | /*
* Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
#pragma once
#include <aws/autoscaling/AutoScaling_EXPORTS.h>
#include <aws/autoscaling/AutoScalingRequest.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/core/utils/memory/stl/AWSString.h>
namespace Aws
{
namespace AutoScaling
{
namespace Model
{
/**
*/
class AWS_AUTOSCALING_API ExitStandbyRequest : public AutoScalingRequest
{
public:
ExitStandbyRequest();
Aws::String SerializePayload() const override;
/**
* <p>One or more instance IDs. You must specify at least one instance ID.</p>
*/
inline const Aws::Vector<Aws::String>& GetInstanceIds() const{ return m_instanceIds; }
/**
* <p>One or more instance IDs. You must specify at least one instance ID.</p>
*/
inline void SetInstanceIds(const Aws::Vector<Aws::String>& value) { m_instanceIdsHasBeenSet = true; m_instanceIds = value; }
/**
* <p>One or more instance IDs. You must specify at least one instance ID.</p>
*/
inline void SetInstanceIds(Aws::Vector<Aws::String>&& value) { m_instanceIdsHasBeenSet = true; m_instanceIds = value; }
/**
* <p>One or more instance IDs. You must specify at least one instance ID.</p>
*/
inline ExitStandbyRequest& WithInstanceIds(const Aws::Vector<Aws::String>& value) { SetInstanceIds(value); return *this;}
/**
* <p>One or more instance IDs. You must specify at least one instance ID.</p>
*/
inline ExitStandbyRequest& WithInstanceIds(Aws::Vector<Aws::String>&& value) { SetInstanceIds(value); return *this;}
/**
* <p>One or more instance IDs. You must specify at least one instance ID.</p>
*/
inline ExitStandbyRequest& AddInstanceIds(const Aws::String& value) { m_instanceIdsHasBeenSet = true; m_instanceIds.push_back(value); return *this; }
/**
* <p>One or more instance IDs. You must specify at least one instance ID.</p>
*/
inline ExitStandbyRequest& AddInstanceIds(Aws::String&& value) { m_instanceIdsHasBeenSet = true; m_instanceIds.push_back(value); return *this; }
/**
* <p>One or more instance IDs. You must specify at least one instance ID.</p>
*/
inline ExitStandbyRequest& AddInstanceIds(const char* value) { m_instanceIdsHasBeenSet = true; m_instanceIds.push_back(value); return *this; }
/**
* <p>The name of the Auto Scaling group.</p>
*/
inline const Aws::String& GetAutoScalingGroupName() const{ return m_autoScalingGroupName; }
/**
* <p>The name of the Auto Scaling group.</p>
*/
inline void SetAutoScalingGroupName(const Aws::String& value) { m_autoScalingGroupNameHasBeenSet = true; m_autoScalingGroupName = value; }
/**
* <p>The name of the Auto Scaling group.</p>
*/
inline void SetAutoScalingGroupName(Aws::String&& value) { m_autoScalingGroupNameHasBeenSet = true; m_autoScalingGroupName = value; }
/**
* <p>The name of the Auto Scaling group.</p>
*/
inline void SetAutoScalingGroupName(const char* value) { m_autoScalingGroupNameHasBeenSet = true; m_autoScalingGroupName.assign(value); }
/**
* <p>The name of the Auto Scaling group.</p>
*/
inline ExitStandbyRequest& WithAutoScalingGroupName(const Aws::String& value) { SetAutoScalingGroupName(value); return *this;}
/**
* <p>The name of the Auto Scaling group.</p>
*/
inline ExitStandbyRequest& WithAutoScalingGroupName(Aws::String&& value) { SetAutoScalingGroupName(value); return *this;}
/**
* <p>The name of the Auto Scaling group.</p>
*/
inline ExitStandbyRequest& WithAutoScalingGroupName(const char* value) { SetAutoScalingGroupName(value); return *this;}
private:
Aws::Vector<Aws::String> m_instanceIds;
bool m_instanceIdsHasBeenSet;
Aws::String m_autoScalingGroupName;
bool m_autoScalingGroupNameHasBeenSet;
};
} // namespace Model
} // namespace AutoScaling
} // namespace Aws
| [
"henso@amazon.com"
] | henso@amazon.com |
c330e65983295d043918bfddd8f770e3daa3c1be | 211d399b61c73689e6446d0693d4e74ef1dea6c8 | /socket测试/TCP转ADS/Project1/main.cpp | 5ce54c5cde77806e57a8ec3388e1d0848a5a2baf | [] | no_license | roynbo/Hunan | fa46f394592aaaf4fe69214589d95135b840d7b4 | 8705b08ac73fb0ed6bbe63ac14d49b22f846f8ed | refs/heads/master | 2022-01-25T20:55:33.217663 | 2019-07-16T06:49:56 | 2019-07-16T06:49:56 | 197,133,749 | 1 | 0 | null | null | null | null | GB18030 | C++ | false | false | 3,200 | cpp | // winsocketTCPServer.cpp : 定义控制台应用程序的入口点。
//
#define _WINSOCK_DEPRECATED_NO_WARNINGS
//服务器
#include<iostream>
#include<WinSock2.h> // socket 所需要的头文件
#pragma comment(lib,"WS2_32.lib")// link socket 库
#define PORT 4999
#define BUFLEN 1024
using namespace std;
int nNetTimeout = 1000;//1秒
struct status
{
double bigarm_position;
double middlearm_position;
double smallarm_position;
double swingarm1;
double swingarm2;
double swingarm3;
double swingarm4;
};
struct command
{
double carVelX;
double carVelY;
double handVelX;
double handVelY;
double singleVel;
int index;
int instruct1;
int instruct2;
};
int main()
{
status robot_status;
command robot_command;
memset(&robot_status, 0, sizeof(status));
memset(&robot_command, 0, sizeof(command));
HANDLE hThread;
WSADATA wsaData;
// 1 启动并初始化winsock(WSAStarup)
if (WSAStartup(MAKEWORD(2, 2), &wsaData))//成功返回0
{
return FALSE;
}
//2 创建套接字(socket)
SOCKET sServer = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (INVALID_SOCKET == sServer)
{
WSACleanup();
return FALSE;
}
//3 准备通信地址
SOCKADDR_IN addrServer;
addrServer.sin_family = AF_INET;
addrServer.sin_port = htons(PORT);
addrServer.sin_addr.s_addr = INADDR_ANY;//任意可用地址
//4 绑定地址与socket(bind)
if (SOCKET_ERROR == bind(sServer, (const sockaddr*)&addrServer, sizeof(SOCKADDR_IN)))
{
closesocket(sServer);
WSACleanup();
return FALSE;
}
//5 监听 (listen)
if (SOCKET_ERROR == listen(sServer, SOMAXCONN))
{
closesocket(sServer);
WSACleanup();
}
// 6 等待客户端连接(accpet)
sockaddr_in addrClient;
int addrClientLen = sizeof(addrClient);
cout << "Server Start Complete!Waiting For Client" << endl;
SOCKET sClient = accept(sServer, (sockaddr *)&addrClient, &addrClientLen);
if (INVALID_SOCKET == sClient)
{
cout << WSAGetLastError() << endl;
closesocket(sServer);
closesocket(sClient);
WSACleanup();
return FALSE;
}
printf("Connected client IP:%s\n", inet_ntoa(addrClient.sin_addr));
while (1)
{
//接收时限
int flag = setsockopt(sServer, SOL_SOCKET, SO_RCVTIMEO, (char *)&nNetTimeout, sizeof(int));
//接收数据
int len=recv(sClient, (char*)(&robot_command), sizeof(command), 0);
if (len < 0)
break;
if (flag)
{
cout << "recv time out!" << endl;
break;
}
cout << robot_command.instruct1;
// 发送数据
send(sClient, (char*)(&robot_status), sizeof(status), 0);
}
printf("Connect closed!\n");
system("pause");
return TRUE;
}
/*
注:1:MAKEWORD把参数组成一个WORD(双字节)类型数据并返回这个WORD类型数值,高位代表(修订本)号,低位字节指定主版本号(其代表)
2:socket(AF_INET,//The Internet Protocol version 4 (IPv4) address family
SOCK_STREAM,//, two-way,This socket type uses the Transmission Control Protocol (TCP) for the Internet address family (AF_INET or AF_INET6).
IPPROTO_TCP//The Transmission Control Protocol (TCP). This is a possible value when the af parameter is AF_INET or AF_INET6 and the type parameter is SOCK_STREAM.
)
*/ | [
"505492614@qq.com"
] | 505492614@qq.com |
99a18b450f8cef3542373f6b87a3b340f3abbdb4 | 1dd791ef8132ed6bebc458d7c3c1ba5a9c8ca985 | /src/rx/color/hsv.h | 454126c6f3d9bef4f83b795708e1985a01a05e14 | [
"MIT"
] | permissive | BuckeyeSoftware/rex | e4ef1a743745b027eb02c629541edf85faf1d026 | a0380e2e3ce26e610b4c9fcbe0ece19ecc8c3531 | refs/heads/main | 2021-12-20T17:41:51.163916 | 2021-12-05T04:07:52 | 2021-12-05T04:07:52 | 171,078,375 | 40 | 7 | MIT | 2020-12-15T03:24:33 | 2019-02-17T03:38:52 | C++ | UTF-8 | C++ | false | false | 792 | h | #ifndef RX_COLOR_HSV_H
#define RX_COLOR_HSV_H
#include "rx/core/types.h"
#include "rx/core/algorithm/saturate.h"
namespace Rx::Color {
struct RGB;
struct HSV {
constexpr HSV();
constexpr HSV(Float64 _h, Float64 _s, Float64 _v, Float64 _a = 1.0);
HSV(const RGB& _rgb);
constexpr HSV saturated() const;
Float64 h;
Float64 s;
Float64 v;
Float64 a;
};
inline constexpr HSV::HSV()
: HSV{0.0, 0.0, 0.0}
{
}
inline constexpr HSV::HSV(Float64 _h, Float64 _s, Float64 _v, Float64 _a)
: h{_h}
, s{_s}
, v{_v}
, a{_a}
{
}
inline constexpr HSV HSV::saturated() const {
using Algorithm::saturate;
auto f = h - Sint32(h);
if (f < 0.0) {
f += 1.0;
}
return {f, saturate(s), saturate(v), saturate(a)};
}
} // namespace Rx::Color
#endif // RX_COLOR_HSV_H
| [
"weilercdale@gmail.com"
] | weilercdale@gmail.com |
9f12cbd28dc2a1c270edf7d06a3a8081a6358e60 | 46cce0f5350dd7bef7a22bb0a1246f003f40916c | /defcore/DeviceConfig_Av15_usbcan.cpp | db78d58785c7edc59da0e9ac5c72be0eb1d47ff2 | [] | no_license | veodev/av_training | 6e65d43b279d029c85359027b5c68bd251ad24ff | ecb8c3cdc58679ada38c30df36a01751476f9015 | refs/heads/master | 2020-04-28T22:23:39.485893 | 2019-09-23T13:16:29 | 2019-09-23T13:16:29 | 175,615,879 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 36,188 | cpp | #include "Definitions.h"
#include "ChannelsTable.h"
#include "ChannelsIds.h"
#include "DeviceConfig_Av15_usbcan.h"
cDeviceConfig_Av15_usbcan::cDeviceConfig_Av15_usbcan(cChannelsTable* channelsTable, int aScanThreshold, int bScanThreshold)
: cDeviceConfig(channelsTable)
{
UMUCount = 1;
DeviceName = "Avicon-15";
MaxControlSpeed = 4; // Максимальная допустимая скорость контроля [км/ч]
ControlledRail = crSingle; // Контролируемые нити
TuningGate = tgFixed; // Стробы, используемые при настройке каналов контроля
GainBase = 20; // Минимальное значение аттенюатора
GainMax = 140; // Максимальное значение аттенюатора
GainStep = 0.5; // Шаг аттенюатора в децибелах
PrismDelayMin = 0.2; // Минимально допустимое время в призме - 0.2 мкс
PrismDelayMax = 15; // Максимальное допустимое время в призме - 10 мкс
BScanGateLevel = /*5*/ bScanThreshold; // Уровень строба В-развертки [отсчетов]
EvaluationGateLevel = /*6*/ aScanThreshold; // Уровень строба А-развертки [отсчетов]
RailTypeTuningGate.gStart = 40; // Cтроб для поиска максимума при настройке на тит рельса
RailTypeTuningGate.gEnd = 70;
RailTypeTuningGate_forSwitch.gStart = 14; // Cтроб для поиска максимума при настройке на тит рельса в зоне стрелочного перевода
RailTypeTuningGate_forSwitch.gEnd = 70;
BScanDataFiltration = false; // фильтрация В-развертки - ВКЛЮЧЕНА
UseLineSwitch = true; // Реле для подключения линий ручного контроля - ВКЛ
UMUConnectors = toCompleteControl; // Используемые разъемы БУМ - сплошного контроля
MirrorChannelTuningMethod = mctmByReceiver; // Метод настройки зеркальных каналов
sUmuDescription umuDescription;
umuDescription.connectionParams = NULL;
#ifdef WIN32
umuDescription.protocol = eProtUSBCAN;
#endif
#ifndef WIN32
umuDescription.protocol = eProtUSBCANAND;
#endif
umuDescriptions.push_back(umuDescription);
// === Список каналов ручного контроля ===
const int handChannelsCount = 7;
HandChannels.reserve(handChannelsCount);
sHandChannelDescription HScanCh;
HScanCh.Active = false;
HScanCh.UMUIndex = 0;
HScanCh.ReceiverLine = ulRU1;
HScanCh.GeneratorLine = ulRU1;
HScanCh.Generator = 7;
HScanCh.Receiver = 7;
HScanCh.PulseAmpl = 2;
HScanCh.Side = usLeft;
HScanCh.Id = H0MS;
// HScanCh.WorkFrequency = wf2_5MHz; // Для всех последующих каналов ручного контроля 2_5 МГц
HandChannels.push_back(HScanCh);
HScanCh.Id = H0E;
HandChannels.push_back(HScanCh);
HScanCh.PulseAmpl = 4;
HScanCh.Id = H45;
HandChannels.push_back(HScanCh);
HScanCh.Id = H50;
HandChannels.push_back(HScanCh);
HScanCh.Id = H58;
HandChannels.push_back(HScanCh);
HScanCh.Id = H65;
HandChannels.push_back(HScanCh);
HScanCh.Id = H70;
HandChannels.push_back(HScanCh);
// === Список каналов сплошного контроля ===
const int scanChannelsCount = 8;
const int schemeCount = 1;
ScanChannels.reserve(scanChannelsCount * schemeCount);
sScanChannelDescription ScanCh;
// init
ScanCh.Used = false;
ScanCh.ReceiverState = false;
ScanCh.GeneratorLine = 0;
ScanCh.ReceiverLine = 0;
ScanCh.Generator = 0;
ScanCh.Receiver = 0;
ScanCh.BScanTape = 0;
ScanCh.StrokeGroupIdx = 0;
ScanCh.StrokeNumber = 0;
ScanCh.BScanGroup = 0;
ScanCh.UMUIndex = 0;
ScanCh.PulseAmpl = 4; // Амплитуда зондирующего импульса
ScanCh.ProbePos = 0;
ScanCh.ProbeShift = 0;
ScanCh.Id = 0;
ScanCh.DeviceSide = dsNone;
ScanCh.Side = usLeft;
ScanCh.ColorDescr = cdZoomIn1;
// ------ Таблица тактов Схема 1 ------
ScanCh.StrokeGroupIdx = 1; // Номер группы в которую входит данный канал (Схема прозвучивания единственная)
// --- Такт №1 ---
ScanCh.StrokeNumber = 0; // Номер такта
ScanCh.BScanTape = 3; // Номер полосы В-развертки
ScanCh.Id = B42E; // Идентификатор канала - [Отъезжающий; 42 град; Эхо;]
ScanCh.Side = usLeft; // Сторона БУМ
ScanCh.DeviceSide = dsNone; // Сторона дефектоскопа
SetBothLines(ScanCh, ulRU1); // Номер линии генераторов / приемников
ScanCh.Generator = 3; // Номер генератора
ScanCh.Receiver = 3; // Номер приемника
ScanCh.ProbePos = -57; // Положение ПЭП в скательной системе [мм]
ScanCh.ProbeShift = 0; // Смещение ПЭП в искательной системе от оси рельса [мм]
ScanCh.ColorDescr = cdZoomOut1;
ScanChannels.push_back(ScanCh);
// --- Такт №2 ---
ScanCh.StrokeNumber = 1; // Номер такта
ScanCh.BScanTape = 3; // Номер полосы В-развертки
ScanCh.Id = F42E; // Идентификатор канала - [Наезжающий; 42 град; Эхо;]
ScanCh.Side = usLeft; // Сторона БУМ
ScanCh.DeviceSide = dsNone; // Сторона дефектоскопа
SetBothLines(ScanCh, ulRU1); // Номер линии генераторов / приемников
ScanCh.Generator = 2; // Номер генератора
ScanCh.Receiver = 2; // Номер приемника
ScanCh.ProbePos = -57; // Положение ПЭП в скательной системе [мм]
ScanCh.ProbeShift = 0; // Смещение ПЭП в искательной системе от оси рельса [мм]
ScanCh.ColorDescr = cdZoomIn1;
ScanChannels.push_back(ScanCh);
// --- Такт №3 ---
ScanCh.StrokeNumber = 2; // Номер такта
ScanCh.BScanTape = 1; // Номер полосы В-развертки
ScanCh.Id = B58EB; // Идентификатор канала - [Отъезжающий; 58/34 град; Эхо; Обе грани]
ScanCh.Side = usLeft; // Сторона БУМ
ScanCh.DeviceSide = dsNone; // Сторона дефектоскопа
SetBothLines(ScanCh, ulRU1); // Номер линии генераторов / приемников
ScanCh.Generator = 1; // Номер генератора
ScanCh.Receiver = 1; // Номер приемника
ScanCh.ProbePos = -82; // Положение ПЭП в скательной системе [мм]
ScanCh.ProbeShift = 0; // Смещение ПЭП в искательной системе от оси рельса [мм]
ScanCh.ColorDescr = cdZoomOut1;
ScanChannels.push_back(ScanCh);
// --- Такт №4 ---
ScanCh.StrokeNumber = 3; // Номер такта
ScanCh.BScanTape = 1; // Номер полосы В-развертки
ScanCh.Id = F58EB; // Идентификатор канала - [Наезжающий; 58/34 град; Эхо; Обе грани]
ScanCh.Side = usLeft; // Сторона БУМ
ScanCh.DeviceSide = dsNone; // Сторона дефектоскопа
SetBothLines(ScanCh, ulRU1); // Номер линии генераторов / приемников
ScanCh.Generator = 6; // Номер генератора
ScanCh.Receiver = 6; // Номер приемника
ScanCh.ProbePos = -32; // Положение ПЭП в скательной системе [мм]
ScanCh.ProbeShift = 0; // Смещение ПЭП в искательной системе от оси рельса [мм]
ScanCh.ColorDescr = cdZoomIn1;
ScanChannels.push_back(ScanCh);
// --- Такт №5 ---
ScanCh.StrokeNumber = 4; // Номер такта
ScanCh.BScanTape = 2; // Номер полосы В-развертки
ScanCh.Id = B58MB; // Идентификатор канала - [Отъезжающий; 58/34 град; Зеркальный; Обе грани]
ScanCh.Side = usLeft; // Сторона БУМ
ScanCh.DeviceSide = dsNone; // Сторона дефектоскопа
SetBothLines(ScanCh, ulRU1); // Номер линии генераторов / приемников
ScanCh.Generator = 1; // Номер генератора
ScanCh.Receiver = 5; // Номер приемника
ScanCh.ProbePos = -32; // Положение ПЭП в скательной системе [мм]
ScanCh.ProbeShift = 0; // Смещение ПЭП в искательной системе от оси рельса [мм]
ScanCh.ColorDescr = cdZoomOut2;
ScanChannels.push_back(ScanCh);
// --- Такт №6 ---
ScanCh.PulseAmpl = 2; // Амплитуда зондирующего импульса
ScanCh.StrokeNumber = 5; // Номер такта
ScanCh.BScanTape = 4; // Номер полосы В-развертки
ScanCh.Id = N0EMS; // Идентификатор канала - [Нет направления; 0 град; Эхо + ЗТМ]
ScanCh.Side = usLeft; // Сторона БУМ
ScanCh.DeviceSide = dsNone; // Сторона дефектоскопа
SetBothLines(ScanCh, ulRU1); // Номер линии генераторов / приемников
ScanCh.Generator = 7; // Номер генератора
ScanCh.Receiver = 7; // Номер приемника
ScanCh.ProbePos = 82; // Положение ПЭП в скательной системе [мм]
ScanCh.ProbeShift = 0; // Смещение ПЭП в искательной системе от оси рельса [мм]
ScanCh.ColorDescr = cdTMDirect1;
ScanChannels.push_back(ScanCh);
// --- Такт №7 ---
ScanCh.PulseAmpl = 4; // Амплитуда зондирующего импульса
ScanCh.StrokeNumber = 6; // Номер такта
ScanCh.BScanTape = 0; // Номер полосы В-развертки
ScanCh.Id = B70E; // Идентификатор канала - [Отъезжающий; 70 град; Эхо]
ScanCh.Side = usLeft; // Сторона БУМ
ScanCh.DeviceSide = dsNone; // Сторона дефектоскопа
SetBothLines(ScanCh, ulRU1); // Номер линии генераторов / приемников
ScanCh.Generator = 0; // Номер генератора
ScanCh.Receiver = 0; // Номер приемника
ScanCh.ProbePos = 57; // Положение ПЭП в скательной системе [мм]
ScanCh.ProbeShift = 0; // Смещение ПЭП в искательной системе от оси рельса [мм]
ScanCh.ColorDescr = cdZoomOut1;
ScanChannels.push_back(ScanCh);
// --- Такт №8 ---
ScanCh.StrokeNumber = 7; // Номер такта
ScanCh.BScanTape = 0; // Номер полосы В-развертки
ScanCh.Id = F70E; // Идентификатор канала - [Наезжающий; 70 град; Эхо]
ScanCh.Side = usLeft; // Сторона БУМ
ScanCh.DeviceSide = dsNone; // Сторона дефектоскопа
SetBothLines(ScanCh, ulRU1); // Номер линии генераторов / приемников
ScanCh.Generator = 4; // Номер генератора
ScanCh.Receiver = 4; // Номер приемника
ScanCh.ProbePos = 32; // Положение ПЭП в скательной системе [мм]
ScanCh.ProbeShift = 0; // Смещение ПЭП в искательной системе от оси рельса [мм]
ScanCh.ColorDescr = cdZoomIn1;
ScanChannels.push_back(ScanCh);
// Список каналов
ChannelsList.reserve(ScanChannels.size() + HandChannels.size());
for (size_t i = 0; i < ScanChannels.size(); i++) {
ChannelsList.push_back(ScanChannels[i].Id);
}
for (size_t i = 0; i < HandChannels.size(); i++) {
ChannelsList.push_back(HandChannels[i].Id);
}
// Инициализация Таблицы стробов для настройки каналов
sSensTuningParam par;
sChannelDescription chdesc;
for (size_t index = 0; index < ChannelsList.size(); index++) {
tbl->ItemByCID(ChannelsList[index], &chdesc);
for (int GateIdx = 0; GateIdx < chdesc.cdGateCount; GateIdx++) {
par.id = ChannelsList[index];
par.GateIndex = GateIdx;
// Для Настройки Ку
if ((chdesc.cdEnterAngle == 0) && (chdesc.cdMethod[GateIdx] == imMirrorShadow)) // Прямой ввод ЗТМ
{
// par.SensTuningGate[1].gStart = (int)tbl->DepthToDelay(ChannelsList[index], 178);
// par.SensTuningGate[1].gEnd = (int)tbl->DepthToDelay(ChannelsList[index], 186);
par.SensTuningGate[GateIdx].gStart = (int) tbl->DepthToDelay(ChannelsList[index], 178);
par.SensTuningGate[GateIdx].gEnd = (int) tbl->DepthToDelay(ChannelsList[index], 186);
}
else if ((chdesc.cdEnterAngle == 0) && (chdesc.cdMethod[GateIdx] != imMirrorShadow)) // Прямой ввод ЭХО
{
// par.SensTuningGate[0].gStart = (int)tbl->DepthToDelay(ChannelsList[index], 39 - 4);
// par.SensTuningGate[0].gEnd = (int)tbl->DepthToDelay(ChannelsList[index], 41 + 7);
par.SensTuningGate[GateIdx].gStart = (int) tbl->DepthToDelay(ChannelsList[index], 39 - 4);
par.SensTuningGate[GateIdx].gEnd = (int) tbl->DepthToDelay(ChannelsList[index], 41 + 7);
}
else if (chdesc.cdEnterAngle < 65) // Наклонный но не 65, 70-ти градусные
{
// par.SensTuningGate[0].gStart = (int)tbl->DepthToDelay(ChannelsList[index], 42 - 4);
// par.SensTuningGate[0].gEnd = (int)tbl->DepthToDelay(ChannelsList[index], 42 + 4);
// par.SensTuningGate[1] = par.SensTuningGate[0];
par.SensTuningGate[GateIdx].gStart = (int) tbl->DepthToDelay(ChannelsList[index], 42 - 4);
par.SensTuningGate[GateIdx].gEnd = (int) tbl->DepthToDelay(ChannelsList[index], 42 + 4);
// par.SensTuningGate[1] = par.SensTuningGate[0];
}
else // 65, 70-ти градусные
{
// par.SensTuningGate[0].gStart = (int)tbl->DepthToDelay(ChannelsList[index], 14 - 4);
// par.SensTuningGate[0].gEnd = (int)tbl->DepthToDelay(ChannelsList[index], 14 + 4);
// par.SensTuningGate[1] = par.SensTuningGate[0];
par.SensTuningGate[GateIdx].gStart = (int) tbl->DepthToDelay(ChannelsList[index], 14 - 4);
par.SensTuningGate[GateIdx].gEnd = (int) tbl->DepthToDelay(ChannelsList[index], 14 + 4);
// par.SensTuningGate[1] = par.SensTuningGate[0];
}
// Для Настройки 2ТП
/* if (chdesc.cdEnterAngle != 0) { // Прямой ввод
par.PrismTuningGate.gStart = 34 - 6;
par.PrismTuningGate.gEnd = 39 + 6;
}
else if (chdesc.cdEnterAngle == 0) {
par.PrismTuningGate.gStart = 19 - 2;
par.PrismTuningGate.gEnd = 21 + 2;
} */
// Для Настройки 2ТП
if (chdesc.cdEnterAngle != 0) {
par.PrismTuningGate[0].gStart = 36 - 10;
par.PrismTuningGate[0].gEnd = 36 + 10;
par.PrismTuningGate[1].gStart = 36 - 10;
par.PrismTuningGate[1].gEnd = 36 + 10;
}
else { // Прямой ввод
par.PrismTuningGate[0].gStart = 20 - 10;
par.PrismTuningGate[0].gEnd = 20 + 10;
par.PrismTuningGate[1].gStart = 20 - 10; // 60 - 10;
par.PrismTuningGate[1].gEnd = 20 + 10; // 60 + 10;
}
SensTuningParams.push_back(par);
}
}
// Режимы работы
sModeChannelData cd;
ModeList.resize(1);
// Режим "Болтовой стык" - для Схемы 1
ModeList[0].id = cmTestBoltJoint;
ModeList[0].StrokeGroupIdx = 1; // Схема 1
// Стробы
cd.id = 0x01; // 0 град эхо
cd.Action = maEndGate_Set;
cd.GateIdx = 1; // Номер строба
cd.Value = 18; // мкс
ModeList[0].List.push_back(cd);
cd.id = 0x19; // Наезжающий; 42 град
cd.Action = maEndGate_Push; // Запомнить
cd.GateIdx = 1; // Номер строба
ModeList[0].List.push_back(cd);
cd.id = 0x1A; // Отъезжающий; 42 град
cd.Action = maEndGate_Push; // Запомнить
cd.GateIdx = 1; // Номер строба
ModeList[0].List.push_back(cd);
cd.id = 0x19; // Наезжающий; 42 град
cd.Action = maEndGate_Set; // Установить
cd.GateIdx = 1; // Номер строба
cd.Value = 49; // мкс
ModeList[0].List.push_back(cd);
cd.id = 0x1A; // Отъезжающий; 42 град
cd.Action = maEndGate_Set; // Установить
cd.GateIdx = 1; // Номер строба
cd.Value = 49; // мкс
ModeList[0].List.push_back(cd);
cd.id = 0x19; // Наезжающий; 42 град
cd.Action = maStartGate_Set; // Установить
cd.GateIdx = 2; // Номер строба
cd.Value = 50; // мкс
ModeList[0].List.push_back(cd);
cd.id = 0x1A; // Отъезжающий; 42 град
cd.Action = maStartGate_Set; // Установить
cd.GateIdx = 2; // Номер строба
cd.Value = 50; // мкс
ModeList[0].List.push_back(cd);
cd.id = 0x1A; // Отъезжающий; 42 град
cd.Action = maEndGate_Pop; // Вспомнить
cd.GateIdx = 2; // Номер строба
ModeList[0].List.push_back(cd);
cd.id = 0x19; // Наезжающий; 42 град
cd.Action = maEndGate_Pop; // Вспомнить
cd.GateIdx = 2; // Номер строба
ModeList[0].List.push_back(cd);
// Выкл АСД
cd.id = 0x17; // Наезжающий; 70 град
cd.Action = maAlarm;
cd.GateIdx = 1;
cd.Value = amOff;
ModeList[0].List.push_back(cd);
cd.id = 0x18; // Отъезжающий; 70 град
cd.Action = maAlarm;
cd.GateIdx = 1;
cd.Value = amOff;
ModeList[0].List.push_back(cd);
cd.id = B58MB; // 58/34 град; Зеркальный
cd.Action = maAlarm;
cd.GateIdx = 1;
cd.Value = amOff;
ModeList[0].List.push_back(cd);
// Режим 2 эхо
cd.id = 0x1A; // Отъезжающий; 42 град
cd.Action = maAlarm;
cd.GateIdx = 2; // Номер строба
cd.Value = amTwoEcho;
ModeList[0].List.push_back(cd);
cd.id = 0x19; // Наезжающий; 42 град
cd.Action = maAlarm;
cd.GateIdx = 2; // Номер строба
cd.Value = amTwoEcho;
ModeList[0].List.push_back(cd);
// Увеличение Ку
cd.id = 0x1A; // Отъезжающий; 42 град
cd.Action = maSens_SetDelta;
cd.GateIdx = 2; // Номер строба
ModeList[0].List.push_back(cd);
cd.id = 0x19; // Наезжающий; 42 град
cd.Action = maSens_SetDelta;
cd.GateIdx = 2; // Номер строба
ModeList[0].List.push_back(cd);
// Копирование Ку из Ш в П
/*
cd.id = 0x1A; // Отъезжающий; 42 град
cd.Action = maSens_Push;
cd.GateIdx = 1; // Номер строба
ModeList[0].List.push_back(cd);
cd.id = 0x1A; // Отъезжающий; 42 град
cd.Action = maSens_Pop;
cd.GateIdx = 2; // Номер строба
ModeList[0].List.push_back(cd);
// Копирование Ку из Ш в П
cd.id = 0x19; // Наезжающий; 42 град
cd.Action = maSens_Push;
cd.GateIdx = 1; // Номер строба
ModeList[0].List.push_back(cd);
cd.id = 0x19; // Наезжающий; 42 град
cd.Action = maSens_Pop;
cd.GateIdx = 2; // Номер строба
ModeList[0].List.push_back(cd);
// Увеличение Ку
cd.id = 0x1A; // Отъезжающий; 42 град
cd.Action = maSens_SetDelta;
cd.GateIdx = 2; // Номер строба
ModeList[0].List.push_back(cd);
cd.id = 0x19; // Наезжающий; 42 град
cd.Action = maSens_SetDelta;
cd.GateIdx = 2; // Номер строба
ModeList[0].List.push_back(cd);
*/
// -----------------------------------------------------
// Режим "Тип рельса" - для всех схем сплошного контроля
// -----------------------------------------------------
sRailTypeTuningGroup g; // Группа действий выполняемых при настройки на тип рельса по сигналу одного канала
sRailTypeTuningChannelAction a; // Действие для одного канала при настройке на тип рельса
g.Rails = crSingle; // Одна нить
g.MasterId = 0x01; // Идентификатор канала - [Нет направления; 0 град; Эхо + ЗТМ]
g.ChType = ctCompInsp; // Каналы стплошного контроля
// начало «0 ЗТМ» = Tдс – 2 мкс
a.id = 0x01; // 0 град
a.StrobeIndex = 2; // ЗТМ
a.Action = maMoveStartGate; // Изменение начала строба
a.Delta = -2; // начало «0 ЗТМ» = Tдс – 2 мкс
a.ValueType = rtt_mcs; // мкс
a.SkipTestGateLen = true; // false игнорировать значение минимальной протяженности строба
a.ActiveInTuning = true;
g.List.push_back(a);
// конец «0 ЗТМ» = Tдс +6 мкс;
a.id = 0x01; // 0 град
a.StrobeIndex = 2; // ЗТМ
a.Action = maMoveEndGate; // Изменение конца строба
a.Delta = +6; // начало «0 ЗТМ» = Tдс +6 мкс;
a.ValueType = rtt_mcs; // мкс
a.SkipTestGateLen = true; // игнорировать значение минимальной протяженности строба
a.ActiveInTuning = true;
g.List.push_back(a);
// конец «0 ЭХО» = начало «0 ЗТМ» -1 мкс = Tдс – 2 мкс - 1 мкс;
a.id = 0x01; // 0 град
a.StrobeIndex = 1; // ЭХО
a.Action = maMoveEndGate; // Изменение конца строба
a.Delta = -3; // Tдс – 3 мкс;
a.ValueType = rtt_mcs; // мкс
a.SkipTestGateLen = true; // корректировать значение строба в зависимости от минимальной разрешенной протяженности строба
a.ActiveInTuning = false; // Настройка на Тип рельса в режима Настройка не влияет на этот строб
g.List.push_back(a);
// начало «Наезжающий 42 П» = (Нр(мм)-30(мм))/2,95;
a.id = 0x19; // 42 град
a.StrobeIndex = 2; // П
a.Action = maMoveStartGate; // Изменение начала строба
a.Delta = -30; // 30 мм
a.ValueType = rtt_mm; // mm
a.SkipTestGateLen = false; // корректировать значение строба в зависимости от минимальной разрешенной протяженности строба
a.ActiveInTuning = false;
g.List.push_back(a);
// конец «Наезжающий 42 Ш» = начало « 42 П»-1 мкс ?????
a.id = 0x19; // 42 град
a.StrobeIndex = 1; // Ш
a.Action = maMoveEndGate; // Изменение конца строба
a.Delta = -30; // 30 мм
a.ValueType = rtt_mm; // mm
a.SkipTestGateLen = true; // игнорировать значение минимальной протяженности строба
a.ActiveInTuning = false;
g.List.push_back(a);
// начало «Отъезжающий 42 П» = (Нр(мм)-30(мм))/2,95;
a.id = 0x1A; // 42 град
a.StrobeIndex = 2; // П
a.Action = maMoveStartGate; // Изменение начала строба
a.Delta = -30; // 30 мм
a.ValueType = rtt_mm; // mm
a.SkipTestGateLen = false; // корректировать значение строба в зависимости от минимальной разрешенной протяженности строба
a.ActiveInTuning = false;
g.List.push_back(a);
// конец «Отъезжающий 42 Ш» = начало « 42 П»-1 мкс ?????
a.id = 0x1A; // 42 град
a.StrobeIndex = 1; // Ш
a.Action = maMoveEndGate; // Изменение конца строба
a.Delta = -30; // 30 мм
a.ValueType = rtt_mm; // mm
a.SkipTestGateLen = true; // игнорировать значение минимальной протяженности строба
a.ActiveInTuning = false;
g.List.push_back(a);
RailTypeTuning.push_back(g);
// -----------------------------------------------------
// Режим "Тип рельса" - для ручных
// -----------------------------------------------------
sRailTypeTuningGroup g1; // Группа действий выполняемых при настройки на тип рельса по сигналу одного канала
g1.Rails = crSingle; // Одна нить
g1.MasterId = H0E; // Эхо
g1.ChType = ctHandScan; // Каналы ручного контроля
/* // начало «0 ЗТМ» = Tдс – 2 мкс
a.id = H0MS; // 0 град
a.StrobeIndex = 1; // ЗТМ
a.Action = maMoveStartGate; // Изменение начала строба
a.Delta = - 2; // начало «0 ЗТМ» = Tдс – 2 мкс
a.ValueType = rtt_mcs; // мкс
a.SkipTestGateLen = true; // игнорировать значение минимальной протяженности строба
g1.List.push_back(a);
// конец «0 ЗТМ» = Tдс +6 мкс;
a.id = H0MS; // 0 град
a.StrobeIndex = 1; // ЗТМ
a.Action = maMoveEndGate; // Изменение конца строба
a.Delta = + 6; // начало «0 ЗТМ» = Tдс +6 мкс;
a.ValueType = rtt_mcs; // мкс
a.SkipTestGateLen = true; // игнорировать значение минимальной протяженности строба
g1.List.push_back(a); */
// конец «0 ЭХО» = начало «0 ЗТМ» -1 мкс = Tдс – 2 мкс - 1 мкс;
a.id = H0E; // 0 град
a.StrobeIndex = 1; // ЭХО
a.Action = maMoveEndGate; // Изменение конца строба
a.Delta = -2; // Tдс – 2 мкс;
a.ValueType = rtt_mcs; // мкс
a.SkipTestGateLen = false; // корректировать значение строба в зависимости от минимальной разрешенной протяженности строба
a.ActiveInTuning = false;
g1.List.push_back(a);
RailTypeTuning.push_back(g1);
// -----------------------------------------------------
sRailTypeTuningGroup g2; // Группа действий выполняемых при настройки на тип рельса по сигналу одного канала
g2.MasterId = H0MS; // ЗТМ
g2.Rails = crSingle; // Одна нить
g2.ChType = ctHandScan; // Каналы ручного контроля
// начало «0 ЗТМ» = Tдс – 2 мкс
a.id = H0MS; // 0 град
a.StrobeIndex = 1; // ЗТМ
a.Action = maMoveStartGate; // Изменение начала строба
a.Delta = -2; // начало «0 ЗТМ» = Tдс – 2 мкс
a.ValueType = rtt_mcs; // мкс
a.SkipTestGateLen = true; // игнорировать значение минимальной протяженности строба
a.ActiveInTuning = true;
g2.List.push_back(a);
// конец «0 ЗТМ» = Tдс +6 мкс;
a.id = H0MS; // 0 град
a.StrobeIndex = 1; // ЗТМ
a.Action = maMoveEndGate; // Изменение конца строба
a.Delta = +6; // начало «0 ЗТМ» = Tдс +6 мкс;
a.ValueType = rtt_mcs; // мкс
a.SkipTestGateLen = true; // игнорировать значение минимальной протяженности строба
a.ActiveInTuning = true;
g2.List.push_back(a);
/* // конец «0 ЭХО» = начало «0 ЗТМ» -1 мкс = Tдс – 2 мкс - 1 мкс;
a.id = H0E; // 0 град
a.StrobeIndex = 1; // ЭХО
a.Action = maMoveEndGate; // Изменение конца строба
a.Delta = - 3; // Tдс – 3 мкс;
a.ValueType = rtt_mcs; // мкс
a.SkipTestGateLen = false; // корректировать значение строба в зависимости от минимальной разрешенной протяженности строба
a.ActiveInTuning = false;
g2.List.push_back(a);
*/
RailTypeTuning.push_back(g2);
// --------------------------------
// Список групп каналов
GroupIndexList.push_back(1);
sBScanTape tape;
tBScanTapesList BScanTapesList;
tape.tapeConformity = 0;
tape.isVisibleInBoltJointMode = false;
BScanTapesList.push_back(tape);
tape.tapeConformity = 1;
tape.isVisibleInBoltJointMode = false;
BScanTapesList.push_back(tape);
tape.tapeConformity = 2;
tape.isVisibleInBoltJointMode = false;
BScanTapesList.push_back(tape);
tape.tapeConformity = 3;
tape.isVisibleInBoltJointMode = true;
BScanTapesList.push_back(tape);
tape.tapeConformity = 4;
tape.isVisibleInBoltJointMode = true;
BScanTapesList.push_back(tape);
BScanTapesGroupList.push_back(BScanTapesList);
// Допустимые отклонения (от нормативных) значений условной чувствительности
SensValidRangesList.resize(11);
SensValidRangesList[0].Channel = F70E; // Идентификатор канала - [Наезжающий; 70 град; Эхо;]
SensValidRangesList[0].MinSens = 12;
SensValidRangesList[0].MaxSens = 16;
SensValidRangesList[0].GateIndex = 1;
SensValidRangesList[1].Channel = B70E; // Идентификатор канала - [Отъезжающий; 70 град; Эхо;]
SensValidRangesList[1].MinSens = 12;
SensValidRangesList[1].MaxSens = 16;
SensValidRangesList[1].GateIndex = 1;
SensValidRangesList[2].Channel = F42E; // Идентификатор канала - [Наезжающий; 42 град; Эхо;]
SensValidRangesList[2].MinSens = 14;
SensValidRangesList[2].MaxSens = 18;
SensValidRangesList[2].GateIndex = 1;
SensValidRangesList[3].Channel = F42E; // Идентификатор канала - [Наезжающий; 42 град; Эхо;]
SensValidRangesList[3].MinSens = 14;
SensValidRangesList[3].MaxSens = 18;
SensValidRangesList[3].GateIndex = 2;
SensValidRangesList[4].Channel = B42E; // Идентификатор канала - [Отъезжающий; 42 град; Эхо;]
SensValidRangesList[4].MinSens = 14;
SensValidRangesList[4].MaxSens = 18;
SensValidRangesList[4].GateIndex = 1;
SensValidRangesList[5].Channel = B42E; // Идентификатор канала - [Отъезжающий; 42 град; Эхо;]
SensValidRangesList[5].MinSens = 14;
SensValidRangesList[5].MaxSens = 18;
SensValidRangesList[5].GateIndex = 2;
SensValidRangesList[6].Channel = F58EB; // Идентификатор канала - [Наезжающий; 58/34 град; Эхо; Обе грани]
SensValidRangesList[6].MinSens = 12;
SensValidRangesList[6].MaxSens = 16;
SensValidRangesList[6].GateIndex = 1;
SensValidRangesList[7].Channel = B58EB; // Идентификатор канала - [Отъезжающий; 58/34 град; Эхо; Обе грани]
SensValidRangesList[7].MinSens = 12;
SensValidRangesList[7].MaxSens = 16;
SensValidRangesList[7].GateIndex = 1;
SensValidRangesList[8].Channel = N0EMS; // Идентификатор канала - [Нет направления; 0 град; Эхо + ЗТМ]
SensValidRangesList[8].MinSens = 10;
SensValidRangesList[8].MaxSens = 16;
SensValidRangesList[8].GateIndex = 1;
SensValidRangesList[9].Channel = N0EMS; // Идентификатор канала - [Нет направления; 0 град; Эхо + ЗТМ]
SensValidRangesList[9].MinSens = 10;
SensValidRangesList[9].MaxSens = 14;
SensValidRangesList[9].GateIndex = 2;
SensValidRangesList[10].Channel = B58MB; // Идентификатор канала - [Отъезжающий; 58/34 град; Зеркальный; Обе грани]
SensValidRangesList[10].MinSens = 12;
SensValidRangesList[10].MaxSens = 16;
SensValidRangesList[10].GateIndex = 1;
}
cDeviceConfig_Av15_usbcan::~cDeviceConfig_Av15_usbcan(void)
{
for (size_t i = 0; i < ModeList.size(); i++) {
ModeList[i].List.resize(0);
}
}
unsigned char cDeviceConfig_Av15_usbcan::dBGain_to_UMUGain(char dBGain)
{
return static_cast<unsigned char>(GainBase + dBGain / GainStep);
}
| [
"veo86@bk.ru"
] | veo86@bk.ru |
5e3509baa6f7ab59f493f6334e3b4dbd87fc58f8 | 83857373cf14478a9db0002c9c17e317401dfd03 | /986_Interval_List_Intersections.cpp | 0311f84620344e57880a18c14b626cacbf9090d1 | [] | no_license | neoVincent/LeetCodePlayground | acdefed387158f4c53b9199498d9cd1c62b5e50e | 994b80108fd6dac8b413c858f5182a0e80adbf7b | refs/heads/master | 2021-06-11T03:37:46.534237 | 2019-10-03T00:28:16 | 2019-10-03T00:28:16 | 128,283,607 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,179 | cpp | 986_Interval_List_Intersections.cpp
class Solution {
public:
vector<vector<int>> intervalIntersection(vector<vector<int>>& A, vector<vector<int>>& B) {
size_t i = 0;
size_t j = 0;
vector<vector<int>> res;
while( i < A.size() && j < B.size())
{
const int s = max(A[i][0],B[j][0]);
const int e = min(A[i][1],B[j][1]);
if (s <= e)
res.push_back({s,e});
if (A[i][1] < B[j][1])
i++;
else
j++;
}
return res;
}
};
struct Event
{
int time;
int isStart;
Event(int t, int ss): time(t), isStart(ss){}
};
class Solution {
public:
vector<vector<int>> intervalIntersection(vector<vector<int>>& A, vector<vector<int>>& B) {
// sweep line
vector<Event> events;
for(auto a : A)
{
events.push_back({a[0],1});
events.push_back({a[1],0});
}
for(auto b: B)
{
events.push_back({b[0],1});
events.push_back({b[1],0});
}
std::sort(events.begin(),events.end(),[](const Event& lhs, const Event& rhs)
{
if (lhs.time != rhs.time)
return lhs.time < rhs.time;
else
return lhs.isStart > rhs.isStart;
});
// test
// for(auto e: events)
// {
// cout <<"time " << e.time<<endl;
// cout <<"isStart " << e.isStart << endl;
// }
int counter = 0;
vector<vector<int>> res;
stack<Event> stk;
for(auto e: events)
{
if (e.isStart == 1)
{
stk.push(e);
counter++;
}
else
{
auto pre = stk.top();
stk.pop();
if (counter > 1)
{
res.push_back({pre.time, e.time});
}
counter--;
}
}
return res;
}
};
| [
"neovincent@163.com"
] | neovincent@163.com |
7789dec343cdadf2bfe508a96d8fb2d98d018f51 | 4a5fe361026ae0554b5ac70b11520052fe1792e7 | /Tots.Compiler.Lib/Operators.h | 99ad66501915eab5bdd8c0acda6ed0f0a7bbd9b6 | [] | no_license | Artemoire/TotsRunner | 421b996363c5e45ddaebe14aa0c39d7223eede62 | 7b19df03b6a5ea10c66f8c24e511b85bfb4cab1b | refs/heads/master | 2021-01-25T14:10:07.181289 | 2018-03-26T19:50:06 | 2018-03-26T19:50:06 | 123,658,827 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 116 | h | #pragma once
namespace Tots
{
namespace Language
{
enum Operators
{
Add,
Sub,
Mul,
Div
};
}
}
| [
"dejan.tot@gmail.com"
] | dejan.tot@gmail.com |
6b22811310e94a0051a5d08e8b779af4910285ec | 58d7f6ae25decef02629166598565f806f07a563 | /Modules/Plexil/src/utils/test/jni-adapter.cc | e6b9780682159902b43d33503535782c796c8466 | [
"LicenseRef-scancode-warranty-disclaimer"
] | no_license | helloxss/icarous | 535695e97693fcb4dda24801d6d254f0cf00eb5f | b47268059776db0945eb03759bde07c697ff11e6 | refs/heads/master | 2020-04-04T15:36:29.840792 | 2018-10-19T13:18:48 | 2018-10-19T13:18:48 | 156,043,928 | 1 | 0 | null | 2018-11-04T02:57:56 | 2018-11-04T02:57:56 | null | UTF-8 | C++ | false | false | 3,061 | cc | /* Copyright (c) 2006-2016, Universities Space Research Association (USRA).
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the Universities Space Research Association 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 USRA ``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 USRA 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 "JNIUtils.hh"
#include "ScopedOstreamRedirect.hh"
#include "util-test-module.hh"
#include <iostream>
#include <iomanip>
#include <fstream>
#include <sstream>
#include <time.h>
using PLEXIL::JNIUtils;
std::string *logFileName(const char* dirname)
{
// Get current time and decode it in the local timeframe
time_t now;
time(&now);
struct tm nowtm;
localtime_r(&now, &nowtm);
std::ostringstream fnameBuilder;
fnameBuilder << dirname << "/utils-module-test-"
<< nowtm.tm_year + 1900
<< '-'
<< std::setw(2) << std::setfill('0')
<< nowtm.tm_mon + 1 << '-'
<< std::setw(2) << nowtm.tm_mday << '_'
<< std::setw(2) << nowtm.tm_hour << ':'
<< std::setw(2) << nowtm.tm_min << ':'
<< std::setw(2) << nowtm.tm_sec
<< ".log";
return new std::string(fnameBuilder.str());
}
extern "C"
jint Java_gov_nasa_plexil_android_UtilsModuleTest_run(JNIEnv *env, jobject /* java_this */, jstring workingDirPath)
{
JNIUtils jni(env);
char* logDir = jni.getJavaStringCopy(workingDirPath);
if (logDir == NULL)
return -1;
// Route cout and cerr to a log file.
std::string* logName = logFileName(logDir);
std::ofstream log(logName->c_str());
if (log.fail()) {
delete logName;
delete[] logdir;
return -1;
}
PLEXIL::ScopedOstreamRedirect coutRedirect(std::cout, log);
PLEXIL::ScopedOstreamRedirect cerrRedirect(std::cerr, log);
UtilModuleTests::runTests(*logName);
delete logName;
delete[] logDir;
return 0;
}
| [
"swee.balachandran@nianet.org"
] | swee.balachandran@nianet.org |
9bba8f76b7c8b1914829c7542094147ee02bef42 | 6dcb0521757c4ff2850c77fd573f6e0d486ff23e | /assignment12.cpp | a2903d4016684d7e46cab60d7fc4e1638b02be41 | [] | no_license | ROHROCK/CGG | 07ab5dc874fc12f8a2977a6c3ee2d346b06a6721 | 2924a86f259906c30f9f85e35b7d3d72dccac6fc | refs/heads/master | 2021-09-11T15:20:34.756995 | 2018-04-09T05:56:09 | 2018-04-09T05:56:09 | 114,727,251 | 0 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 4,270 | cpp | #include <stdio.h>
#include <iostream>
#include <graphics.h>
//#include <dos.h>
int main() {
int gdriver = DETECT, gmode = VGAMAX, err;
int i = 0, j, x, y, x1, y1, x2, y2;
initgraph(&gdriver, &gmode, NULL);
j = 0;
/* initialize position for boat */
x = 50, y = getmaxy() / 2 + 140;
while (x + 60 < getmaxx()) {
/* setting positions for rain */
x1 = 10, i = y1 = 0;
x2 = 0, y2 = 50;
/* clears graphic screen */
cleardevice();
/* setting the color of the river/sea */
setcolor(LIGHTBLUE);
setlinestyle(SOLID_LINE, 1, 1);
//setfillstyle(SOLID_FILL, LIGHTBLUE);
/* draw the river/sea */
rectangle(0, getmaxy() / 2 + 150, getmaxx(), getmaxy());
floodfill(getmaxx() - 10, getmaxy() - 10, LIGHTBLUE);
/* rain drops */
setlinestyle(DASHED_LINE, 1, 2);
while (i< 700 ) {
line(x1, y1, x2, y2);
x1 = x1 + 20;
y2 = y2 + 50;
i++;
}
/* drawing the boat */
setlinestyle(SOLID_LINE, 1, 2);
setcolor(BROWN);
//setfillstyle(SOLID_FILL, BROWN);
sector(x, y, 180, 360, 50, 10);
setcolor(DARKGRAY);
setlinestyle(SOLID_LINE, 1, 3);
/* leg and body of stick man */
line(x + 40, y - 15, x + 40, y - 40);
line(x + 40, y - 15, x + 45, y - 10);
line(x + 45, y - 10, x + 45, y);
line(x + 40, y - 15, x + 37, y);
/* head and hand of stick man */
circle(x + 40, y - 45, 5);
line(x + 40, y - 35, x + 50, y - 30);
line(x + 40, y - 35, x + 35, y - 32);
line(x + 35, y - 32, x + 45, y - 25);
line(x + 60, y - 45, x + 27, y + 10);
/* moving the position of boat and stick man */
x++;
setcolor(LIGHTBLUE);
delay(250);
/* clears the graphic device */
cleardevice();
/* drawing sea/river */
setlinestyle(SOLID_LINE, 1, 1);
//setfillstyle(SOLID_FILL, LIGHTBLUE);
setColour(BLUE);
rectangle(0, getmaxy() / 2 + 150, getmaxx(), getmaxy());
floodfill(getmaxx() - 10, getmaxy() - 10, LIGHTBLUE);
/* rain drops */
setlinestyle(DASHED_LINE, 1, 2);
x1 = 10, i = y1 = 0;
x2 = 0, y2 = 70;
while (i < 700) {
line(x1, y1, x2, y2);
x1 = x1 + 30;
y2 = y2 + 60;
i++;
}
/* drawing boat */
setlinestyle(SOLID_LINE, 1, 1);
setcolor(BROWN);
//setfillstyle(SOLID_FILL, BROWN);
sector(x, y, 180, 360, 50, 10);
/* body and leg of stic man */
setcolor(DARKGRAY);
setlinestyle(SOLID_LINE, 1, 3);
line(x + 40, y - 15, x + 40, y - 40);
line(x + 40, y - 15, x + 45, y - 10);
line(x + 45, y - 10, x + 45, y);
line(x + 40, y - 15, x + 37, y);
/* head, hands of stick man */
circle(x + 40, y - 45, 5);
line(x + 40, y - 35, x + 52, y - 30);
line(x + 40, y - 35, x + 37, y - 32);
line(x + 37, y - 32, x + 49, y - 25);
line(x + 60, y - 45, x + 27, y + 10);
/* forwarding the position of the boat */
x++;
/* sleep for 250 milliseconds */
delay(250);
/* clears the graphic device */
cleardevice();
j++;
}
getch();
/* deallocate memory allocated for graphic screen */
closegraph();
return 0;
}
| [
"rohitsa40@gmail.com"
] | rohitsa40@gmail.com |
49b1d6467f4325bff0c1261b95b66f9a27dbc8e8 | 38ec302d0d0d2582c858edf5e9f204f79415f4df | /willybsort/main.cpp | a6bc2a367ee70e3e48fbb58396e9f1030d421d39 | [] | no_license | volkerbruhn/willybsort | c0d60af26149504b7bc5c9d1dd7d56b8d738964f | f6fc52f1e836b43795b48afa3d6ad5e58249168d | refs/heads/master | 2020-12-05T03:21:24.558546 | 2016-08-17T22:09:33 | 2016-08-17T22:09:33 | 65,944,010 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 167 | cpp |
using namespace std;
#include "bubblesortClass.h"
int main() {
bubblesortClass sort;
sort.listeEingeben();
sort.bubblesort();
sort.listeAusgeben();
return 0;
}
| [
"volker.bruhn@gmx.de"
] | volker.bruhn@gmx.de |
068cff39dd89cf0b68628117274ef68f144122bf | ac1c9fbc1f1019efb19d0a8f3a088e8889f1e83c | /out/release/gen/components/performance_manager/public/mojom/lifecycle.mojom-shared.h | ba8aa643d18100c45791922a76a1af48fe18d87d | [
"BSD-3-Clause"
] | permissive | xueqiya/chromium_src | 5d20b4d3a2a0251c063a7fb9952195cda6d29e34 | d4aa7a8f0e07cfaa448fcad8c12b29242a615103 | refs/heads/main | 2022-07-30T03:15:14.818330 | 2021-01-16T16:47:22 | 2021-01-16T16:47:22 | 330,115,551 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,352 | h | // components/performance_manager/public/mojom/lifecycle.mojom-shared.h is auto generated by mojom_bindings_generator.py, do not edit
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef COMPONENTS_PERFORMANCE_MANAGER_PUBLIC_MOJOM_LIFECYCLE_MOJOM_SHARED_H_
#define COMPONENTS_PERFORMANCE_MANAGER_PUBLIC_MOJOM_LIFECYCLE_MOJOM_SHARED_H_
#include <stdint.h>
#include <functional>
#include <ostream>
#include <type_traits>
#include <utility>
#include "base/compiler_specific.h"
#include "base/containers/flat_map.h"
#include "mojo/public/cpp/bindings/array_data_view.h"
#include "mojo/public/cpp/bindings/enum_traits.h"
#include "mojo/public/cpp/bindings/interface_data_view.h"
#include "mojo/public/cpp/bindings/lib/bindings_internal.h"
#include "mojo/public/cpp/bindings/lib/serialization.h"
#include "mojo/public/cpp/bindings/map_data_view.h"
#include "mojo/public/cpp/bindings/string_data_view.h"
#include "components/performance_manager/public/mojom/lifecycle.mojom-shared-internal.h"
#include "base/component_export.h"
namespace performance_manager {
namespace mojom {
} // namespace mojom
} // namespace performance_manager
namespace mojo {
namespace internal {
} // namespace internal
} // namespace mojo
namespace performance_manager {
namespace mojom {
enum class LifecycleState : int32_t {
kRunning,
kFrozen,
kDiscarded,
kMinValue = 0,
kMaxValue = 2,
};
COMPONENT_EXPORT(PERFORMANCE_MANAGER_PUBLIC_MOJOM_SHARED) std::ostream& operator<<(std::ostream& os, LifecycleState value);
inline bool IsKnownEnumValue(LifecycleState value) {
return internal::LifecycleState_Data::IsKnownValue(
static_cast<int32_t>(value));
}
} // namespace mojom
} // namespace performance_manager
namespace std {
template <>
struct hash<::performance_manager::mojom::LifecycleState>
: public mojo::internal::EnumHashImpl<::performance_manager::mojom::LifecycleState> {};
} // namespace std
namespace mojo {
template <>
struct EnumTraits<::performance_manager::mojom::LifecycleState, ::performance_manager::mojom::LifecycleState> {
static ::performance_manager::mojom::LifecycleState ToMojom(::performance_manager::mojom::LifecycleState input) { return input; }
static bool FromMojom(::performance_manager::mojom::LifecycleState input, ::performance_manager::mojom::LifecycleState* output) {
*output = input;
return true;
}
};
namespace internal {
template <typename MaybeConstUserType>
struct Serializer<::performance_manager::mojom::LifecycleState, MaybeConstUserType> {
using UserType = typename std::remove_const<MaybeConstUserType>::type;
using Traits = EnumTraits<::performance_manager::mojom::LifecycleState, UserType>;
static void Serialize(UserType input, int32_t* output) {
*output = static_cast<int32_t>(Traits::ToMojom(input));
}
static bool Deserialize(int32_t input, UserType* output) {
return Traits::FromMojom(static_cast<::performance_manager::mojom::LifecycleState>(input), output);
}
};
} // namespace internal
} // namespace mojo
namespace performance_manager {
namespace mojom {
} // namespace mojom
} // namespace performance_manager
#endif // COMPONENTS_PERFORMANCE_MANAGER_PUBLIC_MOJOM_LIFECYCLE_MOJOM_SHARED_H_ | [
"xueqi@zjmedia.net"
] | xueqi@zjmedia.net |
d01cf5aa8a30e1e16bf6b9452b0e450a61165b11 | fd68d8e0e7e0bf269d2eed873aa4cf74321bd4ed | /Google/data structures/segment trees.cpp | f0a7a3dc193f40a25cf5d83cec232bf560ee30b1 | [] | no_license | Lawrenceh/AC_Monster | 06b127ec3e49d1dce3cf79fe01a1692f4f2567ae | 7eb5519008ea3456e533d3865c61434d109702a9 | refs/heads/master | 2021-01-25T08:48:22.354927 | 2018-01-25T05:21:28 | 2018-01-25T05:21:28 | 24,482,846 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,917 | cpp | /* Segment trees on RMQ problem */
root: [i, j]
children: left [i, (i + j) / 2], right [(i + j) / 2 + 1, j]
height: h = floor(logN) + 1
We need an array M[1, 2*2^h] where M[i] holds min value position in the interval assigned to node i.
/* array M initialized with -1 */
void initialize(int node, int b, int e, int M[MAXIND], int A[MAXN], int N) {
if (b == e) {
M[node] = b;
} else {
initialize(2 * node, b, (b + e) / 2, M, A, N);
initialize(2 * node + 1, (b + e) / 2 + 1, e, M, A, N);
if (A[M[2 * node]] <= A[M[2 * node + 1]]) M[node] = M[2 * node];
else M[node] = M[2 * node + 1];
}
}
/* query on [i, j], starting with first node (root) */
int query(int node, int b, int e, int M[MAXIND], int A[MAXN], int i, int j) {
int p1, p2;
//if the current interval doesn't intersect the query interval, return -1
if (i > e || j < b) return -1;
//if the current interval is included in the query interval, return M[node]
if (b >= i && e <= j) return M[node]; // return the part in current node
p1 = query(2 * node, b, (b + e) / 2, M, A, i, j);
p2 = query(2 * node + 1, (b + e) / 2 + 1, e, M, A, i, j);
if (p1 == -1) return p2;
if (p2 == -1) return p1;
if (A[p1] <= A[p2]) return p1;
else return p2;
}
Complexity: <O(N), O(logN)> (preprocessing time, query time)
Example: leetcode 307
class NumArray {
public:
vector<int> v;
int *a;
int n;
void buildTree(int node, int begin, int end) {
if (begin == end) {
a[node] = v[begin];
} else {
buildTree(node * 2, begin, (begin + end) / 2);
buildTree(node * 2 + 1, (begin + end) / 2 + 1, end);
a[node] = a[node * 2] + a[node * 2 + 1];
}
}
NumArray(vector<int> nums) {
if (nums.empty()) return;
v = nums;
n = nums.size();
a = new int[n * 4 + 1];
memset(a, 0, sizeof(int) * (n * 4 + 1));
buildTree(1, 0, n - 1);
}
int update(int node, int begin, int end, int i, int j, int val) {
int p, q;
if (i > end || j < begin) return a[node];
if (begin >= i && end <= j) {
return a[node] = val;
}
p = update(node * 2, begin, (begin + end) / 2, i, j, val);
q = update(node * 2 + 1, (begin + end) / 2 + 1, end, i, j, val);
return a[node] = (p + q);
}
void update(int i, int val) {
update(1, 0, n - 1, i, i, val);
}
int query(int node, int begin, int end, int i, int j) {
int p, q;
if (i > end || j < begin) return 0;
if (begin >= i && end <= j) return a[node];
p = query(node * 2, begin, (begin + end) / 2, i, j);
q = query(node * 2 + 1, (begin + end) / 2 + 1, end, i, j);
return p + q;
}
int sumRange(int i, int j) {
return query(1, 0, n - 1, i, j);
}
};
| [
"lawrencehuangyiling@gmail.com"
] | lawrencehuangyiling@gmail.com |
7471994747dd87cc18278e124baa8f5624b8171e | ec36ca9cc8467f135361c64e762e4654618733c8 | /src/Cxx/ImageProcessing/RescaleAnImage.cxx | a6752eadb07256ce51f831a47694450fa9e19760 | [
"Apache-2.0"
] | permissive | acimpoeru/VTKExamples | b37b2c06b0a8969e09a8800296c7f492185e06fe | fb0d291c1326074aa55e30bb355e8cff7590f196 | refs/heads/master | 2021-05-12T19:36:00.534424 | 2018-01-11T04:23:41 | 2018-01-11T04:23:41 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,011 | cxx | #include <vtkImageData.h>
#include <vtkImageShiftScale.h>
#include <vtkMath.h>
#include <vtkSmartPointer.h>
static void CreateImage(vtkImageData* const image);
int main(int argc, char *argv[])
{
vtkSmartPointer<vtkImageData> image = vtkSmartPointer<vtkImageData>::New();
CreateImage(image);
vtkSmartPointer<vtkImageShiftScale> shiftScaleFilter =
vtkSmartPointer<vtkImageShiftScale>::New();
shiftScaleFilter->SetOutputScalarTypeToUnsignedChar();
#if VTK_MAJOR_VERSION <= 5
shiftScaleFilter->SetInputConnection(image->GetProducerPort());
#else
shiftScaleFilter->SetInputData(image);
#endif
shiftScaleFilter->SetShift(-1.0f * image->GetScalarRange()[0]); // brings the lower bound to 0
float oldRange = image->GetScalarRange()[1] - image->GetScalarRange()[0];
std::cout << "Old range: [" << image->GetScalarRange()[0] << ", " << image->GetScalarRange()[1] << "]" << std::endl;
std::cout << "Old range magnitude: " << oldRange << std::endl;
float newRange = 255; // We want the output [0,255]
shiftScaleFilter->SetScale(newRange/oldRange);
shiftScaleFilter->Update();
std::cout << "New range: [" << shiftScaleFilter->GetOutput()->GetScalarRange()[1] << ", " << shiftScaleFilter->GetOutput()->GetScalarRange()[1] << "]" << std::endl;
return EXIT_SUCCESS;
}
void CreateImage(vtkImageData* const image)
{
// Specify the size of the image data
image->SetDimensions(2,3,1);
#if VTK_MAJOR_VERSION <= 5
image->SetNumberOfScalarComponents(1);
image->SetScalarTypeToDouble();
image->AllocateScalars();
#else
image->AllocateScalars(VTK_DOUBLE,1);
#endif
int* dims = image->GetDimensions();
std::cout << "Dims: " << " x: " << dims[0] << " y: " << dims[1] << " z: " << dims[2] << std::endl;
for (int z = 0; z < dims[2]; z++)
{
for (int y = 0; y < dims[1]; y++)
{
for (int x = 0; x < dims[0]; x++)
{
double* pixel = static_cast<double*>(image->GetScalarPointer(x,y,z));
pixel[0] =vtkMath::Random(0.0,2000.0);
}
}
}
}
| [
"bill.lorensen@gmail.com"
] | bill.lorensen@gmail.com |
33c14d85b06fe2d19d1006d97b440569aefedfdb | b5385a3ffc767e90ca6afc29b8f3aeb25812c884 | /sketch_feb13a/sketch_feb13a.ino | d561f8a6624d45066231ef788596c677b32f0e0e | [] | no_license | hexmaster111/ArduinoThinkgs | 99d84bf0c48ad1d53a7cbf064e175aa90a0a5c2b | 4705230d00a8b44cfb84ef46f3213b654202f0df | refs/heads/master | 2021-01-21T05:23:47.208978 | 2017-02-26T05:23:54 | 2017-02-26T05:23:54 | 83,185,380 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 46,707 | ino | ////////////////////////////////////////////////////////////////////////////////
// TinyBasic Plus
////////////////////////////////////////////////////////////////////////////////
//
// Authors: Mike Field <hamster@snap.net.nz>
// Scott Lawrence <yorgle@gmail.com>
// Brian O'Dell <megamemnon@megamemnon.com>
#define kVersion "v0.14"
// v0.14: 2013-11-07
// Input command always set the variable to 99
// Modified Input command to accept an expression using getn()
// Syntax is "input x" where x is any variable
//
// v0.13: 2013-03-04
// Support for Arduino 1.5 (SPI.h included, additional changes for DUE support)
//
// v0.12: 2013-03-01
// EEPROM load and save routines added: EFORMAT, ELIST, ELOAD, ESAVE, ECHAIN
// added EAUTORUN option (chains to EEProm saved program on startup)
// Bugfixes to build properly on non-arduino systems (PROGMEM #define workaround)
// cleaned up a bit of the #define options wrt TONE
//
// v0.11: 2013-02-20
// all display strings and tables moved to PROGMEM to save space
// removed second serial
// removed pinMode completely, autoconf is explicit
// beginnings of EEPROM related functionality (new,load,save,list)
//
// v0.10: 2012-10-15
// added kAutoConf, which eliminates the "PINMODE" statement.
// now, DWRITE,DREAD,AWRITE,AREAD automatically set the PINMODE appropriately themselves.
// should save a few bytes in your programs.
//
// v0.09: 2012-10-12
// Fixed directory listings. FILES now always works. (bug in the SD library)
// ref: http://arduino.cc/forum/index.php/topic,124739.0.html
// fixed filesize printouts (added printUnum for unsigned numbers)
// #defineable baud rate for slow connection throttling
//e
// v0.08: 2012-10-02
// Tone generation through piezo added (TONE, TONEW, NOTONE)
//
// v0.07: 2012-09-30
// Autorun buildtime configuration feature
//
// v0.06: 2012-09-27
// Added optional second serial input, used for an external keyboard
//
// v0.05: 2012-09-21
// CHAIN to load and run a second file
// RND,RSEED for random stuff
// Added "!=" for "<>" synonym
// Added "END" for "STOP" synonym (proper name for the functionality anyway)
//
// v0.04: 2012-09-20
// DELAY ms - for delaying
// PINMODE <pin>, INPUT|IN|I|OUTPUT|OUT|O
// DWRITE <pin>, HIGH|HI|1|LOW|LO|0
// AWRITE <pin>, [0..255]
// fixed "save" appending to existing files instead of overwriting
// Updated for building desktop command line app (incomplete)
//
// v0.03: 2012-09-19
// Integrated Jurg Wullschleger whitespace,unary fix
// Now available through github
// Project renamed from "Tiny Basic in C" to "TinyBasic Plus"
//
// v0.02b: 2012-09-17 Scott Lawrence <yorgle@gmail.com>
// Better FILES listings
//
// v0.02a: 2012-09-17 Scott Lawrence <yorgle@gmail.com>
// Support for SD Library
// Added: SAVE, FILES (mostly works), LOAD (mostly works) (redirects IO)
// Added: MEM, ? (PRINT)
// Quirk: "10 LET A=B+C" is ok "10 LET A = B + C" is not.
// Quirk: INPUT seems broken?
// IF testing with Visual C, this needs to be the first thing in the file.
//#include "stdafx.h"
char eliminateCompileErrors = 1; // fix to suppress arduino build errors
// hack to let makefiles work with this file unchanged
#ifdef FORCE_DESKTOP
#undef ARDUINO
#include "desktop.h"
#else
#define ARDUINO 1
#endif
////////////////////////////////////////////////////////////////////////////////
// Feature option configuration...
// This enables LOAD, SAVE, FILES commands through the Arduino SD Library
// it adds 9k of usage as well.
//#define ENABLE_FILEIO 1
#undef ENABLE_FILEIO
// this turns on "autorun". if there's FileIO, and a file "autorun.bas",
// then it will load it and run it when starting up
//#define ENABLE_AUTORUN 1
#undef ENABLE_AUTORUN
// and this is the file that gets run
#define kAutorunFilename "autorun.bas"
// this is the alternate autorun. Autorun the program in the eeprom.
// it will load whatever is in the EEProm and run it
#define ENABLE_EAUTORUN 1
//#undef ENABLE_EAUTORUN
// this will enable the "TONE", "NOTONE" command using a piezo
// element on the specified pin. Wire the red/positive/piezo to the kPiezoPin,
// and the black/negative/metal disc to ground.
// it adds 1.5k of usage as well.
//#define ENABLE_TONES 1
#undef ENABLE_TONES
#define kPiezoPin 5
// we can use the EEProm to store a program during powerdown. This is
// 1kbyte on the '328, and 512 bytes on the '168. Enabling this here will
// allow for this funcitonality to work. Note that this only works on AVR
// arduino. Disable it for DUE/other devices.
#define ENABLE_EEPROM 1
//#undef ENABLE_EEPROM
// Sometimes, we connect with a slower device as the console.
// Set your console D0/D1 baud rate here (9600 baud default)
#define kConsoleBaud 9600
////////////////////////////////////////////////////////////////////////////////
#ifdef ARDUINO
#ifndef RAMEND
// okay, this is a hack for now
// if we're in here, we're a DUE probably (ARM instead of AVR)
#define RAMEND 4096-1
// turn off EEProm
#undef ENABLE_EEPROM
#undef ENABLE_TONES
#else
// we're an AVR!
// we're moving our data strings into progmem
#include <avr/pgmspace.h>
#endif
// includes, and settings for Arduino-specific functionality
#ifdef ENABLE_EEPROM
#include <EEPROM.h> /* NOTE: case sensitive */
int eepos = 0;
#endif
#ifdef ENABLE_FILEIO
#include <SD.h>
#include <SPI.h> /* needed as of 1.5 beta */
// Arduino-specific configuration
// set this to the card select for your SD shield
#define kSD_CS 10
#define kSD_Fail 0
#define kSD_OK 1
File fp;
#endif
// set up our RAM buffer size for program and user input
// NOTE: This number will have to change if you include other libraries.
#ifdef ARDUINO
#ifdef ENABLE_FILEIO
#define kRamFileIO (1030) /* approximate */
#else
#define kRamFileIO (0)
#endif
#ifdef ENABLE_TONES
#define kRamTones (40)
#else
#define kRamTones (0)
#endif
#endif /* ARDUINO */
#define kRamSize (RAMEND - 1160 - kRamFileIO - kRamTones)
#ifndef ARDUINO
// Not arduino setup
#include <stdio.h>
#include <stdlib.h>
#undef ENABLE_TONES
// size of our program ram
#define kRamSize 4096 /* arbitrary */
#ifdef ENABLE_FILEIO
FILE * fp;
#endif
#endif
#ifdef ENABLE_FILEIO
// functions defined elsehwere
void cmd_Files( void );
#endif
////////////////////
#ifndef boolean
#define boolean int
#define true 1
#define false 0
#endif
#endif
#ifndef byte
typedef unsigned char byte;
#endif
// some catches for AVR based text string stuff...
#ifndef PROGMEM
#define PROGMEM
#endif
#ifndef pgm_read_byte
#define pgm_read_byte( A ) *(A)
#endif
////////////////////
#ifdef ENABLE_FILEIO
unsigned char * filenameWord(void);
static boolean sd_is_initialized = false;
#endif
boolean inhibitOutput = false;
static boolean runAfterLoad = false;
static boolean triggerRun = false;
// these will select, at runtime, where IO happens through for load/save
enum {
kStreamSerial = 0,
kStreamEEProm,
kStreamFile
};
static unsigned char inStream = kStreamSerial;
static unsigned char outStream = kStreamSerial;
////////////////////////////////////////////////////////////////////////////////
// ASCII Characters
#define CR '\r'
#define NL '\n'
#define LF 0x0a
#define TAB '\t'
#define BELL '\b'
#define SPACE ' '
#define SQUOTE '\''
#define DQUOTE '\"'
#define CTRLC 0x03
#define CTRLH 0x08
#define CTRLS 0x13
#define CTRLX 0x18
typedef short unsigned LINENUM;
#ifdef ARDUINO
#define ECHO_CHARS 1
#else
#define ECHO_CHARS 0
#endif
static unsigned char program[kRamSize];
static const char * sentinel = "HELLO";
static unsigned char *txtpos,*list_line, *tmptxtpos;
static unsigned char expression_error;
static unsigned char *tempsp;
/***********************************************************/
// Keyword table and constants - the last character has 0x80 added to it
const static unsigned char keywords[] PROGMEM = {
'L','I','S','T'+0x80,
'L','O','A','D'+0x80,
'N','E','W'+0x80,
'R','U','N'+0x80,
'S','A','V','E'+0x80,
'N','E','X','T'+0x80,
'L','E','T'+0x80,
'I','F'+0x80,
'G','O','T','O'+0x80,
'G','O','S','U','B'+0x80,
'R','E','T','U','R','N'+0x80,
'R','E','M'+0x80,
'F','O','R'+0x80,
'I','N','P','U','T'+0x80,
'P','R','I','N','T'+0x80,
'P','O','K','E'+0x80,
'S','T','O','P'+0x80,
'B','Y','E'+0x80,
'F','I','L','E','S'+0x80,
'M','E','M'+0x80,
'?'+ 0x80,
'\''+ 0x80,
'A','W','R','I','T','E'+0x80,
'D','W','R','I','T','E'+0x80,
'D','E','L','A','Y'+0x80,
'E','N','D'+0x80,
'R','S','E','E','D'+0x80,
'C','H','A','I','N'+0x80,
#ifdef ENABLE_TONES
'T','O','N','E','W'+0x80,
'T','O','N','E'+0x80,
'N','O','T','O','N','E'+0x80,
#endif
#ifdef ARDUINO
#ifdef ENABLE_EEPROM
'E','C','H','A','I','N'+0x80,
'E','L','I','S','T'+0x80,
'E','L','O','A','D'+0x80,
'E','F','O','R','M','A','T'+0x80,
'E','S','A','V','E'+0x80,
#endif
#endif
0
};
// by moving the command list to an enum, we can easily remove sections
// above and below simultaneously to selectively obliterate functionality.
enum {
KW_LIST = 0,
KW_LOAD, KW_NEW, KW_RUN, KW_SAVE,
KW_NEXT, KW_LET, KW_IF,
KW_GOTO, KW_GOSUB, KW_RETURN,
KW_REM,
KW_FOR,
KW_INPUT, KW_PRINT,
KW_POKE,
KW_STOP, KW_BYE,
KW_FILES,
KW_MEM,
KW_QMARK, KW_QUOTE,
KW_AWRITE, KW_DWRITE,
KW_DELAY,
KW_END,
KW_RSEED,
KW_CHAIN,
#ifdef ENABLE_TONES
KW_TONEW, KW_TONE, KW_NOTONE,
#endif
#ifdef ARDUINO
#ifdef ENABLE_EEPROM
KW_ECHAIN, KW_ELIST, KW_ELOAD, KW_EFORMAT, KW_ESAVE,
#endif
#endif
KW_DEFAULT /* always the final one*/
};
struct stack_for_frame {
char frame_type;
char for_var;
short int terminal;
short int step;
unsigned char *current_line;
unsigned char *txtpos;
};
struct stack_gosub_frame {
char frame_type;
unsigned char *current_line;
unsigned char *txtpos;
};
const static unsigned char func_tab[] PROGMEM = {
'P','E','E','K'+0x80,
'A','B','S'+0x80,
'A','R','E','A','D'+0x80,
'D','R','E','A','D'+0x80,
'R','N','D'+0x80,
0
};
#define FUNC_PEEK 0
#define FUNC_ABS 1
#define FUNC_AREAD 2
#define FUNC_DREAD 3
#define FUNC_RND 4
#define FUNC_UNKNOWN 5
const static unsigned char to_tab[] PROGMEM = {
'T','O'+0x80,
0
};
const static unsigned char step_tab[] PROGMEM = {
'S','T','E','P'+0x80,
0
};
const static unsigned char relop_tab[] PROGMEM = {
'>','='+0x80,
'<','>'+0x80,
'>'+0x80,
'='+0x80,
'<','='+0x80,
'<'+0x80,
'!','='+0x80,
0
};
#define RELOP_GE 0
#define RELOP_NE 1
#define RELOP_GT 2
#define RELOP_EQ 3
#define RELOP_LE 4
#define RELOP_LT 5
#define RELOP_NE_BANG 6
#define RELOP_UNKNOWN 7
const static unsigned char highlow_tab[] PROGMEM = {
'H','I','G','H'+0x80,
'H','I'+0x80,
'L','O','W'+0x80,
'L','O'+0x80,
0
};
#define HIGHLOW_HIGH 1
#define HIGHLOW_UNKNOWN 4
#define STACK_SIZE (sizeof(struct stack_for_frame)*5)
#define VAR_SIZE sizeof(short int) // Size of variables in bytes
static unsigned char *stack_limit;
static unsigned char *program_start;
static unsigned char *program_end;
static unsigned char *stack; // Software stack for things that should go on the CPU stack
static unsigned char *variables_begin;
static unsigned char *current_line;
static unsigned char *sp;
#define STACK_GOSUB_FLAG 'G'
#define STACK_FOR_FLAG 'F'
static unsigned char table_index;
static LINENUM linenum;
static const unsigned char okmsg[] PROGMEM = "OK";
static const unsigned char whatmsg[] PROGMEM = "What? ";
static const unsigned char howmsg[] PROGMEM = "How?";
static const unsigned char sorrymsg[] PROGMEM = "Sorry!";
static const unsigned char initmsg[] PROGMEM = "TinyBasic Plus " kVersion;
static const unsigned char memorymsg[] PROGMEM = " bytes free.";
#ifdef ARDUINO
#ifdef ENABLE_EEPROM
static const unsigned char eeprommsg[] PROGMEM = " EEProm bytes total.";
static const unsigned char eepromamsg[] PROGMEM = " EEProm bytes available.";
#endif
#endif
static const unsigned char breakmsg[] PROGMEM = "break!";
static const unsigned char unimplimentedmsg[] PROGMEM = "Unimplemented";
static const unsigned char backspacemsg[] PROGMEM = "\b \b";
static const unsigned char indentmsg[] PROGMEM = " ";
static const unsigned char sderrormsg[] PROGMEM = "SD card error.";
static const unsigned char sdfilemsg[] PROGMEM = "SD file error.";
static const unsigned char dirextmsg[] PROGMEM = "(dir)";
static const unsigned char slashmsg[] PROGMEM = "/";
static const unsigned char spacemsg[] PROGMEM = " ";
static int inchar(void);
static void outchar(unsigned char c);
static void line_terminator(void);
static short int expression(void);
static unsigned char breakcheck(void);
/***************************************************************************/
static void ignore_blanks(void)
{
while(*txtpos == SPACE || *txtpos == TAB)
txtpos++;
}
/***************************************************************************/
static void scantable(const unsigned char *table)
{
int i = 0;
table_index = 0;
while(1)
{
// Run out of table entries?
if(pgm_read_byte( table ) == 0)
return;
// Do we match this character?
if(txtpos[i] == pgm_read_byte( table ))
{
i++;
table++;
}
else
{
// do we match the last character of keywork (with 0x80 added)? If so, return
if(txtpos[i]+0x80 == pgm_read_byte( table ))
{
txtpos += i+1; // Advance the pointer to following the keyword
ignore_blanks();
return;
}
// Forward to the end of this keyword
while((pgm_read_byte( table ) & 0x80) == 0)
table++;
// Now move on to the first character of the next word, and reset the position index
table++;
table_index++;
ignore_blanks();
i = 0;
}
}
}
/***************************************************************************/
static void pushb(unsigned char b)
{
sp--;
*sp = b;
}
/***************************************************************************/
static unsigned char popb()
{
unsigned char b;
b = *sp;
sp++;
return b;
}
/***************************************************************************/
void printnum(int num)
{
int digits = 0;
if(num < 0)
{
num = -num;
outchar('-');
}
do {
pushb(num%10+'0');
num = num/10;
digits++;
}
while (num > 0);
while(digits > 0)
{
outchar(popb());
digits--;
}
}
void printUnum(unsigned int num)
{
int digits = 0;
do {
pushb(num%10+'0');
num = num/10;
digits++;
}
while (num > 0);
while(digits > 0)
{
outchar(popb());
digits--;
}
}
/***************************************************************************/
static unsigned short testnum(void)
{
unsigned short num = 0;
ignore_blanks();
while(*txtpos>= '0' && *txtpos <= '9' )
{
// Trap overflows
if(num >= 0xFFFF/10)
{
num = 0xFFFF;
break;
}
num = num *10 + *txtpos - '0';
txtpos++;
}
return num;
}
/***************************************************************************/
static unsigned char print_quoted_string(void)
{
int i=0;
unsigned char delim = *txtpos;
if(delim != '"' && delim != '\'')
return 0;
txtpos++;
// Check we have a closing delimiter
while(txtpos[i] != delim)
{
if(txtpos[i] == NL)
return 0;
i++;
}
// Print the characters
while(*txtpos != delim)
{
outchar(*txtpos);
txtpos++;
}
txtpos++; // Skip over the last delimiter
return 1;
}
/***************************************************************************/
void printmsgNoNL(const unsigned char *msg)
{
while( pgm_read_byte( msg ) != 0 ) {
outchar( pgm_read_byte( msg++ ) );
};
}
/***************************************************************************/
void printmsg(const unsigned char *msg)
{
printmsgNoNL(msg);
line_terminator();
}
/***************************************************************************/
static void getln(char prompt)
{
outchar(prompt);
txtpos = program_end+sizeof(LINENUM);
while(1)
{
char c = inchar();
switch(c)
{
case NL:
//break;
case CR:
line_terminator();
// Terminate all strings with a NL
txtpos[0] = NL;
return;
case CTRLH:
if(txtpos == program_end)
break;
txtpos--;
printmsg(backspacemsg);
break;
default:
// We need to leave at least one space to allow us to shuffle the line into order
if(txtpos == variables_begin-2)
outchar(BELL);
else
{
txtpos[0] = c;
txtpos++;
outchar(c);
}
}
}
}
/***************************************************************************/
static unsigned char *findline(void)
{
unsigned char *line = program_start;
while(1)
{
if(line == program_end)
return line;
if(((LINENUM *)line)[0] >= linenum)
return line;
// Add the line length onto the current address, to get to the next line;
line += line[sizeof(LINENUM)];
}
}
/***************************************************************************/
static void toUppercaseBuffer(void)
{
unsigned char *c = program_end+sizeof(LINENUM);
unsigned char quote = 0;
while(*c != NL)
{
// Are we in a quoted string?
if(*c == quote)
quote = 0;
else if(*c == '"' || *c == '\'')
quote = *c;
else if(quote == 0 && *c >= 'a' && *c <= 'z')
*c = *c + 'A' - 'a';
c++;
}
}
/***************************************************************************/
void printline()
{
LINENUM line_num;
line_num = *((LINENUM *)(list_line));
list_line += sizeof(LINENUM) + sizeof(char);
// Output the line */
printnum(line_num);
outchar(' ');
while(*list_line != NL)
{
outchar(*list_line);
list_line++;
}
list_line++;
line_terminator();
}
/***************************************************************************/
static short int expr4(void)
{
// fix provided by Jurg Wullschleger wullschleger@gmail.com
// fixes whitespace and unary operations
ignore_blanks();
if( *txtpos == '-' ) {
txtpos++;
return -expr4();
}
// end fix
if(*txtpos == '0')
{
txtpos++;
return 0;
}
if(*txtpos >= '1' && *txtpos <= '9')
{
short int a = 0;
do {
a = a*10 + *txtpos - '0';
txtpos++;
}
while(*txtpos >= '0' && *txtpos <= '9');
return a;
}
// Is it a function or variable reference?
if(txtpos[0] >= 'A' && txtpos[0] <= 'Z')
{
short int a;
// Is it a variable reference (single alpha)
if(txtpos[1] < 'A' || txtpos[1] > 'Z')
{
a = ((short int *)variables_begin)[*txtpos - 'A'];
txtpos++;
return a;
}
// Is it a function with a single parameter
scantable(func_tab);
if(table_index == FUNC_UNKNOWN)
goto expr4_error;
unsigned char f = table_index;
if(*txtpos != '(')
goto expr4_error;
txtpos++;
a = expression();
if(*txtpos != ')')
goto expr4_error;
txtpos++;
switch(f)
{
case FUNC_PEEK:
return program[a];
case FUNC_ABS:
if(a < 0)
return -a;
return a;
#ifdef ARDUINO
case FUNC_AREAD:
pinMode( a, INPUT );
return analogRead( a );
case FUNC_DREAD:
pinMode( a, INPUT );
return digitalRead( a );
#endif
case FUNC_RND:
#ifdef ARDUINO
return( random( a ));
#else
return( rand() % a );
#endif
}
}
if(*txtpos == '(')
{
short int a;
txtpos++;
a = expression();
if(*txtpos != ')')
goto expr4_error;
txtpos++;
return a;
}
expr4_error:
expression_error = 1;
return 0;
}
/***************************************************************************/
static short int expr3(void)
{
short int a,b;
a = expr4();
ignore_blanks(); // fix for eg: 100 a = a + 1
while(1)
{
if(*txtpos == '*')
{
txtpos++;
b = expr4();
a *= b;
}
else if(*txtpos == '/')
{
txtpos++;
b = expr4();
if(b != 0)
a /= b;
else
expression_error = 1;
}
else
return a;
}
}
/***************************************************************************/
static short int expr2(void)
{
short int a,b;
if(*txtpos == '-' || *txtpos == '+')
a = 0;
else
a = expr3();
while(1)
{
if(*txtpos == '-')
{
txtpos++;
b = expr3();
a -= b;
}
else if(*txtpos == '+')
{
txtpos++;
b = expr3();
a += b;
}
else
return a;
}
}
/***************************************************************************/
static short int expression(void)
{
short int a,b;
a = expr2();
// Check if we have an error
if(expression_error) return a;
scantable(relop_tab);
if(table_index == RELOP_UNKNOWN)
return a;
switch(table_index)
{
case RELOP_GE:
b = expr2();
if(a >= b) return 1;
break;
case RELOP_NE:
case RELOP_NE_BANG:
b = expr2();
if(a != b) return 1;
break;
case RELOP_GT:
b = expr2();
if(a > b) return 1;
break;
case RELOP_EQ:
b = expr2();
if(a == b) return 1;
break;
case RELOP_LE:
b = expr2();
if(a <= b) return 1;
break;
case RELOP_LT:
b = expr2();
if(a < b) return 1;
break;
}
return 0;
}
/***************************************************************************/
void loop()
{
unsigned char *start;
unsigned char *newEnd;
unsigned char linelen;
boolean isDigital;
boolean alsoWait = false;
int val;
#ifdef ARDUINO
#ifdef ENABLE_TONES
noTone( kPiezoPin );
#endif
#endif
program_start = program;
program_end = program_start;
sp = program+sizeof(program); // Needed for printnum
stack_limit = program+sizeof(program)-STACK_SIZE;
variables_begin = stack_limit - 27*VAR_SIZE;
// memory free
printnum(variables_begin-program_end);
printmsg(memorymsg);
#ifdef ARDUINO
#ifdef ENABLE_EEPROM
// eprom size
printnum( E2END+1 );
printmsg( eeprommsg );
#endif /* ENABLE_EEPROM */
#endif /* ARDUINO */
warmstart:
// this signifies that it is running in 'direct' mode.
current_line = 0;
sp = program+sizeof(program);
printmsg(okmsg);
prompt:
if( triggerRun ){
triggerRun = false;
current_line = program_start;
goto execline;
}
getln( '>' );
toUppercaseBuffer();
txtpos = program_end+sizeof(unsigned short);
// Find the end of the freshly entered line
while(*txtpos != NL)
txtpos++;
// Move it to the end of program_memory
{
unsigned char *dest;
dest = variables_begin-1;
while(1)
{
*dest = *txtpos;
if(txtpos == program_end+sizeof(unsigned short))
break;
dest--;
txtpos--;
}
txtpos = dest;
}
// Now see if we have a line number
linenum = testnum();
ignore_blanks();
if(linenum == 0)
goto direct;
if(linenum == 0xFFFF)
goto qhow;
// Find the length of what is left, including the (yet-to-be-populated) line header
linelen = 0;
while(txtpos[linelen] != NL)
linelen++;
linelen++; // Include the NL in the line length
linelen += sizeof(unsigned short)+sizeof(char); // Add space for the line number and line length
// Now we have the number, add the line header.
txtpos -= 3;
*((unsigned short *)txtpos) = linenum;
txtpos[sizeof(LINENUM)] = linelen;
// Merge it into the rest of the program
start = findline();
// If a line with that number exists, then remove it
if(start != program_end && *((LINENUM *)start) == linenum)
{
unsigned char *dest, *from;
unsigned tomove;
from = start + start[sizeof(LINENUM)];
dest = start;
tomove = program_end - from;
while( tomove > 0)
{
*dest = *from;
from++;
dest++;
tomove--;
}
program_end = dest;
}
if(txtpos[sizeof(LINENUM)+sizeof(char)] == NL) // If the line has no txt, it was just a delete
goto prompt;
// Make room for the new line, either all in one hit or lots of little shuffles
while(linelen > 0)
{
unsigned int tomove;
unsigned char *from,*dest;
unsigned int space_to_make;
space_to_make = txtpos - program_end;
if(space_to_make > linelen)
space_to_make = linelen;
newEnd = program_end+space_to_make;
tomove = program_end - start;
// Source and destination - as these areas may overlap we need to move bottom up
from = program_end;
dest = newEnd;
while(tomove > 0)
{
from--;
dest--;
*dest = *from;
tomove--;
}
// Copy over the bytes into the new space
for(tomove = 0; tomove < space_to_make; tomove++)
{
*start = *txtpos;
txtpos++;
start++;
linelen--;
}
program_end = newEnd;
}
goto prompt;
unimplemented:
printmsg(unimplimentedmsg);
goto prompt;
qhow:
printmsg(howmsg);
goto prompt;
qwhat:
printmsgNoNL(whatmsg);
if(current_line != NULL)
{
unsigned char tmp = *txtpos;
if(*txtpos != NL)
*txtpos = '^';
list_line = current_line;
printline();
*txtpos = tmp;
}
line_terminator();
goto prompt;
qsorry:
printmsg(sorrymsg);
goto warmstart;
run_next_statement:
while(*txtpos == ':')
txtpos++;
ignore_blanks();
if(*txtpos == NL)
goto execnextline;
goto interperateAtTxtpos;
direct:
txtpos = program_end+sizeof(LINENUM);
if(*txtpos == NL)
goto prompt;
interperateAtTxtpos:
if(breakcheck())
{
printmsg(breakmsg);
goto warmstart;
}
scantable(keywords);
switch(table_index)
{
case KW_DELAY:
{
#ifdef ARDUINO
expression_error = 0;
val = expression();
delay( val );
goto execnextline;
#else
goto unimplemented;
#endif
}
case KW_FILES:
goto files;
case KW_LIST:
goto list;
case KW_CHAIN:
goto chain;
case KW_LOAD:
goto load;
case KW_MEM:
goto mem;
case KW_NEW:
if(txtpos[0] != NL)
goto qwhat;
program_end = program_start;
goto prompt;
case KW_RUN:
current_line = program_start;
goto execline;
case KW_SAVE:
goto save;
case KW_NEXT:
goto next;
case KW_LET:
goto assignment;
case KW_IF:
short int val;
expression_error = 0;
val = expression();
if(expression_error || *txtpos == NL)
goto qhow;
if(val != 0)
goto interperateAtTxtpos;
goto execnextline;
case KW_GOTO:
expression_error = 0;
linenum = expression();
if(expression_error || *txtpos != NL)
goto qhow;
current_line = findline();
goto execline;
case KW_GOSUB:
goto gosub;
case KW_RETURN:
goto gosub_return;
case KW_REM:
case KW_QUOTE:
goto execnextline; // Ignore line completely
case KW_FOR:
goto forloop;
case KW_INPUT:
goto input;
case KW_PRINT:
case KW_QMARK:
goto print;
case KW_POKE:
goto poke;
case KW_END:
case KW_STOP:
// This is the easy way to end - set the current line to the end of program attempt to run it
if(txtpos[0] != NL)
goto qwhat;
current_line = program_end;
goto execline;
case KW_BYE:
// Leave the basic interperater
return;
case KW_AWRITE: // AWRITE <pin>, HIGH|LOW
isDigital = false;
goto awrite;
case KW_DWRITE: // DWRITE <pin>, HIGH|LOW
isDigital = true;
goto dwrite;
case KW_RSEED:
goto rseed;
#ifdef ENABLE_TONES
case KW_TONEW:
alsoWait = true;
case KW_TONE:
goto tonegen;
case KW_NOTONE:
goto tonestop;
#endif
#ifdef ARDUINO
#ifdef ENABLE_EEPROM
case KW_EFORMAT:
goto eformat;
case KW_ESAVE:
goto esave;
case KW_ELOAD:
goto eload;
case KW_ELIST:
goto elist;
case KW_ECHAIN:
goto echain;
#endif
#endif
case KW_DEFAULT:
goto assignment;
default:
break;
}
execnextline:
if(current_line == NULL) // Processing direct commands?
goto prompt;
current_line += current_line[sizeof(LINENUM)];
execline:
if(current_line == program_end) // Out of lines to run
goto warmstart;
txtpos = current_line+sizeof(LINENUM)+sizeof(char);
goto interperateAtTxtpos;
#ifdef ARDUINO
#ifdef ENABLE_EEPROM
elist:
{
int i;
for( i = 0 ; i < (E2END +1) ; i++ )
{
val = EEPROM.read( i );
if( val == '\0' ) {
goto execnextline;
}
if( ((val < ' ') || (val > '~')) && (val != NL) && (val != CR)) {
outchar( '?' );
}
else {
outchar( val );
}
}
}
goto execnextline;
eformat:
{
for( int i = 0 ; i < E2END ; i++ )
{
if( (i & 0x03f) == 0x20 ) outchar( '.' );
EEPROM.write( i, 0 );
}
outchar( LF );
}
goto execnextline;
esave:
{
outStream = kStreamEEProm;
eepos = 0;
// copied from "List"
list_line = findline();
while(list_line != program_end) {
printline();
}
outchar('\0');
// go back to standard output, close the file
outStream = kStreamSerial;
goto warmstart;
}
echain:
runAfterLoad = true;
eload:
// clear the program
program_end = program_start;
// load from a file into memory
eepos = 0;
inStream = kStreamEEProm;
inhibitOutput = true;
goto warmstart;
#endif /* ENABLE_EEPROM */
#endif
input:
{
unsigned char var;
int value;
ignore_blanks();
if(*txtpos < 'A' || *txtpos > 'Z')
goto qwhat;
var = *txtpos;
txtpos++;
ignore_blanks();
if(*txtpos != NL && *txtpos != ':')
goto qwhat;
inputagain:
tmptxtpos = txtpos;
getln( '?' );
toUppercaseBuffer();
txtpos = program_end+sizeof(unsigned short);
ignore_blanks();
expression_error = 0;
value = expression();
if(expression_error)
goto inputagain;
((short int *)variables_begin)[var-'A'] = value;
txtpos = tmptxtpos;
goto run_next_statement;
}
forloop:
{
unsigned char var;
short int initial, step, terminal;
ignore_blanks();
if(*txtpos < 'A' || *txtpos > 'Z')
goto qwhat;
var = *txtpos;
txtpos++;
ignore_blanks();
if(*txtpos != '=')
goto qwhat;
txtpos++;
ignore_blanks();
expression_error = 0;
initial = expression();
if(expression_error)
goto qwhat;
scantable(to_tab);
if(table_index != 0)
goto qwhat;
terminal = expression();
if(expression_error)
goto qwhat;
scantable(step_tab);
if(table_index == 0)
{
step = expression();
if(expression_error)
goto qwhat;
}
else
step = 1;
ignore_blanks();
if(*txtpos != NL && *txtpos != ':')
goto qwhat;
if(!expression_error && *txtpos == NL)
{
struct stack_for_frame *f;
if(sp + sizeof(struct stack_for_frame) < stack_limit)
goto qsorry;
sp -= sizeof(struct stack_for_frame);
f = (struct stack_for_frame *)sp;
((short int *)variables_begin)[var-'A'] = initial;
f->frame_type = STACK_FOR_FLAG;
f->for_var = var;
f->terminal = terminal;
f->step = step;
f->txtpos = txtpos;
f->current_line = current_line;
goto run_next_statement;
}
}
goto qhow;
gosub:
expression_error = 0;
linenum = expression();
if(!expression_error && *txtpos == NL)
{
struct stack_gosub_frame *f;
if(sp + sizeof(struct stack_gosub_frame) < stack_limit)
goto qsorry;
sp -= sizeof(struct stack_gosub_frame);
f = (struct stack_gosub_frame *)sp;
f->frame_type = STACK_GOSUB_FLAG;
f->txtpos = txtpos;
f->current_line = current_line;
current_line = findline();
goto execline;
}
goto qhow;
next:
// Fnd the variable name
ignore_blanks();
if(*txtpos < 'A' || *txtpos > 'Z')
goto qhow;
txtpos++;
ignore_blanks();
if(*txtpos != ':' && *txtpos != NL)
goto qwhat;
gosub_return:
// Now walk up the stack frames and find the frame we want, if present
tempsp = sp;
while(tempsp < program+sizeof(program)-1)
{
switch(tempsp[0])
{
case STACK_GOSUB_FLAG:
if(table_index == KW_RETURN)
{
struct stack_gosub_frame *f = (struct stack_gosub_frame *)tempsp;
current_line = f->current_line;
txtpos = f->txtpos;
sp += sizeof(struct stack_gosub_frame);
goto run_next_statement;
}
// This is not the loop you are looking for... so Walk back up the stack
tempsp += sizeof(struct stack_gosub_frame);
break;
case STACK_FOR_FLAG:
// Flag, Var, Final, Step
if(table_index == KW_NEXT)
{
struct stack_for_frame *f = (struct stack_for_frame *)tempsp;
// Is the the variable we are looking for?
if(txtpos[-1] == f->for_var)
{
short int *varaddr = ((short int *)variables_begin) + txtpos[-1] - 'A';
*varaddr = *varaddr + f->step;
// Use a different test depending on the sign of the step increment
if((f->step > 0 && *varaddr <= f->terminal) || (f->step < 0 && *varaddr >= f->terminal))
{
// We have to loop so don't pop the stack
txtpos = f->txtpos;
current_line = f->current_line;
goto run_next_statement;
}
// We've run to the end of the loop. drop out of the loop, popping the stack
sp = tempsp + sizeof(struct stack_for_frame);
goto run_next_statement;
}
}
// This is not the loop you are looking for... so Walk back up the stack
tempsp += sizeof(struct stack_for_frame);
break;
default:
//printf("Stack is stuffed!\n");
goto warmstart;
}
}
// Didn't find the variable we've been looking for
goto qhow;
assignment:
{
short int value;
short int *var;
if(*txtpos < 'A' || *txtpos > 'Z')
goto qhow;
var = (short int *)variables_begin + *txtpos - 'A';
txtpos++;
ignore_blanks();
if (*txtpos != '=')
goto qwhat;
txtpos++;
ignore_blanks();
expression_error = 0;
value = expression();
if(expression_error)
goto qwhat;
// Check that we are at the end of the statement
if(*txtpos != NL && *txtpos != ':')
goto qwhat;
*var = value;
}
goto run_next_statement;
poke:
{
short int value;
unsigned char *address;
// Work out where to put it
expression_error = 0;
value = expression();
if(expression_error)
goto qwhat;
address = (unsigned char *)value;
// check for a comma
ignore_blanks();
if (*txtpos != ',')
goto qwhat;
txtpos++;
ignore_blanks();
// Now get the value to assign
expression_error = 0;
value = expression();
if(expression_error)
goto qwhat;
//printf("Poke %p value %i\n",address, (unsigned char)value);
// Check that we are at the end of the statement
if(*txtpos != NL && *txtpos != ':')
goto qwhat;
}
goto run_next_statement;
list:
linenum = testnum(); // Retuns 0 if no line found.
// Should be EOL
if(txtpos[0] != NL)
goto qwhat;
// Find the line
list_line = findline();
while(list_line != program_end)
printline();
goto warmstart;
print:
// If we have an empty list then just put out a NL
if(*txtpos == ':' )
{
line_terminator();
txtpos++;
goto run_next_statement;
}
if(*txtpos == NL)
{
goto execnextline;
}
while(1)
{
ignore_blanks();
if(print_quoted_string())
{
;
}
else if(*txtpos == '"' || *txtpos == '\'')
goto qwhat;
else
{
short int e;
expression_error = 0;
e = expression();
if(expression_error)
goto qwhat;
printnum(e);
}
// At this point we have three options, a comma or a new line
if(*txtpos == ',')
txtpos++; // Skip the comma and move onto the next
else if(txtpos[0] == ';' && (txtpos[1] == NL || txtpos[1] == ':'))
{
txtpos++; // This has to be the end of the print - no newline
break;
}
else if(*txtpos == NL || *txtpos == ':')
{
line_terminator(); // The end of the print statement
break;
}
else
goto qwhat;
}
goto run_next_statement;
mem:
// memory free
printnum(variables_begin-program_end);
printmsg(memorymsg);
#ifdef ARDUINO
#ifdef ENABLE_EEPROM
{
// eprom size
printnum( E2END+1 );
printmsg( eeprommsg );
// figure out the memory usage;
val = ' ';
int i;
for( i=0 ; (i<(E2END+1)) && (val != '\0') ; i++ ) {
val = EEPROM.read( i );
}
printnum( (E2END +1) - (i-1) );
printmsg( eepromamsg );
}
#endif /* ENABLE_EEPROM */
#endif /* ARDUINO */
goto run_next_statement;
/*************************************************/
#ifdef ARDUINO
awrite: // AWRITE <pin>,val
dwrite:
{
short int pinNo;
short int value;
unsigned char *txtposBak;
// Get the pin number
expression_error = 0;
pinNo = expression();
if(expression_error)
goto qwhat;
// check for a comma
ignore_blanks();
if (*txtpos != ',')
goto qwhat;
txtpos++;
ignore_blanks();
txtposBak = txtpos;
scantable(highlow_tab);
if(table_index != HIGHLOW_UNKNOWN)
{
if( table_index <= HIGHLOW_HIGH ) {
value = 1;
}
else {
value = 0;
}
}
else {
// and the value (numerical)
expression_error = 0;
value = expression();
if(expression_error)
goto qwhat;
}
pinMode( pinNo, OUTPUT );
if( isDigital ) {
digitalWrite( pinNo, value );
}
else {
analogWrite( pinNo, value );
}
}
goto run_next_statement;
#else
pinmode: // PINMODE <pin>, I/O
awrite: // AWRITE <pin>,val
dwrite:
goto unimplemented;
#endif
/*************************************************/
files:
// display a listing of files on the device.
// version 1: no support for subdirectories
#ifdef ENABLE_FILEIO
cmd_Files();
goto warmstart;
#else
goto unimplemented;
#endif // ENABLE_FILEIO
chain:
runAfterLoad = true;
load:
// clear the program
program_end = program_start;
// load from a file into memory
#ifdef ENABLE_FILEIO
{
unsigned char *filename;
// Work out the filename
expression_error = 0;
filename = filenameWord();
if(expression_error)
goto qwhat;
#ifdef ARDUINO
// Arduino specific
if( !SD.exists( (char *)filename ))
{
printmsg( sdfilemsg );
}
else {
fp = SD.open( (const char *)filename );
inStream = kStreamFile;
inhibitOutput = true;
}
#else // ARDUINO
// Desktop specific
#endif // ARDUINO
// this will kickstart a series of events to read in from the file.
}
goto warmstart;
#else // ENABLE_FILEIO
goto unimplemented;
#endif // ENABLE_FILEIO
save:
// save from memory out to a file
#ifdef ENABLE_FILEIO
{
unsigned char *filename;
// Work out the filename
expression_error = 0;
filename = filenameWord();
if(expression_error)
goto qwhat;
#ifdef ARDUINO
// remove the old file if it exists
if( SD.exists( (char *)filename )) {
SD.remove( (char *)filename );
}
// open the file, switch over to file output
fp = SD.open( (const char *)filename, FILE_WRITE );
outStream = kStreamFile;
// copied from "List"
list_line = findline();
while(list_line != program_end)
printline();
// go back to standard output, close the file
outStream = kStreamSerial;
fp.close();
#else // ARDUINO
// desktop
#endif // ARDUINO
goto warmstart;
}
#else // ENABLE_FILEIO
goto unimplemented;
#endif // ENABLE_FILEIO
rseed:
{
short int value;
//Get the pin number
expression_error = 0;
value = expression();
if(expression_error)
goto qwhat;
#ifdef ARDUINO
randomSeed( value );
#else // ARDUINO
srand( value );
#endif // ARDUINO
goto run_next_statement;
}
#ifdef ENABLE_TONES
tonestop:
noTone( kPiezoPin );
goto run_next_statement;
tonegen:
{
// TONE freq, duration
// if either are 0, tones turned off
short int freq;
short int duration;
//Get the frequency
expression_error = 0;
freq = expression();
if(expression_error)
goto qwhat;
ignore_blanks();
if (*txtpos != ',')
goto qwhat;
txtpos++;
ignore_blanks();
//Get the duration
expression_error = 0;
duration = expression();
if(expression_error)
goto qwhat;
if( freq == 0 || duration == 0 )
goto tonestop;
tone( kPiezoPin, freq, duration );
if( alsoWait ) {
delay( duration );
alsoWait = false;
}
goto run_next_statement;
}
#endif /* ENABLE_TONES */
}
// returns 1 if the character is valid in a filename
static int isValidFnChar( char c )
{
if( c >= '0' && c <= '9' ) return 1; // number
if( c >= 'A' && c <= 'Z' ) return 1; // LETTER
if( c >= 'a' && c <= 'z' ) return 1; // letter (for completeness)
if( c == '_' ) return 1;
if( c == '+' ) return 1;
if( c == '.' ) return 1;
if( c == '~' ) return 1; // Window~1.txt
return 0;
}
unsigned char * filenameWord(void)
{
// SDL - I wasn't sure if this functionality existed above, so I figured i'd put it here
unsigned char * ret = txtpos;
expression_error = 0;
// make sure there are no quotes or spaces, search for valid characters
//while(*txtpos == SPACE || *txtpos == TAB || *txtpos == SQUOTE || *txtpos == DQUOTE ) txtpos++;
while( !isValidFnChar( *txtpos )) txtpos++;
ret = txtpos;
if( *ret == '\0' ) {
expression_error = 1;
return ret;
}
// now, find the next nonfnchar
txtpos++;
while( isValidFnChar( *txtpos )) txtpos++;
if( txtpos != ret ) *txtpos = '\0';
// set the error code if we've got no string
if( *ret == '\0' ) {
expression_error = 1;
}
return ret;
}
/***************************************************************************/
static void line_terminator(void)
{
outchar(NL);
outchar(CR);
}
/***********************************************************/
void setup()
{
#ifdef ARDUINO
Serial.begin(kConsoleBaud); // opens serial port
while( !Serial ); // for Leonardo
Serial.println( sentinel );
printmsg(initmsg);
#ifdef ENABLE_FILEIO
initSD();
#ifdef ENABLE_AUTORUN
if( SD.exists( kAutorunFilename )) {
program_end = program_start;
fp = SD.open( kAutorunFilename );
inStream = kStreamFile;
inhibitOutput = true;
runAfterLoad = true;
}
#endif /* ENABLE_AUTORUN */
#endif /* ENABLE_FILEIO */
#ifdef ENABLE_EEPROM
#ifdef ENABLE_EAUTORUN
// read the first byte of the eeprom. if it's a number, assume it's a program we can load
int val = EEPROM.read(0);
if( val >= '0' && val <= '9' ) {
program_end = program_start;
inStream = kStreamEEProm;
eepos = 0;
inhibitOutput = true;
runAfterLoad = true;
}
#endif /* ENABLE_EAUTORUN */
#endif /* ENABLE_EEPROM */
#endif /* ARDUINO */
}
/***********************************************************/
static unsigned char breakcheck(void)
{
#ifdef ARDUINO
if(Serial.available())
return Serial.read() == CTRLC;
return 0;
#else
#ifdef __CONIO__
if(kbhit())
return getch() == CTRLC;
else
#endif
return 0;
#endif
}
/***********************************************************/
static int inchar()
{
int v;
#ifdef ARDUINO
switch( inStream ) {
case( kStreamFile ):
#ifdef ENABLE_FILEIO
v = fp.read();
if( v == NL ) v=CR; // file translate
if( !fp.available() ) {
fp.close();
goto inchar_loadfinish;
}
return v;
#else
#endif
break;
case( kStreamEEProm ):
#ifdef ENABLE_EEPROM
#ifdef ARDUINO
v = EEPROM.read( eepos++ );
if( v == '\0' ) {
goto inchar_loadfinish;
}
return v;
#endif
#else
inStream = kStreamSerial;
return NL;
#endif
break;
case( kStreamSerial ):
default:
while(1)
{
if(Serial.available())
return Serial.read();
}
}
inchar_loadfinish:
inStream = kStreamSerial;
inhibitOutput = false;
if( runAfterLoad ) {
runAfterLoad = false;
triggerRun = true;
}
return NL; // trigger a prompt.
#else
// otherwise. desktop!
int got = getchar();
// translation for desktop systems
if( got == LF ) got = CR;
return got;
#endif
}
/***********************************************************/
static void outchar(unsigned char c)
{
if( inhibitOutput ) return;
#ifdef ARDUINO
#ifdef ENABLE_FILEIO
if( outStream == kStreamFile ) {
// output to a file
fp.write( c );
}
else
#endif
#ifdef ARDUINO
#ifdef ENABLE_EEPROM
if( outStream == kStreamEEProm ) {
EEPROM.write( eepos++, c );
}
else
#endif /* ENABLE_EEPROM */
#endif /* ARDUINO */
Serial.write(c);
#else
putchar(c);
#endif
}
/***********************************************************/
/* SD Card helpers */
#if ARDUINO && ENABLE_FILEIO
static int initSD( void )
{
// if the card is already initialized, we just go with it.
// there is no support (yet?) for hot-swap of SD Cards. if you need to
// swap, pop the card, reset the arduino.)
if( sd_is_initialized == true ) return kSD_OK;
// due to the way the SD Library works, pin 10 always needs to be
// an output, even when your shield uses another line for CS
pinMode(10, OUTPUT); // change this to 53 on a mega
if( !SD.begin( kSD_CS )) {
// failed
printmsg( sderrormsg );
return kSD_Fail;
}
// success - quietly return 0
sd_is_initialized = true;
// and our file redirection flags
outStream = kStreamSerial;
inStream = kStreamSerial;
inhibitOutput = false;
return kSD_OK;
}
#endif
#if ENABLE_FILEIO
void cmd_Files( void )
{
File dir = SD.open( "/" );
dir.seek(0);
while( true ) {
File entry = dir.openNextFile();
if( !entry ) {
entry.close();
break;
}
// common header
printmsgNoNL( indentmsg );
printmsgNoNL( (const unsigned char *)entry.name() );
if( entry.isDirectory() ) {
printmsgNoNL( slashmsg );
}
if( entry.isDirectory() ) {
// directory ending
for( int i=strlen( entry.name()) ; i<16 ; i++ ) {
printmsgNoNL( spacemsg );
}
printmsgNoNL( dirextmsg );
}
else {
// file ending
for( int i=strlen( entry.name()) ; i<17 ; i++ ) {
printmsgNoNL( spacemsg );
}
printUnum( entry.size() );
}
line_terminator();
entry.close();
}
dir.close();
}
#endif
| [
"hexmaster111@gmail.com"
] | hexmaster111@gmail.com |
976b6bb5e1c32a18cc255813829b5d0650a937f2 | 9a41cc5260c30486aba4c52c63a8cadafd120e86 | /TP_5/Tp5Depart/CommandInvoker.cpp | e2996cd039349327e845d943b8716fc20a2e99f3 | [] | no_license | SantiagoToro97/LOG2410 | a98b66bf9838860ab03a9e4aa38ae7e7a5f78d6a | 849496a7e1d129c7804f93f6225c2fe3d0579b80 | refs/heads/master | 2020-08-02T23:25:03.491204 | 2019-12-01T22:52:00 | 2019-12-01T22:52:00 | 211,543,524 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,164 | cpp | ///////////////////////////////////////////////////////////
// CommandInvoker.cpp
// Implementation of the Class CommandInvoker
// Created on: 08-nov.-2018 21:05:19
// Original author: p482457
///////////////////////////////////////////////////////////
#include "CommandInvoker.h"
CommandInvoker* CommandInvoker::m_instance = nullptr;
CommandInvoker * CommandInvoker::getInstance(void)
{
// Verifier si l'instance unique a deja ete allouee et sinon l'allouer
return nullptr;
}
void CommandInvoker::execute(const CmdPtr & cmd)
{
// Executer la commande et la stocker dans la liste des commandes faites
// Vider la liste des commandes defaites
}
void CommandInvoker::undo()
{
// Verifier si la liste des commandes faites n'est pas vide et si oui defaire la derniere commande faite
}
void CommandInvoker::redo()
{
// Verifier si la liste des commandes defaites n'est pas vide et si oui refaire la derniere commande defaite
}
size_t CommandInvoker::getDoneCount(void) const
{
// Retourner le nombre de commandes faites
return 0;
}
size_t CommandInvoker::getUndoneCount(void) const
{
// Retourner le nombre de commandes defaites
return 0;
}
| [
"santi_t9707@hotmail.com"
] | santi_t9707@hotmail.com |
78720170db09c85fa90f2826caf633146ea9eb04 | e3b007c341a648986aaa49e285f32a41143c73a7 | /src/json/json_spirit_value.h | 2354cc44b1e52458814d32acf9dab6134a11d97b | [
"MIT"
] | permissive | PLTpay/platinum | 28d2ea3cd1567dafebb1dada966e371dbea68ec4 | 1b1f0dd1f8b7a75b7b7aea8c425e088fc5874bf6 | refs/heads/master | 2020-03-16T08:38:32.877239 | 2018-05-17T08:27:58 | 2018-05-17T08:27:58 | 132,599,608 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 14,047 | h | #ifndef JSON_SPIRIT_VALUE
#define JSON_SPIRIT_VALUE
// Copyright Eugene Fillippovsky 2014 - 2014.
// Distributed under the MIT License, see accompanying file LICENSE.txt
// json spirit version 4.03
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
#include <vector>
#include <map>
#include <string>
#include <cassert>
#include <sstream>
#include <stdexcept>
#include <stdint.h>
#include <boost/config.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/variant.hpp>
namespace json_spirit
{
enum Value_type{ obj_type, array_type, str_type, bool_type, int_type, real_type, null_type };
static const char* Value_type_name[]={"obj", "array", "str", "bool", "int", "real", "null"};
template< class Config > // Config determines whether the value uses std::string or std::wstring and
// whether JSON Objects are represented as vectors or maps
class Value_impl
{
public:
typedef Config Config_type;
typedef typename Config::String_type String_type;
typedef typename Config::Object_type Object;
typedef typename Config::Array_type Array;
typedef typename String_type::const_pointer Const_str_ptr; // eg const char*
Value_impl(); // creates null value
Value_impl( Const_str_ptr value );
Value_impl( const String_type& value );
Value_impl( const Object& value );
Value_impl( const Array& value );
Value_impl( bool value );
Value_impl( int value );
Value_impl( int64_t value );
Value_impl( uint64_t value );
Value_impl( double value );
Value_impl( const Value_impl& other );
bool operator==( const Value_impl& lhs ) const;
Value_impl& operator=( const Value_impl& lhs );
Value_type type() const;
bool is_uint64() const;
bool is_null() const;
const String_type& get_str() const;
const Object& get_obj() const;
const Array& get_array() const;
bool get_bool() const;
int get_int() const;
int64_t get_int64() const;
uint64_t get_uint64() const;
double get_real() const;
Object& get_obj();
Array& get_array();
template< typename T > T get_value() const; // example usage: int i = value.get_value< int >();
// or double d = value.get_value< double >();
static const Value_impl null;
private:
void check_type( const Value_type vtype ) const;
typedef boost::variant< String_type,
boost::recursive_wrapper< Object >, boost::recursive_wrapper< Array >,
bool, int64_t, double > Variant;
Value_type type_;
Variant v_;
bool is_uint64_;
};
// vector objects
template< class Config >
struct Pair_impl
{
typedef typename Config::String_type String_type;
typedef typename Config::Value_type Value_type;
Pair_impl( const String_type& name, const Value_type& value );
bool operator==( const Pair_impl& lhs ) const;
String_type name_;
Value_type value_;
};
template< class String >
struct Config_vector
{
typedef String String_type;
typedef Value_impl< Config_vector > Value_type;
typedef Pair_impl < Config_vector > Pair_type;
typedef std::vector< Value_type > Array_type;
typedef std::vector< Pair_type > Object_type;
static Value_type& add( Object_type& obj, const String_type& name, const Value_type& value )
{
obj.push_back( Pair_type( name , value ) );
return obj.back().value_;
}
static String_type get_name( const Pair_type& pair )
{
return pair.name_;
}
static Value_type get_value( const Pair_type& pair )
{
return pair.value_;
}
};
// typedefs for ASCII
typedef Config_vector< std::string > Config;
typedef Config::Value_type Value;
typedef Config::Pair_type Pair;
typedef Config::Object_type Object;
typedef Config::Array_type Array;
// typedefs for Unicode
#ifndef BOOST_NO_STD_WSTRING
typedef Config_vector< std::wstring > wConfig;
typedef wConfig::Value_type wValue;
typedef wConfig::Pair_type wPair;
typedef wConfig::Object_type wObject;
typedef wConfig::Array_type wArray;
#endif
// map objects
template< class String >
struct Config_map
{
typedef String String_type;
typedef Value_impl< Config_map > Value_type;
typedef std::vector< Value_type > Array_type;
typedef std::map< String_type, Value_type > Object_type;
typedef typename Object_type::value_type Pair_type;
static Value_type& add( Object_type& obj, const String_type& name, const Value_type& value )
{
return obj[ name ] = value;
}
static String_type get_name( const Pair_type& pair )
{
return pair.first;
}
static Value_type get_value( const Pair_type& pair )
{
return pair.second;
}
};
// typedefs for ASCII
typedef Config_map< std::string > mConfig;
typedef mConfig::Value_type mValue;
typedef mConfig::Object_type mObject;
typedef mConfig::Array_type mArray;
// typedefs for Unicode
#ifndef BOOST_NO_STD_WSTRING
typedef Config_map< std::wstring > wmConfig;
typedef wmConfig::Value_type wmValue;
typedef wmConfig::Object_type wmObject;
typedef wmConfig::Array_type wmArray;
#endif
///////////////////////////////////////////////////////////////////////////////////////////////
//
// implementation
template< class Config >
const Value_impl< Config > Value_impl< Config >::null;
template< class Config >
Value_impl< Config >::Value_impl()
: type_( null_type )
, is_uint64_( false )
{
}
template< class Config >
Value_impl< Config >::Value_impl( const Const_str_ptr value )
: type_( str_type )
, v_( String_type( value ) )
, is_uint64_( false )
{
}
template< class Config >
Value_impl< Config >::Value_impl( const String_type& value )
: type_( str_type )
, v_( value )
, is_uint64_( false )
{
}
template< class Config >
Value_impl< Config >::Value_impl( const Object& value )
: type_( obj_type )
, v_( value )
, is_uint64_( false )
{
}
template< class Config >
Value_impl< Config >::Value_impl( const Array& value )
: type_( array_type )
, v_( value )
, is_uint64_( false )
{
}
template< class Config >
Value_impl< Config >::Value_impl( bool value )
: type_( bool_type )
, v_( value )
, is_uint64_( false )
{
}
template< class Config >
Value_impl< Config >::Value_impl( int value )
: type_( int_type )
, v_( static_cast< int64_t >( value ) )
, is_uint64_( false )
{
}
template< class Config >
Value_impl< Config >::Value_impl( int64_t value )
: type_( int_type )
, v_( value )
, is_uint64_( false )
{
}
template< class Config >
Value_impl< Config >::Value_impl( uint64_t value )
: type_( int_type )
, v_( static_cast< int64_t >( value ) )
, is_uint64_( true )
{
}
template< class Config >
Value_impl< Config >::Value_impl( double value )
: type_( real_type )
, v_( value )
, is_uint64_( false )
{
}
template< class Config >
Value_impl< Config >::Value_impl( const Value_impl< Config >& other )
: type_( other.type() )
, v_( other.v_ )
, is_uint64_( other.is_uint64_ )
{
}
template< class Config >
Value_impl< Config >& Value_impl< Config >::operator=( const Value_impl& lhs )
{
Value_impl tmp( lhs );
std::swap( type_, tmp.type_ );
std::swap( v_, tmp.v_ );
std::swap( is_uint64_, tmp.is_uint64_ );
return *this;
}
template< class Config >
bool Value_impl< Config >::operator==( const Value_impl& lhs ) const
{
if( this == &lhs ) return true;
if( type() != lhs.type() ) return false;
return v_ == lhs.v_;
}
template< class Config >
Value_type Value_impl< Config >::type() const
{
return type_;
}
template< class Config >
bool Value_impl< Config >::is_uint64() const
{
return is_uint64_;
}
template< class Config >
bool Value_impl< Config >::is_null() const
{
return type() == null_type;
}
template< class Config >
void Value_impl< Config >::check_type( const Value_type vtype ) const
{
if( type() != vtype )
{
std::ostringstream os;
///// Bitcoin: Tell the types by name instead of by number
os << "value is type " << Value_type_name[type()] << ", expected " << Value_type_name[vtype];
throw std::runtime_error( os.str() );
}
}
template< class Config >
const typename Config::String_type& Value_impl< Config >::get_str() const
{
check_type( str_type );
return *boost::get< String_type >( &v_ );
}
template< class Config >
const typename Value_impl< Config >::Object& Value_impl< Config >::get_obj() const
{
check_type( obj_type );
return *boost::get< Object >( &v_ );
}
template< class Config >
const typename Value_impl< Config >::Array& Value_impl< Config >::get_array() const
{
check_type( array_type );
return *boost::get< Array >( &v_ );
}
template< class Config >
bool Value_impl< Config >::get_bool() const
{
check_type( bool_type );
return boost::get< bool >( v_ );
}
template< class Config >
int Value_impl< Config >::get_int() const
{
check_type( int_type );
return static_cast< int >( get_int64() );
}
template< class Config >
int64_t Value_impl< Config >::get_int64() const
{
check_type( int_type );
return boost::get< int64_t >( v_ );
}
template< class Config >
uint64_t Value_impl< Config >::get_uint64() const
{
check_type( int_type );
return static_cast< uint64_t >( get_int64() );
}
template< class Config >
double Value_impl< Config >::get_real() const
{
if( type() == int_type )
{
return is_uint64() ? static_cast< double >( get_uint64() )
: static_cast< double >( get_int64() );
}
check_type( real_type );
return boost::get< double >( v_ );
}
template< class Config >
typename Value_impl< Config >::Object& Value_impl< Config >::get_obj()
{
check_type( obj_type );
return *boost::get< Object >( &v_ );
}
template< class Config >
typename Value_impl< Config >::Array& Value_impl< Config >::get_array()
{
check_type( array_type );
return *boost::get< Array >( &v_ );
}
template< class Config >
Pair_impl< Config >::Pair_impl( const String_type& name, const Value_type& value )
: name_( name )
, value_( value )
{
}
template< class Config >
bool Pair_impl< Config >::operator==( const Pair_impl< Config >& lhs ) const
{
if( this == &lhs ) return true;
return ( name_ == lhs.name_ ) && ( value_ == lhs.value_ );
}
// converts a C string, ie. 8 bit char array, to a string object
//
template < class String_type >
String_type to_str( const char* c_str )
{
String_type result;
for( const char* p = c_str; *p != 0; ++p )
{
result += *p;
}
return result;
}
//
namespace internal_
{
template< typename T >
struct Type_to_type
{
};
template< class Value >
int get_value( const Value& value, Type_to_type< int > )
{
return value.get_int();
}
template< class Value >
int64_t get_value( const Value& value, Type_to_type< int64_t > )
{
return value.get_int64();
}
template< class Value >
uint64_t get_value( const Value& value, Type_to_type< uint64_t > )
{
return value.get_uint64();
}
template< class Value >
double get_value( const Value& value, Type_to_type< double > )
{
return value.get_real();
}
template< class Value >
typename Value::String_type get_value( const Value& value, Type_to_type< typename Value::String_type > )
{
return value.get_str();
}
template< class Value >
typename Value::Array get_value( const Value& value, Type_to_type< typename Value::Array > )
{
return value.get_array();
}
template< class Value >
typename Value::Object get_value( const Value& value, Type_to_type< typename Value::Object > )
{
return value.get_obj();
}
template< class Value >
bool get_value( const Value& value, Type_to_type< bool > )
{
return value.get_bool();
}
}
template< class Config >
template< typename T >
T Value_impl< Config >::get_value() const
{
return internal_::get_value( *this, internal_::Type_to_type< T >() );
}
}
#endif
| [
"platinumpay@mail.ru"
] | platinumpay@mail.ru |
4186e5b9527ee5ed6701b95c26d4801585f629e6 | 98907ecd57ebc8027c3ef868eb4e66c64421502c | /program_args.h | 52f361155bdb9f07632333d00cfc9a2271d43e15 | [] | no_license | krzpiesiewicz/SIK-radio-sender-and-receiver | 701b250b40d31662557175370a58c6624050b32c | 04d4974083aaafbad0b9a9155788decc95771033 | refs/heads/master | 2020-03-29T02:29:15.537172 | 2018-09-19T13:00:06 | 2018-09-19T13:00:06 | 149,439,396 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,142 | h | #ifndef PROGRAM_ARGS_H
#define PROGRAM_ARGS_H
#include <string>
#include <list>
#include <memory>
#include <unordered_map>
#include <iostream>
#include "err.h"
class ArgumentException : public ServerException {
public:
ArgumentException(std::string msg_) : ServerException(msg_) {}
};
struct ProgramArgs {
std::unordered_map<std::string, std::string> umap;
std::list<std::string> singles;
std::string usage_txt;
ProgramArgs() = default;
ProgramArgs(int argc, char *argv[], std::string usage_txt_) :
usage_txt(usage_txt_) {
for (int i = 0; i < argc; i++) {
if (argv[i][0] == '-') {
if (i + 1 == argc || argv[i + 1][0] == '-')
throw ArgumentException(usage_txt + "No value for option " +
std::string((argv[i] + 1)) + ".");
umap[std::string(&argv[i][1])] = std::string(argv[i + 1]);
i++;
} else {
singles.push_back(argv[i]);
}
}
}
std::string *val_for_opt(std::string const &opt) {
auto it = umap.find(opt);
if (it != umap.end())
return &(it->second);
else
return nullptr;
}
std::string val_for_opt(std::string const &opt,
std::string const &defalut) {
auto val = val_for_opt(opt);
return val == nullptr ? defalut : *val;
}
std::string force_val_for_opt(std::string const &opt) {
auto val = val_for_opt(opt);
if (val == nullptr)
throw ArgumentException(usage_txt);
return *val;
}
int intval_for_opt(std::string const &opt, int default_val) {
try {
return std::stoi(val_for_opt(opt, std::to_string(default_val)));
} catch (std::invalid_argument const &e) {
throw ArgumentException(usage_txt + " Value for option -" + opt +
"must be integral.");
}
}
int force_intval_for_opt(std::string const &opt) {
try {
return std::stoi(force_val_for_opt(opt));
} catch (std::invalid_argument const &e) {
throw ArgumentException(usage_txt + " Value for option -" + opt +
"must be integral.");
}
}
};
#endif // PROGRAM_ARGS_H
| [
"krz.piesiewicz@gmail.com"
] | krz.piesiewicz@gmail.com |
b600edf91392cce6a01b208360cb7f79f8a8976e | c75f4fd96d537d57e28a1e3d6b25b7e7228dde36 | /hlavnykomp/buildy/supermeno/2015-11-28-16-44-39/main.cpp | 94e29b9d12444fe90c076fac7b01c22fa44cfd14 | [] | no_license | trojsten/proboj-2015-jesen | fd1277c84a890a748690f623ebaf6ce1747e871b | e7381c0c5847816540e2b7b4c44a7293a3a9e4c4 | refs/heads/master | 2021-01-17T12:40:22.778872 | 2017-03-17T11:16:35 | 2017-03-17T11:16:35 | 46,065,114 | 0 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 7,778 | cpp | #include <iostream>
#include <unistd.h>
#include <ctime>
#include <random>
using namespace std;
#include "common.h"
#include "marshal.h"
#include "update.h"
Mapa mapa;
Stav stav; //vzdy som hrac cislo 0
Prikaz prikaz;
Bod strela;
Bod akcel;
Hrac ja;
Bod kontroler(Bod pozicia, Bod rychlost, Bod cielovaPozicia) {
Bod rozdielPozicie = cielovaPozicia - pozicia;
Bod cielovaRychlost = rozdielPozicie * 0.5;
// umele obmedzenie maximalnej rychlosti pre lepsiu kontrolu
double pomerKMojejMaximalnejRychlosti = 150.0 / cielovaRychlost.dist();
if (pomerKMojejMaximalnejRychlosti > 1.0) {
cielovaRychlost = cielovaRychlost * pomerKMojejMaximalnejRychlosti;
}
Bod rozdielRychlosti = cielovaRychlost - rychlost;
Bod cielovaAkceleracia = rozdielRychlosti * 5.0;
return cielovaAkceleracia;
}
double vzdialenost(Bod a, Bod b)
{
return ( sqrt( (a.x-b.x)*(a.x-b.x)+(a.y-b.y)*(a.y-b.y)) );
}
/*bool zrazima(FyzickyObjekt ja, FyzickyObjekt on)
{
Bod jasmer = ja.rychlost;
Bod onsmer = on.rychlost;
Bod japos = ja.pozicia;
Bod onpos = on.pozicia;
4
double jasx = jasmer.x;
double jasy = jasmer.y;
double onsx = onsmer.x;
double onsy = onsmer.y;
Bod intersekcia;
double distodomna = vzdialenost(japos,intersekcia);
double disodneho = vzdialenost(onpos,intersekcia);
double kymonpride =
double kymjapridem =
return (kymonpride==kymjapridem);
}*/
bool problemstena(Hrac &ja)
{
FyzickyObjekt my = ja.obj;
Bod nassmer = my.rychlost;
//return false;
bool p = false;
if(my.pozicia.x < 200)
{
akcel.x = 200;
p = true;
}
if(my.pozicia.y < 200)
{
akcel.y = 200;
p = true;
}
if(my.pozicia.x > mapa.w - 200)
{
akcel.x = -200;
p = true;
}
if(my.pozicia.y > mapa.h - 200)
{
akcel.y = -200;
p = true;
}
if(my.pozicia.x < 400)
{
akcel.x = 150;
p = true;
}
if(my.pozicia.y < 400)
{
akcel.y = 150;
p = true;
}
if(my.pozicia.x > mapa.w - 400)
{
akcel.x = -150;
p = true;
}
if(my.pozicia.y > mapa.h - 400)
{
akcel.y = -150;
p = true;
}
return p;
//if(my.pozicia.x<100)
}
void vystrel(Hrac ja, Bod kam, Bod rychlost=Bod())
{ kam.dist();
float t=vzdialenost(kam,ja.obj.pozicia)/(vzdialenost((ja.obj.rychlost-rychlost),Bod())+STRELA_RYCHLOST);
strela = kam-ja.obj.pozicia-(ja.obj.rychlost+rychlost)*t;
}
void utekaj(Bod odkial)
{
Bod my = ja.obj.pozicia;
Bod knemu;
knemu.x = odkial.x-my.x;
knemu.y = odkial.y - my.y;
if(knemu.x > 0) akcel.x = -100;
else if (knemu.x < 0) akcel.x = 100;
if(knemu.y > 0) akcel.y = -100;
else if (knemu.y < 0) akcel.y = 100;
}
void utekajodnajblizsieho()
{
double posx = stav.hraci[0].obj.pozicia.x;
double posy = stav.hraci[0].obj.pozicia.y;
double rx = stav.hraci[0].obj.rychlost.x;
double ry = stav.hraci[0].obj.rychlost.y;
if(rx<10 || ry<10) return;
while(posx>0 && posy>0 && posx<mapa.w && posy<mapa.h)
{
posx += rx;
posy += ry;
}
Bod nas;
nas.x=posx;
nas.y=posy;
if(vzdialenost(nas,ja.obj.pozicia) > 3*vzdialenost(Bod(),ja.obj.rychlost) ) return;
fprintf(stderr, " %lf %lf \n", nas.x, nas.y);
utekaj(nas);
}
long long citac=0,nasobx=1,nasoby=1;
// main() zavola tuto funkciu, ked chce vediet, aky prikaz chceme vykonat,
// co tato funkcia rozhodne pomocou toho, ako nastavi prikaz
void zistiTah() {
citac++;
ja = stav.hraci[0];
double celkova_rychlost = sqrt(ja.obj.rychlost.x*ja.obj.rychlost.x + ja.obj.rychlost.y*ja.obj.rychlost.y);
if(celkova_rychlost == 300)
{
akcel.x = 0;
akcel.y = 0;
}
else if (celkova_rychlost > 300)
{
if(ja.obj.rychlost.x > 150) akcel.x = -30;
if(ja.obj.rychlost.x < -150) akcel.x = 30;
if(ja.obj.rychlost.y > 150) akcel.y = -30;
if(ja.obj.rychlost.y < -150) akcel.y = 30;
}
if (!problemstena(ja))
{
if(citac%3000==0) nasobx*=-1;
if(citac%4500==0) nasoby *=-1;
if(citac%50==0)
{
if(celkova_rychlost<300)
{
akcel.x+=rand()%120*nasobx;
akcel.y+=rand()%120*nasoby;
}
}
}
//uhybaj sa objektom
vector<FyzickyObjekt> na_vyhnutie;
for(int i = 0; i<stav.obj[ASTEROID].size();i++){na_vyhnutie.push_back(stav.obj[ASTEROID][i]);}
// for(int i = 0; i<stav.obj[PLANETA].size();i++){na_vyhnutie.push_back(stav.obj[PLANETA][i]);}
for(int i = 0; i<stav.obj[STRELA].size();i++){na_vyhnutie.push_back(stav.obj[STRELA][i]);}
for(int i = 1; i<stav.hraci.size();i++){na_vyhnutie.push_back(stav.hraci[i].obj);}
for(int i = 0; i<na_vyhnutie.size(); i++){
if((ja.obj.pozicia-na_vyhnutie[i].pozicia).dist()< (na_vyhnutie[i].polomer+ja.obj.polomer)*1.50){
//akcel = na_vyhnutie[i].rychlost-ja.obj.rychlost+Bod(rand()%80,rand()%80);
akcel.x = ja.obj.rychlost.x * -1;
if(ja.obj.rychlost.x>=0) akcel.x -= 30;
else akcel.x += 100;
if(ja.obj.rychlost.y>=0) akcel.y -= 30;
else akcel.y += 100;
akcel.y = ja.obj.rychlost.y * -1;
}
}
// Chod do najblizsej nugetky
{int _min = 0; double _min_dist =100000;
for(int i =0; i<stav.obj[ZLATO].size(); i++){
if((stav.obj[ZLATO][i].pozicia-ja.obj.pozicia).dist()<_min_dist){_min=i;}
_min_dist=(stav.obj[ZLATO][_min].pozicia-ja.obj.pozicia).dist();
}
if(_min_dist<400){
akcel = kontroler(ja.obj.pozicia, ja.obj.rychlost, stav.obj[ZLATO][_min].pozicia);
}}
vector < FyzickyObjekt > asteroidy;
for(int i=0;i<stav.obj[0].size();++i) asteroidy.push_back(stav.obj[0][i]);
if(asteroidy.size()>0)vystrel(ja,asteroidy[0].pozicia, asteroidy[0].rychlost);
//strela = /*asteroidy[0].pozicia(Bod()-ja.obj.pozicia)-ja.obj.rychlost;//+asteroidy[0].rychlost;
else strela = Bod(0,0);
// Strelba donajblizsieho hraca
int _min = 1; double _min_dist =100000;
for(int i =1; i<stav.hraci.size(); i++){
if((stav.hraci[i].obj.pozicia-ja.obj.pozicia).dist()<_min_dist){_min=i;}
_min_dist=(stav.hraci[_min].obj.pozicia-ja.obj.pozicia).dist();
}
if(_min_dist<200){
strela = stav.hraci[_min].obj.pozicia-ja.obj.pozicia;
}else strela = Bod();
prikaz.acc = akcel; // akceleracia
prikaz.ciel = strela; // ciel strelby (relativne na poziciu lode), ak je (0,0) znamena to nestrielat
}
//////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////
int main() {
// v tejto funkcii su vseobecne veci, nemusite ju menit (ale mozte).
unsigned seed = time(NULL) * getpid();
srand(seed);
nacitaj(cin,mapa);
fprintf(stderr, "START pid=%d, seed=%u\n", getpid(), seed);
while (cin.good()) {
nacitaj(cin,stav);
zistiTah();
uloz(cout,prikaz);
cout << endl;
}
}
| [
"bujtuclam@gmail.com"
] | bujtuclam@gmail.com |
08ea4a9cd8c44eaaf375967ff4e79112a4663e39 | 33b0ea24a4897d061b80b7d4ac9d39da54275f17 | /c02.cpp | 85651f18510573f54f206ba362b6c2abdfa77df1 | [] | no_license | LeeSungje/c-_study | 43d4eea70e4855e012b3efb9ba4c57382fe1e25e | afdcac1da8c7643e16d6d58195fbe7294b1e6096 | refs/heads/master | 2020-04-10T00:53:40.065293 | 2018-07-19T10:28:54 | 2018-07-19T10:28:54 | 124,251,746 | 0 | 0 | null | null | null | null | UHC | C++ | false | false | 184 | cpp | #include<stdio.h>
int main()
{
int i;
char c;
printf("입력 : ");
scanf("%d", &i);
c = i;
printf("출력(int)->%d\n", i);
printf("출력(char)->%d\n", c);
return 0;
}
| [
"sungje1025@naver.com"
] | sungje1025@naver.com |
d29bfe1cd5525a6efa50984db83d25d3c49759d1 | 7592e235d6709f2409b477be7d10c455a11def42 | /AICharacter.cpp | 9e0075c58f98dc4f7b5618a6b6a142e72ea6f7c5 | [] | no_license | srishti-learner/Source | 27fe348999d387daba45c74e5d0c24c897513e7b | 736bdfab36ae4af5b6d504f9a2c72365fdcd6cc3 | refs/heads/master | 2021-01-01T19:40:16.377693 | 2017-07-31T04:58:48 | 2017-07-31T04:58:48 | 98,641,453 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,354 | cpp | // Fill out your copyright notice in the Description page of Project Settings.
#include "Project.h"
#include "MyAIController.h"
#include "BehaviorTree/BehaviorTree.h"
#include "Perception/PawnSensingComponent.h"
#include "AICharacter.h"
// Sets default values
AAICharacter::AAICharacter()
{
// Set this character to call Tick() every frame. You can turn this off to improve performance if you don't need it.
PrimaryActorTick.bCanEverTick = true;
PawnSensingComp = CreateDefaultSubobject<UPawnSensingComponent>(TEXT("PawnSensingComp"));
PawnSensingComp->SetPeripheralVisionAngle(90.0f);
}
// Called when the game starts or when spawned
void AAICharacter::BeginPlay()
{
Super::BeginPlay();
if (PawnSensingComp)
{
PawnSensingComp->OnSeePawn.AddDynamic(this, &AAICharacter::OnSeePlayer);
}
}
// Called every frame
void AAICharacter::Tick(float DeltaTime)
{
Super::Tick(DeltaTime);
}
void AAICharacter::OnSeePlayer(APawn * Pawn)
{
AMyAIController* AIController = Cast<AMyAIController>(GetController());
if (AIController) {
GLog->Log("Hello there");
AIController->SetSeenTarget(Pawn);
}
}
/*Called to bind functionality to input
void AAICharacter::SetupPlayerInputComponent(UInputComponent* PlayerInputComponent)
{
Super::SetupPlayerInputComponent(PlayerInputComponent);
}*/
| [
"noreply@github.com"
] | noreply@github.com |
2e74ba6473469173b54c65d32c1af32bc9f3d361 | 9d4e5ae304106cdd2d4818ca46c39543efb4e562 | /hw4/dGraph.h | 70e66c7520ebba671edbef6f5fdcaf6cff1db88d | [] | no_license | jerryccom24/cs311 | 79c9d7e14c76ae486b7295769e1b111a79b128a0 | e1884bdd3f6a0d52cf2a764cd4245f6a0c1c6b08 | refs/heads/master | 2020-12-10T05:31:02.023511 | 2020-01-13T05:00:02 | 2020-01-13T05:00:02 | 233,513,398 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,169 | h | // ====================================================
//HW#: HW4 dGraph
//Your name: Jerry Compton
//Complier: G++
//File type: dGraph Header file
//=====================================================
#include<iostream>
#include<string>
#include "slist.h"
using namespace std;
const int SIZE = 20; //Global const array size
//Each Vertex in the graph is a struct
struct Gvertex
{
char vertexName; //Letter of the Vertex
int outDegree; //Number of vertecies it points to
slist adjacent; // a searchable linked list of the adjacent verticies
};
class dGraph : public slist
{
private:
Gvertex Table[SIZE]; // Array of Gvertexs
int count; //number of Gvertexes used in array of Gvertexs
public:
dGraph();//constructor
~dGraph();//destructor ALSO! all of the slist destructors are still called within the client
void displayContents();
void readContents();//this will read in the contents of a graph from a file
int findOutDegree(char); // searches for the out degree of a vertex Name
slist findAdjacent(char); // finds the adjacent of a vertex Name
int getCount(){return count;} //return number of Gvertexes... For use in main
};
| [
"noreply@github.com"
] | noreply@github.com |
acc3a6a212e8283844a2d06a4c697e7074e8d05b | c28174332c8c7f60185da6cb2c8f1bbfe8ad454d | /utils/wavelet/core/filterbank.hpp | 1c3670db8840ee36a862c25e94c970240f865c25 | [] | no_license | jerryzhao173985/DEP-Diamond | 82d5419c47ee436f0fe98e61eac338c97bcb8f51 | 0934a8fc85bfd02ee4623b8dc735176eca677e69 | refs/heads/main | 2023-08-03T23:04:23.800174 | 2021-09-17T14:47:34 | 2021-09-17T14:47:34 | 377,610,420 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 14,930 | hpp | /*
* filterbank.h
*
* Wavelet Filter Bank
*
* Contact:
* - Jules Françoise <jules.francoise@ircam.fr>
*
* This code has been authored by <a href="http://julesfrancoise.com">Jules Françoise</a>
* in the framework of the <a href="http://skatvg.iuav.it/">SkAT-VG</a> European project,
* with <a href="frederic-bevilacqua.net">Frederic Bevilacqua</a>, in the
* <a href="http://ismm.ircam.fr">Sound Music Movement Interaction</a> team of the
* <a href="http://www.ircam.fr/stms.html?&L=1">STMS Lab</a> - IRCAM - CNRS - UPMC (2011-2015).
*
* Copyright (C) 2015 Ircam-Centre Pompidou.
*
* This File is part of Wavelet.
*
* Wavelet is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Wavelet 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 Wavelet. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef filterbank_h
#define filterbank_h
#include "wavelet.hpp"
#include "lowpass.hpp"
#include "../wavelets/morlet.hpp"
#include "../wavelets/paul.hpp"
#include <map>
#include <boost/circular_buffer.hpp>
#include <boost/throw_exception.hpp>
#ifdef USE_ARMA
#include <armadillo>
#endif
namespace wavelet {
/**
* @brief Implemented wavelet families
*/
enum Family : unsigned char {
/**
* @brief Morlet Wavelet
* @see MorletWavelet
*/
MORLET = 0,
/**
* @brief Paul Wavelet
* @see PaulWavelet
*/
PAUL = 1
};
/**
* @brief Default Wavelet family
*/
const Family DEFAULT_FAMILY = MORLET;
/**
* @class Filterbank
* @brief Minimal-delay Wavelet Filterbank
* @details Online scalogram estimation with minimal delay per scale (per frequency band).
* Several optimization modes are possible for estimating the online scalogram, using wavelet decimation,
* and optionally signal decimation. If using Armadillo, "process" methods can be used to compute the scalogram
* offline.
*/
class Filterbank : public AttributeHandler {
public:
/**
* @brief Optimisation level of the filterbank implementation
*/
enum Optimisation : unsigned char {
/**
* @brief No optimisation (no wavelet downsampling)
*/
NONE = 0,
/**
* @brief Standard Optimisation (Wavelet Downsampling with frame-based calculations)
*/
STANDARD = 1,
/**
* @brief Agressive Optimisation (Wavelet Downsampling with Signal Downsampling)
*/
AGRESSIVE = 2
};
#pragma mark -
#pragma mark === Public Interface ===
#pragma mark > Constructors
/** @name Constructors */
///@{
/**
* @brief Constructor
* @param samplerate sampling rate
* @param frequency_min minimum frequency of the filterbank
* @param frequency_max maximum frequency of the filterbank
* @param bands_per_octave number of bands per octave
*/
Filterbank(float samplerate,
float frequency_min,
float frequency_max,
float bands_per_octave);
/**
* @brief Copy Constructor
* @param src source Filterbank
*/
Filterbank(Filterbank const& src);
/**
* @brief Assignment operator
* @param src source Filterbank
*/
Filterbank& operator=(Filterbank const& src);
/**
* @brief Destructor
*/
virtual ~Filterbank();
///@}
#pragma mark > Accessors
/** @name Accessors */
///@{
/**
* @brief set attribute value by name
* @param attr_name attribute name
* @param attr_value attribute value
* @details Possible attributes are
* @throws runtime_error if the attribute does not exist for the current wavelet or is not shared among filters,
* or if the type does not match the attribute's internal type
*
* ### General attributes:
*
* Attribute name | Attribute type | Description | Value Range
* ------------- | ------------- | ---------- | ----------
* frequency_min | float | Minimum Frequency of the Filterbank (Hz) | ]0., samplerate/2.]
* frequency_max | float | Maximum Frequency of the Filterbank (Hz) | ]0., samplerate/2.]
* bands_per_octave | float | Number of bands per octave of the Filterbank | > 1.
* optimisation | Optimisation | Optimisation mode the filterbank implementation | {NONE, STANDARD, AGRESSIVE}
* family | Family | Wavelet Family | {MORLET, PAUL}
* samplerate | float | Sampling rate of the data | ]0.
* delay | float | Delay relative to critical wavelet time | > 0.
* padding | float | Padding relative to critical wavelet time | >=0.
*
* === Wavelet-specific attributes:
*
* Wavelet | Attribute name | Attribute type | Description | Value Range
* ------- | ------------- | ------------- | ---------- | ----------
* Morlet | omega0 | float | Carrier Frequency | > 0.
* Paul | order | unsigned int | Order of the Paul Wavelet | > 0
*/
template <typename T>
void setAttribute(std::string attr_name,
T attr_value)
{
try {
setAttribute_internal(attr_name, boost::any(attr_value));
} catch(const boost::bad_any_cast &) {
throw std::runtime_error("Argument value type does not match Attribute type");
}
}
/**
* @brief get attribute value by name
* @param attr_name attribute name
* @return attribute value
* @details Possible attributes are
* @throws runtime_error if the attribute does not exist for the current wavelet or is not shared among filters,
* or if the type does not match the attribute's internal type
*
* ### General attributes:
*
* Attribute name | Attribute type | Description
* ------------- | ------------- | ----------
* frequency_min | float | Minimum Frequency of the Filterbank (Hz)
* frequency_max | float | Maximum Frequency of the Filterbank (Hz)
* bands_per_octave | float | Number of bands per octave of the Filterbank
* optimisation | Optimisation | Optimisation mode the filterbank implementation
* family | Family | Wavelet Family
* samplerate | float | Sampling rate of the data
* delay | float | Delay relative to critical wavelet time
* padding | float | Padding relative to critical wavelet time
*
* === Wavelet-specific attributes:
*
* Wavelet | Attribute name | Attribute type | Description
* ------- | ------------- | ------------- | ----------
* Morlet | omega0 | float | Carrier Frequency
* Paul | order | unsigned int | Order of the Paul Wavelet
*/
template <typename T>
T getAttribute(std::string attr_name) const
{
try {
return boost::any_cast<T>(getAttribute_internal(attr_name));
} catch(const boost::bad_any_cast &) {
throw std::runtime_error("Return value type does not match Attribute type");
}
}
///@}
#pragma mark > Online Estimation
/** @name Online Estimation */
///@{
/**
* @brief update the filter with an incoming value
*/
void update(float value);
/**
* @brief clear the current data buffer
*/
void reset();
///@}
#pragma mark > Offline Estimation
#ifdef USE_ARMA
/** @name Offline Estimation */
///@{
/**
* @brief offline computation of the scalogram (uses FFT)
* @param values array of values (complete signal : length T)
* @return complex scalogram (C-like array with size: T * number of bands)
* @warning this method is only accessible if compiled with armadillo (USE_ARMA preprocessor macro defined)
*/
arma::cx_mat process(std::vector<double> values);
/**
* @brief batch computation of the scalogram using online estimation
* @param values array of values (complete signal : length T)
* @return complex scalogram (C-like array with size: T * number of bands)
* @warning this method is only accessible if compiled with armadillo (USE_ARMA preprocessor macro defined)
*/
arma::cx_mat process_online(std::vector<double> values);
///@}
#endif
#pragma mark > Utilities
/** @name Utilities */
///@{
/**
* @brief get number of bands
* @return number of wavelet filter bands
*/
std::size_t size() const;
/**
* @brief get info on the current configuration
* @return information string
*/
std::string info() const;
/**
* @brief get the delays in sample for each filter
* @return vector of delays in samples
*/
std::vector<int> delaysInSamples() const;
#ifdef SWIGPYTHON
/**
* @brief "print" method for python => returns the results of write method
* @return Python info string
* @warning only defined if SWIGPYTHON is defined
*/
std::string __str__() {
return info();
}
#endif
///@}
#pragma mark -
#pragma mark === Public Attributes ===
/**
* @brief Minimum Frequency of the Filterbank (Hz)
*/
Attribute<float> frequency_min;
/**
* @brief Maximum Frequency of the Filterbank (Hz)
*/
Attribute<float> frequency_max;
/**
* @brief Number of bands per octave of the Filterbank
*/
Attribute<float> bands_per_octave;
/**
* @brief Optimisation mode the filterbank implementation
*/
Attribute<Optimisation> optimisation;
/**
* @brief Wavelet Family
*/
Attribute<Family> family;
/**
* @brief rescale power frames
*/
Attribute<bool> rescale;
/**
* @brief Scales of each band in the filterbank
*/
std::vector<double> scales;
/**
* @brief Equivalent Fourier frequencies of each band in the filterbank
*/
std::vector<double> frequencies;
/**
* @brief Downsampling factor for each band
*/
std::vector<int> downsampling_factors;
/**
* @brief Results of the filtering process (scalogram slice)
*/
std::vector< std::complex<double> > result_complex;
/**
* @brief Resulting Power of the filtering process (power scalogram slice)
*/
std::vector<double> result_power;
///@cond DEVDOC
#ifndef WAVELET_TESTING
protected:
#endif
#pragma mark -
#pragma mark === Protected Methods ===
/** @name Protected Methods */
///@{
/**
* @brief Allocate and initialize the filter
*/
void init();
/**
* @brief initialize the filter when an attribute changes
* @param attr_pointer pointer to the changed attribute
*/
virtual void onAttributeChange(AttributeBase* attr_pointer);
/**
* @brief set attribute value by name
* @param attr_name attribute name
* @param attr_value attribute value
* @throws runtime_error if the attribute does not exist for the current wavelet or is not shared among filters,
* or if the type does not match the attribute's internal type
*/
virtual void setAttribute_internal(std::string attr_name,
boost::any const& attr_value);
/**
* @brief get attribute value by name
* @param attr_name attribute name
* @throws runtime_error if the attribute does not exist for the current wavelet or is not shared among filters,
* or if the type does not match the attribute's internal type
* @return attribute value
*/
virtual boost::any getAttribute_internal(std::string attr_name) const;
///@}
#pragma mark -
#pragma mark === Protected Attributes ===
/**
* @brief Data buffer (circular buffer shared among bands associated with the same samplerate)
*/
std::map<int, boost::circular_buffer<float>> data_;
/**
* @brief Low-pass Filters for decimation
*/
std::map<int, LowpassFilter> filters_;
/**
* @brief Wavelets
*/
std::vector< std::shared_ptr<Wavelet> > wavelets_;
/**
* @brief reference wavelet (stores common attributes)
*/
std::shared_ptr<Wavelet> reference_wavelet_;
/**
* @brief Current frame index (used to skip frames in agressive optimization)
*/
int frame_index_;
///@endcond
};
#pragma mark -
#pragma mark === Attribute Specializations ===
///@cond DEVDOC
template <>
void checkLimits<Family>(Family const& value,
Family const& limit_min,
Family const& limit_max);
template <>
void checkLimits<Filterbank::Optimisation>(Filterbank::Optimisation const& value,
Filterbank::Optimisation const& limit_min,
Filterbank::Optimisation const& limit_max);
template <>
Family Attribute<Family>::default_limit_max();
template <>
Filterbank::Optimisation Attribute<Filterbank::Optimisation>::default_limit_max();
///@endcond
}
#endif
| [
"jerryzhao173985@gmail.com"
] | jerryzhao173985@gmail.com |
7839a391fc29e8206b62ca16b81e578c7efc04de | 2bbf04bde4585ea4217f65a0037ff824007ada77 | /PhoenixBalance.cpp | 8d962219a3841d882a8eb824fbc681166168484c | [] | no_license | knight-byte/Codeforces-Problemset-Solution | 7e0dea73a3906434faf4e59dbc8dd5269b09a688 | cdac3669cc14385ed43f19621ba72a055a52c76c | refs/heads/main | 2023-04-09T00:06:27.062577 | 2021-04-28T05:28:24 | 2021-04-28T05:28:24 | 340,555,681 | 1 | 1 | null | 2021-02-20T03:50:47 | 2021-02-20T03:50:46 | null | UTF-8 | C++ | false | false | 351 | cpp | #include <bits/stdc++.h>
using namespace std;
int main(void) {
int t;
cin >> t;
while (t--) {
int n;
cin >> n;
int a=pow(2, n), b=0;
for (int i=1; i<n/2; i++)
a += pow(2, i);
for (int i=n/2; i<n; i++)
b += pow(2, i);
cout << abs(a-b) << endl;
}
return 0;
} | [
"arbkm22@gmail.com"
] | arbkm22@gmail.com |
4915c244e9181a5e9631974ac6204aa7df73e79b | 4b5011f8f4904475e302b18d4afa6dedd7b424d5 | /interaction/DraggableObject.h | d5decd935ced09c0996ccb49b32c0eee67a52eaf | [] | no_license | shashwat-vik/Carve | dbb4e950dff5d45b9ab13c5aa397e8d559a4535f | e1d3c25b997cb344e23a568698856d365e37620a | refs/heads/master | 2021-05-12T04:25:40.146572 | 2018-01-20T11:15:05 | 2018-01-20T11:15:05 | 117,162,666 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 5,090 | h | /*
Scan Tailor - Interactive post-processing tool for scanned pages.
Copyright (C) 2007-2009 Joseph Artsimovich <joseph_a@mail.ru>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef DRAGGABLE_OBJECT_H_
#define DRAGGABLE_OBJECT_H_
#include "InteractionState.h"
#include "../foundation/Proximity.h"
#include <boost/function.hpp>
class ObjectDragHandler;
class QPoint;
class QPointF;
class QPainter;
class DraggableObject
{
public:
typedef boost::function<
void (QPainter& painter, InteractionState const& interaction)
> PaintCallback;
typedef boost::function<
Proximity (InteractionState const& interaction)
> ProximityThresholdCallback;
typedef boost::function<
int ()
> ProximityPriorityCallback;
typedef boost::function<
Proximity (QPointF const& mouse_pos)
> ProximityCallback;
typedef boost::function<
void (QPointF const& mouse_pos)
> DragInitiatedCallback;
typedef boost::function<
void (QPointF const& mouse_pos)
> DragContinuationCallback;
typedef boost::function<
void (QPointF const& mouse_pos)
> DragFinishedCallback;
DraggableObject()
: m_paintCallback(&DraggableObject::defaultPaint),
m_proximityThresholdCallback(&DraggableObject::defaultProximityThreshold),
m_proximityPriorityCallback(&DraggableObject::defaultProximityPriority),
m_proximityCallback(),
m_dragInitiatedCallback(),
m_dragContinuationCallback(),
m_dragFinishedCallback(&DraggableObject::defaultDragFinished)
{}
virtual ~DraggableObject() {}
virtual void paint(QPainter& painter, InteractionState const& interaction) {
m_paintCallback(painter, interaction);
}
void setPaintCallback(PaintCallback const& callback) {
m_paintCallback = callback;
}
/**
* \return The maximum distance from the object (in widget coordinates) that
* still allows to initiate a dragging operation.
*/
virtual Proximity proximityThreshold(InteractionState const& interaction) const {
return m_proximityThresholdCallback(interaction);
}
void setProximityThresholdCallback(ProximityThresholdCallback const& callback) {
m_proximityThresholdCallback = callback;
}
/**
* Sometimes a more distant object should be selected for dragging in favor of
* a closer one. Consider for example a line segment with handles at its endpoints.
* In this example, you would assign higher priority to those handles.
*/
virtual int proximityPriority() const {
return m_proximityPriorityCallback();
}
void setProximityPriorityCallback(ProximityPriorityCallback const& callback) {
m_proximityPriorityCallback = callback;
}
/**
* \return The proximity from the mouse position in widget coordinates to
* any draggable part of the object.
*/
virtual Proximity proximity(QPointF const& widget_mouse_pos) {
return m_proximityCallback(widget_mouse_pos);
}
void setProximityCallback(ProximityCallback const& callback) {
m_proximityCallback = callback;
}
/**
* \brief Called when dragging is initiated, that is when the mouse button is pressed.
*/
virtual void dragInitiated(QPointF const& mouse_pos) {
m_dragInitiatedCallback(mouse_pos);
}
void setDragInitiatedCallback(DragInitiatedCallback const& callback) {
m_dragInitiatedCallback = callback;
}
/**
* \brief Handles a request to move to a particular position in widget coordinates.
*/
virtual void dragContinuation(QPointF const& mouse_pos) {
m_dragContinuationCallback(mouse_pos);
}
void setDragContinuationCallback(DragInitiatedCallback const& callback) {
m_dragContinuationCallback = callback;
}
/**
* \brief Called when dragging is finished, that is when the mouse button is released.
*/
virtual void dragFinished(QPointF const& mouse_pos) {
m_dragFinishedCallback(mouse_pos);
}
void setDragFinishedCallback(DragFinishedCallback const& callback) {
m_dragFinishedCallback = callback;
}
private:
static void defaultPaint(QPainter&, InteractionState const&) {}
static Proximity defaultProximityThreshold(InteractionState const& interaction) {
return interaction.proximityThreshold();
}
static int defaultProximityPriority() { return 0; }
static void defaultDragFinished(QPointF const&) {}
PaintCallback m_paintCallback;
ProximityThresholdCallback m_proximityThresholdCallback;
ProximityPriorityCallback m_proximityPriorityCallback;
ProximityCallback m_proximityCallback;
DragInitiatedCallback m_dragInitiatedCallback;
DragContinuationCallback m_dragContinuationCallback;
DragFinishedCallback m_dragFinishedCallback;
};
#endif
| [
"shashwat.vikram50@gmail.com"
] | shashwat.vikram50@gmail.com |
028fe1eaa16e25ebe37bee7a875cd1d264b4cb09 | ded682a97d00b85055471a5f27240f67d1ba2373 | /Shared/src/MemoryStream.cpp | 2aba202e0bb416941e6662d257e95f5c23c6b984 | [
"MIT"
] | permissive | Drewol/unnamed-sdvx-clone | c9b838da0054019fb9f4c07cb608c05455c9cd4e | 7895040479b560c98df19ad86424b2ce169afd82 | refs/heads/develop | 2023-08-11T15:22:23.316076 | 2023-08-02T17:31:35 | 2023-08-02T17:31:35 | 66,410,244 | 726 | 149 | MIT | 2023-08-02T17:31:36 | 2016-08-23T23:10:52 | C++ | UTF-8 | C++ | false | false | 1,300 | cpp | #include "stdafx.h"
#include "MemoryStream.hpp"
#include <algorithm>
MemoryStreamBase::MemoryStreamBase(Buffer& buffer, bool isReading) : BinaryStream(isReading), m_buffer(&buffer)
{
}
void MemoryStreamBase::Seek(size_t pos)
{
assert(m_buffer);
assert(pos <= m_buffer->size());
m_cursor = pos;
}
size_t MemoryStreamBase::Tell() const
{
assert(m_buffer);
return m_cursor;
}
size_t MemoryStreamBase::GetSize() const
{
assert(m_buffer);
return m_buffer->size();
}
MemoryReader::MemoryReader(Buffer& buffer) : MemoryStreamBase(buffer, true)
{
}
size_t MemoryReader::Serialize(void* data, size_t len)
{
assert(m_buffer);
size_t endPos = m_cursor + len;
if(endPos > m_buffer->size())
{
if(m_cursor >= m_buffer->size())
return 0;
len = m_buffer->size() - m_cursor;
}
if(len > 0)
{
memcpy(data, &(*m_buffer)[m_cursor], len);
m_cursor += len;
}
return len;
}
MemoryWriter::MemoryWriter(Buffer& buffer) : MemoryStreamBase(buffer, false)
{
}
size_t MemoryWriter::Serialize(void* data, size_t len)
{
if(len == 0)
return 0;
assert(m_buffer);
size_t newSize = std::max(m_buffer->size(), m_cursor + len);
// Reserve space for new data
if(newSize > m_buffer->size())
{
m_buffer->resize(newSize);
}
memcpy(&(*m_buffer)[m_cursor], data, len);
m_cursor += len;
return len;
}
| [
"guus_waals@live.nl"
] | guus_waals@live.nl |
c66714fc817096ac57aea24d3f18fb87f221490a | e31a1a597db0550d2a9613c9a3e209ff1472f6bd | /src/3rd-part/re2/re2/parse.cc | 1ddd63b0efc7a54ae7ae845ef491c7235a6c4e8f | [
"MIT"
] | permissive | g40/cppinclude | 6bd0cee7c25d3876193e7e3d7fc38e829104058c | dc126c6057d2fe30569e6e86f66d2c8eebb50212 | refs/heads/master | 2023-07-12T18:17:41.490719 | 2021-08-10T18:32:51 | 2021-08-10T18:32:51 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 75,418 | cc | // Copyright 2006 The RE2 Authors. All Rights Reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Regular expression parser.
// The parser is a simple precedence-based parser with a
// manual stack. The parsing work is done by the methods
// of the ParseState class. The Regexp::Parse function is
// essentially just a lexer that calls the ParseState method
// for each token.
// The parser recognizes POSIX extended regular expressions
// excluding backreferences, collating elements, and collating
// classes. It also allows the empty string as a regular expression
// and recognizes the Perl escape sequences \d, \s, \w, \D, \S, and \W.
// See regexp.h for rationale.
#include <ctype.h>
#include <stddef.h>
#include <stdint.h>
#include <string.h>
#include <algorithm>
#include <map>
#include <string>
#include <vector>
#include "util/util.h"
#include "util/logging.h"
#include "util/strutil.h"
#include "util/utf.h"
#include "re2/pod_array.h"
#include "re2/regexp.h"
#include "re2/stringpiece.h"
#include "re2/unicode_casefold.h"
#include "re2/unicode_groups.h"
#include "re2/walker-inl.h"
#if defined(RE2_USE_ICU)
#include "unicode/uniset.h"
#include "unicode/unistr.h"
#include "unicode/utypes.h"
#endif
namespace re2 {
// Controls the maximum repeat count permitted by the parser.
static int maximum_repeat_count = 1000;
void Regexp::FUZZING_ONLY_set_maximum_repeat_count(int i) {
maximum_repeat_count = i;
}
// Regular expression parse state.
// The list of parsed regexps so far is maintained as a vector of
// Regexp pointers called the stack. Left parenthesis and vertical
// bar markers are also placed on the stack, as Regexps with
// non-standard opcodes.
// Scanning a left parenthesis causes the parser to push a left parenthesis
// marker on the stack.
// Scanning a vertical bar causes the parser to pop the stack until it finds a
// vertical bar or left parenthesis marker (not popping the marker),
// concatenate all the popped results, and push them back on
// the stack (DoConcatenation).
// Scanning a right parenthesis causes the parser to act as though it
// has seen a vertical bar, which then leaves the top of the stack in the
// form LeftParen regexp VerticalBar regexp VerticalBar ... regexp VerticalBar.
// The parser pops all this off the stack and creates an alternation of the
// regexps (DoAlternation).
class Regexp::ParseState {
public:
ParseState(ParseFlags flags, const StringPiece& whole_regexp,
RegexpStatus* status);
~ParseState();
ParseFlags flags() { return flags_; }
int rune_max() { return rune_max_; }
// Parse methods. All public methods return a bool saying
// whether parsing should continue. If a method returns
// false, it has set fields in *status_, and the parser
// should return NULL.
// Pushes the given regular expression onto the stack.
// Could check for too much memory used here.
bool PushRegexp(Regexp* re);
// Pushes the literal rune r onto the stack.
bool PushLiteral(Rune r);
// Pushes a regexp with the given op (and no args) onto the stack.
bool PushSimpleOp(RegexpOp op);
// Pushes a ^ onto the stack.
bool PushCaret();
// Pushes a \b (word == true) or \B (word == false) onto the stack.
bool PushWordBoundary(bool word);
// Pushes a $ onto the stack.
bool PushDollar();
// Pushes a . onto the stack
bool PushDot();
// Pushes a repeat operator regexp onto the stack.
// A valid argument for the operator must already be on the stack.
// s is the name of the operator, for use in error messages.
bool PushRepeatOp(RegexpOp op, const StringPiece& s, bool nongreedy);
// Pushes a repetition regexp onto the stack.
// A valid argument for the operator must already be on the stack.
bool PushRepetition(int min, int max, const StringPiece& s, bool nongreedy);
// Checks whether a particular regexp op is a marker.
bool IsMarker(RegexpOp op);
// Processes a left parenthesis in the input.
// Pushes a marker onto the stack.
bool DoLeftParen(const StringPiece& name);
bool DoLeftParenNoCapture();
// Processes a vertical bar in the input.
bool DoVerticalBar();
// Processes a right parenthesis in the input.
bool DoRightParen();
// Processes the end of input, returning the final regexp.
Regexp* DoFinish();
// Finishes the regexp if necessary, preparing it for use
// in a more complicated expression.
// If it is a CharClassBuilder, converts into a CharClass.
Regexp* FinishRegexp(Regexp*);
// These routines don't manipulate the parse stack
// directly, but they do need to look at flags_.
// ParseCharClass also manipulates the internals of Regexp
// while creating *out_re.
// Parse a character class into *out_re.
// Removes parsed text from s.
bool ParseCharClass(StringPiece* s, Regexp** out_re,
RegexpStatus* status);
// Parse a character class character into *rp.
// Removes parsed text from s.
bool ParseCCCharacter(StringPiece* s, Rune *rp,
const StringPiece& whole_class,
RegexpStatus* status);
// Parse a character class range into rr.
// Removes parsed text from s.
bool ParseCCRange(StringPiece* s, RuneRange* rr,
const StringPiece& whole_class,
RegexpStatus* status);
// Parse a Perl flag set or non-capturing group from s.
bool ParsePerlFlags(StringPiece* s);
// Finishes the current concatenation,
// collapsing it into a single regexp on the stack.
void DoConcatenation();
// Finishes the current alternation,
// collapsing it to a single regexp on the stack.
void DoAlternation();
// Generalized DoAlternation/DoConcatenation.
void DoCollapse(RegexpOp op);
// Maybe concatenate Literals into LiteralString.
bool MaybeConcatString(int r, ParseFlags flags);
private:
ParseFlags flags_;
StringPiece whole_regexp_;
RegexpStatus* status_;
Regexp* stacktop_;
int ncap_; // number of capturing parens seen
int rune_max_; // maximum char value for this encoding
ParseState(const ParseState&) = delete;
ParseState& operator=(const ParseState&) = delete;
};
// Pseudo-operators - only on parse stack.
const RegexpOp kLeftParen = static_cast<RegexpOp>(kMaxRegexpOp+1);
const RegexpOp kVerticalBar = static_cast<RegexpOp>(kMaxRegexpOp+2);
Regexp::ParseState::ParseState(ParseFlags flags,
const StringPiece& whole_regexp,
RegexpStatus* status)
: flags_(flags), whole_regexp_(whole_regexp),
status_(status), stacktop_(NULL), ncap_(0) {
if (flags_ & Latin1)
rune_max_ = 0xFF;
else
rune_max_ = Runemax;
}
// Cleans up by freeing all the regexps on the stack.
Regexp::ParseState::~ParseState() {
Regexp* next;
for (Regexp* re = stacktop_; re != NULL; re = next) {
next = re->down_;
re->down_ = NULL;
if (re->op() == kLeftParen)
delete re->name_;
re->Decref();
}
}
// Finishes the regexp if necessary, preparing it for use in
// a more complex expression.
// If it is a CharClassBuilder, converts into a CharClass.
Regexp* Regexp::ParseState::FinishRegexp(Regexp* re) {
if (re == NULL)
return NULL;
re->down_ = NULL;
if (re->op_ == kRegexpCharClass && re->ccb_ != NULL) {
CharClassBuilder* ccb = re->ccb_;
re->ccb_ = NULL;
re->cc_ = ccb->GetCharClass();
delete ccb;
}
return re;
}
// Pushes the given regular expression onto the stack.
// Could check for too much memory used here.
bool Regexp::ParseState::PushRegexp(Regexp* re) {
MaybeConcatString(-1, NoParseFlags);
// Special case: a character class of one character is just
// a literal. This is a common idiom for escaping
// single characters (e.g., [.] instead of \.), and some
// analysis does better with fewer character classes.
// Similarly, [Aa] can be rewritten as a literal A with ASCII case folding.
if (re->op_ == kRegexpCharClass && re->ccb_ != NULL) {
re->ccb_->RemoveAbove(rune_max_);
if (re->ccb_->size() == 1) {
Rune r = re->ccb_->begin()->lo;
re->Decref();
re = new Regexp(kRegexpLiteral, flags_);
re->rune_ = r;
} else if (re->ccb_->size() == 2) {
Rune r = re->ccb_->begin()->lo;
if ('A' <= r && r <= 'Z' && re->ccb_->Contains(r + 'a' - 'A')) {
re->Decref();
re = new Regexp(kRegexpLiteral, flags_ | FoldCase);
re->rune_ = r + 'a' - 'A';
}
}
}
if (!IsMarker(re->op()))
re->simple_ = re->ComputeSimple();
re->down_ = stacktop_;
stacktop_ = re;
return true;
}
// Searches the case folding tables and returns the CaseFold* that contains r.
// If there isn't one, returns the CaseFold* with smallest f->lo bigger than r.
// If there isn't one, returns NULL.
const CaseFold* LookupCaseFold(const CaseFold *f, int n, Rune r) {
const CaseFold* ef = f + n;
// Binary search for entry containing r.
while (n > 0) {
int m = n/2;
if (f[m].lo <= r && r <= f[m].hi)
return &f[m];
if (r < f[m].lo) {
n = m;
} else {
f += m+1;
n -= m+1;
}
}
// There is no entry that contains r, but f points
// where it would have been. Unless f points at
// the end of the array, it points at the next entry
// after r.
if (f < ef)
return f;
// No entry contains r; no entry contains runes > r.
return NULL;
}
// Returns the result of applying the fold f to the rune r.
Rune ApplyFold(const CaseFold *f, Rune r) {
switch (f->delta) {
default:
return r + f->delta;
case EvenOddSkip: // even <-> odd but only applies to every other
if ((r - f->lo) % 2)
return r;
FALLTHROUGH_INTENDED;
case EvenOdd: // even <-> odd
if (r%2 == 0)
return r + 1;
return r - 1;
case OddEvenSkip: // odd <-> even but only applies to every other
if ((r - f->lo) % 2)
return r;
FALLTHROUGH_INTENDED;
case OddEven: // odd <-> even
if (r%2 == 1)
return r + 1;
return r - 1;
}
}
// Returns the next Rune in r's folding cycle (see unicode_casefold.h).
// Examples:
// CycleFoldRune('A') = 'a'
// CycleFoldRune('a') = 'A'
//
// CycleFoldRune('K') = 'k'
// CycleFoldRune('k') = 0x212A (Kelvin)
// CycleFoldRune(0x212A) = 'K'
//
// CycleFoldRune('?') = '?'
Rune CycleFoldRune(Rune r) {
const CaseFold* f = LookupCaseFold(unicode_casefold, num_unicode_casefold, r);
if (f == NULL || r < f->lo)
return r;
return ApplyFold(f, r);
}
// Add lo-hi to the class, along with their fold-equivalent characters.
// If lo-hi is already in the class, assume that the fold-equivalent
// chars are there too, so there's no work to do.
static void AddFoldedRange(CharClassBuilder* cc, Rune lo, Rune hi, int depth) {
// AddFoldedRange calls itself recursively for each rune in the fold cycle.
// Most folding cycles are small: there aren't any bigger than four in the
// current Unicode tables. make_unicode_casefold.py checks that
// the cycles are not too long, and we double-check here using depth.
if (depth > 10) {
LOG(DFATAL) << "AddFoldedRange recurses too much.";
return;
}
if (!cc->AddRange(lo, hi)) // lo-hi was already there? we're done
return;
while (lo <= hi) {
const CaseFold* f = LookupCaseFold(unicode_casefold, num_unicode_casefold, lo);
if (f == NULL) // lo has no fold, nor does anything above lo
break;
if (lo < f->lo) { // lo has no fold; next rune with a fold is f->lo
lo = f->lo;
continue;
}
// Add in the result of folding the range lo - f->hi
// and that range's fold, recursively.
Rune lo1 = lo;
Rune hi1 = std::min<Rune>(hi, f->hi);
switch (f->delta) {
default:
lo1 += f->delta;
hi1 += f->delta;
break;
case EvenOdd:
if (lo1%2 == 1)
lo1--;
if (hi1%2 == 0)
hi1++;
break;
case OddEven:
if (lo1%2 == 0)
lo1--;
if (hi1%2 == 1)
hi1++;
break;
}
AddFoldedRange(cc, lo1, hi1, depth+1);
// Pick up where this fold left off.
lo = f->hi + 1;
}
}
// Pushes the literal rune r onto the stack.
bool Regexp::ParseState::PushLiteral(Rune r) {
// Do case folding if needed.
if ((flags_ & FoldCase) && CycleFoldRune(r) != r) {
Regexp* re = new Regexp(kRegexpCharClass, flags_ & ~FoldCase);
re->ccb_ = new CharClassBuilder;
Rune r1 = r;
do {
if (!(flags_ & NeverNL) || r != '\n') {
re->ccb_->AddRange(r, r);
}
r = CycleFoldRune(r);
} while (r != r1);
return PushRegexp(re);
}
// Exclude newline if applicable.
if ((flags_ & NeverNL) && r == '\n')
return PushRegexp(new Regexp(kRegexpNoMatch, flags_));
// No fancy stuff worked. Ordinary literal.
if (MaybeConcatString(r, flags_))
return true;
Regexp* re = new Regexp(kRegexpLiteral, flags_);
re->rune_ = r;
return PushRegexp(re);
}
// Pushes a ^ onto the stack.
bool Regexp::ParseState::PushCaret() {
if (flags_ & OneLine) {
return PushSimpleOp(kRegexpBeginText);
}
return PushSimpleOp(kRegexpBeginLine);
}
// Pushes a \b or \B onto the stack.
bool Regexp::ParseState::PushWordBoundary(bool word) {
if (word)
return PushSimpleOp(kRegexpWordBoundary);
return PushSimpleOp(kRegexpNoWordBoundary);
}
// Pushes a $ onto the stack.
bool Regexp::ParseState::PushDollar() {
if (flags_ & OneLine) {
// Clumsy marker so that MimicsPCRE() can tell whether
// this kRegexpEndText was a $ and not a \z.
Regexp::ParseFlags oflags = flags_;
flags_ = flags_ | WasDollar;
bool ret = PushSimpleOp(kRegexpEndText);
flags_ = oflags;
return ret;
}
return PushSimpleOp(kRegexpEndLine);
}
// Pushes a . onto the stack.
bool Regexp::ParseState::PushDot() {
if ((flags_ & DotNL) && !(flags_ & NeverNL))
return PushSimpleOp(kRegexpAnyChar);
// Rewrite . into [^\n]
Regexp* re = new Regexp(kRegexpCharClass, flags_ & ~FoldCase);
re->ccb_ = new CharClassBuilder;
re->ccb_->AddRange(0, '\n' - 1);
re->ccb_->AddRange('\n' + 1, rune_max_);
return PushRegexp(re);
}
// Pushes a regexp with the given op (and no args) onto the stack.
bool Regexp::ParseState::PushSimpleOp(RegexpOp op) {
Regexp* re = new Regexp(op, flags_);
return PushRegexp(re);
}
// Pushes a repeat operator regexp onto the stack.
// A valid argument for the operator must already be on the stack.
// The char c is the name of the operator, for use in error messages.
bool Regexp::ParseState::PushRepeatOp(RegexpOp op, const StringPiece& s,
bool nongreedy) {
if (stacktop_ == NULL || IsMarker(stacktop_->op())) {
status_->set_code(kRegexpRepeatArgument);
status_->set_error_arg(s);
return false;
}
Regexp::ParseFlags fl = flags_;
if (nongreedy)
fl = fl ^ NonGreedy;
// Squash **, ++ and ??. Regexp::Star() et al. handle this too, but
// they're mostly for use during simplification, not during parsing.
if (op == stacktop_->op() && fl == stacktop_->parse_flags())
return true;
// Squash *+, *?, +*, +?, ?* and ?+. They all squash to *, so because
// op is a repeat, we just have to check that stacktop_->op() is too,
// then adjust stacktop_.
if ((stacktop_->op() == kRegexpStar ||
stacktop_->op() == kRegexpPlus ||
stacktop_->op() == kRegexpQuest) &&
fl == stacktop_->parse_flags()) {
stacktop_->op_ = kRegexpStar;
return true;
}
Regexp* re = new Regexp(op, fl);
re->AllocSub(1);
re->down_ = stacktop_->down_;
re->sub()[0] = FinishRegexp(stacktop_);
re->simple_ = re->ComputeSimple();
stacktop_ = re;
return true;
}
// RepetitionWalker reports whether the repetition regexp is valid.
// Valid means that the combination of the top-level repetition
// and any inner repetitions does not exceed n copies of the
// innermost thing.
// This rewalks the regexp tree and is called for every repetition,
// so we have to worry about inducing quadratic behavior in the parser.
// We avoid this by only using RepetitionWalker when min or max >= 2.
// In that case the depth of any >= 2 nesting can only get to 9 without
// triggering a parse error, so each subtree can only be rewalked 9 times.
class RepetitionWalker : public Regexp::Walker<int> {
public:
RepetitionWalker() {}
virtual int PreVisit(Regexp* re, int parent_arg, bool* stop);
virtual int PostVisit(Regexp* re, int parent_arg, int pre_arg,
int* child_args, int nchild_args);
virtual int ShortVisit(Regexp* re, int parent_arg);
private:
RepetitionWalker(const RepetitionWalker&) = delete;
RepetitionWalker& operator=(const RepetitionWalker&) = delete;
};
int RepetitionWalker::PreVisit(Regexp* re, int parent_arg, bool* stop) {
int arg = parent_arg;
if (re->op() == kRegexpRepeat) {
int m = re->max();
if (m < 0) {
m = re->min();
}
if (m > 0) {
arg /= m;
}
}
return arg;
}
int RepetitionWalker::PostVisit(Regexp* re, int parent_arg, int pre_arg,
int* child_args, int nchild_args) {
int arg = pre_arg;
for (int i = 0; i < nchild_args; i++) {
if (child_args[i] < arg) {
arg = child_args[i];
}
}
return arg;
}
int RepetitionWalker::ShortVisit(Regexp* re, int parent_arg) {
// Should never be called: we use Walk(), not WalkExponential().
#ifndef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
LOG(DFATAL) << "RepetitionWalker::ShortVisit called";
#endif
return 0;
}
// Pushes a repetition regexp onto the stack.
// A valid argument for the operator must already be on the stack.
bool Regexp::ParseState::PushRepetition(int min, int max,
const StringPiece& s,
bool nongreedy) {
if ((max != -1 && max < min) ||
min > maximum_repeat_count ||
max > maximum_repeat_count) {
status_->set_code(kRegexpRepeatSize);
status_->set_error_arg(s);
return false;
}
if (stacktop_ == NULL || IsMarker(stacktop_->op())) {
status_->set_code(kRegexpRepeatArgument);
status_->set_error_arg(s);
return false;
}
Regexp::ParseFlags fl = flags_;
if (nongreedy)
fl = fl ^ NonGreedy;
Regexp* re = new Regexp(kRegexpRepeat, fl);
re->min_ = min;
re->max_ = max;
re->AllocSub(1);
re->down_ = stacktop_->down_;
re->sub()[0] = FinishRegexp(stacktop_);
re->simple_ = re->ComputeSimple();
stacktop_ = re;
if (min >= 2 || max >= 2) {
RepetitionWalker w;
if (w.Walk(stacktop_, maximum_repeat_count) == 0) {
status_->set_code(kRegexpRepeatSize);
status_->set_error_arg(s);
return false;
}
}
return true;
}
// Checks whether a particular regexp op is a marker.
bool Regexp::ParseState::IsMarker(RegexpOp op) {
return op >= kLeftParen;
}
// Processes a left parenthesis in the input.
// Pushes a marker onto the stack.
bool Regexp::ParseState::DoLeftParen(const StringPiece& name) {
Regexp* re = new Regexp(kLeftParen, flags_);
re->cap_ = ++ncap_;
if (name.data() != NULL)
re->name_ = new std::string(name);
return PushRegexp(re);
}
// Pushes a non-capturing marker onto the stack.
bool Regexp::ParseState::DoLeftParenNoCapture() {
Regexp* re = new Regexp(kLeftParen, flags_);
re->cap_ = -1;
return PushRegexp(re);
}
// Processes a vertical bar in the input.
bool Regexp::ParseState::DoVerticalBar() {
MaybeConcatString(-1, NoParseFlags);
DoConcatenation();
// Below the vertical bar is a list to alternate.
// Above the vertical bar is a list to concatenate.
// We just did the concatenation, so either swap
// the result below the vertical bar or push a new
// vertical bar on the stack.
Regexp* r1;
Regexp* r2;
if ((r1 = stacktop_) != NULL &&
(r2 = r1->down_) != NULL &&
r2->op() == kVerticalBar) {
Regexp* r3;
if ((r3 = r2->down_) != NULL &&
(r1->op() == kRegexpAnyChar || r3->op() == kRegexpAnyChar)) {
// AnyChar is above or below the vertical bar. Let it subsume
// the other when the other is Literal, CharClass or AnyChar.
if (r3->op() == kRegexpAnyChar &&
(r1->op() == kRegexpLiteral ||
r1->op() == kRegexpCharClass ||
r1->op() == kRegexpAnyChar)) {
// Discard r1.
stacktop_ = r2;
r1->Decref();
return true;
}
if (r1->op() == kRegexpAnyChar &&
(r3->op() == kRegexpLiteral ||
r3->op() == kRegexpCharClass ||
r3->op() == kRegexpAnyChar)) {
// Rearrange the stack and discard r3.
r1->down_ = r3->down_;
r2->down_ = r1;
stacktop_ = r2;
r3->Decref();
return true;
}
}
// Swap r1 below vertical bar (r2).
r1->down_ = r2->down_;
r2->down_ = r1;
stacktop_ = r2;
return true;
}
return PushSimpleOp(kVerticalBar);
}
// Processes a right parenthesis in the input.
bool Regexp::ParseState::DoRightParen() {
// Finish the current concatenation and alternation.
DoAlternation();
// The stack should be: LeftParen regexp
// Remove the LeftParen, leaving the regexp,
// parenthesized.
Regexp* r1;
Regexp* r2;
if ((r1 = stacktop_) == NULL ||
(r2 = r1->down_) == NULL ||
r2->op() != kLeftParen) {
status_->set_code(kRegexpUnexpectedParen);
status_->set_error_arg(whole_regexp_);
return false;
}
// Pop off r1, r2. Will Decref or reuse below.
stacktop_ = r2->down_;
// Restore flags from when paren opened.
Regexp* re = r2;
flags_ = re->parse_flags();
// Rewrite LeftParen as capture if needed.
if (re->cap_ > 0) {
re->op_ = kRegexpCapture;
// re->cap_ is already set
re->AllocSub(1);
re->sub()[0] = FinishRegexp(r1);
re->simple_ = re->ComputeSimple();
} else {
re->Decref();
re = r1;
}
return PushRegexp(re);
}
// Processes the end of input, returning the final regexp.
Regexp* Regexp::ParseState::DoFinish() {
DoAlternation();
Regexp* re = stacktop_;
if (re != NULL && re->down_ != NULL) {
status_->set_code(kRegexpMissingParen);
status_->set_error_arg(whole_regexp_);
return NULL;
}
stacktop_ = NULL;
return FinishRegexp(re);
}
// Returns the leading regexp that re starts with.
// The returned Regexp* points into a piece of re,
// so it must not be used after the caller calls re->Decref().
Regexp* Regexp::LeadingRegexp(Regexp* re) {
if (re->op() == kRegexpEmptyMatch)
return NULL;
if (re->op() == kRegexpConcat && re->nsub() >= 2) {
Regexp** sub = re->sub();
if (sub[0]->op() == kRegexpEmptyMatch)
return NULL;
return sub[0];
}
return re;
}
// Removes LeadingRegexp(re) from re and returns what's left.
// Consumes the reference to re and may edit it in place.
// If caller wants to hold on to LeadingRegexp(re),
// must have already Incref'ed it.
Regexp* Regexp::RemoveLeadingRegexp(Regexp* re) {
if (re->op() == kRegexpEmptyMatch)
return re;
if (re->op() == kRegexpConcat && re->nsub() >= 2) {
Regexp** sub = re->sub();
if (sub[0]->op() == kRegexpEmptyMatch)
return re;
sub[0]->Decref();
sub[0] = NULL;
if (re->nsub() == 2) {
// Collapse concatenation to single regexp.
Regexp* nre = sub[1];
sub[1] = NULL;
re->Decref();
return nre;
}
// 3 or more -> 2 or more.
re->nsub_--;
memmove(sub, sub + 1, re->nsub_ * sizeof sub[0]);
return re;
}
Regexp::ParseFlags pf = re->parse_flags();
re->Decref();
return new Regexp(kRegexpEmptyMatch, pf);
}
// Returns the leading string that re starts with.
// The returned Rune* points into a piece of re,
// so it must not be used after the caller calls re->Decref().
Rune* Regexp::LeadingString(Regexp* re, int *nrune,
Regexp::ParseFlags *flags) {
while (re->op() == kRegexpConcat && re->nsub() > 0)
re = re->sub()[0];
*flags = static_cast<Regexp::ParseFlags>(re->parse_flags_ & Regexp::FoldCase);
if (re->op() == kRegexpLiteral) {
*nrune = 1;
return &re->rune_;
}
if (re->op() == kRegexpLiteralString) {
*nrune = re->nrunes_;
return re->runes_;
}
*nrune = 0;
return NULL;
}
// Removes the first n leading runes from the beginning of re.
// Edits re in place.
void Regexp::RemoveLeadingString(Regexp* re, int n) {
// Chase down concats to find first string.
// For regexps generated by parser, nested concats are
// flattened except when doing so would overflow the 16-bit
// limit on the size of a concatenation, so we should never
// see more than two here.
Regexp* stk[4];
size_t d = 0;
while (re->op() == kRegexpConcat) {
if (d < arraysize(stk))
stk[d++] = re;
re = re->sub()[0];
}
// Remove leading string from re.
if (re->op() == kRegexpLiteral) {
re->rune_ = 0;
re->op_ = kRegexpEmptyMatch;
} else if (re->op() == kRegexpLiteralString) {
if (n >= re->nrunes_) {
delete[] re->runes_;
re->runes_ = NULL;
re->nrunes_ = 0;
re->op_ = kRegexpEmptyMatch;
} else if (n == re->nrunes_ - 1) {
Rune rune = re->runes_[re->nrunes_ - 1];
delete[] re->runes_;
re->runes_ = NULL;
re->nrunes_ = 0;
re->rune_ = rune;
re->op_ = kRegexpLiteral;
} else {
re->nrunes_ -= n;
memmove(re->runes_, re->runes_ + n, re->nrunes_ * sizeof re->runes_[0]);
}
}
// If re is now empty, concatenations might simplify too.
while (d > 0) {
re = stk[--d];
Regexp** sub = re->sub();
if (sub[0]->op() == kRegexpEmptyMatch) {
sub[0]->Decref();
sub[0] = NULL;
// Delete first element of concat.
switch (re->nsub()) {
case 0:
case 1:
// Impossible.
LOG(DFATAL) << "Concat of " << re->nsub();
re->submany_ = NULL;
re->op_ = kRegexpEmptyMatch;
break;
case 2: {
// Replace re with sub[1].
Regexp* old = sub[1];
sub[1] = NULL;
re->Swap(old);
old->Decref();
break;
}
default:
// Slide down.
re->nsub_--;
memmove(sub, sub + 1, re->nsub_ * sizeof sub[0]);
break;
}
}
}
}
// In the context of factoring alternations, a Splice is: a factored prefix or
// merged character class computed by one iteration of one round of factoring;
// the span of subexpressions of the alternation to be "spliced" (i.e. removed
// and replaced); and, for a factored prefix, the number of suffixes after any
// factoring that might have subsequently been performed on them. For a merged
// character class, there are no suffixes, of course, so the field is ignored.
struct Splice {
Splice(Regexp* prefix, Regexp** sub, int nsub)
: prefix(prefix),
sub(sub),
nsub(nsub),
nsuffix(-1) {}
Regexp* prefix;
Regexp** sub;
int nsub;
int nsuffix;
};
// Named so because it is used to implement an explicit stack, a Frame is: the
// span of subexpressions of the alternation to be factored; the current round
// of factoring; any Splices computed; and, for a factored prefix, an iterator
// to the next Splice to be factored (i.e. in another Frame) because suffixes.
struct Frame {
Frame(Regexp** sub, int nsub)
: sub(sub),
nsub(nsub),
round(0) {}
Regexp** sub;
int nsub;
int round;
std::vector<Splice> splices;
int spliceidx;
};
// Bundled into a class for friend access to Regexp without needing to declare
// (or define) Splice in regexp.h.
class FactorAlternationImpl {
public:
static void Round1(Regexp** sub, int nsub,
Regexp::ParseFlags flags,
std::vector<Splice>* splices);
static void Round2(Regexp** sub, int nsub,
Regexp::ParseFlags flags,
std::vector<Splice>* splices);
static void Round3(Regexp** sub, int nsub,
Regexp::ParseFlags flags,
std::vector<Splice>* splices);
};
// Factors common prefixes from alternation.
// For example,
// ABC|ABD|AEF|BCX|BCY
// simplifies to
// A(B(C|D)|EF)|BC(X|Y)
// and thence to
// A(B[CD]|EF)|BC[XY]
//
// Rewrites sub to contain simplified list to alternate and returns
// the new length of sub. Adjusts reference counts accordingly
// (incoming sub[i] decremented, outgoing sub[i] incremented).
int Regexp::FactorAlternation(Regexp** sub, int nsub, ParseFlags flags) {
std::vector<Frame> stk;
stk.emplace_back(sub, nsub);
for (;;) {
auto& sub = stk.back().sub;
auto& nsub = stk.back().nsub;
auto& round = stk.back().round;
auto& splices = stk.back().splices;
auto& spliceidx = stk.back().spliceidx;
if (splices.empty()) {
// Advance to the next round of factoring. Note that this covers
// the initialised state: when splices is empty and round is 0.
round++;
} else if (spliceidx < static_cast<int>(splices.size())) {
// We have at least one more Splice to factor. Recurse logically.
stk.emplace_back(splices[spliceidx].sub, splices[spliceidx].nsub);
continue;
} else {
// We have no more Splices to factor. Apply them.
auto iter = splices.begin();
int out = 0;
for (int i = 0; i < nsub; ) {
// Copy until we reach where the next Splice begins.
while (sub + i < iter->sub)
sub[out++] = sub[i++];
switch (round) {
case 1:
case 2: {
// Assemble the Splice prefix and the suffixes.
Regexp* re[2];
re[0] = iter->prefix;
re[1] = Regexp::AlternateNoFactor(iter->sub, iter->nsuffix, flags);
sub[out++] = Regexp::Concat(re, 2, flags);
i += iter->nsub;
break;
}
case 3:
// Just use the Splice prefix.
sub[out++] = iter->prefix;
i += iter->nsub;
break;
default:
LOG(DFATAL) << "unknown round: " << round;
break;
}
// If we are done, copy until the end of sub.
if (++iter == splices.end()) {
while (i < nsub)
sub[out++] = sub[i++];
}
}
splices.clear();
nsub = out;
// Advance to the next round of factoring.
round++;
}
switch (round) {
case 1:
FactorAlternationImpl::Round1(sub, nsub, flags, &splices);
break;
case 2:
FactorAlternationImpl::Round2(sub, nsub, flags, &splices);
break;
case 3:
FactorAlternationImpl::Round3(sub, nsub, flags, &splices);
break;
case 4:
if (stk.size() == 1) {
// We are at the top of the stack. Just return.
return nsub;
} else {
// Pop the stack and set the number of suffixes.
// (Note that references will be invalidated!)
int nsuffix = nsub;
stk.pop_back();
stk.back().splices[stk.back().spliceidx].nsuffix = nsuffix;
++stk.back().spliceidx;
continue;
}
default:
LOG(DFATAL) << "unknown round: " << round;
break;
}
// Set spliceidx depending on whether we have Splices to factor.
if (splices.empty() || round == 3) {
spliceidx = static_cast<int>(splices.size());
} else {
spliceidx = 0;
}
}
}
void FactorAlternationImpl::Round1(Regexp** sub, int nsub,
Regexp::ParseFlags flags,
std::vector<Splice>* splices) {
// Round 1: Factor out common literal prefixes.
int start = 0;
Rune* rune = NULL;
int nrune = 0;
Regexp::ParseFlags runeflags = Regexp::NoParseFlags;
for (int i = 0; i <= nsub; i++) {
// Invariant: sub[start:i] consists of regexps that all
// begin with rune[0:nrune].
Rune* rune_i = NULL;
int nrune_i = 0;
Regexp::ParseFlags runeflags_i = Regexp::NoParseFlags;
if (i < nsub) {
rune_i = Regexp::LeadingString(sub[i], &nrune_i, &runeflags_i);
if (runeflags_i == runeflags) {
int same = 0;
while (same < nrune && same < nrune_i && rune[same] == rune_i[same])
same++;
if (same > 0) {
// Matches at least one rune in current range. Keep going around.
nrune = same;
continue;
}
}
}
// Found end of a run with common leading literal string:
// sub[start:i] all begin with rune[0:nrune],
// but sub[i] does not even begin with rune[0].
if (i == start) {
// Nothing to do - first iteration.
} else if (i == start+1) {
// Just one: don't bother factoring.
} else {
Regexp* prefix = Regexp::LiteralString(rune, nrune, runeflags);
for (int j = start; j < i; j++)
Regexp::RemoveLeadingString(sub[j], nrune);
splices->emplace_back(prefix, sub + start, i - start);
}
// Prepare for next iteration (if there is one).
if (i < nsub) {
start = i;
rune = rune_i;
nrune = nrune_i;
runeflags = runeflags_i;
}
}
}
void FactorAlternationImpl::Round2(Regexp** sub, int nsub,
Regexp::ParseFlags flags,
std::vector<Splice>* splices) {
// Round 2: Factor out common simple prefixes,
// just the first piece of each concatenation.
// This will be good enough a lot of the time.
//
// Complex subexpressions (e.g. involving quantifiers)
// are not safe to factor because that collapses their
// distinct paths through the automaton, which affects
// correctness in some cases.
int start = 0;
Regexp* first = NULL;
for (int i = 0; i <= nsub; i++) {
// Invariant: sub[start:i] consists of regexps that all
// begin with first.
Regexp* first_i = NULL;
if (i < nsub) {
first_i = Regexp::LeadingRegexp(sub[i]);
if (first != NULL &&
// first must be an empty-width op
// OR a char class, any char or any byte
// OR a fixed repeat of a literal, char class, any char or any byte.
(first->op() == kRegexpBeginLine ||
first->op() == kRegexpEndLine ||
first->op() == kRegexpWordBoundary ||
first->op() == kRegexpNoWordBoundary ||
first->op() == kRegexpBeginText ||
first->op() == kRegexpEndText ||
first->op() == kRegexpCharClass ||
first->op() == kRegexpAnyChar ||
first->op() == kRegexpAnyByte ||
(first->op() == kRegexpRepeat &&
first->min() == first->max() &&
(first->sub()[0]->op() == kRegexpLiteral ||
first->sub()[0]->op() == kRegexpCharClass ||
first->sub()[0]->op() == kRegexpAnyChar ||
first->sub()[0]->op() == kRegexpAnyByte))) &&
Regexp::Equal(first, first_i))
continue;
}
// Found end of a run with common leading regexp:
// sub[start:i] all begin with first,
// but sub[i] does not.
if (i == start) {
// Nothing to do - first iteration.
} else if (i == start+1) {
// Just one: don't bother factoring.
} else {
Regexp* prefix = first->Incref();
for (int j = start; j < i; j++)
sub[j] = Regexp::RemoveLeadingRegexp(sub[j]);
splices->emplace_back(prefix, sub + start, i - start);
}
// Prepare for next iteration (if there is one).
if (i < nsub) {
start = i;
first = first_i;
}
}
}
void FactorAlternationImpl::Round3(Regexp** sub, int nsub,
Regexp::ParseFlags flags,
std::vector<Splice>* splices) {
// Round 3: Merge runs of literals and/or character classes.
int start = 0;
Regexp* first = NULL;
for (int i = 0; i <= nsub; i++) {
// Invariant: sub[start:i] consists of regexps that all
// are either literals (i.e. runes) or character classes.
Regexp* first_i = NULL;
if (i < nsub) {
first_i = sub[i];
if (first != NULL &&
(first->op() == kRegexpLiteral ||
first->op() == kRegexpCharClass) &&
(first_i->op() == kRegexpLiteral ||
first_i->op() == kRegexpCharClass))
continue;
}
// Found end of a run of Literal/CharClass:
// sub[start:i] all are either one or the other,
// but sub[i] is not.
if (i == start) {
// Nothing to do - first iteration.
} else if (i == start+1) {
// Just one: don't bother factoring.
} else {
CharClassBuilder ccb;
for (int j = start; j < i; j++) {
Regexp* re = sub[j];
if (re->op() == kRegexpCharClass) {
CharClass* cc = re->cc();
for (CharClass::iterator it = cc->begin(); it != cc->end(); ++it)
ccb.AddRange(it->lo, it->hi);
} else if (re->op() == kRegexpLiteral) {
ccb.AddRangeFlags(re->rune(), re->rune(), re->parse_flags());
} else {
LOG(DFATAL) << "RE2: unexpected op: " << re->op() << " "
<< re->ToString();
}
re->Decref();
}
Regexp* re = Regexp::NewCharClass(ccb.GetCharClass(), flags);
splices->emplace_back(re, sub + start, i - start);
}
// Prepare for next iteration (if there is one).
if (i < nsub) {
start = i;
first = first_i;
}
}
}
// Collapse the regexps on top of the stack, down to the
// first marker, into a new op node (op == kRegexpAlternate
// or op == kRegexpConcat).
void Regexp::ParseState::DoCollapse(RegexpOp op) {
// Scan backward to marker, counting children of composite.
int n = 0;
Regexp* next = NULL;
Regexp* sub;
for (sub = stacktop_; sub != NULL && !IsMarker(sub->op()); sub = next) {
next = sub->down_;
if (sub->op_ == op)
n += sub->nsub_;
else
n++;
}
// If there's just one child, leave it alone.
// (Concat of one thing is that one thing; alternate of one thing is same.)
if (stacktop_ != NULL && stacktop_->down_ == next)
return;
// Construct op (alternation or concatenation), flattening op of op.
PODArray<Regexp*> subs(n);
next = NULL;
int i = n;
for (sub = stacktop_; sub != NULL && !IsMarker(sub->op()); sub = next) {
next = sub->down_;
if (sub->op_ == op) {
Regexp** sub_subs = sub->sub();
for (int k = sub->nsub_ - 1; k >= 0; k--)
subs[--i] = sub_subs[k]->Incref();
sub->Decref();
} else {
subs[--i] = FinishRegexp(sub);
}
}
Regexp* re = ConcatOrAlternate(op, subs.data(), n, flags_, true);
re->simple_ = re->ComputeSimple();
re->down_ = next;
stacktop_ = re;
} // NOLINT
// Finishes the current concatenation,
// collapsing it into a single regexp on the stack.
void Regexp::ParseState::DoConcatenation() {
Regexp* r1 = stacktop_;
if (r1 == NULL || IsMarker(r1->op())) {
// empty concatenation is special case
Regexp* re = new Regexp(kRegexpEmptyMatch, flags_);
PushRegexp(re);
}
DoCollapse(kRegexpConcat);
}
// Finishes the current alternation,
// collapsing it to a single regexp on the stack.
void Regexp::ParseState::DoAlternation() {
DoVerticalBar();
// Now stack top is kVerticalBar.
Regexp* r1 = stacktop_;
stacktop_ = r1->down_;
r1->Decref();
DoCollapse(kRegexpAlternate);
}
// Incremental conversion of concatenated literals into strings.
// If top two elements on stack are both literal or string,
// collapse into single string.
// Don't walk down the stack -- the parser calls this frequently
// enough that below the bottom two is known to be collapsed.
// Only called when another regexp is about to be pushed
// on the stack, so that the topmost literal is not being considered.
// (Otherwise ab* would turn into (ab)*.)
// If r >= 0, consider pushing a literal r on the stack.
// Return whether that happened.
bool Regexp::ParseState::MaybeConcatString(int r, ParseFlags flags) {
Regexp* re1;
Regexp* re2;
if ((re1 = stacktop_) == NULL || (re2 = re1->down_) == NULL)
return false;
if (re1->op_ != kRegexpLiteral && re1->op_ != kRegexpLiteralString)
return false;
if (re2->op_ != kRegexpLiteral && re2->op_ != kRegexpLiteralString)
return false;
if ((re1->parse_flags_ & FoldCase) != (re2->parse_flags_ & FoldCase))
return false;
if (re2->op_ == kRegexpLiteral) {
// convert into string
Rune rune = re2->rune_;
re2->op_ = kRegexpLiteralString;
re2->nrunes_ = 0;
re2->runes_ = NULL;
re2->AddRuneToString(rune);
}
// push re1 into re2.
if (re1->op_ == kRegexpLiteral) {
re2->AddRuneToString(re1->rune_);
} else {
for (int i = 0; i < re1->nrunes_; i++)
re2->AddRuneToString(re1->runes_[i]);
re1->nrunes_ = 0;
delete[] re1->runes_;
re1->runes_ = NULL;
}
// reuse re1 if possible
if (r >= 0) {
re1->op_ = kRegexpLiteral;
re1->rune_ = r;
re1->parse_flags_ = static_cast<uint16_t>(flags);
return true;
}
stacktop_ = re2;
re1->Decref();
return false;
}
// Lexing routines.
// Parses a decimal integer, storing it in *np.
// Sets *s to span the remainder of the string.
static bool ParseInteger(StringPiece* s, int* np) {
if (s->empty() || !isdigit((*s)[0] & 0xFF))
return false;
// Disallow leading zeros.
if (s->size() >= 2 && (*s)[0] == '0' && isdigit((*s)[1] & 0xFF))
return false;
int n = 0;
int c;
while (!s->empty() && isdigit(c = (*s)[0] & 0xFF)) {
// Avoid overflow.
if (n >= 100000000)
return false;
n = n*10 + c - '0';
s->remove_prefix(1); // digit
}
*np = n;
return true;
}
// Parses a repetition suffix like {1,2} or {2} or {2,}.
// Sets *s to span the remainder of the string on success.
// Sets *lo and *hi to the given range.
// In the case of {2,}, the high number is unbounded;
// sets *hi to -1 to signify this.
// {,2} is NOT a valid suffix.
// The Maybe in the name signifies that the regexp parse
// doesn't fail even if ParseRepetition does, so the StringPiece
// s must NOT be edited unless MaybeParseRepetition returns true.
static bool MaybeParseRepetition(StringPiece* sp, int* lo, int* hi) {
StringPiece s = *sp;
if (s.empty() || s[0] != '{')
return false;
s.remove_prefix(1); // '{'
if (!ParseInteger(&s, lo))
return false;
if (s.empty())
return false;
if (s[0] == ',') {
s.remove_prefix(1); // ','
if (s.empty())
return false;
if (s[0] == '}') {
// {2,} means at least 2
*hi = -1;
} else {
// {2,4} means 2, 3, or 4.
if (!ParseInteger(&s, hi))
return false;
}
} else {
// {2} means exactly two
*hi = *lo;
}
if (s.empty() || s[0] != '}')
return false;
s.remove_prefix(1); // '}'
*sp = s;
return true;
}
// Removes the next Rune from the StringPiece and stores it in *r.
// Returns number of bytes removed from sp.
// Behaves as though there is a terminating NUL at the end of sp.
// Argument order is backwards from usual Google style
// but consistent with chartorune.
static int StringPieceToRune(Rune *r, StringPiece *sp, RegexpStatus* status) {
// fullrune() takes int, not size_t. However, it just looks
// at the leading byte and treats any length >= 4 the same.
if (fullrune(sp->data(), static_cast<int>(std::min(size_t{4}, sp->size())))) {
int n = chartorune(r, sp->data());
// Some copies of chartorune have a bug that accepts
// encodings of values in (10FFFF, 1FFFFF] as valid.
// Those values break the character class algorithm,
// which assumes Runemax is the largest rune.
if (*r > Runemax) {
n = 1;
*r = Runeerror;
}
if (!(n == 1 && *r == Runeerror)) { // no decoding error
sp->remove_prefix(n);
return n;
}
}
status->set_code(kRegexpBadUTF8);
status->set_error_arg(StringPiece());
return -1;
}
// Return whether name is valid UTF-8.
// If not, set status to kRegexpBadUTF8.
static bool IsValidUTF8(const StringPiece& s, RegexpStatus* status) {
StringPiece t = s;
Rune r;
while (!t.empty()) {
if (StringPieceToRune(&r, &t, status) < 0)
return false;
}
return true;
}
// Is c a hex digit?
static int IsHex(int c) {
return ('0' <= c && c <= '9') ||
('A' <= c && c <= 'F') ||
('a' <= c && c <= 'f');
}
// Convert hex digit to value.
static int UnHex(int c) {
if ('0' <= c && c <= '9')
return c - '0';
if ('A' <= c && c <= 'F')
return c - 'A' + 10;
if ('a' <= c && c <= 'f')
return c - 'a' + 10;
LOG(DFATAL) << "Bad hex digit " << c;
return 0;
}
// Parse an escape sequence (e.g., \n, \{).
// Sets *s to span the remainder of the string.
// Sets *rp to the named character.
static bool ParseEscape(StringPiece* s, Rune* rp,
RegexpStatus* status, int rune_max) {
const char* begin = s->data();
if (s->empty() || (*s)[0] != '\\') {
// Should not happen - caller always checks.
status->set_code(kRegexpInternalError);
status->set_error_arg(StringPiece());
return false;
}
if (s->size() == 1) {
status->set_code(kRegexpTrailingBackslash);
status->set_error_arg(StringPiece());
return false;
}
Rune c, c1;
s->remove_prefix(1); // backslash
if (StringPieceToRune(&c, s, status) < 0)
return false;
int code;
switch (c) {
default:
if (c < Runeself && !isalpha(c) && !isdigit(c)) {
// Escaped non-word characters are always themselves.
// PCRE is not quite so rigorous: it accepts things like
// \q, but we don't. We once rejected \_, but too many
// programs and people insist on using it, so allow \_.
*rp = c;
return true;
}
goto BadEscape;
// Octal escapes.
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
// Single non-zero octal digit is a backreference; not supported.
if (s->empty() || (*s)[0] < '0' || (*s)[0] > '7')
goto BadEscape;
FALLTHROUGH_INTENDED;
case '0':
// consume up to three octal digits; already have one.
code = c - '0';
if (!s->empty() && '0' <= (c = (*s)[0]) && c <= '7') {
code = code * 8 + c - '0';
s->remove_prefix(1); // digit
if (!s->empty()) {
c = (*s)[0];
if ('0' <= c && c <= '7') {
code = code * 8 + c - '0';
s->remove_prefix(1); // digit
}
}
}
if (code > rune_max)
goto BadEscape;
*rp = code;
return true;
// Hexadecimal escapes
case 'x':
if (s->empty())
goto BadEscape;
if (StringPieceToRune(&c, s, status) < 0)
return false;
if (c == '{') {
// Any number of digits in braces.
// Update n as we consume the string, so that
// the whole thing gets shown in the error message.
// Perl accepts any text at all; it ignores all text
// after the first non-hex digit. We require only hex digits,
// and at least one.
if (StringPieceToRune(&c, s, status) < 0)
return false;
int nhex = 0;
code = 0;
while (IsHex(c)) {
nhex++;
code = code * 16 + UnHex(c);
if (code > rune_max)
goto BadEscape;
if (s->empty())
goto BadEscape;
if (StringPieceToRune(&c, s, status) < 0)
return false;
}
if (c != '}' || nhex == 0)
goto BadEscape;
*rp = code;
return true;
}
// Easy case: two hex digits.
if (s->empty())
goto BadEscape;
if (StringPieceToRune(&c1, s, status) < 0)
return false;
if (!IsHex(c) || !IsHex(c1))
goto BadEscape;
*rp = UnHex(c) * 16 + UnHex(c1);
return true;
// C escapes.
case 'n':
*rp = '\n';
return true;
case 'r':
*rp = '\r';
return true;
case 't':
*rp = '\t';
return true;
// Less common C escapes.
case 'a':
*rp = '\a';
return true;
case 'f':
*rp = '\f';
return true;
case 'v':
*rp = '\v';
return true;
// This code is disabled to avoid misparsing
// the Perl word-boundary \b as a backspace
// when in POSIX regexp mode. Surprisingly,
// in Perl, \b means word-boundary but [\b]
// means backspace. We don't support that:
// if you want a backspace embed a literal
// backspace character or use \x08.
//
// case 'b':
// *rp = '\b';
// return true;
}
LOG(DFATAL) << "Not reached in ParseEscape.";
BadEscape:
// Unrecognized escape sequence.
status->set_code(kRegexpBadEscape);
status->set_error_arg(
StringPiece(begin, static_cast<size_t>(s->data() - begin)));
return false;
}
// Add a range to the character class, but exclude newline if asked.
// Also handle case folding.
void CharClassBuilder::AddRangeFlags(
Rune lo, Rune hi, Regexp::ParseFlags parse_flags) {
// Take out \n if the flags say so.
bool cutnl = !(parse_flags & Regexp::ClassNL) ||
(parse_flags & Regexp::NeverNL);
if (cutnl && lo <= '\n' && '\n' <= hi) {
if (lo < '\n')
AddRangeFlags(lo, '\n' - 1, parse_flags);
if (hi > '\n')
AddRangeFlags('\n' + 1, hi, parse_flags);
return;
}
// If folding case, add fold-equivalent characters too.
if (parse_flags & Regexp::FoldCase)
AddFoldedRange(this, lo, hi, 0);
else
AddRange(lo, hi);
}
// Look for a group with the given name.
static const UGroup* LookupGroup(const StringPiece& name,
const UGroup *groups, int ngroups) {
// Simple name lookup.
for (int i = 0; i < ngroups; i++)
if (StringPiece(groups[i].name) == name)
return &groups[i];
return NULL;
}
// Look for a POSIX group with the given name (e.g., "[:^alpha:]")
static const UGroup* LookupPosixGroup(const StringPiece& name) {
return LookupGroup(name, posix_groups, num_posix_groups);
}
static const UGroup* LookupPerlGroup(const StringPiece& name) {
return LookupGroup(name, perl_groups, num_perl_groups);
}
#if !defined(RE2_USE_ICU)
// Fake UGroup containing all Runes
static URange16 any16[] = { { 0, 65535 } };
static URange32 any32[] = { { 65536, Runemax } };
static UGroup anygroup = { "Any", +1, any16, 1, any32, 1 };
// Look for a Unicode group with the given name (e.g., "Han")
static const UGroup* LookupUnicodeGroup(const StringPiece& name) {
// Special case: "Any" means any.
if (name == StringPiece("Any"))
return &anygroup;
return LookupGroup(name, unicode_groups, num_unicode_groups);
}
#endif
// Add a UGroup or its negation to the character class.
static void AddUGroup(CharClassBuilder *cc, const UGroup *g, int sign,
Regexp::ParseFlags parse_flags) {
if (sign == +1) {
for (int i = 0; i < g->nr16; i++) {
cc->AddRangeFlags(g->r16[i].lo, g->r16[i].hi, parse_flags);
}
for (int i = 0; i < g->nr32; i++) {
cc->AddRangeFlags(g->r32[i].lo, g->r32[i].hi, parse_flags);
}
} else {
if (parse_flags & Regexp::FoldCase) {
// Normally adding a case-folded group means
// adding all the extra fold-equivalent runes too.
// But if we're adding the negation of the group,
// we have to exclude all the runes that are fold-equivalent
// to what's already missing. Too hard, so do in two steps.
CharClassBuilder ccb1;
AddUGroup(&ccb1, g, +1, parse_flags);
// If the flags say to take out \n, put it in, so that negating will take it out.
// Normally AddRangeFlags does this, but we're bypassing AddRangeFlags.
bool cutnl = !(parse_flags & Regexp::ClassNL) ||
(parse_flags & Regexp::NeverNL);
if (cutnl) {
ccb1.AddRange('\n', '\n');
}
ccb1.Negate();
cc->AddCharClass(&ccb1);
return;
}
int next = 0;
for (int i = 0; i < g->nr16; i++) {
if (next < g->r16[i].lo)
cc->AddRangeFlags(next, g->r16[i].lo - 1, parse_flags);
next = g->r16[i].hi + 1;
}
for (int i = 0; i < g->nr32; i++) {
if (next < g->r32[i].lo)
cc->AddRangeFlags(next, g->r32[i].lo - 1, parse_flags);
next = g->r32[i].hi + 1;
}
if (next <= Runemax)
cc->AddRangeFlags(next, Runemax, parse_flags);
}
}
// Maybe parse a Perl character class escape sequence.
// Only recognizes the Perl character classes (\d \s \w \D \S \W),
// not the Perl empty-string classes (\b \B \A \Z \z).
// On success, sets *s to span the remainder of the string
// and returns the corresponding UGroup.
// The StringPiece must *NOT* be edited unless the call succeeds.
const UGroup* MaybeParsePerlCCEscape(StringPiece* s, Regexp::ParseFlags parse_flags) {
if (!(parse_flags & Regexp::PerlClasses))
return NULL;
if (s->size() < 2 || (*s)[0] != '\\')
return NULL;
// Could use StringPieceToRune, but there aren't
// any non-ASCII Perl group names.
StringPiece name(s->data(), 2);
const UGroup *g = LookupPerlGroup(name);
if (g == NULL)
return NULL;
s->remove_prefix(name.size());
return g;
}
enum ParseStatus {
kParseOk, // Did some parsing.
kParseError, // Found an error.
kParseNothing, // Decided not to parse.
};
// Maybe parses a Unicode character group like \p{Han} or \P{Han}
// (the latter is a negated group).
ParseStatus ParseUnicodeGroup(StringPiece* s, Regexp::ParseFlags parse_flags,
CharClassBuilder *cc,
RegexpStatus* status) {
// Decide whether to parse.
if (!(parse_flags & Regexp::UnicodeGroups))
return kParseNothing;
if (s->size() < 2 || (*s)[0] != '\\')
return kParseNothing;
Rune c = (*s)[1];
if (c != 'p' && c != 'P')
return kParseNothing;
// Committed to parse. Results:
int sign = +1; // -1 = negated char class
if (c == 'P')
sign = -sign;
StringPiece seq = *s; // \p{Han} or \pL
StringPiece name; // Han or L
s->remove_prefix(2); // '\\', 'p'
if (!StringPieceToRune(&c, s, status))
return kParseError;
if (c != '{') {
// Name is the bit of string we just skipped over for c.
const char* p = seq.data() + 2;
name = StringPiece(p, static_cast<size_t>(s->data() - p));
} else {
// Name is in braces. Look for closing }
size_t end = s->find('}', 0);
if (end == StringPiece::npos) {
if (!IsValidUTF8(seq, status))
return kParseError;
status->set_code(kRegexpBadCharRange);
status->set_error_arg(seq);
return kParseError;
}
name = StringPiece(s->data(), end); // without '}'
s->remove_prefix(end + 1); // with '}'
if (!IsValidUTF8(name, status))
return kParseError;
}
// Chop seq where s now begins.
seq = StringPiece(seq.data(), static_cast<size_t>(s->data() - seq.data()));
if (!name.empty() && name[0] == '^') {
sign = -sign;
name.remove_prefix(1); // '^'
}
#if !defined(RE2_USE_ICU)
// Look up the group in the RE2 Unicode data.
const UGroup *g = LookupUnicodeGroup(name);
if (g == NULL) {
status->set_code(kRegexpBadCharRange);
status->set_error_arg(seq);
return kParseError;
}
AddUGroup(cc, g, sign, parse_flags);
#else
// Look up the group in the ICU Unicode data. Because ICU provides full
// Unicode properties support, this could be more than a lookup by name.
::icu::UnicodeString ustr = ::icu::UnicodeString::fromUTF8(
std::string("\\p{") + std::string(name) + std::string("}"));
UErrorCode uerr = U_ZERO_ERROR;
::icu::UnicodeSet uset(ustr, uerr);
if (U_FAILURE(uerr)) {
status->set_code(kRegexpBadCharRange);
status->set_error_arg(seq);
return kParseError;
}
// Convert the UnicodeSet to a URange32 and UGroup that we can add.
int nr = uset.getRangeCount();
PODArray<URange32> r(nr);
for (int i = 0; i < nr; i++) {
r[i].lo = uset.getRangeStart(i);
r[i].hi = uset.getRangeEnd(i);
}
UGroup g = {"", +1, 0, 0, r.data(), nr};
AddUGroup(cc, &g, sign, parse_flags);
#endif
return kParseOk;
}
// Parses a character class name like [:alnum:].
// Sets *s to span the remainder of the string.
// Adds the ranges corresponding to the class to ranges.
static ParseStatus ParseCCName(StringPiece* s, Regexp::ParseFlags parse_flags,
CharClassBuilder *cc,
RegexpStatus* status) {
// Check begins with [:
const char* p = s->data();
const char* ep = s->data() + s->size();
if (ep - p < 2 || p[0] != '[' || p[1] != ':')
return kParseNothing;
// Look for closing :].
const char* q;
for (q = p+2; q <= ep-2 && (*q != ':' || *(q+1) != ']'); q++)
;
// If no closing :], then ignore.
if (q > ep-2)
return kParseNothing;
// Got it. Check that it's valid.
q += 2;
StringPiece name(p, static_cast<size_t>(q - p));
const UGroup *g = LookupPosixGroup(name);
if (g == NULL) {
status->set_code(kRegexpBadCharRange);
status->set_error_arg(name);
return kParseError;
}
s->remove_prefix(name.size());
AddUGroup(cc, g, g->sign, parse_flags);
return kParseOk;
}
// Parses a character inside a character class.
// There are fewer special characters here than in the rest of the regexp.
// Sets *s to span the remainder of the string.
// Sets *rp to the character.
bool Regexp::ParseState::ParseCCCharacter(StringPiece* s, Rune *rp,
const StringPiece& whole_class,
RegexpStatus* status) {
if (s->empty()) {
status->set_code(kRegexpMissingBracket);
status->set_error_arg(whole_class);
return false;
}
// Allow regular escape sequences even though
// many need not be escaped in this context.
if ((*s)[0] == '\\')
return ParseEscape(s, rp, status, rune_max_);
// Otherwise take the next rune.
return StringPieceToRune(rp, s, status) >= 0;
}
// Parses a character class character, or, if the character
// is followed by a hyphen, parses a character class range.
// For single characters, rr->lo == rr->hi.
// Sets *s to span the remainder of the string.
// Sets *rp to the character.
bool Regexp::ParseState::ParseCCRange(StringPiece* s, RuneRange* rr,
const StringPiece& whole_class,
RegexpStatus* status) {
StringPiece os = *s;
if (!ParseCCCharacter(s, &rr->lo, whole_class, status))
return false;
// [a-] means (a|-), so check for final ].
if (s->size() >= 2 && (*s)[0] == '-' && (*s)[1] != ']') {
s->remove_prefix(1); // '-'
if (!ParseCCCharacter(s, &rr->hi, whole_class, status))
return false;
if (rr->hi < rr->lo) {
status->set_code(kRegexpBadCharRange);
status->set_error_arg(
StringPiece(os.data(), static_cast<size_t>(s->data() - os.data())));
return false;
}
} else {
rr->hi = rr->lo;
}
return true;
}
// Parses a possibly-negated character class expression like [^abx-z[:digit:]].
// Sets *s to span the remainder of the string.
// Sets *out_re to the regexp for the class.
bool Regexp::ParseState::ParseCharClass(StringPiece* s,
Regexp** out_re,
RegexpStatus* status) {
StringPiece whole_class = *s;
if (s->empty() || (*s)[0] != '[') {
// Caller checked this.
status->set_code(kRegexpInternalError);
status->set_error_arg(StringPiece());
return false;
}
bool negated = false;
Regexp* re = new Regexp(kRegexpCharClass, flags_ & ~FoldCase);
re->ccb_ = new CharClassBuilder;
s->remove_prefix(1); // '['
if (!s->empty() && (*s)[0] == '^') {
s->remove_prefix(1); // '^'
negated = true;
if (!(flags_ & ClassNL) || (flags_ & NeverNL)) {
// If NL can't match implicitly, then pretend
// negated classes include a leading \n.
re->ccb_->AddRange('\n', '\n');
}
}
bool first = true; // ] is okay as first char in class
while (!s->empty() && ((*s)[0] != ']' || first)) {
// - is only okay unescaped as first or last in class.
// Except that Perl allows - anywhere.
if ((*s)[0] == '-' && !first && !(flags_&PerlX) &&
(s->size() == 1 || (*s)[1] != ']')) {
StringPiece t = *s;
t.remove_prefix(1); // '-'
Rune r;
int n = StringPieceToRune(&r, &t, status);
if (n < 0) {
re->Decref();
return false;
}
status->set_code(kRegexpBadCharRange);
status->set_error_arg(StringPiece(s->data(), 1+n));
re->Decref();
return false;
}
first = false;
// Look for [:alnum:] etc.
if (s->size() > 2 && (*s)[0] == '[' && (*s)[1] == ':') {
switch (ParseCCName(s, flags_, re->ccb_, status)) {
case kParseOk:
continue;
case kParseError:
re->Decref();
return false;
case kParseNothing:
break;
}
}
// Look for Unicode character group like \p{Han}
if (s->size() > 2 &&
(*s)[0] == '\\' &&
((*s)[1] == 'p' || (*s)[1] == 'P')) {
switch (ParseUnicodeGroup(s, flags_, re->ccb_, status)) {
case kParseOk:
continue;
case kParseError:
re->Decref();
return false;
case kParseNothing:
break;
}
}
// Look for Perl character class symbols (extension).
const UGroup *g = MaybeParsePerlCCEscape(s, flags_);
if (g != NULL) {
AddUGroup(re->ccb_, g, g->sign, flags_);
continue;
}
// Otherwise assume single character or simple range.
RuneRange rr;
if (!ParseCCRange(s, &rr, whole_class, status)) {
re->Decref();
return false;
}
// AddRangeFlags is usually called in response to a class like
// \p{Foo} or [[:foo:]]; for those, it filters \n out unless
// Regexp::ClassNL is set. In an explicit range or singleton
// like we just parsed, we do not filter \n out, so set ClassNL
// in the flags.
re->ccb_->AddRangeFlags(rr.lo, rr.hi, flags_ | Regexp::ClassNL);
}
if (s->empty()) {
status->set_code(kRegexpMissingBracket);
status->set_error_arg(whole_class);
re->Decref();
return false;
}
s->remove_prefix(1); // ']'
if (negated)
re->ccb_->Negate();
*out_re = re;
return true;
}
// Is this a valid capture name? [A-Za-z0-9_]+
// PCRE limits names to 32 bytes.
// Python rejects names starting with digits.
// We don't enforce either of those.
static bool IsValidCaptureName(const StringPiece& name) {
if (name.empty())
return false;
for (size_t i = 0; i < name.size(); i++) {
int c = name[i];
if (('0' <= c && c <= '9') ||
('a' <= c && c <= 'z') ||
('A' <= c && c <= 'Z') ||
c == '_')
continue;
return false;
}
return true;
}
// Parses a Perl flag setting or non-capturing group or both,
// like (?i) or (?: or (?i:. Removes from s, updates parse state.
// The caller must check that s begins with "(?".
// Returns true on success. If the Perl flag is not
// well-formed or not supported, sets status_ and returns false.
bool Regexp::ParseState::ParsePerlFlags(StringPiece* s) {
StringPiece t = *s;
// Caller is supposed to check this.
if (!(flags_ & PerlX) || t.size() < 2 || t[0] != '(' || t[1] != '?') {
LOG(DFATAL) << "Bad call to ParseState::ParsePerlFlags";
status_->set_code(kRegexpInternalError);
return false;
}
t.remove_prefix(2); // "(?"
// Check for named captures, first introduced in Python's regexp library.
// As usual, there are three slightly different syntaxes:
//
// (?P<name>expr) the original, introduced by Python
// (?<name>expr) the .NET alteration, adopted by Perl 5.10
// (?'name'expr) another .NET alteration, adopted by Perl 5.10
//
// Perl 5.10 gave in and implemented the Python version too,
// but they claim that the last two are the preferred forms.
// PCRE and languages based on it (specifically, PHP and Ruby)
// support all three as well. EcmaScript 4 uses only the Python form.
//
// In both the open source world (via Code Search) and the
// Google source tree, (?P<expr>name) is the dominant form,
// so that's the one we implement. One is enough.
if (t.size() > 2 && t[0] == 'P' && t[1] == '<') {
// Pull out name.
size_t end = t.find('>', 2);
if (end == StringPiece::npos) {
if (!IsValidUTF8(*s, status_))
return false;
status_->set_code(kRegexpBadNamedCapture);
status_->set_error_arg(*s);
return false;
}
// t is "P<name>...", t[end] == '>'
StringPiece capture(t.data()-2, end+3); // "(?P<name>"
StringPiece name(t.data()+2, end-2); // "name"
if (!IsValidUTF8(name, status_))
return false;
if (!IsValidCaptureName(name)) {
status_->set_code(kRegexpBadNamedCapture);
status_->set_error_arg(capture);
return false;
}
if (!DoLeftParen(name)) {
// DoLeftParen's failure set status_.
return false;
}
s->remove_prefix(
static_cast<size_t>(capture.data() + capture.size() - s->data()));
return true;
}
bool negated = false;
bool sawflags = false;
int nflags = flags_;
Rune c;
for (bool done = false; !done; ) {
if (t.empty())
goto BadPerlOp;
if (StringPieceToRune(&c, &t, status_) < 0)
return false;
switch (c) {
default:
goto BadPerlOp;
// Parse flags.
case 'i':
sawflags = true;
if (negated)
nflags &= ~FoldCase;
else
nflags |= FoldCase;
break;
case 'm': // opposite of our OneLine
sawflags = true;
if (negated)
nflags |= OneLine;
else
nflags &= ~OneLine;
break;
case 's':
sawflags = true;
if (negated)
nflags &= ~DotNL;
else
nflags |= DotNL;
break;
case 'U':
sawflags = true;
if (negated)
nflags &= ~NonGreedy;
else
nflags |= NonGreedy;
break;
// Negation
case '-':
if (negated)
goto BadPerlOp;
negated = true;
sawflags = false;
break;
// Open new group.
case ':':
if (!DoLeftParenNoCapture()) {
// DoLeftParenNoCapture's failure set status_.
return false;
}
done = true;
break;
// Finish flags.
case ')':
done = true;
break;
}
}
if (negated && !sawflags)
goto BadPerlOp;
flags_ = static_cast<Regexp::ParseFlags>(nflags);
*s = t;
return true;
BadPerlOp:
status_->set_code(kRegexpBadPerlOp);
status_->set_error_arg(
StringPiece(s->data(), static_cast<size_t>(t.data() - s->data())));
return false;
}
// Converts latin1 (assumed to be encoded as Latin1 bytes)
// into UTF8 encoding in string.
// Can't use EncodingUtils::EncodeLatin1AsUTF8 because it is
// deprecated and because it rejects code points 0x80-0x9F.
void ConvertLatin1ToUTF8(const StringPiece& latin1, std::string* utf) {
char buf[UTFmax];
utf->clear();
for (size_t i = 0; i < latin1.size(); i++) {
Rune r = latin1[i] & 0xFF;
int n = runetochar(buf, &r);
utf->append(buf, n);
}
}
// Parses the regular expression given by s,
// returning the corresponding Regexp tree.
// The caller must Decref the return value when done with it.
// Returns NULL on error.
Regexp* Regexp::Parse(const StringPiece& s, ParseFlags global_flags,
RegexpStatus* status) {
// Make status non-NULL (easier on everyone else).
RegexpStatus xstatus;
if (status == NULL)
status = &xstatus;
ParseState ps(global_flags, s, status);
StringPiece t = s;
// Convert regexp to UTF-8 (easier on the rest of the parser).
if (global_flags & Latin1) {
std::string* tmp = new std::string;
ConvertLatin1ToUTF8(t, tmp);
status->set_tmp(tmp);
t = *tmp;
}
if (global_flags & Literal) {
// Special parse loop for literal string.
while (!t.empty()) {
Rune r;
if (StringPieceToRune(&r, &t, status) < 0)
return NULL;
if (!ps.PushLiteral(r))
return NULL;
}
return ps.DoFinish();
}
StringPiece lastunary = StringPiece();
while (!t.empty()) {
StringPiece isunary = StringPiece();
switch (t[0]) {
default: {
Rune r;
if (StringPieceToRune(&r, &t, status) < 0)
return NULL;
if (!ps.PushLiteral(r))
return NULL;
break;
}
case '(':
// "(?" introduces Perl escape.
if ((ps.flags() & PerlX) && (t.size() >= 2 && t[1] == '?')) {
// Flag changes and non-capturing groups.
if (!ps.ParsePerlFlags(&t))
return NULL;
break;
}
if (ps.flags() & NeverCapture) {
if (!ps.DoLeftParenNoCapture())
return NULL;
} else {
if (!ps.DoLeftParen(StringPiece()))
return NULL;
}
t.remove_prefix(1); // '('
break;
case '|':
if (!ps.DoVerticalBar())
return NULL;
t.remove_prefix(1); // '|'
break;
case ')':
if (!ps.DoRightParen())
return NULL;
t.remove_prefix(1); // ')'
break;
case '^': // Beginning of line.
if (!ps.PushCaret())
return NULL;
t.remove_prefix(1); // '^'
break;
case '$': // End of line.
if (!ps.PushDollar())
return NULL;
t.remove_prefix(1); // '$'
break;
case '.': // Any character (possibly except newline).
if (!ps.PushDot())
return NULL;
t.remove_prefix(1); // '.'
break;
case '[': { // Character class.
Regexp* re;
if (!ps.ParseCharClass(&t, &re, status))
return NULL;
if (!ps.PushRegexp(re))
return NULL;
break;
}
case '*': { // Zero or more.
RegexpOp op;
op = kRegexpStar;
goto Rep;
case '+': // One or more.
op = kRegexpPlus;
goto Rep;
case '?': // Zero or one.
op = kRegexpQuest;
goto Rep;
Rep:
StringPiece opstr = t;
bool nongreedy = false;
t.remove_prefix(1); // '*' or '+' or '?'
if (ps.flags() & PerlX) {
if (!t.empty() && t[0] == '?') {
nongreedy = true;
t.remove_prefix(1); // '?'
}
if (!lastunary.empty()) {
// In Perl it is not allowed to stack repetition operators:
// a** is a syntax error, not a double-star.
// (and a++ means something else entirely, which we don't support!)
status->set_code(kRegexpRepeatOp);
status->set_error_arg(StringPiece(
lastunary.data(),
static_cast<size_t>(t.data() - lastunary.data())));
return NULL;
}
}
opstr = StringPiece(opstr.data(),
static_cast<size_t>(t.data() - opstr.data()));
if (!ps.PushRepeatOp(op, opstr, nongreedy))
return NULL;
isunary = opstr;
break;
}
case '{': { // Counted repetition.
int lo, hi;
StringPiece opstr = t;
if (!MaybeParseRepetition(&t, &lo, &hi)) {
// Treat like a literal.
if (!ps.PushLiteral('{'))
return NULL;
t.remove_prefix(1); // '{'
break;
}
bool nongreedy = false;
if (ps.flags() & PerlX) {
if (!t.empty() && t[0] == '?') {
nongreedy = true;
t.remove_prefix(1); // '?'
}
if (!lastunary.empty()) {
// Not allowed to stack repetition operators.
status->set_code(kRegexpRepeatOp);
status->set_error_arg(StringPiece(
lastunary.data(),
static_cast<size_t>(t.data() - lastunary.data())));
return NULL;
}
}
opstr = StringPiece(opstr.data(),
static_cast<size_t>(t.data() - opstr.data()));
if (!ps.PushRepetition(lo, hi, opstr, nongreedy))
return NULL;
isunary = opstr;
break;
}
case '\\': { // Escaped character or Perl sequence.
// \b and \B: word boundary or not
if ((ps.flags() & Regexp::PerlB) &&
t.size() >= 2 && (t[1] == 'b' || t[1] == 'B')) {
if (!ps.PushWordBoundary(t[1] == 'b'))
return NULL;
t.remove_prefix(2); // '\\', 'b'
break;
}
if ((ps.flags() & Regexp::PerlX) && t.size() >= 2) {
if (t[1] == 'A') {
if (!ps.PushSimpleOp(kRegexpBeginText))
return NULL;
t.remove_prefix(2); // '\\', 'A'
break;
}
if (t[1] == 'z') {
if (!ps.PushSimpleOp(kRegexpEndText))
return NULL;
t.remove_prefix(2); // '\\', 'z'
break;
}
// Do not recognize \Z, because this library can't
// implement the exact Perl/PCRE semantics.
// (This library treats "(?-m)$" as \z, even though
// in Perl and PCRE it is equivalent to \Z.)
if (t[1] == 'C') { // \C: any byte [sic]
if (!ps.PushSimpleOp(kRegexpAnyByte))
return NULL;
t.remove_prefix(2); // '\\', 'C'
break;
}
if (t[1] == 'Q') { // \Q ... \E: the ... is always literals
t.remove_prefix(2); // '\\', 'Q'
while (!t.empty()) {
if (t.size() >= 2 && t[0] == '\\' && t[1] == 'E') {
t.remove_prefix(2); // '\\', 'E'
break;
}
Rune r;
if (StringPieceToRune(&r, &t, status) < 0)
return NULL;
if (!ps.PushLiteral(r))
return NULL;
}
break;
}
}
if (t.size() >= 2 && (t[1] == 'p' || t[1] == 'P')) {
Regexp* re = new Regexp(kRegexpCharClass, ps.flags() & ~FoldCase);
re->ccb_ = new CharClassBuilder;
switch (ParseUnicodeGroup(&t, ps.flags(), re->ccb_, status)) {
case kParseOk:
if (!ps.PushRegexp(re))
return NULL;
goto Break2;
case kParseError:
re->Decref();
return NULL;
case kParseNothing:
re->Decref();
break;
}
}
const UGroup *g = MaybeParsePerlCCEscape(&t, ps.flags());
if (g != NULL) {
Regexp* re = new Regexp(kRegexpCharClass, ps.flags() & ~FoldCase);
re->ccb_ = new CharClassBuilder;
AddUGroup(re->ccb_, g, g->sign, ps.flags());
if (!ps.PushRegexp(re))
return NULL;
break;
}
Rune r;
if (!ParseEscape(&t, &r, status, ps.rune_max()))
return NULL;
if (!ps.PushLiteral(r))
return NULL;
break;
}
}
Break2:
lastunary = isunary;
}
return ps.DoFinish();
}
} // namespace re2
| [
"cppinclude@yandex.com"
] | cppinclude@yandex.com |
3433842f04e4c654a43b4dd986eb2e1974823a81 | d20b9d2dd398370c9e6994cb56995b274cb8ed3f | /HttpdServer.hpp | 702d512a7df7f31fece6b87aee566a772daac121 | [] | no_license | HananiJia/Http-Server | 7b9ce351a006012c77e5a32cd2dad3c6894436ae | 4d320f0b213f36be7d47bd98716a511b2f8a1590 | refs/heads/master | 2020-04-08T19:47:38.427493 | 2018-12-12T04:14:28 | 2018-12-12T04:14:28 | 159,671,408 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,526 | hpp | #ifndef __HTTPD_SERVER_HPP__
#define __HTTPD_SERVER_HPP__
#include<pthread.h>
#include"ThreadPool.hpp"
#include"ProtocolUtil.hpp"
class HttpdServer{
public:
HttpdServer(int port_)
:port(port_)
,listen_sock(-1)
,tp(NULL)
{}//构造函数
void InitServer()//初始化函数绑定端口监听指定端口
{
listen_sock=socket(AF_INET,SOCK_STREAM,0);
//初始化监听socket
if(listen_sock<0)
{
LOG(ERROR,"Create Socket Error!");
//如果创建失败,打印日志
exit(2);
}
int opt_=1;
setsockopt(listen_sock,SOL_SOCKET,SO_REUSEADDR,&opt_,sizeof(opt_));//设置服务器即使挂掉也可以迅速重启
struct sockaddr_in local_;//初始化socket
local_.sin_family=AF_INET;
local_.sin_port=htons(port);
local_.sin_addr.s_addr=INADDR_ANY;
//INADDR_ANY绑定该机器任意一个IP地址
if(bind(listen_sock,(struct sockaddr*)&local_,sizeof(local_))<0)
{//绑定端 如果失败打印日志
LOG(ERROR,"Bind Socket Error!");
exit(3);
}
if(listen(listen_sock,5)<0)
{
//如果监听失败打印日志信息
LOG(ERROR,"Listen Socket Error");
exit(4);
}
//代表一切正常打印成功日志
tp=new ThreadPool();
tp->initThreadPool();
LOG(INFO,"Initserver Success!");
}
void Start()
{
LOG(INFO,"Start Server Begin!");
for(;;)
{
struct sockaddr_in peer_;
socklen_t len_=sizeof(peer_);
int sock_=accept(listen_sock,(struct sockaddr*)&peer_,&len_);
if(sock_<0)
{
LOG(WARNING,"Accept Error!");
continue;
}
LOG(INFO,"Get New Client, Create Thread Handler Request");
pthread_t tid_;
Task t;
t.SetTask(sock_,Entry::HandlerRequest);
tp->PushTask(t);
// pthread_create(&tid_,NULL,Entry::HandlerRequest,(void*)sockp_);
//将接受到的socket通过多线程的方式去调用handlerquest函数
//这里要注意线程创建函数后两个参数类型要是void*
}
}
~HttpdServer()
{
if(listen_sock!=-1)
{
close(listen_sock);
}
port=-1;
}
private:
int listen_sock;
int port;
ThreadPool *tp;
};
#endif
| [
"15229020556@163.com"
] | 15229020556@163.com |
69174c59c074f9a7ad5edf82f2486ba0505fcac0 | 46a7c188e03f9948f916d486822cb5903d7908c8 | /src/humanoid.h | d91b757120c3c18f097eb1141d45d0f5940627ff | [] | no_license | Th0re/PrioriIncantatum | 9f6920ffd4bfca449d3133dba85521984585140b | 103fc6ae40730e2e2524a4033c543c280801dc32 | refs/heads/master | 2020-12-30T14:19:49.974133 | 2017-06-10T16:49:06 | 2017-06-10T16:49:06 | 91,308,312 | 0 | 0 | null | 2017-06-10T16:49:06 | 2017-05-15T07:34:28 | C++ | UTF-8 | C++ | false | false | 775 | h | #ifndef HUMANOID_H
#define HUMANOID_H
#include "cuboid.h"
class Humanoid : protected QOpenGLFunctions
{
public:
Humanoid(float lenght, float height, float width);
Humanoid(float armsAngle, float lenght, float height, float width);
Humanoid(float lenght, float height, float width, float leftArmAngle, float rightArmAngle);
Humanoid();
~Humanoid();
void setLeftArmAngle(float newAngle);
void setRightArmAngle(float newAngle);
float getLeftArmAngle();
float getRightArmAngle();
void drawGeometry(QOpenGLShaderProgram *program, QMatrix4x4 projection, QMatrix4x4 baseMatrix);
private:
Cuboid *torso, *head, *leftArm, *rightArm, *leg1, *leg2;
float lenght, height, width, leftArmAngle, rightArmAngle;
};
#endif // HUMANOID_H
| [
"stephane.perrez@gmail.com"
] | stephane.perrez@gmail.com |
4821528c665f88223db634a3444ae6936b0fc114 | 9ab407b9090f7cc1b6f50a1092f7be6234d83560 | /Nc/Graphics/Data/Font.cpp | 23ca8ce515b38399ed95a928d0cd28a7116a0e2c | [] | no_license | PoncinMatthieu/3dNovac | 6e8e2b308d8de3c88df747fa838e97f8eb5315b2 | fe634688a1b54792a89da9219ca5cda3cd81a871 | refs/heads/dev | 2020-05-27T01:30:28.047128 | 2013-12-06T17:15:18 | 2013-12-06T17:15:18 | 4,713,732 | 0 | 1 | null | 2015-10-07T12:58:41 | 2012-06-19T13:08:59 | C++ | UTF-8 | C++ | false | false | 2,790 | cpp |
/*-----------------------------------------------------------------------------
3dNovac Graphics
Copyright (C) 2010-2011, The 3dNovac Team
This file is part of 3dNovac.
3dNovac is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
3dNovac is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with 3dNovac. If not, see <http://www.gnu.org/licenses/>.
File Created At: 06/09/2010
File Author(s): Poncin Matthieu
-----------------------------------------------------------------------------*/
#include "FontLoaderFreeType.h"
#include "Font.h"
using namespace Nc;
using namespace Nc::System;
using namespace Nc::Graphic;
UInt32 Font::_defaultCharset[] =
{
// Printable characters in ASCII range
0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x2F,
0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, 0x3F,
0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F,
0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x5B, 0x5C, 0x5D, 0x5E, 0x5F,
0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F,
0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7A, 0x7B, 0x7C, 0x7D, 0x7E,
// Printable characters in extended ASCII range
0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0x2A, 0xA6, 0xA7, 0xA8, 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF,
0xB0, 0xB1, 0xB2, 0xB3, 0xB4, 0xB5, 0xB6, 0xB7, 0xB8, 0xB9, 0xBA, 0xBB, 0xBC, 0xBD, 0xBE, 0xBF,
0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF,
0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD7, 0xD8, 0xD9, 0xDA, 0xDB, 0xDC, 0xDD, 0xDE, 0xDF,
0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, 0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF,
0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, 0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE,
0x00
};
Font::Font()
{
}
Font::~Font()
{
}
void Font::LoadFromFile(const Utils::FileName &file, unsigned int baseSize, const Utils::Unicode::UTF32 &charset)
{
_baseSize = baseSize;
FontLoaderFreeType freeType;
freeType.LoadFromFile(file, charset, *this);
}
| [
"poncin.matthieu@gmail.com"
] | poncin.matthieu@gmail.com |
0fa7cf0d169a96f721845dffe7498dd8b645f228 | c6bb5f885f0ff147a8c0192ea7ecabd2cbd497f2 | /WellPlay/EngineCallBack.h | 4f64fb445a0dc1e2eb0d39a25420b2a2621ac3e2 | [] | no_license | luningCloud/WellPlay-Engine | fcb50c7fc1225b08e2a553cc6ded23ab5a515223 | dda4c29cdd9bd2a4f5d4ab5a2e07a37cd546fd87 | refs/heads/master | 2021-05-14T11:24:59.464389 | 2017-05-27T09:15:55 | 2017-05-27T09:15:55 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 635 | h | #pragma once
#include <functional>
#include <vector>
#include <string>
#include <memory>
#include "EngineRuntime\GameObject.h"
enum LogMode:int
{
Common=0,
Warning,
Error,
ModeNum
};
namespace EngineCallBack
{
extern std::function<void(const std::wstring&, int)> OnLog;
extern std::function<void(const GameObject&)> OnAddGameObject;
extern std::function<void(const GameObject&)> OnRemoveGameObject;
/* 1-Parent 2-Child 3-index */
extern std::function<void(const GameObject&, const GameObject&, int)> OnMoveGameObject;
extern std::function<void(void)> OnLoadedScene;
extern std::function<void(void)> OnFinishUpdate;
} | [
"874213590@qq.com"
] | 874213590@qq.com |
e9195793ab0fab3e5665654c426153ebdf9ea5dc | 4b80a1d37087ca4c352fb026cca641b5310f8a24 | /leetcode_ly/c++/Array/PascalTriangle.cpp | ffd59064ab70eacba3fc44a70c9310d404ff342c | [] | no_license | byr-ly/leetcode | 292ff93245d81a6b271c7785896330d271ea5915 | 4eb8966b237c81a68822f81b17158ee5d91c9400 | refs/heads/master | 2022-11-09T15:20:29.792485 | 2017-11-07T12:06:05 | 2017-11-07T12:06:05 | 77,654,665 | 1 | 0 | null | 2022-11-04T22:44:01 | 2016-12-30T02:40:38 | Java | UTF-8 | C++ | false | false | 443 | cpp | class Solution {
public:
vector<vector<int>> generate(int numRows) {
vector<vector<int>> result;
for(int i = 0; i < numRows; i++){
vector<int> ret(i + 1,1);
result.push_back(ret);
}
for(int i = 2; i < numRows; i++){
for(int j = 1; j < i; j++){
result[i][j] = result[i - 1][j - 1] + result[i - 1][j];
}
}
return result;
}
}; | [
"849403175@qq.com"
] | 849403175@qq.com |
fc2b88cd7c9e93c8351812620f3ed0a9e90eb731 | e8fd8e8707a7ef2374c76be40e1fb07506b64499 | /src/networking/enet.hpp | d6daae52f104f50746c63e82f8799b7280a93954 | [] | no_license | therocode/blocks | 8063d9c5bf6d705a6def31a4fbb8549dd02abf2c | 9730dfae2e1fc13da9a653c56b1bb50bbc56d929 | refs/heads/master | 2021-01-12T05:31:43.398858 | 2015-11-24T19:27:00 | 2015-11-24T19:27:00 | 77,955,814 | 2 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 151 | hpp | #pragma once
class ENet
{
public:
ENet();
~ENet();
bool isInitialized() const;
private:
bool mInitialized;
};
| [
"widlundtobias@gmail.com"
] | widlundtobias@gmail.com |
7333429f627ff911e50eeccd56f09aed1c665218 | 3789a6aa28dd9d16e5efc8593eebbe071b7dc930 | /ipc-gazebo-adapter/tests/test.cpp | 1a126c3eee996a0757cd2bf333b390e41d2b5bd1 | [] | no_license | abhishekbalu/gazebo-auv-sim | cf798f85ce23a71d6b63c4584f10386d1964ebb9 | 2e59a93eef793671f671cbe266da7642a9faa880 | refs/heads/master | 2021-01-12T13:17:53.941225 | 2014-05-17T13:31:42 | 2014-05-17T13:31:42 | 72,184,269 | 1 | 0 | null | 2016-10-28T07:27:20 | 2016-10-28T07:27:19 | null | UTF-8 | C++ | false | false | 6,893 | cpp | #include <gazebo/transport/transport.hh>
#include <gazebo/gazebo.hh>
#include <gazebo/msgs/msgs.hh>
#include <gazebo/math/Vector3.hh>
#include <gazebo/physics/physics.hh>
#include <gazebo/common/common.hh>
#include <iostream>
#include <string>
#include <memory>
#include <cerrno>
#include <mutex>
#include <ipc.h>
#include "exception.h"
#include "common.h"
#include "policy.h"
#include "transport_pipe.h"
#include <future>
#include <functional>
#include <regul.pb.h>
#include <camera.pb.h>
#include <navig.pb.h>
#define BOOST_TEST_MODULE AdapterTests
#include <boost/test/unit_test.hpp>
template<typename Msg>
using MsgPtr = boost::shared_ptr<const Msg>;
template<typename Consts>
struct Fixture {
Fixture() {
IPC_connectModule("adapter tester", "localhost");
IPC_defineMsg(consts_.IPC_NAME, IPC_VARIABLE_LENGTH, consts_.IPC_FORMAT);
gazebo::setupClient(0, nullptr);
node = gazebo::transport::NodePtr(new gazebo::transport::Node());
node->Init("robosub_auv");
}
virtual ~Fixture() {
gazebo::shutdown();
IPC_disconnect();
}
gazebo::transport::NodePtr node;
bool ready = false;
Consts consts_;
};
template<typename GazeboMsg, typename IpcMsg, typename Consts>
struct IGFixture: public Fixture<Consts> {
IGFixture(): Fixture<Consts>() {}
GazeboMsg gazebo_msg;
gazebo::transport::SubscriberPtr subscriber;
void publish(IpcMsg& msg) {
IPC_publishData(this->consts_.IPC_NAME, &msg);
}
void subscribe(std::string topic) {
subscriber = this->node->Subscribe(topic, &IGFixture::callback, static_cast<IGFixture*>(this));
gazebo::common::Time::MSleep(100);
}
void callback(const boost::shared_ptr<const GazeboMsg>& _msg) {
std::cout << "RECIEVED" << std::endl;
this->gazebo_msg = *_msg;
this->ready = true;
}
};
template<typename IpcMsg, typename GazeboMsg, typename Consts>
struct GIFixture: public Fixture<Consts> {
GIFixture(): Fixture<Consts>() {
IPC_subscribeData(Consts().IPC_NAME, callback, this);
}
IpcMsg ipc_msg;
gazebo::transport::PublisherPtr publisher;
void publish(const GazeboMsg& msg) {
publisher->Publish(msg);
}
void advertise(std::string topic) {
this->publisher = this->node->template Advertise<GazeboMsg>(topic);
this->publisher->WaitForConnection();
}
static void callback(MSG_INSTANCE msgInstance, void *callData, void* clientData) {
std::cout << "RECIEVED" << std::endl;
auto client = static_cast<GIFixture*>(clientData);
client->ipc_msg = *static_cast<IpcMsg*>(callData);
client->ready = true;
}
};
using RegulFixture = IGFixture<msgs::Regul, MSG_REGUL_TYPE, RegulConsts>;
using SwitchCameraFixture = IGFixture<msgs::Camera, MSG_SWITCH_CAMERA, SwitchCameraConsts>;
using JpegCameraFixture = GIFixture<MSG_JPEG_VIDEO_FRAME, msgs::Camera, JpegCameraConsts>;
using RawCameraFixture = GIFixture<MSG_VIDEO_FRAME, msgs::Camera, RawCameraConsts>;
using NavigFixture = GIFixture<MSG_NAVIG_TYPE, msgs::Navig, NavigConsts>;
using CompassFixture = GIFixture<MSG_COMPASS_TYPE, msgs::Compass, CompassConsts>;
BOOST_FIXTURE_TEST_CASE(regul_pipe_test, RegulFixture) {
try {
subscribe("~/regul");
MSG_REGUL_TYPE msg;
msg.tx = 1;
msg.ty = 2;
msg.tz = 3;
msg.mx = 4;
msg.my = 5;
msg.mz = 6;
publish(msg);
while (!ready) {
IPC_listenClear(100);
gazebo::common::Time::MSleep(100);
}
BOOST_CHECK_EQUAL(msg.tx, gazebo_msg.force_ratio().x());
BOOST_CHECK_EQUAL(msg.ty, gazebo_msg.force_ratio().y());
BOOST_CHECK_EQUAL(msg.tz, gazebo_msg.force_ratio().z());
BOOST_CHECK_EQUAL(msg.mx, -gazebo_msg.torque_ratio().x());
BOOST_CHECK_EQUAL(msg.my, -gazebo_msg.torque_ratio().y());
BOOST_CHECK_EQUAL(msg.mz, -gazebo_msg.torque_ratio().z());
} catch (Exception& e) {
FATAL() << e;
}
}
BOOST_FIXTURE_TEST_CASE(switch_camera_pipe_test, SwitchCameraFixture) {
try {
subscribe("~/switch_camera");
MSG_SWITCH_CAMERA msg;
msg.camera_type = CAMERA_DOWN;
std::vector<unsigned char> r = {RK_BUOY, RK_BLACK_STRIPE, RK_BALL};
msg.recognizers = r.data();
msg.recognizers_size = r.size();
publish(msg);
while (!ready) {
IPC_listenClear(100);
gazebo::common::Time::MSleep(100);
}
BOOST_CHECK_EQUAL(msg.camera_type, static_cast<unsigned char>(gazebo_msg.camera_type()));
} catch (Exception& e) {
FATAL() << e;
}
}
BOOST_FIXTURE_TEST_CASE(compass_pipe_test, CompassFixture) {
try {
advertise("~/imu");
msgs::Compass msg;
msg.set_time(123123.123123);
Set(msg.mutable_orientation(), gazebo::math::Vector3(1,2,3));
Set(msg.mutable_angular_vel(), gazebo::math::Vector3(4,5,6));
Set(msg.mutable_linear_accel(), gazebo::math::Vector3(7,8,9));
gazebo::common::Time::MSleep(100);
publish(msg);
while (!ready) {
IPC_listenClear(100);
gazebo::common::Time::MSleep(100);
}
BOOST_CHECK_EQUAL(ipc_msg.time, msg.time());
BOOST_CHECK_EQUAL(ipc_msg.state, 0);
BOOST_CHECK_EQUAL(ipc_msg.roll, msg.orientation().x());
BOOST_CHECK_EQUAL(ipc_msg.pitch, msg.orientation().y());
BOOST_CHECK_EQUAL(ipc_msg.heading, msg.orientation().z());
BOOST_CHECK_EQUAL(ipc_msg.roll_rate, msg.angular_vel().x());
BOOST_CHECK_EQUAL(ipc_msg.pitch_rate, msg.angular_vel().y());
BOOST_CHECK_EQUAL(ipc_msg.head_rate, msg.angular_vel().z());
BOOST_CHECK_EQUAL(ipc_msg.accX, msg.linear_accel().x());
BOOST_CHECK_EQUAL(ipc_msg.accY, msg.linear_accel().y());
BOOST_CHECK_EQUAL(ipc_msg.accZ, msg.linear_accel().z());
} catch (Exception& e) {
FATAL() << e;
}
}
BOOST_FIXTURE_TEST_CASE(navig_pipe_test, NavigFixture) {
try {
advertise("~/navig");
msgs::Navig msg;
auto pos = gazebo::math::Vector3(1,2,3);
auto ang = gazebo::math::Vector3(4,5,6);
Set(msg.mutable_position(), pos);
Set(msg.mutable_angle(), ang);
publish(msg);
while (!ready) {
IPC_listenClear(100);
gazebo::common::Time::MSleep(100);
}
BOOST_CHECK_EQUAL(ipc_msg.X_KNS, msg.position().x());
BOOST_CHECK_EQUAL(ipc_msg.Y_KNS, msg.position().y());
BOOST_CHECK_EQUAL(ipc_msg.Depth_NS, -msg.position().z());
BOOST_CHECK_EQUAL(ipc_msg.Roll_NS, msg.angle().x());
BOOST_CHECK_EQUAL(ipc_msg.Psi_NS, msg.angle().y());
BOOST_CHECK_EQUAL(ipc_msg.Fi_NS, msg.angle().z());
} catch (Exception& e) {
FATAL() << e;
}
}
| [
"coockoombra@gmail.com"
] | coockoombra@gmail.com |
f02964c06300fe872ef02cf19b0fddad7e2781fa | 4c3f3c42f9f7f9c44498a2269315fbdcbea0598f | /PAT_Basic/1064 朋友数.cpp | 12b0f9c4f006044d135263446546f999ccf70265 | [] | no_license | twelvedeng/PAT-Leetcode | 30f0ac6c893daef1f9c775069537029abe266e74 | fb7498cc829aa97660a6e744041f687cd65efc55 | refs/heads/master | 2021-07-08T16:33:43.486115 | 2020-08-05T02:33:24 | 2020-08-05T02:33:24 | 171,415,039 | 1 | 0 | null | null | null | null | GB18030 | C++ | false | false | 561 | cpp | /*看错了题目的版本...我以为要输出在序列中能够找到朋友的朋友证号*/
#include <iostream>
using namespace std;
int cnt[37] = {0};
int main() {
int n;
string num;
scanf("%d", &n);
for (int i = 0; i < n; i++) {
cin >> num;
int sum = 0;
for (int k = 0; k < num.size(); k++)
sum += (num[k] - '0');
cnt[sum]++;
}
int sum[37], x = 0;
for (int i = 0; i < 37; i++) {
if(cnt[i] >= 2) sum[x++] = i;
}
cout << x << endl;
for (int i = 0; i < x-1; i++) {
printf("%d ", sum[i]);
}
cout << sum[x-1] << endl;
return 0;
}
| [
"ddxy399@outlook.com"
] | ddxy399@outlook.com |
2d07a6e276a6aadc9918c2ba821746362091a715 | e53e5ecf3b863a6dfe36874a267e13c1fda02fcd | /src/Common/raft.pb.cc | e6e21979799f678236839b477f8a76d9f65c1420 | [] | no_license | abclzr/ppca-raft | 683751856ce7e058ede5ea1afefb221092462d33 | 80c2b522f607c0a2a346304d1bcd32c437f721fc | refs/heads/master | 2022-03-03T04:38:15.546207 | 2019-08-07T03:24:42 | 2019-08-07T03:24:42 | 198,199,695 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | true | 100,466 | cc | // Generated by the protocol buffer compiler. DO NOT EDIT!
// source: raft.proto
#include "raft.pb.h"
#include <algorithm>
#include <google/protobuf/stubs/common.h>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/extension_set.h>
#include <google/protobuf/wire_format_lite_inl.h>
#include <google/protobuf/descriptor.h>
#include <google/protobuf/generated_message_reflection.h>
#include <google/protobuf/reflection_ops.h>
#include <google/protobuf/wire_format.h>
// @@protoc_insertion_point(includes)
#include <google/protobuf/port_def.inc>
extern PROTOBUF_INTERNAL_EXPORT_raft_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Entry_raft_2eproto;
namespace raft {
namespace rpc {
class ReplyDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<Reply> _instance;
} _Reply_default_instance_;
class EntryDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<Entry> _instance;
} _Entry_default_instance_;
class RequestAppendEntriesDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<RequestAppendEntries> _instance;
} _RequestAppendEntries_default_instance_;
class ReplyAppendEntriesDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<ReplyAppendEntries> _instance;
} _ReplyAppendEntries_default_instance_;
class RequestVoteDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<RequestVote> _instance;
} _RequestVote_default_instance_;
class ReplyVoteDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<ReplyVote> _instance;
} _ReplyVote_default_instance_;
} // namespace rpc
} // namespace raft
static void InitDefaultsReply_raft_2eproto() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
{
void* ptr = &::raft::rpc::_Reply_default_instance_;
new (ptr) ::raft::rpc::Reply();
::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
}
::raft::rpc::Reply::InitAsDefaultInstance();
}
::google::protobuf::internal::SCCInfo<0> scc_info_Reply_raft_2eproto =
{{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsReply_raft_2eproto}, {}};
static void InitDefaultsEntry_raft_2eproto() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
{
void* ptr = &::raft::rpc::_Entry_default_instance_;
new (ptr) ::raft::rpc::Entry();
::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
}
::raft::rpc::Entry::InitAsDefaultInstance();
}
::google::protobuf::internal::SCCInfo<0> scc_info_Entry_raft_2eproto =
{{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsEntry_raft_2eproto}, {}};
static void InitDefaultsRequestAppendEntries_raft_2eproto() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
{
void* ptr = &::raft::rpc::_RequestAppendEntries_default_instance_;
new (ptr) ::raft::rpc::RequestAppendEntries();
::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
}
::raft::rpc::RequestAppendEntries::InitAsDefaultInstance();
}
::google::protobuf::internal::SCCInfo<1> scc_info_RequestAppendEntries_raft_2eproto =
{{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsRequestAppendEntries_raft_2eproto}, {
&scc_info_Entry_raft_2eproto.base,}};
static void InitDefaultsReplyAppendEntries_raft_2eproto() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
{
void* ptr = &::raft::rpc::_ReplyAppendEntries_default_instance_;
new (ptr) ::raft::rpc::ReplyAppendEntries();
::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
}
::raft::rpc::ReplyAppendEntries::InitAsDefaultInstance();
}
::google::protobuf::internal::SCCInfo<0> scc_info_ReplyAppendEntries_raft_2eproto =
{{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsReplyAppendEntries_raft_2eproto}, {}};
static void InitDefaultsRequestVote_raft_2eproto() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
{
void* ptr = &::raft::rpc::_RequestVote_default_instance_;
new (ptr) ::raft::rpc::RequestVote();
::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
}
::raft::rpc::RequestVote::InitAsDefaultInstance();
}
::google::protobuf::internal::SCCInfo<0> scc_info_RequestVote_raft_2eproto =
{{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsRequestVote_raft_2eproto}, {}};
static void InitDefaultsReplyVote_raft_2eproto() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
{
void* ptr = &::raft::rpc::_ReplyVote_default_instance_;
new (ptr) ::raft::rpc::ReplyVote();
::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
}
::raft::rpc::ReplyVote::InitAsDefaultInstance();
}
::google::protobuf::internal::SCCInfo<0> scc_info_ReplyVote_raft_2eproto =
{{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsReplyVote_raft_2eproto}, {}};
void InitDefaults_raft_2eproto() {
::google::protobuf::internal::InitSCC(&scc_info_Reply_raft_2eproto.base);
::google::protobuf::internal::InitSCC(&scc_info_Entry_raft_2eproto.base);
::google::protobuf::internal::InitSCC(&scc_info_RequestAppendEntries_raft_2eproto.base);
::google::protobuf::internal::InitSCC(&scc_info_ReplyAppendEntries_raft_2eproto.base);
::google::protobuf::internal::InitSCC(&scc_info_RequestVote_raft_2eproto.base);
::google::protobuf::internal::InitSCC(&scc_info_ReplyVote_raft_2eproto.base);
}
::google::protobuf::Metadata file_level_metadata_raft_2eproto[6];
constexpr ::google::protobuf::EnumDescriptor const** file_level_enum_descriptors_raft_2eproto = nullptr;
constexpr ::google::protobuf::ServiceDescriptor const** file_level_service_descriptors_raft_2eproto = nullptr;
const ::google::protobuf::uint32 TableStruct_raft_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::raft::rpc::Reply, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::raft::rpc::Entry, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(::raft::rpc::Entry, term_),
PROTOBUF_FIELD_OFFSET(::raft::rpc::Entry, key_),
PROTOBUF_FIELD_OFFSET(::raft::rpc::Entry, args_),
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::raft::rpc::RequestAppendEntries, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(::raft::rpc::RequestAppendEntries, term_),
PROTOBUF_FIELD_OFFSET(::raft::rpc::RequestAppendEntries, leaderid_),
PROTOBUF_FIELD_OFFSET(::raft::rpc::RequestAppendEntries, prevlogindex_),
PROTOBUF_FIELD_OFFSET(::raft::rpc::RequestAppendEntries, prevlogterm_),
PROTOBUF_FIELD_OFFSET(::raft::rpc::RequestAppendEntries, entries_),
PROTOBUF_FIELD_OFFSET(::raft::rpc::RequestAppendEntries, leadercommit_),
PROTOBUF_FIELD_OFFSET(::raft::rpc::RequestAppendEntries, exleaderid_),
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::raft::rpc::ReplyAppendEntries, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(::raft::rpc::ReplyAppendEntries, term_),
PROTOBUF_FIELD_OFFSET(::raft::rpc::ReplyAppendEntries, ans_),
PROTOBUF_FIELD_OFFSET(::raft::rpc::ReplyAppendEntries, followerid_),
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::raft::rpc::RequestVote, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(::raft::rpc::RequestVote, term_),
PROTOBUF_FIELD_OFFSET(::raft::rpc::RequestVote, candidateid_),
PROTOBUF_FIELD_OFFSET(::raft::rpc::RequestVote, lastlogindex_),
PROTOBUF_FIELD_OFFSET(::raft::rpc::RequestVote, lastlogterm_),
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::raft::rpc::ReplyVote, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(::raft::rpc::ReplyVote, term_),
PROTOBUF_FIELD_OFFSET(::raft::rpc::ReplyVote, ans_),
PROTOBUF_FIELD_OFFSET(::raft::rpc::ReplyVote, followerid_),
};
static const ::google::protobuf::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
{ 0, -1, sizeof(::raft::rpc::Reply)},
{ 5, -1, sizeof(::raft::rpc::Entry)},
{ 13, -1, sizeof(::raft::rpc::RequestAppendEntries)},
{ 25, -1, sizeof(::raft::rpc::ReplyAppendEntries)},
{ 33, -1, sizeof(::raft::rpc::RequestVote)},
{ 42, -1, sizeof(::raft::rpc::ReplyVote)},
};
static ::google::protobuf::Message const * const file_default_instances[] = {
reinterpret_cast<const ::google::protobuf::Message*>(&::raft::rpc::_Reply_default_instance_),
reinterpret_cast<const ::google::protobuf::Message*>(&::raft::rpc::_Entry_default_instance_),
reinterpret_cast<const ::google::protobuf::Message*>(&::raft::rpc::_RequestAppendEntries_default_instance_),
reinterpret_cast<const ::google::protobuf::Message*>(&::raft::rpc::_ReplyAppendEntries_default_instance_),
reinterpret_cast<const ::google::protobuf::Message*>(&::raft::rpc::_RequestVote_default_instance_),
reinterpret_cast<const ::google::protobuf::Message*>(&::raft::rpc::_ReplyVote_default_instance_),
};
::google::protobuf::internal::AssignDescriptorsTable assign_descriptors_table_raft_2eproto = {
{}, AddDescriptors_raft_2eproto, "raft.proto", schemas,
file_default_instances, TableStruct_raft_2eproto::offsets,
file_level_metadata_raft_2eproto, 6, file_level_enum_descriptors_raft_2eproto, file_level_service_descriptors_raft_2eproto,
};
const char descriptor_table_protodef_raft_2eproto[] =
"\n\nraft.proto\022\010raft.rpc\"\007\n\005Reply\"0\n\005Entry"
"\022\014\n\004term\030\001 \001(\004\022\013\n\003key\030\002 \001(\t\022\014\n\004args\030\003 \001("
"\t\"\255\001\n\024RequestAppendEntries\022\014\n\004term\030\001 \001(\004"
"\022\020\n\010leaderID\030\002 \001(\t\022\024\n\014prevLogIndex\030\003 \001(\004"
"\022\023\n\013prevLogTerm\030\004 \001(\004\022 \n\007entries\030\005 \003(\0132\017"
".raft.rpc.Entry\022\024\n\014leaderCommit\030\006 \001(\004\022\022\n"
"\nexleaderID\030\007 \001(\t\"C\n\022ReplyAppendEntries\022"
"\014\n\004term\030\001 \001(\004\022\013\n\003ans\030\002 \001(\010\022\022\n\nfollowerID"
"\030\003 \001(\t\"[\n\013RequestVote\022\014\n\004term\030\001 \001(\004\022\023\n\013c"
"andidateID\030\002 \001(\t\022\024\n\014lastLogIndex\030\003 \001(\004\022\023"
"\n\013lastLogTerm\030\004 \001(\004\":\n\tReplyVote\022\014\n\004term"
"\030\001 \001(\004\022\013\n\003ans\030\002 \001(\010\022\022\n\nfollowerID\030\003 \001(\t2"
"\355\001\n\007RaftRpc\022>\n\tRequestAE\022\036.raft.rpc.Requ"
"estAppendEntries\032\017.raft.rpc.Reply\"\000\0224\n\010R"
"equestV\022\025.raft.rpc.RequestVote\032\017.raft.rp"
"c.Reply\"\000\022:\n\007ReplyAE\022\034.raft.rpc.ReplyApp"
"endEntries\032\017.raft.rpc.Reply\"\000\0220\n\006ReplyV\022"
"\023.raft.rpc.ReplyVote\032\017.raft.rpc.Reply\"\000b"
"\006proto3"
;
::google::protobuf::internal::DescriptorTable descriptor_table_raft_2eproto = {
false, InitDefaults_raft_2eproto,
descriptor_table_protodef_raft_2eproto,
"raft.proto", &assign_descriptors_table_raft_2eproto, 727,
};
void AddDescriptors_raft_2eproto() {
static constexpr ::google::protobuf::internal::InitFunc deps[1] =
{
};
::google::protobuf::internal::AddDescriptors(&descriptor_table_raft_2eproto, deps, 0);
}
// Force running AddDescriptors() at dynamic initialization time.
static bool dynamic_init_dummy_raft_2eproto = []() { AddDescriptors_raft_2eproto(); return true; }();
namespace raft {
namespace rpc {
// ===================================================================
void Reply::InitAsDefaultInstance() {
}
class Reply::HasBitSetters {
public:
};
#if !defined(_MSC_VER) || _MSC_VER >= 1900
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
Reply::Reply()
: ::google::protobuf::Message(), _internal_metadata_(nullptr) {
SharedCtor();
// @@protoc_insertion_point(constructor:raft.rpc.Reply)
}
Reply::Reply(const Reply& from)
: ::google::protobuf::Message(),
_internal_metadata_(nullptr) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
// @@protoc_insertion_point(copy_constructor:raft.rpc.Reply)
}
void Reply::SharedCtor() {
}
Reply::~Reply() {
// @@protoc_insertion_point(destructor:raft.rpc.Reply)
SharedDtor();
}
void Reply::SharedDtor() {
}
void Reply::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
const Reply& Reply::default_instance() {
::google::protobuf::internal::InitSCC(&::scc_info_Reply_raft_2eproto.base);
return *internal_default_instance();
}
void Reply::Clear() {
// @@protoc_insertion_point(message_clear_start:raft.rpc.Reply)
::google::protobuf::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
_internal_metadata_.Clear();
}
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
const char* Reply::_InternalParse(const char* begin, const char* end, void* object,
::google::protobuf::internal::ParseContext* ctx) {
auto msg = static_cast<Reply*>(object);
::google::protobuf::int32 size; (void)size;
int depth; (void)depth;
::google::protobuf::uint32 tag;
::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end;
auto ptr = begin;
while (ptr < end) {
ptr = ::google::protobuf::io::Parse32(ptr, &tag);
GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
switch (tag >> 3) {
default: {
if ((tag & 7) == 4 || tag == 0) {
ctx->EndGroup(tag);
return ptr;
}
auto res = UnknownFieldParse(tag, {_InternalParse, msg},
ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx);
ptr = res.first;
GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr);
if (res.second) return ptr;
}
} // switch
} // while
return ptr;
}
#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
bool Reply::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:raft.rpc.Reply)
for (;;) {
::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first;
if (!p.second) goto handle_unusual;
handle_unusual:
if (tag == 0) {
goto success;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, _internal_metadata_.mutable_unknown_fields()));
}
success:
// @@protoc_insertion_point(parse_success:raft.rpc.Reply)
return true;
failure:
// @@protoc_insertion_point(parse_failure:raft.rpc.Reply)
return false;
#undef DO_
}
#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
void Reply::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:raft.rpc.Reply)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
if (_internal_metadata_.have_unknown_fields()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
_internal_metadata_.unknown_fields(), output);
}
// @@protoc_insertion_point(serialize_end:raft.rpc.Reply)
}
::google::protobuf::uint8* Reply::InternalSerializeWithCachedSizesToArray(
::google::protobuf::uint8* target) const {
// @@protoc_insertion_point(serialize_to_array_start:raft.rpc.Reply)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
if (_internal_metadata_.have_unknown_fields()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields(), target);
}
// @@protoc_insertion_point(serialize_to_array_end:raft.rpc.Reply)
return target;
}
size_t Reply::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:raft.rpc.Reply)
size_t total_size = 0;
if (_internal_metadata_.have_unknown_fields()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
_internal_metadata_.unknown_fields());
}
::google::protobuf::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
SetCachedSize(cached_size);
return total_size;
}
void Reply::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:raft.rpc.Reply)
GOOGLE_DCHECK_NE(&from, this);
const Reply* source =
::google::protobuf::DynamicCastToGenerated<Reply>(
&from);
if (source == nullptr) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:raft.rpc.Reply)
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:raft.rpc.Reply)
MergeFrom(*source);
}
}
void Reply::MergeFrom(const Reply& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:raft.rpc.Reply)
GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_);
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
}
void Reply::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:raft.rpc.Reply)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void Reply::CopyFrom(const Reply& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:raft.rpc.Reply)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool Reply::IsInitialized() const {
return true;
}
void Reply::Swap(Reply* other) {
if (other == this) return;
InternalSwap(other);
}
void Reply::InternalSwap(Reply* other) {
using std::swap;
_internal_metadata_.Swap(&other->_internal_metadata_);
}
::google::protobuf::Metadata Reply::GetMetadata() const {
::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_raft_2eproto);
return ::file_level_metadata_raft_2eproto[kIndexInFileMessages];
}
// ===================================================================
void Entry::InitAsDefaultInstance() {
}
class Entry::HasBitSetters {
public:
};
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int Entry::kTermFieldNumber;
const int Entry::kKeyFieldNumber;
const int Entry::kArgsFieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
Entry::Entry()
: ::google::protobuf::Message(), _internal_metadata_(nullptr) {
SharedCtor();
// @@protoc_insertion_point(constructor:raft.rpc.Entry)
}
Entry::Entry(const Entry& from)
: ::google::protobuf::Message(),
_internal_metadata_(nullptr) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
key_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (from.key().size() > 0) {
key_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.key_);
}
args_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (from.args().size() > 0) {
args_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.args_);
}
term_ = from.term_;
// @@protoc_insertion_point(copy_constructor:raft.rpc.Entry)
}
void Entry::SharedCtor() {
::google::protobuf::internal::InitSCC(
&scc_info_Entry_raft_2eproto.base);
key_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
args_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
term_ = PROTOBUF_ULONGLONG(0);
}
Entry::~Entry() {
// @@protoc_insertion_point(destructor:raft.rpc.Entry)
SharedDtor();
}
void Entry::SharedDtor() {
key_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
args_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void Entry::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
const Entry& Entry::default_instance() {
::google::protobuf::internal::InitSCC(&::scc_info_Entry_raft_2eproto.base);
return *internal_default_instance();
}
void Entry::Clear() {
// @@protoc_insertion_point(message_clear_start:raft.rpc.Entry)
::google::protobuf::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
key_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
args_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
term_ = PROTOBUF_ULONGLONG(0);
_internal_metadata_.Clear();
}
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
const char* Entry::_InternalParse(const char* begin, const char* end, void* object,
::google::protobuf::internal::ParseContext* ctx) {
auto msg = static_cast<Entry*>(object);
::google::protobuf::int32 size; (void)size;
int depth; (void)depth;
::google::protobuf::uint32 tag;
::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end;
auto ptr = begin;
while (ptr < end) {
ptr = ::google::protobuf::io::Parse32(ptr, &tag);
GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
switch (tag >> 3) {
// uint64 term = 1;
case 1: {
if (static_cast<::google::protobuf::uint8>(tag) != 8) goto handle_unusual;
msg->set_term(::google::protobuf::internal::ReadVarint(&ptr));
GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
break;
}
// string key = 2;
case 2: {
if (static_cast<::google::protobuf::uint8>(tag) != 18) goto handle_unusual;
ptr = ::google::protobuf::io::ReadSize(ptr, &size);
GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
ctx->extra_parse_data().SetFieldName("raft.rpc.Entry.key");
object = msg->mutable_key();
if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) {
parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8;
goto string_till_end;
}
GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx));
::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx);
ptr += size;
break;
}
// string args = 3;
case 3: {
if (static_cast<::google::protobuf::uint8>(tag) != 26) goto handle_unusual;
ptr = ::google::protobuf::io::ReadSize(ptr, &size);
GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
ctx->extra_parse_data().SetFieldName("raft.rpc.Entry.args");
object = msg->mutable_args();
if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) {
parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8;
goto string_till_end;
}
GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx));
::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx);
ptr += size;
break;
}
default: {
handle_unusual:
if ((tag & 7) == 4 || tag == 0) {
ctx->EndGroup(tag);
return ptr;
}
auto res = UnknownFieldParse(tag, {_InternalParse, msg},
ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx);
ptr = res.first;
GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr);
if (res.second) return ptr;
}
} // switch
} // while
return ptr;
string_till_end:
static_cast<::std::string*>(object)->clear();
static_cast<::std::string*>(object)->reserve(size);
goto len_delim_till_end;
len_delim_till_end:
return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg},
{parser_till_end, object}, size);
}
#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
bool Entry::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:raft.rpc.Entry)
for (;;) {
::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// uint64 term = 1;
case 1: {
if (static_cast< ::google::protobuf::uint8>(tag) == (8 & 0xFF)) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
input, &term_)));
} else {
goto handle_unusual;
}
break;
}
// string key = 2;
case 2: {
if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_key()));
DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->key().data(), static_cast<int>(this->key().length()),
::google::protobuf::internal::WireFormatLite::PARSE,
"raft.rpc.Entry.key"));
} else {
goto handle_unusual;
}
break;
}
// string args = 3;
case 3: {
if (static_cast< ::google::protobuf::uint8>(tag) == (26 & 0xFF)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_args()));
DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->args().data(), static_cast<int>(this->args().length()),
::google::protobuf::internal::WireFormatLite::PARSE,
"raft.rpc.Entry.args"));
} else {
goto handle_unusual;
}
break;
}
default: {
handle_unusual:
if (tag == 0) {
goto success;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, _internal_metadata_.mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:raft.rpc.Entry)
return true;
failure:
// @@protoc_insertion_point(parse_failure:raft.rpc.Entry)
return false;
#undef DO_
}
#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
void Entry::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:raft.rpc.Entry)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// uint64 term = 1;
if (this->term() != 0) {
::google::protobuf::internal::WireFormatLite::WriteUInt64(1, this->term(), output);
}
// string key = 2;
if (this->key().size() > 0) {
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->key().data(), static_cast<int>(this->key().length()),
::google::protobuf::internal::WireFormatLite::SERIALIZE,
"raft.rpc.Entry.key");
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
2, this->key(), output);
}
// string args = 3;
if (this->args().size() > 0) {
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->args().data(), static_cast<int>(this->args().length()),
::google::protobuf::internal::WireFormatLite::SERIALIZE,
"raft.rpc.Entry.args");
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
3, this->args(), output);
}
if (_internal_metadata_.have_unknown_fields()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
_internal_metadata_.unknown_fields(), output);
}
// @@protoc_insertion_point(serialize_end:raft.rpc.Entry)
}
::google::protobuf::uint8* Entry::InternalSerializeWithCachedSizesToArray(
::google::protobuf::uint8* target) const {
// @@protoc_insertion_point(serialize_to_array_start:raft.rpc.Entry)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// uint64 term = 1;
if (this->term() != 0) {
target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(1, this->term(), target);
}
// string key = 2;
if (this->key().size() > 0) {
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->key().data(), static_cast<int>(this->key().length()),
::google::protobuf::internal::WireFormatLite::SERIALIZE,
"raft.rpc.Entry.key");
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
2, this->key(), target);
}
// string args = 3;
if (this->args().size() > 0) {
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->args().data(), static_cast<int>(this->args().length()),
::google::protobuf::internal::WireFormatLite::SERIALIZE,
"raft.rpc.Entry.args");
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
3, this->args(), target);
}
if (_internal_metadata_.have_unknown_fields()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields(), target);
}
// @@protoc_insertion_point(serialize_to_array_end:raft.rpc.Entry)
return target;
}
size_t Entry::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:raft.rpc.Entry)
size_t total_size = 0;
if (_internal_metadata_.have_unknown_fields()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
_internal_metadata_.unknown_fields());
}
::google::protobuf::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// string key = 2;
if (this->key().size() > 0) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->key());
}
// string args = 3;
if (this->args().size() > 0) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->args());
}
// uint64 term = 1;
if (this->term() != 0) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::UInt64Size(
this->term());
}
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
SetCachedSize(cached_size);
return total_size;
}
void Entry::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:raft.rpc.Entry)
GOOGLE_DCHECK_NE(&from, this);
const Entry* source =
::google::protobuf::DynamicCastToGenerated<Entry>(
&from);
if (source == nullptr) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:raft.rpc.Entry)
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:raft.rpc.Entry)
MergeFrom(*source);
}
}
void Entry::MergeFrom(const Entry& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:raft.rpc.Entry)
GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_);
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
if (from.key().size() > 0) {
key_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.key_);
}
if (from.args().size() > 0) {
args_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.args_);
}
if (from.term() != 0) {
set_term(from.term());
}
}
void Entry::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:raft.rpc.Entry)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void Entry::CopyFrom(const Entry& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:raft.rpc.Entry)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool Entry::IsInitialized() const {
return true;
}
void Entry::Swap(Entry* other) {
if (other == this) return;
InternalSwap(other);
}
void Entry::InternalSwap(Entry* other) {
using std::swap;
_internal_metadata_.Swap(&other->_internal_metadata_);
key_.Swap(&other->key_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
GetArenaNoVirtual());
args_.Swap(&other->args_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
GetArenaNoVirtual());
swap(term_, other->term_);
}
::google::protobuf::Metadata Entry::GetMetadata() const {
::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_raft_2eproto);
return ::file_level_metadata_raft_2eproto[kIndexInFileMessages];
}
// ===================================================================
void RequestAppendEntries::InitAsDefaultInstance() {
}
class RequestAppendEntries::HasBitSetters {
public:
};
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int RequestAppendEntries::kTermFieldNumber;
const int RequestAppendEntries::kLeaderIDFieldNumber;
const int RequestAppendEntries::kPrevLogIndexFieldNumber;
const int RequestAppendEntries::kPrevLogTermFieldNumber;
const int RequestAppendEntries::kEntriesFieldNumber;
const int RequestAppendEntries::kLeaderCommitFieldNumber;
const int RequestAppendEntries::kExleaderIDFieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
RequestAppendEntries::RequestAppendEntries()
: ::google::protobuf::Message(), _internal_metadata_(nullptr) {
SharedCtor();
// @@protoc_insertion_point(constructor:raft.rpc.RequestAppendEntries)
}
RequestAppendEntries::RequestAppendEntries(const RequestAppendEntries& from)
: ::google::protobuf::Message(),
_internal_metadata_(nullptr),
entries_(from.entries_) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
leaderid_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (from.leaderid().size() > 0) {
leaderid_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.leaderid_);
}
exleaderid_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (from.exleaderid().size() > 0) {
exleaderid_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.exleaderid_);
}
::memcpy(&term_, &from.term_,
static_cast<size_t>(reinterpret_cast<char*>(&leadercommit_) -
reinterpret_cast<char*>(&term_)) + sizeof(leadercommit_));
// @@protoc_insertion_point(copy_constructor:raft.rpc.RequestAppendEntries)
}
void RequestAppendEntries::SharedCtor() {
::google::protobuf::internal::InitSCC(
&scc_info_RequestAppendEntries_raft_2eproto.base);
leaderid_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
exleaderid_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
::memset(&term_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&leadercommit_) -
reinterpret_cast<char*>(&term_)) + sizeof(leadercommit_));
}
RequestAppendEntries::~RequestAppendEntries() {
// @@protoc_insertion_point(destructor:raft.rpc.RequestAppendEntries)
SharedDtor();
}
void RequestAppendEntries::SharedDtor() {
leaderid_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
exleaderid_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void RequestAppendEntries::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
const RequestAppendEntries& RequestAppendEntries::default_instance() {
::google::protobuf::internal::InitSCC(&::scc_info_RequestAppendEntries_raft_2eproto.base);
return *internal_default_instance();
}
void RequestAppendEntries::Clear() {
// @@protoc_insertion_point(message_clear_start:raft.rpc.RequestAppendEntries)
::google::protobuf::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
entries_.Clear();
leaderid_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
exleaderid_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
::memset(&term_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&leadercommit_) -
reinterpret_cast<char*>(&term_)) + sizeof(leadercommit_));
_internal_metadata_.Clear();
}
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
const char* RequestAppendEntries::_InternalParse(const char* begin, const char* end, void* object,
::google::protobuf::internal::ParseContext* ctx) {
auto msg = static_cast<RequestAppendEntries*>(object);
::google::protobuf::int32 size; (void)size;
int depth; (void)depth;
::google::protobuf::uint32 tag;
::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end;
auto ptr = begin;
while (ptr < end) {
ptr = ::google::protobuf::io::Parse32(ptr, &tag);
GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
switch (tag >> 3) {
// uint64 term = 1;
case 1: {
if (static_cast<::google::protobuf::uint8>(tag) != 8) goto handle_unusual;
msg->set_term(::google::protobuf::internal::ReadVarint(&ptr));
GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
break;
}
// string leaderID = 2;
case 2: {
if (static_cast<::google::protobuf::uint8>(tag) != 18) goto handle_unusual;
ptr = ::google::protobuf::io::ReadSize(ptr, &size);
GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
ctx->extra_parse_data().SetFieldName("raft.rpc.RequestAppendEntries.leaderID");
object = msg->mutable_leaderid();
if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) {
parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8;
goto string_till_end;
}
GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx));
::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx);
ptr += size;
break;
}
// uint64 prevLogIndex = 3;
case 3: {
if (static_cast<::google::protobuf::uint8>(tag) != 24) goto handle_unusual;
msg->set_prevlogindex(::google::protobuf::internal::ReadVarint(&ptr));
GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
break;
}
// uint64 prevLogTerm = 4;
case 4: {
if (static_cast<::google::protobuf::uint8>(tag) != 32) goto handle_unusual;
msg->set_prevlogterm(::google::protobuf::internal::ReadVarint(&ptr));
GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
break;
}
// repeated .raft.rpc.Entry entries = 5;
case 5: {
if (static_cast<::google::protobuf::uint8>(tag) != 42) goto handle_unusual;
do {
ptr = ::google::protobuf::io::ReadSize(ptr, &size);
GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
parser_till_end = ::raft::rpc::Entry::_InternalParse;
object = msg->add_entries();
if (size > end - ptr) goto len_delim_till_end;
ptr += size;
GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange(
{parser_till_end, object}, ptr - size, ptr));
if (ptr >= end) break;
} while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 42 && (ptr += 1));
break;
}
// uint64 leaderCommit = 6;
case 6: {
if (static_cast<::google::protobuf::uint8>(tag) != 48) goto handle_unusual;
msg->set_leadercommit(::google::protobuf::internal::ReadVarint(&ptr));
GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
break;
}
// string exleaderID = 7;
case 7: {
if (static_cast<::google::protobuf::uint8>(tag) != 58) goto handle_unusual;
ptr = ::google::protobuf::io::ReadSize(ptr, &size);
GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
ctx->extra_parse_data().SetFieldName("raft.rpc.RequestAppendEntries.exleaderID");
object = msg->mutable_exleaderid();
if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) {
parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8;
goto string_till_end;
}
GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx));
::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx);
ptr += size;
break;
}
default: {
handle_unusual:
if ((tag & 7) == 4 || tag == 0) {
ctx->EndGroup(tag);
return ptr;
}
auto res = UnknownFieldParse(tag, {_InternalParse, msg},
ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx);
ptr = res.first;
GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr);
if (res.second) return ptr;
}
} // switch
} // while
return ptr;
string_till_end:
static_cast<::std::string*>(object)->clear();
static_cast<::std::string*>(object)->reserve(size);
goto len_delim_till_end;
len_delim_till_end:
return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg},
{parser_till_end, object}, size);
}
#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
bool RequestAppendEntries::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:raft.rpc.RequestAppendEntries)
for (;;) {
::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// uint64 term = 1;
case 1: {
if (static_cast< ::google::protobuf::uint8>(tag) == (8 & 0xFF)) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
input, &term_)));
} else {
goto handle_unusual;
}
break;
}
// string leaderID = 2;
case 2: {
if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_leaderid()));
DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->leaderid().data(), static_cast<int>(this->leaderid().length()),
::google::protobuf::internal::WireFormatLite::PARSE,
"raft.rpc.RequestAppendEntries.leaderID"));
} else {
goto handle_unusual;
}
break;
}
// uint64 prevLogIndex = 3;
case 3: {
if (static_cast< ::google::protobuf::uint8>(tag) == (24 & 0xFF)) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
input, &prevlogindex_)));
} else {
goto handle_unusual;
}
break;
}
// uint64 prevLogTerm = 4;
case 4: {
if (static_cast< ::google::protobuf::uint8>(tag) == (32 & 0xFF)) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
input, &prevlogterm_)));
} else {
goto handle_unusual;
}
break;
}
// repeated .raft.rpc.Entry entries = 5;
case 5: {
if (static_cast< ::google::protobuf::uint8>(tag) == (42 & 0xFF)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
input, add_entries()));
} else {
goto handle_unusual;
}
break;
}
// uint64 leaderCommit = 6;
case 6: {
if (static_cast< ::google::protobuf::uint8>(tag) == (48 & 0xFF)) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
input, &leadercommit_)));
} else {
goto handle_unusual;
}
break;
}
// string exleaderID = 7;
case 7: {
if (static_cast< ::google::protobuf::uint8>(tag) == (58 & 0xFF)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_exleaderid()));
DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->exleaderid().data(), static_cast<int>(this->exleaderid().length()),
::google::protobuf::internal::WireFormatLite::PARSE,
"raft.rpc.RequestAppendEntries.exleaderID"));
} else {
goto handle_unusual;
}
break;
}
default: {
handle_unusual:
if (tag == 0) {
goto success;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, _internal_metadata_.mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:raft.rpc.RequestAppendEntries)
return true;
failure:
// @@protoc_insertion_point(parse_failure:raft.rpc.RequestAppendEntries)
return false;
#undef DO_
}
#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
void RequestAppendEntries::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:raft.rpc.RequestAppendEntries)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// uint64 term = 1;
if (this->term() != 0) {
::google::protobuf::internal::WireFormatLite::WriteUInt64(1, this->term(), output);
}
// string leaderID = 2;
if (this->leaderid().size() > 0) {
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->leaderid().data(), static_cast<int>(this->leaderid().length()),
::google::protobuf::internal::WireFormatLite::SERIALIZE,
"raft.rpc.RequestAppendEntries.leaderID");
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
2, this->leaderid(), output);
}
// uint64 prevLogIndex = 3;
if (this->prevlogindex() != 0) {
::google::protobuf::internal::WireFormatLite::WriteUInt64(3, this->prevlogindex(), output);
}
// uint64 prevLogTerm = 4;
if (this->prevlogterm() != 0) {
::google::protobuf::internal::WireFormatLite::WriteUInt64(4, this->prevlogterm(), output);
}
// repeated .raft.rpc.Entry entries = 5;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->entries_size()); i < n; i++) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
5,
this->entries(static_cast<int>(i)),
output);
}
// uint64 leaderCommit = 6;
if (this->leadercommit() != 0) {
::google::protobuf::internal::WireFormatLite::WriteUInt64(6, this->leadercommit(), output);
}
// string exleaderID = 7;
if (this->exleaderid().size() > 0) {
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->exleaderid().data(), static_cast<int>(this->exleaderid().length()),
::google::protobuf::internal::WireFormatLite::SERIALIZE,
"raft.rpc.RequestAppendEntries.exleaderID");
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
7, this->exleaderid(), output);
}
if (_internal_metadata_.have_unknown_fields()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
_internal_metadata_.unknown_fields(), output);
}
// @@protoc_insertion_point(serialize_end:raft.rpc.RequestAppendEntries)
}
::google::protobuf::uint8* RequestAppendEntries::InternalSerializeWithCachedSizesToArray(
::google::protobuf::uint8* target) const {
// @@protoc_insertion_point(serialize_to_array_start:raft.rpc.RequestAppendEntries)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// uint64 term = 1;
if (this->term() != 0) {
target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(1, this->term(), target);
}
// string leaderID = 2;
if (this->leaderid().size() > 0) {
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->leaderid().data(), static_cast<int>(this->leaderid().length()),
::google::protobuf::internal::WireFormatLite::SERIALIZE,
"raft.rpc.RequestAppendEntries.leaderID");
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
2, this->leaderid(), target);
}
// uint64 prevLogIndex = 3;
if (this->prevlogindex() != 0) {
target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(3, this->prevlogindex(), target);
}
// uint64 prevLogTerm = 4;
if (this->prevlogterm() != 0) {
target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(4, this->prevlogterm(), target);
}
// repeated .raft.rpc.Entry entries = 5;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->entries_size()); i < n; i++) {
target = ::google::protobuf::internal::WireFormatLite::
InternalWriteMessageToArray(
5, this->entries(static_cast<int>(i)), target);
}
// uint64 leaderCommit = 6;
if (this->leadercommit() != 0) {
target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(6, this->leadercommit(), target);
}
// string exleaderID = 7;
if (this->exleaderid().size() > 0) {
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->exleaderid().data(), static_cast<int>(this->exleaderid().length()),
::google::protobuf::internal::WireFormatLite::SERIALIZE,
"raft.rpc.RequestAppendEntries.exleaderID");
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
7, this->exleaderid(), target);
}
if (_internal_metadata_.have_unknown_fields()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields(), target);
}
// @@protoc_insertion_point(serialize_to_array_end:raft.rpc.RequestAppendEntries)
return target;
}
size_t RequestAppendEntries::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:raft.rpc.RequestAppendEntries)
size_t total_size = 0;
if (_internal_metadata_.have_unknown_fields()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
_internal_metadata_.unknown_fields());
}
::google::protobuf::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// repeated .raft.rpc.Entry entries = 5;
{
unsigned int count = static_cast<unsigned int>(this->entries_size());
total_size += 1UL * count;
for (unsigned int i = 0; i < count; i++) {
total_size +=
::google::protobuf::internal::WireFormatLite::MessageSize(
this->entries(static_cast<int>(i)));
}
}
// string leaderID = 2;
if (this->leaderid().size() > 0) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->leaderid());
}
// string exleaderID = 7;
if (this->exleaderid().size() > 0) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->exleaderid());
}
// uint64 term = 1;
if (this->term() != 0) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::UInt64Size(
this->term());
}
// uint64 prevLogIndex = 3;
if (this->prevlogindex() != 0) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::UInt64Size(
this->prevlogindex());
}
// uint64 prevLogTerm = 4;
if (this->prevlogterm() != 0) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::UInt64Size(
this->prevlogterm());
}
// uint64 leaderCommit = 6;
if (this->leadercommit() != 0) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::UInt64Size(
this->leadercommit());
}
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
SetCachedSize(cached_size);
return total_size;
}
void RequestAppendEntries::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:raft.rpc.RequestAppendEntries)
GOOGLE_DCHECK_NE(&from, this);
const RequestAppendEntries* source =
::google::protobuf::DynamicCastToGenerated<RequestAppendEntries>(
&from);
if (source == nullptr) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:raft.rpc.RequestAppendEntries)
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:raft.rpc.RequestAppendEntries)
MergeFrom(*source);
}
}
void RequestAppendEntries::MergeFrom(const RequestAppendEntries& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:raft.rpc.RequestAppendEntries)
GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_);
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
entries_.MergeFrom(from.entries_);
if (from.leaderid().size() > 0) {
leaderid_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.leaderid_);
}
if (from.exleaderid().size() > 0) {
exleaderid_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.exleaderid_);
}
if (from.term() != 0) {
set_term(from.term());
}
if (from.prevlogindex() != 0) {
set_prevlogindex(from.prevlogindex());
}
if (from.prevlogterm() != 0) {
set_prevlogterm(from.prevlogterm());
}
if (from.leadercommit() != 0) {
set_leadercommit(from.leadercommit());
}
}
void RequestAppendEntries::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:raft.rpc.RequestAppendEntries)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void RequestAppendEntries::CopyFrom(const RequestAppendEntries& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:raft.rpc.RequestAppendEntries)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool RequestAppendEntries::IsInitialized() const {
return true;
}
void RequestAppendEntries::Swap(RequestAppendEntries* other) {
if (other == this) return;
InternalSwap(other);
}
void RequestAppendEntries::InternalSwap(RequestAppendEntries* other) {
using std::swap;
_internal_metadata_.Swap(&other->_internal_metadata_);
CastToBase(&entries_)->InternalSwap(CastToBase(&other->entries_));
leaderid_.Swap(&other->leaderid_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
GetArenaNoVirtual());
exleaderid_.Swap(&other->exleaderid_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
GetArenaNoVirtual());
swap(term_, other->term_);
swap(prevlogindex_, other->prevlogindex_);
swap(prevlogterm_, other->prevlogterm_);
swap(leadercommit_, other->leadercommit_);
}
::google::protobuf::Metadata RequestAppendEntries::GetMetadata() const {
::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_raft_2eproto);
return ::file_level_metadata_raft_2eproto[kIndexInFileMessages];
}
// ===================================================================
void ReplyAppendEntries::InitAsDefaultInstance() {
}
class ReplyAppendEntries::HasBitSetters {
public:
};
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int ReplyAppendEntries::kTermFieldNumber;
const int ReplyAppendEntries::kAnsFieldNumber;
const int ReplyAppendEntries::kFollowerIDFieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
ReplyAppendEntries::ReplyAppendEntries()
: ::google::protobuf::Message(), _internal_metadata_(nullptr) {
SharedCtor();
// @@protoc_insertion_point(constructor:raft.rpc.ReplyAppendEntries)
}
ReplyAppendEntries::ReplyAppendEntries(const ReplyAppendEntries& from)
: ::google::protobuf::Message(),
_internal_metadata_(nullptr) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
followerid_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (from.followerid().size() > 0) {
followerid_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.followerid_);
}
::memcpy(&term_, &from.term_,
static_cast<size_t>(reinterpret_cast<char*>(&ans_) -
reinterpret_cast<char*>(&term_)) + sizeof(ans_));
// @@protoc_insertion_point(copy_constructor:raft.rpc.ReplyAppendEntries)
}
void ReplyAppendEntries::SharedCtor() {
::google::protobuf::internal::InitSCC(
&scc_info_ReplyAppendEntries_raft_2eproto.base);
followerid_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
::memset(&term_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&ans_) -
reinterpret_cast<char*>(&term_)) + sizeof(ans_));
}
ReplyAppendEntries::~ReplyAppendEntries() {
// @@protoc_insertion_point(destructor:raft.rpc.ReplyAppendEntries)
SharedDtor();
}
void ReplyAppendEntries::SharedDtor() {
followerid_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void ReplyAppendEntries::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
const ReplyAppendEntries& ReplyAppendEntries::default_instance() {
::google::protobuf::internal::InitSCC(&::scc_info_ReplyAppendEntries_raft_2eproto.base);
return *internal_default_instance();
}
void ReplyAppendEntries::Clear() {
// @@protoc_insertion_point(message_clear_start:raft.rpc.ReplyAppendEntries)
::google::protobuf::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
followerid_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
::memset(&term_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&ans_) -
reinterpret_cast<char*>(&term_)) + sizeof(ans_));
_internal_metadata_.Clear();
}
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
const char* ReplyAppendEntries::_InternalParse(const char* begin, const char* end, void* object,
::google::protobuf::internal::ParseContext* ctx) {
auto msg = static_cast<ReplyAppendEntries*>(object);
::google::protobuf::int32 size; (void)size;
int depth; (void)depth;
::google::protobuf::uint32 tag;
::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end;
auto ptr = begin;
while (ptr < end) {
ptr = ::google::protobuf::io::Parse32(ptr, &tag);
GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
switch (tag >> 3) {
// uint64 term = 1;
case 1: {
if (static_cast<::google::protobuf::uint8>(tag) != 8) goto handle_unusual;
msg->set_term(::google::protobuf::internal::ReadVarint(&ptr));
GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
break;
}
// bool ans = 2;
case 2: {
if (static_cast<::google::protobuf::uint8>(tag) != 16) goto handle_unusual;
msg->set_ans(::google::protobuf::internal::ReadVarint(&ptr));
GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
break;
}
// string followerID = 3;
case 3: {
if (static_cast<::google::protobuf::uint8>(tag) != 26) goto handle_unusual;
ptr = ::google::protobuf::io::ReadSize(ptr, &size);
GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
ctx->extra_parse_data().SetFieldName("raft.rpc.ReplyAppendEntries.followerID");
object = msg->mutable_followerid();
if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) {
parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8;
goto string_till_end;
}
GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx));
::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx);
ptr += size;
break;
}
default: {
handle_unusual:
if ((tag & 7) == 4 || tag == 0) {
ctx->EndGroup(tag);
return ptr;
}
auto res = UnknownFieldParse(tag, {_InternalParse, msg},
ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx);
ptr = res.first;
GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr);
if (res.second) return ptr;
}
} // switch
} // while
return ptr;
string_till_end:
static_cast<::std::string*>(object)->clear();
static_cast<::std::string*>(object)->reserve(size);
goto len_delim_till_end;
len_delim_till_end:
return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg},
{parser_till_end, object}, size);
}
#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
bool ReplyAppendEntries::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:raft.rpc.ReplyAppendEntries)
for (;;) {
::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// uint64 term = 1;
case 1: {
if (static_cast< ::google::protobuf::uint8>(tag) == (8 & 0xFF)) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
input, &term_)));
} else {
goto handle_unusual;
}
break;
}
// bool ans = 2;
case 2: {
if (static_cast< ::google::protobuf::uint8>(tag) == (16 & 0xFF)) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
input, &ans_)));
} else {
goto handle_unusual;
}
break;
}
// string followerID = 3;
case 3: {
if (static_cast< ::google::protobuf::uint8>(tag) == (26 & 0xFF)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_followerid()));
DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->followerid().data(), static_cast<int>(this->followerid().length()),
::google::protobuf::internal::WireFormatLite::PARSE,
"raft.rpc.ReplyAppendEntries.followerID"));
} else {
goto handle_unusual;
}
break;
}
default: {
handle_unusual:
if (tag == 0) {
goto success;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, _internal_metadata_.mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:raft.rpc.ReplyAppendEntries)
return true;
failure:
// @@protoc_insertion_point(parse_failure:raft.rpc.ReplyAppendEntries)
return false;
#undef DO_
}
#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
void ReplyAppendEntries::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:raft.rpc.ReplyAppendEntries)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// uint64 term = 1;
if (this->term() != 0) {
::google::protobuf::internal::WireFormatLite::WriteUInt64(1, this->term(), output);
}
// bool ans = 2;
if (this->ans() != 0) {
::google::protobuf::internal::WireFormatLite::WriteBool(2, this->ans(), output);
}
// string followerID = 3;
if (this->followerid().size() > 0) {
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->followerid().data(), static_cast<int>(this->followerid().length()),
::google::protobuf::internal::WireFormatLite::SERIALIZE,
"raft.rpc.ReplyAppendEntries.followerID");
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
3, this->followerid(), output);
}
if (_internal_metadata_.have_unknown_fields()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
_internal_metadata_.unknown_fields(), output);
}
// @@protoc_insertion_point(serialize_end:raft.rpc.ReplyAppendEntries)
}
::google::protobuf::uint8* ReplyAppendEntries::InternalSerializeWithCachedSizesToArray(
::google::protobuf::uint8* target) const {
// @@protoc_insertion_point(serialize_to_array_start:raft.rpc.ReplyAppendEntries)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// uint64 term = 1;
if (this->term() != 0) {
target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(1, this->term(), target);
}
// bool ans = 2;
if (this->ans() != 0) {
target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(2, this->ans(), target);
}
// string followerID = 3;
if (this->followerid().size() > 0) {
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->followerid().data(), static_cast<int>(this->followerid().length()),
::google::protobuf::internal::WireFormatLite::SERIALIZE,
"raft.rpc.ReplyAppendEntries.followerID");
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
3, this->followerid(), target);
}
if (_internal_metadata_.have_unknown_fields()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields(), target);
}
// @@protoc_insertion_point(serialize_to_array_end:raft.rpc.ReplyAppendEntries)
return target;
}
size_t ReplyAppendEntries::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:raft.rpc.ReplyAppendEntries)
size_t total_size = 0;
if (_internal_metadata_.have_unknown_fields()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
_internal_metadata_.unknown_fields());
}
::google::protobuf::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// string followerID = 3;
if (this->followerid().size() > 0) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->followerid());
}
// uint64 term = 1;
if (this->term() != 0) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::UInt64Size(
this->term());
}
// bool ans = 2;
if (this->ans() != 0) {
total_size += 1 + 1;
}
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
SetCachedSize(cached_size);
return total_size;
}
void ReplyAppendEntries::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:raft.rpc.ReplyAppendEntries)
GOOGLE_DCHECK_NE(&from, this);
const ReplyAppendEntries* source =
::google::protobuf::DynamicCastToGenerated<ReplyAppendEntries>(
&from);
if (source == nullptr) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:raft.rpc.ReplyAppendEntries)
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:raft.rpc.ReplyAppendEntries)
MergeFrom(*source);
}
}
void ReplyAppendEntries::MergeFrom(const ReplyAppendEntries& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:raft.rpc.ReplyAppendEntries)
GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_);
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
if (from.followerid().size() > 0) {
followerid_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.followerid_);
}
if (from.term() != 0) {
set_term(from.term());
}
if (from.ans() != 0) {
set_ans(from.ans());
}
}
void ReplyAppendEntries::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:raft.rpc.ReplyAppendEntries)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void ReplyAppendEntries::CopyFrom(const ReplyAppendEntries& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:raft.rpc.ReplyAppendEntries)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool ReplyAppendEntries::IsInitialized() const {
return true;
}
void ReplyAppendEntries::Swap(ReplyAppendEntries* other) {
if (other == this) return;
InternalSwap(other);
}
void ReplyAppendEntries::InternalSwap(ReplyAppendEntries* other) {
using std::swap;
_internal_metadata_.Swap(&other->_internal_metadata_);
followerid_.Swap(&other->followerid_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
GetArenaNoVirtual());
swap(term_, other->term_);
swap(ans_, other->ans_);
}
::google::protobuf::Metadata ReplyAppendEntries::GetMetadata() const {
::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_raft_2eproto);
return ::file_level_metadata_raft_2eproto[kIndexInFileMessages];
}
// ===================================================================
void RequestVote::InitAsDefaultInstance() {
}
class RequestVote::HasBitSetters {
public:
};
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int RequestVote::kTermFieldNumber;
const int RequestVote::kCandidateIDFieldNumber;
const int RequestVote::kLastLogIndexFieldNumber;
const int RequestVote::kLastLogTermFieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
RequestVote::RequestVote()
: ::google::protobuf::Message(), _internal_metadata_(nullptr) {
SharedCtor();
// @@protoc_insertion_point(constructor:raft.rpc.RequestVote)
}
RequestVote::RequestVote(const RequestVote& from)
: ::google::protobuf::Message(),
_internal_metadata_(nullptr) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
candidateid_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (from.candidateid().size() > 0) {
candidateid_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.candidateid_);
}
::memcpy(&term_, &from.term_,
static_cast<size_t>(reinterpret_cast<char*>(&lastlogterm_) -
reinterpret_cast<char*>(&term_)) + sizeof(lastlogterm_));
// @@protoc_insertion_point(copy_constructor:raft.rpc.RequestVote)
}
void RequestVote::SharedCtor() {
::google::protobuf::internal::InitSCC(
&scc_info_RequestVote_raft_2eproto.base);
candidateid_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
::memset(&term_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&lastlogterm_) -
reinterpret_cast<char*>(&term_)) + sizeof(lastlogterm_));
}
RequestVote::~RequestVote() {
// @@protoc_insertion_point(destructor:raft.rpc.RequestVote)
SharedDtor();
}
void RequestVote::SharedDtor() {
candidateid_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void RequestVote::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
const RequestVote& RequestVote::default_instance() {
::google::protobuf::internal::InitSCC(&::scc_info_RequestVote_raft_2eproto.base);
return *internal_default_instance();
}
void RequestVote::Clear() {
// @@protoc_insertion_point(message_clear_start:raft.rpc.RequestVote)
::google::protobuf::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
candidateid_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
::memset(&term_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&lastlogterm_) -
reinterpret_cast<char*>(&term_)) + sizeof(lastlogterm_));
_internal_metadata_.Clear();
}
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
const char* RequestVote::_InternalParse(const char* begin, const char* end, void* object,
::google::protobuf::internal::ParseContext* ctx) {
auto msg = static_cast<RequestVote*>(object);
::google::protobuf::int32 size; (void)size;
int depth; (void)depth;
::google::protobuf::uint32 tag;
::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end;
auto ptr = begin;
while (ptr < end) {
ptr = ::google::protobuf::io::Parse32(ptr, &tag);
GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
switch (tag >> 3) {
// uint64 term = 1;
case 1: {
if (static_cast<::google::protobuf::uint8>(tag) != 8) goto handle_unusual;
msg->set_term(::google::protobuf::internal::ReadVarint(&ptr));
GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
break;
}
// string candidateID = 2;
case 2: {
if (static_cast<::google::protobuf::uint8>(tag) != 18) goto handle_unusual;
ptr = ::google::protobuf::io::ReadSize(ptr, &size);
GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
ctx->extra_parse_data().SetFieldName("raft.rpc.RequestVote.candidateID");
object = msg->mutable_candidateid();
if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) {
parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8;
goto string_till_end;
}
GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx));
::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx);
ptr += size;
break;
}
// uint64 lastLogIndex = 3;
case 3: {
if (static_cast<::google::protobuf::uint8>(tag) != 24) goto handle_unusual;
msg->set_lastlogindex(::google::protobuf::internal::ReadVarint(&ptr));
GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
break;
}
// uint64 lastLogTerm = 4;
case 4: {
if (static_cast<::google::protobuf::uint8>(tag) != 32) goto handle_unusual;
msg->set_lastlogterm(::google::protobuf::internal::ReadVarint(&ptr));
GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
break;
}
default: {
handle_unusual:
if ((tag & 7) == 4 || tag == 0) {
ctx->EndGroup(tag);
return ptr;
}
auto res = UnknownFieldParse(tag, {_InternalParse, msg},
ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx);
ptr = res.first;
GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr);
if (res.second) return ptr;
}
} // switch
} // while
return ptr;
string_till_end:
static_cast<::std::string*>(object)->clear();
static_cast<::std::string*>(object)->reserve(size);
goto len_delim_till_end;
len_delim_till_end:
return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg},
{parser_till_end, object}, size);
}
#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
bool RequestVote::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:raft.rpc.RequestVote)
for (;;) {
::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// uint64 term = 1;
case 1: {
if (static_cast< ::google::protobuf::uint8>(tag) == (8 & 0xFF)) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
input, &term_)));
} else {
goto handle_unusual;
}
break;
}
// string candidateID = 2;
case 2: {
if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_candidateid()));
DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->candidateid().data(), static_cast<int>(this->candidateid().length()),
::google::protobuf::internal::WireFormatLite::PARSE,
"raft.rpc.RequestVote.candidateID"));
} else {
goto handle_unusual;
}
break;
}
// uint64 lastLogIndex = 3;
case 3: {
if (static_cast< ::google::protobuf::uint8>(tag) == (24 & 0xFF)) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
input, &lastlogindex_)));
} else {
goto handle_unusual;
}
break;
}
// uint64 lastLogTerm = 4;
case 4: {
if (static_cast< ::google::protobuf::uint8>(tag) == (32 & 0xFF)) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
input, &lastlogterm_)));
} else {
goto handle_unusual;
}
break;
}
default: {
handle_unusual:
if (tag == 0) {
goto success;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, _internal_metadata_.mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:raft.rpc.RequestVote)
return true;
failure:
// @@protoc_insertion_point(parse_failure:raft.rpc.RequestVote)
return false;
#undef DO_
}
#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
void RequestVote::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:raft.rpc.RequestVote)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// uint64 term = 1;
if (this->term() != 0) {
::google::protobuf::internal::WireFormatLite::WriteUInt64(1, this->term(), output);
}
// string candidateID = 2;
if (this->candidateid().size() > 0) {
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->candidateid().data(), static_cast<int>(this->candidateid().length()),
::google::protobuf::internal::WireFormatLite::SERIALIZE,
"raft.rpc.RequestVote.candidateID");
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
2, this->candidateid(), output);
}
// uint64 lastLogIndex = 3;
if (this->lastlogindex() != 0) {
::google::protobuf::internal::WireFormatLite::WriteUInt64(3, this->lastlogindex(), output);
}
// uint64 lastLogTerm = 4;
if (this->lastlogterm() != 0) {
::google::protobuf::internal::WireFormatLite::WriteUInt64(4, this->lastlogterm(), output);
}
if (_internal_metadata_.have_unknown_fields()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
_internal_metadata_.unknown_fields(), output);
}
// @@protoc_insertion_point(serialize_end:raft.rpc.RequestVote)
}
::google::protobuf::uint8* RequestVote::InternalSerializeWithCachedSizesToArray(
::google::protobuf::uint8* target) const {
// @@protoc_insertion_point(serialize_to_array_start:raft.rpc.RequestVote)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// uint64 term = 1;
if (this->term() != 0) {
target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(1, this->term(), target);
}
// string candidateID = 2;
if (this->candidateid().size() > 0) {
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->candidateid().data(), static_cast<int>(this->candidateid().length()),
::google::protobuf::internal::WireFormatLite::SERIALIZE,
"raft.rpc.RequestVote.candidateID");
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
2, this->candidateid(), target);
}
// uint64 lastLogIndex = 3;
if (this->lastlogindex() != 0) {
target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(3, this->lastlogindex(), target);
}
// uint64 lastLogTerm = 4;
if (this->lastlogterm() != 0) {
target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(4, this->lastlogterm(), target);
}
if (_internal_metadata_.have_unknown_fields()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields(), target);
}
// @@protoc_insertion_point(serialize_to_array_end:raft.rpc.RequestVote)
return target;
}
size_t RequestVote::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:raft.rpc.RequestVote)
size_t total_size = 0;
if (_internal_metadata_.have_unknown_fields()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
_internal_metadata_.unknown_fields());
}
::google::protobuf::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// string candidateID = 2;
if (this->candidateid().size() > 0) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->candidateid());
}
// uint64 term = 1;
if (this->term() != 0) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::UInt64Size(
this->term());
}
// uint64 lastLogIndex = 3;
if (this->lastlogindex() != 0) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::UInt64Size(
this->lastlogindex());
}
// uint64 lastLogTerm = 4;
if (this->lastlogterm() != 0) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::UInt64Size(
this->lastlogterm());
}
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
SetCachedSize(cached_size);
return total_size;
}
void RequestVote::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:raft.rpc.RequestVote)
GOOGLE_DCHECK_NE(&from, this);
const RequestVote* source =
::google::protobuf::DynamicCastToGenerated<RequestVote>(
&from);
if (source == nullptr) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:raft.rpc.RequestVote)
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:raft.rpc.RequestVote)
MergeFrom(*source);
}
}
void RequestVote::MergeFrom(const RequestVote& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:raft.rpc.RequestVote)
GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_);
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
if (from.candidateid().size() > 0) {
candidateid_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.candidateid_);
}
if (from.term() != 0) {
set_term(from.term());
}
if (from.lastlogindex() != 0) {
set_lastlogindex(from.lastlogindex());
}
if (from.lastlogterm() != 0) {
set_lastlogterm(from.lastlogterm());
}
}
void RequestVote::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:raft.rpc.RequestVote)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void RequestVote::CopyFrom(const RequestVote& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:raft.rpc.RequestVote)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool RequestVote::IsInitialized() const {
return true;
}
void RequestVote::Swap(RequestVote* other) {
if (other == this) return;
InternalSwap(other);
}
void RequestVote::InternalSwap(RequestVote* other) {
using std::swap;
_internal_metadata_.Swap(&other->_internal_metadata_);
candidateid_.Swap(&other->candidateid_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
GetArenaNoVirtual());
swap(term_, other->term_);
swap(lastlogindex_, other->lastlogindex_);
swap(lastlogterm_, other->lastlogterm_);
}
::google::protobuf::Metadata RequestVote::GetMetadata() const {
::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_raft_2eproto);
return ::file_level_metadata_raft_2eproto[kIndexInFileMessages];
}
// ===================================================================
void ReplyVote::InitAsDefaultInstance() {
}
class ReplyVote::HasBitSetters {
public:
};
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int ReplyVote::kTermFieldNumber;
const int ReplyVote::kAnsFieldNumber;
const int ReplyVote::kFollowerIDFieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
ReplyVote::ReplyVote()
: ::google::protobuf::Message(), _internal_metadata_(nullptr) {
SharedCtor();
// @@protoc_insertion_point(constructor:raft.rpc.ReplyVote)
}
ReplyVote::ReplyVote(const ReplyVote& from)
: ::google::protobuf::Message(),
_internal_metadata_(nullptr) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
followerid_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (from.followerid().size() > 0) {
followerid_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.followerid_);
}
::memcpy(&term_, &from.term_,
static_cast<size_t>(reinterpret_cast<char*>(&ans_) -
reinterpret_cast<char*>(&term_)) + sizeof(ans_));
// @@protoc_insertion_point(copy_constructor:raft.rpc.ReplyVote)
}
void ReplyVote::SharedCtor() {
::google::protobuf::internal::InitSCC(
&scc_info_ReplyVote_raft_2eproto.base);
followerid_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
::memset(&term_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&ans_) -
reinterpret_cast<char*>(&term_)) + sizeof(ans_));
}
ReplyVote::~ReplyVote() {
// @@protoc_insertion_point(destructor:raft.rpc.ReplyVote)
SharedDtor();
}
void ReplyVote::SharedDtor() {
followerid_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void ReplyVote::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
const ReplyVote& ReplyVote::default_instance() {
::google::protobuf::internal::InitSCC(&::scc_info_ReplyVote_raft_2eproto.base);
return *internal_default_instance();
}
void ReplyVote::Clear() {
// @@protoc_insertion_point(message_clear_start:raft.rpc.ReplyVote)
::google::protobuf::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
followerid_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
::memset(&term_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&ans_) -
reinterpret_cast<char*>(&term_)) + sizeof(ans_));
_internal_metadata_.Clear();
}
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
const char* ReplyVote::_InternalParse(const char* begin, const char* end, void* object,
::google::protobuf::internal::ParseContext* ctx) {
auto msg = static_cast<ReplyVote*>(object);
::google::protobuf::int32 size; (void)size;
int depth; (void)depth;
::google::protobuf::uint32 tag;
::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end;
auto ptr = begin;
while (ptr < end) {
ptr = ::google::protobuf::io::Parse32(ptr, &tag);
GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
switch (tag >> 3) {
// uint64 term = 1;
case 1: {
if (static_cast<::google::protobuf::uint8>(tag) != 8) goto handle_unusual;
msg->set_term(::google::protobuf::internal::ReadVarint(&ptr));
GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
break;
}
// bool ans = 2;
case 2: {
if (static_cast<::google::protobuf::uint8>(tag) != 16) goto handle_unusual;
msg->set_ans(::google::protobuf::internal::ReadVarint(&ptr));
GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
break;
}
// string followerID = 3;
case 3: {
if (static_cast<::google::protobuf::uint8>(tag) != 26) goto handle_unusual;
ptr = ::google::protobuf::io::ReadSize(ptr, &size);
GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
ctx->extra_parse_data().SetFieldName("raft.rpc.ReplyVote.followerID");
object = msg->mutable_followerid();
if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) {
parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8;
goto string_till_end;
}
GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx));
::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx);
ptr += size;
break;
}
default: {
handle_unusual:
if ((tag & 7) == 4 || tag == 0) {
ctx->EndGroup(tag);
return ptr;
}
auto res = UnknownFieldParse(tag, {_InternalParse, msg},
ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx);
ptr = res.first;
GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr);
if (res.second) return ptr;
}
} // switch
} // while
return ptr;
string_till_end:
static_cast<::std::string*>(object)->clear();
static_cast<::std::string*>(object)->reserve(size);
goto len_delim_till_end;
len_delim_till_end:
return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg},
{parser_till_end, object}, size);
}
#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
bool ReplyVote::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:raft.rpc.ReplyVote)
for (;;) {
::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// uint64 term = 1;
case 1: {
if (static_cast< ::google::protobuf::uint8>(tag) == (8 & 0xFF)) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
input, &term_)));
} else {
goto handle_unusual;
}
break;
}
// bool ans = 2;
case 2: {
if (static_cast< ::google::protobuf::uint8>(tag) == (16 & 0xFF)) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
input, &ans_)));
} else {
goto handle_unusual;
}
break;
}
// string followerID = 3;
case 3: {
if (static_cast< ::google::protobuf::uint8>(tag) == (26 & 0xFF)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_followerid()));
DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->followerid().data(), static_cast<int>(this->followerid().length()),
::google::protobuf::internal::WireFormatLite::PARSE,
"raft.rpc.ReplyVote.followerID"));
} else {
goto handle_unusual;
}
break;
}
default: {
handle_unusual:
if (tag == 0) {
goto success;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, _internal_metadata_.mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:raft.rpc.ReplyVote)
return true;
failure:
// @@protoc_insertion_point(parse_failure:raft.rpc.ReplyVote)
return false;
#undef DO_
}
#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
void ReplyVote::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:raft.rpc.ReplyVote)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// uint64 term = 1;
if (this->term() != 0) {
::google::protobuf::internal::WireFormatLite::WriteUInt64(1, this->term(), output);
}
// bool ans = 2;
if (this->ans() != 0) {
::google::protobuf::internal::WireFormatLite::WriteBool(2, this->ans(), output);
}
// string followerID = 3;
if (this->followerid().size() > 0) {
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->followerid().data(), static_cast<int>(this->followerid().length()),
::google::protobuf::internal::WireFormatLite::SERIALIZE,
"raft.rpc.ReplyVote.followerID");
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
3, this->followerid(), output);
}
if (_internal_metadata_.have_unknown_fields()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
_internal_metadata_.unknown_fields(), output);
}
// @@protoc_insertion_point(serialize_end:raft.rpc.ReplyVote)
}
::google::protobuf::uint8* ReplyVote::InternalSerializeWithCachedSizesToArray(
::google::protobuf::uint8* target) const {
// @@protoc_insertion_point(serialize_to_array_start:raft.rpc.ReplyVote)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// uint64 term = 1;
if (this->term() != 0) {
target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(1, this->term(), target);
}
// bool ans = 2;
if (this->ans() != 0) {
target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(2, this->ans(), target);
}
// string followerID = 3;
if (this->followerid().size() > 0) {
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
this->followerid().data(), static_cast<int>(this->followerid().length()),
::google::protobuf::internal::WireFormatLite::SERIALIZE,
"raft.rpc.ReplyVote.followerID");
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
3, this->followerid(), target);
}
if (_internal_metadata_.have_unknown_fields()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields(), target);
}
// @@protoc_insertion_point(serialize_to_array_end:raft.rpc.ReplyVote)
return target;
}
size_t ReplyVote::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:raft.rpc.ReplyVote)
size_t total_size = 0;
if (_internal_metadata_.have_unknown_fields()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
_internal_metadata_.unknown_fields());
}
::google::protobuf::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// string followerID = 3;
if (this->followerid().size() > 0) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->followerid());
}
// uint64 term = 1;
if (this->term() != 0) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::UInt64Size(
this->term());
}
// bool ans = 2;
if (this->ans() != 0) {
total_size += 1 + 1;
}
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
SetCachedSize(cached_size);
return total_size;
}
void ReplyVote::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:raft.rpc.ReplyVote)
GOOGLE_DCHECK_NE(&from, this);
const ReplyVote* source =
::google::protobuf::DynamicCastToGenerated<ReplyVote>(
&from);
if (source == nullptr) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:raft.rpc.ReplyVote)
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:raft.rpc.ReplyVote)
MergeFrom(*source);
}
}
void ReplyVote::MergeFrom(const ReplyVote& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:raft.rpc.ReplyVote)
GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_);
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
if (from.followerid().size() > 0) {
followerid_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.followerid_);
}
if (from.term() != 0) {
set_term(from.term());
}
if (from.ans() != 0) {
set_ans(from.ans());
}
}
void ReplyVote::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:raft.rpc.ReplyVote)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void ReplyVote::CopyFrom(const ReplyVote& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:raft.rpc.ReplyVote)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool ReplyVote::IsInitialized() const {
return true;
}
void ReplyVote::Swap(ReplyVote* other) {
if (other == this) return;
InternalSwap(other);
}
void ReplyVote::InternalSwap(ReplyVote* other) {
using std::swap;
_internal_metadata_.Swap(&other->_internal_metadata_);
followerid_.Swap(&other->followerid_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
GetArenaNoVirtual());
swap(term_, other->term_);
swap(ans_, other->ans_);
}
::google::protobuf::Metadata ReplyVote::GetMetadata() const {
::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_raft_2eproto);
return ::file_level_metadata_raft_2eproto[kIndexInFileMessages];
}
// @@protoc_insertion_point(namespace_scope)
} // namespace rpc
} // namespace raft
namespace google {
namespace protobuf {
template<> PROTOBUF_NOINLINE ::raft::rpc::Reply* Arena::CreateMaybeMessage< ::raft::rpc::Reply >(Arena* arena) {
return Arena::CreateInternal< ::raft::rpc::Reply >(arena);
}
template<> PROTOBUF_NOINLINE ::raft::rpc::Entry* Arena::CreateMaybeMessage< ::raft::rpc::Entry >(Arena* arena) {
return Arena::CreateInternal< ::raft::rpc::Entry >(arena);
}
template<> PROTOBUF_NOINLINE ::raft::rpc::RequestAppendEntries* Arena::CreateMaybeMessage< ::raft::rpc::RequestAppendEntries >(Arena* arena) {
return Arena::CreateInternal< ::raft::rpc::RequestAppendEntries >(arena);
}
template<> PROTOBUF_NOINLINE ::raft::rpc::ReplyAppendEntries* Arena::CreateMaybeMessage< ::raft::rpc::ReplyAppendEntries >(Arena* arena) {
return Arena::CreateInternal< ::raft::rpc::ReplyAppendEntries >(arena);
}
template<> PROTOBUF_NOINLINE ::raft::rpc::RequestVote* Arena::CreateMaybeMessage< ::raft::rpc::RequestVote >(Arena* arena) {
return Arena::CreateInternal< ::raft::rpc::RequestVote >(arena);
}
template<> PROTOBUF_NOINLINE ::raft::rpc::ReplyVote* Arena::CreateMaybeMessage< ::raft::rpc::ReplyVote >(Arena* arena) {
return Arena::CreateInternal< ::raft::rpc::ReplyVote >(arena);
}
} // namespace protobuf
} // namespace google
// @@protoc_insertion_point(global_scope)
#include <google/protobuf/port_undef.inc>
| [
"sgwsndr@163.com"
] | sgwsndr@163.com |
5cab7b4b36336bbdca8394df40f97c00e903c433 | 84ee543935b36942a839480ba2e297424ee03dee | /conTest/196-week/Last-Moment-Before-All-Ants-Fall-Out-of-a-Plank.cpp | 3f179d57350f65f4ae351032bb802bd751e5655a | [] | no_license | yuyilei/LeetCode | ddd008bbfa7f5be02f9391a808e49da746634e5c | dfeac0af40fb4a6b9263b1c101eb6906e2f881f4 | refs/heads/master | 2021-12-21T12:54:59.666693 | 2021-12-02T13:37:49 | 2021-12-02T13:37:49 | 101,265,411 | 9 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,419 | cpp | /*
We have a wooden plank of the length n units. Some ants are walking on the plank, each ant moves with speed 1 unit per second. Some of the ants move to the left, the other move to the right.
When two ants moving in two different directions meet at some point, they change their directions and continue moving again. Assume changing directions doesn't take any additional time.
When an ant reaches one end of the plank at a time t, it falls out of the plank imediately.
Given an integer n and two integer arrays left and right, the positions of the ants moving to the left and the right. Return the moment when the last ant(s) fall out of the plank.
Example 1:
Input: n = 4, left = [4,3], right = [0,1]
Output: 4
Explanation: In the image above:
-The ant at index 0 is named A and going to the right.
-The ant at index 1 is named B and going to the right.
-The ant at index 3 is named C and going to the left.
-The ant at index 4 is named D and going to the left.
Note that the last moment when an ant was on the plank is t = 4 second, after that it falls imediately out of the plank. (i.e. We can say that at t = 4.0000000001, there is no ants on the plank).
Example 2:
Input: n = 7, left = [], right = [0,1,2,3,4,5,6,7]
Output: 7
Explanation: All ants are going to the right, the ant at index 0 needs 7 seconds to fall.
Example 3:
Input: n = 7, left = [0,1,2,3,4,5,6,7], right = []
Output: 7
Explanation: All ants are going to the left, the ant at index 7 needs 7 seconds to fall.
Example 4:
Input: n = 9, left = [5], right = [4]
Output: 5
Explanation: At t = 1 second, both ants will be at the same intial position but with different direction.
Example 5:
Input: n = 6, left = [6], right = [0]
Output: 6
Constraints:
1 <= n <= 10^4
0 <= left.length <= n + 1
0 <= left[i] <= n
0 <= right.length <= n + 1
0 <= right[i] <= n
1 <= left.length + right.length <= n + 1
All values of left and right are unique, and each value can appear only in one of the two arrays.
*/
// 两只蚂蚁相遇后掉头继续走,相当于穿透继续前行。。。
class Solution {
public:
int getLastMoment(int n, vector<int>& left, vector<int>& right) {
sort(left.begin(), left.end());
sort(right.begin(), right.end());
int max_left = left.empty() ? 0 : left.back();
int min_right = right.empty() ? n : right.front();
return max(max_left, n-min_right);
}
};
| [
"yyl1352091742@gmail.com"
] | yyl1352091742@gmail.com |
777679728963a5afce1c0e37b4ba241043e8a6db | f2c83b342267ecc126a5be63d3fe12c1d908135f | /tiledb/sm/serialization/tiledb-rest.capnp.c++ | ba55a778225f39f6bcb363e78461c2b9bc1e9809 | [
"MIT"
] | permissive | mitochon/TileDB | 3e701580b149270deecec87ea5089cb7ee3e782d | b0911a1d9732b5f6982789e4ef2e63607244f8dd | refs/heads/dev | 2020-09-06T06:10:05.509664 | 2019-11-07T13:48:04 | 2019-11-07T13:48:04 | 220,347,892 | 0 | 0 | MIT | 2020-03-23T18:32:49 | 2019-11-07T23:32:01 | null | UTF-8 | C++ | false | false | 139,401 | // Generated by Cap'n Proto compiler, DO NOT EDIT
// source: tiledb-rest.capnp
#include "tiledb-rest.capnp.h"
namespace capnp {
namespace schemas {
static const ::capnp::_::AlignedData<209> b_ce5904e6f9410cec = {
{ 0, 0, 0, 0, 5, 0, 6, 0,
236, 12, 65, 249, 230, 4, 89, 206,
23, 0, 0, 0, 1, 0, 0, 0,
127, 216, 135, 181, 36, 146, 125, 181,
10, 0, 7, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
21, 0, 0, 0, 26, 1, 0, 0,
37, 0, 0, 0, 7, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
33, 0, 0, 0, 55, 2, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
47, 116, 109, 112, 47, 116, 105, 108,
101, 100, 98, 45, 114, 101, 115, 116,
46, 99, 97, 112, 110, 112, 58, 68,
111, 109, 97, 105, 110, 65, 114, 114,
97, 121, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1, 0, 1, 0,
40, 0, 0, 0, 3, 0, 4, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
9, 1, 0, 0, 42, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
4, 1, 0, 0, 3, 0, 1, 0,
32, 1, 0, 0, 2, 0, 1, 0,
1, 0, 0, 0, 1, 0, 0, 0,
0, 0, 1, 0, 1, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
29, 1, 0, 0, 50, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
24, 1, 0, 0, 3, 0, 1, 0,
52, 1, 0, 0, 2, 0, 1, 0,
2, 0, 0, 0, 2, 0, 0, 0,
0, 0, 1, 0, 2, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
49, 1, 0, 0, 50, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
44, 1, 0, 0, 3, 0, 1, 0,
72, 1, 0, 0, 2, 0, 1, 0,
3, 0, 0, 0, 3, 0, 0, 0,
0, 0, 1, 0, 3, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
69, 1, 0, 0, 58, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
64, 1, 0, 0, 3, 0, 1, 0,
92, 1, 0, 0, 2, 0, 1, 0,
4, 0, 0, 0, 4, 0, 0, 0,
0, 0, 1, 0, 4, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
89, 1, 0, 0, 50, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
84, 1, 0, 0, 3, 0, 1, 0,
112, 1, 0, 0, 2, 0, 1, 0,
5, 0, 0, 0, 5, 0, 0, 0,
0, 0, 1, 0, 5, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
109, 1, 0, 0, 58, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
104, 1, 0, 0, 3, 0, 1, 0,
132, 1, 0, 0, 2, 0, 1, 0,
6, 0, 0, 0, 6, 0, 0, 0,
0, 0, 1, 0, 6, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
129, 1, 0, 0, 50, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
124, 1, 0, 0, 3, 0, 1, 0,
152, 1, 0, 0, 2, 0, 1, 0,
7, 0, 0, 0, 7, 0, 0, 0,
0, 0, 1, 0, 7, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
149, 1, 0, 0, 58, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
144, 1, 0, 0, 3, 0, 1, 0,
172, 1, 0, 0, 2, 0, 1, 0,
8, 0, 0, 0, 8, 0, 0, 0,
0, 0, 1, 0, 8, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
169, 1, 0, 0, 66, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
164, 1, 0, 0, 3, 0, 1, 0,
192, 1, 0, 0, 2, 0, 1, 0,
9, 0, 0, 0, 9, 0, 0, 0,
0, 0, 1, 0, 9, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
189, 1, 0, 0, 66, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
184, 1, 0, 0, 3, 0, 1, 0,
212, 1, 0, 0, 2, 0, 1, 0,
105, 110, 116, 56, 0, 0, 0, 0,
14, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 3, 0, 1, 0,
2, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
14, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
117, 105, 110, 116, 56, 0, 0, 0,
14, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 3, 0, 1, 0,
6, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
14, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
105, 110, 116, 49, 54, 0, 0, 0,
14, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 3, 0, 1, 0,
3, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
14, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
117, 105, 110, 116, 49, 54, 0, 0,
14, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 3, 0, 1, 0,
7, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
14, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
105, 110, 116, 51, 50, 0, 0, 0,
14, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 3, 0, 1, 0,
4, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
14, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
117, 105, 110, 116, 51, 50, 0, 0,
14, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 3, 0, 1, 0,
8, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
14, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
105, 110, 116, 54, 52, 0, 0, 0,
14, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 3, 0, 1, 0,
5, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
14, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
117, 105, 110, 116, 54, 52, 0, 0,
14, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 3, 0, 1, 0,
9, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
14, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
102, 108, 111, 97, 116, 51, 50, 0,
14, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 3, 0, 1, 0,
10, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
14, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
102, 108, 111, 97, 116, 54, 52, 0,
14, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 3, 0, 1, 0,
11, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
14, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, }
};
::capnp::word const* const bp_ce5904e6f9410cec = b_ce5904e6f9410cec.words;
#if !CAPNP_LITE
static const uint16_t m_ce5904e6f9410cec[] = {8, 9, 2, 4, 6, 0, 3, 5, 7, 1};
static const uint16_t i_ce5904e6f9410cec[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
const ::capnp::_::RawSchema s_ce5904e6f9410cec = {
0xce5904e6f9410cec, b_ce5904e6f9410cec.words, 209, nullptr, m_ce5904e6f9410cec,
0, 10, i_ce5904e6f9410cec, nullptr, nullptr, { &s_ce5904e6f9410cec, nullptr, nullptr, 0, 0, nullptr }
};
#endif // !CAPNP_LITE
static const ::capnp::_::AlignedData<65> b_a45730f57e0460b4 = {
{ 0, 0, 0, 0, 5, 0, 6, 0,
180, 96, 4, 126, 245, 48, 87, 164,
23, 0, 0, 0, 1, 0, 1, 0,
127, 216, 135, 181, 36, 146, 125, 181,
2, 0, 7, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
21, 0, 0, 0, 234, 0, 0, 0,
33, 0, 0, 0, 7, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
29, 0, 0, 0, 175, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
47, 116, 109, 112, 47, 116, 105, 108,
101, 100, 98, 45, 114, 101, 115, 116,
46, 99, 97, 112, 110, 112, 58, 65,
114, 114, 97, 121, 0, 0, 0, 0,
0, 0, 0, 0, 1, 0, 1, 0,
12, 0, 0, 0, 3, 0, 4, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
69, 0, 0, 0, 82, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
68, 0, 0, 0, 3, 0, 1, 0,
80, 0, 0, 0, 2, 0, 1, 0,
1, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 1, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
77, 0, 0, 0, 82, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
76, 0, 0, 0, 3, 0, 1, 0,
88, 0, 0, 0, 2, 0, 1, 0,
2, 0, 0, 0, 1, 0, 0, 0,
0, 0, 1, 0, 2, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
85, 0, 0, 0, 34, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
80, 0, 0, 0, 3, 0, 1, 0,
92, 0, 0, 0, 2, 0, 1, 0,
116, 105, 109, 101, 115, 116, 97, 109,
112, 0, 0, 0, 0, 0, 0, 0,
9, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
9, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
113, 117, 101, 114, 121, 84, 121, 112,
101, 0, 0, 0, 0, 0, 0, 0,
12, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
12, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
117, 114, 105, 0, 0, 0, 0, 0,
12, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
12, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, }
};
::capnp::word const* const bp_a45730f57e0460b4 = b_a45730f57e0460b4.words;
#if !CAPNP_LITE
static const uint16_t m_a45730f57e0460b4[] = {1, 0, 2};
static const uint16_t i_a45730f57e0460b4[] = {0, 1, 2};
const ::capnp::_::RawSchema s_a45730f57e0460b4 = {
0xa45730f57e0460b4, b_a45730f57e0460b4.words, 65, nullptr, m_a45730f57e0460b4,
0, 3, i_a45730f57e0460b4, nullptr, nullptr, { &s_a45730f57e0460b4, nullptr, nullptr, 0, 0, nullptr }
};
#endif // !CAPNP_LITE
static const ::capnp::_::AlignedData<186> b_d71de32f98e296fe = {
{ 0, 0, 0, 0, 5, 0, 6, 0,
254, 150, 226, 152, 47, 227, 29, 215,
23, 0, 0, 0, 1, 0, 1, 0,
127, 216, 135, 181, 36, 146, 125, 181,
9, 0, 7, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
21, 0, 0, 0, 26, 1, 0, 0,
37, 0, 0, 0, 7, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
33, 0, 0, 0, 55, 2, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
47, 116, 109, 112, 47, 116, 105, 108,
101, 100, 98, 45, 114, 101, 115, 116,
46, 99, 97, 112, 110, 112, 58, 65,
114, 114, 97, 121, 83, 99, 104, 101,
109, 97, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1, 0, 1, 0,
40, 0, 0, 0, 3, 0, 4, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
9, 1, 0, 0, 82, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
8, 1, 0, 0, 3, 0, 1, 0,
20, 1, 0, 0, 2, 0, 1, 0,
1, 0, 0, 0, 1, 0, 0, 0,
0, 0, 1, 0, 1, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
17, 1, 0, 0, 90, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
16, 1, 0, 0, 3, 0, 1, 0,
44, 1, 0, 0, 2, 0, 1, 0,
2, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 2, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
41, 1, 0, 0, 74, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
40, 1, 0, 0, 3, 0, 1, 0,
52, 1, 0, 0, 2, 0, 1, 0,
3, 0, 0, 0, 2, 0, 0, 0,
0, 0, 1, 0, 3, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
49, 1, 0, 0, 82, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
48, 1, 0, 0, 3, 0, 1, 0,
60, 1, 0, 0, 2, 0, 1, 0,
4, 0, 0, 0, 3, 0, 0, 0,
0, 0, 1, 0, 4, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
57, 1, 0, 0, 170, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
60, 1, 0, 0, 3, 0, 1, 0,
72, 1, 0, 0, 2, 0, 1, 0,
5, 0, 0, 0, 4, 0, 0, 0,
0, 0, 1, 0, 5, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
69, 1, 0, 0, 58, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
64, 1, 0, 0, 3, 0, 1, 0,
76, 1, 0, 0, 2, 0, 1, 0,
6, 0, 0, 0, 5, 0, 0, 0,
0, 0, 1, 0, 6, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
73, 1, 0, 0, 170, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
76, 1, 0, 0, 3, 0, 1, 0,
88, 1, 0, 0, 2, 0, 1, 0,
7, 0, 0, 0, 6, 0, 0, 0,
0, 0, 1, 0, 7, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
85, 1, 0, 0, 82, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
84, 1, 0, 0, 3, 0, 1, 0,
96, 1, 0, 0, 2, 0, 1, 0,
8, 0, 0, 0, 7, 0, 0, 0,
0, 0, 1, 0, 8, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
93, 1, 0, 0, 34, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
88, 1, 0, 0, 3, 0, 1, 0,
100, 1, 0, 0, 2, 0, 1, 0,
9, 0, 0, 0, 8, 0, 0, 0,
0, 0, 1, 0, 9, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
97, 1, 0, 0, 66, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
92, 1, 0, 0, 3, 0, 1, 0,
120, 1, 0, 0, 2, 0, 1, 0,
97, 114, 114, 97, 121, 84, 121, 112,
101, 0, 0, 0, 0, 0, 0, 0,
12, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
12, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
97, 116, 116, 114, 105, 98, 117, 116,
101, 115, 0, 0, 0, 0, 0, 0,
14, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 3, 0, 1, 0,
16, 0, 0, 0, 0, 0, 0, 0,
106, 215, 227, 109, 245, 120, 173, 146,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
14, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
99, 97, 112, 97, 99, 105, 116, 121,
0, 0, 0, 0, 0, 0, 0, 0,
9, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
9, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
99, 101, 108, 108, 79, 114, 100, 101,
114, 0, 0, 0, 0, 0, 0, 0,
12, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
12, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
99, 111, 111, 114, 100, 115, 70, 105,
108, 116, 101, 114, 80, 105, 112, 101,
108, 105, 110, 101, 0, 0, 0, 0,
16, 0, 0, 0, 0, 0, 0, 0,
245, 196, 234, 51, 247, 131, 69, 188,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
16, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
100, 111, 109, 97, 105, 110, 0, 0,
16, 0, 0, 0, 0, 0, 0, 0,
76, 117, 100, 118, 68, 15, 3, 222,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
16, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
111, 102, 102, 115, 101, 116, 70, 105,
108, 116, 101, 114, 80, 105, 112, 101,
108, 105, 110, 101, 0, 0, 0, 0,
16, 0, 0, 0, 0, 0, 0, 0,
245, 196, 234, 51, 247, 131, 69, 188,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
16, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
116, 105, 108, 101, 79, 114, 100, 101,
114, 0, 0, 0, 0, 0, 0, 0,
12, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
12, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
117, 114, 105, 0, 0, 0, 0, 0,
12, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
12, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
118, 101, 114, 115, 105, 111, 110, 0,
14, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 3, 0, 1, 0,
4, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
14, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, }
};
::capnp::word const* const bp_d71de32f98e296fe = b_d71de32f98e296fe.words;
#if !CAPNP_LITE
static const ::capnp::_::RawSchema* const d_d71de32f98e296fe[] = {
&s_92ad78f56de3d76a,
&s_bc4583f733eac4f5,
&s_de030f447664754c,
};
static const uint16_t m_d71de32f98e296fe[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
static const uint16_t i_d71de32f98e296fe[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
const ::capnp::_::RawSchema s_d71de32f98e296fe = {
0xd71de32f98e296fe, b_d71de32f98e296fe.words, 186, d_d71de32f98e296fe, m_d71de32f98e296fe,
3, 10, i_d71de32f98e296fe, nullptr, nullptr, { &s_d71de32f98e296fe, nullptr, nullptr, 0, 0, nullptr }
};
#endif // !CAPNP_LITE
static const ::capnp::_::AlignedData<81> b_92ad78f56de3d76a = {
{ 0, 0, 0, 0, 5, 0, 6, 0,
106, 215, 227, 109, 245, 120, 173, 146,
23, 0, 0, 0, 1, 0, 1, 0,
127, 216, 135, 181, 36, 146, 125, 181,
3, 0, 7, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
21, 0, 0, 0, 10, 1, 0, 0,
37, 0, 0, 0, 7, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
33, 0, 0, 0, 231, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
47, 116, 109, 112, 47, 116, 105, 108,
101, 100, 98, 45, 114, 101, 115, 116,
46, 99, 97, 112, 110, 112, 58, 65,
116, 116, 114, 105, 98, 117, 116, 101,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1, 0, 1, 0,
16, 0, 0, 0, 3, 0, 4, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
97, 0, 0, 0, 90, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
96, 0, 0, 0, 3, 0, 1, 0,
108, 0, 0, 0, 2, 0, 1, 0,
1, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 1, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
105, 0, 0, 0, 42, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
100, 0, 0, 0, 3, 0, 1, 0,
112, 0, 0, 0, 2, 0, 1, 0,
2, 0, 0, 0, 1, 0, 0, 0,
0, 0, 1, 0, 2, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
109, 0, 0, 0, 42, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
104, 0, 0, 0, 3, 0, 1, 0,
116, 0, 0, 0, 2, 0, 1, 0,
3, 0, 0, 0, 2, 0, 0, 0,
0, 0, 1, 0, 3, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
113, 0, 0, 0, 122, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
112, 0, 0, 0, 3, 0, 1, 0,
124, 0, 0, 0, 2, 0, 1, 0,
99, 101, 108, 108, 86, 97, 108, 78,
117, 109, 0, 0, 0, 0, 0, 0,
8, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
8, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
110, 97, 109, 101, 0, 0, 0, 0,
12, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
12, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
116, 121, 112, 101, 0, 0, 0, 0,
12, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
12, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
102, 105, 108, 116, 101, 114, 80, 105,
112, 101, 108, 105, 110, 101, 0, 0,
16, 0, 0, 0, 0, 0, 0, 0,
245, 196, 234, 51, 247, 131, 69, 188,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
16, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, }
};
::capnp::word const* const bp_92ad78f56de3d76a = b_92ad78f56de3d76a.words;
#if !CAPNP_LITE
static const ::capnp::_::RawSchema* const d_92ad78f56de3d76a[] = {
&s_bc4583f733eac4f5,
};
static const uint16_t m_92ad78f56de3d76a[] = {0, 3, 1, 2};
static const uint16_t i_92ad78f56de3d76a[] = {0, 1, 2, 3};
const ::capnp::_::RawSchema s_92ad78f56de3d76a = {
0x92ad78f56de3d76a, b_92ad78f56de3d76a.words, 81, d_92ad78f56de3d76a, m_92ad78f56de3d76a,
1, 4, i_92ad78f56de3d76a, nullptr, nullptr, { &s_92ad78f56de3d76a, nullptr, nullptr, 0, 0, nullptr }
};
#endif // !CAPNP_LITE
static const ::capnp::_::AlignedData<70> b_d20a578112fa92a2 = {
{ 0, 0, 0, 0, 5, 0, 6, 0,
162, 146, 250, 18, 129, 87, 10, 210,
23, 0, 0, 0, 1, 0, 2, 0,
127, 216, 135, 181, 36, 146, 125, 181,
1, 0, 7, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
21, 0, 0, 0, 106, 1, 0, 0,
41, 0, 0, 0, 7, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
37, 0, 0, 0, 175, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
47, 116, 109, 112, 47, 116, 105, 108,
101, 100, 98, 45, 114, 101, 115, 116,
46, 99, 97, 112, 110, 112, 58, 65,
116, 116, 114, 105, 98, 117, 116, 101,
66, 117, 102, 102, 101, 114, 72, 101,
97, 100, 101, 114, 0, 0, 0, 0,
0, 0, 0, 0, 1, 0, 1, 0,
12, 0, 0, 0, 3, 0, 4, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
69, 0, 0, 0, 42, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
64, 0, 0, 0, 3, 0, 1, 0,
76, 0, 0, 0, 2, 0, 1, 0,
1, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 1, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
73, 0, 0, 0, 210, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
80, 0, 0, 0, 3, 0, 1, 0,
92, 0, 0, 0, 2, 0, 1, 0,
2, 0, 0, 0, 1, 0, 0, 0,
0, 0, 1, 0, 2, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
89, 0, 0, 0, 194, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
92, 0, 0, 0, 3, 0, 1, 0,
104, 0, 0, 0, 2, 0, 1, 0,
110, 97, 109, 101, 0, 0, 0, 0,
12, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
12, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
102, 105, 120, 101, 100, 76, 101, 110,
66, 117, 102, 102, 101, 114, 83, 105,
122, 101, 73, 110, 66, 121, 116, 101,
115, 0, 0, 0, 0, 0, 0, 0,
9, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
9, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
118, 97, 114, 76, 101, 110, 66, 117,
102, 102, 101, 114, 83, 105, 122, 101,
73, 110, 66, 121, 116, 101, 115, 0,
9, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
9, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, }
};
::capnp::word const* const bp_d20a578112fa92a2 = b_d20a578112fa92a2.words;
#if !CAPNP_LITE
static const uint16_t m_d20a578112fa92a2[] = {1, 0, 2};
static const uint16_t i_d20a578112fa92a2[] = {0, 1, 2};
const ::capnp::_::RawSchema s_d20a578112fa92a2 = {
0xd20a578112fa92a2, b_d20a578112fa92a2.words, 70, nullptr, m_d20a578112fa92a2,
0, 3, i_d20a578112fa92a2, nullptr, nullptr, { &s_d20a578112fa92a2, nullptr, nullptr, 0, 0, nullptr }
};
#endif // !CAPNP_LITE
static const ::capnp::_::AlignedData<89> b_95e26a84d32d8223 = {
{ 0, 0, 0, 0, 5, 0, 6, 0,
35, 130, 45, 211, 132, 106, 226, 149,
23, 0, 0, 0, 1, 0, 2, 0,
127, 216, 135, 181, 36, 146, 125, 181,
3, 0, 7, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
21, 0, 0, 0, 10, 1, 0, 0,
37, 0, 0, 0, 7, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
33, 0, 0, 0, 31, 1, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
47, 116, 109, 112, 47, 116, 105, 108,
101, 100, 98, 45, 114, 101, 115, 116,
46, 99, 97, 112, 110, 112, 58, 68,
105, 109, 101, 110, 115, 105, 111, 110,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1, 0, 1, 0,
20, 0, 0, 0, 3, 0, 4, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
125, 0, 0, 0, 42, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
120, 0, 0, 0, 3, 0, 1, 0,
132, 0, 0, 0, 2, 0, 1, 0,
1, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 1, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
129, 0, 0, 0, 122, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
128, 0, 0, 0, 3, 0, 1, 0,
140, 0, 0, 0, 2, 0, 1, 0,
2, 0, 0, 0, 1, 0, 0, 0,
0, 0, 1, 0, 2, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
137, 0, 0, 0, 42, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
132, 0, 0, 0, 3, 0, 1, 0,
144, 0, 0, 0, 2, 0, 1, 0,
3, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0, 0, 0,
160, 159, 176, 109, 83, 82, 166, 162,
141, 0, 0, 0, 90, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
4, 0, 0, 0, 2, 0, 0, 0,
0, 0, 1, 0, 13, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
121, 0, 0, 0, 58, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
116, 0, 0, 0, 3, 0, 1, 0,
128, 0, 0, 0, 2, 0, 1, 0,
110, 97, 109, 101, 0, 0, 0, 0,
12, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
12, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
110, 117, 108, 108, 84, 105, 108, 101,
69, 120, 116, 101, 110, 116, 0, 0,
1, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
116, 121, 112, 101, 0, 0, 0, 0,
12, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
12, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
116, 105, 108, 101, 69, 120, 116, 101,
110, 116, 0, 0, 0, 0, 0, 0,
100, 111, 109, 97, 105, 110, 0, 0,
16, 0, 0, 0, 0, 0, 0, 0,
236, 12, 65, 249, 230, 4, 89, 206,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
16, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, }
};
::capnp::word const* const bp_95e26a84d32d8223 = b_95e26a84d32d8223.words;
#if !CAPNP_LITE
static const ::capnp::_::RawSchema* const d_95e26a84d32d8223[] = {
&s_a2a652536db09fa0,
&s_ce5904e6f9410cec,
};
static const uint16_t m_95e26a84d32d8223[] = {4, 0, 1, 3, 2};
static const uint16_t i_95e26a84d32d8223[] = {0, 1, 2, 3, 4};
const ::capnp::_::RawSchema s_95e26a84d32d8223 = {
0x95e26a84d32d8223, b_95e26a84d32d8223.words, 89, d_95e26a84d32d8223, m_95e26a84d32d8223,
2, 5, i_95e26a84d32d8223, nullptr, nullptr, { &s_95e26a84d32d8223, nullptr, nullptr, 0, 0, nullptr }
};
#endif // !CAPNP_LITE
static const ::capnp::_::AlignedData<169> b_a2a652536db09fa0 = {
{ 0, 0, 0, 0, 5, 0, 6, 0,
160, 159, 176, 109, 83, 82, 166, 162,
33, 0, 0, 0, 1, 0, 2, 0,
35, 130, 45, 211, 132, 106, 226, 149,
3, 0, 7, 0, 1, 0, 10, 0,
1, 0, 0, 0, 0, 0, 0, 0,
21, 0, 0, 0, 98, 1, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
33, 0, 0, 0, 55, 2, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
47, 116, 109, 112, 47, 116, 105, 108,
101, 100, 98, 45, 114, 101, 115, 116,
46, 99, 97, 112, 110, 112, 58, 68,
105, 109, 101, 110, 115, 105, 111, 110,
46, 116, 105, 108, 101, 69, 120, 116,
101, 110, 116, 0, 0, 0, 0, 0,
40, 0, 0, 0, 3, 0, 4, 0,
0, 0, 255, 255, 1, 0, 0, 0,
0, 0, 1, 0, 3, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
9, 1, 0, 0, 42, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
4, 1, 0, 0, 3, 0, 1, 0,
16, 1, 0, 0, 2, 0, 1, 0,
1, 0, 254, 255, 1, 0, 0, 0,
0, 0, 1, 0, 4, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
13, 1, 0, 0, 50, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
8, 1, 0, 0, 3, 0, 1, 0,
20, 1, 0, 0, 2, 0, 1, 0,
2, 0, 253, 255, 2, 0, 0, 0,
0, 0, 1, 0, 5, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
17, 1, 0, 0, 50, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
12, 1, 0, 0, 3, 0, 1, 0,
24, 1, 0, 0, 2, 0, 1, 0,
3, 0, 252, 255, 2, 0, 0, 0,
0, 0, 1, 0, 6, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
21, 1, 0, 0, 58, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
16, 1, 0, 0, 3, 0, 1, 0,
28, 1, 0, 0, 2, 0, 1, 0,
4, 0, 251, 255, 1, 0, 0, 0,
0, 0, 1, 0, 7, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
25, 1, 0, 0, 50, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
20, 1, 0, 0, 3, 0, 1, 0,
32, 1, 0, 0, 2, 0, 1, 0,
5, 0, 250, 255, 1, 0, 0, 0,
0, 0, 1, 0, 8, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
29, 1, 0, 0, 58, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
24, 1, 0, 0, 3, 0, 1, 0,
36, 1, 0, 0, 2, 0, 1, 0,
6, 0, 249, 255, 1, 0, 0, 0,
0, 0, 1, 0, 9, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
33, 1, 0, 0, 50, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
28, 1, 0, 0, 3, 0, 1, 0,
40, 1, 0, 0, 2, 0, 1, 0,
7, 0, 248, 255, 1, 0, 0, 0,
0, 0, 1, 0, 10, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
37, 1, 0, 0, 58, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
32, 1, 0, 0, 3, 0, 1, 0,
44, 1, 0, 0, 2, 0, 1, 0,
8, 0, 247, 255, 1, 0, 0, 0,
0, 0, 1, 0, 11, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
41, 1, 0, 0, 66, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
36, 1, 0, 0, 3, 0, 1, 0,
48, 1, 0, 0, 2, 0, 1, 0,
9, 0, 246, 255, 1, 0, 0, 0,
0, 0, 1, 0, 12, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
45, 1, 0, 0, 66, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
40, 1, 0, 0, 3, 0, 1, 0,
52, 1, 0, 0, 2, 0, 1, 0,
105, 110, 116, 56, 0, 0, 0, 0,
2, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
2, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
117, 105, 110, 116, 56, 0, 0, 0,
6, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
6, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
105, 110, 116, 49, 54, 0, 0, 0,
3, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
3, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
117, 105, 110, 116, 49, 54, 0, 0,
7, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
7, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
105, 110, 116, 51, 50, 0, 0, 0,
4, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
4, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
117, 105, 110, 116, 51, 50, 0, 0,
8, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
8, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
105, 110, 116, 54, 52, 0, 0, 0,
5, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
5, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
117, 105, 110, 116, 54, 52, 0, 0,
9, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
9, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
102, 108, 111, 97, 116, 51, 50, 0,
10, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
10, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
102, 108, 111, 97, 116, 54, 52, 0,
11, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
11, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, }
};
::capnp::word const* const bp_a2a652536db09fa0 = b_a2a652536db09fa0.words;
#if !CAPNP_LITE
static const ::capnp::_::RawSchema* const d_a2a652536db09fa0[] = {
&s_95e26a84d32d8223,
};
static const uint16_t m_a2a652536db09fa0[] = {8, 9, 2, 4, 6, 0, 3, 5, 7, 1};
static const uint16_t i_a2a652536db09fa0[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
const ::capnp::_::RawSchema s_a2a652536db09fa0 = {
0xa2a652536db09fa0, b_a2a652536db09fa0.words, 169, d_a2a652536db09fa0, m_a2a652536db09fa0,
1, 10, i_a2a652536db09fa0, nullptr, nullptr, { &s_a2a652536db09fa0, nullptr, nullptr, 0, 0, nullptr }
};
#endif // !CAPNP_LITE
static const ::capnp::_::AlignedData<85> b_de030f447664754c = {
{ 0, 0, 0, 0, 5, 0, 6, 0,
76, 117, 100, 118, 68, 15, 3, 222,
23, 0, 0, 0, 1, 0, 0, 0,
127, 216, 135, 181, 36, 146, 125, 181,
4, 0, 7, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
21, 0, 0, 0, 242, 0, 0, 0,
33, 0, 0, 0, 7, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
29, 0, 0, 0, 231, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
47, 116, 109, 112, 47, 116, 105, 108,
101, 100, 98, 45, 114, 101, 115, 116,
46, 99, 97, 112, 110, 112, 58, 68,
111, 109, 97, 105, 110, 0, 0, 0,
0, 0, 0, 0, 1, 0, 1, 0,
16, 0, 0, 0, 3, 0, 4, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
97, 0, 0, 0, 82, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
96, 0, 0, 0, 3, 0, 1, 0,
108, 0, 0, 0, 2, 0, 1, 0,
1, 0, 0, 0, 1, 0, 0, 0,
0, 0, 1, 0, 1, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
105, 0, 0, 0, 90, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
104, 0, 0, 0, 3, 0, 1, 0,
132, 0, 0, 0, 2, 0, 1, 0,
2, 0, 0, 0, 2, 0, 0, 0,
0, 0, 1, 0, 2, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
129, 0, 0, 0, 82, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
128, 0, 0, 0, 3, 0, 1, 0,
140, 0, 0, 0, 2, 0, 1, 0,
3, 0, 0, 0, 3, 0, 0, 0,
0, 0, 1, 0, 3, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
137, 0, 0, 0, 42, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
132, 0, 0, 0, 3, 0, 1, 0,
144, 0, 0, 0, 2, 0, 1, 0,
99, 101, 108, 108, 79, 114, 100, 101,
114, 0, 0, 0, 0, 0, 0, 0,
12, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
12, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
100, 105, 109, 101, 110, 115, 105, 111,
110, 115, 0, 0, 0, 0, 0, 0,
14, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 3, 0, 1, 0,
16, 0, 0, 0, 0, 0, 0, 0,
35, 130, 45, 211, 132, 106, 226, 149,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
14, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
116, 105, 108, 101, 79, 114, 100, 101,
114, 0, 0, 0, 0, 0, 0, 0,
12, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
12, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
116, 121, 112, 101, 0, 0, 0, 0,
12, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
12, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, }
};
::capnp::word const* const bp_de030f447664754c = b_de030f447664754c.words;
#if !CAPNP_LITE
static const ::capnp::_::RawSchema* const d_de030f447664754c[] = {
&s_95e26a84d32d8223,
};
static const uint16_t m_de030f447664754c[] = {0, 1, 2, 3};
static const uint16_t i_de030f447664754c[] = {0, 1, 2, 3};
const ::capnp::_::RawSchema s_de030f447664754c = {
0xde030f447664754c, b_de030f447664754c.words, 85, d_de030f447664754c, m_de030f447664754c,
1, 4, i_de030f447664754c, nullptr, nullptr, { &s_de030f447664754c, nullptr, nullptr, 0, 0, nullptr }
};
#endif // !CAPNP_LITE
static const ::capnp::_::AlignedData<48> b_fa787661cd3563a4 = {
{ 0, 0, 0, 0, 5, 0, 6, 0,
164, 99, 53, 205, 97, 118, 120, 250,
23, 0, 0, 0, 1, 0, 1, 0,
127, 216, 135, 181, 36, 146, 125, 181,
1, 0, 7, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
21, 0, 0, 0, 234, 0, 0, 0,
33, 0, 0, 0, 7, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
29, 0, 0, 0, 119, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
47, 116, 109, 112, 47, 116, 105, 108,
101, 100, 98, 45, 114, 101, 115, 116,
46, 99, 97, 112, 110, 112, 58, 69,
114, 114, 111, 114, 0, 0, 0, 0,
0, 0, 0, 0, 1, 0, 1, 0,
8, 0, 0, 0, 3, 0, 4, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
41, 0, 0, 0, 42, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
36, 0, 0, 0, 3, 0, 1, 0,
48, 0, 0, 0, 2, 0, 1, 0,
1, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 1, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
45, 0, 0, 0, 66, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
40, 0, 0, 0, 3, 0, 1, 0,
52, 0, 0, 0, 2, 0, 1, 0,
99, 111, 100, 101, 0, 0, 0, 0,
5, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
5, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
109, 101, 115, 115, 97, 103, 101, 0,
12, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
12, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, }
};
::capnp::word const* const bp_fa787661cd3563a4 = b_fa787661cd3563a4.words;
#if !CAPNP_LITE
static const uint16_t m_fa787661cd3563a4[] = {0, 1};
static const uint16_t i_fa787661cd3563a4[] = {0, 1};
const ::capnp::_::RawSchema s_fa787661cd3563a4 = {
0xfa787661cd3563a4, b_fa787661cd3563a4.words, 48, nullptr, m_fa787661cd3563a4,
0, 2, i_fa787661cd3563a4, nullptr, nullptr, { &s_fa787661cd3563a4, nullptr, nullptr, 0, 0, nullptr }
};
#endif // !CAPNP_LITE
static const ::capnp::_::AlignedData<41> b_e7175047415b3f97 = {
{ 0, 0, 0, 0, 5, 0, 6, 0,
151, 63, 91, 65, 71, 80, 23, 231,
23, 0, 0, 0, 1, 0, 2, 0,
127, 216, 135, 181, 36, 146, 125, 181,
2, 0, 7, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
21, 0, 0, 0, 242, 0, 0, 0,
33, 0, 0, 0, 7, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
29, 0, 0, 0, 119, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
47, 116, 109, 112, 47, 116, 105, 108,
101, 100, 98, 45, 114, 101, 115, 116,
46, 99, 97, 112, 110, 112, 58, 70,
105, 108, 116, 101, 114, 0, 0, 0,
0, 0, 0, 0, 1, 0, 1, 0,
8, 0, 0, 0, 3, 0, 4, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
41, 0, 0, 0, 42, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
36, 0, 0, 0, 3, 0, 1, 0,
48, 0, 0, 0, 2, 0, 1, 0,
1, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0, 0, 0,
127, 137, 171, 179, 50, 248, 234, 156,
45, 0, 0, 0, 42, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
116, 121, 112, 101, 0, 0, 0, 0,
12, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
12, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
100, 97, 116, 97, 0, 0, 0, 0, }
};
::capnp::word const* const bp_e7175047415b3f97 = b_e7175047415b3f97.words;
#if !CAPNP_LITE
static const ::capnp::_::RawSchema* const d_e7175047415b3f97[] = {
&s_9ceaf832b3ab897f,
};
static const uint16_t m_e7175047415b3f97[] = {1, 0};
static const uint16_t i_e7175047415b3f97[] = {0, 1};
const ::capnp::_::RawSchema s_e7175047415b3f97 = {
0xe7175047415b3f97, b_e7175047415b3f97.words, 41, d_e7175047415b3f97, m_e7175047415b3f97,
1, 2, i_e7175047415b3f97, nullptr, nullptr, { &s_e7175047415b3f97, nullptr, nullptr, 0, 0, nullptr }
};
#endif // !CAPNP_LITE
static const ::capnp::_::AlignedData<198> b_9ceaf832b3ab897f = {
{ 0, 0, 0, 0, 5, 0, 6, 0,
127, 137, 171, 179, 50, 248, 234, 156,
30, 0, 0, 0, 1, 0, 2, 0,
151, 63, 91, 65, 71, 80, 23, 231,
2, 0, 7, 0, 1, 0, 12, 0,
0, 0, 0, 0, 0, 0, 0, 0,
21, 0, 0, 0, 26, 1, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
29, 0, 0, 0, 167, 2, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
47, 116, 109, 112, 47, 116, 105, 108,
101, 100, 98, 45, 114, 101, 115, 116,
46, 99, 97, 112, 110, 112, 58, 70,
105, 108, 116, 101, 114, 46, 100, 97,
116, 97, 0, 0, 0, 0, 0, 0,
48, 0, 0, 0, 3, 0, 4, 0,
0, 0, 255, 255, 1, 0, 0, 0,
0, 0, 1, 0, 1, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
65, 1, 0, 0, 42, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
60, 1, 0, 0, 3, 0, 1, 0,
72, 1, 0, 0, 2, 0, 1, 0,
1, 0, 254, 255, 1, 0, 0, 0,
0, 0, 1, 0, 2, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
69, 1, 0, 0, 50, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
64, 1, 0, 0, 3, 0, 1, 0,
76, 1, 0, 0, 2, 0, 1, 0,
2, 0, 253, 255, 2, 0, 0, 0,
0, 0, 1, 0, 3, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
73, 1, 0, 0, 42, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
68, 1, 0, 0, 3, 0, 1, 0,
80, 1, 0, 0, 2, 0, 1, 0,
3, 0, 252, 255, 2, 0, 0, 0,
0, 0, 1, 0, 4, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
77, 1, 0, 0, 50, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
72, 1, 0, 0, 3, 0, 1, 0,
84, 1, 0, 0, 2, 0, 1, 0,
4, 0, 251, 255, 1, 0, 0, 0,
0, 0, 1, 0, 5, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
81, 1, 0, 0, 50, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
76, 1, 0, 0, 3, 0, 1, 0,
88, 1, 0, 0, 2, 0, 1, 0,
5, 0, 250, 255, 1, 0, 0, 0,
0, 0, 1, 0, 6, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
85, 1, 0, 0, 58, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
80, 1, 0, 0, 3, 0, 1, 0,
92, 1, 0, 0, 2, 0, 1, 0,
6, 0, 249, 255, 1, 0, 0, 0,
0, 0, 1, 0, 7, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
89, 1, 0, 0, 50, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
84, 1, 0, 0, 3, 0, 1, 0,
96, 1, 0, 0, 2, 0, 1, 0,
7, 0, 248, 255, 1, 0, 0, 0,
0, 0, 1, 0, 8, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
93, 1, 0, 0, 58, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
88, 1, 0, 0, 3, 0, 1, 0,
100, 1, 0, 0, 2, 0, 1, 0,
8, 0, 247, 255, 1, 0, 0, 0,
0, 0, 1, 0, 9, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
97, 1, 0, 0, 50, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
92, 1, 0, 0, 3, 0, 1, 0,
104, 1, 0, 0, 2, 0, 1, 0,
9, 0, 246, 255, 1, 0, 0, 0,
0, 0, 1, 0, 10, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
101, 1, 0, 0, 58, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
96, 1, 0, 0, 3, 0, 1, 0,
108, 1, 0, 0, 2, 0, 1, 0,
10, 0, 245, 255, 1, 0, 0, 0,
0, 0, 1, 0, 11, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
105, 1, 0, 0, 66, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
100, 1, 0, 0, 3, 0, 1, 0,
112, 1, 0, 0, 2, 0, 1, 0,
11, 0, 244, 255, 1, 0, 0, 0,
0, 0, 1, 0, 12, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
109, 1, 0, 0, 66, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
104, 1, 0, 0, 3, 0, 1, 0,
116, 1, 0, 0, 2, 0, 1, 0,
116, 101, 120, 116, 0, 0, 0, 0,
12, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
12, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
98, 121, 116, 101, 115, 0, 0, 0,
13, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
13, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
105, 110, 116, 56, 0, 0, 0, 0,
2, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
2, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
117, 105, 110, 116, 56, 0, 0, 0,
6, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
6, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
105, 110, 116, 49, 54, 0, 0, 0,
3, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
3, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
117, 105, 110, 116, 49, 54, 0, 0,
7, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
7, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
105, 110, 116, 51, 50, 0, 0, 0,
4, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
4, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
117, 105, 110, 116, 51, 50, 0, 0,
8, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
8, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
105, 110, 116, 54, 52, 0, 0, 0,
5, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
5, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
117, 105, 110, 116, 54, 52, 0, 0,
9, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
9, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
102, 108, 111, 97, 116, 51, 50, 0,
10, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
10, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
102, 108, 111, 97, 116, 54, 52, 0,
11, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
11, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, }
};
::capnp::word const* const bp_9ceaf832b3ab897f = b_9ceaf832b3ab897f.words;
#if !CAPNP_LITE
static const ::capnp::_::RawSchema* const d_9ceaf832b3ab897f[] = {
&s_e7175047415b3f97,
};
static const uint16_t m_9ceaf832b3ab897f[] = {1, 10, 11, 4, 6, 8, 2, 0, 5, 7, 9, 3};
static const uint16_t i_9ceaf832b3ab897f[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11};
const ::capnp::_::RawSchema s_9ceaf832b3ab897f = {
0x9ceaf832b3ab897f, b_9ceaf832b3ab897f.words, 198, d_9ceaf832b3ab897f, m_9ceaf832b3ab897f,
1, 12, i_9ceaf832b3ab897f, nullptr, nullptr, { &s_9ceaf832b3ab897f, nullptr, nullptr, 0, 0, nullptr }
};
#endif // !CAPNP_LITE
static const ::capnp::_::AlignedData<38> b_bc4583f733eac4f5 = {
{ 0, 0, 0, 0, 5, 0, 6, 0,
245, 196, 234, 51, 247, 131, 69, 188,
23, 0, 0, 0, 1, 0, 0, 0,
127, 216, 135, 181, 36, 146, 125, 181,
1, 0, 7, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
21, 0, 0, 0, 50, 1, 0, 0,
37, 0, 0, 0, 7, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
33, 0, 0, 0, 63, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
47, 116, 109, 112, 47, 116, 105, 108,
101, 100, 98, 45, 114, 101, 115, 116,
46, 99, 97, 112, 110, 112, 58, 70,
105, 108, 116, 101, 114, 80, 105, 112,
101, 108, 105, 110, 101, 0, 0, 0,
0, 0, 0, 0, 1, 0, 1, 0,
4, 0, 0, 0, 3, 0, 4, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
13, 0, 0, 0, 66, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
8, 0, 0, 0, 3, 0, 1, 0,
36, 0, 0, 0, 2, 0, 1, 0,
102, 105, 108, 116, 101, 114, 115, 0,
14, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 3, 0, 1, 0,
16, 0, 0, 0, 0, 0, 0, 0,
151, 63, 91, 65, 71, 80, 23, 231,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
14, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, }
};
::capnp::word const* const bp_bc4583f733eac4f5 = b_bc4583f733eac4f5.words;
#if !CAPNP_LITE
static const ::capnp::_::RawSchema* const d_bc4583f733eac4f5[] = {
&s_e7175047415b3f97,
};
static const uint16_t m_bc4583f733eac4f5[] = {0};
static const uint16_t i_bc4583f733eac4f5[] = {0};
const ::capnp::_::RawSchema s_bc4583f733eac4f5 = {
0xbc4583f733eac4f5, b_bc4583f733eac4f5.words, 38, d_bc4583f733eac4f5, m_bc4583f733eac4f5,
1, 1, i_bc4583f733eac4f5, nullptr, nullptr, { &s_bc4583f733eac4f5, nullptr, nullptr, 0, 0, nullptr }
};
#endif // !CAPNP_LITE
static const ::capnp::_::AlignedData<50> b_f179c194ae71718c = {
{ 0, 0, 0, 0, 5, 0, 6, 0,
140, 113, 113, 174, 148, 193, 121, 241,
23, 0, 0, 0, 1, 0, 0, 0,
127, 216, 135, 181, 36, 146, 125, 181,
1, 0, 7, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1, 0, 0, 0,
21, 0, 0, 0, 218, 0, 0, 0,
33, 0, 0, 0, 23, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
41, 0, 0, 0, 63, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
133, 0, 0, 0, 23, 0, 0, 0,
47, 116, 109, 112, 47, 116, 105, 108,
101, 100, 98, 45, 114, 101, 115, 116,
46, 99, 97, 112, 110, 112, 58, 77,
97, 112, 0, 0, 0, 0, 0, 0,
4, 0, 0, 0, 1, 0, 1, 0,
234, 250, 246, 170, 200, 20, 85, 219,
1, 0, 0, 0, 50, 0, 0, 0,
69, 110, 116, 114, 121, 0, 0, 0,
4, 0, 0, 0, 3, 0, 4, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
13, 0, 0, 0, 66, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
8, 0, 0, 0, 3, 0, 1, 0,
56, 0, 0, 0, 2, 0, 1, 0,
101, 110, 116, 114, 105, 101, 115, 0,
14, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 3, 0, 1, 0,
16, 0, 0, 0, 0, 0, 0, 0,
234, 250, 246, 170, 200, 20, 85, 219,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 1, 0,
1, 0, 0, 0, 31, 0, 0, 0,
4, 0, 0, 0, 2, 0, 1, 0,
140, 113, 113, 174, 148, 193, 121, 241,
1, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
14, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
8, 0, 0, 0, 0, 0, 1, 0,
5, 0, 0, 0, 34, 0, 0, 0,
5, 0, 0, 0, 50, 0, 0, 0,
75, 101, 121, 0, 0, 0, 0, 0,
86, 97, 108, 117, 101, 0, 0, 0, }
};
::capnp::word const* const bp_f179c194ae71718c = b_f179c194ae71718c.words;
#if !CAPNP_LITE
static const ::capnp::_::RawSchema* const d_f179c194ae71718c[] = {
&s_db5514c8aaf6faea,
};
static const uint16_t m_f179c194ae71718c[] = {0};
static const uint16_t i_f179c194ae71718c[] = {0};
KJ_CONSTEXPR(const) ::capnp::_::RawBrandedSchema::Dependency bd_f179c194ae71718c[] = {
{ 16777216, ::tiledb::sm::serialization::capnp::Map< ::capnp::AnyPointer, ::capnp::AnyPointer>::Entry::_capnpPrivate::brand() },
};
const ::capnp::_::RawSchema s_f179c194ae71718c = {
0xf179c194ae71718c, b_f179c194ae71718c.words, 50, d_f179c194ae71718c, m_f179c194ae71718c,
1, 1, i_f179c194ae71718c, nullptr, nullptr, { &s_f179c194ae71718c, nullptr, bd_f179c194ae71718c, 0, sizeof(bd_f179c194ae71718c) / sizeof(bd_f179c194ae71718c[0]), nullptr }
};
#endif // !CAPNP_LITE
static const ::capnp::_::AlignedData<49> b_db5514c8aaf6faea = {
{ 0, 0, 0, 0, 5, 0, 6, 0,
234, 250, 246, 170, 200, 20, 85, 219,
27, 0, 0, 0, 1, 0, 0, 0,
140, 113, 113, 174, 148, 193, 121, 241,
2, 0, 7, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1, 0, 0, 0,
21, 0, 0, 0, 10, 1, 0, 0,
37, 0, 0, 0, 7, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
33, 0, 0, 0, 119, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
47, 116, 109, 112, 47, 116, 105, 108,
101, 100, 98, 45, 114, 101, 115, 116,
46, 99, 97, 112, 110, 112, 58, 77,
97, 112, 46, 69, 110, 116, 114, 121,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1, 0, 1, 0,
8, 0, 0, 0, 3, 0, 4, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
41, 0, 0, 0, 34, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
36, 0, 0, 0, 3, 0, 1, 0,
48, 0, 0, 0, 2, 0, 1, 0,
1, 0, 0, 0, 1, 0, 0, 0,
0, 0, 1, 0, 1, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
45, 0, 0, 0, 50, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
40, 0, 0, 0, 3, 0, 1, 0,
52, 0, 0, 0, 2, 0, 1, 0,
107, 101, 121, 0, 0, 0, 0, 0,
18, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0, 0, 0,
140, 113, 113, 174, 148, 193, 121, 241,
0, 0, 0, 0, 0, 0, 0, 0,
18, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
118, 97, 108, 117, 101, 0, 0, 0,
18, 0, 0, 0, 0, 0, 0, 0,
1, 0, 1, 0, 0, 0, 0, 0,
140, 113, 113, 174, 148, 193, 121, 241,
0, 0, 0, 0, 0, 0, 0, 0,
18, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, }
};
::capnp::word const* const bp_db5514c8aaf6faea = b_db5514c8aaf6faea.words;
#if !CAPNP_LITE
static const uint16_t m_db5514c8aaf6faea[] = {0, 1};
static const uint16_t i_db5514c8aaf6faea[] = {0, 1};
const ::capnp::_::RawSchema s_db5514c8aaf6faea = {
0xdb5514c8aaf6faea, b_db5514c8aaf6faea.words, 49, nullptr, m_db5514c8aaf6faea,
0, 2, i_db5514c8aaf6faea, nullptr, nullptr, { &s_db5514c8aaf6faea, nullptr, nullptr, 0, 0, nullptr }
};
#endif // !CAPNP_LITE
static const ::capnp::_::AlignedData<41> b_c6b5bb09d4611252 = {
{ 0, 0, 0, 0, 5, 0, 6, 0,
82, 18, 97, 212, 9, 187, 181, 198,
23, 0, 0, 0, 1, 0, 0, 0,
127, 216, 135, 181, 36, 146, 125, 181,
1, 0, 7, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
21, 0, 0, 0, 10, 1, 0, 0,
37, 0, 0, 0, 23, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
45, 0, 0, 0, 63, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
47, 116, 109, 112, 47, 116, 105, 108,
101, 100, 98, 45, 114, 101, 115, 116,
46, 99, 97, 112, 110, 112, 58, 77,
97, 112, 85, 73, 110, 116, 51, 50,
0, 0, 0, 0, 0, 0, 0, 0,
4, 0, 0, 0, 1, 0, 1, 0,
198, 165, 33, 37, 95, 10, 78, 136,
1, 0, 0, 0, 50, 0, 0, 0,
69, 110, 116, 114, 121, 0, 0, 0,
4, 0, 0, 0, 3, 0, 4, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
13, 0, 0, 0, 66, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
8, 0, 0, 0, 3, 0, 1, 0,
36, 0, 0, 0, 2, 0, 1, 0,
101, 110, 116, 114, 105, 101, 115, 0,
14, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 3, 0, 1, 0,
16, 0, 0, 0, 0, 0, 0, 0,
198, 165, 33, 37, 95, 10, 78, 136,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
14, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, }
};
::capnp::word const* const bp_c6b5bb09d4611252 = b_c6b5bb09d4611252.words;
#if !CAPNP_LITE
static const ::capnp::_::RawSchema* const d_c6b5bb09d4611252[] = {
&s_884e0a5f2521a5c6,
};
static const uint16_t m_c6b5bb09d4611252[] = {0};
static const uint16_t i_c6b5bb09d4611252[] = {0};
const ::capnp::_::RawSchema s_c6b5bb09d4611252 = {
0xc6b5bb09d4611252, b_c6b5bb09d4611252.words, 41, d_c6b5bb09d4611252, m_c6b5bb09d4611252,
1, 1, i_c6b5bb09d4611252, nullptr, nullptr, { &s_c6b5bb09d4611252, nullptr, nullptr, 0, 0, nullptr }
};
#endif // !CAPNP_LITE
static const ::capnp::_::AlignedData<49> b_884e0a5f2521a5c6 = {
{ 0, 0, 0, 0, 5, 0, 6, 0,
198, 165, 33, 37, 95, 10, 78, 136,
33, 0, 0, 0, 1, 0, 1, 0,
82, 18, 97, 212, 9, 187, 181, 198,
1, 0, 7, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
21, 0, 0, 0, 58, 1, 0, 0,
37, 0, 0, 0, 7, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
33, 0, 0, 0, 119, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
47, 116, 109, 112, 47, 116, 105, 108,
101, 100, 98, 45, 114, 101, 115, 116,
46, 99, 97, 112, 110, 112, 58, 77,
97, 112, 85, 73, 110, 116, 51, 50,
46, 69, 110, 116, 114, 121, 0, 0,
0, 0, 0, 0, 1, 0, 1, 0,
8, 0, 0, 0, 3, 0, 4, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
41, 0, 0, 0, 34, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
36, 0, 0, 0, 3, 0, 1, 0,
48, 0, 0, 0, 2, 0, 1, 0,
1, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 1, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
45, 0, 0, 0, 50, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
40, 0, 0, 0, 3, 0, 1, 0,
52, 0, 0, 0, 2, 0, 1, 0,
107, 101, 121, 0, 0, 0, 0, 0,
12, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
12, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
118, 97, 108, 117, 101, 0, 0, 0,
8, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
8, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, }
};
::capnp::word const* const bp_884e0a5f2521a5c6 = b_884e0a5f2521a5c6.words;
#if !CAPNP_LITE
static const uint16_t m_884e0a5f2521a5c6[] = {0, 1};
static const uint16_t i_884e0a5f2521a5c6[] = {0, 1};
const ::capnp::_::RawSchema s_884e0a5f2521a5c6 = {
0x884e0a5f2521a5c6, b_884e0a5f2521a5c6.words, 49, nullptr, m_884e0a5f2521a5c6,
0, 2, i_884e0a5f2521a5c6, nullptr, nullptr, { &s_884e0a5f2521a5c6, nullptr, nullptr, 0, 0, nullptr }
};
#endif // !CAPNP_LITE
static const ::capnp::_::AlignedData<40> b_a83707d3ba24dd32 = {
{ 0, 0, 0, 0, 5, 0, 6, 0,
50, 221, 36, 186, 211, 7, 55, 168,
23, 0, 0, 0, 1, 0, 0, 0,
127, 216, 135, 181, 36, 146, 125, 181,
1, 0, 7, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
21, 0, 0, 0, 2, 1, 0, 0,
33, 0, 0, 0, 23, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
41, 0, 0, 0, 63, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
47, 116, 109, 112, 47, 116, 105, 108,
101, 100, 98, 45, 114, 101, 115, 116,
46, 99, 97, 112, 110, 112, 58, 77,
97, 112, 73, 110, 116, 54, 52, 0,
4, 0, 0, 0, 1, 0, 1, 0,
175, 43, 58, 51, 180, 204, 202, 169,
1, 0, 0, 0, 50, 0, 0, 0,
69, 110, 116, 114, 121, 0, 0, 0,
4, 0, 0, 0, 3, 0, 4, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
13, 0, 0, 0, 66, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
8, 0, 0, 0, 3, 0, 1, 0,
36, 0, 0, 0, 2, 0, 1, 0,
101, 110, 116, 114, 105, 101, 115, 0,
14, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 3, 0, 1, 0,
16, 0, 0, 0, 0, 0, 0, 0,
175, 43, 58, 51, 180, 204, 202, 169,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
14, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, }
};
::capnp::word const* const bp_a83707d3ba24dd32 = b_a83707d3ba24dd32.words;
#if !CAPNP_LITE
static const ::capnp::_::RawSchema* const d_a83707d3ba24dd32[] = {
&s_a9caccb4333a2baf,
};
static const uint16_t m_a83707d3ba24dd32[] = {0};
static const uint16_t i_a83707d3ba24dd32[] = {0};
const ::capnp::_::RawSchema s_a83707d3ba24dd32 = {
0xa83707d3ba24dd32, b_a83707d3ba24dd32.words, 40, d_a83707d3ba24dd32, m_a83707d3ba24dd32,
1, 1, i_a83707d3ba24dd32, nullptr, nullptr, { &s_a83707d3ba24dd32, nullptr, nullptr, 0, 0, nullptr }
};
#endif // !CAPNP_LITE
static const ::capnp::_::AlignedData<49> b_a9caccb4333a2baf = {
{ 0, 0, 0, 0, 5, 0, 6, 0,
175, 43, 58, 51, 180, 204, 202, 169,
32, 0, 0, 0, 1, 0, 1, 0,
50, 221, 36, 186, 211, 7, 55, 168,
1, 0, 7, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
21, 0, 0, 0, 50, 1, 0, 0,
37, 0, 0, 0, 7, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
33, 0, 0, 0, 119, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
47, 116, 109, 112, 47, 116, 105, 108,
101, 100, 98, 45, 114, 101, 115, 116,
46, 99, 97, 112, 110, 112, 58, 77,
97, 112, 73, 110, 116, 54, 52, 46,
69, 110, 116, 114, 121, 0, 0, 0,
0, 0, 0, 0, 1, 0, 1, 0,
8, 0, 0, 0, 3, 0, 4, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
41, 0, 0, 0, 34, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
36, 0, 0, 0, 3, 0, 1, 0,
48, 0, 0, 0, 2, 0, 1, 0,
1, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 1, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
45, 0, 0, 0, 50, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
40, 0, 0, 0, 3, 0, 1, 0,
52, 0, 0, 0, 2, 0, 1, 0,
107, 101, 121, 0, 0, 0, 0, 0,
12, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
12, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
118, 97, 108, 117, 101, 0, 0, 0,
5, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
5, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, }
};
::capnp::word const* const bp_a9caccb4333a2baf = b_a9caccb4333a2baf.words;
#if !CAPNP_LITE
static const uint16_t m_a9caccb4333a2baf[] = {0, 1};
static const uint16_t i_a9caccb4333a2baf[] = {0, 1};
const ::capnp::_::RawSchema s_a9caccb4333a2baf = {
0xa9caccb4333a2baf, b_a9caccb4333a2baf.words, 49, nullptr, m_a9caccb4333a2baf,
0, 2, i_a9caccb4333a2baf, nullptr, nullptr, { &s_a9caccb4333a2baf, nullptr, nullptr, 0, 0, nullptr }
};
#endif // !CAPNP_LITE
static const ::capnp::_::AlignedData<82> b_8ba60147a0e6735e = {
{ 0, 0, 0, 0, 5, 0, 6, 0,
94, 115, 230, 160, 71, 1, 166, 139,
23, 0, 0, 0, 1, 0, 1, 0,
127, 216, 135, 181, 36, 146, 125, 181,
1, 0, 7, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
21, 0, 0, 0, 242, 0, 0, 0,
33, 0, 0, 0, 7, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
29, 0, 0, 0, 231, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
47, 116, 109, 112, 47, 116, 105, 108,
101, 100, 98, 45, 114, 101, 115, 116,
46, 99, 97, 112, 110, 112, 58, 87,
114, 105, 116, 101, 114, 0, 0, 0,
0, 0, 0, 0, 1, 0, 1, 0,
16, 0, 0, 0, 3, 0, 4, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
97, 0, 0, 0, 122, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
96, 0, 0, 0, 3, 0, 1, 0,
108, 0, 0, 0, 2, 0, 1, 0,
1, 0, 0, 0, 1, 0, 0, 0,
0, 0, 1, 0, 1, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
105, 0, 0, 0, 114, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
104, 0, 0, 0, 3, 0, 1, 0,
116, 0, 0, 0, 2, 0, 1, 0,
2, 0, 0, 0, 2, 0, 0, 0,
0, 0, 1, 0, 2, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
113, 0, 0, 0, 98, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
112, 0, 0, 0, 3, 0, 1, 0,
124, 0, 0, 0, 2, 0, 1, 0,
3, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 3, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
121, 0, 0, 0, 74, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
120, 0, 0, 0, 3, 0, 1, 0,
132, 0, 0, 0, 2, 0, 1, 0,
99, 104, 101, 99, 107, 67, 111, 111,
114, 100, 68, 117, 112, 115, 0, 0,
1, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
99, 104, 101, 99, 107, 67, 111, 111,
114, 100, 79, 79, 66, 0, 0, 0,
1, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
100, 101, 100, 117, 112, 67, 111, 111,
114, 100, 115, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
115, 117, 98, 97, 114, 114, 97, 121,
0, 0, 0, 0, 0, 0, 0, 0,
16, 0, 0, 0, 0, 0, 0, 0,
236, 12, 65, 249, 230, 4, 89, 206,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
16, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, }
};
::capnp::word const* const bp_8ba60147a0e6735e = b_8ba60147a0e6735e.words;
#if !CAPNP_LITE
static const ::capnp::_::RawSchema* const d_8ba60147a0e6735e[] = {
&s_ce5904e6f9410cec,
};
static const uint16_t m_8ba60147a0e6735e[] = {0, 1, 2, 3};
static const uint16_t i_8ba60147a0e6735e[] = {0, 1, 2, 3};
const ::capnp::_::RawSchema s_8ba60147a0e6735e = {
0x8ba60147a0e6735e, b_8ba60147a0e6735e.words, 82, d_8ba60147a0e6735e, m_8ba60147a0e6735e,
1, 4, i_8ba60147a0e6735e, nullptr, nullptr, { &s_8ba60147a0e6735e, nullptr, nullptr, 0, 0, nullptr }
};
#endif // !CAPNP_LITE
static const ::capnp::_::AlignedData<65> b_86cfc12d74ed4aa0 = {
{ 0, 0, 0, 0, 5, 0, 6, 0,
160, 74, 237, 116, 45, 193, 207, 134,
23, 0, 0, 0, 1, 0, 1, 0,
127, 216, 135, 181, 36, 146, 125, 181,
2, 0, 7, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
21, 0, 0, 0, 50, 1, 0, 0,
37, 0, 0, 0, 7, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
33, 0, 0, 0, 175, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
47, 116, 109, 112, 47, 116, 105, 108,
101, 100, 98, 45, 114, 101, 115, 116,
46, 99, 97, 112, 110, 112, 58, 83,
117, 98, 97, 114, 114, 97, 121, 82,
97, 110, 103, 101, 115, 0, 0, 0,
0, 0, 0, 0, 1, 0, 1, 0,
12, 0, 0, 0, 3, 0, 4, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
69, 0, 0, 0, 42, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
64, 0, 0, 0, 3, 0, 1, 0,
76, 0, 0, 0, 2, 0, 1, 0,
1, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 1, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
73, 0, 0, 0, 130, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
72, 0, 0, 0, 3, 0, 1, 0,
84, 0, 0, 0, 2, 0, 1, 0,
2, 0, 0, 0, 1, 0, 0, 0,
0, 0, 1, 0, 2, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
81, 0, 0, 0, 58, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
76, 0, 0, 0, 3, 0, 1, 0,
88, 0, 0, 0, 2, 0, 1, 0,
116, 121, 112, 101, 0, 0, 0, 0,
12, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
12, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
104, 97, 115, 68, 101, 102, 97, 117,
108, 116, 82, 97, 110, 103, 101, 0,
1, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
98, 117, 102, 102, 101, 114, 0, 0,
13, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
13, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, }
};
::capnp::word const* const bp_86cfc12d74ed4aa0 = b_86cfc12d74ed4aa0.words;
#if !CAPNP_LITE
static const uint16_t m_86cfc12d74ed4aa0[] = {2, 1, 0};
static const uint16_t i_86cfc12d74ed4aa0[] = {0, 1, 2};
const ::capnp::_::RawSchema s_86cfc12d74ed4aa0 = {
0x86cfc12d74ed4aa0, b_86cfc12d74ed4aa0.words, 65, nullptr, m_86cfc12d74ed4aa0,
0, 3, i_86cfc12d74ed4aa0, nullptr, nullptr, { &s_86cfc12d74ed4aa0, nullptr, nullptr, 0, 0, nullptr }
};
#endif // !CAPNP_LITE
static const ::capnp::_::AlignedData<52> b_dba20dec138adac9 = {
{ 0, 0, 0, 0, 5, 0, 6, 0,
201, 218, 138, 19, 236, 13, 162, 219,
23, 0, 0, 0, 1, 0, 0, 0,
127, 216, 135, 181, 36, 146, 125, 181,
2, 0, 7, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
21, 0, 0, 0, 2, 1, 0, 0,
33, 0, 0, 0, 7, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
29, 0, 0, 0, 119, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
47, 116, 109, 112, 47, 116, 105, 108,
101, 100, 98, 45, 114, 101, 115, 116,
46, 99, 97, 112, 110, 112, 58, 83,
117, 98, 97, 114, 114, 97, 121, 0,
0, 0, 0, 0, 1, 0, 1, 0,
8, 0, 0, 0, 3, 0, 4, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
41, 0, 0, 0, 58, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
36, 0, 0, 0, 3, 0, 1, 0,
48, 0, 0, 0, 2, 0, 1, 0,
1, 0, 0, 0, 1, 0, 0, 0,
0, 0, 1, 0, 1, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
45, 0, 0, 0, 58, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
40, 0, 0, 0, 3, 0, 1, 0,
68, 0, 0, 0, 2, 0, 1, 0,
108, 97, 121, 111, 117, 116, 0, 0,
12, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
12, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
114, 97, 110, 103, 101, 115, 0, 0,
14, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 3, 0, 1, 0,
16, 0, 0, 0, 0, 0, 0, 0,
160, 74, 237, 116, 45, 193, 207, 134,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
14, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, }
};
::capnp::word const* const bp_dba20dec138adac9 = b_dba20dec138adac9.words;
#if !CAPNP_LITE
static const ::capnp::_::RawSchema* const d_dba20dec138adac9[] = {
&s_86cfc12d74ed4aa0,
};
static const uint16_t m_dba20dec138adac9[] = {0, 1};
static const uint16_t i_dba20dec138adac9[] = {0, 1};
const ::capnp::_::RawSchema s_dba20dec138adac9 = {
0xdba20dec138adac9, b_dba20dec138adac9.words, 52, d_dba20dec138adac9, m_dba20dec138adac9,
1, 2, i_dba20dec138adac9, nullptr, nullptr, { &s_dba20dec138adac9, nullptr, nullptr, 0, 0, nullptr }
};
#endif // !CAPNP_LITE
static const ::capnp::_::AlignedData<124> b_ff14003c70494585 = {
{ 0, 0, 0, 0, 5, 0, 6, 0,
133, 69, 73, 112, 60, 0, 20, 255,
23, 0, 0, 0, 1, 0, 2, 0,
127, 216, 135, 181, 36, 146, 125, 181,
4, 0, 7, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
21, 0, 0, 0, 90, 1, 0, 0,
41, 0, 0, 0, 39, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
65, 0, 0, 0, 87, 1, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
47, 116, 109, 112, 47, 116, 105, 108,
101, 100, 98, 45, 114, 101, 115, 116,
46, 99, 97, 112, 110, 112, 58, 83,
117, 98, 97, 114, 114, 97, 121, 80,
97, 114, 116, 105, 116, 105, 111, 110,
101, 114, 0, 0, 0, 0, 0, 0,
8, 0, 0, 0, 1, 0, 1, 0,
15, 37, 35, 120, 249, 123, 107, 248,
9, 0, 0, 0, 114, 0, 0, 0,
33, 66, 114, 136, 114, 228, 217, 253,
9, 0, 0, 0, 50, 0, 0, 0,
80, 97, 114, 116, 105, 116, 105, 111,
110, 73, 110, 102, 111, 0, 0, 0,
83, 116, 97, 116, 101, 0, 0, 0,
24, 0, 0, 0, 3, 0, 4, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
153, 0, 0, 0, 74, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
152, 0, 0, 0, 3, 0, 1, 0,
164, 0, 0, 0, 2, 0, 1, 0,
1, 0, 0, 0, 1, 0, 0, 0,
0, 0, 1, 0, 1, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
161, 0, 0, 0, 58, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
156, 0, 0, 0, 3, 0, 1, 0,
184, 0, 0, 0, 2, 0, 1, 0,
2, 0, 0, 0, 2, 0, 0, 0,
0, 0, 1, 0, 2, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
181, 0, 0, 0, 66, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
176, 0, 0, 0, 3, 0, 1, 0,
188, 0, 0, 0, 2, 0, 1, 0,
3, 0, 0, 0, 3, 0, 0, 0,
0, 0, 1, 0, 3, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
185, 0, 0, 0, 50, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
180, 0, 0, 0, 3, 0, 1, 0,
192, 0, 0, 0, 2, 0, 1, 0,
4, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 4, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
189, 0, 0, 0, 106, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
188, 0, 0, 0, 3, 0, 1, 0,
200, 0, 0, 0, 2, 0, 1, 0,
5, 0, 0, 0, 1, 0, 0, 0,
0, 0, 1, 0, 5, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
197, 0, 0, 0, 130, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
196, 0, 0, 0, 3, 0, 1, 0,
208, 0, 0, 0, 2, 0, 1, 0,
115, 117, 98, 97, 114, 114, 97, 121,
0, 0, 0, 0, 0, 0, 0, 0,
16, 0, 0, 0, 0, 0, 0, 0,
201, 218, 138, 19, 236, 13, 162, 219,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
16, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
98, 117, 100, 103, 101, 116, 0, 0,
14, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 3, 0, 1, 0,
16, 0, 0, 0, 0, 0, 0, 0,
45, 205, 230, 7, 27, 146, 225, 155,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
14, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
99, 117, 114, 114, 101, 110, 116, 0,
16, 0, 0, 0, 0, 0, 0, 0,
15, 37, 35, 120, 249, 123, 107, 248,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
16, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
115, 116, 97, 116, 101, 0, 0, 0,
16, 0, 0, 0, 0, 0, 0, 0,
33, 66, 114, 136, 114, 228, 217, 253,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
16, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
109, 101, 109, 111, 114, 121, 66, 117,
100, 103, 101, 116, 0, 0, 0, 0,
9, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
9, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
109, 101, 109, 111, 114, 121, 66, 117,
100, 103, 101, 116, 86, 97, 114, 0,
9, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
9, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, }
};
::capnp::word const* const bp_ff14003c70494585 = b_ff14003c70494585.words;
#if !CAPNP_LITE
static const ::capnp::_::RawSchema* const d_ff14003c70494585[] = {
&s_9be1921b07e6cd2d,
&s_dba20dec138adac9,
&s_f86b7bf97823250f,
&s_fdd9e47288724221,
};
static const uint16_t m_ff14003c70494585[] = {1, 2, 4, 5, 3, 0};
static const uint16_t i_ff14003c70494585[] = {0, 1, 2, 3, 4, 5};
const ::capnp::_::RawSchema s_ff14003c70494585 = {
0xff14003c70494585, b_ff14003c70494585.words, 124, d_ff14003c70494585, m_ff14003c70494585,
4, 6, i_ff14003c70494585, nullptr, nullptr, { &s_ff14003c70494585, nullptr, nullptr, 0, 0, nullptr }
};
#endif // !CAPNP_LITE
static const ::capnp::_::AlignedData<84> b_f86b7bf97823250f = {
{ 0, 0, 0, 0, 5, 0, 6, 0,
15, 37, 35, 120, 249, 123, 107, 248,
43, 0, 0, 0, 1, 0, 3, 0,
133, 69, 73, 112, 60, 0, 20, 255,
1, 0, 7, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
21, 0, 0, 0, 202, 1, 0, 0,
49, 0, 0, 0, 7, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
45, 0, 0, 0, 231, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
47, 116, 109, 112, 47, 116, 105, 108,
101, 100, 98, 45, 114, 101, 115, 116,
46, 99, 97, 112, 110, 112, 58, 83,
117, 98, 97, 114, 114, 97, 121, 80,
97, 114, 116, 105, 116, 105, 111, 110,
101, 114, 46, 80, 97, 114, 116, 105,
116, 105, 111, 110, 73, 110, 102, 111,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1, 0, 1, 0,
16, 0, 0, 0, 3, 0, 4, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
97, 0, 0, 0, 74, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
96, 0, 0, 0, 3, 0, 1, 0,
108, 0, 0, 0, 2, 0, 1, 0,
1, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 1, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
105, 0, 0, 0, 50, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
100, 0, 0, 0, 3, 0, 1, 0,
112, 0, 0, 0, 2, 0, 1, 0,
2, 0, 0, 0, 1, 0, 0, 0,
0, 0, 1, 0, 2, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
109, 0, 0, 0, 34, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
104, 0, 0, 0, 3, 0, 1, 0,
116, 0, 0, 0, 2, 0, 1, 0,
3, 0, 0, 0, 128, 0, 0, 0,
0, 0, 1, 0, 3, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
113, 0, 0, 0, 130, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
112, 0, 0, 0, 3, 0, 1, 0,
124, 0, 0, 0, 2, 0, 1, 0,
115, 117, 98, 97, 114, 114, 97, 121,
0, 0, 0, 0, 0, 0, 0, 0,
16, 0, 0, 0, 0, 0, 0, 0,
201, 218, 138, 19, 236, 13, 162, 219,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
16, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
115, 116, 97, 114, 116, 0, 0, 0,
9, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
9, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
101, 110, 100, 0, 0, 0, 0, 0,
9, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
9, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
115, 112, 108, 105, 116, 77, 117, 108,
116, 105, 82, 97, 110, 103, 101, 0,
1, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, }
};
::capnp::word const* const bp_f86b7bf97823250f = b_f86b7bf97823250f.words;
#if !CAPNP_LITE
static const ::capnp::_::RawSchema* const d_f86b7bf97823250f[] = {
&s_dba20dec138adac9,
};
static const uint16_t m_f86b7bf97823250f[] = {2, 3, 1, 0};
static const uint16_t i_f86b7bf97823250f[] = {0, 1, 2, 3};
const ::capnp::_::RawSchema s_f86b7bf97823250f = {
0xf86b7bf97823250f, b_f86b7bf97823250f.words, 84, d_f86b7bf97823250f, m_f86b7bf97823250f,
1, 4, i_f86b7bf97823250f, nullptr, nullptr, { &s_f86b7bf97823250f, nullptr, nullptr, 0, 0, nullptr }
};
#endif // !CAPNP_LITE
static const ::capnp::_::AlignedData<91> b_fdd9e47288724221 = {
{ 0, 0, 0, 0, 5, 0, 6, 0,
33, 66, 114, 136, 114, 228, 217, 253,
43, 0, 0, 0, 1, 0, 2, 0,
133, 69, 73, 112, 60, 0, 20, 255,
2, 0, 7, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
21, 0, 0, 0, 138, 1, 0, 0,
45, 0, 0, 0, 7, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
41, 0, 0, 0, 231, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
47, 116, 109, 112, 47, 116, 105, 108,
101, 100, 98, 45, 114, 101, 115, 116,
46, 99, 97, 112, 110, 112, 58, 83,
117, 98, 97, 114, 114, 97, 121, 80,
97, 114, 116, 105, 116, 105, 111, 110,
101, 114, 46, 83, 116, 97, 116, 101,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1, 0, 1, 0,
16, 0, 0, 0, 3, 0, 4, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
97, 0, 0, 0, 50, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
92, 0, 0, 0, 3, 0, 1, 0,
104, 0, 0, 0, 2, 0, 1, 0,
1, 0, 0, 0, 1, 0, 0, 0,
0, 0, 1, 0, 1, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
101, 0, 0, 0, 34, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
96, 0, 0, 0, 3, 0, 1, 0,
108, 0, 0, 0, 2, 0, 1, 0,
2, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 2, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
105, 0, 0, 0, 98, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
104, 0, 0, 0, 3, 0, 1, 0,
132, 0, 0, 0, 2, 0, 1, 0,
3, 0, 0, 0, 1, 0, 0, 0,
0, 0, 1, 0, 3, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
129, 0, 0, 0, 90, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
128, 0, 0, 0, 3, 0, 1, 0,
156, 0, 0, 0, 2, 0, 1, 0,
115, 116, 97, 114, 116, 0, 0, 0,
9, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
9, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
101, 110, 100, 0, 0, 0, 0, 0,
9, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
9, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
115, 105, 110, 103, 108, 101, 82, 97,
110, 103, 101, 0, 0, 0, 0, 0,
14, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 3, 0, 1, 0,
16, 0, 0, 0, 0, 0, 0, 0,
201, 218, 138, 19, 236, 13, 162, 219,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
14, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
109, 117, 108, 116, 105, 82, 97, 110,
103, 101, 0, 0, 0, 0, 0, 0,
14, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 3, 0, 1, 0,
16, 0, 0, 0, 0, 0, 0, 0,
201, 218, 138, 19, 236, 13, 162, 219,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
14, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, }
};
::capnp::word const* const bp_fdd9e47288724221 = b_fdd9e47288724221.words;
#if !CAPNP_LITE
static const ::capnp::_::RawSchema* const d_fdd9e47288724221[] = {
&s_dba20dec138adac9,
};
static const uint16_t m_fdd9e47288724221[] = {1, 3, 2, 0};
static const uint16_t i_fdd9e47288724221[] = {0, 1, 2, 3};
const ::capnp::_::RawSchema s_fdd9e47288724221 = {
0xfdd9e47288724221, b_fdd9e47288724221.words, 91, d_fdd9e47288724221, m_fdd9e47288724221,
1, 4, i_fdd9e47288724221, nullptr, nullptr, { &s_fdd9e47288724221, nullptr, nullptr, 0, 0, nullptr }
};
#endif // !CAPNP_LITE
static const ::capnp::_::AlignedData<84> b_cbe1e7c13508aa2c = {
{ 0, 0, 0, 0, 5, 0, 6, 0,
44, 170, 8, 53, 193, 231, 225, 203,
23, 0, 0, 0, 1, 0, 1, 0,
127, 216, 135, 181, 36, 146, 125, 181,
1, 0, 7, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
21, 0, 0, 0, 10, 1, 0, 0,
37, 0, 0, 0, 7, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
33, 0, 0, 0, 231, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
47, 116, 109, 112, 47, 116, 105, 108,
101, 100, 98, 45, 114, 101, 115, 116,
46, 99, 97, 112, 110, 112, 58, 82,
101, 97, 100, 83, 116, 97, 116, 101,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1, 0, 1, 0,
16, 0, 0, 0, 3, 0, 4, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
97, 0, 0, 0, 90, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
96, 0, 0, 0, 3, 0, 1, 0,
108, 0, 0, 0, 2, 0, 1, 0,
1, 0, 0, 0, 1, 0, 0, 0,
0, 0, 1, 0, 1, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
105, 0, 0, 0, 106, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
104, 0, 0, 0, 3, 0, 1, 0,
116, 0, 0, 0, 2, 0, 1, 0,
2, 0, 0, 0, 2, 0, 0, 0,
0, 0, 1, 0, 2, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
113, 0, 0, 0, 98, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
112, 0, 0, 0, 3, 0, 1, 0,
124, 0, 0, 0, 2, 0, 1, 0,
3, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 3, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
121, 0, 0, 0, 162, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
124, 0, 0, 0, 3, 0, 1, 0,
136, 0, 0, 0, 2, 0, 1, 0,
111, 118, 101, 114, 102, 108, 111, 119,
101, 100, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
117, 110, 115, 112, 108, 105, 116, 116,
97, 98, 108, 101, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
105, 110, 105, 116, 105, 97, 108, 105,
122, 101, 100, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
115, 117, 98, 97, 114, 114, 97, 121,
80, 97, 114, 116, 105, 116, 105, 111,
110, 101, 114, 0, 0, 0, 0, 0,
16, 0, 0, 0, 0, 0, 0, 0,
133, 69, 73, 112, 60, 0, 20, 255,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
16, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, }
};
::capnp::word const* const bp_cbe1e7c13508aa2c = b_cbe1e7c13508aa2c.words;
#if !CAPNP_LITE
static const ::capnp::_::RawSchema* const d_cbe1e7c13508aa2c[] = {
&s_ff14003c70494585,
};
static const uint16_t m_cbe1e7c13508aa2c[] = {2, 0, 3, 1};
static const uint16_t i_cbe1e7c13508aa2c[] = {0, 1, 2, 3};
const ::capnp::_::RawSchema s_cbe1e7c13508aa2c = {
0xcbe1e7c13508aa2c, b_cbe1e7c13508aa2c.words, 84, d_cbe1e7c13508aa2c, m_cbe1e7c13508aa2c,
1, 4, i_cbe1e7c13508aa2c, nullptr, nullptr, { &s_cbe1e7c13508aa2c, nullptr, nullptr, 0, 0, nullptr }
};
#endif // !CAPNP_LITE
static const ::capnp::_::AlignedData<66> b_e19754f813ccf79c = {
{ 0, 0, 0, 0, 5, 0, 6, 0,
156, 247, 204, 19, 248, 84, 151, 225,
23, 0, 0, 0, 1, 0, 0, 0,
127, 216, 135, 181, 36, 146, 125, 181,
3, 0, 7, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
21, 0, 0, 0, 26, 1, 0, 0,
37, 0, 0, 0, 7, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
33, 0, 0, 0, 175, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
47, 116, 109, 112, 47, 116, 105, 108,
101, 100, 98, 45, 114, 101, 115, 116,
46, 99, 97, 112, 110, 112, 58, 81,
117, 101, 114, 121, 82, 101, 97, 100,
101, 114, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1, 0, 1, 0,
12, 0, 0, 0, 3, 0, 4, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
69, 0, 0, 0, 58, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
64, 0, 0, 0, 3, 0, 1, 0,
76, 0, 0, 0, 2, 0, 1, 0,
1, 0, 0, 0, 1, 0, 0, 0,
0, 0, 1, 0, 1, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
73, 0, 0, 0, 74, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
72, 0, 0, 0, 3, 0, 1, 0,
84, 0, 0, 0, 2, 0, 1, 0,
2, 0, 0, 0, 2, 0, 0, 0,
0, 0, 1, 0, 2, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
81, 0, 0, 0, 82, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
80, 0, 0, 0, 3, 0, 1, 0,
92, 0, 0, 0, 2, 0, 1, 0,
108, 97, 121, 111, 117, 116, 0, 0,
12, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
12, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
115, 117, 98, 97, 114, 114, 97, 121,
0, 0, 0, 0, 0, 0, 0, 0,
16, 0, 0, 0, 0, 0, 0, 0,
201, 218, 138, 19, 236, 13, 162, 219,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
16, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
114, 101, 97, 100, 83, 116, 97, 116,
101, 0, 0, 0, 0, 0, 0, 0,
16, 0, 0, 0, 0, 0, 0, 0,
44, 170, 8, 53, 193, 231, 225, 203,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
16, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, }
};
::capnp::word const* const bp_e19754f813ccf79c = b_e19754f813ccf79c.words;
#if !CAPNP_LITE
static const ::capnp::_::RawSchema* const d_e19754f813ccf79c[] = {
&s_cbe1e7c13508aa2c,
&s_dba20dec138adac9,
};
static const uint16_t m_e19754f813ccf79c[] = {0, 2, 1};
static const uint16_t i_e19754f813ccf79c[] = {0, 1, 2};
const ::capnp::_::RawSchema s_e19754f813ccf79c = {
0xe19754f813ccf79c, b_e19754f813ccf79c.words, 66, d_e19754f813ccf79c, m_e19754f813ccf79c,
2, 3, i_e19754f813ccf79c, nullptr, nullptr, { &s_e19754f813ccf79c, nullptr, nullptr, 0, 0, nullptr }
};
#endif // !CAPNP_LITE
static const ::capnp::_::AlignedData<164> b_96ba49d0f8b23ccc = {
{ 0, 0, 0, 0, 5, 0, 6, 0,
204, 60, 178, 248, 208, 73, 186, 150,
23, 0, 0, 0, 1, 0, 2, 0,
127, 216, 135, 181, 36, 146, 125, 181,
7, 0, 7, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
21, 0, 0, 0, 234, 0, 0, 0,
33, 0, 0, 0, 7, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
29, 0, 0, 0, 255, 1, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
47, 116, 109, 112, 47, 116, 105, 108,
101, 100, 98, 45, 114, 101, 115, 116,
46, 99, 97, 112, 110, 112, 58, 81,
117, 101, 114, 121, 0, 0, 0, 0,
0, 0, 0, 0, 1, 0, 1, 0,
36, 0, 0, 0, 3, 0, 4, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
237, 0, 0, 0, 186, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
240, 0, 0, 0, 3, 0, 1, 0,
12, 1, 0, 0, 2, 0, 1, 0,
1, 0, 0, 0, 1, 0, 0, 0,
0, 0, 1, 0, 1, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
9, 1, 0, 0, 58, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
4, 1, 0, 0, 3, 0, 1, 0,
16, 1, 0, 0, 2, 0, 1, 0,
2, 0, 0, 0, 2, 0, 0, 0,
0, 0, 1, 0, 2, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
13, 1, 0, 0, 58, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
8, 1, 0, 0, 3, 0, 1, 0,
20, 1, 0, 0, 2, 0, 1, 0,
3, 0, 0, 0, 3, 0, 0, 0,
0, 0, 1, 0, 3, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
17, 1, 0, 0, 42, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
12, 1, 0, 0, 3, 0, 1, 0,
24, 1, 0, 0, 2, 0, 1, 0,
4, 0, 0, 0, 4, 0, 0, 0,
0, 0, 1, 0, 4, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
21, 1, 0, 0, 58, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
16, 1, 0, 0, 3, 0, 1, 0,
28, 1, 0, 0, 2, 0, 1, 0,
5, 0, 0, 0, 5, 0, 0, 0,
0, 0, 1, 0, 5, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
25, 1, 0, 0, 58, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
20, 1, 0, 0, 3, 0, 1, 0,
32, 1, 0, 0, 2, 0, 1, 0,
6, 0, 0, 0, 6, 0, 0, 0,
0, 0, 1, 0, 6, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
29, 1, 0, 0, 50, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
24, 1, 0, 0, 3, 0, 1, 0,
36, 1, 0, 0, 2, 0, 1, 0,
7, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 7, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
33, 1, 0, 0, 226, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
40, 1, 0, 0, 3, 0, 1, 0,
52, 1, 0, 0, 2, 0, 1, 0,
8, 0, 0, 0, 1, 0, 0, 0,
0, 0, 1, 0, 8, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
49, 1, 0, 0, 186, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
52, 1, 0, 0, 3, 0, 1, 0,
64, 1, 0, 0, 2, 0, 1, 0,
97, 116, 116, 114, 105, 98, 117, 116,
101, 66, 117, 102, 102, 101, 114, 72,
101, 97, 100, 101, 114, 115, 0, 0,
14, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 3, 0, 1, 0,
16, 0, 0, 0, 0, 0, 0, 0,
162, 146, 250, 18, 129, 87, 10, 210,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
14, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
108, 97, 121, 111, 117, 116, 0, 0,
12, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
12, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
115, 116, 97, 116, 117, 115, 0, 0,
12, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
12, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
116, 121, 112, 101, 0, 0, 0, 0,
12, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
12, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
119, 114, 105, 116, 101, 114, 0, 0,
16, 0, 0, 0, 0, 0, 0, 0,
94, 115, 230, 160, 71, 1, 166, 139,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
16, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
114, 101, 97, 100, 101, 114, 0, 0,
16, 0, 0, 0, 0, 0, 0, 0,
156, 247, 204, 19, 248, 84, 151, 225,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
16, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
97, 114, 114, 97, 121, 0, 0, 0,
16, 0, 0, 0, 0, 0, 0, 0,
180, 96, 4, 126, 245, 48, 87, 164,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
16, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
116, 111, 116, 97, 108, 70, 105, 120,
101, 100, 76, 101, 110, 103, 116, 104,
66, 117, 102, 102, 101, 114, 66, 121,
116, 101, 115, 0, 0, 0, 0, 0,
9, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
9, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
116, 111, 116, 97, 108, 86, 97, 114,
76, 101, 110, 66, 117, 102, 102, 101,
114, 66, 121, 116, 101, 115, 0, 0,
9, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
9, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, }
};
::capnp::word const* const bp_96ba49d0f8b23ccc = b_96ba49d0f8b23ccc.words;
#if !CAPNP_LITE
static const ::capnp::_::RawSchema* const d_96ba49d0f8b23ccc[] = {
&s_8ba60147a0e6735e,
&s_a45730f57e0460b4,
&s_d20a578112fa92a2,
&s_e19754f813ccf79c,
};
static const uint16_t m_96ba49d0f8b23ccc[] = {6, 0, 1, 5, 2, 7, 8, 3, 4};
static const uint16_t i_96ba49d0f8b23ccc[] = {0, 1, 2, 3, 4, 5, 6, 7, 8};
const ::capnp::_::RawSchema s_96ba49d0f8b23ccc = {
0x96ba49d0f8b23ccc, b_96ba49d0f8b23ccc.words, 164, d_96ba49d0f8b23ccc, m_96ba49d0f8b23ccc,
4, 9, i_96ba49d0f8b23ccc, nullptr, nullptr, { &s_96ba49d0f8b23ccc, nullptr, nullptr, 0, 0, nullptr }
};
#endif // !CAPNP_LITE
static const ::capnp::_::AlignedData<50> b_9df6f2a42c4e5f0b = {
{ 0, 0, 0, 0, 5, 0, 6, 0,
11, 95, 78, 44, 164, 242, 246, 157,
23, 0, 0, 0, 1, 0, 1, 0,
127, 216, 135, 181, 36, 146, 125, 181,
1, 0, 7, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
21, 0, 0, 0, 50, 1, 0, 0,
37, 0, 0, 0, 7, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
33, 0, 0, 0, 119, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
47, 116, 109, 112, 47, 116, 105, 108,
101, 100, 98, 45, 114, 101, 115, 116,
46, 99, 97, 112, 110, 112, 58, 78,
111, 110, 69, 109, 112, 116, 121, 68,
111, 109, 97, 105, 110, 0, 0, 0,
0, 0, 0, 0, 1, 0, 1, 0,
8, 0, 0, 0, 3, 0, 4, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
41, 0, 0, 0, 122, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
40, 0, 0, 0, 3, 0, 1, 0,
52, 0, 0, 0, 2, 0, 1, 0,
1, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 1, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
49, 0, 0, 0, 66, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
44, 0, 0, 0, 3, 0, 1, 0,
56, 0, 0, 0, 2, 0, 1, 0,
110, 111, 110, 69, 109, 112, 116, 121,
68, 111, 109, 97, 105, 110, 0, 0,
16, 0, 0, 0, 0, 0, 0, 0,
236, 12, 65, 249, 230, 4, 89, 206,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
16, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
105, 115, 69, 109, 112, 116, 121, 0,
1, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, }
};
::capnp::word const* const bp_9df6f2a42c4e5f0b = b_9df6f2a42c4e5f0b.words;
#if !CAPNP_LITE
static const ::capnp::_::RawSchema* const d_9df6f2a42c4e5f0b[] = {
&s_ce5904e6f9410cec,
};
static const uint16_t m_9df6f2a42c4e5f0b[] = {1, 0};
static const uint16_t i_9df6f2a42c4e5f0b[] = {0, 1};
const ::capnp::_::RawSchema s_9df6f2a42c4e5f0b = {
0x9df6f2a42c4e5f0b, b_9df6f2a42c4e5f0b.words, 50, d_9df6f2a42c4e5f0b, m_9df6f2a42c4e5f0b,
1, 2, i_9df6f2a42c4e5f0b, nullptr, nullptr, { &s_9df6f2a42c4e5f0b, nullptr, nullptr, 0, 0, nullptr }
};
#endif // !CAPNP_LITE
static const ::capnp::_::AlignedData<68> b_9be1921b07e6cd2d = {
{ 0, 0, 0, 0, 5, 0, 6, 0,
45, 205, 230, 7, 27, 146, 225, 155,
23, 0, 0, 0, 1, 0, 2, 0,
127, 216, 135, 181, 36, 146, 125, 181,
1, 0, 7, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
21, 0, 0, 0, 90, 1, 0, 0,
41, 0, 0, 0, 7, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
37, 0, 0, 0, 175, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
47, 116, 109, 112, 47, 116, 105, 108,
101, 100, 98, 45, 114, 101, 115, 116,
46, 99, 97, 112, 110, 112, 58, 65,
116, 116, 114, 105, 98, 117, 116, 101,
66, 117, 102, 102, 101, 114, 83, 105,
122, 101, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1, 0, 1, 0,
12, 0, 0, 0, 3, 0, 4, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
69, 0, 0, 0, 82, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
68, 0, 0, 0, 3, 0, 1, 0,
80, 0, 0, 0, 2, 0, 1, 0,
1, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 1, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
77, 0, 0, 0, 98, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
76, 0, 0, 0, 3, 0, 1, 0,
88, 0, 0, 0, 2, 0, 1, 0,
2, 0, 0, 0, 1, 0, 0, 0,
0, 0, 1, 0, 2, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
85, 0, 0, 0, 82, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
84, 0, 0, 0, 3, 0, 1, 0,
96, 0, 0, 0, 2, 0, 1, 0,
97, 116, 116, 114, 105, 98, 117, 116,
101, 0, 0, 0, 0, 0, 0, 0,
12, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
12, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
111, 102, 102, 115, 101, 116, 66, 121,
116, 101, 115, 0, 0, 0, 0, 0,
9, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
9, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
100, 97, 116, 97, 66, 121, 116, 101,
115, 0, 0, 0, 0, 0, 0, 0,
9, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
9, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, }
};
::capnp::word const* const bp_9be1921b07e6cd2d = b_9be1921b07e6cd2d.words;
#if !CAPNP_LITE
static const uint16_t m_9be1921b07e6cd2d[] = {0, 2, 1};
static const uint16_t i_9be1921b07e6cd2d[] = {0, 1, 2};
const ::capnp::_::RawSchema s_9be1921b07e6cd2d = {
0x9be1921b07e6cd2d, b_9be1921b07e6cd2d.words, 68, nullptr, m_9be1921b07e6cd2d,
0, 3, i_9be1921b07e6cd2d, nullptr, nullptr, { &s_9be1921b07e6cd2d, nullptr, nullptr, 0, 0, nullptr }
};
#endif // !CAPNP_LITE
static const ::capnp::_::AlignedData<39> b_f01116579e9ea98e = {
{ 0, 0, 0, 0, 5, 0, 6, 0,
142, 169, 158, 158, 87, 22, 17, 240,
23, 0, 0, 0, 1, 0, 0, 0,
127, 216, 135, 181, 36, 146, 125, 181,
1, 0, 7, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
21, 0, 0, 0, 50, 1, 0, 0,
37, 0, 0, 0, 7, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
33, 0, 0, 0, 63, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
47, 116, 109, 112, 47, 116, 105, 108,
101, 100, 98, 45, 114, 101, 115, 116,
46, 99, 97, 112, 110, 112, 58, 77,
97, 120, 66, 117, 102, 102, 101, 114,
83, 105, 122, 101, 115, 0, 0, 0,
0, 0, 0, 0, 1, 0, 1, 0,
4, 0, 0, 0, 3, 0, 4, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
13, 0, 0, 0, 122, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
12, 0, 0, 0, 3, 0, 1, 0,
40, 0, 0, 0, 2, 0, 1, 0,
109, 97, 120, 66, 117, 102, 102, 101,
114, 83, 105, 122, 101, 115, 0, 0,
14, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 3, 0, 1, 0,
16, 0, 0, 0, 0, 0, 0, 0,
45, 205, 230, 7, 27, 146, 225, 155,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
14, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, }
};
::capnp::word const* const bp_f01116579e9ea98e = b_f01116579e9ea98e.words;
#if !CAPNP_LITE
static const ::capnp::_::RawSchema* const d_f01116579e9ea98e[] = {
&s_9be1921b07e6cd2d,
};
static const uint16_t m_f01116579e9ea98e[] = {0};
static const uint16_t i_f01116579e9ea98e[] = {0};
const ::capnp::_::RawSchema s_f01116579e9ea98e = {
0xf01116579e9ea98e, b_f01116579e9ea98e.words, 39, d_f01116579e9ea98e, m_f01116579e9ea98e,
1, 1, i_f01116579e9ea98e, nullptr, nullptr, { &s_f01116579e9ea98e, nullptr, nullptr, 0, 0, nullptr }
};
#endif // !CAPNP_LITE
} // namespace schemas
} // namespace capnp
// =======================================================================================
namespace tiledb {
namespace sm {
namespace serialization {
namespace capnp {
// DomainArray
constexpr uint16_t DomainArray::_capnpPrivate::dataWordSize;
constexpr uint16_t DomainArray::_capnpPrivate::pointerCount;
#if !CAPNP_LITE
constexpr ::capnp::Kind DomainArray::_capnpPrivate::kind;
constexpr ::capnp::_::RawSchema const* DomainArray::_capnpPrivate::schema;
#endif // !CAPNP_LITE
// Array
constexpr uint16_t Array::_capnpPrivate::dataWordSize;
constexpr uint16_t Array::_capnpPrivate::pointerCount;
#if !CAPNP_LITE
constexpr ::capnp::Kind Array::_capnpPrivate::kind;
constexpr ::capnp::_::RawSchema const* Array::_capnpPrivate::schema;
#endif // !CAPNP_LITE
// ArraySchema
constexpr uint16_t ArraySchema::_capnpPrivate::dataWordSize;
constexpr uint16_t ArraySchema::_capnpPrivate::pointerCount;
#if !CAPNP_LITE
constexpr ::capnp::Kind ArraySchema::_capnpPrivate::kind;
constexpr ::capnp::_::RawSchema const* ArraySchema::_capnpPrivate::schema;
#endif // !CAPNP_LITE
// Attribute
constexpr uint16_t Attribute::_capnpPrivate::dataWordSize;
constexpr uint16_t Attribute::_capnpPrivate::pointerCount;
#if !CAPNP_LITE
constexpr ::capnp::Kind Attribute::_capnpPrivate::kind;
constexpr ::capnp::_::RawSchema const* Attribute::_capnpPrivate::schema;
#endif // !CAPNP_LITE
// AttributeBufferHeader
constexpr uint16_t AttributeBufferHeader::_capnpPrivate::dataWordSize;
constexpr uint16_t AttributeBufferHeader::_capnpPrivate::pointerCount;
#if !CAPNP_LITE
constexpr ::capnp::Kind AttributeBufferHeader::_capnpPrivate::kind;
constexpr ::capnp::_::RawSchema const* AttributeBufferHeader::_capnpPrivate::schema;
#endif // !CAPNP_LITE
// Dimension
constexpr uint16_t Dimension::_capnpPrivate::dataWordSize;
constexpr uint16_t Dimension::_capnpPrivate::pointerCount;
#if !CAPNP_LITE
constexpr ::capnp::Kind Dimension::_capnpPrivate::kind;
constexpr ::capnp::_::RawSchema const* Dimension::_capnpPrivate::schema;
#endif // !CAPNP_LITE
// Dimension::TileExtent
constexpr uint16_t Dimension::TileExtent::_capnpPrivate::dataWordSize;
constexpr uint16_t Dimension::TileExtent::_capnpPrivate::pointerCount;
#if !CAPNP_LITE
constexpr ::capnp::Kind Dimension::TileExtent::_capnpPrivate::kind;
constexpr ::capnp::_::RawSchema const* Dimension::TileExtent::_capnpPrivate::schema;
#endif // !CAPNP_LITE
// Domain
constexpr uint16_t Domain::_capnpPrivate::dataWordSize;
constexpr uint16_t Domain::_capnpPrivate::pointerCount;
#if !CAPNP_LITE
constexpr ::capnp::Kind Domain::_capnpPrivate::kind;
constexpr ::capnp::_::RawSchema const* Domain::_capnpPrivate::schema;
#endif // !CAPNP_LITE
// Error
constexpr uint16_t Error::_capnpPrivate::dataWordSize;
constexpr uint16_t Error::_capnpPrivate::pointerCount;
#if !CAPNP_LITE
constexpr ::capnp::Kind Error::_capnpPrivate::kind;
constexpr ::capnp::_::RawSchema const* Error::_capnpPrivate::schema;
#endif // !CAPNP_LITE
// Filter
constexpr uint16_t Filter::_capnpPrivate::dataWordSize;
constexpr uint16_t Filter::_capnpPrivate::pointerCount;
#if !CAPNP_LITE
constexpr ::capnp::Kind Filter::_capnpPrivate::kind;
constexpr ::capnp::_::RawSchema const* Filter::_capnpPrivate::schema;
#endif // !CAPNP_LITE
// Filter::Data
constexpr uint16_t Filter::Data::_capnpPrivate::dataWordSize;
constexpr uint16_t Filter::Data::_capnpPrivate::pointerCount;
#if !CAPNP_LITE
constexpr ::capnp::Kind Filter::Data::_capnpPrivate::kind;
constexpr ::capnp::_::RawSchema const* Filter::Data::_capnpPrivate::schema;
#endif // !CAPNP_LITE
// FilterPipeline
constexpr uint16_t FilterPipeline::_capnpPrivate::dataWordSize;
constexpr uint16_t FilterPipeline::_capnpPrivate::pointerCount;
#if !CAPNP_LITE
constexpr ::capnp::Kind FilterPipeline::_capnpPrivate::kind;
constexpr ::capnp::_::RawSchema const* FilterPipeline::_capnpPrivate::schema;
#endif // !CAPNP_LITE
// MapUInt32
constexpr uint16_t MapUInt32::_capnpPrivate::dataWordSize;
constexpr uint16_t MapUInt32::_capnpPrivate::pointerCount;
#if !CAPNP_LITE
constexpr ::capnp::Kind MapUInt32::_capnpPrivate::kind;
constexpr ::capnp::_::RawSchema const* MapUInt32::_capnpPrivate::schema;
#endif // !CAPNP_LITE
// MapUInt32::Entry
constexpr uint16_t MapUInt32::Entry::_capnpPrivate::dataWordSize;
constexpr uint16_t MapUInt32::Entry::_capnpPrivate::pointerCount;
#if !CAPNP_LITE
constexpr ::capnp::Kind MapUInt32::Entry::_capnpPrivate::kind;
constexpr ::capnp::_::RawSchema const* MapUInt32::Entry::_capnpPrivate::schema;
#endif // !CAPNP_LITE
// MapInt64
constexpr uint16_t MapInt64::_capnpPrivate::dataWordSize;
constexpr uint16_t MapInt64::_capnpPrivate::pointerCount;
#if !CAPNP_LITE
constexpr ::capnp::Kind MapInt64::_capnpPrivate::kind;
constexpr ::capnp::_::RawSchema const* MapInt64::_capnpPrivate::schema;
#endif // !CAPNP_LITE
// MapInt64::Entry
constexpr uint16_t MapInt64::Entry::_capnpPrivate::dataWordSize;
constexpr uint16_t MapInt64::Entry::_capnpPrivate::pointerCount;
#if !CAPNP_LITE
constexpr ::capnp::Kind MapInt64::Entry::_capnpPrivate::kind;
constexpr ::capnp::_::RawSchema const* MapInt64::Entry::_capnpPrivate::schema;
#endif // !CAPNP_LITE
// Writer
constexpr uint16_t Writer::_capnpPrivate::dataWordSize;
constexpr uint16_t Writer::_capnpPrivate::pointerCount;
#if !CAPNP_LITE
constexpr ::capnp::Kind Writer::_capnpPrivate::kind;
constexpr ::capnp::_::RawSchema const* Writer::_capnpPrivate::schema;
#endif // !CAPNP_LITE
// SubarrayRanges
constexpr uint16_t SubarrayRanges::_capnpPrivate::dataWordSize;
constexpr uint16_t SubarrayRanges::_capnpPrivate::pointerCount;
#if !CAPNP_LITE
constexpr ::capnp::Kind SubarrayRanges::_capnpPrivate::kind;
constexpr ::capnp::_::RawSchema const* SubarrayRanges::_capnpPrivate::schema;
#endif // !CAPNP_LITE
// Subarray
constexpr uint16_t Subarray::_capnpPrivate::dataWordSize;
constexpr uint16_t Subarray::_capnpPrivate::pointerCount;
#if !CAPNP_LITE
constexpr ::capnp::Kind Subarray::_capnpPrivate::kind;
constexpr ::capnp::_::RawSchema const* Subarray::_capnpPrivate::schema;
#endif // !CAPNP_LITE
// SubarrayPartitioner
constexpr uint16_t SubarrayPartitioner::_capnpPrivate::dataWordSize;
constexpr uint16_t SubarrayPartitioner::_capnpPrivate::pointerCount;
#if !CAPNP_LITE
constexpr ::capnp::Kind SubarrayPartitioner::_capnpPrivate::kind;
constexpr ::capnp::_::RawSchema const* SubarrayPartitioner::_capnpPrivate::schema;
#endif // !CAPNP_LITE
// SubarrayPartitioner::PartitionInfo
constexpr uint16_t SubarrayPartitioner::PartitionInfo::_capnpPrivate::dataWordSize;
constexpr uint16_t SubarrayPartitioner::PartitionInfo::_capnpPrivate::pointerCount;
#if !CAPNP_LITE
constexpr ::capnp::Kind SubarrayPartitioner::PartitionInfo::_capnpPrivate::kind;
constexpr ::capnp::_::RawSchema const* SubarrayPartitioner::PartitionInfo::_capnpPrivate::schema;
#endif // !CAPNP_LITE
// SubarrayPartitioner::State
constexpr uint16_t SubarrayPartitioner::State::_capnpPrivate::dataWordSize;
constexpr uint16_t SubarrayPartitioner::State::_capnpPrivate::pointerCount;
#if !CAPNP_LITE
constexpr ::capnp::Kind SubarrayPartitioner::State::_capnpPrivate::kind;
constexpr ::capnp::_::RawSchema const* SubarrayPartitioner::State::_capnpPrivate::schema;
#endif // !CAPNP_LITE
// ReadState
constexpr uint16_t ReadState::_capnpPrivate::dataWordSize;
constexpr uint16_t ReadState::_capnpPrivate::pointerCount;
#if !CAPNP_LITE
constexpr ::capnp::Kind ReadState::_capnpPrivate::kind;
constexpr ::capnp::_::RawSchema const* ReadState::_capnpPrivate::schema;
#endif // !CAPNP_LITE
// QueryReader
constexpr uint16_t QueryReader::_capnpPrivate::dataWordSize;
constexpr uint16_t QueryReader::_capnpPrivate::pointerCount;
#if !CAPNP_LITE
constexpr ::capnp::Kind QueryReader::_capnpPrivate::kind;
constexpr ::capnp::_::RawSchema const* QueryReader::_capnpPrivate::schema;
#endif // !CAPNP_LITE
// Query
constexpr uint16_t Query::_capnpPrivate::dataWordSize;
constexpr uint16_t Query::_capnpPrivate::pointerCount;
#if !CAPNP_LITE
constexpr ::capnp::Kind Query::_capnpPrivate::kind;
constexpr ::capnp::_::RawSchema const* Query::_capnpPrivate::schema;
#endif // !CAPNP_LITE
// NonEmptyDomain
constexpr uint16_t NonEmptyDomain::_capnpPrivate::dataWordSize;
constexpr uint16_t NonEmptyDomain::_capnpPrivate::pointerCount;
#if !CAPNP_LITE
constexpr ::capnp::Kind NonEmptyDomain::_capnpPrivate::kind;
constexpr ::capnp::_::RawSchema const* NonEmptyDomain::_capnpPrivate::schema;
#endif // !CAPNP_LITE
// AttributeBufferSize
constexpr uint16_t AttributeBufferSize::_capnpPrivate::dataWordSize;
constexpr uint16_t AttributeBufferSize::_capnpPrivate::pointerCount;
#if !CAPNP_LITE
constexpr ::capnp::Kind AttributeBufferSize::_capnpPrivate::kind;
constexpr ::capnp::_::RawSchema const* AttributeBufferSize::_capnpPrivate::schema;
#endif // !CAPNP_LITE
// MaxBufferSizes
constexpr uint16_t MaxBufferSizes::_capnpPrivate::dataWordSize;
constexpr uint16_t MaxBufferSizes::_capnpPrivate::pointerCount;
#if !CAPNP_LITE
constexpr ::capnp::Kind MaxBufferSizes::_capnpPrivate::kind;
constexpr ::capnp::_::RawSchema const* MaxBufferSizes::_capnpPrivate::schema;
#endif // !CAPNP_LITE
} // namespace
} // namespace
} // namespace
} // namespace
| [
"tyler@tiledb.io"
] | tyler@tiledb.io | |
b1a8272d8b4d1ea15eb8f12cfcdcc7daf467e383 | f6d3073fd746a71cb00e8a0d5dc4f42732eca956 | /src/Memoria/Source/Memoria/Private/CritDamagePerkComponent.cpp | 2734932fcc9eea589ab5e53294c1068e47464214 | [] | no_license | ditan96/rc-memoria | 95f8643e3ac5c1c55a4e6a910932c8e3e39f48b3 | a8c540dab55df000d7d2465ad650cd8dafdbef5f | refs/heads/master | 2022-11-05T15:46:16.783600 | 2019-11-20T04:13:49 | 2019-11-20T04:13:49 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 785 | cpp | // Fill out your copyright notice in the Description page of Project Settings.
#include "CritDamagePerkComponent.h"
#include "CharacterBase.h"
void UCritDamagePerkComponent::Setup(ACharacterBase* character)
{
if (CritChanceModifier.Value != 0.0f) {
character->StatCritChance.AddModifier(CritChanceModifier);
}
if (CritDamageMultiplierModifier.Value != 0.0f) {
character->StatCritDamageMultiplier.AddModifier(CritDamageMultiplierModifier);
}
}
void UCritDamagePerkComponent::Teardown(ACharacterBase* character)
{
if (CritChanceModifier.Value != 0.0f) {
character->StatCritChance.RemoveModifierSingle(CritChanceModifier);
}
if (CritDamageMultiplierModifier.Value != 0.0f) {
character->StatCritDamageMultiplier.RemoveModifierSingle(CritDamageMultiplierModifier);
}
} | [
"freedomzelda_dc@hotmail.com"
] | freedomzelda_dc@hotmail.com |
60b1d059ec0f627cdf87d059e3ae8a4086ebc7e5 | f7f4349c105bd0abce0458821a4a04d242b3b09e | /EllipalXrpAddress/aesCrypter.cpp | 45a5452f062d60af2718e69f0832d256d4286169 | [
"Apache-2.0"
] | permissive | ELLIPAL/EllipalXrpAddress | 3c58ebd6c14b04e969fc8fc027d3633ee13d82be | 1dd129622eb0657fc8be9c091613f2c8a77d10ab | refs/heads/main | 2023-01-07T04:34:58.684916 | 2020-11-09T10:33:50 | 2020-11-09T10:33:50 | 311,298,972 | 2 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,911 | cpp | #include "stdafx.h"
#include "aesCrypter.h"
#include <iomanip>
AEScrypter::AEScrypter() : encrypt_ctx(NULL), decrypt_ctx(NULL)
{}
AEScrypter::~AEScrypter()
{
Cleanup();
}
void AEScrypter::Cleanup()
{
if (encrypt_ctx)
{
EVP_CIPHER_CTX_cleanup((EVP_CIPHER_CTX*)encrypt_ctx);
delete encrypt_ctx;
encrypt_ctx = NULL;
}
if (decrypt_ctx)
{
EVP_CIPHER_CTX_cleanup((EVP_CIPHER_CTX*)decrypt_ctx);
delete decrypt_ctx;
decrypt_ctx = NULL;
}
}
std::string AEScrypter::GenerateSalt()
{
unsigned char salt[8];
if (RAND_bytes(salt,8)!=1)
return "";
char result[17];
sprintf_s(result,17,"%02x%02x%02x%02x%02x%02x%02x%02x", salt[0], salt[1], salt[2], salt[3], salt[4], salt[5], salt[6], salt[7]);
return result;
}
bool AEScrypter::SetPassword(const std::string& password, const std::string &saltStr, int numRounds)
{
Cleanup();
encrypt_ctx = new EVP_CIPHER_CTX;
decrypt_ctx = new EVP_CIPHER_CTX;
unsigned char key[32];
unsigned char iv[32];
unsigned int saltInt[8];
unsigned char salt[8];
if (8 != sscanf(saltStr.c_str(), "%02x%02x%02x%02x%02x%02x%02x%02x", &saltInt[0], &saltInt[1], &saltInt[2], &saltInt[3], &saltInt[4], &saltInt[5], &saltInt[6], &saltInt[7]))
return false;
for (int i = 0; i < 8; i++)
salt[i] = (unsigned char)saltInt[i];
int i = EVP_BytesToKey(EVP_aes_256_cbc(), EVP_sha1(), salt, (const unsigned char*)password.c_str(), password.length(), numRounds, key, iv);
if (i != 32)
return false;
EVP_CIPHER_CTX_init((EVP_CIPHER_CTX*)encrypt_ctx);
EVP_EncryptInit_ex((EVP_CIPHER_CTX*)encrypt_ctx, EVP_aes_256_cbc(), NULL, key, iv);
EVP_CIPHER_CTX_init((EVP_CIPHER_CTX*)decrypt_ctx);
EVP_DecryptInit_ex((EVP_CIPHER_CTX*)decrypt_ctx, EVP_aes_256_cbc(), NULL, key, iv);
return true;
}
bool AEScrypter::encrypt(const std::vector<unsigned char> &plainData, std::vector<unsigned char> &encryptedData)
{
if (!encrypt_ctx)
return false;
EVP_EncryptInit_ex((EVP_CIPHER_CTX*)encrypt_ctx, NULL, NULL, NULL, NULL);
int cipherLen = plainData.size() + AES_BLOCK_SIZE;
unsigned char *encryptedTemp = (unsigned char*)malloc(cipherLen);
EVP_EncryptUpdate((EVP_CIPHER_CTX*)encrypt_ctx, encryptedTemp, &cipherLen, plainData.data(), plainData.size());
int finalLen = 0;
EVP_EncryptFinal_ex((EVP_CIPHER_CTX*)encrypt_ctx, encryptedTemp + cipherLen, &finalLen);
encryptedData.clear();
encryptedData.reserve(cipherLen+finalLen);
for (int i = 0; i < cipherLen+finalLen; i++)
encryptedData.push_back(encryptedTemp[i]);
free(encryptedTemp);
return true;
}
bool AEScrypter::decrypt(const std::vector<unsigned char> &encryptedData, std::vector<unsigned char> &decryptedData)
{
if (!decrypt_ctx)
return false;
EVP_DecryptInit_ex((EVP_CIPHER_CTX*)decrypt_ctx, NULL, NULL, NULL, NULL);
int encryptedLen = encryptedData.size();
unsigned char *decryptedTemp = (unsigned char *)malloc(encryptedLen);
EVP_DecryptUpdate((EVP_CIPHER_CTX*)decrypt_ctx, decryptedTemp, &encryptedLen, encryptedData.data(), encryptedLen);
int finalLen = 0;
EVP_DecryptFinal_ex((EVP_CIPHER_CTX*)decrypt_ctx, decryptedTemp + encryptedLen, &finalLen);
int len = encryptedLen + finalLen;
decryptedData.reserve(len);
for (int i = 0; i < len; i++)
decryptedData.push_back(decryptedTemp[i]);
free(decryptedTemp);
return true;
}
/*static*/ std::string AEScrypter::vector2stringHex(const std::vector<unsigned char>& data)
{
std::string result;
std::ostringstream oss;
oss << std::setfill('0');
for (size_t i = 0; i < data.size(); i++)
{
oss << std::setw(2) << std::hex << static_cast<int>(data[i]);
}
result.assign(oss.str());
return result;
}
/*static*/ std::vector<unsigned char> AEScrypter::stringHex2vector(const std::string& data)
{
std::vector<unsigned char> result;
size_t sz = data.size() >> 1;
for (size_t i=0; i<sz; i++)
{
std::istringstream iss(data.substr(i*2, 2));
unsigned int ch;
iss >> std::hex >> ch;
result.push_back( static_cast<unsigned char>(ch) );
}
return result;
}
std::string AEScrypter::encrypt(const std::string &plainDataHex)
{
std::vector<unsigned char> plainData = stringHex2vector(plainDataHex);
std::vector<unsigned char> encryptedData;
if (!encrypt(plainData, encryptedData))
return "";
return vector2stringHex(encryptedData);
}
std::string AEScrypter::decrypt(const std::string &encryptedDataHex)
{
std::vector<unsigned char> encryptedData = stringHex2vector(encryptedDataHex);
std::vector<unsigned char> decryptedData;
if (!decrypt(encryptedData, decryptedData))
return "";
return vector2stringHex(decryptedData);
}
std::string AEScrypter::getPasswordHash(const std::string& password)
{
unsigned char hash[SHA512_DIGEST_LENGTH];
memset(hash, 0, sizeof(SHA512_DIGEST_LENGTH));
SHA512((const unsigned char*)password.c_str(), password.size(), hash);
std::vector<unsigned char> hashV;
for (int i = 0; i < SHA512_DIGEST_LENGTH; i++)
hashV.push_back(hash[i]);
return vector2stringHex(hashV);
} | [
"t.chen@205x.org"
] | t.chen@205x.org |
edc6658a16143fabff430b0cb65620cf68f038fd | fdfeb3da025ece547aed387ad9c83b34a28b4662 | /Fundamental/CCore/inc/CharProp.h | 6f05a7eb41d50a8c759448408c69b8ed8eb271ce | [
"FTL",
"BSL-1.0"
] | permissive | SergeyStrukov/CCore-3-xx | 815213a9536e9c0094548ad6db469e62ab2ad3f7 | 820507e78f8aa35ca05761e00e060c8f64c59af5 | refs/heads/master | 2021-06-04T05:29:50.384520 | 2020-07-04T20:20:29 | 2020-07-04T20:20:29 | 93,891,835 | 8 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 7,846 | h | /* CharProp.h */
//----------------------------------------------------------------------------------------
//
// Project: CCore 3.50
//
// Tag: Fundamental Mini
//
// License: Boost Software License - Version 1.0 - August 17th, 2003
//
// see http://www.boost.org/LICENSE_1_0.txt or the local copy
//
// Copyright (c) 2017 Sergey Strukov. All rights reserved.
//
//----------------------------------------------------------------------------------------
#ifndef CCore_inc_CharProp_h
#define CCore_inc_CharProp_h
#include <CCore/inc/Printf.h>
#ifdef CCORE_UTF8
# include <CCore/inc/Utf8.h>
#endif
namespace CCore {
/* concept CharCodeType<Char> */
template <class Char>
concept bool CharCodeType = Meta::OneOf<Char,char,signed char,unsigned char> ;
/* CutLine() */
StrLen CutLine(StrLen &text);
/* classes */
struct SplitLine;
class ASCIICode;
class PrintCString;
/* struct SplitLine */
struct SplitLine
{
StrLen line;
StrLen rest;
bool eol;
explicit SplitLine(StrLen text);
};
/* class ASCIICode */
class ASCIICode
{
public:
using CodeType = uint8 ;
static char InverseMap(CodeType code) { return char(code); }
//
// (CodeType)InverseMap(code) == code
//
private:
CodeType code;
//
// ASCII code table
//
// +-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+
// | I 00 | 01 | 02 | 03 | 04 | 05 | 06 | 07 | 08 | 09 | 0A | 0B | 0C | 0D | 0E | 0F |
// +=====+=====+=====+=====+=====+=====+=====+=====+=====+=====+=====+=====+=====+=====+=====+=====+=====+
// | 00 I | | | | | | | | \b | \t | \n | \v | \f | \r | | |
// +-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+
// | 10 I | | | | | | | | | | | | | | | |
// +-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+
// | 20 I | ! | " | # | $ | % | & | ' | ( | ) | * | + | , | - | . | / |
// +-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+
// | 30 I 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | : | ; | < | = | > | ? |
// +-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+
// | 40 I @ | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O |
// +-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+
// | 50 I P | Q | R | S | T | U | V | W | X | Y | Z | [ | \ | ] | ^ | _ |
// +-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+
// | 60 I ` | a | b | c | d | e | f | g | h | i | j | k | l | m | n | o |
// +-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+
// | 70 I p | q | r | s | t | u | v | w | x | y | z | { | | | } | ~ | |
// +-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+
//
static const bool IsSpaceTable[256];
static const bool IsPunctTable[256];
static const bool IsSpaceOrPunctTable[256];
static const signed char DecValueTable[256];
static const signed char HexValueTable[256];
public:
// constructors
ASCIICode() : code(0) {}
explicit ASCIICode(CharCodeType ch) : code(ch) {}
// properties
bool isSpecial() const { return code<32 || code==127 ; }
// special -- represents no character
bool isVisible() const { return code>32 && code!=127 ; }
// visible -- represents non-space character
bool isPrintable() const { return code>=32 && code!=127 ; }
// printable -- not a special char
bool isSpace() const { return IsSpaceTable[code]; }
// space-like -- " \t\n\v\f\r"
bool isPunct() const { return IsPunctTable[code]; }
// punctuation characters
bool isSpaceOrPunct() const { return IsSpaceOrPunctTable[code]; }
// space or punct
int decValue() const { return DecValueTable[code]; }
// decimal digit value or -1
int hexValue() const { return HexValueTable[code]; }
// hexadecimal digit value or -1
char getChar() const { return InverseMap(code); }
// print object
void print(PrinterType &out) const
{
if( code>=32 && code!=127 )
{
switch( char ch=getChar() )
{
case '\\' : case '"' : out.put('\\'); [[fallthrough]];
default: out.put(ch);
}
}
else if( code>=8 && code<=13 )
{
out.put('\\');
out.put("btnvfr"[code-8]);
}
else
{
Printf(out,"\\x#2.16i;",code);
}
}
};
/* type CharCode */
using CharCode = ASCIICode ;
/* type ExtCharCode */
#ifdef CCORE_UTF8
class ExtCharCode
{
Utf8Code code;
public:
explicit ExtCharCode(const Utf8Code &code_) : code(code_) {}
explicit ExtCharCode(Unicode ch) : code(ToUtf8(ch)) {}
// print object
void print(PrinterType &out) const
{
if( code.getLen()==1 )
Putobj(out,CharCode(code[0]));
else
Putobj(out,code);
}
};
#else
using ExtCharCode = CharCode ;
#endif
/* class PrintCString */
class PrintCString
{
StrLen str;
public:
explicit PrintCString(StrLen str_) : str(str_) {}
using PrintOptType = StrPrintOpt ;
void print(PrinterType &out,PrintOptType opt) const
{
if( opt.quoted ) out.put('"');
for(auto r=str; +r ;++r) Putobj(out,CharCode(*r));
if( opt.quoted ) out.put('"');
}
};
/* functions */
bool CharIsSpecial(CharCodeType ch) { return CharCode(ch).isSpecial(); }
bool CharIsVisible(CharCodeType ch) { return CharCode(ch).isVisible(); }
bool CharIsPrintable(CharCodeType ch) { return CharCode(ch).isPrintable(); }
bool CharIsSpace(CharCodeType ch) { return CharCode(ch).isSpace(); }
bool CharIsPunct(CharCodeType ch) { return CharCode(ch).isPunct(); }
bool CharIsSpaceOrPunct(CharCodeType ch) { return CharCode(ch).isSpaceOrPunct(); }
int CharDecValue(CharCodeType ch) { return CharCode(ch).decValue(); }
int CharHexValue(CharCodeType ch) { return CharCode(ch).hexValue(); }
/* ext functions */
#ifdef CCORE_UTF8
inline bool CharIsSpecial(Utf8Code code) { return (code.getLen()==1)?CharIsSpecial(code[0]):false; }
inline bool CharIsVisible(Utf8Code code) { return (code.getLen()==1)?CharIsVisible(code[0]):true; }
inline bool CharIsPrintable(Utf8Code code) { return (code.getLen()==1)?CharIsPrintable(code[0]):true; }
inline bool CharIsSpace(Utf8Code code) { return (code.getLen()==1)?CharIsSpace(code[0]):false; }
inline int CharDecValue(Utf8Code code) { return (code.getLen()==1)?CharDecValue(code[0]):(-1); }
inline int CharHexValue(Utf8Code code) { return (code.getLen()==1)?CharHexValue(code[0]):(-1); }
#endif
/* ParseSpace() */
template <CharPeekType Dev>
void ParseSpace(Dev &dev)
{
for(;;++dev)
{
typename Dev::Peek peek(dev);
if( !peek || !CharIsSpace(*peek) ) break;
}
}
/* char sets */
inline const char * GetSpaceChars() { return " \t\f\v\r\n"; }
inline const char * GetPunctChars() { return "!\"#$%&'()*+,-./:;<=>?@[\\]^`{|}~"; }
inline const char * GetDigitChars() { return "0123456789"; }
inline const char * GetHexDigitChars() { return "0123456789abcdefABCDEF"; }
inline const char * GetCLetterChars() { return "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_"; }
} // namespace CCore
#endif
| [
"sshimnick@hotmail.com"
] | sshimnick@hotmail.com |
b4f253ca840d7da4ee030d773025099050885de6 | a9e8409b570a01b2800b5c6f43fde4e66af4561c | /src/PlayState.cpp | e7d27b1d669c35f01cc71d014ad169497451e3e9 | [] | no_license | JoshArgent/ZombieGame | 2a249b9e25300741e7d3f01046f0d8e1a5f43a7c | aa0110c927ad8e785bbda39c7758e16557df1afe | refs/heads/master | 2021-05-10T09:56:10.754216 | 2018-01-25T16:31:01 | 2018-01-25T16:31:01 | 118,938,136 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 8,271 | cpp | #include "PlayState.h"
#include <sstream>
#include "Map.h"
#include "PlayerObject.h"
#include "CoinObject.h"
#include "ZombieObject.h"
#include "Psyja2TileManager.h"
#include "BulletObject.h"
#include "HealthBarObject.h"
#include "HeartObject.h"
#include "JPGImage.h"
#include "Psyja2Engine.h"
#include "PauseState.h"
#include "Round.h"
#include "RoundCompleteState.h"
#include "GameoverState.h"
#include "DiedState.h"
#include "NormalZombieObject.h"
#include "CoinZombieObject.h"
#include "HeartZombieObject.h"
#include "SpriteManager.h"
PlayState::PlayState(Psyja2Engine *engine, int score, int lives, int round, const char *levelFile) : State(engine)
{
tilemanager = new Psyja2TileManager();
mapObj = new Map(tilemanager, levelFile);
player = new PlayerObject(this);
player->setTilePosition(mapObj->spawnX, mapObj->spawnY);
player->lives = lives;
player->score = score;
this->round = round;
Round roundObj = Round(round);
this->zombieRate = roundObj.GetZombieSpawnRate();
this->zombieLimit = roundObj.GetZombieSpawnLimit();
this->zombiesLeft = roundObj.GetNumZombies();
this->zombieHealth = roundObj.GetZombieHealth();
}
PlayState::~PlayState()
{
delete mapObj;
delete tilemanager;
}
void PlayState::SetupBackgroundBuffer()
{
// Display the map
tilemanager->SetBaseTilesPositionOnScreen(0, 50);
tilemanager->DrawAllTiles(engine, engine->GetBackground(), 0, 0, 16, 11);
// Draw any blood stains
int i = 0;
for (Coordinate *c : bloodStains)
{
double phase = bloodStainPhases[i];
ImageData bloodImg;
bloodImg.ResizeFrom(engine->spriteManager->GetBlood(), engine->spriteManager->GetBlood()->GetWidth() * phase, engine->spriteManager->GetBlood()->GetHeight() * phase, true);
int offset = 25 - (engine->spriteManager->GetBlood()->GetWidth() * phase) / 2;
bloodImg.RenderImageWithMask(engine->GetBackground(), 0, 0, c->x * 50 + offset, c->y * 50 + 50 + offset, bloodImg.GetWidth(), bloodImg.GetHeight());
i++;
}
// Draw score bar
engine->DrawBackgroundRectangle(0, 0, engine->GetScreenWidth(), 50, 0xFFFFFF);
// Draw heart and coin icons for score
engine->spriteManager->GetHeart()[0]->RenderImageWithMask(engine->GetBackground(), 0, 0, engine->GetScreenWidth() - 70, 28, engine->spriteManager->GetHeart()[0]->GetWidth(), engine->spriteManager->GetHeart()[0]->GetHeight());
engine->spriteManager->GetCoins()[0]->RenderImageWithMask(engine->GetBackground(), 0, 0, engine->GetScreenWidth() - 70, 5, engine->spriteManager->GetCoins()[0]->GetWidth(), engine->spriteManager->GetCoins()[0]->GetHeight());
}
int PlayState::InitialiseObjects()
{
engine->DrawableObjectsChanged();
engine->DestroyOldObjects();
engine->CreateObjectArray(10);
// Spawn player
engine->StoreObjectInArray(player);
// Health bar
engine->StoreObjectInArray(new HealthBarObject(this));
return 2;
}
void PlayState::MouseMoved(int iX, int iY)
{
double angle = getAngle(player->GetXCentre(), player->GetYCentre(), iX, iY);
player->SetAngle(angle);
}
void PlayState::MouseDown(int iButton, int iX, int iY)
{
double angle = getAngle(player->GetXCentre(), player->GetYCentre(), iX, iY);
BulletObject *bullet = new BulletObject(this, player->GetXCentre(), player->GetYCentre(), angle);
engine->StoreObjectInArray(bullet);
}
void PlayState::DrawStrings()
{
engine->CopyBackgroundPixels(0, 0, engine->GetScreenWidth(), engine->GetScreenHeight());
std::ostringstream ss;
ss << "x" << std::to_string(getPlayer()->score);
engine->DrawScreenString(engine->GetScreenWidth() - 50, 4, ss.str().c_str(), 0x000000, NULL);
ss.str("");
ss << "x" << std::to_string(getPlayer()->lives);
engine->DrawScreenString(engine->GetScreenWidth() - 50, 30, ss.str().c_str(), 0x000000, NULL);
ss.str("");
ss << "Round: " << std::to_string(round);
Font *font = engine->GetFont("Millimetre-Bold.otf", 20);
engine->DrawScreenString(10, 15, ss.str().c_str(), 0xFF0000, font);
}
void PlayState::GameAction()
{
// If too early to act then do nothing
if (!engine->IsTimeToActWithSleep())
return;
// Spawn zombies
int t = 100 * (1 - zombieRate);
if (numZombies < std::min(zombieLimit, zombiesLeft) && rand() % t == 1)
{
// Select the type of zombie:
int type = rand() % 10;
// Choose where to spawn it
if (rand() % 2 == 1)
{
if (type < 7)
engine->StoreObjectInArray(new NormalZombieObject(this, 0, 5, zombieHealth));
else if (type < 9)
engine->StoreObjectInArray(new CoinZombieObject(this, 0, 5, zombieHealth));
else
engine->StoreObjectInArray(new HeartZombieObject(this, 0, 5, zombieHealth));
}
else
{
if (type < 7)
engine->StoreObjectInArray(new NormalZombieObject(this, 15, 5, zombieHealth));
else if (type < 9)
engine->StoreObjectInArray(new CoinZombieObject(this, 15, 5, zombieHealth));
else
engine->StoreObjectInArray(new HeartZombieObject(this, 15, 5, zombieHealth));
}
numZombies++;
}
// Spawn coins
t = 100 * (1 - coinRate);
if (numCoins < coinLimit && rand() % t == 1)
{
while (true)
{
int x = rand() % 16;
int y = rand() % 11;
if (!mapObj->IsObstacle(x, y))
{
CoinObject *coin = new CoinObject(this, x, y);
engine->StoreObjectInArray(coin);
numCoins++;
break;
}
}
}
// Spawn hearts
t = 10000 * (1 - heartRate);
if (numHearts < heartLimit && rand() % t == 1)
{
while (true)
{
int x = rand() % 16;
int y = rand() % 11;
if (!mapObj->IsObstacle(x, y))
{
HeartObject *heart = new HeartObject(this, x, y);
engine->StoreObjectInArray(heart);
numHearts++;
break;
}
}
}
// Spread any mud
if (rand() % 1000 == 1)
{
mapObj->SpreadMud();
// redraw the background;
SetupBackgroundBuffer();
engine->Redraw(true);
}
// Shrink any blood stains
int i = 0;
bool redraw = bloodStainPhases.size() > 0;
for (double phase : bloodStainPhases)
{
phase -= 0.001;
bloodStainPhases[i] = phase;
if (phase < 0.05)
{
// The lowest phase will always be at the back
bloodStainPhases.pop_back();
bloodStains.pop_back();
}
i++;
}
if (redraw)
{
SetupBackgroundBuffer();
engine->Redraw(true);
}
// Don't act for another 15 ticks
engine->SetTimeToAct(15);
// Tell all objects to update themselves.
// If they need the screen to redraw then they should say so, so that GameRender() will
// call the relevant function later.
engine->UpdateAllObjects(engine->GetTime());
// See if the round is complete
if (zombiesLeft <= 0)
{
PlayState *nextState = new PlayState(engine, player->score, player->lives, this->round + 1, engine->levels[engine->NextLevel()].c_str());
RoundCompleteState *roundComplete = new RoundCompleteState(engine, this, nextState);
// Round is complete. Load a new play state with the round increased..
engine->SwitchState(roundComplete, true, true);
return;
}
// See if the player has died
if (player->GetHealth() <= 0)
{
player->SetVisible(false);
if (player->lives > 0)
{
// deduct a life and respawn
engine->SwitchState(new DiedState(engine, this), true, true);
player->SetHealth(1);
player->setTilePosition(mapObj->spawnX, mapObj->spawnY);
player->lives--;
}
else
{
// game over
engine->SwitchState(new GameoverState(engine, this), true, true);
}
}
}
void PlayState::KeyDown(int iKeyCode)
{
if (iKeyCode == SDLK_SPACE)
{
// Enter pause state
engine->SwitchState(new PauseState(engine, this), true, true);
}
}
PlayerObject* PlayState::getPlayer()
{
return player;
}
std::vector<CollectableObject*> PlayState::getCollectables()
{
return engine->GetAllObjectsOfType<CollectableObject>();
}
std::vector<ZombieObject*> PlayState::getZombies()
{
return engine->GetAllObjectsOfType<ZombieObject>();
}
void PlayState::KillZombie(ZombieObject* zombie)
{
// create blood stain
bloodStains.push_front(new Coordinate(zombie->getTilePosition().x, zombie->getTilePosition().y));
bloodStainPhases.push_front(1);
zombie->RedrawBackground();
engine->RemoveObjectFromArray(zombie);
numZombies--;
zombiesLeft--;
} | [
"joshargent@mail.com"
] | joshargent@mail.com |
153d07195c84808efeb02fa3de34fdfbd16a6788 | b65b78b6e0d35aa17abd754127fd3a57ca9791aa | /borrow.cpp | 4d758213644a18774237873234a62e4c757b92e7 | [] | no_license | Magnetization/LibraryManageSystem | ae3d668e929ff3ce7a9cc4349696ca99094439ec | 2b1961d095a03d16eeae28023b013f818ea6794e | refs/heads/master | 2021-01-21T14:49:29.291361 | 2017-06-30T06:33:51 | 2017-06-30T06:33:51 | 95,342,965 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,059 | cpp | #include "borrow.h"
#include "ui_borrow.h"
#include <QString>'
#include <QSqlQueryModel>
#include <data.h>
#include <QMessageBox>
#include <QSqlQuery>
#include <QDateTime>
#include <QDebug>
Borrow::Borrow(QWidget *parent) :
QDialog(parent),
ui(new Ui::Borrow)
{
ui->setupUi(this);
}
Borrow::~Borrow()
{
delete ui;
}
void Borrow::on_pushButton_clicked()
{
QString Borrow_ID = ui->Book_ID_Edit->text();
QSqlQuery Query;
if(Borrow_ID!=NULL){
Query.exec("select * from book where bno = '"+Borrow_ID+"'");
Query.next();
if(Query.value(0).toString()!=NULL){
QDateTime current_date_time = QDateTime::currentDateTime();
QString current_date = current_date_time.toString("yyyy.MM.dd hh:mm:ss");
//qDebug() << current_date <<endl;
if(Query.value(8).toInt()==0){
QMessageBox::warning(this,"warning","The book you selected is out of stock!Try another one.",QMessageBox::Yes);
}else{
QSqlQuery Borrow;
Borrow.prepare("insert into borrow(cno,bno,borrow_date,return_date)" "values(?,?,?,?)");
Borrow.bindValue(0,data::ID);
Borrow.bindValue(1,Borrow_ID);
Borrow.bindValue(2,current_date);
Borrow.bindValue(3,NULL);
Borrow.exec();
QSqlQuery Stock_Update;
Stock_Update.exec("update book set stock = stock -1 where bno = '"+Borrow_ID+"'");
QMessageBox::warning(this,"warning","You have successfully borrowed the book: "+Query.value(2).toString(),QMessageBox::Yes);
}
QSqlQueryModel *model = new QSqlQueryModel;
model->setQuery("Select * from book where bno = '"+Borrow_ID+"'");
ui->tableView->setModel(model);
//ui->SearchResult->setModel(model);
ui->tableView->setAlternatingRowColors(true);
int row_count = model->rowCount();
for(int i;i<row_count;i++){
ui->tableView->setRowHeight(i,20);
}
//借书
}
else {
QMessageBox::warning(this,"Warning","Please Enter the correct ID if books!",QMessageBox::Yes);
}
}
}
void Borrow::on_Book_ID_Edit_textChanged(const QString &arg1)
{
QString match = "%";
QString Borrow_ID = ui->Book_ID_Edit->text();
match.append(Borrow_ID);
match.append("%");
QSqlQuery Query;
if(Borrow_ID!=NULL){
Query.exec("select * from book where bno like '"+match+"'");
Query.next();
if(Query.value(0).toString()!=NULL){
QSqlQueryModel *model = new QSqlQueryModel;
model->setQuery("Select * from book where bno like '"+match+"'");
ui->tableView->setModel(model);
//ui->SearchResult->setModel(model);
ui->tableView->setAlternatingRowColors(true);
int row_count = model->rowCount();
for(int i;i<row_count;i++){
ui->tableView->setRowHeight(i,20);
}
}
}
}
| [
"noreply@github.com"
] | noreply@github.com |
0e553b8e9c1ed3e0240600fff03751301fe434e3 | 6e57bdc0a6cd18f9f546559875256c4570256c45 | /packages/services/Car/evs/app/RenderPixelCopy.cpp | 0a586a4b42eb93771cdf729f48bf5fc3e1692cb9 | [] | no_license | dongdong331/test | 969d6e945f7f21a5819cd1d5f536d12c552e825c | 2ba7bcea4f9d9715cbb1c4e69271f7b185a0786e | refs/heads/master | 2023-03-07T06:56:55.210503 | 2020-12-07T04:15:33 | 2020-12-07T04:15:33 | 134,398,935 | 2 | 1 | null | 2022-11-21T07:53:41 | 2018-05-22T10:26:42 | null | UTF-8 | C++ | false | false | 5,188 | cpp | /*
* Copyright (C) 2017 The Android Open Source Project
*
* 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 "RenderPixelCopy.h"
#include "FormatConvert.h"
#include <log/log.h>
RenderPixelCopy::RenderPixelCopy(sp<IEvsEnumerator> enumerator,
const ConfigManager::CameraInfo& cam) {
mEnumerator = enumerator;
mCameraInfo = cam;
}
bool RenderPixelCopy::activate() {
// Set up the camera to feed this texture
sp<IEvsCamera> pCamera = mEnumerator->openCamera(mCameraInfo.cameraId.c_str());
if (pCamera.get() == nullptr) {
ALOGE("Failed to allocate new EVS Camera interface");
return false;
}
// Initialize the stream that will help us update this texture's contents
sp<StreamHandler> pStreamHandler = new StreamHandler(pCamera);
if (pStreamHandler.get() == nullptr) {
ALOGE("failed to allocate FrameHandler");
return false;
}
// Start the video stream
if (!pStreamHandler->startStream()) {
ALOGE("start stream failed");
return false;
}
mStreamHandler = pStreamHandler;
return true;
}
void RenderPixelCopy::deactivate() {
mStreamHandler = nullptr;
}
bool RenderPixelCopy::drawFrame(const BufferDesc& tgtBuffer) {
bool success = true;
sp<android::GraphicBuffer> tgt = new android::GraphicBuffer(
tgtBuffer.memHandle, android::GraphicBuffer::CLONE_HANDLE,
tgtBuffer.width, tgtBuffer.height, tgtBuffer.format, 1, tgtBuffer.usage,
tgtBuffer.stride);
// Lock our target buffer for writing (should be RGBA8888 format)
uint32_t* tgtPixels = nullptr;
tgt->lock(GRALLOC_USAGE_SW_WRITE_OFTEN, (void**)&tgtPixels);
if (tgtPixels) {
if (tgtBuffer.format != HAL_PIXEL_FORMAT_RGBA_8888) {
// We always expect 32 bit RGB for the display output for now. Is there a need for 565?
ALOGE("Diplay buffer is always expected to be 32bit RGBA");
success = false;
} else {
// Make sure we have the latest frame data
if (mStreamHandler->newFrameAvailable()) {
const BufferDesc& srcBuffer = mStreamHandler->getNewFrame();
// Lock our source buffer for reading (current expectation are for this to be NV21 format)
sp<android::GraphicBuffer> src = new android::GraphicBuffer(
srcBuffer.memHandle, android::GraphicBuffer::CLONE_HANDLE,
srcBuffer.width, srcBuffer.height, srcBuffer.format, 1, srcBuffer.usage,
srcBuffer.stride);
unsigned char* srcPixels = nullptr;
src->lock(GRALLOC_USAGE_SW_READ_OFTEN, (void**)&srcPixels);
if (!srcPixels) {
ALOGE("Failed to get pointer into src image data");
}
// Make sure we don't run off the end of either buffer
const unsigned width = std::min(tgtBuffer.width,
srcBuffer.width);
const unsigned height = std::min(tgtBuffer.height,
srcBuffer.height);
if (srcBuffer.format == HAL_PIXEL_FORMAT_YCRCB_420_SP) { // 420SP == NV21
copyNV21toRGB32(width, height,
srcPixels,
tgtPixels, tgtBuffer.stride);
} else if (srcBuffer.format == HAL_PIXEL_FORMAT_YV12) { // YUV_420P == YV12
copyYV12toRGB32(width, height,
srcPixels,
tgtPixels, tgtBuffer.stride);
} else if (srcBuffer.format == HAL_PIXEL_FORMAT_YCBCR_422_I) { // YUYV
copyYUYVtoRGB32(width, height,
srcPixels, srcBuffer.stride,
tgtPixels, tgtBuffer.stride);
} else if (srcBuffer.format == tgtBuffer.format) { // 32bit RGBA
copyMatchedInterleavedFormats(width, height,
srcPixels, srcBuffer.stride,
tgtPixels, tgtBuffer.stride,
tgtBuffer.pixelSize);
}
mStreamHandler->doneWithFrame(srcBuffer);
}
}
} else {
ALOGE("Failed to lock buffer contents for contents transfer");
success = false;
}
if (tgtPixels) {
tgt->unlock();
}
return success;
}
| [
"dongdong331@163.com"
] | dongdong331@163.com |
c490970bf6eeeb9e8a6a61932e77396c70af06f1 | 4a4b1cd18d4f65136252dc2c00265df403976668 | /Sandbox/src/Engine/Core/Application.h | e122c8709e216899e0497a641a70733656d87367 | [] | no_license | GMascetti04/AP-CSP-Create-PT-2021 | 826ebe7eb15dad840c0f48fbf4b9bd38fb907425 | 43ee3e0b1eeffea4b8aab55b876b424396dcdcf1 | refs/heads/master | 2023-06-01T13:03:58.121690 | 2021-06-15T01:00:26 | 2021-06-15T01:00:26 | 376,989,462 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 415 | h | #pragma once
#include "xpch.h"
#include "Window.h"
#include "Scene.h"
namespace application {
Window* getWindow();
void SetActiveScene(const char* sceneName);
Scene& getActiveScene();
Scene& getScene(const char* sceneName);
void createScene(const char* sceneName);
void deleteScene(const char* sceneName);
}
struct ApplicationProperties {
const char* title;
unsigned int width;
unsigned int height;
}; | [
"46876467+GMascetti04@users.noreply.github.com"
] | 46876467+GMascetti04@users.noreply.github.com |
54b6fbf34261f4c4877264738c5f30b501f2e0fe | 51635684d03e47ebad12b8872ff469b83f36aa52 | /external/gcc-12.1.0/libstdc++-v3/testsuite/experimental/polymorphic_allocator/pmr_typedefs_set.cc | 2476d7a0dd5493eea15d77503a13ff13f7eb3f7a | [
"LGPL-2.1-only",
"GPL-3.0-only",
"GCC-exception-3.1",
"GPL-2.0-only",
"LGPL-3.0-only",
"LGPL-2.0-or-later",
"Zlib",
"LicenseRef-scancode-public-domain"
] | permissive | zhmu/ananas | 8fb48ddfe3582f85ff39184fc7a3c58725fe731a | 30850c1639f03bccbfb2f2b03361792cc8fae52e | refs/heads/master | 2022-06-25T10:44:46.256604 | 2022-06-12T17:04:40 | 2022-06-12T17:04:40 | 30,108,381 | 59 | 8 | Zlib | 2021-09-26T17:30:30 | 2015-01-31T09:44:33 | C | UTF-8 | C++ | false | false | 1,205 | cc | // Copyright (C) 2018-2022 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
// { dg-do compile { target c++14 } }
#include <experimental/set>
namespace xpmr = std::experimental::pmr;
struct X { };
struct Cmp { bool operator()(X, X) const { return false; } };
static_assert(std::is_same<xpmr::set<X>,
std::set<X, std::less<X>, xpmr::polymorphic_allocator<X>>>::value,
"pmr::set");
static_assert(std::is_same<xpmr::set<X, Cmp>,
std::set<X, Cmp, xpmr::polymorphic_allocator<X>>>::value,
"pmr::set");
| [
"rink@rink.nu"
] | rink@rink.nu |
17e38ac9a07efb60e0ff90e973ff91ac4eb08d1d | 32983d47a0715deec9da6651910961582b68e459 | /Semester2/Laba3/Variant14/Variant14.cpp | f7592cc3651960e00b6f601a458faccf39a34b7a | [] | no_license | afrochonsp/OAiP | 8729dc6b3350e889d05b3a9c33aea5f56e606374 | 7d967c605c0916349b8f2ddffe9a6d4082c41af9 | refs/heads/main | 2023-07-15T10:15:11.078463 | 2021-08-20T23:15:05 | 2021-08-20T23:15:05 | 398,412,278 | 0 | 0 | null | 2021-08-20T22:59:18 | 2021-08-20T22:18:44 | null | UTF-8 | C++ | false | false | 736 | cpp | #include <iostream>
using namespace std;
int F_R(int);
int F(int);
int main()
{
system("chcp 1251");
system("cls");
Start:
int n, k, input;
float result = 1;
cout << "Введите первое число: ";
cin >> n;
cout << "Введите второе число: ";
cin >> k;
cout << "\n" << "Использовать рекурсивную функцию? (да - 1, нет - 2)\n";
cin >> input;
if (input == 1) result = F_R(n) / F_R(k) / F_R(n - k);
else result = F(n) / F(k) / F(n - k);
cout << "Результат : " << result << "\n\n";
goto Start;
}
int F_R(int n)
{
return (n == 0) ? 1 : n * F_R(n - 1);
}
int F(int n)
{
int result = 1;
for (int i = 1; i <= n; i++) result *= i;
return result;
} | [
"afrochonsp@gmail.com"
] | afrochonsp@gmail.com |
1fd59711e1b3297ebbe7e929849d747f250dc38f | 44f3cf344c103f25f5a74dd17fba799a4586549a | /arduino_config/ULTRASONICO_IOT/ULTRASONICO_ITO/ULTRASONICO_ITO.ino | 60e29facf12430a8dfdd325c3fb3ee3cab253a43 | [] | no_license | AbrahamUrcia/RobotconsensorUltrasonido | 52154593920aa6dbb83b3ee4781b868414649107 | b4e8cb4f5d1501a2064f5aa0fdb129b5b902f10b | refs/heads/master | 2020-04-23T19:28:59.300869 | 2019-02-22T20:07:31 | 2019-02-22T20:07:31 | 171,405,645 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,382 | ino | #include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <ESP8266WebServer.h>
#include <WebSocketsServer.h>
#include <Hash.h>
#include <FS.h>
const char* ssid = "byskriom2018";
const char* password = "Skriom2018$%&";
#define TRIGGER 14 //D5
#define ECHO 12 //D6
long duracion=0;
int16_t distancia= 0;
int16_t ultimoValor = 0;
uint8_t contador = 0;
WebSocketsServer webSocket = WebSocketsServer(81);
ESP8266WebServer server(80);
void setup(void){
delay(1000);
Serial.begin(115200);
pinMode(TRIGGER, OUTPUT);
pinMode(ECHO, INPUT);
pinMode(BUILTIN_LED, OUTPUT);
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
IPAddress myIP = WiFi.localIP();
Serial.print("IP: ");
Serial.println(myIP);
SPIFFS.begin();
webSocket.begin();
webSocket.onEvent(webSocketEvent);
server.onNotFound([](){
if(!handleFileRead(server.uri()))
server.send(404, "text/plain", "Archivo no encontrado");
});
server.begin();
Serial.println("Servidor HTTP iniciado");
}
void loop(void) {
webSocket.loop();
server.handleClient();
contador++;
if (contador == 255) {
contador = 0;
digitalWrite(TRIGGER, LOW);
delayMicroseconds(2);
digitalWrite(TRIGGER, HIGH);
delayMicroseconds(10);
digitalWrite(TRIGGER, LOW);
duracion = pulseIn(ECHO, HIGH);
distancia = (duracion/2) / 29.1;
if (distancia < 0) distancia = 0;
if (distancia != ultimoValor) {
String msj = String(distancia);
webSocket.broadcastTXT(msj);
}
ultimoValor = distancia;
}
}
void webSocketEvent(uint8_t num, WStype_t type, uint8_t * payload, size_t lenght) {
switch(type) {
case WStype_DISCONNECTED: {
Serial.printf("Usuario #%u - Desconectado\n", num);
break;
}
case WStype_CONNECTED: {
IPAddress ip = webSocket.remoteIP(num);
Serial.printf("Nueva conexión: %d.%d.%d.%d Nombre: %s ID: %u\n", ip[0], ip[1], ip[2], ip[3], payload, num);
String msj = String(ultimoValor);
webSocket.broadcastTXT(msj);
break;
}
case WStype_TEXT: {
break;
}
}
}
String getContentType(String filename){
if(server.hasArg("download")) return "application/octet-stream";
else if(filename.endsWith(".htm")) return "text/html";
else if(filename.endsWith(".html")) return "text/html";
else if(filename.endsWith(".css")) return "text/css";
else if(filename.endsWith(".js")) return "application/javascript";
else if(filename.endsWith(".png")) return "image/png";
else if(filename.endsWith(".gif")) return "image/gif";
else if(filename.endsWith(".jpg")) return "image/jpeg";
else if(filename.endsWith(".ico")) return "image/x-icon";
else if(filename.endsWith(".xml")) return "text/xml";
else if(filename.endsWith(".pdf")) return "application/x-pdf";
else if(filename.endsWith(".zip")) return "application/x-zip";
else if(filename.endsWith(".gz")) return "application/x-gzip";
return "text/plain";
}
bool handleFileRead(String path){
#ifdef DEBUG
Serial.println("handleFileRead: " + path);
#endif
if(path.endsWith("/")) path += "index.html";
if(SPIFFS.exists(path)){
File file = SPIFFS.open(path, "r");
size_t sent = server.streamFile(file, getContentType(path));
file.close();
return true;
}
return false;
}
| [
"nikolasgamertv@gmail.com"
] | nikolasgamertv@gmail.com |
97f8b28391b1bec1dd07f316e3c603b0bcd531a6 | cdd6500598b1d41d0652b7442e70ad465573655f | /SPOJ/GSS4/solution.cpp | fe41c8cfec97f08881d569561bc47d05af23817d | [] | no_license | svaderia/Competitive-Coding | c491ad12d95eded97fb6287f5c16a5320f3574a7 | f42eb61c880c3c04e71e20eb0a0f1258e81629b1 | refs/heads/master | 2021-06-26T10:36:54.581095 | 2021-01-05T21:00:17 | 2021-01-05T21:00:17 | 185,184,785 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,427 | cpp | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace std;
typedef long long int lli;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<lli> vli;
typedef vector<pii> vii;
typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> OrderedSet;
const int MOD = 1e9 + 7;
const double PI = acos(-1.0);
#define fastio ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)
#define sz(a) int((a).size())
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define eb emplace_back
#define all(c) (c).begin(),(c).end()
#define tr(c,i) for(auto &i : c)
#define present(c,x) ((c).find(x) != (c).end())
#define cpresent(c,x) (find(all(c),x) != (c).end())
#define rep(i, n) for(int i = 0; i < (n); ++i)
#define repA(i, a, n) for(int i = a; i <= (n); ++i)
#define repD(i, a, n) for(int i = a; i >= (n); --i)
#define fill(a) memset(a, 0, sizeof (a))
#define error(x) cerr << #x << " = " << (x) << endl
#define errorp(p) cerr << #p << " = " << (p.first) << ", " << (p.second) << endl
template<typename T> T gcd(T a, T b){return(b?__gcd(a,b):a);}
template <typename T> T lcm(T a, T b){return (a*b)/gcd(a,b); }
int mul(int a, int b, int c){lli res=(lli)a*b;return (int)(res>=c?res%c:res);}
template<typename T>T power(T e, T n, T m){T x=1,p=e;while(n){if(n&1)x=mul(x,p,m);p=mul(p,p,m);n>>=1;}return x;}
int mod_neg(int a, int b, int c){int res;if(abs(a-b)<c)res=a-b;else res=(a-b)%c;return(res<0?res+c:res);}
template<typename T>T extended_euclid(T a, T b, T &x, T &y){T xx=0,yy=1;y=0;x=1;while(b){T q=a/b,t=b;b=a%b;a=t;\
t=xx;xx=x-q*xx;x=t;t=yy;yy=y-q*yy;y=t;}return a;}
template<typename T>T mod_inverse(T a, T n){T x,y,z=0;T d=extended_euclid(a,n,x,y);return(d>1?-1:mod_neg(x,z,n));}
template <class T> inline void smax(T &x,T y){ x = max((x), (y));}
template <class T> inline void smin(T &x,T y){ x = min((x), (y));}
struct node{
lli data;
bool flag;
void assign(lli val){
data = val;
flag = val == 1;
}
}typedef node;
vector<node> seg;
int N;
vli arr;
//Complexity: O(1)
//Stores what info. segment[i..j] should store
node merge(node &left, node &right){
node temp;
temp.data = left.data + right.data;
temp.flag = (left.flag && right.flag) ? true : false;
return temp;
}
//Complexity: O(n)
void build(int id = 1, int l = 0, int r = N){
if(r - l < 2){
//base case : leaf node information to be stored here
seg[id].assign(arr[l]);
return;
}
int mid = (l + r) / 2;
int left = 2 * id, right = left + 1;
build(left, l, mid);
build(right, mid, r);
seg[id] = merge(seg[left], seg[right]);
}
//Complexity: O(log n)
void update(int x, int y, int id = 1, int l = 0, int r = N){
if(r <= x || y <= l){
return;
}
if(seg[id].flag){
return;
}
if(r - l < 2){
//base case : leaf node information to be stored here
lli new_val = lli(floor(sqrt(seg[id].data)));
// error(l);
// error(new_val);
seg[id].assign(new_val);
return;
}
int mid = (l + r) / 2;
int left = 2 * id, right = left + 1;
update(x, y, left, l, mid);
update(x, y, right, mid, r);
seg[id] = merge(seg[left], seg[right]);
}
//Complexity: O(log n)
node query(int x, int y, int id = 1, int l = 0, int r = N){
if(r <= x || y <= l){ // No overlap, return useless
node temp;
temp.assign(0);
return temp;
}
if(x <= l && r <= y){ // overlap
return seg[id];
}
int mid = (l + r) / 2;
int left = 2 * id, right = left + 1;
node a = query(x, y, left, l, mid);
node b = query(x, y, right, mid, r);
return merge(a, b);
}
int main(){
#ifndef ONLINE_JUDGE
freopen("test", "r", stdin);
#endif
fastio;
int T = 1;
while(cin >> N){
cout << "Case #" << T << ":" << "\n";
arr.resize(N);
seg.resize(4 * N);
rep(i, N){
cin >> arr[i];
}
build();
int q;
cin >> q;
int l, r, which;
rep(i, q){
cin >> which >> l >> r;
if(l > r) swap(l, r);
if(which == 1){
cout << query(l - 1, r).data << "\n";
}else{
update(l - 1, r);
}
}
cout << "\n";
T++;
}
return 0;
}
| [
"vaderiashyamal@gmail.com"
] | vaderiashyamal@gmail.com |
ff6858820c128febb9aa5dcec8d51fe97d679bd4 | 771f413024868ca431f95b06884c91bff34a6ce4 | /maths/3sum.cpp | 8ae3bb1ef7736f0a98ea823b4f911d8701f03546 | [] | no_license | invrev/fft | eee6258f20f70576501c4465dd41123b7b326514 | e4e2f279f5a4156202d19519c1a7d4b4586219c3 | refs/heads/master | 2020-06-14T12:23:57.283918 | 2016-11-28T23:56:03 | 2016-11-28T23:56:03 | 75,024,923 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,214 | cpp |
vector<vector<int>> threeSum(vector<int>& nums) {
int len = nums.size();
if(len <=2) return {};
sort(nums.begin(),nums.end());
vector<vector<int>> result;
for(int i=0;i<len;i++) {
int target = -nums[i];
int ltIdx = i+1;
int rtIdx = len-1-i;
while(ltIdx < rtIdx) {
if(nums[ltIdx] + nums[rtIdx] > target) {
rtIdx -= 1;
} else if (nums[ltIdx] + nums[rtIdx] < target) {
ltIdx += 1;
} else {
result.push_back(vector<int>{nums[i], nums[ltIdx], nums[rtIdx]});
while( ltIdx < rtIdx && nums[ltIdx] == nums[ltIdx+1]) {
ltIdx += 1;
}
while(ltIdx < rtIdx && nums[rtIdx] == nums[rtIdx-1]) {
rtIdx -= 1;
}
}
}
while(nums[i] == -target) {
i++;
if(i == len) {
break;
}
}
}
return result;
}
vector<vector<int> > threeSum(vector<int> &num) {
vector<vector<int> > res;
std::sort(num.begin(), num.end());
for (int i = 0; i < num.size(); i++) {
int target = -num[i];
int front = i + 1;
int back = num.size() - 1;
while (front < back) {
int sum = num[front] + num[back];
// Finding answer which start from number num[i]
if (sum < target)
front++;
else if (sum > target)
back--;
else {
vector<int> triplet(3, 0);
triplet[0] = num[i];
triplet[1] = num[front];
triplet[2] = num[back];
res.push_back(triplet);
// Processing duplicates of Number 2
// Rolling the front pointer to the next different number forwards
while (front < back && num[front] == triplet[1]) front++;
// Processing duplicates of Number 3
// Rolling the back pointer to the next different number backwards
while (front < back && num[back] == triplet[2]) rear--;
}
}
// Processing duplicates of Number 1
while (i + 1 < num.size() && num[i + 1] == num[i])
i++;
}
return res;
}
| [
"vikram@vikram-VirtualBox.(none)"
] | vikram@vikram-VirtualBox.(none) |
30cbe124af7a000a381f97e18f9c3a327037e191 | 1423bce054b5dc22ba65cb99dce6cc53ab174b95 | /Cage.h | 67a6528b5e20d8a384be184a25911db94e89d043 | [] | no_license | Aamna-Izhar-96/ANGRY-BIRD- | 698d2e626b8af1f76661648e6a3bf03ceb03bdd3 | d30882da671fa2dbad79eada1eab3e04781c101b | refs/heads/master | 2020-04-11T03:51:36.510531 | 2018-12-12T14:34:11 | 2018-12-12T14:34:11 | 161,492,037 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 5,423 | h | #pragma once
#include <glut.h>
#include <vector>
//#include "Point.h"
class Cage
{
public:
int openLid=0;
float posX;
float posY;
float size;
void DrawCage(float x, float y, float size,int open);
std::vector<Point2> LockPts;
std::vector<Point2> CagePts;
void ngon(int n, float cx, float cy, float radius, float angle);
void DrawLock( float cx,float cy,float size);
void StoreLockPts();
void storeCagePts();
float cx;
float cy;
float radius;
int IsVisible = 1;;
};
void Cage::DrawCage(float x, float y, float size,int open)
{
this->posX = x;
this->posY = y;
this->openLid = open;
this->size = size;
if (this->IsVisible == 1)
{
// Vertex of Cage
glColor3f(0.52156, 0.24705, 0.094117); // Brown color
glLineWidth(5.0);
glBegin(GL_LINES);
glVertex2f((-1 + x)*size, (-1.5 + y)*size); // left wall
glVertex2f((-1 + x)*size, (1.5 + y)*size);
glVertex2f((1 + x)*size, (-1.5 + y)*size); // right wall
glVertex2f((1 + x)*size, (1.5 + y)*size);
glEnd();
// bars
glLineWidth(2.0);
glBegin(GL_LINES);
glVertex2f((-0.7 + x)*size, (-1.5 + y)*size);
glVertex2f((-0.7 + x)*size, (1.5 + y)*size);
glVertex2f((-0.2 + x)*size, (-1.5 + y)*size);
glVertex2f((-0.2 + x)*size, (1.5 + y)*size);
glVertex2f((0.2 + x)*size, (-1.5 + y)*size);
glVertex2f((0.2 + x)*size, (1.5 + y)*size);
glVertex2f((0.7 + x)*size, (-1.5 + y)*size);
glVertex2f((0.7 + x)*size, (1.5 + y)*size);
glEnd();
glColor3f(0.52156, 0.24705, 0.094117);
glLineWidth(7.0);
glBegin(GL_LINES);
glVertex2f((-1.3 + x)*size, (-1.5 + y)*size); // bottom wall
glVertex2f((1.3 + x)*size, (-1.5 + y)*size);
glEnd();
glLineWidth(7.0);
glBegin(GL_LINES);
if (open == 0) // to open roof
{
glVertex2f((-1.3 + x)*size, (1.5 + y)*size);
glVertex2f((1.3 + x)*size, (1.5 + y)*size);
glEnd();
}
}
}
void Cage::ngon(int n, float cx, float cy, float radius, float rotAngle)
{ // assumes global Canvas object, cvs
if (n < 3) return; // bad number of sides
double angle = rotAngle * 3.14159265 / 180; // initial angle
double angleInc = 2 * 3.14159265 / n; //angle increment
glBegin(GL_POLYGON);
glVertex2f(radius + cx, cy);
for (int k = 0; k <= n; k++) // repeat n times
{
angle += angleInc;
glVertex2f(radius * cos(angle) + cx, radius * sin(angle) + cy);
/*Point2 pt;
pt.set(radius * cos(angle) + cx, radius * sin(angle) + cy);
LockPts.push_back(pt);
*/
}
glEnd();
}
void Cage::DrawLock(float cx,float cy,float size)
{
glColor3f(1, 1, 0.0667);
this->cx = cx;
this->cy = cy;
this->radius = size;
int n = 40;
float rotAngle = 0;
float radius = size;
// assumes global Canvas object, cvs
if (n < 3) return; // bad number of sides
double angle = rotAngle * 3.14159265 / 180; // initial angle
double angleInc = 2 * 3.14159265 / n; //angle increment
glBegin(GL_POLYGON);
glVertex2f(radius + cx, cy);
for (int k = 0; k <= n; k++) // repeat n times
{
angle += angleInc;
glVertex2f(radius * cos(angle) + cx, radius * sin(angle) + cy);
/*Point2 pt;
pt.set(radius * cos(angle) + cx, radius * sin(angle) + cy);
LockPts.push_back(pt);
*/
}
glEnd();
glColor3f(0.192, 0.192, 0);
ngon(4,cx,cy,size/2,45);
}
void Cage::StoreLockPts()
{
int n = 40;
float rotAngle = 0;
float radius = this->radius;
float cx = this->cx;
float cy = this->cy;
// assumes global Canvas object, cvs
if (n < 3) return; // bad number of sides
double angle = rotAngle * 3.14159265 / 180; // initial angle
double angleInc = 2 * 3.14159265 / n; //angle increment
glVertex2f(radius + cx, cy);
for (int k = 0; k <= n; k++) // repeat n times
{
angle += angleInc;
/*glVertex2f(radius * cos(angle) + cx, radius * sin(angle) + cy);
*/
Point2 pt;
pt.set(radius * cos(angle) + cx, radius * sin(angle) + cy);
this->LockPts.push_back(pt);
}
}
void Cage::storeCagePts()
{
float x = this->posX;
float y = this->posY;
float size = this->size;
Point2 p[16];
// Vertex of Cage
glLineWidth(5.0);
glBegin(GL_LINES);
// left wall
p[0].set((-1 + x)*size, (-1.5 + y)*size);
p[1].set((-1 + x)*size, (1.5 + y)*size);
// right wall
p[2].set((1 + x)*size, (-1.5 + y)*size);
p[3].set((1 + x)*size, (1.5 + y)*size);
glEnd();
// bars
glLineWidth(2.0);
glBegin(GL_LINES);
p[4].set((-0.7 + x)*size, (-1.5 + y)*size);
p[5].set((-0.7 + x)*size, (1.5 + y)*size);
p[6].set((-0.2 + x)*size, (-1.5 + y)*size);
p[7].set((-0.2 + x)*size, (1.5 + y)*size);
p[8].set((0.2 + x)*size, (-1.5 + y)*size);
p[9].set((0.2 + x)*size, (1.5 + y)*size);
p[10].set((0.7 + x)*size, (-1.5 + y)*size);
p[11].set((0.7 + x)*size, (1.5 + y)*size);
glEnd();
glLineWidth(7.0);
glBegin(GL_LINES);
// bottom wall
p[12].set((-1.3 + x)*size, (-1.5 + y)*size);
p[13].set((1.3 + x)*size, (-1.5 + y)*size);
glEnd();
glLineWidth(7.0);
glBegin(GL_LINES);
if (this->openLid == 0) // to open roof
{
p[14].set((-1.3 + x)*size, (1.5 + y)*size);
p[15].set((1.3 + x)*size, (1.5 + y)*size);
glEnd();
}
for (int i = 0; i < 16;i++)
{
this->CagePts.push_back(p[i]);
}
} | [
"noreply@github.com"
] | noreply@github.com |
8ca578055f6b64527136fce28b0596a171af670d | 36006487fbed2c19a2367e968afc11e76a55bb95 | /Codeforces/1341D.cpp | c6da7d350717e96e47ffbc8e4f9a04fc4d195fb2 | [] | no_license | AkVaya/CP_Solutions | 99bd280470997f048ca2ee9b9dda83488d19ca7e | 60fd900aad28caf34b15b75ce736141dbc074d9f | refs/heads/master | 2021-09-27T13:57:38.897747 | 2021-09-16T16:43:55 | 2021-09-16T16:43:55 | 232,780,223 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,305 | cpp | #include<iostream>
#include<math.h>
#include<algorithm>
#include<stdlib.h>
#include<stack>
#include<set>
#include<string.h>
#include<map>
#include<bitset>
#include<vector>
#include<iomanip>
#include<queue>
#include<unordered_set>
//#define endl '\n'
#define Fir first
#define Sec second
#define pb emplace_back
#define ins insert
#define mp make_pair
#define max3(a,b,c) max(c,max(a,b))
#define fr(i,a,b) for (int i = a; i < b; ++i)
#define min3(a,b,c) min(c,min(a,b))
#define all(x) x.begin(),x.end()
#define LB lower_bound
#define UB upper_bound
// order_of_key(val): returns the number of values less than val
// find_by_order(k): returns an iterator to the kth largest element (0-base)
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
#define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update>
typedef long long ll ;
const ll M =1e9+7;
const ll nax=1e3+69;
const ll inf=9e18+69;
using pii = pair<ll,ll>;
char a[nax][nax];
void solve(){
ll n,k;
cin>>n>>k;
map<ll,string> m;
m[0]="1110111";
m[1]="0010010";
m[2]="1011101";
m[3]="1011011";
m[4]="0111010";
m[5]="1101011";
m[6]="1101111";
m[7]="1010010";
m[8]="1111111";
m[9]="1111011";
string s[n];
vector<vector<ll> > diff(n,vector<ll>(10));
for( int i = 0; i < n; ++i){
cin>>s[i];
for( int digit = 0; digit < 10; ++digit){
for( int x = 0; x < 7; ++x){
char curr=s[i][x];
char target=m[digit][x];
if(curr=='1' && target=='0'){
diff[i][digit]=-1;
break;
}
if( curr=='0' && target=='1')
diff[i][digit]++;
}
}
}
vector<vector<ll> >dp(n+1,vector<ll>(k+1,0));
dp[n][0]=1;
for( int i = n; i > 0; --i){
for( int j = 0; j <= k; ++j){
if(dp[i][j]){
for( int x = 0; x < 10; ++x){
if(diff[i-1][x]!=-1 && j+diff[i-1][x]<=k){
dp[i-1][j+diff[i-1][x]]=1;
}
}
}
}
}
//cout<<"DP"<<endl;
if(dp[0][k]==0){
cout<<-1<<endl;
return;
}
//cout<<"YAHA"<<endl;
for( int i = 0; i < n; ++i ){
ll curr=-1;
for( int digit = 9; digit >= 0; --digit){
if(diff[i][digit]!=-1 && diff[i][digit]<=k && dp[i+1][k-diff[i][digit]]>0){
curr=digit;
k-=diff[i][digit];
break;
}
}
if(curr==-1){
cout<<-1<<endl;
return;
}
cout<<curr;
}
cout<<endl;
}
int main(){
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
//#ifndef ONLINE_JUDGE
// freopen("input.txt", "r", stdin);
// freopen("output.txt", "w", stdout);
//#endif
//clock_t t3 = clock();
ll t=1,t1=1;
//cin>>t;
while(t--){
//cout<<"Case #"<<t1++<<": ";
solve();
}
//clock_t t2 = clock();
//cout << "Time-Taken: " << ((t2 - t3) / (double)CLOCKS_PER_SEC) << endl;
//cout << CLOCKS_PER_SEC << endl;
return 0 ;
} | [
"akshat.18je0072@am.iitism.ac.in"
] | akshat.18je0072@am.iitism.ac.in |
944d2f0b66a4eff2480dcfe56a77086db9b60763 | 7cb7b85a5f5cd2f329a62ae4215a71676858befa | /Graphics.CPP | a21ed8ccca888ceb2b83b9cfb2a10e9f9dda4505 | [] | no_license | yogeshwar1996/GraphicsinC | 70dc87bfaeceea658a7c9939ed2e733d6eca4526 | 4095bb6cb87e2e68b1a7e451747f1f6b0b5072fe | refs/heads/master | 2021-10-08T13:10:23.786627 | 2018-12-12T16:30:18 | 2018-12-12T16:30:18 | 115,510,861 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 46,907 | cpp | #define ON 1
#define OFF 0
#define YES 1
#define NO 2
#define CANCEL 3
#define CLOSE 4
#define OK 5
#include<math.h>
#include<time.h>
#include<stdio.h>
#include<stdlib.h>
#include<conio.h>
#include<graphics.h>
#include<dos.h>
#include<alloc.h>
char *menu[]= {" Algo"," Region"," Color"," Car"," Width"," Tranformation"," LineFill"," Clipping"};
char *menuvA[]= {"Simple DDA","Symmetric DDA","Bresenham","MidpointLine","Circle","Ellipse"};
char *menuvQ[]= {"-X +Y","+X +Y","+X -Y","-X -Y"};
char *menuvCol[]= {"Yellow","Orange","Red","Green","Black"};
char *menuvCar[]= {"Sound","No Sound"};
char *menuvW[]= {"Size 3","Size5"};
char *menuvT[]= {"Tran.Line","Tran.poly","Reflection","Scaling","Rotation"};
char *menuvS[]= {"3","4","5","6","7"};
char *menuvL[]= {"Weiler","Hodgeman","LineClip"};
union REGS i,o;
struct SREGS s;
void getcoordinates_(int *x_,int *y_);
void getcoordinates(int *x,int *y);
void circle_(int r, int x_o,int y_o,int color);
void DDALine(int x1,int y1,int x2,int y2,int iColor,int quadrant);
void SymDDALine(int x1,int y1,int x2,int y2,int iColor,int quadrant);
void bresenham(int x1,int y1,int x2,int y2,int color,int quadrant);
void midpoint(int x1,int y1,int x2,int y2,int color,int quadrant);
void pattern(int quandrant,int x1,int x2,int y1,int y2);
void car();
//initalisation of mouse................
void flood(int x,int y, int fill_col, int old_col)
{
if(getpixel(x,y)==7)
{
delay(1);
putpixel(x,y,fill_col);
flood(x+1,y,fill_col,old_col);
flood(x-1,y,fill_col,old_col);
flood(x,y+1,fill_col,old_col);
flood(x,y-1,fill_col,old_col);
}
}
initmouse()
{
i.x.ax=0;
int86(0x33,&i,&o);
return(o.x.ax);
}
showmouseptr()
{
i.x.ax=1;
int86(0x33,&i,&o);
return(o.x.ax);
}
hidemouseptr()
{
i.x.ax=2;
int86(0x33,&i,&o);
return(o.x.ax);
}
////// /------------/////
//Function to get mouse position
getmousepos(int *button,int *x,int *y)
{
i.x.ax=3;
int86(0x33,&i,&o);
*button=o.x.bx;
*x=o.x.cx;
*y=o.x.dx;
}
////////-----------///////
//Function to display a corner button
corner_button(int x,int y)
{
setcolor(WHITE);
setfillstyle(SOLID_FILL,7);
settextstyle(SMALL_FONT,0,6);
rectangle(x-5,y-3,x+8,y+8);
setcolor(8);
rectangle(x-4,y-2,x+9,y+9);
bar(x-4,y-2,x+8,y+8);
}
//////////-------////////////
//Function to display a close button
close_button(int x,int y)
{
corner_button(x,y);
setcolor(BLACK);
outtextxy(x-1,y-9,"x");
outtextxy(x-2,y-9,"x");
} ///////---------////////////
//Function to display a minimise button
minimise_button(int x,int y)
{
corner_button(x,y);
setcolor(WHITE);
outtextxy(x-1,y-9,"_");
setcolor(BLACK);
outtextxy(x-1,y-10,"_");
} ////------------/////////
//Function to display a maximise button
maximize_button(int x,int y)
{
corner_button(x,y);
setcolor(WHITE);
line(x-2,y-1,x+6,y-1);
setcolor(BLACK);
rectangle(x-2,y,x+6,y+7);
} ///////-------//////
//Function to draw main window
main_g_window(char *str,int x1,int y1,int x2,int y2,int c)
{
int button,x,y;
setcolor(BLACK);
rectangle(x1,y1+1,x2+1,y2+1);
setcolor(8);
rectangle(x1,y1+1,x2,y2);
setcolor(WHITE);
rectangle(x1,y1,x2-1,y2-1);
setfillstyle(SOLID_FILL,7);
bar(x1+1,y1+1,x2-1,y2-1);
setfillstyle(SOLID_FILL,c);
bar(x1+3,y1+3,x2-3,y1+19);
settextstyle(SMALL_FONT,0,5);
setcolor(WHITE);
outtextxy(x1+25,y1+2,str);
setcolor(YELLOW);
outtextxy(x1+7,y1,"/");
outtextxy(x1+8,y1,"/");
outtextxy(x1+9,y1+2,"/");
outtextxy(x1+10,y1+2,"/");
outtextxy(x1+11,y1+4,"/");
outtextxy(x1+12,y1+4,"/");
minimise_button(x2-48,y1+8);
maximize_button(x2-32,y1+8);
close_button(x2-15,y1+8);
setfillstyle(SOLID_FILL,7);
bar(x1+5,y1+42,x2-7,y2-23);
setcolor(8);
line(x1+4,y1+41,x2-5,y1+41);
line(x1+4,y1+41,x1+4,y2-21);
setcolor(BLACK);
line(x1+5,y1+42,x2-6,y1+42);
line(x1+5,y1+42,x1+5,y2-22);
setcolor(WHITE);
line(x1+4,y2-20,x2-5,y2-20);
line(x2-4,y1+41,x2-4,y2-20);
settextstyle(SMALL_FONT,0,4);
setcolor(BLACK);
line(315,55,320,50);
line(325,55,320,50);
line(320,50,320,450);
outtextxy(330,60,"Y-axis");
//line passing from mid way of the screen vertically (y aixs)
line(315,445,320,450);
line(325,445,320,450);
///////////////////////////////////////////////////////////////////////////
line(25,235,20,240);
line(25,245,20,240);
line(20,240,620,240);
outtextxy(550,225,"X-axis");
//line passing from mid way of the screen horizontally (x axis)
line(615,235,620,240);
line(615,245,620,240);
getmousepos(&button,&x,&y);
if(x>=x2-20 && x<=x2-6 && y>=y1+5 && y<=y1+17)
{
if((button & 1)==1)
{
hidemouseptr();
exit(0);
}
//..exit from the project on clicking the close button in top right corner
}
}
///////////----------------/////////////////////
//Function to display horizontal menu
displaymenuh(char **menu,int count,int x1,int y1)
{
int i,tw,xc;
xc=x1;
setfillstyle(SOLID_FILL,7);
bar(x1-3,y1,x1+500,y1+17);
settextstyle(SMALL_FONT,0,4);
setcolor(BLACK);
for(i=0; i<count; i++)
{
tw=textwidth(menu[i]);
outtextxy(xc,y1+2,menu[i]);
xc=xc+tw+10;
}
}
//////////--------////////////
//Function to highlight menu item
highlight (char **menu,int ch,int x1,int y1)
{
int xc=x1,tw,tw1,i;
for(i=1; i<=ch; i++)
{
xc=xc+textwidth(menu[i-1])+10;
}
tw=textwidth(menu[ch-1]);
setcolor(WHITE);
line(xc-10-tw,y1,xc,y1);
line(xc-10-tw,y1,xc-10-tw,y1+17);
setcolor(8);
line(xc-10-tw,y1+17,xc,y1+17);
line(xc,y1,xc,y1+17);
}
//////--------------///////////////
//Function to highlight selected menu
highlight_select(char **menu,int ch,int x1,int y1)
{
int xc=x1,tw,tw1,i;
for(i=1; i<=ch; i++)
{
xc=xc+textwidth(menu[i-1])+10;
}
tw=textwidth(menu[ch-1]);
setcolor(8);
line(xc-10-tw,y1,xc,y1);
line(xc-10-tw,y1,xc-10-tw,y1+17);
setcolor(WHITE);
line(xc-10-tw,y1+17,xc,y1+17);
line(xc,y1,xc,y1+17);
}
//////--------------///////////////
//Function to dehighlight menu item
dehighlight(char **menu,int ch,int x1,int y1)
{
int xc=x1,tw,tw1,i;
for(i=1; i<=ch; i++)
{
xc=xc+textwidth(menu[i-1])+10;
}
tw=textwidth(menu[ch-1]);
setcolor(7);
line(xc-10-tw,y1,xc,y1);
line(xc-10-tw,y1,xc-10-tw,y1+17);
setcolor(7);
line(xc-10-tw,y1+17,xc,y1+17);
line(xc,y1,xc,y1+17);
}
//////--------------///////////////
//Function to get mouse response on horizontal menu
getresponseh(char **menu,int count,int x1,int y1)
{
int choice=1,prevchoice=0,x,y,x2,y2,button;
int in,i,h,tw,xc;
h=textheight(menu[0]);
y2=y1+h+6;
x2=x1;
displaymenuh(menu,count,x1,y1);
for(i=0; i<count; i++)
{
x2=x2+textwidth(menu[i])+10;
}
showmouseptr();
while(1)
{
getmousepos(&button,&x,&y);
getmousepos(&button,&x,&y);
//if mouse goes out of view then hide it
if(x>=630-20 && x<=630-6 && y>=5+5 && y<=5+17)
{
if((button & 1)==1)
{
hidemouseptr();
exit(0);
}
}
settextstyle(SMALL_FONT,0,4);
//if position of mouse is in horizontal menu
if(x>=x1 && x<=x2 && y>=y1 && y<=y2)
{
in=1;
xc=x1;
for(i=1; i<=count; i++) //FOR ALL THE ITEMS IN HORIZONTAL MENU
{
settextstyle(SMALL_FONT,0,4);
xc=xc+textwidth(menu[i-1])+10;
if(x<=xc)
{
choice=i;
break;
}
}
if(prevchoice!=choice)
{
hidemouseptr();
if(prevchoice)
dehighlight(menu,prevchoice,x1,y1);
highlight(menu,choice,x1,y1);
prevchoice=choice;
showmouseptr();
}
if((button & 1)==1)
{
outtextxy(400,450,"YES");
while((button & 1)==1)
getmousepos(&button,&x,&y);
if(x>=x1 && x<=x2 && y>=y1 && y<=y2)
{
outtextxy(500,450,"NO***");
hidemouseptr();
highlight_select(menu,choice,x1,y1);
return(choice);
}
}
}
else
{
if(in==1)
{
in=0;
prevchoice=0;
hidemouseptr();
dehighlight(menu,choice,x1,y1);
showmouseptr();
}
}
}
}
//Function to display vertical menu
displaymenuv(char **menu,int count,int width,int x1,int y1,int bk_color)
{
int i,h;
setcolor(0);
h=textheight(menu[0]);
rectangle(x1-5,y1-10,x1+width+12,y1+count*(h+10)+10);
setcolor(8);
rectangle(x1-5,y1-10,x1+width+11,y1+count*(h+10)+9);
setcolor(WHITE);
rectangle(x1-5,y1-10,x1+width+10,y1+count*(h+10)+8);
setfillstyle(SOLID_FILL,bk_color);
bar(x1-4,y1-9,x1+width+10,y1+count*(h+10)+8);
settextstyle(SMALL_FONT,0,4);
setcolor(BLACK);
for(i=0; i<count; i++)
{
outtextxy(x1+10,y1+i*(h+10),menu[i]);
}
}
//Function to hoghlight vertivcal menu
highlightv(char **menu,int ch,int width,int x1,int y1,int color)
{
int h;
h=textheight(menu[0]);
setfillstyle(SOLID_FILL,color);
bar(x1,y1+(ch-1)*(h+10),x1+width+9,y1+(ch-1)*(h+10)+12);
setcolor(WHITE);
outtextxy(x1+10,y1+(ch-1)*(h+10),menu[ch-1]);
}
//Function to dehighlight vertical menu
dehighlightv(char **menu,int ch,int width,int x1,int y1,int bk_color)
{
int h;
h=textheight(menu[0]);
setfillstyle(SOLID_FILL,bk_color);
bar(x1,y1+(ch-1)*(h+10),x1+width+9,y1+(ch-1)*(h+10)+12);
setcolor(BLACK);
outtextxy(x1+10,y1+(ch-1)*(h+10),menu[ch-1]);
}
//Function to get mouse response on vertival menu
getresponsev(char **menu,int count,int width,int x1,int y1,int color,int bk_color)
{
int choice=1,prevchoice=0,x,y,x2,y2,button,in,i,h,tw,xc,area;
long int *buffer;
h=textheight(menu[0]);
y2=y1+count*(h+10);
x2=x1+width+10;
hidemouseptr();
//we measure size of suitable area of screen to be
//regenerated when vmenu closed
area=imagesize(x1-6,y1-11,x1+width+13,y1+count*(h+10)+10);
//allocate suitable memory as per size measured
buffer=(long int *)malloc(area);
//get image of the measured boundary stored in allocated memory
getimage(x1-6,y1-11,x1+width+13,y1+count*(h+10)+10,buffer);
//now display menu
displaymenuv(menu,count,width,x1,y1,bk_color);
showmouseptr();
settextstyle(SMALL_FONT,0,4);
while(1)
{
getmousepos(&button,&x,&y);
if(x<x1 || x>x2 || y<y1 || y>y2) //when mouse is out of focus
{
if((button & 1)==1) //of vertical menu opened
{
//and if button is clicked
hidemouseptr();
putimage(x1-6,y1-11,buffer,COPY_PUT);
//the original image is displayed
free(buffer);
//corresponding mem is freed
return(0);
}
}
if(x>=x1 && x<=x2 && y>=y1 && y<=y2)
{
in=1;
for(i=1; i<=count; i++)
{
if(y<=y1+i*(h+10)) //hovering within the v_menu
{
choice=i; //opened the index corsp to
break;
}
} // menu item is assigned to choice
if(prevchoice!=choice)
{
hidemouseptr(); //hilighting and dehilighying menu items
//within v_menu on mouse hover when menu open
if(prevchoice)
dehighlightv(menu,prevchoice,width,x1,y1,bk_color);
//first dehilght the previous menu item
highlightv(menu,choice,width,x1,y1,color);
//then hilight the new item
prevchoice=choice;//update value of var prevchoice
showmouseptr();
}
if((button & 1)==1)
{
outtextxy(450,450,"In VMENU");
while((button & 1)==1)
getmousepos(&button,&x,&y);
if(x>=x1 && x<=x2 && y>=y1 && y<=y2)
{
outtextxy(350,450,"OUTMENU_V");
hidemouseptr();
putimage(x1-6,y1-11,buffer,COPY_PUT);
free(buffer); //vertical menu escapes
return(choice);
}
}
}
else //when v_menu is displayed and mouse hovers out of focus
{
if(in==1)
{
in=0;
prevchoice=0;
hidemouseptr();
dehighlightv(menu,choice,width,x1,y1,bk_color);
showmouseptr();
}
}
}//while ends
}
///__________////
//Function to display drop down menu
drop_down_menu(char **menu,int count,int x1,int y1,int color,int bk_color)
{
int i,width=0;
for(i=0; i<count; i++)
{
if(textwidth(menu[i])>width)
{
width=textwidth(menu[i]);
}
}
width=width+30;
showmouseptr();
getresponsev(menu,count,width,x1,y1,color,bk_color);
}
//_______________dda//
void DDALine(int x1,int y1,int x2,int y2,int iColor,int quadrant)
{
// setbkcolor(6);
outtextxy(50,454,"SimpleDDA");
float dX,dY,iSteps; //local declaration section
float xInc,yInc,iCount,x,y;
dX = x2 - x1; //calculaing the distance b/w x cord.
dY = y2 - y1; //calculaing the distance b/w y cord.
x = x1;
y = y1;
if (fabs(dX) > fabs(dY))
{
//if the absolute value of floating point number dX
iSteps = fabs(dX); //is greater than dY we assign this value to
} // variable meant as counter for the iterations to be made
else
{
iSteps = fabs(dY); //note iSteps=line length estimate
}
xInc = fabs(dX)/iSteps; //calulating x increment and y increment
yInc = fabs(dY)/iSteps;
/* xInc = (dX)/iSteps; //calulating x increment and y increment
yInc = (dY)/iSteps;*/
// circle(x,y,1); //drawing circle on the first point
x+=0.5;
// fprintf(fp,"This file has the cordinates formed as per calculation performed using simple DDA");
for (iCount=1; iCount<=iSteps; iCount++)
{
if(quadrant==0)
{
outtextxy(320,260,"No such Quadrant");
break;
}
if(quadrant==1)
{
y-=yInc; //in first quadrant
x-=xInc;
}
if(quadrant==2)
{
y-=yInc; //in second quadrant
x+=xInc;
}
if(quadrant==3 )
{
y+=yInc; //in third quadrant
x+=xInc;
}
if(quadrant==4)
{
y+=yInc; //in fourth quadrant
x-=xInc;
}
if(int(iCount)%2==0)
continue;
putpixel(floor(x),floor(y),iColor);
// fprintf(fp,"x=%f and y=%f\n",floor(x-320),fabs(y-240));
}
// circle(x2,y2,1);
return;
}
void car()
{
int maxx,midy;
maxx = getmaxx();
/* mid pixel in vertical axis */
midy = getmaxy()/2;
for (int i=0; i < maxx-10; i=i+5)
{
/* clears screen */
cleardevice();
setbkcolor(6);
/* draw a white road */
setcolor(WHITE);
line(0, midy + 37, maxx, midy + 37);
/* Draw Car */
setcolor(YELLOW);
setfillstyle(SOLID_FILL, RED);
line(i, midy + 23, i, midy);
line(i, midy, 40 + i, midy - 20);
line(40 + i, midy - 20, 80 + i, midy - 20);
line(80 + i, midy - 20, 100 + i, midy);
line(100 + i, midy, 120 + i, midy);
line(120 + i, midy, 120 + i, midy + 23);
line(0 + i, midy + 23, 18 + i, midy + 23);
arc(30 + i, midy + 23, 0, 180, 12);
line(42 + i, midy + 23, 78 + i, midy + 23);
arc(90 + i, midy + 23, 0, 180, 12);
line(102 + i, midy + 23, 120 + i, midy + 23);
line(28 + i, midy, 43 + i, midy - 15);
line(43 + i, midy - 15, 57 + i, midy - 15);
line(57 + i, midy - 15, 57 + i, midy);
line(57 + i, midy, 28 + i, midy);
line(62 + i, midy - 15, 77 + i, midy - 15);
line(77 + i, midy - 15, 92 + i, midy);
line(92 + i, midy, 62 + i, midy);
line(62 + i, midy, 62 + i, midy - 15);
floodfill(5 + i, midy + 22, YELLOW);
setcolor(BLUE);
setfillstyle(SOLID_FILL, DARKGRAY);
/* Draw Wheels */
circle(30 + i, midy + 25, 9);
circle(90 + i, midy + 25, 9);
floodfill(30 + i, midy + 25, BLUE);
floodfill(90 + i, midy + 25, BLUE);
/* Add delay of 0.1 milli seconds */
sound(300*((random(10)+1)));
delay(100);
nosound();
delay(50);
}
return;
}
void midpoint(int x1,int y1,int x2,int y2,int color,int quadrant)
{
// setbkcolor(6);
outtextxy(50,454,"MidPoint");
int dx,dy,p,x,y,end;
dx = abs(x2 - x1);
dy = abs(y2 - y1);
////////////////////quadrant2///////////////////////
if(quadrant==2||quadrant==4)
{
if(dx>dy)
{
p = 2 * dy - dx;
if(x1 > x2)
{
x = x2;
y = y2;
end = x1;
}
else
{
x = x1;
y = y1;
end = x2;
}
putpixel(x, y, color);
while(x < end)
{
x = x + 1;
if(p < 0)
{
p = p + 2 * dy;
}
else
{
y = y - 1;
p = p + 2 * (dy - dx);
}
putpixel(x, y, color);
// fprintf(fp,"x=%d and y=%d\n",x-320,y-240);
}
}
else
{
p = 2 * dx - dy;
if(y2 > y1)
{
x = x2;
y = y2;
end = y1;
}
else
{
x = x1;
y = y1;
end = y2;
}
putpixel(x, y, color);
while(y > end)
{
y = y - 1;
if(p < 0)
{
p = p + 2 * dx;
}
else
{
x = x + 1;
p = p + 2 * (dx - dy);
}
putpixel(x, y, color);
//fprintf(fp,"x=%d and y=%d\n",x-320,y-240);
}
}
}
else if(quadrant==1||quadrant==3)
{
/////////////////////quadrant 1 and 3////////////////////
if(dx>dy)
{
p = 2 * dy - dx;
if(x1 > x2)
{
x = x1;
y = y1;
end = x2;
}
else
{
x = x2;
y = y2;
end = x1;
}
putpixel(x, y, color);
while(x > end)
{
x = x - 1;
if(p < 0)
{
p = p + 2 * dy;
}
else
{
y = y - 1;
p = p + 2 * (dy - dx);
}
putpixel(x, y, color);
// fprintf(fp,"x=%d and y=%d\n",x-320,y-240);
}
}
else
{
p = 2 * dx - dy;
if(y2 > y1)
{
x = x2;
y = y2;
end = y1;
}
else
{
x = x1;
y = y1;
end = y2;
}
putpixel(x, y, color);
while(y > end)
{
y = y - 1;
if(p < 0)
{
p = p + 2 * dx;
}
else
{
x = x - 1;
p = p + 2 * (dx - dy);
}
putpixel(x, y, color);
// fprintf(fp,"x=%d and y=%d\n",x-320,y-240);
}
}
}
return;
}
void bresenham(int x1,int y1,int x2,int y2,int color,int quadrant)
{
// setbkcolor(6);
outtextxy(50,454,"Bresenham");
int dx,dy,p,x,y,end;
dx = abs(x2 - x1);
dy = abs(y2 - y1);
////////////////////quadrant2///////////////////////
if(quadrant==2||quadrant==4)
{
if(dx>dy)
{
p = 2 * dy - dx;
if(x1 > x2)
{
x = x2;
y = y2;
end = x1;
}
else
{
x = x1;
y = y1;
end = x2;
}
putpixel(x, y, color);
while(x < end)
{
x = x + 1;
if(p < 0)
{
p = p + 2 * dy;
}
else
{
y = y - 1;
p = p + 2 * (dy - dx);
}
if(x%2==0)
continue;
putpixel(x, y, color);
// fprintf(fp,"x=%d and y=%d\n",x-320,y-240);
}
}
else
{
p = 2 * dx - dy;
if(y2 > y1)
{
x = x2;
y = y2;
end = y1;
}
else
{
x = x1;
y = y1;
end = y2;
}
putpixel(x, y, color);
while(y > end)
{
y = y - 1;
if(p < 0)
{
p = p + 2 * dx;
}
else
{
x = x + 1;
p = p + 2 * (dx - dy);
}
if(y%2==0)
continue;
putpixel(x, y, color);
// fprintf(fp,"x=%d and y=%d\n",x-320,y-240);
}
}
}
else if(quadrant==1||quadrant==3)
{
/////////////////////quadrant 2////////////////////
if(dx>dy)
{
p = 2 * dy - dx;
if(x1 > x2)
{
x = x1;
y = y1;
end = x2;
}
else
{
x = x2;
y = y2;
end = x1;
}
putpixel(x, y, color);
while(x > end)
{
x = x - 1;
if(p < 0)
{
p = p + 2 * dy;
}
else
{
y = y - 1;
p = p + 2 * (dy - dx);
}
putpixel(x, y, color);
// fprintf(fp,"x=%d and y=%d\n",x-320,y-240);
}
}
else
{
p = 2 * dx - dy;
if(y2 > y1)
{
x = x2;
y = y2;
end = y1;
}
else
{
x = x1;
y = y1;
end = y2;
}
putpixel(x, y, color);
while(y > end)
{
y = y - 1;
if(p < 0)
{
p = p + 2 * dx;
}
else
{
x = x - 1;
p = p + 2 * (dx - dy);
}
putpixel(x, y, color);
// fprintf(fp,"x=%d and y=%d\n",x-320,y-240);
}
}
}
return;
}
void SymDDALine(int x1,int y1,int x2,int y2,int iColor,int quadrant)
{
// setbkcolor(6);
outtextxy(50,454,"SymmetricDDA");
float dX,dY,iSteps;
float xInc,yInc,iCount,x,y;
dX = x2 - x1; //delta x and y values
dY = y2 - y1;
//line length=1/e where e is 2^n it signifies number of iterations
int n=1;
if (fabs(dX) > fabs(dY)) //calcuating line length
{
while(1)
{
if(pow(2,n-1)<=fabs(dX) && fabs(dX)<pow(2,n))
break;
n++;
}
iSteps=pow(2,n);
}
else
{
//calculating line length
while(1)
{
if(pow(2,n-1)<=fabs(dY) && fabs(dY)<pow(2,n))
break;
n++;
}
iSteps=pow(2,n);
}
xInc = fabs(dX)/iSteps;
yInc = fabs(dY)/iSteps;
// printf("xInc=%f and yInc=%f",xInc,yInc);
x = x1;
y = y1;
// circle(x1,y1,1);
x+=0.5;
y-=0.5;
for (iCount=1; iCount<=iSteps; iCount++)
{
if(quadrant==1)
{
y-=yInc; //in first quadrant
x-=xInc;
}
if(quadrant==2)
{
y-=yInc; //in second quadrant
x+=xInc;
}
if(quadrant==3 )
{
y+=yInc; //in third quadrant
x+=xInc;
}
if(quadrant==4)
{
y+=yInc; //in fourth quadrant
x-=xInc;
}
putpixel(floor(x),floor(y),iColor);
//fprintf(fp,"x=%f and y=%f\n",floor(x-320),floor(fabs(y-240)));
}
// circle(x2,y2,1);
return;
}
void pattern(int quadrant,int x1,int x2,int y1,int y2)
{
if(quadrant==2)
{
line(320+x1-2,240-y1-2,320+x1+2,240-y1+2);
line(320+x1-2,240-y1+2,320+x1+2,240-y1+2);//lower triangle
line(320+x1-2,240-y1+2,320+x1-2,240-y1-2);
line(320+x2-2,240-y2-2,320+x2+2,240-y2-2);
line(320+x2-2,240-y2-2,320+x2+2,240-y2+2);//upper triangle
line(320+x2+2,240-y2+2,320+x2+2,240-y2-2);
}
}
void circle_(int r, int x_o,int y_o,int color)
{
int p,x,y;
p=1-r;
x=0;
y=r;
while(x<=y)
{
putpixel(x_o+x,y_o-y,color);
putpixel(x_o+x,y_o+y,color);
putpixel(x_o-x,y_o-y,color);
putpixel(x_o-x,y_o+y,color);
putpixel(x_o+y,y_o-x,color);
putpixel(x_o+y,y_o+x,color);
putpixel(x_o-y,y_o+x,color);
putpixel(x_o-y,y_o-x,color);
if(p<0)
{
p+=(2*x)+3;
}
else
{
p+=2*(x-y)+5;
y--;
}
x++;
}
}
void ellipse_(int xc,int yc,long rx, long ry,int iColor)
{
int x,y;float p;
//Region 1
p=ry*ry-rx*rx*ry+rx*rx/4;
x=0;y=ry;
putpixel(xc+x,yc-y,iColor);
putpixel(xc+x,yc+y,iColor);
while(2.0*ry*ry*x <= 2.0*rx*rx*y)
{
if(p < 0)
{
x++;
p = p+2*ry*ry*x+ry*ry;
}
else
{
x++;y--;
p = p+2*ry*ry*x-2*rx*rx*y-ry*ry;
}
putpixel(xc+x,yc+y,iColor);
putpixel(xc+x,yc-y,iColor);
putpixel(xc-x,yc+y,iColor);
putpixel(xc-x,yc-y,iColor);
}
//Region 2
p=ry*ry*(x+0.5)*(x+0.5)+rx*rx*(y-1)*(y-1)-rx*rx*ry*ry;
while(y > 0)
{
if(p <= 0)
{
x++;y--;
p = p+2*ry*ry*x-2*rx*rx*y+rx*rx;
}
else
{
y--;
p = p-2*rx*rx*y+rx*rx;
}
putpixel(xc+x,yc+y,iColor);
putpixel(xc+x,yc-y,iColor);
putpixel(xc-x,yc+y,iColor);
putpixel(xc-x,yc-y,iColor);
}
}
void getcoordinates(int *x_,int *y_)
{
int button,x,y;
while(1)
{
getmousepos(&button,&x,&y);
if((button&1)==1)//left click
{
*x_=x;
*y_=y;
// printf("\n(%d %d) inside func",*x_,*y_);
break;
}
}
}
void getcoordinates_(int *x_,int *y_)
{
int button,x,y;
while(1)
{
getmousepos(&button,&x,&y);
if((button&2)==2) //right click
{
*x_=x;
*y_=y;
// printf("\n(%d %d) inside func",*x_,*y_);
break;
}
}
}
int getradius(int xc,int ycc)
{
int r,x1,y1,x_,y_;
showmouseptr();
getcoordinates(&x_,&y_);
x1=x_-320;
y1=240-y_;
r=sqrt(((xc-x1)*(xc-x1))+((ycc-y1)*(ycc-y1)));
return r;
}
int getradius_()
{
int r,x1,y1,x_,y_;
showmouseptr();
getcoordinates(&x_,&y_);
x1=x_-320;
y1=240-y_;
r=sqrt((x1*x1)+(y1*y1));
return r;
}
void sort(float sdy[],int h)
{
float temp;
for(int j=0;j<=h-1;j++)
{
for(int i=0;i<h-1-j;i++)
{
if(sdy[i]>sdy[i+1])
{
temp=sdy[i];
sdy[i]=sdy[i+1];
sdy[i+1]=temp;
}
}
}
}
///////////////////
struct ather
{
float x;
float y;
float io;
float vis;
};
struct ather z[20];
main()
{
int gd=DETECT,gm,choice,i,countvT,count,countvA,countvQ,countvCol,countS,countvCar,countvW,countL;
int choicev,xco=20,yco=27,xco1=22,yco1=56,xco2=60,yco2=56,ch;
int x1=20,x2=100,y1=20,y2=120,iColor=2,quadrant=0,thick=3,x_,y_;
int tra[3][3];
initgraph(&gd,&gm,"c:\\tc\\bgi");
setbkcolor(BLACK);
main_g_window("PROJECT_YOGESHWAR",5,5,630,470,BLUE);
if(initmouse()==0)
{
printf("\n Unable to initialise Mouse");
exit(0);
}
showmouseptr();
count=sizeof(menu)/sizeof(char*);
countvA=sizeof(menuvA)/sizeof(char*);
countvQ=sizeof(menuvQ)/sizeof(char*);
countvCol=sizeof(menuvCol)/sizeof(char*);
countvCar=sizeof(menuvCar)/sizeof(char*);
countvW=sizeof(menuvW)/sizeof(char*);
countvT=sizeof(menuvT)/sizeof(char*);
countS=sizeof(menuvS)/sizeof(char*);
countL=sizeof(menuvL)/sizeof(char*);
settextstyle(SMALL_FONT,0,6);
setcolor(BLACK);
displaymenuh(menu,count,xco,yco);
showmouseptr();
/////////////////////////////////////////////////////////////////////////////
while(1)
{
choice=getresponseh(menu,count,xco,yco);
switch(choice)
{
case 1:////////////////////////////algotirhms
choicev=drop_down_menu(menuvA,countvA,xco1,yco1,BLUE,7);
switch(choicev)
{
case 1://////////////////simple dda
if(quadrant==1||quadrant==3) //in first quadrant and third quadrant //in first quadrant and third quadrant
{
DDALine(320+x1-1,240-y1+1,320+x2-1,240-y2+1,iColor,quadrant);
DDALine(320+x1,240-y1,320+x2,240-y2,iColor,quadrant);//original
DDALine(320+x1+1,240-y1-1,320+x2+1,240-y2-1,iColor,quadrant);
}
if(quadrant==2||quadrant==4)//in second quadrant and fourth quadrant
{
if(thick==5)
DDALine(320+x1-2,240-y1-2,320+x2-2,240-y2-2,iColor,quadrant);
DDALine(320+x1-1,240-y1-1,320+x2-1,240-y2-1,iColor,quadrant);
DDALine(320+x1,240-y1,320+x2,240-y2,iColor,quadrant);//original
DDALine(320+x1+1,240-y1+1,320+x2+1,240-y2+1,iColor,quadrant);
if(thick==5)
DDALine(320+x1+2,240-y1+2,320+x2+2,240-y2+2,iColor,quadrant);
if(thick==5)
pattern(2,x1,x2,y1,y2);
}
break;
case 2://///////////////symmetric dda
if(quadrant==1||quadrant==3) //in first quadrant and third quadrant //in first quadrant and third quadrant
{
SymDDALine(320+x1-1,240-y1+1,320+x2-1,240-y2+1,iColor,quadrant);
SymDDALine(320+x1,240-y1,320+x2,240-y2,iColor,quadrant);//original
SymDDALine(320+x1+1,240-y1-1,320+x2+1,240-y2-1,iColor,quadrant);
}
if(quadrant==2||quadrant==4)//in second quadrant and fourth quadrant
{
if(thick==5)
SymDDALine(320+x1-2,240-y1-2,320+x2-2,240-y2-2,iColor,quadrant);
SymDDALine(320+x1-1,240-y1-1,320+x2-1,240-y2-1,iColor,quadrant);
SymDDALine(320+x1,240-y1,320+x2,240-y2,iColor,quadrant);//original
SymDDALine(320+x1+1,240-y1+1,320+x2+1,240-y2+1,iColor,quadrant);
if(thick==5)
SymDDALine(320+x1+2,240-y1+2,320+x2+2,240-y2+2,iColor,quadrant);
if(thick==5)
pattern(2,x1,x2,y1,y2);
}
break;
case 3://///////////////bresenham
if(quadrant==2||quadrant==4)
{
if(thick==5)
bresenham(320+x1-2,240-y1-2,320+x2-2,240-y2-2,iColor,quadrant);
bresenham(320+x1-1,240-y1-1,320+x2-1,240-y2-1,iColor,quadrant);
bresenham(320+x1,240-y1,320+x2,240-y2,iColor,quadrant);
bresenham(320+x1+1,240-y1+1,320+x2+1,240-y2+1,iColor,quadrant);
if(thick==5)
bresenham(320+x1+2,240-y1+2,320+x2+2,240-y2+2,iColor,quadrant);
// line(320+x1,240-y1,320+x1,240);
// line(320+x1,240-y1,320,240-y1);
// line(320+x2,240-y2,320+x2,240);
// line(320+x2,240-y2,320,240-y2);
// putpixel(320+x1-1,240-y1+1,14);
// putpixel(320+x2+1,240-y2-1,14);
if(thick==5)
pattern(2,x1,x2,y1,y2);
}
if(quadrant==3||quadrant==1)
{
bresenham(320+x1-1,240-y1+1,320+x2-1,240-y2+1,iColor,quadrant);
bresenham(320+x1,240-y1,320+x2,240-y2,iColor,quadrant);
bresenham(320+x1+1,240-y1-1,320+x2+1,240-y2-1,iColor,quadrant);
// delay(5000);
// car();
}
break;
case 4://///////////////////midpoint
if(quadrant==2||quadrant==4)
{
if(thick==5)
midpoint(320+x1-2,240-y1-2,320+x2-2,240-y2-2,iColor,quadrant);
midpoint(320+x1-1,240-y1-1,320+x2-1,240-y2-1,iColor,quadrant);
midpoint(320+x1,240-y1,320+x2,240-y2,iColor,quadrant);
midpoint(320+x1+1,240-y1+1,320+x2+1,240-y2+1,iColor,quadrant);
if(thick==5)
midpoint(320+x1+2,240-y1+2,320+x2+2,240-y2+2,iColor,quadrant);
if(thick==5)
pattern(2,x1,x2,y1,y2);
}
if(quadrant==3||quadrant==1)
{
midpoint(320+x1-1,240-y1+1,320+x2-1,240-y2+1,iColor,quadrant);
midpoint(320+x1,240-y1,320+x2,240-y2,iColor,quadrant);
midpoint(320+x1+1,240-y1-1,320+x2+1,240-y2-1,iColor,quadrant);
}
break;
case 5://////////////////////////circle
showmouseptr();
getcoordinates(&x_,&y_);
int xc=x_-320;
int yc=240-y_;
getcoordinates_(&x_,&y_);
int xcc=x_-320;
int ycc=240-y_;
putpixel(318+xc,238-ycc,iColor);
getch();
int r=getradius(xc,ycc);
setcolor(iColor);
circle_(r,320+xc,240-ycc,iColor);
outtextxy(20,449,"Circle drawing");
getch();
setcolor(iColor);
setfillstyle(SOLID_FILL,iColor);
floodfill(320+xc,240-ycc,iColor);
setfillstyle(SOLID_FILL,7);
/* draw the bar */
bar(10,452,628,468);
break;
case 6:////////////////////ellipse
showmouseptr();
getcoordinates(&x_,&y_);
int xq=x_-320;
int yq=240-y_;
getcoordinates_(&x_,&y_);
int xp=x_-320;
int yp=240-y_;
putpixel(318+xq,238-yq,iColor);
getch();
getcoordinates(&x_,&y_);
x1=x_-320;
y1=240-y_;
getcoordinates_(&x_,&y_);
x2=x_-320;
y2=240-y_;
setcolor(iColor);
ellipse_(320+xq,240-yp,x2,y1,iColor);
outtextxy(10,454,"Click to choose center, then yradius and then x radius");
getch();
setcolor(iColor);
setfillstyle(SOLID_FILL,iColor);
floodfill(320+xq,240-yp,iColor);
getch();
setfillstyle(SOLID_FILL,7);
/* draw the bar */
bar(10,452,628,468);
break;
}
delay(2000);
setfillstyle(SOLID_FILL,7);
/* draw the bar */
bar(10,452,628,468);
break;
case 2://///////////////////////quadrant
choicev=drop_down_menu(menuvQ,countvQ,xco2,yco2,BLUE,7);
switch(choicev)
{
case 1:
quadrant=1;
break;
case 2:
quadrant=2;
break;
case 3:
quadrant=3;
break;
case 4:
quadrant=4;
break;
}
outtextxy(10,454,"Enter the Coordinates::(x1,y1) and (x2,y2)");
delay(1500);
setfillstyle(SOLID_FILL,7);
/* draw the bar */
bar(10,452,628,468);
showmouseptr();
getcoordinates(&x_,&y_);
x1=x_-320;
y1=240-y_;
getcoordinates_(&x_,&y_);
x2=x_-320;
y2=240-y_;
// printf("%d %d %d %d",x1+320,240-y1,x2+320,240-y2);
break;
case 3:
choicev=drop_down_menu(menuvCol,countvCol,100,yco2,BLUE,7);
switch(choicev)
{
case 1:
iColor=14;
break;
case 2:
iColor=6;
break;
case 3:
iColor=12;
break;
case 4:
iColor=2;
break;
case 5:
iColor=0;
break;
}
break;
case 4:
choicev=drop_down_menu(menuvCar,countvCar,135,yco2,BLUE,7);
switch(choicev)
{
case 1:
car();
cleardevice();
setbkcolor(BLACK);
main_g_window("PROJECT_YOGESHWAR",5,5,630,470,BLUE);
break;
case 2:
car();
cleardevice();
setbkcolor(BLACK);
main_g_window("PROJECT_YOGESHWAR",5,5,630,470,BLUE);
break;
}
break;
case 5:
choicev=drop_down_menu(menuvW,countvW,190,yco2,BLUE,7);
switch(choicev)
{
case 1:
thick=3;
break;
case 2:
thick=5;
break;
}
case 6:
/* putpixel(80,220,BLACK);
putpixel(380,220,BLACK);
putpixel(420,200,BLACK);*/
choicev=drop_down_menu(menuvT,countvT,240,yco1,BLUE,7);
switch(choicev)
{
case 1:outtextxy(20,449,"TRANSLATION HERE");
delay(2000);
setfillstyle(SOLID_FILL,7);
/* draw the bar */
bar(10,452,628,468);
showmouseptr();
getcoordinates(&x_,&y_);
int xl=x_-320;
int yl=240-y_;
getcoordinates_(&x_,&y_);
int xll=x_-320;
int yll=240-y_;
getcoordinates(&x_,&y_);
int xlll=x_-320;
int ylll=240-y_;
getcoordinates_(&x_,&y_);
int xllll=x_-320;
int yllll=240-y_;
setcolor(iColor);
line(320+xl,240-yll,320+xlll,240-yllll);
getch();
getcoordinates_(&x_,&y_);
int xv=x_-320;
int yv=240-y_;
int tx=xv-xlll;
int ty=yv-yllll;
setcolor(BLACK);
line(320+x1+tx,240-yll-ty,320+xlll+tx,240-yllll-ty);
getch();
break;
case 2: showmouseptr();
outtextxy(20,449,"POLYGON TRANSLATION");
delay(2000);
setfillstyle(SOLID_FILL,7);
/* draw the bar */
bar(10,452,628,468);
/*
getcoordinates_(&x_,&y_);
int xr=x_-320;
int yr=240-y_;
line(320\,240,320+xr,240-yr);
int rd=(int) sqrt((xr*xr+yr*yr)*1.0);
setcolor(WHITE);
circle(320,240,rd);*/
int poly[10];
getcoordinates_(&x_,&y_);
int x1=x_;
poly[0]=x1;
getcoordinates(&x_,&y_);
int y1=y_;
poly[1]=y1;
getcoordinates_(&x_,&y_);
int x2=x_;
poly[2]=x2;
getcoordinates(&x_,&y_);
int y3=y_;
poly[3]=y3;
getcoordinates_(&x_,&y_);
int x4=x_;
poly[4]=x4;
getcoordinates(&x_,&y_);
int y5=y_;
poly[5]=y5;
getcoordinates_(&x_,&y_);
int x6=x_;
poly[6]=x6;
getcoordinates(&x_,&y_);
int y7=y_;
poly[7]=y7;
poly[8]=poly[0];
poly[9]=poly[1];
setcolor(iColor);
drawpoly(5,poly);
getcoordinates_(&x_,&y_);//right
int x8=x_;
getcoordinates(&x_,&y_); //left
int y10=y_;
int xmove=x8-x6;
int ymove=y10-y7;
for(i=0;i<=9;i++)
{ if(i%2==0)
poly[i]+=xmove;
else
poly[i]+=ymove;
}
setcolor(RED);
drawpoly(5,poly);
break;
/////////////////////////////////
case 3:
showmouseptr();
outtextxy(20,449,"REFLECTION");
delay(2000);
setfillstyle(SOLID_FILL,7);
/* draw the bar */
bar(10,452,628,468);
int polyp[10];
getcoordinates_(&x_,&y_);
int x11=x_;
polyp[0]=x11;
getcoordinates(&x_,&y_);
int y11=y_;
polyp[1]=y11;
getcoordinates_(&x_,&y_);
int x22=x_;
polyp[2]=x22;
getcoordinates(&x_,&y_);
int y33=y_;
polyp[3]=y33;
getcoordinates_(&x_,&y_);
int x44=x_;
polyp[4]=x44;
getcoordinates(&x_,&y_);
int y55=y_;
polyp[5]=y55;
getcoordinates_(&x_,&y_);
int x66=x_;
polyp[6]=x66;
getcoordinates(&x_,&y_);
int y77=y_;
polyp[7]=y77;
polyp[8]=polyp[0];
polyp[9]=polyp[1];
setcolor(iColor);
drawpoly(5,polyp);
///////////////////////reflection about x axis////////////////
int polyg[10];
for(i=0;i<=9;i++)
{if(i%2==0)
polyp[i]-=320;
else
polyp[i]=240-polyp[i];
}
for(i=0;i<=9;i++)
{
if(i%2==0)
polyg[i]=320+polyp[i];
else
polyg[i]=240+polyp[i];
}
setcolor(RED);
drawpoly(5,polyg);
/////////////////////////////////////////////////////////////////
int polyv[10];
for(i=0;i<=9;i++)
{
if(i%2==0)
polyv[i]=320-polyp[i];
else
polyv[i]=240-polyp[i];
}
setcolor(BLACK);
drawpoly(5,polyv);
break;
case 4:
showmouseptr();
outtextxy(20,449,"SCALING BY A FACTOR OF 2 and 1/2");
delay(2000);
setfillstyle(SOLID_FILL,7);
/* draw the bar */
bar(10,452,628,468);
int polys[10];
int polyss[10];
getcoordinates_(&x_,&y_); //right
int x111=x_;
polys[0]=x111-320;
getcoordinates(&x_,&y_); //left
int y111=y_;
polys[1]=240-y111;
getcoordinates_(&x_,&y_);
int x222=x_;
polys[2]=x222-320;
getcoordinates(&x_,&y_);
int y333=y_;
polys[3]=240-y333;
getcoordinates_(&x_,&y_);
int x444=x_;
polys[4]=x444-320;
getcoordinates(&x_,&y_);
int y555=y_;
polys[5]=240-y555;
getcoordinates_(&x_,&y_);
int x666=x_;
polys[6]=x666-320;
getcoordinates(&x_,&y_);
int y777=y_;
polys[7]=240-y777;
polys[8]=polys[0];
polys[9]=polys[1];
for(i=0;i<=9;i++)
{
polyss[i]=polys[i]; //polys stores wrt 320 240
if(i%2==0) //polyss stores wrt 0 0 top left
polyss[i]+=320;
else
polyss[i]=240-polys[i];
}
setcolor(iColor);
drawpoly(5,polyss);
getch();
int xmotion=polys[4];
int ymotion=polys[5];
//////////////////////////
for(i=0;i<=9;i++)
{ if(i%2==0)
polys[i]-=xmotion;
else
polys[i]-=ymotion;
}
for(i=0;i<=9;i++)
{
polyss[i]=polys[i];
if(i%2==0)
polyss[i]+=320;
else
polyss[i]=240-polys[i];
}
setcolor(WHITE);
drawpoly(5,polyss);
///////////////////////////
getch();
polys[0]=2*polys[0];
polys[1]=2*polys[1];
polys[2]=2*polys[2];
polys[3]=2*polys[3];
polys[6]=2*polys[6];
polys[7]=2*polys[7];
polys[8]=polys[0];
polys[9]=polys[1];
for(i=0;i<=9;i++)
{ if(i%2==0)
polys[i]+=xmotion;
else
polys[i]+=ymotion;
}
for(i=0;i<=9;i++)
{
polyss[i]=polys[i];
if(i%2==0)
polyss[i]+=320;
else
polyss[i]=240-polys[i];
}
setcolor(12);
drawpoly(5,polyss);
break;
case 5:
showmouseptr();
outtextxy(20,449,"Rotation about an arbitrary point");
delay(2000);
setfillstyle(SOLID_FILL,7);
/* draw the bar */
bar(10,452,628,468);
int polyr[10],polyr_[10];
int polyrr[10];
getcoordinates_(&x_,&y_); //right
int x1111=x_;
polyr[0]=x1111-320;
getcoordinates(&x_,&y_); //left
int y1111=y_;
polyr[1]=240-y1111;
getcoordinates_(&x_,&y_);
int x2222=x_;
polyr[2]=x2222-320;
getcoordinates(&x_,&y_);
int y3333=y_;
polyr[3]=240-y3333;
getcoordinates_(&x_,&y_);
int x4444=x_;
polyr[4]=x4444-320;
getcoordinates(&x_,&y_);
int y5555=y_;
polyr[5]=240-y5555;
getcoordinates_(&x_,&y_);
int x6666=x_;
polyr[6]=x6666-320;
getcoordinates(&x_,&y_);
int y7777=y_;
polyr[7]=240-y7777;
polyr[8]=polyr[0];
polyr[9]=polyr[1];
for(i=0;i<=9;i++)
{
polyrr[i]=polyr[i]; //polyr wrt 320 240 mid screen
if(i%2==0)
polyrr[i]+=320; //polyrr wrt 0 0 top left screen
else
polyrr[i]=240-polyr[i];
}
setcolor(iColor); //draw with hardware value
drawpoly(5,polyrr);
getch();
getcoordinates_(&x_,&y_);
int xooo=x_;
int orgxooo=xooo-320; //arbitrary reference point
getcoordinates(&x_,&y_);
int yooo=y_;
int orgyooo=240-yooo;
getch();
line(xooo,40,xooo,400);
line(50,yooo,600,yooo);
// float t=1.57;
// for(int y=30;y<=360;y+=30)
// {int x,t=y;
for(int x=1;x<=5;x++)
{
int t=60;
for(i=0;i<=7;i++)
{
if(i%2==0)
polyr_[i]=(polyr[i]*cos((t*3.14)/180))-(polyr[i+1]*sin((t*3.14)/180))-(orgxooo*cos((t*3.14)/180))+(orgyooo*sin((t*3.14)/180))+orgxooo;
//x'=xcost-ysint-hcost+ksint+h
else
polyr_[i]=(polyr[i-1]*sin((t*3.14)/180))+(polyr[i]*cos((t*3.14)/180))-(orgxooo*sin((t*3.14)/180))-(orgyooo*cos((t*3.14)/180))+orgyooo;
//y'=xsint+ycost-hsint-kcost+k
}
polyr_[8]=polyr_[0];
polyr_[9]=polyr_[1];
for(i=0;i<=9;i++)
{
polyrr[i]=polyr_[i]; //polys wrt 3 20 240 mid screen
if(i%2==0)
polyrr[i]+=320; //polyss wrt 0 0 top left screen
else
polyrr[i]=240-polyrr[i];
}
if(x==7)
setcolor(12);
else
setcolor(x);
drawpoly(5,polyrr);
for(i=0;i<=9;i++)
polyr[i]=polyr_[i];
// getch();
delay(100);
}//end of foe
// }
////////////////////////////////////////
break;
}
break;
case 7:
int n,i,j,k,gd,gm,dy,dx;
int x,y,temp;
int a[20][2],xi[20];
float slope[20];
showmouseptr();
//outtextxy(200,240,"SCANLINE POLYGON FILLING UNDER CONSTRUCION");
outtextxy(20,449,"Enter number of edges");
delay(2000);
setfillstyle(SOLID_FILL,7);
bar(10,452,628,468);
choicev=drop_down_menu(menuvS,countS,360,yco1,BLUE,7);
switch(choicev)
{
case 1:
n=3;
break;
case 2:
n=4;
break;
case 3:
n=5;
break;
case 4:
n=6;
break;
case 5:
n=7;
break;
}
////////////////////////////////////////////////////
showmouseptr();
for(i=0;i<n;i++)
{
getcoordinates_(&x_,&y_); //right x
a[i][0]=x_;
getcoordinates(&x_,&y_); //left y
a[i][1]=y_;
getch();
putpixel(a[i][0],a[i][1],0);
// printf("\tX%d Y%d : ",i,i);
// scanf("%d %d",&a[i][0],&a[i][1]);
}
a[n][0]=a[0][0];
a[n][1]=a[0][1];
/*- draw polygon -*/
//
for(i=0;i<n;i++)
{
line(a[i][0],a[i][1],a[i+1][0],a[i+1][1]);
}
//
for(i=0;i<n;i++)
{
dy=a[i+1][1]-a[i][1];
dx=a[i+1][0]-a[i][0];
if(dy==0) slope[i]=1.0;
if(dx==0) slope[i]=0.0;
if((dy!=0)&&(dx!=0)) /*- calculate inverse slope -*/
slope[i]=(float) dx/dy;
}
//
for(y=0;y< 480;y++)
{
k=0;
for(i=0;i<n;i++)
{
if(((a[i][1]<=y)&&(a[i+1][1]>y))||((a[i][1]>y)&&(a[i+1][1]<=y)))
{
xi[k]=(int)(a[i][0]+slope[i]*(y-a[i][1]));
k++;
}
}
for(j=0;j<k-1;j++) /*- Arrange x-intersections in order -*/
for(i=0;i<k-1;i++)
{
if(xi[i]>xi[i+1])
{
temp=xi[i];
xi[i]=xi[i+1];
xi[i+1]=temp;
}
}
setcolor(35);
for(i=0;i<k;i+=2)
{
line(xi[i],y,xi[i+1]+1,y);
getch();
}
}
////////////////////////////////////////////////////////////
break;
case 8:////////////////////////////algotirhms
choicev=drop_down_menu(menuvL,countL,400,yco1,BLUE,7);
switch(choicev)
{ case 1:
float px[15]={0};
float py[15]={0};
float pdx[15],pdy[10];
float outx[15]={0};
float outy[15]={0};
float xmin,ymin,xmax,ymax;
float sdx[15],sdy[15];
int s,m,w=0;
outtextxy(20,449,"Choose Coordinates of clipping window");
delay(2000);
setfillstyle(SOLID_FILL,7);
bar(10,452,628,468);
showmouseptr();
getcoordinates_(&x_,&y_); //right
xmin=x_;
getcoordinates(&x_,&y_); //left
ymin=y_;
getch();
putpixel(xmin,ymin,BLACK);
getcoordinates_(&x_,&y_);
xmax=x_;
getcoordinates(&x_,&y_);
ymax=y_;
getch();
putpixel(xmax,ymax,BLACK);
int xbeg,ybeg,xend,yend;
xbeg=xmin;
ybeg=ymin;
xend=xmax;
yend=ymax;
setcolor(15);
rectangle(xbeg,ybeg,xend,yend);
printf("%d, %d, %d, %d",xbeg,ybeg,xend,yend);
n=5;
outtextxy(20,449,"Choose Coordinates of object");
delay(2000);
setfillstyle(SOLID_FILL,7);
bar(10,452,628,468);
getcoordinates_(&x_,&y_); //right
px[0]=x_-320;
getcoordinates(&x_,&y_); //left
py[0]=240-y_;
getcoordinates_(&x_,&y_);
px[1]=x_-320;
getcoordinates(&x_,&y_);
py[1]=240-y_;
getcoordinates_(&x_,&y_); //right
px[2]=x_-320;
getcoordinates(&x_,&y_); //left
py[2]=240-y_;
getcoordinates_(&x_,&y_);
px[3]=x_-320;
getcoordinates(&x_,&y_);
py[3]=240-y_;
getcoordinates_(&x_,&y_); //right
px[4]=x_-320;
getcoordinates(&x_,&y_); //left
py[4]=240-y_;
//rectangle(320+xmin,240-ymax,320+xmax,240-ymin);
px[n]=px[0];
py[n]=py[0];
for(s=0;s<n;s++)
{
line(320+px[s],240-py[s],320+px[s+1],240-py[s+1]);}
getch();
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
px[n]=px[0];
py[n]=py[0];
int l=0;
for(m=0;m<n;m++)
{
if(px[m]>=xmin && px[m+1]<=xmin)
{
pdx[m]=xmin;
pdy[m]=py[m]+((py[m+1]-py[m])/(px[m+1]-px[m]))*(xmin-px[m]);
outx[l]=pdx[m];
outy[l]=pdy[m];
z[l].io=1;
l++;
}
if(px[m]>=xmin && px[m+1]>=xmin)
{
outx[l]=px[m+1];
outy[l]=py[m+1];
z[l].io=0;
l++;
}
if(px[m]<=xmin && px[m+1]>=xmin)
{
pdx[m]=xmin;
pdy[m]=py[m]+((py[m+1]-py[m])/(px[m+1]-px[m]))*(xmin-px[m]);
outx[l]=pdx[m];
outy[l]=pdy[m];
z[l].io=0;
l++;
outx[l]=px[m+1];
outy[l]=py[m+1];
z[l].io=0;
l++;
}
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
outx[l]=outx[0];
outy[l]=outy[0];
setcolor(GREEN);
for(i=0;i<l;i++)
{
if(outx[i]==xmin)
{
sdx[w]=outx[i];
sdy[w]=outy[i];
w++;
}
}
////////////////////////////////////////////////////////////
sort(sdy,w);
outx[l]=outx[0];
outy[l]=outy[0];
for(i=0;i<=l;i++)
{
z[i].x=outx[i];
z[i].y=outy[i];
z[i].vis=0;
}
s=0;
////////////////////////////////////////////////////////////////////
for(m=0;m<=l-1;m++)
{ outx[l]=outx[0];
outy[l]=outy[0];
sdx[w+1]=sdx[0];
sdy[w+1]=sdy[0];
if(z[s].io==0)
{
line(320+outx[s],240-outy[s],320+outx[s+1],240-outy[s+1]);
z[s].vis=1;
z[s+l].vis=1;
}
else if(z[s].io==1)
{for(i=0;i<=w;i++)
{
if(sdy[i]==outy[s])
{line(320+sdx[i],240-sdy[i],320+sdx[i+1],240-sdy[i+1]);
z[s].vis=1;
z[s+l].vis=1;
break;
}
}
for(int j=0;j<l;j++)
{if(sdy[i+1]==z[j].y)
{s=j;
line(320+outx[s],240-outy[s],320+outx[s+1],240-outy[s+1]);
z[s].vis=1;
z[s+l].vis=1;
break;
}
}
}
if(s<=l-1){s++;}
else{s=0;}
if(s==l)
{s=0;
}
int p=s;
while(z[s].vis == 1)
{s++;
if(s==p+l)
{ break;
}
}
}
break;
}
break;
} //switch closed
}//while closed
}
| [
"yogeshwartrehan@github.com"
] | yogeshwartrehan@github.com |
f5174f235f95b8c01b27416e04de8189ffaf4a6d | d9fbb96ac2afd5d250809a5f510fdeba955aea77 | /mixed programs/check for subset sum.cpp | 59149b4d688d8b0a53ba380b2ea83a70f6ab0597 | [] | no_license | collab-tripti/competitive | 02cb83c88f4b83aa1edffd4fd15de3b021aa5834 | c8047e4ad6e1a0bf926225c9da3c76e921ad2c97 | refs/heads/master | 2022-07-16T10:48:41.688964 | 2020-05-19T09:31:16 | 2020-05-19T09:31:16 | 261,931,469 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 464 | cpp | #include<bits/stdc++.h>
using namespace std;
bool isSubsetSum(int a[],int n,int m)
{
if(m>0 && n==0)
return false;
if(m==0)
return true;
if(a[n-1]>m)
return isSubsetSum(a,n-1,m);
return isSubsetSum(a,n-1,m)||isSubsetSum(a,n-1,m-a[n-1]);
}
int main()
{
int t;
cin >> t;
while(t--)
{
int n,m,sum=0;
cin >> n>>m;
int a[n];
for(int i=0;i<n;i++)
{
cin >> a[i];
}
(isSubsetSum(a,n,m))? cout<<"Yes"<<endl:cout<<"No"<<endl;
}
return 0;
}
| [
"Triaa@penguin"
] | Triaa@penguin |
94b2ab0dba5c390ec419efd0ec698338663aeef3 | bd1fea86d862456a2ec9f56d57f8948456d55ee6 | /000/068/807/CWE122_Heap_Based_Buffer_Overflow__cpp_CWE805_int64_t_memcpy_67a.cpp | 7c453e99b6eeb7ba2c15f10f68df4ed8b160f9fb | [] | no_license | CU-0xff/juliet-cpp | d62b8485104d8a9160f29213368324c946f38274 | d8586a217bc94cbcfeeec5d39b12d02e9c6045a2 | refs/heads/master | 2021-03-07T15:44:19.446957 | 2020-03-10T12:45:40 | 2020-03-10T12:45:40 | 246,275,244 | 0 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 2,502 | cpp | /* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE122_Heap_Based_Buffer_Overflow__cpp_CWE805_int64_t_memcpy_67a.cpp
Label Definition File: CWE122_Heap_Based_Buffer_Overflow__cpp_CWE805.label.xml
Template File: sources-sink-67a.tmpl.cpp
*/
/*
* @description
* CWE: 122 Heap Based Buffer Overflow
* BadSource: Allocate using new[] and set data pointer to a small buffer
* GoodSource: Allocate using new[] and set data pointer to a large buffer
* Sinks: memcpy
* BadSink : Copy int64_t array to data using memcpy
* Flow Variant: 67 Data flow: data passed in a struct from one function to another in different source files
*
* */
#include "std_testcase.h"
namespace CWE122_Heap_Based_Buffer_Overflow__cpp_CWE805_int64_t_memcpy_67
{
typedef struct _structType
{
int64_t * structFirst;
} structType;
#ifndef OMITBAD
/* bad function declaration */
void badSink(structType myStruct);
void bad()
{
int64_t * data;
structType myStruct;
data = NULL;
/* FLAW: Allocate using new[] and point data to a small buffer that is smaller than the large buffer used in the sinks */
data = new int64_t[50];
myStruct.structFirst = data;
badSink(myStruct);
}
#endif /* OMITBAD */
#ifndef OMITGOOD
/* goodG2B uses the GoodSource with the BadSink */
void goodG2BSink(structType myStruct);
static void goodG2B()
{
int64_t * data;
structType myStruct;
data = NULL;
/* FIX: Allocate using new[] and point data to a large buffer that is at least as large as the large buffer used in the sink */
data = new int64_t[100];
myStruct.structFirst = data;
goodG2BSink(myStruct);
}
void good()
{
goodG2B();
}
#endif /* OMITGOOD */
} /* close namespace */
/* Below is the main(). It is only used when building this testcase on
its own for testing or for building a binary to use in testing binary
analysis tools. It is not used when compiling all the testcases as one
application, which is how source code analysis tools are tested. */
#ifdef INCLUDEMAIN
using namespace CWE122_Heap_Based_Buffer_Overflow__cpp_CWE805_int64_t_memcpy_67; /* so that we can use good and bad easily */
int main(int argc, char * argv[])
{
/* seed randomness */
srand( (unsigned)time(NULL) );
#ifndef OMITGOOD
printLine("Calling good()...");
good();
printLine("Finished good()");
#endif /* OMITGOOD */
#ifndef OMITBAD
printLine("Calling bad()...");
bad();
printLine("Finished bad()");
#endif /* OMITBAD */
return 0;
}
#endif
| [
"frank@fischer.com.mt"
] | frank@fischer.com.mt |
ad227d5d5bc1e2cd1f8f87ecd60f8d7f0d7c6f9a | 8e734cf429e5aeeef3a479da01ef9017204f8e60 | /Skystone/Components/AI/SlamAIComponent.cpp | 9e5143d3751c1a5b6c4b4cade11eb2eb3c73832e | [] | no_license | kgwong/ProjectSkystone | e559f2dea5e4d4f5c9b2e4fd385e375d91e39a7e | dcf1970c36714464b7850ed74ecaf39f2a63d414 | refs/heads/master | 2021-01-21T13:52:35.712255 | 2016-06-04T06:59:29 | 2016-06-04T06:59:29 | 44,451,311 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,048 | cpp | #include "SlamAIComponent.h"
#include "Components/Physics/PhysicsComponent.h"
#include "Components/Common/HealthComponent.h"
#include "Game/GameTime.h"
#include "Application/Log.h"
#include "BossAIComponent.h"
#define SPEED 60.0f
SlamAIComponent::SlamAIComponent(GameObject & owner) :
AIComponent(owner),
attack_initiated_(false),
timer_(0),
windup_time_(DEFAULT_WINDUP_TIME),
windup_speed_(DEFAULT_WINDUP_SPEED),
swing_speed_(DEFAULT_SWING_SPEED),
swing_time_(DEFAULT_SWING_TIME),
lag_time_(DEFAULT_LAG_TIME),
enemy_type_("")
{
}
SlamAIComponent::SlamAIComponent(GameObject & owner, std::string enemyType) :
AIComponent(owner),
attack_initiated_(false),
timer_(0),
windup_time_(DEFAULT_WINDUP_TIME),
windup_speed_(DEFAULT_WINDUP_SPEED),
swing_speed_(DEFAULT_SWING_SPEED),
swing_time_(DEFAULT_SWING_TIME),
lag_time_(DEFAULT_LAG_TIME),
enemy_type_(enemyType)
{
}
SlamAIComponent::~SlamAIComponent()
{
}
void SlamAIComponent::start(Scene & scene)
{
physics_ = owner_.getComponent<PhysicsComponent>();
health_ = owner_.getComponent<HealthComponent>();
boss_ = owner_.getComponent<BossAIComponent>();
}
void SlamAIComponent::update(Scene & scene)
{
int facing = -1;
if (enemy_type_ == "Boss")
{
facing = boss_->getFacing();
}
if (attack_initiated_)
{
timer_ += Time::getElapsedUpdateTimeSeconds();
if (timer_ > windup_time_ + swing_time_ + lag_time_)
{
claw_->kill();
attack_initiated_ = false;
timer_ = 0;
boss_->setAttack("shockwave");
}
else if (timer_ > swing_time_ + windup_time_)
{
claw_physics_->setVelX(facing * SPEED * windup_speed_);
}
else if (timer_ > swing_time_)
{
claw_physics_->setVelX(facing * SPEED * swing_speed_);
}
}
else
{
attack_initiated_ = true;
claw_ = scene.gameObjects.add("EnemyProjectile", "ClawProjectile", owner_.getPos() + Point(0, 18));
claw_physics_ = claw_->getComponent<PhysicsComponent>();
claw_physics_->setVelX(windup_speed_ * 60.0f);
}
} | [
"saltie.crackers@gmail.com"
] | saltie.crackers@gmail.com |
9d500b2e852b2d735b2694c74b2ac706986cb3b1 | a13e7993275058dceae188f2101ad0750501b704 | /2021/2050. Parallel Courses III.cpp | 59326669c577af2c28ee8bd87537d7e3634501c9 | [] | no_license | yangjufo/LeetCode | f8cf8d76e5f1e78cbc053707af8bf4df7a5d1940 | 15a4ab7ce0b92b0a774ddae0841a57974450eb79 | refs/heads/master | 2023-09-01T01:52:49.036101 | 2023-08-31T00:23:19 | 2023-08-31T00:23:19 | 126,698,393 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,099 | cpp | class Solution {
public:
int minimumTime(int n, vector<vector<int>>& relations, vector<int>& time) {
vector<int> degrees(n + 1, 0);
unordered_map<int, vector<int>> rMap;
for (vector<int>& re : relations) {
degrees[re[1]]++;
rMap[re[0]].push_back(re[1]);
}
auto comparator = [](pair<int, int>& left, pair<int, int>& right){
return left.second > right.second;
};
priority_queue<pair<int, int>, vector<pair<int, int>>, decltype(comparator)> pq(comparator);
for (int i = 1; i <= n; i++) {
if (degrees[i] == 0) {
pq.push({i, time[i - 1]});
}
}
int t = 0;
while (!pq.empty()) {
int c = pq.top().first;
t = pq.top().second;
pq.pop();
for (int next : rMap[c]) {
degrees[next]--;
if (degrees[next] == 0) {
pq.push({next, t + time[next - 1]});
}
}
}
return t;
}
}; | [
"yangjufo@gmail.com"
] | yangjufo@gmail.com |
886a61c15d5abf9afcbc47b5cc12e8a1009df7f0 | 881ac359c156288576e08bd085096f08fefec5c5 | /Interval_List_Intersections.cpp | a5465ee06486039abc930da175ad13e53fe04c5a | [] | no_license | Somak123/MayLeetcodeChallenge | a0d89d5999a060482eaa716daf5b1926c32705b0 | 0623f5876acab305a61ff711daa4ab88d7406f1b | refs/heads/master | 2022-09-22T13:20:47.443438 | 2020-05-31T08:18:07 | 2020-05-31T08:18:07 | 261,145,681 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 735 | cpp | class Solution {
public:
vector<vector<int>> intervalIntersection(vector<vector<int>>& A, vector<vector<int>>& B) {
vector<vector<int>>ans;
int i=0,j=0;
while(i<A.size() and j<B.size())
{
int fi=A[i][0];
int si=A[i][1];
int fj=B[j][0];
int sj=B[j][1];
if(fi>sj)
j++;
else if(fj>si)
i++;
else
{
int ansf=max(fi,fj);
int anss=min(si,sj);
ans.push_back({ansf,anss});
if(si<sj)
i++;
else
j++;
}
}
return ans;
}
};
| [
"noreply@github.com"
] | noreply@github.com |
4a9fa91855891fa28e11e92d0bbc29dd5dffc451 | c966fcb5cdd6b27f877b01289bc6ae3059f8e2bc | /Rocky1.0/clearscreen.cpp | 976de92db5f1242237e1f183471be626385b79c5 | [] | no_license | liuseli/Cpp-repo | 27aa9bcebaa7459c1e5552b192f07e38dd489100 | 7faf44530e96c0a56997be940ec7cd75a7e85d3d | refs/heads/main | 2023-08-03T22:20:53.390570 | 2021-09-16T16:57:38 | 2021-09-16T16:57:38 | 403,865,382 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 175 | cpp | #include "clearscreen.h"
#include <cstdlib>
using namespace std;
void ClearScreen()
{
#ifdef WINDOWS
system ( "CLS" );
#else
// Assume POSIX
system ( "clear" );
#endif
} | [
"noreply@github.com"
] | noreply@github.com |
d4d4160537962a5f17703fc274f38f795bbccadd | 387ad3775fad21d2d8ffa3c84683d9205b6e697d | /openhpi/tags/2.9.2/plugins/ipmidirect/ipmi_resource.h | 6717410ebabe9030e0e35f571ff182b0b0a04daa | [] | no_license | kodiyalashetty/test_iot | 916088ceecffc17d2b6a78d49f7ea0bbd0a6d0b7 | 0ae3c2ea6081778e1005c40a9a3f6d4404a08797 | refs/heads/master | 2020-03-22T11:53:21.204497 | 2018-03-09T01:43:41 | 2018-03-09T01:43:41 | 140,002,491 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,682 | h | /*
* ipmi_resource.h
*
* Copyright (c) 2004 by FORCE Computers.
* Copyright (c) 2005 by ESO Technologies.
*
* 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. This
* file and program are licensed under a BSD style license. See
* the Copying file included with the OpenHPI distribution for
* full licensing terms.
*
* Authors:
* Thomas Kanngieser <thomas.kanngieser@fci.com>
* Pierre Sangouard <psangouard@eso-tech.com>
*/
#ifndef dIpmiResource_h
#define dIpmiResource_h
#ifndef dIpmiSensorHotswap_h
#include "ipmi_sensor_hotswap.h"
#endif
#ifndef dIpmiControl_h
#include "ipmi_control.h"
#endif
#ifndef dArray_h
#include "array.h"
#endif
#ifndef dIpmiCon_h
#include "ipmi_con.h"
#endif
class cIpmiResource : cArray<cIpmiRdr>
{
public:
bool m_sel; // true if this is a resource,
// which provides access to SEL
// find a specific rdr
cIpmiRdr *FindRdr( cIpmiMc *mc, SaHpiRdrTypeT type, unsigned int num, unsigned int lun = 0 );
cIpmiRdr *FindRdr( cIpmiMc *mc, SaHpiRdrTypeT type, cIpmiRdr *rdr );
bool AddRdr( cIpmiRdr *rdr );
bool RemRdr( cIpmiRdr *rdr );
int FindRdr( cIpmiRdr *rdr ) { return Find( rdr ); }
int NumRdr() { return Num(); }
cIpmiRdr *GetRdr( int idx ) { return operator[]( idx ); }
protected:
cIpmiMc *m_mc;
unsigned int m_fru_id;
cIpmiEntityPath m_entity_path;
bool m_is_fru;
cIpmiSensorHotswap *m_hotswap_sensor;
// state only to create state change Mx -> M0
// where Mx is m_picmg_fru_state
tIpmiFruState m_picmg_fru_state;
bool m_policy_canceled;
SaHpiTimeoutT m_extract_timeout;
unsigned int m_oem;
// mapping of sensor numbers
int m_sensor_num[256];
public:
int CreateSensorNum( SaHpiSensorNumT num );
public:
cIpmiMc *Mc() const { return m_mc; }
unsigned int FruId() const { return m_fru_id; }
tIpmiFruState &PicmgFruState() { return m_picmg_fru_state; }
bool &PolicyCanceled() { return m_policy_canceled; }
SaHpiTimeoutT &ExtractTimeout() { return m_extract_timeout; }
cIpmiDomain *Domain() const;
unsigned int &Oem() { return m_oem; }
cIpmiEntityPath &EntityPath() { return m_entity_path; }
bool &IsFru() { return m_is_fru; }
protected:
cIpmiTextBuffer m_resource_tag;
public:
cIpmiTextBuffer &ResourceTag() { return m_resource_tag; }
public:
cIpmiResource( cIpmiMc *mc, unsigned int fru_id );
virtual ~cIpmiResource();
public:
// return hotswap sensor if there is one
cIpmiSensorHotswap *GetHotswapSensor() { return m_hotswap_sensor; }
protected:
unsigned int m_current_control_id;
public:
// get a unique control num for this resource
unsigned int GetControlNum()
{
return ++m_current_control_id;
}
// HPI resource id
SaHpiResourceIdT m_resource_id;
virtual bool Create( SaHpiRptEntryT &entry );
virtual void Destroy();
SaErrorT SendCommand( const cIpmiMsg &msg, cIpmiMsg &rsp,
unsigned int lun = 0, int retries = dIpmiDefaultRetries );
SaErrorT SendCommandReadLock( cIpmiRdr *rdr, const cIpmiMsg &msg, cIpmiMsg &rsp,
unsigned int lun = 0, int retries = dIpmiDefaultRetries );
SaErrorT SendCommandReadLock( const cIpmiMsg &msg, cIpmiMsg &rsp,
unsigned int lun = 0, int retries = dIpmiDefaultRetries );
void Activate();
void Deactivate();
SaHpiHsStateT GetHpiState();
private:
bool m_populate;
public:
// create and populate hpi resource
virtual bool Populate();
};
#endif
| [
"renierm@a44bbd40-eb13-0410-a9b2-f80f2f72fa26"
] | renierm@a44bbd40-eb13-0410-a9b2-f80f2f72fa26 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.