blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 3 264 | content_id stringlengths 40 40 | detected_licenses listlengths 0 85 | license_type stringclasses 2
values | repo_name stringlengths 5 140 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringclasses 986
values | visit_date timestamp[us] | revision_date timestamp[us] | committer_date timestamp[us] | github_id int64 3.89k 681M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 23
values | gha_event_created_at timestamp[us] | gha_created_at timestamp[us] | gha_language stringclasses 145
values | src_encoding stringclasses 34
values | language stringclasses 1
value | is_vendor bool 1
class | is_generated bool 2
classes | length_bytes int64 3 10.4M | extension stringclasses 122
values | content stringlengths 3 10.4M | authors listlengths 1 1 | author_id stringlengths 0 158 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
a72ea5a9e8f21f346466ef93de82e4e4f38ef1aa | b3562393b9e7eea2f704ee242f3462d05084512b | /src/pintool/histlockplus.cpp | 94b603ead65a2d0652f5b9f381135db54a391557 | [
"Apache-2.0"
] | permissive | jialinyang1990/data-race-detectors | cab2431dea6ca47502ecf283898844a6b0d38c9d | c8b6b8905b844dd83bcabe985bdef11bfe3e26af | refs/heads/master | 2020-04-02T01:48:47.550497 | 2018-10-20T06:50:03 | 2018-10-20T06:50:23 | 153,876,370 | 3 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 13,187 | cpp | //#define WINDOW_SIZE 100
#include "histlockplus.h"
namespace pintool {
using namespace race;
HistLockPlus::Meta *HistLockPlus::GetMeta(address_t iaddr) {
Meta::Table::iterator it = meta_table_.find(iaddr);
if (it == meta_table_.end()) {
Meta *meta = new HistLockPlusMeta(iaddr);
meta_table_[iaddr] = meta;
return meta;
} else {
return it->second;
}
}
void HistLockPlus::ThreadStart(thread_id_t curr_thd_id, thread_id_t parent_thd_id) {
Detector::ThreadStart(curr_thd_id, parent_thd_id);
releaseCnt_map_[curr_thd_id] = 0;
}
void HistLockPlus::AfterPthreadJoin(thread_id_t curr_thd_id, timestamp_t curr_thd_clk,
Inst *inst, thread_id_t child_thd_id) {
Detector::AfterPthreadJoin(curr_thd_id, curr_thd_clk, inst, child_thd_id);
VectorClock *curr_vc = curr_vc_map_[curr_thd_id];
DEBUG_ASSERT(curr_vc);
// increment the vector clock
curr_vc->Increment(curr_thd_id);
}
void HistLockPlus::BeforeCall(thread_id_t curr_thd_id, timestamp_t curr_thd_clk,
Inst *inst, address_t target) {
callsite_map_[curr_thd_id] = target;
}
void HistLockPlus::ProcessLock(thread_id_t curr_thd_id, address_t addr, MutexMeta *meta) {
lockset_map_[curr_thd_id].Add(addr);
}
void HistLockPlus::ProcessUnlock(thread_id_t curr_thd_id, address_t addr, MutexMeta *meta) {
lockset_map_[curr_thd_id].Remove(addr);
releaseCnt_map_[curr_thd_id]++;
}
void HistLockPlus::ProcessRead(thread_id_t curr_thd_id, Meta *meta, Inst *inst) {
// cast the meta
HistLockPlusMeta *histlockplus_meta = dynamic_cast<HistLockPlusMeta *> (meta);
DEBUG_ASSERT(histlockplus_meta);
// get the current vector clock
VectorClock *curr_vc = curr_vc_map_[curr_thd_id];
Lockset &curr_ls = lockset_map_[curr_thd_id];
HistLockPlusMeta::ELPIList &reader_elpi_list = histlockplus_meta->reader_elpi_list;
HistLockPlusMeta::ELPIList &writer_elpi_list = histlockplus_meta->writer_elpi_list;
HistLockPlusMeta::CallSiteELPIList &reader_callsite = histlockplus_meta->reader_callsite_elpi_map[curr_thd_id];
if (!reader_elpi_list.empty()) {
HistLockPlusMeta::ECtx &last_r = histlockplus_meta->reader_elpi_list.back().first.first;
if (last_r.first.Equal(curr_vc) && last_r.second == releaseCnt_map_[curr_thd_id]) {
skip_r_c_++;
return;
}
}
if (!writer_elpi_list.empty()) {
HistLockPlusMeta::ECtx &last_w = histlockplus_meta->writer_elpi_list.back().first.first;
if (last_w.first.Equal(curr_vc) && last_w.second == releaseCnt_map_[curr_thd_id]) {
skip_w_c_++;
return;
}
}
// check writers
for (HistLockPlusMeta::ELPIList::iterator it = writer_elpi_list.begin(); it != writer_elpi_list.end(); ++it) {
detect_wr_++;
Epoch &writer_epoch = it->first.first.first;
Lockset &writer_lockset = it->first.second;
if (!writer_epoch.HappensBefore(curr_vc) && writer_lockset.IsDisjoint(curr_ls)) {
DEBUG_FMT_PRINT_SAFE("RAW race detcted [T%lx]\n", curr_thd_id);
DEBUG_FMT_PRINT_SAFE(" addr = 0x%lx\n", histlockplus_meta->addr);
DEBUG_FMT_PRINT_SAFE(" inst = [%s]\n", inst->ToString().c_str());
// mark the meta as racy
histlockplus_meta->racy = true;
// RAW race detected, report them
thread_id_t thd_id = writer_epoch.GetTid();
timestamp_t clk = writer_epoch.GetClock();
if (curr_thd_id != thd_id && clk > curr_vc->GetClock(thd_id)) {
DEBUG_ASSERT(it->second != NULL);
Inst *writer_inst = it->second;
// report the race
ReportRace(histlockplus_meta, thd_id, writer_inst, RACE_EVENT_WRITE,
curr_thd_id, inst, RACE_EVENT_READ);
}
}
}
clock_t t = clock();
if (reader_callsite.first != callsite_map_[curr_thd_id]) {
std::set<HistLockPlusMeta::ELPIList::iterator, iteratorcomp> myset;
for (HistLockPlusMeta::ELPIIterList::iterator it = reader_callsite.second.begin(); it != reader_callsite.second.end(); ++it) {
HistLockPlusMeta::ELPIIterList::iterator it2 = it;
while (++it2 != reader_callsite.second.end()) {
HistLockPlusMeta::ELPIList::iterator myit = *it;
const Epoch &epoch = myit->first.first.first;
const Lockset &lockset = myit->first.second;
HistLockPlusMeta::ELPIList::iterator myit2 = *it2;
const Epoch &epoch2 = myit2->first.first.first;
const Lockset &lockset2 = myit2->first.second;
if (epoch == epoch2 && lockset.IsSubsetOf(lockset2)) {
myset.insert(myit);
} else if (epoch == epoch2 && lockset2.IsSubsetOf(lockset)) {
myset.insert(myit2);
}
}
}
for (std::set<HistLockPlusMeta::ELPIList::iterator>::iterator ii = myset.begin(); ii != myset.end(); ii++) {
eli_r_c_++;
reader_elpi_list.erase(*ii);
}
reader_callsite.first = callsite_map_[curr_thd_id];
reader_callsite.second.clear();
myset.clear();
}
t = clock() - t;
time_eli_read += ((float) t) / CLOCKS_PER_SEC;
// update meta data
update_r_++;
Epoch curr_epoch;
curr_epoch.Make(curr_thd_id, curr_vc->GetClock(curr_thd_id));
HistLockPlusMeta::ECtx curr_ectx(curr_epoch, releaseCnt_map_[curr_thd_id]);
HistLockPlusMeta::ELP elp(curr_ectx, curr_ls);
HistLockPlusMeta::ELPI elpi(elp, inst);
HistLockPlusMeta::ELPIList::iterator position = reader_elpi_list.insert(reader_elpi_list.end(), elpi);
histlockplus_meta->reader_callsite_elpi_map[curr_thd_id].second.push_back(position);
// if (reader_elpi_list.size() > WINDOW_SIZE) {
// reader_elpi_list.pop_front();
// }
// update race inst set if needed
if (track_racy_inst_) {
histlockplus_meta->race_inst_set.insert(inst);
}
}
void HistLockPlus::ProcessWrite(thread_id_t curr_thd_id, Meta *meta, Inst *inst) {
// cast the meta
HistLockPlusMeta *histlockplus_meta = dynamic_cast<HistLockPlusMeta *> (meta);
DEBUG_ASSERT(histlockplus_meta);
// get the current vector clock
VectorClock *curr_vc = curr_vc_map_[curr_thd_id];
Lockset &curr_ls = lockset_map_[curr_thd_id];
HistLockPlusMeta::ELPIList &reader_elpi_list = histlockplus_meta->reader_elpi_list;
HistLockPlusMeta::ELPIList &writer_elpi_list = histlockplus_meta->writer_elpi_list;
HistLockPlusMeta::CallSiteELPIList &writer_callsite = histlockplus_meta->writer_callsite_elpi_map[curr_thd_id];
if (!writer_elpi_list.empty()) {
HistLockPlusMeta::ECtx &last_w = histlockplus_meta->writer_elpi_list.back().first.first;
if (last_w.first.Equal(curr_vc) && last_w.second == releaseCnt_map_[curr_thd_id]) {
skip_w_c_++;
return;
}
}
// check writers
for (HistLockPlusMeta::ELPIList::iterator it = writer_elpi_list.begin(); it != writer_elpi_list.end(); ++it) {
detect_ww_++;
Epoch &writer_epoch = it->first.first.first;
Lockset &writer_lockset = it->first.second;
if (!writer_epoch.HappensBefore(curr_vc) && writer_lockset.IsDisjoint(curr_ls)) {
DEBUG_FMT_PRINT_SAFE("WAW race detcted [T%lx]\n", curr_thd_id);
DEBUG_FMT_PRINT_SAFE(" addr = 0x%lx\n", histlockplus_meta->addr);
DEBUG_FMT_PRINT_SAFE(" inst = [%s]\n", inst->ToString().c_str());
// mark the meta as racy
histlockplus_meta->racy = true;
// WAW race detected, report them
thread_id_t thd_id = writer_epoch.GetTid();
timestamp_t clk = writer_epoch.GetClock();
if (curr_thd_id != thd_id && clk > curr_vc->GetClock(thd_id)) {
DEBUG_ASSERT(it->second != NULL);
Inst *writer_inst = it->second;
// report the race
ReportRace(histlockplus_meta, thd_id, writer_inst, RACE_EVENT_WRITE,
curr_thd_id, inst, RACE_EVENT_WRITE);
}
}
}
// check readers
for (HistLockPlusMeta::ELPIList::iterator it = reader_elpi_list.begin(); it != reader_elpi_list.end(); ++it) {
detect_rw_++;
Epoch &reader_epoch = it->first.first.first;
Lockset &reader_lockset = it->first.second;
if (!reader_epoch.HappensBefore(curr_vc) && reader_lockset.IsDisjoint(curr_ls)) {
DEBUG_FMT_PRINT_SAFE("WAR race detcted [T%lx]\n", curr_thd_id);
DEBUG_FMT_PRINT_SAFE(" addr = 0x%lx\n", histlockplus_meta->addr);
DEBUG_FMT_PRINT_SAFE(" inst = [%s]\n", inst->ToString().c_str());
// mark the meta as racy
histlockplus_meta->racy = true;
// WAR race detected, report them
thread_id_t thd_id = reader_epoch.GetTid();
timestamp_t clk = reader_epoch.GetClock();
if (curr_thd_id != thd_id && clk > curr_vc->GetClock(thd_id)) {
DEBUG_ASSERT(it->second != NULL);
Inst *reader_inst = it->second;
// report the race
ReportRace(histlockplus_meta, thd_id, reader_inst, RACE_EVENT_READ,
curr_thd_id, inst, RACE_EVENT_WRITE);
}
}
}
clock_t t = clock();
if (writer_callsite.first != callsite_map_[curr_thd_id]) {
std::set<HistLockPlusMeta::ELPIList::iterator, iteratorcomp> myset;
for (HistLockPlusMeta::ELPIIterList::iterator it = writer_callsite.second.begin(); it != writer_callsite.second.end(); ++it) {
HistLockPlusMeta::ELPIIterList::iterator it2 = it;
while (++it2 != writer_callsite.second.end()) {
HistLockPlusMeta::ELPIList::iterator myit = *it;
const Epoch &epoch = myit->first.first.first;
const Lockset &lockset = myit->first.second;
HistLockPlusMeta::ELPIList::iterator myit2 = *it2;
const Epoch &epoch2 = myit2->first.first.first;
const Lockset &lockset2 = myit2->first.second;
if (epoch == epoch2 && lockset.IsSubsetOf(lockset2)) {
myset.insert(myit);
} else if (epoch == epoch2 && lockset2.IsSubsetOf(lockset)) {
myset.insert(myit2);
}
}
}
for (std::set<HistLockPlusMeta::ELPIList::iterator>::iterator ii = myset.begin(); ii != myset.end(); ii++) {
eli_w_c_++;
writer_elpi_list.erase(*ii);
}
writer_callsite.first = callsite_map_[curr_thd_id];
writer_callsite.second.clear();
myset.clear();
}
t = clock() - t;
time_eli_write += ((float) t) / CLOCKS_PER_SEC;
// update meta data
update_w_++;
Epoch curr_epoch;
curr_epoch.Make(curr_thd_id, curr_vc->GetClock(curr_thd_id));
HistLockPlusMeta::ECtx curr_ectx(curr_epoch, releaseCnt_map_[curr_thd_id]);
HistLockPlusMeta::ELP elp(curr_ectx, curr_ls);
HistLockPlusMeta::ELPI elpi(elp, inst);
HistLockPlusMeta::ELPIList::iterator position = writer_elpi_list.insert(writer_elpi_list.end(), elpi);
histlockplus_meta->writer_callsite_elpi_map[curr_thd_id].second.push_back(position);
// if (writer_elpi_list.size() > WINDOW_SIZE) {
// writer_elpi_list.pop_front();
// }
// update race inst set if needed
if (track_racy_inst_) {
histlockplus_meta->race_inst_set.insert(inst);
}
}
void HistLockPlus::ProcessFree(Meta *meta) {
// cast the meta
HistLockPlusMeta *histlockplus_meta = dynamic_cast<HistLockPlusMeta *> (meta);
DEBUG_ASSERT(histlockplus_meta);
// update racy inst set if needed
if (track_racy_inst_ && histlockplus_meta->racy) {
for (HistLockPlusMeta::InstSet::iterator it = histlockplus_meta->race_inst_set.begin();
it != histlockplus_meta->race_inst_set.end(); ++it) {
race_db_->SetRacyInst(*it, true);
}
}
delete histlockplus_meta;
}
}
| [
"jialinyang1990@gmail.com"
] | jialinyang1990@gmail.com |
6fc642cdacd6e44a84ba6c3772af66df3bc84f33 | 41721eef584d00c288069b17bef8049b5cc7dd6e | /lock_smain.cc | 7cfea2e42e14de9e17f056a206f4e980261449e7 | [] | no_license | chris98122/CSE-filesystem | dfb11ddfe3856fa780837d19daef90ae206a1efd | 64c18c6cd6ee7062cf4ee630be7cfc672827010f | refs/heads/master | 2020-09-28T15:47:59.628151 | 2019-12-09T07:16:42 | 2019-12-09T07:16:42 | 226,808,595 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,153 | cc | #include "rpc.h"
#include <arpa/inet.h>
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
//#include "lock_server.h"
#include "lock_server_cache.h"
#include "jsl_log.h"
// Main loop of lock_server
int main(int argc, char *argv[])
{
int count = 0;
setvbuf(stdout, NULL, _IONBF, 0);
setvbuf(stderr, NULL, _IONBF, 0);
srandom(getpid());
if (argc != 2)
{
fprintf(stderr, "Usage: %s port\n", argv[0]);
exit(1);
}
char *count_env = getenv("RPC_COUNT");
if (count_env != NULL)
{
count = atoi(count_env);
}
//jsl_set_debug(2);
#ifndef RSM
/*lock_server ls;
rpcs server(atoi(argv[1]), count);
server.reg(lock_protocol::stat, &ls, &lock_server::stat);
server.reg(lock_protocol::acquire, &ls, &lock_server::acquire);
server.reg(lock_protocol::release, &ls, &lock_server::release);*/
lock_server_cache ls;
rpcs server(atoi(argv[1]), count);
server.reg(lock_protocol::stat, &ls, &lock_server_cache::stat);
server.reg(lock_protocol::release, &ls, &lock_server_cache::release);
server.reg(lock_protocol::acquire, &ls, &lock_server_cache::acquire);
#endif
while (1)
sleep(1000);
}
| [
"chris98122@126.com"
] | chris98122@126.com |
ba6a6ba94aaa3d654819781763f658188b314ba1 | dd6147bf9433298a64bbceb7fdccaa4cc477fba6 | /8381/Kireev_Konstantin/lab1/code/unitsclasses.h | 9dbb655b3ad8b058889bf8df20ebbe73cb8d92f7 | [] | no_license | moevm/oop | 64a89677879341a3e8e91ba6d719ab598dcabb49 | faffa7e14003b13c658ccf8853d6189b51ee30e6 | refs/heads/master | 2023-03-16T15:48:35.226647 | 2020-06-08T16:16:31 | 2020-06-08T16:16:31 | 85,785,460 | 42 | 304 | null | 2023-03-06T23:46:08 | 2017-03-22T04:37:01 | C++ | UTF-8 | C++ | false | false | 1,714 | h | #pragma once
#include <unitsinterface.h>
class DamageAbsorberInfantry : public InfantryInterface, public UnitDamageAbsorberInterface //пехота, поглощающая урон
{
public:
DamageAbsorberInfantry();
QString getClass() override;
cellInterface* copy() override { return new DamageAbsorberInfantry(*this); }
};
class CritInfantry : public InfantryInterface, public UnitCritInterface //пехота, с критическим уроном
{
public:
CritInfantry();
QString getClass() override;
cellInterface* copy() override { return new CritInfantry(*this); }
};
class DamageAbsorberCavalry : public CavalryInterface, public UnitDamageAbsorberInterface //конница, поглощающая урон
{
public:
DamageAbsorberCavalry();
QString getClass() override;
cellInterface* copy() override { return new DamageAbsorberCavalry(*this); }
};
class CritCavalry : public CavalryInterface, public UnitCritInterface //конница, с критическим уроном
{
public:
CritCavalry();
QString getClass() override;
cellInterface* copy() override { return new CritCavalry(*this); }
};
class DamageAbsorberArcher : public ArcherInterface, public UnitDamageAbsorberInterface //лучники, поглощающие урон
{
public:
DamageAbsorberArcher();
QString getClass() override;
cellInterface* copy() override { return new DamageAbsorberArcher(*this); }
};
class CritArcher : public ArcherInterface, public UnitCritInterface //лучники, с критическим уроном
{
public:
CritArcher();
QString getClass() override;
cellInterface* copy() override { return new CritArcher(*this); }
};
| [
"gandhi.noir@mail.ru"
] | gandhi.noir@mail.ru |
d95fdfee1974ec292071aa454a56d5d61393f399 | 72cc56c488930ed632070a1d23c340b6835c24b5 | /Robotics/ca/devel/include/caros_sensor_msgs/PoseSensorState.h | 6aac44c39b9ed9c5bf90a1cb8ed2c42f57cd1c27 | [] | no_license | Keerthikan/ROVI2 | 856b9cb9706ee3ab14f41ce51cc5c6a5f8113225 | 46c6f3dac80207935d87a6f6a39b48c766e302a4 | refs/heads/master | 2021-01-18T22:07:57.035506 | 2016-05-19T08:58:13 | 2016-05-19T08:58:13 | 51,436,830 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 8,984 | h | // Generated by gencpp from file caros_sensor_msgs/PoseSensorState.msg
// DO NOT EDIT!
#ifndef CAROS_SENSOR_MSGS_MESSAGE_POSESENSORSTATE_H
#define CAROS_SENSOR_MSGS_MESSAGE_POSESENSORSTATE_H
#include <string>
#include <vector>
#include <map>
#include <ros/types.h>
#include <ros/serialization.h>
#include <ros/builtin_message_traits.h>
#include <ros/message_operations.h>
#include <std_msgs/Header.h>
#include <geometry_msgs/Transform.h>
namespace caros_sensor_msgs
{
template <class ContainerAllocator>
struct PoseSensorState_
{
typedef PoseSensorState_<ContainerAllocator> Type;
PoseSensorState_()
: header()
, poses()
, ids()
, qualities() {
}
PoseSensorState_(const ContainerAllocator& _alloc)
: header(_alloc)
, poses(_alloc)
, ids(_alloc)
, qualities(_alloc) {
(void)_alloc;
}
typedef ::std_msgs::Header_<ContainerAllocator> _header_type;
_header_type header;
typedef std::vector< ::geometry_msgs::Transform_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::geometry_msgs::Transform_<ContainerAllocator> >::other > _poses_type;
_poses_type poses;
typedef std::vector<uint32_t, typename ContainerAllocator::template rebind<uint32_t>::other > _ids_type;
_ids_type ids;
typedef std::vector<float, typename ContainerAllocator::template rebind<float>::other > _qualities_type;
_qualities_type qualities;
typedef boost::shared_ptr< ::caros_sensor_msgs::PoseSensorState_<ContainerAllocator> > Ptr;
typedef boost::shared_ptr< ::caros_sensor_msgs::PoseSensorState_<ContainerAllocator> const> ConstPtr;
}; // struct PoseSensorState_
typedef ::caros_sensor_msgs::PoseSensorState_<std::allocator<void> > PoseSensorState;
typedef boost::shared_ptr< ::caros_sensor_msgs::PoseSensorState > PoseSensorStatePtr;
typedef boost::shared_ptr< ::caros_sensor_msgs::PoseSensorState const> PoseSensorStateConstPtr;
// constants requiring out of line definition
template<typename ContainerAllocator>
std::ostream& operator<<(std::ostream& s, const ::caros_sensor_msgs::PoseSensorState_<ContainerAllocator> & v)
{
ros::message_operations::Printer< ::caros_sensor_msgs::PoseSensorState_<ContainerAllocator> >::stream(s, "", v);
return s;
}
} // namespace caros_sensor_msgs
namespace ros
{
namespace message_traits
{
// BOOLTRAITS {'IsFixedSize': False, 'IsMessage': True, 'HasHeader': True}
// {'std_msgs': ['/opt/ros/indigo/share/std_msgs/cmake/../msg'], 'geometry_msgs': ['/opt/ros/indigo/share/geometry_msgs/cmake/../msg'], 'caros_common_msgs': ['/home/keerthikan/ca/src/caros/core/caros_common_msgs/msg'], 'caros_sensor_msgs': ['/home/keerthikan/ca/src/caros/interfaces/caros_sensor_msgs/msg']}
// !!!!!!!!!!! ['__class__', '__delattr__', '__dict__', '__doc__', '__eq__', '__format__', '__getattribute__', '__hash__', '__init__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', '_parsed_fields', 'constants', 'fields', 'full_name', 'has_header', 'header_present', 'names', 'package', 'parsed_fields', 'short_name', 'text', 'types']
template <class ContainerAllocator>
struct IsFixedSize< ::caros_sensor_msgs::PoseSensorState_<ContainerAllocator> >
: FalseType
{ };
template <class ContainerAllocator>
struct IsFixedSize< ::caros_sensor_msgs::PoseSensorState_<ContainerAllocator> const>
: FalseType
{ };
template <class ContainerAllocator>
struct IsMessage< ::caros_sensor_msgs::PoseSensorState_<ContainerAllocator> >
: TrueType
{ };
template <class ContainerAllocator>
struct IsMessage< ::caros_sensor_msgs::PoseSensorState_<ContainerAllocator> const>
: TrueType
{ };
template <class ContainerAllocator>
struct HasHeader< ::caros_sensor_msgs::PoseSensorState_<ContainerAllocator> >
: TrueType
{ };
template <class ContainerAllocator>
struct HasHeader< ::caros_sensor_msgs::PoseSensorState_<ContainerAllocator> const>
: TrueType
{ };
template<class ContainerAllocator>
struct MD5Sum< ::caros_sensor_msgs::PoseSensorState_<ContainerAllocator> >
{
static const char* value()
{
return "36099bad0734951e3bf310e00a5d4523";
}
static const char* value(const ::caros_sensor_msgs::PoseSensorState_<ContainerAllocator>&) { return value(); }
static const uint64_t static_value1 = 0x36099bad0734951eULL;
static const uint64_t static_value2 = 0x3bf310e00a5d4523ULL;
};
template<class ContainerAllocator>
struct DataType< ::caros_sensor_msgs::PoseSensorState_<ContainerAllocator> >
{
static const char* value()
{
return "caros_sensor_msgs/PoseSensorState";
}
static const char* value(const ::caros_sensor_msgs::PoseSensorState_<ContainerAllocator>&) { return value(); }
};
template<class ContainerAllocator>
struct Definition< ::caros_sensor_msgs::PoseSensorState_<ContainerAllocator> >
{
static const char* value()
{
return "# Represents the state of a pose sensor.\n\
\n\
# Header containing information about time and frameid\n\
Header header\n\
\n\
# Poses of the sensor\n\
geometry_msgs/Transform[] poses\n\
\n\
# IDs of the poses\n\
uint32[] ids\n\
\n\
# Quality of the sensor pose measurements [0;1] 0=invalid, 1=high quality.\n\
float32[] qualities\n\
\n\
================================================================================\n\
MSG: std_msgs/Header\n\
# Standard metadata for higher-level stamped data types.\n\
# This is generally used to communicate timestamped data \n\
# in a particular coordinate frame.\n\
# \n\
# sequence ID: consecutively increasing ID \n\
uint32 seq\n\
#Two-integer timestamp that is expressed as:\n\
# * stamp.sec: seconds (stamp_secs) since epoch (in Python the variable is called 'secs')\n\
# * stamp.nsec: nanoseconds since stamp_secs (in Python the variable is called 'nsecs')\n\
# time-handling sugar is provided by the client library\n\
time stamp\n\
#Frame this data is associated with\n\
# 0: no frame\n\
# 1: global frame\n\
string frame_id\n\
\n\
================================================================================\n\
MSG: geometry_msgs/Transform\n\
# This represents the transform between two coordinate frames in free space.\n\
\n\
Vector3 translation\n\
Quaternion rotation\n\
\n\
================================================================================\n\
MSG: geometry_msgs/Vector3\n\
# This represents a vector in free space. \n\
# It is only meant to represent a direction. Therefore, it does not\n\
# make sense to apply a translation to it (e.g., when applying a \n\
# generic rigid transformation to a Vector3, tf2 will only apply the\n\
# rotation). If you want your data to be translatable too, use the\n\
# geometry_msgs/Point message instead.\n\
\n\
float64 x\n\
float64 y\n\
float64 z\n\
================================================================================\n\
MSG: geometry_msgs/Quaternion\n\
# This represents an orientation in free space in quaternion form.\n\
\n\
float64 x\n\
float64 y\n\
float64 z\n\
float64 w\n\
";
}
static const char* value(const ::caros_sensor_msgs::PoseSensorState_<ContainerAllocator>&) { return value(); }
};
} // namespace message_traits
} // namespace ros
namespace ros
{
namespace serialization
{
template<class ContainerAllocator> struct Serializer< ::caros_sensor_msgs::PoseSensorState_<ContainerAllocator> >
{
template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
{
stream.next(m.header);
stream.next(m.poses);
stream.next(m.ids);
stream.next(m.qualities);
}
ROS_DECLARE_ALLINONE_SERIALIZER;
}; // struct PoseSensorState_
} // namespace serialization
} // namespace ros
namespace ros
{
namespace message_operations
{
template<class ContainerAllocator>
struct Printer< ::caros_sensor_msgs::PoseSensorState_<ContainerAllocator> >
{
template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::caros_sensor_msgs::PoseSensorState_<ContainerAllocator>& v)
{
s << indent << "header: ";
s << std::endl;
Printer< ::std_msgs::Header_<ContainerAllocator> >::stream(s, indent + " ", v.header);
s << indent << "poses[]" << std::endl;
for (size_t i = 0; i < v.poses.size(); ++i)
{
s << indent << " poses[" << i << "]: ";
s << std::endl;
s << indent;
Printer< ::geometry_msgs::Transform_<ContainerAllocator> >::stream(s, indent + " ", v.poses[i]);
}
s << indent << "ids[]" << std::endl;
for (size_t i = 0; i < v.ids.size(); ++i)
{
s << indent << " ids[" << i << "]: ";
Printer<uint32_t>::stream(s, indent + " ", v.ids[i]);
}
s << indent << "qualities[]" << std::endl;
for (size_t i = 0; i < v.qualities.size(); ++i)
{
s << indent << " qualities[" << i << "]: ";
Printer<float>::stream(s, indent + " ", v.qualities[i]);
}
}
};
} // namespace message_operations
} // namespace ros
#endif // CAROS_SENSOR_MSGS_MESSAGE_POSESENSORSTATE_H
| [
"kerat12@student.sdu.dk"
] | kerat12@student.sdu.dk |
9680a904bad95a20ea6ea0f58126766d3636923e | f381ef7cd2a22ba0063d50ae83126eb53e277dd7 | /deps/src/cvwrap/wrap_stitching.cpp | 69360846b9320eafb19446e33a2e5096d5c9613a | [] | no_license | TakekazuKATO/OpenCV.jl | a56cc5da5ee4ab656729e93fe92d22c6d3106fa2 | cfa7fcf6a74bfb4257528793e6eb357ad323dbd2 | refs/heads/master | 2020-04-05T03:05:43.640693 | 2018-11-28T06:59:10 | 2018-11-28T06:59:10 | 156,501,048 | 6 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 611 | cpp | #include <opencv2/opencv.hpp>
#include "jlcxx/jlcxx.hpp"
#include "modules.hpp"
using namespace jlcxx;
using namespace cv;
JLCXX_MODULE
define_stitching_module(Module& mod) {
mod.add_type<cv::Stitcher>("Stitcher");
mod.method("createStitcher", []() { return cv::createStitcher(); });
mod.method("createStitcher",
[](bool try_use_gpu) { return cv::createStitcher(try_use_gpu); });
/*mod.method("createStitcherScans", []() {
return cv::createStitcherScans( );
});
mod.method("createStitcherScans", [](bool try_use_gpu) {
return cv::createStitcherScans( try_use_gpu );
});*/
}
| [
"takekazu.kato@gmail.com"
] | takekazu.kato@gmail.com |
165c82ac0c189c9b2a6074d351c79119e51d8981 | 9ea185fc14b01c5b90bcc704b53f1c9006389c98 | /include/criterion/trompeloeil.hpp | a899daa2e2ca0a6f35b460fe4a08d5c2b9d72b18 | [
"BSL-1.0"
] | permissive | rollbear/trompeloeil | 593c15ce69e6020f3ab98b1fe0a6671efde8f2a5 | 9d4f09aa4083e8e2eb71d1b03e195daa1dee6439 | refs/heads/main | 2023-09-05T10:01:18.970380 | 2023-08-20T08:43:26 | 2023-08-21T14:27:32 | 25,121,543 | 786 | 113 | BSL-1.0 | 2023-05-06T05:41:48 | 2014-10-12T14:23:48 | C++ | UTF-8 | C++ | false | false | 1,316 | hpp | /*
* Trompeloeil C++ mocking framework
*
* Copyright Björn Fahller 2014-2019
* Copyright Etienne Barbier 2020
*
* Use, modification and distribution is subject to the
* Boost Software License, Version 1.0. (See accompanying
* file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt)
*
* Project home: https://github.com/rollbear/trompeloeil
*/
#ifndef TROMPELOEIL_CRITERION_HPP_
#define TROMPELOEIL_CRITERION_HPP_
#ifndef CRITERION_H_
#error "<criterion.h> must be included before <criterion/trompeloeil.hpp>"
#endif
#include "../trompeloeil.hpp"
namespace trompeloeil
{
template <>
inline void reporter<specialized>::send(
severity s,
char const *file,
unsigned long line,
const char* msg)
{
struct criterion_assert_stats cr_stat__;
cr_stat__.passed = false;
cr_stat__.file = file;
cr_stat__.line = line;
cr_stat__.message = msg;
if (s == severity::fatal)
{
criterion_send_assert(&cr_stat__);
CR_FAIL_ABORT_();
}
else
{
criterion_send_assert(&cr_stat__);
CR_FAIL_CONTINUES_();
}
}
template <>
inline void reporter<specialized>::sendOk(
const char* trompeloeil_mock_calls_done_correctly)
{
cri_asserts_passed_incr();
}
}
#endif //TROMPELOEIL_CRITERION_HPP_
| [
"etienne.barbier@atos.net"
] | etienne.barbier@atos.net |
4910050ba08094b8dd5b5e4ce7acc183e0c45dbb | f2339e85157027dada17fadd67c163ecb8627909 | /Social/LegendCupService/Src/LegendCupManager.h | 3d98156a9cc9bc5b9bd1ee6bbbd54dbd0f1dae7d | [] | no_license | fynbntl/Titan | 7ed8869377676b4c5b96df953570d9b4c4b9b102 | b069b7a2d90f4d67c072e7c96fe341a18fedcfe7 | refs/heads/master | 2021-09-01T22:52:37.516407 | 2017-12-29T01:59:29 | 2017-12-29T01:59:29 | null | 0 | 0 | null | null | null | null | GB18030 | C++ | false | false | 857 | h | /*******************************************************************
** 文件名: E:\speed\Social\LegendCupServer\Src\LegendCupManager.h
** 版 权: (C) 深圳冰川网络技术有限公司 2008 - All Rights Reserved
** 创建人: 秦其勇
** 日 期: 3/18/2015 14:47
** 版 本: 1.0
** 描 述: 杯赛服务管理类
********************************************************************/
#pragma once
#include "IServiceContainer.h"
#include "ILegendCupManager.h"
#include <map>
class LegendCupManager:public ILegendCupManager
{
public:
////////////////////////////////ILegendCupManager//////////////////////////////////////////
virtual SERVICE_PTR getLegendCupService(){return m_LegendCupServices;};
virtual bool load();
virtual void release();
private:
SERVICE_PTR m_LegendCupServices;
private:
bool CreateLegendCupService();
}; | [
"85789685@qq.com"
] | 85789685@qq.com |
d6144998f92972a2ababdc396a5d445aba4f6966 | f7df6576f641633ffa1290969e7b6da48ee3c26d | /src/ObjectUtils/Address.cpp | e60fc1d6f81a634196d06147ea1192cef1174323 | [
"BSD-2-Clause",
"LicenseRef-scancode-free-unknown"
] | permissive | beckerhe/orbitprofiler | 96fa8466dac647618e42ff45319d70aceb4505cc | 56541e1e53726f9f824e8216fdcbd4e7b1178965 | refs/heads/main | 2023-06-06T01:08:10.490090 | 2021-12-10T13:31:51 | 2021-12-10T13:31:51 | 235,291,165 | 2 | 0 | BSD-2-Clause | 2021-12-10T13:31:51 | 2020-01-21T08:32:27 | C++ | UTF-8 | C++ | false | false | 1,825 | cpp | // Copyright (c) 2021 The Orbit Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ObjectUtils/Address.h"
#include <absl/strings/str_format.h>
#include <algorithm>
#include <filesystem>
#include <memory>
#include <string>
#include "OrbitBase/Align.h"
#include "OrbitBase/Logging.h"
namespace orbit_object_utils {
uint64_t SymbolVirtualAddressToAbsoluteAddress(uint64_t symbol_address,
uint64_t module_base_address,
uint64_t module_load_bias,
uint64_t module_executable_section_offset) {
CHECK((module_base_address % kPageSize) == 0);
CHECK((module_load_bias % kPageSize) == 0);
return symbol_address + module_base_address - module_load_bias -
orbit_base::AlignDown<kPageSize>(module_executable_section_offset);
}
uint64_t SymbolOffsetToAbsoluteAddress(uint64_t symbol_address, uint64_t module_base_address,
uint64_t module_executable_section_offset) {
return SymbolVirtualAddressToAbsoluteAddress(symbol_address, module_base_address, /*load_bias=*/0,
module_executable_section_offset);
}
uint64_t SymbolAbsoluteAddressToOffset(uint64_t absolute_address, uint64_t module_base_address,
uint64_t module_executable_section_offset) {
CHECK((module_base_address % kPageSize) == 0);
CHECK(absolute_address >= (module_base_address + module_executable_section_offset % kPageSize));
return absolute_address - module_base_address +
orbit_base::AlignDown<kPageSize>(module_executable_section_offset);
}
} // namespace orbit_object_utils | [
"dimitry@google.com"
] | dimitry@google.com |
9355eefa3afe95b34de10d4625071586b87be40f | 71cd02b16fa272576461523621748c7ab18fff5d | /include/lutok/state.ipp | 531d9c19dacd5e24ab89df117de53879d5492568 | [
"BSD-3-Clause"
] | permissive | freebsd/lutok | 825e4a19d5a526da2e20c508473ad5c57ed25bf8 | 8f8eaefe8b7c76e286b96fcbe2e860af98de29ea | refs/heads/master | 2023-08-03T21:53:47.279403 | 2016-07-14T19:53:32 | 2016-07-18T20:02:30 | 251,681,590 | 2 | 7 | BSD-3-Clause | 2020-03-31T17:35:44 | 2020-03-31T17:35:44 | null | UTF-8 | C++ | false | false | 27 | ipp | #include "../../state.ipp"
| [
"jmmv@julipedia.org"
] | jmmv@julipedia.org |
50117d69e1277f2fd96ec3ead7c4ac595a608aef | 8c917f522c65d106e0b2a0a10c20bf20176b8798 | /C++/Trees/IncreasingorderSearchTree.cpp | b8fa860ed9f4ab43c8b215a3f316f4659cda514d | [] | no_license | khandya1/Placement-prep | 495e3cb23b3fdfec6a1ff184cfd8402d7a271cba | 9bd0880a16fa21dea5a142b9f48a6d6d85c853d9 | refs/heads/master | 2023-06-28T15:03:54.044725 | 2021-08-04T16:39:10 | 2021-08-04T16:39:10 | 369,742,967 | 0 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 717 | cpp | /// https://leetcode.com/problems/increasing-order-search-tree/
/// lc 987
#include <bits/stdc++.h>
#include "TreeCreation.cpp"
using namespace std;
class Solution {
public:
vector<int> x;
TreeNode* increasingBST(TreeNode* root) {
inorder(root);
TreeNode* temp = new TreeNode(x[0]);
TreeNode* vv = temp;
for(int i=1;i<x.size();i++)
{
TreeNode * t = new TreeNode(x[i]);
vv ->right = t;
vv = vv->right;
}
return temp;
}
void inorder(TreeNode* root)
{
if(root==NULL)
return;
inorder(root->left);
x.push_back(root->val);
inorder(root->right);
}
}; | [
"63929895+khandya1@users.noreply.github.com"
] | 63929895+khandya1@users.noreply.github.com |
52030b56823d74f811775a2c4f062e9f5fcc1ffb | 2b930079819f0384fd021184c71ab8ec0cfb4808 | /q5/widget.h | a65936efc447f890c1c5c34f17274c1f57d49c41 | [] | no_license | SethMarkarian/Lab-Exam-2 | 426d5e4c77e4caba1e824a064fb362ceb098db55 | 502e60792ca792d8a79f45780a581c3cbb365d5c | refs/heads/master | 2020-05-02T21:59:52.864684 | 2019-03-28T16:03:15 | 2019-03-28T16:03:15 | 178,237,766 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 458 | h | #ifndef WIDGET_H
#define WIDGET_H
#include <QWidget>
namespace Ui {
class Widget;
}
class Widget : public QWidget
{
Q_OBJECT
public:
explicit Widget(QWidget *parent = nullptr);
~Widget();
void replot();
private slots:
void on_move_left_clicked();
void on_move_right_clicked();
void on_pushButton_clicked();
private:
Ui::Widget *ui;
std::vector<double> *vx, *vy;
double minX, maxX, incrX;
};
#endif // WIDGET_H
| [
"markaris@lafayette.edu"
] | markaris@lafayette.edu |
3b06345ba3b7ec8202243a8397be686e3554932f | c9cdb8772eb74c832b703624f6395f1e8b84c09e | /Target/BeagleBoneBlack/CCore/src/dev/DevEth.cpp | 751b21ffd688e8db6dbf53b47c5a18a2c2ebbd2b | [
"BSL-1.0"
] | permissive | SergeyStrukov/CCore | 70799f40d0ecfec75ab9298f60e7396413931800 | 509bd439ae5621603f9fbe8e8b3ca03721ac283b | refs/heads/master | 2021-01-17T17:01:19.899215 | 2015-08-12T18:41:25 | 2015-08-12T18:41:25 | 3,891,233 | 6 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 39,402 | cpp | /* DevEth.cpp */
//----------------------------------------------------------------------------------------
//
// Project: CCore 1.08
//
// Tag: Target/BeagleBoneBlack
//
// 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) 2014 Sergey Strukov. All rights reserved.
//
//----------------------------------------------------------------------------------------
#include <CCore/inc/dev/DevEth.h>
#include <CCore/inc/dev/AM3359.ETH.h>
#include <CCore/inc/dev/AM3359.CONTROL.h>
#include <CCore/inc/dev/AM3359.PRCM.h>
#include <CCore/inc/dev/DevIntHandle.h>
#include <CCore/inc/Exception.h>
#include <CCore/inc/Abort.h>
#include <CCore/inc/SpecialMemBase.h>
//#include <CCore/inc/Print.h>
namespace CCore {
namespace Dev {
/* class EthControl */
Net::MACAddress EthControl::MakeAddress(uint32 hi,uint32 lo)
{
return Net::MACAddress(uint8(lo),uint8(lo>>8),uint8(lo>>16),uint8(lo>>24),uint8(hi),uint8(hi>>8));
}
void EthControl::connect()
{
Mutex::Lock lock(Dev::ControlMutex);
using namespace AM3359::CONTROL;
Bar bar;
bar.get_GMIISelect()
.set_Port1(GMIISelect_Port1_GMII)
.set_Port2(GMIISelect_Port2_GMII)
.setbit(GMIISelect_Port1RMIIClockInput|GMIISelect_Port2RMIIClockInput)
.setTo(bar);
bar.get_EthResetIsolation()
.clearbit(EthResetIsolation_Enable)
.setTo(bar);
address1=MakeAddress(bar.get_MAC0Hi(),bar.get_MAC0Lo());
address2=MakeAddress(bar.get_MAC1Hi(),bar.get_MAC1Lo());
bar.null_PadMux()
.set_MuxMode(0)
.setbit(PadMux_NoPullUpDown)
.set(bar.to_Conf_MII1_TX_EN())
.set(bar.to_Conf_MII1_TXD3())
.set(bar.to_Conf_MII1_TXD2())
.set(bar.to_Conf_MII1_TXD1())
.set(bar.to_Conf_MII1_TXD0());
#if 0
Printf(Con,"#;\n",bar.get_Conf_MII1_TXD0()); // 0
Printf(Con,"#;\n",bar.get_Conf_MII1_TXD1()); // 0
Printf(Con,"#;\n",bar.get_Conf_MII1_TXD2()); // 0
Printf(Con,"#;\n",bar.get_Conf_MII1_TXD3()); // 0
Printf(Con,"#;\n",bar.get_Conf_MII1_TX_EN()); // 0
#endif
bar.null_PadMux()
.set_MuxMode(0)
.setbit(PadMux_RXEn)
.set(bar.to_Conf_MII1_RXD0())
.set(bar.to_Conf_MII1_RXD1())
.set(bar.to_Conf_MII1_RXD2())
.set(bar.to_Conf_MII1_RXD3())
.set(bar.to_Conf_MII1_RX_ER())
.set(bar.to_Conf_MII1_RX_DV())
.set(bar.to_Conf_MII1_TX_CLK())
.set(bar.to_Conf_MII1_RX_CLK())
.set(bar.to_Conf_MII1_COL())
.set(bar.to_Conf_MII1_CRS());
#if 0
Printf(Con,"#;\n",bar.get_Conf_MII1_RXD0()); // Rx 0 PD
Printf(Con,"#;\n",bar.get_Conf_MII1_RXD1()); // Rx 0 PD
Printf(Con,"#;\n",bar.get_Conf_MII1_RXD2()); // Rx 0 PD
Printf(Con,"#;\n",bar.get_Conf_MII1_RXD3()); // Rx 0 PD
Printf(Con,"#;\n",bar.get_Conf_MII1_RX_ER()); // Rx 0 PD
Printf(Con,"#;\n",bar.get_Conf_MII1_RX_DV()); // Rx 0 PD
Printf(Con,"#;\n",bar.get_Conf_MII1_TX_CLK()); // Rx 0 PD
Printf(Con,"#;\n",bar.get_Conf_MII1_RX_CLK()); // Rx 0 PD
Printf(Con,"#;\n",bar.get_Conf_MII1_COL()); // Rx 0 PD
Printf(Con,"#;\n",bar.get_Conf_MII1_CRS()); // Rx 0 PD
#endif
bar.null_PadMux()
.set_MuxMode(0)
.setbit(PadMux_RXEn|PadMux_PullUp)
.set(bar.to_Conf_MDIO());
bar.null_PadMux()
.set_MuxMode(0)
.setbit(PadMux_NoPullUpDown)
.set(bar.to_Conf_MDC());
#if 0
Printf(Con,"#;\n",bar.get_Conf_MDIO()); // Rx 0 PU
Printf(Con,"#;\n",bar.get_Conf_MDC()); // 0 PU
#endif
bar.null_PadMux()
.set_MuxMode(7)
.setbit(PadMux_RXEn)
.set(bar.to_Conf_RMII1_REF_CLK());
#if 0
Printf(Con,"#;\n",bar.get_Conf_RMII1_REF_CLK()); // Rx 7 PD
#endif
}
void EthControl::enable()
{
Mutex::Lock lock(Dev::ControlMutex);
using namespace AM3359::PRCM;
#if 0
{
BarWKUP bar;
Printf(Con,"IdleStatus = #;\n",bar.get_COREIdleStatus()); // Locked
Printf(Con,"ClockSelect = #;\n",bar.get_COREClockSelect()); // Mul 1000 Div 23
Printf(Con,"ClockMode = #;\n",bar.get_COREClockMode()); // Lock
Printf(Con,"M4 = #;\n",bar.get_CORE_M4Div()); // Div 10
Printf(Con,"M5 = #;\n",bar.get_CORE_M5Div()); // Div 8
Printf(Con,"M6 = #;\n",bar.get_CORE_M6Div()); // Div 4
}
{
BarDPLL bar;
bar.get_CPTSClockSelect()
.clearbit(CPTSClockSelect_M4)
.setTo(bar);
Printf(Con,"M4/M5 = #;\n",bar.get_CPTSClockSelect()); // M5
}
#endif
{
BarPER bar;
bar.get_EthClockControl()
.set_Control(EthClockControl_Control_ForceWakeup)
.setTo(bar);
bar.get_Eth()
.set_Mode(ClockStandbyControl_Mode_Enable)
.set(bar.to_Eth());
while( bar.get_Eth().get_IdleStatus()!=ClockStandbyControl_IdleStatus_Running );
#if 0
Printf(Con,"Clock = #;\n",bar.get_EthClockControl()); // ForceWakeup
Printf(Con,"Module = #;\n",bar.get_Eth()); // Enable
#endif
}
}
void EthControl::reset()
{
using namespace AM3359::ETH;
{
BarWR bar;
bar.null_WRSoftReset()
.setbit(WRSoftReset_Reset)
.setTo(bar);
while( bar.get_WRSoftReset().maskbit(WRSoftReset_Reset)!=0 );
}
{
BarSwitch bar;
bar.null_SwitchSoftReset()
.setbit(SwitchSoftReset_Reset)
.setTo(bar);
while( bar.get_SwitchSoftReset().maskbit(SwitchSoftReset_Reset)!=0 );
}
{
BarSliver1 bar;
bar.null_SliverSoftReset()
.setbit(SliverSoftReset_Reset)
.setTo(bar);
while( bar.get_SliverSoftReset().maskbit(SliverSoftReset_Reset)!=0 );
}
{
BarSliver2 bar;
bar.null_SliverSoftReset()
.setbit(SliverSoftReset_Reset)
.setTo(bar);
while( bar.get_SliverSoftReset().maskbit(SliverSoftReset_Reset)!=0 );
}
{
BarDMA bar;
bar.null_DMASoftReset()
.setbit(DMASoftReset_Reset)
.setTo(bar);
while( bar.get_DMASoftReset().maskbit(DMASoftReset_Reset)!=0 );
}
{
BarDesc bar;
for(uint32 ind=0; ind<8 ;ind++) bar.set_HeadTx_null(ind);
for(uint32 ind=0; ind<8 ;ind++) bar.set_HeadRx_null(ind);
for(uint32 ind=0; ind<8 ;ind++) bar.set_CompleteTx_null(ind);
for(uint32 ind=0; ind<8 ;ind++) bar.set_CompleteRx_null(ind);
}
}
void EthControl::prepare()
{
using namespace AM3359::ETH;
{
BarWR bar;
bar.null_WRControl()
.set_IdleMode(WRControl_IdleMode_NoIdle)
.set_StandbyMode(WRControl_StandbyMode_NoStandby)
.setTo(bar);
bar.null_WRIntControl()
.setbit(WRIntControl_C0RxPace|WRIntControl_C0TxPace)
.set_Prescale(1)
.setTo(bar);
bar.set_WRC0RxThreshEnable(0);
bar.set_WRC0RxEnable(0xFF);
bar.set_WRC0TxEnable(0xFF);
bar.set_WRC0MiscEnable(0);
bar.null_WRC0RxIntLim().set_Lim(10).setTo(bar);
bar.null_WRC0TxIntLim().set_Lim(10).setTo(bar);
}
{
BarSwitch bar;
bar.null_SwitchControl()
.setTo(bar);
bar.null_SwitchStatPort()
.setbit(SwitchStatPort_Port0Enable|SwitchStatPort_Port1Enable)
.setTo(bar);
bar.null_SwitchTxPriType()
.setTo(bar);
bar.null_SwitchRate()
.set_Host(3)
.set_Sliver(3)
.setTo(bar);
bar.null_SwitchTxShortGap()
.set_Thresh(11)
.setTo(bar);
bar.null_SwitchTxStart()
.set_Len(32)
.setTo(bar);
bar.null_SwitchRxFlowControl()
.setbit(SwitchRxFlowControl_Port0Enable|SwitchRxFlowControl_Port1Enable)
.setTo(bar);
}
{
BarPort0 bar;
bar.null_PortControl()
.setTo(bar);
bar.null_PortFIFOLen()
.set_RxLen(PortFIFOLen_RxLen_Default0)
.set_TxLen(PortFIFOLen_TxLen_Default0)
.setTo(bar);
bar.null_PortTxFIFOControl()
.set_WordLen(0xC0)
.set_Rem(4)
.set_Mode(PortTxFIFOControl_Mode_Normal)
.setTo(bar);
bar.null_PortVLANControl()
.setTo(bar);
bar.null_PortTxPriMap()
.set_Pri0(0)
.set_Pri1(0)
.set_Pri2(0)
.set_Pri3(0)
.set_Pri4(0)
.set_Pri5(0)
.set_Pri6(0)
.set_Pri7(0)
.setTo(bar);
bar.null_PortRxDMAPriMap()
.set_P1Pri0(0)
.set_P1Pri1(0)
.set_P1Pri2(0)
.set_P1Pri3(0)
.set_P2Pri0(0)
.set_P2Pri1(0)
.set_P2Pri2(0)
.set_P2Pri3(0)
.setTo(bar);
}
{
BarPort1 bar;
bar.null_PortControl()
.setTo(bar);
bar.null_PortFIFOLen()
.set_RxLen((Field_PortFIFOLen_RxLen)(PortFIFOLen_RxLen_Default+3))
.set_TxLen((Field_PortFIFOLen_TxLen)(PortFIFOLen_TxLen_Default-3))
.setTo(bar);
bar.null_PortTxFIFOControl()
.set_WordLen(0xC0)
.set_Rem(4)
.set_Mode(PortTxFIFOControl_Mode_Normal)
.set_HostRem(8)
.setTo(bar);
bar.null_PortVLANControl()
.setTo(bar);
bar.null_PortTxPriMap()
.set_Pri0(0)
.set_Pri1(0)
.set_Pri2(0)
.set_Pri3(0)
.set_Pri4(0)
.set_Pri5(0)
.set_Pri6(0)
.set_Pri7(0)
.setTo(bar);
bar.null_PortMACHi()
.set_Byte0(address1.address[0])
.set_Byte1(address1.address[1])
.setTo(bar);
bar.null_PortMACLo()
.set_Byte2(address1.address[2])
.set_Byte3(address1.address[3])
.set_Byte4(address1.address[4])
.set_Byte5(address1.address[5])
.setTo(bar);
}
{
BarALE bar;
bar.null_ALEControl()
.setbit(ALEControl_ClearTable)
.setTo(bar);
bar.null_ALEControl()
.setbit(ALEControl_EnableALE|ALEControl_Bypass)
.setTo(bar);
bar.null_ALEPortControl()
.set_State(ALEPortControl_State_Forward)
.setbit(ALEPortControl_NoLearn|ALEPortControl_NoSAUpdate)
.set(bar.to_ALEPort0Control());
bar.null_ALEPortControl()
.set_State(ALEPortControl_State_Forward)
.setbit(ALEPortControl_NoLearn|ALEPortControl_NoSAUpdate)
.set(bar.to_ALEPort1Control());
}
#if 0
{
BarALE bar;
bar.null_ALETableWord0()
.set_Port(0)
.setTo(bar);
bar.null_ALETableWord1()
.set_EntryType(ALETableWord1_EntryType_Address)
.set_AddressByte0(address1.address[0])
.set_AddressByte1(address1.address[1])
.setTo(bar);
bar.null_ALETableWord2()
.set_AddressByte2(address1.address[2])
.set_AddressByte3(address1.address[3])
.set_AddressByte4(address1.address[4])
.set_AddressByte5(address1.address[5])
.setTo(bar);
bar.null_ALETableControl()
.set_Index(0)
.setbit(ALETableControl_Write)
.setTo(bar);
}
#endif
{
BarDMA bar;
bar.null_DMAControl()
.setTo(bar);
bar.null_DMARxOffset()
.setTo(bar);
bar.null_DMAIntStatus()
.setbit(DMAIntStatus_StatCounter|DMAIntStatus_Host)
.set(bar.to_DMAIntEnableClear());
bar.null_DMATxIntStatus()
.set_TxDone(1)
.set(bar.to_DMATxIntEnableSet());
bar.null_DMARxIntStatus()
.set_RxDone(1)
.set(bar.to_DMARxIntEnableSet());
}
{
BarMDIO bar;
bar.null_MDIOControl()
.setbit(MDIOControl_Enable)
.set_ClockDiv(109)
.setTo(bar);
}
}
void EthControl::disable()
{
Mutex::Lock lock(Dev::ControlMutex);
using namespace AM3359::PRCM;
{
BarPER bar;
bar.get_Eth()
.set_Mode(ClockStandbyControl_Mode_Disable)
.set(bar.to_Eth());
while( bar.get_Eth().get_IdleStatus()!=ClockStandbyControl_IdleStatus_Disabled );
}
}
void EthControl::show()
{
using namespace AM3359::ETH;
#if 0
{
BarWR bar;
Printf(Con,"WRControl = #;\n",bar.get_WRControl());
Printf(Con,"WRIntControl = #;\n",bar.get_WRIntControl());
Printf(Con,"WRC0RxThreshEnable = #;\n",bar.get_WRC0RxThreshEnable());
Printf(Con,"WRC0RxEnable = #;\n",bar.get_WRC0RxEnable());
Printf(Con,"WRC0TxEnable = #;\n",bar.get_WRC0TxEnable());
Printf(Con,"WRC0MiscEnable = #;\n",bar.get_WRC0MiscEnable());
Printf(Con,"WRC0RxIntLim = #;\n",bar.get_WRC0RxIntLim());
Printf(Con,"WRC0TxIntLim = #;\n",bar.get_WRC0TxIntLim());
#if 0
Printf(Con,"WRC1RxThreshEnable = #;\n",bar.get_WRC1RxThreshEnable());
Printf(Con,"WRC1RxEnable = #;\n",bar.get_WRC1RxEnable());
Printf(Con,"WRC1TxEnable = #;\n",bar.get_WRC1TxEnable());
Printf(Con,"WRC1MiscEnable = #;\n",bar.get_WRC1MiscEnable());
Printf(Con,"WRC1RxIntLim = #;\n",bar.get_WRC1RxIntLim());
Printf(Con,"WRC1TxIntLim = #;\n",bar.get_WRC1TxIntLim());
Printf(Con,"WRC2RxThreshEnable = #;\n",bar.get_WRC2RxThreshEnable());
Printf(Con,"WRC2RxEnable = #;\n",bar.get_WRC2RxEnable());
Printf(Con,"WRC2TxEnable = #;\n",bar.get_WRC2TxEnable());
Printf(Con,"WRC2MiscEnable = #;\n",bar.get_WRC2MiscEnable());
Printf(Con,"WRC2RxIntLim = #;\n",bar.get_WRC2RxIntLim());
Printf(Con,"WRC2TxIntLim = #;\n",bar.get_WRC2TxIntLim());
#endif
Printf(Con,"WRRGMIIStatus = #;\n",bar.get_WRRGMIIStatus());
}
#endif
#if 0
{
BarSwitch bar;
Printf(Con,"SwitchControl = #;\n",bar.get_SwitchControl());
Printf(Con,"SwitchStatPort = #;\n",bar.get_SwitchStatPort());
Printf(Con,"SwitchTxPriType = #;\n",bar.get_SwitchTxPriType());
Printf(Con,"SwitchRate = #;\n",bar.get_SwitchRate());
Printf(Con,"SwitchTxShortGap = #;\n",bar.get_SwitchTxShortGap());
Printf(Con,"SwitchTxStart = #;\n",bar.get_SwitchTxStart());
Printf(Con,"SwitchRxFlowControl = #;\n",bar.get_SwitchRxFlowControl()); // Port0Enable
Printf(Con,"SwitchVLANLType = #;\n",bar.get_SwitchLType());
Printf(Con,"SwitchTSVLANLType = #;\n",bar.get_SwitchTSLType());
Printf(Con,"SwitchDLRLType = #;\n\n",bar.get_SwitchDLRLType());
}
#endif
#if 0
{
BarPort0 bar;
Printf(Con,"PortControl = #;\n",bar.get_PortControl());
Printf(Con,"PortFIFOLen = #;\n",bar.get_PortFIFOLen());
Printf(Con,"PortFIFOUse = #;\n",bar.get_PortFIFOUse());
Printf(Con,"PortTxFIFOControl = #;\n",bar.get_PortTxFIFOControl());
Printf(Con,"PortVLANControl = #;\n",bar.get_PortVLANControl());
Printf(Con,"PortTxPriMap = #;\n",bar.get_PortTxPriMap());
Printf(Con,"PortTxDMAPriMap = #;\n",bar.get_PortTxDMAPriMap());
Printf(Con,"PortRxDMAPriMap = #;\n",bar.get_PortRxDMAPriMap());
Printf(Con,"PortTOSPriMap0 = #;\n",bar.get_PortTOSPriMap0());
Printf(Con,"PortTOSPriMap1 = #;\n",bar.get_PortTOSPriMap1());
Printf(Con,"PortTOSPriMap2 = #;\n",bar.get_PortTOSPriMap2());
Printf(Con,"PortTOSPriMap3 = #;\n",bar.get_PortTOSPriMap3());
Printf(Con,"PortTOSPriMap4 = #;\n",bar.get_PortTOSPriMap4());
Printf(Con,"PortTOSPriMap5 = #;\n",bar.get_PortTOSPriMap5());
Printf(Con,"PortTOSPriMap6 = #;\n",bar.get_PortTOSPriMap6());
Printf(Con,"PortTOSPriMap7 = #;\n\n",bar.get_PortTOSPriMap7());
}
#endif
#if 0
{
BarPort1 bar;
Printf(Con,"PortControl = #;\n",bar.get_PortControl());
Printf(Con,"PortFIFOLen = #;\n",bar.get_PortFIFOLen());
Printf(Con,"PortFIFOUse = #;\n",bar.get_PortFIFOUse());
Printf(Con,"PortTxFIFOControl = #;\n",bar.get_PortTxFIFOControl());
Printf(Con,"PortVLANControl = #;\n",bar.get_PortVLANControl());
Printf(Con,"PortTxPriMap = #;\n",bar.get_PortTxPriMap());
Printf(Con,"PortTimeSync = #;\n",bar.get_PortTimeSync());
Printf(Con,"PortMACHi = #;\n",bar.get_PortMACHi());
Printf(Con,"PortMACLo = #;\n",bar.get_PortMACLo());
Printf(Con,"PortSendPercent = #;\n",bar.get_PortSendPercent());
Printf(Con,"PortTOSPriMap0 = #;\n",bar.get_PortTOSPriMap0());
Printf(Con,"PortTOSPriMap1 = #;\n",bar.get_PortTOSPriMap1());
Printf(Con,"PortTOSPriMap2 = #;\n",bar.get_PortTOSPriMap2());
Printf(Con,"PortTOSPriMap3 = #;\n",bar.get_PortTOSPriMap3());
Printf(Con,"PortTOSPriMap4 = #;\n",bar.get_PortTOSPriMap4());
Printf(Con,"PortTOSPriMap5 = #;\n",bar.get_PortTOSPriMap5());
Printf(Con,"PortTOSPriMap6 = #;\n",bar.get_PortTOSPriMap6());
Printf(Con,"PortTOSPriMap7 = #;\n\n",bar.get_PortTOSPriMap7());
}
#endif
#if 0
{
BarPort2 bar;
Printf(Con,"PortControl = #;\n",bar.get_PortControl());
Printf(Con,"PortFIFOLen = #;\n",bar.get_PortFIFOLen());
Printf(Con,"PortFIFOUse = #;\n",bar.get_PortFIFOUse());
Printf(Con,"PortTxFIFOControl = #;\n",bar.get_PortTxFIFOControl());
Printf(Con,"PortVLANControl = #;\n",bar.get_PortVLANControl());
Printf(Con,"PortTxPriMap = #;\n",bar.get_PortTxPriMap());
Printf(Con,"PortTimeSync = #;\n",bar.get_PortTimeSync());
Printf(Con,"PortMACHi = #;\n",bar.get_PortMACHi());
Printf(Con,"PortMACLo = #;\n",bar.get_PortMACLo());
Printf(Con,"PortSendPercent = #;\n",bar.get_PortSendPercent());
Printf(Con,"PortTOSPriMap0 = #;\n",bar.get_PortTOSPriMap0());
Printf(Con,"PortTOSPriMap1 = #;\n",bar.get_PortTOSPriMap1());
Printf(Con,"PortTOSPriMap2 = #;\n",bar.get_PortTOSPriMap2());
Printf(Con,"PortTOSPriMap3 = #;\n",bar.get_PortTOSPriMap3());
Printf(Con,"PortTOSPriMap4 = #;\n",bar.get_PortTOSPriMap4());
Printf(Con,"PortTOSPriMap5 = #;\n",bar.get_PortTOSPriMap5());
Printf(Con,"PortTOSPriMap6 = #;\n",bar.get_PortTOSPriMap6());
Printf(Con,"PortTOSPriMap7 = #;\n\n",bar.get_PortTOSPriMap7());
}
#endif
#if 0
{
BarSliver1 bar;
Printf(Con,"SliverControl = #;\n",bar.get_SliverControl()); // FullDuplex CtrlA
Printf(Con,"SliverStatus = #;\n",bar.get_SliverStatus());
Printf(Con,"SliverSoftReset = #;\n",bar.get_SliverSoftReset());
Printf(Con,"SliverRxMaxLen = #;\n",bar.get_SliverRxMaxLen()); // 1522
Printf(Con,"SliverBOFFTest = #;\n",bar.get_SliverBOFFTest());
Printf(Con,"SliverRxPause = #;\n",bar.get_SliverRxPause());
Printf(Con,"SliverTxPause = #;\n",bar.get_SliverTxPause());
Printf(Con,"SliverEMControl = #;\n",bar.get_SliverEMControl());
Printf(Con,"SliverRxPriMap = #;\n",bar.get_SliverRxPriMap());
Printf(Con,"SliverTxGap = #;\n\n",bar.get_SliverTxGap());
}
#endif
#if 0
{
BarSliver2 bar;
Printf(Con,"SliverControl = #;\n",bar.get_SliverControl());
Printf(Con,"SliverStatus = #;\n",bar.get_SliverStatus());
Printf(Con,"SliverSoftReset = #;\n",bar.get_SliverSoftReset());
Printf(Con,"SliverRxMaxLen = #;\n",bar.get_SliverRxMaxLen());
Printf(Con,"SliverBOFFTest = #;\n",bar.get_SliverBOFFTest());
Printf(Con,"SliverRxPause = #;\n",bar.get_SliverRxPause());
Printf(Con,"SliverTxPause = #;\n",bar.get_SliverTxPause());
Printf(Con,"SliverEMControl = #;\n",bar.get_SliverEMControl());
Printf(Con,"SliverRxPriMap = #;\n",bar.get_SliverRxPriMap());
Printf(Con,"SliverTxGap = #;\n\n",bar.get_SliverTxGap());
}
#endif
#if 0
{
BarTimeSync bar;
Printf(Con,"TimeSyncControl = #;\n",bar.get_TimeSyncControl());
Printf(Con,"TimeSyncTSPush = #;\n",bar.get_TimeSyncTSPush());
Printf(Con,"TimeSyncTSValue = #;\n",bar.get_TimeSyncTSValue());
Printf(Con,"TimeSyncTSLoad = #;\n",bar.get_TimeSyncTSLoad());
}
#endif
#if 0
{
BarALE bar;
Printf(Con,"ALEControl = #;\n",bar.get_ALEControl());
Printf(Con,"ALEPrescale = #;\n",bar.get_ALEPrescale());
Printf(Con,"ALEUnknownVLAN = #;\n",bar.get_ALEUnknownVLAN());
Printf(Con,"ALETableControl = #;\n",bar.get_ALETableControl());
Printf(Con,"ALEPort0Control = #;\n",bar.get_ALEPort0Control());
Printf(Con,"ALEPort1Control = #;\n",bar.get_ALEPort1Control());
Printf(Con,"ALEPort2Control = #;\n",bar.get_ALEPort2Control());
Printf(Con,"ALEPort3Control = #;\n",bar.get_ALEPort3Control());
Printf(Con,"ALEPort4Control = #;\n",bar.get_ALEPort4Control());
Printf(Con,"ALEPort5Control = #;\n",bar.get_ALEPort5Control());
}
#endif
#if 0
{
Printf(Con," = #;\n",bar.get_());
}
#endif
}
EthControl::EthControl()
: InstanceLock<EthControl>("Eth")
{
connect();
enable();
//show();
reset();
//show();
prepare();
//show();
}
EthControl::~EthControl()
{
reset();
disable();
}
void EthControl::enablePort(EthPortMode mode)
{
using namespace AM3359::ETH;
BarSliver1 bar;
bar.null_SliverControl()
.setbit(SliverControl_RxFlowControlEnable|SliverControl_TxFlowControlEnable
|SliverControl_GMIIEnable|SliverControl_TxPaceEnable)
.setbitIf(mode&EthFullDuplex,SliverControl_FullDuplex)
.setbitIf(mode&EthGig,SliverControl_GigMode)
.setTo(bar);
}
void EthControl::setPort(EthPortMode mode)
{
using namespace AM3359::ETH;
BarSliver1 bar;
bar.get_SliverControl()
.clearbit(SliverControl_FullDuplex|SliverControl_GigMode)
.setbitIf(mode&EthFullDuplex,SliverControl_FullDuplex)
.setbitIf(mode&EthGig,SliverControl_GigMode)
.setTo(bar);
}
bool EthControl::MDIOReady()
{
using namespace AM3359::ETH;
BarMDIO bar;
return bar.get_MDIOUserAccess0().maskbit(MDIOUserAccess_Go)==0;
}
void EthControl::startMDIOWrite(uint16 phy,uint16 reg,uint16 data)
{
using namespace AM3359::ETH;
BarMDIO bar;
bar.null_MDIOUserAccess()
.set_Data(data)
.set_Phy(phy)
.set_Reg(reg)
.setbit(MDIOUserAccess_Write|MDIOUserAccess_Go)
.set(bar.to_MDIOUserAccess0());
}
void EthControl::startMDIORead(uint16 phy,uint16 reg)
{
using namespace AM3359::ETH;
BarMDIO bar;
bar.null_MDIOUserAccess()
.set_Phy(phy)
.set_Reg(reg)
.setbit(MDIOUserAccess_Go)
.set(bar.to_MDIOUserAccess0());
}
auto EthControl::MDIOReadData() -> MDIODataAck
{
using namespace AM3359::ETH;
BarMDIO bar;
auto val=bar.get_MDIOUserAccess0();
return MDIODataAck((uint16)val.get_Data(),val.maskbit(MDIOUserAccess_Ack));
}
void EthControl::startTx()
{
using namespace AM3359::ETH;
BarDMA bar;
bar.null_DMATxControl()
.setbit(DMATxControl_Enable)
.setTo(bar);
}
void EthControl::startRx()
{
using namespace AM3359::ETH;
BarDMA bar;
bar.null_DMARxControl()
.setbit(DMARxControl_Enable)
.setTo(bar);
}
void EthControl::setTx(void *desc)
{
using namespace AM3359::ETH;
BarDesc bar;
bar.set_HeadTx(0,(uint32)desc);
}
void EthControl::setRx(void *desc)
{
using namespace AM3359::ETH;
BarDesc bar;
bar.set_HeadRx(0,(uint32)desc);
}
void EthControl::ackTx(void *desc)
{
using namespace AM3359::ETH;
BarDesc bar;
bar.set_CompleteTx(0,(uint32)desc);
BarDMA dma;
dma.set_DMAEOIVector(2);
}
void EthControl::ackRx(void *desc)
{
using namespace AM3359::ETH;
BarDesc bar;
bar.set_CompleteRx(0,(uint32)desc);
BarDMA dma;
dma.set_DMAEOIVector(1);
}
void EthControl::teardownTx()
{
using namespace AM3359::ETH;
BarDMA bar;
bar.null_DMATxTeardown()
.set_Chan(0)
.setTo(bar);
}
void EthControl::teardownRx()
{
using namespace AM3359::ETH;
BarDMA bar;
bar.null_DMARxTeardown()
.set_Chan(0)
.setTo(bar);
}
static const uint32 TeardownPtr = 0xFFFFFFFC ;
bool EthControl::testTxTeardown()
{
using namespace AM3359::ETH;
BarDesc bar;
return bar.get_CompleteTx(0)==TeardownPtr;
}
void EthControl::ackTxTeardown()
{
using namespace AM3359::ETH;
BarDesc bar;
bar.set_CompleteTx(0,TeardownPtr);
BarDMA dma;
dma.set_DMAEOIVector(2);
}
bool EthControl::testRxTeardown()
{
using namespace AM3359::ETH;
BarDesc bar;
return bar.get_CompleteRx(0)==TeardownPtr;
}
void EthControl::ackRxTeardown()
{
using namespace AM3359::ETH;
BarDesc bar;
bar.set_CompleteRx(0,TeardownPtr);
BarDMA dma;
dma.set_DMAEOIVector(1);
}
void EthControl::stopTx()
{
using namespace AM3359::ETH;
BarDMA bar;
bar.null_DMATxControl()
.setTo(bar);
}
void EthControl::stopRx()
{
using namespace AM3359::ETH;
BarDMA bar;
bar.null_DMARxControl()
.setTo(bar);
}
/* class EthBuf */
void EthBuf::freeRx(EthDescData *ptr)
{
ptr->setNext(rx_list);
rx_list=ptr;
if( !rx_last ) rx_last=ptr;
}
void EthBuf::freeTx(EthDescData *ptr)
{
ptr->setNext(tx_list);
tx_list=ptr;
}
EthBuf::EthBuf(ulen rx_count,ulen tx_count)
{
if( rx_count<2 || tx_count<2 )
{
Printf(Exception,"CCore::Dev::EthBuf::EthBuf(#;,#;) : bad count(s)",rx_count,tx_count);
}
ulen mem_len=LenOf(LenAdd(rx_count,tx_count),sizeof (EthDescData));
mem=TryMemAlloc_shared(mem_len);
if( !mem )
{
Printf(Exception,"CCore::Dev::EthBuf::EthBuf(#;,#;) : no memory, len = #;",rx_count,tx_count,mem_len);
}
auto place=PlaceAt(mem);
for(; rx_count ;rx_count--,place+=sizeof (EthDescData))
{
EthDescData *ptr=place;
ptr->prepareRx();
freeRx(ptr);
}
for(; tx_count ;tx_count--,place+=sizeof (EthDescData))
{
EthDescData *ptr=place;
ptr->prepareTx();
freeTx(ptr);
}
}
EthBuf::~EthBuf()
{
MemFree_shared(mem);
}
void EthBuf::start()
{
for(EthDescData *ptr=rx_list; ptr ;ptr=ptr->getNext()) ptr->clearRx();
for(EthDescData *ptr=tx_send_list; ptr ;ptr=ptr->getNext()) freeTx(ptr);
tx_send_list=0;
tx_send_last=0;
}
void EthBuf::turnRx()
{
EthDescData *ptr=rx_list;
rx_list=ptr->getNext();
ptr->clearRx();
ptr->setNext(0);
rx_last->setNext(ptr);
rx_last=ptr;
}
bool EthBuf::turnTx()
{
EthDescData *ptr=tx_list;
tx_list=ptr->getNext();
ptr->setNext(0);
if( tx_send_list )
{
tx_send_last->setNext(ptr);
tx_send_last=ptr;
return false;
}
else
{
tx_send_list=ptr;
tx_send_last=ptr;
return true;
}
}
void EthBuf::completeTx()
{
EthDescData *ptr=tx_send_list;
tx_send_list=ptr->getNext();
if( !tx_send_list ) tx_send_last=0;
freeTx(ptr);
}
void EthBuf::stop()
{
// do nothing
}
/* class EthDevice */
void EthDevice::tick_int()
{
mevent.trigger_int(EventTick);
}
void EthDevice::tx_int()
{
DisableInt(Int_3PGSWTXINT0);
mevent.trigger_int(EventTx);
}
void EthDevice::rx_int()
{
DisableInt(Int_3PGSWRXINT0);
mevent.trigger_int(EventRx);
}
void EthDevice::processPhy()
{
const uint16 PhyAddress = 0 ;
const uint16 StatusReg = 1 ;
const uint16 ExtraStatusReg = 31 ;
switch( phy_read )
{
case PhyNone :
{
if( control.MDIOReady() )
{
control.startMDIORead(PhyAddress,StatusReg);
phy_read=PhyStatus;
}
}
break;
case PhyStatus :
{
if( control.MDIOReady() )
{
auto data=control.MDIOReadData();
if( data.ack )
{
if( data.data&Bit(2) )
{
if( !phy_link )
{
phy_link=true;
stat.count(Net::EthLink_Up);
proc->linkUp();
processPushTx();
}
control.startMDIORead(PhyAddress,ExtraStatusReg);
phy_read=PhyExtraStatus;
}
else
{
if( phy_link )
{
phy_link=false;
stat.count(Net::EthLink_Down);
proc->linkDown();
}
control.startMDIORead(PhyAddress,StatusReg);
}
}
else
{
control.startMDIORead(PhyAddress,StatusReg);
}
}
}
break;
case PhyExtraStatus :
{
if( control.MDIOReady() )
{
auto data=control.MDIOReadData();
if( data.ack )
{
if( data.data&Bit(4) )
{
if( !phy_full_duplex )
{
phy_full_duplex=true;
control.setPort(EthFullDuplex);
}
}
else
{
if( phy_full_duplex )
{
phy_full_duplex=false;
control.setPort(EthHalfDuplex);
}
}
}
control.startMDIORead(PhyAddress,StatusReg);
phy_read=PhyStatus;
}
}
break;
}
}
void EthDevice::processTick()
{
{
Mutex::Lock lock(mutex);
stat_shared=stat;
}
proc->tick();
processPhy();
if( delay_rx )
{
mevent.trigger(EventRx);
delay_rx=false;
}
}
void EthDevice::processTx()
{
bool free=false;
while( EthDescData *ptr=buf.getTxSendList() )
{
uint32 status=ptr->getTxStatus();
if( status&EthDescData::TxOwn ) break;
if( status&EthDescData::TxTeardown )
{
control.ackTxTeardown();
teardown_flag|=TeardownTxComplete;
return;
}
control.ackTx(ptr);
buf.completeTx();
stat.count(Net::EthTx_Done);
free=true;
if( status&EthDescData::TxEOQ )
{
ptr=buf.getTxSendList();
if( ptr )
{
control.setTx(ptr);
}
break;
}
}
if( control.testTxTeardown() )
{
control.ackTxTeardown();
teardown_flag|=TeardownTxComplete;
return;
}
EnableInt(Int_3PGSWTXINT0);
if( free ) mevent.trigger(EventPushTx);
}
bool EthDevice::testRx(PtrLen<const uint8> data,Net::EthHeader &header)
{
if( data.len<Net::EthHeaderLen+4 )
{
stat.count(Net::EthRx_BadPacketLen);
return false;
}
BufGetDev dev(data.ptr);
dev(header);
Net::XPoint dst_point=header.dst.get();
if( dst_point==point_broadcast )
{
stat.count(Net::EthRx_Broadcast);
return true;
}
if( promisc_mode ) return true;
return dst_point==point;
}
Packet<uint8,Net::EthRxExt> EthDevice::copyRx(PtrLen<const uint8> data,const Net::EthHeader &header)
{
Packet<uint8> packet=pset.try_get();
if( !packet ) return Nothing;
Packet<uint8,Net::EthRxExt> packet2=packet.pushExt<Net::EthRxExt>(header.src,header.dst,header.type);
packet2.pushCompleteFunction(DropPacketExt<uint8,Net::EthRxExt>);
if( packet2.checkDataLen(data.len) )
{
packet2.setDataLen(data.len).copy(data.ptr);
return packet2;
}
else
{
packet2.complete();
return Nothing;
}
}
void EthDevice::processRx()
{
for(unsigned cnt=100; cnt ;cnt--)
{
EthDescData *ptr=buf.getRxList();
uint32 status=ptr->getRxStatus();
if( status&EthDescData::RxOwn ) break;
if( status&EthDescData::RxTeardown )
{
control.ackRxTeardown();
teardown_flag|=TeardownRxComplete;
return;
}
auto data=ptr->getRxRange();
Net::EthHeader header;
if( testRx(data,header) )
{
data=data.inner(Net::EthHeaderLen,4);
Packet<uint8,Net::EthRxExt> packet=copyRx(data,header);
if( +packet )
{
control.ackRx(ptr);
buf.turnRx();
stat.count(Net::EthRx_Done);
proc->inbound(packet);
}
else
{
delay_rx=true;
return;
}
}
else
{
control.ackRx(ptr);
buf.turnRx();
stat.count(Net::EthRx_Drop);
}
if( status&EthDescData::RxEOQ )
{
control.setRx(buf.getRxList());
}
}
if( control.testRxTeardown() )
{
control.ackRxTeardown();
teardown_flag|=TeardownRxComplete;
return;
}
EnableInt(Int_3PGSWRXINT0);
}
void EthDevice::processPushTx()
{
const ulen MinEthLen = 60 ;
if( !phy_link ) return;
proc->prepareOutbound();
for(unsigned cnt=100; cnt ;cnt--)
{
EthDescData *ptr=buf.getTxList();
if( !ptr ) break;
Packet<uint8,Net::EthTxExt> packet=proc->outbound();
if( !packet ) break;
PacketFormat format=getTxFormat();
if( packet.checkRange(format) )
{
Net::EthTxExt *ext=packet.getExt();
Net::EthHeader header(getAddress(),ext->dst,ext->type);
BufPutDev dev(packet.getData());
dev(header);
auto data=packet.getRange();
if( data.len<MinEthLen )
{
ptr->clearTx(MinEthLen);
data.copyTo(ptr->data);
Range(ptr->data+data.len,MinEthLen-data.len).set_null();
}
else
{
ptr->clearTx((uint32)data.len);
data.copyTo(ptr->data);
}
packet.complete();
if( buf.turnTx() )
{
control.setTx(ptr);
}
}
else
{
packet.complete();
stat.count(Net::EthTx_BadPacketLen);
}
}
}
bool EthDevice::mustStop()
{
if( teardown_flag==(TeardownRxComplete|TeardownTxComplete) )
{
CleanupIntHandler(Int_3PGSWRXINT0);
CleanupIntHandler(Int_3PGSWTXINT0);
control.stopTx();
control.stopRx();
buf.stop();
return true;
}
return false;
}
void EthDevice::work()
{
phy_read=PhyNone;
teardown_flag=0;
delay_rx=false;
buf.start();
control.setRx(buf.getRxList());
control.startRx();
SetupIntHandler(Int_3PGSWRXINT0,function_rx_int(),0);
control.startTx();
SetupIntHandler(Int_3PGSWTXINT0,function_tx_int(),0);
proc->start();
for(;;)
switch( mevent.wait() )
{
case EventTick : processTick(); break;
case EventTx : processTx(); if( mustStop() ) return; break;
case EventRx : processRx(); if( mustStop() ) return; break;
case EventPushTx : processPushTx(); break;
case EventStop :
{
proc->stop();
pset.wait(DefaultTimeout);
pset.cancel_and_wait();
control.teardownTx();
control.teardownRx();
}
break;
}
}
EthDevice::EthDevice(ulen rx_count,ulen tx_count)
: pset("!Eth.pset",1000),
buf(rx_count,tx_count),
mevent("!Eth"),
ticker(function_tick_int()),
mutex("!Eth")
{
control.enablePort(EthFullDuplex);
point=getAddress().get();
point_broadcast=Net::MACAddress::Broadcast().get();
}
EthDevice::~EthDevice()
{
Mutex::Lock lock(mutex);
if( task_flag!=TaskStopped ) Abort("Fatal error : CCore::Dev::EthDevice is running on exit");
if( proc ) Abort("Fatal error : CCore::Dev::EthDevice is attached on exit");
}
Net::MACAddress EthDevice::getAddress()
{
return control.getAddress1();
}
PacketFormat EthDevice::getTxFormat()
{
PacketFormat ret;
ret.prefix=Net::EthHeaderLen;
ret.max_data=Net::MaxEthDataLen;
ret.suffix=0;
return ret;
}
PacketFormat EthDevice::getRxFormat()
{
PacketFormat ret;
ret.prefix=0;
ret.max_data=Net::MaxEthDataLen;
ret.suffix=0;
return ret;
}
void EthDevice::attach(Net::EthProc *proc_)
{
bool running;
bool has_proc;
{
Mutex::Lock lock(mutex);
running=(task_flag!=TaskStopped);
has_proc=(proc!=0);
if( !running && !has_proc ) proc=proc_;
}
if( running )
{
Printf(Exception,"CCore::Dev::EthDevice::attach(...) : device is running");
}
if( has_proc )
{
Printf(Exception,"CCore::Dev::EthDevice::attach(...) : already attached");
}
}
void EthDevice::detach()
{
bool running;
{
Mutex::Lock lock(mutex);
running=(task_flag!=TaskStopped);
if( !running ) proc=0;
}
if( running )
{
Printf(NoException,"CCore::Dev::EthDevice::detach() : device is running");
Abort("Fatal error : CCore::Dev::EthDevice is running on detach");
}
}
void EthDevice::getStat(StatInfo &ret)
{
Mutex::Lock lock(mutex);
ret=stat_shared;
}
bool EthDevice::getPromiscMode()
{
return promisc_mode;
}
void EthDevice::setPromiscMode(bool enable)
{
promisc_mode=enable;
}
void EthDevice::signalOutbound()
{
mevent.trigger(EventPushTx);
}
void EthDevice::startTask(TaskPriority priority,ulen stack_len)
{
bool running;
bool has_proc;
{
Mutex::Lock lock(mutex);
running=(task_flag!=TaskStopped);
has_proc=(proc!=0);
if( !running && has_proc )
{
RunFuncTask( [this] () { work(); } ,stop_sem.function_give(),"EthTask",priority,stack_len);
ticker.start(10_msec,100_msec);
task_flag=TaskRunning;
}
}
if( running )
{
Printf(Exception,"CCore::Dev::EthDevice::startTask() : already running");
}
if( !has_proc )
{
Printf(Exception,"CCore::Dev::EthDevice::startTask() : not attached");
}
}
void EthDevice::stopTask()
{
bool running;
{
Mutex::Lock lock(mutex);
running=(task_flag==TaskRunning);
if( running ) task_flag=TaskStopping;
}
if( !running )
{
Printf(NoException,"CCore::Dev::EthDevice::stopTask() : not running");
return;
}
ticker.stop();
mevent.trigger(EventStop);
stop_sem.take();
{
Mutex::Lock lock(mutex);
task_flag=TaskStopped;
}
}
} // namespace Dev
} // namespace CCore
| [
"sshimnick@hotmail.com"
] | sshimnick@hotmail.com |
a434e181d9796bf2aa05db7dd3cdabf3df32aa7c | 1cc1368471301cf8b0508e112a55e0410cc212a4 | /src/layer/normalize.cpp | 5be9884a29185374371dbaf7de2f1f858d86620a | [
"Zlib",
"BSD-3-Clause",
"BSD-2-Clause"
] | permissive | wwlong/ncnn_embedded | 39f9ccbb716b4c6578d7834124477eb59b52d46e | b583dbf6f4d18bdcfb9cb3c0918bcc53144e7547 | refs/heads/master | 2021-09-03T13:09:28.234024 | 2018-01-09T08:30:39 | 2018-01-09T08:30:39 | 116,786,701 | 3 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 5,087 | cpp | // Tencent is pleased to support the open source community by making ncnn available.
//
// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved.
//
// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except
// in compliance with the License. You may obtain a copy of the License at
//
// https://opensource.org/licenses/BSD-3-Clause
//
// 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 "normalize.h"
#include <math.h>
namespace ncnn {
DEFINE_LAYER_CREATOR(Normalize)
Normalize::Normalize()
{
one_blob_only = true;
support_inplace = false;
}
int Normalize::load_param(const ParamDict& pd)
{
across_spatial = pd.get(0, 0);
channel_shared = pd.get(1, 0);
eps = pd.get(2, 0.0001f);
scale_data_size = pd.get(3, 0);
return 0;
}
int Normalize::load_model(const ModelBin& mb)
{
scale_data = mb.load(scale_data_size, 1);
if (scale_data.empty())
return -100;
return 0;
}
int Normalize::forward(const Mat& bottom_blob, Mat& top_blob) const
{
int w = bottom_blob.w;
int h = bottom_blob.h;
int channels = bottom_blob.c;
int size = w * h;
top_blob.create(w, h, channels);
if (top_blob.empty())
return -100;
if (across_spatial)
{
// square
Mat square_sum_blob;
square_sum_blob.create(channels);
if (square_sum_blob.empty())
return -100;
float* square_sum_ptr = square_sum_blob;
#pragma omp parallel for
for (int q=0; q<channels; q++)
{
const float* ptr = bottom_blob.channel(q);
float ssum = 0.f;
for (int i=0; i<size; i++)
{
ssum += ptr[i] * ptr[i];
}
square_sum_ptr[q] = ssum;
}
// sum + eps
float ssum = eps;
for (int q=0; q<channels; q++)
{
ssum += square_sum_ptr[q];
}
// 1 / sqrt(ssum)
float a = 1.f / sqrt(ssum);
if (channel_shared)
{
float scale = a * scale_data.data[0];
#pragma omp parallel for
for (int q=0; q<channels; q++)
{
const float* ptr = bottom_blob.channel(q);
float* outptr = top_blob.channel(q);
for (int i=0; i<size; i++)
{
outptr[i] = ptr[i] * scale;
}
}
}
else
{
#pragma omp parallel for
for (int q=0; q<channels; q++)
{
const float* ptr = bottom_blob.channel(q);
float* outptr = top_blob.channel(q);
float scale = a * scale_data.data[q];
for (int i=0; i<size; i++)
{
outptr[i] = ptr[i] * scale;
}
}
}
}
else
{
// square sum, 1 / sqrt(ssum)
Mat square_sum_blob;
square_sum_blob.create(w, h);
if (square_sum_blob.empty())
return -100;
float* ssptr = square_sum_blob;
if (channel_shared)
{
float scale = scale_data.data[0];
#pragma omp parallel for
for (int i=0; i<size; i++)
{
float ssum = eps;
for (int q=0; q<channels; q++)
{
const float* ptr = bottom_blob.channel(q);
ssum += ptr[i] * ptr[i];
}
ssptr[i] = 1.f / sqrt(ssum) * scale;
}
#pragma omp parallel for
for (int q=0; q<channels; q++)
{
const float* ptr = bottom_blob.channel(q);
float* outptr = top_blob.channel(q);
for (int i=0; i<size; i++)
{
outptr[i] = ptr[i] * ssptr[i];
}
}
}
else
{
#pragma omp parallel for
for (int i=0; i<size; i++)
{
float ssum = eps;
for (int q=0; q<channels; q++)
{
const float* ptr = bottom_blob.channel(q);
ssum += ptr[i] * ptr[i];
}
ssptr[i] = 1.f / sqrt(ssum);
}
#pragma omp parallel for
for (int q=0; q<channels; q++)
{
const float* ptr = bottom_blob.channel(q);
float* outptr = top_blob.channel(q);
float scale = scale_data.data[q];
for (int i=0; i<size; i++)
{
outptr[i] = ptr[i] * ssptr[i] * scale;
}
}
}
}
return 0;
}
} // namespace ncnn
| [
"interestingwwl@sina.com"
] | interestingwwl@sina.com |
fc1e44981133c23f94bdf53a02cf2d9b2a432264 | 5b3496495ca74b382c76ededbc63768f3fbc5c06 | /Construct.cpp | 3d27df06769c695ca827f0b2062a1c8f84c1bce6 | [] | no_license | qiaobabaaa/3DRCS-Program | 672dcfcd634e688ba92df24d266fe221f0555d4b | c2ad1e4cd5897240dc81d987be45b1c4c463451a | refs/heads/master | 2020-03-23T21:28:40.016910 | 2018-07-24T13:53:37 | 2018-07-24T13:53:37 | 142,109,880 | 1 | 1 | null | null | null | null | GB18030 | C++ | false | false | 6,152 | cpp | // Construct.cpp : 实现文件
//
#include "stdafx.h"
#include "3DRCS.h"
#include "Construct.h"
#include "afxdialogex.h"
#include "IctHeader.h"
#include "PCG.h"
// CConstruct 对话框
IMPLEMENT_DYNAMIC(CConstruct, CDialog)
CConstruct::CConstruct(CWnd* pParent /*=NULL*/)
: CDialog(CConstruct::IDD, pParent)
{
m_MXconZoom = 0.0f;
m_MYconZoom = 0.0f;
m_MZconZoom = 0.0f;
m_MThreshold = 0;
m_MMCMTthresholdvalue = 0;
m_ScanParam = 0.0f;
}
CConstruct::~CConstruct()
{
}
void CConstruct::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
DDX_Control(pDX, IDC_MMCMTTHRESHOLD, m_MMCMTthreshold);
DDX_Text(pDX, IDC_MXCONZOOM, m_MXconZoom);
DDX_Text(pDX, IDC_MYCONZOOM, m_MYconZoom);
DDX_Text(pDX, IDC_MZCONZOOM, m_MZconZoom);
// DDX_Control(pDX, IDC_MTHRESHOLDEDIT, m_MThresholdEdit);
DDX_Text(pDX, IDC_MTHRESHOLDEDIT, m_MThreshold);
DDX_Slider(pDX, IDC_MMCMTTHRESHOLD, m_MMCMTthresholdvalue);
// DDX_Control(pDX, IDC_EDIT1, CPCG::GetLayerSpace("E:\研究生工作\论文相关\model\pcg\200904221.pcg"));
DDX_Text(pDX, IDC_VIEWDIAMETER, m_ScanParam);
}
BEGIN_MESSAGE_MAP(CConstruct, CDialog)
ON_NOTIFY(NM_RELEASEDCAPTURE, IDC_MMCMTTHRESHOLD, &CConstruct::OnReleasedcaptureMmcmtthreshold)
// ON_EN_CHANGE(IDC_MTHRESHOLDEDIT, &CConstruct::OnChangeMthresholdedit)
// ON_WM_HSCROLL()
// ON_EN_CHANGE(IDC_MXCONZOOM, &CConstruct::OnChangeMxconzoom)
// ON_EN_CHANGE(IDC_MYCONZOOM, &CConstruct::OnChangeMyconzoom)
// ON_EN_CHANGE(IDC_MZCONZOOM, &CConstruct::OnChangeMzconzoom)
// ON_BN_CLICKED(IDC_MCHECKRING, &CConstruct::OnClickedMcheckring)
ON_BN_CLICKED(IDC_MCHECKRING, &CConstruct::OnClickedMcheckring)
ON_EN_CHANGE(IDC_MTHRESHOLDEDIT, &CConstruct::OnChangeMthresholdedit)
//ON_EN_CHANGE(IDC_EDIT1, &CConstruct::OnEnChangeEdit1)
//ON_EN_CHANGE(IDC_MXCONZOOM, &CConstruct::OnEnChangeMxconzoom)
END_MESSAGE_MAP()
// CConstruct 消息处理程序
void CConstruct::OnReleasedcaptureMmcmtthreshold(NMHDR *pNMHDR, LRESULT *pResult)
{
// TODO: 在此添加控件通知处理程序代码
UpdateData(TRUE);
if(m_MMCMTthreshold.GetPos()!=0)
//valueyu=m_MMCMTthreshold.GetPos();
m_MThreshold=m_MMCMTthreshold.GetPos();
//m_MMCMTthreshold.SetPos(m_MThreshold);
UpdateData(FALSE);
*pResult = 0;
}
//void CConstruct::OnChangeMthresholdedit()
//{
// // TODO: 如果该控件是 RICHEDIT 控件,它将不
// // 发送此通知,除非重写 CDialog::OnInitDialog()
// // 函数并调用 CRichEditCtrl().SetEventMask(),
// // 同时将 ENM_CHANGE 标志“或”运算到掩码中。
//
// // TODO: 在此添加控件通知处理程序代码
// CString str;
// this->m_MThresholdEdit.GetWindowText(str);
// int value=atoi(str);
// this->m_pFr->m_pView->GetDocument()->m_TargetValue=value;
// this->m_MMCMTthreshold.SetPos(value);
//}
//void CConstruct::OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar)
//{
// // TODO: 在此添加消息处理程序代码和/或调用默认值
// CString str;
// str.Format("%ld",m_MMCMTthreshold.GetPos());
// this->m_MThresholdEdit.SetWindowText(str);
//
// CDialog::OnHScroll(nSBCode, nPos, pScrollBar);
//}
//void CConstruct::OnChangeMxconzoom()
//{
// // TODO: 如果该控件是 RICHEDIT 控件,它将不
// // 发送此通知,除非重写 CDialog::OnInitDialog()
// // 函数并调用 CRichEditCtrl().SetEventMask(),
// // 同时将 ENM_CHANGE 标志“或”运算到掩码中。
//
// // TODO: 在此添加控件通知处理程序代码
// CString str;
// GetDlgItem(IDC_MXCONZOOM)->GetWindowText(str);
// m_MXconZoom = (float)atof(str);
//}
//void CConstruct::OnChangeMyconzoom()
//{
// // TODO: 如果该控件是 RICHEDIT 控件,它将不
// // 发送此通知,除非重写 CDialog::OnInitDialog()
// // 函数并调用 CRichEditCtrl().SetEventMask(),
// // 同时将 ENM_CHANGE 标志“或”运算到掩码中。
//
// // TODO: 在此添加控件通知处理程序代码
// CString str;
// GetDlgItem(IDC_MYCONZOOM)->GetWindowText(str);
// m_MYconZoom = (float)atof(str);
//}
//void CConstruct::OnChangeMzconzoom()
//{
// // TODO: 如果该控件是 RICHEDIT 控件,它将不
// // 发送此通知,除非重写 CDialog::OnInitDialog()
// // 函数并调用 CRichEditCtrl().SetEventMask(),
// // 同时将 ENM_CHANGE 标志“或”运算到掩码中。
//
// // TODO: 在此添加控件通知处理程序代码
// CString str;
// GetDlgItem(IDC_MZCONZOOM)->GetWindowText(str);
// m_MZconZoom = (float)atof(str);
//}
//void CConstruct::OnClickedMcheckring()
//{
// // TODO: 在此添加控件通知处理程序代码
// this->m_pFr->m_pCtrlWnd->m_bDeleteRing =!this->m_pFr->m_pCtrlWnd->m_bDeleteRing;
//}
BOOL CConstruct::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: 在此添加额外的初始化
m_MMCMTthreshold.SetRange(0,255);
m_MMCMTthreshold.SetPos(0);
m_MMCMTthreshold.SetTicFreq(5);
m_MMCMTthreshold.SetPageSize(10);
m_MMCMTthreshold.SetLineSize(2);
m_MMCMTthresholdvalue=m_MMCMTthreshold.GetPos();
m_MThreshold=m_MMCMTthreshold.GetPos();
m_MbDeleteRing=TRUE;
//float spacedistance;
//char ch[100];
//SCANPARAMETER sp;
//spacedistance = sp.ViewDiameter;
//itoa(spacedistance, ch, 10);
//GetDlgItem(IDC_VIEWDIAMETER)->SetWindowText(ch);
CButton* btn = (CButton*)GetDlgItem(IDC_MCHECKRING);
btn->SetCheck(1);
return TRUE; // return TRUE unless you set the focus to a control
// 异常: OCX 属性页应返回 FALSE
}
void CConstruct::OnClickedMcheckring()
{
// TODO: 在此添加控件通知处理程序代码
m_MbDeleteRing=!m_MbDeleteRing;
}
void CConstruct::OnChangeMthresholdedit()
{
// TODO: 如果该控件是 RICHEDIT 控件,它将不
// 发送此通知,除非重写 CDialog::OnInitDialog()
// 函数并调用 CRichEditCtrl().SetEventMask(),
// 同时将 ENM_CHANGE 标志“或”运算到掩码中。
// TODO: 在此添加控件通知处理程序代码
UpdateData(true);
m_MMCMTthreshold.SetPos(m_MThreshold);
}
| [
"noreply@github.com"
] | qiaobabaaa.noreply@github.com |
f31dc32316ee400420c302b013dc5b470fb7d1d9 | e3013ce104d6c3188d51e7da5c14f455d0de8825 | /C++/Tan/06_善于使用指针与引用/pointToPointers.cpp | 9c4412a606c529ba2b8986b1892a34ab94f6b798 | [] | no_license | whztt07/LearningNotes | 73c9ea22a3d4efee0b2f1b508a2b5a5589aa5c22 | 250a5e1d094e57e7fd36fa244d0fdd985083ea28 | refs/heads/master | 2020-05-31T14:51:25.672031 | 2018-09-18T08:10:50 | 2018-09-18T08:10:50 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 179 | cpp | #include<iostream>
using namespace std;
int main()
{
char*(*p);
char *name[]={"BASIC","FORTRAN","C++","Pascal","COBOL"};
p = name+2;
cout<<*p<<endl;
cout<<**p<<endl;
return 0;
}
| [
"yucicheung@gmail.com"
] | yucicheung@gmail.com |
54ae36d0c46d2ca3b35b5bfb85d343a4d1ff4c66 | d493276f3a09b6f161b9d3a79d5df55f48a0557c | /codejam_2020_RA_No3.cpp | 712b0fb514de4e29e916b56a5ae022d07487cdd6 | [] | no_license | AnneMayor/algorithmstudy | 31e034e9e7c8ffab0601f58b9ec29bea62aacf24 | 944870759ff43d0c275b28f0dcf54f5dd4b8f4b1 | refs/heads/master | 2023-04-26T21:25:21.679777 | 2023-04-15T09:08:02 | 2023-04-15T09:08:02 | 182,223,870 | 0 | 0 | null | 2021-06-20T06:49:02 | 2019-04-19T07:42:00 | C++ | UTF-8 | C++ | false | false | 3,967 | cpp | #include <bits/stdc++.h>
using namespace std;
#define pii pair<int, int>
#define ll long long
#define x first
#define y second
int findIndex(set<int> & group, int pos, int dir) {
if(dir > 0) {
// 오른쪽 검사
auto idx = group.upper_bound(pos);
if(idx == group.end()) return int(1e9);
return *idx;
} else {
// 왼쪽 검사
auto idx = group.lower_bound(pos);
if(idx == group.begin()) return -int(1e9);
return *(--idx);
}
}
int main() {
int T;
scanf("%d", &T);
for(int tc = 1; tc <= T; tc++) {
int r, c;
scanf("%d %d", &r, &c);
ll total = 0;
ll ans = 0;
queue<pii> possibleSpaces;
vector<set<int> > rows(r+5), cols(c+5);
int danceRoom[r+5][c+5];
int eachPositionRound[r+5][c+5];
memset(eachPositionRound, 0, sizeof(eachPositionRound));
for(int i = 0; i < r; i++) {
for(int j = 0; j < c; j++) {
scanf("%d", &danceRoom[i][j]);
total += danceRoom[i][j];
possibleSpaces.push(make_pair(i, j));
rows[i].insert(j);
cols[j].insert(i);
}
}
for(int i = 0, round = 0; ; i++) {
// 1단계: 가능한 dancer 점수 합산
vector<pii> failedSpaces;
round++;
while (!possibleSpaces.empty())
{
pii position = possibleSpaces.front();
possibleSpaces.pop();
if(eachPositionRound[position.x][position.y] == round) continue;
eachPositionRound[position.x][position.y] = round;
int cntOfAround = 0, totalScore = 0, z;
// 4방향 검사
z = findIndex(rows[position.x], position.y, 1);
if(z < c) {cntOfAround++; totalScore += danceRoom[position.x][z];}
z = findIndex(rows[position.x], position.y, -1);
if(z >= 0) {cntOfAround++; totalScore += danceRoom[position.x][z];}
z = findIndex(cols[position.y], position.x, 1);
if(z < r) {cntOfAround++; totalScore += danceRoom[z][position.y];};
z = findIndex(cols[position.y], position.x, -1);
if(z >= 0) {cntOfAround++; totalScore += danceRoom[z][position.y];};
if(danceRoom[position.x][position.y] * cntOfAround < totalScore) failedSpaces.push_back(make_pair(position.x, position.y));
}
ans += total;
if(failedSpaces.empty()) break;
// 2단계: 탈락할 dancer 점수 삭제
round++;
for (pii & p : failedSpaces)
{
if(eachPositionRound[p.x][p.y] == round) continue;
eachPositionRound[p.x][p.y] = round;
total -= danceRoom[p.x][p.y];
rows[p.x].erase(p.y);
cols[p.y].erase(p.x);
}
// 3단계: 탈락한 dancer 동서남북 방향으로 다음 탈락 가능한 dancer 큐에 넣기
round++;
for (pii & p : failedSpaces)
{
if(eachPositionRound[p.x][p.y] == round) continue;
eachPositionRound[p.x][p.y] = round;
int z;
// 4방향 검사
z = findIndex(rows[p.x], p.y, 1);
if(z < c) {possibleSpaces.push(make_pair(p.x, z));};
z = findIndex(rows[p.x], p.y, -1);
if(z >= 0) {possibleSpaces.push(make_pair(p.x, z));};
z = findIndex(cols[p.y], p.x, 1);
if(z < r) {possibleSpaces.push(make_pair(z, p.y));};
z = findIndex(cols[p.y], p.x, -1);
if(z >= 0) {possibleSpaces.push(make_pair(z, p.y));};
}
}
printf("Case #%d: %lld\n", tc, ans);
}
return 0;
} | [
"melllamodahye@gmail.com"
] | melllamodahye@gmail.com |
29672406f9cb8edbde732f7486f1d74a9192e5b2 | fd7ed208359ad08fa6bb716e1b008aa4e39e7efe | /labs/G60_Composite/cpp/complete/simpleposition.hpp | 007ccc8e919e498016e91d6bef552ecf8dc370a7 | [
"MIT"
] | permissive | Meera94/design_patterns | 54ca8f2796d5c878487c82f5d758b5811d3bcef2 | bf9f599149359921c8171b82d102a2f2904f915e | refs/heads/main | 2023-07-02T04:02:11.116457 | 2021-08-09T14:49:44 | 2021-08-09T14:49:44 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 834 | hpp | #pragma once
#include <string>
#include <ctime>
#include "position.hpp"
using namespace std;
enum Direction { Long, Short };
string direction_to_string(Direction d)
{
switch(d)
{
case Direction::Long: return "Long";
case Direction::Short: return "Short";
default: throw "Bad Enum";
}
}
class SimplePosition : public Position
{
public:
string symbol = "";
int quantity = 0;
Direction direction;
SimplePosition(string symbol, int quantity, Direction direction)
{
this->symbol = symbol;
this->quantity = quantity;
this->direction = direction;
}
string getInfo()
{
string results = "";
results += "[";
results += this->symbol;
results += " ";
results += to_string(this->quantity);
results += " ";
results += direction_to_string(this->direction);
results += "]";
return results;
}
};
| [
"you@example.com"
] | you@example.com |
12da96276f5a74b7324fe62d47aeb43ef1e79d47 | 82e61ed114f5bb4cef6fc0e9ea8df1d54b33f8c6 | /Atom.h | 5b16aa8357300c4d2b1e6b35fbd024832ccf0d69 | [] | no_license | moggces/ENTESS | add248852a372ed0f03c9f439725a5ab14f52b41 | cc86eea3a2cfdd4bce1d249f250029207f192ef6 | refs/heads/master | 2021-01-13T08:53:15.998553 | 2016-10-26T12:56:28 | 2016-10-26T12:56:28 | 72,002,358 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 689 | h | #ifndef Atom_H
#define Atom_H
#include <vector>
#include "apstring.h"
#define DUMMY_VAL -999
using namespace std;
typedef apstring A_STRING;
struct Protein_S {
float temper;
};
struct Ligand_S {
float p_charge;
};
class Atom_n {
public:
//constructors , deconstructor
Atom_n(int); //0 is ligand ; the other numbers are protein ... but can redefine to other types
Atom_n();
~Atom_n();
//overloaded operators
Atom_n& operator = ( const Atom_n&);
int atom_number;
int isLigand;
A_STRING atomType; // CA, O, or C.3 in mol2
A_STRING atom_name;
A_STRING res_name;
A_STRING chain;
int res_num;
float x, y, z;
Protein_S p_s;
Ligand_S l_s;
private:
};
#endif
| [
"juihua.hsieh@gmail.com"
] | juihua.hsieh@gmail.com |
9b7794629996948950f02b2e71fd2f94c6b88440 | 836964efff9836f0e62dbe566a9313dad1f9123d | /src/rmatrix.h | bd28b4453d903ae24a286367d36deeeecb0aa3a4 | [] | no_license | nicolaje/interval | f8ebc002574bc8a5f91e7e314820cb7d1038fecc | 7ee97c5084b26b055e90f105c999d39a86b9b95c | refs/heads/master | 2021-01-15T14:18:44.649773 | 2014-12-06T14:22:15 | 2014-12-06T14:22:15 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,528 | h | // Simple interval library from Luc JAULIN, with minor modifications from Fabrice LE BARS and Jeremy NICOLA.
#ifndef __RMATRIX__
#define __RMATRIX__
#include "box.h"
#include "matrix_lib/tnt.h"
#include "matrix_lib/jama_lu.h"
class rmatrix
{
public:
TNT::Array2D <double> data;
public:
//----------------------------------------------------------------------
// Constructors/destructors
//----------------------------------------------------------------------
rmatrix();
rmatrix(int, int);
rmatrix(const box &);
rmatrix(const rmatrix&);
~rmatrix();
//----------------------------------------------------------------------
// Operators
//----------------------------------------------------------------------
rmatrix& operator=(const rmatrix&);
friend rmatrix operator+(const rmatrix&, const rmatrix&);
friend rmatrix operator-(const rmatrix&);
friend rmatrix operator-(const rmatrix&, const rmatrix&);
friend rmatrix operator*(const rmatrix&, const rmatrix&);
friend rmatrix operator*(const double, const rmatrix&);
//friend rmatrix operator*(const rmatrix&, const interval&);
//friend std::ostream& operator<<(std::ostream&, const rmatrix&);
//----------------------------------------------------------------------
// Member functions
//----------------------------------------------------------------------
double GetVal(int, int) const;
void SetVal(int, int, double);
int dim1(void) const;
int dim2(void) const;
};
//----------------------------------------------------------------------
// rmatrix-valued functions
//----------------------------------------------------------------------
rmatrix Zeros(int, int);
rmatrix Eye(int);
rmatrix Inv(rmatrix&);
rmatrix RotationPhiThetaPsi(double phi, double theta, double psi);
//----------------------------------------------------------------------
// Other functions
//----------------------------------------------------------------------
box ToBox(const rmatrix& B);
double Det(rmatrix&);
/*double Angle (rmatrix& ,rmatrix&); // Il faut des vecteurs de dim 2
int Size (const rmatrix&);
int AxePrincipal (rmatrix&);
int AxePrincipal (rmatrix&, vector<int>&);
int AxePrincipal (rmatrix&, rmatrix&);
void Update (rmatrix&);
rmatrix Rand (const rmatrix& X);
rmatrix Center (const rmatrix&);
rmatrix Center (const rmatrix&, vector<int>&);
//void CheckRange (rmatrix&,rmatrix&);
interval Determinant (rmatrix&, rmatrix&);
bool Emptyrmatrix (const rmatrix&);
bool Disjoint (const rmatrix&,const rmatrix&);
double decrease (const rmatrix&, const rmatrix&);
double decrease (const rmatrix&, const rmatrix&, vector<int>);
double Eloignement (rmatrix&,rmatrix&);
double Eloignement2 (rmatrix&,rmatrix&);
double EloignementRelatif2(rmatrix&,rmatrix&);
double Marge (rmatrix,rmatrix);
iboolean In (rmatrix,rmatrix);
rmatrix Inf (rmatrix);
rmatrix Inflate (rmatrix&,double);
rmatrix Inter (const rmatrix&,const rmatrix&);
rmatrix Concat (const rmatrix&, const rmatrix&);
rmatrix Proj (const rmatrix&, int, int);
//void Inter1 (rmatrix&,rmatrix&,const rmatrix&,const rmatrix&,const rmatrix&);
interval Norm (rmatrix);
interval NormEuclid (rmatrix, rmatrix);
interval NormInf (rmatrix, rmatrix);
void Phi0 (rmatrix&,rmatrix*); //0-intersection (voir qminimax)
void Phi1 (rmatrix&,rmatrix&,rmatrix*); //1-intersection (voir qminimax)
void Phi2 (rmatrix&,rmatrix&,rmatrix&,rmatrix*); //2-intersection
interval ProduitScalaire (rmatrix&,rmatrix&);
bool Prop (rmatrix&,rmatrix&);
bool Subset (rmatrix&,rmatrix&);
bool Subset (rmatrix&,rmatrix&,double);
bool Isrmatrix (rmatrix);
void Sucre (rmatrix&,rmatrix&);
rmatrix Sup (rmatrix);
rmatrix Union (rmatrix&,rmatrix&);
double Volume (rmatrix&);
double Width (rmatrix&);
double Width (rmatrix&,vector<int>&);
double Width (rmatrix&,rmatrix&);
//rmatrix Empty (int);
//rmatrix Infinity (int);*/
#endif // __RMATRIX__
| [
"jeremy.nicola@gmail.com"
] | jeremy.nicola@gmail.com |
0bb04e64f1664b24ab522da9e17d23090931909b | ef2c53c3fd1ebb2a62dd675e46ca387d8ae46902 | /WaveformViewers/include/EBEvent.hpp | ad1c9580ca757ca24ea3b4bb02d5b3961f7dd408 | [] | no_license | madantimalsina/ElectronicsSimulation-baseline_study | 9ef410cc440235184de9ec3d44f96416bac1e8e1 | 8832ad57ba8b5c2fff3cabb6be8cfa425afa4af4 | refs/heads/master | 2020-06-30T16:46:57.661729 | 2019-08-06T16:42:36 | 2019-08-06T16:42:36 | 200,888,194 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,757 | hpp | //
// EBEvent.hpp
// devices
//
// Created by Cees Carels on 13/03/2016.
// Copyright © 2016 LZOxford. All rights reserved.
//
#ifndef EBEvent_hpp
#define EBEvent_hpp
#include <stdio.h>
#include <vector>
#include "DDC32.hpp"
#include "Device.hpp"
/**
* Class containing event specific information for the current event
* being simulated.
*/
class EBEvent
{
public:
EBEvent();
~EBEvent();
void setEBfromDCs(DDC32& theDCs);
void setEvtSeqNumb(const unsigned long& evt);
unsigned long getEvtSeqNumb();
std::vector<unsigned short> getnPods();
void setBufferLiveStartTS(const unsigned long& StartTS);
std::vector<unsigned long> getBufferLiveStartTS();
void setBufferLiveStopTS(const unsigned long& EndTS);
std::vector<unsigned long> getBufferLiveStopTS();
void setTriggerType(const short& type);
short getTriggerType();
void setTriggerTimeStamp(const unsigned long& TS);
unsigned long getTriggerTimeStamp();
void setTriggerMultiplicity(const short& multiplicity);
short getTriggerMultiplicity();
void setSumPODstartTS(const unsigned long& StartTS);
unsigned long getSumPODStartTS();
void setSumPODLength(const short& length);
short getSumPODLength();
void setSumPODData(const int& sumdata);
std::vector<int> getSumPODData();
private:
unsigned long EventSeqNumber;
std::vector<unsigned short> nPods; //[0-NumDC]
std::vector<unsigned long> bufferLiveStartTS;
std::vector<unsigned long> bufferLiveStopTS;
short triggerType;
unsigned long triggerTimeStamp;
short triggerMultiplicity;
unsigned long sumPODstartTS;
short sumPODlength;
std::vector<int> sumPODdata;
int TSMaxArrSize;
};
#endif /* EBEvent_hpp */
| [
"noreply@github.com"
] | madantimalsina.noreply@github.com |
85fcba4dbbdb79ca058a09d6a038db6788a86ad7 | b47490fab509a894716969b12649a1944cf6b1de | /CPP_Module_01/ex09/Logger.hpp | d518f5ac7965ff04e2bbf818e3a9d2a1a3fb0eeb | [] | no_license | flavienfr/piscine_cpp | 2341d097616bdceb79cdee3e7737913c7304d6e5 | 61d7793f8eb812432db5d1f92ec50df94ab1b82d | refs/heads/master | 2021-05-18T01:19:24.917876 | 2020-07-07T16:35:07 | 2020-07-07T16:35:07 | 251,043,625 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,494 | hpp | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* Logger.hpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: froussel <froussel@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/04/02 12:44:50 by froussel #+# #+# */
/* Updated: 2020/04/02 14:23:23 by froussel ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef LOGGER_HPP
# define LOGGER_HPP
# include <iostream>
# include <string>
# include <fstream>
# include <ctime>
# define NB_FUNC 2
class Logger
{
private:
void logToConsole(const std::string &to_print);
void logToFile(const std::string &to_print);
std::string makeLogEntry(const std::string &to_print);
std::string displayTimestamp(void);
std::fstream logger;
struct funcMap
{
std::string name;
void (Logger::*funcPtr)(std::string const &);
};
funcMap funcTab[NB_FUNC];
public:
Logger();
~Logger();
void log(std::string const &dest, std::string const &message);
};
#endif
| [
"flav.rsl@hotmail.fr"
] | flav.rsl@hotmail.fr |
92236819aa256121c0a90a61cc8fe21cf652b9de | 36776f47cfbb57d0188d90217e03171a2194b553 | /UnitTest1/UnitTest1.cpp | 0685c03a121464460888af75aff593c6bb37e816 | [] | no_license | Aquat1c/lab1.1_oop | cc927e024b69555cbd7795d303a20c8b59f8a6da | 6ee6662258a3d95292cb38f98a5bc3df4551d882 | refs/heads/main | 2023-04-02T05:46:24.343096 | 2021-03-05T10:36:36 | 2021-03-05T10:36:36 | 344,776,720 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 287 | cpp | #include "pch.h"
#include "CppUnitTest.h"
#include "../oop_lab_1.1/Goods.h"
using namespace Microsoft::VisualStudio::CppUnitTestFramework;
namespace UnitTest1
{
TEST_CLASS(UnitTest1)
{
public:
TEST_METHOD(TestMethod1)
{
Assert::AreEqual(1, (1));
}
};
}
| [
"noreply@github.com"
] | Aquat1c.noreply@github.com |
942aa615a9b6a543875dd07a3c7740bc62c964b6 | 6b2a8dd202fdce77c971c412717e305e1caaac51 | /solutions_5769900270288896_0/C++/auguste/main.cpp | 2a2f906c35d439aa7082b11d224744dea331d81c | [] | no_license | alexandraback/datacollection | 0bc67a9ace00abbc843f4912562f3a064992e0e9 | 076a7bc7693f3abf07bfdbdac838cb4ef65ccfcf | refs/heads/master | 2021-01-24T18:27:24.417992 | 2017-05-23T09:23:38 | 2017-05-23T09:23:38 | 84,313,442 | 2 | 4 | null | null | null | null | UTF-8 | C++ | false | false | 923 | cpp | #include <cstdio>
#include <algorithm>
using namespace std;
int f(int r, int c)
{
if(r%2 == 0)
return c - 2;
else
return 2*((c-1)/2);
}
int main()
{
int T;
scanf("%d", &T);
for(int _i=1; _i<=T; _i++)
{
int r, c, n;
scanf("%d%d%d", &r, &c, &n);
int t = r*(c-1) + c*(r-1);
int m = r*c - n;
int nt = (max(0, r-2)*max(0, c-2));
if(m <= (nt + 1)/2)
{
t -= 4*m;
}
else
{
int nint = nt/2;
t -= 4*nint;
m -= nint;
int nbord = f(r, c) + f(c, r);
if(m <= nbord)
{
t -= 3*m;
}
else
{
t -= 3*nbord;
m -= nbord;
while(m > 0 && t > 0)
{
t -= 2;
m--;
}
}
}
if(t < 0) t = 0;
printf("Case #%d: %d\n",_i, t);
}
return 0;
}
| [
"eewestman@gmail.com"
] | eewestman@gmail.com |
89591eacd855ccb5031dadf4e3287bfc9fdf04f5 | 321a8ef1591e915c6a9f69d1ce28e98017e72909 | /MapOfCity/City.cpp | 63aca993a9e074d8837c5393397bf949541d42e5 | [] | no_license | krasimirDiulgerov/MapOfCitySofia | 90cfc14b4a3de48fb77fe7024f39bbac16e1cec6 | 5111d4926d65346fe4e49484de1728e3d8b5c055 | refs/heads/main | 2023-03-28T04:47:09.356139 | 2021-04-01T17:22:23 | 2021-04-01T17:22:23 | 353,770,407 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 17,720 | cpp | #include<iostream>
#include<sstream>
#include<queue>
#include<cmath>
#include<fstream>
#include<string>
#include"Intersection.h"
#include"City.h"
Location::Location(std::string name, std::vector<Intersection*>* intersections) {
closed = std::vector<std::string>();
allIntersections = intersections;
current = findIntersection(name);
}
Location::Location(Intersection* inter, std::vector<Intersection*>* intersections) {
current = inter;
closed = std::vector<std::string>();
allIntersections = intersections;
}
bool Location::hasIntersection(std::vector<Intersection>intersections, std::string name) {
using Iterator = std::vector<Intersection>::iterator;
for (int i = 0; i < intersections.size(); i++) {
if (intersections[i].getName() == name)return true;
}
return false;
}
std::pair<std::vector<Intersection>, int>Location::findShortestPath(std::vector<std::pair<std::vector<Intersection>, int>>paths) {
int minValue = 999999;
std::pair<std::vector<Intersection>, int>min;
for (std::pair<std::vector<Intersection>, int>path : paths) {
if (minValue > path.second) {
min = path;
minValue = path.second;
}
}
return min;
}
//izvinqvai za sledvashtoto
std::vector<std::pair<std::vector<Intersection>, int>> Location::allPathsBetween(std::vector<Intersection>currPath, int currLength, Intersection inter1, Intersection inter2, std::vector<std::pair<std::vector<Intersection>, int>>& result, bool considerClosed) {
if (hasIntersection(currPath, inter1.getName()))return result;
if (considerClosed && inter1.isClosed())return result;
currPath.push_back(inter1);
for (std::pair<Intersection*, int>neigh : inter1.getNeighbours()) {
Intersection next = *(neigh.first);
allPathsBetween(currPath, currLength + neigh.second, next, inter2, result, considerClosed);
}
if (inter1.hasNeighbour(inter2.getName())) {
currPath.push_back(inter2);
result.push_back(std::make_pair(currPath, currLength + inter1.getNeighbour(inter2.getName())->second));
return result;
}
return result;
}
std::pair<std::vector<Intersection>, int> Location::getShortestPath(std::string target, std::ostream& os, bool consideredClosed ) {
using Paths = std::vector<std::pair<std::vector<Intersection>, int>>;
Intersection inter2 = *(findIntersection(target));
Paths temp;
Paths paths = allPathsBetween(std::vector<Intersection>(), 0, *current, inter2, temp, consideredClosed);
if (paths.size() == 0) {
os << "There is no path between these intersections,it might be because of closed intersection." << std::endl;
return std::make_pair(std::vector<Intersection>(), 0);
}
return findShortestPath(paths);
}
Location Location::move(std::string name, std::ostream& os) {
std::pair<std::vector<Intersection>, int>shortestPath = getShortestPath(name, os,true);
if (shortestPath.first.size() > 0) {
for (Intersection inter : shortestPath.first) {
os << inter.getName() << " ";
}
os << std::endl;
os << "Moved to " << name << std::endl;
return change(name, os);
}
return *this;
}
Location Location::change(std::string name, std::ostream& os) {
Intersection* temp = findIntersection(name);
if (!temp)
os << "There is no intersection with this name, so we didnt change it" << std::endl;
else {
os << "Changed to " << name << std::endl;
current = temp;
}
return *this;
}
void Location::close(std::string name) {
Intersection* temp = findIntersection(name);
temp->close();
closed.push_back(temp->getName());
}
void Location::show(std::ostream& os) {
os << current->getName() << std::endl;
}
void Location::showNeighbours(std::ostream& os) {
current->printNeighbours(os);
}
void Location::open(std::string name) {
Intersection* temp = findIntersection(name);
temp->open();
if (closed.size() > 0) {
if (closed[closed.size() - 1] == name)closed.pop_back();
else
for (std::vector<std::string>::iterator it = closed.begin(); it < closed.end(); it++) {
if ((*it) == name)it = closed.erase(it);
}
}
else {
std::cout << "No closed intersections" << std::endl;
}
}
void Location::showClosed(std::ostream& os) {
if (closed.size() == 0){
os << "There are no closed intersections" << std::endl;
return;
}
for (std::string name : closed) {
os << name << " ";
}
os << std::endl;
}
Intersection* Location::findIntersection(std::string name) {
for (Intersection* inter : *allIntersections) {
if (inter->getName() == name)return inter;
}
return nullptr;
}
bool City::hasIntersection(std::vector<Intersection>intersections, std::string name) {
for (int i = 0; i < intersections.size(); i++) {
if (intersections[i].getName() == name)return true;
}
return false;
}
bool City::hasPathBetweenHelper(std::vector<Intersection>& visited, Intersection inter1, Intersection inter2) {
if (hasIntersection(visited, inter1.getName()))return false;
if (inter1.hasNeighbour(inter2.getName()))return true;
visited.push_back(inter1);
for (std::pair<Intersection*, int> neigh : inter1.getNeighbours()) {
Intersection next = *(neigh.first);
if (hasPathBetweenHelper(visited, next, inter2))return true;
}
return false;
}
bool isInVisited(std::vector<Intersection>visited, Intersection inter) {
for (int i = 0; i < visited.size(); i++) {
if (visited[i].getName() == inter.getName())return true;
}
return false;
}
std::vector<Intersection> City::findBigCircle(Intersection start, Intersection end, std::vector<Intersection> visited, std::vector<Intersection>result) {
if (hasIntersection(result, start.getName()))return result;
visited.push_back(start);
if (start.hasNeighbour(end.getName())) {
if (result.size() == map.size() - 1) {
result.push_back(end);
return result;
}
}
for (int i = 0; i < start.neighbourCount(); i++) {
Intersection next = *(start.getNeighbours()[i].first);
if (!isInVisited(visited, next)) {
std::vector<Intersection> temp = findBigCircle(next, end, visited, result);
if (temp.size() == map.size()) {
result = temp;
break;
}
}
}
return result;
}
void City::printBigCircle(Intersection start, Intersection end, std::ostream& os) {
std::vector<Intersection> path = findBigCircle(start, end, std::vector<Intersection>(), std::vector<Intersection>());
for (Intersection inter : path) {
os << inter.getName();
}
os << std::endl;
}
std::vector<Path> City::allPathsBetween(std::vector<Intersection>currPath, int currLength, Intersection inter1, Intersection inter2, std::vector<Path>& result, bool considerClosed) {
if (hasIntersection(currPath, inter1.getName()))return result;
if (considerClosed && inter1.isClosed())return result;
currPath.push_back(inter1);
for (std::pair<Intersection*, int>neigh : inter1.getNeighbours()) {
Intersection next = *(neigh.first);
allPathsBetween(currPath, currLength + neigh.second, next, inter2, result, considerClosed);
}
if (inter1.hasNeighbour(inter2.getName())) {
currPath.push_back(inter2);
result.push_back(std::make_pair(currPath, currLength + inter1.getNeighbour(inter2.getName())->second));
return result;
}
return result;
}
void City::printPaths(std::vector<Path>paths, std::ostream& out) {
int i = 0;
for (std::pair<std::vector<Intersection>, int> path : paths) {
out << "Path " << ++i << ". ";
for (Intersection inter : path.first) {
out << inter.getName() << " ";
}
out << "has length " << path.second << std::endl;
}
}
Path City::findCircle(Intersection start, Intersection current, std::vector<Intersection>path, std::vector<Intersection>& visited, int length, bool considerClosed) {
std::pair<std::vector<Intersection>, int>holder = std::make_pair(path, length);
if (hasIntersection(visited, current.getName()))return holder;
visited.push_back(current);
path.push_back(current);
if (current.hasNeighbour(start.getName())) {
path.push_back(start);
return std::make_pair(path, (length + current.getNeighbour(start.getName())->second));
}
bool hasPathInANeighbour = false;
std::pair<std::vector<Intersection>, int>* result = nullptr;
for (std::pair<Intersection*, int> neigh : current.getNeighbours()) {
Intersection next = *(neigh.first);
if (!considerClosed || !next.isClosed()) {
std::pair<std::vector<Intersection>, int>circle = findCircle(start, next, path, visited, length + neigh.second, considerClosed);
if (circle.second != 0 && (start.getName() == circle.first[(circle.first.size() - 1)].getName()))
return circle;
}
}
return holder;
}
std::vector<Intersection>expandAPath(std::vector<Intersection> path, std::vector<Intersection> circle) {
std::vector<Intersection>::iterator it1 = path.begin();
for (it1; it1 < path.end(); it1++) {
if ((*it1).getName() == circle[0].getName()) {
break;
}
}
path.insert(it1 + 1, circle.begin() + 1, circle.end());
return path;
}
std::vector<Path> City::expandPaths(std::vector<Path>& paths, bool considerClosed) {
std::pair<std::vector<Intersection>, int> smallest = paths[0];
for (Intersection inter : smallest.first) {
std::vector<Intersection> temp;
std::pair<std::vector<Intersection>, int> circle = findCircle(inter, inter, std::vector<Intersection>(), temp, 0, considerClosed);
std::vector<Intersection> expanded = expandAPath(paths[0].first, circle.first);
std::vector<std::pair<std::vector<Intersection>, int>>result;
if (circle.second != 0) {
result = paths;
if (paths.size() == 1) {
result.push_back(std::make_pair(expanded, circle.second + smallest.second));
result.push_back(std::make_pair(expandAPath(expanded, circle.first), 2 * circle.second + smallest.second));
}
else if (paths.size() > 1 && (circle.second + smallest.second) < paths[1].second) {
std::pair<std::vector<Intersection>, int> expanded1 = std::make_pair(expanded, (circle.second + smallest.second));
if (paths.size() == 2 && (2 * circle.second + smallest.second) >= paths[1].second)result.push_back(paths[1]);
else if (paths.size() == 2)result.push_back(std::make_pair(expandAPath(expanded1.first, circle.first), 2 * circle.second + smallest.second));
else if ((2 * circle.second + smallest.second) >= paths[1].second)result[2] = paths[1];
else result[2] = std::make_pair(expandAPath(expanded1.first, circle.first), 2 * circle.second + smallest.second);
result[1] = expanded1;
}
else if (paths.size() == 2)result.push_back(std::make_pair(expandAPath(paths[0].first, circle.first), circle.second + smallest.second));
else if (paths.size() > 2 && (circle.second + smallest.second) < paths[2].second)result[2] = std::make_pair(expandAPath(paths[0].first, circle.first), circle.second + smallest.second);
return result;
}
std::cout << "End" << std::endl;
}
return paths;
}
std::vector<Path> City::reduceAndSortPaths(std::vector<Path>paths) {
int resultSize;
if (paths.size() < 3)resultSize = paths.size();
else resultSize = 3;
std::vector<std::pair<std::vector<Intersection>, int>>result;
int min;
for (int i = 0; i < resultSize; i++) {
min = paths[i].second;
for (int j = i + 1; j < paths.size(); j++) {
if (paths[j].second < min) {
std::pair<std::vector<Intersection>, int>temp = paths[i];
paths[i] = paths[j];
paths[j] = temp;
min = paths[i].second;
}
}
}
for (int k = 0; k < resultSize; k++) {
result.push_back(paths[k]);
}
return result;
}
bool City::addIntersection(Intersection* inter) {
if (inter != nullptr && isUnique(inter->getName())) {
map.push_back(inter);
return true;
}
return false;
}
std::vector<Intersection*>::iterator City::getIterator() {
return std::vector<Intersection*>::iterator();
}
void City::importIntersections(std::string path) {
std::ifstream is(path, std::ios::in);
std::string line;
getline(is, line);
while (line != "\0") {
buildIntersection(line);
getline(is, line);
}
}
void City::exportIntersections(std::string path) {
std::ofstream os(path, std::ios::out);
iterator it = map.begin();
for (it; it < map.end(); it++) {
(*it)->print(os);
}
}
bool City::isUnique(std::string name){
Intersection* inter = getIntersection(name);
if (inter == nullptr)return true;
return false;
}
Location City::getLocation(std::string name) {
return Location(name, &map);
}
bool isInVector(std::vector<std::string>list, std::string str, int index) {
for (int i = 0; i < list.size(); i++) {
if (str.compare(list[i]) == 0 && i != index)return true;
}
return false;
}
Intersection* City::buildIntersection(std::string expression) {
std::vector<std::string> strings;
int index = 0;
int nextIndex = expression.find_first_of(" ", index + 1);
//npos e kraqt na stringa
while (nextIndex != std::string::npos) {
strings.push_back(expression.substr(index, nextIndex - index));
index = nextIndex + 1;
nextIndex = expression.find_first_of(" ", index + 1);
}
strings.push_back(expression.substr(index, expression.length()));
Intersection* intersection = getIntersection(strings[0]);
if (intersection == nullptr) {
intersection = new Intersection(strings[0]);
addIntersection(intersection);
}
if (intersection->neighbourCount() > 0 && strings.size() > 1)return nullptr;
for (int i = 1; i < strings.size(); i += 2) {
if (strings[i].compare(strings[0]) == 0)return nullptr;
if (isInVector(strings, strings[i], i))return nullptr;
Intersection* inters1 = getIntersection(strings[i]);
std::stringstream stream(strings[i + 1]);
int distance;
stream >> distance;
if (inters1 == nullptr) {
inters1 = new Intersection(strings[i]);
map.push_back(inters1);
}
intersection->addNeighbour(inters1, distance);
inters1->addIncomingNeighbour(intersection);
}
return intersection;
}
Intersection* City::getIntersection(std::string name) {
using vectorIterator = std::vector<Intersection*>::iterator;
for (iterator it = map.begin(); it != map.end(); ++it) {
if (name.compare((*it)->getName()) == 0)return *it;
}
return nullptr;
}
void City::print() {
std::cout << std::endl << "All the intersections added in city are: " << std::endl;
int i = 0;
for (Intersection* inter : map) {
std::cout << ++i << ". intersection is" << std::endl;
inter->print(std::cout);
std::cout << "Incoming neighbour count = " << inter->incomingNeighbourCount() << std::endl;
}
std::cout << std::endl;
}
bool City::hasPathBetween(std::string name1, std::string name2) {
Intersection inter1 = *(getIntersection(name1));
Intersection inter2 = *(getIntersection(name2));
std::vector<Intersection> temp;
return hasPathBetweenHelper(temp, inter1, inter2);
}
std::vector<std::pair<std::vector<Intersection>, int>> City::getShortestPaths(std::string name1, std::string name2, bool considerClosed, std::ostream& os) {
using Paths = std::vector<std::pair<std::vector<Intersection>, int>>;
Paths result;
if (!hasPathBetween(name1, name2))return result;
Intersection inter1 = *(getIntersection(name1));
Intersection inter2 = *(getIntersection(name2));
Paths temp;
Paths paths = allPathsBetween(std::vector<Intersection>(), 0, inter1, inter2, temp, considerClosed);
if (paths.size() == 0) {
os << "There is no path between these intersections,it might be becaouse of closed intersection." << std::endl;
return result;
}
Paths reducedPaths = reduceAndSortPaths(paths);
result = expandPaths(reducedPaths, considerClosed);
return result;
}
void City::showTheShortestPaths(std::string name1, std::string name2, bool considerClosed, std::ostream& os) {
using Paths = std::vector<std::pair<std::vector<Intersection>, int>>;
Paths result = getShortestPaths(name1, name2, considerClosed, os);
if (result.size() > 0) {
printPaths(result, os);
}
else {
os << "There is no path between these intersections" << std::endl;
}
}
bool City::hasSmallTour(std::string name1) {
Intersection inter1 = *getIntersection(name1);
std::vector<Intersection> temp;
return hasPathBetweenHelper(temp, inter1, inter1);
}
bool City::hasTourToAllIntersections(std::ostream& os) {
int outcomingCount = 0;
int incomingCount = 0;
Intersection* start = nullptr;
Intersection* end = nullptr;
for (iterator it = map.begin(); it != map.end(); ++it) {
if (outcomingCount > 1 || incomingCount > 1)return false;
if ((*it)->neighbourCount() == (*it)->incomingNeighbourCount()) {
if (start == nullptr) {
start = (*it);
end = (*it);
}
}
else if (((*it)->neighbourCount() - (*it)->incomingNeighbourCount()) == -1) {
end = (*it);
incomingCount++;
}
else if (((*it)->neighbourCount() - (*it)->incomingNeighbourCount()) == 1) {
start = (*it);
outcomingCount++;
}
else return false;
}
if ((incomingCount - outcomingCount) != 0)return false;
if (!canGoToAllIntersections(start->getName()))return false;
printBigCircle(*start, *end, os);
return true;
}
//bfs with keeping the visited and checking in the end if they are all
bool City::canGoToAllIntersections(std::string name) {
Intersection inter = *getIntersection(name);
std::vector<Intersection>visited;
std::queue<Intersection> next;
next.push(inter);
while (!next.empty()) {
visited.push_back(inter);
if (visited.size() == map.size())return true;
for (std::pair<Intersection*, int>neigh : inter.getNeighbours()) {
Intersection temp = *(neigh.first);
if (!hasIntersection(visited, temp.getName()))next.push(temp);
}
next.pop();
if (next.empty())inter = next.front();
}
return false;
}
void City::showDeadEnds(std::ostream& os) {
std::vector<Intersection*>::iterator it = map.begin();
for (it; it < map.end(); it++) {
if ((*it)->neighbourCount() == 0) {
std::vector<Intersection*> neighbours = (*it)->getIncomingNeighbours();
for (unsigned j = 0; j < (*it)->incomingNeighbourCount(); j++) {
os << neighbours[j]->getName() << "->";
os << (*it)->getName() << std::endl;
}
}
}
} | [
"krasimir.diulgerov26@abv.bg"
] | krasimir.diulgerov26@abv.bg |
b054d68d580d3f627d0fb4bd7a8da5784f353e1d | a4cdc257cc5ed0dce546420c3b680840267c5c10 | /Boj/14000/14226(이모티콘).cpp | b4fd87c6f3f8e330c439102a3649b2e2123daab1 | [] | no_license | xifoxy/OnlineJudge | fd9013f048f3b0c0d8387a6151caaee84b6e5560 | 34165bf661a2cca25abd4622235b089a04c0fe38 | refs/heads/master | 2021-06-19T03:02:14.624660 | 2021-04-02T22:37:54 | 2021-04-02T22:37:54 | 200,482,705 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,663 | cpp | #include <bits/stdc++.h>
using namespace std;
struct info{
int cnt, clip;
};
const int M = 1e3;
bool dp[M + 1][M + 1];
int n;
int main(){
scanf("%d", &n);
queue<info> Q;
Q.push({1,0});
dp[1][0] = 0;
int cmd_time = 0;
bool cmp = true;
// 2중 반복문으로 구현한 이유는, 연산 시간을 구분하기 위함이다.
while(!Q.empty() && cmp){
int sz = Q.size();
for(int i = 0; i < sz && cmp; ++i){
info t = Q.front();
Q.pop();
if(t.cnt == n) {
printf("%d\n", cmd_time);
cmp = false;
break;
}
// 1. 클립보드에 저장
Q.push({t.cnt, t.cnt});
// 2. 현재 클립보드에 있는 값 붙여넣기
// 이모티콘의 길이가 1000이 넘는것은 굳이 갱신할 필요가 없다.
int len = t.cnt + t.clip;
if(len <= M && !dp[len][t.clip]){
Q.push({len, t.clip});
dp[len][t.clip] = true;
}
// 3. 현재 화면의 이모티콘 하나 삭제
// 2번에 의해서 1000이 넘는 숫자는 들어가지 않기 때문에,
// 1보다 큰지만 확인하면 된다.
if(t.cnt > 1 && !dp[t.cnt - 1][t.clip]){
Q.push({t.cnt - 1, t.clip});
dp[t.cnt-1][t.clip] = true;
}
}
// 연산 시간 증감
cmd_time++;
}
}
// 설명(BFS, DP)
// 메모배열을 잘 활용해야 한다.
// dp[이모지.length][current clip] 형태로 메모이제이션을 해나가면 된다. | [
"xifoxy@gmail.com"
] | xifoxy@gmail.com |
a3e1059bae18d9b1fd958b6f74dc0d1cffebc46f | ac2c7ce45a28c8ceb10d543944db90f6025e8a58 | /src/dc/qm_if.hpp | 6d7f747f1c177ed28f1f40b386fed96f2719974f | [
"MIT",
"BSD-3-Clause",
"Zlib",
"BSL-1.0"
] | permissive | degarashi/revenant | a5997ccc9090690abd03a19e749606c9cdf935d4 | 9e671320a5c8790f6bdd1b14934f81c37819f7b3 | refs/heads/master | 2021-01-11T00:15:06.876412 | 2019-09-08T13:00:26 | 2019-09-08T13:00:26 | 70,564,404 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 469 | hpp | #pragma once
#include "frea/src/matrix.hpp"
#include "spine/src/flyweight_item.hpp"
namespace rev::dc {
using SName = spi::FlyweightItem<std::string>;
using Mat4 = frea::Mat4;
using JointId = uint32_t;
struct IQueryMatrix {
virtual ~IQueryMatrix() {}
virtual Mat4 getLocal(JointId id) const = 0;
virtual Mat4 getGlobal(JointId id) const = 0;
virtual Mat4 getLocal(const SName& name) const = 0;
virtual Mat4 getGlobal(const SName& name) const = 0;
};
}
| [
"slice013@gmail.com"
] | slice013@gmail.com |
0ee55b21a143bdf164e593fa5dd842924c4d0c1f | 0db743b403076f2dd69d4c2ad6573d2afe02694c | /list_remove_duplicates.cpp | 8d71840ddcd3c6107ad375105a24e06e87c65df4 | [] | no_license | AnahitStepanyan/hackerRank | 80c1522a08d2380f9361b159fd09d1b54f720699 | 2da8a81393d068de715055d526ae89c9eb2a3ef6 | refs/heads/main | 2023-02-15T12:29:19.328814 | 2021-01-01T10:53:41 | 2021-01-01T10:53:41 | 316,466,231 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,990 | cpp | #include <cstddef>
#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
class Node
{
public:
int data;
Node *next;
Node(int d){
data=d;
next=NULL;
}
};
class Solution{
public:
Node* removeDuplicates(Node *head)
{
//Write your code here
// works with and without this piece
/* if(!head)
return head;
*/
auto node = head;
while(node->next){
if(node->data == node->next->data){
auto tmp = node->next;
node->next = node->next->next;
delete tmp;
} else {
node = node->next;
}
}
return head;
}
Node* insert(Node *head,int data)
{
Node* p=new Node(data);
if(head==NULL){
head=p;
}
else if(head->next==NULL){
head->next=p;
}
else{
Node *start=head;
while(start->next!=NULL){
start=start->next;
}
start->next=p;
}
return head;
}
void display(Node *head)
{
Node *start=head;
while(start)
{
cout<<start->data<<" ";
start=start->next;
}
}
};
int main()
{
Node* head=NULL;
Solution mylist;
int T,data;
cin>>T;
while(T-->0){
cin>>data;
head=mylist.insert(head,data);
}
head=mylist.removeDuplicates(head);
mylist.display(head);
}
| [
"noreply@github.com"
] | AnahitStepanyan.noreply@github.com |
7bdd9095217b3992b07799a322eeb298f8c8c005 | 5e5429b49ff7f9a248b27aa78ca0a5a8ac5007e4 | /profile.re | f05482f2d0ca58be7480f353be4bc2b18d5af91e | [] | no_license | thinkitcojp/tibooks-maker | 60cad2c02d9b60c4b1e34d58bd24b7e89dcb7a44 | c900a049fb8d17b334b8b584bc6d01e4045c6e1a | refs/heads/master | 2021-09-09T01:19:50.908843 | 2021-09-05T04:40:35 | 2021-09-05T04:40:35 | 46,779,216 | 10 | 0 | null | 2018-06-26T02:40:56 | 2015-11-24T08:57:47 | CSS | UTF-8 | C++ | false | false | 1,710 | re | = 著者紹介
#@# 著者名、所属会社役職、紹介文の3ブロック。スタッフは下寄せで配置
: ★★ ★★
★★★★★
★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
: ★★ ★★
★★★★★
★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
#@# スタッフは下寄せで配置。必要に応じて、改頁を入れた方に変更してください。
#@# @<raw>{|latex|\clearpage\mbox{}\vfill}
@<raw>{|latex|\vfill}
=== スタッフ
* ★★ ★★(表紙デザイン)
* ★★ ★★(紙面レイアウト)
* ★★ ★★(Web連載編集)
| [
"suzuki-n@impress.co.jp"
] | suzuki-n@impress.co.jp |
0b9b6f32122007b3eb9042eddcfe6f4309a0c839 | cf8ddfc720bf6451c4ef4fa01684327431db1919 | /SDK/ARKSurvivalEvolved_E_StegoBackplateMode_functions.cpp | 1cc10ddae2c010754ee31ab194037f2ecb38b031 | [
"MIT"
] | permissive | git-Charlie/ARK-SDK | 75337684b11e7b9f668da1f15e8054052a3b600f | c38ca9925309516b2093ad8c3a70ed9489e1d573 | refs/heads/master | 2023-06-20T06:30:33.550123 | 2021-07-11T13:41:45 | 2021-07-11T13:41:45 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 381 | cpp | // ARKSurvivalEvolved (329.9) SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
#include "ARKSurvivalEvolved_E_StegoBackplateMode_parameters.hpp"
namespace sdk
{
//---------------------------------------------------------------------------
//Functions
//---------------------------------------------------------------------------
}
#ifdef _MSC_VER
#pragma pack(pop)
#endif
| [
"sergey.2bite@gmail.com"
] | sergey.2bite@gmail.com |
e9e1f833432c75f674860145c81aa07a60e297bb | 5ec06dab1409d790496ce082dacb321392b32fe9 | /clients/cpp-qt5/generated/client/OAIOrgApacheSlingCommonsLogLogManagerFactoryWriterInfo.cpp | afabb4f7e0011c805693e4a040ff9f4611f5f101 | [
"Apache-2.0"
] | permissive | shinesolutions/swagger-aem-osgi | e9d2385f44bee70e5bbdc0d577e99a9f2525266f | c2f6e076971d2592c1cbd3f70695c679e807396b | refs/heads/master | 2022-10-29T13:07:40.422092 | 2021-04-09T07:46:03 | 2021-04-09T07:46:03 | 190,217,155 | 3 | 3 | Apache-2.0 | 2022-10-05T03:26:20 | 2019-06-04T14:23:28 | null | UTF-8 | C++ | false | false | 5,225 | cpp | /**
* Adobe Experience Manager OSGI config (AEM) API
* Swagger AEM OSGI is an OpenAPI specification for Adobe Experience Manager (AEM) OSGI Configurations API
*
* OpenAPI spec version: 1.0.0-pre.0
* Contact: opensource@shinesolutions.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
#include "OAIOrgApacheSlingCommonsLogLogManagerFactoryWriterInfo.h"
#include "OAIHelpers.h"
#include <QJsonDocument>
#include <QJsonArray>
#include <QObject>
#include <QDebug>
namespace OpenAPI {
OAIOrgApacheSlingCommonsLogLogManagerFactoryWriterInfo::OAIOrgApacheSlingCommonsLogLogManagerFactoryWriterInfo(QString json) {
init();
this->fromJson(json);
}
OAIOrgApacheSlingCommonsLogLogManagerFactoryWriterInfo::OAIOrgApacheSlingCommonsLogLogManagerFactoryWriterInfo() {
init();
}
OAIOrgApacheSlingCommonsLogLogManagerFactoryWriterInfo::~OAIOrgApacheSlingCommonsLogLogManagerFactoryWriterInfo() {
this->cleanup();
}
void
OAIOrgApacheSlingCommonsLogLogManagerFactoryWriterInfo::init() {
pid = new QString("");
m_pid_isSet = false;
title = new QString("");
m_title_isSet = false;
description = new QString("");
m_description_isSet = false;
properties = new OAIOrgApacheSlingCommonsLogLogManagerFactoryWriterProperties();
m_properties_isSet = false;
}
void
OAIOrgApacheSlingCommonsLogLogManagerFactoryWriterInfo::cleanup() {
if(pid != nullptr) {
delete pid;
}
if(title != nullptr) {
delete title;
}
if(description != nullptr) {
delete description;
}
if(properties != nullptr) {
delete properties;
}
}
OAIOrgApacheSlingCommonsLogLogManagerFactoryWriterInfo*
OAIOrgApacheSlingCommonsLogLogManagerFactoryWriterInfo::fromJson(QString json) {
QByteArray array (json.toStdString().c_str());
QJsonDocument doc = QJsonDocument::fromJson(array);
QJsonObject jsonObject = doc.object();
this->fromJsonObject(jsonObject);
return this;
}
void
OAIOrgApacheSlingCommonsLogLogManagerFactoryWriterInfo::fromJsonObject(QJsonObject pJson) {
::OpenAPI::setValue(&pid, pJson["pid"], "QString", "QString");
::OpenAPI::setValue(&title, pJson["title"], "QString", "QString");
::OpenAPI::setValue(&description, pJson["description"], "QString", "QString");
::OpenAPI::setValue(&properties, pJson["properties"], "OAIOrgApacheSlingCommonsLogLogManagerFactoryWriterProperties", "OAIOrgApacheSlingCommonsLogLogManagerFactoryWriterProperties");
}
QString
OAIOrgApacheSlingCommonsLogLogManagerFactoryWriterInfo::asJson ()
{
QJsonObject obj = this->asJsonObject();
QJsonDocument doc(obj);
QByteArray bytes = doc.toJson();
return QString(bytes);
}
QJsonObject
OAIOrgApacheSlingCommonsLogLogManagerFactoryWriterInfo::asJsonObject() {
QJsonObject obj;
if(pid != nullptr && *pid != QString("")){
toJsonValue(QString("pid"), pid, obj, QString("QString"));
}
if(title != nullptr && *title != QString("")){
toJsonValue(QString("title"), title, obj, QString("QString"));
}
if(description != nullptr && *description != QString("")){
toJsonValue(QString("description"), description, obj, QString("QString"));
}
if((properties != nullptr) && (properties->isSet())){
toJsonValue(QString("properties"), properties, obj, QString("OAIOrgApacheSlingCommonsLogLogManagerFactoryWriterProperties"));
}
return obj;
}
QString*
OAIOrgApacheSlingCommonsLogLogManagerFactoryWriterInfo::getPid() {
return pid;
}
void
OAIOrgApacheSlingCommonsLogLogManagerFactoryWriterInfo::setPid(QString* pid) {
this->pid = pid;
this->m_pid_isSet = true;
}
QString*
OAIOrgApacheSlingCommonsLogLogManagerFactoryWriterInfo::getTitle() {
return title;
}
void
OAIOrgApacheSlingCommonsLogLogManagerFactoryWriterInfo::setTitle(QString* title) {
this->title = title;
this->m_title_isSet = true;
}
QString*
OAIOrgApacheSlingCommonsLogLogManagerFactoryWriterInfo::getDescription() {
return description;
}
void
OAIOrgApacheSlingCommonsLogLogManagerFactoryWriterInfo::setDescription(QString* description) {
this->description = description;
this->m_description_isSet = true;
}
OAIOrgApacheSlingCommonsLogLogManagerFactoryWriterProperties*
OAIOrgApacheSlingCommonsLogLogManagerFactoryWriterInfo::getProperties() {
return properties;
}
void
OAIOrgApacheSlingCommonsLogLogManagerFactoryWriterInfo::setProperties(OAIOrgApacheSlingCommonsLogLogManagerFactoryWriterProperties* properties) {
this->properties = properties;
this->m_properties_isSet = true;
}
bool
OAIOrgApacheSlingCommonsLogLogManagerFactoryWriterInfo::isSet(){
bool isObjectUpdated = false;
do{
if(pid != nullptr && *pid != QString("")){ isObjectUpdated = true; break;}
if(title != nullptr && *title != QString("")){ isObjectUpdated = true; break;}
if(description != nullptr && *description != QString("")){ isObjectUpdated = true; break;}
if(properties != nullptr && properties->isSet()){ isObjectUpdated = true; break;}
}while(false);
return isObjectUpdated;
}
}
| [
"cliffano@gmail.com"
] | cliffano@gmail.com |
1667739fe9d0802fd8a09936f3c180e24202ec9c | 477c8309420eb102b8073ce067d8df0afc5a79b1 | /VTK/Rendering/vtkOverlayPass.h | 06806f1cda07aed2cd2a53bb101b4c58d497e927 | [
"LicenseRef-scancode-paraview-1.2",
"BSD-3-Clause"
] | permissive | aashish24/paraview-climate-3.11.1 | e0058124e9492b7adfcb70fa2a8c96419297fbe6 | c8ea429f56c10059dfa4450238b8f5bac3208d3a | refs/heads/uvcdat-master | 2021-07-03T11:16:20.129505 | 2013-05-10T13:14:30 | 2013-05-10T13:14:30 | 4,238,077 | 1 | 0 | NOASSERTION | 2020-10-12T21:28:23 | 2012-05-06T02:32:44 | C++ | UTF-8 | C++ | false | false | 1,807 | h | /*=========================================================================
Program: Visualization Toolkit
Module: vtkOverlayPass.h
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
// .NAME vtkOverlayPass - Render the overlay geometry with property key
// filtering.
// .SECTION Description
// vtkOverlayPass renders the overlay geometry of all the props that have the
// keys contained in vtkRenderState.
//
// This pass expects an initialized depth buffer and color buffer.
// Initialized buffers means they have been cleared with farest z-value and
// background color/gradient/transparent color.
//
// .SECTION See Also
// vtkRenderPass vtkDefaultPass
#ifndef __vtkOverlayPass_h
#define __vtkOverlayPass_h
#include "vtkDefaultPass.h"
class VTK_RENDERING_EXPORT vtkOverlayPass : public vtkDefaultPass
{
public:
static vtkOverlayPass *New();
vtkTypeMacro(vtkOverlayPass,vtkDefaultPass);
void PrintSelf(ostream& os, vtkIndent indent);
//BTX
// Description:
// Perform rendering according to a render state \p s.
// \pre s_exists: s!=0
virtual void Render(const vtkRenderState *s);
//ETX
protected:
// Description:
// Default constructor.
vtkOverlayPass();
// Description:
// Destructor.
virtual ~vtkOverlayPass();
private:
vtkOverlayPass(const vtkOverlayPass&); // Not implemented.
void operator=(const vtkOverlayPass&); // Not implemented.
};
#endif
| [
"aashish.chaudhary@kitware.com"
] | aashish.chaudhary@kitware.com |
b4ca57c9fde8bdee17a2f9779a5949d8fc0ea924 | 46f24bf2f88f19e2de3ddb7bea1d3bb8595f573e | /src/ui/qt/droparea.cpp | 4a7672a6776897b0d218040b7581ffcd7f4beb0c | [
"Zlib",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | magcius/vgmtrans | 2c4e1425813d2b5eb5121f2bb8eccec73c488e51 | 8e34ddc2fb43948dc1e1a8759c739a0c1c7b62d7 | refs/heads/siiva | 2022-12-26T07:13:31.757552 | 2017-06-19T15:40:26 | 2017-06-19T15:40:26 | 77,760,514 | 32 | 7 | NOASSERTION | 2022-12-09T14:59:57 | 2017-01-01T00:28:44 | C++ | UTF-8 | C++ | false | false | 4,179 | cpp |
/****************************************************************************
**
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the examples of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
**
** "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 Digia Plc and its Subsidiary(-ies) nor the names
** of its contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** 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."
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include "droparea.h"
#include <QDragEnterEvent>
#include <QMimeData>
//! [DropArea constructor]
DropArea::DropArea(QWidget *parent)
: QLabel(parent)
{
setMinimumSize(200, 200);
setFrameStyle(QFrame::Sunken | QFrame::StyledPanel);
setAlignment(Qt::AlignCenter);
setAcceptDrops(true);
setAutoFillBackground(true);
clear();
}
//! [DropArea constructor]
//! [dragEnterEvent() function]
void DropArea::dragEnterEvent(QDragEnterEvent *event)
{
setText(tr("<drop content>"));
setBackgroundRole(QPalette::Highlight);
event->acceptProposedAction();
emit changed(event->mimeData());
}
//! [dragEnterEvent() function]
//! [dragMoveEvent() function]
void DropArea::dragMoveEvent(QDragMoveEvent *event)
{
event->acceptProposedAction();
}
//! [dragMoveEvent() function]
//! [dropEvent() function part1]
void DropArea::dropEvent(QDropEvent *event)
{
const QMimeData *mimeData = event->mimeData();
//! [dropEvent() function part1]
//! [dropEvent() function part2]
if (mimeData->hasImage()) {
setPixmap(qvariant_cast<QPixmap>(mimeData->imageData()));
} else if (mimeData->hasHtml()) {
setText(mimeData->html());
setTextFormat(Qt::RichText);
} else if (mimeData->hasText()) {
setText(mimeData->text());
setTextFormat(Qt::PlainText);
} else if (mimeData->hasUrls()) {
QList<QUrl> urlList = mimeData->urls();
QString text;
for (int i = 0; i < urlList.size() && i < 32; ++i) {
QString url = urlList.at(i).path();
text += url + QString("\n");
}
setText(text);
} else {
setText(tr("Cannot display data"));
}
//! [dropEvent() function part2]
//! [dropEvent() function part3]
setBackgroundRole(QPalette::Dark);
event->acceptProposedAction();
}
//! [dropEvent() function part3]
//! [dragLeaveEvent() function]
void DropArea::dragLeaveEvent(QDragLeaveEvent *event)
{
clear();
event->accept();
}
//! [dragLeaveEvent() function]
//! [clear() function]
void DropArea::clear()
{
setText(tr("<drop content>"));
setBackgroundRole(QPalette::Dark);
emit changed();
}
//! [clear() function]
| [
"lowin.mike@gmail.com"
] | lowin.mike@gmail.com |
1b26c325b9a4e0a0f05027ae24707dc514bda2cb | b30e2c2bf99d26547b2d42cbb685533ead33a346 | /Source/Reikonoids/Gameplay/RGameMode.cpp | 163201b4eabfb319e21504e53dd50fa9351031ce | [
"MIT"
] | permissive | doanamo/Reikonoids-2020 | 9d7ef5dd26420345f68ef40fbf9bfbec4e63529d | 55496bed915aec8c42048c9257b1050fd360b006 | refs/heads/master | 2022-12-06T22:22:36.078353 | 2020-08-26T09:37:00 | 2020-08-26T09:37:00 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 790 | cpp | #include "RGameMode.h"
#include "RSpawnDirector.h"
#include <Kismet/GameplayStatics.h>
ARGameMode::ARGameMode()
{
SpawnDirector = CreateDefaultSubobject<URSpawnDirector>(TEXT("SpawnDirector"));
}
ARGameMode::~ARGameMode() = default;
void ARGameMode::BeginPlay()
{
Super::BeginPlay();
// Setup spawn director population update.
SpawnDirector->SetupPopulationUpdate(GetWorld());
SpawnDirector->OverrideMinSpawnRadiusOnNextUpdate(600.0f);
}
void ARGameMode::Tick(float DeltaSeconds)
{
Super::Tick(DeltaSeconds);
// Move spawn origin.
APlayerController* PlayerController = UGameplayStatics::GetPlayerController(GetWorld(), 0);
if(APawn* Pawn = PlayerController->GetPawn())
{
SpawnDirector->SetSpawnOrigin(Pawn->GetActorLocation());
}
}
| [
"doanpiotr@gmail.com"
] | doanpiotr@gmail.com |
02b7bd77bd4a8247025156fb6fc2c2e7687d14aa | 1a8f8db68258056f2641d6a7df657f0678806843 | /SkillData.h | 51029c8010577671c69070633cffbd1afa101fc2 | [] | no_license | mdifferent/sanyu_rpg_cocos2dx | bf6d8b4d4b04e830e84676772a1344caecf128c1 | 98c1fb24fa11c3c625d4104fb66d76e6f19bee31 | refs/heads/master | 2020-12-24T16:59:53.172599 | 2014-11-10T02:35:16 | 2014-11-10T02:35:16 | 18,980,902 | 2 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 536 | h | #pragma once
#include "AbstractListItemData.h"
#include <string>
#include <map>
using namespace std;
class SkillData : public AbstractListItemData
{
public:
enum SKILL_TYPE {
RECOVER,
ATTACK,
ENHENCE,
WEAKEN
};
SkillData(int id, string name, TargetType target, bool multi, int cost,SKILL_TYPE type)
:AbstractListItemData(id,name,target,multi),m_cost(cost),m_type(type) {}
~SkillData(){}
SKILL_TYPE getSkillType() const {return m_type;}
int getCost() const {return m_cost;}
private:
int m_cost;
SKILL_TYPE m_type;
}; | [
"mdifferent@163.com"
] | mdifferent@163.com |
96e33e6916bf1454258cccb6811b14ae6a3e9a88 | 42c9ec95e477c545848c750ad3d0486a0bc1b0ee | /Collection/List.hpp | d9b3ddbfe9b75bdf1951c6f91a16fdec144ebaae | [] | no_license | matbuster/cppframework | de88af6d4cd0e947885ad8e445ef9f37815a141d | f806781c40cb5893a1efc9a91e4853d79e085749 | refs/heads/master | 2021-01-18T23:45:35.562292 | 2017-08-04T09:12:53 | 2017-08-04T09:12:53 | 55,763,111 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,005 | hpp | /**
* \file List.hpp
* \date 04/11/2015
* \author MAT
*/
#ifndef LIST_H
#define LIST_H
#include <stdlib.h>
#include <list>
#include <exception>
namespace Collection {
/** class list definition using std
* template cannot beemented in cpp. fusionning cpp and h is the solution
* to compile project*/
template <typename T>
class List {
private:
/** internal list of typename element */
std::list<T> * m_list;
public:
// ----------------------------------------------------------------------
/** constructor and destructor */
List() {
m_list = new std::list<T>();
}
~List() {
m_list->clear();
delete m_list;
}
// ----------------------------------------------------------------------
/** Gets the number of elements contained in the List<T>. */
int Count() {
return (int)m_list->size();
}
// ----------------------------------------------------------------------
/** get the max capacity of the element */
int getMaxCapacity() {
return (int)m_list->max_size();
}
// ----------------------------------------------------------------------
/** Adds an object to the end of the List<T>
* param [in] item Type: T, The object to be added to the end of the List<T>. The value can be null for reference types.
*/
void Add(T _item) {
if(NULL != m_list)
{
m_list->push_back(_item);
}
}
// ----------------------------------------------------------------------
/** Adds the elements of the specified collection to the end of the List<T>.
* \param [in] collection : Type: System.Collections.Generic.IEnumerable<T>
* The collection whose elements should be added to the end of the List<T>. The collection itself cannot be null, but it can contain elements that are null, if type T is a reference type.
*/
void AddRange(List<T> collection) {
for(int i = 0; i<collection->Count(); i++) {
this->Add(collection->getItem(i));
}
}
// ----------------------------------------------------------------------
/** Inserts an element into the List<T> at the specified index. */
void Insert(int _iIndex, T _item) {
int iCounter = 0;
for( typename std::list<T>::iterator it = m_list->begin(); it != m_list->end(); it++)
{
if(_iIndex == iCounter) {
m_list->insert(it, _item);
return it;
}
iCounter++;
}
}
// ----------------------------------------------------------------------
// ----------------------------------------------------------------------
/** Removes all elements from the List<T> */
void Clear() {
if(NULL != m_list)
{
m_list->clear();
}
}
// ----------------------------------------------------------------------
// ----------------------------------------------------------------------
/** function to remove a specific element from the List<T> */
void Remove(int _index)
{
if(_index < 0 || _index > this->Count())
throw std::exception();
int iCounter = 0;
for( typename std::list<T>::iterator it = m_list->begin(); it != m_list->end(); it++)
{
if(_index == iCounter) {
m_list->erase(it);
return;
}
iCounter++;
}
throw std::exception();
}
// ----------------------------------------------------------------------
/** function to delete all element of collection */
void DeleteAll()
{
for(int i = (m_list->size()-1); i >= 0;i--)
{
m_list->pop_back();
}
}
// ----------------------------------------------------------------------
/** function to get the item corresponding to the index */
T getItem(int _index) {
if(_index < 0 || _index > this->Count())
throw std::exception();
int iCounter = 0;
for( typename std::list<T>::iterator it = m_list->begin(); it != m_list->end(); it++)
{
if(_index == iCounter) {
return *it;
}
iCounter++;
}
throw std::exception();
}
// ----------------------------------------------------------------------
};
};
#endif /* LIST_H */ | [
"m.abet@galitt.com"
] | m.abet@galitt.com |
5382236de641656adc67168224f55c40758c84e1 | d2f493f794151b2f0b927617b10f0f9338572ff0 | /SPOJ/PTIT135I.cpp | 5863e7f619b1f834796999a652356a7ce1beac97 | [] | no_license | hungnt61h/PTIT-Algorithms | 320aa078216fc17203ec7f14d70fbfa8a577e2a1 | d53786a87a0b0a8fe2efbbaaf886f835a0d27f34 | refs/heads/master | 2020-03-07T22:46:24.188916 | 2018-04-07T06:39:43 | 2018-04-07T06:39:43 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 490 | cpp | #include <iostream>
#include <string>
using namespace std;
void readNumber(string str) {
int length = str.length();
int count = 1;
string result = "";
for (int i = 0; i < length; i++) {
if (str[i] == str[i+1])
count++;
else {
cout<<count<<str[i];
count = 1;
}
}
}
int main() {
int n;
cin>>n;
fflush(stdin);
string test;
for (int i = 0; i < n; i++) {
cin>>test;
readNumber(test);
if (i != n-1)
cout<<endl;
}
return 0;
}
| [
"noreply@github.com"
] | hungnt61h.noreply@github.com |
d86fb885289a3b6322ba90ee6d3acd714b6eff29 | 1d9b4180e79e98033bb913c3dd69761a4c9cac5e | /Homework/HW1/Set.cpp | 4021dcaee14378986354f2147c925c858fce3b59 | [] | no_license | auszhang/cs32 | b3554bac2ba5c936115aac524869525c3ccca394 | 4cfcb5115b6ff60a48628483e2facacb517d3d3f | refs/heads/master | 2021-04-28T20:36:28.460247 | 2018-05-17T21:22:56 | 2018-05-17T21:22:56 | 121,929,926 | 0 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 1,741 | cpp | #include "Set.h"
Set::Set()
{
// Create an empty set.
m_size = 0;
}
bool Set::empty() const
{
if (m_size > 0)
return false;
return true;
}
int Set::size() const
{
return m_size;
}
bool Set::insert(const ItemType& value)
{
if (m_size > DEFAULT_MAX_ITEMS)
return false;
//checks if value is already present
for (int i = 0; i < size(); i++) {
if (value == m_set[i])
return false;
}
//inserts value and returns true
m_set[m_size] = value;
m_size++;
return true;
}
bool Set:: erase(const ItemType& value)
{
bool result = false;
for (int i = 0; i < size(); i++) {
if (value == m_set[i]) {
for (int j = i; j < size(); j++)
m_set[j] = m_set[j + 1];
m_size--;
result = true;
}
}
return result;
}
bool Set::contains(const ItemType& value) const
{
for (int i = 0; i < size(); i++) {
if (value == m_set[i])
return true;
}
return false;
}
bool Set::get(int i, ItemType& value) const
{
ItemType sortedArray[DEFAULT_MAX_ITEMS];
int counter = 0;
ItemType placeholder;
//sorts the original set
for (int j= 0; j < size(); j++) {
counter = 0;
for (int k = 0; k < size(); k++) {
if (m_set[j] > m_set[k])
counter++;
}
sortedArray[counter] = m_set[j];
}
//finds the desired value
if (i >= 0 && i < size()) {
value = sortedArray[i];
return true;
}
return false;
}
void Set::swap(Set& other)
{
//create temporary array and temporary size for switching
int tempSize;
ItemType tempArray[DEFAULT_MAX_ITEMS];
//switch sizes
tempSize = m_size;
m_size = other.m_size;
other.m_size = tempSize;
//switch array contents
for (int i = 0; i < DEFAULT_MAX_ITEMS; i++) {
tempArray[i] = m_set[i];
m_set[i] = other.m_set[i];
other.m_set[i] = tempArray[i];
}
}
| [
"aus.zhang@gmail.com"
] | aus.zhang@gmail.com |
a16e4d66bc387f829166f6781cae60b61e978ea1 | 877fff5bb313ccd23d1d01bf23b1e1f2b13bb85a | /app/src/main/cpp/dir521/dir3871/dir4221/dir4598/file4743.cpp | 50d8083329af5962e836227005e4b1077a0bb5db | [] | no_license | tgeng/HugeProject | 829c3bdfb7cbaf57727c41263212d4a67e3eb93d | 4488d3b765e8827636ce5e878baacdf388710ef2 | refs/heads/master | 2022-08-21T16:58:54.161627 | 2020-05-28T01:54:03 | 2020-05-28T01:54:03 | 267,468,475 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 111 | cpp | #ifndef file4743
#error "macro file4743 must be defined"
#endif
static const char* file4743String = "file4743"; | [
"tgeng@google.com"
] | tgeng@google.com |
073aea6d2fb3ec65f67d24a9bcc8054ebba5b2b4 | 55246006e3d95a5357f32be0361062c7c6084f8e | /src/subtract.cpp | 57cd44c07a825879a305f31f463100f21dc410e4 | [] | no_license | jsandham/hello-world | c1bdaaef9ad165ef87a1b2f4466344ffdfe168c0 | a2851b971ceff00aef71698137b682db284ce901 | refs/heads/master | 2022-01-04T15:39:02.129853 | 2020-01-19T18:32:59 | 2020-01-19T18:32:59 | 111,231,983 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 52 | cpp | float subtract(float x, float y)
{
return x - y;
}
| [
"jsandham@uwaterloo.ca"
] | jsandham@uwaterloo.ca |
696cc4abcf1e5e89bf90673d2eb0d32360b748b3 | b940a160ad0bd3a7211087158a0343893264dedb | /include/definitions.hpp | a6340ca3e09dddccf5d2733065d45c0c55e23a7e | [] | no_license | vctrodrigues/Windows-Manager | a52197e6a6b5ce0577993520e36b361351e92c91 | 95dcadc3436104394abeaa2f80262a11d123779c | refs/heads/master | 2021-10-28T10:32:03.221027 | 2019-04-23T15:36:25 | 2019-04-23T15:36:25 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 433 | hpp | #ifndef DEFINITIONS_H
#define DEFINITIONS_H
#include <string.h>
typedef struct coordinates Coordinates;
struct coordinates
{
int x;
int y;
};
typedef struct window Window;
struct window
{
std::string ID;
Coordinates p1[2];
Coordinates p2[2];
int zIndex;
};
typedef struct wList WindowList;
struct wList
{
Window list[200];
};
typedef struct cList CoordinatesList;
struct cList
{
Coordinates list[100];
};
#endif | [
"victorvieira89@gmail.com"
] | victorvieira89@gmail.com |
8f2067e1b08a2ec5740ff43da751887569c01bf7 | 6e5b06b17cd7de6ee16e37520a77bdd5de4f3a41 | /src/QCandidatePatchScrollArea.h | a96842d769ea2934c4c0edcb31f8a576094ca7fa | [] | no_license | TaiManProject/Dirks_Code_V3 | 243d7e35df21eb8621c0be752fcd7251bc77d84e | 0f208d4ac1febba681a496af423b2445824c6127 | refs/heads/master | 2020-05-26T07:50:24.919282 | 2014-09-22T15:12:07 | 2014-09-22T15:12:07 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 295 | h | #ifndef CANDIDATEPATCHSCROLLAREA_H
#define CANDIDATEPATCHSCROLLAREA_H
#include <QScrollArea>
class CandidatePatchScrollArea : public QScrollArea
{
Q_OBJECT
public:
CandidatePatchScrollArea(QWidget *parent);
~CandidatePatchScrollArea();
private:
};
#endif // CANDIDATEPATCHSCROLLAREA_H
| [
"carltonchanhku@gmail.com"
] | carltonchanhku@gmail.com |
c9e40a4c214237e71b80bdbb4baa3b134e111396 | b0e18a4b0e7bb7da4cbdb281a2b248795357daa8 | /game002/Game.cpp | 0f73955c37b99c87dbf3e95f9ee7b3235e8dc040 | [] | no_license | Mumei437/Number002 | 35158583aefc84ab2b553765cd96f6d127d2ab9d | 407ef6f2876cf3c60d64803dcad1ea377deff5e9 | refs/heads/master | 2023-04-04T02:04:40.713431 | 2021-04-15T01:53:50 | 2021-04-15T01:53:50 | 358,093,266 | 0 | 0 | null | null | null | null | SHIFT_JIS | C++ | false | false | 7,481 | cpp | #include "Game.h"
#include<cstdio>
#include<cstdlib>
#define WINWIDTH 1024
#define WINHEIGHT 800
Game::Game()
:
mWindow{ nullptr },
mIsEnd{ false },
PlayerVector{ 0,0 },
IsPressed{ true },
PlayerPos{ 0,0 },
mIsRestart{false},
mTicksCount{0}
{
if (SDL_Init(SDL_INIT_VIDEO) != 0)
{
printf("SDLライブラリの初期化に失敗しました。:%s\n", SDL_GetError());
exit(EXIT_FAILURE);
}
mWindow = SDL_CreateWindow(
"First Window",
100,
100,
WINWIDTH,
WINHEIGHT,
0
);
if (!mWindow)
{
printf("ウィンドウの作成に失敗しました。:%s\n", SDL_GetError());
exit(EXIT_FAILURE);
}
mRenderer = SDL_CreateRenderer(
mWindow,
-1,
SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC
);
if (!mRenderer)
{
printf("レンダラーの作成に失敗しました。:%s\n", SDL_GetError());
exit(EXIT_FAILURE);
}
//ファイルデータの読み込み
char* buffer = nullptr;
int size = 0;
ReadFile("stageData03.txt", &buffer, size);
int height = FindChar(buffer, '\n');
int width = 0;
int Maxw = 0;
for (int i = 0; buffer[i] != '\0'; i++)
{
if (buffer[i] == '\n')
{
width = (Maxw > width) ? Maxw : width;
Maxw = 0;
}
else
{
switch (buffer[i])
{
case ' ':
case '.':
case'#':
case 'o':
case'p':
case'O':
case 'P':
++Maxw;
break;
default:
break;
}
}
}
mIsTarget.SetSize(width, height);
mObject.SetSize(width, height);
if (mObject.GetWidth() != mIsTarget.GetWidth() || mObject.GetHeight() != mIsTarget.GetHeight())
{
std::cerr << "サイズエラーが発生しました。\n";
exit(EXIT_FAILURE);
}
//座標
int x = 0;
int y = 0;
for (int i = 0; buffer[i] != '\0'; i++)
{
Object o = OBJ_UNNKOWN;
bool b = false;
//ステージデータの読み込みとその情報の取得
switch (buffer[i])
{
case ' ':
o = OBJ_SPACE;
b = false;
break;
case '.':
o = OBJ_SPACE;
b = true;
break;
case'#':
o = OBJ_WALL;
b = false;
break;
case 'o':
o = OBJ_BLOCK;
b = false;
break;
case'p':
o = OBJ_PLAYER;
b = false;
break;
case'O':
o = OBJ_BLOCK;
b = true;
break;
case 'P':
o = OBJ_PLAYER;
b = true;
break;
default:
//何もしない
break;
}
if (o != OBJ_UNNKOWN)
{
if ((0 <= x && x < mObject.GetWidth()) && (0 <= y && y < mObject.GetHeight()))
{
mObject(x, y) = o;
mIsTarget(x, y) = b;
x++;
if (mObject.GetWidth() <= x)
{
x = 0;
y++;
}
}
}
}
delete[] buffer;
}
Game::~Game()
{
SDL_DestroyWindow(mWindow);
SDL_DestroyRenderer(mRenderer);
SDL_Quit();
}
int kame = 0;
void Game::Input()
{
SDL_Event event;
PlayerVector = { 0,0 };
if (SDL_PollEvent(&event))
{
switch (event.type)
{
case SDL_QUIT:
mIsEnd = true;
break;
case SDL_KEYDOWN:
if (IsPressed)
{
printf("%d\n",++kame);
const Uint8* KeyState = SDL_GetKeyboardState(NULL);
if (KeyState[SDL_SCANCODE_ESCAPE])
{
mIsEnd = true;
}
if (KeyState[SDL_SCANCODE_A])
{
PlayerVector.x -= 1;
}
if (KeyState[SDL_SCANCODE_D])
{
PlayerVector.x += 1;
}
if (KeyState[SDL_SCANCODE_W])
{
PlayerVector.y -= 1;
}
if (KeyState[SDL_SCANCODE_S])
{
PlayerVector.y += 1;
}
if (KeyState[SDL_SCANCODE_R])
{
mIsRestart = true;
}
IsPressed = false;
}
break;
case SDL_KEYUP:
IsPressed = true;
break;
}
}
}
void Game::Update()
{
while (!SDL_TICKS_PASSED(SDL_GetTicks(), mTicksCount + 16));
float deltaTime = (SDL_GetTicks() - mTicksCount) / 1000.0f;
if (deltaTime > 0.05f)
{
deltaTime = 0.05f;
}
//プレイヤーの座標検索
int y = 0;
int x = 0;
for (y = 0; y < mObject.GetHeight(); y++)
{
for (x = 0; x < mObject.GetWidth(); x++)
{
if (mObject(x, y) == OBJ_PLAYER)
{
goto _BREAK;
}
}
}
_BREAK:
//次のプレイヤーの座標
int ty = y + PlayerVector.y ;
int tx = x + PlayerVector.x ;
if (x != tx || y != ty)
{
//幅、高さを超えていないかチェック
if ((ty < 0 || mObject.GetHeight() <= ty) || (tx < 0 || mObject.GetWidth() <= tx))
{
return;
}
//壁にぶつかっていないかチェック
else if (mObject(tx,ty) == OBJ_WALL)
{
return;
}
//次の座標がブロックである場合
else if (mObject(tx, ty) == OBJ_BLOCK)
{
//ブロックの押された場合の座標
int bx = tx + PlayerVector.x;
int by = ty + PlayerVector.y;
//ブロックが幅、高さを超えていないかチェック
if ((by < 0 || mObject.GetHeight() <= by) || (bx < 0 || mObject.GetWidth() <= bx))
{
return;
}
//ブロックが壁にぶつかっていないかチェック
if (mObject(bx, by) == OBJ_WALL|| mObject(bx, by) == OBJ_BLOCK)
{
return;
}
//移動処理
else
{
mObject(bx, by) = OBJ_BLOCK;
mObject(tx, ty) = OBJ_PLAYER;
mObject(x, y) = OBJ_SPACE;
}
}
//移動処理
else
{
mObject(tx, ty) = OBJ_PLAYER;
mObject(x, y) = OBJ_SPACE;
}
}
}
void Game::Output()
{
SDL_SetRenderDrawColor(mRenderer, 0, 0, 0, 255);
SDL_RenderClear(mRenderer);
/*ここから描画*/
for (int y = 0; y < mObject.GetHeight(); y++)
{
for (int x = 0; x < mObject.GetWidth(); x++)
{
char c = NULL;
switch (mObject(x, y))
{
case OBJ_SPACE:
c = (mIsTarget(x,y)) ? '.' : ' ';
if (mIsTarget(x, y))
{
SDL_SetRenderDrawColor(mRenderer, 0, 0, 255, 255);
}
else
{
SDL_SetRenderDrawColor(mRenderer, 0, 0, 0, 255);
}
break;
case OBJ_WALL:
c = (mIsTarget(x, y)) ? '#' : '#';
if (mIsTarget(x, y))
{
SDL_SetRenderDrawColor(mRenderer, 255, 255, 255, 255);
}
else
{
SDL_SetRenderDrawColor(mRenderer, 255, 255, 255, 255);
}
break;
case OBJ_BLOCK:
c = (mIsTarget(x, y)) ? 'O' : 'o';
if (mIsTarget(x, y))
{
SDL_SetRenderDrawColor(mRenderer, 0, 255, 255, 255);
}
else
{
SDL_SetRenderDrawColor(mRenderer, 0, 255, 0, 255);
}
break;
case OBJ_PLAYER:
c = (mIsTarget(x, y)) ? 'P' : 'p';
if (mIsTarget(x, y))
{
SDL_SetRenderDrawColor(mRenderer, 255, 0, 255, 255);
}
else
{
SDL_SetRenderDrawColor(mRenderer, 255, 0, 0, 255);
}
break;
default:
//何もしない
continue;
break;
}
//cに何も入っていない(初期のNULLのままの)場合以外は出力
if (c != NULL)
{
printf("%c", c);
}
DrawBox(x, y, WINWIDTH / mObject.GetWidth(), WINHEIGHT / mObject.GetHeight());
}
//幅全てを行ったら改行
printf("\n");
}
/**/
SDL_RenderPresent(mRenderer);
}
bool Game::IsClear()
{
//全てのゴールにブロックが乗っていない場合はfalseそれ以外はtrue
for (int y = 0; y < mObject.GetHeight(); y++)
{
for (int x = 0; x < mObject.GetWidth(); x++)
{
if (mIsTarget(x, y) == true)
{
if (mObject(x, y) != OBJ_BLOCK)
{
return false;
}
}
}
}
return true;
}
bool Game::GetIsEnd()
{
return mIsEnd;
}
bool Game::GetIsRestart()
{
return mIsRestart;
}
void Game::DrawBox(int x, int y, int width, int height)
{
if (width > height)
{
width = height;
}
else if (height > width)
{
height = width;
}
SDL_Rect Box{
x+(x * width),
y+(y * height),
width,
height,
};
SDL_RenderFillRect(mRenderer, &Box);
}
| [
"mumeii452@gmail.com"
] | mumeii452@gmail.com |
39b3f0d8dcec02dfc1c12121a093f5fe8f6df834 | b3424a31386b84e0c3acd5918fe1315d9f0725a9 | /src/HardWareDevice.cpp | b4b01d02ac6e67b59a5c9730dfa7dc540e6ee2c1 | [] | no_license | EulerCauchyEquation/2018.11.28_FaceRecognition-Doorlock | a5803f48f0f62bdd3a10fad6c36454867386a0e9 | 6125d9a2e92b5f3727012aa7fa03e8f4f4c89c59 | refs/heads/master | 2020-04-22T10:09:19.002450 | 2019-09-16T07:44:43 | 2019-09-16T07:44:43 | 170,295,367 | 14 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 6,901 | cpp |
#include "HardWareDevice.h"
#include "HardWare.h"
#include "getDiffTime.hpp"
int Motor::motorState = OPEN; // 모터 상태 기억 변수
/* @.하드웨어 초기화 */
void HardWareDevice::init(){
// 라이브러리 초기화
if (wiringPiSetup() == -1)
return;
// 초음파 echo trig
pinMode(ECHO, INPUT);
pinMode(TRIG, OUTPUT);
// motor 정방향, 역방향
pinMode(MOTOR_FORWARD, OUTPUT);
pinMode(MOTOR_REVERSE, OUTPUT);
// 버튼
// rbutton = 등록버튼, dbutton = 문 닫는 버튼
pinMode(DBUTTON, INPUT);
pullUpDnControl(DBUTTON,PUD_UP);
pinMode(RBUTTON, INPUT);
pullUpDnControl(RBUTTON,PUD_UP);
// 부저
softToneCreate(BUZZER);
// LED
pinMode(REDLED, OUTPUT);
pinMode(GREENLED, OUTPUT);
for(int i = 0; i<3 ;i++) {
digtWrite(REDLED, HIGH);
digtWrite(GREENLED, HIGH);
usleep(200000);
digtWrite(REDLED, LOW);
digtWrite(GREENLED, LOW);
usleep(200000);
}
usleep(1000000);
digtWrite(REDLED, HIGH);
digtWrite(GREENLED, LOW);
// 고주파 필터링 변수
top = 0; // 배열 위치
thresholds = (int) (FILTER_SIZE * 0.5); // 사람이 다가왔을 때 유효 한계치
dThresholds = (int) (FILTER_SIZE * 0.3); // 사람이 없을 때 유효 한계치
isClose = true; // 사람이 앞에 있는지 여부
setArrDist(); // 배열 데이터 초기화
}
/* @.근접센서로 Distance값 얻기 */
int HardWareDevice::getDist() {
float d, e;
// <1>.초음파 발생
digitalWrite(TRIG, LOW);
delayMicroseconds(2);
digitalWrite(TRIG, HIGH);
delayMicroseconds(5);
digitalWrite(TRIG, LOW);
// <2>.TRIG == LOW
// 초음파가 되돌아오지 못할 경우 무한 루프가 빠지는 문제가 생겨
// 제한시간을 두어 무한루프 현상 제거 ( 제한시간 200ms)
bool error = false;
double c1 = getTickCount();
double t1;
while (digitalRead(ECHO) == LOW) {
s = micros();
t1 = ((getTickCount() - c1) / getTickFrequency()) * 1000;
if( t1 > 200.0 ) {
error = true;
break;
}
}
//cout << " s " << s;
// <2>.초음파 되돌아옴
// 기다리는 시간 10ms 으로 제한 (10ms이면 충분 / 맥스치 : 182ms)
double c = getTickCount();
double t;
while (digitalRead(ECHO) == HIGH) {
e = micros();
t = ((getTickCount() - c) / getTickFrequency()) * 1000;
if( t > 10.0 ) break;
}
t = ((getTickCount() - c) / getTickFrequency()) * 1000;
//cout << " e " << e << endl;
// <3>.보정 필터
// 에러 값은 버린다.
if(error) d = 3000;
else d = (e - s) / 58;
s = e; // s 값을 기억해놓고 사용. 이렇게 안 하면 dist = -무한대 값이 발생
//cout << "dist : " << d << endl;
usleep(1000);
return d;
}
/* @.고주파 필터링 함수 */
// 사람이 다가와도 바로 켜지는 것이 아니고 dist가 어느 정도
// 쌓여서 비율이 높아지면 카메라 가동. 반대도 마찬가지
bool HardWareDevice::addArrDist(double dist) {
// 비율 계산 변수
int closeRate = 0;
// <1>.dist값을 받을 때마다 갱신하고 가장 오래된 값은 버린다.
if( top > FILTER_SIZE - 1) top = 0;
data[top] = dist;
top++;
// <2>.탐색하여 기준치 이상인 값들 카운트
for(int i = 0 ; i < FILTER_SIZE ; i++) {
//cout << data[i] << " ";
if (data[i] < FILTER_DIST_THRESHOLDS) {
closeRate++;
}
}
//cout << closeRate;
// <3>. 판단
// thresholds면 사람이 다가왔다. dThresholds면 앞에 사람이 없다.
if( closeRate > thresholds ) isClose = true;
else if( closeRate < dThresholds) isClose = false;
//cout << " "<< isClose << endl;
return isClose;
}
void HardWareDevice::initMotor(int flag){
if(flag == MOTOR_FORWARD) {
digitalWrite(MOTOR_REVERSE, LOW);
usleep(350000);
digitalWrite(MOTOR_REVERSE, HIGH);
usleep(100000);
}
else {
digitalWrite(MOTOR_FORWARD, LOW);
usleep(350000);
digitalWrite(MOTOR_FORWARD, HIGH);
usleep(100000);
}
}
/* @.모터 하드웨어 */
Motor::Motor(int f) : flag(f) {
}
int Motor::run(void){
// 도어락 해제 (HIGH)
if(flag == MOTOR_FORWARD ) {
// 도어락이 잠겨있을 때만 해제
if( Motor::motorState != OPEN ) {
digitalWrite(MOTOR_REVERSE, LOW);
usleep(350000);
digitalWrite(MOTOR_REVERSE, HIGH);
usleep(100000);
pthread_mutex_lock(&HardWare::hwMutex);
Motor::motorState = OPEN;
pthread_mutex_unlock(&HardWare::hwMutex);
}
}
// 도어락 잠금 (LOW)
else if(flag == MOTOR_REVERSE ) {
// 도어락이 열려있을 때만 잠금
if( Motor::motorState != CLOSE ) {
digitalWrite(MOTOR_FORWARD, LOW);
usleep(350000);
digitalWrite(MOTOR_FORWARD, HIGH);
usleep(100000);
pthread_mutex_lock(&HardWare::hwMutex);
Motor::motorState = CLOSE;
pthread_mutex_unlock(&HardWare::hwMutex);
}
}
this->ThreadClose();
}
/* @.부저 */
Buzzer::Buzzer(int f) : flag(f) {
}
int Buzzer::run(void){
double current, time;
current = getTickCount();
// 문이 열릴 때 멜로디
if( flag == HW_FLAG_PASS ) {
usleep(450000);
softToneWrite(BUZZER, 1567.982);
usleep(200000);
softToneWrite(BUZZER, 0);
usleep(30000);
softToneWrite(BUZZER, 1318.510);
usleep(200000);
softToneWrite(BUZZER, 0);
usleep(30000);
softToneWrite(BUZZER, 1567.982);
usleep(200000);
softToneWrite(BUZZER, 0);
usleep(30000);
softToneWrite(BUZZER, 1975.533);
usleep(200000);
softToneWrite(BUZZER, 0);
usleep(30000);
softToneWrite(BUZZER, 1700);
usleep(200000);
softToneWrite(BUZZER, 0);
}
// 인식 실패시 멜로디
else if( flag == HW_FLAG_WARNING ) {
softToneWrite(BUZZER, 1396.913);
usleep(200000);
softToneWrite(BUZZER, 0);
usleep(250000);
softToneWrite(BUZZER, 1396.913);
usleep(200000);
softToneWrite(BUZZER, 0);
}
// 3회 인식 실패시 멜로디
else if( flag == HW_FLAG_EMERGENCY ) {
for(int i = 0; i<5 ; i++) {
softToneWrite(BUZZER, 1975.533);
usleep(200000);
softToneWrite(BUZZER, 0);
usleep(12000);
softToneWrite(BUZZER, 1760);
usleep(200000);
softToneWrite(BUZZER, 0);
usleep(12000);
softToneWrite(BUZZER, 1661.219);
usleep(200000);
softToneWrite(BUZZER, 0);
usleep(12000);
}
}
else if( flag == HW_FLAG_LOCK ) {
usleep(550000);
softToneWrite(BUZZER, 1975.533);
usleep(120000);
softToneWrite(BUZZER, 0);
usleep(1000);
softToneWrite(BUZZER, 1567.982);
usleep(120000);
softToneWrite(BUZZER, 0);
usleep(1000);
softToneWrite(BUZZER, 1318.510);
usleep(120000);
softToneWrite(BUZZER, 0);
usleep(1000);
softToneWrite(BUZZER, 1174.659);
usleep(120000);
softToneWrite(BUZZER, 0);
usleep(1000);
softToneWrite(BUZZER, 1046.502);
usleep(220000);
softToneWrite(BUZZER, 0);
usleep(1000);
}
time = ((getTickCount() - current) / getTickFrequency()) * 1000;
cout << time << "ms " << endl;
this->ThreadClose();
}
| [
"keplor@naver.com"
] | keplor@naver.com |
4696bc1f1a70ab71310205fbf3bab1fce614f5c3 | 25844df17a7f79911f4481809baba4d9c4f1ad3b | /Expressions/AddExpr.h | fcb7ea25847b4f4f658cfb4f91cd9533d4af9405 | [] | no_license | VladimirVolodya/Pascal_Interpreter | c756599d9a5b9d97834481feba4232e080f01f19 | 8332992b7d3fc9e1d3102db5b1cc746cf6cffde5 | refs/heads/master | 2023-02-24T21:52:38.165018 | 2020-12-24T15:27:10 | 2020-12-24T15:27:10 | 319,766,788 | 0 | 0 | null | 2020-12-24T15:26:22 | 2020-12-08T21:36:07 | C++ | UTF-8 | C++ | false | false | 342 | h | #ifndef PARSEREXAMPLE_ADDEXPR_H
#define PARSEREXAMPLE_ADDEXPR_H
#include "BaseElements/BaseExpr.h"
class AddExpr : public BaseExpr {
public:
AddExpr(BaseExpr* p_lhs, BaseExpr* p_rhs);
BaseExpr* p_lhs;
BaseExpr* p_rhs;
~AddExpr() override;
var_t Accept(Visitor& visitor) override;
};
#endif //PARSEREXAMPLE_ADDEXPR_H
| [
"smirvovn@gmail.com"
] | smirvovn@gmail.com |
e85057239f5c260d2803f9bfd368a51dcfa0cf44 | 9a8f5b459b36815a984ba41ba91670d3d8f659a0 | /ncfspack/source/NcDetector.h | b83ca9f7e1ed3424652d23680c4a28307aed71f7 | [] | no_license | nick-ve/ncfs | 06e86b5d5d55752b406ef41acf6d8b0d38627caf | 580d5e4beb64247dcfcea745ae4701a2b736e0be | refs/heads/master | 2023-07-23T03:19:19.564816 | 2023-07-18T02:49:01 | 2023-07-18T02:49:06 | 87,968,203 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 683 | h | #ifndef NcDetector_h
#define NcDetector_h
// Copyright(c) 1997-2021, NCFS/IIHE, All Rights Reserved.
// See cxx source for full Copyright notice.
#include "NcDetectorUnit.h"
class NcDetector : public NcDetectorUnit
{
public:
NcDetector(const char* name="",const char* title=""); // Default constructor
virtual ~NcDetector(); // Default destructor
NcDetector(const NcDetector& q); // Copy constructor
virtual TObject* Clone(const char* name="") const; // Make a deep copy and provide its pointer
protected:
ClassDef(NcDetector,1) // Creation and investigation of an NCFS generic detector structure.
};
#endif
| [
"nickve.nl@gmail.com"
] | nickve.nl@gmail.com |
6adb39d1058059881217e2ffb16dda312d824741 | eea7adb1221e39e949e9f13b92805f1f63c61696 | /leetcode-05-main/countAndSay.cpp | 14c0f31ac47d6f7f2630e5d3e9cdec9358b78d75 | [] | no_license | zhangchunbao515/leetcode | 4fb7e5ac67a51679f5ba89eed56cd21f53cd736d | d191d3724f6f4b84a66d0917d16fbfc58205d948 | refs/heads/master | 2020-08-02T21:39:05.798311 | 2019-09-28T14:44:14 | 2019-09-28T14:44:14 | 211,514,370 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 689 | cpp | /*
Problem: Count and Say
Method:
Author: 'gq'
*/
#include<iostream>
using namespace std;
class Solution {
public:
string countAndSay(int n) {
if(n<=0)
return "";
int i=1;
string str="1";
while(i<n)
{
string newStr="";
int j=0;
while(j<str.size())
{
char ch=str[j];
int num=0;
while(str[j]==ch){
num++;
j++;
}
newStr+='0'+num;
newStr+=ch;
}
str=newStr;
i++;
}
return str;
}
};
| [
"zhangchunbao515@163.com"
] | zhangchunbao515@163.com |
efa421d7444f11d1178226335ed23bbf8e17eadd | 445af4de326b66b6cd5f40c7abf9879eb45d8689 | /nano/lib/tomlconfig.hpp | 7f349449623939a8ad170ef10e2a623c90a89367 | [
"BSD-3-Clause"
] | permissive | MeowCoinCore/meow-node | e0fe0f5085e7bb9eeb6fd5bf26d00fc15769f750 | edcc4321b7ed5a76426f6c43c29fd67883c547a4 | refs/heads/master | 2023-02-04T03:33:53.198562 | 2020-11-23T08:00:22 | 2020-11-23T08:00:22 | 313,790,883 | 0 | 0 | BSD-3-Clause | 2020-11-22T06:26:32 | 2020-11-18T01:37:51 | C++ | UTF-8 | C++ | false | false | 6,434 | hpp | #pragma once
#include <nano/lib/configbase.hpp>
#include <nano/lib/utility.hpp>
#include <boost/filesystem/path.hpp>
#include <boost/lexical_cast.hpp>
#include <boost/optional.hpp>
#include <cpptoml.h>
namespace boost
{
namespace asio
{
namespace ip
{
class address_v6;
}
}
}
namespace nano
{
class error;
/** Manages a table in a toml configuration table hierarchy */
class tomlconfig : public nano::configbase
{
public:
tomlconfig ();
tomlconfig (std::shared_ptr<cpptoml::table> const & tree_a, std::shared_ptr<nano::error> const & error_a = nullptr);
void doc (std::string const & key, std::string const & doc);
nano::error & read (boost::filesystem::path const & path_a);
nano::error & read (std::istream & stream_overrides, boost::filesystem::path const & path_a);
nano::error & read (std::istream & stream_a);
nano::error & read (std::istream & stream_first_a, std::istream & stream_second_a);
void write (boost::filesystem::path const & path_a);
void write (std::ostream & stream_a) const;
void open_or_create (std::fstream & stream_a, std::string const & path_a);
std::shared_ptr<cpptoml::table> get_tree ();
bool empty () const;
boost::optional<tomlconfig> get_optional_child (std::string const & key_a);
tomlconfig get_required_child (std::string const & key_a);
tomlconfig & put_child (std::string const & key_a, nano::tomlconfig & conf_a);
tomlconfig & replace_child (std::string const & key_a, nano::tomlconfig & conf_a);
bool has_key (std::string const & key_a);
tomlconfig & erase (std::string const & key_a);
std::shared_ptr<cpptoml::array> create_array (std::string const & key, boost::optional<const char *> documentation_a);
void erase_default_values (tomlconfig & defaults_a);
std::string to_string ();
std::string to_string_commented_entries ();
/** Set value for the given key. Any existing value will be overwritten. */
template <typename T>
tomlconfig & put (std::string const & key, T const & value, boost::optional<const char *> documentation_a = boost::none)
{
tree->insert (key, value);
if (documentation_a)
{
doc (key, *documentation_a);
}
return *this;
}
/**
* Push array element
* @param key Array element key. Qualified (dotted) keys are not supported for arrays so this must be called on the correct tomlconfig node.
*/
template <typename T>
tomlconfig & push (std::string const & key, T const & value)
{
if (!has_key (key))
{
auto arr = cpptoml::make_array ();
tree->insert (key, arr);
}
auto arr = tree->get_qualified (key)->as_array ();
arr->push_back (value);
return *this;
}
/**
* Iterate array entries.
* @param key Array element key. Qualified (dotted) keys are not supported for arrays so this must be called on the correct tomlconfig node.
*/
template <typename T>
tomlconfig & array_entries_required (std::string const & key, std::function<void(T)> callback)
{
if (tree->contains_qualified (key))
{
auto items = tree->get_qualified_array_of<T> (key);
for (auto & item : *items)
{
callback (item);
}
}
else
{
conditionally_set_error<T> (nano::error_config::missing_value, false, key);
}
return *this;
}
/** Get optional, using \p default_value if \p key is missing. */
template <typename T>
tomlconfig & get_optional (std::string const & key, T & target, T default_value)
{
get_config (true, key, target, default_value);
return *this;
}
/**
* Get optional value, using the current value of \p target as the default if \p key is missing.
* @return May return nano::error_config::invalid_value
*/
template <typename T>
tomlconfig & get_optional (std::string const & key, T & target)
{
get_config (true, key, target, target);
return *this;
}
/** Return a boost::optional<T> for the given key */
template <typename T>
boost::optional<T> get_optional (std::string const & key)
{
boost::optional<T> res;
if (has_key (key))
{
T target{};
get_config (true, key, target, target);
res = target;
}
return res;
}
/** Get value, using the current value of \p target as the default if \p key is missing. */
template <typename T>
tomlconfig & get (std::string const & key, T & target)
{
get_config (true, key, target, target);
return *this;
}
/**
* Get value of optional key. Use default value of data type if missing.
*/
template <typename T>
T get (std::string const & key)
{
T target{};
get_config (true, key, target, target);
return target;
}
/**
* Get required value.
* @note May set nano::error_config::missing_value if \p key is missing, nano::error_config::invalid_value if value is invalid.
*/
template <typename T>
tomlconfig & get_required (std::string const & key, T & target)
{
get_config (false, key, target);
return *this;
}
template <typename T>
tomlconfig & get_required (std::string const & key, T & target, T const & default_value)
{
get_config (false, key, target, default_value);
return *this;
}
protected:
template <typename T, typename = std::enable_if_t<nano::is_lexical_castable<T>::value>>
tomlconfig & get_config (bool optional, std::string const & key, T & target, T default_value = T ())
{
try
{
if (tree->contains_qualified (key))
{
auto val (tree->get_qualified_as<std::string> (key));
if (!boost::conversion::try_lexical_convert<T> (*val, target))
{
conditionally_set_error<T> (nano::error_config::invalid_value, optional, key);
}
}
else if (!optional)
{
conditionally_set_error<T> (nano::error_config::missing_value, optional, key);
}
else
{
target = default_value;
}
}
catch (std::runtime_error & ex)
{
conditionally_set_error<T> (ex, optional, key);
}
return *this;
}
tomlconfig & get_config (bool optional, std::string const & key, uint8_t & target, uint8_t default_value = uint8_t ());
tomlconfig & get_config (bool optional, std::string const & key, bool & target, bool default_value = false);
tomlconfig & get_config (bool optional, std::string key, boost::asio::ip::address_v6 & target, boost::asio::ip::address_v6 const & default_value);
private:
/** The config node being managed */
std::shared_ptr<cpptoml::table> tree;
/** Compare two stringified configs, remove keys where values are equal */
void erase_defaults (std::shared_ptr<cpptoml::table> base, std::shared_ptr<cpptoml::table> other, std::shared_ptr<cpptoml::table> update_target);
};
}
| [
"noreply@github.com"
] | MeowCoinCore.noreply@github.com |
84a732b068dc04b0cddff39eba68136e6970d2bc | d770007d03c25109c0246943d514f2ebc77ffdb6 | /src/libraries/imgui-glfw/imgui_internal.h | d5882ce3a456c7f185c71571fa821d0e83bab887 | [
"MIT",
"LicenseRef-scancode-public-domain",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | mbaldus/MA_Volumetric_Clouds | f0256ec78e7e034baa04c9673f4a64fe2ff19c92 | 16ea5775e67ba4df776b0c361a1f26df0a6529e7 | refs/heads/master | 2020-03-29T20:06:20.296787 | 2018-09-25T16:28:41 | 2018-09-25T16:28:41 | 150,295,637 | 1 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 47,580 | h | // dear imgui, v1.50
// (internals)
// You may use this file to debug, understand or extend ImGui features but we don't provide any guarantee of forward compatibility!
// Implement maths operators for ImVec2 (disabled by default to not collide with using IM_VEC2_CLASS_EXTRA along with your own math types+operators)
// #define IMGUI_DEFINE_MATH_OPERATORS
#pragma once
#ifndef IMGUI_VERSION
#error Must include imgui.h before imgui_internal.h
#endif
#include <stdio.h> // FILE*
#include <math.h> // sqrtf, fabsf, fmodf, powf, floorf, ceilf, cosf, sinf
#ifdef _MSC_VER
#pragma warning (push)
#pragma warning (disable: 4251) // class 'xxx' needs to have dll-interface to be used by clients of struct 'xxx' // when IMGUI_API is set to__declspec(dllexport)
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-function" // for stb_textedit.h
#pragma clang diagnostic ignored "-Wmissing-prototypes" // for stb_textedit.h
#pragma clang diagnostic ignored "-Wold-style-cast"
#endif
//-----------------------------------------------------------------------------
// Forward Declarations
//-----------------------------------------------------------------------------
struct ImRect;
struct ImGuiColMod;
struct ImGuiStyleMod;
struct ImGuiGroupData;
struct ImGuiSimpleColumns;
struct ImGuiDrawContext;
struct ImGuiTextEditState;
struct ImGuiIniData;
struct ImGuiMouseCursorData;
struct ImGuiPopupRef;
struct ImGuiWindow;
typedef int ImGuiLayoutType; // enum ImGuiLayoutType_
typedef int ImGuiButtonFlags; // enum ImGuiButtonFlags_
typedef int ImGuiTreeNodeFlags; // enum ImGuiTreeNodeFlags_
typedef int ImGuiSliderFlags; // enum ImGuiSliderFlags_
//-------------------------------------------------------------------------
// STB libraries
//-------------------------------------------------------------------------
namespace ImGuiStb
{
#undef STB_TEXTEDIT_STRING
#undef STB_TEXTEDIT_CHARTYPE
#define STB_TEXTEDIT_STRING ImGuiTextEditState
#define STB_TEXTEDIT_CHARTYPE ImWchar
#define STB_TEXTEDIT_GETWIDTH_NEWLINE -1.0f
#include "stb_textedit.h"
} // namespace ImGuiStb
//-----------------------------------------------------------------------------
// Context
//-----------------------------------------------------------------------------
#ifndef GImGui
extern IMGUI_API ImGuiContext* GImGui; // Current implicit ImGui context pointer
#endif
//-----------------------------------------------------------------------------
// Helpers
//-----------------------------------------------------------------------------
#define IM_ARRAYSIZE(_ARR) ((int)(sizeof(_ARR)/sizeof(*_ARR)))
#define IM_PI 3.14159265358979323846f
#define IM_OFFSETOF(_TYPE,_ELM) ((size_t)&(((_TYPE*)0)->_ELM))
// Helpers: UTF-8 <> wchar
IMGUI_API int ImTextStrToUtf8(char* buf, int buf_size, const ImWchar* in_text, const ImWchar* in_text_end); // return output UTF-8 bytes count
IMGUI_API int ImTextCharFromUtf8(unsigned int* out_char, const char* in_text, const char* in_text_end); // return input UTF-8 bytes count
IMGUI_API int ImTextStrFromUtf8(ImWchar* buf, int buf_size, const char* in_text, const char* in_text_end, const char** in_remaining = NULL); // return input UTF-8 bytes count
IMGUI_API int ImTextCountCharsFromUtf8(const char* in_text, const char* in_text_end); // return number of UTF-8 code-points (NOT bytes count)
IMGUI_API int ImTextCountUtf8BytesFromStr(const ImWchar* in_text, const ImWchar* in_text_end); // return number of bytes to express string as UTF-8 code-points
// Helpers: Misc
IMGUI_API ImU32 ImHash(const void* data, int data_size, ImU32 seed = 0); // Pass data_size==0 for zero-terminated strings
IMGUI_API void* ImFileLoadToMemory(const char* filename, const char* file_open_mode, int* out_file_size = NULL, int padding_bytes = 0);
IMGUI_API FILE* ImFileOpen(const char* filename, const char* file_open_mode);
IMGUI_API bool ImIsPointInTriangle(const ImVec2& p, const ImVec2& a, const ImVec2& b, const ImVec2& c);
static inline bool ImCharIsSpace(int c) { return c == ' ' || c == '\t' || c == 0x3000; }
static inline int ImUpperPowerOfTwo(int v) { v--; v |= v >> 1; v |= v >> 2; v |= v >> 4; v |= v >> 8; v |= v >> 16; v++; return v; }
// Helpers: String
IMGUI_API int ImStricmp(const char* str1, const char* str2);
IMGUI_API int ImStrnicmp(const char* str1, const char* str2, int count);
IMGUI_API char* ImStrdup(const char* str);
IMGUI_API int ImStrlenW(const ImWchar* str);
IMGUI_API const ImWchar*ImStrbolW(const ImWchar* buf_mid_line, const ImWchar* buf_begin); // Find beginning-of-line
IMGUI_API const char* ImStristr(const char* haystack, const char* haystack_end, const char* needle, const char* needle_end);
IMGUI_API int ImFormatString(char* buf, int buf_size, const char* fmt, ...) IM_PRINTFARGS(3);
IMGUI_API int ImFormatStringV(char* buf, int buf_size, const char* fmt, va_list args);
// Helpers: Math
// We are keeping those not leaking to the user by default, in the case the user has implicit cast operators between ImVec2 and its own types (when IM_VEC2_CLASS_EXTRA is defined)
#ifdef IMGUI_DEFINE_MATH_OPERATORS
static inline ImVec2 operator*(const ImVec2& lhs, const float rhs) { return ImVec2(lhs.x*rhs, lhs.y*rhs); }
static inline ImVec2 operator/(const ImVec2& lhs, const float rhs) { return ImVec2(lhs.x/rhs, lhs.y/rhs); }
static inline ImVec2 operator+(const ImVec2& lhs, const ImVec2& rhs) { return ImVec2(lhs.x+rhs.x, lhs.y+rhs.y); }
static inline ImVec2 operator-(const ImVec2& lhs, const ImVec2& rhs) { return ImVec2(lhs.x-rhs.x, lhs.y-rhs.y); }
static inline ImVec2 operator*(const ImVec2& lhs, const ImVec2& rhs) { return ImVec2(lhs.x*rhs.x, lhs.y*rhs.y); }
static inline ImVec2 operator/(const ImVec2& lhs, const ImVec2& rhs) { return ImVec2(lhs.x/rhs.x, lhs.y/rhs.y); }
static inline ImVec2& operator+=(ImVec2& lhs, const ImVec2& rhs) { lhs.x += rhs.x; lhs.y += rhs.y; return lhs; }
static inline ImVec2& operator-=(ImVec2& lhs, const ImVec2& rhs) { lhs.x -= rhs.x; lhs.y -= rhs.y; return lhs; }
static inline ImVec2& operator*=(ImVec2& lhs, const float rhs) { lhs.x *= rhs; lhs.y *= rhs; return lhs; }
static inline ImVec2& operator/=(ImVec2& lhs, const float rhs) { lhs.x /= rhs; lhs.y /= rhs; return lhs; }
static inline ImVec4 operator-(const ImVec4& lhs, const ImVec4& rhs) { return ImVec4(lhs.x-rhs.x, lhs.y-rhs.y, lhs.z-rhs.z, lhs.w-rhs.w); }
#endif
static inline int ImMin(int lhs, int rhs) { return lhs < rhs ? lhs : rhs; }
static inline int ImMax(int lhs, int rhs) { return lhs >= rhs ? lhs : rhs; }
static inline float ImMin(float lhs, float rhs) { return lhs < rhs ? lhs : rhs; }
static inline float ImMax(float lhs, float rhs) { return lhs >= rhs ? lhs : rhs; }
static inline ImVec2 ImMin(const ImVec2& lhs, const ImVec2& rhs) { return ImVec2(ImMin(lhs.x,rhs.x), ImMin(lhs.y,rhs.y)); }
static inline ImVec2 ImMax(const ImVec2& lhs, const ImVec2& rhs) { return ImVec2(ImMax(lhs.x,rhs.x), ImMax(lhs.y,rhs.y)); }
static inline int ImClamp(int v, int mn, int mx) { return (v < mn) ? mn : (v > mx) ? mx : v; }
static inline float ImClamp(float v, float mn, float mx) { return (v < mn) ? mn : (v > mx) ? mx : v; }
static inline ImVec2 ImClamp(const ImVec2& f, const ImVec2& mn, ImVec2 mx) { return ImVec2(ImClamp(f.x,mn.x,mx.x), ImClamp(f.y,mn.y,mx.y)); }
static inline float ImSaturate(float f) { return (f < 0.0f) ? 0.0f : (f > 1.0f) ? 1.0f : f; }
static inline float ImLerp(float a, float b, float t) { return a + (b - a) * t; }
static inline ImVec2 ImLerp(const ImVec2& a, const ImVec2& b, const ImVec2& t) { return ImVec2(a.x + (b.x - a.x) * t.x, a.y + (b.y - a.y) * t.y); }
static inline float ImLengthSqr(const ImVec2& lhs) { return lhs.x*lhs.x + lhs.y*lhs.y; }
static inline float ImLengthSqr(const ImVec4& lhs) { return lhs.x*lhs.x + lhs.y*lhs.y + lhs.z*lhs.z + lhs.w*lhs.w; }
static inline float ImInvLength(const ImVec2& lhs, float fail_value) { float d = lhs.x*lhs.x + lhs.y*lhs.y; if (d > 0.0f) return 1.0f / sqrtf(d); return fail_value; }
static inline float ImFloor(float f) { return (float)(int)f; }
static inline ImVec2 ImFloor(ImVec2 v) { return ImVec2((float)(int)v.x, (float)(int)v.y); }
// We call C++ constructor on own allocated memory via the placement "new(ptr) Type()" syntax.
// Defining a custom placement new() with a dummy parameter allows us to bypass including <new> which on some platforms complains when user has disabled exceptions.
#ifdef IMGUI_DEFINE_PLACEMENT_NEW
struct ImPlacementNewDummy {};
inline void* operator new(size_t, ImPlacementNewDummy, void* ptr) { return ptr; }
inline void operator delete(void*, ImPlacementNewDummy, void*) {}
#define IM_PLACEMENT_NEW(_PTR) new(ImPlacementNewDummy(), _PTR)
#endif
//-----------------------------------------------------------------------------
// Types
//-----------------------------------------------------------------------------
enum ImGuiButtonFlags_
{
ImGuiButtonFlags_Repeat = 1 << 0, // hold to repeat
ImGuiButtonFlags_PressedOnClickRelease = 1 << 1, // (default) return pressed on click+release on same item (default if no PressedOn** flag is set)
ImGuiButtonFlags_PressedOnClick = 1 << 2, // return pressed on click (default requires click+release)
ImGuiButtonFlags_PressedOnRelease = 1 << 3, // return pressed on release (default requires click+release)
ImGuiButtonFlags_PressedOnDoubleClick = 1 << 4, // return pressed on double-click (default requires click+release)
ImGuiButtonFlags_FlattenChilds = 1 << 5, // allow interaction even if a child window is overlapping
ImGuiButtonFlags_DontClosePopups = 1 << 6, // disable automatically closing parent popup on press
ImGuiButtonFlags_Disabled = 1 << 7, // disable interaction
ImGuiButtonFlags_AlignTextBaseLine = 1 << 8, // vertically align button to match text baseline - ButtonEx() only
ImGuiButtonFlags_NoKeyModifiers = 1 << 9, // disable interaction if a key modifier is held
ImGuiButtonFlags_AllowOverlapMode = 1 << 10 // require previous frame HoveredId to either match id or be null before being usable
};
enum ImGuiSliderFlags_
{
ImGuiSliderFlags_Vertical = 1 << 0
};
enum ImGuiSelectableFlagsPrivate_
{
// NB: need to be in sync with last value of ImGuiSelectableFlags_
ImGuiSelectableFlags_Menu = 1 << 3,
ImGuiSelectableFlags_MenuItem = 1 << 4,
ImGuiSelectableFlags_Disabled = 1 << 5,
ImGuiSelectableFlags_DrawFillAvailWidth = 1 << 6
};
// FIXME: this is in development, not exposed/functional as a generic feature yet.
enum ImGuiLayoutType_
{
ImGuiLayoutType_Vertical,
ImGuiLayoutType_Horizontal
};
enum ImGuiPlotType
{
ImGuiPlotType_Lines,
ImGuiPlotType_Histogram
};
enum ImGuiDataType
{
ImGuiDataType_Int,
ImGuiDataType_Float,
ImGuiDataType_Float2,
};
enum ImGuiCorner
{
ImGuiCorner_TopLeft = 1 << 0, // 1
ImGuiCorner_TopRight = 1 << 1, // 2
ImGuiCorner_BottomRight = 1 << 2, // 4
ImGuiCorner_BottomLeft = 1 << 3, // 8
ImGuiCorner_All = 0x0F
};
// 2D axis aligned bounding-box
// NB: we can't rely on ImVec2 math operators being available here
struct IMGUI_API ImRect
{
ImVec2 Min; // Upper-left
ImVec2 Max; // Lower-right
ImRect() : Min(FLT_MAX,FLT_MAX), Max(-FLT_MAX,-FLT_MAX) {}
ImRect(const ImVec2& min, const ImVec2& max) : Min(min), Max(max) {}
ImRect(const ImVec4& v) : Min(v.x, v.y), Max(v.z, v.w) {}
ImRect(float x1, float y1, float x2, float y2) : Min(x1, y1), Max(x2, y2) {}
ImVec2 GetCenter() const { return ImVec2((Min.x+Max.x)*0.5f, (Min.y+Max.y)*0.5f); }
ImVec2 GetSize() const { return ImVec2(Max.x-Min.x, Max.y-Min.y); }
float GetWidth() const { return Max.x-Min.x; }
float GetHeight() const { return Max.y-Min.y; }
ImVec2 GetTL() const { return Min; } // Top-left
ImVec2 GetTR() const { return ImVec2(Max.x, Min.y); } // Top-right
ImVec2 GetBL() const { return ImVec2(Min.x, Max.y); } // Bottom-left
ImVec2 GetBR() const { return Max; } // Bottom-right
bool Contains(const ImVec2& p) const { return p.x >= Min.x && p.y >= Min.y && p.x < Max.x && p.y < Max.y; }
bool Contains(const ImRect& r) const { return r.Min.x >= Min.x && r.Min.y >= Min.y && r.Max.x < Max.x && r.Max.y < Max.y; }
bool Overlaps(const ImRect& r) const { return r.Min.y < Max.y && r.Max.y > Min.y && r.Min.x < Max.x && r.Max.x > Min.x; }
void Add(const ImVec2& rhs) { if (Min.x > rhs.x) Min.x = rhs.x; if (Min.y > rhs.y) Min.y = rhs.y; if (Max.x < rhs.x) Max.x = rhs.x; if (Max.y < rhs.y) Max.y = rhs.y; }
void Add(const ImRect& rhs) { if (Min.x > rhs.Min.x) Min.x = rhs.Min.x; if (Min.y > rhs.Min.y) Min.y = rhs.Min.y; if (Max.x < rhs.Max.x) Max.x = rhs.Max.x; if (Max.y < rhs.Max.y) Max.y = rhs.Max.y; }
void Expand(const float amount) { Min.x -= amount; Min.y -= amount; Max.x += amount; Max.y += amount; }
void Expand(const ImVec2& amount) { Min.x -= amount.x; Min.y -= amount.y; Max.x += amount.x; Max.y += amount.y; }
void Reduce(const ImVec2& amount) { Min.x += amount.x; Min.y += amount.y; Max.x -= amount.x; Max.y -= amount.y; }
void Clip(const ImRect& clip) { if (Min.x < clip.Min.x) Min.x = clip.Min.x; if (Min.y < clip.Min.y) Min.y = clip.Min.y; if (Max.x > clip.Max.x) Max.x = clip.Max.x; if (Max.y > clip.Max.y) Max.y = clip.Max.y; }
void Floor() { Min.x = (float)(int)Min.x; Min.y = (float)(int)Min.y; Max.x = (float)(int)Max.x; Max.y = (float)(int)Max.y; }
ImVec2 GetClosestPoint(ImVec2 p, bool on_edge) const
{
if (!on_edge && Contains(p))
return p;
if (p.x > Max.x) p.x = Max.x;
else if (p.x < Min.x) p.x = Min.x;
if (p.y > Max.y) p.y = Max.y;
else if (p.y < Min.y) p.y = Min.y;
return p;
}
};
// Stacked color modifier, backup of modified data so we can restore it
struct ImGuiColMod
{
ImGuiCol Col;
ImVec4 BackupValue;
};
// Stacked style modifier, backup of modified data so we can restore it. Data type inferred from the variable.
struct ImGuiStyleMod
{
ImGuiStyleVar VarIdx;
union { int BackupInt[2]; float BackupFloat[2]; };
ImGuiStyleMod(ImGuiStyleVar idx, int v) { VarIdx = idx; BackupInt[0] = v; }
ImGuiStyleMod(ImGuiStyleVar idx, float v) { VarIdx = idx; BackupFloat[0] = v; }
ImGuiStyleMod(ImGuiStyleVar idx, ImVec2 v) { VarIdx = idx; BackupFloat[0] = v.x; BackupFloat[1] = v.y; }
};
// Stacked data for BeginGroup()/EndGroup()
struct ImGuiGroupData
{
ImVec2 BackupCursorPos;
ImVec2 BackupCursorMaxPos;
float BackupIndentX;
float BackupGroupOffsetX;
float BackupCurrentLineHeight;
float BackupCurrentLineTextBaseOffset;
float BackupLogLinePosY;
bool BackupActiveIdIsAlive;
bool AdvanceCursor;
};
// Per column data for Columns()
struct ImGuiColumnData
{
float OffsetNorm; // Column start offset, normalized 0.0 (far left) -> 1.0 (far right)
//float IndentX;
};
// Simple column measurement currently used for MenuItem() only. This is very short-sighted/throw-away code and NOT a generic helper.
struct IMGUI_API ImGuiSimpleColumns
{
int Count;
float Spacing;
float Width, NextWidth;
float Pos[8], NextWidths[8];
ImGuiSimpleColumns();
void Update(int count, float spacing, bool clear);
float DeclColumns(float w0, float w1, float w2);
float CalcExtraSpace(float avail_w);
};
// Internal state of the currently focused/edited text input box
struct IMGUI_API ImGuiTextEditState
{
ImGuiID Id; // widget id owning the text state
ImVector<ImWchar> Text; // edit buffer, we need to persist but can't guarantee the persistence of the user-provided buffer. so we copy into own buffer.
ImVector<char> InitialText; // backup of end-user buffer at the time of focus (in UTF-8, unaltered)
ImVector<char> TempTextBuffer;
int CurLenA, CurLenW; // we need to maintain our buffer length in both UTF-8 and wchar format.
int BufSizeA; // end-user buffer size
float ScrollX;
ImGuiStb::STB_TexteditState StbState;
float CursorAnim;
bool CursorFollow;
bool SelectedAllMouseLock;
ImGuiTextEditState() { memset(this, 0, sizeof(*this)); }
void CursorAnimReset() { CursorAnim = -0.30f; } // After a user-input the cursor stays on for a while without blinking
void CursorClamp() { StbState.cursor = ImMin(StbState.cursor, CurLenW); StbState.select_start = ImMin(StbState.select_start, CurLenW); StbState.select_end = ImMin(StbState.select_end, CurLenW); }
bool HasSelection() const { return StbState.select_start != StbState.select_end; }
void ClearSelection() { StbState.select_start = StbState.select_end = StbState.cursor; }
void SelectAll() { StbState.select_start = 0; StbState.select_end = CurLenW; StbState.cursor = StbState.select_end; StbState.has_preferred_x = false; }
void OnKeyPressed(int key);
};
// Mouse cursor data (used when io.MouseDrawCursor is set)
struct ImGuiMouseCursorData
{
ImGuiMouseCursor Type;
ImVec2 HotOffset;
ImVec2 Size;
ImVec2 TexUvMin[2];
ImVec2 TexUvMax[2];
};
// Storage for current popup stack
struct ImGuiPopupRef
{
ImGuiID PopupId; // Set on OpenPopup()
ImGuiWindow* Window; // Resolved on BeginPopup() - may stay unresolved if user never calls OpenPopup()
ImGuiWindow* ParentWindow; // Set on OpenPopup()
ImGuiID ParentMenuSet; // Set on OpenPopup()
ImVec2 MousePosOnOpen; // Copy of mouse position at the time of opening popup
ImGuiPopupRef(ImGuiID id, ImGuiWindow* parent_window, ImGuiID parent_menu_set, const ImVec2& mouse_pos) { PopupId = id; Window = NULL; ParentWindow = parent_window; ParentMenuSet = parent_menu_set; MousePosOnOpen = mouse_pos; }
};
// Main state for ImGui
struct ImGuiContext
{
bool Initialized;
ImGuiIO IO;
ImGuiStyle Style;
ImFont* Font; // (Shortcut) == FontStack.empty() ? IO.Font : FontStack.back()
float FontSize; // (Shortcut) == FontBaseSize * g.CurrentWindow->FontWindowScale == window->FontSize()
float FontBaseSize; // (Shortcut) == IO.FontGlobalScale * Font->Scale * Font->FontSize. Size of characters.
ImVec2 FontTexUvWhitePixel; // (Shortcut) == Font->TexUvWhitePixel
float Time;
int FrameCount;
int FrameCountEnded;
int FrameCountRendered;
ImVector<ImGuiWindow*> Windows;
ImVector<ImGuiWindow*> WindowsSortBuffer;
ImGuiWindow* CurrentWindow; // Being drawn into
ImVector<ImGuiWindow*> CurrentWindowStack;
ImGuiWindow* FocusedWindow; // Will catch keyboard inputs
ImGuiWindow* HoveredWindow; // Will catch mouse inputs
ImGuiWindow* HoveredRootWindow; // Will catch mouse inputs (for focus/move only)
ImGuiID HoveredId; // Hovered widget
bool HoveredIdAllowOverlap;
ImGuiID HoveredIdPreviousFrame;
ImGuiID ActiveId; // Active widget
ImGuiID ActiveIdPreviousFrame;
bool ActiveIdIsAlive;
bool ActiveIdIsJustActivated; // Set at the time of activation for one frame
bool ActiveIdAllowOverlap; // Set only by active widget
ImVec2 ActiveIdClickOffset; // Clicked offset from upper-left corner, if applicable (currently only set by ButtonBehavior)
ImGuiWindow* ActiveIdWindow;
ImGuiWindow* MovedWindow; // Track the child window we clicked on to move a window.
ImGuiID MovedWindowMoveId; // == MovedWindow->RootWindow->MoveId
ImVector<ImGuiIniData> Settings; // .ini Settings
float SettingsDirtyTimer; // Save .ini Settings on disk when time reaches zero
ImVector<ImGuiColMod> ColorModifiers; // Stack for PushStyleColor()/PopStyleColor()
ImVector<ImGuiStyleMod> StyleModifiers; // Stack for PushStyleVar()/PopStyleVar()
ImVector<ImFont*> FontStack; // Stack for PushFont()/PopFont()
ImVector<ImGuiPopupRef> OpenPopupStack; // Which popups are open (persistent)
ImVector<ImGuiPopupRef> CurrentPopupStack; // Which level of BeginPopup() we are in (reset every frame)
// Storage for SetNexWindow** and SetNextTreeNode*** functions
ImVec2 SetNextWindowPosVal;
ImVec2 SetNextWindowSizeVal;
ImVec2 SetNextWindowContentSizeVal;
bool SetNextWindowCollapsedVal;
ImGuiSetCond SetNextWindowPosCond;
ImGuiSetCond SetNextWindowSizeCond;
ImGuiSetCond SetNextWindowContentSizeCond;
ImGuiSetCond SetNextWindowCollapsedCond;
ImRect SetNextWindowSizeConstraintRect; // Valid if 'SetNextWindowSizeConstraint' is true
ImGuiSizeConstraintCallback SetNextWindowSizeConstraintCallback;
void* SetNextWindowSizeConstraintCallbackUserData;
bool SetNextWindowSizeConstraint;
bool SetNextWindowFocus;
bool SetNextTreeNodeOpenVal;
ImGuiSetCond SetNextTreeNodeOpenCond;
// Render
ImDrawData RenderDrawData; // Main ImDrawData instance to pass render information to the user
ImVector<ImDrawList*> RenderDrawLists[3];
float ModalWindowDarkeningRatio;
ImDrawList OverlayDrawList; // Optional software render of mouse cursors, if io.MouseDrawCursor is set + a few debug overlays
ImGuiMouseCursor MouseCursor;
ImGuiMouseCursorData MouseCursorData[ImGuiMouseCursor_Count_];
// Widget state
ImGuiTextEditState InputTextState;
ImFont InputTextPasswordFont;
ImGuiID ScalarAsInputTextId; // Temporary text input when CTRL+clicking on a slider, etc.
ImGuiStorage ColorEditModeStorage; // Store user selection of color edit mode
float DragCurrentValue; // Currently dragged value, always float, not rounded by end-user precision settings
ImVec2 DragLastMouseDelta;
float DragSpeedDefaultRatio; // If speed == 0.0f, uses (max-min) * DragSpeedDefaultRatio
float DragSpeedScaleSlow;
float DragSpeedScaleFast;
ImVec2 ScrollbarClickDeltaToGrabCenter; // Distance between mouse and center of grab box, normalized in parent space. Use storage?
char Tooltip[1024];
char* PrivateClipboard; // If no custom clipboard handler is defined
ImVec2 OsImePosRequest, OsImePosSet; // Cursor position request & last passed to the OS Input Method Editor
// Logging
bool LogEnabled;
FILE* LogFile; // If != NULL log to stdout/ file
ImGuiTextBuffer* LogClipboard; // Else log to clipboard. This is pointer so our GImGui static constructor doesn't call heap allocators.
int LogStartDepth;
int LogAutoExpandMaxDepth;
// Misc
float FramerateSecPerFrame[120]; // calculate estimate of framerate for user
int FramerateSecPerFrameIdx;
float FramerateSecPerFrameAccum;
int CaptureMouseNextFrame; // explicit capture via CaptureInputs() sets those flags
int CaptureKeyboardNextFrame;
char TempBuffer[1024*3+1]; // temporary text buffer
ImGuiContext()
{
Initialized = false;
Font = NULL;
FontSize = FontBaseSize = 0.0f;
FontTexUvWhitePixel = ImVec2(0.0f, 0.0f);
Time = 0.0f;
FrameCount = 0;
FrameCountEnded = FrameCountRendered = -1;
CurrentWindow = NULL;
FocusedWindow = NULL;
HoveredWindow = NULL;
HoveredRootWindow = NULL;
HoveredId = 0;
HoveredIdAllowOverlap = false;
HoveredIdPreviousFrame = 0;
ActiveId = 0;
ActiveIdPreviousFrame = 0;
ActiveIdIsAlive = false;
ActiveIdIsJustActivated = false;
ActiveIdAllowOverlap = false;
ActiveIdClickOffset = ImVec2(-1,-1);
ActiveIdWindow = NULL;
MovedWindow = NULL;
MovedWindowMoveId = 0;
SettingsDirtyTimer = 0.0f;
SetNextWindowPosVal = ImVec2(0.0f, 0.0f);
SetNextWindowSizeVal = ImVec2(0.0f, 0.0f);
SetNextWindowCollapsedVal = false;
SetNextWindowPosCond = 0;
SetNextWindowSizeCond = 0;
SetNextWindowContentSizeCond = 0;
SetNextWindowCollapsedCond = 0;
SetNextWindowSizeConstraintRect = ImRect();
SetNextWindowSizeConstraintCallback = NULL;
SetNextWindowSizeConstraintCallbackUserData = NULL;
SetNextWindowSizeConstraint = false;
SetNextWindowFocus = false;
SetNextTreeNodeOpenVal = false;
SetNextTreeNodeOpenCond = 0;
ScalarAsInputTextId = 0;
DragCurrentValue = 0.0f;
DragLastMouseDelta = ImVec2(0.0f, 0.0f);
DragSpeedDefaultRatio = 1.0f / 100.0f;
DragSpeedScaleSlow = 0.01f;
DragSpeedScaleFast = 10.0f;
ScrollbarClickDeltaToGrabCenter = ImVec2(0.0f, 0.0f);
memset(Tooltip, 0, sizeof(Tooltip));
PrivateClipboard = NULL;
OsImePosRequest = OsImePosSet = ImVec2(-1.0f, -1.0f);
ModalWindowDarkeningRatio = 0.0f;
OverlayDrawList._OwnerName = "##Overlay"; // Give it a name for debugging
MouseCursor = ImGuiMouseCursor_Arrow;
memset(MouseCursorData, 0, sizeof(MouseCursorData));
LogEnabled = false;
LogFile = NULL;
LogClipboard = NULL;
LogStartDepth = 0;
LogAutoExpandMaxDepth = 2;
memset(FramerateSecPerFrame, 0, sizeof(FramerateSecPerFrame));
FramerateSecPerFrameIdx = 0;
FramerateSecPerFrameAccum = 0.0f;
CaptureMouseNextFrame = CaptureKeyboardNextFrame = -1;
memset(TempBuffer, 0, sizeof(TempBuffer));
}
};
// Transient per-window data, reset at the beginning of the frame
// FIXME: That's theory, in practice the delimitation between ImGuiWindow and ImGuiDrawContext is quite tenuous and could be reconsidered.
struct IMGUI_API ImGuiDrawContext
{
ImVec2 CursorPos;
ImVec2 CursorPosPrevLine;
ImVec2 CursorStartPos;
ImVec2 CursorMaxPos; // Implicitly calculate the size of our contents, always extending. Saved into window->SizeContents at the end of the frame
float CurrentLineHeight;
float CurrentLineTextBaseOffset;
float PrevLineHeight;
float PrevLineTextBaseOffset;
float LogLinePosY;
int TreeDepth;
ImGuiID LastItemId;
ImRect LastItemRect;
bool LastItemHoveredAndUsable; // Item rectangle is hovered, and its window is currently interactable with (not blocked by a popup preventing access to the window)
bool LastItemHoveredRect; // Item rectangle is hovered, but its window may or not be currently interactable with (might be blocked by a popup preventing access to the window)
bool MenuBarAppending;
float MenuBarOffsetX;
ImVector<ImGuiWindow*> ChildWindows;
ImGuiStorage* StateStorage;
ImGuiLayoutType LayoutType;
// We store the current settings outside of the vectors to increase memory locality (reduce cache misses). The vectors are rarely modified. Also it allows us to not heap allocate for short-lived windows which are not using those settings.
float ItemWidth; // == ItemWidthStack.back(). 0.0: default, >0.0: width in pixels, <0.0: align xx pixels to the right of window
float TextWrapPos; // == TextWrapPosStack.back() [empty == -1.0f]
bool AllowKeyboardFocus; // == AllowKeyboardFocusStack.back() [empty == true]
bool ButtonRepeat; // == ButtonRepeatStack.back() [empty == false]
ImVector<float> ItemWidthStack;
ImVector<float> TextWrapPosStack;
ImVector<bool> AllowKeyboardFocusStack;
ImVector<bool> ButtonRepeatStack;
ImVector<ImGuiGroupData>GroupStack;
ImGuiColorEditMode ColorEditMode;
int StackSizesBackup[6]; // Store size of various stacks for asserting
float IndentX; // Indentation / start position from left of window (increased by TreePush/TreePop, etc.)
float GroupOffsetX;
float ColumnsOffsetX; // Offset to the current column (if ColumnsCurrent > 0). FIXME: This and the above should be a stack to allow use cases like Tree->Column->Tree. Need revamp columns API.
int ColumnsCurrent;
int ColumnsCount;
float ColumnsMinX;
float ColumnsMaxX;
float ColumnsStartPosY;
float ColumnsCellMinY;
float ColumnsCellMaxY;
bool ColumnsShowBorders;
ImGuiID ColumnsSetId;
ImVector<ImGuiColumnData> ColumnsData;
ImGuiDrawContext()
{
CursorPos = CursorPosPrevLine = CursorStartPos = CursorMaxPos = ImVec2(0.0f, 0.0f);
CurrentLineHeight = PrevLineHeight = 0.0f;
CurrentLineTextBaseOffset = PrevLineTextBaseOffset = 0.0f;
LogLinePosY = -1.0f;
TreeDepth = 0;
LastItemId = 0;
LastItemRect = ImRect(0.0f,0.0f,0.0f,0.0f);
LastItemHoveredAndUsable = LastItemHoveredRect = false;
MenuBarAppending = false;
MenuBarOffsetX = 0.0f;
StateStorage = NULL;
LayoutType = ImGuiLayoutType_Vertical;
ItemWidth = 0.0f;
ButtonRepeat = false;
AllowKeyboardFocus = true;
TextWrapPos = -1.0f;
ColorEditMode = ImGuiColorEditMode_RGB;
memset(StackSizesBackup, 0, sizeof(StackSizesBackup));
IndentX = 0.0f;
GroupOffsetX = 0.0f;
ColumnsOffsetX = 0.0f;
ColumnsCurrent = 0;
ColumnsCount = 1;
ColumnsMinX = ColumnsMaxX = 0.0f;
ColumnsStartPosY = 0.0f;
ColumnsCellMinY = ColumnsCellMaxY = 0.0f;
ColumnsShowBorders = true;
ColumnsSetId = 0;
}
};
// Windows data
struct IMGUI_API ImGuiWindow
{
char* Name;
ImGuiID ID; // == ImHash(Name)
ImGuiWindowFlags Flags; // See enum ImGuiWindowFlags_
int IndexWithinParent; // Order within immediate parent window, if we are a child window. Otherwise 0.
ImVec2 PosFloat;
ImVec2 Pos; // Position rounded-up to nearest pixel
ImVec2 Size; // Current size (==SizeFull or collapsed title bar size)
ImVec2 SizeFull; // Size when non collapsed
ImVec2 SizeContents; // Size of contents (== extents reach of the drawing cursor) from previous frame
ImVec2 SizeContentsExplicit; // Size of contents explicitly set by the user via SetNextWindowContentSize()
ImRect ContentsRegionRect; // Maximum visible content position in window coordinates. ~~ (SizeContentsExplicit ? SizeContentsExplicit : Size - ScrollbarSizes) - CursorStartPos, per axis
ImVec2 WindowPadding; // Window padding at the time of begin. We need to lock it, in particular manipulation of the ShowBorder would have an effect
ImGuiID MoveId; // == window->GetID("#MOVE")
ImVec2 Scroll;
ImVec2 ScrollTarget; // target scroll position. stored as cursor position with scrolling canceled out, so the highest point is always 0.0f. (FLT_MAX for no change)
ImVec2 ScrollTargetCenterRatio; // 0.0f = scroll so that target position is at top, 0.5f = scroll so that target position is centered
bool ScrollbarX, ScrollbarY;
ImVec2 ScrollbarSizes;
float BorderSize;
bool Active; // Set to true on Begin()
bool WasActive;
bool Accessed; // Set to true when any widget access the current window
bool Collapsed; // Set when collapsing window to become only title-bar
bool SkipItems; // == Visible && !Collapsed
int BeginCount; // Number of Begin() during the current frame (generally 0 or 1, 1+ if appending via multiple Begin/End pairs)
ImGuiID PopupId; // ID in the popup stack when this window is used as a popup/menu (because we use generic Name/ID for recycling)
int AutoFitFramesX, AutoFitFramesY;
bool AutoFitOnlyGrows;
int AutoPosLastDirection;
int HiddenFrames;
int SetWindowPosAllowFlags; // bit ImGuiSetCond_*** specify if SetWindowPos() call will succeed with this particular flag.
int SetWindowSizeAllowFlags; // bit ImGuiSetCond_*** specify if SetWindowSize() call will succeed with this particular flag.
int SetWindowCollapsedAllowFlags; // bit ImGuiSetCond_*** specify if SetWindowCollapsed() call will succeed with this particular flag.
bool SetWindowPosCenterWanted;
ImGuiDrawContext DC; // Temporary per-window data, reset at the beginning of the frame
ImVector<ImGuiID> IDStack; // ID stack. ID are hashes seeded with the value at the top of the stack
ImRect ClipRect; // = DrawList->clip_rect_stack.back(). Scissoring / clipping rectangle. x1, y1, x2, y2.
ImRect WindowRectClipped; // = WindowRect just after setup in Begin(). == window->Rect() for root window.
int LastFrameActive;
float ItemWidthDefault;
ImGuiSimpleColumns MenuColumns; // Simplified columns storage for menu items
ImGuiStorage StateStorage;
float FontWindowScale; // Scale multiplier per-window
ImDrawList* DrawList;
ImGuiWindow* RootWindow; // If we are a child window, this is pointing to the first non-child parent window. Else point to ourself.
ImGuiWindow* RootNonPopupWindow; // If we are a child window, this is pointing to the first non-child non-popup parent window. Else point to ourself.
ImGuiWindow* ParentWindow; // If we are a child window, this is pointing to our parent window. Else point to NULL.
// Navigation / Focus
int FocusIdxAllCounter; // Start at -1 and increase as assigned via FocusItemRegister()
int FocusIdxTabCounter; // (same, but only count widgets which you can Tab through)
int FocusIdxAllRequestCurrent; // Item being requested for focus
int FocusIdxTabRequestCurrent; // Tab-able item being requested for focus
int FocusIdxAllRequestNext; // Item being requested for focus, for next update (relies on layout to be stable between the frame pressing TAB and the next frame)
int FocusIdxTabRequestNext; // "
public:
ImGuiWindow(const char* name);
~ImGuiWindow();
ImGuiID GetID(const char* str, const char* str_end = NULL);
ImGuiID GetID(const void* ptr);
ImGuiID GetIDNoKeepAlive(const char* str, const char* str_end = NULL);
ImRect Rect() const { return ImRect(Pos.x, Pos.y, Pos.x+Size.x, Pos.y+Size.y); }
float CalcFontSize() const { return GImGui->FontBaseSize * FontWindowScale; }
float TitleBarHeight() const { return (Flags & ImGuiWindowFlags_NoTitleBar) ? 0.0f : CalcFontSize() + GImGui->Style.FramePadding.y * 2.0f; }
ImRect TitleBarRect() const { return ImRect(Pos, ImVec2(Pos.x + SizeFull.x, Pos.y + TitleBarHeight())); }
float MenuBarHeight() const { return (Flags & ImGuiWindowFlags_MenuBar) ? CalcFontSize() + GImGui->Style.FramePadding.y * 2.0f : 0.0f; }
ImRect MenuBarRect() const { float y1 = Pos.y + TitleBarHeight(); return ImRect(Pos.x, y1, Pos.x + SizeFull.x, y1 + MenuBarHeight()); }
};
//-----------------------------------------------------------------------------
// Internal API
// No guarantee of forward compatibility here.
//-----------------------------------------------------------------------------
namespace ImGui
{
// We should always have a CurrentWindow in the stack (there is an implicit "Debug" window)
// If this ever crash because g.CurrentWindow is NULL it means that either
// - ImGui::NewFrame() has never been called, which is illegal.
// - You are calling ImGui functions after ImGui::Render() and before the next ImGui::NewFrame(), which is also illegal.
inline ImGuiWindow* GetCurrentWindowRead() { ImGuiContext& g = *GImGui; return g.CurrentWindow; }
inline ImGuiWindow* GetCurrentWindow() { ImGuiContext& g = *GImGui; g.CurrentWindow->Accessed = true; return g.CurrentWindow; }
IMGUI_API ImGuiWindow* GetParentWindow();
IMGUI_API ImGuiWindow* FindWindowByName(const char* name);
IMGUI_API void FocusWindow(ImGuiWindow* window);
IMGUI_API void EndFrame(); // Ends the ImGui frame. Automatically called by Render()! you most likely don't need to ever call that yourself directly. If you don't need to render you can call EndFrame() but you'll have wasted CPU already. If you don't need to render, don't create any windows instead!
IMGUI_API void SetActiveID(ImGuiID id, ImGuiWindow* window);
IMGUI_API void ClearActiveID();
IMGUI_API void SetHoveredID(ImGuiID id);
IMGUI_API void KeepAliveID(ImGuiID id);
IMGUI_API void ItemSize(const ImVec2& size, float text_offset_y = 0.0f);
IMGUI_API void ItemSize(const ImRect& bb, float text_offset_y = 0.0f);
IMGUI_API bool ItemAdd(const ImRect& bb, const ImGuiID* id);
IMGUI_API bool IsClippedEx(const ImRect& bb, const ImGuiID* id, bool clip_even_when_logged);
IMGUI_API bool IsHovered(const ImRect& bb, ImGuiID id, bool flatten_childs = false);
IMGUI_API bool FocusableItemRegister(ImGuiWindow* window, bool is_active, bool tab_stop = true); // Return true if focus is requested
IMGUI_API void FocusableItemUnregister(ImGuiWindow* window);
IMGUI_API ImVec2 CalcItemSize(ImVec2 size, float default_x, float default_y);
IMGUI_API float CalcWrapWidthForPos(const ImVec2& pos, float wrap_pos_x);
IMGUI_API void OpenPopupEx(const char* str_id, bool reopen_existing);
// NB: All position are in absolute pixels coordinates (not window coordinates)
// FIXME: All those functions are a mess and needs to be refactored into something decent. AVOID USING OUTSIDE OF IMGUI.CPP! NOT FOR PUBLIC CONSUMPTION.
// We need: a sort of symbol library, preferably baked into font atlas when possible + decent text rendering helpers.
IMGUI_API void RenderText(ImVec2 pos, const char* text, const char* text_end = NULL, bool hide_text_after_hash = true);
IMGUI_API void RenderTextWrapped(ImVec2 pos, const char* text, const char* text_end, float wrap_width);
IMGUI_API void RenderTextClipped(const ImVec2& pos_min, const ImVec2& pos_max, const char* text, const char* text_end, const ImVec2* text_size_if_known, const ImVec2& align = ImVec2(0,0), const ImRect* clip_rect = NULL);
IMGUI_API void RenderFrame(ImVec2 p_min, ImVec2 p_max, ImU32 fill_col, bool border = true, float rounding = 0.0f);
IMGUI_API void RenderCollapseTriangle(ImVec2 pos, bool is_open, float scale = 1.0f);
IMGUI_API void RenderBullet(ImVec2 pos);
IMGUI_API void RenderCheckMark(ImVec2 pos, ImU32 col);
IMGUI_API const char* FindRenderedTextEnd(const char* text, const char* text_end = NULL); // Find the optional ## from which we stop displaying text.
IMGUI_API bool ButtonBehavior(const ImRect& bb, ImGuiID id, bool* out_hovered, bool* out_held, ImGuiButtonFlags flags = 0);
IMGUI_API bool ButtonEx(const char* label, const ImVec2& size_arg = ImVec2(0,0), ImGuiButtonFlags flags = 0);
IMGUI_API bool CloseButton(ImGuiID id, const ImVec2& pos, float radius);
IMGUI_API bool SliderBehavior(const ImRect& frame_bb, ImGuiID id, float* v, float v_min, float v_max, float power, int decimal_precision, ImGuiSliderFlags flags = 0);
IMGUI_API bool SliderFloatN(const char* label, float* v, int components, float v_min, float v_max, const char* display_format, float power);
IMGUI_API bool SliderIntN(const char* label, int* v, int components, int v_min, int v_max, const char* display_format);
IMGUI_API bool DragBehavior(const ImRect& frame_bb, ImGuiID id, float* v, float v_speed, float v_min, float v_max, int decimal_precision, float power);
IMGUI_API bool DragFloatN(const char* label, float* v, int components, float v_speed, float v_min, float v_max, const char* display_format, float power);
IMGUI_API bool DragIntN(const char* label, int* v, int components, float v_speed, int v_min, int v_max, const char* display_format);
IMGUI_API bool InputTextEx(const char* label, char* buf, int buf_size, const ImVec2& size_arg, ImGuiInputTextFlags flags, ImGuiTextEditCallback callback = NULL, void* user_data = NULL);
IMGUI_API bool InputFloatN(const char* label, float* v, int components, int decimal_precision, ImGuiInputTextFlags extra_flags);
IMGUI_API bool InputIntN(const char* label, int* v, int components, ImGuiInputTextFlags extra_flags);
IMGUI_API bool InputScalarEx(const char* label, ImGuiDataType data_type, void* data_ptr, void* step_ptr, void* step_fast_ptr, const char* scalar_format, ImGuiInputTextFlags extra_flags);
IMGUI_API bool InputScalarAsWidgetReplacement(const ImRect& aabb, const char* label, ImGuiDataType data_type, void* data_ptr, ImGuiID id, int decimal_precision);
IMGUI_API bool TreeNodeBehavior(ImGuiID id, ImGuiTreeNodeFlags flags, const char* label, const char* label_end = NULL);
IMGUI_API bool TreeNodeBehaviorIsOpen(ImGuiID id, ImGuiTreeNodeFlags flags = 0); // Consume previous SetNextTreeNodeOpened() data, if any. May return true when logging
IMGUI_API void TreePushRawID(ImGuiID id);
IMGUI_API void PlotEx(ImGuiPlotType plot_type, const char* label, float (*values_getter)(void* data, int idx), void* data, int values_count, int values_offset, const char* overlay_text, float scale_min, float scale_max, ImVec2 graph_size);
IMGUI_API int ParseFormatPrecision(const char* fmt, int default_value);
IMGUI_API float RoundScalar(float value, int decimal_precision);
} // namespace ImGui
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef _MSC_VER
#pragma warning (pop)
#endif
| [
"maxbaldus@googlemail.com"
] | maxbaldus@googlemail.com |
68be65272885ede0088ad46e6781e329c891b598 | 87687f2ba32fb4b47e078b7f30a805d40a0b326f | /lib/encoder_impl.cc | ff3071046635d725d9bffb48dd5494d7bcabfc15 | [] | no_license | szabolor/gr-ao40 | e2d0b80d58dd4af0372bdbc1ae42f6877870e92f | 4e5de210b5ddb83e858abdde61046224e2f586c7 | refs/heads/master | 2021-01-19T07:56:48.187916 | 2015-09-22T21:07:15 | 2015-09-22T21:07:15 | 42,960,660 | 3 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,517 | cc | /* -*- c++ -*- */
/*
* Copyright 2015 szabolor.
*
* This 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 software 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 software; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
* Boston, MA 02110-1301, USA.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <gnuradio/io_signature.h>
#include "encoder_impl.h"
extern "C" {
#include "encode/enc_ref.h"
}
namespace gr {
namespace ao40 {
encoder::sptr encoder::make(bool bit_output, uint8_t low_bit, uint8_t high_bit)
{
return gnuradio::get_initial_sptr (new encoder_impl(bit_output, low_bit, high_bit));
}
// TODO: output byte format configurable: bit/byte or byte/byte
encoder_impl::encoder_impl(bool bit_output, uint8_t low_bit, uint8_t high_bit)
: gr::block(
"encoder",
gr::io_signature::make(0, 0, 0),
gr::io_signature::make(0, 0, 0)
),
out_port(pmt::mp("encoded_out")),
in_port(pmt::mp("data_in")),
bit_output(bit_output),
low_bit(low_bit),
high_bit(high_bit)
{
message_port_register_out(out_port);
message_port_register_in(in_port);
set_msg_handler(in_port, boost::bind(&encoder_impl::encode, this, _1));
}
encoder_impl::~encoder_impl()
{
}
void encoder_impl::encode(pmt::pmt_t pdu)
{
pmt::pmt_t meta = pmt::car(pdu);
pmt::pmt_t vector = pmt::cdr(pdu);
size_t INPUT_SIZE = 256;
// Input data must have header `("ao40", "data")` and length of 256 byte
if (pmt::is_dict(meta) &&
dict_has_key(meta, pmt::intern("ao40")) &&
pmt::eqv(pmt::dict_ref(meta, pmt::intern("ao40"), pmt::PMT_NIL), pmt::intern("data")) &&
pmt::length(vector) == INPUT_SIZE
) {
// Mark PDU as encoded data
meta = pmt::dict_delete(meta, pmt::intern("ao40"));
meta = pmt::dict_add(meta, pmt::intern("ao40"), pmt::intern("encoded"));
const uint8_t *data_ptr;
uint8_t data[256];
uint8_t encoded[650];
data_ptr = pmt::u8vector_elements(vector, INPUT_SIZE);
// TODO: learn C++; How can `uint8_t* -> uint8_t *[256]` conversation be done here?
for (int i=0; i<INPUT_SIZE; ++i)
data[i] = data_ptr[i];
// Do the encoding!
encode_data(&data, &encoded);
// Pack the return value
if (bit_output) {
// Bit MSB mode
uint8_t bit_encoded[5200];
for (int i = 0; i < 5200; ++i)
bit_encoded[i] = ( (encoded[i >> 3] & (1 << (7 - (i & 7)))) != 0 ) ? high_bit : low_bit;
vector = pmt::init_u8vector(5200, bit_encoded);
} else {
// Byte mode
vector = pmt::init_u8vector(650, encoded);
}
// Resemble PDU with its metadata and content
pmt::pmt_t msg = pmt::cons(meta, vector);
message_port_pub(out_port, msg);
}
}
} /* namespace ao40 */
} /* namespace gr */
| [
"szabolor@linux"
] | szabolor@linux |
d348ecd66b04beb6b9c01e82eb88447fd77398cb | f76606b4e7ea1c34dd6b99a1ea6991c79e5592e0 | /src/mainwindow.h | f18dd1fe2b28fb996ee21c8fa9a064d57a6bf39c | [] | no_license | oleglite/MUP | 5bc31e34c1f16131c05984991d933c58bb8a1467 | 346ae80396bfc048835ffe0807e35fe703f960d8 | refs/heads/master | 2021-01-10T19:54:41.851887 | 2012-06-01T16:39:23 | 2012-06-01T16:39:23 | null | 0 | 0 | null | null | null | null | WINDOWS-1251 | C++ | false | false | 1,548 | h | #ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QtWebKit/QWebView>
#include <QtGui>
#include "muploader.h"
#include "searchgenerator.h"
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
MainWindow();
~MainWindow();
public slots:
void openLink(const QUrl& url);
private slots:
void openWithDialog();
void refresh();
void search();
private:
// UI
QWebView* mWebView;
QLineEdit* mSearchEdit;
QMenu* mFileMenu;
// ACTIONS
QAction* mOpenAct;
QAction* mRefreshAct;
QAction* mExitAct;
//! Имя файла, с которым работаем.
QString mFileName;
//! Папка, в которой работаем.
QString mFileDirectory;
//! Текущая страница.
PageMarkup* mPage;
private:
// методы для создания элементов окна
void createActions();
void createMenus();
void createCentralWidget();
void setPage(PageMarkup* page);
//! Полный путь @p path разбивает и сохраняет в mFileDirectory и mFileName.
void setFilePath(const QString& path);
//! Возвращает полный путь рабочего файла.
QString getFilePath() const;
//! Открывает файл по полному пути @p mFileName, @return извлеченные данные.
QString openFile(const QString& mFileName);
//! Открывает рабочий файл в mWebView
void openPage();
};
#endif // MAINWINDOW_H
| [
"beloglazov.oleg@gmail.com"
] | beloglazov.oleg@gmail.com |
af8008575fb547f541876f200cd40f8b3f1d682d | baab42ac0c4181b68af44c8707cbfd3fc5641888 | /RobotDemoPM6/RobotDemoPM6.ino | b5c1fd913207ce1c393d11dcd3172b53593adcdd | [] | no_license | KevinMoffatt/Mech6_2 | 95d2e1bd23d0c8b1185665ed0053000dfcc78e52 | e4bd98d99c1750f37c284cca5bdbdceb96141b72 | refs/heads/master | 2021-05-04T22:43:55.310837 | 2018-03-31T18:50:12 | 2018-03-31T18:50:12 | 120,058,220 | 0 | 0 | null | 2018-03-31T18:50:12 | 2018-02-03T04:09:11 | C++ | UTF-8 | C++ | false | false | 6,905 | ino | #define MEGA
#include <DualVNH5019MotorShieldMod3.h>
//#include <Encoder.h>
#include <SoftwareSerial.h>
#include <Servo.h>
double messData;
//Initialize pins for servo
int servoArmPin = 11; // THIS CORRESPONDTDS TO THE SERVO'S ORANGE WIRE
// Initialize message variables
double messDouble;
SoftwareSerial mySerial(50, 51); // RX, TX WIRE DIGITAL PINS 2 AND 3 TO PINS 24 AND 25 RESPECTIVELY
// configure library with pins as remapped
unsigned char INA3 = 22; // motor 3 directional input 1
unsigned char INB3 = 23; // motor 3 directional input 2
unsigned char EN3DIAG3 = 26; // motor 3 encoder
unsigned char CS3 = 27; // dummy current sensing pin
unsigned char PWM3 = 13; // motor 3 power
unsigned char INA4 = 52; // motor 4 directional input 1
unsigned char INB4 = 53; // motor 4 directional input 2
unsigned char EN4DIAG4 = 29; // motor 4 encoder
unsigned char CS4 = 30; // dummy current sensing pin
unsigned char PWM4 = 46; // motor 4 power
DualVNH5019MotorShieldMod3 md(INA3, INB3, EN3DIAG3, CS3, PWM3, INA4, INB4, EN4DIAG4, CS4, PWM4); //Use default pins for motor shield 1 and remapped pins for motor shield 2
Servo armServo;
int initialArmPos = 0;
int i=0;
int angle = initialArmPos;
void setup()
{
// Open serial communications with computer and wait for port to open:
// Serial.begin(9600);
// Serial.println("MESSAGE CODES:");
// Serial.println("");
// Print a message to the computer through the USB
// Serial.println("enter message!");
// Open serial communications with the other Arduino board
mySerial.begin(9600);
armServo.write(initialArmPos);
armServo.attach(servoArmPin);
md.init();
}
void loop() // run over and over
{
xbeeTestBot();
xbeeTestBotStraight();
xbeeServo();
xbeeTestBotTurns();
xbeeTestBotManip();
}
void xbeeServo(){
while(mySerial.available() > 1){
if(mySerial.read() != 255){ // check for flag value
continue;
}
angle = mySerial.read();
armServo.write(angle);
Serial.println(angle);
mySerial.write(255);
mySerial.write(angle);
}
}
void xbeeTestBotStraight(){
while(mySerial.available() > 1){
if(mySerial.read() != 253){ // check for flag value
continue;
}
md.setM1Speed(400); // right motor forward for forward movement
md.setM2Speed(-400); // left motor reverse for forward movement
delay(10000); // wait for 10 seconds
md.setM1Speed(0); // single-channel motor stop (coast)
md.setM2Speed(0); // single-channel motor stop (coast)
delay(2000);
md.setM1Speed(-400); // right motor reverse for reverse movement
md.setM2Speed(400); // left motor forward for reverse movement
delay(10000); // wait for 10 seconds
md.setM1Speed(0); // single-channel motor stop (coast)
md.setM2Speed(0); // single-channel motor stop (coast)
mySerial.write(255);
mySerial.write(12);
}
}
void xbeeTestBotTurns(){
while(mySerial.available() > 1){
if(mySerial.read() != 252){ // check for flag value
continue;
}
md.setM1Speed(400); // right motor forward for left turn
md.setM2Speed(400); // left motor forward for left turn
delay(10000); // wait for 10 seconds
md.setM1Speed(0); // single-channel motor stop (coast)
md.setM2Speed(0); // single-channel motor stop (coast)
delay(2000);
md.setM1Speed(-400); // right motor reverse for right turn
md.setM2Speed(-400); // left motor reverse for left turn
delay(10000); // wait for 10 seconds
md.setM1Speed(0); // single-channel motor stop (coast)
md.setM2Speed(0); // single-channel motor stop (coast)
mySerial.write(255);
mySerial.write(13);
}
}
void xbeeTestBotManip(){
while(mySerial.available() > 1){
if(mySerial.read() != 251){ // check for flag value
continue;
}
armServo.write(50); // write servo to rail value
delay(3000); // wait for 3 seconds
md.setM3Speed(400); // run rail motor
delay(5000); // wait for 5 seconds
md.setM3Speed(0); // single-channel motor stop (coast)
armServo.write(initialArmPos);
delay(3000); // wait for 3 seconds
md.setM4Speed(400); // run jack motor to lift robot
delay(3000);
md.setM4Speed(-400); // run jack motor to lift robot
delay(2000);
md.setM4Speed(0); // single-channel motor stop (coast)
mySerial.write(255);
mySerial.write(14);
}
}
void xbeeTestBot(){
while(mySerial.available() > 1){
if(mySerial.read() != 254){ // check for flag value
continue;
}
angle = mySerial.read();
armServo.write(angle);
Serial.println(angle);
md.setM1Speed(400); // single-channel motor full-speed "forward"
delay(2000); // wait for 2 seconds
md.setM1Speed(0); // single-channel motor stop (coast)
delay(500); // wait for 0.5 s
md.setM2Speed(400); // single-channel motor full-speed "reverse"
delay(2000); // wait for 2 seconds
md.setM2Speed(0); // single-channel motor stop (coast)
delay(500); // wait for 0.5 s
md.setM3Speed(400); // single-channel motor full-speed "forward"
delay(2000); // wait for 2 seconds
md.setM3Speed(0); // single-channel motor stop (coast)
delay(500); // wait for 0.5 s
md.setM4Speed(400); // single-channel motor full-speed "forward"
delay(2000); // wait for 2 seconds
md.setM4Speed(0); // single-channel motor stop (coast)
delay(500); // wait for 0.5 s
md.setM1Speed(0); // single-channel motor stop (coast)
md.setM2Speed(0); // single-channel motor stop (coast)
md.setM3Speed(0); // single-channel motor stop (coast)
md.setM4Speed(0); // single-channel motor stop (coast)
// the following code is a simple example:
//
md.setM1Speed(-400); // single-channel motor full-speed "forward"
delay(2000); // wait for 2 seconds
md.setM1Speed(0); // single-channel motor stop (coast)
delay(500); // wait for 0.5 s
md.setM2Speed(-400); // single-channel motor full-speed "reverse"
delay(2000); // wait for 2 seconds
md.setM2Speed(0); // single-channel motor stop (coast)
delay(500); // wait for 0.5 s
md.setM3Speed(-400); // single-channel motor full-speed "forward"
delay(2000); // wait for 2 seconds
md.setM3Speed(0); // single-channel motor stop (coast)
delay(500); // wait for 0.5 s
md.setM4Speed(-400); // single-channel motor full-speed "forward"
delay(2000); // wait for 2 seconds
md.setM4Speed(0); // single-channel motor stop (coast)
delay(500); // wait for 0.5 s
md.setM1Speed(0); // single-channel motor stop (coast)
md.setM2Speed(0); // single-channel motor stop (coast)
md.setM3Speed(0); // single-channel motor stop (coast)
md.setM4Speed(0); // single-channel motor stop (coast)
mySerial.write(255);
mySerial.write(angle);
}
}
| [
"brettreeder63@hotmail.com"
] | brettreeder63@hotmail.com |
c58c45472a0ef696d82aa7b15875f5f7e8343468 | 003fc0f816d61eabc69e6b3d92c7ea63bf5cdd7a | /oving9/oving9/dummyTest.cpp | 407aeb4cafd1f74d80e0909fa398fbd6e552cd56 | [] | no_license | siljeanf/TDT4102_OOP | 380f24fead7fa44046750e50ce2141ecba83e027 | c2aa6e67eacc5db79c491ee416f74c7f28b3ee94 | refs/heads/master | 2022-12-12T21:56:16.540507 | 2020-09-07T13:27:48 | 2020-09-07T13:27:48 | 293,534,969 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 907 | cpp | //
// dummyTest.cpp
// oving9
//
// Created by Silje Anfindsen on 12/03/2019.
// Copyright © 2019 Silje Anfindsen. All rights reserved.
//
#include "dummyTest.hpp"
using namespace std;
void Dummy::dummyTest() {
Dummy a;
*a.num = 4;
Dummy b{a};
Dummy c;
c = a;
cout << "a:" << *a.num << endl;
cout << "b:" << *b.num << endl;
cout << "c:" << *c.num << endl;
*b.num = 3;
*c.num = 5;
cout << "a:" << *a.num << endl;
cout << "b: " << *b.num << endl;
cout << "c: " << *c.num << endl;
//cin.get();
// For å hindre at
// programmet avslutter med en gang
}
//kopikonstruktør
Dummy::Dummy(const Dummy &d) : num{ nullptr } {
this->num = new int{};
*num = *d.num;
}
//operator for =
Dummy &Dummy::operator=(Dummy d) {
// Vi tar inn d som call-by-value
std::swap(num, d.num);
// Vi swapper pekere
return *this;
}
| [
"siljemarieanfindsen@Siljes-MBP.lan"
] | siljemarieanfindsen@Siljes-MBP.lan |
e7cf9ec94afaa8823d0d8853990967831bd5813c | a5cf450078809a0b507e21d56660b7c4f033c6d5 | /include/dac/dacdef_zrh.h | b45d52ea55c04eb3efbfa2f84469da63f0066e6c | [] | no_license | fay1987/communication_manager | 98a72677d4e2aa631e2c895741819a53c639c79a | 7df29883f6a18400ceb26682cf2d800630b6df33 | refs/heads/master | 2021-07-13T14:30:04.214616 | 2018-01-25T08:08:05 | 2018-01-25T08:08:05 | 94,993,715 | 1 | 2 | null | null | null | null | GB18030 | C++ | false | false | 8,416 | h | /*==============================================================================
* 文件名称 : dacdef.h
* 文件功能 :数据采集各种类型定义
* 模块 : 数据采集
* 创建时间 : 2009-06-08
* 作者 :
* 版本 : v1.0
* 修改后版本 : 1.1
* 修改摘要 :
* 修改者 :
* 修改日期 :
==============================================================================*/
#ifndef _PDT_DAC_DACDEF_H_
#define _PDT_DAC_DACDEF_H_
namespace PDT
{
//CHANNEL用户
enum CHANNEL_USER
{
CHANNEL_TASK_USER = 0x01, //channel执行用
CHANNEL_TASK_CLIENT = 0x02, //channel client
CHANNEL_TASK_SERVER = 0x04, //channel server
CHANNEL_TASK_UDP = 0x06, //channel dgram=udp
CHANNEL_TASK_SERIAL = 0x08, //channel serial
CHANNEL_TASK_ALL = 0XFF //所有任务
};
//装载参数表标志
enum LOADPARA_FLAG
{
LOADPARA_CHANNEL = 0x00000001, //通道表
LOADPARA_GROUP = 0x00000002, //数据组表
LOADPARA_ROUTE = 0x00000004, //路径表
LOADPARA_YC = 0x00000008, //YC表
LOADPARA_YX = 0x00000010, //YX表
LOADPARA_KWH = 0x00000020, //KWH表
LOADPARA_ZFYC = 0x00000040, //转发YC表
LOADPARA_ZFYX = 0x00000080, //转发YX表
LOADPARA_ZFKWH = 0x00000100, //转发KWH表
LOADPARA_PROTOCOL = 0x00000200, //Protocol
LOADPARA_STATION = 0x00000400, //厂站表
LOADPARA_DEVICE = 0x00000800, //设备表--scd使用
LOADPARA_DEVICETYPE = 0x00001000, //设备类型表--scd使用
LOADPARA_DEVICEPARA = 0x00002000, //设备参数表--scd使用
LOADPARA_YK = 0x00004000, //遥控表
LOADPARA_YT = 0x00008000, //遥调表
LOADPARA_ALL = 0xFFFFFFFF //全部加载
};
//通道状态
enum CHANNEL_STATE
{
CHANNEL_STATE_DOWN = 0, //断开
CHANNEL_STATE_LISTEN = 1, //监听
CHANNEL_STATE_UP = 2, //链接
CHANNEL_STATE_DISABLED = 3, //禁用
};
enum CHANNEL_TYPE
{
CHANNEL_TYPE_SERIAL = 0, //串口
CHANNEL_TYPE_TCPCLIENT = 1, //TCP客户端
CHANNEL_TYPE_TCPSERVER = 2, //TCP服务端
CHANNEL_TYPE_UDP = 3, //UDP
CHANNEL_TYPE_GATECLIENT = 4, //网关客户端
CHANNEL_TYPE_GATESERVER = 5, //网关服务端
CHANNEL_TYPE_VIRTUAL = 10 //虚拟类型(不处理收发,直接调度规约)
};
//数据组类型
enum GROUP_TYPE
{
GROUP_TYPE_STATIC_RX = 0, //接收组
GROUP_TYPE_STATIC_TX = 1, //发送组
};
//数据组状态
enum GROUP_STATE
{
GROUP_STATE_DOWN = 0, //停止
GROUP_STATE_UP = 1, //断开
GROUP_STATE_DISABLED = 2, //禁用
};
//路径类型
enum ROUTE_TYPE
{
ROUTE_TYPE_RX = 0, //接收
ROUTE_TYPE_TX = 1 //发送
};
//路径状态
enum ROUTE_STATE
{
ROUTE_STATE_DOWN = 0, //停止
ROUTE_STATE_UP = 1, //运行
ROUTE_STATE_STANDBY = 2, //热备
ROUTE_STATE_FREE = 3, //空闲
ROUTE_STATE_DISABLED = 4, //禁用
};
//遥测类型
enum YC_TYPE
{
YC_TYPE_U = 0, //电压类型
YC_TYPE_I = 1, //电流
YC_TYPE_P = 2, //有功
YC_TYPE_Q = 3, //无功
YC_TYPE_F = 4, //频率
YC_TYPE_COS = 5, //功率因素
YC_TYPE_BAT_U = 6, //单体电压
YC_TYPE_BAT_R = 7, //单体内阻
YC_TYPE_BAT_TOL_U = 8, //组端电压
YC_TYPE_BAT_I = 9, //蓄电池电流
YC_TYPE_TEMP = 10, //温度
YC_TYPE_HUMI = 11 //湿度
};
//遥信类型
enum YX_TYPE
{
YX_TYPE_ALARM = 0, //告警类型
YX_TYPE_SWITCH = 1, //开关类型
YX_TYPE_WORK = 2 //工作类型
};
//报文缓冲区类型
enum BUFFER_TYPE
{
BUFFER_RX = 0, //接收
BUFFER_TX = 1 //发送
};
//报文帧类型
enum FRAME_TYPE
{
FRAME_RX = 0, //接收
FRAME_RX_ERROR = 1, //接收的错误帧
FRAME_TX = 2 //发送
};
//质量码位定义
enum QUALITY_BIT
{
QUALITY_BIT_OV = 0x00000001, //溢出位 :1--溢出
QUALITY_BIT_ES = 0x00000002, //估计位 :1--估计
QUALITY_BIT_MS = 0x00000004, //人工置数 :1--人工置数
QUALITY_BIT_WAR = 0x00000008, //告警位 :1--告警
QUALITY_BIT_BL = 0x00000010, //闭锁位 :1--闭锁
QUALITY_BIT_SB = 0x00000020, //取代位 :1--取代
QUALITY_BIT_NT = 0x00000040, //更新位 :1--有更新
QUALITY_BIT_IV = 0x00000080, //无效位 :0--有效,1--无效
//其他
QUALITY_BIT_INIT = 0x10000000 //初始化位 :1--初始化
};
enum TIME_MODE
{//格林威治时间早8小时
TIME_BEIJING = 0, //北京时间
TIME_GREENWICH = 1 //格林威治时间
};
//YK状态
enum YK_STATE
{
YK_ERR = 0, //错误
YK_ON = 1, //合
YK_OFF = 2 //分
};
//控制命令类型
enum CTRL_TYPE
{
//加载参数命令 ( 1-100 )
CTRL_LOADPARA_ALL = 1, //加载参数ALL
CTRL_LOADPARA_CHANNEL = 2, //加载参数CHANNEL
CTRL_LOADPARA_GROUP = 3, //加载参数GROUP
CTRL_LOADPARA_ROUTE = 4, //加载参数ROUTE
CTRL_LOADPARA_PROTOCOL = 5, //加载参数PROTOCOL
CTRL_LOADPARA_COM = 6, //加载参数通讯类型
CTRL_LOADPARA_YC = 7, //加载参数YC
CTRL_LOADPARA_YX = 8, //加载参数YX
CTRL_LOADPARA_KWH = 9, //加载参数KWH
CTRL_LOADPARA_STATION = 10, //加载参数station
CTRL_LOADPARA_DEVICE = 11, //加载参数device
CTRL_LOADPARA_DEVICETYPE = 12, //加载参数devicetype
CTRL_LOADPARA_DEVICEPARA = 13, //加载参数devicepara
CTRL_LOADPARA_YK = 14, //加载参数yk
CTRL_LOADPARA_YT = 15, //加载参数yt
//通道、路径、数据组控制 ( 101-200 )
CTRL_MAN_START_CHANNEL = 101, //人工启动通道
CTRL_MAN_STOP_CHANNEL = 102, //人工停止通道
CTRL_MAN_ENABLE_CHANNEL = 103, //人工启用通道
CTRL_MAN_DISABLE_CHANNEL = 104, //人工禁用通道
CTRL_MAN_START_ROUTE = 111, //人工启动路径
CTRL_MAN_STOP_ROUTE = 112, //人工停止路径
CTRL_MAN_ENABLE_ROUTE = 113, //人工启用路径
CTRL_MAN_DISABLE_ROUTE = 114, //人工禁用路径
CTRL_MAN_RESET_PROTOCOL = 115, //人工重启制定路径的规约
CTRL_MAN_START_GROUP = 121, //人工启动数据组
CTRL_MAN_STOP_GROUP = 122, //人工停止数据组
CTRL_MAN_ENABLE_GROUP = 123, //人工启用数据组
CTRL_MAN_DISABLE_GROUP = 124, //人工禁用数据组
//规约控制 ( 201-300 )
CTRL_PRO_RESET_RTU = 201, //复位RTU
CTRL_PRO_SYNC_TIME = 202, //对时
CTRL_PRO_CALL_ALL_DATA = 203, //总召唤
CTRL_PRO_CALL_ALL_DATA_YC = 204, //总召遥测
CTRL_PRO_CALL_ALL_DATA_YX = 205, //总召遥信
CTRL_PRO_CALL_ALL_DATA_KWH = 206, //总召电度
CTRL_PRO_CALL_SUBGROUP_DATA = 207, //分组召唤(101规约)
CTRL_PRO_YK = 208, //遥控
CTRL_PRO_YT = 209, //遥调
CTRL_PRO_SETPOINT_YC = 210, //设点遥测
CTRL_PRO_SETPOINT_YX = 211, //设点遥信
CTRL_PRO_SETPOINT_KWH = 212, //设点电度
CTRL_PRO_DIRECT_OPERATE = 213, //直接操作
//通用命令
CTRL_PRO_COMMON = 299, //自定义通用命令
CTRL_PRO_UNKNOWN = 300, //仅标识类型结束
//规约控制返校信息( 301-400 )
CTRL_PRO_ACK_YK = 301, //遥控返校
CTRL_PRO_COMMON_ACK = 303 //自定义通用命令反校
};
//日志类型
enum DAC_LOG_TYPE
{
LOG_NET_CLIENT_BASE = 1300, //tcp client base
LOG_NET_CLIENT_RECV = 1301, //recv
LOG_NET_CLIENT_SEND = 1302, //send
LOG_NET_SERVER_BASE = 1305, //tcp server base
LOG_NET_SERVER_RECV = 1306, //recv
LOG_NET_SERVER_SEND = 1307, //send
LOG_NET_UDP_BASE = 1310, //udp base
LOG_NET_UDP_RECV = 1311, //udp recv
LOG_NET_UDP_SEND = 1312, //udp send
LOG_SERIAL_BASE = 1320, //serial base
LOG_SERIAL_RECV = 1321, //serial recv
LOG_SERIAL_SEND = 1322, //serial send
LOG_DACSHM_BASE = 1400, //dacshm日志基础值
LOG_COMMINF_BASE = 1410, //comminf基础值
LOG_DATAINF_BASE = 1420, //datainf基础值
LOG_CTRLINF_BASE = 1430, //ctrlinf基础值
LOG_LOADPARA_BASE = 1440, //loadpara日志基础值
/////////////dacsrv////////
LOG_DACSRV_BASE = 1500, //dacsrv进程日志基础值
LOG_DACSRV_CONFIG = 1501, //配置文件操作
LOG_DACSRV_LINKPOOL = 1502, //linktaskpool
LOG_DACSRV_CTRLTASK = 1503, //控制任务
LOG_DACSRV_LINK = 1510, //链路
LOG_DACSRV_STATETASK = 1520, //状态检测
LOG_DACSRV_ZFTASK = 1521 //转发
};
}
#endif //_PDT_DAC_DACDEF_H_
| [
"lingquan324@163.com"
] | lingquan324@163.com |
d0a238ac20478695ce1d683321eaeee7750efbef | 29948885a97f946dd46d25dcce1ae08247affb8a | /Builder/builder.h | f45bfb1ad54678aff0df82e800e3515edf306c69 | [] | no_license | osanseviero/Software_Engineering | 8c9d573fd8793601d8ee25f827f7295c940a9174 | 396244b0de12275115959ce11c008a1bb08a7db2 | refs/heads/master | 2020-04-12T05:42:19.118305 | 2016-12-08T02:54:55 | 2016-12-08T02:54:58 | 65,292,647 | 0 | 2 | null | null | null | null | UTF-8 | C++ | false | false | 255 | h | class Builder {
public:
Plane* getPlane() {
return this->p;
}
Plane* p;
Plane* createPlane() {
return new Plane();
}
virtual void getWings() = 0;
virtual void getEngine() = 0;
virtual void getSerie() = 0;
virtual void getBrand() = 0;
}; | [
"osanseviero@gmail.com"
] | osanseviero@gmail.com |
00be243f21932b24154b0483da0ed2fb541a3031 | 2313bace51d91d2f73a535bd2cb04f93f1c85103 | /Program (15).cpp | b79b16271e1d163f608ea620df3200512ddb49ac | [] | no_license | Soumyadeep-Chakraborty/labassignment3 | 63dcd0131d00228c5c3d88d51083dfce8e912c88 | aa9904abc7dfb50186a3550669a976e030c0212a | refs/heads/master | 2021-06-28T14:49:10.193353 | 2017-09-15T17:24:27 | 2017-09-15T17:24:27 | 103,683,118 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 333 | cpp | #include<iostream>
using namespace std;
int main()
{float a,b,c,s;
cout<<"enter a side";
cin>>a;
cout<<"enter another side";
cin>>b;
cout<<"enter another side";
cin>>c;
if((a+b)>c||(b+c)>a||(a+c)>b||a>-1||b>-1||c>-1){
cout<<"triangle can exist";}
else{cout<<"triangle can't exist";} return 0;
}
| [
"noreply@github.com"
] | Soumyadeep-Chakraborty.noreply@github.com |
305cad32b0607b93afd0167e1f614eeda9a6c911 | abc7b3795be6210cd2ccff9bce475b91936a7f6f | /recurrent-net-lstm/src/diagonal_matrix.h | aeef9088e4b71a4f8f170010c4f7b4d46449eaa2 | [] | no_license | brishtiteveja/DeepNN | 75d897cb578d42045eebf84d33d75f1e81eff3ae | a62cd67dda856b90650c31e3de8d946a6346c8db | refs/heads/master | 2021-01-19T21:44:23.237932 | 2018-03-01T20:22:09 | 2018-03-01T20:22:09 | 88,697,631 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 869 | h | #pragma once
#include "general_settings.h"
using namespace std;
using namespace cv;
class diagonalMatrix{
public:
diagonalMatrix();
diagonalMatrix(Mat&);
diagonalMatrix(int);
diagonalMatrix operator=(diagonalMatrix);
~diagonalMatrix();
Mat operator*(Mat&);
Mat operator+(Mat&);
Mat operator-(Mat&);
diagonalMatrix operator+(diagonalMatrix);
diagonalMatrix operator-(diagonalMatrix);
void mul(Mat&);
void mul(diagonalMatrix&);
void copyFrom(diagonalMatrix&);
void setSize(int);
void update(int);
Mat getDiagonal();
Mat getFull();
void init(int);
void init(Mat&);
void randomInit(int, double);
int getSize();
//private:
int size;
Mat diagonal;
Mat full;
};
| [
"brishtiteveja@gmail.com"
] | brishtiteveja@gmail.com |
699072189ca313d6ede56353cbb31b337db53e85 | 544a2f66dd174cb45190152af2aa3e38754b4933 | /system/utest/core/resource/resource.cpp | ee0cf714fffa6418f522b9343a7c24c00940c242 | [
"BSD-3-Clause",
"MIT"
] | permissive | wblixin6017/zircon | cbcd3ecef11749d49b23f1e44f3204105e169eae | 5c06209be72abed4757c7b1f7541385da0a4f286 | refs/heads/master | 2020-03-26T18:04:46.082321 | 2018-08-17T20:34:32 | 2018-08-18T02:53:20 | 145,195,094 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 9,485 | cpp | // Copyright 2016 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <lib/zx/interrupt.h>
#include <lib/zx/resource.h>
#include <lib/zx/vmo.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <unittest/unittest.h>
#include <zircon/syscalls.h>
#include <zircon/syscalls/object.h>
#include <zircon/syscalls/port.h>
#include <zircon/syscalls/resource.h>
#include <zircon/types.h>
__BEGIN_CDECLS;
extern zx_handle_t get_root_resource(void);
__END_CDECLS;
static const size_t mmio_test_size = (PAGE_SIZE * 4);
static uint64_t mmio_test_base;
const zx::unowned_resource root() {
static zx_handle_t root = get_root_resource();
return zx::unowned_resource(root);
}
// Physical memory is reserved during boot and its location varies based on
// system and architecture. What this 'test' does is scan MMIO space looking
// for a valid region to test against, ensuring that the only errors it sees
// are 'ZX_ERR_NOT_FOUND', which indicates that it is missing from the
// region allocator.
//
// TODO(ZX-2419): Figure out a way to test IRQs in the same manner, without
// hardcoding target-specific IRQ vectors in these tests. That information is
// stored in the kernel and is not exposed to userspace, so we can't simply
// guess/probe valid vectors like we can MMIO and still assume the tests are
// valid.
static bool probe_address_space(void) {
BEGIN_TEST;
zx_status_t status;
// Scan mmio in chunks until we find a gap that isn't exclusively reserved physical memory.
uint64_t step = 0x100000000;
for (uint64_t base = 0; base < UINT64_MAX - step; base += step) {
zx::resource handle;
status = zx::resource::create(*root(), ZX_RSRC_KIND_MMIO, base,
mmio_test_size, NULL, 0, &handle);
if (status == ZX_OK) {
mmio_test_base = base;
break;
}
// If ZX_OK wasn't returned, then we should see ZX_ERR_NOT_FOUND and nothing else.
ASSERT_EQ(ZX_ERR_NOT_FOUND, status, "");
}
END_TEST;
}
// This is a basic smoketest for creating resources and verifying the internals
// returned by zx_object_get_info match what the caller passed for creation.
static bool test_basic_actions(void) {
BEGIN_TEST;
zx::resource new_root;
zx_info_resource_t info;
char root_name[] = "root";
// Create a root and verify the fields are still zero, but the name matches.
EXPECT_EQ(zx::resource::create(*root(), ZX_RSRC_KIND_ROOT, 0, 0,
root_name, sizeof(root_name), &new_root),
ZX_OK, "");
ASSERT_EQ(new_root.get_info(ZX_INFO_RESOURCE, &info, sizeof(info), NULL, NULL), ZX_OK, "");
EXPECT_EQ(info.kind, ZX_RSRC_KIND_ROOT, "");
EXPECT_EQ(info.base, 0u, "");
EXPECT_EQ(info.size, 0u, "");
EXPECT_EQ(info.flags, 0u, "");
EXPECT_EQ(0, strncmp(root_name, info.name, ZX_MAX_NAME_LEN), "");
// Check that a resource is created with all the parameters passed to the syscall, and use
// the new root resource created for good measure.
zx::resource mmio;
uint32_t kind = ZX_RSRC_KIND_MMIO;
uint32_t flags = ZX_RSRC_FLAG_EXCLUSIVE;
char mmio_name[] = "test_resource_name";
ASSERT_EQ(zx::resource::create(new_root, kind | flags, mmio_test_base, mmio_test_size,
mmio_name, sizeof(mmio_name), &mmio),
ZX_OK, "");
ASSERT_EQ(mmio.get_info(ZX_INFO_RESOURCE, &info, sizeof(info), NULL, NULL), ZX_OK, "");
EXPECT_EQ(info.kind, kind, "");
EXPECT_EQ(info.flags, flags, "");
EXPECT_EQ(info.base, mmio_test_base, "");
EXPECT_EQ(info.size, mmio_test_size, "");
EXPECT_EQ(0, strncmp(info.name, mmio_name, ZX_MAX_NAME_LEN), "");
END_TEST;
}
// This test covers every path that returns ZX_ERR_INVALID_ARGS from the the syscall.
static bool test_invalid_args(void) {
BEGIN_TEST;
zx::resource temp;
zx::resource fail_hnd;
// test privilege inversion by seeing if an MMIO resource can other resources.
EXPECT_EQ(zx::resource::create(*root(), ZX_RSRC_KIND_MMIO, mmio_test_base,
mmio_test_size, NULL, 0, &temp),
ZX_OK, "");
EXPECT_EQ(zx::resource::create(temp, ZX_RSRC_KIND_ROOT, 0, 0, NULL, 0, &fail_hnd),
ZX_ERR_ACCESS_DENIED, "");
EXPECT_EQ(zx::resource::create(temp, ZX_RSRC_KIND_MMIO, mmio_test_base, mmio_test_size, NULL,
0, &fail_hnd),
ZX_ERR_ACCESS_DENIED, "");
// test invalid kind
EXPECT_EQ(zx::resource::create(*root(), ZX_RSRC_KIND_COUNT, mmio_test_base,
mmio_test_size, NULL, 0, &temp),
ZX_ERR_INVALID_ARGS, "");
EXPECT_EQ(zx::resource::create(*root(), ZX_RSRC_KIND_COUNT + 1,
mmio_test_base, mmio_test_size, NULL, 0, &temp),
ZX_ERR_INVALID_ARGS, "");
// test invalid base
EXPECT_EQ(zx::resource::create(*root(), ZX_RSRC_KIND_MMIO, UINT64_MAX, 1024,
NULL, 0, &temp),
ZX_ERR_INVALID_ARGS, "");
// test invalid size
EXPECT_EQ(zx::resource::create(*root(), ZX_RSRC_KIND_MMIO, 1024, UINT64_MAX,
NULL, 0, &temp),
ZX_ERR_INVALID_ARGS, "");
// test invalid options
EXPECT_EQ(zx::resource::create(*root(), ZX_RSRC_KIND_MMIO | 0xFF0000, mmio_test_base,
mmio_test_size, NULL, 0, &temp),
ZX_ERR_INVALID_ARGS, "");
END_TEST;
}
static bool test_exclusive_shared(void) {
// Try to create a shared resource and ensure it blocks an exclusive
// resource.
BEGIN_TEST;
zx::resource mmio_1, mmio_2;
EXPECT_EQ(zx::resource::create(*root(), ZX_RSRC_KIND_MMIO | ZX_RSRC_FLAG_EXCLUSIVE,
mmio_test_base, mmio_test_size, NULL, 0, &mmio_1),
ZX_OK, "");
EXPECT_EQ(zx::resource::create(*root(), ZX_RSRC_KIND_MMIO, mmio_test_base,
mmio_test_size, NULL, 0, &mmio_2),
ZX_ERR_NOT_FOUND, "");
END_TEST;
}
static bool test_shared_exclusive(void) {
// Try to create a shared resource and ensure it blocks an exclusive
// resource.
BEGIN_TEST;
zx::resource mmio_1, mmio_2;
EXPECT_EQ(zx::resource::create(*root(), ZX_RSRC_KIND_MMIO, mmio_test_base,
mmio_test_size, NULL, 0, &mmio_1),
ZX_OK, "");
EXPECT_EQ(zx::resource::create(*root(), ZX_RSRC_KIND_MMIO | ZX_RSRC_FLAG_EXCLUSIVE,
mmio_test_base, mmio_test_size, NULL, 0, &mmio_2),
ZX_ERR_NOT_FOUND, "");
END_TEST;
}
static bool test_vmo_creation(void) {
// Attempt to create a resource and then a vmo using that resource.
BEGIN_TEST;
zx::resource mmio;
zx::vmo vmo;
ASSERT_EQ(zx::resource::create(*root(), ZX_RSRC_KIND_MMIO, mmio_test_base,
mmio_test_size, NULL, 0, &mmio),
ZX_OK, "");
EXPECT_EQ(zx_vmo_create_physical(mmio.get(), mmio_test_base, PAGE_SIZE,
vmo.reset_and_get_address()),
ZX_OK, "");
END_TEST;
}
static bool test_vmo_creation_smaller(void) {
// Attempt to create a resource smaller than a page and ensure it still expands access to the
// entire page.
BEGIN_TEST;
zx::resource mmio;
zx::vmo vmo;
ASSERT_EQ(zx::resource::create(*root(), ZX_RSRC_KIND_MMIO, mmio_test_base,
PAGE_SIZE/2, NULL, 0, &mmio),
ZX_OK, "");
EXPECT_EQ(zx_vmo_create_physical(mmio.get(), mmio_test_base, PAGE_SIZE,
vmo.reset_and_get_address()),
ZX_OK, "");
END_TEST;
}
static bool test_vmo_creation_unaligned(void) {
// Attempt to create an unaligned resource and ensure that the bounds are rounded appropriately
// to the proper PAGE_SIZE.
BEGIN_TEST;
zx::resource mmio;
zx::vmo vmo;
ASSERT_EQ(zx::resource::create(*root(), ZX_RSRC_KIND_MMIO,
mmio_test_base + 0x7800, 0x2000, NULL, 0, &mmio),
ZX_OK, "");
EXPECT_EQ(zx_vmo_create_physical(mmio.get(), mmio_test_base + 0x7000, 0x2000,
vmo.reset_and_get_address()),
ZX_OK, "");
END_TEST;
}
#if defined(__x86_64__)
static bool test_ioports(void) {
BEGIN_TEST;
// On x86 create an ioport resource and attempt to have the privilege bits
// set for the process.
zx::resource io;
uint16_t io_base = 0xCF8;
uint32_t io_size = 8; // CF8 - CFC (inclusive to 4 bytes each)
char io_name[] = "ports!";
ASSERT_EQ(zx::resource::create(*root(), ZX_RSRC_KIND_IOPORT, io_base,
io_size, io_name, sizeof(io_name), &io),
ZX_OK, "");
EXPECT_EQ(zx_ioports_request(io.get(), io_base, io_size), ZX_OK, "");
END_TEST;
}
#endif
BEGIN_TEST_CASE(resource_tests)
RUN_TEST(probe_address_space);
RUN_TEST(test_basic_actions);
RUN_TEST(test_exclusive_shared);
RUN_TEST(test_shared_exclusive);
RUN_TEST(test_invalid_args);
RUN_TEST(test_vmo_creation);
RUN_TEST(test_vmo_creation_smaller);
RUN_TEST(test_vmo_creation_unaligned);
#if defined(__x86_64__)
RUN_TEST(test_ioports);
#endif
END_TEST_CASE(resource_tests)
| [
"commit-bot@chromium.org"
] | commit-bot@chromium.org |
028592ae62a668ed3b6468ccd50de46967e37fe6 | 04e5b6df2ee3bcfb7005d8ec91aab8e380333ac4 | /clang_codecompletion/llvm/MC/MCAsmLayout.h | f95af210a28f34ff33fa5e8213f6fd218fb7a0cf | [
"MIT"
] | permissive | ColdGrub1384/Pyto | 64e2a593957fd640907f0e4698d430ea7754a73e | 7557485a733dd7e17ba0366b92794931bdb39975 | refs/heads/main | 2023-08-01T03:48:35.694832 | 2022-07-20T14:38:45 | 2022-07-20T14:38:45 | 148,944,721 | 884 | 157 | MIT | 2023-02-26T21:34:04 | 2018-09-15T22:29:07 | C | UTF-8 | C++ | false | false | 3,840 | h | //===- MCAsmLayout.h - Assembly Layout Object -------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_MC_MCASMLAYOUT_H
#define LLVM_MC_MCASMLAYOUT_H
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/SmallVector.h"
namespace llvm {
class MCAssembler;
class MCFragment;
class MCSection;
class MCSymbol;
/// Encapsulates the layout of an assembly file at a particular point in time.
///
/// Assembly may require computing multiple layouts for a particular assembly
/// file as part of the relaxation process. This class encapsulates the layout
/// at a single point in time in such a way that it is always possible to
/// efficiently compute the exact address of any symbol in the assembly file,
/// even during the relaxation process.
class MCAsmLayout {
MCAssembler &Assembler;
/// List of sections in layout order.
llvm::SmallVector<MCSection *, 16> SectionOrder;
/// The last fragment which was laid out, or 0 if nothing has been laid
/// out. Fragments are always laid out in order, so all fragments with a
/// lower ordinal will be valid.
mutable DenseMap<const MCSection *, MCFragment *> LastValidFragment;
/// Make sure that the layout for the given fragment is valid, lazily
/// computing it if necessary.
void ensureValid(const MCFragment *F) const;
/// Is the layout for this fragment valid?
bool isFragmentValid(const MCFragment *F) const;
public:
MCAsmLayout(MCAssembler &Assembler);
/// Get the assembler object this is a layout for.
MCAssembler &getAssembler() const { return Assembler; }
/// \returns whether the offset of fragment \p F can be obtained via
/// getFragmentOffset.
bool canGetFragmentOffset(const MCFragment *F) const;
/// Invalidate the fragments starting with F because it has been
/// resized. The fragment's size should have already been updated, but
/// its bundle padding will be recomputed.
void invalidateFragmentsFrom(MCFragment *F);
/// Perform layout for a single fragment, assuming that the previous
/// fragment has already been laid out correctly, and the parent section has
/// been initialized.
void layoutFragment(MCFragment *Fragment);
/// \name Section Access (in layout order)
/// @{
llvm::SmallVectorImpl<MCSection *> &getSectionOrder() { return SectionOrder; }
const llvm::SmallVectorImpl<MCSection *> &getSectionOrder() const {
return SectionOrder;
}
/// @}
/// \name Fragment Layout Data
/// @{
/// Get the offset of the given fragment inside its containing section.
uint64_t getFragmentOffset(const MCFragment *F) const;
/// @}
/// \name Utility Functions
/// @{
/// Get the address space size of the given section, as it effects
/// layout. This may differ from the size reported by \see getSectionSize() by
/// not including section tail padding.
uint64_t getSectionAddressSize(const MCSection *Sec) const;
/// Get the data size of the given section, as emitted to the object
/// file. This may include additional padding, or be 0 for virtual sections.
uint64_t getSectionFileSize(const MCSection *Sec) const;
/// Get the offset of the given symbol, as computed in the current
/// layout.
/// \return True on success.
bool getSymbolOffset(const MCSymbol &S, uint64_t &Val) const;
/// Variant that reports a fatal error if the offset is not computable.
uint64_t getSymbolOffset(const MCSymbol &S) const;
/// If this symbol is equivalent to A + Constant, return A.
const MCSymbol *getBaseSymbol(const MCSymbol &Symbol) const;
/// @}
};
} // end namespace llvm
#endif
| [
"emma@labbe.me"
] | emma@labbe.me |
9862e8eb20ebe7183468b5e74cc22936b312c6e3 | 400df5bf0c8e5c0ed5a2d7d8d1fc9a0507b0659e | /Photocell.ino | ba79a1e1ee2b61f11a8dfa4b2855d23ef6df26f0 | [] | no_license | fangtyler/cubby_buddy | 55398765dc6c14f961b5533c87b70ea6c68273ad | eaf49b115b3b50b6b97ee91a68605c0d426d37ca | refs/heads/master | 2020-04-22T20:19:14.974906 | 2019-02-22T05:12:03 | 2019-02-22T05:12:03 | 170,637,348 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 316 | ino | int sensorPin = A0; // select the input pin for the potentiometer
int sensorValue = 0; // variable to store the value coming from the sensor
void setup() {
pinMode(sensorPin, INPUT);
Serial.begin(9600);
}
void loop() {
sensorValue = analogRead(sensorPin);
Serial.println(sensorValue);
delay(5000);
}
| [
"noreply@github.com"
] | fangtyler.noreply@github.com |
1e6ac7a3573778ef2f66752b65d3d9a020d98740 | 991f0724c2ba3572f57ce8418f8ef4acfb5766fd | /main.cpp | 1d60e3747bf6b9c4fa605f81e2a4265ba1d94b8d | [] | no_license | going4distance/SnakeGame | d90f602076fe974c54fcb6e8e7abdfa5d243db3e | bec313b693e446006d84bf9fccbbaa45b0f20914 | refs/heads/master | 2021-04-06T03:06:22.928166 | 2018-03-14T18:13:33 | 2018-03-14T18:13:33 | 125,254,406 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,792 | cpp | #include <iostream>
#include <conio.h>
#include <windows.h>
using namespace std;
bool gameOver;
const int width = 20;
const int height = 20;
int x, y, fruitX, fruitY, score;
int tailX[100], tailY[100];
int nTail = 0; // so we know how many segments there are.
enum eDirection{STOP = 0, LEFT, RIGHT, UP, DOWN};
eDirection dir;
void Setup() {
gameOver = false;
dir = STOP;
x = width / 2;
y = height / 2;
fruitX = rand() % width;
fruitY = rand() % height; //what if they're the same?
score = 0;
}
void Draw() {
system("cls"); // will clear the console window
for (int i = 0; i <= width+1; i++)
cout << "# ";
cout << endl;
for (int i = 0; i < height; i++) {
for (int j = 0; j < width; j++) {
if (j == 0)
cout << "# ";
if (i == y && j == x)
cout << "O ";
else if (i == fruitY && j == fruitX)
cout << "F ";
else{
bool print = false;
for (int k = 0; k < nTail; k++) {
if (tailX[k] == j && tailY[k] == i) {
cout << "o ";
print = true;
}
}
if(!print){
cout << " ";
}
}
if (j == width - 1)
cout << "#";
}
cout << endl;
}
for (int i = 0; i <= width+1; i++)
cout << "# ";
cout << endl << "Score: " << score << endl;
}
void Input() {
if (_kbhit()) { //returns number if keyboard key is pressed, else 0.
switch (_getch()) { //returns last key pressed?
case 'a':
dir = LEFT;
break;
case 'd':
dir = RIGHT;
break;
case 'w':
dir = UP;
break;
case 's':
dir = DOWN;
break;
case 'g':
gameOver = true;
break;
}
}
}
void Tailmove() {
// moves up the tail position by 1 length.
int prevX = tailX[0];
int prevY = tailY[0];
int prev2X, prev2Y;
tailX[0] = x;
tailY[0] = y;
for (int i = 1; i < nTail; i++) { //moves the tail up one position
prev2X = tailX[i];
prev2Y = tailY[i];
tailX[i] = prevX;
tailY[i] = prevY;
prevX = prev2X;
prevY = prev2Y;
}
}
void Logic() {
if (x == fruitX && y == fruitY) {
score += 10;
fruitX = rand() % width;
fruitY = rand() % height;
nTail++;
}
switch (dir) {
case LEFT:
if (x > 0) {
Tailmove();
x--;
}
break;
case RIGHT:
if(x<width-1){
Tailmove();
x++;
}
break;
case UP:
if(y>0){
Tailmove();
y--;
}
break;
case DOWN:
if(y<height-1){
Tailmove();
y++;
}
break;
default:
break;
}
for (int i = 0; i < nTail; i++) {
if (tailX[i] == x && tailY[i] == y) {
gameOver = true;
}
}
}
void Snake_gameover() {
system("cls");
cout << "GAME OVER!" << endl << endl;
cout << "Final Score: " << score << endl;
Sleep(2500);
cout << endl << "Press any key"<<endl;
Sleep(500);
_getch();
}
int main() {
Setup();
while (!gameOver) {
Draw();
Input();
Logic();
Sleep(10); // to slow down the game.
}
Snake_gameover();
return 0;
}
| [
"noreply@github.com"
] | going4distance.noreply@github.com |
489b29334ca66f54999f6dd6cc1805fd467545a4 | 13b29bde05a3fe138caff9f07073722ab0811089 | /src/angle_pid.h | a93edde0128f0b843f2d29944b83a03c26646a70 | [] | no_license | Navigation-Team/uscturtle_motion | 5d2f2f9ff291f76121119c3a7df2217afd942510 | e40e8b00cf5dcd512cb705bf34e668d39d01f6d4 | refs/heads/master | 2020-03-25T02:57:30.383063 | 2018-08-15T07:00:59 | 2018-08-15T07:00:59 | 143,315,446 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,697 | h | #ifndef ANGLE_PID_H
#define ANGLE_PID_H
#include <chrono>
#include <thread>
#include <cmath>
#include <iostream>
// Class that performs angular PID on a system.
// Is templated so it can be used with either floats or doubles.
// NOTE: Angles input into the class don't have to be normalized
template<typename FPType>
class AnglePID
{
// controls whether value data will be printed, and whether PID constants
// will be read from an environment variable
bool _debug;
FPType _kP;
FPType _kI;
FPType _kD;
uint32_t _numCyclesUnderThreshold;
// if an update has error are below this value, numCyclesUnderThreshold is incremented
const FPType _completeThreshold;
// guaranteed to already be normalized
FPType _target;
// data from previous iterations
FPType _integral;
FPType _prevError;
// time of previous update
std::chrono::steady_clock::time_point _prevTimestamp;
// force angle to be between 0 and 360
static FPType normalizeAngle(FPType origAngle)
{
while(origAngle > 360.0)
{
origAngle -= 360.0;
}
while(origAngle < 0.0)
{
origAngle += 360.0;
}
return origAngle;
}
public:
AnglePID(bool debug, FPType kP, FPType kI, FPType kD, FPType target, FPType completeThreshold):
_debug(debug),
_kP(kP),
_kI(kI),
_kD(kD),
_numCyclesUnderThreshold(0),
_completeThreshold(completeThreshold),
_target(normalizeAngle(target)),
_integral(0),
_prevError(0),
_prevTimestamp(std::chrono::steady_clock::now())
{
// override PID constants from environment variables if they exist
if(getenv("DEBUG_KP") != nullptr)
{
std::istringstream kpStream(std::string(getenv("DEBUG_KP")));
kpStream >> _kP;
}
if(getenv("DEBUG_KI") != nullptr)
{
std::istringstream kpStream(std::string(getenv("DEBUG_KI")));
kpStream >> _kI;
}
if(getenv("DEBUG_KD") != nullptr)
{
std::istringstream kpStream(std::string(getenv("DEBUG_KD")));
kpStream >> _kD;
}
if(_debug)
{
// print CSV output column headers
ROS_INFO("target, current, error, P, I, D, correction");
}
}
void setTarget(FPType newTarget)
{
_target = normalizeAngle(newTarget);
}
// returns the number of PID update cycles that the actual value
// has been under the threshold valud here.
uint32_t getCyclesUnderThreshold() const
{
return _numCyclesUnderThreshold;
}
// update using the current value and return the new output adjustment.
// Detects time between calls and adjusts the math appropriate for me
FPType update(FPType current)
{
current = normalizeAngle(current);
// get delta time in integer microseconds, then convert to floating point seconds
FPType deltaTime = std::chrono::duration_cast<std::chrono::microseconds>(std::chrono::steady_clock::now() - _prevTimestamp).count() / 1e6;
_prevTimestamp = std::chrono::steady_clock::now();
// calculate angluar error
FPType error;
if(current > 270.0 && _target < 90.0)
{
error = (current - 360) - _target;
}
else if(current < 90.0 && _target > 270.0)
{
error = current - (_target - 360.0);
}
else
{
error = current - _target;
}
// update integral
_integral += error * deltaTime;
// calculate PID values
FPType P = _kP * error;
FPType I = _kI * _integral;
FPType D = -1 * _kD * (error-_prevError) / deltaTime;
FPType correction = P + I + D;
if(_debug)
{
ROS_INFO("%.04f, %.04f, %.04f, %.04f, %.04f, %.04f, %.04f", _target, current, error, P, I, D, correction);
}
// check for value under threshold
if(abs(error) < _completeThreshold)
{
++_numCyclesUnderThreshold;
}
else
{
_numCyclesUnderThreshold = 0;
}
_prevError = error;
return correction;
}
};
#endif | [
"jsmith@crackofdawn.onmicrosoft.com"
] | jsmith@crackofdawn.onmicrosoft.com |
157a712a181302861bdeb550321974214def8157 | 3f0e4545e869e3e45958e09d3ec5408b919268e4 | /ADS/tree/RBTRTEST.H | 059b74aaf4b14a53b9b504239c3415fd0b85da92 | [] | no_license | ethancodes/reallyoldcode | 813bae889f0e3c396f82f1a20e79adf05231a87d | 58fddfe11132685002f8d1fa813449f734249bb8 | refs/heads/master | 2020-03-30T07:50:36.014691 | 2012-09-05T12:35:57 | 2012-09-05T12:35:57 | 5,686,889 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 565 | h | //file rbtrtest.h
//Created January 29, 1995 by J. TenEyck
#ifndef _RED_BLACK_TEST_H
#define _RED_BLACK_TEST_H
#include "rbtree.h"
enum menu_choice {add,del,showoff,query,quit};
template <class T>
class RedBlackTest {
private:
void insert(RedBlackTree<T> & b, T v);
void remove(RedBlackTree<T> & b, T v);
int IsFound(RedBlackTree<T> & b, T v);
void ShowAll(RedBlackTree<T> & b);
void MainMenu(RedBlackTree<T> & b, menu_choice menu_item);
menu_choice MenuDisplay();
public:
RedBlackTest(RedBlackTree<T> &);
};
#endif
| [
"e@ethancodes.com"
] | e@ethancodes.com |
c0d9e95dd742a8884290dbf054bff398c48b6114 | 08b8cf38e1936e8cec27f84af0d3727321cec9c4 | /data/crawl/git/new_hunk_2103.cpp | 2c3f73436c9195d09fdd31b321378670ce37fae8 | [] | no_license | ccdxc/logSurvey | eaf28e9c2d6307140b17986d5c05106d1fd8e943 | 6b80226e1667c1e0760ab39160893ee19b0e9fb1 | refs/heads/master | 2022-01-07T21:31:55.446839 | 2018-04-21T14:12:43 | 2018-04-21T14:12:43 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 553 | cpp | struct ref_lock *lock;
struct stat loginfo;
int log = !lstat(git_path("logs/%s", oldrefname), &loginfo);
struct strbuf err = STRBUF_INIT;
if (log && S_ISLNK(loginfo.st_mode))
return error("reflog for %s is a symlink", oldrefname);
if (!resolve_ref_unsafe(oldrefname, RESOLVE_REF_READING, orig_sha1, &flag))
return error("refname %s not found", oldrefname);
if (flag & REF_ISSYMREF)
return error("refname %s is a symbolic ref, renaming it is not supported",
oldrefname);
if (!rename_ref_available(oldrefname, newrefname))
return 1;
| [
"993273596@qq.com"
] | 993273596@qq.com |
f1168cc68681de761b8b086e3bfdf1646ab561ca | 2e368bbce5f867db9046f45130bbbae06e3fbe1d | /Others/uniqueElement.cpp | d2b8afc2c8100b65c307fd0b21f6752a33e3100d | [] | no_license | Andresrodart/Hobbies | 2b66c5adc8054b5f8e4c58129f49b0af420383ec | f1d29f3d30104d41aa80b7cea0aae7730a2cf6d8 | refs/heads/master | 2022-10-24T18:33:31.707102 | 2022-10-22T00:10:15 | 2022-10-22T00:10:15 | 172,858,524 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 356 | cpp | #include <vector>
/*
for an arry of values int return the
same array but with only the unique values.
Te array es oredered.
*/
void uniqueElem(std::vector<int> &arr){
int lastSeen = 0;
for(int i = 1; i < arr.size(); i++)
if(arr[i] != arr[lastSeen]){
arr[i] == arr[lastSeen] + 1;
lastSeen = i;
}
} | [
"arodartel1601@alumno.ipn.mx"
] | arodartel1601@alumno.ipn.mx |
bf3640215fd82fb9f1b62c47509429ccd16573ba | 1de5da21967c2837d45e9620b4084eab20f1d4b0 | /C++/やさしいC++/Sample/09/Sample6.cpp | 9513089b84e12ab8f3d11b3283768c851c9ab383 | [] | no_license | haruto-k/PC-Same-party | d283db37a830c815c11720dc1b49c5098a0ff20b | 4db731da665a932f9d2f80f301170aebc2c34026 | refs/heads/master | 2020-05-20T13:28:25.049473 | 2019-05-08T11:21:45 | 2019-05-08T11:21:45 | null | 0 | 0 | null | null | null | null | SHIFT_JIS | C++ | false | false | 429 | cpp | #include <iostream>
using namespace std;
int main()
{
int test[5] = {80,60,55,22,75};
cout << "test[0]の値は" << test[0] << "です。\n";
cout << "test[0]のアドレスは" << &test[0] << "です。\n";
cout << "testの値は" << test << "です。\n";
cout << "test+1の値は" << test+1 << "です。\n";
cout << "*(test+1)の値は" << *(test+1) << "です。\n";
return 0;
}
| [
"toritoribox@gmail.com"
] | toritoribox@gmail.com |
986798b4b55fd69f34025af67e23fdfedebc78f7 | 2f078361c5890e46fdebbc85db1649484513f0d9 | /UVaProblems/graph_theory/topological_sort/872/k.cpp | 234a918cc5bb6c3c696013616c703a94a2813bfc | [] | no_license | joseg4570/OJ_problems | 6bdcb29d8e52ef56024c53f105ed6f00cce60bea | c60d3dc0e569cb5955d7b60b94e9e551a37f0023 | refs/heads/master | 2021-01-11T10:19:49.866093 | 2016-10-31T19:33:31 | 2016-10-31T19:33:31 | 72,462,656 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,378 | cpp | #include <cstdio>
#include <iostream>
#include <algorithm>
#include <vector>
#include <map>
using namespace std;
typedef vector<char> vs;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef map<char,int> c_i;
vs let;
int n,T,selected;
char A,B,h,a,b;
c_i reg;
vi parent;
vi ans;
bool f_case,s_found;
bool ok(int node)
{ if(selected & (1<<node))
return 0;
if((selected & parent[node]) == parent[node])
return 1;
return 0;
}
void backtracking(int level)
{ if(level == n)
{ cout << let[ans[0]];
for(int i=1;i<n;i++)
cout << ' ' << let[ans[i]];
cout << '\n';
s_found = 1;
}
for(int i=0;i<n;i++)
if(ok(i))
{ ans[level] = i;
selected += (1<<i);
backtracking(level + 1);
selected -= (1<<i);
}
}
int main()
{ f_case = 1;
scanf("%d%*c%*c",&T);
while(T--)
{ if(!f_case)
printf("\n"),scanf("%*c");
f_case = s_found = selected = 0;
let.clear();
while(scanf("%c%c",&A,&h) && h != '\n')
let.push_back(A);
let.push_back(A);
sort(let.begin(),let.end());
n = let.size();
parent.assign(n,0);
ans.assign(n,0);
for(int i=0;i<n;i++)
reg[let[i]] = i;
while(scanf("%c%*c%c%c",&A,&B,&h) && h != '\n')
{ a = reg[A];
b = reg[B];
parent[b] |= (1 << a);
}
a = reg[A];
b = reg[B];
parent[b] |= (1 << a);
//printf("%d\n",n);
backtracking(0);
if(!s_found)
cout << "NO\n";
}
return 0;
}
| [
"joseg4570@gmail.com"
] | joseg4570@gmail.com |
44570d57113fb8c6dfa45feb262a2cdf978b3f31 | b9c1098de9e26cedad92f6071b060dfeb790fbae | /3rdparty/openmpt/src/openmpt/sounddevice/SoundDeviceDirectSound.cpp | e4005d9d3941d0d7dc75d6fa2c827fe76d6fc022 | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | vitamin-caig/zxtune | 2a6f38a941f3ba2548a0eb8310eb5c61bb934dbe | 9940f3f0b0b3b19e94a01cebf803d1a14ba028a1 | refs/heads/master | 2023-08-31T01:03:45.603265 | 2023-08-27T11:50:45 | 2023-08-27T11:51:26 | 13,986,319 | 138 | 13 | null | 2021-09-13T13:58:32 | 2013-10-30T12:51:01 | C++ | UTF-8 | C++ | false | false | 15,706 | cpp | /* SPDX-License-Identifier: BSD-3-Clause */
/* SPDX-FileCopyrightText: Olivier Lapicque */
/* SPDX-FileCopyrightText: OpenMPT Project Developers and Contributors */
#include "openmpt/all/BuildSettings.hpp"
#include "SoundDeviceDirectSound.hpp"
#include "SoundDevice.hpp"
#include "SoundDeviceUtilities.hpp"
#include "mpt/base/detect.hpp"
#include "mpt/base/numeric.hpp"
#include "mpt/base/saturate_round.hpp"
#include "mpt/format/message_macros.hpp"
#include "mpt/format/simple.hpp"
#include "mpt/string/types.hpp"
#include "mpt/string_convert/convert.hpp"
#include "mpt/uuid/guid.hpp"
#include "mpt/uuid/uuid.hpp"
#include "openmpt/base/Types.hpp"
#include "openmpt/logging/Logger.hpp"
#include "openmpt/soundbase/SampleFormat.hpp"
#include <algorithm>
#include <vector>
#if MPT_OS_WINDOWS
#include <windows.h>
#endif // MPT_OS_WINDOWS
OPENMPT_NAMESPACE_BEGIN
namespace SoundDevice
{
#if defined(MPT_WITH_DIRECTSOUND)
namespace
{
struct DevicesAndLoggerAndSysInfo
{
std::vector<SoundDevice::Info> devices;
ILogger *logger;
SoundDevice::SysInfo sysInfo;
};
} // namespace
static BOOL WINAPI DSEnumCallback(GUID *lpGuid, LPCTSTR lpstrDescription, LPCTSTR lpstrDriver, LPVOID lpContext)
{
DevicesAndLoggerAndSysInfo &devicesAndLoggerAndSysInfo = *(DevicesAndLoggerAndSysInfo *)lpContext;
std::vector<SoundDevice::Info> &devices = devicesAndLoggerAndSysInfo.devices;
ILogger &logger = *devicesAndLoggerAndSysInfo.logger;
SoundDevice::SysInfo &sysInfo = devicesAndLoggerAndSysInfo.sysInfo;
auto GetLogger = [&]() -> ILogger &
{
return logger;
};
if(!lpstrDescription)
{
return TRUE;
}
GUID guid = (lpGuid ? *lpGuid : GUID());
SoundDevice::Info info;
info.type = TypeDSOUND;
info.default_ = (!lpGuid ? Info::Default::Managed : Info::Default::None);
info.internalID = mpt::convert<mpt::ustring>(mpt::GUIDToString(guid));
info.name = mpt::convert<mpt::ustring>(mpt::winstring(lpstrDescription));
if(lpstrDriver)
{
info.extraData[MPT_USTRING("DriverName")] = mpt::convert<mpt::ustring>(mpt::winstring(lpstrDriver));
}
if(lpGuid)
{
info.extraData[MPT_USTRING("UUID")] = mpt::format<mpt::ustring>::val(mpt::UUID(guid));
}
info.apiName = MPT_USTRING("DirectSound");
info.useNameAsIdentifier = false;
// clang-format off
info.flags = {
sysInfo.SystemClass == mpt::osinfo::osclass::Windows ? sysInfo.IsWindowsOriginal() && sysInfo.WindowsVersion.IsBefore(mpt::osinfo::windows::Version::Win7) ? Info::Usability::Usable : Info::Usability::Deprecated : Info::Usability::NotAvailable,
Info::Level::Primary,
sysInfo.SystemClass == mpt::osinfo::osclass::Windows && sysInfo.IsWindowsWine() ? Info::Compatible::Yes : Info::Compatible::No,
sysInfo.SystemClass == mpt::osinfo::osclass::Windows ? sysInfo.IsWindowsWine() ? Info::Api::Emulated : sysInfo.WindowsVersion.IsAtLeast(mpt::osinfo::windows::Version::WinVista) ? Info::Api::Emulated : Info::Api::Native : Info::Api::Emulated,
Info::Io::OutputOnly,
Info::Mixing::Software,
Info::Implementor::OpenMPT
};
// clang-format on
devices.push_back(info);
return TRUE;
}
std::vector<SoundDevice::Info> CDSoundDevice::EnumerateDevices(ILogger &logger, SoundDevice::SysInfo sysInfo)
{
DevicesAndLoggerAndSysInfo devicesAndLoggerAndSysInfo = {std::vector<SoundDevice::Info>(), &logger, sysInfo};
DirectSoundEnumerate(DSEnumCallback, &devicesAndLoggerAndSysInfo);
return devicesAndLoggerAndSysInfo.devices;
}
CDSoundDevice::CDSoundDevice(ILogger &logger, SoundDevice::Info info, SoundDevice::SysInfo sysInfo)
: CSoundDeviceWithThread(logger, info, sysInfo)
, m_piDS(NULL)
, m_pPrimary(NULL)
, m_pMixBuffer(NULL)
, m_nDSoundBufferSize(0)
, m_bMixRunning(FALSE)
, m_dwWritePos(0)
, m_StatisticLatencyFrames(0)
, m_StatisticPeriodFrames(0)
{
return;
}
CDSoundDevice::~CDSoundDevice()
{
Close();
}
SoundDevice::Caps CDSoundDevice::InternalGetDeviceCaps()
{
SoundDevice::Caps caps;
caps.Available = true;
caps.CanUpdateInterval = true;
caps.CanSampleFormat = true;
caps.CanExclusiveMode = false;
caps.CanBoostThreadPriority = true;
caps.CanUseHardwareTiming = false;
caps.CanChannelMapping = false;
caps.CanInput = false;
caps.HasNamedInputSources = false;
caps.CanDriverPanel = false;
caps.ExclusiveModeDescription = MPT_USTRING("Use primary buffer");
caps.DefaultSettings.sampleFormat = (GetSysInfo().IsOriginal() && GetSysInfo().WindowsVersion.IsAtLeast(mpt::osinfo::windows::Version::WinVista)) ? SampleFormat::Float32 : SampleFormat::Int16;
IDirectSound *dummy = nullptr;
IDirectSound *ds = nullptr;
if(m_piDS)
{
ds = m_piDS;
} else
{
GUID guid = mpt::StringToGUID(mpt::convert<mpt::winstring>(GetDeviceInternalID()));
if(DirectSoundCreate(mpt::IsValid(guid) ? &guid : NULL, &dummy, NULL) != DS_OK)
{
return caps;
}
if(!dummy)
{
return caps;
}
ds = dummy;
}
DSCAPS dscaps = {};
dscaps.dwSize = sizeof(dscaps);
if(DS_OK == ds->GetCaps(&dscaps))
{
if(!(dscaps.dwFlags & DSCAPS_EMULDRIVER))
{
caps.CanExclusiveMode = true;
}
}
if(dummy)
{
dummy->Release();
dummy = nullptr;
}
ds = nullptr;
return caps;
}
SoundDevice::DynamicCaps CDSoundDevice::GetDeviceDynamicCaps(const std::vector<uint32> &baseSampleRates)
{
SoundDevice::DynamicCaps caps;
IDirectSound *dummy = nullptr;
IDirectSound *ds = nullptr;
if(m_piDS)
{
ds = m_piDS;
} else
{
GUID guid = mpt::StringToGUID(mpt::convert<mpt::winstring>(GetDeviceInternalID()));
if(DirectSoundCreate(mpt::IsValid(guid) ? &guid : NULL, &dummy, NULL) != DS_OK)
{
return caps;
}
if(!dummy)
{
return caps;
}
ds = dummy;
}
DSCAPS dscaps = {};
dscaps.dwSize = sizeof(dscaps);
if(DS_OK == ds->GetCaps(&dscaps))
{
if(dscaps.dwMaxSecondarySampleRate == 0)
{
// nothing known about supported sample rates
} else
{
for(const auto &rate : baseSampleRates)
{
if(dscaps.dwMinSecondarySampleRate <= rate && rate <= dscaps.dwMaxSecondarySampleRate)
{
caps.supportedSampleRates.push_back(rate);
caps.supportedExclusiveSampleRates.push_back(rate);
}
}
}
if(GetSysInfo().IsOriginal() && GetSysInfo().WindowsVersion.IsAtLeast(mpt::osinfo::windows::Version::WinVista))
{
// Vista
caps.supportedSampleFormats = {SampleFormat::Float32};
caps.supportedExclusiveModeSampleFormats = {SampleFormat::Float32};
} else if(!(dscaps.dwFlags & DSCAPS_EMULDRIVER))
{
// XP wdm
caps.supportedSampleFormats = {SampleFormat::Float32, SampleFormat::Int32, SampleFormat::Int24, SampleFormat::Int16, SampleFormat::Unsigned8};
caps.supportedExclusiveModeSampleFormats.clear();
if(dscaps.dwFlags & DSCAPS_PRIMARY8BIT)
{
caps.supportedExclusiveModeSampleFormats.push_back(SampleFormat::Unsigned8);
}
if(dscaps.dwFlags & DSCAPS_PRIMARY16BIT)
{
caps.supportedExclusiveModeSampleFormats.push_back(SampleFormat::Int16);
}
if(caps.supportedExclusiveModeSampleFormats.empty())
{
caps.supportedExclusiveModeSampleFormats = {SampleFormat::Float32, SampleFormat::Int32, SampleFormat::Int24, SampleFormat::Int16, SampleFormat::Unsigned8};
}
} else
{
// XP vdx
// nothing, announce all, fail later
caps.supportedSampleFormats = {SampleFormat::Float32, SampleFormat::Int32, SampleFormat::Int24, SampleFormat::Int16, SampleFormat::Unsigned8};
caps.supportedExclusiveModeSampleFormats = {SampleFormat::Float32, SampleFormat::Int32, SampleFormat::Int24, SampleFormat::Int16, SampleFormat::Unsigned8};
}
}
if(dummy)
{
dummy->Release();
dummy = nullptr;
}
ds = nullptr;
return caps;
}
bool CDSoundDevice::InternalOpen()
{
if(m_Settings.InputChannels > 0) return false;
WAVEFORMATEXTENSIBLE wfext;
if(!FillWaveFormatExtensible(wfext, m_Settings)) return false;
WAVEFORMATEX *pwfx = &wfext.Format;
const uint32 bytesPerFrame = static_cast<uint32>(m_Settings.GetBytesPerFrame());
DSBUFFERDESC dsbd;
DSBCAPS dsc;
if(m_piDS) return true;
GUID guid = mpt::StringToGUID(mpt::convert<mpt::winstring>(GetDeviceInternalID()));
if(DirectSoundCreate(mpt::IsValid(guid) ? &guid : NULL, &m_piDS, NULL) != DS_OK) return false;
if(!m_piDS) return false;
if(m_piDS->SetCooperativeLevel(m_AppInfo.GetHWND(), m_Settings.ExclusiveMode ? DSSCL_WRITEPRIMARY : DSSCL_PRIORITY) != DS_OK)
{
Close();
return false;
}
m_bMixRunning = FALSE;
m_nDSoundBufferSize = mpt::saturate_round<int32>(m_Settings.Latency * pwfx->nAvgBytesPerSec);
m_nDSoundBufferSize = mpt::align_up<uint32>(m_nDSoundBufferSize, bytesPerFrame);
m_nDSoundBufferSize = std::clamp(m_nDSoundBufferSize, mpt::align_up<uint32>(DSBSIZE_MIN, bytesPerFrame), mpt::align_down<uint32>(DSBSIZE_MAX, bytesPerFrame));
if(!m_Settings.ExclusiveMode)
{
// Set the format of the primary buffer
dsbd.dwSize = sizeof(dsbd);
dsbd.dwFlags = DSBCAPS_PRIMARYBUFFER;
dsbd.dwBufferBytes = 0;
dsbd.dwReserved = 0;
dsbd.lpwfxFormat = NULL;
if(m_piDS->CreateSoundBuffer(&dsbd, &m_pPrimary, NULL) != DS_OK)
{
Close();
return false;
}
if(m_pPrimary->SetFormat(pwfx) != DS_OK)
{
Close();
return false;
}
// Create the secondary buffer
dsbd.dwSize = sizeof(dsbd);
dsbd.dwFlags = DSBCAPS_GLOBALFOCUS | DSBCAPS_GETCURRENTPOSITION2;
dsbd.dwBufferBytes = m_nDSoundBufferSize;
dsbd.dwReserved = 0;
dsbd.lpwfxFormat = pwfx;
if(m_piDS->CreateSoundBuffer(&dsbd, &m_pMixBuffer, NULL) != DS_OK)
{
Close();
return false;
}
} else
{
dsbd.dwSize = sizeof(dsbd);
dsbd.dwFlags = DSBCAPS_PRIMARYBUFFER | DSBCAPS_STICKYFOCUS | DSBCAPS_GETCURRENTPOSITION2;
dsbd.dwBufferBytes = 0;
dsbd.dwReserved = 0;
dsbd.lpwfxFormat = NULL;
if(m_piDS->CreateSoundBuffer(&dsbd, &m_pPrimary, NULL) != DS_OK)
{
Close();
return false;
}
if(m_pPrimary->SetFormat(pwfx) != DS_OK)
{
Close();
return false;
}
dsc.dwSize = sizeof(dsc);
if(m_pPrimary->GetCaps(&dsc) != DS_OK)
{
Close();
return false;
}
m_nDSoundBufferSize = dsc.dwBufferBytes;
m_pMixBuffer = m_pPrimary;
m_pMixBuffer->AddRef();
}
if(m_Settings.sampleFormat == SampleFormat::Int8)
{
m_Settings.sampleFormat = SampleFormat::Unsigned8;
}
LPVOID lpBuf1, lpBuf2;
DWORD dwSize1, dwSize2;
if(m_pMixBuffer->Lock(0, m_nDSoundBufferSize, &lpBuf1, &dwSize1, &lpBuf2, &dwSize2, 0) == DS_OK)
{
UINT zero = (pwfx->wBitsPerSample == 8) ? 0x80 : 0x00;
if((lpBuf1) && (dwSize1)) memset(lpBuf1, zero, dwSize1);
if((lpBuf2) && (dwSize2)) memset(lpBuf2, zero, dwSize2);
m_pMixBuffer->Unlock(lpBuf1, dwSize1, lpBuf2, dwSize2);
} else
{
DWORD dwStat = 0;
m_pMixBuffer->GetStatus(&dwStat);
if(dwStat & DSBSTATUS_BUFFERLOST) m_pMixBuffer->Restore();
}
m_dwWritePos = 0xFFFFFFFF;
SetWakeupInterval(std::min(m_Settings.UpdateInterval, m_nDSoundBufferSize / (2.0 * m_Settings.GetBytesPerSecond())));
m_Flags.WantsClippedOutput = (GetSysInfo().IsOriginal() && GetSysInfo().WindowsVersion.IsAtLeast(mpt::osinfo::windows::Version::WinVista));
return true;
}
bool CDSoundDevice::InternalClose()
{
if(m_pMixBuffer)
{
m_pMixBuffer->Release();
m_pMixBuffer = NULL;
}
if(m_pPrimary)
{
m_pPrimary->Release();
m_pPrimary = NULL;
}
if(m_piDS)
{
m_piDS->Release();
m_piDS = NULL;
}
m_bMixRunning = FALSE;
return true;
}
void CDSoundDevice::StartFromSoundThread()
{
// done in InternalFillAudioBuffer
}
void CDSoundDevice::StopFromSoundThread()
{
if(m_pMixBuffer)
{
m_pMixBuffer->Stop();
}
m_bMixRunning = FALSE;
}
void CDSoundDevice::InternalFillAudioBuffer()
{
if(!m_pMixBuffer)
{
RequestClose();
return;
}
if(m_nDSoundBufferSize == 0)
{
RequestClose();
return;
}
DWORD dwLatency = 0;
for(int refillCount = 0; refillCount < 2; ++refillCount)
{
// Refill the buffer at most twice so we actually sleep some time when CPU is overloaded.
const uint32 bytesPerFrame = static_cast<uint32>(m_Settings.GetBytesPerFrame());
DWORD dwPlay = 0;
DWORD dwWrite = 0;
if(m_pMixBuffer->GetCurrentPosition(&dwPlay, &dwWrite) != DS_OK)
{
RequestClose();
return;
}
uint32 dwBytes = m_nDSoundBufferSize / 2;
if(!m_bMixRunning)
{
// startup
m_dwWritePos = dwWrite;
dwLatency = 0;
} else
{
// running
dwLatency = (m_dwWritePos - dwPlay + m_nDSoundBufferSize) % m_nDSoundBufferSize;
dwLatency = (dwLatency + m_nDSoundBufferSize - 1) % m_nDSoundBufferSize + 1;
dwBytes = (dwPlay - m_dwWritePos + m_nDSoundBufferSize) % m_nDSoundBufferSize;
dwBytes = std::clamp(dwBytes, uint32(0), m_nDSoundBufferSize / 2); // limit refill amount to half the buffer size
}
dwBytes = dwBytes / bytesPerFrame * bytesPerFrame; // truncate to full frame
if(dwBytes < bytesPerFrame)
{
// ok, nothing to do
return;
}
void *buf1 = nullptr;
void *buf2 = nullptr;
DWORD dwSize1 = 0;
DWORD dwSize2 = 0;
HRESULT hr = m_pMixBuffer->Lock(m_dwWritePos, dwBytes, &buf1, &dwSize1, &buf2, &dwSize2, 0);
if(hr == DSERR_BUFFERLOST)
{
// buffer lost, restore buffer and try again, fail if it fails again
if(m_pMixBuffer->Restore() != DS_OK)
{
RequestClose();
return;
}
if(m_pMixBuffer->Lock(m_dwWritePos, dwBytes, &buf1, &dwSize1, &buf2, &dwSize2, 0) != DS_OK)
{
RequestClose();
return;
}
} else if(hr != DS_OK)
{
RequestClose();
return;
}
CallbackLockedAudioReadPrepare(dwSize1 / bytesPerFrame + dwSize2 / bytesPerFrame, dwLatency / bytesPerFrame);
CallbackLockedAudioProcessVoid(buf1, nullptr, dwSize1 / bytesPerFrame);
CallbackLockedAudioProcessVoid(buf2, nullptr, dwSize2 / bytesPerFrame);
m_StatisticLatencyFrames.store(dwLatency / bytesPerFrame);
m_StatisticPeriodFrames.store(dwSize1 / bytesPerFrame + dwSize2 / bytesPerFrame);
if(m_pMixBuffer->Unlock(buf1, dwSize1, buf2, dwSize2) != DS_OK)
{
CallbackLockedAudioProcessDone();
RequestClose();
return;
}
m_dwWritePos += dwSize1 + dwSize2;
m_dwWritePos %= m_nDSoundBufferSize;
CallbackLockedAudioProcessDone();
DWORD dwStatus = 0;
m_pMixBuffer->GetStatus(&dwStatus);
if(!m_bMixRunning || !(dwStatus & DSBSTATUS_PLAYING))
{
if(!(dwStatus & DSBSTATUS_BUFFERLOST))
{
// start playing
hr = m_pMixBuffer->Play(0, 0, DSBPLAY_LOOPING);
} else
{
// buffer lost flag is set, do not try start playing, we know it will fail with DSERR_BUFFERLOST.
hr = DSERR_BUFFERLOST;
}
if(hr == DSERR_BUFFERLOST)
{
// buffer lost, restore buffer and try again, fail if it fails again
if(m_pMixBuffer->Restore() != DS_OK)
{
RequestClose();
return;
}
if(m_pMixBuffer->Play(0, 0, DSBPLAY_LOOPING) != DS_OK)
{
RequestClose();
return;
}
} else if(hr != DS_OK)
{
RequestClose();
return;
}
m_bMixRunning = TRUE;
}
if(dwBytes < m_nDSoundBufferSize / 2)
{
// Sleep again if we did fill less than half the buffer size.
// Otherwise it's a better idea to refill again right away.
break;
}
}
}
SoundDevice::BufferAttributes CDSoundDevice::InternalGetEffectiveBufferAttributes() const
{
SoundDevice::BufferAttributes bufferAttributes;
bufferAttributes.Latency = m_nDSoundBufferSize * 1.0 / m_Settings.GetBytesPerSecond();
bufferAttributes.UpdateInterval = std::min(m_Settings.UpdateInterval, m_nDSoundBufferSize / (2.0 * m_Settings.GetBytesPerSecond()));
bufferAttributes.NumBuffers = 1;
return bufferAttributes;
}
SoundDevice::Statistics CDSoundDevice::GetStatistics() const
{
MPT_SOUNDDEV_TRACE_SCOPE();
SoundDevice::Statistics result;
result.InstantaneousLatency = 1.0 * m_StatisticLatencyFrames.load() / m_Settings.Samplerate;
result.LastUpdateInterval = 1.0 * m_StatisticPeriodFrames.load() / m_Settings.Samplerate;
result.text = mpt::ustring();
return result;
}
#endif // MPT_WITH_DIRECTSOUND
} // namespace SoundDevice
OPENMPT_NAMESPACE_END
| [
"vitamin.caig@gmail.com"
] | vitamin.caig@gmail.com |
51382c7f18d39afa4b10c8772898e92581a9cac4 | 80964d157a56467fda540a9ea5f627b9cfe273f6 | /juliafunctions.cpp | cde6d701bfda666132c5b70a065efafa442b1e1b | [] | no_license | moskovets/kg_project | 7470663cffad44244da0132507347f61128f1f1a | 780321742c49a162210e1a185bcb177fd423d421 | refs/heads/master | 2020-03-07T18:04:14.023120 | 2018-04-11T23:02:02 | 2018-04-11T23:02:02 | 127,627,645 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 29 | cpp | #include "juliafunctions.h"
| [
"n.moskovets@yandex.ru"
] | n.moskovets@yandex.ru |
9a34512a9b2c251e7e2f314172ad4ebac75216ed | f54d561e884707601fc2a09b012c605df512b50f | /Binary.cpp | f84b4c9b8442540c4baa49f4414bd0a7700ad62a | [] | no_license | FahimCC/Data-Structure | e903e5d0b81da61c5b291609cc8897e001ba4907 | b063f2509f5bf522383926c3e693422b19393d70 | refs/heads/main | 2023-03-30T01:30:06.271388 | 2021-04-08T13:17:12 | 2021-04-08T13:17:12 | 337,717,707 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 834 | cpp | #include<stdio.h>
int main()
{
int BEG,END,MID,ITEM,LOC=NULL,DATA[1000],n,i;
printf("Enter the number of element: ");
scanf("%d",&n);
printf("Enter the number: \n");
for(i=1;i<=n;i++)
{
scanf("%d",&DATA[i]);
}
printf("Enter the search item: ");
scanf("%d",&ITEM);
BEG = 1;
END = n-1;
MID = (BEG+END)/2;
while(BEG<=MID && DATA[MID]!=ITEM)
{
if(ITEM < DATA[MID])
{
END = MID-1;
}
else
{
BEG = MID+1;
}
MID = (BEG+END)/2;
}
if(DATA[MID]==ITEM)
{
LOC = MID;
printf("\n%d Data found ai location: %d\n",ITEM,LOC);
}
else
{
LOC = NULL;
printf("%d Data not found.\n",ITEM);
}
return 0;
}
| [
"noreply@github.com"
] | FahimCC.noreply@github.com |
9b599298392fbe8a7774076412570047920ba3c7 | 582fb473d12beeb612beeb4fd2e15362163868d2 | /linux.davidson.cc.nc.us/student/public/GETLINE.CPP | 0a57c8f7cab01537254a07e9fd9af16a76fa431d | [] | no_license | fsamuels/highschool-coursework | 3bb97d39681d300296f671c4a55737e8682dfe87 | eb9fcc741941c07391906c2527d9e76daf0e5295 | refs/heads/master | 2021-01-13T11:12:35.942585 | 2017-02-08T23:59:31 | 2017-02-08T23:59:31 | 81,388,890 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 466 | cpp | #include <iostream> // 1 File name: getline.cpp
#include <fstream> // 2
#include <string> // 3
using namespace std; // 4
int main() // 6
{ // 7
string aLine;
ifstream inFile("getline.cpp"); // This file
int lineCount = 0;
while( getline(inFile, aLine) )
{
lineCount++; // 14
}
cout << "Lines in getline.cpp: " << lineCount << endl;
return 0;
} // 19
| [
"forrest@homegauge.com"
] | forrest@homegauge.com |
377b34da2f41236724a007c3e50508f184199164 | cee0a5fa9b69093b9a533e0236be6131dc032877 | /cs371p/quizzes/Quiz25.c++ | 8ee4ae0e1079a92470f8ebf3b80b003850636950 | [] | no_license | ztschir/Object-Oriented-Programming | 7484b98624b560e6008b9f863d87af0512da9a10 | f5048a358af655ba3c194b5f7ebcb12d3037b55f | refs/heads/master | 2021-01-01T17:42:55.743067 | 2013-03-07T04:18:53 | 2013-03-07T04:18:53 | 8,619,875 | 0 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 1,261 | /*
CS371p: Quiz #25 (5 pts)
*/
/* -----------------------------------------------------------------------
1. A piece of software that fulfills its requirements and yet exhibits any
or all of the following three traits has a bad design.
List any two.
[The Dependency Inversion Principle]
(2 pts)
1. It is hard to change because every change affects too many other parts
of the system.
(Rigidity)
2. When you make a change, unexpected parts of the system break.
(Fragility)
3. It is hard to reuse in another application because it cannot be
disentangled from the current application.
(Immobility)
*/
/* -----------------------------------------------------------------------
2. What is the output of the call to f()?
Alternatively, it might not compile.
If a line doesn't compile, why not?
There is no syntax error.
(2 pts)
2
*/
#include <iostream> // cout, endl
using namespace std;
template <typename T>
void f (const T&);
template <typename T>
class A {
friend void f<T>(const T&);
private:
T _v;
public:
A (const T& v) :
_v (v)
{}};
template <typename T>
void f (const T& v) {
A<T> x(v);
cout << x._v << endl;}
int main () {
f(2);
return 0;}
| [
"ztschir@gmail.com"
] | ztschir@gmail.com | |
1b9df5bd58fc4a24e7d8cc8f139b5d18479651dd | c6ced56bcff2311571866f2ce2ba07566297b6ad | /Faux Galaga/TileMap.cpp | 45fa3c1ee9ee525db697e986aefe21e7418d1a7e | [] | no_license | bdanielsimmons/Scrolling-Shooter-in-SDL | 2f448673e568c6cfe8926e5406bfef22bd6ca6d2 | fa107fd31dfe5e3d3c5c530c17c7ddf5d6c5d7d8 | refs/heads/master | 2020-07-31T21:57:05.528047 | 2016-11-13T07:17:14 | 2016-11-13T07:17:14 | 73,590,288 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 547 | cpp | #include <SDL.h>
#include <iostream>
#include <vector>
/*class Tile {
private:
public:
int x, y, w, h;
static std::vector<Tile> Tiles;
Tile(int x, int y, int w, int h) {
this->x = x;
this->y = y;
this->w = w;
this->h = h;
}
void createTile(int,int,int,int);
void Update();
void Draw(SDL_Renderer*);
};
std::vector<Tile> Tiles;
void Tile::Draw(SDL_Renderer* ren) {
SDL_SetRenderDrawColor(ren, 255, 255, 0, 255);
for (Tile &p : Tiles) {
SDL_Rect rect;
rect.x = p.x;
rect.y = p.y;
rect.w = p.w;
rect.h = p.h;
SDL_RenderFillRect(ren, &rect);
}
}*/
| [
"bdanielsimmons@gmail.com"
] | bdanielsimmons@gmail.com |
398d5802ed3506bfda22e940c5d2b0f67bb3226f | 31ded232e01e73c3c58a7e5e6ae62be92ccb0782 | /libs/camera/CameraParameters.cpp | 94c74814a9d877a688df10aaab9d9a9f4183d3a4 | [
"LicenseRef-scancode-unicode",
"Apache-2.0"
] | permissive | Krylon360/android_frameworks_base_encore_aokp_ics | becc7ef24d99cbf444d521dc954954860fac1eff | b60feec4b93717d35ed4fa9426c6487012aa2766 | HEAD | 2016-09-05T10:54:56.842719 | 2012-08-12T06:15:44 | 2012-08-12T06:15:44 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 31,456 | cpp | /*
**
** Copyright 2008, 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.
*/
#define LOG_TAG "CameraParams"
#include <utils/Log.h>
#include <string.h>
#include <stdlib.h>
#include <camera/CameraParameters.h>
namespace android {
// Parameter keys to communicate between camera application and driver.
const char CameraParameters::KEY_PREVIEW_SIZE[] = "preview-size";
const char CameraParameters::KEY_SUPPORTED_PREVIEW_SIZES[] = "preview-size-values";
#ifdef QCOM_HARDWARE
const char CameraParameters::KEY_SUPPORTED_HFR_SIZES[] = "hfr-size-values";
#endif
const char CameraParameters::KEY_PREVIEW_FORMAT[] = "preview-format";
const char CameraParameters::KEY_SUPPORTED_PREVIEW_FORMATS[] = "preview-format-values";
const char CameraParameters::KEY_PREVIEW_FRAME_RATE[] = "preview-frame-rate";
const char CameraParameters::KEY_SUPPORTED_PREVIEW_FRAME_RATES[] = "preview-frame-rate-values";
const char CameraParameters::KEY_PREVIEW_FPS_RANGE[] = "preview-fps-range";
const char CameraParameters::KEY_SUPPORTED_PREVIEW_FPS_RANGE[] = "preview-fps-range-values";
#ifdef QCOM_HARDWARE
const char CameraParameters::KEY_PREVIEW_FRAME_RATE_MODE[] = "preview-frame-rate-mode";
const char CameraParameters::KEY_SUPPORTED_PREVIEW_FRAME_RATE_MODES[] = "preview-frame-rate-modes";
const char CameraParameters::KEY_PREVIEW_FRAME_RATE_AUTO_MODE[] = "frame-rate-auto";
const char CameraParameters::KEY_PREVIEW_FRAME_RATE_FIXED_MODE[] = "frame-rate-fixed";
//Values for Continuous AF
const char CameraParameters::CAF_OFF[] = "caf-off";
const char CameraParameters::CAF_ON[] = "caf-on";
//Same, for CodeAurora-based blobs
const char CameraParameters::CAPTURE_MODE_NORMAL[] = "normal";
const char CameraParameters::CAPTURE_MODE_BURST[] = "burst";
const char CameraParameters::CAPTURE_MODE_CONTI_BURST[] = "contiburst";
const char CameraParameters::CAPTURE_MODE_HDR[] = "hdr";
const char CameraParameters::CAPTURE_MODE_HJR[] = "hjr";
const char CameraParameters::CAPTURE_MODE_PANORAMA[] = "panorama";
const char CameraParameters::CONTINUOUS_AF_OFF[] = "caf-off";
const char CameraParameters::CONTINUOUS_AF_ON[] = "caf-on";
const char CameraParameters::KEY_CONTINUOUS_AF[] = "continuous-af";
const char CameraParameters::KEY_CAPTURE_MODE[] = "capture-mode";
const char CameraParameters::KEY_PICTURE_COUNT[] = "picture-count";
const char CameraParameters::KEY_MAX_BURST_PICTURE_COUNT[] = "max-burst-picture-count";
const char CameraParameters::KEY_SUPPORTED_CONTINUOUS_AF[] = "continuous-af-mode";
const char CameraParameters::KEY_SUPPORTED_CAPTURE_MODES[] = "capture-mode-values";
#endif
const char CameraParameters::KEY_PICTURE_SIZE[] = "picture-size";
const char CameraParameters::KEY_SUPPORTED_PICTURE_SIZES[] = "picture-size-values";
const char CameraParameters::KEY_PICTURE_FORMAT[] = "picture-format";
const char CameraParameters::KEY_SUPPORTED_PICTURE_FORMATS[] = "picture-format-values";
const char CameraParameters::KEY_JPEG_THUMBNAIL_WIDTH[] = "jpeg-thumbnail-width";
const char CameraParameters::KEY_JPEG_THUMBNAIL_HEIGHT[] = "jpeg-thumbnail-height";
const char CameraParameters::KEY_SUPPORTED_JPEG_THUMBNAIL_SIZES[] = "jpeg-thumbnail-size-values";
const char CameraParameters::KEY_JPEG_THUMBNAIL_QUALITY[] = "jpeg-thumbnail-quality";
const char CameraParameters::KEY_JPEG_QUALITY[] = "jpeg-quality";
const char CameraParameters::KEY_ROTATION[] = "rotation";
const char CameraParameters::KEY_GPS_LATITUDE[] = "gps-latitude";
const char CameraParameters::KEY_GPS_LONGITUDE[] = "gps-longitude";
const char CameraParameters::KEY_GPS_ALTITUDE[] = "gps-altitude";
const char CameraParameters::KEY_GPS_TIMESTAMP[] = "gps-timestamp";
const char CameraParameters::KEY_GPS_PROCESSING_METHOD[] = "gps-processing-method";
const char CameraParameters::KEY_WHITE_BALANCE[] = "whitebalance";
const char CameraParameters::KEY_SUPPORTED_WHITE_BALANCE[] = "whitebalance-values";
const char CameraParameters::KEY_EFFECT[] = "effect";
const char CameraParameters::KEY_SUPPORTED_EFFECTS[] = "effect-values";
#ifdef QCOM_HARDWARE
const char CameraParameters::KEY_TOUCH_AF_AEC[] = "touch-af-aec";
const char CameraParameters::KEY_SUPPORTED_TOUCH_AF_AEC[] = "touch-af-aec-values";
const char CameraParameters::KEY_TOUCH_INDEX_AEC[] = "touch-index-aec";
const char CameraParameters::KEY_TOUCH_INDEX_AF[] = "touch-index-af";
#endif
const char CameraParameters::KEY_ANTIBANDING[] = "antibanding";
const char CameraParameters::KEY_SUPPORTED_ANTIBANDING[] = "antibanding-values";
const char CameraParameters::KEY_SCENE_MODE[] = "scene-mode";
const char CameraParameters::KEY_SUPPORTED_SCENE_MODES[] = "scene-mode-values";
#ifdef QCOM_HARDWARE
const char CameraParameters::KEY_SCENE_DETECT[] = "scene-detect";
const char CameraParameters::KEY_SUPPORTED_SCENE_DETECT[] = "scene-detect-values";
#endif
const char CameraParameters::KEY_FLASH_MODE[] = "flash-mode";
const char CameraParameters::KEY_SUPPORTED_FLASH_MODES[] = "flash-mode-values";
const char CameraParameters::KEY_FOCUS_MODE[] = "focus-mode";
const char CameraParameters::KEY_SUPPORTED_FOCUS_MODES[] = "focus-mode-values";
const char CameraParameters::KEY_MAX_NUM_FOCUS_AREAS[] = "max-num-focus-areas";
const char CameraParameters::KEY_FOCUS_AREAS[] = "focus-areas";
const char CameraParameters::KEY_FOCAL_LENGTH[] = "focal-length";
const char CameraParameters::KEY_HORIZONTAL_VIEW_ANGLE[] = "horizontal-view-angle";
const char CameraParameters::KEY_VERTICAL_VIEW_ANGLE[] = "vertical-view-angle";
const char CameraParameters::KEY_EXPOSURE_COMPENSATION[] = "exposure-compensation";
const char CameraParameters::KEY_MAX_EXPOSURE_COMPENSATION[] = "max-exposure-compensation";
const char CameraParameters::KEY_MIN_EXPOSURE_COMPENSATION[] = "min-exposure-compensation";
const char CameraParameters::KEY_EXPOSURE_COMPENSATION_STEP[] = "exposure-compensation-step";
const char CameraParameters::KEY_AUTO_EXPOSURE_LOCK[] = "auto-exposure-lock";
const char CameraParameters::KEY_AUTO_EXPOSURE_LOCK_SUPPORTED[] = "auto-exposure-lock-supported";
const char CameraParameters::KEY_AUTO_WHITEBALANCE_LOCK[] = "auto-whitebalance-lock";
const char CameraParameters::KEY_AUTO_WHITEBALANCE_LOCK_SUPPORTED[] = "auto-whitebalance-lock-supported";
const char CameraParameters::KEY_MAX_NUM_METERING_AREAS[] = "max-num-metering-areas";
const char CameraParameters::KEY_METERING_AREAS[] = "metering-areas";
const char CameraParameters::KEY_ZOOM[] = "zoom";
const char CameraParameters::KEY_MAX_ZOOM[] = "max-zoom";
const char CameraParameters::KEY_ZOOM_RATIOS[] = "zoom-ratios";
const char CameraParameters::KEY_ZOOM_SUPPORTED[] = "zoom-supported";
const char CameraParameters::KEY_SMOOTH_ZOOM_SUPPORTED[] = "smooth-zoom-supported";
const char CameraParameters::KEY_FOCUS_DISTANCES[] = "focus-distances";
const char CameraParameters::KEY_VIDEO_FRAME_FORMAT[] = "video-frame-format";
#ifdef QCOM_HARDWARE
const char CameraParameters::KEY_ISO_MODE[] = "iso";
const char CameraParameters::KEY_SUPPORTED_ISO_MODES[] = "iso-values";
const char CameraParameters::KEY_LENSSHADE[] = "lensshade";
const char CameraParameters::KEY_SUPPORTED_LENSSHADE_MODES[] = "lensshade-values";
const char CameraParameters::KEY_AUTO_EXPOSURE[] = "auto-exposure";
const char CameraParameters::KEY_SUPPORTED_AUTO_EXPOSURE[] = "auto-exposure-values";
const char CameraParameters::KEY_DENOISE[] = "denoise";
const char CameraParameters::KEY_SUPPORTED_DENOISE[] = "denoise-values";
const char CameraParameters::KEY_SELECTABLE_ZONE_AF[] = "selectable-zone-af";
const char CameraParameters::KEY_SUPPORTED_SELECTABLE_ZONE_AF[] = "selectable-zone-af-values";
const char CameraParameters::KEY_FACE_DETECTION[] = "face-detection";
const char CameraParameters::KEY_SUPPORTED_FACE_DETECTION[] = "face-detection-values";
const char CameraParameters::KEY_MEMORY_COLOR_ENHANCEMENT[] = "mce";
const char CameraParameters::KEY_SUPPORTED_MEM_COLOR_ENHANCE_MODES[] = "mce-values";
const char CameraParameters::KEY_VIDEO_HIGH_FRAME_RATE[] = "video-hfr";
const char CameraParameters::KEY_SUPPORTED_VIDEO_HIGH_FRAME_RATE_MODES[] = "video-hfr-values";
const char CameraParameters::KEY_REDEYE_REDUCTION[] = "redeye-reduction";
const char CameraParameters::KEY_SUPPORTED_REDEYE_REDUCTION[] = "redeye-reduction-values";
const char CameraParameters::KEY_HIGH_DYNAMIC_RANGE_IMAGING[] = "hdr";
const char CameraParameters::KEY_SUPPORTED_HDR_IMAGING_MODES[] = "hdr-values";
#endif
#ifdef SAMSUNG_CAMERA_HARDWARE
const char CameraParameters::KEY_METERING[] = "metering";
const char CameraParameters::KEY_WDR[] = "wdr";
const char CameraParameters::KEY_ANTI_SHAKE_MODE[] = "anti-shake";
#endif
const char CameraParameters::KEY_VIDEO_SIZE[] = "video-size";
const char CameraParameters::KEY_SUPPORTED_VIDEO_SIZES[] = "video-size-values";
const char CameraParameters::KEY_PREFERRED_PREVIEW_SIZE_FOR_VIDEO[] = "preferred-preview-size-for-video";
const char CameraParameters::KEY_MAX_NUM_DETECTED_FACES_HW[] = "max-num-detected-faces-hw";
const char CameraParameters::KEY_MAX_NUM_DETECTED_FACES_SW[] = "max-num-detected-faces-sw";
const char CameraParameters::KEY_RECORDING_HINT[] = "recording-hint";
const char CameraParameters::KEY_VIDEO_SNAPSHOT_SUPPORTED[] = "video-snapshot-supported";
const char CameraParameters::KEY_FULL_VIDEO_SNAP_SUPPORTED[] = "full-video-snap-supported";
const char CameraParameters::KEY_VIDEO_STABILIZATION[] = "video-stabilization";
const char CameraParameters::KEY_VIDEO_STABILIZATION_SUPPORTED[] = "video-stabilization-supported";
#ifdef QCOM_HARDWARE
const char CameraParameters::KEY_ZSL[] = "zsl";
const char CameraParameters::KEY_SUPPORTED_ZSL_MODES[] = "zsl-values";
const char CameraParameters::KEY_CAMERA_MODE[] = "camera-mode";
#endif
const char CameraParameters::KEY_AE_BRACKET_HDR[] = "ae-bracket-hdr";
/*only effective when KEY_AE_BRACKET_HDR set to ae_bracketing*/
//const char CameraParameters::KEY_AE_BRACKET_SETTING_KEY[] = "ae-bracket-setting";
const char CameraParameters::TRUE[] = "true";
const char CameraParameters::FALSE[] = "false";
const char CameraParameters::FOCUS_DISTANCE_INFINITY[] = "Infinity";
// Values for white balance settings.
const char CameraParameters::WHITE_BALANCE_AUTO[] = "auto";
const char CameraParameters::WHITE_BALANCE_INCANDESCENT[] = "incandescent";
const char CameraParameters::WHITE_BALANCE_FLUORESCENT[] = "fluorescent";
const char CameraParameters::WHITE_BALANCE_WARM_FLUORESCENT[] = "warm-fluorescent";
const char CameraParameters::WHITE_BALANCE_DAYLIGHT[] = "daylight";
const char CameraParameters::WHITE_BALANCE_CLOUDY_DAYLIGHT[] = "cloudy-daylight";
const char CameraParameters::WHITE_BALANCE_TWILIGHT[] = "twilight";
const char CameraParameters::WHITE_BALANCE_SHADE[] = "shade";
// Values for effect settings.
const char CameraParameters::EFFECT_NONE[] = "none";
const char CameraParameters::EFFECT_MONO[] = "mono";
const char CameraParameters::EFFECT_NEGATIVE[] = "negative";
const char CameraParameters::EFFECT_SOLARIZE[] = "solarize";
const char CameraParameters::EFFECT_SEPIA[] = "sepia";
const char CameraParameters::EFFECT_POSTERIZE[] = "posterize";
const char CameraParameters::EFFECT_WHITEBOARD[] = "whiteboard";
const char CameraParameters::EFFECT_BLACKBOARD[] = "blackboard";
const char CameraParameters::EFFECT_AQUA[] = "aqua";
#ifdef QCOM_HARDWARE
const char CameraParameters::EFFECT_EMBOSS[] = "emboss";
const char CameraParameters::EFFECT_SKETCH[] = "sketch";
const char CameraParameters::EFFECT_NEON[] = "neon";
// Values for auto exposure settings.
const char CameraParameters::TOUCH_AF_AEC_OFF[] = "touch-off";
const char CameraParameters::TOUCH_AF_AEC_ON[] = "touch-on";
#endif
// Values for antibanding settings.
const char CameraParameters::ANTIBANDING_AUTO[] = "auto";
const char CameraParameters::ANTIBANDING_50HZ[] = "50hz";
const char CameraParameters::ANTIBANDING_60HZ[] = "60hz";
const char CameraParameters::ANTIBANDING_OFF[] = "off";
// Values for flash mode settings.
const char CameraParameters::FLASH_MODE_OFF[] = "off";
const char CameraParameters::FLASH_MODE_AUTO[] = "auto";
const char CameraParameters::FLASH_MODE_ON[] = "on";
const char CameraParameters::FLASH_MODE_RED_EYE[] = "red-eye";
const char CameraParameters::FLASH_MODE_TORCH[] = "torch";
// Values for scene mode settings.
const char CameraParameters::SCENE_MODE_AUTO[] = "auto"; // corresponds to CAMERA_BESTSHOT_OFF in HAL
const char CameraParameters::SCENE_MODE_ASD[] = "asd"; // corresponds to CAMERA_BESTSHOT_AUTO in HAL
const char CameraParameters::SCENE_MODE_ACTION[] = "action";
const char CameraParameters::SCENE_MODE_PORTRAIT[] = "portrait";
const char CameraParameters::SCENE_MODE_LANDSCAPE[] = "landscape";
const char CameraParameters::SCENE_MODE_NIGHT[] = "night";
const char CameraParameters::SCENE_MODE_NIGHT_PORTRAIT[] = "night-portrait";
const char CameraParameters::SCENE_MODE_THEATRE[] = "theatre";
const char CameraParameters::SCENE_MODE_BEACH[] = "beach";
const char CameraParameters::SCENE_MODE_SNOW[] = "snow";
const char CameraParameters::SCENE_MODE_SUNSET[] = "sunset";
const char CameraParameters::SCENE_MODE_STEADYPHOTO[] = "steadyphoto";
const char CameraParameters::SCENE_MODE_FIREWORKS[] = "fireworks";
const char CameraParameters::SCENE_MODE_SPORTS[] = "sports";
const char CameraParameters::SCENE_MODE_PARTY[] = "party";
const char CameraParameters::SCENE_MODE_CANDLELIGHT[] = "candlelight";
#ifdef QCOM_HARDWARE
const char CameraParameters::SCENE_MODE_BACKLIGHT[] = "backlight";
const char CameraParameters::SCENE_MODE_FLOWERS[] = "flowers";
#endif
const char CameraParameters::SCENE_MODE_BARCODE[] = "barcode";
#ifdef QCOM_HARDWARE
const char CameraParameters::SCENE_MODE_AR[] = "AR";
const char CameraParameters::SCENE_MODE_OFF[] = "off";
// Values for auto scene detection settings.
const char CameraParameters::SCENE_DETECT_OFF[] = "off";
const char CameraParameters::SCENE_DETECT_ON[] = "on";
#endif
// Formats for setPreviewFormat and setPictureFormat.
const char CameraParameters::PIXEL_FORMAT_YUV422SP[] = "yuv422sp";
const char CameraParameters::PIXEL_FORMAT_YUV420SP[] = "yuv420sp";
#ifdef QCOM_HARDWARE
const char CameraParameters::PIXEL_FORMAT_YUV420SP_ADRENO[] = "yuv420sp-adreno";
#endif
const char CameraParameters::PIXEL_FORMAT_YUV422I[] = "yuv422i-yuyv";
const char CameraParameters::PIXEL_FORMAT_YUV420P[] = "yuv420p";
const char CameraParameters::PIXEL_FORMAT_RGB565[] = "rgb565";
const char CameraParameters::PIXEL_FORMAT_RGBA8888[] = "rgba8888";
const char CameraParameters::PIXEL_FORMAT_JPEG[] = "jpeg";
const char CameraParameters::PIXEL_FORMAT_BAYER_RGGB[] = "bayer-rggb";
#ifdef QCOM_HARDWARE
const char CameraParameters::PIXEL_FORMAT_RAW[] = "raw";
const char CameraParameters::PIXEL_FORMAT_YV12[] = "yuv420p";
const char CameraParameters::PIXEL_FORMAT_NV12[] = "nv12";
#endif
// Values for focus mode settings.
const char CameraParameters::FOCUS_MODE_AUTO[] = "auto";
const char CameraParameters::FOCUS_MODE_INFINITY[] = "infinity";
const char CameraParameters::FOCUS_MODE_MACRO[] = "macro";
const char CameraParameters::FOCUS_MODE_FIXED[] = "fixed";
const char CameraParameters::FOCUS_MODE_EDOF[] = "edof";
const char CameraParameters::FOCUS_MODE_CONTINUOUS_VIDEO[] = "continuous-video";
const char CameraParameters::FOCUS_MODE_CONTINUOUS_PICTURE[] = "continuous-picture";
#ifdef QCOM_HARDWARE
const char CameraParameters::FOCUS_MODE_CONTINUOUS_CAMERA[] = "continuous-camera";
const char CameraParameters::FOCUS_MODE_NORMAL[] = "normal";
const char CameraParameters::KEY_SKIN_TONE_ENHANCEMENT[] = "skinToneEnhancement";
const char CameraParameters::KEY_SUPPORTED_SKIN_TONE_ENHANCEMENT_MODES[] = "skinToneEnhancement-values";
// Values for ISO Settings
const char CameraParameters::ISO_AUTO[] = "auto";
const char CameraParameters::ISO_HJR[] = "ISO_HJR";
const char CameraParameters::ISO_100[] = "ISO100";
const char CameraParameters::ISO_200[] = "ISO200";
const char CameraParameters::ISO_400[] = "ISO400";
const char CameraParameters::ISO_800[] = "ISO800";
const char CameraParameters::ISO_1600[] = "ISO1600";
//Values for Lens Shading
const char CameraParameters::LENSSHADE_ENABLE[] = "enable";
const char CameraParameters::LENSSHADE_DISABLE[] = "disable";
// Values for auto exposure settings.
const char CameraParameters::AUTO_EXPOSURE_FRAME_AVG[] = "frame-average";
const char CameraParameters::AUTO_EXPOSURE_CENTER_WEIGHTED[] = "center-weighted";
const char CameraParameters::AUTO_EXPOSURE_SPOT_METERING[] = "spot-metering";
const char CameraParameters::KEY_GPS_LATITUDE_REF[] = "gps-latitude-ref";
const char CameraParameters::KEY_GPS_LONGITUDE_REF[] = "gps-longitude-ref";
const char CameraParameters::KEY_GPS_ALTITUDE_REF[] = "gps-altitude-ref";
const char CameraParameters::KEY_GPS_STATUS[] = "gps-status";
const char CameraParameters::KEY_EXIF_DATETIME[] = "exif-datetime";
const char CameraParameters::KEY_HISTOGRAM[] = "histogram";
const char CameraParameters::KEY_SUPPORTED_HISTOGRAM_MODES[] = "histogram-values";
//Values for Histogram Shading
const char CameraParameters::HISTOGRAM_ENABLE[] = "enable";
const char CameraParameters::HISTOGRAM_DISABLE[] = "disable";
//Values for Skin Tone Enhancement Modes
const char CameraParameters::SKIN_TONE_ENHANCEMENT_ENABLE[] = "enable";
const char CameraParameters::SKIN_TONE_ENHANCEMENT_DISABLE[] = "disable";
const char CameraParameters::KEY_SHARPNESS[] = "sharpness";
#ifdef QCOM_HARDWARE
const char CameraParameters::KEY_MAX_SHARPNESS[] = "sharpness-max";
const char CameraParameters::KEY_MIN_SHARPNESS[] = "sharpness-min";
#else
const char CameraParameters::KEY_MAX_SHARPNESS[] = "max-sharpness";
#endif
const char CameraParameters::KEY_CONTRAST[] = "contrast";
#ifdef QCOM_HARDWARE
const char CameraParameters::KEY_MAX_CONTRAST[] = "contrast-max";
const char CameraParameters::KEY_MIN_CONTRAST[] = "contrast-min";
#else
const char CameraParameters::KEY_MAX_CONTRAST[] = "max-contrast";
#endif
const char CameraParameters::KEY_SATURATION[] = "saturation";
#ifdef QCOM_HARDWARE
const char CameraParameters::KEY_MAX_SATURATION[] = "saturation-max";
const char CameraParameters::KEY_MIN_SATURATION[] = "saturation-min";
#else
const char CameraParameters::KEY_MAX_SATURATION[] = "max-saturation";
#endif
//Values for DENOISE
const char CameraParameters::DENOISE_OFF[] = "denoise-off";
const char CameraParameters::DENOISE_ON[] = "denoise-on";
// Values for selectable zone af Settings
const char CameraParameters::SELECTABLE_ZONE_AF_AUTO[] = "auto";
const char CameraParameters::SELECTABLE_ZONE_AF_SPOT_METERING[] = "spot-metering";
const char CameraParameters::SELECTABLE_ZONE_AF_CENTER_WEIGHTED[] = "center-weighted";
const char CameraParameters::SELECTABLE_ZONE_AF_FRAME_AVERAGE[] = "frame-average";
// Values for Face Detection settings.
const char CameraParameters::FACE_DETECTION_OFF[] = "off";
const char CameraParameters::FACE_DETECTION_ON[] = "on";
// Values for MCE settings.
const char CameraParameters::MCE_ENABLE[] = "enable";
const char CameraParameters::MCE_DISABLE[] = "disable";
// Values for HFR settings.
const char CameraParameters::VIDEO_HFR_OFF[] = "off";
const char CameraParameters::VIDEO_HFR_2X[] = "60";
const char CameraParameters::VIDEO_HFR_3X[] = "90";
const char CameraParameters::VIDEO_HFR_4X[] = "120";
// Values for Redeye Reduction settings.
const char CameraParameters::REDEYE_REDUCTION_ENABLE[] = "enable";
const char CameraParameters::REDEYE_REDUCTION_DISABLE[] = "disable";
// Values for HDR settings.
const char CameraParameters::HDR_ENABLE[] = "enable";
const char CameraParameters::HDR_DISABLE[] = "disable";
// Values for ZSL settings.
const char CameraParameters::ZSL_OFF[] = "off";
const char CameraParameters::ZSL_ON[] = "on";
// Values for HDR Bracketing settings.
const char CameraParameters::AE_BRACKET_HDR_OFF[] = "Off";
const char CameraParameters::AE_BRACKET_HDR[] = "HDR";
const char CameraParameters::AE_BRACKET[] = "AE-Bracket";
static const char* portrait = "portrait";
static const char* landscape = "landscape";
int CameraParameters::getOrientation() const
{
const char* orientation = get("orientation");
if (orientation && !strcmp(orientation, portrait))
return CAMERA_ORIENTATION_PORTRAIT;
return CAMERA_ORIENTATION_LANDSCAPE;
}
void CameraParameters::setOrientation(int orientation)
{
if (orientation == CAMERA_ORIENTATION_PORTRAIT) {
set("orientation", portrait);
} else {
set("orientation", landscape);
}
}
#endif
CameraParameters::CameraParameters()
: mMap()
{
}
CameraParameters::~CameraParameters()
{
}
String8 CameraParameters::flatten() const
{
String8 flattened("");
size_t size = mMap.size();
for (size_t i = 0; i < size; i++) {
String8 k, v;
k = mMap.keyAt(i);
v = mMap.valueAt(i);
flattened += k;
flattened += "=";
flattened += v;
if (i != size-1)
flattened += ";";
}
return flattened;
}
void CameraParameters::unflatten(const String8 ¶ms)
{
const char *a = params.string();
const char *b;
mMap.clear();
for (;;) {
// Find the bounds of the key name.
b = strchr(a, '=');
if (b == 0)
break;
// Create the key string.
String8 k(a, (size_t)(b-a));
// Find the value.
a = b+1;
b = strchr(a, ';');
if (b == 0) {
// If there's no semicolon, this is the last item.
String8 v(a);
mMap.add(k, v);
break;
}
String8 v(a, (size_t)(b-a));
mMap.add(k, v);
a = b+1;
}
}
void CameraParameters::set(const char *key, const char *value)
{
// XXX i think i can do this with strspn()
if (strchr(key, '=') || strchr(key, ';')) {
//XXX LOGE("Key \"%s\"contains invalid character (= or ;)", key);
return;
}
if (strchr(value, '=') || strchr(key, ';')) {
//XXX LOGE("Value \"%s\"contains invalid character (= or ;)", value);
return;
}
mMap.replaceValueFor(String8(key), String8(value));
}
void CameraParameters::set(const char *key, int value)
{
char str[16];
snprintf(str, sizeof(str), "%d", value);
set(key, str);
}
void CameraParameters::setFloat(const char *key, float value)
{
char str[16]; // 14 should be enough. We overestimate to be safe.
snprintf(str, sizeof(str), "%g", value);
set(key, str);
}
const char *CameraParameters::get(const char *key) const
{
String8 v = mMap.valueFor(String8(key));
if (v.length() == 0)
return 0;
return v.string();
}
int CameraParameters::getInt(const char *key) const
{
const char *v = get(key);
if (v == 0)
return -1;
return strtol(v, 0, 0);
}
float CameraParameters::getFloat(const char *key) const
{
const char *v = get(key);
if (v == 0) return -1;
return strtof(v, 0);
}
void CameraParameters::remove(const char *key)
{
mMap.removeItem(String8(key));
}
// Parse string like "640x480" or "10000,20000"
static int parse_pair(const char *str, int *first, int *second, char delim,
char **endptr = NULL)
{
// Find the first integer.
char *end;
int w = (int)strtol(str, &end, 10);
// If a delimeter does not immediately follow, give up.
if (*end != delim) {
LOGE("Cannot find delimeter (%c) in str=%s", delim, str);
return -1;
}
// Find the second integer, immediately after the delimeter.
int h = (int)strtol(end+1, &end, 10);
*first = w;
*second = h;
if (endptr) {
*endptr = end;
}
return 0;
}
// Parse string like "(1, 2, 3, 4, ..., N)"
// num is pointer to an allocated array of size N
static int parseNDimVector(const char *str, int *num, int N, char delim = ',')
{
char *start, *end;
if(num == NULL) {
LOGE("Invalid output array (num == NULL)");
return -1;
}
//check if string starts and ends with parantheses
if(str[0] != '(' || str[strlen(str)-1] != ')') {
LOGE("Invalid format of string %s, valid format is (n1, n2, n3, n4 ...)", str);
return -1;
}
start = (char*) str;
start++;
for(int i=0; i<N; i++) {
*(num+i) = (int) strtol(start, &end, 10);
if(*end != delim && i < N-1) {
LOGE("Cannot find delimeter '%c' in string \"%s\". end = %c", delim, str, *end);
return -1;
}
start = end+1;
}
return 0;
}
static void parseSizesList(const char *sizesStr, Vector<Size> &sizes)
{
if (sizesStr == 0) {
return;
}
char *sizeStartPtr = (char *)sizesStr;
while (true) {
int width, height;
int success = parse_pair(sizeStartPtr, &width, &height, 'x',
&sizeStartPtr);
if (success == -1 || (*sizeStartPtr != ',' && *sizeStartPtr != '\0')) {
LOGE("Picture sizes string \"%s\" contains invalid character.", sizesStr);
return;
}
sizes.push(Size(width, height));
if (*sizeStartPtr == '\0') {
return;
}
sizeStartPtr++;
}
}
void CameraParameters::setPreviewSize(int width, int height)
{
char str[32];
snprintf(str, sizeof(str), "%dx%d", width, height);
set(KEY_PREVIEW_SIZE, str);
}
void CameraParameters::getPreviewSize(int *width, int *height) const
{
*width = *height = -1;
// Get the current string, if it doesn't exist, leave the -1x-1
const char *p = get(KEY_PREVIEW_SIZE);
if (p == 0) return;
parse_pair(p, width, height, 'x');
}
void CameraParameters::getPreferredPreviewSizeForVideo(int *width, int *height) const
{
*width = *height = -1;
const char *p = get(KEY_PREFERRED_PREVIEW_SIZE_FOR_VIDEO);
if (p == 0) return;
parse_pair(p, width, height, 'x');
}
void CameraParameters::getSupportedPreviewSizes(Vector<Size> &sizes) const
{
const char *previewSizesStr = get(KEY_SUPPORTED_PREVIEW_SIZES);
parseSizesList(previewSizesStr, sizes);
}
#ifdef QCOM_HARDWARE
void CameraParameters::getSupportedHfrSizes(Vector<Size> &sizes) const
{
const char *hfrSizesStr = get(KEY_SUPPORTED_HFR_SIZES);
parseSizesList(hfrSizesStr, sizes);
}
void CameraParameters::setPreviewFpsRange(int minFPS, int maxFPS)
{
char str[32];
snprintf(str, sizeof(str), "%d,%d",minFPS,maxFPS);
set(KEY_PREVIEW_FPS_RANGE,str);
}
void CameraParameters::setPostviewSize(int width, int height)
{
// dummy
}
#endif
void CameraParameters::setVideoSize(int width, int height)
{
char str[32];
sprintf(str, "%dx%d", width, height);
set(KEY_VIDEO_SIZE, str);
}
void CameraParameters::getVideoSize(int *width, int *height) const
{
*width = *height = -1;
const char *p = get(KEY_VIDEO_SIZE);
if (p == 0) return;
parse_pair(p, width, height, 'x');
}
void CameraParameters::getSupportedVideoSizes(Vector<Size> &sizes) const
{
const char *videoSizesStr = get(KEY_SUPPORTED_VIDEO_SIZES);
parseSizesList(videoSizesStr, sizes);
}
void CameraParameters::setPreviewFrameRate(int fps)
{
set(KEY_PREVIEW_FRAME_RATE, fps);
}
int CameraParameters::getPreviewFrameRate() const
{
return getInt(KEY_PREVIEW_FRAME_RATE);
}
void CameraParameters::getPreviewFpsRange(int *min_fps, int *max_fps) const
{
*min_fps = *max_fps = -1;
const char *p = get(KEY_PREVIEW_FPS_RANGE);
if (p == 0) return;
parse_pair(p, min_fps, max_fps, ',');
}
#ifdef QCOM_HARDWARE
void CameraParameters::setPreviewFrameRateMode(const char *mode)
{
set(KEY_PREVIEW_FRAME_RATE_MODE, mode);
}
const char *CameraParameters::getPreviewFrameRateMode() const
{
return get(KEY_PREVIEW_FRAME_RATE_MODE);
}
#endif
void CameraParameters::setPreviewFormat(const char *format)
{
set(KEY_PREVIEW_FORMAT, format);
}
const char *CameraParameters::getPreviewFormat() const
{
return get(KEY_PREVIEW_FORMAT);
}
void CameraParameters::setPictureSize(int width, int height)
{
char str[32];
sprintf(str, "%dx%d", width, height);
set(KEY_PICTURE_SIZE, str);
}
void CameraParameters::getPictureSize(int *width, int *height) const
{
*width = *height = -1;
// Get the current string, if it doesn't exist, leave the -1x-1
const char *p = get(KEY_PICTURE_SIZE);
if (p == 0) return;
parse_pair(p, width, height, 'x');
}
void CameraParameters::getSupportedPictureSizes(Vector<Size> &sizes) const
{
const char *pictureSizesStr = get(KEY_SUPPORTED_PICTURE_SIZES);
parseSizesList(pictureSizesStr, sizes);
}
void CameraParameters::setPictureFormat(const char *format)
{
set(KEY_PICTURE_FORMAT, format);
}
const char *CameraParameters::getPictureFormat() const
{
return get(KEY_PICTURE_FORMAT);
}
void CameraParameters::dump() const
{
LOGD("dump: mMap.size = %d", mMap.size());
for (size_t i = 0; i < mMap.size(); i++) {
String8 k, v;
k = mMap.keyAt(i);
v = mMap.valueAt(i);
LOGD("%s: %s\n", k.string(), v.string());
}
}
#ifdef QCOM_HARDWARE
void CameraParameters::setTouchIndexAec(int x, int y)
{
char str[32];
snprintf(str, sizeof(str), "%dx%d", x, y);
set(KEY_TOUCH_INDEX_AEC, str);
}
void CameraParameters::getTouchIndexAec(int *x, int *y) const
{
*x = -1;
*y = -1;
// Get the current string, if it doesn't exist, leave the -1x-1
const char *p = get(KEY_TOUCH_INDEX_AEC);
if (p == 0)
return;
int tempX, tempY;
if (parse_pair(p, &tempX, &tempY, 'x') == 0) {
*x = tempX;
*y = tempY;
}
}
void CameraParameters::setTouchIndexAf(int x, int y)
{
char str[32];
snprintf(str, sizeof(str), "%dx%d", x, y);
set(KEY_TOUCH_INDEX_AF, str);
}
void CameraParameters::getMeteringAreaCenter(int *x, int *y) const
{
//Default invalid values
*x = -2000;
*y = -2000;
const char *p = get(KEY_METERING_AREAS);
if(p != NULL) {
int arr[5] = {-2000, -2000, -2000, -2000, 0};
parseNDimVector(p, arr, 5); //p = "(x1, y1, x2, y2, weight)"
*x = (arr[0] + arr[2])/2; //center_x = (x1+x2)/2
*y = (arr[1] + arr[3])/2; //center_y = (y1+y2)/2
}
}
void CameraParameters::getTouchIndexAf(int *x, int *y) const
{
*x = -1;
*y = -1;
// Get the current string, if it doesn't exist, leave the -1x-1
const char *p = get(KEY_TOUCH_INDEX_AF);
if (p == 0)
return;
int tempX, tempY;
if (parse_pair(p, &tempX, &tempY, 'x') == 0) {
*x = tempX;
*y = tempY;
}
}
#endif
status_t CameraParameters::dump(int fd, const Vector<String16>& args) const
{
const size_t SIZE = 256;
char buffer[SIZE];
String8 result;
snprintf(buffer, 255, "CameraParameters::dump: mMap.size = %d\n", mMap.size());
result.append(buffer);
for (size_t i = 0; i < mMap.size(); i++) {
String8 k, v;
k = mMap.keyAt(i);
v = mMap.valueAt(i);
snprintf(buffer, 255, "\t%s: %s\n", k.string(), v.string());
result.append(buffer);
}
write(fd, result.string(), result.size());
return NO_ERROR;
}
}; // namespace android
| [
"b.t.walter@gmail.com"
] | b.t.walter@gmail.com |
fe8438b339599a56449547d8cc25a3f9bd2e6101 | 32286f7ca7c8d5b4d61efc90075de5edf81eb9ec | /sp/src/thirdparty/protobuf-2.3.0/src/google/protobuf/io/coded_stream.h | 5840970960224b91818080c90bac5579bf7e1261 | [
"LicenseRef-scancode-protobuf",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | saul/source-sdk-2013 | 0c20f31366d36b050e47c6fccc5e8e9815ac5de4 | cc136aae767653f3290589eb9a230fb8aea82383 | refs/heads/master | 2021-01-18T03:32:36.266073 | 2013-08-05T19:09:20 | 2013-08-05T19:09:20 | 11,110,123 | 12 | 1 | null | 2013-08-05T19:01:21 | 2013-07-01T23:34:24 | C++ | UTF-8 | C++ | false | false | 46,086 | h | // Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// http://code.google.com/p/protobuf/
//
// 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 Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// 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.
// Author: kenton@google.com (Kenton Varda)
// Based on original Protocol Buffers design by
// Sanjay Ghemawat, Jeff Dean, and others.
//
// This file contains the CodedInputStream and CodedOutputStream classes,
// which wrap a ZeroCopyInputStream or ZeroCopyOutputStream, respectively,
// and allow you to read or write individual pieces of data in various
// formats. In particular, these implement the varint encoding for
// integers, a simple variable-length encoding in which smaller numbers
// take fewer bytes.
//
// Typically these classes will only be used internally by the protocol
// buffer library in order to encode and decode protocol buffers. Clients
// of the library only need to know about this class if they wish to write
// custom message parsing or serialization procedures.
//
// CodedOutputStream example:
// // Write some data to "myfile". First we write a 4-byte "magic number"
// // to identify the file type, then write a length-delimited string. The
// // string is composed of a varint giving the length followed by the raw
// // bytes.
// int fd = open("myfile", O_WRONLY);
// ZeroCopyOutputStream* raw_output = new FileOutputStream(fd);
// CodedOutputStream* coded_output = new CodedOutputStream(raw_output);
//
// int magic_number = 1234;
// char text[] = "Hello world!";
// coded_output->WriteLittleEndian32(magic_number);
// coded_output->WriteVarint32(strlen(text));
// coded_output->WriteRaw(text, strlen(text));
//
// delete coded_output;
// delete raw_output;
// close(fd);
//
// CodedInputStream example:
// // Read a file created by the above code.
// int fd = open("myfile", O_RDONLY);
// ZeroCopyInputStream* raw_input = new FileInputStream(fd);
// CodedInputStream coded_input = new CodedInputStream(raw_input);
//
// coded_input->ReadLittleEndian32(&magic_number);
// if (magic_number != 1234) {
// cerr << "File not in expected format." << endl;
// return;
// }
//
// uint32 size;
// coded_input->ReadVarint32(&size);
//
// char* text = new char[size + 1];
// coded_input->ReadRaw(buffer, size);
// text[size] = '\0';
//
// delete coded_input;
// delete raw_input;
// close(fd);
//
// cout << "Text is: " << text << endl;
// delete [] text;
//
// For those who are interested, varint encoding is defined as follows:
//
// The encoding operates on unsigned integers of up to 64 bits in length.
// Each byte of the encoded value has the format:
// * bits 0-6: Seven bits of the number being encoded.
// * bit 7: Zero if this is the last byte in the encoding (in which
// case all remaining bits of the number are zero) or 1 if
// more bytes follow.
// The first byte contains the least-significant 7 bits of the number, the
// second byte (if present) contains the next-least-significant 7 bits,
// and so on. So, the binary number 1011000101011 would be encoded in two
// bytes as "10101011 00101100".
//
// In theory, varint could be used to encode integers of any length.
// However, for practicality we set a limit at 64 bits. The maximum encoded
// length of a number is thus 10 bytes.
#ifndef GOOGLE_PROTOBUF_IO_CODED_STREAM_H__
#define GOOGLE_PROTOBUF_IO_CODED_STREAM_H__
#include <string>
#ifdef _PS3
// PS3 is always big endian
#define BIG_ENDIAN 4321
#define LITTLE_ENDIAN 1234
#define BYTE_ORDER BIG_ENDIAN
#else
#ifndef _MSC_VER
// sys/param.h sets BYTE_ORDER on linux/osx
#include <sys/param.h>
#else
// All our known win32 platforms are little endian
#define BIG_ENDIAN 4321
#define LITTLE_ENDIAN 1234
#define BYTE_ORDER LITTLE_ENDIAN
#endif // _MSC_VER
#endif // _PS3
#ifndef BYTE_ORDER
#error;
#endif
#include <google/protobuf/stubs/common.h>
#include <google/protobuf/stubs/common.h> // for GOOGLE_PREDICT_TRUE macro
namespace google {
namespace protobuf {
class DescriptorPool;
class MessageFactory;
namespace io {
// Defined in this file.
class CodedInputStream;
class CodedOutputStream;
// Defined in other files.
class ZeroCopyInputStream; // zero_copy_stream.h
class ZeroCopyOutputStream; // zero_copy_stream.h
// Class which reads and decodes binary data which is composed of varint-
// encoded integers and fixed-width pieces. Wraps a ZeroCopyInputStream.
// Most users will not need to deal with CodedInputStream.
//
// Most methods of CodedInputStream that return a bool return false if an
// underlying I/O error occurs or if the data is malformed. Once such a
// failure occurs, the CodedInputStream is broken and is no longer useful.
class LIBPROTOBUF_EXPORT CodedInputStream {
public:
// Create a CodedInputStream that reads from the given ZeroCopyInputStream.
explicit CodedInputStream(ZeroCopyInputStream* input);
// Create a CodedInputStream that reads from the given flat array. This is
// faster than using an ArrayInputStream. PushLimit(size) is implied by
// this constructor.
explicit CodedInputStream(const uint8* buffer, int size);
// Destroy the CodedInputStream and position the underlying
// ZeroCopyInputStream at the first unread byte. If an error occurred while
// reading (causing a method to return false), then the exact position of
// the input stream may be anywhere between the last value that was read
// successfully and the stream's byte limit.
~CodedInputStream();
// Skips a number of bytes. Returns false if an underlying read error
// occurs.
bool Skip(int count);
// Sets *data to point directly at the unread part of the CodedInputStream's
// underlying buffer, and *size to the size of that buffer, but does not
// advance the stream's current position. This will always either produce
// a non-empty buffer or return false. If the caller consumes any of
// this data, it should then call Skip() to skip over the consumed bytes.
// This may be useful for implementing external fast parsing routines for
// types of data not covered by the CodedInputStream interface.
bool GetDirectBufferPointer(const void** data, int* size);
// Like GetDirectBufferPointer, but this method is inlined, and does not
// attempt to Refresh() if the buffer is currently empty.
inline void GetDirectBufferPointerInline(const void** data,
int* size) GOOGLE_ATTRIBUTE_ALWAYS_INLINE;
// Read raw bytes, copying them into the given buffer.
bool ReadRaw(void* buffer, int size);
// Like ReadRaw, but reads into a string.
//
// Implementation Note: ReadString() grows the string gradually as it
// reads in the data, rather than allocating the entire requested size
// upfront. This prevents denial-of-service attacks in which a client
// could claim that a string is going to be MAX_INT bytes long in order to
// crash the server because it can't allocate this much space at once.
bool ReadString(string* buffer, int size);
// Like the above, with inlined optimizations. This should only be used
// by the protobuf implementation.
inline bool InternalReadStringInline(string* buffer,
int size) GOOGLE_ATTRIBUTE_ALWAYS_INLINE;
// Read a 32-bit little-endian integer.
bool ReadLittleEndian32(uint32* value);
// Read a 64-bit little-endian integer.
bool ReadLittleEndian64(uint64* value);
// These methods read from an externally provided buffer. The caller is
// responsible for ensuring that the buffer has sufficient space.
// Read a 32-bit little-endian integer.
static const uint8* ReadLittleEndian32FromArray(const uint8* buffer,
uint32* value);
// Read a 64-bit little-endian integer.
static const uint8* ReadLittleEndian64FromArray(const uint8* buffer,
uint64* value);
// Read an unsigned integer with Varint encoding, truncating to 32 bits.
// Reading a 32-bit value is equivalent to reading a 64-bit one and casting
// it to uint32, but may be more efficient.
bool ReadVarint32(uint32* value);
// Read an unsigned integer with Varint encoding.
bool ReadVarint64(uint64* value);
// Read a tag. This calls ReadVarint32() and returns the result, or returns
// zero (which is not a valid tag) if ReadVarint32() fails. Also, it updates
// the last tag value, which can be checked with LastTagWas().
// Always inline because this is only called in once place per parse loop
// but it is called for every iteration of said loop, so it should be fast.
// GCC doesn't want to inline this by default.
uint32 ReadTag() GOOGLE_ATTRIBUTE_ALWAYS_INLINE;
// Usually returns true if calling ReadVarint32() now would produce the given
// value. Will always return false if ReadVarint32() would not return the
// given value. If ExpectTag() returns true, it also advances past
// the varint. For best performance, use a compile-time constant as the
// parameter.
// Always inline because this collapses to a small number of instructions
// when given a constant parameter, but GCC doesn't want to inline by default.
bool ExpectTag(uint32 expected) GOOGLE_ATTRIBUTE_ALWAYS_INLINE;
// Like above, except this reads from the specified buffer. The caller is
// responsible for ensuring that the buffer is large enough to read a varint
// of the expected size. For best performance, use a compile-time constant as
// the expected tag parameter.
//
// Returns a pointer beyond the expected tag if it was found, or NULL if it
// was not.
static const uint8* ExpectTagFromArray(
const uint8* buffer,
uint32 expected) GOOGLE_ATTRIBUTE_ALWAYS_INLINE;
// Usually returns true if no more bytes can be read. Always returns false
// if more bytes can be read. If ExpectAtEnd() returns true, a subsequent
// call to LastTagWas() will act as if ReadTag() had been called and returned
// zero, and ConsumedEntireMessage() will return true.
bool ExpectAtEnd();
// If the last call to ReadTag() returned the given value, returns true.
// Otherwise, returns false;
//
// This is needed because parsers for some types of embedded messages
// (with field type TYPE_GROUP) don't actually know that they've reached the
// end of a message until they see an ENDGROUP tag, which was actually part
// of the enclosing message. The enclosing message would like to check that
// tag to make sure it had the right number, so it calls LastTagWas() on
// return from the embedded parser to check.
bool LastTagWas(uint32 expected);
// When parsing message (but NOT a group), this method must be called
// immediately after MergeFromCodedStream() returns (if it returns true)
// to further verify that the message ended in a legitimate way. For
// example, this verifies that parsing did not end on an end-group tag.
// It also checks for some cases where, due to optimizations,
// MergeFromCodedStream() can incorrectly return true.
bool ConsumedEntireMessage();
// Limits ----------------------------------------------------------
// Limits are used when parsing length-delimited embedded messages.
// After the message's length is read, PushLimit() is used to prevent
// the CodedInputStream from reading beyond that length. Once the
// embedded message has been parsed, PopLimit() is called to undo the
// limit.
// Opaque type used with PushLimit() and PopLimit(). Do not modify
// values of this type yourself. The only reason that this isn't a
// struct with private internals is for efficiency.
typedef int Limit;
// Places a limit on the number of bytes that the stream may read,
// starting from the current position. Once the stream hits this limit,
// it will act like the end of the input has been reached until PopLimit()
// is called.
//
// As the names imply, the stream conceptually has a stack of limits. The
// shortest limit on the stack is always enforced, even if it is not the
// top limit.
//
// The value returned by PushLimit() is opaque to the caller, and must
// be passed unchanged to the corresponding call to PopLimit().
Limit PushLimit(int byte_limit);
// Pops the last limit pushed by PushLimit(). The input must be the value
// returned by that call to PushLimit().
void PopLimit(Limit limit);
// Returns the number of bytes left until the nearest limit on the
// stack is hit, or -1 if no limits are in place.
int BytesUntilLimit();
// Total Bytes Limit -----------------------------------------------
// To prevent malicious users from sending excessively large messages
// and causing integer overflows or memory exhaustion, CodedInputStream
// imposes a hard limit on the total number of bytes it will read.
// Sets the maximum number of bytes that this CodedInputStream will read
// before refusing to continue. To prevent integer overflows in the
// protocol buffers implementation, as well as to prevent servers from
// allocating enormous amounts of memory to hold parsed messages, the
// maximum message length should be limited to the shortest length that
// will not harm usability. The theoretical shortest message that could
// cause integer overflows is 512MB. The default limit is 64MB. Apps
// should set shorter limits if possible. If warning_threshold is not -1,
// a warning will be printed to stderr after warning_threshold bytes are
// read. An error will always be printed to stderr if the limit is
// reached.
//
// This is unrelated to PushLimit()/PopLimit().
//
// Hint: If you are reading this because your program is printing a
// warning about dangerously large protocol messages, you may be
// confused about what to do next. The best option is to change your
// design such that excessively large messages are not necessary.
// For example, try to design file formats to consist of many small
// messages rather than a single large one. If this is infeasible,
// you will need to increase the limit. Chances are, though, that
// your code never constructs a CodedInputStream on which the limit
// can be set. You probably parse messages by calling things like
// Message::ParseFromString(). In this case, you will need to change
// your code to instead construct some sort of ZeroCopyInputStream
// (e.g. an ArrayInputStream), construct a CodedInputStream around
// that, then call Message::ParseFromCodedStream() instead. Then
// you can adjust the limit. Yes, it's more work, but you're doing
// something unusual.
void SetTotalBytesLimit(int total_bytes_limit, int warning_threshold);
// Recursion Limit -------------------------------------------------
// To prevent corrupt or malicious messages from causing stack overflows,
// we must keep track of the depth of recursion when parsing embedded
// messages and groups. CodedInputStream keeps track of this because it
// is the only object that is passed down the stack during parsing.
// Sets the maximum recursion depth. The default is 64.
void SetRecursionLimit(int limit);
// Increments the current recursion depth. Returns true if the depth is
// under the limit, false if it has gone over.
bool IncrementRecursionDepth();
// Decrements the recursion depth.
void DecrementRecursionDepth();
// Extension Registry ----------------------------------------------
// ADVANCED USAGE: 99.9% of people can ignore this section.
//
// By default, when parsing extensions, the parser looks for extension
// definitions in the pool which owns the outer message's Descriptor.
// However, you may call SetExtensionRegistry() to provide an alternative
// pool instead. This makes it possible, for example, to parse a message
// using a generated class, but represent some extensions using
// DynamicMessage.
// Set the pool used to look up extensions. Most users do not need to call
// this as the correct pool will be chosen automatically.
//
// WARNING: It is very easy to misuse this. Carefully read the requirements
// below. Do not use this unless you are sure you need it. Almost no one
// does.
//
// Let's say you are parsing a message into message object m, and you want
// to take advantage of SetExtensionRegistry(). You must follow these
// requirements:
//
// The given DescriptorPool must contain m->GetDescriptor(). It is not
// sufficient for it to simply contain a descriptor that has the same name
// and content -- it must be the *exact object*. In other words:
// assert(pool->FindMessageTypeByName(m->GetDescriptor()->full_name()) ==
// m->GetDescriptor());
// There are two ways to satisfy this requirement:
// 1) Use m->GetDescriptor()->pool() as the pool. This is generally useless
// because this is the pool that would be used anyway if you didn't call
// SetExtensionRegistry() at all.
// 2) Use a DescriptorPool which has m->GetDescriptor()->pool() as an
// "underlay". Read the documentation for DescriptorPool for more
// information about underlays.
//
// You must also provide a MessageFactory. This factory will be used to
// construct Message objects representing extensions. The factory's
// GetPrototype() MUST return non-NULL for any Descriptor which can be found
// through the provided pool.
//
// If the provided factory might return instances of protocol-compiler-
// generated (i.e. compiled-in) types, or if the outer message object m is
// a generated type, then the given factory MUST have this property: If
// GetPrototype() is given a Descriptor which resides in
// DescriptorPool::generated_pool(), the factory MUST return the same
// prototype which MessageFactory::generated_factory() would return. That
// is, given a descriptor for a generated type, the factory must return an
// instance of the generated class (NOT DynamicMessage). However, when
// given a descriptor for a type that is NOT in generated_pool, the factory
// is free to return any implementation.
//
// The reason for this requirement is that generated sub-objects may be
// accessed via the standard (non-reflection) extension accessor methods,
// and these methods will down-cast the object to the generated class type.
// If the object is not actually of that type, the results would be undefined.
// On the other hand, if an extension is not compiled in, then there is no
// way the code could end up accessing it via the standard accessors -- the
// only way to access the extension is via reflection. When using reflection,
// DynamicMessage and generated messages are indistinguishable, so it's fine
// if these objects are represented using DynamicMessage.
//
// Using DynamicMessageFactory on which you have called
// SetDelegateToGeneratedFactory(true) should be sufficient to satisfy the
// above requirement.
//
// If either pool or factory is NULL, both must be NULL.
//
// Note that this feature is ignored when parsing "lite" messages as they do
// not have descriptors.
void SetExtensionRegistry(DescriptorPool* pool, MessageFactory* factory);
// Get the DescriptorPool set via SetExtensionRegistry(), or NULL if no pool
// has been provided.
const DescriptorPool* GetExtensionPool();
// Get the MessageFactory set via SetExtensionRegistry(), or NULL if no
// factory has been provided.
MessageFactory* GetExtensionFactory();
private:
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(CodedInputStream);
ZeroCopyInputStream* input_;
const uint8* buffer_;
const uint8* buffer_end_; // pointer to the end of the buffer.
int total_bytes_read_; // total bytes read from input_, including
// the current buffer
// If total_bytes_read_ surpasses INT_MAX, we record the extra bytes here
// so that we can BackUp() on destruction.
int overflow_bytes_;
// LastTagWas() stuff.
uint32 last_tag_; // result of last ReadTag().
// This is set true by ReadTag{Fallback/Slow}() if it is called when exactly
// at EOF, or by ExpectAtEnd() when it returns true. This happens when we
// reach the end of a message and attempt to read another tag.
bool legitimate_message_end_;
// See EnableAliasing().
bool aliasing_enabled_;
// Limits
Limit current_limit_; // if position = -1, no limit is applied
// For simplicity, if the current buffer crosses a limit (either a normal
// limit created by PushLimit() or the total bytes limit), buffer_size_
// only tracks the number of bytes before that limit. This field
// contains the number of bytes after it. Note that this implies that if
// buffer_size_ == 0 and buffer_size_after_limit_ > 0, we know we've
// hit a limit. However, if both are zero, it doesn't necessarily mean
// we aren't at a limit -- the buffer may have ended exactly at the limit.
int buffer_size_after_limit_;
// Maximum number of bytes to read, period. This is unrelated to
// current_limit_. Set using SetTotalBytesLimit().
int total_bytes_limit_;
int total_bytes_warning_threshold_;
// Current recursion depth, controlled by IncrementRecursionDepth() and
// DecrementRecursionDepth().
int recursion_depth_;
// Recursion depth limit, set by SetRecursionLimit().
int recursion_limit_;
// See SetExtensionRegistry().
const DescriptorPool* extension_pool_;
MessageFactory* extension_factory_;
// Private member functions.
// Advance the buffer by a given number of bytes.
void Advance(int amount);
// Back up input_ to the current buffer position.
void BackUpInputToCurrentPosition();
// Recomputes the value of buffer_size_after_limit_. Must be called after
// current_limit_ or total_bytes_limit_ changes.
void RecomputeBufferLimits();
// Writes an error message saying that we hit total_bytes_limit_.
void PrintTotalBytesLimitError();
// Called when the buffer runs out to request more data. Implies an
// Advance(BufferSize()).
bool Refresh();
// When parsing varints, we optimize for the common case of small values, and
// then optimize for the case when the varint fits within the current buffer
// piece. The Fallback method is used when we can't use the one-byte
// optimization. The Slow method is yet another fallback when the buffer is
// not large enough. Making the slow path out-of-line speeds up the common
// case by 10-15%. The slow path is fairly uncommon: it only triggers when a
// message crosses multiple buffers.
bool ReadVarint32Fallback(uint32* value);
bool ReadVarint64Fallback(uint64* value);
bool ReadVarint32Slow(uint32* value);
bool ReadVarint64Slow(uint64* value);
bool ReadLittleEndian32Fallback(uint32* value);
bool ReadLittleEndian64Fallback(uint64* value);
// Fallback/slow methods for reading tags. These do not update last_tag_,
// but will set legitimate_message_end_ if we are at the end of the input
// stream.
uint32 ReadTagFallback();
uint32 ReadTagSlow();
bool ReadStringFallback(string* buffer, int size);
// Return the size of the buffer.
int BufferSize() const;
static const int kDefaultTotalBytesLimit = 64 << 20; // 64MB
static const int kDefaultTotalBytesWarningThreshold = 32 << 20; // 32MB
static const int kDefaultRecursionLimit = 64;
};
// Class which encodes and writes binary data which is composed of varint-
// encoded integers and fixed-width pieces. Wraps a ZeroCopyOutputStream.
// Most users will not need to deal with CodedOutputStream.
//
// Most methods of CodedOutputStream which return a bool return false if an
// underlying I/O error occurs. Once such a failure occurs, the
// CodedOutputStream is broken and is no longer useful. The Write* methods do
// not return the stream status, but will invalidate the stream if an error
// occurs. The client can probe HadError() to determine the status.
//
// Note that every method of CodedOutputStream which writes some data has
// a corresponding static "ToArray" version. These versions write directly
// to the provided buffer, returning a pointer past the last written byte.
// They require that the buffer has sufficient capacity for the encoded data.
// This allows an optimization where we check if an output stream has enough
// space for an entire message before we start writing and, if there is, we
// call only the ToArray methods to avoid doing bound checks for each
// individual value.
// i.e., in the example above:
//
// CodedOutputStream coded_output = new CodedOutputStream(raw_output);
// int magic_number = 1234;
// char text[] = "Hello world!";
//
// int coded_size = sizeof(magic_number) +
// CodedOutputStream::Varint32Size(strlen(text)) +
// strlen(text);
//
// uint8* buffer =
// coded_output->GetDirectBufferForNBytesAndAdvance(coded_size);
// if (buffer != NULL) {
// // The output stream has enough space in the buffer: write directly to
// // the array.
// buffer = CodedOutputStream::WriteLittleEndian32ToArray(magic_number,
// buffer);
// buffer = CodedOutputStream::WriteVarint32ToArray(strlen(text), buffer);
// buffer = CodedOutputStream::WriteRawToArray(text, strlen(text), buffer);
// } else {
// // Make bound-checked writes, which will ask the underlying stream for
// // more space as needed.
// coded_output->WriteLittleEndian32(magic_number);
// coded_output->WriteVarint32(strlen(text));
// coded_output->WriteRaw(text, strlen(text));
// }
//
// delete coded_output;
class LIBPROTOBUF_EXPORT CodedOutputStream {
public:
// Create an CodedOutputStream that writes to the given ZeroCopyOutputStream.
explicit CodedOutputStream(ZeroCopyOutputStream* output);
// Destroy the CodedOutputStream and position the underlying
// ZeroCopyOutputStream immediately after the last byte written.
~CodedOutputStream();
// Skips a number of bytes, leaving the bytes unmodified in the underlying
// buffer. Returns false if an underlying write error occurs. This is
// mainly useful with GetDirectBufferPointer().
bool Skip(int count);
// Sets *data to point directly at the unwritten part of the
// CodedOutputStream's underlying buffer, and *size to the size of that
// buffer, but does not advance the stream's current position. This will
// always either produce a non-empty buffer or return false. If the caller
// writes any data to this buffer, it should then call Skip() to skip over
// the consumed bytes. This may be useful for implementing external fast
// serialization routines for types of data not covered by the
// CodedOutputStream interface.
bool GetDirectBufferPointer(void** data, int* size);
// If there are at least "size" bytes available in the current buffer,
// returns a pointer directly into the buffer and advances over these bytes.
// The caller may then write directly into this buffer (e.g. using the
// *ToArray static methods) rather than go through CodedOutputStream. If
// there are not enough bytes available, returns NULL. The return pointer is
// invalidated as soon as any other non-const method of CodedOutputStream
// is called.
inline uint8* GetDirectBufferForNBytesAndAdvance(int size);
// Write raw bytes, copying them from the given buffer.
void WriteRaw(const void* buffer, int size);
// Like WriteRaw() but writing directly to the target array.
// This is _not_ inlined, as the compiler often optimizes memcpy into inline
// copy loops. Since this gets called by every field with string or bytes
// type, inlining may lead to a significant amount of code bloat, with only a
// minor performance gain.
static uint8* WriteRawToArray(const void* buffer, int size, uint8* target);
// Equivalent to WriteRaw(str.data(), str.size()).
void WriteString(const string& str);
// Like WriteString() but writing directly to the target array.
static uint8* WriteStringToArray(const string& str, uint8* target);
// Write a 32-bit little-endian integer.
void WriteLittleEndian32(uint32 value);
// Like WriteLittleEndian32() but writing directly to the target array.
static uint8* WriteLittleEndian32ToArray(uint32 value, uint8* target);
// Write a 64-bit little-endian integer.
void WriteLittleEndian64(uint64 value);
// Like WriteLittleEndian64() but writing directly to the target array.
static uint8* WriteLittleEndian64ToArray(uint64 value, uint8* target);
// Write an unsigned integer with Varint encoding. Writing a 32-bit value
// is equivalent to casting it to uint64 and writing it as a 64-bit value,
// but may be more efficient.
void WriteVarint32(uint32 value);
// Like WriteVarint32() but writing directly to the target array.
static uint8* WriteVarint32ToArray(uint32 value, uint8* target);
// Write an unsigned integer with Varint encoding.
void WriteVarint64(uint64 value);
// Like WriteVarint64() but writing directly to the target array.
static uint8* WriteVarint64ToArray(uint64 value, uint8* target);
// Equivalent to WriteVarint32() except when the value is negative,
// in which case it must be sign-extended to a full 10 bytes.
void WriteVarint32SignExtended(int32 value);
// Like WriteVarint32SignExtended() but writing directly to the target array.
static uint8* WriteVarint32SignExtendedToArray(int32 value, uint8* target);
// This is identical to WriteVarint32(), but optimized for writing tags.
// In particular, if the input is a compile-time constant, this method
// compiles down to a couple instructions.
// Always inline because otherwise the aformentioned optimization can't work,
// but GCC by default doesn't want to inline this.
void WriteTag(uint32 value);
// Like WriteTag() but writing directly to the target array.
static uint8* WriteTagToArray(
uint32 value, uint8* target) GOOGLE_ATTRIBUTE_ALWAYS_INLINE;
// Returns the number of bytes needed to encode the given value as a varint.
static int VarintSize32(uint32 value);
// Returns the number of bytes needed to encode the given value as a varint.
static int VarintSize64(uint64 value);
// If negative, 10 bytes. Otheriwse, same as VarintSize32().
static int VarintSize32SignExtended(int32 value);
// Returns the total number of bytes written since this object was created.
inline int ByteCount() const;
// Returns true if there was an underlying I/O error since this object was
// created.
bool HadError() const { return had_error_; }
private:
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(CodedOutputStream);
ZeroCopyOutputStream* output_;
uint8* buffer_;
int buffer_size_;
int total_bytes_; // Sum of sizes of all buffers seen so far.
bool had_error_; // Whether an error occurred during output.
// Advance the buffer by a given number of bytes.
void Advance(int amount);
// Called when the buffer runs out to request more data. Implies an
// Advance(buffer_size_).
bool Refresh();
static uint8* WriteVarint32FallbackToArray(uint32 value, uint8* target);
// Always-inlined versions of WriteVarint* functions so that code can be
// reused, while still controlling size. For instance, WriteVarint32ToArray()
// should not directly call this: since it is inlined itself, doing so
// would greatly increase the size of generated code. Instead, it should call
// WriteVarint32FallbackToArray. Meanwhile, WriteVarint32() is already
// out-of-line, so it should just invoke this directly to avoid any extra
// function call overhead.
static uint8* WriteVarint32FallbackToArrayInline(
uint32 value, uint8* target) GOOGLE_ATTRIBUTE_ALWAYS_INLINE;
static uint8* WriteVarint64ToArrayInline(
uint64 value, uint8* target) GOOGLE_ATTRIBUTE_ALWAYS_INLINE;
static int VarintSize32Fallback(uint32 value);
};
// inline methods ====================================================
// The vast majority of varints are only one byte. These inline
// methods optimize for that case.
inline bool CodedInputStream::ReadVarint32(uint32* value) {
if (GOOGLE_PREDICT_TRUE(buffer_ < buffer_end_) && *buffer_ < 0x80) {
*value = *buffer_;
Advance(1);
return true;
} else {
return ReadVarint32Fallback(value);
}
}
inline bool CodedInputStream::ReadVarint64(uint64* value) {
if (GOOGLE_PREDICT_TRUE(buffer_ < buffer_end_) && *buffer_ < 0x80) {
*value = *buffer_;
Advance(1);
return true;
} else {
return ReadVarint64Fallback(value);
}
}
// static
inline const uint8* CodedInputStream::ReadLittleEndian32FromArray(
const uint8* buffer,
uint32* value) {
#if !defined(PROTOBUF_DISABLE_LITTLE_ENDIAN_OPT_FOR_TEST) && \
defined(__BYTE_ORDER) && __BYTE_ORDER == __LITTLE_ENDIAN
memcpy(value, buffer, sizeof(*value));
return buffer + sizeof(*value);
#else
*value = (static_cast<uint32>(buffer[0]) ) |
(static_cast<uint32>(buffer[1]) << 8) |
(static_cast<uint32>(buffer[2]) << 16) |
(static_cast<uint32>(buffer[3]) << 24);
return buffer + sizeof(*value);
#endif
}
// static
inline const uint8* CodedInputStream::ReadLittleEndian64FromArray(
const uint8* buffer,
uint64* value) {
#if !defined(PROTOBUF_DISABLE_LITTLE_ENDIAN_OPT_FOR_TEST) && \
defined(__BYTE_ORDER) && __BYTE_ORDER == __LITTLE_ENDIAN
memcpy(value, buffer, sizeof(*value));
return buffer + sizeof(*value);
#else
uint32 part0 = (static_cast<uint32>(buffer[0]) ) |
(static_cast<uint32>(buffer[1]) << 8) |
(static_cast<uint32>(buffer[2]) << 16) |
(static_cast<uint32>(buffer[3]) << 24);
uint32 part1 = (static_cast<uint32>(buffer[4]) ) |
(static_cast<uint32>(buffer[5]) << 8) |
(static_cast<uint32>(buffer[6]) << 16) |
(static_cast<uint32>(buffer[7]) << 24);
*value = static_cast<uint64>(part0) |
(static_cast<uint64>(part1) << 32);
return buffer + sizeof(*value);
#endif
}
inline bool CodedInputStream::ReadLittleEndian32(uint32* value) {
#if !defined(PROTOBUF_DISABLE_LITTLE_ENDIAN_OPT_FOR_TEST) && \
defined(__BYTE_ORDER) && __BYTE_ORDER == __LITTLE_ENDIAN
if (GOOGLE_PREDICT_TRUE(BufferSize() >= sizeof(*value))) {
memcpy(value, buffer_, sizeof(*value));
Advance(sizeof(*value));
return true;
} else {
return ReadLittleEndian32Fallback(value);
}
#else
return ReadLittleEndian32Fallback(value);
#endif
}
inline bool CodedInputStream::ReadLittleEndian64(uint64* value) {
#if !defined(PROTOBUF_DISABLE_LITTLE_ENDIAN_OPT_FOR_TEST) && \
defined(__BYTE_ORDER) && __BYTE_ORDER == __LITTLE_ENDIAN
if (GOOGLE_PREDICT_TRUE(BufferSize() >= sizeof(*value))) {
memcpy(value, buffer_, sizeof(*value));
Advance(sizeof(*value));
return true;
} else {
return ReadLittleEndian64Fallback(value);
}
#else
return ReadLittleEndian64Fallback(value);
#endif
}
inline uint32 CodedInputStream::ReadTag() {
if (GOOGLE_PREDICT_TRUE(buffer_ < buffer_end_) && buffer_[0] < 0x80) {
last_tag_ = buffer_[0];
Advance(1);
return last_tag_;
} else {
last_tag_ = ReadTagFallback();
return last_tag_;
}
}
inline bool CodedInputStream::LastTagWas(uint32 expected) {
return last_tag_ == expected;
}
inline bool CodedInputStream::ConsumedEntireMessage() {
return legitimate_message_end_;
}
inline bool CodedInputStream::ExpectTag(uint32 expected) {
if (expected < (1 << 7)) {
if (GOOGLE_PREDICT_TRUE(buffer_ < buffer_end_) && buffer_[0] == expected) {
Advance(1);
return true;
} else {
return false;
}
} else if (expected < (1 << 14)) {
if (GOOGLE_PREDICT_TRUE(BufferSize() >= 2) &&
buffer_[0] == static_cast<uint8>(expected | 0x80) &&
buffer_[1] == static_cast<uint8>(expected >> 7)) {
Advance(2);
return true;
} else {
return false;
}
} else {
// Don't bother optimizing for larger values.
return false;
}
}
inline const uint8* CodedInputStream::ExpectTagFromArray(
const uint8* buffer, uint32 expected) {
if (expected < (1 << 7)) {
if (buffer[0] == expected) {
return buffer + 1;
}
} else if (expected < (1 << 14)) {
if (buffer[0] == static_cast<uint8>(expected | 0x80) &&
buffer[1] == static_cast<uint8>(expected >> 7)) {
return buffer + 2;
}
}
return NULL;
}
inline void CodedInputStream::GetDirectBufferPointerInline(const void** data,
int* size) {
*data = buffer_;
*size = buffer_end_ - buffer_;
}
inline bool CodedInputStream::ExpectAtEnd() {
// If we are at a limit we know no more bytes can be read. Otherwise, it's
// hard to say without calling Refresh(), and we'd rather not do that.
if (buffer_ == buffer_end_ && buffer_size_after_limit_ != 0) {
last_tag_ = 0; // Pretend we called ReadTag()...
legitimate_message_end_ = true; // ... and it hit EOF.
return true;
} else {
return false;
}
}
inline uint8* CodedOutputStream::GetDirectBufferForNBytesAndAdvance(int size) {
if (buffer_size_ < size) {
return NULL;
} else {
uint8* result = buffer_;
Advance(size);
return result;
}
}
inline uint8* CodedOutputStream::WriteVarint32ToArray(uint32 value,
uint8* target) {
if (value < 0x80) {
*target = value;
return target + 1;
} else {
return WriteVarint32FallbackToArray(value, target);
}
}
inline void CodedOutputStream::WriteVarint32SignExtended(int32 value) {
if (value < 0) {
WriteVarint64(static_cast<uint64>(value));
} else {
WriteVarint32(static_cast<uint32>(value));
}
}
inline uint8* CodedOutputStream::WriteVarint32SignExtendedToArray(
int32 value, uint8* target) {
if (value < 0) {
return WriteVarint64ToArray(static_cast<uint64>(value), target);
} else {
return WriteVarint32ToArray(static_cast<uint32>(value), target);
}
}
inline uint8* CodedOutputStream::WriteLittleEndian32ToArray(uint32 value,
uint8* target) {
#if !defined(PROTOBUF_DISABLE_LITTLE_ENDIAN_OPT_FOR_TEST) && \
defined(__BYTE_ORDER) && __BYTE_ORDER == __LITTLE_ENDIAN
memcpy(target, &value, sizeof(value));
#else
target[0] = static_cast<uint8>(value);
target[1] = static_cast<uint8>(value >> 8);
target[2] = static_cast<uint8>(value >> 16);
target[3] = static_cast<uint8>(value >> 24);
#endif
return target + sizeof(value);
}
inline uint8* CodedOutputStream::WriteLittleEndian64ToArray(uint64 value,
uint8* target) {
#if !defined(PROTOBUF_DISABLE_LITTLE_ENDIAN_OPT_FOR_TEST) && \
defined(__BYTE_ORDER) && __BYTE_ORDER == __LITTLE_ENDIAN
memcpy(target, &value, sizeof(value));
#else
uint32 part0 = static_cast<uint32>(value);
uint32 part1 = static_cast<uint32>(value >> 32);
target[0] = static_cast<uint8>(part0);
target[1] = static_cast<uint8>(part0 >> 8);
target[2] = static_cast<uint8>(part0 >> 16);
target[3] = static_cast<uint8>(part0 >> 24);
target[4] = static_cast<uint8>(part1);
target[5] = static_cast<uint8>(part1 >> 8);
target[6] = static_cast<uint8>(part1 >> 16);
target[7] = static_cast<uint8>(part1 >> 24);
#endif
return target + sizeof(value);
}
inline void CodedOutputStream::WriteTag(uint32 value) {
WriteVarint32(value);
}
inline uint8* CodedOutputStream::WriteTagToArray(
uint32 value, uint8* target) {
if (value < (1 << 7)) {
target[0] = value;
return target + 1;
} else if (value < (1 << 14)) {
target[0] = static_cast<uint8>(value | 0x80);
target[1] = static_cast<uint8>(value >> 7);
return target + 2;
} else {
return WriteVarint32FallbackToArray(value, target);
}
}
inline int CodedOutputStream::VarintSize32(uint32 value) {
if (value < (1 << 7)) {
return 1;
} else {
return VarintSize32Fallback(value);
}
}
inline int CodedOutputStream::VarintSize32SignExtended(int32 value) {
if (value < 0) {
return 10; // TODO(kenton): Make this a symbolic constant.
} else {
return VarintSize32(static_cast<uint32>(value));
}
}
inline void CodedOutputStream::WriteString(const string& str) {
WriteRaw(str.data(), str.size());
}
inline uint8* CodedOutputStream::WriteStringToArray(
const string& str, uint8* target) {
return WriteRawToArray(str.data(), str.size(), target);
}
inline int CodedOutputStream::ByteCount() const {
return total_bytes_ - buffer_size_;
}
inline void CodedInputStream::Advance(int amount) {
buffer_ += amount;
}
inline void CodedOutputStream::Advance(int amount) {
buffer_ += amount;
buffer_size_ -= amount;
}
inline void CodedInputStream::SetRecursionLimit(int limit) {
recursion_limit_ = limit;
}
inline bool CodedInputStream::IncrementRecursionDepth() {
++recursion_depth_;
return recursion_depth_ <= recursion_limit_;
}
inline void CodedInputStream::DecrementRecursionDepth() {
if (recursion_depth_ > 0) --recursion_depth_;
}
inline void CodedInputStream::SetExtensionRegistry(DescriptorPool* pool,
MessageFactory* factory) {
extension_pool_ = pool;
extension_factory_ = factory;
}
inline const DescriptorPool* CodedInputStream::GetExtensionPool() {
return extension_pool_;
}
inline MessageFactory* CodedInputStream::GetExtensionFactory() {
return extension_factory_;
}
inline int CodedInputStream::BufferSize() const {
return buffer_end_ - buffer_;
}
inline CodedInputStream::CodedInputStream(ZeroCopyInputStream* input)
: input_(input),
buffer_(NULL),
buffer_end_(NULL),
total_bytes_read_(0),
overflow_bytes_(0),
last_tag_(0),
legitimate_message_end_(false),
aliasing_enabled_(false),
current_limit_(INT_MAX),
buffer_size_after_limit_(0),
total_bytes_limit_(kDefaultTotalBytesLimit),
total_bytes_warning_threshold_(kDefaultTotalBytesWarningThreshold),
recursion_depth_(0),
recursion_limit_(kDefaultRecursionLimit),
extension_pool_(NULL),
extension_factory_(NULL) {
// Eagerly Refresh() so buffer space is immediately available.
Refresh();
}
inline CodedInputStream::CodedInputStream(const uint8* buffer, int size)
: input_(NULL),
buffer_(buffer),
buffer_end_(buffer + size),
total_bytes_read_(size),
overflow_bytes_(0),
last_tag_(0),
legitimate_message_end_(false),
aliasing_enabled_(false),
current_limit_(size),
buffer_size_after_limit_(0),
total_bytes_limit_(kDefaultTotalBytesLimit),
total_bytes_warning_threshold_(kDefaultTotalBytesWarningThreshold),
recursion_depth_(0),
recursion_limit_(kDefaultRecursionLimit),
extension_pool_(NULL),
extension_factory_(NULL) {
// Note that setting current_limit_ == size is important to prevent some
// code paths from trying to access input_ and segfaulting.
}
inline CodedInputStream::~CodedInputStream() {
if (input_ != NULL) {
BackUpInputToCurrentPosition();
}
}
} // namespace io
} // namespace protobuf
} // namespace google
#endif // GOOGLE_PROTOBUF_IO_CODED_STREAM_H__
| [
"joe@valvesoftware.com"
] | joe@valvesoftware.com |
e24dc759d7878d7016af7a351fbaad6d4d20d4a2 | 276220869da497bdae45cea138bba891a84e202f | /test/test.cpp | 163e65aa564f63d6d8f5e744b89669d4d7e64097 | [] | no_license | harukoya/AtCoder | 1882c589946e17431819ca08cb6e432da28ed041 | 19504cb846629187ab3b7ef371bbcf5500f90167 | refs/heads/master | 2023-06-17T22:27:39.148457 | 2021-07-18T01:04:04 | 2021-07-18T01:04:04 | 330,525,417 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 139 | cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
cout << "こんにちは" << endl;
cout << "AtCoder" << endl;
return 0;
} | [
"ka.uni.stu@gmail.com"
] | ka.uni.stu@gmail.com |
f0c15898d9fdd3ad8f4c43148fffcd9447fb3f6e | 6d8faae66dd6332836bb11d7f02d6867c95d2a65 | /glast/skymaps/src/GtiBase.cxx | cb84f59d8477d13ca7fbbc27ad0e6c36fe0a6fb9 | [] | no_license | Areustle/fermi-glast | 9085f32f732bec6bf33079ce8e2ea2a0374d0228 | c51b821522a5521af253973fdd080e304fae88cc | refs/heads/master | 2021-01-01T16:04:44.289772 | 2017-09-12T16:35:52 | 2017-09-12T16:35:52 | 97,769,090 | 0 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 7,791 | cxx | /** \file GtiBase.cxx
\brief Implementation of encapsulation of the concept of a GTI. May be constructed from a GTI extension.
\author James Peachey, HEASARC/GSSC
*/
#include <iostream>
#include <memory>
#include <sstream>
#include <stdexcept>
#include "skymaps/GtiBase.h"
#include "st_facilities/FileSys.h"
#include "tip/IFileSvc.h"
#include "tip/Table.h"
//namespace skymaps {
using namespace skymaps;
GtiBase::GtiBase(): m_intervals() {}
GtiBase::GtiBase(std::vector<double> & starts, std::vector<double> & stops): m_intervals() {
assert(starts.size()==stops.size());
std::vector<double>::const_iterator it1(starts.begin());
std::vector<double>::const_iterator it2(stops.begin());
for (; it1 != starts.end(); ++it1, ++it2) {
m_intervals.insert(Interval_t(*it1,*it2));
}
consolidate();
}
GtiBase::GtiBase(const std::string & file_name, const std::string & ext_name): m_intervals() {
using namespace st_facilities;
// Get container of file names from the supplied input file.
FileSys::FileNameCont file_cont = FileSys::expandFileList(file_name);
// Iterate over input files.
for (FileSys::FileNameCont::iterator itor = file_cont.begin(); itor != file_cont.end(); ++itor) {
// Open GTI extension.
std::auto_ptr<const tip::Table> gti_table(tip::IFileSvc::instance().readTable(*itor, ext_name));
// Fill container with intervals from the extension.
for (tip::Table::ConstIterator itor = gti_table->begin(); itor != gti_table->end(); ++itor) {
double start = (*itor)["START"].get();
double stop = (*itor)["STOP"].get();
if (start > stop) {
std::ostringstream os;
os << "GtiBase: In file " << file_name << ", record " << itor->getIndex() << " is invalid: " <<
"start time " << start << " > stop time " << stop;
throw std::runtime_error(os.str());
}
insertInterval(Interval_t(start, stop));
}
}
consolidate();
}
double GtiBase::getFraction(double tstart, double tstop, ConstIterator & gti_pos) const {
double fraction = 0.;
for (; gti_pos != m_intervals.end(); ++gti_pos) {
// Check if this interval ends before GTI starts and return 0. fraction if it does.
if (tstop <= gti_pos->first) break;
// Check if this interval is completely contained in the GTI and return 1 if it does.
if (tstart >= gti_pos->first && tstop <= gti_pos->second) {
if (tstop == gti_pos->second) ++gti_pos;
fraction = 1.;
break;
}
// Check if there is some overlap and add that overlap.
if (tstart < gti_pos->second) {
double start = tstart > gti_pos->first ? tstart : gti_pos->first;
double stop = tstop < gti_pos->second ? tstop : gti_pos->second;
fraction += (stop - start) / (tstop - tstart);
}
// Check if this GTI still has some part which might overlap some future interval.
// If it does, break to avoid incrementing the GTI iterator.
if (tstop < gti_pos->second) break;
}
return fraction;
}
GtiBase GtiBase::operator &(const GtiBase & old_gti) const {
GtiBase new_gti;
ConstIterator it1 = m_intervals.begin();
ConstIterator it2 = old_gti.m_intervals.begin();
// Iterate until either set of intervals is finished.
while(it1 != m_intervals.end() && it2 != old_gti.m_intervals.end()) {
// See if interval 1 comes before interval 2.
if (it1->second <= it2->first) ++it1;
// See if interval 2 comes before interval 1.
else if (it2->second <= it1->first) ++it2;
else {
// They overlap, so find latest start time.
double start = it1->first > it2->first ? it1->first : it2->first;
// And earliest stop time.
double stop = it1->second < it2->second ? it1->second: it2->second;
new_gti.insertInterval(Interval_t(start, stop));
// Skip to the next interval in the series for whichever interval ends earliest.
if (it1->second < it2->second) ++it1; else ++it2;
}
}
new_gti.consolidate();
return new_gti;
}
GtiBase GtiBase::operator |(const GtiBase & gti) const {
GtiBase new_gti = *this;
new_gti |= gti;
return new_gti;
}
GtiBase & GtiBase::operator &=(const GtiBase & gti) {
*this = *this & gti;
return *this;
}
GtiBase & GtiBase::operator |=(const GtiBase & gti) {
for (ConstIterator itor = gti.begin(); itor != gti.end(); ++itor) {
insertInterval(*itor);
}
consolidate();
return *this;
}
bool GtiBase::operator ==(const GtiBase & gti) const { return m_intervals == gti.m_intervals; }
bool GtiBase::operator !=(const GtiBase & gti) const { return m_intervals != gti.m_intervals; }
GtiBase::Iterator GtiBase::begin() { return m_intervals.begin(); }
GtiBase::Iterator GtiBase::end() { return m_intervals.end(); }
GtiBase::ConstIterator GtiBase::begin() const { return m_intervals.begin(); }
GtiBase::ConstIterator GtiBase::end() const { return m_intervals.end(); }
void GtiBase::insertInterval(double tstart, double tstop) {
m_intervals.insert(Interval_t(tstart, tstop));
consolidate();
}
int GtiBase::getNumIntervals() const { return m_intervals.size(); }
void GtiBase::setNumIntervals(int) {}
double GtiBase::computeOntime() const {
double on_time = 0.;
for (IntervalCont_t::const_iterator itor = m_intervals.begin(); itor != m_intervals.end(); ++itor)
on_time += itor->second - itor->first;
return on_time;
}
void GtiBase::write(std::ostream & os) const {
IntervalCont_t::const_iterator itor = m_intervals.begin();
if (m_intervals.end() != itor) {
os << "[" << itor->first << ", " << itor->second << "]";
++itor;
}
for (; itor != m_intervals.end(); ++itor) {
os << std::endl;
os << "[" << itor->first << ", " << itor->second << "]";
}
}
void GtiBase::consolidate() {
// Get iterator pointing to the first interval.
Iterator current = m_intervals.begin();
if (m_intervals.end() != current) {
// Get iterator pointing to the next interval.
Iterator next = current;
// Consider each pair of intervals in the container.
for (++next; next != m_intervals.end(); ++next) {
if (current->first < next->first && next->first <= current->second) {
// Next interval begins in the middle of the current interval.
// If next interval continues past end of current interval, stretch
// the current interval to cover the combined range.
if (current->second < next->second) current->second = next->second;
// Next interval is no longer needed in any case.
m_intervals.erase(next);
next = current;
} else if (next->first < current->first && current->first <= next->first) {
// Current interval begins in the middle of the next interval.
// If current interval continues past end of next interval, stretch
// the next interval to cover the combined range.
if (next->second < current->second) next->second = current->second;
// Current interval is no longer needed in any case.
m_intervals.erase(current);
}
current = next;
}
}
}
void GtiBase::insertInterval(Interval_t interval) {
// See if an interval already exists which has this start time.
Iterator found = m_intervals.find(interval.first);
if (m_intervals.end() == found) {
m_intervals.insert(interval);
} else {
if (interval.second > found->second) found->second = interval.second;
}
}
std::ostream & operator <<(std::ostream & os, const GtiBase & gti) {
gti.write(os);
return os;
}
//}
| [
"areustledev@gmail.com"
] | areustledev@gmail.com |
83807103976656a9df10c92b1f00bb5ea931fb5c | 0fa7257cea3bb3e70d97045faeb372c82f938233 | /count of subset sum/count_of_subset_sum.cpp | 806f8edf0a684c88ee150cd58b862657d410d855 | [] | no_license | MihirShri/Dynamic-Programming | 4fdb085abe6fa0f73b857fbfc85acf999600094b | 12da08c00ab8ae7d5682a77679607d1f8c95b0a0 | refs/heads/master | 2022-12-22T09:54:05.653635 | 2020-09-28T04:43:42 | 2020-09-28T04:43:42 | 292,763,307 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 565 | cpp | #include <iostream>
using namespace std;
int subset_sum(int set[], int sum, int n)
{
int t[n+1][sum+1];
for (int i = 0; i <= n; i++)
t[i][0] = 1;
for (int i = 1; i <= sum; i++)
t[0][i] = 0;
for (int i = 1; i < n + 1; ++i)
{
for (int j = 1; j < sum + 1; ++j)
{
if (set[i-1] <= j)
t[i][j] = t[i-1][j-set[i-1]] + t[i-1][j];
else
t[i][j] = t[i-1][j];
}
}
cout << "The number of subsets is: ";
return t[n][sum];
}
int main()
{
int set[] = {2, 3, 5, 8, 10};
int sum = 10;
cout << subset_sum(set, sum, 5) << endl;
return 0;
}
| [
"noreply@github.com"
] | MihirShri.noreply@github.com |
dcba376d2def64425de1d3eb4603b5497ea7e206 | ce11dc0db50aa7bc27284c26678c54d92d0ebf3c | /CAddObjectDlg.h | 3a470e92ab2431d8e0e8bbfa505b16c061309e81 | [] | no_license | longbefer/Radiosity | 33e4ff08c47ca766c9fb572b6625caea61680935 | b2d7a7f73d439f9335fd4cebf56c1d0323f70924 | refs/heads/master | 2023-06-04T04:00:23.314387 | 2021-06-17T00:09:19 | 2021-06-17T00:09:19 | 355,954,006 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,655 | h | #pragma once
// CAddObjectDlg 对话框
#include "Scene.h"
#include "Light.h"
class CAddObjectDlg : public CDialogEx
{
DECLARE_DYNAMIC(CAddObjectDlg)
public:
CAddObjectDlg(CWnd* pParent = nullptr); // 标准构造函数
virtual ~CAddObjectDlg();
void SetScene(Scene*s) {
this->s = s;
}
enum class Operator { Add, Modify };
void SetType(Operator op) {
this->op = op;
}
void SetObjectIndex(size_t index) {
if (op != Operator::Modify) {
MessageBox(TEXT("设置ObjectIndex将会自动转为修改模式,若非修改,请检查代码"));
SetType(Operator::Modify);
}
this->modifyIndex = index;
}
// 对话框数据
#ifdef AFX_DESIGN_TIME
enum { IDD = IDD_AddObjDlg };
#endif
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持
DECLARE_MESSAGE_MAP()
public:
// 选中的物体
CComboBox selectObj;
double PosX;
double PosY;
double PosZ;
double RotateVal;
double ScaleVal;
size_t colorR;
size_t colorG;
size_t colorB;
Scene* s;
size_t rescueTime;
afx_msg void OnBnClickedConfirmadd();
afx_msg void OnBnClickedCanceladd();
CButton rotateX;
CButton rotateY;
CButton rotateZ;
afx_msg void OnBnClickedCheckx();
afx_msg void OnBnClickedChecky();
afx_msg void OnBnClickedCheckz();
afx_msg void OnDropFiles(HDROP hDropInfo);
afx_msg void OnCbnDropdownSelectobject();
// 设置选中的对象是否为灯光
BOOL bLight;
afx_msg void OnBnClickedbtchoosetexture();
// 纹理图片的路径
CString fileName;
// bLight失效,使用控件访问
CButton LightCheckButton;
virtual BOOL OnInitDialog();
Operator op = Operator::Add;
size_t modifyIndex = 0ULL;
};
| [
"long2696761655@sina.com"
] | long2696761655@sina.com |
ee05dc8f6a64e248c9eb222a0591778f0b607b9b | 08b8cf38e1936e8cec27f84af0d3727321cec9c4 | /data/crawl/git/new_hunk_6145.cpp | c997b5b7e9dfca2217eeac4e38e0e34f31edcafb | [] | no_license | ccdxc/logSurvey | eaf28e9c2d6307140b17986d5c05106d1fd8e943 | 6b80226e1667c1e0760ab39160893ee19b0e9fb1 | refs/heads/master | 2022-01-07T21:31:55.446839 | 2018-04-21T14:12:43 | 2018-04-21T14:12:43 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 195 | cpp |
if (!old.commit && !opts->force) {
if (!opts->quiet) {
warning("You appear to be on a branch yet to be born.");
warning("Forcing checkout of %s.", new->name);
}
opts->force = 1;
}
| [
"993273596@qq.com"
] | 993273596@qq.com |
5f2f39052dabb5b8cc978bc093770622f3bfef4b | 6e677e70c25ef822567013d1e5cdda7a6cd1b058 | /examples/legacy/_Bounce/main.cpp | ebdc9c6f0b2b5bab40def4b7a86f6de3112299b3 | [] | no_license | Astr0/FastHAL | 384e31add14be0cd38e7698eecbc0fc890e3321f | 6024453e5d3463f81d5729b21c1b07186fd39008 | refs/heads/master | 2021-01-21T11:50:13.776765 | 2018-04-28T05:00:34 | 2018-04-28T05:00:34 | 102,027,068 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 192 | cpp | /*
* Bounce.cpp
*
* Created: 9/23/2017 11:40:20 PM
* Author : astr0
*/
#include <avr/io.h>
int main(void)
{
/* Replace with your application code */
while (1)
{
}
}
| [
"aastr00@gmail.com"
] | aastr00@gmail.com |
2bdac46bddf09c55002f348451b1c789f750b0fd | 7f2a56144158e6b8114da9c1ada6ad0f844e1105 | /vmodels/constant.hpp | 0909fed38d47c6cf907a3f8694ec398833f0582f | [
"MIT"
] | permissive | lizhangscience/opt_utilities | 6fa1799ff565b8fb92d1a56e84b0d1f69101bc4d | 17363d2b870c88db108984a9a59d79c12d677e93 | refs/heads/master | 2021-02-18T15:30:27.786348 | 2018-10-09T03:13:22 | 2018-10-09T03:13:22 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,027 | hpp | /**
\file constant.hpp
\brief constant model
\author Junhua Gu
*/
#ifndef VCONSTANT_MODEL_H_
#define VCONSTANT_MODEL_H_
#define OPT_HEADER
#include <core/fitter.hpp>
#include <misc/optvec.hpp>
#include <cmath>
namespace opt_utilities
{
template <typename T>
class constant
:public model<optvec<T>,optvec<T>,optvec<T>,std::string>
{
typedef optvec<T> Tv;
private:
constant<T>* do_clone()const
{
return new constant<T>(*this);
}
const char* do_get_type_name()const
{
return "constant";
}
public:
constant()
{
this->push_param_info(param_info<Tv>("c",1));
}
public:
Tv do_eval(const Tv& x,const Tv& param)
{
//return x*param[0]+param[1];
Tv result(x.size());
for(int i=0;i<result.size();++i)
{
result[i]=param[0];
}
return result;
}
private:
std::string do_get_information()const
{
#ifdef WITH_OPT_DOC
#include <model_doc/constant.info>
#endif
return "";
}
};
}
#endif
//EOF
| [
"astrojhgu@ed2142bd-67ad-457f-ba7c-d818d4011675"
] | astrojhgu@ed2142bd-67ad-457f-ba7c-d818d4011675 |
17e13707f15c22d115a03ecf79fd593f121ccb81 | 6b2a8dd202fdce77c971c412717e305e1caaac51 | /solutions_2652486_1/C++/johnathan79717/main.cc | 34e12a3f2777d8357b688a1d6d1b965ee34ed419 | [] | no_license | alexandraback/datacollection | 0bc67a9ace00abbc843f4912562f3a064992e0e9 | 076a7bc7693f3abf07bfdbdac838cb4ef65ccfcf | refs/heads/master | 2021-01-24T18:27:24.417992 | 2017-05-23T09:23:38 | 2017-05-23T09:23:38 | 84,313,442 | 2 | 4 | null | null | null | null | UTF-8 | C++ | false | false | 1,602 | cc | #include <iostream>
using namespace std;
int main() {
int T;
cin >> T;
cout << "Case #1:" << endl;
int R, N, M, K;
cin >> R >> N >> M >> K;
for(int r = 0; r < R; ++r) {
int p[12];
for(int k = 0; k < K; ++k)
cin >> p[k];
int f[6];
memset(f, 0, sizeof(f));
for(int k = 0; k < K; ++k) {
if(p[k] == 125) {
f[5] = 3;
break;
}
if(p[k] == 27) {
f[3] = 3;
break;
}
if(p[k] == 64) {
f[4] = 3;
break;
}
if(p[k] == 24) {
f[2] = f[3] = f[4] = 1;
break;
}
if(p[k] == 40) {
f[2] = f[4] = f[5] = 1;
break;
}
if(p[k] == 60) {
f[3] = f[4] = f[5] = 1;
break;
}
if(p[k] == 36) {
f[3] = 2;
f[4] = 1;
break;
}
if(p[k] == 100) {
f[5] = 2;
f[4] = 1;
break;
}
if(p[k] == 48) {
f[4] = 2;
f[3] = 1;
break;
}
if(p[k] == 80) {
f[4] = 2;
f[5] = 1;
}
if(p[k] % 25 == 0)
f[5] = 2;
if(p[k] % 32 == 0)
f[4] = 2;
if(p[k] % 9 == 0)
f[3] = 2;
if(f[2] == 0 && p[k] % 2 == 0 && p[k] % 4 != 0)
f[2] = 1;
if(f[5] == 0 && p[k] % 5 == 0)
f[5] = 1;
if(f[3] == 0 && p[k] % 3 == 0)
f[3] = 1;
}
int count = 0;
for(int i = 2; i <= 5; ++i) {
count += f[i];
for(int j = 0; j < f[i]; ++j)
cout << i;
}
while(count < N) {
cout << '4';
++count;
}
cout << endl;
}
} | [
"eewestman@gmail.com"
] | eewestman@gmail.com |
d7aaf3b2c3f562759b83bb8274e1ec39be2a0f7e | 73b80a1074ad8b9999e4dd78c86a6baad32bfce5 | /Core/Shared/odbcvaluecombobox.cpp | 4c3149a1f2d779e7e83470353ab5cd7cd9f7cda8 | [] | no_license | abstractspoon/ToDoList_Dev | 25f463dea727b71ae30ca8de749570baa451aa13 | 29d038a7ff54150af21094f317e4f7c7d2dd118d | refs/heads/master | 2023-08-31T21:18:16.238149 | 2023-08-29T01:24:16 | 2023-08-29T01:24:16 | 66,343,401 | 87 | 26 | null | 2023-09-09T08:16:35 | 2016-08-23T07:19:50 | C++ | UTF-8 | C++ | false | false | 2,456 | cpp | // odbcvaluecombobox.cpp : implementation file
//
#include "stdafx.h"
#include "odbcvaluecombobox.h"
#include "RecordsetEx.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
enum
{
VALUE_KEY,
VALUE_CONTENT,
};
/////////////////////////////////////////////////////////////////////////////
// COdbcValueComboBox
COdbcValueComboBox::COdbcValueComboBox()
{
}
COdbcValueComboBox::~COdbcValueComboBox()
{
}
BEGIN_MESSAGE_MAP(COdbcValueComboBox, CComboBox)
//{{AFX_MSG_MAP(COdbcValueComboBox)
// NOTE - the ClassWizard will add and remove mapping macros here.
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// COdbcValueComboBox message handlers
BOOL COdbcValueComboBox::Initialize(CDatabase* pDb, const CString& sTable,
const CString& sKeyField,
const CString& sContentField,
BOOL bAddEmptyItem)
{
ASSERT(GetSafeHwnd());
CString sQuery;
sQuery.Format(_T("SELECT %s, %s FROM %s"), sKeyField, sContentField, sTable);
CRecordsetEx rs(pDb);
if (!rs.ExecDirect(sQuery) || rs.IsBOF())
return FALSE;
ResetContent();
while (!rs.IsEOF())
{
int nItem = AddString(rs.GetFieldValue(VALUE_CONTENT));
if (nItem != CB_ERR)
{
// use key index as items data
SetItemData(nItem, m_aKeys.GetSize());
m_aKeys.Add(rs.GetFieldValue(VALUE_KEY));
}
rs.MoveNext();
}
if (bAddEmptyItem)
{
int nItem = AddString(_T(""));
SetItemData(nItem, m_aKeys.GetSize());
m_aKeys.Add(_T(""));
}
return GetCount();
}
CString COdbcValueComboBox::GetSelectedValueKey() const
{
ASSERT(GetSafeHwnd());
int nSel = GetCurSel();
if (nSel == -1)
return _T("");
// else
int nKey = GetItemData(nSel);
ASSERT(nKey >= 0 && nKey < m_aKeys.GetSize());
if (nKey < 0 || nKey >= m_aKeys.GetSize())
return _T("");
return m_aKeys[nKey];
}
BOOL COdbcValueComboBox::SelectValueByKey(const CString& sKey)
{
ASSERT(GetSafeHwnd());
// first we find the key in the key array
int nKey = m_aKeys.GetSize();
while (nKey--)
{
if (m_aKeys[nKey].CompareNoCase(sKey) == 0)
{
// then find the item with that key as data
int nItem = GetCount();
while (nItem--)
{
if (GetItemData(nItem) == (DWORD)nKey)
{
SetCurSel(nItem);
return TRUE;
}
}
}
}
// not found
return FALSE;
}
| [
"daniel.godson@gmail.com"
] | daniel.godson@gmail.com |
3e95f12cc01f320d36257cc5292e515be02e45f4 | f39e0073320d6fb2d68e38ddaaeec54fcd54d4d6 | /examples/ARDUINO/Local/SoftwareBitBang/ClassMemberCallback/Transmitter/Transmitter.ino | 83bb06add6f75b310d811d88a77cfd1204c85d0b | [
"Apache-2.0"
] | permissive | jcbrtl/PJON | 87ae6ab58501f022d4be5dc6bae0be46913e4dd3 | e857bea7214bb8d1a5c57643794c0e8891c538ff | refs/heads/master | 2022-09-11T23:55:56.952591 | 2020-05-28T14:24:21 | 2020-05-28T14:24:21 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,095 | ino |
// Uncomment to use the mode you prefer (default SWBB_MODE 1)
// #define SWBB_MODE 1 // 1.95kB/s - 15625Bd
// #define SWBB_MODE 2 // 2.21kB/s - 17696Bd
// #define SWBB_MODE 3 // 2.94kB/s - 23529Bd
// #define SWBB_MODE 4 // 3.40kB/s - 27210Bd
/* Response timeout (1500 microseconds default).
If the acknowledgement fails SWBB_RESPONSE_TIMEOUT may be too short
specially if long packets are sent or if devices are far from each other */
//#define SWBB_RESPONSE_TIMEOUT 1500
#include <PJON.h>
// <Strategy name> bus(selected device id)
PJON<SoftwareBitBang> bus(45);
int packet;
uint8_t content[] = "01234567890123456789";
void error_handler(uint8_t code, uint16_t data, void *custom_pointer) {
if(code == PJON_CONNECTION_LOST) {
Serial.print("Connection lost with device id ");
Serial.println(bus.packets[data].content[0], DEC);
}
};
void setup() {
bus.strategy.set_pin(12);
bus.begin();
bus.set_error(error_handler);
Serial.begin(115200);
packet = bus.send(44, content, 20);
};
void loop() {
if(!bus.update())
packet = bus.send(44, content, 20);
};
| [
"gioscarab@gmail.com"
] | gioscarab@gmail.com |
5a4e5f899875bd011fb7e54dd4d60467947e70ef | 01b99b95a7d48577c1b67eeb321e09eb8cd5e55f | /src/tests/TempLat/lattice/algebra/su2algebra/su2doubletbinaryoperator.cpp | 10b554920d0dc7c2cc9381919987ed1a087b952b | [
"MIT"
] | permissive | cosmolattice/cosmolattice | e3172056a9d0c963c299f786f1d0066d25565ef6 | 521befc3e8073fa97ffdd76a6281f270f027b491 | refs/heads/master | 2023-06-25T03:21:19.029827 | 2023-06-20T13:41:36 | 2023-06-22T10:29:50 | 334,783,491 | 29 | 5 | MIT | 2022-07-11T15:03:35 | 2021-01-31T23:57:25 | C++ | UTF-8 | C++ | false | false | 361 | cpp |
/* This file is part of CosmoLattice, available at www.cosmolattice.net .
Copyright Daniel G. Figueroa, Adrien Florio, Francisco Torrenti and Wessel Valkenburg.
Released under the MIT license, see LICENSE.md. */
// File info: Main contributor(s): Adrien Florio, Year: 2020
#include "TempLat/lattice/algebra/su2algebra/su2doubletbinaryoperator.h"
| [
"adrien.florio@epfl.ch"
] | adrien.florio@epfl.ch |
7aa2e983f7068742317a9a8ff8dbd757bc361f74 | 93b672401e11546d9ebb08e5db8913a22e0527a4 | /trunk/FieldOperations/Route_2_Reader_OpCodeSelector/src/selectedCropOpReader.cpp | 86e33a7a8c7538d335de1af92c2145078343eb31 | [] | no_license | KlimaVand/Nitroscape | 4bd8772e7699b7fb51be36f07af5871b9608b6f9 | d0bc028925104561491d0277cbbfad42f4e900ea | refs/heads/master | 2021-08-18T17:17:30.651312 | 2017-11-23T12:00:09 | 2017-11-23T12:00:09 | 111,693,993 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 7,726 | cpp | /*! \mainpage Nitroscape Component 5 Route 1 file reader
Group of C++ classes that are used to write or read the field operations to be used in
NitroEurope Component 5.
The file cropOpReader.cpp provides entry to a simple program that reads the file that provides the detailed
ecosystem models with field operation data. The program creates instances of classes specific to individual
field operations (e.g. tillage, harvesting). These classes contain functions that access operation-specific
data (e.g. amount of nitrate applied in a fertiliser application). The program outputs the year, Julian day,
operation name and operation code to console.
For Windows,use __WINDOWS__ compiler directive, for Borland 5.02 use also __BCplusplus__, for CYGWIN, use __ANSICPP__
For Linux, use __ANSICPP__ only
NJH 2.2.10
*/
#include "base\message.h"
#include "base\bstime.h"
#include "fieldOp.h"
#include "fieldOpTill.h"
#include "fieldOpSow.h"
#include "fieldOpFert.h"
#include "fieldOpHarv.h"
#include "fieldOpGrass.h"
#include "fieldOpCut.h"
#include "base\unix_util.h"
#include "tools\fileAccess.h"
//! used to send messages to screen or file
message * theMessage;
//! keeps the time and date
bsTime theTime;
//!If true, detailed output is sent to the screen
bool verbosity = true;
//!main function for Route 1 file reader
int main(int argc,char *argv[])
{
fileAccess hd;
string commandFileName = "command.txt";
hd.openFile(commandFileName,false);
string input=hd.getLineFile();
char inputDir[2000] ;
strcpy(inputDir,input.c_str());
int asci=inputDir[input.size()-1];
if(asci==13)
{
inputDir[input.size()-1]='\0';
}
cout << "Reading command.txt from " << hd.getCurrentPath() << endl;
cout << "Reading from " << inputDir << endl;
char outputDir[2000] ;
string output=hd.getLineFile();
strcpy(outputDir,output.c_str());
asci=outputDir[output.size()-1];
if(asci==13)
{
outputDir[output.size()-1]='\0';
}
char fileName[200];
string atempname;// "DummyCroprot5";
atempname=hd.getLineFile();
strcpy(fileName,atempname.c_str());
asci=fileName[atempname.size()-1];
if(asci==13)
{
fileName[atempname.size()-1]='\0';
}
char outfileName[200];
atempname=hd.getLineFile();
strcpy(outfileName,atempname.c_str());
asci=fileName[atempname.size()-1];
if(asci==13)
{
outfileName[atempname.size()-1]='\0';
}
int targetOpCode = hd.GetIntFromFile(); //code for operation to be read
int Mineral = hd.GetIntFromFile(); // = 1 if looking for mineral fertiliser
bool isMineral=false;
if (Mineral==1)
isMineral=true;
hd.closeFile();
typedef char string100[256];
string100 FN1,FN2, FN3, FN4, FN5, OutputDirectory;
strcpy(OutputDirectory, outputDir);
strcpy(FN1,OutputDirectory);
strcat(FN1,"warnings.txt");
strcpy(FN2,OutputDirectory);
strcat(FN2,"logfile.txt");
strcpy(FN3,OutputDirectory);
strcat(FN3,"debug.txt"); //debug file name
theMessage = new message();
theMessage->InitMessage(FN1,FN2,FN3);
//change to input directory
hd.changeDir(input);
// chdir(inputDir);
char LongFileName [200];
sprintf(LongFileName,"%s\%s",inputDir,fileName);
ifstream *opFile = new ifstream();
opFile->open(LongFileName,fstream::in);
if (!opFile->is_open())
theMessage->FatalError("Crop operation file ", fileName, " not found");
sprintf(LongFileName,"%s\%s",outputDir,outfileName);
ofstream *opFileOut = new ofstream();
opFileOut->open(LongFileName,fstream::out);
if (!opFileOut->is_open())
theMessage->FatalError("Unable to open output file");
int NCUcount=0;
int NumberOfNoOps = 0;
int NCU =0;
int oldNCU=0;
int cropSeries =0;
int oldCropSeries=-1;
int oldYear=0;
bool finished = false; //only here because with the Borland compiler, is_open does not want to return false at end of file
#ifdef __BCplusplus__
while ((opFile)&&(!finished))
#else
while ((opFile->is_open())&&(!finished))
#endif
{
*opFile >> NCU >> cropSeries;
if (opFile->eof())
finished=true;
else
{
cout << "NCU " << NCU << " series " << cropSeries << " ";
int numOps =0;
int year =0;
*opFile >> year >> numOps;
cout << year << endl;
if (NCU!=oldNCU)
{
oldNCU=NCU;
oldYear=year-1;
oldCropSeries=0;
NCUcount++;
}
if ((NCU==39283)&&(year==2030))
cout << "here" << endl;
//this checks if the end of file has been reached (should not be necessary but sometimes is, depending on compiler implementation of eof() function)
if (year==0)
finished=true;
if (numOps==0)
NumberOfNoOps++;
if (cropSeries!=oldCropSeries)
{
oldCropSeries=cropSeries;
oldYear=year-1;
}
else
{
if (year!=oldYear+1)
{
cout << "Error - NCU " << NCU << " crop series " << cropSeries << " year " << year << endl;
theMessage->FatalError("Years are not in sequence");
}
else
oldYear=year;
}
for (int i=0;i< numOps; i++)
{
int julianDay=0;
int opCode=0;
fieldOp * afieldOp;
*opFile >> julianDay >> opCode;
//! On basis of operation code (opCode), initialise an instance of the appropriate field operation class
switch (opCode)
{
case 1: //tillage
afieldOp = new fieldOpTill();
afieldOp->ReadOpResults(opFile,year,julianDay);
break;
case 2://sowing
afieldOp = new fieldOpSow();
afieldOp->ReadOpResults(opFile,year,julianDay);
break;
case 3://fertilisation and manuring
afieldOp = new fieldOpFert();
afieldOp->ReadOpResults(opFile,year,julianDay);
break;
case 4://cutting
afieldOp = new fieldOpCut();
//afieldOp = new fieldOpGrass();
afieldOp->ReadOpResults(opFile,year,julianDay);
break;
case 5://start grazing
afieldOp = new fieldOpGrass(5);
afieldOp->ReadOpResults(opFile,year,julianDay,opCode);
break;
case 6://stop grazing
afieldOp = new fieldOpGrass(6);
afieldOp->ReadOpResults(opFile,year,julianDay,opCode);
break;
case 9://harvesting
afieldOp = new fieldOpHarv();
afieldOp->ReadOpResults(opFile,year,julianDay);
break;
case 10://atmospheric N deposition
afieldOp = new fieldOpFert();
afieldOp->ReadOpResults(opFile,year,julianDay);
break;
default:
char buf[2];
itoa(opCode,buf,10);
cout << "Operation number " << i << endl;
theMessage->FatalError("Incorrect or unprogrammed operation code ", buf);
break;
}
//afieldOp->CheckContent();
//cout << "Op no " << i << " Op name " << afieldOp->getname() << " Op code " << afieldOp->getopCode() << " Day " << julianDay << endl;
if (afieldOp->getopCode()==targetOpCode)
{
if (afieldOp->getopCode()==3)
{
if (isMineral)
{
if (((fieldOpFert *)afieldOp)->gettype()==1)
*opFileOut << NCU << "\t" << year << "\t" << julianDay << "\t" << endl;
}
else if (((fieldOpFert *)afieldOp)->gettype()>1)
*opFileOut << NCU << "\t" << year << "\t" << julianDay << "\t" << ((fieldOpFert *)afieldOp)->gettype() << "\t" << endl;
}
else
*opFileOut << NCU << "\t" << year << "\t" << julianDay << "\t" << endl;
if (verbosity)
cout << "Op no " << i << " Op name " << afieldOp->getname() << " Op code " << afieldOp->getopCode() << " Day " << julianDay << endl;
}
// if (afieldOp->getopCode()==2)
// *opFileOut << "\t" << ((fieldOpSow *) afieldOp)->getplantName();
delete afieldOp;
}
}
}
opFile->close();
opFileOut->close();
delete opFile;
delete opFileOut;
delete theMessage;
cout << "Finished after " << NCUcount << " NCUs" << " No of NCU without ops " << NumberOfNoOps << endl;
}
| [
"sai@agro.au.dk"
] | sai@agro.au.dk |
f7a485cd2564f4c420b47b1fb1c21983fe7b7e5d | debaeb333391ee9672da62c86f9dc0b020bcd364 | /lluvia/cpp/core/include/lluvia/core/node/PortDirection.h | efa809642985e41dfe0b5e55582b19c3aafa51c9 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | jadarve/lluvia | a4966cc0c601e493367e74e982705954f9577bbb | 71a20d57196ffd6a620151ba79b7471f1b6a899d | refs/heads/master | 2023-08-31T13:42:59.550829 | 2023-08-22T01:07:28 | 2023-08-22T01:07:28 | 94,946,831 | 52 | 10 | Apache-2.0 | 2023-08-22T01:07:29 | 2017-06-21T00:34:56 | C++ | UTF-8 | C++ | false | false | 1,100 | h | /**
@file PortDirection.h
@brief PortDirection enum.
@copyright 2022, Juan David Adarve Bermudez. See AUTHORS for more details.
Distributed under the Apache-2 license, see LICENSE for more details.
*/
#ifndef LLUVIA_CORE_NODE_PORT_DIRECTION_H_
#define LLUVIA_CORE_NODE_PORT_DIRECTION_H_
#include "lluvia/core/enums/enums.h"
#include "lluvia/core/vulkan/vulkan.hpp"
namespace ll {
/**
@brief Class for port direction.
*/
enum class PortDirection : ll::enum_t {
In = 0, /**< The port is an input to this node. */
Out = 1 /**< The port is an output to this node. */
};
namespace impl {
/**
@brief Port direction string values used for converting ll::PortDirection to std::string and vice-versa.
@sa ll::PortDirection enum values for this array.
*/
constexpr const std::array<std::tuple<const char*, ll::PortDirection>, 2> PortDirectionStrings {{std::make_tuple("In", ll::PortDirection::In),
std::make_tuple("Out", ll::PortDirection::Out)}};
} // namespace impl
} // namespace ll
#endif // LLUVIA_CORE_NODE_PORT_DIRECTION_H_
| [
"noreply@github.com"
] | jadarve.noreply@github.com |
a954e6ad19ed60f8ee85d5104bec24d73b0114c7 | 0f709ac90c3f58fea8b3c7730da37581ffadb0ce | /PA2/ColdNode.h | 2d433395a84c70a2e09b598a211f1ee90a9c19b4 | [] | no_license | alxndraflo/DataAlignment_CachingOptimization | 033ca3a4f278b5638428a8ce6947c628b2c9596e | 85d6bb3a9d00aeb949fdfab654708261e3657a11 | refs/heads/master | 2023-01-13T12:27:56.720586 | 2020-11-15T21:33:35 | 2020-11-15T21:33:35 | 313,118,837 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 785 | h | //----------------------------------------------------------------------------
// Copyright Ed Keenan 2019
// Optimized C++
//----------------------------------------------------------------------------
#ifndef COLD_NODE_H
#define COLD_NODE_H
#include "Node.h"
class Node;
class HotNode;
class ColdNode
{
public:
// Constructors
ColdNode() = default;
ColdNode(const ColdNode& rhs);
ColdNode& operator=(const ColdNode& rhs);
~ColdNode() = default;
ColdNode& operator=(const Node& rhs); // assign operator that takes NODE - conversion
// Data
HotNode *pHot = nullptr;
float x = 0.0f;
float y = 0.0f;
float z = 0.0f;
Vect A;
Vect B;
Vect C;
Matrix MA;
Matrix MB;
Matrix MC;
Matrix MD;
char name[Node::NAME_SIZE];
};
#endif
// --- End of File ---------------
| [
"60085663+killrbnny@users.noreply.github.com"
] | 60085663+killrbnny@users.noreply.github.com |
f1544b5af7263a4d6e316abec6eeca3f9d41fb20 | fec987af26eed21ab5d9dd90794e7ba9c1c594ea | /ATTINY13A_TX/ATTINY13A_TX.ino | d990946eede3cc693a5687c2f70323d56d60aa2d | [
"MIT"
] | permissive | vymaztom/ATTINY13A_433_TX_RX | 79b0718f07852b68bfcf0d33a97e700fe43eb225 | f6248ceebc52a436ae4bf020c3bf141b48cca883 | refs/heads/master | 2021-01-08T07:58:34.582603 | 2020-02-22T13:27:43 | 2020-02-22T13:27:43 | 241,963,669 | 0 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 756 | ino |
//#define F_CPU 9600000
#define TX 4
void setup() {
// put your setup code here, to run once:
pinMode(TX,OUTPUT);
pinMode(3,INPUT);
}
void loop() {
// put your main code here, to run repeatedly:
/*
digitalWrite(TX,1);
delay(1000);
digitalWrite(TX,0);
delay(1000);
*/
if(digitalRead(A3) == 0){
write_freq(3000);
}else{
write_freq(1500);
}
}
/****************************************************************************
FUNCTIONS
****************************************************************************/
void write_freq(int DELAY){
digitalWrite(TX,LOW);
delayMicroseconds(DELAY);
//delay(DELAY);
digitalWrite(TX,HIGH);
delayMicroseconds(DELAY);
//delay(DELAY);
}
| [
"vyma.96@gmail.com"
] | vyma.96@gmail.com |
b8b809f26bd4c0fe9ac4841f4fdbd303d3926888 | 5b3167f8046a5da1b61a2eef598c697c494f166c | /Algorithms/algorithms_5/p05_ponteiros_passagem_valor-e-referencia.cpp | 65c2f53b5b72e123bc9484759edb1e2029f3d0cf | [
"MIT"
] | permissive | jpenrici/Miscellaneous | cb7122af91c4b890a05a8eb78abd30402e82c212 | 08d9f400ef576e6393913e48d768931cacb4523b | refs/heads/master | 2023-08-31T15:20:40.028650 | 2023-08-30T13:01:52 | 2023-08-30T13:01:52 | 123,445,141 | 2 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,737 | cpp | /*
================================================================================
Objetivo:
Estudo da declaração e uso de ponteiros.
Passagem de parâmetro por valor (cópia) e por refência.
Pratica:
Tipos, Variáveis, Operadores
Ponteiros
================================================================================
*/
#include <iostream> // incluí a biblioteca de Entrada/Saída
using namespace std; // espaço reservado da biblioteca std (padrão)
void procedimento_passagem_valor(int valor)
{
cout << "valor recebido = " << valor << endl;
cout << "endereço = " << &valor << endl;
valor = 1980;
cout << "valor atual = " << valor << endl;
}
void procedimento_passagem_referencia(int& valor)
{
cout << "valor recebido = " << valor << endl;
cout << "endereço = " << &valor << endl;
valor = 2020;
cout << "valor atual = " << valor << endl;
}
int main()
{
int variavel = -2019;
// int* ==> ponteiro do tipo inteiro
// &variavel ==> indica o endereço da variável na memória
int* ponteiro_variavel = &variavel;
// 30 pontilhados
const string LINHA = "-------------------------------";
cout << "Função Principal" << endl;
cout << "valor da variavel = " << variavel << endl;
cout << "endereço da variavel = " << &variavel << endl;
cout << "endereço do ponteiro = " << ponteiro_variavel << endl;
// *ptr ==> significa que obter valor do ponteiro
cout << "valor acessdo no ponteiro = " << *ponteiro_variavel << endl;
cout << LINHA << endl;
cout << "Procedimento Passagem por Valor" << endl;
procedimento_passagem_valor(variavel);
cout << LINHA << endl;
cout << "Função Principal" << endl;
cout << "variavel = " << variavel << endl;
cout << LINHA << endl;
cout << "Procedimento por Referência" << endl;
procedimento_passagem_referencia(variavel);
cout << LINHA << endl;
cout << "Função Principal" << endl;
cout << "variavel = " << variavel << endl;
cout << LINHA << endl;
return 0;
}
/*
No terminal
Compilação: g++ -c PO1_helloworld.cpp
Ligação : g++ -o helloworld PO1_helloworld.o
Execução : ./helloworld
*/
/*
Função Principal
valor da variavel = -2019
endereço da variavel = 0xbfccd394
endereço do ponteiro = 0xbfccd394
valor acessdo no ponteiro = -2019
-------------------------------
Procedimento Passagem por Valor
valor recebido = -2019
endereço = 0xbfccd360
valor atual = 1980
-------------------------------
Função Principal
variavel = -2019
-------------------------------
Procedimento por Referência
valor recebido = -2019
endereço = 0xbfccd394
valor atual = 2020
-------------------------------
Função Principal
variavel = 2020
-------------------------------
*/ | [
"jpenrici@gmail.com"
] | jpenrici@gmail.com |
770f4eb2293b3fed2476d03d51c175bbc73edcf5 | 4262591e1586b909692756c48288e690af813b66 | /src/project/cocos2dx/sprite_nodes/CCAnimationSprite.cpp | c8ce90ba66de0b58b47842457f70e55d3739af39 | [] | no_license | atom-chen/DotaTribe | 924a6df4463bffb6cc08df5d8d5cdb4a1a5740fb | 2f6409a78825250ffa38b18b9819dee3ec9d1182 | refs/heads/master | 2020-11-28T03:44:41.631302 | 2019-08-23T07:04:34 | 2019-08-23T07:04:34 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 6,189 | cpp | /****************************************************************************
Copyright (c) 2010-2011 cocos2d-x.org
Copyright (c) 2008-2010 Ricardo Quesada
Copyright (c) 2011 Zynga Inc.
http://www.cocos2d-x.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
#include "CCSpriteBatchNode.h"
#include "CCAnimation.h"
#include "CCAnimationCache.h"
#include "include/ccConfig.h"
#include "CCAnimationSprite.h"
#include "CCSprite.h"
#include "CCSpriteFrame.h"
#include "CCSpriteFrameCache.h"
#include "textures/CCTextureCache.h"
#include "support/CCPointExtension.h"
#include "cocoa/CCGeometry.h"
#include "textures/CCTexture2D.h"
#include "cocoa/CCAffineTransform.h"
#include "actions/CCActionInterval.h"
#include "actions/CCActionInstant.h"
#include "CCDirector.h"
#include <string.h>
using namespace std;
namespace cocos2d {
CCAnimationSprite::CCAnimationSprite()
{
m_pAnimationSprite = NULL;
m_pAnimationName = "";
m_AnimationInterval = CCDirector::sharedDirector()->getAnimationSpritePlayInterval();
m_AnimationFrameCount= 0;
m_AnimationRepeat = true;
m_bAutoPlay = false;
}
CCAnimationSprite::~CCAnimationSprite()
{
if (m_pAnimationSprite != NULL)
{
m_pAnimationSprite->stopAllActions();
this->removeChild(m_pAnimationSprite, true);
m_pAnimationSprite = NULL;
}
}
//! play animation
void CCAnimationSprite::play()
{
if (m_AnimationFrameCount == 0)
return;
if (m_pAnimationName.size() == 0)
return;
if (m_pAnimationSprite != NULL)
{
m_pAnimationSprite->stopAllActions();
this->removeChild(m_pAnimationSprite, true);
m_pAnimationSprite = NULL;
}
cocos2d::CCArray* pAnimFrames = cocos2d::CCArray::create();
{
for(unsigned int i=1; i<=m_AnimationFrameCount; i++)
{
char buffer[128] = "";
sprintf(buffer, "%s_%02d.png", m_pAnimationName.c_str(), i);
cocos2d::CCSpriteFrame* pTemp = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache()->spriteFrameByName(buffer);
pAnimFrames->addObject(pTemp);
}
setAnimationSprite(cocos2d::CCSprite::createWithSpriteFrame((cocos2d::CCSpriteFrame*)pAnimFrames->objectAtIndex(0)));
cocos2d::CCAnimation* pAnimation = cocos2d::CCAnimation::createWithSpriteFrames(pAnimFrames, m_AnimationInterval);
cocos2d::CCAnimate* pAnimate = cocos2d::CCAnimate::create(pAnimation);
if (m_AnimationRepeat)
{
cocos2d::CCActionInterval* pSeq = (cocos2d::CCActionInterval*)(cocos2d::CCSequence::create(pAnimate, NULL));
m_pAnimationSprite->runAction(cocos2d::CCRepeatForever::create(pSeq));
}
else
{
cocos2d::CCAction* pAction = cocos2d::CCSequence::create(pAnimate, cocos2d::CCCallFunc::create(this, callfunc_selector(cocos2d::CCAnimationSprite::callback)), NULL);
m_pAnimationSprite->runAction(pAction);
}
}
pAnimFrames->release();
}
//! stop animation
void CCAnimationSprite::stop()
{
if (m_pAnimationSprite != NULL)
{
m_pAnimationSprite->stopAllActions();
this->removeChild(m_pAnimationSprite, true);
m_pAnimationSprite = NULL;
}
}
CCSprite* CCAnimationSprite::getAnimationSprite()
{
return m_pAnimationSprite;
}
//! set animation name
void CCAnimationSprite::setAnimationName(std::string name)
{
m_pAnimationName = name;
if (m_bAutoPlay)
play();
}
//! get animation name
std::string CCAnimationSprite::getAnimationName()
{
return m_pAnimationName;
}
//! set animation interval
void CCAnimationSprite::setAnimationInterval(float interval)
{
m_AnimationInterval = interval;
if (m_bAutoPlay)
play();
}
//! get animation interval
float CCAnimationSprite::getAnimationInterval()
{
return m_AnimationInterval;
}
void CCAnimationSprite::setAnimationFrameCount(unsigned int num)
{
m_AnimationFrameCount = num;
if (m_bAutoPlay)
play();
}
unsigned int CCAnimationSprite::getAnimationFrameCount()
{
return m_AnimationFrameCount;
}
//! set animation repeat
void CCAnimationSprite::setAnimationRepeat(bool bRepeat)
{
m_AnimationRepeat = bRepeat;
if (m_bAutoPlay)
play();
}
//! get animation repeat
bool CCAnimationSprite::getAnimationRepeat()
{
return m_AnimationRepeat;
}
//! set animation auto play
void CCAnimationSprite::setAnimationAutoPlay(bool bAutoPlay)
{
m_bAutoPlay = bAutoPlay;
if (m_bAutoPlay)
play();
}
//! get animation auto play
bool CCAnimationSprite::getAnimationAutoPlay()
{
return m_bAutoPlay;
}
void CCAnimationSprite::callback()
{
stop();
}
bool CCAnimationSprite::init()
{
setAnchorPoint(ccp(0.5f, 0.5f));
return true;
}
void CCAnimationSprite::setAnimationSprite(CCSprite* pSprite)
{
if (m_pAnimationSprite != NULL)
{
m_pAnimationSprite->stopAllActions();
removeChild(m_pAnimationSprite, true);
m_pAnimationSprite = NULL;
}
m_pAnimationSprite = pSprite;
m_pAnimationSprite->setAnchorPoint(CCPoint(0.5f, 0.5f));
m_pAnimationSprite->setPosition(CCPoint(m_pAnimationSprite->getContentSize().width/2, m_pAnimationSprite->getContentSize().height/2));
addChild(m_pAnimationSprite);
this->setContentSize(m_pAnimationSprite->getContentSize());
}
}//namespace cocos2d
| [
"qyin@me.com"
] | qyin@me.com |
b1e1c4a5f32a7f2dd0f013be67e8ce5d9ab2fe16 | 59f00d4f6fccb6b1103c5aa54f43a6e4d4f8bfc5 | /src/common-lib/DataObjects/Spectrum.h | 55a781cd1ffd0def2d805fda656afa0459359967 | [] | no_license | tomas-pluskal/masspp | 9c9492443bb796533bcb27fe52a0a60e4ba62160 | 808bf095215e549e7eb5317c02c04dfb2ceaba15 | refs/heads/master | 2021-01-01T05:33:44.483127 | 2015-06-07T12:54:17 | 2015-06-07T12:54:17 | 33,917,190 | 0 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 23,036 | h | /**
* @file Spectrum.h
* @brief interfaces of Spectrum class
*
* @author S.Tanaka
* @date 2006.08.30
*
* Copyright(C) 2006-2014 Eisai Co., Ltd. All rights reserved.
*/
#ifndef __KOME_OBJECTS_SPECTRUM_H__
#define __KOME_OBJECTS_SPECTRUM_H__
#include <string>
#include <boost/optional.hpp>
namespace kome {
namespace objects {
class Sample;
class DataGroupNode;
/**
* @class Spectrum
* @brief spectrum information management class
*/
class DATA_OBJECTS_CLASS Spectrum {
public:
/**
* @fn Spectrum( Sample* sample, const char* name )
* @brief constructor
* @param[in] sample sample object that has this spectrum
* @param[in] name spectrum name
*/
Spectrum( Sample* sample, const char* name );
/**
* @fn virtual ~Spectrum()
* @brief destructor
*/
virtual ~Spectrum();
public:
/**
* @typedef Polarity
* @brief polarity definition
*/
typedef enum {
POLARITY_UNKNOWN = 0,
POLARITY_POSITIVE = 1,
POLARITY_NEGATIVE = 2
} Polarity;
protected:
/**
* @struct PrecursorInfo
* @brief precursor information
*/
struct PrecursorInfo {
int stage;
double precursor;
double intensity;
};
private:
/** sample object */
Sample* m_sample;
/** name */
std::string m_name;
/** parent spectrum */
Spectrum* m_parentSpec;
/** child spectra */
std::vector< Spectrum* > m_children;
/** has chromatogram flag */
bool m_chrom;
/** spectrum group */
DataGroupNode* m_group;
/** retention time */
struct {
double start;
double end;
} m_rt;
/** icon name */
std::string m_icon;
/** spectrum type */
std::string m_specType;
/** spectrum title */
std::string m_title;
/** min x */
boost::optional< double > m_minX;
/** max x */
boost::optional< double > m_maxX;
/** total intensity */
boost::optional< double > m_tic;
/** base peak intensity */
boost::optional< double > m_bpi;
/** base peak mass */
double m_bpm;
/** MS stage */
int m_msStage;
/** precursor */
std::vector< PrecursorInfo > m_precursor;
/** precursor charge */
int m_charge;
/** scan number */
int m_scanNumber;
/** polarity */
Polarity m_polarity;
/** centroid mode */
bool m_centroidMode;
/** resolution */
double m_resolution;
/** collision energy */
std::string m_collisionEnergy;
/** visible flag */
bool m_visible;
/** properties */
kome::core::Properties m_props;
/** user properties */
kome::core::Properties m_userProps;
/** auto zero */
bool m_autoZeroPoints;
// >>>>>> @Date:2013/07/11 <Add> A.Ozaki
/** spot id */
std::string m_strSpotId;
// <<<<<< @Date:2013/07/11 <Add> A.Ozaki
protected:
/** original spectrum */
Spectrum* m_orgSpec;
/** operation flag */
bool m_op;
protected:
/** common properties */
static std::vector< std::string > m_commonProps;
/** spectrum id */
int m_specId;
public:
/**
* @fn void setId( int id )
* @brief sets spectrum id
* @param[in] id spectrum id
*/
void setId( int id );
/**
* @fn int getId()
* @brief gets spectrum id
* @return spectrum id
*/
int getId();
public:
/**
* @fn void setOperationFlag( const bool op )
* @brief sets the operation flag value
* @param[in] op operation flag value
*/
void setOperationFlag( const bool op ){ m_op = op; }
/**
* @fn bool getOperationFlag()
* @brief gets the operation flag value
* @return operation flag value
*/
bool getOperationFlag(){ return m_op; }
public:
/**
* @fn Sample* getSample()
* @brief gets the sample that has this spectrum
* @return sample object
*/
Sample* getSample();
/**
* @fn void setName( const char* name )
* @brief sets spectrum name
* @param[in] name spectrum name
*/
void setName( const char* name );
/**
* @fn const char* getName()
* @brief gets spectrum name
* @return spectrum name
*/
const char* getName();
/**
* @fn void setRt( const double rt )
* @brief sets retention time
* @param[in] rt retention time
*/
void setRt( const double rt );
/**
* @fn void setRt( const double startRt, const double endRt )
* @brief gets retention time
* @param[in] startRt the start retention time
* @param[in] endRt the end retention time
*/
void setRt( const double startRt, const double endRt );
/**
* @fn void setStartRt( const double rt )
* @brief sets start retention time
* @param[in] rt start retention time
*/
void setStartRt( const double rt );
/**
* @fn void setEndRt( const double rt )
* @brief sets end retention time
* @param[in] rt end retention time
*/
void setEndRt( const double rt );
/**
* @fn double getRt()
* @brief gets retention time
* @return retention time
*/
double getRt();
/**
* @fn double getStartRt()
* @brief gets the start of retention time
* @return the start of retention time
*/
double getStartRt();
/**
* @fn double getEndRt()
* @brief gets the end of retention time
* @return the end of retention time
*/
double getEndRt();
/**
* @fn void setSpecType( const char* type )
* @brief sets spectrum type
* @param[in] type spectrum type
*/
void setSpecType( const char* type );
/**
* @fn const char* getSpecType()
* @brief gets spectrum type
* @return spectrum type
*/
const char* getSpecType();
/**
* @fn void setTitle( const char* title )
* @brief sets spectrum title
* @param[in] title spectrum title
*/
void setTitle( const char* title );
/**
* @fn const char* getTitle()
* @brief gets spectrum title
* @return spectrum title
*/
const char* getTitle();
/**
* @fn void setIcon( const char* icon )
* @brief sets icon name
* @return icon name
*/
void setIcon( const char* icon );
/**
* @fn const char* getIcon()
* @brief gets icon name
* @return icon name
*/
const char* getIcon();
/**
* @fn kome::core::XYData* getXYData()
* @brief gets xy data from data manager
* @return xy data object
*/
kome::core::XYData* getXYData();
/**
* @fn void deleteXYData()
* @brief deletes xy data of data manager
*/
void deleteXYData();
/**
* @fn void getXYData( kome::core::XYData* const xyData, const bool op )
* @brief gets data points
* @param[out] xyData the object to store data points
* @param[in] op If true, getting operated data points
*/
void getXYData( kome::core::XYData* const xyData, const bool op );
/**
* @fn void getXYData( kome::core::XYData* const xyData, const double minX, const double maxX, const bool zero )
* @brief gets data points that spectrum has
* @param[out] xyData the object to store data points
* @param[in] minX minimum x value. (If minX is negative number, minimum x value is not unbounded.)
* @param[in] maxX maximum x value. (If maxX is negative number, maximum x value is not unbounded.)
* @param[in] zero zero intensities insertion flag
*/
void getXYData( kome::core::XYData* const xyData, const double minX, const double maxX, const bool zero );
/**
* @fn void setXRange( const double minX, const double maxX )
* @brief sets x range
* @param[in] minX min x
* @param[in] maxX max x
*/
void setXRange( const double minX, const double maxX );
/**
* @fn void setMinX( const double minX )
* @brief sets min x
* @param[in] minX min x
*/
void setMinX( const double minX );
/**
* @fn double getMinX()
* @brief gets min x
* @return min x
*/
double getMinX();
/**
* @fn void setMaxX( const double maxX )
* @brief sets max x
* @param[in] maxX max x
*/
void setMaxX( const double maxX );
/**
* @fn double getMaxX()
* @brief gets max x
* @return max x
*/
double getMaxX();
/**
* @fn void setTotalIntensity( const double intensity )
* @brief sets total intensity of spectrum
* @param[in] intensity total intensity.
*/
void setTotalIntensity( const double intensity );
/**
* @fn double getTotalIntensity( const double minX = -1.0, const double maxX = -1.0 )
* @brief gets total intensity in specified range
* @param[in] minX minimum x of range (If minX is negative number, minimum x value is unbounded.)
* @param[in] maxX maximum x of range (If maxX is negative number, maximum x value is unbounded.)
* @return total intensity
*/
double getTotalIntensity( const double minX = -1.0, const double maxX = -1.0 );
/**
* @fn void setMaxIntensity( const double intensity )
* @brief sets max intensity of spectrum
* @param[in] intensity max intensity
*/
void setMaxIntensity( const double intensity );
/**
* @fn double getMaxIntensity( const double minX = -1.0, const double maxX = -1.0 )
* @brief gets max intensity in specified range
* @param[in] minX minimum x of range (If minX is negative number, minimum x value is unbounded.)
* @param[in] maxX maximum x of range (If maxX is negative number, maximum x value is unbounded.)
* @return max intensity
*/
double getMaxIntensity( const double minX = -1.0, const double maxX = -1.0 );
/**
* @fn void setBasePeakMass( const double mass )
* @brief sets base peak mass
* @param[in] mass base peak mass
*/
void setBasePeakMass( const double mass );
/**
* @fn double getBasePeakMass()
* @brief gets base peak mass
* @return base peak mass
*/
double getBasePeakMass();
/**
* @fn void setMsStage( const int stage )
* @brief sets ms stage
* @param[in] stage ms stage
*/
void setMsStage( const int stage );
/**
* @fn int getMsStage();
* @brief gets ms stage
* @return ms stage
*/
int getMsStage();
/**
* @fn void setPrecursor( const int stage, const double precursor )
* @brief sets precursor
* @param[in] stage MS stage of precursor ion spectrum.
* @param[in] precursor precursor mass
*/
void setPrecursor( const int stage, const double precursor );
/**
* @fn void setPrecursor( const double precursor )
* @brief sets precursor
* @param[in] precursor precursor mass
*/
void setPrecursor( const double precursor );
/**
* @fn double getPrecursor( const int stage )
* @brief gets precursor
* @param[in] stage MS stage of precursor ion spectrum
* @return precursor
*/
double getPrecursor( const int stage );
/**
* @fn double getPrecursor()
* @brief gets the precursor mass of precursor ion spectrum.
* @return precursor mass
*/
double getPrecursor();
/**
* @fn void setPrecursorIntensity( const int stage, const double intensity )
* @brief sets precursor intensity
* @param[in] stage MS stage of precursor ion spectrum
* @param[in] intensity precursor intensity
*/
void setPrecursorIntensity( const int stage, const double intensity );
/**
* @fn void setPrecursorIntensity( const double intensity )
* @brief sets precursor intensity
* @param[in] intensity precursor intensity
*/
void setPrecursorIntensity( const double intensity );
/**
* @fn double getPrecursorIntensity( const int stage )
* @brief gets the precursor intensity
* @param[in] stage MS stage of precursor ion spectrum
* @return precursor intensity
*/
double getPrecursorIntensity( const int stage );
/**
* @fn double getPrecursorIntensity()
* @brief gets the precursor intensity of the precursor ion spectrum.
* @return the precursor intensity
*/
double getPrecursorIntensity();
/**
* @fn void setPrecursorCharge( const int charge )
* @brief sets the precursor charge
* @param[in] charge precursor charge
*/
void setPrecursorCharge( const int charge );
/**
* @fn int getPrecursorCharge()
* @brief gets the precursor charge
* @return precursor charge
*/
int getPrecursorCharge();
/**
* @fn void setParentSpectrum( Spectrum* const parent )
* @brief sets parent spectrum
* @param[in] parent parent spectrum oebject. (If this spectrum has no parent, this parameter is NULL.)
*/
void setParentSpectrum( Spectrum* const parent );
/**
* @fn Spectrum* getParentSpectrum()
* @brief gets parent spectrum
* @return parent spectrum. (If this spectrum has no parent, this method returns NULL.)
*/
Spectrum* getParentSpectrum();
/**
* @fn void getChildSpectra( std::vector< Spectrum* >& children )
* @brief gets child spectra
* @param[out] children the array to store child spectra
*/
void getChildSpectra( std::vector< Spectrum* >& children );
/**
* @fn void setHasChromatogram( const bool chromatogram )
* @brief sets wheher this spectrum has chromatogram
* @param[in] chromatogram whether this spectrum has chromatogram
*/
void setHasChromatogram( const bool chromatogram );
/**
* @fn bool hasChromatogram()
* @brief judges whether this spectrum has chromatogram
* @return where this spectrum has chromatogram
*/
bool hasChromatogram();
/**
* @fn void setGroup( DataGroupNode* group )
* @brief sets spectrum group
* @param[in] group spectrum group
*/
void setGroup( DataGroupNode* group );
/**
* @fn DataGroupNode* getGroup()
* @brief gets spectrum group
* @return spectrum group
*/
DataGroupNode* getGroup();
/**
* @fn void setScanNumber( const int scan )
* @brief sets scan number
* @param[in] scan scan number
*/
void setScanNumber( const int scan );
/**
* @fn int getScanNumber()
* @brief gets scan number
* @return scan number
*/
int getScanNumber();
/**
* @fn void setPolarity( Polarity polarity )
* @brief sets polarity
* @param[in] polarity polarity
*/
void setPolarity( Polarity polarity );
/**
* @fn Polarity getPolarity()
* @brief gets polarity
* @return polarity
*/
Polarity getPolarity();
/**
* @fn void setCentroidMode( const bool centroidMode )
* @brief sets centroid mode or not
* @param[in] centroidMode If true, this spectrum is centroid mode.
*/
void setCentroidMode( const bool centroidMode );
/**
* @fn bool isCentroidMode()
* @brief judget wheter this spectrum is centroid mode
* @return If true, this spectrum is centroid mode.
*/
bool isCentroidMode();
/**
* @fn void setResolution( const double resolution )
* @brief sets resolution
* @param[in] resolution resolution
*/
void setResolution( const double resolution );
/**
* @fn double getResolution()
* @brief gets resolution
* @return resolution
*/
double getResolution();
/**
* @fn void setCollisionEnergy( const char* collisionEnergy )
* @brief sets the collision energy
* @param[in] collisionEnergy collision energy
*/
void setCollisionEnergy( const char* collisionEnergy );
/**
* @fn const char* getCollisionEnergy()
* @brief gets the collision energy
* @return collision energy
*/
const char* getCollisionEnergy();
/**
* @fn void setVisible( const bool visible )
* @brief sets the visible flag
* @param[in] visible visible flag value
*/
void setVisible( const bool visible );
/**
* @fn bool isVisible()
* @brief gets the visible flag value
* @return visible flag value
*/
bool isVisible();
/**
* @fn void setAutoZeroPoints( const bool autoZero )
* @brief sets auto zero points flag value
* @param[in] autoZero auto zero points flag value.
*/
void setAutoZeroPoints( const bool autoZero );
/**
* @fn bool isAutoZeroPoints()
* @brief gets auto zero points flag value
* @return auto zero points flag value
*/
bool isAutoZeroPoints();
/**
* @fn kome::core::Properties& getProperties()
* @brief gets properties
* @return properties
*/
kome::core::Properties& getProperties();
/**
* @fn kome::core::Properties& getUserProperties()
* @brief gets user properties
* @return user properties
*/
kome::core::Properties& getUserProperties();
/**
* @fn void setOrgSpectrum( Spectrum* spec )
* @brief sets original spectrum
* @param[in] spec orignal spectrum
*/
void setOrgSpectrum( Spectrum* spec );
/**
* @fn Spectrum* getOrgSpectrum()
* @brief gets original spectrum
* @return original spectrum
*/
Spectrum* getOrgSpectrum();
/**
* @fn void getProperties( kome::core::Properties& properties )
* @brief gets spectrum and spectrum group properties
* @param[out] properties properties object to store properties
*/
void getProperties( kome::core::Properties& properties );
/**
* @fn void getUserProperties( kome::core::Properties& userProperties )
* @brief gets spectrum and spectrum group user properties
* @param[out] userProperties userProperties object to store user properties
*/
void getUserProperties( kome::core::Properties& userProperties );
// >>>>>> @Date:2013/07/16 <Add> A.Ozaki
//
/**
* @fn void setSpotId( const char *pcSpotId )
* @brief set spot id
* param[in] pcSpotId SpotId information
*/
void setSpotId( const char *pcSpotId );
/**
* @fn const char *getSpotId( void )
* @brief get spot id
* @return string of spot id
*/
const char *getSpotId( void );
//
// <<<<<< @Date:2013/07/16 <Add> A.Ozaki
public:
/**
* @fn static bool isCommonProperty( const char* key )
* @brief check whther the specified property key is common property or not
* @param[in] key parameter key
* @return If true, specified key is common property key
*/
static bool isCommonProperty( const char* key );
protected:
/**
* @fn virtual void onGetXYData( kome::core::XYData* const xyData, const double minX, const double maxX ) = 0
* @brief This method is called by getXYData method. (abstract method)
* @param[out] xyData the object to store data points
* @param[in] minX minimum x value. (If minX is negative number, minimum x value is not unbounded.)
* @param[in] maxX maximum x value. (If maxX is negative number, maximum x value is not unbounded.)
*/
virtual void onGetXYData( kome::core::XYData* const xyData, const double minX, const double maxX ) = 0;
/**
* @fn virtual void onGetXRange( double* minX, double* maxX ) = 0
* @brief This method is called by getMinX or getMaxX method. (abstract method)
* @param[out] minX the pointer to store minimum x value
* @param[out] maxX the pointer to store maximum x value
*/
virtual void onGetXRange( double* minX, double* maxX ) = 0;
/**
* @fn virtual double onGetTotalIntensity( const double minX, const double maxX ) = 0
* @brief This method is called by getTotalIntensity method. (abstract method)
* @param[in] minX minimum x of range (If minX is negative number, minimum x value is unbounded.)
* @param[in] maxX maximum x of range (If maxX is negative number, maximum x value is unbounded.)
* @return total intensity
*/
virtual double onGetTotalIntensity( const double minX, const double maxX ) = 0;
/**
* @fn virtual double onGetMaxIntensity( const double minX, const double maxX ) = 0
* @brief This method is called by getMaxIntensity method. (abstract method)
* @param[in] minX minimum x of range (If minX is negative number, minimum x value is unbounded.)
* @param[in] maxX maximum x of range (If maxX is negative number, maximum x value is unbounded.)
* @return max intensity
*/
virtual double onGetMaxIntensity( const double minX, const double maxX ) = 0;
// >>>>>> @Date:2013/07/16 <Add> A.Ozaki
//
/**
* @fn virtual bool onSetRequestLoadData( void )
* @brief This method is called by setRequestLoadData method. (abstract method)
*/
virtual void onSetRequestLoadData( void );
/**
* @fn virtual bool onResetRequestLoadData( void )
* @brief This method is called by resetRequestLoadData method. (abstract method)
*/
virtual void onResetRequestLoadData( void );
/**
* @fn virtual bool onIsRequestLoadData( void )
* @brief This method is called by isRequestLoadData method. (abstract method)
* @return If true, file read request is valid.
*/
virtual bool onIsRequestLoadData( void );
/**
* @fn virtual bool onSetFirstAccess( void )
* @brief This method is called by setFirstAccess method. (abstract method)
*/
virtual void onSetFirstAccess( void );
/**
* @fn virtual bool onResetFirstAccess( void )
* @brief This method is called by resetFirstAccess method. (abstract method)
*/
virtual void onResetFirstAccess( void );
/**
* @fn virtual bool onIsFirstAccess( void )
* @brief This method is called by isFirstAccess method. (abstract method)
* @return If true, the first accessing.
*/
virtual bool onIsFirstAccess( void );
/**
* @fn virtual bool onLoadData( void )
* @brief This method is called by loadData method. (abstract method)
* @return If true, file reading success.
*/
virtual bool onLoadData( void );
/**
* @fn bool firstAccessProcess( void )
* @brief method for processing when accessing the first item of this class
* @return If true, file reading success.
*/
bool firstAccessProcess( void );
public:
/**
* @fn void setRequestLoadData( void )
* @brief set the flag of request load data
*/
void setRequestLoadData( void );
/**
* @fn void setRequestLoadData( void )
* @brief reset the flag of request load data
*/
void resetRequestLoadData( void );
/**
* @fn bool isRequestLoadData( void )
* @brief check the flag of request load data
* @return If true, enable flag of request load data
*/
bool isRequestLoadData( void );
/**
* @fn void setFirstAccess( void )
* @brief set the flag of first access
*/
void setFirstAccess( void );
/**
* @fn void resetFirstAccess( void )
* @brief reset the flag of first access
*/
void resetFirstAccess( void );
/**
* @fn bool isFirstAccess( void )
* @brief check the flag of first access
* @return If true, enable flag of first access
*/
bool isFirstAccess( void );
/**
* @fn bool loadData( void )
* @brief load data
* @return If true, file reading success.
*/
bool loadData( void );
//
// <<<<<< @Date:2013/07/16 <Add> A.Ozaki
};
}
}
#endif // __KOME_OBJECTS_SPECTRUM_H__
| [
"murase@localhost"
] | murase@localhost |
bafc70ef068e2a461b2f259f3443dd294b5295aa | 306b5a47d33d0846ce40ceaf15e599913cfa23de | /You-QueryEngine-Tests/mocks/task_list.cpp | 68fd8e999463b606cd91a73e06b5cf1534cc796c | [
"MIT"
] | permissive | digawp/main | 52b30a583aff3230f791381920a2f489fc9b598c | f7def04b9c8f3ba50dbcc3a75f7cbed2c2b4d7d0 | refs/heads/master | 2020-11-30T01:44:48.056487 | 2014-11-10T15:33:22 | 2014-11-10T15:33:22 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,435 | cpp | //@author A0112054Y
#include "stdafx.h"
#include "../You-QueryEngine/internal/controller.h"
#include "../You-QueryEngine/internal/state.h"
#include "task_list.h"
namespace You {
namespace QueryEngine {
namespace UnitTests {
namespace {
using Controller = You::QueryEngine::Internal::Controller;
using State = You::QueryEngine::Internal::State;
}
std::vector<Task::Description> TASK_DESCRIPTIONS() {
return {
std::wstring(L"CD"),
std::wstring(L"ABC"),
std::wstring(L"BCD"),
std::wstring(L"ABCD"),
std::wstring(L"EFGH"),
};
};
std::vector<Task> ID_ONE_TO_FIVE() {
return {
Controller::Builder::get().description(L"meh").id(1),
Controller::Builder::get().description(L"meh").id(2),
Controller::Builder::get().description(L"meh").id(3),
Controller::Builder::get().description(L"meh").id(4),
Controller::Builder::get().description(L"meh").id(5)
};
}
std::vector<Task> fromDescription(const std::vector<Task::Description>& v) {
std::vector<Task> result;
std::for_each(v.begin(), v.end(),
[&result] (const Task::Description& d) {
result.push_back(Controller::Builder::get().description(d));
}
);
return result;
}
void populateStateWithTasks(const std::vector<Task>& tasks) {
State::clear();
std::for_each(tasks.begin(), tasks.end(), [] (const Task t) {
Controller::Graph::addTask(State::get().graph(), t);
});
}
/// @}
} // namespace UnitTests
} // namespace QueryEngine
} // namespace You
| [
"evans@comp.nus.edu.sg"
] | evans@comp.nus.edu.sg |
e992506c2a4422f2882fc30d77b452ba1b5d86bd | 22cc83be4eeaf57399a92c7039bc441edd178a67 | /src/simulation/collision_object/particle/discritized_particle_shape.cpp | b570f694f92edfdb4c28231a920c733bee77f6ac | [
"WTFPL"
] | permissive | dearshuto/ParticleBasedSimulation | 0703c12df4c266b267dd6e470fb04abb72f93d64 | 75f7f7454e39f8ed4b970a94d261385cb03b3e15 | refs/heads/master | 2022-03-03T20:57:29.036506 | 2017-02-10T02:55:33 | 2017-02-10T02:55:33 | 78,620,264 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,874 | cpp | //
// discritized_particle_shape.cpp
// CubicFineParticleSimulation
//
// Created by Shuto on 2016/09/10.
//
//
#include <array>
#include <btBulletDynamicsCommon.h>
#include <btBulletCollisionCommon.h>
#include "particle_based_simulation/simulation/collision_object/particle/discritized_particle_shape.hpp"
std::unique_ptr<fj::DiscritizedParticleShape::NormalContainer> fj::DiscritizedParticleShape::GetDiscretizedParticleShapeNormal(const ShapeType type)
{
//---------- 離散化形状を表すクラスの派生の定義 ------------------------------------------------------------------
class CubeNormalContainer : public fj::DiscritizedParticleShape::NormalContainer
{
public:
// コンストラクタ
CubeNormalContainer()
: m_normalArray({{
{1, 0, 0},
{-1, 0, 0},
{0, 1, 0},
{0, -1, 0},
{0, 0, 1},
{0, 0, -1}
}})
{}
~CubeNormalContainer() = default;
unsigned int size()const override
{
return static_cast<unsigned int>(m_normalArray.size());
}
const btVector3& get(unsigned int index)const override
{
return m_normalArray[index];
}
void rotate(const btMatrix3x3& matrix)override
{
std::for_each(m_normalArray.begin(), m_normalArray.end()
, [matrix](btVector3& vector){
vector = matrix * vector;
});
}
private:
std::array<btVector3, 6> m_normalArray;
};
//---------- インスタンス選択 ------------------------------------------------------------------------------------
return std::unique_ptr<CubeNormalContainer>(new CubeNormalContainer());
}
| [
"shuto.shikama@fj.ics.keio.ac.jp"
] | shuto.shikama@fj.ics.keio.ac.jp |
59f80ef3079d9d2d88f815d6169070a9064c2298 | b36cda341d93d5a76465db3ac5d119670a4d42b0 | /Dynamic Programming/Coin Combinations I.cpp | b9dde1e94f254752fc31404e627dc32e1af4d768 | [] | no_license | Ii-xD-iI/CSES | b159688cc73d64e66fb464d8a42c43a574b65450 | 5212938d774c4fbe8ca69c920e00b0bcd385a6b0 | refs/heads/master | 2023-07-14T17:08:14.624264 | 2021-08-25T18:04:06 | 2021-08-25T18:04:06 | 291,788,252 | 4 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 604 | cpp | #include "bits/stdc++.h"
using namespace std;
#define elif else if
#define len(x) (int)(x).size()
int main() { cin.tie(nullptr)->sync_with_stdio(false);
const int MOD = 1e9+7;
int N, X; cin >> N >> X;
vector<long long> DP(X+1), coins(N);
for(auto &i : coins) cin >> i;
DP[0] = 1;
for(int i = 1; i <= X; ++i) {
for(auto &j : coins) {
if(j <= i) {
DP[i] += DP[i-j];
DP[i] %= MOD;
}
}
}
//DP[i] = number of ways to make the change `i`
cout << DP[X];
}
/*
25/8/2021
11:33 pm
*/
| [
"noreply@github.com"
] | Ii-xD-iI.noreply@github.com |
8924a43331d79c2861c509c547e836ce454059e7 | b7c036434c925f639bd0a70963a4092ef0508445 | /STL_multiset.cpp | a622eaa3c3fd9d3c6bb8eb1cde056a12c5a66849 | [] | no_license | ASHISH-GITHUB2495/My-CPP-STL-programms | a51e2de4dfb9256624cdf8f310b612490afa9611 | 992247e935fa50fff2df755aef1f809f7e957348 | refs/heads/master | 2022-10-02T17:08:52.021163 | 2020-06-09T13:03:11 | 2020-06-09T13:03:11 | 271,003,288 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 269 | cpp | //Multi set
#include<bits/stdc++.h>
using namespace std;
int main()
{
multiset <int,std::greater<int>> mset={9,3,6,5,8,3,6,5,2};//gerater also
mset.insert(90);
for(auto e: mset)
{
cout<<e<<" ";
}
return 0;
}
| [
"noreply@github.com"
] | ASHISH-GITHUB2495.noreply@github.com |
bf3662e427cd6f55b43f0693b873273141bd744c | e29c03ce1c2a5bbc8b33fc79039a5490444ad04d | /multisom.cpp | 2506c90008a6b65deba3cec59b4cd5ec29eec90a | [] | no_license | AviatorYan/Multi-SOM | 8c65db14a89a9ab5b269294fcfb54885115b7a46 | ba1a86be2cc42a960cce8f5349ba8323acf7a9cd | refs/heads/master | 2023-03-15T19:51:00.683122 | 2016-12-18T00:08:56 | 2016-12-18T00:08:56 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,169 | cpp | #include <string>
#include <cmath>
#include <fstream>
#include"Eigen/StdVector"
#include "som.cpp"
template<int G_DIM, int X_DIM>
class MultiSOM {
private:
int N = X_DIM;
int G = G_DIM;
int epoch = 0;
int epoch_max;
float eta_0;
float eta_final;
float s_0 = 4.0f; // size of gaussian of h
float s = 4.0f; // size of gaussian of h
float s2inv = 1.0f / (s * s); // 1/s^2 (to be used efficiently)
std::vector<std::shared_ptr< SOM<G_DIM, X_DIM>> > soms;
public:
explicit MultiSOM(int m, int k, VectorXi f) {
for (int som = 0; som < m; ++som) {
std::shared_ptr< SOM<G_DIM, X_DIM>> s(new SOM<G_DIM, X_DIM>(f, k));
soms.push_back(s);
}
}
MultiSOM(const MultiSOM&) = delete;
MultiSOM& operator= (const MultiSOM&) = delete;
~MultiSOM() = default;
void train(MatrixXd inputs, float eta0, float etafinal, int iters = 1) {
eta_0 = eta0;
eta_final = etafinal;
epoch = 0;
epoch_max = inputs.rows() * iters;
for (int var = 0; var < iters; ++var)
for (int p = 0; p < inputs.rows(); ++p) {
VectorXd p_i = inputs.row(p);
float shortest = FLT_MAX;
int shortest_idx = -1;
for (int som = 0; som < soms.size(); ++som) {
float d = (soms[som])->stimulate(p_i, true, true);
if (d <= shortest) {
shortest = d;
shortest_idx = som;
}
}
// std::cout << "shortest: " << shortest << ", idx: " << shortest_idx << ", p=" << p << ", pi=" << p_i << std::endl;
// apply only to the winner SOM
soms[shortest_idx]->apply_last_stimulus(eta(), s2inv);
timestep();
}
}
void output_SOMS(std::string filename = "PA-D.net") {
// all together
std::ofstream file2(filename, std::ofstream::out | std::ofstream::trunc);
if (file2.is_open()) {
for (int som = 0; som < soms.size(); ++som) {
MatrixXd c = soms[som]->get_centers();
file2 << c << "\n";
}
}
file2.close();
//separate SOMs
for (int som = 0; som < soms.size(); ++som) {
std::ofstream file(filename + std::to_string(som), std::ofstream::out | std::ofstream::trunc);
if (file.is_open()) {
// MatrixXd c = soms[som]->get_centers();
soms[som]->output_SOM_grid(file);
}
file.close();
}
}
void timestep() {
update_s2inv();
epoch++;
std::cerr << "epoch " << epoch << ": s: " << s << std::endl;
}
void set_gaussian_size(float _s) {
s = _s;
s2inv = 1.0f / (s * s);
}
void update_s2inv() {
s = s_0 * std::pow((0.1f / s_0), ((float)epoch / (float)epoch_max));
s2inv = 1.0f / (s * s);
}
float eta() { // learning rate as a function of time
return eta_0 * std::pow((eta_final / eta_0), ((float)epoch / (float)epoch_max));
}
};
| [
"ahmadz1991@gmail.com"
] | ahmadz1991@gmail.com |
b21f57a35cb67eefa0757a8834f9303ccd15267b | 3d2053c68cacda89b55b2fcb2a65fed9d93e75fc | /seurat/compressor/rgba/rgba_rate_resizer.h | e042ba4b8332553fbcdb6c179a11152748888142 | [
"Apache-2.0"
] | permissive | n1ckfg/seurat | 99dddf9dc665d522c2c781aea205272e4c89e145 | 1e60a31ae9ca80ddd9afc34c64171b792e5f1c89 | refs/heads/master | 2020-03-15T17:07:18.397694 | 2019-04-08T21:13:52 | 2019-04-08T21:13:52 | 132,251,747 | 1 | 1 | null | 2018-05-05T13:45:49 | 2018-05-05T13:45:49 | null | UTF-8 | C++ | false | false | 2,283 | h | /*
Copyright 2017 Google Inc. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS-IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#ifndef VR_SEURAT_COMPRESSOR_RGBA_RGBA_RATE_RESIZER_H_
#define VR_SEURAT_COMPRESSOR_RGBA_RGBA_RATE_RESIZER_H_
#include <memory>
#include "ion/math/vector.h"
#include "seurat/compressor/resampler/resampler.h"
#include "seurat/compressor/texture_encoder.h"
namespace seurat {
namespace compressor {
// RateResizer provides an implementation of the TextureEncoder interface.
// Textures are encoded by downsampling. For each downsampled version of each
// input texture the corresponding bitrate and distortion are computed and
// stored in an EncodedTexture data structure. Texture sizes are constrained
// to be multiples of a block size, matching the ASTC block size.
class RgbaRateResizer : public TextureEncoder {
public:
RgbaRateResizer(int thread_count, std::unique_ptr<Resampler> upsampler,
std::unique_ptr<Resampler> downsampler,
const ion::math::Vector2i& block_size);
// Returns via |encodings| a vector of downsampled versions for each
// texture in the input array |textures|.
void Encode(absl::Span<const image::Image4f> textures,
absl::Span<std::vector<EncodedTexture>> encodings) const override;
private:
// Number of threads.
const int thread_count_;
// Upsampler used to compute distortion.
const std::unique_ptr<Resampler> upsampler_;
// Downsampler used to compute the resized versions of textures.
const std::unique_ptr<Resampler> downsampler_;
// Block size used as texture size increments in x and y directions. Matches
// the ASTC block size.
const ion::math::Vector2i block_size_;
};
} // namespace compressor
} // namespace seurat
#endif // VR_SEURAT_COMPRESSOR_RGBA_RGBA_RATE_RESIZER_H_
| [
"ernstm@google.com"
] | ernstm@google.com |
f0581475a0f87cea0346360c452b7b335370d768 | 879681c994f1ca9c8d2c905a4e5064997ad25a27 | /root-2.3.0/run/tutorials/multiphase/twoPhaseEulerFoam/RAS/fluidisedBed/2/U | 83626fba98ea0f40d2033a33234e8e3eda9d8ac6 | [] | no_license | MizuhaWatanabe/OpenFOAM-2.3.0-with-Ubuntu | 3828272d989d45fb020e83f8426b849e75560c62 | daeb870be81275e8a81f5cbac4ca1906a9bc69c0 | refs/heads/master | 2020-05-17T16:36:41.848261 | 2015-04-18T09:29:48 | 2015-04-18T09:29:48 | 34,159,882 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 140,455 | /*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
location "2";
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];
internalField nonuniform List<vector>
6000
(
(-0.0436325 0.000794821 0)
(-0.0726475 -0.111485 0)
(-0.0524172 -0.122197 0)
(-0.0477715 -0.150578 0)
(-0.0465687 -0.149649 0)
(-0.0561728 -0.114225 0)
(-0.0305406 -0.0716613 0)
(-0.00101673 -0.0688433 0)
(0.0487668 -0.0664972 0)
(0.0927613 -0.0532295 0)
(0.104477 -0.0240238 0)
(0.0103778 0.0508742 0)
(-0.122675 0.0750386 0)
(-0.224045 -0.0527045 0)
(-0.187159 -0.0467451 0)
(-0.0663148 -0.0635214 0)
(-0.00599193 -0.0752177 0)
(-0.103808 0.00819432 0)
(-0.211541 -0.0268457 0)
(-0.212819 -0.00535455 0)
(-0.170941 0.00198698 0)
(-0.102868 0.0131228 0)
(-0.044852 0.0213558 0)
(-0.00463456 0.0161042 0)
(0.00195075 -0.00242129 0)
(-0.079757 -0.0650166 0)
(-0.155106 -0.129291 0)
(-0.144549 -0.127356 0)
(-0.0900241 -0.0839028 0)
(-0.0314573 -0.016549 0)
(0.0100954 0.64477 0)
(-0.00950479 0.575051 0)
(0.00345366 0.599792 0)
(-0.00543546 0.612731 0)
(-0.0450807 0.645455 0)
(-0.0972635 0.633527 0)
(-0.0947507 0.599526 0)
(-0.0451912 0.576887 0)
(0.0196124 0.554229 0)
(0.00705147 0.591537 0)
(-0.0408952 0.690116 0)
(-0.0763498 0.674074 0)
(-0.0707841 0.702924 0)
(-0.0808298 0.755017 0)
(-0.119769 0.472432 0)
(-0.129802 0.439187 0)
(-0.14841 0.670144 0)
(-0.119076 0.672413 0)
(-0.089999 0.688675 0)
(-0.0787322 0.579574 0)
(-0.080586 0.451037 0)
(-0.0646385 0.460402 0)
(-0.0397711 0.474956 0)
(-0.0214227 0.525251 0)
(-0.0105059 0.65253 0)
(-0.00234469 0.752363 0)
(-0.0559638 0.763393 0)
(-0.141417 0.649828 0)
(-0.140123 0.579355 0)
(-0.0646527 0.501169 0)
(0.00764795 0.635133 0)
(0.0203398 0.473724 0)
(0.0243696 0.506705 0)
(-0.00444295 0.500596 0)
(-0.0424714 0.609114 0)
(-0.104211 0.541597 0)
(-0.119114 0.368857 0)
(-0.0757991 0.339811 0)
(-0.0243089 0.329694 0)
(-0.0403322 0.577224 0)
(-0.0934579 0.624054 0)
(-0.0827659 0.605081 0)
(-0.0654248 0.617814 0)
(-0.0123471 0.564126 0)
(-0.0232181 0.439068 0)
(-0.106179 0.409869 0)
(-0.134828 0.549935 0)
(-0.0951953 0.541101 0)
(-0.0313133 0.521207 0)
(0.0169879 0.477169 0)
(0.0211976 0.442568 0)
(0.00611602 0.442603 0)
(0.000478561 0.456732 0)
(-0.0135057 0.474789 0)
(-0.0153223 0.527332 0)
(-0.000917453 0.574086 0)
(-0.00908201 0.664139 0)
(-0.0814766 0.473712 0)
(-0.0738165 0.308544 0)
(-0.00870645 0.260249 0)
(0.00890582 0.559607 0)
(0.0368004 0.478347 0)
(0.0677135 0.52526 0)
(0.0392071 0.56405 0)
(0.0202761 0.623981 0)
(0.00101361 0.651472 0)
(-0.0594382 0.401442 0)
(-0.0944778 0.311843 0)
(-0.0761543 0.355991 0)
(-0.0780882 0.600197 0)
(-0.0811329 0.584798 0)
(-0.0623096 0.574111 0)
(-0.0362177 0.556883 0)
(0.00177184 0.557021 0)
(0.0095401 0.495415 0)
(-0.0311865 0.480019 0)
(-0.0663615 0.505136 0)
(-0.0422528 0.502081 0)
(-0.00353486 0.479802 0)
(0.022977 0.451468 0)
(0.0369188 0.424435 0)
(0.0482679 0.424649 0)
(0.0548247 0.437504 0)
(0.052645 0.476212 0)
(0.0528939 0.521589 0)
(0.0472407 0.584396 0)
(0.0656108 0.68035 0)
(0.0308311 0.60976 0)
(0.0027408 0.325516 0)
(0.0200575 0.279976 0)
(0.0384251 0.543966 0)
(0.00910942 0.416248 0)
(0.0937437 0.505463 0)
(0.115206 0.570623 0)
(0.0971517 0.62115 0)
(0.0967929 0.648814 0)
(0.0346794 0.550471 0)
(-0.0443504 0.287258 0)
(-0.0453074 0.381643 0)
(-0.0117422 0.597625 0)
(0.00526062 0.611565 0)
(-0.0020479 0.566665 0)
(0.0182261 0.555863 0)
(0.0542368 0.526869 0)
(0.049532 0.512429 0)
(0.0191102 0.500582 0)
(-0.0116715 0.510365 0)
(-0.0188642 0.491442 0)
(-0.0175362 0.464697 0)
(-0.000510347 0.421617 0)
(0.0271192 0.400596 0)
(0.0629121 0.400879 0)
(0.0779534 0.431756 0)
(0.0841738 0.464831 0)
(0.0914105 0.519646 0)
(0.096394 0.573579 0)
(0.0988249 0.665996 0)
(0.10709 0.683928 0)
(0.0615715 0.340138 0)
(0.0314123 0.297703 0)
(0.0171719 0.553755 0)
(0.0350628 0.320283 0)
(0.0971431 0.414202 0)
(0.156287 0.575484 0)
(0.156658 0.641952 0)
(0.125974 0.659624 0)
(0.0750238 0.628977 0)
(0.0059743 0.374778 0)
(-0.0312459 0.340951 0)
(0.0421635 0.530954 0)
(0.0947583 0.593794 0)
(0.0833489 0.587311 0)
(0.0821956 0.53062 0)
(0.09243 0.521822 0)
(0.0931048 0.525125 0)
(0.0354004 0.551566 0)
(0.00317236 0.532707 0)
(-0.0387443 0.516055 0)
(-0.0674532 0.476575 0)
(-0.0568496 0.384754 0)
(-0.0015876 0.366238 0)
(0.0569572 0.383893 0)
(0.0884783 0.431631 0)
(0.104213 0.47043 0)
(0.114947 0.509926 0)
(0.135688 0.578618 0)
(0.154281 0.660946 0)
(0.181758 0.682423 0)
(0.0988901 0.42609 0)
(0.0338675 0.34905 0)
(0.0256349 0.570914 0)
(0.0434618 0.282694 0)
(0.0919925 0.333394 0)
(0.152659 0.541076 0)
(0.178068 0.672307 0)
(0.126058 0.695988 0)
(0.0760484 0.693162 0)
(0.011283 0.413461 0)
(-0.00423429 0.31178 0)
(0.0502414 0.435647 0)
(0.117627 0.587774 0)
(0.109979 0.587308 0)
(0.0919468 0.554443 0)
(0.0842924 0.532851 0)
(0.0905309 0.522871 0)
(0.0481068 0.603353 0)
(-0.0116881 0.606373 0)
(-0.0887094 0.585947 0)
(-0.137395 0.479842 0)
(-0.112667 0.327293 0)
(-0.0637593 0.30562 0)
(-0.0253943 0.313908 0)
(0.0337359 0.393815 0)
(0.0865612 0.463632 0)
(0.127877 0.495793 0)
(0.186319 0.558857 0)
(0.24865 0.648145 0)
(0.276098 0.662685 0)
(0.170488 0.540695 0)
(0.0506483 0.376724 0)
(0.0589922 0.512191 0)
(0.0637962 0.2734 0)
(0.0543919 0.295961 0)
(0.0969222 0.455522 0)
(0.15007 0.723916 0)
(0.116644 0.773182 0)
(0.066684 0.763514 0)
(0.0430997 0.441711 0)
(0.031867 0.316205 0)
(0.0337701 0.371287 0)
(0.0726087 0.549445 0)
(0.0752019 0.637939 0)
(0.0622845 0.599685 0)
(0.0505739 0.5388 0)
(0.0523719 0.502284 0)
(0.037926 0.655657 0)
(-0.0382344 0.704012 0)
(-0.132074 0.707598 0)
(-0.165172 0.434158 0)
(-0.148079 0.301672 0)
(-0.130031 0.281139 0)
(-0.13272 0.274239 0)
(-0.0916997 0.326473 0)
(-0.0202056 0.387177 0)
(0.0729306 0.427687 0)
(0.184896 0.476704 0)
(0.285337 0.55799 0)
(0.312448 0.672252 0)
(0.249786 0.716831 0)
(0.0776857 0.552485 0)
(0.0661111 0.417214 0)
(0.0521087 0.299139 0)
(0.0139487 0.314283 0)
(0.00848792 0.391697 0)
(0.0389616 0.680732 0)
(0.0901973 0.871555 0)
(0.0933249 0.76434 0)
(0.0965137 0.447985 0)
(0.0692234 0.350639 0)
(0.0261436 0.377917 0)
(0.00479869 0.512685 0)
(0.0240718 0.658051 0)
(0.025682 0.613092 0)
(0.00981538 0.524436 0)
(0.0038003 0.503303 0)
(0.00124208 0.678692 0)
(-0.0594208 0.817338 0)
(-0.124635 0.796012 0)
(-0.160871 0.393266 0)
(-0.18089 0.315196 0)
(-0.189463 0.294333 0)
(-0.207187 0.270742 0)
(-0.191569 0.279167 0)
(-0.137292 0.287336 0)
(-0.0448282 0.299603 0)
(0.078087 0.332341 0)
(0.182422 0.444489 0)
(0.228451 0.695479 0)
(0.191075 0.816554 0)
(0.0633006 0.726514 0)
(0.0400181 0.365073 0)
(0.01532 0.338977 0)
(-0.0326487 0.35808 0)
(-0.0687577 0.398371 0)
(-0.057882 0.563284 0)
(0.0187596 0.832128 0)
(0.119184 0.695631 0)
(0.120752 0.456464 0)
(0.0863817 0.402028 0)
(0.0320232 0.428245 0)
(-0.0030088 0.518914 0)
(0.000484945 0.634837 0)
(-0.00498876 0.600352 0)
(-0.0221393 0.54674 0)
(-0.0583649 0.540684 0)
(-0.0701582 0.672989 0)
(-0.0904227 0.89118 0)
(-0.0562648 0.834048 0)
(-0.136213 0.416437 0)
(-0.190122 0.351769 0)
(-0.219208 0.318376 0)
(-0.237631 0.279924 0)
(-0.229933 0.250485 0)
(-0.188753 0.221038 0)
(-0.122762 0.202423 0)
(-0.03716 0.217693 0)
(0.0385457 0.352093 0)
(0.115174 0.714454 0)
(0.0878166 0.874291 0)
(0.0301775 0.807806 0)
(0.00320671 0.352261 0)
(-0.0294228 0.381598 0)
(-0.0758042 0.406598 0)
(-0.118091 0.432262 0)
(-0.124496 0.504691 0)
(-0.0545274 0.669383 0)
(0.0946372 0.607854 0)
(0.104905 0.473184 0)
(0.0753896 0.447033 0)
(0.0361965 0.480572 0)
(0.00449645 0.547917 0)
(-0.0107404 0.615167 0)
(-0.0221669 0.60353 0)
(-0.0597656 0.586024 0)
(-0.115797 0.588774 0)
(-0.147175 0.664866 0)
(-0.140132 0.828592 0)
(-0.0469924 0.804425 0)
(-0.0942133 0.513043 0)
(-0.179284 0.402387 0)
(-0.221903 0.341307 0)
(-0.23713 0.286354 0)
(-0.229887 0.231599 0)
(-0.198699 0.181565 0)
(-0.157958 0.151794 0)
(-0.116834 0.159594 0)
(-0.0828539 0.291751 0)
(-0.0170116 0.6966 0)
(5.86268e-05 0.928893 0)
(0.0041798 0.868114 0)
(-0.0186207 0.38284 0)
(-0.068014 0.430997 0)
(-0.11356 0.452847 0)
(-0.144068 0.464248 0)
(-0.147647 0.48779 0)
(-0.0934843 0.546655 0)
(0.0146831 0.528313 0)
(0.0600411 0.480625 0)
(0.053357 0.472546 0)
(0.0345442 0.513161 0)
(0.0116525 0.56917 0)
(-0.00985367 0.623564 0)
(-0.0430365 0.642876 0)
(-0.0968956 0.645672 0)
(-0.157414 0.649401 0)
(-0.198639 0.672275 0)
(-0.185131 0.750492 0)
(-0.125089 0.718005 0)
(-0.113061 0.603083 0)
(-0.171133 0.467643 0)
(-0.220374 0.364998 0)
(-0.229931 0.288281 0)
(-0.220611 0.215357 0)
(-0.195519 0.155505 0)
(-0.17102 0.122426 0)
(-0.154613 0.135667 0)
(-0.144357 0.279884 0)
(-0.124491 0.61393 0)
(-0.0911911 0.918679 0)
(-0.0344021 0.838519 0)
(-0.0366084 0.441851 0)
(-0.10828 0.486924 0)
(-0.155996 0.489994 0)
(-0.171543 0.477446 0)
(-0.156782 0.469502 0)
(-0.111072 0.473126 0)
(-0.0395119 0.46584 0)
(0.0207157 0.458891 0)
(0.0399011 0.476328 0)
(0.0365616 0.528001 0)
(0.021282 0.591152 0)
(-0.00942463 0.659584 0)
(-0.0631887 0.70024 0)
(-0.128646 0.712399 0)
(-0.184344 0.705926 0)
(-0.214772 0.697242 0)
(-0.205534 0.704347 0)
(-0.170275 0.677104 0)
(-0.15387 0.625741 0)
(-0.184378 0.537423 0)
(-0.224005 0.3883 0)
(-0.227927 0.286241 0)
(-0.213357 0.19731 0)
(-0.186652 0.1308 0)
(-0.159746 0.0963404 0)
(-0.140645 0.119547 0)
(-0.138257 0.300961 0)
(-0.160346 0.545135 0)
(-0.15041 0.86662 0)
(-0.0541373 0.706048 0)
(-0.0794273 0.511636 0)
(-0.179611 0.546665 0)
(-0.221004 0.512448 0)
(-0.214189 0.466108 0)
(-0.176486 0.433561 0)
(-0.123598 0.412078 0)
(-0.0596933 0.403594 0)
(0.00252766 0.418955 0)
(0.034814 0.463492 0)
(0.0403454 0.537454 0)
(0.0392271 0.603409 0)
(0.0142454 0.694645 0)
(-0.0724323 0.761532 0)
(-0.171327 0.764118 0)
(-0.219039 0.735675 0)
(-0.226589 0.705665 0)
(-0.208429 0.682499 0)
(-0.185051 0.656149 0)
(-0.179581 0.628691 0)
(-0.204643 0.587038 0)
(-0.234806 0.407531 0)
(-0.234646 0.275735 0)
(-0.209578 0.17183 0)
(-0.172381 0.0963349 0)
(-0.131154 0.0549914 0)
(-0.0997319 0.0901611 0)
(-0.117181 0.339247 0)
(-0.161681 0.51993 0)
(-0.167758 0.815938 0)
(-0.0402098 0.552916 0)
(-0.213932 0.692223 0)
(-0.319557 0.637859 0)
(-0.304112 0.504136 0)
(-0.259082 0.424111 0)
(-0.203582 0.378746 0)
(-0.135537 0.348793 0)
(-0.0658861 0.338961 0)
(-0.00120209 0.371027 0)
(0.0394986 0.438437 0)
(0.0455307 0.542008 0)
(0.0341523 0.615978 0)
(0.0182417 0.784655 0)
(-0.0772859 0.877071 0)
(-0.189972 0.865258 0)
(-0.217347 0.790323 0)
(-0.225116 0.689906 0)
(-0.206703 0.645492 0)
(-0.169134 0.633163 0)
(-0.175344 0.648134 0)
(-0.235307 0.635251 0)
(-0.249292 0.414704 0)
(-0.248572 0.254645 0)
(-0.211599 0.135648 0)
(-0.161521 0.0503613 0)
(-0.106467 0.0019343 0)
(-0.0795842 0.0910931 0)
(-0.149297 0.420124 0)
(-0.169368 0.561962 0)
(-0.132367 0.762574 0)
(0.0040422 0.446792 0)
(-0.159872 0.991286 0)
(-0.325491 0.623063 0)
(-0.355353 0.467046 0)
(-0.278923 0.364249 0)
(-0.220988 0.310078 0)
(-0.145766 0.277006 0)
(-0.0652889 0.267453 0)
(-0.000645866 0.322141 0)
(0.0342323 0.449893 0)
(0.0434444 0.592682 0)
(-0.00830884 0.559633 0)
(-0.0610273 0.833155 0)
(-0.0936451 1.0496 0)
(-0.129987 0.938931 0)
(-0.160252 0.750248 0)
(-0.189075 0.703642 0)
(-0.177781 0.638081 0)
(-0.14125 0.64475 0)
(-0.126494 0.652295 0)
(-0.208557 0.645464 0)
(-0.24038 0.419001 0)
(-0.253584 0.221957 0)
(-0.221435 0.0973267 0)
(-0.171259 0.00318901 0)
(-0.127378 -0.0395181 0)
(-0.173674 0.161214 0)
(-0.218162 0.478563 0)
(-0.180551 0.575136 0)
(-0.0903397 0.653977 0)
(0.0329625 0.461072 0)
(-0.0206835 1.4232 0)
(-0.207616 0.960256 0)
(-0.313471 0.400378 0)
(-0.28615 0.28823 0)
(-0.225683 0.234802 0)
(-0.149525 0.197285 0)
(-0.06236 0.167698 0)
(0.0496188 0.255475 0)
(0.0555163 0.317988 0)
(0.00561701 0.656673 0)
(-0.110979 0.797654 0)
(-0.172144 0.897011 0)
(-0.115406 0.973054 0)
(-0.0556048 0.942833 0)
(-0.0462879 0.91173 0)
(-0.0834983 0.75368 0)
(-0.109368 0.547947 0)
(-0.131033 0.552344 0)
(-0.155397 0.785162 0)
(-0.173746 0.842087 0)
(-0.179766 0.471457 0)
(-0.215007 0.173932 0)
(-0.21147 0.0358799 0)
(-0.222919 -0.0444105 0)
(-0.262211 -0.0294399 0)
(-0.321327 0.22095 0)
(-0.276384 0.4288 0)
(-0.187005 0.47175 0)
(-0.10366 0.501098 0)
(0.016665 0.449627 0)
(0.0510421 1.23017 0)
(0.0376198 1.12467 0)
(-0.202743 0.70123 0)
(-0.315603 0.237075 0)
(-0.236973 0.141566 0)
(-0.162143 0.113139 0)
(-0.0609207 0.0571276 0)
(0.0543609 0.170542 0)
(6.91773e-06 0.568176 0)
(-0.116774 0.756767 0)
(-0.170253 0.779742 0)
(-0.178969 0.839981 0)
(-0.140889 0.866211 0)
(-0.0987181 0.877978 0)
(-0.0735785 0.83712 0)
(-0.0794739 0.788332 0)
(-0.131766 0.702512 0)
(-0.209655 0.706525 0)
(-0.229786 0.734577 0)
(-0.183746 0.731726 0)
(-0.190274 0.592549 0)
(-0.341267 0.348302 0)
(-0.420781 0.0936346 0)
(-0.443149 -0.00303254 0)
(-0.464314 0.0157118 0)
(-0.402287 0.174591 0)
(-0.30162 0.330114 0)
(-0.196316 0.389307 0)
(-0.142353 0.408519 0)
(-0.0138007 0.376004 0)
(0.0291299 1.12981 0)
(0.0767455 1.05536 0)
(-0.0140871 0.934207 0)
(-0.220602 0.358095 0)
(-0.254842 0.0850068 0)
(-0.167044 0.0340283 0)
(-0.082681 -0.0217609 0)
(-0.0708402 0.110009 0)
(-0.0728114 0.634479 0)
(-0.142739 0.765997 0)
(-0.173909 0.805587 0)
(-0.179844 0.822457 0)
(-0.164178 0.846694 0)
(-0.155037 0.838747 0)
(-0.143324 0.828657 0)
(-0.143137 0.768508 0)
(-0.176321 0.709432 0)
(-0.221346 0.687479 0)
(-0.247594 0.711863 0)
(-0.24389 0.676283 0)
(-0.290202 0.61051 0)
(-0.401899 0.474336 0)
(-0.537958 0.243168 0)
(-0.498648 -0.00678568 0)
(-0.439063 -0.0323579 0)
(-0.376839 0.0674074 0)
(-0.291563 0.232097 0)
(-0.205392 0.323263 0)
(-0.165166 0.35386 0)
(-0.0251881 0.263445 0)
(0.00741488 1.12649 0)
(0.042936 0.986807 0)
(0.0815087 0.970619 0)
(-0.0901733 0.604007 0)
(-0.212722 0.0187145 0)
(-0.177301 -0.0243298 0)
(-0.123703 -0.0767134 0)
(-0.144599 0.0702451 0)
(-0.101378 0.681527 0)
(-0.140215 0.812793 0)
(-0.174028 0.816748 0)
(-0.183279 0.840178 0)
(-0.190045 0.843184 0)
(-0.198048 0.854077 0)
(-0.194119 0.819625 0)
(-0.192697 0.778472 0)
(-0.216623 0.732427 0)
(-0.247485 0.728946 0)
(-0.271806 0.713984 0)
(-0.303692 0.714506 0)
(-0.346525 0.647712 0)
(-0.415568 0.566365 0)
(-0.439895 0.219897 0)
(-0.350723 -0.0819318 0)
(-0.32614 -0.0970975 0)
(-0.299377 0.0092636 0)
(-0.269073 0.158268 0)
(-0.205906 0.263019 0)
(-0.153065 0.305467 0)
(0.00150351 0.138922 0)
(0.0175461 1.13746 0)
(0.0491076 0.911891 0)
(0.109803 0.969898 0)
(0.0564451 0.749548 0)
(-0.0874163 0.135048 0)
(-0.147468 -0.062794 0)
(-0.121286 -0.0696079 0)
(-0.120233 0.0218072 0)
(-0.118451 0.703922 0)
(-0.147315 0.834791 0)
(-0.180406 0.846596 0)
(-0.199803 0.845408 0)
(-0.220847 0.861483 0)
(-0.230138 0.850188 0)
(-0.237593 0.828593 0)
(-0.241958 0.783571 0)
(-0.264234 0.769218 0)
(-0.282734 0.745581 0)
(-0.305928 0.755128 0)
(-0.328421 0.726167 0)
(-0.35861 0.694426 0)
(-0.395976 0.607907 0)
(-0.318063 0.12884 0)
(-0.239247 -0.131374 0)
(-0.235253 -0.112193 0)
(-0.240819 -0.0072317 0)
(-0.227509 0.115685 0)
(-0.17137 0.183134 0)
(-0.0965922 0.20337 0)
(0.0365714 0.0819008 0)
(0.0429692 1.08208 0)
(0.0708669 0.854476 0)
(0.117292 0.924758 0)
(0.137635 0.808106 0)
(0.0160124 0.301532 0)
(-0.0738439 -0.0414528 0)
(-0.0816441 -0.0500049 0)
(-0.0917147 -0.00229432 0)
(-0.130346 0.732243 0)
(-0.158862 0.883823 0)
(-0.195939 0.864006 0)
(-0.221882 0.873274 0)
(-0.242924 0.866803 0)
(-0.257113 0.864843 0)
(-0.272212 0.834323 0)
(-0.278807 0.807017 0)
(-0.294346 0.776246 0)
(-0.308854 0.777099 0)
(-0.317409 0.758621 0)
(-0.335964 0.762822 0)
(-0.344312 0.709304 0)
(-0.352993 0.593662 0)
(-0.21742 0.0221478 0)
(-0.168492 -0.154023 0)
(-0.174157 -0.109786 0)
(-0.184003 -0.00793756 0)
(-0.167795 0.0821457 0)
(-0.105089 0.106551 0)
(-0.0326765 0.104567 0)
(0.0216207 0.0777044 0)
(0.0575308 0.994341 0)
(0.0782186 0.823475 0)
(0.115301 0.869555 0)
(0.156063 0.808395 0)
(0.098648 0.440108 0)
(0.00464022 0.0105328 0)
(-0.040883 -0.0130008 0)
(-0.0744713 0.0115043 0)
(-0.142354 0.782316 0)
(-0.185416 0.916523 0)
(-0.223102 0.906549 0)
(-0.253007 0.888001 0)
(-0.261828 0.888834 0)
(-0.276332 0.870265 0)
(-0.292504 0.85455 0)
(-0.295521 0.806923 0)
(-0.304643 0.792245 0)
(-0.309498 0.775892 0)
(-0.316599 0.785573 0)
(-0.324846 0.756688 0)
(-0.3435 0.746326 0)
(-0.288408 0.492331 0)
(-0.135869 -0.0709832 0)
(-0.113634 -0.161164 0)
(-0.129981 -0.097297 0)
(-0.131877 -0.0135144 0)
(-0.098737 0.0375073 0)
(-0.0417602 0.0515483 0)
(-0.00505456 0.0642796 0)
(0.00772767 0.0803379 0)
(0.0493703 0.919379 0)
(0.0678622 0.83113 0)
(0.102834 0.829613 0)
(0.147687 0.803332 0)
(0.145915 0.524285 0)
(0.047808 0.0856722 0)
(-0.00239088 0.0388923 0)
(-0.0523406 0.0573869 0)
(-0.159832 0.859026 0)
(-0.223199 0.976698 0)
(-0.264992 0.933187 0)
(-0.295016 0.911661 0)
(-0.291078 0.889504 0)
(-0.290952 0.883248 0)
(-0.297173 0.857196 0)
(-0.297608 0.823841 0)
(-0.298757 0.780629 0)
(-0.301415 0.781206 0)
(-0.296385 0.773639 0)
(-0.303287 0.783603 0)
(-0.309409 0.740494 0)
(-0.20111 0.309608 0)
(-0.0774122 -0.134948 0)
(-0.0796202 -0.151269 0)
(-0.0912394 -0.0910305 0)
(-0.0808031 -0.033421 0)
(-0.0456991 -0.000300794 0)
(-0.0160741 0.0196242 0)
(-0.00158175 0.0465627 0)
(0.00136434 0.0809667 0)
(0.0421167 0.885783 0)
(0.0616296 0.804096 0)
(0.0979791 0.789774 0)
(0.148156 0.745458 0)
(0.190544 0.567839 0)
(0.0982805 0.167472 0)
(0.0385907 0.104958 0)
(-0.0506561 0.142151 0)
(-0.196792 0.973672 0)
(-0.274755 1.01864 0)
(-0.317686 0.972611 0)
(-0.346393 0.914289 0)
(-0.335414 0.888353 0)
(-0.31087 0.867233 0)
(-0.301441 0.860809 0)
(-0.290953 0.822636 0)
(-0.286261 0.781802 0)
(-0.284634 0.759554 0)
(-0.270114 0.779362 0)
(-0.252585 0.765127 0)
(-0.244842 0.72911 0)
(-0.122608 0.129133 0)
(-0.0403394 -0.1571 0)
(-0.0526197 -0.13935 0)
(-0.0582728 -0.0918815 0)
(-0.0439575 -0.0511733 0)
(-0.0239467 -0.0247453 0)
(-0.010716 0.00286249 0)
(-0.00380603 0.0376922 0)
(-0.000936728 0.0803884 0)
(0.0442654 0.816981 0)
(0.0685573 0.785675 0)
(0.113482 0.740764 0)
(0.154312 0.687917 0)
(0.217297 0.572416 0)
(0.121311 0.253503 0)
(0.0747769 0.178674 0)
(-0.0450412 0.291611 0)
(-0.271663 1.10515 0)
(-0.339607 1.08675 0)
(-0.387974 1.00221 0)
(-0.407671 0.920161 0)
(-0.394985 0.863757 0)
(-0.353849 0.835032 0)
(-0.314805 0.829376 0)
(-0.286596 0.817716 0)
(-0.270483 0.773124 0)
(-0.267874 0.753961 0)
(-0.248806 0.746619 0)
(-0.212832 0.748729 0)
(-0.16608 0.690103 0)
(-0.0681478 -0.00820926 0)
(-0.0253089 -0.163812 0)
(-0.0352509 -0.129878 0)
(-0.0354748 -0.0934387 0)
(-0.0263582 -0.0646936 0)
(-0.017105 -0.0375935 0)
(-0.0105059 -0.00622201 0)
(-0.0050892 0.0325926 0)
(-0.00187384 0.0790186 0)
(0.0433542 0.742689 0)
(0.081701 0.753361 0)
(0.144289 0.699388 0)
(0.171344 0.643979 0)
(0.206122 0.568219 0)
(0.118889 0.330673 0)
(0.0884417 0.253744 0)
(-0.0896652 0.544674 0)
(-0.387191 1.23283 0)
(-0.425403 1.13747 0)
(-0.47554 1.03706 0)
(-0.48745 0.912579 0)
(-0.462997 0.838506 0)
(-0.41404 0.781866 0)
(-0.352125 0.775354 0)
(-0.292935 0.777785 0)
(-0.261195 0.771245 0)
(-0.233721 0.730463 0)
(-0.225107 0.728128 0)
(-0.180173 0.69786 0)
(-0.0992404 0.628257 0)
(-0.0253187 -0.0888418 0)
(-0.0117115 -0.1526 0)
(-0.0203518 -0.122152 0)
(-0.0204211 -0.0965672 0)
(-0.0172594 -0.0713137 0)
(-0.0135226 -0.0440141 0)
(-0.00988902 -0.0118399 0)
(-0.00495296 0.0272653 0)
(-0.0035297 0.0770947 0)
(0.0342552 0.674341 0)
(0.0870412 0.693225 0)
(0.179589 0.647474 0)
(0.20054 0.62866 0)
(0.183697 0.58215 0)
(0.105319 0.402367 0)
(0.0416413 0.345204 0)
(-0.252386 0.906765 0)
(-0.518551 1.31646 0)
(-0.539929 1.204 0)
(-0.587226 1.06077 0)
(-0.593154 0.910704 0)
(-0.54577 0.7955 0)
(-0.483691 0.723332 0)
(-0.400383 0.69937 0)
(-0.315187 0.716683 0)
(-0.260041 0.733051 0)
(-0.210968 0.713146 0)
(-0.185236 0.685943 0)
(-0.150027 0.666699 0)
(-0.0449761 0.536826 0)
(2.30842e-05 -0.124809 0)
(0.000314981 -0.138388 0)
(-0.00593398 -0.116892 0)
(-0.00883266 -0.0963558 0)
(-0.00964089 -0.0730922 0)
(-0.00940167 -0.0466672 0)
(-0.00732663 -0.0150686 0)
(-0.0060657 0.0240948 0)
(-0.00750345 0.0756391 0)
(0.0131592 0.625227 0)
(0.0813032 0.587137 0)
(0.206166 0.570615 0)
(0.210029 0.651297 0)
(0.154839 0.62017 0)
(0.0907836 0.487455 0)
(-0.0850634 0.570439 0)
(-0.493881 1.24419 0)
(-0.64211 1.38463 0)
(-0.662129 1.25069 0)
(-0.710622 1.09248 0)
(-0.702197 0.894879 0)
(-0.630842 0.745795 0)
(-0.551147 0.656219 0)
(-0.446224 0.625501 0)
(-0.345066 0.631246 0)
(-0.256601 0.670171 0)
(-0.203481 0.684331 0)
(-0.138163 0.649314 0)
(-0.111876 0.621265 0)
(0.0173317 0.399882 0)
(0.0238381 -0.116832 0)
(0.0178993 -0.125122 0)
(0.0104771 -0.1105 0)
(0.00381348 -0.0928658 0)
(-0.000572737 -0.0713818 0)
(-0.00291812 -0.04631 0)
(-0.00113119 -0.0171164 0)
(-0.00821948 0.0245998 0)
(-0.0164348 0.0780184 0)
(0.00334654 0.60968 0)
(0.0746594 0.449893 0)
(0.197507 0.504653 0)
(0.157101 0.733721 0)
(0.10343 0.69335 0)
(-0.0403955 0.589745 0)
(-0.370079 1.00442 0)
(-0.678691 1.45314 0)
(-0.735059 1.41273 0)
(-0.746971 1.3041 0)
(-0.77017 1.08956 0)
(-0.730211 0.830028 0)
(-0.644596 0.653053 0)
(-0.567044 0.542161 0)
(-0.464695 0.522203 0)
(-0.358983 0.548747 0)
(-0.255498 0.58932 0)
(-0.176194 0.617849 0)
(-0.101441 0.599418 0)
(-0.0534979 0.577337 0)
(0.0831239 0.276569 0)
(0.0615755 -0.085023 0)
(0.0454872 -0.109729 0)
(0.0326617 -0.100692 0)
(0.0203659 -0.0858859 0)
(0.0115041 -0.0667183 0)
(0.00709056 -0.0445188 0)
(0.00653093 -0.0203006 0)
(0.000968818 0.048694 0)
(0.0117384 0.0365129 0)
(0.0242368 0.594297 0)
(0.0739486 0.333647 0)
(0.147853 0.473063 0)
(0.0838419 0.828933 0)
(-0.00630828 0.7634 0)
(-0.298954 0.880446 0)
(-0.636337 1.37129 0)
(-0.769055 1.51631 0)
(-0.77515 1.43066 0)
(-0.76271 1.3331 0)
(-0.721664 1.04005 0)
(-0.662544 0.748295 0)
(-0.57426 0.563777 0)
(-0.51319 0.438324 0)
(-0.435691 0.400414 0)
(-0.349865 0.434245 0)
(-0.253352 0.493726 0)
(-0.155529 0.539111 0)
(-0.0739775 0.568631 0)
(0.0366005 0.488832 0)
(0.157885 0.194511 0)
(0.141713 -0.0440848 0)
(0.0889339 -0.0866777 0)
(0.0647419 -0.0838533 0)
(0.0432369 -0.0729843 0)
(0.0280292 -0.0575512 0)
(0.019656 -0.0397904 0)
(0.0178119 -0.0185263 0)
(0.0222858 0.0283796 0)
(0.0181677 0.0697902 0)
(0.0523478 0.5574 0)
(0.0790463 0.27395 0)
(0.0747478 0.468564 0)
(0.0122931 0.961018 0)
(-0.182635 1.01803 0)
(-0.559107 1.2885 0)
(-0.755775 1.52643 0)
(-0.787294 1.52414 0)
(-0.769795 1.41745 0)
(-0.728474 1.30638 0)
(-0.617372 0.962968 0)
(-0.555385 0.677661 0)
(-0.480329 0.500564 0)
(-0.433626 0.377397 0)
(-0.379297 0.322659 0)
(-0.319092 0.337864 0)
(-0.239671 0.396731 0)
(-0.139812 0.441696 0)
(-0.0216756 0.461539 0)
(0.118521 0.331445 0)
(0.197644 0.133833 0)
(0.193642 0.00432378 0)
(0.147133 -0.0479288 0)
(0.106262 -0.0544267 0)
(0.0771018 -0.0513218 0)
(0.0572379 -0.0438064 0)
(0.0455525 -0.0359654 0)
(0.0359051 -0.0281355 0)
(0.00445062 0.0621709 0)
(0.0186578 0.0780728 0)
(0.062646 0.50378 0)
(0.0780254 0.270969 0)
(0.0191691 0.493011 0)
(-0.0984886 1.19614 0)
(-0.369384 1.41461 0)
(-0.634887 1.52743 0)
(-0.730299 1.56988 0)
(-0.773485 1.5277 0)
(-0.734165 1.38244 0)
(-0.653905 1.19708 0)
(-0.510278 0.872607 0)
(-0.448333 0.620941 0)
(-0.389743 0.458015 0)
(-0.348697 0.335473 0)
(-0.311165 0.276331 0)
(-0.264274 0.266347 0)
(-0.196411 0.292009 0)
(-0.101389 0.309201 0)
(0.0183894 0.305022 0)
(0.125941 0.212431 0)
(0.170814 0.101478 0)
(0.166205 0.0304049 0)
(0.142487 -0.00129597 0)
(0.1163 -0.0183529 0)
(0.0930974 -0.0263646 0)
(0.0726251 -0.027267 0)
(0.0517134 -0.0189699 0)
(0.0249376 0.00880355 0)
(0.00374437 0.0700618 0)
(0.0171414 0.0861851 0)
(0.0723932 0.44442 0)
(0.0748536 0.282944 0)
(-0.0119977 0.583253 0)
(-0.212919 1.4338 0)
(-0.400776 1.5949 0)
(-0.558045 1.63445 0)
(-0.673357 1.63883 0)
(-0.739081 1.53431 0)
(-0.669199 1.30049 0)
(-0.567492 1.05623 0)
(-0.422912 0.776286 0)
(-0.355513 0.563876 0)
(-0.304052 0.420167 0)
(-0.267412 0.30777 0)
(-0.234593 0.241522 0)
(-0.194577 0.2164 0)
(-0.136886 0.216458 0)
(-0.0605592 0.215732 0)
(0.026206 0.202129 0)
(0.0958756 0.148907 0)
(0.125096 0.0894876 0)
(0.124762 0.0445499 0)
(0.111064 0.0155507 0)
(0.0940759 -0.000569195 0)
(0.0768269 -0.00722576 0)
(0.0591168 -0.00590606 0)
(0.039897 0.00554396 0)
(0.0201935 0.0314659 0)
(0.00749695 0.0719144 0)
(0.010391 0.0961429 0)
(0.0872459 0.38208 0)
(0.0679345 0.314135 0)
(-0.0285646 0.748134 0)
(-0.259719 1.61528 0)
(-0.358267 1.70964 0)
(-0.482494 1.75082 0)
(-0.610403 1.73039 0)
(-0.677892 1.5365 0)
(-0.594614 1.19039 0)
(-0.481584 0.915837 0)
(-0.355799 0.678011 0)
(-0.278506 0.503566 0)
(-0.227023 0.379923 0)
(-0.190566 0.282018 0)
(-0.160339 0.213183 0)
(-0.126133 0.175045 0)
(-0.081443 0.159249 0)
(-0.0295361 0.151914 0)
(0.0232723 0.140286 0)
(0.0651544 0.113385 0)
(0.0867366 0.08042 0)
(0.0912152 0.0505416 0)
(0.0853217 0.0278164 0)
(0.0743925 0.0133836 0)
(0.0611682 0.00731986 0)
(0.0466364 0.00967776 0)
(0.031253 0.0220914 0)
(0.0171014 0.0457989 0)
(0.00775882 0.0760655 0)
(0.00515757 0.102112 0)
(0.0971335 0.308446 0)
(0.0369187 0.362089 0)
(-0.0590684 0.944544 0)
(-0.270374 1.74342 0)
(-0.318626 1.81773 0)
(-0.416753 1.84888 0)
(-0.530571 1.83014 0)
(-0.585661 1.538 0)
(-0.505009 1.07673 0)
(-0.384931 0.788056 0)
(-0.293592 0.583509 0)
(-0.222039 0.442587 0)
(-0.169121 0.336503 0)
(-0.132022 0.252005 0)
(-0.100988 0.185735 0)
(-0.0716504 0.140275 0)
(-0.042175 0.121571 0)
(-0.0108574 0.11432 0)
(0.0205054 0.10574 0)
(0.0463647 0.0897638 0)
(0.062107 0.0697556 0)
(0.0677536 0.0504507 0)
(0.065709 0.0346054 0)
(0.0585468 0.0239531 0)
(0.0483738 0.019784 0)
(0.0366195 0.0231336 0)
(0.0244489 0.035167 0)
(0.0137119 0.0556294 0)
(0.00613695 0.0811519 0)
(0.0025819 0.106774 0)
(0.0436528 0.273041 0)
(-0.0308145 0.439956 0)
(-0.168668 1.13068 0)
(-0.319062 1.8714 0)
(-0.318767 1.92256 0)
(-0.375955 1.93532 0)
(-0.424169 1.91919 0)
(-0.430774 1.54747 0)
(-0.36564 0.979581 0)
(-0.274877 0.694577 0)
(-0.24164 0.51597 0)
(-0.195426 0.383895 0)
(-0.145047 0.285149 0)
(-0.10211 0.211514 0)
(-0.0648608 0.154184 0)
(-0.0382611 0.113411 0)
(-0.0187025 0.096447 0)
(0.000980869 0.0892252 0)
(0.0205402 0.0825288 0)
(0.0368744 0.0729193 0)
(0.0475347 0.0609276 0)
(0.0519693 0.04884 0)
(0.050994 0.0385339 0)
(0.0458821 0.0316574 0)
(0.0380118 0.0296881 0)
(0.0286282 0.0339464 0)
(0.0190166 0.0453177 0)
(0.0105597 0.0634673 0)
(0.0045308 0.0860239 0)
(0.00149158 0.110219 0)
(-0.0257205 0.322678 0)
(-0.158716 0.591016 0)
(-0.346473 1.27986 0)
(-0.43402 1.92886 0)
(-0.378049 2.0026 0)
(-0.36357 1.97264 0)
(-0.304548 1.95217 0)
(-0.202121 1.53015 0)
(-0.170726 0.938098 0)
(-0.167032 0.673224 0)
(-0.183547 0.493556 0)
(-0.16809 0.349477 0)
(-0.130974 0.241439 0)
(-0.089274 0.167615 0)
(-0.0490327 0.121173 0)
(-0.0217492 0.0923386 0)
(-0.00548557 0.0785103 0)
(0.00835332 0.0721963 0)
(0.0211399 0.0675413 0)
(0.0315754 0.0618587 0)
(0.0383222 0.0549062 0)
(0.0409989 0.0476701 0)
(0.0399214 0.0414231 0)
(0.0357917 0.037565 0)
(0.0294985 0.0374859 0)
(0.0220207 0.0424494 0)
(0.0144227 0.0532545 0)
(0.00776364 0.069724 0)
(0.00316968 0.0900052 0)
(0.000979606 0.112556 0)
(-0.114265 0.452751 0)
(-0.316755 0.791894 0)
(-0.518656 1.36149 0)
(-0.530229 1.8439 0)
(-0.423213 1.92123 0)
(-0.338653 1.85325 0)
(-0.206073 1.80018 0)
(-0.00775235 1.41738 0)
(0.0184103 0.947508 0)
(-0.0468097 0.716394 0)
(-0.091164 0.507838 0)
(-0.104952 0.33875 0)
(-0.0906266 0.218224 0)
(-0.0663549 0.139222 0)
(-0.0376179 0.0942054 0)
(-0.0129554 0.0736001 0)
(0.00228246 0.064722 0)
(0.0127966 0.0606036 0)
(0.0213687 0.057881 0)
(0.0278803 0.0549736 0)
(0.0317663 0.0513582 0)
(0.0328547 0.0474249 0)
(0.0313351 0.0440638 0)
(0.0276481 0.0424231 0)
(0.0224121 0.0437422 0)
(0.0163737 0.0491695 0)
(0.0103602 0.0594743 0)
(0.0052277 0.0745501 0)
(0.001886 0.0929918 0)
(0.000568892 0.113935 0)
(-0.275352 0.61146 0)
(-0.425397 0.959942 0)
(-0.606769 1.38661 0)
(-0.537955 1.66694 0)
(-0.408929 1.7632 0)
(-0.296598 1.68046 0)
(-0.170634 1.57034 0)
(0.0403145 1.25206 0)
(0.117427 0.944014 0)
(0.0951791 0.794802 0)
(0.00397553 0.573646 0)
(-0.0620259 0.349697 0)
(-0.0590068 0.20309 0)
(-0.0414561 0.118666 0)
(-0.0230046 0.0745631 0)
(-0.00503774 0.0580014 0)
(0.00784915 0.0538848 0)
(0.0156842 0.0525057 0)
(0.0211742 0.0517785 0)
(0.0248619 0.0510122 0)
(0.0266064 0.0497341 0)
(0.0263927 0.0480871 0)
(0.0243819 0.0467383 0)
(0.0208911 0.0466422 0)
(0.0163815 0.0488917 0)
(0.0114356 0.0545346 0)
(0.00668744 0.0642972 0)
(0.0028548 0.0781146 0)
(0.000651246 0.0949928 0)
(0.000177269 0.11452 0)
(-0.240043 1.07456 0)
(-0.442542 1.21014 0)
(-0.511232 1.29166 0)
(-0.429672 1.42209 0)
(-0.330392 1.51474 0)
(-0.221483 1.46614 0)
(-0.128741 1.31487 0)
(0.00236564 1.06361 0)
(0.117993 0.904718 0)
(0.17287 0.817884 0)
(0.0707109 0.683781 0)
(-0.058774 0.365915 0)
(-0.0734368 0.183579 0)
(-0.0383706 0.0998965 0)
(-0.016064 0.0572908 0)
(0.000124609 0.0449598 0)
(0.0112387 0.0454988 0)
(0.0172227 0.0469075 0)
(0.0205155 0.0481194 0)
(0.0221838 0.0491674 0)
(0.0222995 0.0496149 0)
(0.0210085 0.0495536 0)
(0.0185264 0.0495521 0)
(0.0151187 0.0504482 0)
(0.0111404 0.0532195 0)
(0.00705075 0.0588226 0)
(0.00336791 0.06793 0)
(0.000666306 0.080576 0)
(-0.000522858 0.096057 0)
(-0.000184476 0.114287 0)
(-0.0890279 1.61154 0)
(-0.24158 1.67707 0)
(-0.313317 1.64001 0)
(-0.292701 1.65886 0)
(-0.210592 1.59683 0)
(-0.105359 1.50346 0)
(-0.0082107 1.28221 0)
(0.0540459 0.872715 0)
(0.102696 0.710455 0)
(0.119101 0.758232 0)
(-0.0573198 0.921483 0)
(-0.166621 0.393842 0)
(-0.138259 0.104905 0)
(-0.0669292 0.0580947 0)
(-0.0238826 0.032376 0)
(-0.000260986 0.0304972 0)
(0.0123474 0.0380018 0)
(0.0177116 0.042514 0)
(0.0197104 0.0460153 0)
(0.0199451 0.0488568 0)
(0.0187574 0.0506823 0)
(0.0165245 0.0517036 0)
(0.0135694 0.0525355 0)
(0.0101646 0.0539711 0)
(0.00659292 0.0568989 0)
(0.0032184 0.06221 0)
(0.000451142 0.0705544 0)
(-0.00127228 0.0820515 0)
(-0.00157301 0.0962553 0)
(-0.00048861 0.113277 0)
(-0.0157061 1.46669 0)
(-0.0415726 1.55124 0)
(-0.0477897 1.62455 0)
(-0.0504768 1.72502 0)
(-0.0162252 1.73786 0)
(0.0381457 1.68786 0)
(0.0884873 1.53872 0)
(0.0639009 1.22425 0)
(-0.0234713 0.986614 0)
(-0.145602 1.0721 0)
(-0.280721 1.20792 0)
(-0.291974 0.556671 0)
(-0.199149 0.0066216 0)
(-0.0770193 -0.0130193 0)
(-0.0292173 -0.0045597 0)
(-8.82451e-05 0.0124379 0)
(0.0145236 0.029014 0)
(0.0192879 0.0383721 0)
(0.0201286 0.0450626 0)
(0.0188821 0.0498556 0)
(0.016331 0.0528634 0)
(0.013125 0.0546029 0)
(0.00963964 0.0557656 0)
(0.00614423 0.0572962 0)
(0.00287445 0.0600394 0)
(9.14719e-05 0.064837 0)
(-0.00190687 0.0723069 0)
(-0.00282064 0.0826747 0)
(-0.00240106 0.0957067 0)
(-0.000701795 0.111667 0)
(0.000760035 1.39748 0)
(0.00487782 1.43587 0)
(0.0187225 1.45663 0)
(0.031235 1.4746 0)
(0.055431 1.48176 0)
(0.0756208 1.44438 0)
(0.0833742 1.34749 0)
(0.0252345 1.16444 0)
(-0.104254 1.05884 0)
(-0.21844 1.0891 0)
(-0.231229 1.06252 0)
(-0.176051 0.508688 0)
(-0.10029 -0.0815806 0)
(-0.0362844 -0.0732118 0)
(-0.00123614 -0.0394454 0)
(0.017076 -0.011935 0)
(0.0265226 0.0209904 0)
(0.0266535 0.0365664 0)
(0.0244704 0.0465225 0)
(0.0204426 0.0528396 0)
(0.0158522 0.0564431 0)
(0.011334 0.0583131 0)
(0.00714905 0.0593833 0)
(0.00344299 0.060581 0)
(0.00034074 0.0628044 0)
(-0.00201018 0.0668443 0)
(-0.00343723 0.0733583 0)
(-0.0037795 0.082635 0)
(-0.0028865 0.0946 0)
(-0.000794737 0.109593 0)
(0.0061435 1.41632 0)
(0.0138252 1.44042 0)
(0.0274947 1.4452 0)
(0.0348623 1.44716 0)
(0.0440818 1.42655 0)
(0.0461921 1.38364 0)
(0.0374378 1.2953 0)
(-0.0138037 1.16893 0)
(-0.103876 1.08799 0)
(-0.162024 1.05271 0)
(-0.0985116 0.908733 0)
(0.00539429 0.426724 0)
(0.0754394 -0.103043 0)
(0.0314278 -0.115787 0)
(0.0706967 -0.0686749 0)
(0.0729379 -0.00659732 0)
(0.0538206 0.0238012 0)
(0.0444731 0.0417331 0)
(0.0346744 0.0528589 0)
(0.0258063 0.059098 0)
(0.0182135 0.0621008 0)
(0.0118914 0.0631882 0)
(0.00674199 0.0634971 0)
(0.00264492 0.0639212 0)
(-0.000477386 0.0653206 0)
(-0.00263882 0.0684516 0)
(-0.0038059 0.0739664 0)
(-0.003931 0.0822167 0)
(-0.00291153 0.0932161 0)
(-0.000746675 0.107321 0)
(0.0128889 1.40591 0)
(0.0307799 1.42804 0)
(0.0408529 1.45209 0)
(0.039346 1.45021 0)
(0.0354855 1.44164 0)
(0.0281029 1.40352 0)
(0.0107723 1.33616 0)
(-0.0323246 1.23382 0)
(-0.0881948 1.14642 0)
(-0.0952884 1.03482 0)
(0.0332193 0.764378 0)
(0.215199 0.295436 0)
(0.301361 -0.0841391 0)
(0.170238 -0.118851 0)
(0.178591 -0.0249139 0)
(0.120994 0.0184494 0)
(0.0901943 0.0431025 0)
(0.0670852 0.0579721 0)
(0.0485588 0.0659843 0)
(0.0343725 0.0695008 0)
(0.0235284 0.0702597 0)
(0.0152892 0.0695076 0)
(0.00907159 0.0682874 0)
(0.00442719 0.0674954 0)
(0.00102093 0.0678345 0)
(-0.00133187 0.0699963 0)
(-0.00270692 0.0745336 0)
(-0.00310374 0.081829 0)
(-0.00240379 0.0919316 0)
(-0.000561959 0.105177 0)
(0.0233419 1.37083 0)
(0.0538945 1.40314 0)
(0.0598014 1.45107 0)
(0.0498397 1.45824 0)
(0.0346346 1.44897 0)
(0.0222225 1.42173 0)
(0.00265335 1.36815 0)
(-0.0323622 1.27961 0)
(-0.0657343 1.17088 0)
(-0.0224812 0.964329 0)
(0.150267 0.579205 0)
(0.337108 0.144192 0)
(0.344989 -0.047928 0)
(0.261162 -0.0087989 0)
(0.193092 0.026204 0)
(0.146783 0.0563074 0)
(0.111449 0.0735139 0)
(0.0828864 0.0818283 0)
(0.0606107 0.0842579 0)
(0.0436437 0.0832864 0)
(0.030965 0.0805484 0)
(0.021596 0.0771221 0)
(0.0146428 0.0739286 0)
(0.00937147 0.0716563 0)
(0.00529732 0.0708583 0)
(0.00219038 0.0720281 0)
(-1.04094e-05 0.075626 0)
(-0.00126401 0.0819914 0)
(-0.00137799 0.0911827 0)
(-0.00027316 0.103501 0)
(0.0353368 1.31857 0)
(0.0735306 1.37761 0)
(0.0771165 1.46409 0)
(0.0606086 1.47068 0)
(0.0395895 1.47073 0)
(0.0249294 1.4385 0)
(0.00873064 1.3893 0)
(-0.0196401 1.30726 0)
(-0.0269349 1.1555 0)
(0.0716768 0.844275 0)
(0.261054 0.393066 0)
(0.376134 0.0450612 0)
(0.317054 0.00848792 0)
(0.250013 0.0544478 0)
(0.197895 0.0802543 0)
(0.15432 0.0969714 0)
(0.118262 0.105734 0)
(0.0898857 0.10754 0)
(0.0681488 0.104431 0)
(0.0519996 0.0985655 0)
(0.0400764 0.0918834 0)
(0.0309791 0.0855839 0)
(0.0237105 0.0804469 0)
(0.0175688 0.0768465 0)
(0.0122537 0.0750216 0)
(0.00772373 0.0752501 0)
(0.00405618 0.0778871 0)
(0.00139611 0.0832447 0)
(3.11904e-05 0.0913849 0)
(6.01237e-05 0.102578 0)
(0.04012 1.25614 0)
(0.0861349 1.35391 0)
(0.091155 1.4771 0)
(0.06959 1.49482 0)
(0.0516041 1.4874 0)
(0.035172 1.45295 0)
(0.0191641 1.4039 0)
(0.000973156 1.31695 0)
(0.037081 1.10067 0)
(0.179892 0.693599 0)
(0.353867 0.256808 0)
(0.373283 0.0418324 0)
(0.29547 0.0792833 0)
(0.241539 0.11517 0)
(0.193313 0.130432 0)
(0.150653 0.137369 0)
(0.116872 0.13731 0)
(0.0922278 0.131617 0)
(0.0747079 0.122509 0)
(0.0619089 0.112258 0)
(0.0519036 0.102487 0)
(0.0433484 0.0943115 0)
(0.0354164 0.0879515 0)
(0.027861 0.0834862 0)
(0.020762 0.0808557 0)
(0.0143306 0.0801995 0)
(0.00880015 0.0818055 0)
(0.00442223 0.0859812 0)
(0.00157481 0.0928193 0)
(0.000371424 0.10261 0)
(0.0391041 1.18833 0)
(0.0923629 1.32835 0)
(0.104341 1.4872 0)
(0.0827748 1.51402 0)
(0.0678987 1.50567 0)
(0.0554501 1.46561 0)
(0.0388023 1.41843 0)
(0.0383225 1.30502 0)
(0.121488 1.00541 0)
(0.286715 0.532582 0)
(0.402888 0.158358 0)
(0.34788 0.0948922 0)
(0.280277 0.146534 0)
(0.2288 0.170921 0)
(0.183699 0.177833 0)
(0.146797 0.174522 0)
(0.120343 0.164344 0)
(0.101904 0.150699 0)
(0.0883064 0.136391 0)
(0.0769689 0.123316 0)
(0.0667363 0.112187 0)
(0.0569167 0.103272 0)
(0.0472551 0.0965376 0)
(0.0378869 0.0916878 0)
(0.0288907 0.0885019 0)
(0.0205393 0.0870195 0)
(0.013183 0.0875039 0)
(0.00716426 0.0902877 0)
(0.00292883 0.0955287 0)
(0.000600467 0.103537 0)
(0.0377938 1.12054 0)
(0.0926908 1.29425 0)
(0.1151 1.49632 0)
(0.0972887 1.53983 0)
(0.0882525 1.51982 0)
(0.0799158 1.47216 0)
(0.066912 1.42619 0)
(0.0979808 1.26078 0)
(0.224525 0.873137 0)
(0.379334 0.397697 0)
(0.40962 0.14273 0)
(0.324068 0.166244 0)
(0.265737 0.21044 0)
(0.21978 0.221381 0)
(0.184212 0.216205 0)
(0.157744 0.202189 0)
(0.138531 0.184069 0)
(0.123376 0.165445 0)
(0.110314 0.148619 0)
(0.0971163 0.134626 0)
(0.0833595 0.123257 0)
(0.0698087 0.114012 0)
(0.0571218 0.106834 0)
(0.0455626 0.101623 0)
(0.0348578 0.0978693 0)
(0.0248929 0.0955011 0)
(0.0160951 0.0947267 0)
(0.00889096 0.0958942 0)
(0.00373492 0.0992567 0)
(0.000699005 0.105138 0)
(0.0378689 1.05399 0)
(0.0876521 1.24862 0)
(0.110604 1.4992 0)
(0.108588 1.56129 0)
(0.110048 1.52257 0)
(0.108813 1.48148 0)
(0.109882 1.42067 0)
(0.183285 1.1764 0)
(0.329678 0.728397 0)
(0.442896 0.317903 0)
(0.394954 0.187776 0)
(0.310122 0.240757 0)
(0.263686 0.265552 0)
(0.230808 0.259815 0)
(0.205402 0.243286 0)
(0.185388 0.222098 0)
(0.169055 0.199815 0)
(0.154035 0.178999 0)
(0.139344 0.162094 0)
(0.122579 0.150528 0)
(0.102233 0.14037 0)
(0.0812282 0.130481 0)
(0.0635894 0.120865 0)
(0.0496389 0.113641 0)
(0.0373337 0.108786 0)
(0.026168 0.105279 0)
(0.016542 0.102966 0)
(0.00891505 0.10221 0)
(0.00364275 0.10343 0)
(0.000619421 0.107021 0)
(0.0368427 0.991535 0)
(0.0753599 1.20673 0)
(0.0919739 1.48771 0)
(0.113018 1.56547 0)
(0.135105 1.50714 0)
(0.144743 1.48215 0)
(0.174001 1.37825 0)
(0.285079 1.05755 0)
(0.419574 0.602153 0)
(0.467278 0.284279 0)
(0.374899 0.263667 0)
(0.314363 0.306924 0)
(0.287085 0.304047 0)
(0.263331 0.286354 0)
(0.242952 0.263514 0)
(0.224992 0.238725 0)
(0.209295 0.214619 0)
(0.194098 0.193756 0)
(0.177012 0.177073 0)
(0.153975 0.16876 0)
(0.122839 0.161918 0)
(0.0890009 0.15062 0)
(0.0645965 0.135698 0)
(0.0486691 0.12677 0)
(0.0350885 0.120671 0)
(0.0233061 0.115696 0)
(0.0137652 0.11139 0)
(0.00678998 0.108296 0)
(0.00244034 0.107161 0)
(0.000320907 0.108524 0)
(0.0299257 0.937632 0)
(0.0598861 1.1859 0)
(0.0676164 1.47007 0)
(0.117639 1.52208 0)
(0.161498 1.47375 0)
(0.188135 1.46347 0)
(0.252996 1.30624 0)
(0.378149 0.93332 0)
(0.489265 0.533942 0)
(0.465714 0.315397 0)
(0.372578 0.340654 0)
(0.349069 0.347088 0)
(0.329968 0.329291 0)
(0.309819 0.306442 0)
(0.291446 0.280689 0)
(0.274707 0.254618 0)
(0.258823 0.227781 0)
(0.24423 0.203591 0)
(0.22816 0.18894 0)
(0.201599 0.181868 0)
(0.162361 0.18306 0)
(0.111863 0.177179 0)
(0.0707581 0.155442 0)
(0.0446265 0.140101 0)
(0.0279104 0.131902 0)
(0.0161353 0.125096 0)
(0.00795474 0.118385 0)
(0.00288536 0.112794 0)
(0.000402038 0.109373 0)
(-0.00015983 0.109017 0)
(0.0212725 0.893639 0)
(0.0473904 1.18192 0)
(0.0575664 1.44272 0)
(0.133342 1.43702 0)
(0.189849 1.42949 0)
(0.236062 1.41847 0)
(0.331776 1.21355 0)
(0.450031 0.822287 0)
(0.521554 0.478213 0)
(0.45552 0.376771 0)
(0.410432 0.388289 0)
(0.401159 0.369987 0)
(0.382867 0.348195 0)
(0.364667 0.324145 0)
(0.346768 0.297225 0)
(0.329194 0.267511 0)
(0.311431 0.238906 0)
(0.304489 0.21307 0)
(0.300365 0.1998 0)
(0.263366 0.264117 0)
(0.169841 0.286898 0)
(0.116556 0.259064 0)
(0.0842908 0.19748 0)
(0.0411516 0.163635 0)
(0.0194688 0.145922 0)
(0.00847874 0.133393 0)
(0.0026602 0.122997 0)
(-0.00023714 0.114952 0)
(-0.0011285 0.1097 0)
(-0.000570257 0.108225 0)
(0.0154723 0.855674 0)
(0.036121 1.18095 0)
(0.0637467 1.39007 0)
(0.156368 1.35081 0)
(0.222921 1.38015 0)
(0.292107 1.34943 0)
(0.404319 1.11099 0)
(0.508023 0.736245 0)
(0.529657 0.46774 0)
(0.47095 0.427158 0)
(0.469348 0.407302 0)
(0.45794 0.385676 0)
(0.442392 0.365489 0)
(0.424526 0.34149 0)
(0.403925 0.313314 0)
(0.385029 0.28438 0)
(0.375916 0.260222 0)
(0.409468 0.226828 0)
(0.240678 0.317588 0)
(0.150638 0.335682 0)
(0.104261 0.319869 0)
(0.0790438 0.283975 0)
(0.0570104 0.249131 0)
(0.0342109 0.202887 0)
(0.0201065 0.16619 0)
(0.0111794 0.142851 0)
(0.00547142 0.127474 0)
(0.00181422 0.116866 0)
(-6.39357e-05 0.109833 0)
(-0.000446875 0.107221 0)
(0.00830804 0.835521 0)
(0.0190334 1.17219 0)
(0.0743141 1.30818 0)
(0.188274 1.26093 0)
(0.273931 1.31774 0)
(0.363243 1.26803 0)
(0.472507 1.01475 0)
(0.551569 0.668103 0)
(0.538413 0.481112 0)
(0.526371 0.439798 0)
(0.527461 0.416456 0)
(0.516982 0.400189 0)
(0.502629 0.380976 0)
(0.484187 0.357779 0)
(0.461366 0.335481 0)
(0.45437 0.31377 0)
(0.471603 0.258502 0)
(0.274006 0.364183 0)
(0.182893 0.393966 0)
(0.139826 0.375798 0)
(0.109898 0.33988 0)
(0.0895098 0.297397 0)
(0.0728188 0.255698 0)
(0.0567253 0.213354 0)
(0.0414764 0.177063 0)
(0.0284121 0.151176 0)
(0.017849 0.133537 0)
(0.00960955 0.12108 0)
(0.003814 0.112152 0)
(0.000361162 0.107589 0)
(-0.00803014 0.836148 0)
(-0.0087764 1.14978 0)
(0.0812418 1.18631 0)
(0.233098 1.14749 0)
(0.345827 1.23031 0)
(0.448463 1.19258 0)
(0.546038 0.952179 0)
(0.579744 0.614626 0)
(0.571496 0.482526 0)
(0.582474 0.440939 0)
(0.579552 0.42512 0)
(0.570855 0.41105 0)
(0.558136 0.394192 0)
(0.540722 0.377968 0)
(0.525637 0.37178 0)
(0.53489 0.322702 0)
(0.379696 0.374574 0)
(0.240555 0.46385 0)
(0.201839 0.449969 0)
(0.168618 0.410391 0)
(0.143032 0.363571 0)
(0.121402 0.315945 0)
(0.10138 0.270858 0)
(0.0814196 0.228428 0)
(0.062464 0.190943 0)
(0.0459449 0.163443 0)
(0.0314216 0.144292 0)
(0.0187344 0.129969 0)
(0.00865435 0.118495 0)
(0.00162282 0.110628 0)
(-0.0338062 0.879614 0)
(-0.0466848 1.11371 0)
(0.0864234 1.046 0)
(0.28369 1.00754 0)
(0.435341 1.13527 0)
(0.552432 1.14448 0)
(0.603045 0.879862 0)
(0.607458 0.586837 0)
(0.617439 0.47458 0)
(0.62337 0.443183 0)
(0.620498 0.430849 0)
(0.615059 0.418821 0)
(0.605247 0.408538 0)
(0.59424 0.409923 0)
(0.583015 0.386626 0)
(0.543318 0.391611 0)
(0.314749 0.549027 0)
(0.27637 0.52669 0)
(0.247399 0.487796 0)
(0.218318 0.440151 0)
(0.191122 0.389754 0)
(0.164334 0.340216 0)
(0.137098 0.295094 0)
(0.107449 0.254143 0)
(0.0800634 0.211857 0)
(0.0592372 0.18089 0)
(0.0416239 0.159601 0)
(0.0258042 0.143269 0)
(0.0124964 0.128594 0)
(0.00275405 0.116585 0)
(-0.0533734 0.935317 0)
(-0.0535295 1.03904 0)
(0.114213 0.810018 0)
(0.302364 0.782999 0)
(0.467877 0.950407 0)
(0.604221 1.05478 0)
(0.633166 0.836661 0)
(0.631272 0.564829 0)
(0.644714 0.472373 0)
(0.648016 0.445114 0)
(0.648042 0.432119 0)
(0.645319 0.424719 0)
(0.638086 0.427232 0)
(0.622138 0.43398 0)
(0.607111 0.424932 0)
(0.420214 0.584188 0)
(0.350727 0.599609 0)
(0.333551 0.559423 0)
(0.306181 0.515528 0)
(0.276384 0.468756 0)
(0.244375 0.420028 0)
(0.211996 0.371899 0)
(0.177841 0.329165 0)
(0.131776 0.298992 0)
(0.088759 0.239273 0)
(0.0648738 0.200783 0)
(0.0468852 0.177258 0)
(0.0297538 0.159296 0)
(0.0142955 0.141565 0)
(0.00322497 0.124091 0)
(-0.0546324 0.998478 0)
(0.0101643 0.899262 0)
(0.146058 0.61884 0)
(0.291775 0.600223 0)
(0.430241 0.783537 0)
(0.59533 0.95984 0)
(0.638947 0.801452 0)
(0.644288 0.560342 0)
(0.652119 0.469824 0)
(0.657902 0.443577 0)
(0.661066 0.430313 0)
(0.659003 0.42938 0)
(0.651509 0.446868 0)
(0.644586 0.463694 0)
(0.546563 0.538988 0)
(0.421413 0.645566 0)
(0.414026 0.621691 0)
(0.396031 0.583743 0)
(0.370255 0.544428 0)
(0.338766 0.50161 0)
(0.302007 0.454787 0)
(0.266699 0.40364 0)
(0.235814 0.362059 0)
(0.154736 0.359728 0)
(0.0720757 0.269623 0)
(0.0532814 0.218617 0)
(0.043303 0.192313 0)
(0.0300437 0.174943 0)
(0.0138129 0.155717 0)
(0.00211062 0.131514 0)
(-0.0164338 1.02134 0)
(0.0924776 0.748749 0)
(0.187352 0.502976 0)
(0.259152 0.495167 0)
(0.359333 0.602181 0)
(0.540408 0.855915 0)
(0.634163 0.77631 0)
(0.640226 0.558178 0)
(0.646988 0.462037 0)
(0.657138 0.438235 0)
(0.661511 0.427269 0)
(0.658341 0.435756 0)
(0.653459 0.469473 0)
(0.626628 0.515791 0)
(0.506391 0.668389 0)
(0.48005 0.665713 0)
(0.475821 0.636165 0)
(0.461145 0.605618 0)
(0.439212 0.571825 0)
(0.409383 0.533192 0)
(0.370499 0.490717 0)
(0.337678 0.428489 0)
(0.303078 0.38685 0)
(0.182693 0.566679 0)
(0.0352551 0.298434 0)
(0.00962531 0.218864 0)
(0.0234962 0.196987 0)
(0.026344 0.18635 0)
(0.0123815 0.172598 0)
(0.000239393 0.134943 0)
(0.0278579 0.97928 0)
(0.150873 0.618329 0)
(0.201375 0.462928 0)
(0.243474 0.45219 0)
(0.305885 0.498648 0)
(0.420713 0.693203 0)
(0.607071 0.738963 0)
(0.627113 0.546868 0)
(0.635174 0.447751 0)
(0.649383 0.430549 0)
(0.653882 0.425475 0)
(0.649209 0.445752 0)
(0.644569 0.500315 0)
(0.58888 0.603567 0)
(0.536018 0.679381 0)
(0.536761 0.668274 0)
(0.533417 0.646039 0)
(0.524592 0.621384 0)
(0.508651 0.593773 0)
(0.482411 0.564697 0)
(0.448337 0.531692 0)
(0.413818 0.463839 0)
(0.337477 0.540359 0)
(-0.044317 0.756198 0)
(-0.0795407 0.447581 0)
(-0.047864 0.191323 0)
(-0.0126047 0.181307 0)
(0.021171 0.181638 0)
(0.0119997 0.19425 0)
(-0.00288197 0.132158 0)
(0.0406071 0.885253 0)
(0.157708 0.560943 0)
(0.190457 0.425904 0)
(0.229333 0.411444 0)
(0.275117 0.42706 0)
(0.347981 0.534689 0)
(0.549954 0.655232 0)
(0.609842 0.520656 0)
(0.615937 0.426531 0)
(0.635155 0.419513 0)
(0.642821 0.42431 0)
(0.639383 0.455928 0)
(0.636723 0.531328 0)
(0.5996 0.641964 0)
(0.572818 0.680608 0)
(0.578974 0.669033 0)
(0.581031 0.651479 0)
(0.579178 0.631365 0)
(0.571556 0.613074 0)
(0.557974 0.604781 0)
(0.547646 0.588177 0)
(0.453886 0.608148 0)
(-0.0789239 0.882387 0)
(-0.38368 0.894292 0)
(-0.327028 0.301819 0)
(-0.150839 0.185248 0)
(-0.0410916 0.141031 0)
(-0.0112496 0.16816 0)
(-0.00209819 0.309999 0)
(0.00731384 0.138104 0)
(0.0404209 0.783104 0)
(0.144958 0.50864 0)
(0.174577 0.385347 0)
(0.212239 0.370303 0)
(0.256287 0.365377 0)
(0.311568 0.398238 0)
(0.471366 0.527996 0)
(0.587195 0.48462 0)
(0.589988 0.398882 0)
(0.614434 0.402444 0)
(0.629652 0.419929 0)
(0.632046 0.459348 0)
(0.633473 0.546545 0)
(0.633442 0.658448 0)
(0.59938 0.685449 0)
(0.608366 0.666746 0)
(0.614329 0.651788 0)
(0.61345 0.637888 0)
(0.603848 0.630315 0)
(0.589315 0.63121 0)
(0.540198 0.674126 0)
(0.035665 1.003 0)
(-0.655733 1.45157 0)
(-0.666228 0.856865 0)
(-0.407299 0.196052 0)
(-0.213201 -0.160173 0)
(-0.137479 0.0817045 0)
(-0.0450895 0.104874 0)
(-0.0753537 0.201247 0)
(0.0289132 0.0982227 0)
(0.0543861 0.67873 0)
(0.139281 0.468749 0)
(0.162206 0.34767 0)
(0.199188 0.32539 0)
(0.247938 0.307823 0)
(0.294911 0.297071 0)
(0.387107 0.387024 0)
(0.552803 0.433192 0)
(0.561557 0.365772 0)
(0.591017 0.379013 0)
(0.612022 0.408865 0)
(0.62089 0.454723 0)
(0.627339 0.547679 0)
(0.654901 0.654395 0)
(0.640371 0.689161 0)
(0.632889 0.671279 0)
(0.636488 0.652715 0)
(0.628623 0.647437 0)
(0.606472 0.653068 0)
(0.559134 0.698583 0)
(0.220632 0.958978 0)
(-0.601801 1.86367 0)
(-0.876565 1.60772 0)
(-0.575436 0.465957 0)
(-0.304125 -0.0668341 0)
(-0.21749 -0.130859 0)
(-0.185489 -0.0762395 0)
(-0.138851 0.0819255 0)
(-0.10504 0.239518 0)
(0.0610581 0.0219472 0)
(0.0493875 0.57056 0)
(0.135904 0.442442 0)
(0.157589 0.314382 0)
(0.19003 0.27966 0)
(0.240892 0.255962 0)
(0.284805 0.228646 0)
(0.334733 0.297747 0)
(0.511537 0.360571 0)
(0.532831 0.327825 0)
(0.562157 0.350079 0)
(0.586932 0.393757 0)
(0.598103 0.445092 0)
(0.60734 0.537964 0)
(0.639715 0.649644 0)
(0.674062 0.658459 0)
(0.666083 0.657155 0)
(0.649314 0.659503 0)
(0.619036 0.676387 0)
(0.53803 0.722052 0)
(0.189831 0.928877 0)
(-0.396287 1.74472 0)
(-0.768433 2.32397 0)
(-0.63351 1.47308 0)
(-0.325333 0.132584 0)
(-0.221364 -0.189492 0)
(-0.185799 -0.162171 0)
(-0.17993 -0.0725898 0)
(-0.140554 0.0273161 0)
(-0.0642647 0.133595 0)
(0.103275 0.0324649 0)
(0.0399702 0.458719 0)
(0.130129 0.405248 0)
(0.158001 0.288712 0)
(0.184048 0.235855 0)
(0.228389 0.207402 0)
(0.266808 0.176368 0)
(0.305224 0.207138 0)
(0.450325 0.261123 0)
(0.496532 0.285754 0)
(0.526533 0.319388 0)
(0.5492 0.376634 0)
(0.557192 0.437317 0)
(0.563797 0.526281 0)
(0.597592 0.616911 0)
(0.638107 0.654539 0)
(0.63641 0.66308 0)
(0.593111 0.676762 0)
(0.458241 0.739399 0)
(0.0825209 1.07504 0)
(-0.393606 1.62061 0)
(-0.608368 2.06519 0)
(-0.470169 2.13858 0)
(-0.185029 1.30516 0)
(-0.125394 0.0172964 0)
(-0.183389 -0.213955 0)
(-0.163277 -0.174418 0)
(-0.154204 -0.107016 0)
(-0.103444 -0.0510181 0)
(-0.0052333 -0.00373776 0)
(0.0312447 0.0627396 0)
(0.0281294 0.366775 0)
(0.114188 0.34995 0)
(0.159006 0.268921 0)
(0.176389 0.196516 0)
(0.21217 0.165259 0)
(0.250988 0.134601 0)
(0.284124 0.137149 0)
(0.378708 0.173615 0)
(0.44749 0.233332 0)
(0.478142 0.28729 0)
(0.498664 0.363462 0)
(0.497622 0.438683 0)
(0.494183 0.523725 0)
(0.498248 0.605137 0)
(0.49842 0.634385 0)
(0.437096 0.658749 0)
(0.273009 0.827486 0)
(-0.0515884 1.28791 0)
(-0.414633 1.64844 0)
(-0.533735 1.79216 0)
(-0.39183 1.82179 0)
(-0.0371022 1.72806 0)
(0.228258 1.20778 0)
(0.0755935 0.193467 0)
(-0.1402 -0.202343 0)
(-0.165916 -0.179217 0)
(-0.141705 -0.135363 0)
(-0.0968424 -0.0993608 0)
(-0.041228 -0.052349 0)
(-0.0198236 0.0698105 0)
(0.0219599 0.293862 0)
(0.0933083 0.30028 0)
(0.147067 0.242358 0)
(0.171332 0.166299 0)
(0.194998 0.123644 0)
(0.235004 0.0963434 0)
(0.269022 0.0862825 0)
(0.333443 0.113669 0)
(0.389831 0.178231 0)
(0.423115 0.258892 0)
(0.437183 0.355381 0)
(0.424812 0.448646 0)
(0.401034 0.557562 0)
(0.327599 0.55893 0)
(0.226243 0.647182 0)
(0.0731626 0.959108 0)
(-0.190718 1.32242 0)
(-0.391927 1.47905 0)
(-0.442131 1.6074 0)
(-0.341771 1.63315 0)
(-0.0655307 1.47046 0)
(0.257926 1.37613 0)
(0.490423 1.13642 0)
(0.3705 0.592553 0)
(0.00596751 -0.0483036 0)
(-0.152737 -0.180957 0)
(-0.154508 -0.16042 0)
(-0.125977 -0.136608 0)
(-0.0929098 -0.103157 0)
(-0.090025 0.0135553 0)
(0.015885 0.240396 0)
(0.0709191 0.238213 0)
(0.112989 0.210685 0)
(0.171189 0.156191 0)
(0.188834 0.0884672 0)
(0.216758 0.0595937 0)
(0.250003 0.0468165 0)
(0.293829 0.07128 0)
(0.33426 0.136149 0)
(0.366696 0.232332 0)
(0.364806 0.34677 0)
(0.376264 0.510069 0)
(0.296886 0.560672 0)
(0.169851 0.817319 0)
(-0.040469 1.0153 0)
(-0.235433 1.20123 0)
(-0.346384 1.31238 0)
(-0.373017 1.44342 0)
(-0.284848 1.50215 0)
(-0.0981545 1.37202 0)
(0.148797 1.17725 0)
(0.389022 1.11589 0)
(0.584154 1.01752 0)
(0.611283 0.802552 0)
(0.357629 0.421393 0)
(-0.0120674 -0.0765051 0)
(-0.142292 -0.158777 0)
(-0.136279 -0.158674 0)
(-0.107279 -0.145395 0)
(-0.0529811 -0.0878293 0)
(0.0111676 0.206495 0)
(0.0476932 0.183085 0)
(0.0973912 0.164838 0)
(0.142309 0.10938 0)
(0.185255 0.0637453 0)
(0.201785 0.0273208 0)
(0.227919 0.0165435 0)
(0.261927 0.0379373 0)
(0.295783 0.100756 0)
(0.31927 0.203029 0)
(0.397643 0.372717 0)
(0.474797 0.553621 0)
(0.345123 0.934602 0)
(0.0634547 1.04289 0)
(-0.12889 1.10611 0)
(-0.238546 1.20142 0)
(-0.28312 1.31752 0)
(-0.263914 1.38505 0)
(-0.138337 1.35452 0)
(0.0440863 1.12872 0)
(0.233342 0.981318 0)
(0.416481 0.927885 0)
(0.588379 0.872027 0)
(0.697954 0.787463 0)
(0.66282 0.66522 0)
(0.397748 0.37202 0)
(0.0352132 -0.0541032 0)
(-0.109203 -0.158254 0)
(-0.105319 -0.181387 0)
(-0.0550461 -0.149189 0)
(0.010616 0.182548 0)
(0.0377112 0.141922 0)
(0.0748978 0.111567 0)
(0.116313 0.0819196 0)
(0.157755 0.0326665 0)
(0.189972 0.00138088 0)
(0.21253 -0.0126761 0)
(0.247315 0.00170263 0)
(0.289779 0.0485321 0)
(0.363442 0.0759185 0)
(0.506072 0.28099 0)
(0.468423 0.708932 0)
(0.247069 1.04868 0)
(0.03184 1.13315 0)
(-0.0983255 1.18453 0)
(-0.171733 1.25646 0)
(-0.193742 1.30625 0)
(-0.15593 1.34315 0)
(-0.0472499 1.20064 0)
(0.0963341 0.973403 0)
(0.238937 0.837985 0)
(0.396002 0.764073 0)
(0.569989 0.721717 0)
(0.709123 0.694656 0)
(0.768108 0.688076 0)
(0.698964 0.621954 0)
(0.434032 0.382427 0)
(0.0868979 -0.0121622 0)
(-0.0841449 -0.219195 0)
(-0.0533558 -0.219871 0)
(0.0102956 0.160588 0)
(0.0352975 0.113457 0)
(0.0614629 0.074448 0)
(0.0916746 0.0405761 0)
(0.121644 0.00455161 0)
(0.154214 -0.0297538 0)
(0.190562 -0.0444359 0)
(0.235374 -0.044382 0)
(0.279286 -0.0711995 0)
(0.395607 0.0255602 0)
(0.410069 0.323196 0)
(0.292828 0.790604 0)
(0.128656 1.1835 0)
(-0.00551272 1.26591 0)
(-0.0880167 1.27892 0)
(-0.140521 1.28809 0)
(-0.157122 1.30995 0)
(-0.0876987 1.26485 0)
(-0.0142538 1.09088 0)
(0.0887828 0.859932 0)
(0.209751 0.707514 0)
(0.369761 0.602299 0)
(0.545358 0.552883 0)
(0.694945 0.577151 0)
(0.76943 0.658231 0)
(0.739013 0.68641 0)
(0.616457 0.604106 0)
(0.359888 0.405438 0)
(0.0293352 -0.03067 0)
(-0.0797519 -0.309267 0)
(0.00878841 0.139691 0)
(0.0307498 0.0904389 0)
(0.0509414 0.0499746 0)
(0.0703117 0.0142201 0)
(0.0887229 -0.0195112 0)
(0.10911 -0.0519627 0)
(0.142649 -0.0817288 0)
(0.154718 -0.110987 0)
(0.211571 -0.110549 0)
(0.225059 -0.0258494 0)
(0.219424 0.354015 0)
(0.096371 0.955374 0)
(-0.0181395 1.26103 0)
(-0.0689221 1.35277 0)
(-0.113662 1.32778 0)
(-0.144799 1.3213 0)
(-0.149822 1.29681 0)
(-0.0786804 1.19192 0)
(-0.0240391 1.00748 0)
(0.0515677 0.77346 0)
(0.17831 0.565434 0)
(0.344218 0.419036 0)
(0.509259 0.372164 0)
(0.64008 0.452422 0)
(0.712217 0.642313 0)
(0.67755 0.754753 0)
(0.554724 0.714122 0)
(0.39307 0.620058 0)
(0.163812 0.288716 0)
(-0.0146444 -0.315305 0)
(0.00598431 0.122499 0)
(0.0227706 0.0727273 0)
(0.0362718 0.0338478 0)
(0.0469928 -0.000455543 0)
(0.0542874 -0.0335636 0)
(0.0680839 -0.0679496 0)
(0.0661906 -0.0941729 0)
(0.0672896 -0.126483 0)
(0.0743174 -0.147077 0)
(0.0500539 -0.0403934 0)
(0.00826225 0.491084 0)
(-0.117528 1.08951 0)
(-0.143541 1.29334 0)
(-0.139495 1.37071 0)
(-0.151142 1.36407 0)
(-0.163507 1.32448 0)
(-0.137726 1.27765 0)
(-0.101241 1.11461 0)
(-0.0500322 0.95603 0)
(0.0249479 0.673099 0)
(0.15923 0.403286 0)
(0.310306 0.24846 0)
(0.448954 0.225022 0)
(0.563007 0.350503 0)
(0.631082 0.634099 0)
(0.594209 0.867716 0)
(0.456582 0.849781 0)
(0.298266 0.760797 0)
(0.144727 0.442771 0)
(0.0451087 -0.215799 0)
(0.00343604 0.111014 0)
(0.0129897 0.0623559 0)
(0.0182461 0.0268488 0)
(0.0178895 -0.00296519 0)
(0.0137244 -0.0310888 0)
(0.00662414 -0.0625732 0)
(-0.029752 -0.0930762 0)
(-0.0200769 -0.132007 0)
(-0.0342777 -0.145625 0)
(-0.0828755 0.0473094 0)
(-0.207854 0.626926 0)
(-0.282465 1.09071 0)
(-0.23693 1.26562 0)
(-0.19934 1.35839 0)
(-0.183382 1.36162 0)
(-0.1736 1.32606 0)
(-0.12832 1.23818 0)
(-0.121988 1.08181 0)
(-0.0697357 0.907301 0)
(0.0214091 0.551665 0)
(0.145926 0.265076 0)
(0.266637 0.116838 0)
(0.377564 0.102754 0)
(0.475481 0.258 0)
(0.534351 0.625303 0)
(0.49008 0.968005 0)
(0.337723 0.977271 0)
(0.191094 0.907502 0)
(0.0816439 0.533616 0)
(0.0266035 -0.14078 0)
(0.00208325 0.104798 0)
(0.00509194 0.0594962 0)
(0.00193678 0.0309235 0)
(-0.0126838 0.00697105 0)
(-0.0343743 -0.0149567 0)
(-0.0731517 -0.0358808 0)
(-0.0901244 -0.0827277 0)
(-0.0923894 -0.132378 0)
(-0.135042 -0.107256 0)
(-0.223999 0.236516 0)
(-0.359122 0.726479 0)
(-0.363531 1.05876 0)
(-0.289087 1.22482 0)
(-0.231462 1.30991 0)
(-0.195342 1.33696 0)
(-0.160846 1.29778 0)
(-0.126282 1.19245 0)
(-0.130564 1.05449 0)
(-0.0694157 0.844575 0)
(0.0421612 0.437425 0)
(0.148429 0.156496 0)
(0.228482 0.00677828 0)
(0.294281 -0.0101286 0)
(0.361012 0.162783 0)
(0.427393 0.645178 0)
(0.379479 1.09234 0)
(0.22625 1.10772 0)
(0.0904623 1.0399 0)
(0.0449189 0.576256 0)
(0.0275557 -0.119577 0)
(0.00179377 0.102236 0)
(0.00156371 0.0622754 0)
(-0.00771834 0.0443225 0)
(-0.0402554 0.0384081 0)
(-0.0934389 0.0199341 0)
(-0.125363 -0.0164035 0)
(-0.135773 -0.0706525 0)
(-0.167116 -0.109721 0)
(-0.257014 0.00249478 0)
(-0.365205 0.35688 0)
(-0.429876 0.733767 0)
(-0.387694 0.999574 0)
(-0.304389 1.15455 0)
(-0.231107 1.25395 0)
(-0.177755 1.29027 0)
(-0.128589 1.26483 0)
(-0.111246 1.17232 0)
(-0.112211 1.06082 0)
(-0.0411819 0.727475 0)
(0.095328 0.338232 0)
(0.180803 0.0809726 0)
(0.216577 -0.034725 0)
(0.234042 -0.0516575 0)
(0.255265 0.0972377 0)
(0.311784 0.656848 0)
(0.260836 1.19756 0)
(0.118857 1.23185 0)
(0.00111489 1.13617 0)
(0.0320204 0.553246 0)
(0.0298531 -0.0536705 0)
(0.00355301 0.101197 0)
(-0.00022776 0.0690966 0)
(-0.0205532 0.0747114 0)
(-0.084149 0.0950967 0)
(-0.12206 0.0616893 0)
(-0.156975 0.00752631 0)
(-0.18928 -0.0433724 0)
(-0.285234 -0.0379903 0)
(-0.389661 0.141571 0)
(-0.473051 0.406438 0)
(-0.464222 0.695345 0)
(-0.387197 0.920017 0)
(-0.294322 1.07039 0)
(-0.207146 1.17592 0)
(-0.13466 1.23169 0)
(-0.0824034 1.21916 0)
(-0.0732433 1.16589 0)
(-0.0531977 1.06114 0)
(0.0263383 0.583676 0)
(0.152035 0.228429 0)
(0.210698 0.0345984 0)
(0.215441 -0.0428883 0)
(0.197725 -0.0577762 0)
(0.179899 0.0605469 0)
(0.209005 0.689065 0)
(0.151344 1.30284 0)
(0.0170553 1.33854 0)
(-0.0614524 1.19062 0)
(0.0390478 0.459316 0)
(0.0290678 -0.00177366 0)
(0.00740076 0.0999965 0)
(-0.0160824 0.0832934 0)
(-0.0648843 0.126173 0)
(-0.0976617 0.136033 0)
(-0.136289 0.0984104 0)
(-0.195018 0.0521135 0)
(-0.286305 0.0299266 0)
(-0.416307 0.09502 0)
(-0.51568 0.230142 0)
(-0.540287 0.403591 0)
(-0.47536 0.623285 0)
(-0.366141 0.823954 0)
(-0.257568 0.973172 0)
(-0.16166 1.08859 0)
(-0.07485 1.15732 0)
(-0.0152155 1.18201 0)
(-0.0105698 1.15397 0)
(0.0362199 1.00422 0)
(0.124374 0.48151 0)
(0.210825 0.143219 0)
(0.238374 0.0188077 0)
(0.218745 -0.0178485 0)
(0.172197 -0.0234744 0)
(0.120576 0.0706912 0)
(0.112573 0.717319 0)
(0.0555881 1.39804 0)
(-0.067425 1.44576 0)
(-0.074185 1.15395 0)
(0.0586345 0.356334 0)
(0.0275192 0.0685895 0)
(-0.00411271 0.108077 0)
(-0.0475268 0.130827 0)
(-0.0847166 0.163985 0)
(-0.123698 0.170606 0)
(-0.187476 0.163711 0)
(-0.284641 0.157048 0)
(-0.414782 0.174716 0)
(-0.542142 0.221544 0)
(-0.61197 0.276381 0)
(-0.592415 0.36747 0)
(-0.486229 0.529431 0)
(-0.345809 0.71591 0)
(-0.21062 0.877519 0)
(-0.0940108 1.00222 0)
(0.0097273 1.08971 0)
(0.0822366 1.1473 0)
(0.11773 1.1554 0)
(0.15877 0.924902 0)
(0.229052 0.412499 0)
(0.254296 0.0982154 0)
(0.252197 0.033524 0)
(0.214821 0.0276614 0)
(0.14861 0.0348187 0)
(0.0742241 0.125375 0)
(0.0239999 0.747371 0)
(-0.023382 1.49317 0)
(-0.114756 1.53877 0)
(-0.0408749 1.01051 0)
(0.0756694 0.291627 0)
(0.0263285 0.143758 0)
(-0.0186902 0.148821 0)
(-0.0644534 0.171753 0)
(-0.107575 0.199145 0)
(-0.16324 0.225518 0)
(-0.241791 0.250935 0)
(-0.330083 0.274547 0)
(-0.413005 0.293069 0)
(-0.462327 0.284526 0)
(-0.496225 0.265957 0)
(-0.517722 0.29764 0)
(-0.459743 0.426405 0)
(-0.332614 0.589489 0)
(-0.191888 0.758065 0)
(-0.0527004 0.892958 0)
(0.0810217 1.00536 0)
(0.18956 1.10623 0)
(0.275487 1.14357 0)
(0.311169 0.885867 0)
(0.312909 0.383429 0)
(0.274917 0.0954142 0)
(0.253221 0.0738413 0)
(0.196052 0.0939202 0)
(0.11258 0.114759 0)
(0.0152796 0.216786 0)
(-0.0668336 0.784584 0)
(-0.0968583 1.55222 0)
(-0.106359 1.60299 0)
(0.0185514 0.839393 0)
(0.0817087 0.275024 0)
(0.0245072 0.224398 0)
(-0.025128 0.202494 0)
(-0.0879983 0.220968 0)
(-0.141052 0.254701 0)
(-0.185557 0.300473 0)
(-0.207116 0.335384 0)
(-0.217087 0.332066 0)
(-0.22861 0.321665 0)
(-0.247386 0.313726 0)
(-0.27773 0.305771 0)
(-0.330122 0.29718 0)
(-0.382695 0.335074 0)
(-0.342199 0.47859 0)
(-0.232528 0.633765 0)
(-0.0919513 0.747764 0)
(0.0622814 0.853952 0)
(0.213382 0.982717 0)
(0.361818 1.07779 0)
(0.433026 0.902782 0)
(0.362762 0.434698 0)
(0.269713 0.13824 0)
(0.226669 0.132532 0)
(0.157971 0.177151 0)
(0.0631125 0.218043 0)
(-0.048632 0.337351 0)
(-0.150665 0.839591 0)
(-0.14511 1.52811 0)
(-0.0427993 1.57219 0)
(0.0717009 0.696199 0)
(0.0659737 0.295399 0)
(0.0148743 0.295228 0)
(-0.0144044 0.257006 0)
(-0.025815 0.268806 0)
(-0.0474448 0.291647 0)
(-0.0665166 0.313383 0)
(-0.08377 0.324615 0)
(-0.111833 0.33397 0)
(-0.145084 0.338885 0)
(-0.179233 0.342827 0)
(-0.215479 0.346399 0)
(-0.251448 0.351245 0)
(-0.286506 0.358382 0)
(-0.331256 0.399643 0)
(-0.296432 0.509761 0)
(-0.196599 0.60624 0)
(-0.0627997 0.687578 0)
(0.101424 0.814242 0)
(0.303183 0.937847 0)
(0.442723 0.886914 0)
(0.382322 0.519724 0)
(0.240175 0.217045 0)
(0.168224 0.204811 0)
(0.102435 0.264956 0)
(0.00922628 0.334324 0)
(-0.0927195 0.459955 0)
(-0.189914 0.867427 0)
(-0.150051 1.43366 0)
(0.0426704 1.44687 0)
(0.100948 0.661049 0)
(0.0330398 0.342952 0)
(-0.00480174 0.339268 0)
(0.00693774 0.271421 0)
(-0.012989 0.26305 0)
(-0.0293253 0.293991 0)
(-0.0490393 0.322643 0)
(-0.0702901 0.343518 0)
(-0.096905 0.361277 0)
(-0.12883 0.370908 0)
(-0.163859 0.377338 0)
(-0.200922 0.384786 0)
(-0.238253 0.392322 0)
(-0.271805 0.400285 0)
(-0.293136 0.415985 0)
(-0.30788 0.441117 0)
(-0.27678 0.48642 0)
(-0.202008 0.527438 0)
(-0.088635 0.600535 0)
(0.0832954 0.702461 0)
(0.292534 0.760003 0)
(0.328649 0.616258 0)
(0.188549 0.330672 0)
(0.0907496 0.28011 0)
(0.0342672 0.340452 0)
(-0.0356863 0.433012 0)
(-0.11199 0.556227 0)
(-0.18209 0.865568 0)
(-0.12541 1.25979 0)
(0.0842083 1.25524 0)
(0.104102 0.687528 0)
(0.0240899 0.409228 0)
(-0.0230838 0.352226 0)
(0.00854374 0.270417 0)
(-0.00482069 0.279304 0)
(-0.0232462 0.313537 0)
(-0.043515 0.345795 0)
(-0.0676435 0.372218 0)
(-0.095167 0.393302 0)
(-0.126482 0.407219 0)
(-0.161405 0.416089 0)
(-0.197899 0.422903 0)
(-0.232939 0.427505 0)
(-0.263924 0.43258 0)
(-0.286297 0.441399 0)
(-0.295164 0.453196 0)
(-0.287848 0.459539 0)
(-0.263387 0.462101 0)
(-0.215079 0.479103 0)
(-0.125515 0.518786 0)
(0.0206617 0.567989 0)
(0.158808 0.593644 0)
(0.117072 0.463252 0)
(0.0230282 0.350947 0)
(-0.0255839 0.390867 0)
(-0.0748383 0.497796 0)
(-0.138582 0.628177 0)
(-0.177037 0.849721 0)
(-0.106477 1.09918 0)
(0.0824973 1.09142 0)
(0.117225 0.738236 0)
(0.0434871 0.476021 0)
(-0.00197047 0.346218 0)
(0.00381436 0.266796 0)
(-0.00625342 0.295668 0)
(-0.0222578 0.332771 0)
(-0.0410085 0.368676 0)
(-0.0638254 0.399215 0)
(-0.0909172 0.42417 0)
(-0.121951 0.441343 0)
(-0.156775 0.45303 0)
(-0.193247 0.458634 0)
(-0.227108 0.460521 0)
(-0.254621 0.459381 0)
(-0.273481 0.458933 0)
(-0.282072 0.460914 0)
(-0.27914 0.461837 0)
(-0.266629 0.458437 0)
(-0.24481 0.457389 0)
(-0.20606 0.460877 0)
(-0.14323 0.466118 0)
(-0.0540537 0.493593 0)
(0.0132112 0.518845 0)
(-0.0153407 0.395333 0)
(-0.0600401 0.429989 0)
(-0.102338 0.556822 0)
(-0.160179 0.694043 0)
(-0.160047 0.83794 0)
(-0.0851934 0.971972 0)
(0.0571723 0.965716 0)
(0.097694 0.783152 0)
(0.0478358 0.544705 0)
(0.00783006 0.371338 0)
(-0.000385549 0.27114 0)
(-0.00768509 0.309182 0)
(-0.018618 0.349203 0)
(-0.0338068 0.387805 0)
(-0.0549626 0.424882 0)
(-0.0820527 0.455229 0)
(-0.115536 0.473755 0)
(-0.153865 0.486983 0)
(-0.191319 0.492191 0)
(-0.220737 0.489441 0)
(-0.241841 0.482356 0)
(-0.258693 0.475447 0)
(-0.271266 0.467687 0)
(-0.27572 0.460522 0)
(-0.272029 0.453062 0)
(-0.261565 0.445995 0)
(-0.243215 0.43805 0)
(-0.215992 0.427962 0)
(-0.175238 0.430241 0)
(-0.107332 0.464083 0)
(-0.0582136 0.426409 0)
(-0.0964152 0.408542 0)
(-0.120611 0.548517 0)
(-0.160746 0.670128 0)
(-0.145127 0.74969 0)
(-0.0746593 0.826868 0)
(0.0192388 0.82134 0)
(0.0288574 0.764674 0)
(0.016548 0.562079 0)
(0.0103189 0.355143 0)
(-0.000697998 0.274599 0)
(-0.00389707 0.316655 0)
(-0.00958677 0.359508 0)
(-0.0187863 0.404058 0)
(-0.0378169 0.450304 0)
(-0.0746676 0.48436 0)
(-0.119875 0.506204 0)
(-0.162582 0.524562 0)
(-0.19053 0.520953 0)
(-0.204524 0.510466 0)
(-0.218407 0.501781 0)
(-0.240566 0.499834 0)
(-0.265154 0.484767 0)
(-0.279866 0.466618 0)
(-0.285004 0.450776 0)
(-0.283596 0.438083 0)
(-0.276873 0.424476 0)
(-0.265561 0.408243 0)
(-0.246486 0.396204 0)
(-0.205127 0.400293 0)
(-0.137113 0.408307 0)
(-0.126305 0.459397 0)
(-0.119939 0.653577 0)
(-0.106198 0.759322 0)
(-0.113738 0.751922 0)
(-0.0991965 0.788493 0)
(-0.0704244 0.818572 0)
(-0.0699161 0.835237 0)
(-0.0352227 0.578466 0)
(-0.00320803 0.347009 0)
(0.00128198 0.274766 0)
(0.00357755 0.317752 0)
(0.0056357 0.36364 0)
(0.0062106 0.410377 0)
(-0.0241984 0.476329 0)
(-0.0887463 0.527097 0)
(-0.15548 0.55468 0)
(-0.1662 0.553099 0)
(-0.16119 0.532581 0)
(-0.159375 0.520177 0)
(-0.16854 0.5189 0)
(-0.210525 0.534984 0)
(-0.268791 0.509866 0)
(-0.297529 0.480206 0)
(-0.306679 0.457066 0)
(-0.310833 0.437205 0)
(-0.311254 0.419553 0)
(-0.308836 0.400193 0)
(-0.303465 0.380336 0)
(-0.291897 0.366477 0)
(-0.268415 0.371468 0)
(-0.238784 0.451936 0)
(-0.213745 0.604102 0)
(-0.14087 0.757991 0)
(-0.110363 0.835554 0)
(-0.130757 0.860169 0)
(-0.151285 0.886449 0)
(-0.12085 0.847642 0)
(-0.0234663 0.543173 0)
(-0.00463276 0.369887 0)
(0.00371343 0.269469 0)
(0.0120868 0.313475 0)
(0.0202212 0.35881 0)
(0.0183429 0.408517 0)
(-0.0292974 0.562323 0)
(-0.141473 0.651493 0)
(-0.138947 0.577376 0)
(-0.113964 0.540766 0)
(-0.0962946 0.521541 0)
(-0.087147 0.517977 0)
(-0.092735 0.532792 0)
(-0.16682 0.615779 0)
(-0.298431 0.546806 0)
(-0.331996 0.483386 0)
(-0.339581 0.461761 0)
(-0.344168 0.441544 0)
(-0.347195 0.420806 0)
(-0.349273 0.399727 0)
(-0.351096 0.377887 0)
(-0.354406 0.36064 0)
(-0.357642 0.360587 0)
(-0.344624 0.407526 0)
(-0.316822 0.517045 0)
(-0.262397 0.66255 0)
(-0.200912 0.793138 0)
(-0.168786 0.864729 0)
(-0.167788 0.882583 0)
(-0.107037 0.72448 0)
(-0.0229127 0.441827 0)
(-0.000101112 0.367993 0)
(0.00601669 0.260131 0)
(0.016577 0.303503 0)
(0.0169811 0.353155 0)
(-0.00283783 0.433574 0)
(-0.0699758 0.72114 0)
(-0.11643 0.61949 0)
(-0.0704342 0.53914 0)
(-0.0441757 0.51184 0)
(-0.0248324 0.505454 0)
(-0.0162562 0.511705 0)
(-0.0394447 0.565623 0)
(-0.106256 0.818053 0)
(-0.317039 0.656216 0)
(-0.355911 0.486255 0)
(-0.369769 0.463525 0)
(-0.379774 0.443939 0)
(-0.384285 0.424125 0)
(-0.386795 0.402913 0)
(-0.389753 0.380916 0)
(-0.393365 0.364724 0)
(-0.39647 0.364269 0)
(-0.390404 0.39298 0)
(-0.370945 0.463633 0)
(-0.353534 0.583857 0)
(-0.294884 0.698212 0)
(-0.209557 0.799524 0)
(-0.142834 0.824419 0)
(-0.0519326 0.591178 0)
(0.00420944 0.358723 0)
(0.0036072 0.354988 0)
(0.00477656 0.245179 0)
(0.0116601 0.294997 0)
(0.00242957 0.369518 0)
(-0.0401736 0.515925 0)
(-0.100245 0.779389 0)
(-0.0495516 0.565735 0)
(-0.00859945 0.505119 0)
(0.0172039 0.489043 0)
(0.0361317 0.487696 0)
(0.0391448 0.512901 0)
(-0.00329391 0.645649 0)
(-0.0726812 0.94987 0)
(-0.130678 0.823869 0)
(-0.361222 0.576874 0)
(-0.379577 0.491702 0)
(-0.404967 0.453086 0)
(-0.413823 0.428299 0)
(-0.419148 0.407124 0)
(-0.423187 0.38455 0)
(-0.42429 0.366511 0)
(-0.420756 0.362495 0)
(-0.408969 0.387466 0)
(-0.396295 0.455745 0)
(-0.390071 0.546773 0)
(-0.361982 0.587989 0)
(-0.236564 0.667973 0)
(-0.101529 0.734936 0)
(0.00853533 0.477912 0)
(0.0387021 0.361559 0)
(0.0133044 0.380466 0)
(-0.00472908 0.236812 0)
(0.00531256 0.297196 0)
(0.0370632 0.378482 0)
(0.00615446 0.607011 0)
(-0.0776195 0.706472 0)
(0.0131722 0.515998 0)
(0.0458904 0.474927 0)
(0.0705656 0.466555 0)
(0.086261 0.473676 0)
(0.0811659 0.526592 0)
(0.0450954 0.756838 0)
(-0.0198388 0.977663 0)
(-0.0607122 0.887049 0)
(-0.263698 0.723573 0)
(-0.332792 0.575969 0)
(-0.382533 0.490337 0)
(-0.418866 0.447361 0)
(-0.442204 0.418742 0)
(-0.454751 0.390012 0)
(-0.456548 0.365395 0)
(-0.448399 0.352546 0)
(-0.428991 0.369404 0)
(-0.405116 0.45045 0)
(-0.388159 0.548664 0)
(-0.353587 0.520482 0)
(-0.268712 0.528304 0)
(-0.0943122 0.589418 0)
(0.0198384 0.408325 0)
(0.036083 0.367687 0)
(0.0204721 0.421949 0)
(-0.00733951 0.232606 0)
(0.0308789 0.267292 0)
(0.078539 0.321451 0)
(0.00807914 0.784472 0)
(-0.0237057 0.610267 0)
(0.0584679 0.468081 0)
(0.0931088 0.446993 0)
(0.117119 0.444056 0)
(0.129605 0.461492 0)
(0.123178 0.546135 0)
(0.107624 0.826035 0)
(0.101308 1.00244 0)
(-0.0133879 1.03173 0)
(-0.108271 0.791314 0)
(-0.190787 0.652759 0)
(-0.312005 0.564494 0)
(-0.4163 0.496467 0)
(-0.471529 0.448058 0)
(-0.494748 0.400353 0)
(-0.496987 0.362771 0)
(-0.484399 0.337572 0)
(-0.457349 0.337148 0)
(-0.418178 0.413334 0)
(-0.366823 0.53859 0)
(-0.301391 0.475959 0)
(-0.244238 0.41992 0)
(-0.0874171 0.455918 0)
(-0.0135963 0.350081 0)
(0.00947486 0.36581 0)
(0.0136848 0.449067 0)
(0.0103309 0.208437 0)
(0.0421929 0.230456 0)
(0.0332641 0.342056 0)
(-0.0266862 0.891362 0)
(0.0401571 0.51875 0)
(0.100192 0.421384 0)
(0.135169 0.418316 0)
(0.158506 0.423253 0)
(0.1693 0.451049 0)
(0.17423 0.563153 0)
(0.209169 0.81384 0)
(0.270192 0.98273 0)
(0.329391 1.04517 0)
(0.144209 0.906013 0)
(0.0658985 0.734327 0)
(-0.203658 0.703833 0)
(-0.449722 0.578858 0)
(-0.533566 0.478272 0)
(-0.555556 0.407631 0)
(-0.548017 0.355013 0)
(-0.526976 0.316651 0)
(-0.493081 0.296484 0)
(-0.444002 0.345219 0)
(-0.386231 0.491802 0)
(-0.226252 0.403963 0)
(-0.222076 0.30317 0)
(-0.115019 0.380354 0)
(-0.0465184 0.302236 0)
(-0.0237288 0.358854 0)
(-0.00637971 0.453141 0)
(0.0202377 0.173593 0)
(0.0581281 0.228703 0)
(-0.0782403 0.37202 0)
(-0.0553066 0.83391 0)
(0.0995042 0.431553 0)
(0.144028 0.380376 0)
(0.17399 0.39083 0)
(0.193544 0.404961 0)
(0.20133 0.441828 0)
(0.218876 0.558666 0)
(0.292559 0.72859 0)
(0.4158 0.886131 0)
(0.546021 1.04604 0)
(0.436628 1.06602 0)
(0.347856 0.899382 0)
(-0.202975 1.10175 0)
(-0.57346 0.764066 0)
(-0.620808 0.499493 0)
(-0.620065 0.389458 0)
(-0.602708 0.334598 0)
(-0.569615 0.288764 0)
(-0.52884 0.252605 0)
(-0.474724 0.263549 0)
(-0.421111 0.378452 0)
(-0.293898 0.295426 0)
(-0.247429 0.283269 0)
(-0.137172 0.247677 0)
(-0.0788802 0.260116 0)
(-0.0644256 0.348987 0)
(-0.0383033 0.424827 0)
(0.0287992 0.117332 0)
(0.0425239 0.261186 0)
(-0.104778 0.570829 0)
(-0.00705309 0.624171 0)
(0.15533 0.347532 0)
(0.186728 0.34743 0)
(0.209506 0.368617 0)
(0.221098 0.392347 0)
(0.222987 0.439587 0)
(0.247544 0.532967 0)
(0.322138 0.60808 0)
(0.433957 0.733391 0)
(0.523772 0.97342 0)
(0.447031 1.21741 0)
(0.310303 1.25476 0)
(-0.288446 1.71105 0)
(-0.730887 1.10033 0)
(-0.734088 0.507866 0)
(-0.666137 0.345793 0)
(-0.6394 0.295646 0)
(-0.597607 0.250217 0)
(-0.552181 0.206249 0)
(-0.500147 0.184074 0)
(-0.440316 0.303606 0)
(-0.333647 0.256714 0)
(-0.224813 0.18979 0)
(-0.147558 0.166911 0)
(-0.1147 0.232354 0)
(-0.109159 0.353023 0)
(-0.0481791 0.35817 0)
(-0.0111656 0.0460631 0)
(-0.040603 0.408881 0)
(-0.0898563 0.590452 0)
(0.095646 0.394922 0)
(0.191189 0.289419 0)
(0.216016 0.322159 0)
(0.234082 0.351692 0)
(0.239169 0.386075 0)
(0.237624 0.448669 0)
(0.261183 0.495722 0)
(0.301032 0.511726 0)
(0.305711 0.611294 0)
(0.327357 0.977477 0)
(0.244554 1.53235 0)
(0.0367665 1.81076 0)
(-0.361268 2.11664 0)
(-0.622838 1.47136 0)
(-0.74324 0.522442 0)
(-0.65967 0.297432 0)
(-0.627924 0.247676 0)
(-0.595202 0.205726 0)
(-0.540063 0.155207 0)
(-0.48216 0.113711 0)
(-0.416735 0.190678 0)
(-0.305719 0.202186 0)
(-0.209089 0.0774622 0)
(-0.154074 0.132887 0)
(-0.13318 0.207002 0)
(-0.133219 0.342731 0)
(-0.0132134 0.225444 0)
(-0.0478898 0.112998 0)
(-0.0772774 0.465908 0)
(0.0214492 0.472257 0)
(0.16889 0.25701 0)
(0.207065 0.258888 0)
(0.22943 0.300968 0)
(0.244049 0.336812 0)
(0.250411 0.382438 0)
(0.261743 0.460414 0)
(0.276079 0.446461 0)
(0.237573 0.444748 0)
(0.192188 0.687581 0)
(0.0979653 1.19931 0)
(-0.0964432 1.73001 0)
(-0.254675 2.03597 0)
(-0.357712 2.14339 0)
(-0.424522 1.61815 0)
(-0.67394 0.70933 0)
(-0.638623 0.232142 0)
(-0.582539 0.20029 0)
(-0.556371 0.157399 0)
(-0.508613 0.100121 0)
(-0.441127 0.0511697 0)
(-0.375738 0.0859928 0)
(-0.278808 0.121643 0)
(-0.213691 -0.0248852 0)
(-0.18976 0.0587111 0)
(-0.103858 0.172073 0)
(-0.0480886 0.278411 0)
(0.0487209 0.136071 0)
(-0.0500497 0.173594 0)
(-0.0419839 0.412178 0)
(0.110179 0.262577 0)
(0.182628 0.200436 0)
(0.207711 0.236832 0)
(0.230404 0.2801 0)
(0.244237 0.321269 0)
(0.267288 0.383471 0)
(0.321662 0.431763 0)
(0.324552 0.47997 0)
(0.211092 0.582466 0)
(0.0504005 0.925911 0)
(-0.158779 1.35135 0)
(-0.318459 1.78579 0)
(-0.369062 2.04568 0)
(-0.326668 2.06449 0)
(-0.291473 1.65274 0)
(-0.495671 0.933908 0)
(-0.74366 0.308347 0)
(-0.579297 0.163101 0)
(-0.517335 0.107624 0)
(-0.479385 0.0395558 0)
(-0.411045 -0.014603 0)
(-0.356368 0.0069522 0)
(-0.273138 0.0762316 0)
(-0.222339 -0.0493442 0)
(-0.197856 0.0320657 0)
(-0.156351 0.0841125 0)
(-0.140907 0.165041 0)
(0.0886744 0.183924 0)
(-0.0346399 0.219006 0)
(0.031686 0.280695 0)
(0.128228 0.174671 0)
(0.169155 0.170161 0)
(0.198527 0.212221 0)
(0.217758 0.25604 0)
(0.243059 0.294852 0)
(0.361506 0.30743 0)
(0.432811 0.495076 0)
(0.339166 0.630222 0)
(0.155604 0.779227 0)
(-0.061726 1.0866 0)
(-0.262766 1.47263 0)
(-0.368045 1.82738 0)
(-0.37089 2.01186 0)
(-0.306602 1.97657 0)
(-0.255911 1.64786 0)
(-0.371941 1.10161 0)
(-0.679872 0.493182 0)
(-0.697165 -0.00972143 0)
(-0.507694 0.030352 0)
(-0.459946 -0.0261002 0)
(-0.404177 -0.0757375 0)
(-0.366858 -0.0589381 0)
(-0.308031 0.0472934 0)
(-0.265519 -0.0907771 0)
(-0.224117 -0.0265439 0)
(-0.184067 0.0853659 0)
(-0.177749 0.147494 0)
(0.081668 0.110336 0)
(-0.00507819 0.231243 0)
(0.0583714 0.183631 0)
(0.112545 0.126537 0)
(0.155479 0.136489 0)
(0.186643 0.183304 0)
(0.207194 0.219787 0)
(0.336932 0.176895 0)
(0.512274 0.333611 0)
(0.409815 0.565888 0)
(0.264919 0.751063 0)
(0.0757636 0.963766 0)
(-0.122777 1.26108 0)
(-0.27546 1.59541 0)
(-0.340776 1.86048 0)
(-0.333159 1.98523 0)
(-0.290569 1.93366 0)
(-0.262442 1.65979 0)
(-0.333611 1.211 0)
(-0.575628 0.670582 0)
(-0.745983 0.0612456 0)
(-0.535616 -0.0949121 0)
(-0.452001 -0.105299 0)
(-0.404235 -0.131198 0)
(-0.374864 -0.11654 0)
(-0.320318 -0.000935745 0)
(-0.234746 -0.10668 0)
(-0.250647 -0.0210423 0)
(-0.176413 0.0480338 0)
(-0.0352804 0.00577516 0)
(0.0286475 0.0397918 0)
(0.013255 0.208181 0)
(0.0687368 0.132722 0)
(0.1062 0.0839454 0)
(0.15441 0.0844465 0)
(0.193235 0.123652 0)
(0.370393 0.118074 0)
(0.650086 0.107946 0)
(0.543943 0.368576 0)
(0.380007 0.645939 0)
(0.225666 0.895835 0)
(0.0518258 1.14513 0)
(-0.113536 1.42193 0)
(-0.227534 1.68733 0)
(-0.276001 1.88398 0)
(-0.277522 1.97166 0)
(-0.259459 1.91145 0)
(-0.256999 1.69024 0)
(-0.313653 1.31217 0)
(-0.493458 0.804153 0)
(-0.706575 0.10472 0)
(-0.533563 -0.206548 0)
(-0.428589 -0.192871 0)
(-0.390328 -0.182201 0)
(-0.367858 -0.161935 0)
(-0.31669 -0.0839347 0)
(-0.20971 -0.0786442 0)
(-0.12634 -0.142271 0)
(-0.011854 -0.111784 0)
(0.0221196 -0.0454599 0)
(0.0137254 0.0542544 0)
(0.0332813 0.164072 0)
(0.0900113 0.0901202 0)
(0.122699 0.0413397 0)
(0.167529 0.0151139 0)
(0.226371 -0.00623317 0)
(0.438112 -0.216233 0)
(0.615902 0.0816818 0)
(0.501771 0.466233 0)
(0.362515 0.777174 0)
(0.229513 1.04864 0)
(0.0822043 1.29861 0)
(-0.0527133 1.54292 0)
(-0.147689 1.75775 0)
(-0.195966 1.91258 0)
(-0.209713 1.96966 0)
(-0.211742 1.91457 0)
(-0.223766 1.7236 0)
(-0.273611 1.40194 0)
(-0.410044 0.928246 0)
(-0.637019 0.199553 0)
(-0.518539 -0.309852 0)
(-0.406747 -0.275397 0)
(-0.375608 -0.225519 0)
(-0.353623 -0.193901 0)
(-0.293185 -0.202674 0)
(-0.137973 -0.220967 0)
(-0.0590461 -0.217206 0)
(-0.0243722 -0.158586 0)
(-0.00628268 -0.0583814 0)
(-0.00615922 0.0646412 0)
(0.0682729 0.102812 0)
(0.12014 0.0458729 0)
(0.148708 0.00222487 0)
(0.183848 -0.048723 0)
(0.215721 -0.117223 0)
(0.379628 -0.34081 0)
(0.51093 0.0367809 0)
(0.467062 0.533122 0)
(0.366186 0.888258 0)
(0.255935 1.17666 0)
(0.133291 1.42776 0)
(0.0203332 1.64725 0)
(-0.0642256 1.82793 0)
(-0.114433 1.94508 0)
(-0.138625 1.98561 0)
(-0.151964 1.9261 0)
(-0.170491 1.76177 0)
(-0.209978 1.47282 0)
(-0.309875 1.03435 0)
(-0.543925 0.335317 0)
(-0.514177 -0.375912 0)
(-0.426151 -0.352044 0)
(-0.37509 -0.261418 0)
(-0.333488 -0.235491 0)
(-0.241074 -0.323398 0)
(-0.137309 -0.29444 0)
(-0.0999174 -0.265983 0)
(-0.0752398 -0.185632 0)
(-0.0478088 -0.0818792 0)
(-0.0384411 0.0525425 0)
(0.103833 -0.000713324 0)
(0.158336 0.00391979 0)
(0.188599 -0.0302056 0)
(0.221312 -0.0937673 0)
(0.248257 -0.201737 0)
(0.352079 -0.382771 0)
(0.479816 -0.0471228 0)
(0.472888 0.569186 0)
(0.388746 0.976172 0)
(0.294023 1.28865 0)
(0.187961 1.53735 0)
(0.0892685 1.74175 0)
(0.0115491 1.89262 0)
(-0.0407961 1.98643 0)
(-0.0709744 2.00601 0)
(-0.0905299 1.94691 0)
(-0.108288 1.79081 0)
(-0.135299 1.52942 0)
(-0.195986 1.12214 0)
(-0.393014 0.505306 0)
(-0.501864 -0.353793 0)
(-0.47889 -0.446774 0)
(-0.369578 -0.309253 0)
(-0.291649 -0.349493 0)
(-0.214011 -0.367752 0)
(-0.182516 -0.342728 0)
(-0.156736 -0.292971 0)
(-0.12948 -0.211035 0)
(-0.107277 -0.111332 0)
(-0.111024 0.0147741 0)
(0.056904 -0.159432 0)
(0.168667 -0.0537035 0)
(0.229803 -0.0583073 0)
(0.269971 -0.127299 0)
(0.316355 -0.256144 0)
(0.42064 -0.429064 0)
(0.579265 -0.0887421 0)
(0.524284 0.599714 0)
(0.42573 1.05807 0)
(0.332493 1.38639 0)
(0.235944 1.63698 0)
(0.145998 1.82482 0)
(0.0724207 1.95811 0)
(0.0189617 2.02791 0)
(-0.0157479 2.03468 0)
(-0.0380562 1.964 0)
(-0.0536701 1.81479 0)
(-0.0685301 1.56303 0)
(-0.0954789 1.18478 0)
(-0.207716 0.644238 0)
(-0.411857 -0.130217 0)
(-0.393675 -0.607259 0)
(-0.352204 -0.451001 0)
(-0.272485 -0.423131 0)
(-0.243212 -0.386112 0)
(-0.222384 -0.367078 0)
(-0.200183 -0.317227 0)
(-0.175289 -0.237399 0)
(-0.173458 -0.131123 0)
(-0.15496 -0.0990466 0)
(0.0243565 -0.129128 0)
(0.0402109 -0.156429 0)
(0.236533 -0.047904 0)
(0.307322 -0.127322 0)
(0.401439 -0.300584 0)
(0.445559 -0.637394 0)
(0.621402 -0.0866673 0)
(0.536076 0.64639 0)
(0.437813 1.14073 0)
(0.352365 1.48259 0)
(0.265034 1.72604 0)
(0.18341 1.90435 0)
(0.113797 2.02011 0)
(0.0596427 2.07491 0)
(0.0210962 2.06313 0)
(-0.00485078 1.98524 0)
(-0.0207404 1.82744 0)
(-0.0309868 1.58051 0)
(-0.0390531 1.2153 0)
(-0.0826916 0.715014 0)
(-0.234879 0.0509411 0)
(-0.293629 -0.540227 0)
(-0.319022 -0.505434 0)
(-0.277459 -0.41568 0)
(-0.256137 -0.403005 0)
(-0.240087 -0.386342 0)
(-0.217886 -0.343873 0)
(-0.201838 -0.265492 0)
(-0.175097 -0.101457 0)
(0.0114641 -0.323066 0)
(0.0922567 -0.260571 0)
(0.0172368 -0.253152 0)
(-0.0693211 -0.327948 0)
(0.231293 -0.216704 0)
(0.162862 -0.658789 0)
(0.359636 -0.607721 0)
(0.457203 -0.101648 0)
(0.459805 0.678607 0)
(0.400395 1.21006 0)
(0.33873 1.56057 0)
(0.269068 1.80738 0)
(0.198425 1.9747 0)
(0.134031 2.08183 0)
(0.079813 2.1214 0)
(0.0368216 2.09941 0)
(0.00518602 2.0066 0)
(-0.0171419 1.84427 0)
(-0.0319404 1.59072 0)
(-0.0407439 1.23198 0)
(-0.0606047 0.74801 0)
(-0.150424 0.139894 0)
(-0.223755 -0.437839 0)
(-0.286037 -0.493983 0)
(-0.25491 -0.427788 0)
(-0.241556 -0.418561 0)
(-0.225455 -0.405232 0)
(-0.202843 -0.378381 0)
(-0.167447 -0.314501 0)
(0.0496199 -0.293763 0)
(0.0279345 -0.309373 0)
(-0.0655104 -0.277884 0)
(-0.0201671 -0.162348 0)
(-0.0456036 -0.233269 0)
(0.0142509 -0.462847 0)
(0.0557372 -0.660381 0)
(0.105006 -0.656352 0)
(0.235121 -0.191836 0)
(0.341894 0.661952 0)
(0.332638 1.23811 0)
(0.302404 1.61525 0)
(0.252651 1.86941 0)
(0.19525 2.03922 0)
(0.13611 2.1389 0)
(0.0814704 2.1723 0)
(0.0336295 2.13838 0)
(-0.00600055 2.03947 0)
(-0.0373203 1.86548 0)
(-0.062273 1.60893 0)
(-0.0814397 1.24919 0)
(-0.101248 0.770669 0)
(-0.152239 0.190041 0)
(-0.225098 -0.34682 0)
(-0.268968 -0.453118 0)
(-0.218304 -0.432698 0)
(-0.203436 -0.428709 0)
(-0.191943 -0.425453 0)
(-0.165476 -0.415692 0)
(0.00878226 -0.511761 0)
(0.0198466 -0.279758 0)
(0.0182772 -0.263241 0)
(-0.0812391 -0.172417 0)
(0.012329 -0.189362 0)
(-0.0283732 -0.250304 0)
(-0.00111433 -0.422085 0)
(-0.028046 -0.683486 0)
(-0.0349813 -0.707562 0)
(0.0642561 -0.332813 0)
(0.234647 0.594095 0)
(0.269232 1.23035 0)
(0.261407 1.64154 0)
(0.227892 1.91724 0)
(0.180533 2.09282 0)
(0.125236 2.19561 0)
(0.0698124 2.22425 0)
(0.0165749 2.18705 0)
(-0.030853 2.07879 0)
(-0.0719272 1.90028 0)
(-0.10566 1.63514 0)
(-0.131774 1.27448 0)
(-0.149522 0.789947 0)
(-0.165618 0.207025 0)
(-0.227072 -0.285071 0)
(-0.189469 -0.485886 0)
(-0.169904 -0.439396 0)
(-0.138178 -0.437423 0)
(-0.113603 -0.453917 0)
(-0.00318944 -0.596441 0)
(0.0559895 -0.498426 0)
(-0.009552 -0.270252 0)
(0.00881494 -0.27085 0)
(-0.0648915 -0.196512 0)
(0.0157092 -0.196642 0)
(-0.032111 -0.256553 0)
(-0.0180778 -0.428336 0)
(-0.0602669 -0.666402 0)
(-0.089132 -0.712151 0)
(-0.0414425 -0.481113 0)
(0.142365 0.485179 0)
(0.22248 1.19931 0)
(0.225376 1.65512 0)
(0.201612 1.95143 0)
(0.16089 2.1427 0)
(0.108016 2.24917 0)
(0.0509598 2.28142 0)
(-0.00765527 2.23969 0)
(-0.0624732 2.12886 0)
(-0.109268 1.93943 0)
(-0.145233 1.66636 0)
(-0.164563 1.29338 0)
(-0.160717 0.791978 0)
(-0.124752 0.190845 0)
(-0.106349 -0.282938 0)
(-0.0940574 -0.499318 0)
(-0.013825 -0.563229 0)
(-0.0459757 -0.45067 0)
(0.133017 -0.54497 0)
(0.12793 -0.616669 0)
(0.0519409 -0.434964 0)
(0.00652229 -0.265556 0)
(0.0213837 -0.26077 0)
(-0.06982 -0.189321 0)
(0.015048 -0.1835 0)
(-0.0202924 -0.253648 0)
(-0.0275138 -0.403828 0)
(-0.0627729 -0.630194 0)
(-0.103767 -0.696021 0)
(-0.0890536 -0.585568 0)
(0.0478119 0.322348 0)
(0.182623 1.15864 0)
(0.190398 1.65691 0)
(0.175052 1.98108 0)
(0.140346 2.18756 0)
(0.090293 2.30447 0)
(0.0306968 2.34032 0)
(-0.0336608 2.30074 0)
(-0.0951042 2.18175 0)
(-0.145891 1.9825 0)
(-0.178 1.68844 0)
(-0.180192 1.28938 0)
(-0.134537 0.750373 0)
(-0.0326303 0.122362 0)
(0.0585137 -0.339954 0)
(0.116471 -0.520985 0)
(0.168489 -0.562127 0)
(0.220106 -0.610273 0)
(0.220916 -0.616926 0)
(0.136495 -0.51148 0)
(0.0644523 -0.37563 0)
(0.0195687 -0.256939 0)
(0.0334151 -0.244826 0)
(-0.0992343 -0.178641 0)
(0.0281267 -0.149484 0)
(-0.00158147 -0.246486 0)
(-0.00735904 -0.369104 0)
(-0.0424835 -0.583509 0)
(-0.0908856 -0.672309 0)
(-0.0937304 -0.624802 0)
(-0.035384 0.130541 0)
(0.130745 1.10678 0)
(0.148954 1.64829 0)
(0.146539 1.99993 0)
(0.122339 2.22851 0)
(0.0763459 2.35879 0)
(0.0144201 2.40527 0)
(-0.0566186 2.36627 0)
(-0.12607 2.24276 0)
(-0.181707 2.02259 0)
(-0.210149 1.6994 0)
(-0.191298 1.25282 0)
(-0.0915582 0.650217 0)
(0.0702565 -0.000649829 0)
(0.184593 -0.408975 0)
(0.229837 -0.586051 0)
(0.24894 -0.6044 0)
(0.24746 -0.554998 0)
(0.207628 -0.4977 0)
(0.145467 -0.429946 0)
(0.0935412 -0.341156 0)
(0.0389092 -0.241164 0)
(0.0567075 -0.204179 0)
(-0.147958 -0.1423 0)
(0.00639448 -0.188104 0)
(-0.00221958 -0.263236 0)
(0.015274 -0.341727 0)
(-0.0100313 -0.529967 0)
(-0.0723297 -0.632782 0)
(-0.0814166 -0.618849 0)
(-0.0877532 -0.0170515 0)
(0.0609729 1.04254 0)
(0.100208 1.62424 0)
(0.119003 2.00456 0)
(0.111297 2.25855 0)
(0.07172 2.41297 0)
(0.00673592 2.47377 0)
(-0.0730659 2.44176 0)
(-0.15221 2.30868 0)
(-0.216256 2.06664 0)
(-0.243872 1.69715 0)
(-0.202658 1.18207 0)
(-0.0371328 0.487942 0)
(0.164157 -0.155395 0)
(0.262243 -0.483965 0)
(0.272585 -0.587779 0)
(0.249046 -0.600867 0)
(0.212829 -0.562195 0)
(0.184885 -0.464447 0)
(0.147448 -0.388238 0)
(0.109859 -0.302786 0)
(0.0457814 -0.221077 0)
(0.0676399 -0.157987 0)
(-0.0445855 -0.0895585 0)
(-0.0381147 -0.228858 0)
(-0.00395865 -0.302441 0)
(0.0140555 -0.358629 0)
(-0.000876933 -0.477233 0)
(-0.0597803 -0.579862 0)
(-0.0744393 -0.58844 0)
(-0.112555 -0.083349 0)
(-0.00599256 0.964999 0)
(0.0573468 1.58261 0)
(0.0972721 1.98816 0)
(0.110812 2.27743 0)
(0.0809563 2.46575 0)
(0.0126256 2.55067 0)
(-0.0768776 2.52578 0)
(-0.168434 2.38659 0)
(-0.243407 2.11273 0)
(-0.274448 1.68716 0)
(-0.201612 1.06965 0)
(0.0308654 0.26764 0)
(0.229103 -0.300153 0)
(0.285694 -0.522441 0)
(0.275643 -0.568722 0)
(0.244319 -0.561546 0)
(0.207344 -0.529306 0)
(0.182779 -0.420926 0)
(0.128678 -0.35052 0)
(0.0948331 -0.259721 0)
(0.0219208 -0.180951 0)
(0.0705847 -0.107903 0)
(0.00246721 -0.0746228 0)
(-0.00938157 -0.217847 0)
(-0.00255166 -0.30875 0)
(0.0234637 -0.374533 0)
(0.0131583 -0.450976 0)
(-0.0383229 -0.53079 0)
(-0.0575 -0.555645 0)
(-0.116548 -0.105527 0)
(-0.0396119 0.888418 0)
(0.0284372 1.52806 0)
(0.0822352 1.9483 0)
(0.117421 2.27822 0)
(0.100983 2.51513 0)
(0.0325684 2.63377 0)
(-0.0657763 2.62415 0)
(-0.169009 2.47429 0)
(-0.25566 2.16872 0)
(-0.289549 1.6712 0)
(-0.165451 0.902732 0)
(0.102538 0.0214014 0)
(0.250149 -0.41727 0)
(0.271386 -0.530822 0)
(0.256485 -0.543938 0)
(0.229197 -0.534583 0)
(0.198388 -0.496651 0)
(0.159973 -0.378765 0)
(0.11345 -0.300951 0)
(0.0801138 -0.219678 0)
(0.00915001 -0.146663 0)
(0.0928917 -0.0865916 0)
(0.0447162 -0.0898723 0)
(0.0336379 -0.234858 0)
(0.0360701 -0.315835 0)
(0.0411262 -0.367513 0)
(0.0443016 -0.425331 0)
(-0.00513358 -0.482077 0)
(-0.0171961 -0.511843 0)
(-0.104752 -0.128167 0)
(-0.0513204 0.827744 0)
(0.0061112 1.46958 0)
(0.0662262 1.89033 0)
(0.118772 2.25883 0)
(0.119454 2.55432 0)
(0.058047 2.72011 0)
(-0.0423436 2.72894 0)
(-0.150549 2.57236 0)
(-0.241789 2.22639 0)
(-0.272409 1.63633 0)
(-0.089238 0.66561 0)
(0.156994 -0.187523 0)
(0.241265 -0.471907 0)
(0.24178 -0.522152 0)
(0.22811 -0.524602 0)
(0.20903 -0.507372 0)
(0.171909 -0.449792 0)
(0.128091 -0.335754 0)
(0.0834124 -0.256786 0)
(0.0554133 -0.181104 0)
(0.0159268 -0.108694 0)
(0.0655916 -0.0315082 0)
(0.0595442 -0.150613 0)
(0.0562076 -0.249443 0)
(0.0598166 -0.31954 0)
(0.0619462 -0.367108 0)
(0.0589577 -0.406239 0)
(0.0350292 -0.438703 0)
(0.0357119 -0.448797 0)
(-0.065337 -0.119814 0)
(-0.0770589 0.795888 0)
(-0.0298714 1.41481 0)
(0.0347332 1.82265 0)
(0.10085 2.22058 0)
(0.122202 2.57856 0)
(0.0763988 2.80016 0)
(-0.0150907 2.83163 0)
(-0.115608 2.6662 0)
(-0.195973 2.2798 0)
(-0.213411 1.57906 0)
(-1.38912e-05 0.402365 0)
(0.177977 -0.334809 0)
(0.220622 -0.48755 0)
(0.212948 -0.513358 0)
(0.198042 -0.510134 0)
(0.170366 -0.475071 0)
(0.12661 -0.401854 0)
(0.0864834 -0.306466 0)
(0.0530464 -0.225091 0)
(0.0390224 -0.159681 0)
(0.0210578 -0.0851263 0)
(0.0152936 -0.026601 0)
(0.0315763 -0.186533 0)
(0.0595625 -0.26906 0)
(0.0683269 -0.326348 0)
(0.0707086 -0.36464 0)
(0.0652096 -0.395605 0)
(0.0512939 -0.415012 0)
(0.0523033 -0.405464 0)
(-0.0592293 -0.0598163 0)
(-0.156906 0.793408 0)
(-0.10393 1.36099 0)
(-0.0259931 1.74906 0)
(0.0534538 2.16508 0)
(0.0958785 2.58066 0)
(0.0734524 2.86266 0)
(0.0020633 2.92155 0)
(-0.0781502 2.745 0)
(-0.133575 2.3121 0)
(-0.130429 1.51543 0)
(0.0705472 0.183195 0)
(0.178044 -0.410568 0)
(0.199933 -0.490609 0)
(0.187549 -0.500099 0)
(0.161506 -0.482518 0)
(0.119602 -0.43651 0)
(0.0798956 -0.360916 0)
(0.0389635 -0.275617 0)
(0.0255448 -0.20105 0)
(0.0220456 -0.13727 0)
(0.013013 -0.0844718 0)
(0.00426732 -0.0206733 0)
(0.00137835 -0.192733 0)
(0.0493216 -0.306829 0)
(0.0669211 -0.337981 0)
(0.0683043 -0.361639 0)
(0.0635355 -0.385402 0)
(0.0470684 -0.392437 0)
(0.00112355 -0.339474 0)
(-0.195644 0.132805 0)
(-0.294096 0.810909 0)
(-0.218841 1.29231 0)
(-0.118331 1.66409 0)
(-0.0248142 2.09458 0)
(0.0344011 2.55926 0)
(0.0364398 2.90029 0)
(-0.00888587 2.98825 0)
(-0.0593078 2.79723 0)
(-0.082152 2.3186 0)
(-0.0429428 1.44432 0)
(0.121244 0.0188763 0)
(0.171489 -0.442923 0)
(0.174953 -0.48268 0)
(0.154165 -0.472473 0)
(0.117202 -0.444834 0)
(0.0767844 -0.394785 0)
(0.0379455 -0.322703 0)
(0.0154228 -0.245727 0)
(0.0104682 -0.191467 0)
(0.00681878 -0.143413 0)
(0.00406419 -0.085355 0)
(0.00142598 -0.0141936 0)
(-0.00352967 -0.213341 0)
(0.0352927 -0.353547 0)
(0.056623 -0.350658 0)
(0.0608319 -0.360166 0)
(0.0664786 -0.375406 0)
(0.0413392 -0.334711 0)
(-0.192294 -0.18411 0)
(-0.41702 0.272048 0)
(-0.454187 0.790393 0)
(-0.358591 1.19371 0)
(-0.235984 1.56285 0)
(-0.129134 2.01322 0)
(-0.0594142 2.51924 0)
(-0.0384077 2.91354 0)
(-0.0577707 3.02687 0)
(-0.0753528 2.81677 0)
(-0.0610534 2.29526 0)
(0.0309517 1.34202 0)
(0.159288 -0.0809813 0)
(0.160639 -0.438026 0)
(0.146294 -0.455435 0)
(0.112239 -0.44192 0)
(0.0808046 -0.405456 0)
(0.042236 -0.351908 0)
(0.0101476 -0.287583 0)
(-0.00134262 -0.236422 0)
(-0.00481787 -0.193834 0)
(-0.0068703 -0.14467 0)
(-0.00326781 -0.0849808 0)
(-0.00572765 -0.00974243 0)
(-0.00502669 -0.224983 0)
(0.0201784 -0.377854 0)
(0.0336324 -0.361418 0)
(0.0391703 -0.361861 0)
(0.064584 -0.351834 0)
(-0.0958544 -0.138257 0)
(-0.360697 0.111479 0)
(-0.531844 0.32957 0)
(-0.590763 0.722571 0)
(-0.488513 1.07234 0)
(-0.36562 1.44962 0)
(-0.252811 1.92534 0)
(-0.173847 2.47051 0)
(-0.141616 2.90773 0)
(-0.140462 3.03566 0)
(-0.12582 2.79816 0)
(-0.0699503 2.23788 0)
(0.0809573 1.2142 0)
(0.169414 -0.134083 0)
(0.134847 -0.407113 0)
(0.122561 -0.422598 0)
(0.0785711 -0.409303 0)
(0.0384716 -0.370415 0)
(0.00843599 -0.318528 0)
(-0.00752077 -0.273088 0)
(-0.0139983 -0.23366 0)
(-0.016615 -0.193612 0)
(-0.0151441 -0.146979 0)
(-0.011151 -0.0927616 0)
(-0.0194191 -0.0173314 0)
(-0.00865515 -0.227562 0)
(0.0157794 -0.388928 0)
(-0.000362684 -0.359415 0)
(-0.000444575 -0.349747 0)
(-0.0798815 -0.29237 0)
(-0.289146 0.120037 0)
(-0.420622 0.342777 0)
(-0.505613 0.469746 0)
(-0.587764 0.684285 0)
(-0.562447 0.958127 0)
(-0.479516 1.33762 0)
(-0.382079 1.83461 0)
(-0.293493 2.418 0)
(-0.249288 2.8911 0)
(-0.236923 3.02493 0)
(-0.201028 2.74241 0)
(-0.0943716 2.1296 0)
(0.112736 1.05956 0)
(0.154397 -0.149392 0)
(0.105188 -0.369218 0)
(0.0910717 -0.381359 0)
(0.0438895 -0.365729 0)
(0.0126687 -0.335308 0)
(-0.00779388 -0.300058 0)
(-0.0182384 -0.265381 0)
(-0.0224995 -0.231188 0)
(-0.0229854 -0.194207 0)
(-0.0173117 -0.150744 0)
(-0.0154041 -0.100344 0)
(-0.00904806 -0.0344516 0)
(0.0428507 -0.195638 0)
(0.00742874 -0.393842 0)
(-0.0946824 -0.334202 0)
(-0.154793 -0.29566 0)
(-0.342732 -0.118861 0)
(-0.437123 0.202857 0)
(-0.397625 0.382293 0)
(-0.39857 0.565368 0)
(-0.447905 0.727871 0)
(-0.517309 0.933684 0)
(-0.535605 1.25199 0)
(-0.488734 1.74079 0)
(-0.397359 2.35113 0)
(-0.331253 2.86302 0)
(-0.313228 3.00845 0)
(-0.268413 2.65498 0)
(-0.114475 1.95257 0)
(0.130265 0.899033 0)
(0.126514 -0.124939 0)
(0.0715058 -0.324946 0)
(0.0580821 -0.342752 0)
(0.0201333 -0.334122 0)
(-0.00259061 -0.313566 0)
(-0.0171328 -0.287499 0)
(-0.0247471 -0.259398 0)
(-0.027393 -0.229847 0)
(-0.0254301 -0.196484 0)
(-0.0218255 -0.158785 0)
(-0.0189277 -0.109439 0)
(-0.000559844 -0.0276174 0)
(0.0996 -0.295078 0)
(-0.072525 -0.233852 0)
(-0.24763 -0.172923 0)
(-0.366018 -0.100227 0)
(-0.441706 -0.00900032 0)
(-0.423146 0.105965 0)
(-0.321009 0.310019 0)
(-0.253935 0.582685 0)
(-0.27451 0.829634 0)
(-0.382453 1.0373 0)
(-0.489704 1.27243 0)
(-0.526034 1.66242 0)
(-0.457743 2.2496 0)
(-0.364954 2.8163 0)
(-0.339949 2.999 0)
(-0.303721 2.54556 0)
(-0.123638 1.70979 0)
(0.136244 0.769598 0)
(0.108541 -0.0833233 0)
(0.050257 -0.286871 0)
(0.0363398 -0.310276 0)
(0.00847387 -0.309322 0)
(-0.0100854 -0.296869 0)
(-0.0216962 -0.277612 0)
(-0.0275735 -0.254727 0)
(-0.0287833 -0.229463 0)
(-0.0263318 -0.201149 0)
(-0.0229032 -0.167332 0)
(-0.00782614 -0.122359 0)
(-0.000193687 -0.0369302 0)
(-0.0512703 -0.262318 0)
(-0.150404 -0.0899737 0)
(-0.232385 -0.0894516 0)
(-0.292808 -0.0519642 0)
(-0.330093 0.00429141 0)
(-0.28456 -0.00519539 0)
(-0.224313 0.16863 0)
(-0.148401 0.537934 0)
(-0.121288 0.915713 0)
(-0.198212 1.18922 0)
(-0.337729 1.39379 0)
(-0.45066 1.66337 0)
(-0.446219 2.13113 0)
(-0.349278 2.72543 0)
(-0.317308 3.00456 0)
(-0.30826 2.44303 0)
(-0.136098 1.44827 0)
(0.129166 0.613595 0)
(0.137872 -0.0153236 0)
(0.0481612 -0.250165 0)
(0.0267288 -0.283405 0)
(0.0050697 -0.289239 0)
(-0.0116751 -0.283056 0)
(-0.0218379 -0.269453 0)
(-0.0267245 -0.251646 0)
(-0.0273377 -0.230925 0)
(-0.0245573 -0.207149 0)
(-0.0153364 -0.177513 0)
(-0.000968604 -0.126546 0)
(0.00410047 -0.0397504 0)
(-0.105205 -0.10718 0)
(-0.13119 -0.0325372 0)
(-0.185814 -0.0260367 0)
(-0.221013 -0.00587011 0)
(-0.225094 -0.00555518 0)
(-0.155776 -0.0340685 0)
(-0.135713 0.105187 0)
(-0.107191 0.428005 0)
(-0.0394503 0.909849 0)
(-0.0345656 1.30071 0)
(-0.123053 1.57246 0)
(-0.262941 1.76434 0)
(-0.330269 2.07009 0)
(-0.289969 2.59323 0)
(-0.266662 3.03481 0)
(-0.292159 2.39378 0)
(-0.141239 1.20405 0)
(0.110591 0.424482 0)
(0.205506 0.050155 0)
(0.0640395 -0.193096 0)
(0.0237254 -0.255954 0)
(0.00605187 -0.270636 0)
(-0.00914232 -0.270687 0)
(-0.018173 -0.26268 0)
(-0.0220289 -0.249955 0)
(-0.0212659 -0.234341 0)
(-0.015291 -0.216284 0)
(-0.00241163 -0.189968 0)
(0.00535074 -0.129715 0)
(0.00627967 -0.0352865 0)
(-0.0826094 -0.0104979 0)
(-0.0719465 0.00834879 0)
(-0.143176 0.00543114 0)
(-0.166106 0.0200217 0)
(-0.122531 -0.0785835 0)
(-0.0557955 -0.0553216 0)
(-0.0330994 0.114536 0)
(-0.0753406 0.384937 0)
(-0.0316977 0.794696 0)
(0.0510015 1.29831 0)
(0.0825688 1.65261 0)
(-0.01407 1.93116 0)
(-0.118847 2.11886 0)
(-0.165227 2.51001 0)
(-0.191136 3.08147 0)
(-0.241956 2.41559 0)
(-0.0835857 0.966108 0)
(0.0893441 0.219181 0)
(0.19351 0.0795214 0)
(0.124943 -0.0805708 0)
(0.0306631 -0.219038 0)
(0.00879414 -0.251541 0)
(-0.00471435 -0.25911 0)
(-0.0127117 -0.256948 0)
(-0.015623 -0.249414 0)
(-0.0140318 -0.239071 0)
(-0.00874296 -0.224815 0)
(-0.00262621 -0.194114 0)
(0.00130271 -0.132201 0)
(0.00128291 -0.0338903 0)
(-0.0745113 0.000711221 0)
(-0.013837 0.0526842 0)
(-0.0908061 0.0326581 0)
(-0.099719 0.0179611 0)
(-0.0418937 -0.180121 0)
(0.023379 -0.103036 0)
(0.0556451 0.158875 0)
(-0.00664435 0.435979 0)
(-0.0368115 0.713255 0)
(0.0567188 1.17871 0)
(0.197206 1.64714 0)
(0.216615 2.03991 0)
(0.124711 2.25365 0)
(0.018655 2.53629 0)
(-0.063261 3.12735 0)
(-0.111107 2.46114 0)
(0.0184486 0.76531 0)
(0.0583399 0.110557 0)
(0.136503 0.0694649 0)
(0.150871 -0.0159941 0)
(0.0537645 -0.155655 0)
(0.00999146 -0.229219 0)
(-0.00246863 -0.248052 0)
(-0.00935773 -0.251926 0)
(-0.0123674 -0.248792 0)
(-0.0129264 -0.241147 0)
(-0.0129801 -0.226401 0)
(-0.0134783 -0.19529 0)
(-0.010595 -0.13603 0)
(-0.0109324 -0.0317831 0)
(-0.0737566 0.00860672 0)
(0.0536131 0.107474 0)
(-0.0283182 0.0445308 0)
(-0.0217418 0.0111456 0)
(0.0210732 -0.246154 0)
(0.0731668 -0.186049 0)
(0.129497 0.18639 0)
(0.0907508 0.545869 0)
(0.00990261 0.724972 0)
(0.0476195 1.00008 0)
(0.213155 1.50013 0)
(0.344256 2.03704 0)
(0.341127 2.40274 0)
(0.221393 2.64247 0)
(0.12205 3.16556 0)
(0.107822 2.49754 0)
(0.0608932 0.690422 0)
(0.00673637 0.0907832 0)
(0.0475938 0.0237477 0)
(0.0787386 -0.0131057 0)
(0.0909451 -0.0840812 0)
(0.015709 -0.196937 0)
(-0.00374024 -0.236814 0)
(-0.0103617 -0.247047 0)
(-0.0137811 -0.246591 0)
(-0.016497 -0.239388 0)
(-0.0197048 -0.223591 0)
(-0.0230124 -0.193773 0)
(-0.0234507 -0.143979 0)
(-0.0345422 -0.0429199 0)
(-0.0743032 -0.0411276 0)
(0.0966717 0.146069 0)
(0.0541586 0.0746355 0)
(0.0692525 -0.00520447 0)
(0.0896064 -0.276398 0)
(0.116941 -0.261804 0)
(0.182978 0.149439 0)
(0.190919 0.618389 0)
(0.100784 0.781104 0)
(0.0602871 0.918936 0)
(0.162099 1.30084 0)
(0.346334 1.92114 0)
(0.4579 2.44781 0)
(0.405593 2.79694 0)
(0.356516 3.17771 0)
(0.395701 2.54532 0)
(0.113369 0.850514 0)
(-0.0147966 0.0948988 0)
(-0.00603475 -0.00541155 0)
(0.0185757 -0.0430277 0)
(0.0404673 -0.0820728 0)
(0.0402815 -0.147476 0)
(-0.00555792 -0.219243 0)
(-0.0145029 -0.241954 0)
(-0.0174614 -0.243709 0)
(-0.0195719 -0.236451 0)
(-0.0210553 -0.220465 0)
(-0.01973 -0.192472 0)
(-0.0200282 -0.153149 0)
(-0.0202962 -0.0916855 0)
(-0.104965 -0.0573542 0)
(0.0653747 0.0797663 0)
(0.115792 0.082553 0)
(0.166666 0.00677056 0)
(0.176214 -0.280137 0)
(0.176512 -0.311493 0)
(0.224532 0.0795042 0)
(0.250615 0.681042 0)
(0.159307 0.891017 0)
(0.0765032 0.937995 0)
(0.0989602 1.15727 0)
(0.257357 1.71329 0)
(0.443148 2.35939 0)
(0.507931 2.868 0)
(0.565155 3.09992 0)
(0.656292 2.62603 0)
(0.375504 1.2692 0)
(0.0385602 0.17379 0)
(-0.0310073 -0.00661027 0)
(-0.0119274 -0.0580023 0)
(0.00237911 -0.105517 0)
(0.0167071 -0.134032 0)
(0.00894794 -0.191044 0)
(-0.0182716 -0.233292 0)
(-0.0198133 -0.24088 0)
(-0.0198285 -0.234816 0)
(-0.0181466 -0.220235 0)
(-0.0152509 -0.196357 0)
(-0.0133149 -0.15673 0)
(0.00333893 -0.0770558 0)
(-0.0617869 -0.00691018 0)
(-0.0204993 -0.0577442 0)
(0.0770484 -0.0513127 0)
(0.199688 -0.0116262 0)
(0.25797 -0.288184 0)
(0.23377 -0.328234 0)
(0.24436 0.0439813 0)
(0.252889 0.708331 0)
(0.172747 0.99308 0)
(0.0783592 0.965155 0)
(0.0422851 1.0972 0)
(0.132874 1.51 0)
(0.315932 2.17945 0)
(0.484247 2.8053 0)
(0.632526 2.9416 0)
(0.792094 2.65825 0)
(0.636259 1.6723 0)
(0.142308 0.463428 0)
(-0.0286393 0.0162007 0)
(-0.0304841 -0.0751091 0)
(-0.0140304 -0.117744 0)
(-0.00588022 -0.149607 0)
(0.00643931 -0.179601 0)
(-0.00454563 -0.219687 0)
(-0.0165561 -0.237484 0)
(-0.0146262 -0.235045 0)
(-0.0118488 -0.223064 0)
(-0.00882165 -0.201775 0)
(0.00060889 -0.169884 0)
(0.00743715 -0.0756236 0)
(-0.0199955 0.028572 0)
(-0.03976 -0.0745751 0)
(0.000164172 -0.170031 0)
(0.131538 -0.162931 0)
(0.254487 -0.356105 0)
(0.229947 -0.331279 0)
(0.21738 0.0566633 0)
(0.184906 0.697641 0)
(0.125038 1.06412 0)
(0.0358076 1.03145 0)
(-0.027946 1.08294 0)
(-0.00187999 1.38293 0)
(0.138048 1.96973 0)
(0.345905 2.63335 0)
(0.563154 2.74687 0)
(0.776117 2.54936 0)
(0.773863 1.94164 0)
(0.41983 0.953657 0)
(0.0666804 0.120586 0)
(-0.0286241 -0.0617581 0)
(-0.0181234 -0.124194 0)
(-0.014011 -0.15781 0)
(-0.00613076 -0.189688 0)
(0.00418324 -0.213342 0)
(-0.00134387 -0.235487 0)
(-0.00257679 -0.238017 0)
(0.00113194 -0.229254 0)
(0.0102663 -0.210709 0)
(0.0141187 -0.170065 0)
(0.0117901 -0.0724196 0)
(0.0137078 0.0423287 0)
(0.00408601 -0.0944452 0)
(0.021102 -0.199464 0)
(0.0738041 -0.28356 0)
(0.204676 -0.40797 0)
(0.105104 -0.379116 0)
(0.142682 0.180958 0)
(0.0512111 0.730756 0)
(-0.000467203 1.17548 0)
(-0.0519197 1.17856 0)
(-0.108654 1.12308 0)
(-0.12433 1.31809 0)
(-0.0385498 1.7897 0)
(0.150464 2.41794 0)
(0.411643 2.5021 0)
(0.651153 2.37555 0)
(0.765014 2.01246 0)
(0.601373 1.31874 0)
(0.182953 0.409201 0)
(-0.00258268 -0.022243 0)
(-0.0257386 -0.126679 0)
(-0.0117922 -0.1682 0)
(-0.00834718 -0.199095 0)
(-0.00107538 -0.22155 0)
(0.00844927 -0.233874 0)
(0.00934154 -0.241422 0)
(0.0143982 -0.23731 0)
(0.0199902 -0.218989 0)
(0.0130102 -0.163914 0)
(0.0189159 -0.0591388 0)
(0.083739 0.0341998 0)
(0.0764497 -0.116644 0)
(0.0970923 -0.224636 0)
(0.130302 -0.328264 0)
(0.218348 -0.447056 0)
(0.0878654 -0.327339 0)
(0.0619762 0.372913 0)
(-0.091217 0.886601 0)
(-0.14299 1.22526 0)
(-0.143326 1.28961 0)
(-0.181595 1.24307 0)
(-0.210237 1.30845 0)
(-0.182756 1.67021 0)
(-0.0258494 2.17849 0)
(0.252415 2.26414 0)
(0.49169 2.17156 0)
(0.663436 1.94252 0)
(0.654706 1.52995 0)
(0.387062 0.832191 0)
(0.117618 0.105134 0)
(-7.16149e-05 -0.0993692 0)
(0.0122708 -0.16155 0)
(-0.00198749 -0.201256 0)
(-0.00015038 -0.229867 0)
(0.00690947 -0.239447 0)
(0.0119851 -0.244209 0)
(0.0161444 -0.240305 0)
(0.0159042 -0.217165 0)
(0.0103795 -0.152295 0)
(0.0168752 -0.0434213 0)
(0.0947447 -0.0533706 0)
(0.141992 -0.147289 0)
(0.171656 -0.24525 0)
(0.196932 -0.346279 0)
(0.291725 -0.453109 0)
(-0.0182863 -0.186993 0)
(-0.0318193 0.520457 0)
(-0.21003 0.952828 0)
(-0.244542 1.13257 0)
(-0.227674 1.22572 0)
(-0.249862 1.28159 0)
(-0.297131 1.39689 0)
(-0.279989 1.63051 0)
(-0.132461 1.93782 0)
(0.126609 2.0106 0)
(0.344707 1.96539 0)
(0.515384 1.8186 0)
(0.588095 1.5505 0)
(0.462348 1.0784 0)
(0.170923 0.336736 0)
(0.0267194 -0.0678379 0)
(0.0223615 -0.147417 0)
(0.0185654 -0.196896 0)
(0.00648399 -0.232182 0)
(0.00787182 -0.243616 0)
(0.00698458 -0.247621 0)
(0.00860466 -0.241118 0)
(0.00542442 -0.213796 0)
(0.00698436 -0.146386 0)
(0.00626546 -0.0354586 0)
(0.0952943 -0.161018 0)
(0.167659 -0.223938 0)
(0.227233 -0.269473 0)
(0.262949 -0.354002 0)
(0.283427 -0.351647 0)
(-0.132262 -0.0223328 0)
(-0.183313 0.645244 0)
(-0.317576 1.00921 0)
(-0.327389 1.14415 0)
(-0.317431 1.19972 0)
(-0.322658 1.27629 0)
(-0.327638 1.37378 0)
(-0.289182 1.54641 0)
(-0.155349 1.72427 0)
(0.0444545 1.79931 0)
(0.236927 1.77881 0)
(0.385989 1.69479 0)
(0.479373 1.52804 0)
(0.444382 1.22808 0)
(0.25227 0.63726 0)
(0.0973595 0.001292 0)
(0.0430611 -0.120055 0)
(0.05349 -0.170603 0)
(0.0227361 -0.223766 0)
(0.010934 -0.239487 0)
(0.00198409 -0.246268 0)
(-0.00237533 -0.240125 0)
(-0.00486758 -0.210144 0)
(-0.00175454 -0.148284 0)
(-0.00296827 -0.0376112 0)
(0.137953 -0.277291 0)
(0.175223 -0.319436 0)
(0.248731 -0.298503 0)
(0.294276 -0.32692 0)
(-0.00142125 -0.167081 0)
(-0.368031 0.210271 0)
(-0.437826 0.734463 0)
(-0.477505 1.04166 0)
(-0.450816 1.14724 0)
(-0.4272 1.21139 0)
(-0.399133 1.26064 0)
(-0.365143 1.34196 0)
(-0.292229 1.44966 0)
(-0.171577 1.57491 0)
(-0.0123891 1.62655 0)
(0.153168 1.63144 0)
(0.287024 1.58065 0)
(0.38239 1.48509 0)
(0.395955 1.27273 0)
(0.286523 0.802378 0)
(0.121224 0.0950526 0)
(0.0562629 -0.0930542 0)
(0.0604707 -0.1503 0)
(0.0374284 -0.201686 0)
(0.0139519 -0.22435 0)
(-0.00136842 -0.237396 0)
(-0.0135701 -0.235166 0)
(-0.0149739 -0.20884 0)
(-0.0132404 -0.153053 0)
(-0.0101067 -0.0443967 0)
(0.079127 -0.462642 0)
(0.147547 -0.444009 0)
(0.225134 -0.342759 0)
(0.0643508 -0.14141 0)
(-0.478734 0.205531 0)
(-0.698234 0.405527 0)
(-0.728272 0.768943 0)
(-0.677579 1.01304 0)
(-0.59672 1.09947 0)
(-0.540892 1.14878 0)
(-0.487463 1.2097 0)
(-0.419932 1.2679 0)
(-0.323744 1.35112 0)
(-0.201243 1.43177 0)
(-0.0524419 1.47523 0)
(0.095051 1.48647 0)
(0.2287 1.46009 0)
(0.323415 1.41457 0)
(0.374703 1.28418 0)
(0.340279 0.91444 0)
(0.142235 0.212925 0)
(0.0710508 -0.0740675 0)
(0.0662989 -0.139715 0)
(0.0496435 -0.174021 0)
(0.0204764 -0.203109 0)
(0.00430441 -0.216836 0)
(-0.0201284 -0.223532 0)
(-0.0285612 -0.20382 0)
(-0.0278087 -0.157302 0)
(-0.0250195 -0.0541179 0)
(0.0444338 -0.401798 0)
(-0.00402436 -0.394246 0)
(-0.25331 -0.0231157 0)
(-0.645904 0.41183 0)
(-0.933969 0.504628 0)
(-0.963382 0.46933 0)
(-0.966944 0.717262 0)
(-0.861246 0.947123 0)
(-0.710825 1.02194 0)
(-0.634189 1.06986 0)
(-0.555114 1.12048 0)
(-0.469336 1.17405 0)
(-0.357183 1.23022 0)
(-0.227243 1.2896 0)
(-0.0782415 1.32223 0)
(0.0641687 1.33714 0)
(0.19467 1.33883 0)
(0.289808 1.32671 0)
(0.367943 1.24776 0)
(0.395403 0.973966 0)
(0.262906 0.413954 0)
(0.124573 -0.0350698 0)
(0.0750269 -0.126806 0)
(0.0508119 -0.160795 0)
(0.0330169 -0.182105 0)
(0.0166969 -0.196284 0)
(-0.0187298 -0.205647 0)
(-0.0385903 -0.194542 0)
(-0.0437044 -0.162279 0)
(-0.0502054 -0.102048 0)
(-0.019238 -0.437716 0)
(-0.247006 -0.135881 0)
(-0.590453 0.322882 0)
(-0.906845 0.681442 0)
(-1.0554 0.630049 0)
(-1.08807 0.454205 0)
(-1.08382 0.63232 0)
(-1.00293 0.826518 0)
(-0.841969 0.955243 0)
(-0.710418 1.00045 0)
(-0.612321 1.03996 0)
(-0.507367 1.07491 0)
(-0.383493 1.11265 0)
(-0.242461 1.15081 0)
(-0.0898834 1.17927 0)
(0.0480466 1.20361 0)
(0.167305 1.23329 0)
(0.25959 1.23557 0)
(0.341319 1.18685 0)
(0.39537 0.981908 0)
(0.321778 0.547624 0)
(0.167555 0.106384 0)
(0.110807 -0.0838967 0)
(0.0804344 -0.131112 0)
(0.0452188 -0.170848 0)
(0.00268851 -0.183823 0)
(-0.0241656 -0.184728 0)
(-0.0455494 -0.216671 0)
(-0.03685 -0.180668 0)
(-0.04175 -0.154163 0)
(-0.12257 -0.288912 0)
(-0.379704 0.128298 0)
(-0.647976 0.553813 0)
(-0.846622 0.797064 0)
(-0.9964 0.727126 0)
(-1.0702 0.510861 0)
(-1.02895 0.533478 0)
(-1.01805 0.671348 0)
(-0.908847 0.814637 0)
(-0.780261 0.899204 0)
(-0.671087 0.948621 0)
(-0.55155 0.979705 0)
(-0.413522 0.992193 0)
(-0.25756 1.01272 0)
(-0.107106 1.0449 0)
(0.0178993 1.09135 0)
(0.116606 1.14548 0)
(0.206919 1.16581 0)
(0.277541 1.13926 0)
(0.341778 0.9775 0)
(0.314119 0.638559 0)
(0.260902 0.230553 0)
(0.180997 -0.00831481 0)
(0.114788 -0.0853421 0)
(0.0515241 -0.137901 0)
(-0.0064764 -0.130866 0)
(-0.0448742 -0.116625 0)
(-0.0709281 -0.136689 0)
(-0.0460024 -0.135924 0)
(-0.0275172 -0.157914 0)
(-0.163801 -0.0248858 0)
(-0.38246 0.402004 0)
(-0.567331 0.741938 0)
(-0.677533 0.901754 0)
(-0.776789 0.841426 0)
(-0.887454 0.635816 0)
(-0.905067 0.468745 0)
(-0.922713 0.551397 0)
(-0.858294 0.673748 0)
(-0.757732 0.750311 0)
(-0.66756 0.802582 0)
(-0.556336 0.840194 0)
(-0.426079 0.833247 0)
(-0.288867 0.869244 0)
(-0.161847 0.914644 0)
(-0.0468629 0.99981 0)
(0.0367781 1.06115 0)
(0.12745 1.09995 0)
(0.19997 1.08159 0)
(0.280645 0.944863 0)
(0.291267 0.657321 0)
(0.292185 0.261691 0)
(0.195753 0.0593934 0)
(0.0791815 -0.032174 0)
(0.0614583 -0.0153767 0)
(-0.0215022 -0.0612455 0)
(-0.069219 -0.0979243 0)
(-0.0966448 -0.170256 0)
(-0.076984 -0.186041 0)
(-0.0163522 -0.198985 0)
(-0.160712 0.191455 0)
(-0.327135 0.603274 0)
(-0.445231 0.872777 0)
(-0.506488 0.971133 0)
(-0.54881 0.899111 0)
(-0.624983 0.749428 0)
(-0.713162 0.624536 0)
(-0.75208 0.575479 0)
(-0.721046 0.603692 0)
(-0.677627 0.637643 0)
(-0.607876 0.657687 0)
(-0.5134 0.665755 0)
(-0.413283 0.65378 0)
(-0.319933 0.718098 0)
(-0.215697 0.776054 0)
(-0.117552 0.90455 0)
(-0.0293596 0.95605 0)
(0.0644492 0.995891 0)
(0.151934 0.984249 0)
(0.258126 0.865975 0)
(0.307967 0.615765 0)
(0.343839 0.286454 0)
(0.237917 0.0935264 0)
(0.199921 0.0929124 0)
(0.0942083 0.0286646 0)
(0.00896446 -0.0213455 0)
(-0.0422878 -0.0721686 0)
(-0.085378 -0.164654 0)
(-0.0910646 -0.216865 0)
(-0.0763246 -0.290317 0)
(-0.134045 0.4124 0)
(-0.258375 0.750436 0)
(-0.328068 0.941684 0)
(-0.359009 1.00235 0)
(-0.379297 0.931536 0)
(-0.420179 0.79583 0)
(-0.500256 0.68764 0)
(-0.569986 0.644635 0)
(-0.58796 0.643662 0)
(-0.568769 0.649744 0)
(-0.525683 0.635948 0)
(-0.463272 0.61909 0)
(-0.401729 0.567836 0)
(-0.336533 0.606898 0)
(-0.257959 0.655075 0)
(-0.171614 0.78278 0)
(-0.0671825 0.845719 0)
(0.0358604 0.883849 0)
(0.14287 0.869282 0)
(0.258675 0.738114 0)
(0.342108 0.529305 0)
(0.357299 0.310543 0)
(0.323207 0.251492 0)
(0.254763 0.176006 0)
(0.158585 0.106646 0)
(0.0848279 0.0495632 0)
(0.00516547 -0.00549965 0)
(-0.0460849 -0.137436 0)
(-0.064009 -0.231827 0)
(-0.053496 -0.388454 0)
(-0.112192 0.570164 0)
(-0.183214 0.83197 0)
(-0.218492 0.97349 0)
(-0.226157 1.01344 0)
(-0.229834 0.951822 0)
(-0.253013 0.83927 0)
(-0.300034 0.733895 0)
(-0.352514 0.675308 0)
(-0.39099 0.654935 0)
(-0.403374 0.653807 0)
(-0.396335 0.646163 0)
(-0.372572 0.628733 0)
(-0.35342 0.594524 0)
(-0.317731 0.584176 0)
(-0.265169 0.600021 0)
(-0.191306 0.680424 0)
(-0.0830276 0.7325 0)
(0.0277076 0.766277 0)
(0.146936 0.746245 0)
(0.264716 0.635499 0)
(0.33306 0.500006 0)
(0.366651 0.383473 0)
(0.33809 0.29954 0)
(0.296078 0.223683 0)
(0.232449 0.179672 0)
(0.14368 0.142603 0)
(0.0567189 0.0569428 0)
(0.00142075 -0.103102 0)
(-0.0270368 -0.223718 0)
(-0.0320119 -0.435704 0)
(-0.071606 0.665853 0)
(-0.105474 0.876668 0)
(-0.112106 0.981858 0)
(-0.102127 1.00926 0)
(-0.0924118 0.959638 0)
(-0.102405 0.867581 0)
(-0.134142 0.773944 0)
(-0.174201 0.70614 0)
(-0.210632 0.66498 0)
(-0.232251 0.641716 0)
(-0.241563 0.623555 0)
(-0.241878 0.608837 0)
(-0.24461 0.596434 0)
(-0.240296 0.594145 0)
(-0.217117 0.59795 0)
(-0.164491 0.623429 0)
(-0.0766439 0.653038 0)
(0.0205864 0.675085 0)
(0.130867 0.665073 0)
(0.225887 0.590515 0)
(0.285614 0.489416 0)
(0.305983 0.376869 0)
(0.302462 0.296288 0)
(0.30187 0.253847 0)
(0.272116 0.248051 0)
(0.19789 0.224799 0)
(0.142777 0.140235 0)
(0.079547 -0.0504479 0)
(0.0375607 -0.203265 0)
(-0.000173249 -0.420446 0)
(-0.0264043 0.722693 0)
(-0.0289959 0.889846 0)
(-0.0130499 0.970186 0)
(0.0115767 0.990719 0)
(0.0322747 0.954187 0)
(0.0330992 0.885815 0)
(0.00588728 0.807671 0)
(-0.0292046 0.742433 0)
(-0.0645548 0.692809 0)
(-0.0917854 0.654128 0)
(-0.110529 0.620978 0)
(-0.122233 0.593798 0)
(-0.131155 0.573114 0)
(-0.134964 0.564879 0)
(-0.128724 0.566873 0)
(-0.103515 0.576902 0)
(-0.0513906 0.593361 0)
(0.0181917 0.598704 0)
(0.100035 0.578504 0)
(0.170191 0.515719 0)
(0.221334 0.425918 0)
(0.250071 0.337801 0)
(0.267706 0.27957 0)
(0.285364 0.25208 0)
(0.279527 0.263768 0)
(0.310303 0.252612 0)
(0.318163 0.203125 0)
(0.216281 0.035873 0)
(0.130475 -0.132016 0)
(0.0492099 -0.36968 0)
(0.0126667 0.720175 0)
(0.0389598 0.871807 0)
(0.0728096 0.940518 0)
(0.109194 0.96085 0)
(0.140171 0.942186 0)
(0.142392 0.896541 0)
(0.122081 0.838337 0)
(0.0893251 0.777652 0)
(0.0545563 0.726627 0)
(0.0225574 0.682043 0)
(-0.00379474 0.641702 0)
(-0.0247927 0.606361 0)
(-0.0412721 0.576318 0)
(-0.0514675 0.554159 0)
(-0.0535514 0.540276 0)
(-0.0445569 0.533601 0)
(-0.0193321 0.531507 0)
(0.0215197 0.522806 0)
(0.0746328 0.497711 0)
(0.125462 0.443896 0)
(0.169175 0.375328 0)
(0.199185 0.310932 0)
(0.218893 0.263344 0)
(0.233124 0.241431 0)
(0.228474 0.253771 0)
(0.239804 0.242532 0)
(0.242239 0.204111 0)
(0.194179 0.104783 0)
(0.132794 -0.042353 0)
(0.0548482 -0.276791 0)
(0.043855 0.674813 0)
(0.0959471 0.827193 0)
(0.147096 0.900802 0)
(0.188991 0.925837 0)
(0.218396 0.923742 0)
(0.224332 0.90204 0)
(0.21085 0.861275 0)
(0.182969 0.811919 0)
(0.148666 0.760907 0)
(0.114112 0.714387 0)
(0.0826295 0.670345 0)
(0.05488 0.630826 0)
(0.0306903 0.595675 0)
(0.011996 0.565431 0)
(0.000363196 0.540048 0)
(-0.00262859 0.519139 0)
(0.00568227 0.501237 0)
(0.0258909 0.48087 0)
(0.0557425 0.451523 0)
(0.0898437 0.401947 0)
(0.122757 0.342973 0)
(0.148822 0.288814 0)
(0.16712 0.248323 0)
(0.180869 0.23205 0)
(0.183619 0.249557 0)
(0.178398 0.25941 0)
(0.163185 0.221408 0)
(0.146784 0.142233 0)
(0.102245 0.0181189 0)
(0.0394682 -0.208638 0)
(0.0630607 0.591346 0)
(0.137684 0.763077 0)
(0.198594 0.846287 0)
(0.245611 0.888977 0)
(0.273369 0.907263 0)
(0.28214 0.904227 0)
(0.274421 0.87934 0)
(0.251588 0.840701 0)
(0.219997 0.795678 0)
(0.183904 0.74926 0)
(0.150306 0.702381 0)
(0.118079 0.660078 0)
(0.0880377 0.621585 0)
(0.0616579 0.586371 0)
(0.0407354 0.553917 0)
(0.027082 0.523928 0)
(0.0225409 0.495615 0)
(0.026685 0.466269 0)
(0.0393555 0.429371 0)
(0.059616 0.376521 0)
(0.0809113 0.319393 0)
(0.10036 0.268607 0)
(0.116669 0.231465 0)
(0.131996 0.219045 0)
(0.147106 0.241505 0)
(0.152573 0.273201 0)
(0.14313 0.239421 0)
(0.12212 0.170353 0)
(0.080326 0.0692155 0)
(0.0113262 -0.14166 0)
(0.0697088 0.488809 0)
(0.151669 0.680158 0)
(0.221241 0.786546 0)
(0.272396 0.850794 0)
(0.303173 0.888876 0)
(0.317172 0.901884 0)
(0.313315 0.891966 0)
(0.295741 0.866064 0)
(0.267624 0.82865 0)
(0.23437 0.783548 0)
(0.200485 0.736775 0)
(0.165493 0.693155 0)
(0.131601 0.652386 0)
(0.0992819 0.6138 0)
(0.0706827 0.576002 0)
(0.0480926 0.539286 0)
(0.0329106 0.502989 0)
(0.0246728 0.465755 0)
(0.0251741 0.419922 0)
(0.0339091 0.362225 0)
(0.0435592 0.304451 0)
(0.0538578 0.253621 0)
(0.0651477 0.216546 0)
(0.0795023 0.202579 0)
(0.101756 0.220296 0)
(0.127228 0.264113 0)
(0.133697 0.257364 0)
(0.111361 0.203963 0)
(0.0721553 0.147852 0)
(0.011201 -0.0885502 0)
(0.063776 0.386981 0)
(0.146338 0.594503 0)
(0.218335 0.722683 0)
(0.273051 0.80795 0)
(0.310498 0.865051 0)
(0.327304 0.894821 0)
(0.328177 0.900075 0)
(0.315675 0.886511 0)
(0.292727 0.857089 0)
(0.264088 0.815607 0)
(0.233374 0.771451 0)
(0.199206 0.729285 0)
(0.163582 0.688797 0)
(0.127829 0.648777 0)
(0.0927131 0.605768 0)
(0.0624558 0.562997 0)
(0.0384498 0.519743 0)
(0.0209522 0.474255 0)
(0.0126648 0.420067 0)
(0.0107304 0.358744 0)
(0.00949658 0.299378 0)
(0.01171 0.246299 0)
(0.0167021 0.205779 0)
(0.0272531 0.18525 0)
(0.0483366 0.192271 0)
(0.083238 0.233274 0)
(0.108801 0.267826 0)
(0.096749 0.245266 0)
(0.0719266 0.187176 0)
(0.0287103 -0.0652276 0)
(0.055181 0.294887 0)
(0.133273 0.511255 0)
(0.201161 0.657151 0)
(0.259017 0.761932 0)
(0.296134 0.836403 0)
(0.317076 0.883673 0)
(0.322276 0.903568 0)
(0.314261 0.901624 0)
(0.29664 0.88024 0)
(0.273285 0.842718 0)
(0.245414 0.802611 0)
(0.213692 0.762972 0)
(0.179295 0.723929 0)
(0.143584 0.68425 0)
(0.107367 0.641764 0)
(0.071766 0.593749 0)
(0.0410318 0.544122 0)
(0.0167189 0.490757 0)
(0.00105324 0.429677 0)
(-0.0111586 0.365735 0)
(-0.0208566 0.303526 0)
(-0.0261353 0.246626 0)
(-0.0272017 0.200969 0)
(-0.0228256 0.172384 0)
(-0.00852448 0.16747 0)
(0.0208712 0.194095 0)
(0.0590977 0.252064 0)
(0.0701923 0.26365 0)
(0.0687141 0.208058 0)
(0.0366031 -0.0126244 0)
(0.0438652 0.207842 0)
(0.120313 0.438776 0)
(0.180876 0.596567 0)
(0.231334 0.715936 0)
(0.267213 0.806627 0)
(0.289534 0.868808 0)
(0.298665 0.902903 0)
(0.295017 0.912748 0)
(0.28246 0.898585 0)
(0.264827 0.865767 0)
(0.241561 0.830482 0)
(0.213605 0.794604 0)
(0.182025 0.758098 0)
(0.148021 0.719737 0)
(0.112664 0.677592 0)
(0.0768496 0.630071 0)
(0.0420867 0.574036 0)
(0.0130834 0.513741 0)
(-0.0100254 0.448216 0)
(-0.0290776 0.380538 0)
(-0.0446706 0.31435 0)
(-0.0566072 0.25364 0)
(-0.064755 0.203012 0)
(-0.0680968 0.167194 0)
(-0.0636926 0.150444 0)
(-0.0463409 0.162899 0)
(-0.0111126 0.218525 0)
(0.0191699 0.252114 0)
(0.0418942 0.216013 0)
(0.0241131 0.031208 0)
(0.0439662 0.144099 0)
(0.0969801 0.373817 0)
(0.150037 0.54109 0)
(0.195084 0.675344 0)
(0.228098 0.778616 0)
(0.24992 0.852375 0)
(0.260988 0.898193 0)
(0.262052 0.91828 0)
(0.256093 0.911579 0)
(0.24527 0.883109 0)
(0.227064 0.853627 0)
(0.203491 0.822513 0)
(0.175536 0.789512 0)
(0.144326 0.753417 0)
(0.111019 0.712448 0)
(0.0767261 0.664861 0)
(0.0425456 0.6088 0)
(0.0103595 0.542384 0)
(-0.0172999 0.47244 0)
(-0.03973 0.400228 0)
(-0.059355 0.330622 0)
(-0.0762981 0.267048 0)
(-0.0908188 0.212997 0)
(-0.101862 0.171394 0)
(-0.107632 0.144955 0)
(-0.102594 0.145158 0)
(-0.0814114 0.18349 0)
(-0.0449536 0.217962 0)
(-0.00307968 0.190125 0)
(0.0098737 0.0461561 0)
(0.0272087 0.0814021 0)
(0.069973 0.320859 0)
(0.114568 0.494799 0)
(0.154102 0.63837 0)
(0.183904 0.75238 0)
(0.204247 0.835175 0)
(0.216507 0.890481 0)
(0.223114 0.91686 0)
(0.224783 0.915661 0)
(0.221045 0.894827 0)
(0.207081 0.871691 0)
(0.18776 0.84608 0)
(0.163697 0.817304 0)
(0.135847 0.784241 0)
(0.105411 0.745073 0)
(0.0737494 0.697922 0)
(0.0420178 0.640965 0)
(0.0108963 0.573959 0)
(-0.0173121 0.49867 0)
(-0.041698 0.42289 0)
(-0.0634578 0.350613 0)
(-0.083408 0.285103 0)
(-0.10181 0.228864 0)
(-0.117449 0.183088 0)
(-0.129223 0.149777 0)
(-0.131975 0.139206 0)
(-0.120659 0.156157 0)
(-0.0886633 0.170292 0)
(-0.0416037 0.142018 0)
(-0.00514822 0.0368111 0)
(0.0140897 0.0495343 0)
(0.0470042 0.281747 0)
(0.0835742 0.457037 0)
(0.116077 0.606169 0)
(0.141449 0.728716 0)
(0.159036 0.820138 0)
(0.17327 0.879395 0)
(0.185991 0.909292 0)
(0.195248 0.912544 0)
(0.196002 0.901131 0)
(0.185928 0.886096 0)
(0.170637 0.865288 0)
(0.150081 0.84108 0)
(0.125461 0.811499 0)
(0.0982087 0.774419 0)
(0.0699697 0.728042 0)
(0.0417705 0.670757 0)
(0.0136215 0.60266 0)
(-0.0118349 0.524198 0)
(-0.0358337 0.446067 0)
(-0.0574302 0.372074 0)
(-0.077943 0.30521 0)
(-0.0973554 0.247248 0)
(-0.114011 0.197695 0)
(-0.126359 0.158698 0)
(-0.130997 0.139033 0)
(-0.122104 0.137123 0)
(-0.0943402 0.131353 0)
(-0.0520472 0.0983514 0)
(-0.0128137 0.0109493 0)
(0.0101288 0.025691 0)
(0.0354851 0.251843 0)
(0.0639257 0.424768 0)
(0.0906426 0.576093 0)
(0.111761 0.712891 0)
(0.127224 0.804656 0)
(0.143197 0.863599 0)
(0.159818 0.895358 0)
(0.172656 0.90677 0)
(0.17504 0.906846 0)
(0.167897 0.897099 0)
(0.155371 0.882255 0)
(0.137604 0.862273 0)
(0.115581 0.835981 0)
(0.0914914 0.800523 0)
(0.0670151 0.754464 0)
(0.0428038 0.696891 0)
(0.0187159 0.627809 0)
(-0.00297179 0.54805 0)
(-0.0243858 0.468168 0)
(-0.0438865 0.392779 0)
(-0.0628229 0.324917 0)
(-0.0803958 0.265441 0)
(-0.0957088 0.212363 0)
(-0.106784 0.167312 0)
(-0.109936 0.137615 0)
(-0.101063 0.120766 0)
(-0.0777566 0.100138 0)
(-0.0442972 0.0595653 0)
(-0.0120406 -0.019531 0)
(0.00963153 0.00713996 0)
(0.030592 0.223767 0)
(0.0522588 0.397418 0)
(0.0756915 0.560256 0)
(0.0931594 0.698512 0)
(0.110276 0.791012 0)
(0.127751 0.847061 0)
(0.145813 0.879045 0)
(0.158127 0.897819 0)
(0.161532 0.907103 0)
(0.156075 0.907068 0)
(0.14534 0.896189 0)
(0.128584 0.881016 0)
(0.107696 0.858122 0)
(0.0865724 0.823202 0)
(0.0660388 0.77681 0)
(0.046084 0.718598 0)
(0.0266403 0.648522 0)
(0.00921156 0.567942 0)
(-0.00871249 0.487147 0)
(-0.0250887 0.410671 0)
(-0.0410938 0.341713 0)
(-0.0554004 0.280452 0)
(-0.0675298 0.224585 0)
(-0.0763783 0.174343 0)
(-0.0789725 0.134918 0)
(-0.0717403 0.10549 0)
(-0.054017 0.0749935 0)
(-0.0299701 0.0303383 0)
(-0.00680853 -0.040201 0)
(0.00249364 -0.0140508 0)
(0.0229315 0.202114 0)
(0.0424395 0.386968 0)
(0.0584447 0.540225 0)
(0.0789294 0.675226 0)
(0.100433 0.771664 0)
(0.120633 0.829883 0)
(0.137678 0.863364 0)
(0.148712 0.890049 0)
(0.152281 0.90763 0)
(0.149415 0.913253 0)
(0.139773 0.909904 0)
(0.123147 0.899639 0)
(0.103901 0.877928 0)
(0.085972 0.842163 0)
(0.0690811 0.795037 0)
(0.0527804 0.736654 0)
(0.0382372 0.665224 0)
(0.0248267 0.583254 0)
(0.0109083 0.502442 0)
(-0.00213034 0.42539 0)
(-0.0145889 0.355162 0)
(-0.0252632 0.291694 0)
(-0.034056 0.233241 0)
(-0.0408973 0.17977 0)
(-0.0440595 0.134046 0)
(-0.0406559 0.0952368 0)
(-0.030343 0.0568803 0)
(-0.0161061 0.0114885 0)
(-0.00238512 -0.0524705 0)
(0.00100772 -0.0238194 0)
(0.0181269 0.196418 0)
(0.0271056 0.368061 0)
(0.0428801 0.519262 0)
(0.0653023 0.650136 0)
(0.0917417 0.752768 0)
(0.112441 0.811118 0)
(0.12944 0.84933 0)
(0.140579 0.883969 0)
(0.146199 0.906447 0)
(0.145634 0.918201 0)
(0.136288 0.923183 0)
(0.121311 0.918341 0)
(0.104567 0.896479 0)
(0.0904396 0.857626 0)
(0.0765776 0.809147 0)
(0.0636195 0.750537 0)
(0.0531688 0.677899 0)
(0.0428841 0.59481 0)
(0.0327001 0.513732 0)
(0.0234591 0.436701 0)
(0.0145254 0.365175 0)
(0.00698684 0.299998 0)
(0.000449239 0.240061 0)
(-0.00544107 0.184796 0)
(-0.00976456 0.135457 0)
(-0.0106594 0.0916652 0)
(-0.00777386 0.0492543 0)
(-0.00305693 0.0020224 0)
(0.00114073 -0.0571413 0)
(0.000231735 -0.0270311 0)
(0.00164455 0.181386 0)
(0.0104431 0.354118 0)
(0.0239545 0.499671 0)
(0.0488569 0.627489 0)
(0.0743494 0.72755 0)
(0.0978945 0.790557 0)
(0.116953 0.837001 0)
(0.129071 0.873922 0)
(0.137881 0.902273 0)
(0.140413 0.922658 0)
(0.133295 0.933423 0)
(0.121931 0.931818 0)
(0.109577 0.91066 0)
(0.0985284 0.870298 0)
(0.0868316 0.820603 0)
(0.0764994 0.760877 0)
(0.0686606 0.687047 0)
(0.0612064 0.603691 0)
(0.0542009 0.521761 0)
(0.0484163 0.444025 0)
(0.0430401 0.371711 0)
(0.0377889 0.305756 0)
(0.0323317 0.24597 0)
(0.0261783 0.190485 0)
(0.0200644 0.139739 0)
(0.0151705 0.0934443 0)
(0.0119077 0.0493343 0)
(0.00919653 0.00302677 0)
(0.00526466 -0.0566648 0)
(-0.0134153 -0.0241569 0)
(-0.0157068 0.176632 0)
(-0.00928034 0.344156 0)
(0.00408692 0.485009 0)
(0.0221135 0.602319 0)
(0.0467437 0.698612 0)
(0.0725756 0.767839 0)
(0.0930494 0.821789 0)
(0.10819 0.861316 0)
(0.1204 0.89479 0)
(0.12804 0.922814 0)
(0.12762 0.94102 0)
(0.121443 0.940284 0)
(0.113878 0.920312 0)
(0.106397 0.88081 0)
(0.0975576 0.830282 0)
(0.0900451 0.768834 0)
(0.0836937 0.693802 0)
(0.0778723 0.609784 0)
(0.0737779 0.526219 0)
(0.0711218 0.448033 0)
(0.0683948 0.375821 0)
(0.0644428 0.309939 0)
(0.0590956 0.250814 0)
(0.0519365 0.197075 0)
(0.0436424 0.146797 0)
(0.0352755 0.0999462 0)
(0.02723 0.0554343 0)
(0.0190815 0.0105117 0)
(0.00956058 -0.0428331 0)
(-0.0219068 -0.00293938 0)
(-0.0317404 0.178073 0)
(-0.0289371 0.337309 0)
(-0.0194711 0.473401 0)
(-0.00706023 0.582463 0)
(0.0140731 0.674021 0)
(0.0380695 0.744536 0)
(0.0598102 0.802702 0)
(0.078525 0.846064 0)
(0.0947261 0.882597 0)
(0.107518 0.915648 0)
(0.114787 0.940596 0)
(0.116103 0.944357 0)
(0.11432 0.924479 0)
(0.111943 0.887417 0)
(0.108153 0.836559 0)
(0.103604 0.774022 0)
(0.0987413 0.698475 0)
(0.094204 0.613983 0)
(0.0917903 0.528282 0)
(0.0915874 0.448964 0)
(0.0909724 0.378496 0)
(0.0877171 0.315325 0)
(0.0813484 0.258644 0)
(0.0726425 0.204737 0)
(0.0616018 0.156108 0)
(0.0498292 0.109842 0)
(0.0380312 0.0659369 0)
(0.0257473 0.0224371 0)
(0.0130137 -0.0297202 0)
(-0.0275916 0.0275119 0)
(-0.0439044 0.189099 0)
(-0.047242 0.334755 0)
(-0.043698 0.465938 0)
(-0.0354879 0.56763 0)
(-0.0185925 0.655288 0)
(0.00169022 0.723295 0)
(0.0233039 0.781881 0)
(0.0446516 0.82699 0)
(0.064371 0.866127 0)
(0.081717 0.902519 0)
(0.0949323 0.932428 0)
(0.103082 0.943181 0)
(0.110091 0.922811 0)
(0.113398 0.887842 0)
(0.115457 0.839143 0)
(0.115317 0.777063 0)
(0.113181 0.701969 0)
(0.11186 0.616908 0)
(0.111982 0.528715 0)
(0.113389 0.448422 0)
(0.113378 0.379829 0)
(0.109859 0.320212 0)
(0.1023 0.267303 0)
(0.0905118 0.218452 0)
(0.0765737 0.168317 0)
(0.0610226 0.122851 0)
(0.0456817 0.0798413 0)
(0.0303172 0.0385175 0)
(0.0143062 -0.00857051 0)
(-0.024102 0.0638454 0)
(-0.0496801 0.205156 0)
(-0.0599962 0.339023 0)
(-0.0633496 0.462113 0)
(-0.0602296 0.557486 0)
(-0.0473638 0.638472 0)
(-0.0323266 0.703562 0)
(-0.0116163 0.760064 0)
(0.0110706 0.805387 0)
(0.0334742 0.846262 0)
(0.0546948 0.884779 0)
(0.0724794 0.918302 0)
(0.0868262 0.932299 0)
(0.102358 0.914441 0)
(0.111344 0.882079 0)
(0.118955 0.835656 0)
(0.124465 0.777524 0)
(0.127414 0.703626 0)
(0.130843 0.616459 0)
(0.134321 0.526018 0)
(0.136138 0.447629 0)
(0.135213 0.382025 0)
(0.130143 0.326395 0)
(0.120754 0.277243 0)
(0.107229 0.232145 0)
(0.0894598 0.187834 0)
(0.0711297 0.139279 0)
(0.0522165 0.0964147 0)
(0.0339856 0.056825 0)
(0.0161094 0.0116661 0)
(-0.0269857 0.099599 0)
(-0.0547818 0.225917 0)
(-0.0708588 0.34745 0)
(-0.078608 0.462069 0)
(-0.0762618 0.556917 0)
(-0.0732162 0.627201 0)
(-0.0616362 0.686649 0)
(-0.0426186 0.737964 0)
(-0.0193416 0.782282 0)
(0.00553436 0.823364 0)
(0.0304257 0.863028 0)
(0.0521736 0.898855 0)
(0.0713674 0.913813 0)
(0.0942593 0.898808 0)
(0.108095 0.869787 0)
(0.121633 0.825343 0)
(0.133386 0.770858 0)
(0.143288 0.698159 0)
(0.151573 0.611298 0)
(0.156699 0.522163 0)
(0.158179 0.44701 0)
(0.155419 0.385848 0)
(0.148254 0.334633 0)
(0.136777 0.289657 0)
(0.121354 0.247991 0)
(0.1022 0.206463 0)
(0.0804131 0.163068 0)
(0.0593765 0.116461 0)
(0.038032 0.0778941 0)
(0.0181083 0.0367574 0)
(-0.0298469 0.140506 0)
(-0.0597201 0.249935 0)
(-0.0812138 0.356732 0)
(-0.0905864 0.472089 0)
(-0.0951202 0.561212 0)
(-0.0928183 0.620712 0)
(-0.0848133 0.672363 0)
(-0.0680399 0.717374 0)
(-0.04464 0.757759 0)
(-0.0172374 0.797053 0)
(0.0110991 0.837204 0)
(0.0359601 0.873976 0)
(0.0595233 0.891466 0)
(0.0870758 0.88017 0)
(0.1071 0.852923 0)
(0.127872 0.810551 0)
(0.147337 0.756238 0)
(0.163801 0.686373 0)
(0.175335 0.60353 0)
(0.180198 0.51976 0)
(0.179537 0.448498 0)
(0.174007 0.391757 0)
(0.164318 0.344958 0)
(0.150751 0.304092 0)
(0.133733 0.265769 0)
(0.113559 0.226688 0)
(0.0905122 0.183303 0)
(0.0663229 0.138769 0)
(0.0413578 0.101788 0)
(0.0178202 0.0639122 0)
(-0.030282 0.182284 0)
(-0.0635121 0.277566 0)
(-0.0887424 0.38399 0)
(-0.105974 0.481889 0)
(-0.110896 0.560952 0)
(-0.108804 0.61954 0)
(-0.101436 0.660217 0)
(-0.0866788 0.69694 0)
(-0.0633855 0.731189 0)
(-0.0339006 0.767138 0)
(-0.00360176 0.807502 0)
(0.0232947 0.847533 0)
(0.0496979 0.866735 0)
(0.0815759 0.855356 0)
(0.111309 0.828708 0)
(0.140478 0.786889 0)
(0.166479 0.73447 0)
(0.187193 0.670374 0)
(0.200328 0.594883 0)
(0.204184 0.519015 0)
(0.200295 0.453609 0)
(0.191347 0.400887 0)
(0.178694 0.357855 0)
(0.162874 0.320374 0)
(0.14423 0.28502 0)
(0.12297 0.248969 0)
(0.0980822 0.20985 0)
(0.0720125 0.164893 0)
(0.0437443 0.128119 0)
(0.019554 0.0922511 0)
(-0.0304641 0.228076 0)
(-0.0688779 0.320035 0)
(-0.100536 0.407698 0)
(-0.117727 0.492005 0)
(-0.12258 0.562453 0)
(-0.120522 0.616401 0)
(-0.112033 0.652168 0)
(-0.0972809 0.679471 0)
(-0.0742163 0.705454 0)
(-0.0445829 0.736322 0)
(-0.0141442 0.780379 0)
(0.012951 0.822931 0)
(0.0418501 0.838583 0)
(0.0805953 0.820413 0)
(0.120046 0.793109 0)
(0.156055 0.755908 0)
(0.18608 0.709648 0)
(0.208596 0.652967 0)
(0.221811 0.586703 0)
(0.224476 0.520449 0)
(0.218203 0.461948 0)
(0.206336 0.413286 0)
(0.190968 0.373344 0)
(0.172971 0.338558 0)
(0.152693 0.305575 0)
(0.130202 0.27187 0)
(0.104702 0.235759 0)
(0.0754139 0.197579 0)
(0.0458743 0.156816 0)
(0.0194321 0.122213 0)
(-0.0323687 0.277386 0)
(-0.0731234 0.356973 0)
(-0.103999 0.431048 0)
(-0.120974 0.503794 0)
(-0.125132 0.56467 0)
(-0.121946 0.610938 0)
(-0.113085 0.64325 0)
(-0.0967424 0.662781 0)
(-0.0734858 0.680759 0)
(-0.045324 0.708601 0)
(-0.0179495 0.755353 0)
(0.0105019 0.79502 0)
(0.043946 0.803364 0)
(0.0848133 0.780512 0)
(0.129675 0.75078 0)
(0.16932 0.721738 0)
(0.201312 0.683605 0)
(0.224094 0.635245 0)
(0.236416 0.579424 0)
(0.237874 0.523287 0)
(0.230345 0.4721 0)
(0.216874 0.42798 0)
(0.199736 0.39094 0)
(0.180153 0.358466 0)
(0.158597 0.32753 0)
(0.13507 0.296069 0)
(0.108917 0.262866 0)
(0.0790918 0.22771 0)
(0.0478886 0.187355 0)
(0.015931 0.150055 0)
(-0.0302937 0.324837 0)
(-0.0684822 0.394581 0)
(-0.0963144 0.454721 0)
(-0.112097 0.514469 0)
(-0.115938 0.56633 0)
(-0.110379 0.604968 0)
(-0.098269 0.630033 0)
(-0.0796269 0.643167 0)
(-0.0582987 0.656959 0)
(-0.0355376 0.683897 0)
(-0.0109208 0.727752 0)
(0.021143 0.761259 0)
(0.0586902 0.76508 0)
(0.098426 0.738452 0)
(0.139185 0.708827 0)
(0.1784 0.684029 0)
(0.209422 0.655947 0)
(0.231066 0.617881 0)
(0.242206 0.573058 0)
(0.242974 0.526936 0)
(0.235289 0.483027 0)
(0.221549 0.443721 0)
(0.203854 0.409737 0)
(0.183606 0.379412 0)
(0.161458 0.350343 0)
(0.137455 0.32096 0)
(0.111155 0.290387 0)
(0.0820595 0.258337 0)
(0.0497699 0.223944 0)
(0.0214281 0.18227 0)
(-0.0257978 0.367743 0)
(-0.057704 0.427779 0)
(-0.0811363 0.475926 0)
(-0.0933848 0.522666 0)
(-0.094444 0.56398 0)
(-0.0858018 0.594647 0)
(-0.0706485 0.614243 0)
(-0.0528393 0.624714 0)
(-0.0355586 0.637696 0)
(-0.0173657 0.66284 0)
(0.0060153 0.699141 0)
(0.0408031 0.72522 0)
(0.0806141 0.725743 0)
(0.117582 0.701905 0)
(0.149384 0.673918 0)
(0.183265 0.647951 0)
(0.209664 0.629175 0)
(0.229178 0.601844 0)
(0.239475 0.567481 0)
(0.240383 0.53019 0)
(0.233356 0.493485 0)
(0.220386 0.45931 0)
(0.203219 0.428625 0)
(0.183267 0.400523 0)
(0.161292 0.373309 0)
(0.137432 0.345875 0)
(0.111426 0.317641 0)
(0.0830968 0.288181 0)
(0.0518503 0.255575 0)
(0.022291 0.214516 0)
(-0.020529 0.402637 0)
(-0.045172 0.4542 0)
(-0.0629551 0.492102 0)
(-0.070969 0.527542 0)
(-0.0688784 0.558416 0)
(-0.0582348 0.582039 0)
(-0.0432459 0.598057 0)
(-0.0275446 0.608147 0)
(-0.0123858 0.621307 0)
(0.00410875 0.643095 0)
(0.0276378 0.669493 0)
(0.0620806 0.687256 0)
(0.0995619 0.687611 0)
(0.132403 0.670815 0)
(0.158361 0.64702 0)
(0.185192 0.622601 0)
(0.205217 0.60778 0)
(0.221414 0.588097 0)
(0.230554 0.562214 0)
(0.231773 0.532922 0)
(0.225918 0.502841 0)
(0.21437 0.473777 0)
(0.198537 0.446641 0)
(0.179669 0.420989 0)
(0.158515 0.395787 0)
(0.135286 0.370326 0)
(0.10988 0.344355 0)
(0.0822849 0.317708 0)
(0.0518286 0.288914 0)
(0.0220029 0.249236 0)
(-0.0158077 0.429382 0)
(-0.0336411 0.473631 0)
(-0.0458577 0.502935 0)
(-0.0501377 0.529096 0)
(-0.0463896 0.551796 0)
(-0.0362855 0.569921 0)
(-0.0228472 0.583488 0)
(-0.00854495 0.59378 0)
(0.00619304 0.605954 0)
(0.0229789 0.623053 0)
(0.0464151 0.641249 0)
(0.0780843 0.653291 0)
(0.110899 0.654364 0)
(0.139457 0.643241 0)
(0.161461 0.624452 0)
(0.183473 0.603509 0)
(0.198126 0.59128 0)
(0.210707 0.576821 0)
(0.218267 0.557568 0)
(0.21953 0.534956 0)
(0.214796 0.510815 0)
(0.204888 0.486583 0)
(0.190818 0.463112 0)
(0.173554 0.440196 0)
(0.153701 0.41729 0)
(0.131496 0.393997 0)
(0.106954 0.370354 0)
(0.080119 0.346416 0)
(0.0504775 0.320929 0)
(0.0177332 0.286099 0)
(-0.0120911 0.449116 0)
(-0.0243374 0.487071 0)
(-0.0322356 0.509611 0)
(-0.0340138 0.528802 0)
(-0.0298819 0.545333 0)
(-0.0210487 0.559113 0)
(-0.00927321 0.570429 0)
(0.0039132 0.580164 0)
(0.0186535 0.590363 0)
(0.0358389 0.602872 0)
(0.0582351 0.615358 0)
(0.0865284 0.623903 0)
(0.114721 0.62578 0)
(0.139514 0.61877 0)
(0.158439 0.605049 0)
(0.177252 0.588191 0)
(0.188306 0.578475 0)
(0.197966 0.567874 0)
(0.203998 0.553678 0)
(0.205142 0.536448 0)
(0.201354 0.517384 0)
(0.193059 0.497604 0)
(0.180901 0.477707 0)
(0.165516 0.457739 0)
(0.14731 0.43742 0)
(0.126516 0.416528 0)
(0.103244 0.395301 0)
(0.0777803 0.374088 0)
(0.0497667 0.351671 0)
(0.0244426 0.313565 0)
(-0.00947099 0.463425 0)
(-0.0176798 0.496011 0)
(-0.0223934 0.513328 0)
(-0.0226586 0.527378 0)
(-0.0186338 0.539463 0)
(-0.0110012 0.549813 0)
(-0.000627624 0.558671 0)
(0.0117314 0.566515 0)
(0.026103 0.574347 0)
(0.0429727 0.582966 0)
(0.0635333 0.591481 0)
(0.0882933 0.598043 0)
(0.112306 0.600929 0)
(0.133786 0.597301 0)
(0.150143 0.58824 0)
(0.166791 0.575568 0)
(0.175659 0.56832 0)
(0.183358 0.560721 0)
(0.188266 0.550393 0)
(0.189316 0.537458 0)
(0.186343 0.522696 0)
(0.179539 0.506812 0)
(0.169259 0.490314 0)
(0.155851 0.473369 0)
(0.139532 0.45584 0)
(0.120467 0.437557 0)
(0.098722 0.418782 0)
(0.0746518 0.399979 0)
(0.0483877 0.380428 0)
(0.0211172 0.353877 0)
(-0.00758507 0.473947 0)
(-0.0131808 0.501851 0)
(-0.015774 0.515216 0)
(-0.0150799 0.525439 0)
(-0.0111921 0.534063 0)
(-0.00441565 0.541435 0)
(0.00485043 0.547816 0)
(0.0162268 0.553481 0)
(0.029628 0.558974 0)
(0.0452985 0.56456 0)
(0.0634528 0.570365 0)
(0.0844394 0.575858 0)
(0.104701 0.579561 0)
(0.123298 0.578535 0)
(0.137609 0.573294 0)
(0.152838 0.564575 0)
(0.160516 0.559852 0)
(0.16706 0.554727 0)
(0.171284 0.547519 0)
(0.172355 0.538081 0)
(0.170109 0.52684 0)
(0.164623 0.514321 0)
(0.156076 0.500947 0)
(0.144633 0.486924 0)
(0.130369 0.472231 0)
(0.11336 0.456756 0)
(0.0935649 0.440652 0)
(0.0710731 0.424502 0)
(0.046084 0.407701 0)
(0.0190594 0.380818 0)
(-0.00569267 0.482602 0)
(-0.00982717 0.505892 0)
(-0.0113497 0.515973 0)
(-0.0102171 0.523253 0)
(-0.0065718 0.529145 0)
(-0.000538911 0.534005 0)
(0.00766647 0.538099 0)
(0.0177799 0.541666 0)
(0.0296554 0.545092 0)
(0.0432726 0.548587 0)
(0.0587217 0.55256 0)
(0.0760683 0.557286 0)
(0.0930867 0.561329 0)
(0.109227 0.562053 0)
(0.122005 0.559617 0)
(0.136265 0.554467 0)
(0.143347 0.552186 0)
(0.149287 0.549373 0)
(0.153162 0.544779 0)
(0.154358 0.538211 0)
(0.152756 0.529924 0)
(0.14839 0.520299 0)
(0.141374 0.509679 0)
(0.13182 0.498317 0)
(0.119732 0.486307 0)
(0.105016 0.473634 0)
(0.0877272 0.460379 0)
(0.067369 0.447281 0)
(0.0442593 0.434347 0)
(0.0187407 0.414039 0)
(-0.0036057 0.488037 0)
(-0.00713947 0.508867 0)
(-0.00842264 0.516295 0)
(-0.00736746 0.52112 0)
(-0.00423113 0.524725 0)
(0.000938725 0.527477 0)
(0.00796218 0.529626 0)
(0.0165751 0.531423 0)
(0.0266056 0.533177 0)
(0.0378979 0.535158 0)
(0.0504927 0.537923 0)
(0.0644789 0.541926 0)
(0.0788357 0.545747 0)
(0.092872 0.547431 0)
(0.104498 0.546886 0)
(0.117935 0.544911 0)
(0.124669 0.544936 0)
(0.130276 0.544274 0)
(0.133987 0.541985 0)
(0.135353 0.537883 0)
(0.134301 0.532112 0)
(0.13086 0.524954 0)
(0.125154 0.516689 0)
(0.117325 0.507588 0)
(0.10741 0.4979 0)
(0.0953059 0.487757 0)
(0.0806528 0.477521 0)
(0.063099 0.467639 0)
(0.0419217 0.458535 0)
(0.0172226 0.439885 0)
(-0.00258818 0.492641 0)
(-0.00540738 0.511498 0)
(-0.00677209 0.51671 0)
(-0.00619315 0.51944 0)
(-0.00383037 0.521077 0)
(0.000268894 0.522032 0)
(0.00594135 0.522526 0)
(0.0129228 0.522886 0)
(0.0210077 0.523392 0)
(0.0300591 0.524274 0)
(0.0400654 0.526087 0)
(0.0512064 0.529187 0)
(0.0632451 0.53239 0)
(0.0754992 0.534301 0)
(0.0860331 0.535023 0)
(0.0985829 0.535857 0)
(0.104987 0.538028 0)
(0.110323 0.539369 0)
(0.113925 0.539142 0)
(0.115459 0.537179 0)
(0.114882 0.533575 0)
(0.112232 0.528513 0)
(0.107658 0.522213 0)
(0.101375 0.514933 0)
(0.0935197 0.507022 0)
(0.0839633 0.498903 0)
(0.072511 0.491374 0)
(0.0579403 0.485352 0)
(0.0393236 0.480843 0)
(0.0177002 0.468135 0)
(-0.0017747 0.496405 0)
(-0.00439907 0.514057 0)
(-0.0061256 0.517566 0)
(-0.00633867 0.518523 0)
(-0.00497088 0.518453 0)
(-0.00212469 0.517847 0)
(0.00206269 0.516969 0)
(0.00737125 0.516143 0)
(0.0135943 0.515657 0)
(0.0206314 0.515718 0)
(0.0284825 0.516693 0)
(0.0373665 0.518728 0)
(0.0474014 0.520999 0)
(0.0579712 0.522673 0)
(0.0673173 0.524174 0)
(0.078784 0.527458 0)
(0.084738 0.531566 0)
(0.0897567 0.534714 0)
(0.0932535 0.536305 0)
(0.0949605 0.536197 0)
(0.094845 0.534461 0)
(0.0929596 0.531177 0)
(0.0894734 0.526463 0)
(0.0846772 0.520559 0)
(0.0787874 0.51389 0)
(0.0715204 0.507369 0)
(0.0623891 0.502276 0)
(0.0513914 0.499717 0)
(0.0353455 0.500121 0)
(0.0165851 0.49362 0)
(-0.00121864 0.498801 0)
(-0.00397453 0.516648 0)
(-0.00629027 0.518997 0)
(-0.0074074 0.51854 0)
(-0.00721836 0.517012 0)
(-0.00570222 0.515038 0)
(-0.00302555 0.512987 0)
(0.000644833 0.51116 0)
(0.00516465 0.509803 0)
(0.010464 0.509108 0)
(0.0165753 0.509268 0)
(0.0236979 0.510237 0)
(0.0319776 0.511493 0)
(0.0408927 0.51269 0)
(0.0488966 0.514631 0)
(0.0589635 0.519992 0)
(0.064283 0.525748 0)
(0.0689172 0.530418 0)
(0.0723302 0.533534 0)
(0.0742666 0.535013 0)
(0.0746771 0.534867 0)
(0.0735989 0.533056 0)
(0.0712199 0.529562 0)
(0.0678824 0.52467 0)
(0.0637714 0.518953 0)
(0.0585511 0.513755 0)
(0.0516916 0.51068 0)
(0.042384 0.511552 0)
(0.0303202 0.515983 0)
(0.0140512 0.514537 0)
(-0.00131651 0.501029 0)
(-0.00433312 0.519555 0)
(-0.00729343 0.521233 0)
(-0.00924505 0.519589 0)
(-0.0101352 0.516785 0)
(-0.00991791 0.513624 0)
(-0.00868288 0.510524 0)
(-0.00653716 0.507785 0)
(-0.00355159 0.505606 0)
(0.000255616 0.504123 0)
(0.00492991 0.503421 0)
(0.0105977 0.503395 0)
(0.0173159 0.503732 0)
(0.0246003 0.504439 0)
(0.0311204 0.506661 0)
(0.0394571 0.513687 0)
(0.0439755 0.520715 0)
(0.0481648 0.526545 0)
(0.0515206 0.530835 0)
(0.0537791 0.533578 0)
(0.0548549 0.534769 0)
(0.0547094 0.534155 0)
(0.0534637 0.531552 0)
(0.0515231 0.527372 0)
(0.0490044 0.522443 0)
(0.0455726 0.518368 0)
(0.0406642 0.517103 0)
(0.0340234 0.520465 0)
(0.0244097 0.528771 0)
(0.0117254 0.532044 0)
(-0.00203655 0.503817 0)
(-0.00537359 0.522893 0)
(-0.00879932 0.524037 0)
(-0.01146 0.521512 0)
(-0.0133047 0.517687 0)
(-0.0142704 0.513515 0)
(-0.0143522 0.50948 0)
(-0.0135888 0.505865 0)
(-0.0119822 0.502839 0)
(-0.00950779 0.500511 0)
(-0.00610994 0.498911 0)
(-0.00174943 0.49797 0)
(0.00351 0.497561 0)
(0.00917883 0.497916 0)
(0.0141288 0.500386 0)
(0.020545 0.50864 0)
(0.0241781 0.516472 0)
(0.0278844 0.523029 0)
(0.0311735 0.528106 0)
(0.0337946 0.531747 0)
(0.0355995 0.533947 0)
(0.0366242 0.534153 0)
(0.0365302 0.532331 0)
(0.0358854 0.528706 0)
(0.0348448 0.524455 0)
(0.0330942 0.521358 0)
(0.0300279 0.521716 0)
(0.0251911 0.527288 0)
(0.0180971 0.53863 0)
(0.00826655 0.546224 0)
(-0.0031116 0.507725 0)
(-0.00673369 0.526635 0)
(-0.0105377 0.527306 0)
(-0.013781 0.524127 0)
(-0.0164434 0.519554 0)
(-0.0184228 0.514561 0)
(-0.0196642 0.509701 0)
(-0.0201296 0.505243 0)
(-0.0197787 0.501358 0)
(-0.0185411 0.498132 0)
(-0.0163576 0.495623 0)
(-0.013251 0.493848 0)
(-0.0093955 0.492879 0)
(-0.00532753 0.493087 0)
(-0.00198969 0.495825 0)
(0.00246077 0.504836 0)
(0.00520216 0.512999 0)
(0.00842655 0.519801 0)
(0.0116055 0.525251 0)
(0.0145018 0.529382 0)
(0.0169727 0.532174 0)
(0.0187741 0.533404 0)
(0.0203958 0.531618 0)
(0.0208193 0.528606 0)
(0.0209685 0.525007 0)
(0.0208331 0.522741 0)
(0.0196725 0.52461 0)
(0.0167893 0.532299 0)
(0.0118574 0.546056 0)
(0.00355832 0.555047 0)
(-0.00379221 0.513042 0)
(-0.00788168 0.530846 0)
(-0.0121925 0.531019 0)
(-0.0159997 0.527351 0)
(-0.019377 0.522219 0)
(-0.0222245 0.516589 0)
(-0.0244699 0.511018 0)
(-0.026029 0.505794 0)
(-0.0268192 0.501057 0)
(-0.0267388 0.496921 0)
(-0.0257364 0.493511 0)
(-0.023855 0.49098 0)
(-0.0213412 0.48961 0)
(-0.0188167 0.489894 0)
(-0.0171397 0.492974 0)
(-0.0145723 0.502219 0)
(-0.0126293 0.510208 0)
(-0.00987633 0.516826 0)
(-0.00682467 0.52229 0)
(-0.00375389 0.526595 0)
(-0.000787896 0.529623 0)
(0.00194978 0.531166 0)
(0.00408112 0.530823 0)
(0.00625688 0.526921 0)
(0.00727288 0.524029 0)
(0.00840854 0.522318 0)
(0.00910572 0.525472 0)
(0.00842612 0.535223 0)
(0.00629022 0.55075 0)
(0.000869236 0.559883 0)
(-0.00397913 0.517476 0)
(-0.00886273 0.535308 0)
(-0.0136804 0.535142 0)
(-0.0180628 0.531121 0)
(-0.0220976 0.525578 0)
(-0.025715 0.519463 0)
(-0.0288368 0.513291 0)
(-0.031358 0.507358 0)
(-0.0331492 0.501816 0)
(-0.0341242 0.496814 0)
(-0.0342432 0.492539 0)
(-0.0335454 0.489309 0)
(-0.0323158 0.487653 0)
(-0.031218 0.488195 0)
(-0.0311552 0.491744 0)
(-0.0302621 0.500757 0)
(-0.0289748 0.508 0)
(-0.026645 0.514092 0)
(-0.0237795 0.519289 0)
(-0.0206637 0.52351 0)
(-0.0174112 0.526531 0)
(-0.0140764 0.528095 0)
(-0.0109371 0.527983 0)
(-0.00860614 0.52609 0)
(-0.00576033 0.521678 0)
(-0.0039025 0.519966 0)
(-0.00161133 0.524134 0)
(-0.000160714 0.53535 0)
(0.000863459 0.552441 0)
(-0.00186514 0.561186 0)
(-0.00500549 0.525016 0)
(-0.00958016 0.540483 0)
(-0.0150232 0.539745 0)
(-0.0200393 0.535423 0)
(-0.02474 0.529572 0)
(-0.029066 0.52307 0)
(-0.0329468 0.516389 0)
(-0.0362691 0.509793 0)
(-0.0389125 0.503508 0)
(-0.0408152 0.497716 0)
(-0.0419527 0.492662 0)
(-0.0423925 0.488827 0)
(-0.0424558 0.486999 0)
(-0.0428086 0.488077 0)
(-0.0439173 0.492599 0)
(-0.044186 0.500206 0)
(-0.0434841 0.506308 0)
(-0.0416029 0.51167 0)
(-0.0390588 0.516389 0)
(-0.0360663 0.520308 0)
(-0.0327448 0.523106 0)
(-0.0291367 0.524497 0)
(-0.0253957 0.524355 0)
(-0.0220958 0.522875 0)
(-0.0193638 0.520872 0)
(-0.0153441 0.516714 0)
(-0.01232 0.520909 0)
(-0.00906365 0.532695 0)
(-0.00546968 0.550387 0)
(-0.000839516 0.560429 0)
(-0.00297801 0.529056 0)
(-0.00988242 0.545901 0)
(-0.0163044 0.544976 0)
(-0.0221351 0.540343 0)
(-0.0275494 0.534171 0)
(-0.032532 0.527303 0)
(-0.0370426 0.520147 0)
(-0.0410021 0.512952 0)
(-0.0443329 0.505993 0)
(-0.0469929 0.499502 0)
(-0.0489858 0.493795 0)
(-0.0504525 0.489485 0)
(-0.0518483 0.4875 0)
(-0.0538509 0.488652 0)
(-0.0552539 0.494447 0)
(-0.0564792 0.499974 0)
(-0.0561467 0.505085 0)
(-0.0547811 0.509663 0)
(-0.052664 0.513752 0)
(-0.0499406 0.517181 0)
(-0.0467323 0.519578 0)
(-0.0430893 0.520641 0)
(-0.0391189 0.520299 0)
(-0.0351201 0.518708 0)
(-0.031648 0.516169 0)
(-0.0266764 0.511233 0)
(-0.0232819 0.515879 0)
(-0.0184938 0.52725 0)
(-0.0128917 0.543125 0)
(-0.00228572 0.555963 0)
(-0.00547329 0.536488 0)
(-0.0109534 0.551775 0)
(-0.0184418 0.550813 0)
(-0.0249102 0.54589 0)
(-0.0309007 0.539316 0)
(-0.0363981 0.532028 0)
(-0.0413728 0.524393 0)
(-0.0457984 0.516647 0)
(-0.0496416 0.509085 0)
(-0.0528826 0.50199 0)
(-0.0555606 0.49576 0)
(-0.0579388 0.491133 0)
(-0.0605856 0.4893 0)
(-0.0630428 0.492058 0)
(-0.0657413 0.495864 0)
(-0.0671039 0.500261 0)
(-0.0671723 0.50439 0)
(-0.0663004 0.508125 0)
(-0.064629 0.511484 0)
(-0.062258 0.514288 0)
(-0.0592696 0.516137 0)
(-0.055729 0.516727 0)
(-0.0517334 0.51604 0)
(-0.0474255 0.514218 0)
(-0.0432041 0.51155 0)
(-0.0397225 0.509097 0)
(-0.033897 0.50951 0)
(-0.0275326 0.518902 0)
(-0.018611 0.532537 0)
(-0.00547368 0.544591 0)
(-0.0063768 0.543768 0)
(-0.0137071 0.559578 0)
(-0.0214928 0.557056 0)
(-0.0286056 0.551735 0)
(-0.0349735 0.544796 0)
(-0.0407555 0.537052 0)
(-0.0460008 0.528933 0)
(-0.0507376 0.520684 0)
(-0.0549712 0.512602 0)
(-0.0586992 0.505013 0)
(-0.0620082 0.498392 0)
(-0.0652967 0.493702 0)
(-0.0684176 0.493112 0)
(-0.0720503 0.494697 0)
(-0.0747819 0.497654 0)
(-0.0762353 0.500953 0)
(-0.0766074 0.504107 0)
(-0.0761058 0.507012 0)
(-0.0748245 0.509621 0)
(-0.0728149 0.511718 0)
(-0.070116 0.512907 0)
(-0.066789 0.512908 0)
(-0.06293 0.511733 0)
(-0.0586301 0.509536 0)
(-0.054071 0.506538 0)
(-0.0497066 0.50359 0)
(-0.0449127 0.503652 0)
(-0.035428 0.507859 0)
(-0.0246417 0.519861 0)
(-0.0100527 0.532387 0)
(-0.00660927 0.553705 0)
(-0.0162157 0.567788 0)
(-0.0253952 0.564526 0)
(-0.0328966 0.557696 0)
(-0.0395127 0.550209 0)
(-0.045351 0.5421 0)
(-0.0506946 0.533598 0)
(-0.0556448 0.52496 0)
(-0.0602358 0.516496 0)
(-0.0644514 0.508549 0)
(-0.0684299 0.501748 0)
(-0.0722813 0.497515 0)
(-0.0762727 0.496433 0)
(-0.0797172 0.497617 0)
(-0.0821826 0.499561 0)
(-0.0835919 0.501806 0)
(-0.0841008 0.504072 0)
(-0.083846 0.506227 0)
(-0.0828789 0.508119 0)
(-0.0812094 0.509496 0)
(-0.0788505 0.509993 0)
(-0.0758603 0.509368 0)
(-0.072312 0.50762 0)
(-0.0682652 0.504919 0)
(-0.0637403 0.501475 0)
(-0.0588098 0.497786 0)
(-0.0530854 0.49556 0)
(-0.0448855 0.496974 0)
(-0.0304253 0.503541 0)
(-0.0133402 0.509074 0)
(-0.00875593 0.56155 0)
(-0.0208374 0.575784 0)
(-0.0302192 0.571583 0)
(-0.0377241 0.564058 0)
(-0.0440623 0.555603 0)
(-0.0497408 0.54716 0)
(-0.0550246 0.538464 0)
(-0.0600762 0.52967 0)
(-0.0649746 0.521027 0)
(-0.0695853 0.512921 0)
(-0.0741512 0.506001 0)
(-0.0785 0.501603 0)
(-0.0824042 0.500125 0)
(-0.0851046 0.500543 0)
(-0.0871784 0.501415 0)
(-0.0884833 0.502776 0)
(-0.089081 0.504287 0)
(-0.0890181 0.505724 0)
(-0.0883102 0.506906 0)
(-0.0869503 0.507567 0)
(-0.084959 0.507383 0)
(-0.0823962 0.506133 0)
(-0.0793235 0.503795 0)
(-0.0757564 0.500495 0)
(-0.0716315 0.496402 0)
(-0.0668095 0.491775 0)
(-0.0607533 0.487227 0)
(-0.0517111 0.483393 0)
(-0.0388911 0.487726 0)
(-0.018895 0.490883 0)
(-0.0139108 0.588443 0)
(-0.0262831 0.591872 0)
(-0.0348014 0.581838 0)
(-0.0419197 0.572184 0)
(-0.0477088 0.562933 0)
(-0.0531332 0.55411 0)
(-0.0582314 0.545209 0)
(-0.0631584 0.536283 0)
(-0.0679729 0.527509 0)
(-0.0726773 0.51899 0)
(-0.0773397 0.512243 0)
(-0.0818582 0.506895 0)
(-0.0856928 0.504006 0)
(-0.0872805 0.503263 0)
(-0.0893226 0.50338 0)
(-0.0906525 0.503983 0)
(-0.0913399 0.504676 0)
(-0.0914146 0.505282 0)
(-0.0908741 0.50563 0)
(-0.0897233 0.505474 0)
(-0.0880058 0.504524 0)
(-0.0857894 0.502571 0)
(-0.0831207 0.499544 0)
(-0.0799953 0.495474 0)
(-0.0762985 0.49036 0)
(-0.0719119 0.484099 0)
(-0.0657688 0.476708 0)
(-0.05798 0.46876 0)
(-0.0464385 0.458715 0)
(-0.0239063 0.434906 0)
)
;
boundaryField
{
inlet
{
type calculated;
value nonuniform List<vector>
30
(
(0 0.25 0)
(0 0.25 0)
(0 0.25 0)
(0 0.25 0)
(0 0.25 0)
(0 0.25 0)
(0 0.25 0)
(0 0.25 0)
(0 0.25 0)
(0 0.25 0)
(0 0.25 0)
(0 0.25 0)
(0 0.25 0)
(0 0.25 0)
(0 0.25 0)
(0 0.25 0)
(0 0.25 0)
(0 0.25 0)
(0 0.25 0)
(0 0.25 0)
(0 0.25 0)
(0 0.25 0)
(0 0.25 0)
(0 0.25 0)
(0 0.25 0)
(0 0.25 0)
(0 0.25 0)
(0 0.25 0)
(0 0.25 0)
(0 0.25 0)
)
;
}
outlet
{
type calculated;
value nonuniform List<vector>
30
(
(-0.0139129 0.588455 0)
(-0.0262924 0.591884 0)
(-0.0348094 0.581854 0)
(-0.041918 0.5722 0)
(-0.0477077 0.562949 0)
(-0.0531305 0.554124 0)
(-0.0582281 0.545221 0)
(-0.0631547 0.536295 0)
(-0.0679688 0.527522 0)
(-0.0726709 0.519012 0)
(-0.0773286 0.51225 0)
(-0.0818445 0.506898 0)
(-0.0856732 0.504003 0)
(-0.0872864 0.503256 0)
(-0.0893243 0.503374 0)
(-0.0906526 0.503977 0)
(-0.0913393 0.50467 0)
(-0.0914133 0.505276 0)
(-0.0908723 0.505623 0)
(-0.0897208 0.505466 0)
(-0.0880026 0.504516 0)
(-0.0857855 0.502564 0)
(-0.083116 0.499537 0)
(-0.0799894 0.495468 0)
(-0.0762913 0.490356 0)
(-0.0719021 0.484099 0)
(-0.0657616 0.476717 0)
(-0.0579772 0.468775 0)
(-0.046437 0.458728 0)
(-0.023905 0.434914 0)
)
;
}
walls
{
type calculated;
value uniform (0 0 0);
}
frontAndBackPlanes
{
type empty;
}
}
// ************************************************************************* //
| [
"mizuha.watanabe@gmail.com"
] | mizuha.watanabe@gmail.com | |
a008e40623e1b390aeec1b2016fd25a693f2e2fa | 516d0f7bf5f0c79d67e24c8778b783d9000c4bf1 | /arduino/samd/libraries/phyphox-arduino/examples/randomNumbers-IoT/randomNumbersIoT.ino | 3f5f20c593c102278ed612bde5ef05ee3ea31e1e | [
"Apache-2.0",
"LGPL-3.0-only",
"GPL-3.0-only"
] | permissive | sensebox/senseBoxMCU-core | b068eee39517d21840cf4ffe00b6f83f48344ea1 | 92c4244a94debf3b5e6c78b6acfd2d9530db8d8e | refs/heads/master | 2023-03-09T03:28:32.245820 | 2022-03-08T10:03:01 | 2022-03-08T10:03:01 | 137,878,137 | 2 | 9 | Apache-2.0 | 2023-03-04T03:03:14 | 2018-06-19T10:45:14 | C++ | UTF-8 | C++ | false | false | 487 | ino | #include <phyphoxBle.h>
void setup() {
PhyphoxBLE::start(); //Start the BLE server
}
void loop() {
float randomNumber = random(0,100); //Generate random number in the range 0 to 100
PhyphoxBLE::write(randomNumber); //Send value to phyphox
delay(50); //Shortly pause before repeating
PhyphoxBLE::poll(); //IMPORTANT: In contrast to other devices, poll() needs to be called periodically on the 33 IoT
}
| [
"noreply@github.com"
] | sensebox.noreply@github.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.