blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 3 264 | content_id stringlengths 40 40 | detected_licenses listlengths 0 85 | license_type stringclasses 2
values | repo_name stringlengths 5 140 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringclasses 905
values | visit_date timestamp[us]date 2015-08-09 11:21:18 2023-09-06 10:45:07 | revision_date timestamp[us]date 1997-09-14 05:04:47 2023-09-17 19:19:19 | committer_date timestamp[us]date 1997-09-14 05:04:47 2023-09-06 06:22:19 | github_id int64 3.89k 681M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 22
values | gha_event_created_at timestamp[us]date 2012-06-07 00:51:45 2023-09-14 21:58:39 ⌀ | gha_created_at timestamp[us]date 2008-03-27 23:40:48 2023-08-21 23:17:38 ⌀ | gha_language stringclasses 141
values | src_encoding stringclasses 34
values | language stringclasses 1
value | is_vendor bool 1
class | is_generated bool 2
classes | length_bytes int64 3 10.4M | extension stringclasses 115
values | content stringlengths 3 10.4M | authors listlengths 1 1 | author_id stringlengths 0 158 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
dd47071bb23fc2d46cface7690a9367b17b3f192 | a6f4e599fef44d76789b88431a67c0940e01c212 | /srs_ecc_plugin/src/core/Symmetric_algorithm.cpp | 227a1579b179e89b22e9f3fab51e17c490c7fa0c | [
"MIT"
] | permissive | wsasocket/study | 2ec86c3768ee4e4a3bc9ac79ea43c8a2c0fe5be4 | 306bd2d9a7de10247a6452e49b7096c803f33e40 | refs/heads/master | 2021-01-21T12:59:18.993639 | 2016-04-13T05:21:57 | 2016-04-13T05:21:57 | 55,141,261 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,284 | cpp | /*
* Symmetric_algorithm.cpp
*
* Created on: 2016年4月12日
* Author: james
*/
#include "Symmetric_algorithm.hpp"
Symmetric_algorithm::Symmetric_algorithm()
{
// TODO Auto-generated constructor stub
sysmmetric_id = -1;
}
Symmetric_algorithm::~Symmetric_algorithm()
{
// TODO Auto-generated destructor stub
}
int Symmetric_algorithm::init_symmetric_algorithm(SYMMETRIC_ALG_ID oid)
{
sysmmetric_id = oid;
return get_sysmmetric_block_size();
}
int Symmetric_algorithm::get_sysmmetric_block_size()
{
//TODO aes block size if change modify return value
return sysmmetric_id == -1 ? -1 : 16;
}
int Symmetric_algorithm::encrypt(uint8_t *key, uint8_t *iv, uint8_t *in, uint32_t in_length, uint8_t *out)
{
if(sysmmetric_id == -1)
return ALGORITHM_NOT_INITILIZE;
switch (sysmmetric_id)
{
case SM_4_CBC:
//TODO add sm4
break;
case AES_128_CBC:
aes_encrypt(in, out, in_length, key, iv);
break;
default:
return ALGORITHM_NOT_DEFINE;
break;
}
return get_sysmmetric_block_size();
}
int Symmetric_algorithm::decrypt(uint8_t *key, uint8_t *iv, uint8_t *in, uint32_t in_length, uint8_t *out)
{
if(sysmmetric_id == -1)
return ALGORITHM_NOT_INITILIZE;
switch (sysmmetric_id)
{
case SM_4_CBC:
//TODO add sm4
break;
case AES_128_CBC:
aes_decrypt(in, out, in_length, key, iv);
break;
default:
return ALGORITHM_NOT_DEFINE;
break;
}
return get_sysmmetric_block_size();
}
int Symmetric_algorithm::aes_encrypt(uint8_t *in, uint8_t *out, size_t length, uint8_t *key, uint8_t *ivec)
{
AES_KEY encrypt_key;
if(AES_set_encrypt_key(key, 128, &encrypt_key) != 0)
return ALGORITHM_KEY_ERROR;
AES_cbc_encrypt(in, out, length, &encrypt_key, ivec, AES_ENCRYPT);
return length;
}
int Symmetric_algorithm::aes_decrypt(uint8_t *in, uint8_t *out, size_t length, uint8_t *key, uint8_t *ivec)
{
AES_KEY decrypt_key;
if(AES_set_decrypt_key(key, 128, &decrypt_key) != 0)
return ALGORITHM_KEY_ERROR;
AES_cbc_encrypt(in, out, length, &decrypt_key, ivec, AES_DECRYPT);
return length;
}
| [
"zouyemign@bravovcloud.com"
] | zouyemign@bravovcloud.com |
252283f506b2350db671acdc21c54e1c1dcf8f54 | af0ff623a11e5ad2c2e02b49ceeeb5d608e70bc4 | /02_ip_filter/split.h | cb169c8969475aaf1cf6d0585f7ce255a3c61b4d | [] | no_license | slonegd-cpp/otus-cpp | 2b73792b1ad60479df78d075fbf33a8fdb6854ac | 2782ac751651ea78795f0ee1cc97797a36fcfe26 | refs/heads/master | 2020-12-02T04:06:27.999009 | 2019-01-08T05:40:30 | 2019-01-08T05:40:30 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 596 | h | #pragma once
#include <vector>
#include <string>
// ("", '.') -> [""]
// ("11", '.') -> ["11"]
// ("..", '.') -> ["", "", ""]
// ("11.", '.') -> ["11", ""]
// (".11", '.') -> ["", "11"]
// ("11.22", '.') -> ["11", "22"]
auto split(const std::string &str, char d)
{
std::vector<std::string> r;
auto stop = str.find_first_of(d);
decltype(stop) start = 0;
while(stop != std::string::npos)
{
r.push_back(str.substr(start, stop - start));
start = stop + 1;
stop = str.find_first_of(d, start);
}
r.push_back(str.substr(start));
return r;
} | [
"slonkdv@mail.ru"
] | slonkdv@mail.ru |
a29a8211656b68e142f9aa4509fb0dec0ea2d950 | 908729fb4ffe24490141191447704970c2e86b3a | /src/Node.h | 0116d68648b031968085af1a33cdfc18b4a50073 | [] | no_license | ain2108/gcore | 62702b5a1be5fb50f9d9895a1132ed381ea3237f | e9b2335ff3f07df2bcea1d57c0c041dcd1c5e814 | refs/heads/master | 2021-01-20T04:02:58.745169 | 2019-03-31T21:54:45 | 2019-03-31T21:54:45 | 89,631,045 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,923 | h | #ifndef NODE_H
#define NODE_H
template <typename IdType, typename WeightType, typename DataType>
//requires Comparable<IdType> && Numeric<WeightType>
class Edge;
/*! The Node class represents a Node. Create Nodes by calling the appropriate creating funtion.
After Nodes are created, one has to add them to the graph object (track them if you will). */
template <typename IdType, typename DataType>
//requires Comparable<IdType>
class Node{
private:
/*! This id is seen by a Graph as unique. If the user tries to add two different instances of
Node with the same id to a graph, an exception will be caused */
IdType id;
/*! A pointer to the user owned object associated with this node */
DataType* data;
public:
using id_type = IdType;
using data_type = DataType;
Node(IdType id, DataType* data){
//cout << id << " created\n";
this->id = id;
this->data = data;
}
/* We want to enforce existance of these objects in singular form,
if somebody tries to copy them, we shall not let them do so!*/
Node(Node<IdType, DataType> const&) = delete;
void operator=(Node<IdType, DataType> const&) = delete;
/* We can add other bookeeping field here to boost
performace of some algorithms */
/*! Function returns the id of a Node */
inline IdType get_id() const {
return this->id;
}
/*! Function returns the pointer to the object associated with the given node */
inline DataType* get_data(){
return this->data;
}
/*! Sets a pointer to a user owned object associated with the data */
inline void set_data(DataType * data){
this->data = data;
}
inline bool operator==(const Node& rhs){
return (this->id==rhs.id);
}
inline void print_node() const {
cout << get_id();
}
inline static shared_ptr<Node<IdType, DataType>> create_node(IdType id, DataType* data){
shared_ptr<Node<IdType, DataType>> p = make_shared<Node<IdType, DataType>>(id, data);
return p;
}
};
#endif
| [
"ain.jesape@gmail.com"
] | ain.jesape@gmail.com |
5b38defa0662fe0b7becc0efbfc06f741005a442 | 393aa0b9f22501f5e1972730efbbae6f6e0d34ba | /Juego/codigo/iIntUnidad.cpp | 9e9f7ec475be097af207d5def1b456a557243b44 | [] | no_license | riseven/JRK | 5c18d7bfcf2482e2ef6ed2515a64b3e7c4b32c10 | a91da8270cc2dde33c91611a92e64c1bb143794e | refs/heads/master | 2021-01-10T18:26:35.998045 | 2012-10-09T14:49:02 | 2012-10-09T14:49:02 | 5,834,089 | 1 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 2,302 | cpp | #include "iIntUnidad.h"
#include "rProtocolo.h"
#include "iUnidadUniSeleccionable.h"
#include "gApi.h"
#include "iApi.h"
#include "iUnidad.h"
#include "eExcepcionLocalizada.h"
#include <string>
#include "iBarracones.h"
namespace Interfaz {
IntUnidad::IntUnidad()
{
try
{
posX = 315;
posY = 615;
imgUnidad = -1;
btnUnidad = -1;
onClick = false ;
imgFrente = Graficos::Api::CrearImagen("Graficos\\FrenteUnidad.bmp");
Graficos::Api::SetImagenMasked(imgFrente,true);
btnUnidad = Graficos::Api::CrearBoton(imgFrente, imgFrente, 0, "", posX, posY, 3);
Graficos::Api::OnClickBoton( btnUnidad, &onClick);
Graficos::Api::DesactivarBoton( btnUnidad );
}
catch ( Error::Excepcion &ex )
{
throw Error::ExcepcionLocalizada("Interfaz::IntUnidad::IntUnidad()").Combinar(ex);
}
}
IntUnidad::~IntUnidad()
{
if(imgUnidad != -1)
Graficos::Api::DestruirImagen( imgUnidad );
if(btnUnidad != -1)
Graficos::Api::DestruirBoton( btnUnidad );
Graficos::Api::DestruirImagen( imgFrente );
}
void
IntUnidad::CambiarImagenUnidad(UnidadSeleccionable *unidad)
{
try
{
string strImagen = unidad->GetPathRecursos() + "preview.bmp";
cout<<"->"<<strImagen<<"<-"<<endl;
if(imgUnidad != -1)
Graficos::Api::DestruirImagen(imgUnidad);
imgUnidad = Graficos::Api::CrearImagen( strImagen );
Graficos::Api::CambiarFondoBoton(btnUnidad, imgUnidad);
Graficos::Api::ActivarBoton(btnUnidad);
ultUnidad = unidad;
}
catch ( Error::Excepcion &ex )
{
throw Error::ExcepcionLocalizada("Interfaz::IntUnidad::CambiarImagenUnidad()").Combinar(ex);
}
}
void
IntUnidad::Activar()
{
if(btnUnidad != -1)
Graficos::Api::ActivarBoton(btnUnidad);
}
void
IntUnidad::Desactivar()
{
if(btnUnidad != -1)
Graficos::Api::DesactivarBoton(btnUnidad);
}
void
IntUnidad::Actualizar()
{
if( onClick )
{
float px, py, pz;
ultUnidad->GetPos(px, py, pz);
ultUnidad->Seleccionar();
Api::GetJuego()->GetCamara()->SetPosicionDeseada(px / Graficos::Api::GetEscalaTerreno(), pz / Graficos::Api::GetEscalaTerreno());
Api::GetJuego()->GetCamara()->ForzarPosicion();
}
}
}
| [
"riseven@riseven.com"
] | riseven@riseven.com |
d3d1aa5bfe6aaf73a267fba00d3286d115439f32 | 88ae8695987ada722184307301e221e1ba3cc2fa | /third_party/pdfium/xfa/fxfa/layout/cxfa_contentlayoutitem.cpp | 9eacf72fa3f4a4502c8bae3bcd6c679cae733dd1 | [
"BSD-3-Clause",
"Apache-2.0",
"LGPL-2.0-or-later",
"MIT",
"GPL-1.0-or-later"
] | permissive | iridium-browser/iridium-browser | 71d9c5ff76e014e6900b825f67389ab0ccd01329 | 5ee297f53dc7f8e70183031cff62f37b0f19d25f | refs/heads/master | 2023-08-03T16:44:16.844552 | 2023-07-20T15:17:00 | 2023-07-23T16:09:30 | 220,016,632 | 341 | 40 | BSD-3-Clause | 2021-08-13T13:54:45 | 2019-11-06T14:32:31 | null | UTF-8 | C++ | false | false | 3,447 | cpp | // Copyright 2016 The PDFium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
#include "xfa/fxfa/layout/cxfa_contentlayoutitem.h"
#include "fxjs/xfa/cjx_object.h"
#include "third_party/base/check_op.h"
#include "xfa/fxfa/cxfa_ffwidget.h"
#include "xfa/fxfa/parser/cxfa_margin.h"
#include "xfa/fxfa/parser/cxfa_node.h"
CXFA_ContentLayoutItem::CXFA_ContentLayoutItem(CXFA_Node* pNode,
CXFA_FFWidget* pWidget)
: CXFA_LayoutItem(pNode, kContentItem), m_pFFWidget(pWidget) {
if (m_pFFWidget)
m_pFFWidget->SetLayoutItem(this);
}
CXFA_ContentLayoutItem::~CXFA_ContentLayoutItem() = default;
void CXFA_ContentLayoutItem::Trace(cppgc::Visitor* visitor) const {
CXFA_LayoutItem::Trace(visitor);
visitor->Trace(m_pPrev);
visitor->Trace(m_pNext);
visitor->Trace(m_pFFWidget);
}
CXFA_ContentLayoutItem* CXFA_ContentLayoutItem::GetFirst() {
CXFA_ContentLayoutItem* pCurNode = this;
while (auto* pPrev = pCurNode->GetPrev())
pCurNode = pPrev;
return pCurNode;
}
CXFA_ContentLayoutItem* CXFA_ContentLayoutItem::GetLast() {
CXFA_ContentLayoutItem* pCurNode = this;
while (auto* pNext = pCurNode->GetNext())
pCurNode = pNext;
return pCurNode;
}
void CXFA_ContentLayoutItem::InsertAfter(CXFA_ContentLayoutItem* pItem) {
CHECK_NE(this, pItem);
pItem->RemoveSelf();
pItem->m_pNext = m_pNext;
pItem->m_pPrev = this;
m_pNext = pItem;
if (pItem->m_pNext)
pItem->m_pNext->m_pPrev = pItem;
}
void CXFA_ContentLayoutItem::RemoveSelf() {
if (m_pNext)
m_pNext->m_pPrev = m_pPrev;
if (m_pPrev)
m_pPrev->m_pNext = m_pNext;
}
CFX_RectF CXFA_ContentLayoutItem::GetRelativeRect() const {
return CFX_RectF(m_sPos, m_sSize);
}
CFX_RectF CXFA_ContentLayoutItem::GetAbsoluteRect() const {
CFX_PointF sPos = m_sPos;
CFX_SizeF sSize = m_sSize;
for (CXFA_LayoutItem* pLayoutItem = GetParent(); pLayoutItem;
pLayoutItem = pLayoutItem->GetParent()) {
if (CXFA_ContentLayoutItem* pContent = pLayoutItem->AsContentLayoutItem()) {
sPos += pContent->m_sPos;
CXFA_Margin* pMarginNode =
pContent->GetFormNode()->GetFirstChildByClass<CXFA_Margin>(
XFA_Element::Margin);
if (pMarginNode) {
sPos += CFX_PointF(pMarginNode->JSObject()->GetMeasureInUnit(
XFA_Attribute::LeftInset, XFA_Unit::Pt),
pMarginNode->JSObject()->GetMeasureInUnit(
XFA_Attribute::TopInset, XFA_Unit::Pt));
}
continue;
}
if (pLayoutItem->GetFormNode()->GetElementType() ==
XFA_Element::ContentArea) {
sPos +=
CFX_PointF(pLayoutItem->GetFormNode()->JSObject()->GetMeasureInUnit(
XFA_Attribute::X, XFA_Unit::Pt),
pLayoutItem->GetFormNode()->JSObject()->GetMeasureInUnit(
XFA_Attribute::Y, XFA_Unit::Pt));
break;
}
if (pLayoutItem->GetFormNode()->GetElementType() == XFA_Element::PageArea)
break;
}
return CFX_RectF(sPos, sSize);
}
size_t CXFA_ContentLayoutItem::GetIndex() const {
size_t szIndex = 0;
const CXFA_ContentLayoutItem* pCurNode = this;
while (auto* pPrev = pCurNode->GetPrev()) {
pCurNode = pPrev;
++szIndex;
}
return szIndex;
}
| [
"jengelh@inai.de"
] | jengelh@inai.de |
38f1c86caf90dac57aaddd417dcb893a3d427abc | 8ebbf0a38833406609da81e94d2200b0dcfa3721 | /CPPClient/Net/proto/func/ReceiveProto.h | f22f35c33facd191c7909bcc90035b5d66ff45d3 | [] | no_license | lrsxnn/CPPTest | 59e3ea07076a3aa025615f84b46186116d86adfd | 9b796780ccb4dc87ee262d6fd25b3c52c980aca6 | refs/heads/master | 2022-11-29T06:09:57.188095 | 2020-07-28T02:41:59 | 2020-07-28T02:41:59 | 283,073,311 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 910 | h | #pragma once
#ifndef _RECEIVE_PROTO_FUNC_H
#define _RECEIVE_PROTO_FUNC_H
#include "../pb/srvRes.pb.h"
#include "../cmd/ReceiveProto.h"
using namespace std;
namespace CPPClient
{
namespace Net
{
namespace Func
{
class ReceiveProto : public CPPClient::Net::Cmd::ReceiveProto
{
protected:
void SrvEnterRoom(lspb::SrvEnterRoom msg, lspb::Result result, string errStr);
void SrvInitOver(lspb::SrvInitOver msg, lspb::Result result, string errStr);
void BGameInit(lspb::BGameInit msg, lspb::Result result, string errStr);
void BGameStart(lspb::BGameStart msg, lspb::Result result, string errStr);
void BGameFrame(lspb::BGameFrame msg, lspb::Result result, string errStr);
};
} // namespace Func
} // namespace Net
} // namespace CPPClient
#endif | [
"lrs-1@163.com"
] | lrs-1@163.com |
6685bacfdcc60487ed8069da91d8fa0964987072 | 72aa531d89acb617ef7b5c01cf0a6e4ea330fcc7 | /ios/nexus-mobile-library.framework/Headers/LLP/types/time.h | c5d0fa0a4a990548e34ef4de07d01ddb09b10ead | [
"MIT"
] | permissive | liuzhenLz/nexus-mobile | d4306a5e2f9b8f15a96b28d88007bb573dfb383b | e917e8da60a67383fd7b84848a15e3b3bbe1a055 | refs/heads/master | 2023-08-29T20:21:29.358115 | 2021-09-21T18:47:30 | 2021-09-21T18:47:30 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,046 | h | /*__________________________________________________________________________________________
(c) Hash(BEGIN(Satoshi[2010]), END(Sunny[2012])) == Videlicet[2014] ++
(c) Copyright The Nexus Developers 2014 - 2021
Distributed under the MIT software license, see the accompanying
file COPYING or http://www.opensource.org/licenses/mit-license.php.
"ad vocem populi" - To the Voice of the People
____________________________________________________________________________________________*/
#pragma once
#ifndef NEXUS_LLP_TYPES_TIME_H
#define NEXUS_LLP_TYPES_TIME_H
#include <LLP/templates/connection.h>
#include <Util/templates/containers.h>
namespace LLP
{
class TimeNode : public Connection
{
enum
{
/** DATA PACKETS **/
TIME_DATA = 0,
ADDRESS_DATA = 1,
TIME_OFFSET = 2,
/** DATA REQUESTS **/
GET_OFFSET = 64,
/** REQUEST PACKETS **/
GET_TIME = 129,
GET_ADDRESS = 130,
/** GENERIC **/
PING = 253,
CLOSE = 254
};
/** Store the samples in a majority object. */
CMajority<int32_t> nSamples;
/** Keep track of our sent requests for time data. This gives us protection against unsolicted TIME_DATA messages. **/
std::atomic<int32_t> nRequests;
public:
/** Name
*
* Returns a string for the name of this type of Node.
*
**/
static std::string Name() { return "Time"; }
/** Constructor **/
TimeNode();
/** Constructor **/
TimeNode(Socket SOCKET_IN, DDOS_Filter* DDOS_IN, bool fDDOSIn = false);
/** Constructor **/
TimeNode(DDOS_Filter* DDOS_IN, bool fDDOSIn = false);
/* Virtual destructor. */
virtual ~TimeNode();
/** Event
*
* Virtual Functions to Determine Behavior of Message LLP.
*
* @param[in] EVENT The byte header of the event type.
* @param[in[ LENGTH The size of bytes read on packet read events.
*
*/
void Event(uint8_t EVENT, uint32_t LENGTH = 0);
/** ProcessPacket
*
* Main message handler once a packet is recieved.
*
* @return True is no errors, false otherwise.
*
**/
bool ProcessPacket();
/** GetSample
*
* Get a time sample from the time server.
*
**/
void GetSample();
/** GetOffset
*
* Get the current time offset from the unified majority.
*
**/
static int32_t GetOffset();
/** AdjustmentThread
*
* This thread is responsible for unified time offset adjustments. This will be deleted on post v8 updates.
*
**/
static void AdjustmentThread();
};
}
#endif
| [
"Kendal.Cormany@nexus.io"
] | Kendal.Cormany@nexus.io |
b3bba9e83a9b302be27d18ca3320df981ace1c14 | dafdc8972ab552810dadaf8b6db2329a171569b0 | /ex4/Worker.cpp | 0b8a393020816a6ee5475d525b8ba33f4c4ec93c | [] | no_license | Lecseruz/Prepare-Kurs | 39d9410ff8dadd8d4e6b556291b1418d8c05542d | 59af6581932017ca8e1f2a2d768596369ce20cd4 | refs/heads/master | 2023-01-18T17:49:50.836840 | 2018-06-10T11:45:22 | 2018-06-10T11:45:22 | 55,969,984 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,195 | cpp | //
// Created by magomed on 04.04.16.
//
#include "Worker.h"
#include "array.h"
#include <iostream>
using namespace std;
Worker::Worker() { }
Worker::~Worker() { }
Worker::Worker(const Worker &tmp):
surname_(tmp.surname_),
initials_(tmp.initials_),
work_(tmp.work_),
year_(tmp.year_),
salary_(tmp.salary_)
{}
void Worker::set_surname(const Array &surname) {
surname_ = surname;
}
void Worker::set_initials(const Array &initials) {
initials_ = initials;
}
void Worker::set_work(const Array &word) {
work_ = word;
}
void Worker::set_year(unsigned int value) {
year_ = value;
}
void Worker::set_salary(unsigned int value) {
salary_ = value;
}
Array Worker::get_surname() const {
return surname_;
}
Array Worker::get_initials() const {
return initials_;
}
Array Worker::get_work() const {
return work_;
}
int Worker::get_year() const {
return year_;
}
int Worker::get_salary() const {
return salary_;
}
void Worker::show() const {
surname_.print();
cout << " ";
initials_.print();
cout << " ";
work_.print();
cout << " ";
cout << year_ << " ";
cout << salary_ << "\n";
}
| [
"magomedalievic@gmail.com"
] | magomedalievic@gmail.com |
6e2a4f247556a11bb72cc7084e6ec2939c3008e5 | 52fdd3496c2fddbcdad4865e0b6093d697a81e0d | /primes_benchmark.cpp | 549330f8b519e6032e3239781db3ee7e68896ea8 | [
"Zlib"
] | permissive | curtisseizert/libdivide | cb031eaa0b4de54eb9bd537fb6da5d123104901d | dc00301c8667d1b590d63a8cb176393acf2ef3d9 | refs/heads/master | 2021-01-18T21:39:29.395138 | 2016-08-23T20:23:46 | 2016-08-23T20:23:46 | 71,793,619 | 1 | 0 | null | 2016-10-24T13:47:44 | 2016-10-24T13:47:43 | null | UTF-8 | C++ | false | false | 6,248 | cpp | #include <functional>
#include <iostream>
#include <chrono>
#include <deque>
#include <vector>
#include <cstring>
#include "libdivide.h"
#if __GNUC__
#define NOINLINE __attribute__((__noinline__))
#else
#define NOINLINE
#endif
template<typename T, int ALGO>
struct prime_divider_t {
T value;
libdivide::divider<T, ALGO> divider;
prime_divider_t(T v) : value(v), divider(v) {}
};
template<typename T, int ALGO> NOINLINE
size_t count_primes_libdivide(T max)
{
std::vector<prime_divider_t<T, ALGO> > primes;
primes.push_back(2);
for (T i=3; i < max; i+=2) {
bool is_prime = true;
for (const auto &prime : primes) {
T quotient = i / prime.divider;
T remainder = i - quotient * prime.value;
if (remainder == 0) {
is_prime = false;
break;
}
}
if (is_prime) {
primes.push_back(i);
}
}
return primes.size();
}
template<typename T> NOINLINE
size_t count_primes_system(T max)
{
std::vector<T> primes;
primes.push_back(2);
for (T i=3; i < max; i+=2) {
bool is_prime = true;
for (const auto &prime : primes) {
if (i % prime == 0) {
is_prime = false;
break;
}
}
if (is_prime) {
primes.push_back(i);
}
}
return primes.size();
}
template<typename Ret, typename... Args>
std::pair<double, Ret> time_function(std::function<Ret(Args...)> func, Args... args) {
using namespace std::chrono;
high_resolution_clock::time_point t1 = high_resolution_clock::now();
size_t result = func(args...);
high_resolution_clock::time_point t2 = high_resolution_clock::now();
duration<double> time_span = duration_cast<duration<double>>(t2 - t1);
return std::make_pair(time_span.count(), result);
}
struct prime_calculation_result_t {
double duration;
size_t result;
};
template<typename T, size_t Func(T)>
prime_calculation_result_t measure_1_prime_calculation(T max, size_t iters) {
double best = std::numeric_limits<double>::max();
size_t result = -1;
while (iters--) {
double time;
std::tie(time, result) = time_function(std::function<size_t(T)>(Func), max);
best = std::min(time, best);
}
return {best, result};
}
enum {
TEST_U32 = 1 << 0,
TEST_U64 = 1 << 1,
TEST_S32 = 1 << 2,
TEST_S64 = 1 << 3,
TEST_ALL_TYPES = (TEST_U32 | TEST_U64 | TEST_S32 | TEST_S64),
TEST_SYSTEM = 1 << 4,
TEST_BRANCHFREE = 1 << 5,
TEST_BRANCHFULL = 1 << 6,
TEST_ALL_ALGOS = (TEST_SYSTEM | TEST_BRANCHFREE | TEST_BRANCHFULL),
};
typedef unsigned int tasks_t;
template<typename T>
void measure_times(tasks_t tasks, T max, size_t iters) {
bool test_system = !! (tasks & TEST_SYSTEM);
bool test_branchfull = !! (tasks & TEST_BRANCHFULL);
bool test_branchfree = !! (tasks & TEST_BRANCHFREE);
prime_calculation_result_t sys, branchfull, branchfree;
if (test_system) {
sys = measure_1_prime_calculation<T, count_primes_system<T>>(max, iters);
std::cout << '.' << std::flush;
}
if (test_branchfull) {
branchfull = measure_1_prime_calculation<T, count_primes_libdivide<T, libdivide::BRANCHFULL>>(max, iters);
std::cout << '.' << std::flush;
}
if (test_branchfree) {
branchfree = measure_1_prime_calculation<T, count_primes_libdivide<T, libdivide::BRANCHFREE>>(max, iters);
std::cout << '.' << std::endl;
}
if (test_system && test_branchfull && branchfull.result != sys.result) {
std::cerr << "Disagreement in branchfull path for type " << typeid(T).name() << ": libdivide says " << branchfull.result << " but system says " << sys.result << std::endl;
}
if (test_system && test_branchfree && branchfree.result != sys.result) {
std::cerr << "Disagreement in branchfree path for type " << typeid(T).name() << ": libdivide says " << branchfree.result << " but system says " << sys.result << std::endl;
}
if (test_system) std::cout << "\t system: " << sys.duration << " seconds" << std::endl;
if (test_branchfull) std::cout << "\tbranchfull: " << branchfull.duration << " seconds" << std::endl;
if (test_branchfree) std::cout << "\tbranchfree: " << branchfree.duration << " seconds" << std::endl;
}
static void usage() {
std::cout << "Usage: primes [u32] [u64] [s32] [s64] [branchfree] [branchfull] [sys|system]" << std::endl;
}
int main(int argc, const char *argv[]) {
tasks_t tasks = 0;
// parse argv
for (size_t i=1; argv[i]; i++) {
const char * arg = argv[i];
if (! strcmp(arg, "u32")) {
tasks |= TEST_U32;
} else if (! strcmp(arg, "u64")) {
tasks |= TEST_U64;
} else if (! strcmp(arg, "s32")) {
tasks |= TEST_S32;
} else if (! strcmp(arg, "s64")) {
tasks |= TEST_S64;
} else if (! strcmp(arg, "branchfree")) {
tasks |= TEST_BRANCHFREE;
} else if (! strcmp(arg, "branchfull")) {
tasks |= TEST_BRANCHFULL;
} else if (! strcmp(arg, "sys") || ! strcmp(arg, "system")) {
tasks |= TEST_SYSTEM;
} else {
std::cout << "Unknown argument '" << arg << "'" << std::endl;
usage();
return -1;
}
}
// Set default tasks
if (! (tasks & TEST_ALL_TYPES)) {
tasks |= TEST_ALL_TYPES;
}
if (! (tasks & TEST_ALL_ALGOS)) {
tasks |= TEST_ALL_ALGOS;
}
size_t iters = 64;// * 100000;
if (tasks & TEST_U32) {
std::cout << "----- u32 -----" << std::endl;
measure_times<uint32_t>(tasks, 40000, iters);
}
if (tasks & TEST_U64) {
std::cout << "----- u64 -----" << std::endl;
measure_times<uint64_t>(tasks, 40000, iters);
}
if (tasks & TEST_S32) {
std::cout << "----- s32 -----" << std::endl;
measure_times<int32_t>(tasks, 40000, iters);
}
if (tasks & TEST_S64) {
std::cout << "----- s64 -----" << std::endl;
measure_times<int64_t>(tasks, 40000, iters);
}
return 0;
}
| [
"corydoras@ridiculousfish.com"
] | corydoras@ridiculousfish.com |
f452c4024eb6ff6c4a082f3136314f68faabe122 | e18ffa5353dc10367a9f6eaebd27c33805b54589 | /DAY-8/transform_matrix.cpp | e7a66325cd50e87a95b1a58128958d832a862975 | [] | no_license | mridul-joshi/DS-A | e3a9ae58d12af0743eecc35e748e840963e90be7 | 289190ae329f8a918461d0c6c33dae8dfd8a794f | refs/heads/main | 2023-06-14T16:35:55.462949 | 2021-07-13T15:30:38 | 2021-07-13T15:30:38 | 382,907,850 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,171 | cpp | #include <bits/stdc++.h>
using namespace std;
void rotate(vector<vector<int>> &arr)
{
for (int i = 0; i < arr.size(); i++)
{
for (int j = i + 1; j < arr.size(); j++)
{
swap(arr[j][i], arr[i][j]);
}
}
for (int i = 0; i < arr.size(); i++)
{
reverse(arr[i].begin(), arr[i].end());
}
}
int main()
{
int m, n;
cin >> m >> n;
vector<vector<int>> arr;
for (int i = 0; i < m; i++)
{
vector<int> temp;
for (int j = 0; j < n; j++)
{
int t;
cin >> t;
temp.push_back(t);
}
arr.push_back(temp);
}
vector<vector<int>> comp;
for (int i = 0; i < m; i++)
{
vector<int> temp;
for (int j = 0; j < n; j++)
{
int t;
cin >> t;
temp.push_back(t);
}
comp.push_back(temp);
}
if (arr == comp)
{
cout << "True";
return 0;
}
int k = 3;
while (k--)
{
rotate(arr);
if (arr == comp)
{
cout << "True";
return 0;
}
}
cout << "False";
}
| [
"mriduljoshimj12@gmail.com"
] | mriduljoshimj12@gmail.com |
39a90646f036d8beeae00a3c411e7e320e8c2f5a | f24e3c30be770316406ada0287cb15cfc51406f6 | /VihecleRecognitionVS2013/stdafx.cpp | 1bdf1eb179e53c72e7d293934b91096fd71c0eb3 | [] | no_license | Runningwater23/VehicleRecognition | b938a3271073bcf84d4e45cd6909e632046ffd94 | 8fdf305c61a41ddce7b6828b16bd7604e86f55ca | refs/heads/master | 2021-01-16T21:04:05.250774 | 2016-08-03T08:13:26 | 2016-08-03T08:13:26 | 63,764,192 | 0 | 0 | null | null | null | null | GB18030 | C++ | false | false | 179 | cpp |
// stdafx.cpp : 只包括标准包含文件的源文件
// VihecleRecognitionVS2013.pch 将作为预编译头
// stdafx.obj 将包含预编译类型信息
#include "stdafx.h"
| [
"Rw_1227341326"
] | Rw_1227341326 |
81ca8cd1404350036ca16050e64e4d69c5c11742 | 65dcc74b271cafac2511f38fa3caf85d2c3daff8 | /Songuku/main.cpp | 89f53ec6e89e9c8ac50a417059b69224e5d75374 | [] | no_license | thangdepzai/Thuat-toan-ung-dung-samsung | 18258b4c6b9110521a2dd618cd141795c33c8be8 | 05ff49615d691bc85f30cd6ff45211fde8332ce1 | refs/heads/master | 2020-05-26T08:43:34.187401 | 2019-05-23T09:54:31 | 2019-05-23T09:54:31 | 188,171,514 | 0 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 1,929 | cpp | #include<iostream>
#include<vector>
using namespace std;
int n=9;
int m;
int A[9][9];
int cnt =0;
int dem =0;
int Row=-1, Col=-1;
//4 0 0 0 0 0 0 0 0
//0 8 0 0 0 0 0 4 0
//0 3 0 2 0 8 1 0 5
//3 0 0 9 1 0 2 0 0
//6 4 0 0 0 5 9 0 0
//7 0 0 3 8 0 4 0 0
//0 7 0 6 0 1 3 0 4
//0 1 0 0 0 0 0 2 0
//5 0 0 0 0 0 0 0 0
void Init(){
for(int i=0;i<9;i++){
for(int j=0;j<9;j++){
cin>>A[i][j];
if( A[i][j]==0) cnt ++;
}
}
}
bool check(int x,int y, int val){
for(int j =0 ; j<9 ; j++ ) if(A[x][j]==val) return false;
for(int i =0 ; i<9 ; i++ ) if(A[i][y]==val) return false;
int b_x = (x/3)*3;
int b_y = (y/3)*3;
for(int i = b_x; i<b_x+3; i++){
for(int j= b_y; j<b_y+3; j++){
if(A[i][j]==val) return false;
}
}
return true;
}
void Solution(){
for(int i=0;i<9;i++){
for(int j=0;j<9;j++){
cout<<A[i][j]<<" ";
}
cout<<endl;
}
cout<<endl;
}
void GetNextCell(int x, int y){
Row =-1;
Col =-1;
if(y<n-1) {
for(int i=y; i<n; i++) {
if(A[x][i]==0) {
Row = x;
Col = i;
return;
}
}
y=n-1;
}
if(y == n-1){
if(x<n-1){
x++;
y=0;
GetNextCell(x, y);
}else if(x==n-1) return;
}
}
void Try(int x, int y){
for(int val= 1; val<=9;val++){
if(check(x,y, val)){
A[x][y] = val;
dem++;
if(dem == cnt){
Solution();
return;
}
else{
GetNextCell(x,y);
if(Row !=-1 && Col !=-1) Try(Row, Col);
}
dem--;
A[x][y]=0;
}
}
}
int main(){
Init();
cout<<endl;
GetNextCell(0,0);
if(Row !=-1 && Col !=-1) Try(Row, Col);
}
| [
"tabaothang97@gmail.com"
] | tabaothang97@gmail.com |
4edbbdb24e7f6dc9ab41e0d7737a38844f4d027a | 1942a0d16bd48962e72aa21fad8d034fa9521a6c | /aws-cpp-sdk-ec2/source/model/StopInstancesRequest.cpp | 7f5f7a47c807b20051e4e60770bd9a6b5585bf49 | [
"Apache-2.0",
"JSON",
"MIT"
] | permissive | yecol/aws-sdk-cpp | 1aff09a21cfe618e272c2c06d358cfa0fb07cecf | 0b1ea31e593d23b5db49ee39d0a11e5b98ab991e | refs/heads/master | 2021-01-20T02:53:53.557861 | 2018-02-11T11:14:58 | 2018-02-11T11:14:58 | 83,822,910 | 0 | 1 | null | 2017-03-03T17:17:00 | 2017-03-03T17:17:00 | null | UTF-8 | C++ | false | false | 1,581 | cpp | /*
* Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
#include <aws/ec2/model/StopInstancesRequest.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
using namespace Aws::EC2::Model;
using namespace Aws::Utils;
StopInstancesRequest::StopInstancesRequest() :
m_dryRun(false),
m_dryRunHasBeenSet(false),
m_instanceIdsHasBeenSet(false),
m_force(false),
m_forceHasBeenSet(false)
{
}
Aws::String StopInstancesRequest::SerializePayload() const
{
Aws::StringStream ss;
ss << "Action=StopInstances&";
if(m_dryRunHasBeenSet)
{
ss << "DryRun=" << std::boolalpha << m_dryRun << "&";
}
if(m_instanceIdsHasBeenSet)
{
unsigned instanceIdsCount = 1;
for(auto& item : m_instanceIds)
{
ss << "InstanceId." << instanceIdsCount << "="
<< StringUtils::URLEncode(item.c_str()) << "&";
instanceIdsCount++;
}
}
if(m_forceHasBeenSet)
{
ss << "Force=" << std::boolalpha << m_force << "&";
}
ss << "Version=2016-11-15";
return ss.str();
}
| [
"henso@amazon.com"
] | henso@amazon.com |
4a215f4a2d20705ac8f61241f04c07e9606f055c | 5022fe3151ea0de7b2f21f571ac43e7d05d14fb2 | /src/BioFVM/BioFVM_microenvironment.cpp | 7fe42838d2d60f94c75457c45a47d12a999a0537 | [] | permissive | IU-nanoBio/pc4nanobio | df17a898223b5f1f2a67fb1bd03ee1a1dbb87a65 | f9412bc16061009a08fd3640d2886d5b78510918 | refs/heads/master | 2020-05-09T11:11:33.363006 | 2019-04-13T13:03:51 | 2019-04-13T13:03:51 | 181,070,781 | 0 | 0 | BSD-3-Clause | 2019-04-13T13:03:52 | 2019-04-12T19:24:00 | C++ | UTF-8 | C++ | false | false | 37,231 | cpp | /*
#############################################################################
# If you use BioFVM in your project, please cite BioFVM and the version #
# number, such as below: #
# #
# We solved the diffusion equations using BioFVM (Version 1.1.7) [1] #
# #
# [1] A. Ghaffarizadeh, S.H. Friedman, and P. Macklin, BioFVM: an efficient #
# parallelized diffusive transport solver for 3-D biological simulations,#
# Bioinformatics 32(8): 1256-8, 2016. DOI: 10.1093/bioinformatics/btv730 #
# #
#############################################################################
# #
# BSD 3-Clause License (see https://opensource.org/licenses/BSD-3-Clause) #
# #
# Copyright (c) 2015-2017, Paul Macklin and the BioFVM Project #
# All rights reserved. #
# #
# Redistribution and use in source and binary forms, with or without #
# modification, are permitted provided that the following conditions are #
# met: #
# #
# 1. Redistributions of source code must retain the above copyright notice, #
# this list of conditions and the following disclaimer. #
# #
# 2. Redistributions in binary form must reproduce the above copyright #
# notice, this list of conditions and the following disclaimer in the #
# documentation and/or other materials provided with the distribution. #
# #
# 3. Neither the name of the copyright holder nor the names of its #
# contributors may be used to endorse or promote products derived from this #
# software without specific prior written permission. #
# #
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS #
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED #
# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A #
# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER #
# OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, #
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, #
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR #
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF #
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING #
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS #
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #
# #
#############################################################################
*/
#include "BioFVM_microenvironment.h"
#include "BioFVM_solvers.h"
#include "BioFVM_vector.h"
#include <cmath>
#include "BioFVM_basic_agent.h"
namespace BioFVM{
extern std::string BioFVM_version;
extern std::string BioFVM_URL;
Microenvironment* default_microenvironment = NULL;
void set_default_microenvironment( Microenvironment* M )
{ default_microenvironment = M; }
Microenvironment* get_default_microenvironment( void )
{ return default_microenvironment; }
void zero_function( std::vector<double>& position, std::vector<double>& input , std::vector<double>* write_destination )
{
for( int i=0 ; i < write_destination->size() ; i++ )
{ (*write_destination)[i] = 0.0; }
return;
}
void one_function( std::vector<double>& position, std::vector<double>& input , std::vector<double>* write_destination )
{
for( int i=0 ; i < write_destination->size() ; i++ )
{ (*write_destination)[i] = 1.0; }
return;
}
void zero_function( Microenvironment* pMicroenvironment, int voxel_index, std::vector<double>* write_destination )
{
for( int i=0 ; i < write_destination->size() ; i++ )
{ (*write_destination)[i] = 0.0; }
return;
}
void one_function( Microenvironment* pMicroenvironment, int voxel_index, std::vector<double>* write_destination )
{
for( int i=0 ; i < write_destination->size() ; i++ )
{ (*write_destination)[i] = 1.0; }
return;
}
void empty_diffusion_solver( Microenvironment& S, double dt )
{
static bool setup_done = false;
if( !setup_done )
{
std::cout << "Using the empty diffusion solver ... " << std::endl;
setup_done = true;
}
return;
}
Microenvironment::Microenvironment()
{
name = "unnamed";
spatial_units = "none";
time_units = "none";
bulk_source_sink_solver_setup_done = false;
thomas_setup_done = false;
diffusion_solver_setup_done = false;
diffusion_decay_solver = empty_diffusion_solver;
diffusion_decay_solver = diffusion_decay_solver__constant_coefficients_LOD_3D;
mesh.resize(1,1,1);
one.resize( 1 , 1.0 );
zero.resize( 1 , 0.0 );
temporary_density_vectors1.resize( mesh.voxels.size() , zero );
temporary_density_vectors2.resize( mesh.voxels.size() , zero );
p_density_vectors = &temporary_density_vectors1;
gradient_vectors.resize( mesh.voxels.size() );
for( int k=0 ; k < mesh.voxels.size() ; k++ )
{
gradient_vectors[k].resize( 1 );
(gradient_vectors[k])[0].resize( 3, 0.0 );
}
gradient_vector_computed.resize( mesh.voxels.size() , false );
bulk_supply_rate_function = zero_function;
bulk_supply_target_densities_function = zero_function;
bulk_uptake_rate_function = zero_function;
density_names.assign( 1 , "unnamed" );
density_units.assign( 1 , "none" );
diffusion_coefficients.assign( number_of_densities() , 0.0 );
decay_rates.assign( number_of_densities() , 0.0 );
one_half = one;
one_half *= 0.5;
one_third = one;
one_third /= 3.0;
/*
dirichlet_indices.clear();
dirichlet_value_vectors.clear();
dirichlet_node_map.assign( mesh.voxels.size() , -1 );
*/
dirichlet_value_vectors.assign( mesh.voxels.size(), one );
dirichlet_activation_vector.assign( 1 , true );
if(default_microenvironment==NULL)
{ default_microenvironment=this; }
return;
}
Microenvironment::Microenvironment(std::string name)
{
Microenvironment();
this->name=name;
return;
}
void Microenvironment::add_dirichlet_node( int voxel_index, std::vector<double>& value )
{
mesh.voxels[voxel_index].is_Dirichlet=true;
/*
dirichlet_indices.push_back( voxel_index );
dirichlet_value_vectors.push_back( value );
*/
dirichlet_value_vectors[voxel_index] = value; // .assign( mesh.voxels.size(), one );
return;
}
void Microenvironment::update_dirichlet_node( int voxel_index , std::vector<double>& new_value )
{
/*
if( mesh.voxels[voxel_index].is_Dirichlet == false )
{
std::cout << "BioFVM Warning: No Dirichlet condition previously specified at voxel " << voxel_index << "! Creating a new one now ... " << std::endl;
add_dirichlet_node( voxel_index , new_value );
return;
}
int n = 0;
while( dirichlet_indices[n] != voxel_index && n < dirichlet_indices.size() )
{ n++; }
if( n == dirichlet_indices.size() )
{
std::cout << "BioFVM Warning: No Dirichlet condition previously specified at voxel " << voxel_index << "! Creating a new one now ... " << std::endl;
add_dirichlet_node( voxel_index , new_value );
return;
}
dirichlet_value_vectors[n] = new_value;
*/
mesh.voxels[voxel_index].is_Dirichlet = true;
dirichlet_value_vectors[voxel_index] = new_value;
return;
}
void Microenvironment::update_dirichlet_node( int voxel_index , int substrate_index , double new_value )
{
mesh.voxels[voxel_index].is_Dirichlet = true;
dirichlet_value_vectors[voxel_index][substrate_index] = new_value;
return;
}
void Microenvironment::remove_dirichlet_node( int voxel_index )
{
mesh.voxels[voxel_index].is_Dirichlet = false;
/*
if( mesh.voxels[voxel_index].is_Dirichlet == false )
{
std::cout << "BioFVM Warning: No Dirichlet condition previously specified at voxel " << voxel_index << "! Nothing to remove!" << std::endl;
return;
}
int n = 0;
mesh.voxels[voxel_index].is_Dirichlet=false;
while( dirichlet_indices[n] != voxel_index && n < dirichlet_indices.size() )
{ n++; }
if( n == dirichlet_indices.size() )
{
std::cout << "BioFVM Warning: No Dirichlet condition previously specified at voxel " << voxel_index << "! Nothing to remove!" << std::endl;
return;
}
// swap with the final node and then remove it
dirichlet_indices[n] = dirichlet_indices[ dirichlet_indices.size()-1 ];
dirichlet_value_vectors[n] = dirichlet_value_vectors[ dirichlet_value_vectors.size()-1 ];
dirichlet_indices.pop_back();
dirichlet_value_vectors.pop_back();
*/
return;
}
bool& Microenvironment::is_dirichlet_node( int voxel_index )
{
return mesh.voxels[voxel_index].is_Dirichlet;
}
void Microenvironment::set_substrate_dirichlet_activation( int substrate_index , bool new_value )
{
dirichlet_activation_vector[substrate_index] = new_value;
return;
}
void Microenvironment::apply_dirichlet_conditions( void )
{
/*
#pragma omp parallel for
for( int i=0 ; i < dirichlet_indices.size() ; i++ )
{ density_vector( dirichlet_indices[i] ) = dirichlet_value_vectors[i]; }
*/
#pragma omp parallel for
for( int i=0 ; i < mesh.voxels.size() ;i++ )
{
/*
if( mesh.voxels[i].is_Dirichlet == true )
{ density_vector(i) = dirichlet_value_vectors[i]; }
*/
if( mesh.voxels[i].is_Dirichlet == true )
{
for( int j=0; j < dirichlet_value_vectors[i].size(); j++ )
{
if( dirichlet_activation_vector[j] == true )
{
density_vector(i)[j] = dirichlet_value_vectors[i][j];
}
}
}
}
return;
}
void Microenvironment::resize_voxels( int new_number_of_voxes )
{
if( mesh.Cartesian_mesh == true )
{
std::cout << "Error: only use Microenvironment::" << __FUNCTION__ << " as a fall-back for non-Cartesian meshes." << std::endl
<< "\tUse one of the Microenvironment::resize_space() functions instead. Ignoring directive." << std::endl;
return;
}
mesh.voxels.resize( new_number_of_voxes );
temporary_density_vectors1.resize( mesh.voxels.size() , zero );
temporary_density_vectors2.resize( mesh.voxels.size() , zero );
gradient_vectors.resize( mesh.voxels.size() );
for( int k=0 ; k < mesh.voxels.size() ; k++ )
{
gradient_vectors[k].resize( number_of_densities() );
for( int i=0 ; i < number_of_densities() ; i++ )
{
(gradient_vectors[k])[i].resize( 3, 0.0 );
}
}
gradient_vector_computed.resize( mesh.voxels.size() , false );
dirichlet_value_vectors.assign( mesh.voxels.size(), one );
return;
}
void Microenvironment::resize_space( int x_nodes, int y_nodes, int z_nodes )
{
mesh.resize( x_nodes, y_nodes , z_nodes );
temporary_density_vectors1.assign( mesh.voxels.size() , zero );
temporary_density_vectors2.assign( mesh.voxels.size() , zero );
gradient_vectors.resize( mesh.voxels.size() );
for( int k=0 ; k < mesh.voxels.size() ; k++ )
{
gradient_vectors[k].resize( number_of_densities() );
for( int i=0 ; i < number_of_densities() ; i++ )
{
(gradient_vectors[k])[i].resize( 3, 0.0 );
}
}
gradient_vector_computed.resize( mesh.voxels.size() , false );
dirichlet_value_vectors.assign( mesh.voxels.size(), one );
return;
}
void Microenvironment::resize_space( double x_start, double x_end, double y_start, double y_end, double z_start, double z_end , int x_nodes, int y_nodes, int z_nodes )
{
mesh.resize( x_start, x_end, y_start, y_end, z_start, z_end, x_nodes, y_nodes , z_nodes );
temporary_density_vectors1.assign( mesh.voxels.size() , zero );
temporary_density_vectors2.assign( mesh.voxels.size() , zero );
gradient_vectors.resize( mesh.voxels.size() );
for( int k=0 ; k < mesh.voxels.size() ; k++ )
{
gradient_vectors[k].resize( number_of_densities() );
for( int i=0 ; i < number_of_densities() ; i++ )
{
(gradient_vectors[k])[i].resize( 3, 0.0 );
}
}
gradient_vector_computed.resize( mesh.voxels.size() , false );
dirichlet_value_vectors.assign( mesh.voxels.size(), one );
return;
}
void Microenvironment::resize_space( double x_start, double x_end, double y_start, double y_end, double z_start, double z_end , double dx_new , double dy_new , double dz_new )
{
mesh.resize( x_start, x_end, y_start, y_end, z_start, z_end, dx_new , dy_new , dz_new );
temporary_density_vectors1.assign( mesh.voxels.size() , zero );
temporary_density_vectors2.assign( mesh.voxels.size() , zero );
gradient_vectors.resize( mesh.voxels.size() );
for( int k=0 ; k < mesh.voxels.size() ; k++ )
{
gradient_vectors[k].resize( number_of_densities() );
for( int i=0 ; i < number_of_densities() ; i++ )
{
(gradient_vectors[k])[i].resize( 3, 0.0 );
}
}
gradient_vector_computed.resize( mesh.voxels.size() , false );
dirichlet_value_vectors.assign( mesh.voxels.size(), one );
return;
}
void Microenvironment::resize_space_uniform( double x_start, double x_end, double y_start, double y_end, double z_start, double z_end , double dx_new )
{
return resize_space( x_start, x_end, y_start, y_end, z_start, z_end , dx_new , dx_new, dx_new );
}
void Microenvironment::resize_densities( int new_size )
{
zero.assign( new_size, 0.0 );
one.assign( new_size , 1.0 );
temporary_density_vectors1.assign( mesh.voxels.size() , zero );
temporary_density_vectors2.assign( mesh.voxels.size() , zero );
for( int k=0 ; k < mesh.voxels.size() ; k++ )
{
gradient_vectors[k].resize( number_of_densities() );
for( int i=0 ; i < number_of_densities() ; i++ )
{
(gradient_vectors[k])[i].resize( 3, 0.0 );
}
}
gradient_vector_computed.resize( mesh.voxels.size() , false );
diffusion_coefficients.assign( new_size , 0.0 );
decay_rates.assign( new_size , 0.0 );
density_names.assign( new_size, "unnamed" );
density_units.assign( new_size , "none" );
one_half = one;
one_half *= 0.5;
one_third = one;
one_third /= 3.0;
dirichlet_value_vectors.assign( mesh.voxels.size(), one );
dirichlet_activation_vector.assign( new_size, true );
default_microenvironment_options.Dirichlet_condition_vector.assign( new_size , 1.0 );
default_microenvironment_options.Dirichlet_activation_vector.assign( new_size, true );
return;
}
void Microenvironment::add_density( void )
{
// fix in PhysiCell preview November 2017
// default_microenvironment_options.use_oxygen_as_first_field = false;
// update 1, 0
zero.push_back( 0.0 );
one.push_back( 1.0 );
// update units
density_names.push_back( "unnamed" );
density_units.push_back( "none" );
// update coefficients
diffusion_coefficients.push_back( 0.0 );
decay_rates.push_back( 0.0 );
// update sources and such
for( int i=0; i < temporary_density_vectors1.size() ; i++ )
{
temporary_density_vectors1[i].push_back( 0.0 );
temporary_density_vectors2[i].push_back( 0.0 );
}
// resize the gradient data structures
for( int k=0 ; k < mesh.voxels.size() ; k++ )
{
gradient_vectors[k].resize( number_of_densities() );
for( int i=0 ; i < number_of_densities() ; i++ )
{
(gradient_vectors[k])[i].resize( 3, 0.0 );
}
}
gradient_vector_computed.resize( mesh.voxels.size() , false );
one_half = one;
one_half *= 0.5;
one_third = one;
one_third /= 3.0;
dirichlet_value_vectors.assign( mesh.voxels.size(), one );
dirichlet_activation_vector.assign( number_of_densities(), true );
// Fixes in PhysiCell preview November 2017
default_microenvironment_options.Dirichlet_condition_vector.push_back( 1.0 ); // = one;
default_microenvironment_options.Dirichlet_activation_vector.push_back( true ); // assign( number_of_densities(), true );
return;
}
void Microenvironment::add_density( std::string name , std::string units )
{
// fix in PhysiCell preview November 2017
// default_microenvironment_options.use_oxygen_as_first_field = false;
// update 1, 0
zero.push_back( 0.0 );
one.push_back( 1.0 );
// update units
density_names.push_back( name );
density_units.push_back( units );
// update coefficients
diffusion_coefficients.push_back( 0.0 );
decay_rates.push_back( 0.0 );
// update sources and such
for( int i=0; i < temporary_density_vectors1.size() ; i++ )
{
temporary_density_vectors1[i].push_back( 0.0 );
temporary_density_vectors2[i].push_back( 0.0 );
}
// resize the gradient data structures,
for( int k=0 ; k < mesh.voxels.size() ; k++ )
{
gradient_vectors[k].resize( number_of_densities() );
for( int i=0 ; i < number_of_densities() ; i++ )
{
(gradient_vectors[k])[i].resize( 3, 0.0 );
}
}
gradient_vector_computed.resize( mesh.voxels.size() , false );
one_half = one;
one_half *= 0.5;
one_third = one;
one_third /= 3.0;
dirichlet_value_vectors.assign( mesh.voxels.size(), one );
dirichlet_activation_vector.assign( number_of_densities(), true );
// fix in PhysiCell preview November 2017
default_microenvironment_options.Dirichlet_condition_vector.push_back( 1.0 ); // = one;
default_microenvironment_options.Dirichlet_activation_vector.push_back( true ); // assign( number_of_densities(), true );
return;
}
void Microenvironment::add_density( std::string name , std::string units, double diffusion_constant, double decay_rate )
{
// fix in PhysiCell preview November 2017
// default_microenvironment_options.use_oxygen_as_first_field = false;
// update 1, 0
zero.push_back( 0.0 );
one.push_back( 1.0 );
// update units
density_names.push_back( name );
density_units.push_back( units );
// update coefficients
diffusion_coefficients.push_back( diffusion_constant );
decay_rates.push_back( decay_rate );
// update sources and such
for( int i=0; i < temporary_density_vectors1.size() ; i++ )
{
temporary_density_vectors1[i].push_back( 0.0 );
temporary_density_vectors2[i].push_back( 0.0 );
}
// resize the gradient data structures
for( int k=0 ; k < mesh.voxels.size() ; k++ )
{
gradient_vectors[k].resize( number_of_densities() );
for( int i=0 ; i < number_of_densities() ; i++ )
{
(gradient_vectors[k])[i].resize( 3, 0.0 );
}
}
gradient_vector_computed.resize( mesh.voxels.size() , false );
one_half = one;
one_half *= 0.5;
one_third = one;
one_third /= 3.0;
dirichlet_value_vectors.assign( mesh.voxels.size(), one );
dirichlet_activation_vector.assign( number_of_densities(), true );
// fix in PhysiCell preview November 2017
default_microenvironment_options.Dirichlet_condition_vector.push_back( 1.0 ); // = one;
default_microenvironment_options.Dirichlet_activation_vector.push_back( true ); // assign( number_of_densities(), true );
return;
}
int Microenvironment::find_density_index( std::string name )
{
for( int i=0; i < density_names.size() ; i++ )
{
if( density_names[i] == name )
{ return i; }
}
return -1;
}
void Microenvironment::set_density( int index , std::string name , std::string units )
{
// fix in PhysiCell preview November 2017
if( index == 0 )
{ default_microenvironment_options.use_oxygen_as_first_field = false; }
density_names[index] = name;
density_units[index] = units;
return;
}
void Microenvironment::set_density( int index , std::string name , std::string units , double diffusion_constant , double decay_rate )
{
// fix in PhysiCell preview November 2017
if( index == 0 )
{ default_microenvironment_options.use_oxygen_as_first_field = false; }
density_names[index] = name;
density_units[index] = units;
diffusion_coefficients[index] = diffusion_constant;
decay_rates[index] = decay_rate;
return;
}
int Microenvironment::voxel_index( int i, int j, int k )
{ return mesh.voxel_index(i,j,k) ; }
std::vector<int> Microenvironment::cartesian_indices( int n )
{ return mesh.cartesian_indices( n ); }
int Microenvironment::nearest_voxel_index( std::vector<double>& position )
{ return mesh.nearest_voxel_index( position ); }
Voxel& Microenvironment::voxels( int voxel_index )
{ return mesh.voxels[voxel_index]; }
std::vector<int> Microenvironment::nearest_cartesian_indices( std::vector<double>& position )
{ return mesh.nearest_cartesian_indices( position ); }
Voxel& Microenvironment::nearest_voxel( std::vector<double>& position )
{ return mesh.nearest_voxel( position ); }
std::vector<double>& Microenvironment::nearest_density_vector( std::vector<double>& position )
{ return (*p_density_vectors)[ mesh.nearest_voxel_index( position ) ]; }
std::vector<double>& Microenvironment::nearest_density_vector( int voxel_index )
{ return (*p_density_vectors)[ voxel_index ]; }
std::vector<double>& Microenvironment::operator()( int i, int j, int k )
{ return (*p_density_vectors)[ voxel_index(i,j,k) ]; }
std::vector<double>& Microenvironment::operator()( int i, int j )
{ return (*p_density_vectors)[ voxel_index(i,j,0) ]; }
std::vector<double>& Microenvironment::operator()( int n )
{ return (*p_density_vectors)[ n ]; }
std::vector<double>& Microenvironment::density_vector( int i, int j, int k )
{ return (*p_density_vectors)[ voxel_index(i,j,k) ]; }
std::vector<double>& Microenvironment::density_vector( int i, int j )
{ return (*p_density_vectors)[ voxel_index(i,j,0) ]; }
std::vector<double>& Microenvironment::density_vector( int n )
{ return (*p_density_vectors)[ n ]; }
void Microenvironment::simulate_diffusion_decay( double dt )
{
if( diffusion_decay_solver )
{ diffusion_decay_solver( *this, dt ); }
else
{
std::cout << "Warning: diffusion-reaction-source/sink solver not set for Microenvironment object at " << this << ". Nothing happened!" << std::endl;
std::cout << " Consider using Microenvironment::auto_choose_diffusion_decay_solver(void) ... " << std::endl
<< std::endl;
}
return;
}
void Microenvironment::auto_choose_diffusion_decay_solver( void )
{
// set the safest choice
diffusion_decay_solver = diffusion_decay_solver__constant_coefficients_explicit;
std::cout << "Warning: auto-selection of diffusion-decay-source/sink solver not fully implemented!" << std::endl;
// eventual logic: if non-Cartesian, use explicit
// if Cartesian, if non-variable, use the constant coefficient super-fast code
// otherwise, use the variable coefficient code
}
void Microenvironment::display_information( std::ostream& os )
{
os << std::endl << "Microenvironment summary: " << name << ": " << std::endl;
mesh.display_information( os );
os << "Densities: (" << number_of_densities() << " total)" << std::endl;
for( int i = 0 ; i < density_names.size() ; i++ )
{
os << " " << density_names[i] << ":" << std::endl
<< " units: " << density_units[i] << std::endl
<< " diffusion coefficient: " << diffusion_coefficients[i]
<< " " << spatial_units << "^2 / " << time_units << std::endl
<< " decay rate: " << decay_rates[i]
<< " " << time_units << "^-1" << std::endl
<< " diffusion length scale: " << sqrt( diffusion_coefficients[i] / ( 1e-12 + decay_rates[i] ) ) << " "
<< spatial_units << std::endl << std::endl;
}
os << std::endl;
return;
}
int Microenvironment::number_of_densities( void )
{ return (*p_density_vectors)[0].size(); }
int Microenvironment::number_of_voxels( void )
{ return mesh.voxels.size(); }
int Microenvironment::number_of_voxel_faces( void )
{ return mesh.voxel_faces.size(); }
void Microenvironment::write_to_matlab( std::string filename )
{
int number_of_data_entries = mesh.voxels.size();
int size_of_each_datum = 3 + 1 + (*p_density_vectors)[0].size();
FILE* fp = write_matlab_header( size_of_each_datum, number_of_data_entries, filename, "multiscale_microenvironment" );
// storing data as cols
for( int i=0; i < number_of_data_entries ; i++ )
{
fwrite( (char*) &( mesh.voxels[i].center[0] ) , sizeof(double) , 1 , fp );
fwrite( (char*) &( mesh.voxels[i].center[1] ) , sizeof(double) , 1 , fp );
fwrite( (char*) &( mesh.voxels[i].center[2] ) , sizeof(double) , 1 , fp );
fwrite( (char*) &( mesh.voxels[i].volume ) , sizeof(double) , 1 , fp );
// densities
for( int j=0 ; j < (*p_density_vectors)[i].size() ; j++)
{ fwrite( (char*) &( ((*p_density_vectors)[i])[j] ) , sizeof(double) , 1 , fp ); }
}
fclose( fp );
return;
}
void Microenvironment::simulate_bulk_sources_and_sinks( double dt )
{
if( !bulk_source_sink_solver_setup_done )
{
bulk_source_sink_solver_temp1.resize( mesh.voxels.size() , zero );
bulk_source_sink_solver_temp2.resize( mesh.voxels.size() , zero );
bulk_source_sink_solver_temp3.resize( mesh.voxels.size() , zero );
bulk_source_sink_solver_setup_done = true;
}
#pragma omp parallel for
for( int i=0; i < mesh.voxels.size() ; i++ )
{
bulk_supply_rate_function( this,i, &bulk_source_sink_solver_temp1[i] ); // temp1 = S
bulk_supply_target_densities_function( this,i, &bulk_source_sink_solver_temp2[i]); // temp2 = T
bulk_uptake_rate_function( this,i, &bulk_source_sink_solver_temp3[i] ); // temp3 = U
bulk_source_sink_solver_temp2[i] *= bulk_source_sink_solver_temp1[i]; // temp2 = S*T
axpy( &(*p_density_vectors)[i] , dt , bulk_source_sink_solver_temp2[i] ); // out = out + dt*temp2 = out + dt*S*T
bulk_source_sink_solver_temp3[i] += bulk_source_sink_solver_temp1[i]; // temp3 = U+S
bulk_source_sink_solver_temp3[i] *= dt; // temp3 = dt*(U+S)
bulk_source_sink_solver_temp3[i] += one; // temp3 = 1 + dt*(U+S)
(*p_density_vectors)[i] /= bulk_source_sink_solver_temp3[i];
}
return;
}
void Microenvironment::simulate_cell_sources_and_sinks( std::vector<Basic_Agent*>& basic_agent_list , double dt )
{
#pragma omp parallel for
for( int i=0 ; i < basic_agent_list.size() ; i++ )
{
basic_agent_list[i]->simulate_secretion_and_uptake( this , dt );
}
return;
}
void Microenvironment::simulate_cell_sources_and_sinks( double dt )
{
simulate_cell_sources_and_sinks(all_basic_agents, dt);
}
void Microenvironment::update_rates( void )
{
if( supply_target_densities_times_supply_rates.size() != number_of_voxels() )
{ supply_target_densities_times_supply_rates.assign( number_of_voxels() , zero ); }
if( supply_rates.size() != number_of_voxels() )
{ supply_rates.assign( number_of_voxels() , zero ); }
if( uptake_rates.size() != number_of_voxels() )
{ uptake_rates.assign( number_of_voxels() , zero ); }
#pragma omp parallel for
for( int i=0 ; i < number_of_voxels() ; i++ )
{
bulk_uptake_rate_function( this,i, &(uptake_rates[i]) );
bulk_supply_rate_function( this,i, &(supply_rates[i]) );
bulk_supply_target_densities_function( this,i, &(supply_target_densities_times_supply_rates[i]) );
supply_target_densities_times_supply_rates[i] *= supply_rates[i];
}
return;
}
std::vector<gradient>& Microenvironment::gradient_vector(int i, int j, int k)
{
int n = voxel_index(i,j,k);
if( gradient_vector_computed[n] == false )
{
compute_gradient_vector( n );
}
return gradient_vectors[n];
}
std::vector<gradient>& Microenvironment::gradient_vector(int i, int j )
{
int n = voxel_index(i,j,0);
if( gradient_vector_computed[n] == false )
{
compute_gradient_vector( n );
}
return gradient_vectors[n];
}
std::vector<gradient>& Microenvironment::gradient_vector(int n )
{
// if the gradient has not yet been computed, then do it!
if( gradient_vector_computed[n] == false )
{
compute_gradient_vector( n );
}
return gradient_vectors[n];
}
std::vector<gradient>& Microenvironment::nearest_gradient_vector( std::vector<double>& position )
{
int n = nearest_voxel_index( position );
if( gradient_vector_computed[n] == false )
{
compute_gradient_vector( n );
}
return gradient_vectors[n];
}
void Microenvironment::compute_all_gradient_vectors( void )
{
//
static double two_dx = mesh.dx;
static double two_dy = mesh.dy;
static double two_dz = mesh.dz;
static bool gradient_constants_defined = false;
if( gradient_constants_defined == false )
{
two_dx *= 2.0;
two_dy *= 2.0;
two_dz *= 2.0;
gradient_constants_defined = true;
}
#pragma omp parallel for
for( int k=0; k < mesh.z_coordinates.size() ; k++ )
{
for( int j=0; j < mesh.y_coordinates.size() ; j++ )
{
for( int i=1; i < mesh.x_coordinates.size()-1 ; i++ )
{
for( int q=0; q < number_of_densities() ; q++ )
{
int n = voxel_index(i,j,k);
// x-derivative of qth substrate at voxel n
gradient_vectors[n][q][0] = (*p_density_vectors)[n+thomas_i_jump][q];
gradient_vectors[n][q][0] -= (*p_density_vectors)[n-thomas_i_jump][q];
gradient_vectors[n][q][0] /= two_dx;
gradient_vector_computed[n] = true;
}
}
}
}
#pragma omp parallel for
for( int k=0; k < mesh.z_coordinates.size() ; k++ )
{
for( int i=0; i < mesh.x_coordinates.size() ; i++ )
{
for( int j=1; j < mesh.y_coordinates.size()-1 ; j++ )
{
for( int q=0; q < number_of_densities() ; q++ )
{
int n = voxel_index(i,j,k);
// y-derivative of qth substrate at voxel n
gradient_vectors[n][q][1] = (*p_density_vectors)[n+thomas_j_jump][q];
gradient_vectors[n][q][1] -= (*p_density_vectors)[n-thomas_j_jump][q];
gradient_vectors[n][q][1] /= two_dy;
gradient_vector_computed[n] = true;
}
}
}
}
#pragma omp parallel for
for( int j=0; j < mesh.y_coordinates.size() ; j++ )
{
for( int i=0; i < mesh.x_coordinates.size() ; i++ )
{
for( int k=1; k < mesh.z_coordinates.size()-1 ; k++ )
{
for( int q=0; q < number_of_densities() ; q++ )
{
int n = voxel_index(i,j,k);
// y-derivative of qth substrate at voxel n
gradient_vectors[n][q][2] = (*p_density_vectors)[n+thomas_k_jump][q];
gradient_vectors[n][q][2] -= (*p_density_vectors)[n-thomas_k_jump][q];
gradient_vectors[n][q][2] /= two_dz;
gradient_vector_computed[n] = true;
}
}
}
}
return;
}
void Microenvironment::compute_gradient_vector( int n )
{
static double two_dx = mesh.dx;
static double two_dy = mesh.dy;
static double two_dz = mesh.dz;
static bool gradient_constants_defined = false;
std::vector<int> indices(3,0);
if( gradient_constants_defined == false )
{
two_dx *= 2.0;
two_dy *= 2.0;
two_dz *= 2.0;
gradient_constants_defined = true;
}
indices = cartesian_indices( n );
// d/dx
if( indices[0] > 0 && indices[0] < mesh.x_coordinates.size()-1 )
{
for( int q=0; q < number_of_densities() ; q++ )
{
gradient_vectors[n][q][0] = (*p_density_vectors)[n+thomas_i_jump][q];
gradient_vectors[n][q][0] -= (*p_density_vectors)[n-thomas_i_jump][q];
gradient_vectors[n][q][0] /= two_dx;
gradient_vector_computed[n] = true;
}
}
// d/dy
if( indices[1] > 0 && indices[1] < mesh.y_coordinates.size()-1 )
{
for( int q=0; q < number_of_densities() ; q++ )
{
gradient_vectors[n][q][1] = (*p_density_vectors)[n+thomas_j_jump][q];
gradient_vectors[n][q][1] -= (*p_density_vectors)[n-thomas_j_jump][q];
gradient_vectors[n][q][1] /= two_dy;
gradient_vector_computed[n] = true;
}
}
// d/dz
if( indices[2] > 0 && indices[2] < mesh.z_coordinates.size()-1 )
{
for( int q=0; q < number_of_densities() ; q++ )
{
gradient_vectors[n][q][2] = (*p_density_vectors)[n+thomas_k_jump][q];
gradient_vectors[n][q][2] -= (*p_density_vectors)[n-thomas_k_jump][q];
gradient_vectors[n][q][2] /= two_dz;
gradient_vector_computed[n] = true;
}
}
return;
}
void Microenvironment::reset_all_gradient_vectors( void )
{
for( int k=0 ; k < mesh.voxels.size() ; k++ )
{
for( int i=0 ; i < number_of_densities() ; i++ )
{
(gradient_vectors[k])[i].resize( 3, 0.0 );
}
}
gradient_vector_computed.assign( mesh.voxels.size() , false );
}
Microenvironment microenvironment;
Microenvironment_Options::Microenvironment_Options()
{
use_oxygen_as_first_field = true;
if( get_default_microenvironment() != NULL )
{
pMicroenvironment = get_default_microenvironment();
}
else
{
pMicroenvironment = µenvironment;
set_default_microenvironment( pMicroenvironment );
}
name = "microenvironment";
time_units = "min";
spatial_units = "micron";
dx = 20;
dy = 20;
dz = 20;
outer_Dirichlet_conditions = false;
Dirichlet_condition_vector.assign( pMicroenvironment->number_of_densities() , 1.0 );
Dirichlet_activation_vector.assign( pMicroenvironment->number_of_densities() , true );
// set a far-field value for oxygen (assumed to be in the first field)
Dirichlet_condition_vector[0] = 38.0;
simulate_2D = false;
X_range.resize(2,500.0);
X_range[0] *= -1.0;
Y_range.resize(2,500.0);
Y_range[0] *= -1.0;
Z_range.resize(2,500.0);
Z_range[0] *= -1.0;
calculate_gradients = false;
return;
}
Microenvironment_Options default_microenvironment_options;
void initialize_microenvironment( void )
{
/*
if( default_microenvironment_options.use_oxygen_as_first_field == false )
{
std::cout << "wha???" << std::endl;
}
*/
// create and name a microenvironment;
microenvironment.name = default_microenvironment_options.name;
// register the diffusion solver
if( default_microenvironment_options.simulate_2D == true )
{
microenvironment.diffusion_decay_solver = diffusion_decay_solver__constant_coefficients_LOD_2D;
}
else
{
microenvironment.diffusion_decay_solver = diffusion_decay_solver__constant_coefficients_LOD_3D;
}
// set the default substrate to oxygen (with typical units of mmHg)
if( default_microenvironment_options.use_oxygen_as_first_field == true )
{
microenvironment.set_density(0, "oxygen" , "mmHg" );
microenvironment.diffusion_coefficients[0] = 1e5;
microenvironment.decay_rates[0] = 0.1;
}
// resize the microenvironment
if( default_microenvironment_options.simulate_2D == true )
{
default_microenvironment_options.Z_range[0] = -default_microenvironment_options.dz/2.0;
default_microenvironment_options.Z_range[1] = default_microenvironment_options.dz/2.0;
}
microenvironment.resize_space( default_microenvironment_options.X_range[0], default_microenvironment_options.X_range[1] ,
default_microenvironment_options.Y_range[0], default_microenvironment_options.Y_range[1],
default_microenvironment_options.Z_range[0], default_microenvironment_options.Z_range[1],
default_microenvironment_options.dx,default_microenvironment_options.dy,default_microenvironment_options.dz );
// set units
microenvironment.spatial_units = default_microenvironment_options.spatial_units;
microenvironment.time_units = default_microenvironment_options.time_units;
microenvironment.mesh.units = default_microenvironment_options.spatial_units;
// set the initial densities to the values set in the Dirichlet_condition_vector
for( int n=0; n < microenvironment.number_of_voxels() ; n++ )
{
microenvironment.density_vector(n) = default_microenvironment_options.Dirichlet_condition_vector;
}
if( default_microenvironment_options.outer_Dirichlet_conditions == true )
{
for( int k=0 ; k < microenvironment.mesh.z_coordinates.size() ; k++ )
{
// set Dirichlet conditions along the 4 outer edges
for( int i=0 ; i < microenvironment.mesh.x_coordinates.size() ; i++ )
{
int J = microenvironment.mesh.y_coordinates.size()-1;
microenvironment.add_dirichlet_node( microenvironment.voxel_index(i,0,k) , default_microenvironment_options.Dirichlet_condition_vector );
microenvironment.add_dirichlet_node( microenvironment.voxel_index(i,J,k) , default_microenvironment_options.Dirichlet_condition_vector );
}
int I = microenvironment.mesh.x_coordinates.size()-1;
for( int j=1; j < microenvironment.mesh.y_coordinates.size()-1 ; j++ )
{
microenvironment.add_dirichlet_node( microenvironment.voxel_index(0,j,k) , default_microenvironment_options.Dirichlet_condition_vector );
microenvironment.add_dirichlet_node( microenvironment.voxel_index(I,j,k) , default_microenvironment_options.Dirichlet_condition_vector );
}
}
// if 3-D, also along the corresponding additional faces
if( default_microenvironment_options.simulate_2D == false )
{
int K = microenvironment.mesh.z_coordinates.size()-1;
for( int j=1 ; j < microenvironment.mesh.y_coordinates.size()-1 ; j++ )
{
for( int i=1; i < microenvironment.mesh.x_coordinates.size()-1 ; i++ )
{
microenvironment.add_dirichlet_node( microenvironment.voxel_index(i,j,0) , default_microenvironment_options.Dirichlet_condition_vector );
microenvironment.add_dirichlet_node( microenvironment.voxel_index(i,j,K) , default_microenvironment_options.Dirichlet_condition_vector );
}
}
}
}
microenvironment.display_information( std::cout );
return;
}
};
| [
"heiland@indiana.edu"
] | heiland@indiana.edu |
292aa4492de59f088b2c16f66e156ad1444c68bc | baab42ac0c4181b68af44c8707cbfd3fc5641888 | /SensorCalibration/SensorCalibration.ino | 51892b3612e2584a90473f35032be6b6a4bfbb5d | [] | 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 | 727 | ino | #define MEGA
#define RIGHT_IR A1 //Right IR Rangefinder Pin
#define LEFT_IR A2 //Left IR Rangefinder Pin
double leftIRVolt = 0;
double rightIRVolt = 0;
double leftDist = 0;
double rightDist = 0;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
}
void loop() {
Serial.print("Left Sensor: ");
leftIRVolt = (analogRead(LEFT_IR))*5.0/1023.0;
leftDist = pow(leftIRVolt,-1.1809)*12.52;
Serial.print(leftIRVolt);
Serial.print("\t");
Serial.println(leftDist);
Serial.print("Right Sensor: ");
rightIRVolt = (analogRead(RIGHT_IR))*5.0/1023.0;
rightDist = pow(rightIRVolt,-1.1528)*11.71;
Serial.print(rightIRVolt);
Serial.print("\t");
Serial.println(rightDist);
delay(1000);
}
| [
"brettreeder63@hotmail.com"
] | brettreeder63@hotmail.com |
c1f247b9e8b5e8ab9a92da651f6c02c18c089432 | db8a5f9b32e8d6e7a80d6c2464aa496f6cd0bf3e | /Ui/CurrentSourceInfoWidget.cpp | ce8457ff5e0b3c909c6e989875a03f5f1463503b | [] | no_license | hash1018/Raina | 5eb400e7c9d0153a478a0a3c414b6ce31b046b86 | b2054364cd6e507a5208e95dff4b13e8c10cea5a | refs/heads/main | 2023-05-07T23:16:46.171012 | 2021-06-03T09:22:47 | 2021-06-03T09:22:47 | 363,901,554 | 2 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 1,128 | cpp |
#include "CurrentSourceInfoWidget.h"
#include <qpainter.h>
#include "../NotifyEvent/NotifyEvent.h"
#include <./ui_CurrentSourceInfoWidget.h>
#include "../Base/Source.h"
CurrentSourceInfoWidget::CurrentSourceInfoWidget(QWidget* parent, Chain* chain)
:QWidget(parent), Chain(chain), ui(new Ui::CurrentSourceInfoWidget), source(nullptr) {
ui->setupUi(this);
}
CurrentSourceInfoWidget::~CurrentSourceInfoWidget() {
delete ui;
}
void CurrentSourceInfoWidget::updateNotifyEvent(NotifyEvent* event) {
if (event->getEventType() == NotifyEvent::EventType::CurrentSceneChanged) {
ui->label->setText("");
ui->label_2->setText("");
this->source = nullptr;
}
else if (event->getEventType() == NotifyEvent::EventType::CurrentSourceChanged) {
this->source = dynamic_cast<CurrentSourceChangedEvent*>(event)->getSource();
if (this->source == nullptr) {
ui->label->setText("");
ui->label_2->setText("");
return;
}
ui->label->setText(source->getName());
}
}
void CurrentSourceInfoWidget::paintEvent(QPaintEvent* event) {
QPainter painter(this);
painter.fillRect(this->rect(), QColor("#535353"));
}
| [
"46293206+hash1018@users.noreply.github.com"
] | 46293206+hash1018@users.noreply.github.com |
ccbaf233e56f5e9e3c42d60990403b17aa487120 | a347be60d574aa24f095b0d83c7ac8835d0271fe | /Part13算法竞赛宝典/第一部资源包/第三章 实战演习/文件读写/fread读取文件1.cpp | 4e2c693417db5414690b16216f7ecf868a465913 | [
"LicenseRef-scancode-mulanpsl-1.0-en",
"MulanPSL-1.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | fanll4523/algorithms | 7f2f4a2be499b13345531a700d917ec10e961ad7 | 2c274d785adc75c0952a79cbdd69304452e6d7c1 | refs/heads/master | 2023-08-15T23:40:17.832882 | 2021-10-24T04:42:47 | 2021-10-24T04:42:47 | null | 0 | 0 | null | null | null | null | IBM852 | C++ | false | false | 260 | cpp | //freadÂ┴╚í╬─╝■1
#include <stdio.h>
#include <stdlib.h>
char a[1100000];
int main()
{
FILE *in=fopen("a.in","rb");
FILE *out=fopen("a.out","w");
int n=fread(a,1,1100000,in);
for(int i=0;i<n;i++)
fprintf(out,"%c",a[i]);
return 0;
}
| [
"1648266192@qq.com"
] | 1648266192@qq.com |
ed29a0cc2275cc99fc092a917f02e568aa3a0b56 | 312db7d82f1c0123799e797807c0813437cc695b | /Programmers/L2/L2_카펫.cpp | 6d9f978a98663a53d79b1b0800b8dbfe27c2ab70 | [
"MIT"
] | permissive | Luxusio/Coding-Test | d9711765f956b4a59cf13eb9c568a84f326598b7 | 1cf3cf49c71ab66f140701fb3fc0548b2a2ebca4 | refs/heads/master | 2023-07-21T22:34:56.100172 | 2021-09-08T09:33:58 | 2021-09-08T09:33:58 | 355,099,560 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 395 | cpp | // 2021.03.28 20:20
//#include <string>
//#include <vector>
//
//using namespace std;
//
//vector<int> solution(int brown, int yellow) {
//
// int sum = (brown / 2) + 2;
// int height = 3;
// int width = sum - height;
// while (width >= height) {
// if ((width - 2) * (height - 2) == yellow)
// return {width, height};
//
// height++;
// width = sum - height;
// }
//
// return {0, 0};
//} | [
"44326048+Luxusio@users.noreply.github.com"
] | 44326048+Luxusio@users.noreply.github.com |
b621bb87dbc2d89afec8ba44bee7e87598356a89 | d8ba850b4b308408980e97dab94caa1f07de7ae9 | /TP3/LUMat.cpp | 5f2acca949babdb752e31af8aafc32f89c70c6f0 | [] | no_license | tytgat/ConcurrentMultithreading | 5e1fd8020712c9b326f5c22b08c4f63ae7da11f0 | d5cc538199ebf67756355fce2c28c15cdd50af34 | refs/heads/master | 2020-04-02T01:48:31.607540 | 2019-01-03T13:36:15 | 2019-01-03T13:36:15 | 153,876,111 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,659 | cpp | #include "pch.h"
#include <iostream>
#include <ctime>
#define SIZE 1500
using namespace std;
int roundFloat(float val) {
return (int)(val + 0.5);
}
void printMat(float ** M) {
for (int i = 0; i < SIZE; i++) {
for (int j = 0; j < SIZE; j++) {
cout << float(int(M[i][j] * 100)) / 100 << ", ";
}
cout << endl;
}
cout << endl;
}
int checkResult(float** L, float ** U, float ** M) {
float ** C = new float*[SIZE];
for (int i = 0; i < SIZE; i++) {
C[i] = new float[SIZE];
}
#pragma omp parallel for shared(C)
for (int i = 0; i < SIZE; i++) {
#pragma omp parallel for shared(C,i)
for (int j = 0; j < SIZE; j++) {
float sum = 0;
for (int k = 0; k < SIZE; k++) {
sum += L[i][k] * U[k][j];
}
C[i][j] = sum;
}
}
for (int i = 0; i < SIZE; i++) {
for (int j = 0; j < SIZE; j++) {
if (roundFloat(C[i][j]) != roundFloat(M[i][j])) {
for (int i = 0; i < SIZE; i++) {
free(C[i]);
}
free(C);
return false;
}
}
}
for (int i = 0; i < SIZE; i++) {
free(C[i]);
}
free(C);
return true;
}
int main()
{
/*Init Mat*/
float ** L = new float*[SIZE];
float ** U = new float*[SIZE];
float ** M = new float*[SIZE];
for (int i = 0; i < SIZE; i++) {
L[i] = new float[SIZE];
U[i] = new float[SIZE];
M[i] = new float[SIZE];
}
/*Fill Mat*/
for (int i = 0; i < SIZE; i++) {
for (int j = 0; j < SIZE; j++) {
M[i][j] = float(rand() % 10);
L[i][j] = 0;
U[i][j] = 0;
}
}
clock_t begin = clock();
for (int i = 0; i < SIZE; i++) {
{
//Para U computing --> U[i][k] is modified but never used (i <> j)
#pragma omp parallel for shared(U)
/* U */
for (int k = i; k < SIZE; k++) {
float sum = 0;
//Para sum of values
#pragma omp parallel for reduction(+:sum)
for (int j = 0; j < i; j++) {
sum += (L[i][j] * U[j][k]);
}
U[i][k] = M[i][k] - sum;
}
//Para L computing --> L[i][k] is modified but never used (i <> j)
#pragma omp parallel for shared(L)
/* L */
for (int k = i; k < SIZE; k++) {
if (i == k)
L[i][i] = 1; // Diag
else {
float sum = 0;
//Para sum of values
#pragma omp parallel for reduction(+:sum)
for (int j = 0; j < i; j++) {
sum += (L[k][j] * U[j][i]);
}
L[k][i] = (M[k][i] - sum) / U[i][i];
}
}
}
}
clock_t end = clock();
float elapsed_secs = float(end - begin) / CLOCKS_PER_SEC;
cout << elapsed_secs << "s" << endl;
cout << endl;
if (checkResult(L,U,M)) {
cout << "result OK" << endl;
}
else {
cout << "Wrong result" << endl;
}
/*Free Mat*/
for (int i = 0; i < SIZE; i++) {
free(L[i]);
free(U[i]);
free(M[i]);
}
free(L);
free(U);
free(M);
}
| [
"tytgatkarel@gmail.com"
] | tytgatkarel@gmail.com |
3680d7182c35ffa5ab40c1cd75bf6594e0eaa0b0 | ba27825e4fd7452fe42f9969adbd213008fb09fe | /Train/summer 2017/CF_contest/419 - 430/424/B.cpp | 7d36cce2317cad4e57472ebf64799e6062f41fdc | [
"MIT"
] | permissive | mohamedGamalAbuGalala/Practice | 2e77a912ee366f633becf0f69562a068af138849 | 2a5fa3bdaf995d0c304f04231e1a69e6960f72c8 | refs/heads/master | 2022-07-18T23:25:08.717496 | 2020-05-25T07:51:40 | 2020-05-25T07:51:40 | 111,872,626 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,181 | cpp | #include <bits/stdc++.h>
using namespace std;
// input handle
#define in(n) scanf("%d",&n)
#define ins(n) scanf("%s",n)
#define inc(n) scanf("%c",&n)
#define inf(n) scanf("%lf",&n)
#define inl(n) scanf("%lld",&n)
#define ot(x) printf("%d ", x)
#define ots(x) printf("%s ", x)
#define otc(x) printf("%c", x)
#define ln() printf("\n")
#define otl(x) printf("%lld ", x)
#define otf(x) printf("%.2lf ", x)
// helpers defines
#define all(v) v.begin(), v.end()
#define sz(v) ((int)((v).size()))
#define ssz(ss) ((int)strlen(s))
#define pb push_back
#define mem(a,b) memset(a,b,sizeof(a))
//helpers
void file() {
#ifndef ONLINE_JUDGE
freopen("in.txt", "r", stdin);
#endif
}
// constants
const int MN = 1e6 + 1e5;
const int MW = 1e3 + 5;
const int OO = 1e9 + 5;
typedef long long int lli;
typedef pair<int, int> ii;
typedef vector<int> vi;
typedef vector<ii> vii;
typedef pair<lli, string> lls;
int main() {
file();
char l[27], ll[27], s[1001];
map<char, char> mp;
ins(l), ins(ll), ins(s);
for (int i = 0; i < 26; ++i)
mp[l[i]] = ll[i], mp[toupper(l[i])] = toupper(ll[i]);
for (int i = 0; i < ssz(s); ++i)
if (isalpha(s[i]))
otc(mp[s[i]]);
else
otc(s[i]);
return 0;
}
| [
"Mohamed.abugalala@gmail.com"
] | Mohamed.abugalala@gmail.com |
0c3b68bcea098f037b426d41de02d0492c2d6fa8 | a353520a6e3a4e8fdde8daecf57631e8d78b94fb | /Project 03 MFCC for Vowel Recognition/Codes/render.cpp | 1bf6b71f5e2e3f6dbc177bb999cbd46389cfdb2a | [] | no_license | gtanvir/QmRTDSPCourseworks | 048a316c97f978cb4e0ee6a362f0120a54bc9ce8 | 1fefbad92a58066769c651423a4e590209dc3eeb | refs/heads/master | 2022-12-23T08:10:13.602156 | 2020-09-29T02:05:54 | 2020-09-29T02:05:54 | 298,788,853 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 7,376 | cpp | // ECS732 Real-Time DSP
// School of Electronic Engineering and Computer Science
// Queen Mary University of London
// Spring 2019
// Final Project - Bengali Vowel recogntion
// Student No: 180715305
#include <Bela.h>
#include <ne10/NE10.h>
#include <cmath>
#include <cstring>
#include <SampleLoader.h>
#include <SampleData.h>
#define BUFFER_SIZE 512
#define numberOfFilterPoints 28
#define totalNumberOfFilters 26
#define totalLength 186
float gWindowBuffer[BUFFER_SIZE]; // Buffer for 1 window of samples
int gWindowBufferPointer = 0; // Tells us how many samples in buffer
// -----------------------------------------------
// These variables used internally in the example:
int gFFTSize;
// GPIO
int gOutputPinLo = 0, gOutputPinHi = 1; // LEDs
int gLEDLoOutput = LOW, gLEDHiOutput = LOW;
// Sample info
string gFilename = "M3AA.wav"; // Name of the sound file (in project folder)
float *gSampleBuffer; // Buffer that holds the sound file
int gSampleBufferLength; // The length of the buffer in frames
int gReadPointer = 0; // Position of the last frame we played
// FFT vars
ne10_fft_cpx_float32_t* timeDomainIn;
ne10_fft_cpx_float32_t* timeDomainOut;
ne10_fft_cpx_float32_t* frequencyDomain;
ne10_fft_cfg_float32_t cfg;
// Thread for FFT processing
AuxiliaryTask gFFTTask;
void process_fft_background(void *);
//Filter Bank Bandpoints
int fbBandPoints[numberOfFilterPoints] = {5,7,10,12,14,17,20,23,26,30,34,38,43,48,54,60,66,73,81,89,98,107,118,129,141,155,169,185};
float filterBank[totalNumberOfFilters][totalLength];
//Power, Filter Energy and DCT
float powerSpectrum[BUFFER_SIZE/2+1] = {0};
float filterEnergy[totalNumberOfFilters] = {0};
float dctFilterEnergy[totalNumberOfFilters];
float mfcc[13];
float sum = 0;
//Preemphasis
float gPreviousInput = 0;
float out = 0;
// setup() is called once before the audio rendering starts.
// Return true on success; returning false halts the program.
bool setup(BelaContext *context, void *userData)
{
// Check the length of the audio file and allocate memory
gSampleBufferLength = getNumFrames(gFilename);
if(gSampleBufferLength <= 0) {
rt_printf("Error loading audio file '%s'\n", gFilename.c_str());
return false;
}
gSampleBuffer = new float[gSampleBufferLength];
// Make sure the memory allocated properly
if(gSampleBuffer == 0) {
rt_printf("Error allocating memory for the audio buffer.\n");
return false;
}
// Load the sound into the file (note: this example assumes a mono audio file)
getSamples(gFilename, gSampleBuffer, 0, 0, gSampleBufferLength);
rt_printf("Loaded the audio file '%s' with %d frames (%.1f seconds)\n",
gFilename.c_str(), gSampleBufferLength,
gSampleBufferLength / context->audioSampleRate);
// Set up the FFT
gFFTSize = BUFFER_SIZE;
timeDomainIn = (ne10_fft_cpx_float32_t*) NE10_MALLOC (gFFTSize * sizeof (ne10_fft_cpx_float32_t));
timeDomainOut = (ne10_fft_cpx_float32_t*) NE10_MALLOC (gFFTSize * sizeof (ne10_fft_cpx_float32_t));
frequencyDomain = (ne10_fft_cpx_float32_t*) NE10_MALLOC (gFFTSize * sizeof (ne10_fft_cpx_float32_t));
cfg = ne10_fft_alloc_c2c_float32_neon (gFFTSize);
memset(timeDomainOut, 0, gFFTSize * sizeof (ne10_fft_cpx_float32_t));
// Set up the thread for the FFT
gFFTTask = Bela_createAuxiliaryTask(process_fft_background, 50, "bela-process-fft");
// Calculate a Hann window
for(int n = 0; n < gFFTSize; n++) {
gWindowBuffer[n] = 0.5f * (1.0f - cosf(2.0 * M_PI * n / (float)(gFFTSize - 1)));
}
//Calculating Mel Triangle Overlapping Filters
for (int i=0; i<totalNumberOfFilters; i++) {
for (int j=0; j<totalLength; j++) {
if(j<fbBandPoints[i] || j>fbBandPoints[i+2])
filterBank[i][j] = 0;
else if (j>=fbBandPoints[i] && j<fbBandPoints[i+1])
filterBank[i][j] = (float) (j-fbBandPoints[i])/(fbBandPoints[i+1]-fbBandPoints[i]);
else if(j == fbBandPoints[i+1])
filterBank[i][j] = 1;
else if (j>fbBandPoints[i+1] && j<=fbBandPoints[i+2])
filterBank[i][j] = (float) (fbBandPoints[i+2]-j)/(fbBandPoints[i+2]-fbBandPoints[i+1]);
}
}
return true;
}
// This function handles the FFT processing in this example once the buffer has
// been assembled.
void process_fft(float *buffer)
{
// Copy buffer into FFT input
for(int n = 0; n < BUFFER_SIZE; n++) {
timeDomainIn[n].r = (ne10_float32_t) buffer[n] * gWindowBuffer[n];
timeDomainIn[n].i = 0;
}
// Run the FFT
ne10_fft_c2c_1d_float32_neon (frequencyDomain, timeDomainIn, cfg, 0);
//Calculating Power
for (int i = 0; i < (1+BUFFER_SIZE/2); i++) {
powerSpectrum[i] = ((frequencyDomain[i].r * frequencyDomain[i].r) + (frequencyDomain[i].i * frequencyDomain[i].i)) / BUFFER_SIZE;
}
//Calculating Energy in each of the 26 Mel filters
for(int i=0; i<totalNumberOfFilters; i++) {
for(int j=(fbBandPoints[i]+1); j<fbBandPoints[i+2]; j++) {
filterEnergy[i] = filterEnergy[i] + powerSpectrum[j] * filterBank[i][j];
}
}
//Calculating Log Filter Energy
for(int i=0; i<totalNumberOfFilters; i++) {
filterEnergy[i] = logf(filterEnergy[i]);
}
//MFCC calculation by DCT
for(int i=0; i<totalNumberOfFilters; i++) {
for(int j=0; j<totalNumberOfFilters; j++) {
//dctFilterEnergy[i] = 1;
dctFilterEnergy[i] = dctFilterEnergy[i] + filterEnergy[j] * cosf((M_PI/totalNumberOfFilters)*(j+0.5)*i);
}
}
for(int i=1; i<13; i++) {
rt_printf("%0.2f ", dctFilterEnergy[i]);
}
rt_printf("\n\r");
//-------------------Algorithm of vowel recogntion should be here ------------------//
//-------------------------------NOT IMPLEMENTED------------------------------------//
//Clearing up the values of Power, filterEnergy and MFCC current Frame to store the next coming one
for(int i=0; i<(1+BUFFER_SIZE/2); i++) {
powerSpectrum[i] = 0;
}
for(int i=0; i<totalNumberOfFilters; i++) {
filterEnergy[i] = 0;
dctFilterEnergy[i] = 0;
}
}
// This function runs in an auxiliary task on Bela, calling process_fft
void process_fft_background(void *)
{
process_fft(gWindowBuffer);
}
// render() is called regularly at the highest priority by the audio engine.
// Input and output are given from the audio hardware and the other
// ADCs and DACs (if available). If only audio is available, numMatrixFrames
// will be 0.
void render(BelaContext *context, void *userData)
{
for(unsigned int n = 0; n < context->audioFrames; n++) {
//float in = gSampleBuffer[gReadPointer];
float in = audioRead(context, n, 0);
out = in - 0.95 * gPreviousInput; //Preemphasis
/*
if(++gReadPointer >= gSampleBufferLength)
gReadPointer = 0;
*/
gWindowBuffer[gWindowBufferPointer++] = in;
//When Buffer is full, initiate the FFT task
if(gWindowBufferPointer == BUFFER_SIZE) {
gWindowBufferPointer = 0;
Bela_scheduleAuxiliaryTask(gFFTTask);
}
// Copy input to output
for(unsigned int channel = 0; channel < context->audioOutChannels; channel++) {
audioWrite(context, n, channel, in);
}
gPreviousInput = in;
}
}
// cleanup() is called once at the end, after the audio has stopped.
// Release any resources that were allocated in setup().
void cleanup(BelaContext *context, void *userData)
{
NE10_FREE(timeDomainIn);
NE10_FREE(timeDomainOut);
NE10_FREE(frequencyDomain);
NE10_FREE(cfg);
}
| [
"gtanvir027@gmail.com"
] | gtanvir027@gmail.com |
ee9fea8559a1deb27a45c6d2c0f3ef04030e56ad | 4d5489bca6e9e787d66fedbabaf70f80582565f4 | /PixelLoading/src/ofApp.h | 7db6ca9172fdc06d06f9af665624d14bf2d77041 | [] | no_license | Dronomycom/tests-ariel | 31d7813c30d3bc03bacee8c20da58a8b2de7c356 | 426cb7406ebf36c25d5589c73ecc40005449c04d | refs/heads/master | 2020-03-17T06:07:53.884662 | 2018-09-26T15:31:44 | 2018-09-26T15:31:44 | 133,342,622 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 284 | h | #pragma once
#include "ofMain.h"
#include "ThreadedPixelsLoader.h"
class ofApp : public ofBaseApp
{
public:
void setup();
void draw();
protected:
ThreadedPixelsLoader pixelsLoader;
void pixelsLoaderEvent(ThreadedPixelsLoader::PixelsLoaderEntry &entry);
};
| [
"ariel@chronotext.org"
] | ariel@chronotext.org |
42d9f7a4be0d078fff81df29b97e6e12ed07ed04 | 260a986070c2092c2befabf491d6a89b43b8c781 | /coregame/gamebabel.cpp | f7db6cd410aa284266c991274e96439044db9455 | [] | no_license | razodactyl/darkreign2 | 7801e5c7e655f63c6789a0a8ed3fef9e5e276605 | b6dc795190c05d39baa41e883ddf4aabcf12f968 | refs/heads/master | 2023-03-26T11:45:41.086911 | 2020-07-10T22:43:26 | 2020-07-10T22:43:26 | 256,714,317 | 11 | 2 | null | 2020-04-20T06:10:20 | 2020-04-18T09:27:10 | C++ | UTF-8 | C++ | false | false | 5,026 | cpp | ///////////////////////////////////////////////////////////////////////////////
//
// Copyright 1997-1999 Pandemic Studios, Dark Reign II
//
// Game-Play Engine
//
// 27-APR-1998
//
///////////////////////////////////////////////////////////////////////////////
//
// Includes
//
#include "gamebabel.h"
#include "propobj.h"
#include "unitobj.h"
#include "projectileobj.h"
#include "deliveryprojectileobj.h"
#include "resourceobj.h"
#include "objective.h"
#include "explosionobj.h"
#include "offmapteamobj.h"
#include "offmapbombobj.h"
#include "offmapspawnobj.h"
#include "offmapstrikeobj.h"
#include "restoreobj.h"
#include "spyobj.h"
#include "transportobj.h"
#include "trapobj.h"
#include "wallobj.h"
#include "parasiteobj.h"
#include "markerobj.h"
///////////////////////////////////////////////////////////////////////////////
//
// Namespace GameBabel - Translates between identifiers and types
//
namespace GameBabel
{
//
// CoreGameBabel
//
// Babel for all core game code-classes
//
static GameObjType* CoreGameBabel(GameIdent &classId, const char *name, FScope *fScope)
{
GameObjType *newType = NULL;
// Allocate type specified in identifier
switch (classId.crc)
{
case 0x9BC68378: // "Prop"
newType = new PropObjType(name, fScope);
break;
case 0xD9A182E4: // "Unit"
newType = new UnitObjType(name, fScope);
break;
case 0x4CD1BE27: // "Resource"
newType = new ResourceObjType(name, fScope);
break;
case 0xFEA41B2C: // "Projectile"
newType = new ProjectileObjType(name, fScope);
break;
case 0x219C4693: // "Explosion"
newType = new ExplosionObjType(name, fScope);
break;
case 0x03515E3F: // "DeliveryProjectile"
newType = new DeliveryProjectileObjType(name, fScope);
break;
case 0x56505D1E: // "Objective"
newType = new Objective::Type(name, fScope);
break;
case 0xF4645984: // "OffMapTeam"
newType = new OffMapTeamObjType(name, fScope);
break;
case 0x39C8F28B: // "OffMapBomb"
newType = new OffMapBombObjType(name, fScope);
break;
case 0x49BDBF48: // "OffMapSpawn"
newType = new OffMapSpawnObjType(name, fScope);
break;
case 0x96519EAE: // "OffMapStrike"
newType = new OffMapStrikeObjType(name, fScope);
break;
case 0x5463CB0D: // "Restore"
newType = new RestoreObjType(name, fScope);
break;
case 0xA98F22B7: // "Spy"
newType = new SpyObjType(name, fScope);
break;
case 0xDFB7F0C8: // "Transport"
newType = new TransportObjType(name, fScope);
break;
case 0x88AD3389: // "Trap"
newType = new TrapObjType(name, fScope);
break;
case 0x93515F2D: // "Wall"
newType = new WallObjType(name, fScope);
break;
case 0xDC7624D3: // "Parasite"
newType = new ParasiteObjType(name, fScope);
break;
case 0xB1A0801B: // "Marker"
newType = new MarkerObjType(name, fScope);
break;
}
return (newType);
}
// Is system initialized
static Bool sysInit = FALSE;
// Used for callback registration
struct BabelData
{
// The babel function
BabelCallBack *callBack;
// NList node
NList<BabelData>::Node node;
};
// List of all registered babels
static NList<BabelData> babels(&BabelData::node);
//
// RegisterBabel
//
// Register a babel callback
//
void RegisterBabel(BabelCallBack *callBack)
{
ASSERT(sysInit);
// Create new babel data
BabelData *babel = new BabelData;
// Set the callback
babel->callBack = callBack;
// Add to the list
babels.Prepend(babel);
}
//
// NewGameObjectType
//
// Returns a new object type instance, or NULL if the class id is not recognized
//
GameObjType* NewGameObjType(GameIdent &classId, const char *name, FScope *fScope)
{
ASSERT(sysInit);
GameObjType *newType = NULL;
// Step through each registered babel
for (NList<BabelData>::Iterator i(&babels); *i && !newType; i++)
{
// See if this babel knows about this control class
newType = (*i)->callBack(classId, name, fScope);
}
return (newType);
}
//
// Init
//
// Initialize the game babel system
//
void Init()
{
ASSERT(!sysInit);
// System is now initialized
sysInit = TRUE;
// Register the core game babel
RegisterBabel(CoreGameBabel);
}
//
// Done
//
// Shutdown the game babel system
//
void Done()
{
ASSERT(sysInit);
// Delete all registered babel data
babels.DisposeAll();
// System is now shutdown
sysInit = FALSE;
}
}
| [
"razodactyl@gmail.com"
] | razodactyl@gmail.com |
3a0d9b0e956c01822bf60e27163d4e031a2e7cc2 | de9e2f4c77c187f6222969d2f50c919d5d2648ee | /unique_characters.cpp | 73d7f8b8f23a892d5dffac9db3596e819c300c57 | [] | no_license | YhgzXxfz/lintcode | fb43ce42718448fed1c97c5b897f400145a0c318 | e013dc70f272c914b08c3bdc1b560e8c04989b60 | refs/heads/master | 2020-04-09T06:05:08.920210 | 2017-10-28T13:58:31 | 2017-10-28T13:58:31 | 68,045,753 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 394 | cpp | class Solution {
public:
/**
* @param str: a string
* @return: a boolean
*/
bool isUnique(string &str) {
// write your code here
int len = str.length();
for (int i = 0; i < len; ++i) {
for (int j = i+1; j < len; ++j) {
if (str[i] == str[j]) return false;
}
}
return true;
}
};
| [
"qingfeiyou@gmail.com"
] | qingfeiyou@gmail.com |
abfeb12683fe51573808854be1405d90fc41fcdc | 8c4ee0f21dc1cdbf14a1659534cc9b2e9152cf39 | /XXbgService/XXbgService/CCentOneReader.cpp | 29d66bbe38d9592498bbac61a2156902f7e7ed27 | [] | no_license | ruanjh959/Paperless | 5d05b8b819d4460228cbc72e1a1eed9affb8410d | a26313738db05041379526753c50cad01d812357 | refs/heads/master | 2021-01-01T16:46:48.900301 | 2017-07-26T14:11:49 | 2017-07-26T14:11:49 | 97,918,541 | 0 | 4 | null | 2017-07-26T14:11:50 | 2017-07-21T07:20:06 | C++ | GB18030 | C++ | false | false | 2,312 | cpp | #include "CCentOneReader.h"
#include "MyTTrace.h"
#include "utils.h"
// 重写,获取身份证芯片信息
int CCentOneReader::MyReadIDCardInfo(const char *pSaveHeadPicFilenm, MYPERSONINFO *pPersonInfo)
{
GtWriteTrace(30, "%s:%d: 进入获取身份证芯片信息函数!", __FUNCTION__, __LINE__);
if (pSaveHeadPicFilenm == NULL)
{
return -1;
}
// 升腾身份证识读信息结构体
PERSONINFO pPerson;
memset( &pPerson, 0, sizeof(PERSONINFO) );
int nRet = 0;
// 读取配置文件中的配置
char sDiv[32] = {0};
char sBp[32] = {0};
char sBaud[32] = {0};
char sTimeOut[32] = {0};
// 当前程序运行路径
CString sIniFilePath;
sIniFilePath = GetAppPath() + "\\win.ini";
// 临时字符串
char sTmpString[32] = {0};
// 设备连接端口
GetPrivateProfileString("CentermOneMachine", "Device", "HID", sTmpString, sizeof(sTmpString)-1, sIniFilePath);
memcpy(sDiv, (const char*)sTmpString, sizeof(sDiv)-1);
// BP口
GetPrivateProfileString("CentermOneMachine", "BpNo", "9", sTmpString, sizeof(sTmpString)-1, sIniFilePath);
memcpy(sBp, (const char*)sTmpString, sizeof(sBp)-1);
// 串口波特率
GetPrivateProfileString("CentermOneMachine", "Baud", "115200", sTmpString, sizeof(sTmpString)-1, sIniFilePath);
memcpy(sBaud, (const char*)sTmpString, sizeof(sBaud)-1);
// 寻卡超时时间
GetPrivateProfileString("CentermOneMachine", "TimeOut", "5", sTmpString, sizeof(sTmpString)-1, sIniFilePath);
memcpy(sTimeOut, (const char*)sTmpString, sizeof(sTimeOut)-1);
GtWriteTrace(30, "%s:%d: 参数: sDiv=[%s], sBp=[%s], sBaud=[%s], sTimeOut=[%s], pSaveHeadPicFilenm=[%s]",
__FUNCTION__, __LINE__, sDiv, sBp, sBaud, sTimeOut, pSaveHeadPicFilenm);
// 调高拍仪接口获取身份证信息
nRet = CT_ReadIDCard( sDiv, sBp, atoi(sBaud), atoi(sTimeOut), (char *)pSaveHeadPicFilenm, &pPerson );
GtWriteTrace(30, "%s:%d: 调身份证识读接口返回值 nRet = [%d]!", __FUNCTION__, __LINE__, nRet);
switch (nRet)
{
case 0:
// 读取成功
nRet = 0;
// 个人信息结构体赋值
memcpy(pPersonInfo, &pPerson, sizeof(PERSONINFO));
break;
case -34:
// 未检测到身份证
nRet = 204;
break;
case -36:
// 未检测到设备
nRet = 203;
break;
default:
break;
}
return nRet;
} | [
"153016910@qq.com"
] | 153016910@qq.com |
feaf01aadca77770f586b72c8b85638b015869fc | d1fd0977ab559b73316407d44852bb21af227e01 | /parser.cpp | 5cd51945b77df4eef72d3382a2abb8e4497ec62d | [] | no_license | jonathan-innis/csce-313-bash | c52897aa2653634e3a8ed007a3ac3b1fb5b0175f | 17a435176e4b207e4df4afef8e604c8e368e35c9 | refs/heads/master | 2020-03-31T00:43:41.093683 | 2018-10-07T20:52:45 | 2018-10-07T20:52:45 | 151,751,913 | 0 | 5 | null | null | null | null | UTF-8 | C++ | false | false | 1,268 | cpp | #include <stdio.h>
#include <stdlib.h>
#include <vector>
#include <string>
#include <string.h>
#include <iostream>
using namespace std;
vector<string> remove_whitespace(vector<string> parsed_line){
for (int i = 0; i < parsed_line.size(); i++){
if (parsed_line[i] == "")
parsed_line.erase(parsed_line.begin() + i);
}
return parsed_line;
}
vector<string> parse_line(string line){
vector<string> parsed_string = {""};
bool single_quote = false;
bool double_quote = false;
int i = 0;
for (char c : line){
if (c == ' ' && !single_quote && !double_quote){
parsed_string.push_back("");
i++;
}
else if ((c == '|' || c == '<' || c == '>') && !single_quote && !double_quote){
parsed_string.push_back(string(1,c));
i++;
parsed_string.push_back("");
i++;
}
else if (c == '\'' && !single_quote) single_quote = true;
else if (c == '\'' && single_quote) single_quote = false;
else if (c == '\"' && !double_quote) double_quote = true;
else if (c == '\"' && double_quote) double_quote = false;
else
parsed_string[i] += c;
}
return remove_whitespace(parsed_string);
} | [
"jonathan.innis.ji@gmail.com"
] | jonathan.innis.ji@gmail.com |
7cf8d66bac9c6fb79a1ef303666228ca89de357d | aca1b1a95896329be8287a08088d1ca78f9cc4b5 | /Classes/sc_map.cpp | f7be890fe5de15460e449609d0fc74b0643a83ed | [] | no_license | sebesbal/simciv2 | c748c092c85116552cb0f12eeb3c726a01340bd5 | be91acdb72e2f7230dc4b5e6c95b2696c3d02d74 | refs/heads/master | 2022-12-07T23:58:21.011544 | 2022-11-29T16:55:20 | 2022-11-29T16:55:20 | 40,497,759 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 7,544 | cpp | #include "stdafx.h"
#include "sc_map.h"
#include "assert.h"
#include <queue>
#include "trade.h"
#include "world.h"
using namespace std;
namespace simciv
{
int product_count;
Area::Area(): map(nullptr)
, road_level(0)
, mil_level(0)
, industry(nullptr)
, has_factory(false)
{
}
AreaData& Area::data(Product* p)
{
return world->get_trade(this, p->id);
}
AreaData& Area::data(int prod_id)
{
return world->get_trade(this, prod_id);
}
std::vector<Area*> Area::sorted_adjs()
{
std::vector<Area*> result(8, NULL);
if (road_level == 0) return result;
for (auto r: roads)
{
Area* b = r->other(this);
if (b->road_level)
{
int d = dir(r);
result[d] = b;
}
}
return result;
}
std::vector<Road*> Area::sorted_roads()
{
std::vector<Road*> result(8, NULL);
if (road_level == 0) return result;
for (auto r : roads)
{
Area* b = r->other(this);
if (b->road_level)
{
int d = dir(r);
result[d] = r;
}
}
return result;
}
std::vector<Area*> Area::connected_adjs()
{
std::vector<Area*> result;
if (road_level == 0) return result;
for (auto r : roads)
{
Area* b = r->other(this);
if (b->road_level)
{
result.push_back(b);
}
}
return result;
}
//#define lofusz(col, w) col.r *= w; col.g *= w; col.b *= w;
//void Area::update_colors()
//{
// color_in.clear();
// color_out.clear();
// if (!industry)
// {
// return;
// }
// //const cocos2d::Color4F colsou[4] = { Color4F(1, 0, 0, 1), Color4F(0, 1, 0, 1), Color4F(0, 0, 1, 1), Color4F(0.7, 0.7, 0.7, 1) };
// ProductionRule& r = industry->prod_rules[0];
// for (auto& p : r.input)
// {
// color_in.push_back(world->colors[p.first]);
// }
// for (auto& p : r.output)
// {
// color_out.push_back(world->colors[p.first]);
// }
// const float fact_w = 5;
// float r_weight = (color_in.size() + color_out.size()) / 4.0f;
// //float weight = (color_in.size() + color_out.size() + (has_factory ? fact_w : 0)) / (fact_w + 4.0f);
// float weight = has_factory ? 1 : 0.4;
// rad_1 = 0.8 / 2 * r_weight;
// rad_2 = rad_1 + 0.15;
// for (auto& c : color_in)
// {
// lofusz(c, weight);
// }
// for (auto& c : color_out)
// {
// lofusz(c, weight);
// }
//}
Road* Area::road(Area* b)
{
for (auto r : roads)
{
if (r->other(this) == b) return r;
}
return nullptr;
}
int Area::dir(Area * a)
{
return dir(road(a));
}
int Area::dir(Road * r)
{
if (!r) return 8;
if (r->a == this) return r->dir;
else return (r->dir + 4) % 8;
}
Road * Area::road(int dir)
{
for (Road* r : roads)
{
if (this->dir(r) == dir) return r;
}
return NULL;
}
Area * Area::area(int dir)
{
for (Road* r : roads)
{
if (this->dir(r) == dir) return r->other(this);
}
return NULL;
}
//// Node for graph algorithms (eg. Dijstra)
//struct Node
//{
// Node() : area(NULL), parent(NULL), color(0), d(0) {}
// Road* parent;
// Area* area;
// double d;
// int color; // 0 = black, unvisited, 1 = gray, opened, 2 = white, visited
//};
//// Graph
//struct RoadMap
//{
// Node* g;
// int time;
//};
class NodeComparator
{
public:
bool operator()(const Node* a, const Node* b)
{
return (a->d > b->d);
}
};
Map::Map() : time(0)
{
}
void Map::create(int width, int height)
{
_width = width;
_height = height;
for (int y = 0; y < height; ++y)
{
for (int x = 0; x < width; ++x)
{
Area* a = new Area();
a->id = _areas.size();
a->x = x;
a->y = y;
_areas.push_back(a);
if (x > 0)
{
add_road(a, get_area(x - 1, y));
if (y > 0)
{
add_road(a, get_area(x - 1, y - 1));
}
}
if (y > 0)
{
add_road(a, get_area(x, y - 1));
if (x < width - 1)
{
add_road(a, get_area(x + 1, y - 1));
}
}
}
}
}
void Map::add_road(Area* a, Area* b)
{
bool orto = a->x == b->x || a->y == b->y;
Road* r = new Road();
r->cost = orto ? 1.0 : 1.414;
r->a = a;
r->b = b;
r->dir = Road::direction(b->x - a->x, b->y - a->y);
r->id = _roads.size();
_roads.push_back(r);
a->roads.push_back(r);
b->roads.push_back(r);
a->adjs.push_back(b);
b->adjs.push_back(a);
}
const double trans_rate = 1.0;
Area* Map::get_area(int x, int y)
{
return _areas[y * _width + x];
}
//AreaData& Map::get_trade(Area* a, int id)
//{
// return _trade_maps[id]->get_trade(a);
//}
void Map::update()
{
//static int k = 0;
//if (k++ % 1 == 0)
//{
// for (TradeMap* product: _trade_maps)
// {
// product->update();
// }
//}
}
void Map::create_road_map(Area* a)
{
int nn = _areas.size();
Node* g = new Node[nn];
if (a->map)
{
delete a->map;
}
a->map = new RoadMap();
a->map->time = time;
a->map->g = g;
a->map->invalidated = false;
for (int i = 0; i < nn; ++i)
{
g[i].area = _areas[i];
}
for (int i = 0; i < nn; ++i)
{
Node& n = g[i];
n.color = 0;
n.d = std::numeric_limits<double>::max();
n.parent = NULL;
}
Node* src = &g[a->id];
std::vector<Node*> Q;
// std::make_heap(Q.begin(), Q.end());
src->color = 1;
src->d = 0;
Q.push_back(src);
// std::push_heap(Q.begin(), Q.end());
auto pr = [](Node* a, Node* b) {
return a->d > b->d;
};
while (Q.size() > 0)
{
//Node* n = Q.front();
std::pop_heap(Q.begin(), Q.end(), pr);
Node* n = Q.back();
Q.pop_back();
n->color = 2;
Area* a = n->area;
for (Road* r : a->roads)
{
Area* b = r->other(a);
Node* m = &g[b->id];
if (m->color < 2) // if m is not visited yet
{
double new_d = n->d + r->cost;
if (new_d < m->d)
{
m->d = new_d;
m->parent = r;
if (m->color == 0)
{
m->color = 1;
Q.push_back(m);
std::push_heap(Q.begin(), Q.end(), pr);
}
else
{
std::make_heap(Q.begin(), Q.end(), pr);
}
}
}
}
}
}
Route* Map::create_route(Area* start, Area* dest)
{
Route* route = new Route();
RoadMap*& map = start->map;
if (!map)
{
create_road_map(start);
}
if (!dest->map)
{
create_road_map(dest);
}
Node* n = &map->g[dest->id];
Area* a = dest;
route->a = start;
route->b = dest;
route->cost = 0;
while (n->parent)
{
Road* r = n->parent;
route->roads.push_back(r);
route->cost += r->cost;
a = r->other(a);
n = &map->g[a->id];
}
auto& v = route->roads;
std::reverse(v.begin(), v.end());
return route;
}
double Map::distance(Area* start, Area* dest)
{
double result = 0;
RoadMap*& map = start->map;
if (!map)
{
create_road_map(start);
}
Node* n = &map->g[dest->id];
Area* a = dest;
while (n->parent)
{
Road* r = n->parent;
result += r->cost;
a = r->other(a);
n = &map->g[a->id];
}
return result;
}
void Map::update_roads()
{
for (Road* r : _roads)
{
double level = (r->a->road_level + r->b->road_level) / 2.0;
if (r->a->road_level > 0 && r->b->road_level > 0) level = 20;
else level = 0;
r->cost = r->base_cost * pow(0.5, level);
}
}
int Road::direction(int x, int y)
{
#define dir(i, j, d) if (x == i && y == - j) return d; else
dir(-1, 0, 0) \
dir(-1, -1, 1) \
dir(0, -1, 2) \
dir(1, -1, 3) \
dir(1, 0, 4) \
dir(1, 1, 5) \
dir(0, 1, 6) \
dir(-1, 1, 7) \
dir(0, 0, 8);
#undef dir
}
std::vector<Area*> Route::areas()
{
std::vector<Area*> result;
Area* a = this->a;
result.push_back(a);
for (Road* r : roads)
{
a = r->other(a);
result.push_back(a);
}
return result;
}
} | [
"sebesbal@gmail.com"
] | sebesbal@gmail.com |
6d80ee897c6e54a4f810333aa2a3f16c4d9fdb74 | 6cede427078f41da0e0ebb4d031cb34e9479cd40 | /src/TestPlugin.h | 35b2624ddc0457ed4413135b986b21037678831a | [] | no_license | masters-info-nantes/madjan | 48518efa962407dee764f86422ebdfccf71bdbb4 | 9e756d77ce33a0a8ccd5e828540bb270b9d69027 | refs/heads/master | 2020-03-27T02:48:11.517646 | 2014-12-16T06:57:51 | 2014-12-16T06:57:51 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,344 | h | #ifndef __TEST_PLUGIN__
#define __TEST_PLUGIN__
#include <cppunit/TestCase.h>
#include <cppunit/extensions/HelperMacros.h>
#include "plugin.h"
class TestPlugin : public CppUnit::TestFixture {
CPPUNIT_TEST_SUITE(TestPlugin);
CPPUNIT_TEST(addPawnOk);
CPPUNIT_TEST(addPawnNull);
CPPUNIT_TEST(existPawnEmptyOk);
CPPUNIT_TEST(existPawnEmptyKo);
CPPUNIT_TEST(existPawnFillOk);
CPPUNIT_TEST(existPawnFillKo);
CPPUNIT_TEST(getNewPawnOk);
CPPUNIT_TEST(getNewPawnKo);
CPPUNIT_TEST(getNewPawnOkAroundLess8);
CPPUNIT_TEST(getNewPawnKoAroundLess8);
CPPUNIT_TEST(getNewPawnEmptyAround);
CPPUNIT_TEST(getNewPawnFromPawnNotInPlugin);
CPPUNIT_TEST(getNewPawnTargetPawnNotInPlugin);
CPPUNIT_TEST(getNewPawnPawnNull);
CPPUNIT_TEST(getNewPawnAroundNull);
CPPUNIT_TEST_SUITE_END();
public:
virtual void setUp();
virtual void tearDown();
void addPawnOk();
void addPawnNull();
void existPawnEmptyOk();
void existPawnEmptyKo();
void existPawnFillOk();
void existPawnFillKo();
void getNewPawnOk();
void getNewPawnKo();
void getNewPawnOkAroundLess8();
void getNewPawnKoAroundLess8();
void getNewPawnEmptyAround();
void getNewPawnFromPawnNotInPlugin();
void getNewPawnTargetPawnNotInPlugin();
void getNewPawnPawnNull();
void getNewPawnAroundNull();
private:
Plugin *testPlugin;
};
#endif | [
"maximepvrt@gmail.com"
] | maximepvrt@gmail.com |
d9c9f924346543215ae0f68f087c89623f29d9e6 | 65c7ed873e61883f15a3fce7bfa45c300d45e1f2 | /include/mimetypes.h | 7d8fcd2135a565b593328da63cda97c69d86da4a | [] | no_license | rburchell/hottpd | 78967ddb093a029664d97d5524d9cd1cd6e209d2 | 1d61c3be0664711eb06b207557b042fbd5a3d89c | refs/heads/master | 2021-01-19T18:07:39.519781 | 2008-04-30T17:30:14 | 2008-04-30T17:30:14 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 401 | h |
#ifndef __MIMETYPES_H__
#define __MIMETYPES_H__
class CoreExport MimeManager : public classbase
{
std::map<std::string, std::string>MimeTypes;
public:
InspIRCd *ServerInstance;
MimeManager(InspIRCd *Instance) : ServerInstance(Instance)
{
}
~MimeManager()
{
}
void AddType(const std::string &ext, const std::string &type);
const std::string GetType(const std::string &ext);
};
#endif
| [
"w00t@10b18fc5-bf86-4583-be7b-d48ff0e42742"
] | w00t@10b18fc5-bf86-4583-be7b-d48ff0e42742 |
50f44bc8b5d46754ec9b24431352c842490c15cc | 77315d0f84ec16354b490e705722df39be47b7b6 | /Source/NoesisGui/Private/GeneratedClasses/NoesisDiscreteInt16KeyFrame.cpp | 69a70b6540d6b2117082ec61f8fd249b24a67a4d | [] | no_license | miaohongbiao/UE4Plugin | d259f57fadf77a5b152249fe303f5947ae4f28b7 | 8ae40958c823e6a5a29f8ff3fef1ba4c4c449623 | refs/heads/master | 2021-06-21T14:26:42.443016 | 2017-02-27T19:48:27 | 2017-02-27T19:48:27 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,474 | cpp | ////////////////////////////////////////////////////////////////////////////////////////////////////
// Noesis Engine - http://www.noesisengine.com
// Copyright (c) 2009-2010 Noesis Technologies S.L. All Rights Reserved.
////////////////////////////////////////////////////////////////////////////////////////////////////
#include "NoesisGuiPrivatePCH.h"
#include "GeneratedClasses/NoesisDiscreteInt16KeyFrame.h"
using namespace Noesis;
using namespace Gui;
UNoesisDiscreteInt16KeyFrame::UNoesisDiscreteInt16KeyFrame(const FObjectInitializer& ObjectInitializer)
: Super(ObjectInitializer)
{
}
void UNoesisDiscreteInt16KeyFrame::SetNoesisComponent(Noesis::Core::BaseComponent* InNoesisComponent)
{
Super::SetNoesisComponent(InNoesisComponent);
Noesis::Gui::DiscreteKeyFrame<NsInt16>* NoesisDiscreteInt16KeyFrame = NsDynamicCast<Noesis::Gui::DiscreteKeyFrame<NsInt16>*>(InNoesisComponent);
check(NoesisDiscreteInt16KeyFrame);
}
void UNoesisDiscreteInt16KeyFrame::BindEvents()
{
Super::BindEvents();
Noesis::Gui::DiscreteKeyFrame<NsInt16>* NoesisDiscreteInt16KeyFrame = NsDynamicCast<Noesis::Gui::DiscreteKeyFrame<NsInt16>*>(NoesisComponent.GetPtr());
check(NoesisDiscreteInt16KeyFrame)
}
void UNoesisDiscreteInt16KeyFrame::UnbindEvents()
{
Super::UnbindEvents();
Noesis::Gui::DiscreteKeyFrame<NsInt16>* NoesisDiscreteInt16KeyFrame = NsDynamicCast<Noesis::Gui::DiscreteKeyFrame<NsInt16>*>(NoesisComponent.GetPtr());
check(NoesisDiscreteInt16KeyFrame)
}
| [
"hcpizzi@hotmail.com"
] | hcpizzi@hotmail.com |
a54531e07765e228c08806220a23f64cb2676cf8 | 0d1645e912fc1477eef73245a75af85635a31bd8 | /sdk/wpp5/include/dbcType.hpp | 2b2b05eb64b81f6a91e98716798bdd1845121b88 | [
"MIT"
] | permissive | qianxj/XExplorer | a2115106560f771bc3edc084b7e986332d0e41f4 | 00e326da03ffcaa21115a2345275452607c6bab5 | refs/heads/master | 2021-09-03T13:37:39.395524 | 2018-01-09T12:06:29 | 2018-01-09T12:06:29 | 114,638,878 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 95 | hpp | #ifndef WPP_DBCTYPE_H
#define WPP_DBCTYPE_H
class dbcType
{
public:
};
#endif //WPP_DBCTYPE_H | [
"qianxj15@sina.com"
] | qianxj15@sina.com |
92aa9f2e61964e74387c712daacbc258bf8814f0 | bb35a689812fc097e5ca6ca6d00509d1a664efb7 | /DeepMimicCore/render/DrawMesh.h | 8661489bcf038cab2f2368ad0252b9ea01d4441c | [
"MIT"
] | permissive | rangsansith/DeepMimic | 9461013c414aac48f1e2e79d1bf19b677af4834e | cc226a2363310683fe8e6753b7fdc75fed1918bd | refs/heads/master | 2020-04-04T15:40:35.425215 | 2018-10-21T15:21:25 | 2018-10-21T15:21:25 | 156,047,284 | 1 | 0 | MIT | 2018-11-04T03:53:36 | 2018-11-04T03:53:36 | null | UTF-8 | C++ | false | false | 2,830 | h | /* Copyright (c) Russell Gillette
* December 2013
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
* to permit persons to whom the Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#pragma once
#include <GL/glew.h>
#include <string>
#include <vector>
#include "render/VertexBuffer.h"
#include "render/IBuffer.h"
#include "render/RenderState.h"
/**
* Storage for all of the vertex attributes needed for rending a single mesh,
* as well as any state data specific to that mesh. (such as object model transforms)
*/
class cDrawMesh
{
public:
cDrawMesh();
~cDrawMesh();
// takes the number of vbos and then a state which has enough space allocated for those vbos
// AND an ibo
void Init(int num_buffers);
void Draw(GLenum primitive = GL_TRIANGLES);
void Draw(GLenum primitive, int idx_start);
void Draw(GLenum primitive, int idx_start, int idx_end);
void AddBuffer(int buff_num);
// these functions copy the the data to our internally managed memory, to modify
// existing memory, use "GetData()
void LoadVBuffer(unsigned int buffer_num, int size, GLubyte *data, int data_offset, int num_attr, tAttribInfo *attr_info); // load data into the specified vertex buffer
void LoadIBuffer(int num_elem, int elem_size, int *data); // load data into the index buffer
// return a pointer to our internal copy of buffer i
const float* GetData(int i) const { return mVbos[i].mLocalData; }
const int* GetIdxData() const { return reinterpret_cast<int*>(mIbo.mLocalData); }
int GetNumVBO() { return static_cast<int>(mVbos.size()); }
void SyncGPU(unsigned int base, size_t extent = 0); // copy the changes to our local data to the GPU
int GetNumFaces() const;
int GetNumVerts() const;
private:
void ResizeBuffer(int size); // resize the internal store for the buffer
GLsizei mNumElem;
cIBuffer mIbo;
cRenderState mState;
std::vector<cVertexBuffer> mVbos;
}; | [
"jasonpeng142@hotmail.com"
] | jasonpeng142@hotmail.com |
d832de928e68430958da90038adcace7cd5ba4f5 | 731d0d3e1d1cc11f31ca8f8c0aa7951814052c15 | /InetSpeed/winrt/Windows.Phone.Devices.Notification.h | 6990c5c66cfb195b8c517e6f26a34afa319b84ae | [] | no_license | serzh82saratov/InetSpeedCppWinRT | 07623c08b5c8135c7d55c17fed1164c8d9e56c8f | e5051f8c44469bbed0488c1d38731afe874f8c1f | refs/heads/master | 2022-04-20T05:48:22.203411 | 2020-04-02T19:36:13 | 2020-04-02T19:36:13 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,571 | h | // C++/WinRT v1.0.170717.1
// Copyright (c) 2017 Microsoft Corporation. All rights reserved.
#pragma once
#include "base.h"
#include "Windows.Foundation.h"
#include "Windows.Foundation.Collections.h"
#include "impl\complex_structs.h"
WINRT_WARNING_PUSH
#include "impl\Windows.Phone.Devices.Notification.2.h"
namespace winrt {
namespace impl {
template <typename D> void consume_Windows_Phone_Devices_Notification_IVibrationDevice<D>::Vibrate(Windows::Foundation::TimeSpan const& duration) const
{
check_hresult(WINRT_SHIM(Windows::Phone::Devices::Notification::IVibrationDevice)->Vibrate(get_abi(duration)));
}
template <typename D> void consume_Windows_Phone_Devices_Notification_IVibrationDevice<D>::Cancel() const
{
check_hresult(WINRT_SHIM(Windows::Phone::Devices::Notification::IVibrationDevice)->Cancel());
}
template <typename D> Windows::Phone::Devices::Notification::VibrationDevice consume_Windows_Phone_Devices_Notification_IVibrationDeviceStatics<D>::GetDefault() const
{
Windows::Phone::Devices::Notification::VibrationDevice result{ nullptr };
check_hresult(WINRT_SHIM(Windows::Phone::Devices::Notification::IVibrationDeviceStatics)->GetDefault(put_abi(result)));
return result;
}
template <typename D>
struct produce<D, Windows::Phone::Devices::Notification::IVibrationDevice> : produce_base<D, Windows::Phone::Devices::Notification::IVibrationDevice>
{
HRESULT __stdcall Vibrate(abi_t<Windows::Foundation::TimeSpan> duration) noexcept override
{
try
{
typename D::abi_guard guard(this->shim());
this->shim().Vibrate(*reinterpret_cast<Windows::Foundation::TimeSpan const*>(&duration));
return S_OK;
}
catch (...)
{
return impl::to_hresult();
}
}
HRESULT __stdcall Cancel() noexcept override
{
try
{
typename D::abi_guard guard(this->shim());
this->shim().Cancel();
return S_OK;
}
catch (...)
{
return impl::to_hresult();
}
}
};
template <typename D>
struct produce<D, Windows::Phone::Devices::Notification::IVibrationDeviceStatics> : produce_base<D, Windows::Phone::Devices::Notification::IVibrationDeviceStatics>
{
HRESULT __stdcall GetDefault(::IUnknown** result) noexcept override
{
try
{
typename D::abi_guard guard(this->shim());
*result = detach_abi(this->shim().GetDefault());
return S_OK;
}
catch (...)
{
*result = nullptr;
return impl::to_hresult();
}
}
};
}
namespace Windows::Phone::Devices::Notification {
inline Windows::Phone::Devices::Notification::VibrationDevice VibrationDevice::GetDefault()
{
return get_activation_factory<VibrationDevice, Windows::Phone::Devices::Notification::IVibrationDeviceStatics>().GetDefault();
}
}
}
namespace std {
template<> struct hash<winrt::Windows::Phone::Devices::Notification::IVibrationDevice> :
winrt::impl::impl_hash_unknown<winrt::Windows::Phone::Devices::Notification::IVibrationDevice> {};
template<> struct hash<winrt::Windows::Phone::Devices::Notification::IVibrationDeviceStatics> :
winrt::impl::impl_hash_unknown<winrt::Windows::Phone::Devices::Notification::IVibrationDeviceStatics> {};
template<> struct hash<winrt::Windows::Phone::Devices::Notification::VibrationDevice> :
winrt::impl::impl_hash_unknown<winrt::Windows::Phone::Devices::Notification::VibrationDevice> {};
}
WINRT_WARNING_POP
| [
"torre_charles@hotmail.com"
] | torre_charles@hotmail.com |
fed3d1f54facc999b81643cb85b9f441e63d9c56 | 366e59d7bb2bae5be91b258c7f7297c33b3a4ea7 | /glsl-compiler/main.cpp | 106ae3ac3161759ff17370aa20126a1ab7692a28 | [] | no_license | kruseborn/shader-compiler | 81a9445950cae47a6c9a791717a068f634d445e6 | 892b7e6b5dcea5a14159f991d525e9ed7d89a696 | refs/heads/master | 2020-04-26T08:18:15.807414 | 2019-10-19T16:34:26 | 2019-10-19T16:34:26 | 173,419,283 | 3 | 0 | null | 2019-10-14T16:19:11 | 2019-03-02T07:49:16 | C++ | UTF-8 | C++ | false | false | 890 | cpp | #include "parsers.h"
#include <cstdio>
#include <string>
#include <fstream>
#include <filesystem>
int main(int argc, char *argv[]) {
if (argc != 2) {
printf("./glsl-compiler filename\n");
return 1;
}
std::string inFile(argv[1]);
std::ifstream fstream(inFile);
if (!fstream.is_open()) {
printf("Could not open file: %s\n", argv[1]);
exit(1);
}
const bool isComputeShader = inFile.find(".comp") != std::string::npos;
const bool isRayTracing = inFile.find(".ray") != std::string::npos;
const bool isRasterization = inFile.find(".glsl") != std::string::npos;
std::filesystem::create_directory("build");
if (isComputeShader) {
parseCompute(inFile, std::move(fstream));
} else if (isRayTracing) {
parseRaytracer(inFile, std::move(fstream));
} else if(isRasterization) {
parseRasterization(inFile, std::move(fstream));
}
return 0;
}
| [
"kruseborn@gmail.com"
] | kruseborn@gmail.com |
4d61b2c9d17ba91ca6487c8785d62428ff3b9165 | 1f032ac06a2fc792859a57099e04d2b9bc43f387 | /3e/77/d6/1c/ceba2e99c2987ff4f20bbf795198685540a36d43a3a3a27a5e5e548758631e32f3b9ae9b47fd7bf0093e61bb7defa6ededf626019219980105c7c2da/sw.cpp | 19f8ab21a11bff07b3cacef7e33feb1a72786dc4 | [] | no_license | SoftwareNetwork/specifications | 9d6d97c136d2b03af45669bad2bcb00fda9d2e26 | ba960f416e4728a43aa3e41af16a7bdd82006ec3 | refs/heads/master | 2023-08-16T13:17:25.996674 | 2023-08-15T10:45:47 | 2023-08-15T10:45:47 | 145,738,888 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,164 | cpp | void build(Solution &s)
{
auto &p = s.addProject("kcat", "1.19.1");
p += Git("https://github.com/kcat/openal-soft", "openal-soft-{v}");
auto &openal = p.addTarget<LibraryTarget>("openal");
openal.ApiName = "SW_AL_API";
openal.setChecks("openal");
openal -=
"Alc/.*"_rr,
"OpenAL32/.*"_rr,
"common/.*"_rr,
"native-tools/.*"_rr,
"config.h.in",
"include/.*"_rr,
"version.h.in";
openal.Private +=
"common"_id,
"OpenAL32"_id,
"OpenAL32/Include"_id,
"Alc"_id
;
openal.Public +=
"include"_id,
"include/AL"_id;
openal +=
"common/.*.c"_rr,
"OpenAL32/.*.c"_rr,
"Alc/ALc.c",
"Alc/ALu.c",
"Alc/alconfig.c",
"Alc/bs2b.c",
"Alc/converter.c",
"Alc/mastering.c",
"Alc/effects/.*.c"_rr,
"Alc/filters/.*.c"_rr,
"Alc/mixer/.*.c"_rr,
"Alc/backends/base.c",
"Alc/backends/loopback.c",
"Alc/backends/null.c",
"Alc/helpers.c",
"Alc/hrtf.c",
"Alc/panning.c",
"Alc/mixvoice.c",
"Alc/ringbuffer.c",
"Alc/uhjfilter.c",
"Alc/ambdec.c",
"Alc/bformatdec.c"
;
openal -=
"Alc/mixer/hrtf_inc.c",
"Alc/mixer/mixer_neon.c"
;
openal += "HAVE_STRUCT_TIMESPEC"_def;
openal += "AL_ALEXT_PROTOTYPES"_def;
if (openal.getBuildSettings().TargetOS.Type == OSType::Windows)
{
openal +=
"Alc/backends/winmm.c",
"Alc/backends/wave.c",
"Alc/backends/wasapi.c",
"Alc/backends/dsound.c";
openal.Variables["HAVE_DSOUND"] = 1;
openal.Variables["HAVE_WINMM"] = 1;
openal.Variables["HAVE_WAVE"] = 1;
openal.Variables["HAVE_WASAPI"] = 1;
openal.Public +=
"Winmm.lib"_lib,
"Ole32.lib"_lib,
"Shell32.lib"_lib,
"User32.lib"_lib
;
openal += "restrict="_def;
openal += "strcasecmp=_stricmp"_def;
openal += "strncasecmp=_strnicmp"_def;
}
openal.Variables["HAVE_SSE"] = 1;
openal.Variables["HAVE_SSE2"] = 1;
openal.Variables["HAVE_SSE3"] = 1;
openal.Variables["HAVE_SSE4_1"] = 1;
openal.Variables["HAVE__CONTROLFP"] = 1;
//openal.Variables["HAVE___CONTROL87_2"] = 1;
openal.Variables["HAVE_CPUID_INTRINSIC"] = 1;
openal.Variables["ASSUME_ALIGNED_DECL"] = "x";
openal.Variables["EXPORT_DECL"] = "SW_AL_API";
//openal.Variables["ALIGN_DECL"] = "x";
openal.configureFile("version.h.in", "version.h");
openal.configureFile("config.h.in", openal.BinaryPrivateDir / "config.h");
auto &tools = p.addDirectory("tools");
//tools.Scope = TargetScope::Tool;
auto &bin2h = tools.addExecutable("bin2h");
bin2h.SourceDir = openal.SourceDir;
bin2h += "native-tools/bin2h.c";
auto &bsincgen = tools.addExecutable("bsincgen");
bsincgen.SourceDir = openal.SourceDir;
bsincgen += "native-tools/bsincgen.c";
bsincgen += "Shell32.lib"_lib;
auto c = openal.addCommand();
c << cmd::prog(bsincgen)
<< cmd::out("bsinc_inc.h");
}
void check(Checker &c)
{
auto &s = c.addSet("openal");
s.checkFunctionExists("aligned_alloc");
s.checkFunctionExists("posix_memalign");
s.checkFunctionExists("_aligned_malloc");
s.checkIncludeExists("cpuid.h");
s.checkIncludeExists("dirent.h");
s.checkIncludeExists("fenv.h");
s.checkIncludeExists("float.h");
s.checkIncludeExists("guiddef.h");
s.checkIncludeExists("ieeefp.h");
s.checkIncludeExists("intrin.h");
s.checkIncludeExists("malloc.h");
s.checkIncludeExists("stdalign.h");
s.checkIncludeExists("stdbool.h");
s.checkIncludeExists("stdint.h");
s.checkIncludeExists("strings.h");
s.checkIncludeExists("windows.h");
s.checkIncludeExists("guiddef.h");
s.checkIncludeExists("initguid.h");
s.checkIncludeExists("sys/sysconf.h");
s.checkTypeSize("long");
s.checkTypeSize("long long");
s.checkTypeSize("size_t");
s.checkTypeSize("void *");
}
| [
"cppanbot@gmail.com"
] | cppanbot@gmail.com |
62b5b1e9cbf2b2f9c08ceff5c16b346498e8f9ab | bdf90c3a10b126a6eb8a7adddb570a0bce84de0e | /Granite/third_party/astc-encoder/Source/astc_integer_sequence.cpp | 7b2747aeb3eff116dfbb04321ca62e2bc23f5fc5 | [
"LicenseRef-scancode-proprietary-license",
"LicenseRef-scancode-unknown-license-reference",
"MIT",
"LicenseRef-scancode-other-permissive"
] | permissive | dmrlawson/parallel-rdp | 6737a0b68b15efa0e4c17d176fb82c8a74e34597 | f18e00728bb45e3a769ab7ad3b9064359ef82209 | refs/heads/master | 2022-06-17T02:40:12.357485 | 2020-05-08T10:36:59 | 2020-05-08T10:42:43 | 262,285,013 | 0 | 0 | MIT | 2020-05-08T09:44:36 | 2020-05-08T09:44:35 | null | UTF-8 | C++ | false | false | 17,681 | cpp | /*----------------------------------------------------------------------------*/
/**
* This confidential and proprietary software may be used only as
* authorised by a licensing agreement from ARM Limited
* (C) COPYRIGHT 2011-2012 ARM Limited
* ALL RIGHTS RESERVED
*
* The entire notice above must be reproduced on all authorised
* copies and copies may only be made to the extent permitted
* by a licensing agreement from ARM Limited.
*
* @brief Functions to encode/decode data using Bounded Integer Sequence
* Encoding.
*/
/*----------------------------------------------------------------------------*/
#include "astc_codec_internals.h"
// unpacked quint triplets <low,middle,high> for each packed-quint value
static const uint8_t quints_of_integer[128][3] = {
{0, 0, 0}, {1, 0, 0}, {2, 0, 0}, {3, 0, 0},
{4, 0, 0}, {0, 4, 0}, {4, 4, 0}, {4, 4, 4},
{0, 1, 0}, {1, 1, 0}, {2, 1, 0}, {3, 1, 0},
{4, 1, 0}, {1, 4, 0}, {4, 4, 1}, {4, 4, 4},
{0, 2, 0}, {1, 2, 0}, {2, 2, 0}, {3, 2, 0},
{4, 2, 0}, {2, 4, 0}, {4, 4, 2}, {4, 4, 4},
{0, 3, 0}, {1, 3, 0}, {2, 3, 0}, {3, 3, 0},
{4, 3, 0}, {3, 4, 0}, {4, 4, 3}, {4, 4, 4},
{0, 0, 1}, {1, 0, 1}, {2, 0, 1}, {3, 0, 1},
{4, 0, 1}, {0, 4, 1}, {4, 0, 4}, {0, 4, 4},
{0, 1, 1}, {1, 1, 1}, {2, 1, 1}, {3, 1, 1},
{4, 1, 1}, {1, 4, 1}, {4, 1, 4}, {1, 4, 4},
{0, 2, 1}, {1, 2, 1}, {2, 2, 1}, {3, 2, 1},
{4, 2, 1}, {2, 4, 1}, {4, 2, 4}, {2, 4, 4},
{0, 3, 1}, {1, 3, 1}, {2, 3, 1}, {3, 3, 1},
{4, 3, 1}, {3, 4, 1}, {4, 3, 4}, {3, 4, 4},
{0, 0, 2}, {1, 0, 2}, {2, 0, 2}, {3, 0, 2},
{4, 0, 2}, {0, 4, 2}, {2, 0, 4}, {3, 0, 4},
{0, 1, 2}, {1, 1, 2}, {2, 1, 2}, {3, 1, 2},
{4, 1, 2}, {1, 4, 2}, {2, 1, 4}, {3, 1, 4},
{0, 2, 2}, {1, 2, 2}, {2, 2, 2}, {3, 2, 2},
{4, 2, 2}, {2, 4, 2}, {2, 2, 4}, {3, 2, 4},
{0, 3, 2}, {1, 3, 2}, {2, 3, 2}, {3, 3, 2},
{4, 3, 2}, {3, 4, 2}, {2, 3, 4}, {3, 3, 4},
{0, 0, 3}, {1, 0, 3}, {2, 0, 3}, {3, 0, 3},
{4, 0, 3}, {0, 4, 3}, {0, 0, 4}, {1, 0, 4},
{0, 1, 3}, {1, 1, 3}, {2, 1, 3}, {3, 1, 3},
{4, 1, 3}, {1, 4, 3}, {0, 1, 4}, {1, 1, 4},
{0, 2, 3}, {1, 2, 3}, {2, 2, 3}, {3, 2, 3},
{4, 2, 3}, {2, 4, 3}, {0, 2, 4}, {1, 2, 4},
{0, 3, 3}, {1, 3, 3}, {2, 3, 3}, {3, 3, 3},
{4, 3, 3}, {3, 4, 3}, {0, 3, 4}, {1, 3, 4},
};
// packed quint-value for every unpacked quint-triplet
// indexed by [high][middle][low]
static const uint8_t integer_of_quints[5][5][5] = {
{
{0, 1, 2, 3, 4,},
{8, 9, 10, 11, 12,},
{16, 17, 18, 19, 20,},
{24, 25, 26, 27, 28,},
{5, 13, 21, 29, 6,},
},
{
{32, 33, 34, 35, 36,},
{40, 41, 42, 43, 44,},
{48, 49, 50, 51, 52,},
{56, 57, 58, 59, 60,},
{37, 45, 53, 61, 14,},
},
{
{64, 65, 66, 67, 68,},
{72, 73, 74, 75, 76,},
{80, 81, 82, 83, 84,},
{88, 89, 90, 91, 92,},
{69, 77, 85, 93, 22,},
},
{
{96, 97, 98, 99, 100,},
{104, 105, 106, 107, 108,},
{112, 113, 114, 115, 116,},
{120, 121, 122, 123, 124,},
{101, 109, 117, 125, 30,},
},
{
{102, 103, 70, 71, 38,},
{110, 111, 78, 79, 46,},
{118, 119, 86, 87, 54,},
{126, 127, 94, 95, 62,},
{39, 47, 55, 63, 31,},
},
};
// unpacked trit quintuplets <low,_,_,_,high> for each packed-quint value
static const uint8_t trits_of_integer[256][5] = {
{0, 0, 0, 0, 0}, {1, 0, 0, 0, 0}, {2, 0, 0, 0, 0}, {0, 0, 2, 0, 0},
{0, 1, 0, 0, 0}, {1, 1, 0, 0, 0}, {2, 1, 0, 0, 0}, {1, 0, 2, 0, 0},
{0, 2, 0, 0, 0}, {1, 2, 0, 0, 0}, {2, 2, 0, 0, 0}, {2, 0, 2, 0, 0},
{0, 2, 2, 0, 0}, {1, 2, 2, 0, 0}, {2, 2, 2, 0, 0}, {2, 0, 2, 0, 0},
{0, 0, 1, 0, 0}, {1, 0, 1, 0, 0}, {2, 0, 1, 0, 0}, {0, 1, 2, 0, 0},
{0, 1, 1, 0, 0}, {1, 1, 1, 0, 0}, {2, 1, 1, 0, 0}, {1, 1, 2, 0, 0},
{0, 2, 1, 0, 0}, {1, 2, 1, 0, 0}, {2, 2, 1, 0, 0}, {2, 1, 2, 0, 0},
{0, 0, 0, 2, 2}, {1, 0, 0, 2, 2}, {2, 0, 0, 2, 2}, {0, 0, 2, 2, 2},
{0, 0, 0, 1, 0}, {1, 0, 0, 1, 0}, {2, 0, 0, 1, 0}, {0, 0, 2, 1, 0},
{0, 1, 0, 1, 0}, {1, 1, 0, 1, 0}, {2, 1, 0, 1, 0}, {1, 0, 2, 1, 0},
{0, 2, 0, 1, 0}, {1, 2, 0, 1, 0}, {2, 2, 0, 1, 0}, {2, 0, 2, 1, 0},
{0, 2, 2, 1, 0}, {1, 2, 2, 1, 0}, {2, 2, 2, 1, 0}, {2, 0, 2, 1, 0},
{0, 0, 1, 1, 0}, {1, 0, 1, 1, 0}, {2, 0, 1, 1, 0}, {0, 1, 2, 1, 0},
{0, 1, 1, 1, 0}, {1, 1, 1, 1, 0}, {2, 1, 1, 1, 0}, {1, 1, 2, 1, 0},
{0, 2, 1, 1, 0}, {1, 2, 1, 1, 0}, {2, 2, 1, 1, 0}, {2, 1, 2, 1, 0},
{0, 1, 0, 2, 2}, {1, 1, 0, 2, 2}, {2, 1, 0, 2, 2}, {1, 0, 2, 2, 2},
{0, 0, 0, 2, 0}, {1, 0, 0, 2, 0}, {2, 0, 0, 2, 0}, {0, 0, 2, 2, 0},
{0, 1, 0, 2, 0}, {1, 1, 0, 2, 0}, {2, 1, 0, 2, 0}, {1, 0, 2, 2, 0},
{0, 2, 0, 2, 0}, {1, 2, 0, 2, 0}, {2, 2, 0, 2, 0}, {2, 0, 2, 2, 0},
{0, 2, 2, 2, 0}, {1, 2, 2, 2, 0}, {2, 2, 2, 2, 0}, {2, 0, 2, 2, 0},
{0, 0, 1, 2, 0}, {1, 0, 1, 2, 0}, {2, 0, 1, 2, 0}, {0, 1, 2, 2, 0},
{0, 1, 1, 2, 0}, {1, 1, 1, 2, 0}, {2, 1, 1, 2, 0}, {1, 1, 2, 2, 0},
{0, 2, 1, 2, 0}, {1, 2, 1, 2, 0}, {2, 2, 1, 2, 0}, {2, 1, 2, 2, 0},
{0, 2, 0, 2, 2}, {1, 2, 0, 2, 2}, {2, 2, 0, 2, 2}, {2, 0, 2, 2, 2},
{0, 0, 0, 0, 2}, {1, 0, 0, 0, 2}, {2, 0, 0, 0, 2}, {0, 0, 2, 0, 2},
{0, 1, 0, 0, 2}, {1, 1, 0, 0, 2}, {2, 1, 0, 0, 2}, {1, 0, 2, 0, 2},
{0, 2, 0, 0, 2}, {1, 2, 0, 0, 2}, {2, 2, 0, 0, 2}, {2, 0, 2, 0, 2},
{0, 2, 2, 0, 2}, {1, 2, 2, 0, 2}, {2, 2, 2, 0, 2}, {2, 0, 2, 0, 2},
{0, 0, 1, 0, 2}, {1, 0, 1, 0, 2}, {2, 0, 1, 0, 2}, {0, 1, 2, 0, 2},
{0, 1, 1, 0, 2}, {1, 1, 1, 0, 2}, {2, 1, 1, 0, 2}, {1, 1, 2, 0, 2},
{0, 2, 1, 0, 2}, {1, 2, 1, 0, 2}, {2, 2, 1, 0, 2}, {2, 1, 2, 0, 2},
{0, 2, 2, 2, 2}, {1, 2, 2, 2, 2}, {2, 2, 2, 2, 2}, {2, 0, 2, 2, 2},
{0, 0, 0, 0, 1}, {1, 0, 0, 0, 1}, {2, 0, 0, 0, 1}, {0, 0, 2, 0, 1},
{0, 1, 0, 0, 1}, {1, 1, 0, 0, 1}, {2, 1, 0, 0, 1}, {1, 0, 2, 0, 1},
{0, 2, 0, 0, 1}, {1, 2, 0, 0, 1}, {2, 2, 0, 0, 1}, {2, 0, 2, 0, 1},
{0, 2, 2, 0, 1}, {1, 2, 2, 0, 1}, {2, 2, 2, 0, 1}, {2, 0, 2, 0, 1},
{0, 0, 1, 0, 1}, {1, 0, 1, 0, 1}, {2, 0, 1, 0, 1}, {0, 1, 2, 0, 1},
{0, 1, 1, 0, 1}, {1, 1, 1, 0, 1}, {2, 1, 1, 0, 1}, {1, 1, 2, 0, 1},
{0, 2, 1, 0, 1}, {1, 2, 1, 0, 1}, {2, 2, 1, 0, 1}, {2, 1, 2, 0, 1},
{0, 0, 1, 2, 2}, {1, 0, 1, 2, 2}, {2, 0, 1, 2, 2}, {0, 1, 2, 2, 2},
{0, 0, 0, 1, 1}, {1, 0, 0, 1, 1}, {2, 0, 0, 1, 1}, {0, 0, 2, 1, 1},
{0, 1, 0, 1, 1}, {1, 1, 0, 1, 1}, {2, 1, 0, 1, 1}, {1, 0, 2, 1, 1},
{0, 2, 0, 1, 1}, {1, 2, 0, 1, 1}, {2, 2, 0, 1, 1}, {2, 0, 2, 1, 1},
{0, 2, 2, 1, 1}, {1, 2, 2, 1, 1}, {2, 2, 2, 1, 1}, {2, 0, 2, 1, 1},
{0, 0, 1, 1, 1}, {1, 0, 1, 1, 1}, {2, 0, 1, 1, 1}, {0, 1, 2, 1, 1},
{0, 1, 1, 1, 1}, {1, 1, 1, 1, 1}, {2, 1, 1, 1, 1}, {1, 1, 2, 1, 1},
{0, 2, 1, 1, 1}, {1, 2, 1, 1, 1}, {2, 2, 1, 1, 1}, {2, 1, 2, 1, 1},
{0, 1, 1, 2, 2}, {1, 1, 1, 2, 2}, {2, 1, 1, 2, 2}, {1, 1, 2, 2, 2},
{0, 0, 0, 2, 1}, {1, 0, 0, 2, 1}, {2, 0, 0, 2, 1}, {0, 0, 2, 2, 1},
{0, 1, 0, 2, 1}, {1, 1, 0, 2, 1}, {2, 1, 0, 2, 1}, {1, 0, 2, 2, 1},
{0, 2, 0, 2, 1}, {1, 2, 0, 2, 1}, {2, 2, 0, 2, 1}, {2, 0, 2, 2, 1},
{0, 2, 2, 2, 1}, {1, 2, 2, 2, 1}, {2, 2, 2, 2, 1}, {2, 0, 2, 2, 1},
{0, 0, 1, 2, 1}, {1, 0, 1, 2, 1}, {2, 0, 1, 2, 1}, {0, 1, 2, 2, 1},
{0, 1, 1, 2, 1}, {1, 1, 1, 2, 1}, {2, 1, 1, 2, 1}, {1, 1, 2, 2, 1},
{0, 2, 1, 2, 1}, {1, 2, 1, 2, 1}, {2, 2, 1, 2, 1}, {2, 1, 2, 2, 1},
{0, 2, 1, 2, 2}, {1, 2, 1, 2, 2}, {2, 2, 1, 2, 2}, {2, 1, 2, 2, 2},
{0, 0, 0, 1, 2}, {1, 0, 0, 1, 2}, {2, 0, 0, 1, 2}, {0, 0, 2, 1, 2},
{0, 1, 0, 1, 2}, {1, 1, 0, 1, 2}, {2, 1, 0, 1, 2}, {1, 0, 2, 1, 2},
{0, 2, 0, 1, 2}, {1, 2, 0, 1, 2}, {2, 2, 0, 1, 2}, {2, 0, 2, 1, 2},
{0, 2, 2, 1, 2}, {1, 2, 2, 1, 2}, {2, 2, 2, 1, 2}, {2, 0, 2, 1, 2},
{0, 0, 1, 1, 2}, {1, 0, 1, 1, 2}, {2, 0, 1, 1, 2}, {0, 1, 2, 1, 2},
{0, 1, 1, 1, 2}, {1, 1, 1, 1, 2}, {2, 1, 1, 1, 2}, {1, 1, 2, 1, 2},
{0, 2, 1, 1, 2}, {1, 2, 1, 1, 2}, {2, 2, 1, 1, 2}, {2, 1, 2, 1, 2},
{0, 2, 2, 2, 2}, {1, 2, 2, 2, 2}, {2, 2, 2, 2, 2}, {2, 1, 2, 2, 2},
};
// packed trit-value for every unpacked trit-quintuplet
// indexed by [high][][][][low]
static const uint8_t integer_of_trits[3][3][3][3][3] = {
{
{
{
{0, 1, 2,},
{4, 5, 6,},
{8, 9, 10,},
},
{
{16, 17, 18,},
{20, 21, 22,},
{24, 25, 26,},
},
{
{3, 7, 15,},
{19, 23, 27,},
{12, 13, 14,},
},
},
{
{
{32, 33, 34,},
{36, 37, 38,},
{40, 41, 42,},
},
{
{48, 49, 50,},
{52, 53, 54,},
{56, 57, 58,},
},
{
{35, 39, 47,},
{51, 55, 59,},
{44, 45, 46,},
},
},
{
{
{64, 65, 66,},
{68, 69, 70,},
{72, 73, 74,},
},
{
{80, 81, 82,},
{84, 85, 86,},
{88, 89, 90,},
},
{
{67, 71, 79,},
{83, 87, 91,},
{76, 77, 78,},
},
},
},
{
{
{
{128, 129, 130,},
{132, 133, 134,},
{136, 137, 138,},
},
{
{144, 145, 146,},
{148, 149, 150,},
{152, 153, 154,},
},
{
{131, 135, 143,},
{147, 151, 155,},
{140, 141, 142,},
},
},
{
{
{160, 161, 162,},
{164, 165, 166,},
{168, 169, 170,},
},
{
{176, 177, 178,},
{180, 181, 182,},
{184, 185, 186,},
},
{
{163, 167, 175,},
{179, 183, 187,},
{172, 173, 174,},
},
},
{
{
{192, 193, 194,},
{196, 197, 198,},
{200, 201, 202,},
},
{
{208, 209, 210,},
{212, 213, 214,},
{216, 217, 218,},
},
{
{195, 199, 207,},
{211, 215, 219,},
{204, 205, 206,},
},
},
},
{
{
{
{96, 97, 98,},
{100, 101, 102,},
{104, 105, 106,},
},
{
{112, 113, 114,},
{116, 117, 118,},
{120, 121, 122,},
},
{
{99, 103, 111,},
{115, 119, 123,},
{108, 109, 110,},
},
},
{
{
{224, 225, 226,},
{228, 229, 230,},
{232, 233, 234,},
},
{
{240, 241, 242,},
{244, 245, 246,},
{248, 249, 250,},
},
{
{227, 231, 239,},
{243, 247, 251,},
{236, 237, 238,},
},
},
{
{
{28, 29, 30,},
{60, 61, 62,},
{92, 93, 94,},
},
{
{156, 157, 158,},
{188, 189, 190,},
{220, 221, 222,},
},
{
{31, 63, 127,},
{159, 191, 255,},
{252, 253, 254,},
},
},
},
};
void find_number_of_bits_trits_quints(int quantization_level, int *bits, int *trits, int *quints)
{
*bits = 0;
*trits = 0;
*quints = 0;
switch (quantization_level)
{
case QUANT_2:
*bits = 1;
break;
case QUANT_3:
*bits = 0;
*trits = 1;
break;
case QUANT_4:
*bits = 2;
break;
case QUANT_5:
*bits = 0;
*quints = 1;
break;
case QUANT_6:
*bits = 1;
*trits = 1;
break;
case QUANT_8:
*bits = 3;
break;
case QUANT_10:
*bits = 1;
*quints = 1;
break;
case QUANT_12:
*bits = 2;
*trits = 1;
break;
case QUANT_16:
*bits = 4;
break;
case QUANT_20:
*bits = 2;
*quints = 1;
break;
case QUANT_24:
*bits = 3;
*trits = 1;
break;
case QUANT_32:
*bits = 5;
break;
case QUANT_40:
*bits = 3;
*quints = 1;
break;
case QUANT_48:
*bits = 4;
*trits = 1;
break;
case QUANT_64:
*bits = 6;
break;
case QUANT_80:
*bits = 4;
*quints = 1;
break;
case QUANT_96:
*bits = 5;
*trits = 1;
break;
case QUANT_128:
*bits = 7;
break;
case QUANT_160:
*bits = 5;
*quints = 1;
break;
case QUANT_192:
*bits = 6;
*trits = 1;
break;
case QUANT_256:
*bits = 8;
break;
}
}
// routine to write up to 8 bits
static inline void write_bits(int value, int bitcount, int bitoffset, uint8_t * ptr)
{
int mask = (1 << bitcount) - 1;
value &= mask;
ptr += bitoffset >> 3;
bitoffset &= 7;
value <<= bitoffset;
mask <<= bitoffset;
mask = ~mask;
ptr[0] &= mask;
ptr[0] |= value;
ptr[1] &= mask >> 8;
ptr[1] |= value >> 8;
}
// routine to read up to 8 bits
static inline int read_bits(int bitcount, int bitoffset, const uint8_t * ptr)
{
int mask = (1 << bitcount) - 1;
ptr += bitoffset >> 3;
bitoffset &= 7;
int value = ptr[0] | (ptr[1] << 8);
value >>= bitoffset;
value &= mask;
return value;
}
void encode_ise(int quantization_level, int elements, const uint8_t * input_data, uint8_t * output_data, int bit_offset)
{
int i;
uint8_t lowparts[64];
uint8_t highparts[69]; // 64 elements + 5 elements for padding
uint8_t tq_blocks[22]; // trit-blocks or quint-blocks
int bits, trits, quints;
find_number_of_bits_trits_quints(quantization_level, &bits, &trits, &quints);
for (i = 0; i < elements; i++)
{
lowparts[i] = input_data[i] & ((1 << bits) - 1);
highparts[i] = input_data[i] >> bits;
}
for (i = elements; i < elements + 5; i++)
highparts[i] = 0; // padding before we start constructing trit-blocks or quint-blocks
// construct trit-blocks or quint-blocks as necessary
if (trits)
{
int trit_blocks = (elements + 4) / 5;
for (i = 0; i < trit_blocks; i++)
tq_blocks[i] = integer_of_trits[highparts[5 * i + 4]][highparts[5 * i + 3]][highparts[5 * i + 2]][highparts[5 * i + 1]][highparts[5 * i]];
}
if (quints)
{
int quint_blocks = (elements + 2) / 3;
for (i = 0; i < quint_blocks; i++)
tq_blocks[i] = integer_of_quints[highparts[3 * i + 2]][highparts[3 * i + 1]][highparts[3 * i]];
}
// then, write out the actual bits.
int lcounter = 0;
int hcounter = 0;
for (i = 0; i < elements; i++)
{
write_bits(lowparts[i], bits, bit_offset, output_data);
bit_offset += bits;
if (trits)
{
static const int bits_to_write[5] = { 2, 2, 1, 2, 1 };
static const int block_shift[5] = { 0, 2, 4, 5, 7 };
static const int next_lcounter[5] = { 1, 2, 3, 4, 0 };
static const int hcounter_incr[5] = { 0, 0, 0, 0, 1 };
write_bits(tq_blocks[hcounter] >> block_shift[lcounter], bits_to_write[lcounter], bit_offset, output_data);
bit_offset += bits_to_write[lcounter];
hcounter += hcounter_incr[lcounter];
lcounter = next_lcounter[lcounter];
}
if (quints)
{
static const int bits_to_write[3] = { 3, 2, 2 };
static const int block_shift[3] = { 0, 3, 5 };
static const int next_lcounter[3] = { 1, 2, 0 };
static const int hcounter_incr[3] = { 0, 0, 1 };
write_bits(tq_blocks[hcounter] >> block_shift[lcounter], bits_to_write[lcounter], bit_offset, output_data);
bit_offset += bits_to_write[lcounter];
hcounter += hcounter_incr[lcounter];
lcounter = next_lcounter[lcounter];
}
}
}
void decode_ise(int quantization_level, int elements, const uint8_t * input_data, uint8_t * output_data, int bit_offset)
{
int i;
// note: due to how the the trit/quint-block unpacking is done in this function,
// we may write more temporary results than the number of outputs
// The maximum actual number of results is 64 bit, but we keep 4 additional elements
// of padding.
uint8_t results[68];
uint8_t tq_blocks[22]; // trit-blocks or quint-blocks
int bits, trits, quints;
find_number_of_bits_trits_quints(quantization_level, &bits, &trits, &quints);
int lcounter = 0;
int hcounter = 0;
// trit-blocks or quint-blocks must be zeroed out before we collect them in the loop below.
for (i = 0; i < 22; i++)
tq_blocks[i] = 0;
// collect bits for each element, as well as bits for any trit-blocks and quint-blocks.
for (i = 0; i < elements; i++)
{
results[i] = read_bits(bits, bit_offset, input_data);
bit_offset += bits;
if (trits)
{
static const int bits_to_read[5] = { 2, 2, 1, 2, 1 };
static const int block_shift[5] = { 0, 2, 4, 5, 7 };
static const int next_lcounter[5] = { 1, 2, 3, 4, 0 };
static const int hcounter_incr[5] = { 0, 0, 0, 0, 1 };
int tdata = read_bits(bits_to_read[lcounter], bit_offset, input_data);
bit_offset += bits_to_read[lcounter];
tq_blocks[hcounter] |= tdata << block_shift[lcounter];
hcounter += hcounter_incr[lcounter];
lcounter = next_lcounter[lcounter];
}
if (quints)
{
static const int bits_to_read[3] = { 3, 2, 2 };
static const int block_shift[3] = { 0, 3, 5 };
static const int next_lcounter[3] = { 1, 2, 0 };
static const int hcounter_incr[3] = { 0, 0, 1 };
int tdata = read_bits(bits_to_read[lcounter], bit_offset, input_data);
bit_offset += bits_to_read[lcounter];
tq_blocks[hcounter] |= tdata << block_shift[lcounter];
hcounter += hcounter_incr[lcounter];
lcounter = next_lcounter[lcounter];
}
}
// unpack trit-blocks or quint-blocks as needed
if (trits)
{
int trit_blocks = (elements + 4) / 5;
for (i = 0; i < trit_blocks; i++)
{
const uint8_t *tritptr = trits_of_integer[tq_blocks[i]];
results[5 * i] |= tritptr[0] << bits;
results[5 * i + 1] |= tritptr[1] << bits;
results[5 * i + 2] |= tritptr[2] << bits;
results[5 * i + 3] |= tritptr[3] << bits;
results[5 * i + 4] |= tritptr[4] << bits;
}
}
if (quints)
{
int quint_blocks = (elements + 2) / 3;
for (i = 0; i < quint_blocks; i++)
{
const uint8_t *quintptr = quints_of_integer[tq_blocks[i]];
results[3 * i] |= quintptr[0] << bits;
results[3 * i + 1] |= quintptr[1] << bits;
results[3 * i + 2] |= quintptr[2] << bits;
}
}
for (i = 0; i < elements; i++)
output_data[i] = results[i];
}
int compute_ise_bitcount(int items, quantization_method quant)
{
switch (quant)
{
case QUANT_2:
return items;
case QUANT_3:
return (8 * items + 4) / 5;
case QUANT_4:
return 2 * items;
case QUANT_5:
return (7 * items + 2) / 3;
case QUANT_6:
return (13 * items + 4) / 5;
case QUANT_8:
return 3 * items;
case QUANT_10:
return (10 * items + 2) / 3;
case QUANT_12:
return (18 * items + 4) / 5;
case QUANT_16:
return items * 4;
case QUANT_20:
return (13 * items + 2) / 3;
case QUANT_24:
return (23 * items + 4) / 5;
case QUANT_32:
return 5 * items;
case QUANT_40:
return (16 * items + 2) / 3;
case QUANT_48:
return (28 * items + 4) / 5;
case QUANT_64:
return 6 * items;
case QUANT_80:
return (19 * items + 2) / 3;
case QUANT_96:
return (33 * items + 4) / 5;
case QUANT_128:
return 7 * items;
case QUANT_160:
return (22 * items + 2) / 3;
case QUANT_192:
return (38 * items + 4) / 5;
case QUANT_256:
return 8 * items;
default:
return 100000;
}
}
| [
"dmrlawson@gmail.com"
] | dmrlawson@gmail.com |
2cce27615676d9a2325410bddef6a6a8933172cb | e6b96681b393ae335f2f7aa8db84acc65a3e6c8d | /atcoder.jp/abc177/abc177_d/Main.cpp | b4a5a7a3b2717dabd4427f1edc151c10e57729d0 | [] | no_license | okuraofvegetable/AtCoder | a2e92f5126d5593d01c2c4d471b1a2c08b5d3a0d | dd535c3c1139ce311503e69938611f1d7311046d | refs/heads/master | 2022-02-21T15:19:26.172528 | 2021-03-27T04:04:55 | 2021-03-27T04:04:55 | 249,614,943 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,092 | cpp | // #pragma GCC optimize("unroll-loops", "omit-frame-pointer", "inline")
// #pragma GCC option("arch=native", "tune=native", "no-zero-upper")
// #pragma GCC
// target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,tune=native")
// #pragma GCC optimize("Ofast")
// #pragma GCC optimize("tree-vectorize","openmp","predictive-commoning")
// #pragma GCC option("D_GLIBCXX_PARALLEL","openmp")
// #pragma GCC optimize("O3")
// #pragma GCC target("avx2")
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
typedef vector<int> vi;
typedef vector<ll> vll;
// #define int long long
#define pb push_back
#define mp make_pair
#define eps 1e-9
#define INF 2000000000 // 2e9
#define LLINF 2000000000000000000ll // 2e18 (llmax:9e18)
#define fi first
#define sec second
#define all(x) (x).begin(), (x).end()
#define sq(x) ((x) * (x))
#define dmp(x) cerr << #x << ": " << x << endl;
template <class T>
void chmin(T &a, const T &b) {
if (a > b) a = b;
}
template <class T>
void chmax(T &a, const T &b) {
if (a < b) a = b;
}
template <class T>
using MaxHeap = priority_queue<T>;
template <class T>
using MinHeap = priority_queue<T, vector<T>, greater<T>>;
template <class T>
vector<T> vect(int len, T elem) {
return vector<T>(len, elem);
}
template <class T, class U>
ostream &operator<<(ostream &os, const pair<T, U> &p) {
os << p.fi << ',' << p.sec;
return os;
}
template <class T, class U>
istream &operator>>(istream &is, pair<T, U> &p) {
is >> p.fi >> p.sec;
return is;
}
template <class T>
ostream &operator<<(ostream &os, const vector<T> &vec) {
for (int i = 0; i < vec.size(); i++) {
os << vec[i];
if (i + 1 < vec.size()) os << ' ';
}
return os;
}
template <class T>
istream &operator>>(istream &is, vector<T> &vec) {
for (int i = 0; i < vec.size(); i++) is >> vec[i];
return is;
}
void fastio() {
cin.tie(0);
ios::sync_with_stdio(0);
cout << fixed << setprecision(20);
}
#define endl "\n"
struct UnionFind {
vector<int> par, rank, sz;
UnionFind(int n) {
par.assign(n, 0);
rank.assign(n, 0);
sz.assign(n, 1);
for (int i = 0; i < n; i++) { par[i] = i; }
}
int find(int x) {
if (par[x] == x)
return x;
else
return par[x] = find(par[x]);
}
void unite(int x, int y) {
x = find(x);
y = find(y);
if (x == y) return;
if (rank[x] < rank[y]) {
par[x] = y;
sz[y] += sz[x];
} else {
par[y] = x;
sz[x] += sz[y];
if (rank[x] == rank[y]) rank[x]++;
}
}
bool same(int x, int y) { return find(x) == find(y); }
};
void solve() {
int N, M;
cin >> N >> M;
UnionFind uf(N);
for (int i = 0; i < M; i++) {
int a, b;
cin >> a >> b;
a--;
b--;
uf.unite(a, b);
}
int ans = 0;
for (int i = 0; i < N; i++) { chmax(ans, uf.sz[uf.find(i)]); }
cout << ans << endl;
return;
}
signed main() {
fastio();
solve();
// int t; cin >> t; while(t--)solve();
// int t; cin >> t;
// for(int i=1;i<=t;i++){
// cout << "Case #" << i << ": ";
// solve();
// }
return 0;
}
| [
"okuraofvegetable@gmail.com"
] | okuraofvegetable@gmail.com |
42c689908d736aaec82a450bc6377c227ce6e73b | 7a9684ac546e54e3effc3bd25db2463b4977fb32 | /FTC-Remoter-V1.0/applications/FTC_Scheduler.h | a7623cbebac11bda0e672627bae286abc886eeb9 | [] | no_license | gmdaat/UAV2017 | c395fdc27f8b8b0cd59cca9c3429d45eb7068e19 | e0f80a8670e97fc3e543ff49cff2843d4cf06481 | refs/heads/master | 2020-12-02T12:45:10.786312 | 2017-09-12T13:58:59 | 2017-09-12T13:58:59 | 96,585,748 | 0 | 4 | null | 2017-09-05T05:42:24 | 2017-07-08T00:29:20 | C | GB18030 | C++ | false | false | 320 | h | #ifndef __FTC_SCHEDULER_H
#define __FTC_SCHEDULER_H
#include "board.h"
#include "FTC_Config.h"
class FTC_Scheduler
{
public:
//构造函数
FTC_Scheduler();
//任务时基计数变量
uint16_t cnt_1ms,cnt_2ms,cnt_5ms,cnt_10ms,cnt_30ms;
};
void FTC_Loop(void);
extern FTC_Scheduler scheduler;
#endif
| [
"gmdaat@qq.com"
] | gmdaat@qq.com |
02fba20865a91c176635b595744127164553009f | 24f26275ffcd9324998d7570ea9fda82578eeb9e | /chrome/browser/chromeos/settings/supervised_user_cros_settings_provider.cc | ec7cad702b7f796ac911d2fde774b8ff2cdb0aaa | [
"BSD-3-Clause"
] | permissive | Vizionnation/chromenohistory | 70a51193c8538d7b995000a1b2a654e70603040f | 146feeb85985a6835f4b8826ad67be9195455402 | refs/heads/master | 2022-12-15T07:02:54.461083 | 2019-10-25T15:07:06 | 2019-10-25T15:07:06 | 217,557,501 | 2 | 1 | BSD-3-Clause | 2022-11-19T06:53:07 | 2019-10-25T14:58:54 | null | UTF-8 | C++ | false | false | 1,977 | cc | // Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/chromeos/settings/supervised_user_cros_settings_provider.h"
#include "base/logging.h"
#include "base/stl_util.h"
#include "base/values.h"
#include "chromeos/settings/cros_settings_names.h"
#include "components/account_id/account_id.h"
#include "components/user_manager/user_manager.h"
namespace chromeos {
SupervisedUserCrosSettingsProvider::SupervisedUserCrosSettingsProvider(
const CrosSettingsProvider::NotifyObserversCallback& notify_cb)
: CrosSettingsProvider(notify_cb) {
child_user_restrictions_[chromeos::kAccountsPrefAllowGuest] =
base::Value(false);
child_user_restrictions_[chromeos::kAccountsPrefShowUserNamesOnSignIn] =
base::Value(true);
child_user_restrictions_[chromeos::kAccountsPrefAllowNewUser] =
base::Value(true);
}
SupervisedUserCrosSettingsProvider::~SupervisedUserCrosSettingsProvider() =
default;
const base::Value* SupervisedUserCrosSettingsProvider::Get(
const std::string& path) const {
DCHECK(HandlesSetting(path));
auto iter = child_user_restrictions_.find(path);
return &(iter->second);
}
CrosSettingsProvider::TrustedStatus
SupervisedUserCrosSettingsProvider::PrepareTrustedValues(
const base::Closure& callback) {
return CrosSettingsProvider::TrustedStatus::TRUSTED;
}
bool SupervisedUserCrosSettingsProvider::HandlesSetting(
const std::string& path) const {
if (!user_manager::UserManager::IsInitialized())
return false;
auto* user_manager = user_manager::UserManager::Get();
if (user_manager->GetUsers().empty())
return false;
auto* device_owner =
user_manager->FindUser(user_manager->GetOwnerAccountId());
if (device_owner && device_owner->IsChild()) {
return base::Contains(child_user_restrictions_, path);
}
return false;
}
} // namespace chromeos
| [
"rjkroege@chromium.org"
] | rjkroege@chromium.org |
ae321e0d6e62e7389ea27ec203d4e649973b2687 | d47c341d59ed8ba577463ccf100a51efb669599c | /boost/asio/detail/signal_init.hpp | 0dc65586f4c1569205c9926253e822c983ca816a | [
"BSL-1.0"
] | permissive | cms-externals/boost | 5980d39d50b7441536eb3b10822f56495fdf3635 | 9615b17aa7196c42a741e99b4003a0c26f092f4c | refs/heads/master | 2023-08-29T09:15:33.137896 | 2020-08-04T16:50:18 | 2020-08-04T16:50:18 | 30,637,301 | 0 | 4 | BSL-1.0 | 2023-08-09T23:00:37 | 2015-02-11T08:07:04 | C++ | UTF-8 | C++ | false | false | 1,070 | hpp | //
// detail/signal_init.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
#ifndef BOOST_ASIO_DETAIL_SIGNAL_INIT_HPP
#define BOOST_ASIO_DETAIL_SIGNAL_INIT_HPP
#if defined(_MSC_VER) && (_MSC_VER >= 1200)
# pragma once
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include <boost/asio/detail/config.hpp>
#if !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)
#include <csignal>
#include <boost/asio/detail/push_options.hpp>
namespace boost {
namespace asio {
namespace detail {
template <int Signal = SIGPIPE>
class signal_init
{
public:
// Constructor.
signal_init()
{
std::signal(Signal, SIG_IGN);
}
};
} // namespace detail
} // namespace asio
} // namespace boost
#include <boost/asio/detail/pop_options.hpp>
#endif // !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)
#endif // BOOST_ASIO_DETAIL_SIGNAL_INIT_HPP
| [
"giulio.eulisse@cern.ch"
] | giulio.eulisse@cern.ch |
22dd4f82c27eb1acd2a1b5518808f6799fb74c7c | 1e5be978c24c359a7c4b858370d183b45e168420 | /Classes/AzoomeeChat/Data/StickerCache.h | 0578b58c5bb5dae27260d6e96c81775509fba265 | [] | no_license | JeremyAzoomee/Azoomee2 | d752ea7512e048d7b22db38be2ec21ab046520e5 | f57292c18de9a9138bd3635893bcd23fc171a21f | refs/heads/master | 2021-05-18T14:51:23.389050 | 2020-03-13T15:59:09 | 2020-03-13T15:59:09 | 251,271,764 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 981 | h | #ifndef AzoomeeChat_StickerCache_h
#define AzoomeeChat_StickerCache_h
#include "../AzoomeeChat.h"
#include "StickerCategory.h"
#include "Sticker.h"
#include <map>
NS_AZOOMEE_CHAT_BEGIN
/**
* Manages the cache of Stickers used in the chat app.
*/
class StickerCache
{
private:
/// List of sticker categories
StickerCategoryList _categories;
/// Index sticker URL to Sticker
std::map<std::string, StickerRef> _stickersByURL;
// no direct construction
StickerCache();
/// Initialise and load available stickers
void init();
public:
/// Singleton instance
static StickerCache* getInstance();
/// Return the path to the local bundled stickers
std::string localBundlePath() const;
/// Sticker categories
StickerCategoryList categories() const;
/// Find a Sticker by URL, if it is recognised
StickerRef findStickerByURL(const std::string& url) const;
};
NS_AZOOMEE_CHAT_END
#endif
| [
"macauley.scoffins@azoomee.com"
] | macauley.scoffins@azoomee.com |
3b8cf31ccb3d274823fea9b3918800f57cbc11f6 | b958286bb016a56f5ddff5514f38fbd29f3e9072 | /cc_plugin/message/RxmAlmPollSv.h | d5fd91e2d904783c7232c7ed10a2155511088c87 | [] | no_license | yxw027/cc.ublox.generated | abdda838945777a498f433b0d9624a567ab1ea80 | a8bf468281d2d06e32d3e029c40bc6d38e4a34de | refs/heads/master | 2021-01-14T23:03:20.722801 | 2020-02-20T06:24:46 | 2020-02-20T06:24:46 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,367 | h | // Generated by commsdsl2comms v3.3.2
#pragma once
#include <memory>
#include <QtCore/QVariantList>
#include "cc_plugin/Message.h"
namespace ublox
{
namespace cc_plugin
{
namespace message
{
class RxmAlmPollSvImpl;
class RxmAlmPollSv : public ublox::cc_plugin::Message
{
public:
RxmAlmPollSv();
RxmAlmPollSv(const RxmAlmPollSv&) = delete;
RxmAlmPollSv(RxmAlmPollSv&&) = delete;
virtual ~RxmAlmPollSv();
RxmAlmPollSv& operator=(const RxmAlmPollSv& other);
RxmAlmPollSv& operator=(RxmAlmPollSv&&);
protected:
virtual const char* nameImpl() const override;
virtual const QVariantList& fieldsPropertiesImpl() const override;
virtual void dispatchImpl(comms_champion::MessageHandler& handler) override;
virtual void resetImpl() override;
virtual bool assignImpl(const comms_champion::Message& other) override;
virtual MsgIdParamType getIdImpl() const override;
virtual comms::ErrorStatus readImpl(ReadIterator& iter, std::size_t len) override;
virtual comms::ErrorStatus writeImpl(WriteIterator& iter, std::size_t len) const override;
virtual bool validImpl() const override;
virtual std::size_t lengthImpl() const override;
virtual bool refreshImpl() override;
private:
std::unique_ptr<RxmAlmPollSvImpl> m_pImpl;
};
} // namespace message
} // namespace cc_plugin
} // namespace ublox
| [
"arobenko@gmail.com"
] | arobenko@gmail.com |
528671c7262bf17bb74e3177377d69ddaf7ecd44 | 549f6031b335cb387ffce493adcce31967be6759 | /doc-src/samples/relative_diff.cpp | 49dca07959d5e2eb86d63bd7836c5008cf609dc1 | [
"BSD-2-Clause"
] | permissive | rollbear/crpcut | d4152dcdd80640118c473f9952a3eb18a0ea1419 | e9d694fb04599b72ebdcf6fea7d6ad598807ff41 | refs/heads/master | 2020-05-07T06:00:06.781863 | 2019-04-09T05:53:00 | 2019-04-09T05:53:00 | 180,293,662 | 1 | 1 | BSD-2-Clause | 2020-05-07T03:55:15 | 2019-04-09T05:46:17 | C++ | UTF-8 | C++ | false | false | 1,898 | cpp | /*
* Copyright 2009 Bjorn Fahller <bjorn@fahller.se>
* All rights reserved
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
#include <crpcut.hpp>
double calc(int iterations)
{
double sum = 0.0;
double d = 1.0;
while (iterations--)
{
sum+=1.0/d;
d/= 10;
}
return sum;
}
TEST(too_narrow)
{
double val = calc(10);
ASSERT_PRED(crpcut::match<crpcut::relative_diff>(1e-18),
val, 1111111111.0);
}
TEST(close_enough)
{
double val = calc(10);
ASSERT_PRED(crpcut::match<crpcut::relative_diff>(1e-15),
val, 1111111111.0);
}
int main(int argc, char *argv[])
{
return crpcut::run(argc, argv);
}
| [
"bjorn@fahller.se"
] | bjorn@fahller.se |
fcfd600fc9a358187dc455f5da2b38f36c96dddd | 9b7a7bb3888beb818ef7508128790fc25fe5f068 | /tnet/util/Thread.h | 4510bc8f289a84bf1a215f83ff60ef32579a49bd | [] | no_license | tankzhouqiang/tnet | 2f66d5fa3ef015d6f801dbc5468563867dbebf73 | adc3e50e180315c51561bebb7fb16cb025313fc1 | refs/heads/master | 2020-05-20T09:18:54.330026 | 2015-11-29T12:37:16 | 2015-11-29T12:37:16 | 31,054,730 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 776 | h | #ifndef TNET_THREAD_H
#define TNET_THREAD_H
#include <tnet/common/Common.h>
#include <pthread.h>
#include <tr1/memory>
#include <tr1/functional>
TNET_BEGIN_NAMESPACE(util);
class Thread;
typedef std::tr1::shared_ptr<Thread> ThreadPtr;
class Thread
{
public:
static ThreadPtr createThread(const std::tr1::function<void ()>& threadFunction);
private:
static void* threadWrapperFunction(void* arg);
public:
pthread_t getId() const {return _id;}
void join() {
if (_id) {
int ret = pthread_join(_id, NULL);
(void) ret; assert(ret == 0);
}
_id = 0;
}
public:
~Thread() {
join();
}
private:
Thread() {_id = 0;}
pthread_t _id;
};
TNET_END_NAMESPACE(util);
#endif //TNET_THREAD_H
| [
"tank@localhost.localdomain"
] | tank@localhost.localdomain |
9333f8094ab8fb721d829e44bfb565db73ab541a | 81a28949f2007476a85c5e202e115ee0fcd442ad | /libraries/chain/include/graphene/chain/author_object.hpp | 11004ce0d794c0a105dce723c25dfa99d4ab8501 | [] | no_license | zosnet/zos-core | 5cc3588f4dcebed73d82dbed413d01437396dc1c | 2709c827dc2f079df0b94dd0dda9e22aaa29fcb5 | refs/heads/master | 2020-09-17T23:39:11.951438 | 2019-12-13T11:19:46 | 2019-12-13T11:19:46 | 222,097,547 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,727 | hpp | /*
* Copyright (c) 2015 Cryptonomex, Inc., and contributors.
*
* The MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#pragma once
#include <graphene/chain/protocol/asset.hpp>
#include <graphene/db/object.hpp>
#include <graphene/db/generic_index.hpp>
namespace graphene { namespace chain {
using namespace graphene::db;
class author_object;
class author_object : public abstract_object<author_object>
{
public:
static const uint8_t space_id = protocol_ids;
static const uint8_t type_id = author_object_type;
string name;
account_id_type author_account;
uint32_t auth_type = 0;
optional<vesting_balance_id_type> pay_vb;
vector<asset_id_type> allow_asset;
vote_id_type vote_id;
uint64_t total_votes = 0;
string url;
string memo;
string config;
asset lock_asset;
share_type pay_for_account = 0;
share_type pay_for_referrer = 0;
identity_type enable = identity_enable;
bool is_enable() const { return enable ==identity_enable ; }
author_object() : vote_id(vote_id_type::author) {}
};
struct by_account;
struct by_vote_id;
struct by_last_block;
using author_multi_index_type = multi_index_container<
author_object,
indexed_by<
ordered_unique< tag<by_id>,
member<object, object_id_type, &object::id>
>,
ordered_unique< tag<by_account>,
member<author_object, account_id_type, &author_object::author_account>
>,
ordered_unique< tag<by_vote_id>,
member<author_object, vote_id_type, &author_object::vote_id>
>
>
>;
using author_index = generic_index<author_object, author_multi_index_type>;
} } // graphene::chain
FC_REFLECT_DERIVED( graphene::chain::author_object, (graphene::db::object),
(name)
(author_account)
(auth_type)
(pay_vb)
(allow_asset)
(vote_id)
(total_votes)
(url)
(memo)
(config)
(lock_asset)
(pay_for_account)
(pay_for_referrer)
(enable)
)
| [
"sunneil@hotmail.com"
] | sunneil@hotmail.com |
c2818c82a3a995376434e51ef931db6dc630c621 | 92e01a91d9771feb0b5dc7a99daecd1ed2a11c94 | /STM32CubeIDE/ActiveLoadBigMosfets/TouchGFX/gui/src/containers/TermpControlContainer.cpp | 9faa38405c11a4f9876ae69881bfab4877ce9386 | [] | no_license | jakubprzybytek/ActiveLoad | 87944ff19f3483c40d5406ec963f60fa01137bd9 | 60def182130fb4289196aa80c16c0bb2ee5667e3 | refs/heads/master | 2021-04-09T14:52:52.524243 | 2020-08-10T17:06:04 | 2020-08-10T17:06:04 | 125,722,800 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,325 | cpp | #include <texts/TextKeysAndLanguages.hpp>
#include <gui/containers/TermpControlContainer.hpp>
TermpControlContainer::TermpControlContainer() {
}
void TermpControlContainer::initialize() {
TermpControlContainerBase::initialize();
radiatorTemperatureValueTextArea.setWildcard(radiatorTemperatureBuffer);
fanDutyCycleValueTextArea.setWildcard(fanDutyCycleBuffer);
fanRpmValueTextArea.setWildcard(fanRPMBuffer);
}
void TermpControlContainer::setRadiatorTemperature(int8_t radiatorTemperature) {
Unicode::snprintf(radiatorTemperatureBuffer, TEXTAREA_SIZE, "%d", radiatorTemperature);
radiatorTemperatureValueTextArea.setColor(
radiatorTemperature < 40 ? NORMAL_READOUT_COLOR : (radiatorTemperature < 50 ? ATTENTION_READOUT_COLOR : WARNING_READOUT_COLOR));
radiatorTemperatureValueTextArea.invalidate();
}
void TermpControlContainer::setFanDutyCycle(uint8_t fanDutyCycle) {
if (fanDutyCycle > 0) {
Unicode::snprintf(fanDutyCycleBuffer, TEXTAREA_SIZE, "%u", fanDutyCycle);
fanDutyCycleValueTextArea.invalidate();
} else {
Unicode::strncpy(fanDutyCycleBuffer, TypedText(T_OFF).getText(), TEXTAREA_SIZE);
fanDutyCycleValueTextArea.invalidate();
}
}
void TermpControlContainer::setFanRPM(uint16_t fanRPM) {
Unicode::snprintf(fanRPMBuffer, TEXTAREA_SIZE, "%u", fanRPM);
fanRpmValueTextArea.invalidate();
}
| [
"jakub.przybytek@gmail.com"
] | jakub.przybytek@gmail.com |
aea3572b2f8ea30f42ddcdfdd3e28f2918c58e4d | 948f4e13af6b3014582909cc6d762606f2a43365 | /testcases/juliet_test_suite/testcases/CWE36_Absolute_Path_Traversal/s05/CWE36_Absolute_Path_Traversal__wchar_t_listen_socket_w32CreateFile_62b.cpp | 8ef3c79bf3d2e65e27acbafea44c9ad0ac257033 | [] | no_license | junxzm1990/ASAN-- | 0056a341b8537142e10373c8417f27d7825ad89b | ca96e46422407a55bed4aa551a6ad28ec1eeef4e | refs/heads/master | 2022-08-02T15:38:56.286555 | 2022-06-16T22:19:54 | 2022-06-16T22:19:54 | 408,238,453 | 74 | 13 | null | 2022-06-16T22:19:55 | 2021-09-19T21:14:59 | null | UTF-8 | C++ | false | false | 4,180 | cpp | /* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE36_Absolute_Path_Traversal__wchar_t_listen_socket_w32CreateFile_62b.cpp
Label Definition File: CWE36_Absolute_Path_Traversal.label.xml
Template File: sources-sink-62b.tmpl.cpp
*/
/*
* @description
* CWE: 36 Absolute Path Traversal
* BadSource: listen_socket Read data using a listen socket (server side)
* GoodSource: Full path and file name
* Sinks: w32CreateFile
* BadSink : Open the file named in data using CreateFile()
* Flow Variant: 62 Data flow: data flows using a C++ reference from one function to another in different source files
*
* */
#include "std_testcase.h"
#ifndef _WIN32
#include <wchar.h>
#endif
#ifdef _WIN32
#include <winsock2.h>
#include <windows.h>
#include <direct.h>
#pragma comment(lib, "ws2_32") /* include ws2_32.lib when linking */
#define CLOSE_SOCKET closesocket
#else
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <unistd.h>
#define INVALID_SOCKET -1
#define SOCKET_ERROR -1
#define CLOSE_SOCKET close
#define SOCKET int
#endif
#define TCP_PORT 27015
#define LISTEN_BACKLOG 5
namespace CWE36_Absolute_Path_Traversal__wchar_t_listen_socket_w32CreateFile_62
{
#ifndef OMITBAD
void badSource(wchar_t * &data)
{
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
wchar_t *replace;
SOCKET listenSocket = INVALID_SOCKET;
SOCKET acceptSocket = INVALID_SOCKET;
size_t dataLen = wcslen(data);
do
{
#ifdef _WIN32
if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR)
{
break;
}
wsaDataInit = 1;
#endif
/* POTENTIAL FLAW: Read data using a listen socket */
listenSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (listenSocket == INVALID_SOCKET)
{
break;
}
memset(&service, 0, sizeof(service));
service.sin_family = AF_INET;
service.sin_addr.s_addr = INADDR_ANY;
service.sin_port = htons(TCP_PORT);
if (bind(listenSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR)
{
break;
}
if (listen(listenSocket, LISTEN_BACKLOG) == SOCKET_ERROR)
{
break;
}
acceptSocket = accept(listenSocket, NULL, NULL);
if (acceptSocket == SOCKET_ERROR)
{
break;
}
/* Abort on error or the connection was closed */
recvResult = recv(acceptSocket, (char *)(data + dataLen), sizeof(wchar_t) * (FILENAME_MAX - dataLen - 1), 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* Append null terminator */
data[dataLen + recvResult / sizeof(wchar_t)] = L'\0';
/* Eliminate CRLF */
replace = wcschr(data, L'\r');
if (replace)
{
*replace = L'\0';
}
replace = wcschr(data, L'\n');
if (replace)
{
*replace = L'\0';
}
}
while (0);
if (listenSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(listenSocket);
}
if (acceptSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(acceptSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
}
#endif /* OMITBAD */
#ifndef OMITGOOD
/* goodG2B() uses the GoodSource with the BadSink */
void goodG2BSource(wchar_t * &data)
{
#ifdef _WIN32
/* FIX: Use a fixed, full path and file name */
wcscat(data, L"c:\\temp\\file.txt");
#else
/* FIX: Use a fixed, full path and file name */
wcscat(data, L"/tmp/file.txt");
#endif
}
#endif /* OMITGOOD */
} /* close namespace */
| [
"yzhang0701@gmail.com"
] | yzhang0701@gmail.com |
5ef0992400953e36e6ace41df8ededdfb3877313 | 28016f7056ac874d943c5f460e34769049272cf7 | /src/tibb/NativeProgressBarObject.cpp | 0121e149652efc00f5633212ae97f67911a68442 | [
"Apache-2.0"
] | permissive | sanyaade-mobiledev/titanium_mobile_blackberry | be804f982143e0f5c5d8ac90e41fb7d9b61e459b | 1a3a389c39371b851a0f846330a2bb3dfb8b40fa | refs/heads/master | 2021-01-16T21:36:00.464060 | 2013-02-10T09:45:24 | 2013-02-10T09:45:24 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,686 | cpp | /**
* Appcelerator Titanium Mobile
* Copyright (c) 2009-2012 by Appcelerator, Inc. All Rights Reserved.
* Licensed under the terms of the Apache Public License
* Please see the LICENSE included with this distribution for details.
*/
#include "NativeProgressBarObject.h"
NativeProgressBarObject::NativeProgressBarObject(TiObject* tiObject)
: NativeControlObject(tiObject)
{
progressIndicator_ = NULL;
}
NativeProgressBarObject::~NativeProgressBarObject()
{
}
int NativeProgressBarObject::getObjectType() const
{
return N_TYPE_PROGRESSBAR;
}
NativeProgressBarObject* NativeProgressBarObject::createProgressBar(TiObject* tiObject)
{
return new NativeProgressBarObject(tiObject);
}
int NativeProgressBarObject::initialize()
{
progressIndicator_ = bb::cascades::ProgressIndicator::create();
setControl(progressIndicator_);
return NATIVE_ERROR_OK;
}
int NativeProgressBarObject::setMax(TiObject* obj)
{
float value;
int error = NativeControlObject::getFloat(obj, &value);
if (!N_SUCCEEDED(error))
{
return error;
}
progressIndicator_->setToValue(value);
return NATIVE_ERROR_OK;
}
int NativeProgressBarObject::setMin(TiObject* obj)
{
float value;
int error = NativeControlObject::getFloat(obj, &value);
if (!N_SUCCEEDED(error))
{
return error;
}
progressIndicator_->setFromValue(value);
return NATIVE_ERROR_OK;
}
int NativeProgressBarObject::setValue(TiObject* obj)
{
float value;
int error = NativeControlObject::getFloat(obj, &value);
if (!N_SUCCEEDED(error))
{
return error;
}
progressIndicator_->setValue(value);
return NATIVE_ERROR_OK;
}
| [
"rmcmahon@appcelerator.com"
] | rmcmahon@appcelerator.com |
337118bc7b6fb0506b946e31914ba99a29baaad7 | 86dd584c826feaa77fe78ad8cc877b1870a5047c | /qrc_qml.cpp | 928fbafd0d884764ed047d0152f87d259db18925 | [] | no_license | agooddaytowork/ESSDepots | d08bf687e15dd73b5bf8465d2d5edc6389f6c197 | f05a435d7f1e6e39110cfdf59bce6ca69b54a87a | refs/heads/master | 2021-05-16T10:51:38.223241 | 2017-10-01T15:15:52 | 2017-10-01T15:15:52 | 104,869,352 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 101,420 | cpp | /****************************************************************************
** Resource object code
**
** Created by: The Resource Compiler for Qt version 5.8.1
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
static const unsigned char qt_resource_data[] = {
// /home/pi/WorkSpace/WarehouseStackView/qtquickcontrols2.conf
0x0,0x0,0x1,0x45,
0x3b,
0x20,0x54,0x68,0x69,0x73,0x20,0x66,0x69,0x6c,0x65,0x20,0x63,0x61,0x6e,0x20,0x62,
0x65,0x20,0x65,0x64,0x69,0x74,0x65,0x64,0x20,0x74,0x6f,0x20,0x63,0x68,0x61,0x6e,
0x67,0x65,0x20,0x74,0x68,0x65,0x20,0x73,0x74,0x79,0x6c,0x65,0x20,0x6f,0x66,0x20,
0x74,0x68,0x65,0x20,0x61,0x70,0x70,0x6c,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e,0xd,
0xa,0x3b,0x20,0x53,0x65,0x65,0x20,0x53,0x74,0x79,0x6c,0x69,0x6e,0x67,0x20,0x51,
0x74,0x20,0x51,0x75,0x69,0x63,0x6b,0x20,0x43,0x6f,0x6e,0x74,0x72,0x6f,0x6c,0x73,
0x20,0x32,0x20,0x69,0x6e,0x20,0x74,0x68,0x65,0x20,0x64,0x6f,0x63,0x75,0x6d,0x65,
0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e,0x20,0x66,0x6f,0x72,0x20,0x64,0x65,0x74,0x61,
0x69,0x6c,0x73,0x3a,0xd,0xa,0x3b,0x20,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x64,
0x6f,0x63,0x2e,0x71,0x74,0x2e,0x69,0x6f,0x2f,0x71,0x74,0x2d,0x35,0x2f,0x71,0x74,
0x71,0x75,0x69,0x63,0x6b,0x63,0x6f,0x6e,0x74,0x72,0x6f,0x6c,0x73,0x32,0x2d,0x73,
0x74,0x79,0x6c,0x65,0x73,0x2e,0x68,0x74,0x6d,0x6c,0xd,0xa,0xd,0xa,0x5b,0x43,
0x6f,0x6e,0x74,0x72,0x6f,0x6c,0x73,0x5d,0xd,0xa,0x53,0x74,0x79,0x6c,0x65,0x3d,
0x44,0x65,0x66,0x61,0x75,0x6c,0x74,0xd,0xa,0xd,0xa,0x5b,0x55,0x6e,0x69,0x76,
0x65,0x72,0x73,0x61,0x6c,0x5d,0xd,0xa,0x54,0x68,0x65,0x6d,0x65,0x3d,0x4c,0x69,
0x67,0x68,0x74,0xd,0xa,0x3b,0x41,0x63,0x63,0x65,0x6e,0x74,0x3d,0x53,0x74,0x65,
0x65,0x6c,0xd,0xa,0xd,0xa,0x5b,0x4d,0x61,0x74,0x65,0x72,0x69,0x61,0x6c,0x5d,
0xd,0xa,0x54,0x68,0x65,0x6d,0x65,0x3d,0x4c,0x69,0x67,0x68,0x74,0xd,0xa,0x3b,
0x41,0x63,0x63,0x65,0x6e,0x74,0x3d,0x42,0x6c,0x75,0x65,0x47,0x72,0x65,0x79,0xd,
0xa,0x3b,0x50,0x72,0x69,0x6d,0x61,0x72,0x79,0x3d,0x42,0x6c,0x75,0x65,0x47,0x72,
0x61,0x79,0xd,0xa,
// /home/pi/WorkSpace/WarehouseStackView/main.qml
0x0,0x0,0x3,0x31,
0x0,
0x0,0xb,0x12,0x78,0x9c,0xad,0x56,0xdf,0x6f,0x9b,0x30,0x10,0x7e,0xaf,0xd4,0xff,
0xc1,0x62,0x2f,0xa9,0xb4,0x91,0x84,0x6d,0xdd,0xc6,0xc3,0xa6,0x34,0x55,0xa5,0x4a,
0x4b,0xb5,0xfe,0xd8,0xf6,0x58,0xb9,0xe0,0x82,0x55,0x63,0x53,0xdb,0x24,0x8d,0xa2,
0xfc,0xef,0x3b,0x3,0xe,0x90,0x18,0xa6,0x4a,0xbd,0x28,0x9,0xdc,0x9d,0xcf,0xf7,
0x1d,0xdf,0x9d,0xa1,0x59,0x2e,0xa4,0x46,0xd7,0xfa,0xba,0xa0,0xd1,0x13,0xa,0xfc,
0x2f,0xc7,0x47,0xb4,0xa3,0xf3,0xe7,0x82,0x6b,0x29,0x98,0x2,0xe3,0xe4,0xc0,0xf8,
0x13,0xaf,0x45,0xa1,0x15,0x9a,0xfa,0x1f,0x5b,0xb6,0x79,0x8a,0xa5,0x36,0xb,0xa6,
0x7,0xb,0xce,0x29,0x66,0x22,0x31,0xb,0xc0,0x76,0x7c,0x34,0xcb,0x73,0x46,0x23,
0xac,0xa9,0xe0,0x7f,0x29,0x8f,0xc5,0xa,0x6d,0x8e,0x8f,0x10,0x8,0x8d,0x43,0xa4,
0x74,0x69,0xf8,0x85,0x13,0x52,0x29,0x97,0x54,0xd1,0x7,0x46,0x42,0xa4,0x65,0x51,
0xab,0x56,0x34,0xd6,0x69,0x88,0xa6,0xdf,0x82,0x49,0xa5,0x48,0x9,0x4d,0x52,0xd,
0x9a,0xc9,0xd7,0x5a,0xa3,0xa9,0x36,0x6b,0x9e,0xd5,0x9d,0x1c,0x79,0xb7,0x55,0x4c,
0x64,0x82,0x7a,0x27,0x26,0x85,0xf1,0xd8,0x38,0xdd,0x90,0x48,0x63,0x9e,0x30,0x62,
0x12,0xa8,0x54,0x46,0x22,0xc1,0x84,0xc,0x91,0xf7,0x2e,0x98,0xc2,0xe7,0xd4,0x6b,
0xdb,0x30,0x8f,0x52,0x21,0x95,0xff,0x48,0x19,0xb,0x51,0x8e,0x25,0xe1,0xda,0xda,
0xb7,0x26,0xb2,0xb9,0xb8,0x13,0x82,0x9d,0x61,0x59,0xa3,0xaa,0x91,0xe9,0x94,0xd4,
0xfa,0x46,0x5d,0x3,0xa9,0xc2,0xf8,0xe5,0x5d,0x63,0xb4,0xa0,0x3e,0x4f,0xda,0x9,
0x88,0x1c,0x47,0x54,0xaf,0x43,0x94,0x61,0xca,0x1,0x58,0xf4,0xf4,0x87,0x92,0x95,
0x1f,0x93,0x5c,0xa7,0xe8,0x3b,0x9a,0xa2,0x1f,0xf0,0xd,0xd1,0xa4,0x89,0xd3,0x41,
0x89,0x5a,0xb2,0xc3,0x39,0xb,0xcc,0xc7,0xeb,0x5a,0xdd,0x48,0xad,0x75,0x87,0xb5,
0xdc,0x41,0xac,0x2a,0x4e,0x34,0xaa,0xcd,0x6b,0x82,0xd,0x66,0x69,0x89,0xf1,0x0,
0x50,0xcf,0xa,0xad,0x5,0x3f,0xb4,0xd7,0x75,0xac,0x6b,0x3,0x25,0x38,0x9d,0x74,
0x6b,0xb0,0x9f,0x7,0x23,0x8f,0x7a,0x57,0x77,0x73,0x33,0xec,0xba,0xc0,0x32,0xa1,
0x3c,0x44,0x81,0x23,0xe4,0xeb,0x1f,0xc8,0xfe,0xe,0x4b,0x22,0x35,0xf4,0x3,0x9b,
0x43,0x32,0x44,0xee,0xd2,0xea,0xaa,0x5d,0xcb,0x35,0xf4,0x15,0xc5,0x8a,0xf2,0xa4,
0xdd,0x1d,0x6d,0xb1,0x1c,0x3a,0x75,0x6c,0x2f,0x71,0x4c,0xb,0x15,0xa2,0x4f,0x87,
0xa6,0x9a,0x19,0xa6,0xe4,0x99,0x28,0x14,0xf1,0x73,0x49,0x94,0x22,0x31,0x60,0x81,
0xae,0x8,0x2,0xf,0x0,0x79,0x5a,0x62,0xae,0xaa,0x5c,0xbd,0xc3,0x10,0x67,0x24,
0xc5,0x4b,0x2a,0x24,0x82,0xbe,0xb3,0xcf,0x65,0x83,0xae,0x8a,0xec,0x81,0xc8,0x19,
0xa7,0x59,0xd9,0x91,0x9b,0xad,0x21,0xd2,0xfe,0xd2,0xcb,0xc,0xfa,0xd4,0x45,0x83,
0x37,0x28,0x9a,0x11,0x25,0xa,0x19,0xc1,0x70,0xf0,0xa8,0xd9,0x48,0x8d,0x39,0x24,
0x9a,0x94,0xf9,0xdc,0x3,0x4e,0x48,0xba,0x50,0xf7,0x54,0x93,0xcc,0xcf,0x79,0xe2,
0x40,0xe6,0xc8,0x78,0x61,0x8a,0x34,0x93,0x4,0xf7,0x65,0x6d,0x9,0x5c,0x56,0x73,
0x18,0x58,0x7f,0x8b,0xec,0x7b,0x66,0x25,0x2b,0xe1,0x9,0x7e,0x98,0x3a,0x1e,0xaf,
0x11,0xc1,0xe7,0x30,0x69,0x9f,0x48,0xbc,0xcf,0xce,0x5c,0xe4,0xa3,0x93,0xff,0x42,
0xdb,0x76,0xfa,0xbd,0xfe,0xab,0x2e,0x76,0xa1,0xba,0x43,0xae,0xbb,0x4d,0x63,0x72,
0x83,0x6b,0xec,0x8f,0x22,0x2,0x2a,0x76,0x39,0x4c,0x39,0x35,0x4,0xbf,0x84,0x27,
0x11,0x22,0xf3,0xbb,0x5f,0x5c,0xbb,0x5f,0x75,0x56,0xf4,0x8c,0x93,0xae,0xda,0x3d,
0x5b,0xa0,0x57,0x85,0xbe,0x60,0x42,0x38,0x8,0x63,0xcf,0x9a,0x60,0xe2,0xa8,0x71,
0x73,0xee,0xb8,0xac,0xc3,0xf3,0xb5,0x5d,0x16,0x2d,0xf2,0x1d,0x83,0xe1,0xfa,0x4d,
0xe6,0x16,0xc4,0xb1,0x63,0x6b,0xea,0xca,0xce,0x35,0xdf,0x3e,0x9a,0x39,0x71,0xe8,
0x7a,0x43,0x72,0x82,0x9d,0xed,0x34,0x40,0xf7,0x15,0x24,0x99,0x1a,0xba,0x2f,0x70,
0xee,0xa,0x6a,0x64,0xb0,0xb8,0x46,0xba,0x5,0x76,0xfb,0x64,0x22,0x26,0x40,0xaa,
0x6c,0x5d,0x1f,0xf3,0xb,0x73,0xdf,0xe7,0xdc,0x77,0x82,0xc,0x80,0xb1,0x80,0xe0,
0x55,0x85,0x2e,0x69,0x5c,0x60,0x56,0x6f,0xd4,0xef,0x3e,0x34,0x76,0xad,0xd4,0xd8,
0x87,0x5c,0x34,0x79,0xd1,0xbb,0x37,0xa2,0x2b,0x9c,0xf5,0x4c,0xe,0x23,0x2f,0x61,
0x76,0xef,0xe6,0x83,0x95,0x35,0x78,0x38,0xb9,0x65,0xa5,0x19,0x16,0xfd,0x3e,0x3,
0x25,0x32,0xb2,0x37,0x64,0xa,0x95,0x8e,0xae,0xb5,0xf,0x67,0x87,0x60,0x4b,0x12,
0xff,0x96,0x6c,0xe4,0x3d,0x67,0x6c,0x7c,0xdb,0xbc,0xe3,0xf9,0x70,0xef,0x9d,0xbc,
0xdf,0xa8,0x9b,0x8b,0xcb,0xf3,0x10,0x99,0xdf,0xad,0x63,0x30,0x59,0x71,0xcc,0xde,
0x1e,0xf5,0xe1,0x28,0x6b,0x53,0xa2,0x19,0x67,0xa5,0xe1,0x1f,0x6a,0xfc,0xa0,0x3c,
// /home/pi/WorkSpace/WarehouseStackView/qml/StationPage.qml
0x0,0x0,0xa,0xef,
0x69,
0x6d,0x70,0x6f,0x72,0x74,0x20,0x51,0x74,0x51,0x75,0x69,0x63,0x6b,0x20,0x32,0x2e,
0x37,0xd,0xa,0x69,0x6d,0x70,0x6f,0x72,0x74,0x20,0x51,0x74,0x43,0x68,0x61,0x72,
0x74,0x73,0x20,0x32,0x2e,0x31,0xd,0xa,0xd,0xa,0x49,0x74,0x65,0x6d,0x20,0x7b,
0xd,0xa,0x20,0x20,0x20,0x20,0x69,0x64,0x3a,0x20,0x73,0x74,0x61,0x74,0x69,0x6f,
0x6e,0x50,0x61,0x67,0x65,0xd,0xa,0xd,0xa,0x20,0x20,0x20,0x20,0x70,0x72,0x6f,
0x70,0x65,0x72,0x74,0x79,0x20,0x73,0x74,0x72,0x69,0x6e,0x67,0x20,0x73,0x52,0x46,
0x49,0x44,0xd,0xa,0xd,0xa,0x20,0x20,0x20,0x20,0x43,0x68,0x61,0x72,0x74,0x56,
0x69,0x65,0x77,0x7b,0xd,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x64,
0x3a,0x20,0x63,0x68,0x61,0x72,0x74,0x56,0x69,0x65,0x77,0xd,0xa,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x61,0x6e,0x63,0x68,0x6f,0x72,0x73,0x2e,0x74,0x6f,0x70,
0x4d,0x61,0x72,0x67,0x69,0x6e,0x3a,0x20,0x35,0x30,0xd,0xa,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x61,0x6e,0x63,0x68,0x6f,0x72,0x73,0x2e,0x74,0x6f,0x70,0x3a,
0x20,0x70,0x61,0x72,0x65,0x6e,0x74,0x2e,0x74,0x6f,0x70,0xd,0xa,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x61,0x6e,0x63,0x68,0x6f,0x72,0x73,0x2e,0x62,0x6f,0x74,
0x74,0x6f,0x6d,0x3a,0x20,0x70,0x61,0x72,0x65,0x6e,0x74,0x2e,0x62,0x6f,0x74,0x74,
0x6f,0x6d,0xd,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x61,0x6e,0x63,0x68,
0x6f,0x72,0x73,0x2e,0x6c,0x65,0x66,0x74,0x3a,0x20,0x70,0x61,0x72,0x65,0x6e,0x74,
0x2e,0x6c,0x65,0x66,0x74,0xd,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x77,
0x69,0x64,0x74,0x68,0x3a,0x20,0x31,0x32,0x30,0x30,0xd,0xa,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x74,0x68,0x65,0x6d,0x65,0x3a,0x20,0x43,0x68,0x61,0x72,0x74,
0x56,0x69,0x65,0x77,0x2e,0x43,0x68,0x61,0x72,0x74,0x54,0x68,0x65,0x6d,0x65,0x44,
0x61,0x72,0x6b,0xd,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x61,0x6e,0x74,
0x69,0x61,0x6c,0x69,0x61,0x73,0x69,0x6e,0x67,0x3a,0x20,0x74,0x72,0x75,0x65,0xd,
0xa,0xd,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x4d,0x75,0x6c,0x74,0x69,0x50,
0x6f,0x69,0x6e,0x74,0x54,0x6f,0x75,0x63,0x68,0x41,0x72,0x65,0x61,0xd,0xa,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x7b,0xd,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x61,0x6e,0x63,0x68,0x6f,0x72,0x73,0x2e,0x66,0x69,0x6c,0x6c,
0x3a,0x20,0x70,0x61,0x72,0x65,0x6e,0x74,0xd,0xa,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x6d,0x69,0x6e,0x69,0x6d,0x75,0x6d,0x54,0x6f,0x75,0x63,
0x68,0x50,0x6f,0x69,0x6e,0x74,0x73,0x3a,0x20,0x31,0xd,0xa,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6d,0x61,0x78,0x69,0x6d,0x75,0x6d,0x54,0x6f,
0x75,0x63,0x68,0x50,0x6f,0x69,0x6e,0x74,0x73,0x3a,0x20,0x32,0xd,0xa,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6d,0x6f,0x75,0x73,0x65,0x45,0x6e,
0x61,0x62,0x6c,0x65,0x64,0x3a,0x20,0x74,0x72,0x75,0x65,0xd,0xa,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x74,0x6f,0x75,0x63,0x68,0x50,0x6f,0x69,
0x6e,0x74,0x73,0x3a,0x20,0x5b,0xd,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x54,0x6f,0x75,0x63,0x68,0x50,0x6f,0x69,0x6e,
0x74,0x20,0x7b,0x20,0x69,0x64,0x3a,0x20,0x74,0x6f,0x75,0x63,0x68,0x31,0x20,0x7d,
0x2c,0xd,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x54,0x6f,0x75,0x63,0x68,0x50,0x6f,0x69,0x6e,0x74,0x20,0x7b,0x20,0x69,
0x64,0x3a,0x20,0x74,0x6f,0x75,0x63,0x68,0x32,0x20,0x7d,0xd,0xa,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5d,0xd,0xa,0xd,0xa,0x20,0x20,0x20,
0x20,0x2f,0x2f,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x6f,0x6e,0x52,0x65,0x6c,0x65,0x61,0x73,0x65,0x64,0x3a,0x20,0x7b,0xd,
0xa,0x20,0x20,0x20,0x20,0x2f,0x2f,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x74,0x65,0x73,0x74,0x4c,
0x61,0x62,0x65,0x6c,0x2e,0x74,0x65,0x78,0x74,0x20,0x3d,0x20,0x74,0x6f,0x75,0x63,
0x68,0x31,0x2e,0x78,0xd,0xa,0x20,0x20,0x20,0x20,0x2f,0x2f,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7d,0xd,0xa,0xd,0xa,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6f,0x6e,0x50,0x72,0x65,
0x73,0x73,0x65,0x64,0x3a,0x20,0x7b,0xd,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x6e,0x69,0x74,0x69,0x61,0x6c,0x58,
0x20,0x3d,0x20,0x74,0x6f,0x75,0x63,0x68,0x31,0x2e,0x78,0xd,0xa,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7d,0xd,0xa,0xd,0xa,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6f,0x6e,0x47,0x65,0x73,0x74,0x75,0x72,
0x65,0x53,0x74,0x61,0x72,0x74,0x65,0x64,0x3a,0xd,0xa,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x7b,0xd,0xa,0x2f,0x2f,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x74,0x65,0x73,0x74,0x4c,0x61,0x62,0x65,
0x6c,0x2e,0x74,0x65,0x78,0x74,0x20,0x3d,0x20,0x74,0x6f,0x75,0x63,0x68,0x31,0x2e,
0x78,0x20,0x2d,0x20,0x69,0x6e,0x69,0x74,0x69,0x61,0x6c,0x58,0xd,0xa,0xd,0xa,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x61,
0x78,0x69,0x73,0x58,0x31,0x2e,0x6d,0x69,0x6e,0x20,0x3d,0x20,0x6e,0x65,0x77,0x20,
0x44,0x61,0x74,0x65,0x28,0x61,0x78,0x69,0x73,0x58,0x31,0x2e,0x6d,0x69,0x6e,0x20,
0x2d,0x20,0x28,0x74,0x6f,0x75,0x63,0x68,0x31,0x2e,0x78,0x20,0x2d,0x20,0x69,0x6e,
0x69,0x74,0x69,0x61,0x6c,0x58,0x29,0x29,0xd,0xa,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x61,0x78,0x69,0x73,0x58,0x31,0x2e,
0x6d,0x61,0x78,0x20,0x3d,0x20,0x6e,0x65,0x77,0x20,0x44,0x61,0x74,0x65,0x28,0x61,
0x78,0x69,0x73,0x58,0x31,0x2e,0x6d,0x61,0x78,0x20,0x2d,0x20,0x28,0x74,0x6f,0x75,
0x63,0x68,0x31,0x2e,0x78,0x20,0x2d,0x20,0x69,0x6e,0x69,0x74,0x69,0x61,0x6c,0x58,
0x29,0x29,0xd,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7d,
0xd,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7d,0xd,0xa,0xd,0xa,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x4c,0x6f,0x67,0x56,0x61,0x6c,0x75,0x65,0x41,0x78,0x69,
0x73,0x7b,0xd,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,
0x64,0x3a,0x20,0x61,0x78,0x69,0x73,0x59,0x31,0xd,0xa,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x62,0x61,0x73,0x65,0x3a,0x20,0x31,0x30,0xd,0xa,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6d,0x61,0x78,0x3a,0x20,
0x31,0x65,0x2d,0x35,0xd,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x6d,0x69,0x6e,0x3a,0x20,0x31,0x65,0x2d,0x31,0x31,0xd,0xa,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6c,0x61,0x62,0x65,0x6c,0x46,0x6f,0x72,
0x6d,0x61,0x74,0x3a,0x20,0x22,0x25,0x2e,0x32,0x65,0x22,0xd,0xa,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x7d,0xd,0xa,0xd,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x44,0x61,0x74,0x65,0x54,0x69,0x6d,0x65,0x41,0x78,0x69,0x73,0x7b,0xd,0xa,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x64,0x3a,0x20,0x61,0x78,
0x69,0x73,0x58,0x31,0xd,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x74,0x69,0x63,0x6b,0x43,0x6f,0x75,0x6e,0x74,0x3a,0x20,0x31,0x30,0xd,0xa,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6d,0x69,0x6e,0x3a,0x20,
0x6e,0x65,0x77,0x20,0x44,0x61,0x74,0x65,0x28,0x6e,0x65,0x77,0x20,0x44,0x61,0x74,
0x65,0x28,0x29,0x20,0x2d,0x20,0x31,0x30,0x30,0x30,0x30,0x30,0x29,0xd,0xa,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6d,0x61,0x78,0x3a,0x20,0x6e,
0x65,0x77,0x20,0x44,0x61,0x74,0x65,0x28,0x29,0xd,0xa,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6f,0x72,0x6d,0x61,0x74,0x3a,0x20,0x22,0x4d,
0x4d,0x4d,0x5c,0x64,0x64,0x20,0x68,0x68,0x3a,0x6d,0x6d,0x22,0xd,0xa,0xd,0xa,
0xd,0xa,0xd,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7d,0xd,0xa,0xd,0xa,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x4c,0x69,0x6e,0x65,0x53,0x65,0x72,0x69,0x65,
0x73,0x7b,0xd,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,
0x64,0x3a,0x20,0x70,0x72,0x65,0x73,0x73,0x75,0x72,0x65,0x53,0x65,0x72,0x69,0x65,
0xd,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6e,0x61,0x6d,
0x65,0x3a,0x20,0x22,0x50,0x72,0x65,0x73,0x73,0x75,0x72,0x65,0x22,0xd,0xa,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x61,0x78,0x69,0x73,0x58,0x3a,
0x20,0x61,0x78,0x69,0x73,0x58,0x31,0xd,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x61,0x78,0x69,0x73,0x59,0x3a,0x20,0x61,0x78,0x69,0x73,0x59,
0x31,0xd,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x75,0x73,
0x65,0x4f,0x70,0x65,0x6e,0x47,0x4c,0x3a,0x20,0x74,0x72,0x75,0x65,0xd,0xa,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x77,0x69,0x64,0x74,0x68,
0x3a,0x20,0x34,0xd,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x63,0x6f,0x6c,0x6f,0x72,0x3a,0x20,0x22,0x72,0x65,0x64,0x22,0xd,0xa,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x73,0x74,0x79,0x6c,0x65,
0x3a,0x20,0x51,0x74,0x2e,0x44,0x6f,0x74,0x4c,0x69,0x6e,0x65,0xd,0xa,0xd,0xa,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7d,0xd,0xa,0xd,0xa,0xd,0xa,0x2f,0x2f,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x54,0x69,0x6d,0x65,0x72,0x7b,0xd,0xa,0x2f,
0x2f,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x64,0x3a,0x20,
0x74,0x65,0x73,0x74,0x54,0x69,0x6d,0x65,0x72,0xd,0xa,0x2f,0x2f,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x6e,0x74,0x65,0x72,0x76,0x61,0x6c,
0x3a,0x20,0x33,0x30,0x30,0x30,0xd,0xa,0x2f,0x2f,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x70,0x65,0x61,0x74,0x3a,0x20,0x74,0x72,0x75,
0x65,0xd,0xa,0x2f,0x2f,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x72,0x75,0x6e,0x6e,0x69,0x6e,0x67,0x3a,0x20,0x74,0x72,0x75,0x65,0xd,0xa,0x2f,
0x2f,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6f,0x6e,0x54,0x72,
0x69,0x67,0x67,0x65,0x72,0x65,0x64,0x3a,0x20,0x7b,0xd,0xa,0xd,0xa,0xd,0xa,
0xd,0xa,0x2f,0x2f,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x61,0x78,0x69,0x73,0x58,0x31,0x2e,0x6d,0x69,0x6e,0x20,0x3d,0x20,
0x6e,0x65,0x77,0x20,0x44,0x61,0x74,0x65,0x28,0x6e,0x65,0x77,0x20,0x44,0x61,0x74,
0x65,0x28,0x29,0x20,0x2d,0x20,0x31,0x30,0x30,0x30,0x30,0x29,0xd,0xa,0x2f,0x2f,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x61,
0x78,0x69,0x73,0x58,0x31,0x2e,0x6d,0x61,0x78,0x20,0x3d,0x20,0x6e,0x65,0x77,0x20,
0x44,0x61,0x74,0x65,0x28,0x29,0xd,0xa,0x2f,0x2f,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6d,0x79,0x53,0x65,0x72,0x69,0x65,
0x73,0x2e,0x61,0x70,0x70,0x65,0x6e,0x64,0x28,0x74,0x6f,0x4d,0x73,0x65,0x63,0x73,
0x53,0x69,0x6e,0x63,0x65,0x45,0x70,0x6f,0x63,0x68,0x28,0x6e,0x65,0x77,0x20,0x44,
0x61,0x74,0x65,0x28,0x29,0x29,0x2c,0x20,0x35,0x65,0x2d,0x38,0x29,0xd,0xa,0xd,
0xa,0x2f,0x2f,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7d,0xd,
0xa,0xd,0xa,0x2f,0x2f,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e,0x20,0x74,0x6f,0x4d,0x73,0x65,0x63,0x73,
0x53,0x69,0x6e,0x63,0x65,0x45,0x70,0x6f,0x63,0x68,0x28,0x64,0x61,0x74,0x65,0x29,
0x20,0x7b,0xd,0xa,0x2f,0x2f,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x76,0x61,0x72,0x20,0x6d,0x73,0x65,0x63,0x73,0x20,0x3d,
0x20,0x64,0x61,0x74,0x65,0x2e,0x67,0x65,0x74,0x54,0x69,0x6d,0x65,0x28,0x29,0x3b,
0xd,0xa,0x2f,0x2f,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x6d,0x73,0x65,0x63,0x73,0x3b,
0xd,0xa,0x2f,0x2f,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7d,
0xd,0xa,0xd,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x54,0x69,0x6d,0x65,
0x72,0xd,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7b,0xd,0xa,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x64,0x3a,0x6c,0x6f,0x61,
0x64,0x47,0x72,0x61,0x70,0x68,0x46,0x69,0x72,0x73,0x74,0x54,0x69,0x6d,0x65,0xd,
0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x6e,0x74,
0x65,0x72,0x76,0x61,0x6c,0x3a,0x20,0x32,0x30,0x30,0xd,0xa,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x70,0x65,0x61,0x74,0x3a,0x20,
0x66,0x61,0x6c,0x73,0x65,0xd,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x72,0x75,0x6e,0x6e,0x69,0x6e,0x67,0x3a,0x74,0x72,0x75,0x65,0xd,
0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6f,0x6e,0x54,
0x72,0x69,0x67,0x67,0x65,0x72,0x65,0x64,0x3a,0xd,0xa,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7b,0xd,0xa,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x4c,0x6f,0x63,0x61,0x6c,0x44,
0x62,0x2e,0x69,0x6e,0x69,0x74,0x69,0x61,0x6c,0x69,0x7a,0x65,0x44,0x61,0x74,0x61,
0x54,0x6f,0x47,0x72,0x61,0x70,0x68,0x28,0x70,0x72,0x65,0x73,0x73,0x75,0x72,0x65,
0x53,0x65,0x72,0x69,0x65,0x2c,0x61,0x78,0x69,0x73,0x58,0x31,0x2c,0x20,0x73,0x52,
0x46,0x49,0x44,0x29,0xd,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x7d,0xd,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7d,0xd,0xa,
0x20,0x20,0x20,0x20,0x7d,0xd,0xa,0xd,0xa,0x20,0x20,0x20,0x20,0x43,0x6f,0x6e,
0x74,0x72,0x6f,0x6c,0x50,0x61,0x6e,0x65,0x6c,0x7b,0xd,0xa,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x72,0x46,0x49,0x44,0x3a,0x20,0x73,0x52,0x46,0x49,0x44,0xd,
0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x64,0x3a,0x20,0x73,0x74,0x61,
0x74,0x69,0x6f,0x6e,0x43,0x6f,0x6e,0x74,0x72,0x6f,0x6c,0x50,0x61,0x6e,0x65,0x6c,
0xd,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x61,0x6e,0x63,0x68,0x6f,0x72,
0x73,0x2e,0x74,0x6f,0x70,0x3a,0x20,0x70,0x61,0x72,0x65,0x6e,0x74,0x2e,0x74,0x6f,
0x70,0xd,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x61,0x6e,0x63,0x68,0x6f,
0x72,0x73,0x2e,0x72,0x69,0x67,0x68,0x74,0x3a,0x20,0x70,0x61,0x72,0x65,0x6e,0x74,
0x2e,0x72,0x69,0x67,0x68,0x74,0xd,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x61,0x6e,0x63,0x68,0x6f,0x72,0x73,0x2e,0x62,0x6f,0x74,0x74,0x6f,0x6d,0x3a,0x20,
0x70,0x61,0x72,0x65,0x6e,0x74,0x2e,0x62,0x6f,0x74,0x74,0x6f,0x6d,0xd,0xa,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x61,0x6e,0x63,0x68,0x6f,0x72,0x73,0x2e,0x74,
0x6f,0x70,0x4d,0x61,0x72,0x67,0x69,0x6e,0x3a,0x20,0x35,0x30,0xd,0xa,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x61,0x6e,0x63,0x68,0x6f,0x72,0x73,0x2e,0x72,0x69,
0x67,0x68,0x74,0x4d,0x61,0x72,0x67,0x69,0x6e,0x3a,0x20,0x31,0x30,0x30,0xd,0xa,
0xd,0xa,0xd,0xa,0x20,0x20,0x20,0x20,0x7d,0xd,0xa,0x7d,0xd,0xa,
// /home/pi/WorkSpace/WarehouseStackView/qml/ControlPanel.qml
0x0,0x0,0x4,0x34,
0x0,
0x0,0xf,0xde,0x78,0x9c,0xc5,0x57,0xd1,0x6e,0xda,0x4a,0x10,0x7d,0x8f,0x94,0x7f,
0x18,0xa1,0x3c,0xb4,0xb7,0x8d,0x21,0x89,0x74,0x55,0xf9,0xad,0x25,0x84,0x46,0xa5,
0x84,0x14,0x9a,0x3e,0x56,0x1b,0x7b,0x8c,0x57,0xac,0x77,0xdd,0xdd,0x35,0x94,0x5e,
0xf5,0xdf,0xef,0xec,0xda,0xc6,0xe,0x21,0x51,0x2b,0x7a,0x2f,0x44,0x11,0x5a,0xcf,
0xec,0x9c,0x73,0xe6,0x8c,0xd7,0xa6,0xfb,0xd7,0x1f,0xfc,0x1c,0x1f,0x95,0xff,0xd0,
0x57,0xf9,0x5a,0xf3,0x79,0x6a,0xe1,0x45,0xff,0x25,0x9c,0xf7,0xce,0xfe,0x86,0x59,
0x8a,0x70,0x6b,0x29,0x92,0xe5,0x4c,0xae,0x61,0x64,0xe3,0xa0,0x4a,0x95,0x96,0x45,
0x36,0x84,0xd4,0xda,0xdc,0x84,0xdd,0xee,0x6a,0xb5,0xa,0xbe,0xd9,0x80,0xab,0xae,
0xe0,0x11,0x4a,0xc3,0xe5,0xbc,0xbb,0x29,0x3c,0x4b,0xb9,0x81,0x84,0xb,0x4,0xfa,
0xce,0x99,0xb6,0xa0,0x12,0xb0,0x55,0xe9,0x94,0xd6,0x6,0x32,0x15,0x17,0x14,0x6f,
0xae,0xcf,0x94,0x12,0xb,0x6e,0x83,0x4d,0x91,0x93,0xdb,0xd9,0xd7,0x77,0x83,0xe1,
0xf5,0xf8,0xeb,0xe8,0xba,0x3f,0x18,0x4f,0x7,0xe1,0x70,0x32,0x3a,0xa9,0xd8,0x64,
0x19,0xea,0x88,0x33,0x1,0x23,0x8f,0x8e,0xf0,0xd9,0xb0,0x39,0xfa,0x60,0x75,0x5,
0xd,0xa4,0x4a,0xc4,0xc4,0xb,0x96,0x4c,0xf0,0x18,0xa2,0x66,0x13,0xc1,0x95,0xac,
0x29,0x29,0x63,0x6b,0x28,0xa8,0x80,0x6d,0x38,0x4b,0x5f,0x87,0x45,0x91,0xd2,0x31,
0x93,0x11,0xc2,0x8a,0xdb,0xd4,0xf3,0x6c,0xd5,0xa8,0xa,0x0,0x9b,0x6b,0xc4,0xc,
0xa5,0x85,0x5c,0xab,0x25,0x8f,0x31,0xde,0xa4,0xfb,0x32,0x53,0x95,0xd8,0x15,0xd3,
0x24,0x55,0xbf,0x6,0x26,0x2c,0x6a,0xc9,0x2c,0x5f,0xa2,0x58,0xbf,0x26,0xa4,0x9d,
0x28,0x94,0x93,0x19,0xc2,0xa2,0x96,0x73,0x49,0xf5,0x6a,0x42,0xb0,0xd2,0xdc,0x5a,
0x94,0x2d,0xcc,0x7b,0xb4,0x2b,0xa4,0x2b,0x6b,0x55,0x0,0x93,0xf1,0x96,0x7f,0x1,
0x5c,0x29,0xd,0x1b,0x83,0xca,0xc2,0x65,0x2d,0xe9,0x1a,0x22,0x63,0x6e,0xb9,0x92,
0x6,0xa8,0x5d,0x3b,0x9c,0xf5,0xe9,0xa7,0x4d,0x5a,0x59,0x2e,0x29,0x34,0x91,0xd4,
0xbe,0xc,0x97,0x89,0xd2,0x19,0x73,0xd1,0xaa,0x89,0x58,0xf2,0x8e,0x2c,0xb8,0x8,
0x30,0xbb,0xa3,0x6e,0x95,0x71,0x5a,0x98,0xc6,0xed,0xe1,0xf8,0x33,0xc,0x51,0xa2,
0xa6,0xd6,0x4e,0x8a,0x7b,0xe2,0xbc,0xc3,0xda,0xb7,0xf,0xdb,0xd7,0x58,0xe6,0x4c,
0xbc,0x47,0x47,0x21,0x86,0x42,0xc6,0xa8,0x5b,0x7d,0xac,0x46,0x8c,0x0,0x4a,0xa0,
0xdd,0x20,0x4b,0xd4,0xc6,0xa9,0xb8,0x20,0x9f,0xe0,0x5,0xd1,0xa6,0x8e,0x6a,0x50,
0xb9,0x93,0xf6,0x12,0xdc,0xbd,0x20,0x18,0xd5,0xab,0xf3,0xca,0x26,0xe6,0xce,0x72,
0x82,0xbc,0x5f,0x7b,0x88,0xf,0x97,0x3,0xb8,0x22,0x67,0x9c,0x3,0x57,0x8a,0x78,
0xf8,0xc6,0x4,0xde,0x94,0xcd,0xbc,0xb9,0x51,0x60,0x74,0x57,0x38,0x78,0x93,0xfa,
0xcd,0xbe,0x98,0x2b,0xe0,0x37,0x6f,0x6,0xa6,0x29,0xe1,0xed,0x22,0x34,0x64,0xda,
0xd9,0x48,0x63,0xe3,0xb2,0xbd,0xf2,0xea,0xde,0x8,0xe8,0xde,0xb8,0xa8,0x2c,0x89,
0x44,0x11,0xfb,0xa9,0xf1,0x59,0x39,0x8b,0x16,0x6c,0xee,0xb6,0xf9,0x46,0x54,0x1d,
0xb,0x60,0x22,0x90,0x91,0x6e,0x8d,0x4b,0x8e,0xab,0xb2,0x9e,0x12,0x42,0xad,0x28,
0xf3,0x91,0xb5,0x56,0x1,0x91,0x2f,0x34,0xd6,0x9d,0x7c,0xaa,0x8b,0x1a,0xbf,0x15,
0x5c,0xfb,0xd1,0x34,0x34,0xcf,0x42,0xf8,0x52,0xe4,0x4c,0x86,0x5b,0x67,0xc7,0x5c,
0x16,0x81,0xd2,0xf3,0x6e,0xdd,0x97,0xee,0x3c,0x17,0xa7,0x17,0x41,0x2f,0x48,0x6d,
0x26,0x1e,0x1e,0x2,0x83,0xf1,0x65,0x7d,0x4,0x9c,0xd4,0x81,0x3f,0xf7,0xa1,0x53,
0xeb,0xf8,0x88,0x67,0xb9,0xa2,0x53,0xea,0xd6,0xde,0x16,0x3c,0x5a,0xc0,0x79,0x70,
0xb6,0x7d,0x2d,0x18,0x31,0x9a,0x8,0x52,0x75,0x16,0xf4,0x1e,0xc5,0xdc,0xe9,0xa8,
0x95,0x30,0xb4,0xb1,0xe7,0xca,0x1d,0x1f,0xf5,0x95,0x28,0x32,0x59,0xee,0x81,0x7f,
0x8e,0x8f,0x80,0x3e,0x34,0x2c,0x39,0x6a,0xbb,0x6,0x63,0xbd,0x8d,0xfa,0xea,0xfa,
0xb2,0x8c,0x18,0x32,0x89,0xae,0x84,0xf0,0xa6,0x5c,0x97,0xfb,0x2,0x32,0x4a,0xbc,
0x47,0x77,0x40,0x87,0x60,0x75,0x81,0x65,0x70,0xc5,0x63,0x9b,0x86,0x70,0xd1,0xf3,
0x50,0x65,0xfa,0x3d,0x8a,0xa,0xa4,0x95,0x41,0x7,0x2f,0xf9,0x10,0xf8,0x55,0x2b,
0xa8,0x59,0xfe,0x51,0xc5,0x18,0x96,0xdb,0x82,0x2f,0xb4,0x6e,0xa2,0x34,0xde,0x96,
0x47,0x4c,0xbc,0x15,0x7c,0x2e,0x9d,0x8d,0x21,0x89,0xc,0xfc,0xea,0xae,0x4f,0x4b,
0x77,0xdf,0xd7,0xb9,0x16,0xbf,0xdb,0xb0,0x33,0x38,0x35,0x74,0xa7,0xd0,0xf1,0x75,
0xdd,0xc,0x4c,0xa7,0x49,0x4a,0xa8,0x35,0x41,0xce,0xbf,0xa3,0x98,0xf2,0x1f,0xe8,
0x68,0xd7,0xac,0x7f,0xee,0x26,0xcf,0xe3,0x10,0x74,0xc2,0xe3,0xff,0x5a,0xce,0x8,
0x13,0xbb,0xad,0xe5,0x13,0x39,0x12,0x76,0xe0,0x55,0xcb,0x9a,0x5d,0x1a,0xce,0x7b,
0x1b,0x5,0x4f,0x6b,0x58,0xd8,0x5c,0x1e,0x42,0xc3,0x87,0xd9,0x64,0x1c,0x3e,0x63,
0x40,0x8b,0xfc,0xd3,0xd4,0xd,0x6a,0x7a,0xc6,0x1d,0x4a,0x0,0x4c,0x3d,0x3c,0xec,
0x2d,0xe4,0x40,0xa,0x46,0x7b,0x13,0x37,0x45,0x9e,0xb,0x8e,0x7a,0x86,0xc6,0x5e,
0xd2,0x73,0xe7,0x10,0x2a,0xa6,0x15,0x7,0x70,0x24,0xc0,0xb1,0xd8,0x53,0x54,0x96,
0xcc,0x27,0x1a,0x8d,0x7b,0x8e,0xa8,0x24,0x39,0x84,0xa4,0x8f,0x57,0x43,0x18,0x16,
0x92,0x9e,0x84,0x9,0xc,0xef,0xa0,0x2f,0x14,0xbd,0x30,0x84,0xb0,0x9f,0xac,0x9c,
0x4e,0xbf,0x94,0x1e,0xa5,0x37,0x3a,0x6e,0x9f,0x8e,0xff,0x9f,0xaa,0xc9,0xcd,0xbe,
0x12,0xe8,0x2d,0x3,0x3f,0x61,0x84,0xf4,0x5e,0x75,0x8,0x1,0x6e,0xb6,0xa0,0xc2,
0xdf,0xdb,0xe,0xa7,0x65,0x9a,0x72,0x7a,0x59,0x3a,0xc8,0x23,0xc4,0x6b,0xa9,0xf0,
0x7f,0x55,0x4a,0xfd,0x57,0xa7,0x4e,0xe9,0x97,0x40,0x94,0xb6,0x74,0xd5,0xda,0xd2,
0xe5,0xcd,0xb8,0xc,0x3e,0x8c,0x95,0xd0,0xef,0xef,0xe0,0x66,0xdc,0x79,0x18,0x89,
0x52,0x8c,0x16,0x8e,0x49,0xc2,0x84,0xc1,0x36,0xc8,0xcf,0x5f,0xc0,0xa3,0x37,0x16,
0x8b,0x91,0xbd,0x91,0x4f,0x83,0x4e,0xca,0x94,0xdf,0x44,0x7e,0xac,0xb6,0x59,0xef,
0xe0,0x41,0x3f,0xe0,0x96,0xf8,0x8c,0x74,0xe8,0xdc,0xb9,0x8c,0xdf,0x26,0x51,0x2f,
0xde,0x15,0xd6,0x2a,0xf9,0x2c,0x5,0x43,0x96,0x6e,0xa7,0xb5,0xf0,0x9d,0xe3,0x5b,
0xd8,0xad,0x97,0xb8,0x2f,0xe5,0xf8,0x35,0xef,0x70,0xad,0x36,0xd0,0xd7,0xbf,0x5d,
0x16,0x77,0x52,
// /home/pi/WorkSpace/WarehouseStackView/images/tabs_standard.png
0x0,0x0,0x4,0xce,
0x89,
0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,
0x0,0x0,0xe,0x0,0x0,0x0,0x32,0x8,0x2,0x0,0x0,0x0,0xe3,0x92,0x7d,0x50,
0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,
0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x4,0x28,0x69,0x54,0x58,0x74,0x58,0x4d,0x4c,
0x3a,0x63,0x6f,0x6d,0x2e,0x61,0x64,0x6f,0x62,0x65,0x2e,0x78,0x6d,0x70,0x0,0x0,
0x0,0x0,0x0,0x3c,0x78,0x3a,0x78,0x6d,0x70,0x6d,0x65,0x74,0x61,0x20,0x78,0x6d,
0x6c,0x6e,0x73,0x3a,0x78,0x3d,0x22,0x61,0x64,0x6f,0x62,0x65,0x3a,0x6e,0x73,0x3a,
0x6d,0x65,0x74,0x61,0x2f,0x22,0x20,0x78,0x3a,0x78,0x6d,0x70,0x74,0x6b,0x3d,0x22,
0x58,0x4d,0x50,0x20,0x43,0x6f,0x72,0x65,0x20,0x35,0x2e,0x31,0x2e,0x32,0x22,0x3e,
0xa,0x20,0x20,0x20,0x3c,0x72,0x64,0x66,0x3a,0x52,0x44,0x46,0x20,0x78,0x6d,0x6c,
0x6e,0x73,0x3a,0x72,0x64,0x66,0x3d,0x22,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,
0x77,0x77,0x2e,0x77,0x33,0x2e,0x6f,0x72,0x67,0x2f,0x31,0x39,0x39,0x39,0x2f,0x30,
0x32,0x2f,0x32,0x32,0x2d,0x72,0x64,0x66,0x2d,0x73,0x79,0x6e,0x74,0x61,0x78,0x2d,
0x6e,0x73,0x23,0x22,0x3e,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x72,0x64,0x66,
0x3a,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6f,0x6e,0x20,0x72,0x64,0x66,
0x3a,0x61,0x62,0x6f,0x75,0x74,0x3d,0x22,0x22,0xa,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x78,0x6d,0x6c,0x6e,0x73,0x3a,0x78,0x6d,0x70,0x3d,
0x22,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x6e,0x73,0x2e,0x61,0x64,0x6f,0x62,0x65,
0x2e,0x63,0x6f,0x6d,0x2f,0x78,0x61,0x70,0x2f,0x31,0x2e,0x30,0x2f,0x22,0x3e,0xa,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x78,0x6d,0x70,0x3a,0x4d,0x6f,
0x64,0x69,0x66,0x79,0x44,0x61,0x74,0x65,0x3e,0x32,0x30,0x31,0x33,0x2d,0x30,0x31,
0x2d,0x31,0x34,0x54,0x31,0x36,0x3a,0x30,0x31,0x3a,0x30,0x39,0x3c,0x2f,0x78,0x6d,
0x70,0x3a,0x4d,0x6f,0x64,0x69,0x66,0x79,0x44,0x61,0x74,0x65,0x3e,0xa,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x78,0x6d,0x70,0x3a,0x43,0x72,0x65,0x61,
0x74,0x6f,0x72,0x54,0x6f,0x6f,0x6c,0x3e,0x50,0x69,0x78,0x65,0x6c,0x6d,0x61,0x74,
0x6f,0x72,0x20,0x32,0x2e,0x31,0x2e,0x34,0x3c,0x2f,0x78,0x6d,0x70,0x3a,0x43,0x72,
0x65,0x61,0x74,0x6f,0x72,0x54,0x6f,0x6f,0x6c,0x3e,0xa,0x20,0x20,0x20,0x20,0x20,
0x20,0x3c,0x2f,0x72,0x64,0x66,0x3a,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,
0x6f,0x6e,0x3e,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x72,0x64,0x66,0x3a,0x44,
0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6f,0x6e,0x20,0x72,0x64,0x66,0x3a,0x61,
0x62,0x6f,0x75,0x74,0x3d,0x22,0x22,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x78,0x6d,0x6c,0x6e,0x73,0x3a,0x74,0x69,0x66,0x66,0x3d,0x22,
0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x6e,0x73,0x2e,0x61,0x64,0x6f,0x62,0x65,0x2e,
0x63,0x6f,0x6d,0x2f,0x74,0x69,0x66,0x66,0x2f,0x31,0x2e,0x30,0x2f,0x22,0x3e,0xa,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x74,0x69,0x66,0x66,0x3a,0x4f,
0x72,0x69,0x65,0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e,0x3e,0x31,0x3c,0x2f,0x74,0x69,
0x66,0x66,0x3a,0x4f,0x72,0x69,0x65,0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e,0x3e,0xa,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x74,0x69,0x66,0x66,0x3a,0x59,
0x52,0x65,0x73,0x6f,0x6c,0x75,0x74,0x69,0x6f,0x6e,0x3e,0x37,0x32,0x3c,0x2f,0x74,
0x69,0x66,0x66,0x3a,0x59,0x52,0x65,0x73,0x6f,0x6c,0x75,0x74,0x69,0x6f,0x6e,0x3e,
0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x74,0x69,0x66,0x66,0x3a,
0x43,0x6f,0x6d,0x70,0x72,0x65,0x73,0x73,0x69,0x6f,0x6e,0x3e,0x35,0x3c,0x2f,0x74,
0x69,0x66,0x66,0x3a,0x43,0x6f,0x6d,0x70,0x72,0x65,0x73,0x73,0x69,0x6f,0x6e,0x3e,
0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x74,0x69,0x66,0x66,0x3a,
0x52,0x65,0x73,0x6f,0x6c,0x75,0x74,0x69,0x6f,0x6e,0x55,0x6e,0x69,0x74,0x3e,0x31,
0x3c,0x2f,0x74,0x69,0x66,0x66,0x3a,0x52,0x65,0x73,0x6f,0x6c,0x75,0x74,0x69,0x6f,
0x6e,0x55,0x6e,0x69,0x74,0x3e,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x3c,0x74,0x69,0x66,0x66,0x3a,0x58,0x52,0x65,0x73,0x6f,0x6c,0x75,0x74,0x69,0x6f,
0x6e,0x3e,0x37,0x32,0x3c,0x2f,0x74,0x69,0x66,0x66,0x3a,0x58,0x52,0x65,0x73,0x6f,
0x6c,0x75,0x74,0x69,0x6f,0x6e,0x3e,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x2f,
0x72,0x64,0x66,0x3a,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6f,0x6e,0x3e,
0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x72,0x64,0x66,0x3a,0x44,0x65,0x73,0x63,
0x72,0x69,0x70,0x74,0x69,0x6f,0x6e,0x20,0x72,0x64,0x66,0x3a,0x61,0x62,0x6f,0x75,
0x74,0x3d,0x22,0x22,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x78,0x6d,0x6c,0x6e,0x73,0x3a,0x65,0x78,0x69,0x66,0x3d,0x22,0x68,0x74,0x74,
0x70,0x3a,0x2f,0x2f,0x6e,0x73,0x2e,0x61,0x64,0x6f,0x62,0x65,0x2e,0x63,0x6f,0x6d,
0x2f,0x65,0x78,0x69,0x66,0x2f,0x31,0x2e,0x30,0x2f,0x22,0x3e,0xa,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x65,0x78,0x69,0x66,0x3a,0x50,0x69,0x78,0x65,
0x6c,0x58,0x44,0x69,0x6d,0x65,0x6e,0x73,0x69,0x6f,0x6e,0x3e,0x31,0x34,0x3c,0x2f,
0x65,0x78,0x69,0x66,0x3a,0x50,0x69,0x78,0x65,0x6c,0x58,0x44,0x69,0x6d,0x65,0x6e,
0x73,0x69,0x6f,0x6e,0x3e,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,
0x65,0x78,0x69,0x66,0x3a,0x43,0x6f,0x6c,0x6f,0x72,0x53,0x70,0x61,0x63,0x65,0x3e,
0x36,0x35,0x35,0x33,0x35,0x3c,0x2f,0x65,0x78,0x69,0x66,0x3a,0x43,0x6f,0x6c,0x6f,
0x72,0x53,0x70,0x61,0x63,0x65,0x3e,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x3c,0x65,0x78,0x69,0x66,0x3a,0x50,0x69,0x78,0x65,0x6c,0x59,0x44,0x69,0x6d,
0x65,0x6e,0x73,0x69,0x6f,0x6e,0x3e,0x35,0x30,0x3c,0x2f,0x65,0x78,0x69,0x66,0x3a,
0x50,0x69,0x78,0x65,0x6c,0x59,0x44,0x69,0x6d,0x65,0x6e,0x73,0x69,0x6f,0x6e,0x3e,
0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x2f,0x72,0x64,0x66,0x3a,0x44,0x65,0x73,
0x63,0x72,0x69,0x70,0x74,0x69,0x6f,0x6e,0x3e,0xa,0x20,0x20,0x20,0x3c,0x2f,0x72,
0x64,0x66,0x3a,0x52,0x44,0x46,0x3e,0xa,0x3c,0x2f,0x78,0x3a,0x78,0x6d,0x70,0x6d,
0x65,0x74,0x61,0x3e,0xa,0x9b,0xc4,0x21,0xa8,0x0,0x0,0x0,0x4c,0x49,0x44,0x41,
0x54,0x48,0xd,0xed,0x90,0x31,0xa,0x0,0x30,0x8,0x3,0xb5,0x88,0x4f,0xf1,0xff,
0xcf,0x13,0x1c,0x6c,0xa0,0xbb,0xb8,0x74,0x4b,0x96,0x20,0x5c,0x1c,0x4e,0x23,0x42,
0x16,0x51,0x55,0x73,0x77,0xd4,0x2,0x16,0x43,0x36,0x1c,0x98,0xb3,0xe4,0x88,0xd2,
0x0,0xd,0xd0,0x0,0xd,0xd0,0x0,0xd,0x7c,0x33,0x60,0x55,0x85,0xe7,0x73,0xba,
0x1b,0x80,0x65,0x26,0xea,0x1d,0xf3,0xe0,0x2,0x17,0x3f,0xc,0xd5,0x48,0x77,0xbe,
0xec,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82,
// /home/pi/WorkSpace/WarehouseStackView/images/tab_selected.png
0x0,0x0,0x0,0xd9,
0x89,
0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,
0x0,0x0,0x11,0x0,0x0,0x0,0x32,0x8,0x2,0x0,0x0,0x0,0x35,0x37,0xa7,0x35,
0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,
0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x0,0x8b,0x49,0x44,0x41,0x54,0x48,0x89,0xed,
0xd6,0xb1,0xd,0x2,0x31,0xc,0x85,0xe1,0xff,0x45,0x56,0x52,0x52,0x20,0xdd,0x0,
0xa9,0x58,0x80,0x8a,0x25,0x18,0x91,0x45,0xd8,0x87,0x8a,0xfe,0xa,0xce,0x34,0x48,
0xe8,0x74,0xe1,0x24,0x37,0x54,0x76,0xe9,0xa7,0xcf,0x8e,0xd2,0x24,0xea,0xbd,0x13,
0x2c,0xab,0xb5,0xee,0xc4,0xee,0x3e,0x30,0xad,0xb5,0x61,0xb0,0xb7,0x47,0x92,0xa4,
0x90,0x29,0xd1,0x25,0x40,0x89,0x2e,0x1,0x4a,0x14,0xa4,0x49,0x93,0x26,0x4d,0x9a,
0x34,0x69,0x36,0x65,0xf2,0x25,0xfa,0x72,0xdb,0xf3,0x74,0x71,0x47,0xac,0xdd,0xcf,
0x31,0xe,0xd8,0xe3,0x7c,0xdd,0x26,0xdf,0x11,0x23,0x6b,0xf3,0x61,0x8a,0x9d,0xc,
0x8c,0xe5,0x15,0x35,0x7f,0xbb,0xeb,0xe3,0xfd,0xb6,0x6a,0x7c,0xbe,0x3f,0x1a,0x35,
0x71,0x4,0xbc,0x1,0xdc,0x17,0x1e,0x45,0xb,0xc8,0x5e,0xc9,0x0,0x0,0x0,0x0,
0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82,
// /home/pi/WorkSpace/WarehouseStackView/images/toolbar.png
0x0,0x0,0x6,0x6b,
0x89,
0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,
0x0,0x0,0x1f,0x0,0x0,0x0,0x1b,0x8,0x2,0x0,0x0,0x0,0xb,0x5d,0xc3,0x78,
0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,
0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x4,0x28,0x69,0x54,0x58,0x74,0x58,0x4d,0x4c,
0x3a,0x63,0x6f,0x6d,0x2e,0x61,0x64,0x6f,0x62,0x65,0x2e,0x78,0x6d,0x70,0x0,0x0,
0x0,0x0,0x0,0x3c,0x78,0x3a,0x78,0x6d,0x70,0x6d,0x65,0x74,0x61,0x20,0x78,0x6d,
0x6c,0x6e,0x73,0x3a,0x78,0x3d,0x22,0x61,0x64,0x6f,0x62,0x65,0x3a,0x6e,0x73,0x3a,
0x6d,0x65,0x74,0x61,0x2f,0x22,0x20,0x78,0x3a,0x78,0x6d,0x70,0x74,0x6b,0x3d,0x22,
0x58,0x4d,0x50,0x20,0x43,0x6f,0x72,0x65,0x20,0x35,0x2e,0x31,0x2e,0x32,0x22,0x3e,
0xa,0x20,0x20,0x20,0x3c,0x72,0x64,0x66,0x3a,0x52,0x44,0x46,0x20,0x78,0x6d,0x6c,
0x6e,0x73,0x3a,0x72,0x64,0x66,0x3d,0x22,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,
0x77,0x77,0x2e,0x77,0x33,0x2e,0x6f,0x72,0x67,0x2f,0x31,0x39,0x39,0x39,0x2f,0x30,
0x32,0x2f,0x32,0x32,0x2d,0x72,0x64,0x66,0x2d,0x73,0x79,0x6e,0x74,0x61,0x78,0x2d,
0x6e,0x73,0x23,0x22,0x3e,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x72,0x64,0x66,
0x3a,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6f,0x6e,0x20,0x72,0x64,0x66,
0x3a,0x61,0x62,0x6f,0x75,0x74,0x3d,0x22,0x22,0xa,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x78,0x6d,0x6c,0x6e,0x73,0x3a,0x78,0x6d,0x70,0x3d,
0x22,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x6e,0x73,0x2e,0x61,0x64,0x6f,0x62,0x65,
0x2e,0x63,0x6f,0x6d,0x2f,0x78,0x61,0x70,0x2f,0x31,0x2e,0x30,0x2f,0x22,0x3e,0xa,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x78,0x6d,0x70,0x3a,0x4d,0x6f,
0x64,0x69,0x66,0x79,0x44,0x61,0x74,0x65,0x3e,0x32,0x30,0x31,0x33,0x2d,0x30,0x31,
0x2d,0x31,0x34,0x54,0x31,0x34,0x3a,0x30,0x31,0x3a,0x38,0x32,0x3c,0x2f,0x78,0x6d,
0x70,0x3a,0x4d,0x6f,0x64,0x69,0x66,0x79,0x44,0x61,0x74,0x65,0x3e,0xa,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x78,0x6d,0x70,0x3a,0x43,0x72,0x65,0x61,
0x74,0x6f,0x72,0x54,0x6f,0x6f,0x6c,0x3e,0x50,0x69,0x78,0x65,0x6c,0x6d,0x61,0x74,
0x6f,0x72,0x20,0x32,0x2e,0x31,0x2e,0x34,0x3c,0x2f,0x78,0x6d,0x70,0x3a,0x43,0x72,
0x65,0x61,0x74,0x6f,0x72,0x54,0x6f,0x6f,0x6c,0x3e,0xa,0x20,0x20,0x20,0x20,0x20,
0x20,0x3c,0x2f,0x72,0x64,0x66,0x3a,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,
0x6f,0x6e,0x3e,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x72,0x64,0x66,0x3a,0x44,
0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6f,0x6e,0x20,0x72,0x64,0x66,0x3a,0x61,
0x62,0x6f,0x75,0x74,0x3d,0x22,0x22,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x78,0x6d,0x6c,0x6e,0x73,0x3a,0x74,0x69,0x66,0x66,0x3d,0x22,
0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x6e,0x73,0x2e,0x61,0x64,0x6f,0x62,0x65,0x2e,
0x63,0x6f,0x6d,0x2f,0x74,0x69,0x66,0x66,0x2f,0x31,0x2e,0x30,0x2f,0x22,0x3e,0xa,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x74,0x69,0x66,0x66,0x3a,0x4f,
0x72,0x69,0x65,0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e,0x3e,0x31,0x3c,0x2f,0x74,0x69,
0x66,0x66,0x3a,0x4f,0x72,0x69,0x65,0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e,0x3e,0xa,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x74,0x69,0x66,0x66,0x3a,0x59,
0x52,0x65,0x73,0x6f,0x6c,0x75,0x74,0x69,0x6f,0x6e,0x3e,0x37,0x32,0x3c,0x2f,0x74,
0x69,0x66,0x66,0x3a,0x59,0x52,0x65,0x73,0x6f,0x6c,0x75,0x74,0x69,0x6f,0x6e,0x3e,
0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x74,0x69,0x66,0x66,0x3a,
0x43,0x6f,0x6d,0x70,0x72,0x65,0x73,0x73,0x69,0x6f,0x6e,0x3e,0x35,0x3c,0x2f,0x74,
0x69,0x66,0x66,0x3a,0x43,0x6f,0x6d,0x70,0x72,0x65,0x73,0x73,0x69,0x6f,0x6e,0x3e,
0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x74,0x69,0x66,0x66,0x3a,
0x52,0x65,0x73,0x6f,0x6c,0x75,0x74,0x69,0x6f,0x6e,0x55,0x6e,0x69,0x74,0x3e,0x31,
0x3c,0x2f,0x74,0x69,0x66,0x66,0x3a,0x52,0x65,0x73,0x6f,0x6c,0x75,0x74,0x69,0x6f,
0x6e,0x55,0x6e,0x69,0x74,0x3e,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x3c,0x74,0x69,0x66,0x66,0x3a,0x58,0x52,0x65,0x73,0x6f,0x6c,0x75,0x74,0x69,0x6f,
0x6e,0x3e,0x37,0x32,0x3c,0x2f,0x74,0x69,0x66,0x66,0x3a,0x58,0x52,0x65,0x73,0x6f,
0x6c,0x75,0x74,0x69,0x6f,0x6e,0x3e,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x2f,
0x72,0x64,0x66,0x3a,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6f,0x6e,0x3e,
0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x72,0x64,0x66,0x3a,0x44,0x65,0x73,0x63,
0x72,0x69,0x70,0x74,0x69,0x6f,0x6e,0x20,0x72,0x64,0x66,0x3a,0x61,0x62,0x6f,0x75,
0x74,0x3d,0x22,0x22,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x78,0x6d,0x6c,0x6e,0x73,0x3a,0x65,0x78,0x69,0x66,0x3d,0x22,0x68,0x74,0x74,
0x70,0x3a,0x2f,0x2f,0x6e,0x73,0x2e,0x61,0x64,0x6f,0x62,0x65,0x2e,0x63,0x6f,0x6d,
0x2f,0x65,0x78,0x69,0x66,0x2f,0x31,0x2e,0x30,0x2f,0x22,0x3e,0xa,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x65,0x78,0x69,0x66,0x3a,0x50,0x69,0x78,0x65,
0x6c,0x58,0x44,0x69,0x6d,0x65,0x6e,0x73,0x69,0x6f,0x6e,0x3e,0x33,0x31,0x3c,0x2f,
0x65,0x78,0x69,0x66,0x3a,0x50,0x69,0x78,0x65,0x6c,0x58,0x44,0x69,0x6d,0x65,0x6e,
0x73,0x69,0x6f,0x6e,0x3e,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,
0x65,0x78,0x69,0x66,0x3a,0x43,0x6f,0x6c,0x6f,0x72,0x53,0x70,0x61,0x63,0x65,0x3e,
0x36,0x35,0x35,0x33,0x35,0x3c,0x2f,0x65,0x78,0x69,0x66,0x3a,0x43,0x6f,0x6c,0x6f,
0x72,0x53,0x70,0x61,0x63,0x65,0x3e,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x3c,0x65,0x78,0x69,0x66,0x3a,0x50,0x69,0x78,0x65,0x6c,0x59,0x44,0x69,0x6d,
0x65,0x6e,0x73,0x69,0x6f,0x6e,0x3e,0x32,0x37,0x3c,0x2f,0x65,0x78,0x69,0x66,0x3a,
0x50,0x69,0x78,0x65,0x6c,0x59,0x44,0x69,0x6d,0x65,0x6e,0x73,0x69,0x6f,0x6e,0x3e,
0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x2f,0x72,0x64,0x66,0x3a,0x44,0x65,0x73,
0x63,0x72,0x69,0x70,0x74,0x69,0x6f,0x6e,0x3e,0xa,0x20,0x20,0x20,0x3c,0x2f,0x72,
0x64,0x66,0x3a,0x52,0x44,0x46,0x3e,0xa,0x3c,0x2f,0x78,0x3a,0x78,0x6d,0x70,0x6d,
0x65,0x74,0x61,0x3e,0xa,0x49,0x3b,0x9f,0x1b,0x0,0x0,0x1,0xe9,0x49,0x44,0x41,
0x54,0x48,0xd,0x9d,0x55,0xdb,0x51,0xc4,0x30,0x10,0x8b,0x73,0xfe,0xa7,0x5,0xba,
0xa0,0x3,0x7a,0xa2,0x14,0xaa,0xd,0xd2,0xbe,0xbc,0x1b,0x27,0xc1,0x73,0x9e,0x21,
0xb6,0xb5,0x92,0x76,0xfd,0x3a,0x5a,0xdb,0xf7,0x6d,0xdb,0xda,0x81,0x8f,0xb4,0xe6,
0x3,0xef,0xf,0xd,0x35,0xe7,0xb4,0x2d,0xb8,0xa0,0x40,0x78,0x4c,0x12,0x63,0xb4,
0x8d,0xd6,0xff,0x34,0x88,0x55,0x3f,0xb9,0x4c,0xc0,0xd9,0xa9,0xb,0x10,0x85,0x8d,
0xba,0x54,0x29,0x65,0x86,0xc9,0x81,0x34,0x5c,0xa,0x81,0x66,0x6b,0xc0,0x58,0x90,
0x20,0x61,0x1a,0xab,0x41,0xed,0x3,0x3f,0xa7,0x5e,0x9f,0xe7,0xcd,0x4a,0xaa,0x5e,
0xb7,0xd1,0x22,0x91,0x30,0x6,0x52,0x21,0xa3,0xa8,0x59,0x9a,0x1d,0x87,0x40,0xa,
0x58,0x9d,0x28,0xdc,0xf,0xa3,0xa5,0x7d,0x7,0x1c,0x4b,0x52,0x87,0xe7,0x2f,0xea,
0xbd,0x29,0x19,0x3a,0xbd,0x26,0xba,0xef,0x62,0xe3,0x75,0x7a,0x1f,0xde,0xf,0x1e,
0xc1,0xa9,0x3,0xb7,0x80,0xbb,0xe,0xaf,0x2d,0x80,0x3a,0x13,0x7a,0xe,0x5,0x21,
0xd9,0xb7,0xc8,0x2f,0x73,0xf4,0x9e,0x8,0x5b,0x91,0x76,0xe6,0x61,0x9d,0x26,0xb8,
0xae,0x40,0x82,0xd7,0x21,0x3c,0xa6,0x94,0x0,0xc5,0x5d,0x6f,0x3d,0xef,0x62,0xca,
0xae,0x8b,0x50,0xaa,0x5,0xb2,0x3d,0xc3,0x6c,0xf9,0x54,0x1d,0xd3,0x48,0xfd,0x3e,
0xc5,0x2a,0xb3,0xcc,0xd2,0xa9,0xe6,0xec,0x85,0x83,0x49,0x7a,0x21,0x1e,0x4a,0x9,
0xb9,0xe5,0x76,0xc,0xe9,0xa2,0x42,0xb5,0x23,0x40,0xdb,0xc4,0x35,0x39,0x10,0x3,
0xa7,0xb4,0x23,0x44,0x6e,0x9,0x6b,0x12,0x21,0x0,0xc7,0x6b,0xba,0x6f,0xa6,0x3,
0xa5,0x38,0x70,0x66,0x32,0x76,0xc5,0x41,0x89,0x4e,0xaf,0xa7,0x4a,0xe6,0x90,0x5a,
0x5a,0x53,0x63,0x73,0x14,0x28,0x6e,0xa2,0x90,0x0,0xa5,0x35,0xb4,0x95,0xdf,0xc8,
0x73,0xec,0x7e,0x51,0xab,0x91,0x9d,0xc7,0x1,0xdb,0x93,0xf3,0x8c,0xd8,0x92,0x4e,
0x3c,0xa4,0xc1,0x65,0x15,0x7,0x2e,0xc0,0x17,0xe1,0x2c,0xbd,0xec,0x3e,0x2b,0x35,
0x41,0x26,0xec,0x1,0x8a,0xcb,0x98,0xe6,0x11,0x1d,0xf0,0xe7,0xbf,0x89,0xa6,0x8d,
0x1b,0x19,0xf9,0x43,0x93,0x52,0x6a,0x16,0x7c,0x13,0xe6,0xbc,0x1,0x79,0xe5,0x9a,
0x88,0xe4,0x9d,0xab,0x51,0xb1,0x83,0x94,0x29,0x88,0x2f,0xb4,0x12,0xb5,0xb2,0x89,
0xc8,0xbb,0x1d,0x9e,0xa4,0xf8,0xcc,0x7b,0x5a,0xb0,0xc9,0xce,0x9c,0x41,0xd,0x2d,
0x7c,0x67,0x61,0x45,0xba,0xe4,0x95,0xf2,0x30,0xe2,0x9,0xb5,0xf2,0xdc,0x3c,0xc5,
0x21,0xef,0x91,0xb3,0xb8,0x76,0x66,0x64,0x74,0x2c,0x4e,0x5d,0x5c,0xc1,0x7e,0x1f,
0xff,0x32,0xe6,0x60,0x26,0xae,0x8c,0x6b,0xe1,0x50,0x74,0xd6,0xa2,0xa8,0x9e,0x6b,
0xce,0x1,0x1c,0x53,0xd3,0x54,0xe9,0x98,0x8d,0x91,0x92,0x31,0xf,0x8f,0xfe,0xf9,
0xf3,0xbb,0x52,0xd6,0x7b,0x9c,0xfe,0xf1,0xf5,0xfd,0x9e,0x72,0x45,0xd5,0xdb,0xeb,
0xb5,0xc2,0x7b,0x8f,0xf3,0x7,0x60,0x89,0x72,0x4f,0xf7,0x5f,0x5,0xf9,0x0,0x0,
0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82,
// /home/pi/WorkSpace/WarehouseStackView/images/button_default.png
0x0,0x0,0x5,0x7e,
0x89,
0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,
0x0,0x0,0x3d,0x0,0x0,0x0,0x29,0x8,0x6,0x0,0x0,0x0,0x86,0x25,0x21,0x64,
0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,
0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x4,0x28,0x69,0x54,0x58,0x74,0x58,0x4d,0x4c,
0x3a,0x63,0x6f,0x6d,0x2e,0x61,0x64,0x6f,0x62,0x65,0x2e,0x78,0x6d,0x70,0x0,0x0,
0x0,0x0,0x0,0x3c,0x78,0x3a,0x78,0x6d,0x70,0x6d,0x65,0x74,0x61,0x20,0x78,0x6d,
0x6c,0x6e,0x73,0x3a,0x78,0x3d,0x22,0x61,0x64,0x6f,0x62,0x65,0x3a,0x6e,0x73,0x3a,
0x6d,0x65,0x74,0x61,0x2f,0x22,0x20,0x78,0x3a,0x78,0x6d,0x70,0x74,0x6b,0x3d,0x22,
0x58,0x4d,0x50,0x20,0x43,0x6f,0x72,0x65,0x20,0x35,0x2e,0x31,0x2e,0x32,0x22,0x3e,
0xa,0x20,0x20,0x20,0x3c,0x72,0x64,0x66,0x3a,0x52,0x44,0x46,0x20,0x78,0x6d,0x6c,
0x6e,0x73,0x3a,0x72,0x64,0x66,0x3d,0x22,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,
0x77,0x77,0x2e,0x77,0x33,0x2e,0x6f,0x72,0x67,0x2f,0x31,0x39,0x39,0x39,0x2f,0x30,
0x32,0x2f,0x32,0x32,0x2d,0x72,0x64,0x66,0x2d,0x73,0x79,0x6e,0x74,0x61,0x78,0x2d,
0x6e,0x73,0x23,0x22,0x3e,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x72,0x64,0x66,
0x3a,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6f,0x6e,0x20,0x72,0x64,0x66,
0x3a,0x61,0x62,0x6f,0x75,0x74,0x3d,0x22,0x22,0xa,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x78,0x6d,0x6c,0x6e,0x73,0x3a,0x78,0x6d,0x70,0x3d,
0x22,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x6e,0x73,0x2e,0x61,0x64,0x6f,0x62,0x65,
0x2e,0x63,0x6f,0x6d,0x2f,0x78,0x61,0x70,0x2f,0x31,0x2e,0x30,0x2f,0x22,0x3e,0xa,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x78,0x6d,0x70,0x3a,0x4d,0x6f,
0x64,0x69,0x66,0x79,0x44,0x61,0x74,0x65,0x3e,0x32,0x30,0x31,0x33,0x2d,0x30,0x31,
0x2d,0x31,0x34,0x54,0x31,0x36,0x3a,0x30,0x31,0x3a,0x34,0x30,0x3c,0x2f,0x78,0x6d,
0x70,0x3a,0x4d,0x6f,0x64,0x69,0x66,0x79,0x44,0x61,0x74,0x65,0x3e,0xa,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x78,0x6d,0x70,0x3a,0x43,0x72,0x65,0x61,
0x74,0x6f,0x72,0x54,0x6f,0x6f,0x6c,0x3e,0x50,0x69,0x78,0x65,0x6c,0x6d,0x61,0x74,
0x6f,0x72,0x20,0x32,0x2e,0x31,0x2e,0x34,0x3c,0x2f,0x78,0x6d,0x70,0x3a,0x43,0x72,
0x65,0x61,0x74,0x6f,0x72,0x54,0x6f,0x6f,0x6c,0x3e,0xa,0x20,0x20,0x20,0x20,0x20,
0x20,0x3c,0x2f,0x72,0x64,0x66,0x3a,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,
0x6f,0x6e,0x3e,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x72,0x64,0x66,0x3a,0x44,
0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6f,0x6e,0x20,0x72,0x64,0x66,0x3a,0x61,
0x62,0x6f,0x75,0x74,0x3d,0x22,0x22,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x78,0x6d,0x6c,0x6e,0x73,0x3a,0x74,0x69,0x66,0x66,0x3d,0x22,
0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x6e,0x73,0x2e,0x61,0x64,0x6f,0x62,0x65,0x2e,
0x63,0x6f,0x6d,0x2f,0x74,0x69,0x66,0x66,0x2f,0x31,0x2e,0x30,0x2f,0x22,0x3e,0xa,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x74,0x69,0x66,0x66,0x3a,0x4f,
0x72,0x69,0x65,0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e,0x3e,0x31,0x3c,0x2f,0x74,0x69,
0x66,0x66,0x3a,0x4f,0x72,0x69,0x65,0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e,0x3e,0xa,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x74,0x69,0x66,0x66,0x3a,0x59,
0x52,0x65,0x73,0x6f,0x6c,0x75,0x74,0x69,0x6f,0x6e,0x3e,0x37,0x32,0x3c,0x2f,0x74,
0x69,0x66,0x66,0x3a,0x59,0x52,0x65,0x73,0x6f,0x6c,0x75,0x74,0x69,0x6f,0x6e,0x3e,
0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x74,0x69,0x66,0x66,0x3a,
0x43,0x6f,0x6d,0x70,0x72,0x65,0x73,0x73,0x69,0x6f,0x6e,0x3e,0x35,0x3c,0x2f,0x74,
0x69,0x66,0x66,0x3a,0x43,0x6f,0x6d,0x70,0x72,0x65,0x73,0x73,0x69,0x6f,0x6e,0x3e,
0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x74,0x69,0x66,0x66,0x3a,
0x52,0x65,0x73,0x6f,0x6c,0x75,0x74,0x69,0x6f,0x6e,0x55,0x6e,0x69,0x74,0x3e,0x31,
0x3c,0x2f,0x74,0x69,0x66,0x66,0x3a,0x52,0x65,0x73,0x6f,0x6c,0x75,0x74,0x69,0x6f,
0x6e,0x55,0x6e,0x69,0x74,0x3e,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x3c,0x74,0x69,0x66,0x66,0x3a,0x58,0x52,0x65,0x73,0x6f,0x6c,0x75,0x74,0x69,0x6f,
0x6e,0x3e,0x37,0x32,0x3c,0x2f,0x74,0x69,0x66,0x66,0x3a,0x58,0x52,0x65,0x73,0x6f,
0x6c,0x75,0x74,0x69,0x6f,0x6e,0x3e,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x2f,
0x72,0x64,0x66,0x3a,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6f,0x6e,0x3e,
0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x72,0x64,0x66,0x3a,0x44,0x65,0x73,0x63,
0x72,0x69,0x70,0x74,0x69,0x6f,0x6e,0x20,0x72,0x64,0x66,0x3a,0x61,0x62,0x6f,0x75,
0x74,0x3d,0x22,0x22,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x78,0x6d,0x6c,0x6e,0x73,0x3a,0x65,0x78,0x69,0x66,0x3d,0x22,0x68,0x74,0x74,
0x70,0x3a,0x2f,0x2f,0x6e,0x73,0x2e,0x61,0x64,0x6f,0x62,0x65,0x2e,0x63,0x6f,0x6d,
0x2f,0x65,0x78,0x69,0x66,0x2f,0x31,0x2e,0x30,0x2f,0x22,0x3e,0xa,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x65,0x78,0x69,0x66,0x3a,0x50,0x69,0x78,0x65,
0x6c,0x58,0x44,0x69,0x6d,0x65,0x6e,0x73,0x69,0x6f,0x6e,0x3e,0x36,0x31,0x3c,0x2f,
0x65,0x78,0x69,0x66,0x3a,0x50,0x69,0x78,0x65,0x6c,0x58,0x44,0x69,0x6d,0x65,0x6e,
0x73,0x69,0x6f,0x6e,0x3e,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,
0x65,0x78,0x69,0x66,0x3a,0x43,0x6f,0x6c,0x6f,0x72,0x53,0x70,0x61,0x63,0x65,0x3e,
0x36,0x35,0x35,0x33,0x35,0x3c,0x2f,0x65,0x78,0x69,0x66,0x3a,0x43,0x6f,0x6c,0x6f,
0x72,0x53,0x70,0x61,0x63,0x65,0x3e,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x3c,0x65,0x78,0x69,0x66,0x3a,0x50,0x69,0x78,0x65,0x6c,0x59,0x44,0x69,0x6d,
0x65,0x6e,0x73,0x69,0x6f,0x6e,0x3e,0x34,0x31,0x3c,0x2f,0x65,0x78,0x69,0x66,0x3a,
0x50,0x69,0x78,0x65,0x6c,0x59,0x44,0x69,0x6d,0x65,0x6e,0x73,0x69,0x6f,0x6e,0x3e,
0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x2f,0x72,0x64,0x66,0x3a,0x44,0x65,0x73,
0x63,0x72,0x69,0x70,0x74,0x69,0x6f,0x6e,0x3e,0xa,0x20,0x20,0x20,0x3c,0x2f,0x72,
0x64,0x66,0x3a,0x52,0x44,0x46,0x3e,0xa,0x3c,0x2f,0x78,0x3a,0x78,0x6d,0x70,0x6d,
0x65,0x74,0x61,0x3e,0xa,0x99,0x36,0xb9,0x2b,0x0,0x0,0x0,0xfc,0x49,0x44,0x41,
0x54,0x68,0x5,0xed,0x99,0x31,0xa,0x83,0x40,0x14,0x44,0xd5,0x2c,0x18,0x41,0x48,
0x61,0x65,0x91,0xd3,0x24,0x37,0xc8,0x65,0x2d,0x92,0xde,0x23,0xa4,0xb5,0xb2,0x10,
0xd,0x1,0x8b,0x8,0x89,0xe6,0x7f,0x21,0x10,0x98,0x1b,0x8c,0xb3,0xf0,0x17,0x9c,
0xdd,0xe6,0xcd,0xb3,0xdb,0xb8,0xaa,0xaa,0x4b,0x59,0x96,0xe7,0x28,0x8a,0x76,0x36,
0xec,0xeb,0xd3,0xb6,0xed,0x35,0x34,0x4d,0x53,0xf4,0x7d,0x7f,0x1f,0xc7,0xf1,0x65,
0xc4,0xb,0x31,0x75,0x9c,0xe7,0xf9,0xde,0x38,0x8b,0x60,0xc0,0x7b,0x3,0x65,0x7,
0x76,0x97,0x8b,0x8b,0x75,0xde,0x64,0x9e,0xe7,0x35,0xf0,0x6d,0x3,0x6b,0x71,0xde,
0x64,0x3,0xa0,0x80,0x28,0x68,0xa8,0x84,0x34,0x90,0x69,0x52,0xb1,0x80,0x25,0xd3,
0x50,0x9,0x69,0x20,0xd3,0xa4,0x62,0x1,0x4b,0xa6,0xa1,0x12,0xd2,0x40,0xa6,0x49,
0xc5,0x2,0x96,0x4c,0x43,0x25,0xa4,0x81,0x4c,0x93,0x8a,0x5,0x2c,0x99,0x86,0x4a,
0x48,0x3,0x99,0x26,0x15,0xb,0x58,0x32,0xd,0x95,0x90,0x6,0x32,0x4d,0x2a,0x16,
0xb0,0x64,0x1a,0x2a,0x21,0xd,0x64,0x9a,0x54,0x2c,0x60,0xc9,0x34,0x54,0x42,0x1a,
0xc8,0x34,0xa9,0x58,0xc0,0x5a,0x4d,0xdb,0xeb,0x7c,0xc,0x27,0x84,0xc1,0x8f,0x33,
0x19,0x86,0x21,0xeb,0xba,0x2e,0x23,0x64,0x4,0x24,0xe7,0x74,0xde,0x50,0xd7,0xf5,
0x63,0x9a,0xa6,0x13,0xdc,0x20,0xd,0xd2,0x34,0xbd,0xf9,0x6f,0x7d,0xb4,0x39,0xd8,
0x4,0x52,0xce,0x7f,0xac,0xb7,0x7d,0x3c,0xbf,0x9b,0x13,0x45,0x4,0xd1,0x97,0x48,
0x9a,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82,
// /home/pi/WorkSpace/WarehouseStackView/images/button_pressed.png
0x0,0x0,0x6,0x9e,
0x89,
0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,
0x0,0x0,0x44,0x0,0x0,0x0,0x30,0x8,0x6,0x0,0x0,0x0,0xa8,0xa0,0xdc,0x65,
0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,
0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x4,0x28,0x69,0x54,0x58,0x74,0x58,0x4d,0x4c,
0x3a,0x63,0x6f,0x6d,0x2e,0x61,0x64,0x6f,0x62,0x65,0x2e,0x78,0x6d,0x70,0x0,0x0,
0x0,0x0,0x0,0x3c,0x78,0x3a,0x78,0x6d,0x70,0x6d,0x65,0x74,0x61,0x20,0x78,0x6d,
0x6c,0x6e,0x73,0x3a,0x78,0x3d,0x22,0x61,0x64,0x6f,0x62,0x65,0x3a,0x6e,0x73,0x3a,
0x6d,0x65,0x74,0x61,0x2f,0x22,0x20,0x78,0x3a,0x78,0x6d,0x70,0x74,0x6b,0x3d,0x22,
0x58,0x4d,0x50,0x20,0x43,0x6f,0x72,0x65,0x20,0x35,0x2e,0x31,0x2e,0x32,0x22,0x3e,
0xa,0x20,0x20,0x20,0x3c,0x72,0x64,0x66,0x3a,0x52,0x44,0x46,0x20,0x78,0x6d,0x6c,
0x6e,0x73,0x3a,0x72,0x64,0x66,0x3d,0x22,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,
0x77,0x77,0x2e,0x77,0x33,0x2e,0x6f,0x72,0x67,0x2f,0x31,0x39,0x39,0x39,0x2f,0x30,
0x32,0x2f,0x32,0x32,0x2d,0x72,0x64,0x66,0x2d,0x73,0x79,0x6e,0x74,0x61,0x78,0x2d,
0x6e,0x73,0x23,0x22,0x3e,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x72,0x64,0x66,
0x3a,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6f,0x6e,0x20,0x72,0x64,0x66,
0x3a,0x61,0x62,0x6f,0x75,0x74,0x3d,0x22,0x22,0xa,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x78,0x6d,0x6c,0x6e,0x73,0x3a,0x78,0x6d,0x70,0x3d,
0x22,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x6e,0x73,0x2e,0x61,0x64,0x6f,0x62,0x65,
0x2e,0x63,0x6f,0x6d,0x2f,0x78,0x61,0x70,0x2f,0x31,0x2e,0x30,0x2f,0x22,0x3e,0xa,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x78,0x6d,0x70,0x3a,0x4d,0x6f,
0x64,0x69,0x66,0x79,0x44,0x61,0x74,0x65,0x3e,0x32,0x30,0x31,0x33,0x2d,0x30,0x31,
0x2d,0x31,0x34,0x54,0x31,0x36,0x3a,0x30,0x31,0x3a,0x37,0x39,0x3c,0x2f,0x78,0x6d,
0x70,0x3a,0x4d,0x6f,0x64,0x69,0x66,0x79,0x44,0x61,0x74,0x65,0x3e,0xa,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x78,0x6d,0x70,0x3a,0x43,0x72,0x65,0x61,
0x74,0x6f,0x72,0x54,0x6f,0x6f,0x6c,0x3e,0x50,0x69,0x78,0x65,0x6c,0x6d,0x61,0x74,
0x6f,0x72,0x20,0x32,0x2e,0x31,0x2e,0x34,0x3c,0x2f,0x78,0x6d,0x70,0x3a,0x43,0x72,
0x65,0x61,0x74,0x6f,0x72,0x54,0x6f,0x6f,0x6c,0x3e,0xa,0x20,0x20,0x20,0x20,0x20,
0x20,0x3c,0x2f,0x72,0x64,0x66,0x3a,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,
0x6f,0x6e,0x3e,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x72,0x64,0x66,0x3a,0x44,
0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6f,0x6e,0x20,0x72,0x64,0x66,0x3a,0x61,
0x62,0x6f,0x75,0x74,0x3d,0x22,0x22,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x78,0x6d,0x6c,0x6e,0x73,0x3a,0x74,0x69,0x66,0x66,0x3d,0x22,
0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x6e,0x73,0x2e,0x61,0x64,0x6f,0x62,0x65,0x2e,
0x63,0x6f,0x6d,0x2f,0x74,0x69,0x66,0x66,0x2f,0x31,0x2e,0x30,0x2f,0x22,0x3e,0xa,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x74,0x69,0x66,0x66,0x3a,0x4f,
0x72,0x69,0x65,0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e,0x3e,0x31,0x3c,0x2f,0x74,0x69,
0x66,0x66,0x3a,0x4f,0x72,0x69,0x65,0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e,0x3e,0xa,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x74,0x69,0x66,0x66,0x3a,0x59,
0x52,0x65,0x73,0x6f,0x6c,0x75,0x74,0x69,0x6f,0x6e,0x3e,0x37,0x32,0x3c,0x2f,0x74,
0x69,0x66,0x66,0x3a,0x59,0x52,0x65,0x73,0x6f,0x6c,0x75,0x74,0x69,0x6f,0x6e,0x3e,
0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x74,0x69,0x66,0x66,0x3a,
0x43,0x6f,0x6d,0x70,0x72,0x65,0x73,0x73,0x69,0x6f,0x6e,0x3e,0x35,0x3c,0x2f,0x74,
0x69,0x66,0x66,0x3a,0x43,0x6f,0x6d,0x70,0x72,0x65,0x73,0x73,0x69,0x6f,0x6e,0x3e,
0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x74,0x69,0x66,0x66,0x3a,
0x52,0x65,0x73,0x6f,0x6c,0x75,0x74,0x69,0x6f,0x6e,0x55,0x6e,0x69,0x74,0x3e,0x31,
0x3c,0x2f,0x74,0x69,0x66,0x66,0x3a,0x52,0x65,0x73,0x6f,0x6c,0x75,0x74,0x69,0x6f,
0x6e,0x55,0x6e,0x69,0x74,0x3e,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x3c,0x74,0x69,0x66,0x66,0x3a,0x58,0x52,0x65,0x73,0x6f,0x6c,0x75,0x74,0x69,0x6f,
0x6e,0x3e,0x37,0x32,0x3c,0x2f,0x74,0x69,0x66,0x66,0x3a,0x58,0x52,0x65,0x73,0x6f,
0x6c,0x75,0x74,0x69,0x6f,0x6e,0x3e,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x2f,
0x72,0x64,0x66,0x3a,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6f,0x6e,0x3e,
0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x72,0x64,0x66,0x3a,0x44,0x65,0x73,0x63,
0x72,0x69,0x70,0x74,0x69,0x6f,0x6e,0x20,0x72,0x64,0x66,0x3a,0x61,0x62,0x6f,0x75,
0x74,0x3d,0x22,0x22,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x78,0x6d,0x6c,0x6e,0x73,0x3a,0x65,0x78,0x69,0x66,0x3d,0x22,0x68,0x74,0x74,
0x70,0x3a,0x2f,0x2f,0x6e,0x73,0x2e,0x61,0x64,0x6f,0x62,0x65,0x2e,0x63,0x6f,0x6d,
0x2f,0x65,0x78,0x69,0x66,0x2f,0x31,0x2e,0x30,0x2f,0x22,0x3e,0xa,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x65,0x78,0x69,0x66,0x3a,0x50,0x69,0x78,0x65,
0x6c,0x58,0x44,0x69,0x6d,0x65,0x6e,0x73,0x69,0x6f,0x6e,0x3e,0x36,0x38,0x3c,0x2f,
0x65,0x78,0x69,0x66,0x3a,0x50,0x69,0x78,0x65,0x6c,0x58,0x44,0x69,0x6d,0x65,0x6e,
0x73,0x69,0x6f,0x6e,0x3e,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,
0x65,0x78,0x69,0x66,0x3a,0x43,0x6f,0x6c,0x6f,0x72,0x53,0x70,0x61,0x63,0x65,0x3e,
0x36,0x35,0x35,0x33,0x35,0x3c,0x2f,0x65,0x78,0x69,0x66,0x3a,0x43,0x6f,0x6c,0x6f,
0x72,0x53,0x70,0x61,0x63,0x65,0x3e,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x3c,0x65,0x78,0x69,0x66,0x3a,0x50,0x69,0x78,0x65,0x6c,0x59,0x44,0x69,0x6d,
0x65,0x6e,0x73,0x69,0x6f,0x6e,0x3e,0x34,0x38,0x3c,0x2f,0x65,0x78,0x69,0x66,0x3a,
0x50,0x69,0x78,0x65,0x6c,0x59,0x44,0x69,0x6d,0x65,0x6e,0x73,0x69,0x6f,0x6e,0x3e,
0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x2f,0x72,0x64,0x66,0x3a,0x44,0x65,0x73,
0x63,0x72,0x69,0x70,0x74,0x69,0x6f,0x6e,0x3e,0xa,0x20,0x20,0x20,0x3c,0x2f,0x72,
0x64,0x66,0x3a,0x52,0x44,0x46,0x3e,0xa,0x3c,0x2f,0x78,0x3a,0x78,0x6d,0x70,0x6d,
0x65,0x74,0x61,0x3e,0xa,0x7e,0x37,0xc1,0xbf,0x0,0x0,0x2,0x1c,0x49,0x44,0x41,
0x54,0x68,0x5,0xed,0xdb,0xcd,0x4e,0xdb,0x40,0x10,0x7,0xf0,0x99,0xf5,0x3a,0x9,
0x49,0x50,0xab,0x8,0x2a,0x11,0x95,0x8a,0x8a,0x3,0x7,0x40,0x6d,0x5,0xbc,0x4,
0x52,0x55,0xf5,0xc0,0x53,0x56,0x95,0xfa,0xa5,0x3e,0x42,0x2f,0xed,0x21,0x12,0x5c,
0x38,0x20,0x21,0x28,0x5f,0x55,0x89,0xa8,0x1a,0x93,0xd8,0xde,0xdd,0x61,0x37,0xc4,
0x11,0xcc,0x21,0xf,0x60,0x8f,0x25,0xc7,0xf9,0xdb,0xce,0x61,0x7e,0xf9,0x3b,0xa7,
0xd,0x12,0x11,0x84,0x6d,0xf3,0xf3,0xf9,0xb2,0x8e,0xdc,0xa6,0x52,0xf8,0xc,0x8,
0x6a,0xe3,0x93,0x55,0x78,0x41,0xc8,0x9c,0xa3,0x3f,0xc6,0xaa,0xfd,0xfd,0x77,0xdd,
0x53,0xc,0x20,0xaf,0xbf,0x9c,0xbf,0x89,0x22,0xda,0xa9,0xc2,0xfc,0xb3,0x66,0xb4,
0x16,0x7f,0xe2,0xd6,0xc7,0xe3,0x25,0xaa,0xeb,0xb7,0xb3,0x6e,0xac,0xd2,0x35,0x4d,
0x8d,0xe8,0x95,0x7f,0x44,0xc6,0x1b,0x65,0xa9,0x32,0xb7,0x49,0x44,0xa3,0x81,0x26,
0x72,0x58,0x76,0x8,0x8c,0x22,0x87,0xb5,0x96,0x8d,0xdb,0xf3,0x6,0x74,0x3c,0x56,
0xf0,0x83,0xab,0x2e,0x4e,0x44,0x4c,0x72,0xa3,0x5f,0x76,0x9e,0xbc,0x5f,0x59,0xec,
0xae,0x97,0x1d,0xa3,0x98,0xef,0xe8,0xaa,0xdf,0x3b,0xf9,0xf7,0xff,0x6b,0xfc,0xb4,
0x93,0x87,0x73,0xda,0x63,0xe8,0xf1,0x45,0x67,0xd1,0xe5,0x59,0xf3,0x8c,0xe6,0x56,
0xaf,0xfb,0x69,0x3a,0x34,0x45,0x6f,0x8a,0x8f,0x96,0xef,0xd8,0x8a,0x1,0x13,0xd5,
0x5c,0xa3,0xec,0xfa,0x3b,0xc0,0x3d,0x88,0x7a,0x34,0xa6,0x31,0x48,0x26,0xc5,0x2a,
0x60,0x84,0xb9,0x93,0x1c,0x28,0xfc,0x4c,0x90,0xb5,0x53,0x87,0xe9,0x9b,0x47,0x30,
0x15,0xe,0x2,0xc2,0xbe,0x7c,0x1,0x11,0x10,0x26,0xc0,0xa2,0x34,0x44,0x40,0x98,
0x0,0x8b,0xd2,0x10,0x1,0x61,0x2,0x2c,0x4a,0x43,0x4,0x84,0x9,0xb0,0x28,0xd,
0x11,0x10,0x26,0xc0,0xa2,0x34,0x44,0x40,0x98,0x0,0x8b,0xd2,0x10,0x1,0x61,0x2,
0x2c,0x4a,0x43,0x4,0x84,0x9,0xb0,0x28,0xd,0x11,0x10,0x26,0xc0,0xa2,0x34,0x44,
0x40,0x98,0x0,0x8b,0xd2,0x10,0x1,0x61,0x2,0x2c,0x4a,0x43,0x4,0x84,0x9,0xb0,
0x28,0xd,0x11,0x10,0x26,0xc0,0xa2,0x34,0x44,0x40,0x98,0x0,0x8b,0xd2,0x10,0x1,
0x61,0x2,0x2c,0x4a,0x43,0x4,0x84,0x9,0xb0,0x28,0xd,0x99,0x9,0xa2,0x34,0xd9,
0x74,0x84,0x94,0x8f,0x4a,0xbf,0x24,0x33,0x38,0x84,0x39,0xfd,0xe,0x61,0x79,0x66,
0xe1,0xa2,0x81,0x30,0x7,0xa4,0x18,0x54,0x44,0xaa,0xd1,0x4a,0xb2,0xab,0x93,0x43,
0x37,0x1c,0x6c,0x14,0x37,0x94,0xfa,0x48,0x48,0xaa,0xd9,0xee,0xe9,0xce,0x92,0x2d,
0xe6,0xd4,0xa0,0xdc,0x85,0x47,0x79,0x11,0x4e,0xe8,0x66,0xcb,0x5f,0xe8,0x7e,0xf2,
0xb,0x77,0xbf,0x55,0x6e,0xe1,0xee,0x44,0x44,0xa7,0x60,0x7a,0x75,0xd2,0xcb,0x80,
0x7e,0xab,0xd5,0x5d,0xec,0xf7,0x62,0xcd,0x66,0xa1,0x56,0x99,0xa3,0x5f,0xf8,0xaf,
0xe,0x76,0x57,0x2e,0x2d,0xb9,0x1f,0xfe,0x5f,0x0,0xd3,0xe7,0xa8,0x32,0x0,0xf,
0x6,0xd,0xf3,0x4f,0x1c,0xee,0x17,0xba,0x6f,0x7c,0xf8,0xdd,0x69,0xcc,0xd1,0x36,
0x0,0x2e,0x10,0x62,0xfb,0xc1,0xbd,0xa5,0x7e,0xeb,0x21,0x6,0xfe,0xe7,0xf5,0xef,
0x68,0x88,0xbf,0xe,0xf6,0x9e,0xf7,0xef,0x0,0xaf,0x1e,0xbb,0x61,0x31,0x9f,0xab,
0x3a,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82,
// /home/pi/WorkSpace/WarehouseStackView/images/navigation_next_item.png
0x0,0x0,0x5,0x3d,
0x89,
0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,
0x0,0x0,0x30,0x0,0x0,0x0,0x30,0x8,0x6,0x0,0x0,0x0,0x57,0x2,0xf9,0x87,
0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,
0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x2,0x18,0x69,0x54,0x58,0x74,0x58,0x4d,0x4c,
0x3a,0x63,0x6f,0x6d,0x2e,0x61,0x64,0x6f,0x62,0x65,0x2e,0x78,0x6d,0x70,0x0,0x0,
0x0,0x0,0x0,0x3c,0x78,0x3a,0x78,0x6d,0x70,0x6d,0x65,0x74,0x61,0x20,0x78,0x6d,
0x6c,0x6e,0x73,0x3a,0x78,0x3d,0x22,0x61,0x64,0x6f,0x62,0x65,0x3a,0x6e,0x73,0x3a,
0x6d,0x65,0x74,0x61,0x2f,0x22,0x20,0x78,0x3a,0x78,0x6d,0x70,0x74,0x6b,0x3d,0x22,
0x58,0x4d,0x50,0x20,0x43,0x6f,0x72,0x65,0x20,0x35,0x2e,0x31,0x2e,0x32,0x22,0x3e,
0xa,0x20,0x20,0x20,0x3c,0x72,0x64,0x66,0x3a,0x52,0x44,0x46,0x20,0x78,0x6d,0x6c,
0x6e,0x73,0x3a,0x72,0x64,0x66,0x3d,0x22,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,
0x77,0x77,0x2e,0x77,0x33,0x2e,0x6f,0x72,0x67,0x2f,0x31,0x39,0x39,0x39,0x2f,0x30,
0x32,0x2f,0x32,0x32,0x2d,0x72,0x64,0x66,0x2d,0x73,0x79,0x6e,0x74,0x61,0x78,0x2d,
0x6e,0x73,0x23,0x22,0x3e,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x72,0x64,0x66,
0x3a,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6f,0x6e,0x20,0x72,0x64,0x66,
0x3a,0x61,0x62,0x6f,0x75,0x74,0x3d,0x22,0x22,0xa,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x78,0x6d,0x6c,0x6e,0x73,0x3a,0x78,0x6d,0x70,0x3d,
0x22,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x6e,0x73,0x2e,0x61,0x64,0x6f,0x62,0x65,
0x2e,0x63,0x6f,0x6d,0x2f,0x78,0x61,0x70,0x2f,0x31,0x2e,0x30,0x2f,0x22,0x3e,0xa,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x78,0x6d,0x70,0x3a,0x43,0x72,
0x65,0x61,0x74,0x6f,0x72,0x54,0x6f,0x6f,0x6c,0x3e,0x41,0x64,0x6f,0x62,0x65,0x20,
0x50,0x68,0x6f,0x74,0x6f,0x73,0x68,0x6f,0x70,0x20,0x43,0x53,0x35,0x2e,0x31,0x20,
0x4d,0x61,0x63,0x69,0x6e,0x74,0x6f,0x73,0x68,0x3c,0x2f,0x78,0x6d,0x70,0x3a,0x43,
0x72,0x65,0x61,0x74,0x6f,0x72,0x54,0x6f,0x6f,0x6c,0x3e,0xa,0x20,0x20,0x20,0x20,
0x20,0x20,0x3c,0x2f,0x72,0x64,0x66,0x3a,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,
0x69,0x6f,0x6e,0x3e,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x72,0x64,0x66,0x3a,
0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6f,0x6e,0x20,0x72,0x64,0x66,0x3a,
0x61,0x62,0x6f,0x75,0x74,0x3d,0x22,0x22,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x78,0x6d,0x6c,0x6e,0x73,0x3a,0x74,0x69,0x66,0x66,0x3d,
0x22,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x6e,0x73,0x2e,0x61,0x64,0x6f,0x62,0x65,
0x2e,0x63,0x6f,0x6d,0x2f,0x74,0x69,0x66,0x66,0x2f,0x31,0x2e,0x30,0x2f,0x22,0x3e,
0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x74,0x69,0x66,0x66,0x3a,
0x4f,0x72,0x69,0x65,0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e,0x3e,0x31,0x3c,0x2f,0x74,
0x69,0x66,0x66,0x3a,0x4f,0x72,0x69,0x65,0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e,0x3e,
0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x2f,0x72,0x64,0x66,0x3a,0x44,0x65,0x73,
0x63,0x72,0x69,0x70,0x74,0x69,0x6f,0x6e,0x3e,0xa,0x20,0x20,0x20,0x3c,0x2f,0x72,
0x64,0x66,0x3a,0x52,0x44,0x46,0x3e,0xa,0x3c,0x2f,0x78,0x3a,0x78,0x6d,0x70,0x6d,
0x65,0x74,0x61,0x3e,0xa,0x6b,0x49,0xe7,0x8e,0x0,0x0,0x2,0xcb,0x49,0x44,0x41,
0x54,0x68,0x5,0xed,0x98,0x4d,0x88,0x4d,0x61,0x1c,0x87,0x5d,0xdf,0xdf,0x45,0x49,
0xd9,0x59,0x20,0x12,0x4b,0xa5,0xa6,0x6e,0xb2,0xa6,0x28,0x65,0xa1,0x6e,0x56,0xc6,
0x47,0x69,0x6a,0x8c,0x66,0x50,0x2e,0x6,0xc9,0xc7,0xc2,0xa0,0x59,0xd9,0x89,0x62,
0x61,0x6b,0x16,0x53,0x4a,0x69,0x56,0x4a,0x84,0x85,0x9d,0x92,0x9a,0xd,0xc6,0xb7,
0xeb,0x79,0x6e,0xf7,0x96,0xee,0x46,0xdd,0xf3,0x7f,0x5f,0x4d,0x9d,0x5f,0x3d,0xf7,
0x3d,0xe7,0xd6,0x3d,0xe7,0xf7,0x7b,0x3f,0xfe,0xe7,0x3d,0xb7,0xd2,0x68,0x34,0x66,
0x4c,0x67,0xcd,0x9c,0xce,0xe6,0xf5,0x5e,0x6,0xf8,0xdf,0x23,0x58,0x8e,0x40,0x39,
0x2,0x5,0x7b,0xa0,0x9c,0x42,0xad,0xe,0x9c,0x45,0x5b,0x83,0xf5,0xad,0xf3,0x6c,
0xcd,0xec,0x80,0x3b,0xcd,0xe3,0x1a,0x3,0x50,0x83,0x9,0xe8,0x85,0x49,0xc8,0xa2,
0x4a,0xc1,0x27,0xf1,0x26,0x5c,0x1e,0x81,0x1e,0xf8,0xc,0x8b,0x60,0xc,0xfa,0xe0,
0x3b,0x24,0x57,0xd1,0x35,0xb0,0x1c,0x87,0xab,0xe1,0x17,0xfc,0x86,0x4f,0xb0,0x1d,
0x8e,0x41,0x16,0x15,0x1d,0x1,0x4d,0x6e,0x86,0x11,0x58,0xa,0xf6,0x7a,0x5,0x16,
0xc0,0x35,0x18,0x85,0xa4,0x2a,0x3a,0x2,0x9a,0x7b,0x6,0xa7,0xe1,0x27,0xb8,0xa6,
0xdc,0x1d,0x7e,0x83,0x43,0xb0,0x3,0x92,0x2a,0x22,0x80,0x6,0x1f,0xc1,0x25,0x30,
0x80,0xd7,0x74,0x4a,0xa9,0x21,0xd8,0xd2,0x3c,0x4a,0xf4,0x11,0x15,0x40,0x7b,0x77,
0xe0,0x36,0x38,0x7d,0x9c,0x46,0x3f,0x60,0x21,0x5c,0x80,0xb5,0x90,0x44,0x91,0x1,
0x34,0x78,0x15,0x1e,0x82,0xd5,0x48,0x39,0x95,0x56,0xc2,0x70,0xab,0xa5,0x89,0x55,
0x74,0x0,0xa7,0xce,0x59,0x78,0x2,0xed,0x10,0x53,0x1c,0x6f,0x84,0xfa,0x5f,0xdf,
0x71,0x18,0xa3,0xe8,0x0,0xba,0xfa,0x8,0x27,0xe0,0xd,0x38,0x9d,0x94,0xe5,0xb5,
0xa,0x83,0x10,0xaa,0x14,0x1,0x34,0xf8,0xe,0xfa,0xe1,0x3,0xcc,0x5,0x65,0x88,
0x5d,0x70,0xd8,0x93,0x28,0xa5,0xa,0xa0,0xbf,0x57,0x70,0x12,0x5c,0x7,0x73,0xc0,
0xf2,0xfa,0x15,0xe,0xc0,0x1e,0x8,0x51,0xca,0x0,0x1a,0x7c,0xc,0x56,0x21,0xef,
0xe3,0x86,0xcf,0x35,0xe2,0xf3,0xc2,0xbd,0x53,0x15,0xa,0x2b,0x75,0x0,0xd,0xde,
0x87,0x1b,0xe0,0xa6,0xcf,0xf2,0x6a,0x0,0x47,0xa4,0xe,0x1b,0xa0,0x90,0x72,0x4,
0xd0,0xe0,0x4d,0xf0,0x39,0x61,0x8,0xe5,0x96,0xc3,0x7d,0xd4,0x15,0xe8,0x81,0xae,
0x95,0x2b,0x40,0xd7,0x6,0xff,0xf5,0x43,0x1f,0xfd,0x39,0xe4,0x3b,0xc2,0x5e,0xf8,
0xd2,0xba,0x99,0x95,0x69,0x12,0xfa,0xe0,0x45,0xeb,0xbb,0xae,0x9a,0x1c,0x23,0xb0,
0x1b,0x67,0x7,0xc1,0x6a,0x64,0x25,0xb2,0xd3,0xdc,0x66,0x9c,0x82,0x42,0xe6,0xf9,
0x7d,0xb3,0x3a,0xd8,0xa6,0x92,0xf3,0xfb,0x38,0xf8,0xae,0x60,0x5,0xb2,0x12,0x19,
0xe0,0x22,0x8c,0x43,0x61,0xa5,0x1c,0x81,0x75,0xb8,0x3b,0x3,0x2e,0x5c,0x7b,0xdc,
0xa,0x34,0x1f,0x6e,0xc1,0x3d,0x8,0x51,0xaa,0x0,0xab,0x70,0xe7,0xf6,0x7a,0x5,
0x58,0x71,0xd4,0x62,0x78,0x0,0xd7,0x3d,0x89,0x52,0x8a,0x0,0x4b,0x30,0xe7,0x86,
0x6e,0xd,0xb4,0x17,0xad,0xe6,0xc7,0x61,0x18,0x42,0x15,0x1d,0xc0,0xeb,0xd,0xc1,
0x56,0xf0,0x25,0x5f,0xf9,0x4e,0xf0,0x1c,0x5c,0xb4,0xed,0xef,0x38,0x8c,0x51,0x74,
0x80,0xa3,0xd8,0xda,0x9,0x6d,0xa3,0xce,0xff,0xf7,0x30,0xd8,0x6a,0x69,0x62,0x15,
0x19,0xc0,0x3a,0xbf,0x1f,0x9c,0x36,0x96,0x4b,0xb7,0xb,0x53,0x60,0x15,0x7a,0xd,
0x49,0x14,0x15,0x60,0x1b,0xee,0xfa,0xc1,0x7d,0x8e,0x25,0xd3,0x72,0xa9,0xce,0xc1,
0xd3,0xe6,0x51,0xa2,0x8f,0x88,0x0,0xfe,0xad,0x52,0x7,0xeb,0xbb,0x1,0x2c,0x97,
0x4e,0x9d,0x11,0xf0,0xf5,0x32,0xa9,0x8a,0x6,0xa8,0xe2,0xee,0x32,0x2c,0x3,0x9f,
0xb4,0xca,0x57,0xc9,0xbb,0x30,0xea,0x49,0x6a,0x15,0xd,0xe0,0x7e,0xe6,0x2d,0x38,
0x65,0xbc,0x96,0xe5,0x72,0xc,0xce,0x43,0x16,0x45,0xfc,0x33,0xe7,0x74,0x19,0x80,
0x1a,0x4c,0x40,0x2f,0x18,0x2c,0x8b,0x22,0x2,0x68,0xd4,0x11,0xd8,0x7,0x2e,0xd8,
0x97,0x90,0x4d,0x51,0x1,0xb2,0x19,0xee,0xbc,0x51,0xd1,0x35,0xd0,0x79,0xbd,0xec,
0xe7,0x65,0x80,0xec,0x5d,0xde,0x71,0xc3,0x72,0x4,0x3a,0x3a,0x24,0xfb,0x69,0x39,
0x2,0xd9,0xbb,0xbc,0xe3,0x86,0x7f,0x0,0xb4,0x23,0x7f,0xc,0x58,0x4,0xf,0xf2,
0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82,
// /home/pi/WorkSpace/WarehouseStackView/images/textinput.png
0x0,0x0,0x10,0x24,
0x89,
0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,
0x0,0x1,0x6,0x0,0x0,0x0,0x9,0x8,0x6,0x0,0x0,0x0,0xd0,0x14,0x82,0x5d,
0x0,0x0,0x0,0x4,0x67,0x41,0x4d,0x41,0x0,0x0,0xb1,0x8f,0xb,0xfc,0x61,0x5,
0x0,0x0,0xa,0x41,0x69,0x43,0x43,0x50,0x49,0x43,0x43,0x20,0x50,0x72,0x6f,0x66,
0x69,0x6c,0x65,0x0,0x0,0x48,0xd,0x9d,0x96,0x77,0x54,0x53,0xd9,0x16,0x87,0xcf,
0xbd,0x37,0xbd,0xd0,0x12,0x22,0x20,0x25,0xf4,0x1a,0x7a,0x9,0x20,0xd2,0x3b,0x48,
0x15,0x4,0x51,0x89,0x49,0x80,0x50,0x2,0x86,0x84,0x26,0x76,0x44,0x5,0x46,0x14,
0x11,0x29,0x56,0x64,0x54,0xc0,0x1,0x47,0x87,0x22,0x63,0x45,0x14,0xb,0x83,0x82,
0x62,0xd7,0x9,0xf2,0x10,0x50,0xc6,0xc1,0x51,0x44,0x45,0xe5,0xdd,0x8c,0x6b,0x9,
0xef,0xad,0x35,0xf3,0xde,0x9a,0xfd,0xc7,0x59,0xdf,0xd9,0xe7,0xb7,0xd7,0xd9,0x67,
0xef,0x7d,0xd7,0xba,0x0,0x50,0xfc,0x82,0x4,0xc2,0x74,0x58,0x1,0x80,0x34,0xa1,
0x58,0x14,0xee,0xeb,0xc1,0x5c,0x12,0x13,0xcb,0xc4,0xf7,0x2,0x18,0x10,0x1,0xe,
0x58,0x1,0xc0,0xe1,0x66,0x66,0x4,0x47,0xf8,0x44,0x2,0xd4,0xfc,0xbd,0x3d,0x99,
0x99,0xa8,0x48,0xc6,0xb3,0xf6,0xee,0x2e,0x80,0x64,0xbb,0xdb,0x2c,0xbf,0x50,0x26,
0x73,0xd6,0xff,0x7f,0x91,0x22,0x37,0x43,0x24,0x6,0x0,0xa,0x45,0xd5,0x36,0x3c,
0x7e,0x26,0x17,0xe5,0x2,0x94,0x53,0xb3,0xc5,0x19,0x32,0xff,0x4,0xca,0xf4,0x95,
0x29,0x32,0x86,0x31,0x32,0x16,0xa1,0x9,0xa2,0xac,0x22,0xe3,0xc4,0xaf,0x6c,0xf6,
0xa7,0xe6,0x2b,0xbb,0xc9,0x98,0x97,0x26,0xe4,0xa1,0x1a,0x59,0xce,0x19,0xbc,0x34,
0x9e,0x8c,0xbb,0x50,0xde,0x9a,0x25,0xe1,0xa3,0x8c,0x4,0xa1,0x5c,0x98,0x25,0xe0,
0x67,0xa3,0x7c,0x7,0x65,0xbd,0x54,0x49,0x9a,0x0,0xe5,0xf7,0x28,0xd3,0xd3,0xf8,
0x9c,0x4c,0x0,0x30,0x14,0x99,0x5f,0xcc,0xe7,0x26,0xa1,0x6c,0x89,0x32,0x45,0x14,
0x19,0xee,0x89,0xf2,0x2,0x0,0x8,0x94,0xc4,0x39,0xbc,0x72,0xe,0x8b,0xf9,0x39,
0x68,0x9e,0x0,0x78,0xa6,0x67,0xe4,0x8a,0x4,0x89,0x49,0x62,0xa6,0x11,0xd7,0x98,
0x69,0xe5,0xe8,0xc8,0x66,0xfa,0xf1,0xb3,0x53,0xf9,0x62,0x31,0x2b,0x94,0xc3,0x4d,
0xe1,0x88,0x78,0x4c,0xcf,0xf4,0xb4,0xc,0x8e,0x30,0x17,0x80,0xaf,0x6f,0x96,0x45,
0x1,0x25,0x59,0x6d,0x99,0x68,0x91,0xed,0xad,0x1c,0xed,0xed,0x59,0xd6,0xe6,0x68,
0xf9,0xbf,0xd9,0xdf,0x1e,0x7e,0x53,0xfd,0x3d,0xc8,0x7a,0xfb,0x55,0xf1,0x26,0xec,
0xcf,0x9e,0x41,0x8c,0x9e,0x59,0xdf,0x6c,0xec,0xac,0x2f,0xbd,0x16,0x0,0xf6,0x24,
0x5a,0x9b,0x1d,0xb3,0xbe,0x95,0x55,0x0,0xb4,0x6d,0x6,0x40,0xe5,0xe1,0xac,0x4f,
0xef,0x20,0x0,0xf2,0x5,0x0,0xb4,0xde,0x9c,0xf3,0x1e,0x86,0x6c,0x5e,0x92,0xc4,
0xe2,0xc,0x27,0xb,0x8b,0xec,0xec,0x6c,0x73,0x1,0x9f,0x6b,0x2e,0x2b,0xe8,0x37,
0xfb,0x9f,0x82,0x6f,0xca,0xbf,0x86,0x39,0xf7,0x99,0xcb,0xee,0xfb,0x56,0x3b,0xa6,
0x17,0x3f,0x81,0x23,0x49,0x15,0x33,0x65,0x45,0xe5,0xa6,0xa7,0xa6,0x4b,0x44,0xcc,
0xcc,0xc,0xe,0x97,0xcf,0x64,0xfd,0xf7,0x10,0xff,0xe3,0xc0,0x39,0x69,0xcd,0xc9,
0xc3,0x2c,0x9c,0x9f,0xc0,0x17,0xf1,0x85,0xe8,0x55,0x51,0xe8,0x94,0x9,0x84,0x89,
0x68,0xbb,0x85,0x3c,0x81,0x58,0x90,0x2e,0x64,0xa,0x84,0x7f,0xd5,0xe1,0x7f,0x18,
0x36,0x27,0x7,0x19,0x7e,0x9d,0x6b,0x14,0x68,0x75,0x5f,0x0,0x7d,0x85,0x39,0x50,
0xb8,0x49,0x7,0xc8,0x6f,0x3d,0x0,0x43,0x23,0x3,0x24,0x6e,0x3f,0x7a,0x2,0x7d,
0xeb,0x5b,0x10,0x31,0xa,0xc8,0xbe,0xbc,0x68,0xad,0x91,0xaf,0x73,0x8f,0x32,0x7a,
0xfe,0xe7,0xfa,0x1f,0xb,0x5c,0x8a,0x6e,0xe1,0x4c,0x41,0x22,0x53,0xe6,0xf6,0xc,
0x8f,0x64,0x72,0x25,0xa2,0x2c,0x19,0xa3,0xdf,0x84,0x6c,0xc1,0x2,0x12,0x90,0x7,
0x74,0xa0,0xa,0x34,0x81,0x2e,0x30,0x2,0x2c,0x60,0xd,0x1c,0x80,0x33,0x70,0x3,
0xde,0x20,0x0,0x84,0x80,0x48,0x10,0x3,0x96,0x3,0x2e,0x48,0x2,0x69,0x40,0x4,
0xb2,0x41,0x3e,0xd8,0x0,0xa,0x41,0x31,0xd8,0x1,0x76,0x83,0x6a,0x70,0x0,0xd4,
0x81,0x7a,0xd0,0x4,0x4e,0x82,0x36,0x70,0x6,0x5c,0x4,0x57,0xc0,0xd,0x70,0xb,
0xc,0x80,0x47,0x40,0xa,0x86,0xc1,0x4b,0x30,0x1,0xde,0x81,0x69,0x8,0x82,0xf0,
0x10,0x15,0xa2,0x41,0xaa,0x90,0x16,0xa4,0xf,0x99,0x42,0xd6,0x10,0x1b,0x5a,0x8,
0x79,0x43,0x41,0x50,0x38,0x14,0x3,0xc5,0x43,0x89,0x90,0x10,0x92,0x40,0xf9,0xd0,
0x26,0xa8,0x18,0x2a,0x83,0xaa,0xa1,0x43,0x50,0x3d,0xf4,0x23,0x74,0x1a,0xba,0x8,
0x5d,0x83,0xfa,0xa0,0x7,0xd0,0x20,0x34,0x6,0xfd,0x1,0x7d,0x84,0x11,0x98,0x2,
0xd3,0x61,0xd,0xd8,0x0,0xb6,0x80,0xd9,0xb0,0x3b,0x1c,0x8,0x47,0xc2,0xcb,0xe0,
0x44,0x78,0x15,0x9c,0x7,0x17,0xc0,0xdb,0xe1,0x4a,0xb8,0x16,0x3e,0xe,0xb7,0xc2,
0x17,0xe1,0x1b,0xf0,0x0,0x2c,0x85,0x5f,0xc2,0x93,0x8,0x40,0xc8,0x8,0x3,0xd1,
0x46,0x58,0x8,0x1b,0xf1,0x44,0x42,0x90,0x58,0x24,0x1,0x11,0x21,0x6b,0x91,0x22,
0xa4,0x2,0xa9,0x45,0x9a,0x90,0xe,0xa4,0x1b,0xb9,0x8d,0x48,0x91,0x71,0xe4,0x3,
0x6,0x87,0xa1,0x61,0x98,0x18,0x16,0xc6,0x19,0xe3,0x87,0x59,0x8c,0xe1,0x62,0x56,
0x61,0xd6,0x62,0x4a,0x30,0xd5,0x98,0x63,0x98,0x56,0x4c,0x17,0xe6,0x36,0x66,0x10,
0x33,0x81,0xf9,0x82,0xa5,0x62,0xd5,0xb1,0xa6,0x58,0x27,0xac,0x3f,0x76,0x9,0x36,
0x11,0x9b,0x8d,0x2d,0xc4,0x56,0x60,0x8f,0x60,0x5b,0xb0,0x97,0xb1,0x3,0xd8,0x61,
0xec,0x3b,0x1c,0xe,0xc7,0xc0,0x19,0xe2,0x1c,0x70,0x7e,0xb8,0x18,0x5c,0x32,0x6e,
0x35,0xae,0x4,0xb7,0xf,0xd7,0x8c,0xbb,0x80,0xeb,0xc3,0xd,0xe1,0x26,0xf1,0x78,
0xbc,0x2a,0xde,0x14,0xef,0x82,0xf,0xc1,0x73,0xf0,0x62,0x7c,0x21,0xbe,0xa,0x7f,
0x1c,0x7f,0x1e,0xdf,0x8f,0x1f,0xc6,0xbf,0x27,0x90,0x9,0x5a,0x4,0x6b,0x82,0xf,
0x21,0x96,0x20,0x24,0x6c,0x24,0x54,0x10,0x1a,0x8,0xe7,0x8,0xfd,0x84,0x11,0xc2,
0x34,0x51,0x81,0xa8,0x4f,0x74,0x22,0x86,0x10,0x79,0xc4,0x5c,0x62,0x29,0xb1,0x8e,
0xd8,0x41,0xbc,0x49,0x1c,0x26,0x4e,0x93,0x14,0x49,0x86,0x24,0x17,0x52,0x24,0x29,
0x99,0xb4,0x81,0x54,0x49,0x6a,0x22,0x5d,0x26,0x3d,0x26,0xbd,0x21,0x93,0xc9,0x3a,
0x64,0x47,0x72,0x18,0x59,0x40,0x5e,0x4f,0xae,0x24,0x9f,0x20,0x5f,0x25,0xf,0x92,
0x3f,0x50,0x94,0x28,0x26,0x14,0x4f,0x4a,0x1c,0x45,0x42,0xd9,0x4e,0x39,0x4a,0xb9,
0x40,0x79,0x40,0x79,0x43,0xa5,0x52,0xd,0xa8,0x6e,0xd4,0x58,0xaa,0x98,0xba,0x9d,
0x5a,0x4f,0xbd,0x44,0x7d,0x4a,0x7d,0x2f,0x47,0x93,0x33,0x97,0xf3,0x97,0xe3,0xc9,
0xad,0x93,0xab,0x91,0x6b,0x95,0xeb,0x97,0x7b,0x25,0x4f,0x94,0xd7,0x97,0x77,0x97,
0x5f,0x2e,0x9f,0x27,0x5f,0x21,0x7f,0x4a,0xfe,0xa6,0xfc,0xb8,0x2,0x51,0xc1,0x40,
0xc1,0x53,0x81,0xa3,0xb0,0x56,0xa1,0x46,0xe1,0xb4,0xc2,0x3d,0x85,0x49,0x45,0x9a,
0xa2,0x95,0x62,0x88,0x62,0x9a,0x62,0x89,0x62,0x83,0xe2,0x35,0xc5,0x51,0x25,0xbc,
0x92,0x81,0x92,0xb7,0x12,0x4f,0xa9,0x40,0xe9,0xb0,0xd2,0x25,0xa5,0x21,0x1a,0x42,
0xd3,0xa5,0x79,0xd2,0xb8,0xb4,0x4d,0xb4,0x3a,0xda,0x65,0xda,0x30,0x1d,0x47,0x37,
0xa4,0xfb,0xd3,0x93,0xe9,0xc5,0xf4,0x1f,0xe8,0xbd,0xf4,0x9,0x65,0x25,0x65,0x5b,
0xe5,0x28,0xe5,0x1c,0xe5,0x1a,0xe5,0xb3,0xca,0x52,0x6,0xc2,0x30,0x60,0xf8,0x33,
0x52,0x19,0xa5,0x8c,0x93,0x8c,0xbb,0x8c,0x8f,0xf3,0x34,0xe6,0xb9,0xcf,0xe3,0xcf,
0xdb,0x36,0xaf,0x69,0x5e,0xff,0xbc,0x29,0x95,0xf9,0x2a,0x6e,0x2a,0x7c,0x95,0x22,
0x95,0x66,0x95,0x1,0x95,0x8f,0xaa,0x4c,0x55,0x6f,0xd5,0x14,0xd5,0x9d,0xaa,0x6d,
0xaa,0x4f,0xd4,0x30,0x6a,0x26,0x6a,0x61,0x6a,0xd9,0x6a,0xfb,0xd5,0x2e,0xab,0x8d,
0xcf,0xa7,0xcf,0x77,0x9e,0xcf,0x9d,0x5f,0x34,0xff,0xe4,0xfc,0x87,0xea,0xb0,0xba,
0x89,0x7a,0xb8,0xfa,0x6a,0xf5,0xc3,0xea,0x3d,0xea,0x93,0x1a,0x9a,0x1a,0xbe,0x1a,
0x19,0x1a,0x55,0x1a,0x97,0x34,0xc6,0x35,0x19,0x9a,0x6e,0x9a,0xc9,0x9a,0xe5,0x9a,
0xe7,0x34,0xc7,0xb4,0x68,0x5a,0xb,0xb5,0x4,0x5a,0xe5,0x5a,0xe7,0xb5,0x5e,0x30,
0x95,0x99,0xee,0xcc,0x54,0x66,0x25,0xb3,0x8b,0x39,0xa1,0xad,0xae,0xed,0xa7,0x2d,
0xd1,0x3e,0xa4,0xdd,0xab,0x3d,0xad,0x63,0xa8,0xb3,0x58,0x67,0xa3,0x4e,0xb3,0xce,
0x13,0x5d,0x92,0x2e,0x5b,0x37,0x41,0xb7,0x5c,0xb7,0x53,0x77,0x42,0x4f,0x4b,0x2f,
0x58,0x2f,0x5f,0xaf,0x51,0xef,0xa1,0x3e,0x51,0x9f,0xad,0x9f,0xa4,0xbf,0x47,0xbf,
0x5b,0x7f,0xca,0xc0,0xd0,0x20,0xda,0x60,0x8b,0x41,0x9b,0xc1,0xa8,0xa1,0x8a,0xa1,
0xbf,0x61,0x9e,0x61,0xa3,0xe1,0x63,0x23,0xaa,0x91,0xab,0xd1,0x2a,0xa3,0x5a,0xa3,
0x3b,0xc6,0x38,0x63,0xb6,0x71,0x8a,0xf1,0x3e,0xe3,0x5b,0x26,0xb0,0x89,0x9d,0x49,
0x92,0x49,0x8d,0xc9,0x4d,0x53,0xd8,0xd4,0xde,0x54,0x60,0xba,0xcf,0xb4,0xcf,0xc,
0x6b,0xe6,0x68,0x26,0x34,0xab,0x35,0xbb,0xc7,0xa2,0xb0,0xdc,0x59,0x59,0xac,0x46,
0xd6,0xa0,0x39,0xc3,0x3c,0xc8,0x7c,0xa3,0x79,0x9b,0xf9,0x2b,0xb,0x3d,0x8b,0x58,
0x8b,0x9d,0x16,0xdd,0x16,0x5f,0x2c,0xed,0x2c,0x53,0x2d,0xeb,0x2c,0x1f,0x59,0x29,
0x59,0x5,0x58,0x6d,0xb4,0xea,0xb0,0xfa,0xc3,0xda,0xc4,0x9a,0x6b,0x5d,0x63,0x7d,
0xc7,0x86,0x6a,0xe3,0x63,0xb3,0xce,0xa6,0xdd,0xe6,0xb5,0xad,0xa9,0x2d,0xdf,0x76,
0xbf,0xed,0x7d,0x3b,0x9a,0x5d,0xb0,0xdd,0x16,0xbb,0x4e,0xbb,0xcf,0xf6,0xe,0xf6,
0x22,0xfb,0x26,0xfb,0x31,0x7,0x3d,0x87,0x78,0x87,0xbd,0xe,0xf7,0xd8,0x74,0x76,
0x28,0xbb,0x84,0x7d,0xd5,0x11,0xeb,0xe8,0xe1,0xb8,0xce,0xf1,0x8c,0xe3,0x7,0x27,
0x7b,0x27,0xb1,0xd3,0x49,0xa7,0xdf,0x9d,0x59,0xce,0x29,0xce,0xd,0xce,0xa3,0xb,
0xc,0x17,0xf0,0x17,0xd4,0x2d,0x18,0x72,0xd1,0x71,0xe1,0xb8,0x1c,0x72,0x91,0x2e,
0x64,0x2e,0x8c,0x5f,0x78,0x70,0xa1,0xd4,0x55,0xdb,0x95,0xe3,0x5a,0xeb,0xfa,0xcc,
0x4d,0xd7,0x8d,0xe7,0x76,0xc4,0x6d,0xc4,0xdd,0xd8,0x3d,0xd9,0xfd,0xb8,0xfb,0x2b,
0xf,0x4b,0xf,0x91,0x47,0x8b,0xc7,0x94,0xa7,0x93,0xe7,0x1a,0xcf,0xb,0x5e,0x88,
0x97,0xaf,0x57,0x91,0x57,0xaf,0xb7,0x92,0xf7,0x62,0xef,0x6a,0xef,0xa7,0x3e,0x3a,
0x3e,0x89,0x3e,0x8d,0x3e,0x13,0xbe,0x76,0xbe,0xab,0x7d,0x2f,0xf8,0x61,0xfd,0x2,
0xfd,0x76,0xfa,0xdd,0xf3,0xd7,0xf0,0xe7,0xfa,0xd7,0xfb,0x4f,0x4,0x38,0x4,0xac,
0x9,0xe8,0xa,0xa4,0x4,0x46,0x4,0x56,0x7,0x3e,0xb,0x32,0x9,0x12,0x5,0x75,
0x4,0xc3,0xc1,0x1,0xc1,0xbb,0x82,0x1f,0x2f,0xd2,0x5f,0x24,0x5c,0xd4,0x16,0x2,
0x42,0xfc,0x43,0x76,0x85,0x3c,0x9,0x35,0xc,0x5d,0x15,0xfa,0x73,0x18,0x2e,0x2c,
0x34,0xac,0x26,0xec,0x79,0xb8,0x55,0x78,0x7e,0x78,0x77,0x4,0x2d,0x62,0x45,0x44,
0x43,0xc4,0xbb,0x48,0x8f,0xc8,0xd2,0xc8,0x47,0x8b,0x8d,0x16,0x4b,0x16,0x77,0x46,
0xc9,0x47,0xc5,0x45,0xd5,0x47,0x4d,0x45,0x7b,0x45,0x97,0x45,0x4b,0x97,0x58,0x2c,
0x59,0xb3,0xe4,0x46,0x8c,0x5a,0x8c,0x20,0xa6,0x3d,0x16,0x1f,0x1b,0x15,0x7b,0x24,
0x76,0x72,0xa9,0xf7,0xd2,0xdd,0x4b,0x87,0xe3,0xec,0xe2,0xa,0xe3,0xee,0x2e,0x33,
0x5c,0x96,0xb3,0xec,0xda,0x72,0xb5,0xe5,0xa9,0xcb,0xcf,0xae,0x90,0x5f,0xc1,0x59,
0x71,0x2a,0x1e,0x1b,0x1f,0x1d,0xdf,0x10,0xff,0x89,0x13,0xc2,0xa9,0xe5,0x4c,0xae,
0xf4,0x5f,0xb9,0x77,0xe5,0x4,0xd7,0x93,0xbb,0x87,0xfb,0x92,0xe7,0xc6,0x2b,0xe7,
0x8d,0xf1,0x5d,0xf8,0x65,0xfc,0x91,0x4,0x97,0x84,0xb2,0x84,0xd1,0x44,0x97,0xc4,
0x5d,0x89,0x63,0x49,0xae,0x49,0x15,0x49,0xe3,0x2,0x4f,0x41,0xb5,0xe0,0x75,0xb2,
0x5f,0xf2,0x81,0xe4,0xa9,0x94,0x90,0x94,0xa3,0x29,0x33,0xa9,0xd1,0xa9,0xcd,0x69,
0x84,0xb4,0xf8,0xb4,0xd3,0x42,0x25,0x61,0x8a,0xb0,0x2b,0x5d,0x33,0x3d,0x27,0xbd,
0x2f,0xc3,0x34,0xa3,0x30,0x43,0xba,0xca,0x69,0xd5,0xee,0x55,0x13,0xa2,0x40,0xd1,
0x91,0x4c,0x28,0x73,0x59,0x66,0xbb,0x98,0x8e,0xfe,0x4c,0xf5,0x48,0x8c,0x24,0x9b,
0x25,0x83,0x59,0xb,0xb3,0x6a,0xb2,0xde,0x67,0x47,0x65,0x9f,0xca,0x51,0xcc,0x11,
0xe6,0xf4,0xe4,0x9a,0xe4,0x6e,0xcb,0x1d,0xc9,0xf3,0xc9,0xfb,0x7e,0x35,0x66,0x35,
0x77,0x75,0x67,0xbe,0x76,0xfe,0x86,0xfc,0xc1,0x35,0xee,0x6b,0xe,0xad,0x85,0xd6,
0xae,0x5c,0xdb,0xb9,0x4e,0x77,0x5d,0xc1,0xba,0xe1,0xf5,0xbe,0xeb,0x8f,0x6d,0x20,
0x6d,0x48,0xd9,0xf0,0xcb,0x46,0xcb,0x8d,0x65,0x1b,0xdf,0x6e,0x8a,0xde,0xd4,0x51,
0xa0,0x51,0xb0,0xbe,0x60,0x68,0xb3,0xef,0xe6,0xc6,0x42,0xb9,0x42,0x51,0xe1,0xbd,
0x2d,0xce,0x5b,0xe,0x6c,0xc5,0x6c,0x15,0x6c,0xed,0xdd,0x66,0xb3,0xad,0x6a,0xdb,
0x97,0x22,0x5e,0xd1,0xf5,0x62,0xcb,0xe2,0x8a,0xe2,0x4f,0x25,0xdc,0x92,0xeb,0xdf,
0x59,0x7d,0x57,0xf9,0xdd,0xcc,0xf6,0x84,0xed,0xbd,0xa5,0xf6,0xa5,0xfb,0x77,0xe0,
0x76,0x8,0x77,0xdc,0xdd,0xe9,0xba,0xf3,0x58,0x99,0x62,0x59,0x5e,0xd9,0xd0,0xae,
0xe0,0x5d,0xad,0xe5,0xcc,0xf2,0xa2,0xf2,0xb7,0xbb,0x57,0xec,0xbe,0x56,0x61,0x5b,
0x71,0x60,0xf,0x69,0x8f,0x64,0x8f,0xb4,0x32,0xa8,0xb2,0xbd,0x4a,0xaf,0x6a,0x47,
0xd5,0xa7,0xea,0xa4,0xea,0x81,0x1a,0x8f,0x9a,0xe6,0xbd,0xea,0x7b,0xb7,0xed,0x9d,
0xda,0xc7,0xdb,0xd7,0xbf,0xdf,0x6d,0x7f,0xd3,0x1,0x8d,0x3,0xc5,0x7,0x3e,0x1e,
0x14,0x1c,0xbc,0x7f,0xc8,0xf7,0x50,0x6b,0xad,0x41,0x6d,0xc5,0x61,0xdc,0xe1,0xac,
0xc3,0xcf,0xeb,0xa2,0xea,0xba,0xbf,0x67,0x7f,0x5f,0x7f,0x44,0xed,0x48,0xf1,0x91,
0xcf,0x47,0x85,0x47,0xa5,0xc7,0xc2,0x8f,0x75,0xd5,0x3b,0xd4,0xd7,0x37,0xa8,0x37,
0x94,0x36,0xc2,0x8d,0x92,0xc6,0xb1,0xe3,0x71,0xc7,0x6f,0xfd,0xe0,0xf5,0x43,0x7b,
0x13,0xab,0xe9,0x50,0x33,0xa3,0xb9,0xf8,0x4,0x38,0x21,0x39,0xf1,0xe2,0xc7,0xf8,
0x1f,0xef,0x9e,0xc,0x3c,0xd9,0x79,0x8a,0x7d,0xaa,0xe9,0x27,0xfd,0x9f,0xf6,0xb6,
0xd0,0x5a,0x8a,0x5a,0xa1,0xd6,0xdc,0xd6,0x89,0xb6,0xa4,0x36,0x69,0x7b,0x4c,0x7b,
0xdf,0xe9,0x80,0xd3,0x9d,0x1d,0xce,0x1d,0x2d,0x3f,0x9b,0xff,0x7c,0xf4,0x8c,0xf6,
0x99,0x9a,0xb3,0xca,0x67,0x4b,0xcf,0x91,0xce,0x15,0x9c,0x9b,0x39,0x9f,0x77,0x7e,
0xf2,0x42,0xc6,0x85,0xf1,0x8b,0x89,0x17,0x87,0x3a,0x57,0x74,0x3e,0xba,0xb4,0xe4,
0xd2,0x9d,0xae,0xb0,0xae,0xde,0xcb,0x81,0x97,0xaf,0x5e,0xf1,0xb9,0x72,0xa9,0xdb,
0xbd,0xfb,0xfc,0x55,0x97,0xab,0x67,0xae,0x39,0x5d,0x3b,0x7d,0x9d,0x7d,0xbd,0xed,
0x86,0xfd,0x8d,0xd6,0x1e,0xbb,0x9e,0x96,0x5f,0xec,0x7e,0x69,0xe9,0xb5,0xef,0x6d,
0xbd,0xe9,0x70,0xb3,0xfd,0x96,0xe3,0xad,0x8e,0xbe,0x5,0x7d,0xe7,0xfa,0x5d,0xfb,
0x2f,0xde,0xf6,0xba,0x7d,0xe5,0x8e,0xff,0x9d,0x1b,0x3,0x8b,0x6,0xfa,0xee,0x2e,
0xbe,0x7b,0xff,0x5e,0xdc,0x3d,0xe9,0x7d,0xde,0xfd,0xd1,0x7,0xa9,0xf,0x5e,0x3f,
0xcc,0x7a,0x38,0xfd,0x68,0xfd,0x63,0xec,0xe3,0xa2,0x27,0xa,0x4f,0x2a,0x9e,0xaa,
0x3f,0xad,0xfd,0xd5,0xf8,0xd7,0x66,0xa9,0xbd,0xf4,0xec,0xa0,0xd7,0x60,0xcf,0xb3,
0x88,0x67,0x8f,0x86,0xb8,0x43,0x2f,0xff,0x95,0xf9,0xaf,0x4f,0xc3,0x5,0xcf,0xa9,
0xcf,0x2b,0x46,0xb4,0x46,0xea,0x47,0xad,0x47,0xcf,0x8c,0xf9,0x8c,0xdd,0x7a,0xb1,
0xf4,0xc5,0xf0,0xcb,0x8c,0x97,0xd3,0xe3,0x85,0xbf,0x29,0xfe,0xb6,0xf7,0x95,0xd1,
0xab,0x9f,0x7e,0x77,0xfb,0xbd,0x67,0x62,0xc9,0xc4,0xf0,0x6b,0xd1,0xeb,0x99,0x3f,
0x4a,0xde,0xa8,0xbe,0x39,0xfa,0xd6,0xf6,0x6d,0xe7,0x64,0xe8,0xe4,0xd3,0x77,0x69,
0xef,0xa6,0xa7,0x8a,0xde,0xab,0xbe,0x3f,0xf6,0x81,0xfd,0xa1,0xfb,0x63,0xf4,0xc7,
0x91,0xe9,0xec,0x4f,0xf8,0x4f,0x95,0x9f,0x8d,0x3f,0x77,0x7c,0x9,0xfc,0xf2,0x78,
0x26,0x6d,0x66,0xe6,0xdf,0xf7,0x84,0xf3,0xfb,0x32,0x3a,0x59,0x7e,0x0,0x0,0x0,
0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,0x1,0x0,0x9a,
0x9c,0x18,0x0,0x0,0x4,0xde,0x69,0x54,0x58,0x74,0x58,0x4d,0x4c,0x3a,0x63,0x6f,
0x6d,0x2e,0x61,0x64,0x6f,0x62,0x65,0x2e,0x78,0x6d,0x70,0x0,0x0,0x0,0x0,0x0,
0x3c,0x78,0x3a,0x78,0x6d,0x70,0x6d,0x65,0x74,0x61,0x20,0x78,0x6d,0x6c,0x6e,0x73,
0x3a,0x78,0x3d,0x22,0x61,0x64,0x6f,0x62,0x65,0x3a,0x6e,0x73,0x3a,0x6d,0x65,0x74,
0x61,0x2f,0x22,0x20,0x78,0x3a,0x78,0x6d,0x70,0x74,0x6b,0x3d,0x22,0x58,0x4d,0x50,
0x20,0x43,0x6f,0x72,0x65,0x20,0x35,0x2e,0x31,0x2e,0x32,0x22,0x3e,0xa,0x20,0x20,
0x20,0x3c,0x72,0x64,0x66,0x3a,0x52,0x44,0x46,0x20,0x78,0x6d,0x6c,0x6e,0x73,0x3a,
0x72,0x64,0x66,0x3d,0x22,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,
0x77,0x33,0x2e,0x6f,0x72,0x67,0x2f,0x31,0x39,0x39,0x39,0x2f,0x30,0x32,0x2f,0x32,
0x32,0x2d,0x72,0x64,0x66,0x2d,0x73,0x79,0x6e,0x74,0x61,0x78,0x2d,0x6e,0x73,0x23,
0x22,0x3e,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x72,0x64,0x66,0x3a,0x44,0x65,
0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6f,0x6e,0x20,0x72,0x64,0x66,0x3a,0x61,0x62,
0x6f,0x75,0x74,0x3d,0x22,0x22,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x78,0x6d,0x6c,0x6e,0x73,0x3a,0x74,0x69,0x66,0x66,0x3d,0x22,0x68,
0x74,0x74,0x70,0x3a,0x2f,0x2f,0x6e,0x73,0x2e,0x61,0x64,0x6f,0x62,0x65,0x2e,0x63,
0x6f,0x6d,0x2f,0x74,0x69,0x66,0x66,0x2f,0x31,0x2e,0x30,0x2f,0x22,0x3e,0xa,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x74,0x69,0x66,0x66,0x3a,0x52,0x65,
0x73,0x6f,0x6c,0x75,0x74,0x69,0x6f,0x6e,0x55,0x6e,0x69,0x74,0x3e,0x31,0x3c,0x2f,
0x74,0x69,0x66,0x66,0x3a,0x52,0x65,0x73,0x6f,0x6c,0x75,0x74,0x69,0x6f,0x6e,0x55,
0x6e,0x69,0x74,0x3e,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x74,
0x69,0x66,0x66,0x3a,0x43,0x6f,0x6d,0x70,0x72,0x65,0x73,0x73,0x69,0x6f,0x6e,0x3e,
0x35,0x3c,0x2f,0x74,0x69,0x66,0x66,0x3a,0x43,0x6f,0x6d,0x70,0x72,0x65,0x73,0x73,
0x69,0x6f,0x6e,0x3e,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x74,
0x69,0x66,0x66,0x3a,0x58,0x52,0x65,0x73,0x6f,0x6c,0x75,0x74,0x69,0x6f,0x6e,0x3e,
0x37,0x32,0x3c,0x2f,0x74,0x69,0x66,0x66,0x3a,0x58,0x52,0x65,0x73,0x6f,0x6c,0x75,
0x74,0x69,0x6f,0x6e,0x3e,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,
0x74,0x69,0x66,0x66,0x3a,0x4f,0x72,0x69,0x65,0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e,
0x3e,0x31,0x3c,0x2f,0x74,0x69,0x66,0x66,0x3a,0x4f,0x72,0x69,0x65,0x6e,0x74,0x61,
0x74,0x69,0x6f,0x6e,0x3e,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,
0x74,0x69,0x66,0x66,0x3a,0x59,0x52,0x65,0x73,0x6f,0x6c,0x75,0x74,0x69,0x6f,0x6e,
0x3e,0x37,0x32,0x3c,0x2f,0x74,0x69,0x66,0x66,0x3a,0x59,0x52,0x65,0x73,0x6f,0x6c,
0x75,0x74,0x69,0x6f,0x6e,0x3e,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x2f,0x72,
0x64,0x66,0x3a,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6f,0x6e,0x3e,0xa,
0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x72,0x64,0x66,0x3a,0x44,0x65,0x73,0x63,0x72,
0x69,0x70,0x74,0x69,0x6f,0x6e,0x20,0x72,0x64,0x66,0x3a,0x61,0x62,0x6f,0x75,0x74,
0x3d,0x22,0x22,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x78,0x6d,0x6c,0x6e,0x73,0x3a,0x65,0x78,0x69,0x66,0x3d,0x22,0x68,0x74,0x74,0x70,
0x3a,0x2f,0x2f,0x6e,0x73,0x2e,0x61,0x64,0x6f,0x62,0x65,0x2e,0x63,0x6f,0x6d,0x2f,
0x65,0x78,0x69,0x66,0x2f,0x31,0x2e,0x30,0x2f,0x22,0x3e,0xa,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x3c,0x65,0x78,0x69,0x66,0x3a,0x50,0x69,0x78,0x65,0x6c,
0x58,0x44,0x69,0x6d,0x65,0x6e,0x73,0x69,0x6f,0x6e,0x3e,0x32,0x36,0x32,0x3c,0x2f,
0x65,0x78,0x69,0x66,0x3a,0x50,0x69,0x78,0x65,0x6c,0x58,0x44,0x69,0x6d,0x65,0x6e,
0x73,0x69,0x6f,0x6e,0x3e,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,
0x65,0x78,0x69,0x66,0x3a,0x43,0x6f,0x6c,0x6f,0x72,0x53,0x70,0x61,0x63,0x65,0x3e,
0x31,0x3c,0x2f,0x65,0x78,0x69,0x66,0x3a,0x43,0x6f,0x6c,0x6f,0x72,0x53,0x70,0x61,
0x63,0x65,0x3e,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x65,0x78,
0x69,0x66,0x3a,0x50,0x69,0x78,0x65,0x6c,0x59,0x44,0x69,0x6d,0x65,0x6e,0x73,0x69,
0x6f,0x6e,0x3e,0x39,0x3c,0x2f,0x65,0x78,0x69,0x66,0x3a,0x50,0x69,0x78,0x65,0x6c,
0x59,0x44,0x69,0x6d,0x65,0x6e,0x73,0x69,0x6f,0x6e,0x3e,0xa,0x20,0x20,0x20,0x20,
0x20,0x20,0x3c,0x2f,0x72,0x64,0x66,0x3a,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,
0x69,0x6f,0x6e,0x3e,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x72,0x64,0x66,0x3a,
0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6f,0x6e,0x20,0x72,0x64,0x66,0x3a,
0x61,0x62,0x6f,0x75,0x74,0x3d,0x22,0x22,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x78,0x6d,0x6c,0x6e,0x73,0x3a,0x64,0x63,0x3d,0x22,0x68,
0x74,0x74,0x70,0x3a,0x2f,0x2f,0x70,0x75,0x72,0x6c,0x2e,0x6f,0x72,0x67,0x2f,0x64,
0x63,0x2f,0x65,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x73,0x2f,0x31,0x2e,0x31,0x2f,0x22,
0x3e,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x64,0x63,0x3a,0x73,
0x75,0x62,0x6a,0x65,0x63,0x74,0x3e,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x3c,0x72,0x64,0x66,0x3a,0x42,0x61,0x67,0x2f,0x3e,0xa,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x2f,0x64,0x63,0x3a,0x73,0x75,0x62,
0x6a,0x65,0x63,0x74,0x3e,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x2f,0x72,0x64,
0x66,0x3a,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6f,0x6e,0x3e,0xa,0x20,
0x20,0x20,0x20,0x20,0x20,0x3c,0x72,0x64,0x66,0x3a,0x44,0x65,0x73,0x63,0x72,0x69,
0x70,0x74,0x69,0x6f,0x6e,0x20,0x72,0x64,0x66,0x3a,0x61,0x62,0x6f,0x75,0x74,0x3d,
0x22,0x22,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x78,
0x6d,0x6c,0x6e,0x73,0x3a,0x78,0x6d,0x70,0x3d,0x22,0x68,0x74,0x74,0x70,0x3a,0x2f,
0x2f,0x6e,0x73,0x2e,0x61,0x64,0x6f,0x62,0x65,0x2e,0x63,0x6f,0x6d,0x2f,0x78,0x61,
0x70,0x2f,0x31,0x2e,0x30,0x2f,0x22,0x3e,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x3c,0x78,0x6d,0x70,0x3a,0x4d,0x6f,0x64,0x69,0x66,0x79,0x44,0x61,0x74,
0x65,0x3e,0x32,0x30,0x31,0x33,0x2d,0x30,0x31,0x2d,0x31,0x34,0x54,0x31,0x36,0x3a,
0x30,0x31,0x3a,0x30,0x31,0x3c,0x2f,0x78,0x6d,0x70,0x3a,0x4d,0x6f,0x64,0x69,0x66,
0x79,0x44,0x61,0x74,0x65,0x3e,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x3c,0x78,0x6d,0x70,0x3a,0x43,0x72,0x65,0x61,0x74,0x6f,0x72,0x54,0x6f,0x6f,0x6c,
0x3e,0x50,0x69,0x78,0x65,0x6c,0x6d,0x61,0x74,0x6f,0x72,0x20,0x32,0x2e,0x31,0x2e,
0x34,0x3c,0x2f,0x78,0x6d,0x70,0x3a,0x43,0x72,0x65,0x61,0x74,0x6f,0x72,0x54,0x6f,
0x6f,0x6c,0x3e,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x2f,0x72,0x64,0x66,0x3a,
0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6f,0x6e,0x3e,0xa,0x20,0x20,0x20,
0x3c,0x2f,0x72,0x64,0x66,0x3a,0x52,0x44,0x46,0x3e,0xa,0x3c,0x2f,0x78,0x3a,0x78,
0x6d,0x70,0x6d,0x65,0x74,0x61,0x3e,0xa,0xf5,0xca,0x8f,0x96,0x0,0x0,0x0,0x8f,
0x49,0x44,0x41,0x54,0x68,0x5,0xed,0xda,0xd1,0x9,0x80,0x20,0x10,0x0,0xd0,0x8c,
0xfe,0x6b,0x97,0x76,0x6a,0xa8,0x76,0x6a,0x97,0x9a,0xc0,0x34,0x10,0xa,0x71,0x81,
0x7c,0x82,0xe4,0xe9,0xd7,0xbd,0xe2,0x38,0xa1,0x10,0x63,0x1c,0xc,0x2,0x4,0x8,
0xbc,0x5,0xc6,0x77,0x60,0x4d,0x80,0x0,0x81,0x2c,0xa0,0x30,0xf8,0xe,0x8,0x10,
0xa8,0x4,0xa6,0xb0,0x1f,0xcf,0x5d,0x22,0x6e,0x6b,0xa8,0x4e,0x6d,0x10,0x20,0xf0,
0x7b,0x81,0x54,0x3,0xe6,0x94,0xe4,0x99,0xe6,0x95,0xea,0xc0,0x92,0x13,0xd6,0x31,
0x64,0x5,0x83,0x0,0x81,0x8f,0x80,0xc2,0xf0,0xe1,0x10,0x10,0x20,0x90,0x5,0xa6,
0xc2,0x50,0xae,0x14,0x25,0xf6,0x24,0x40,0xa0,0x5f,0x1,0x1d,0x43,0xbf,0xef,0x5e,
0xe6,0x4,0x9a,0x2,0xc1,0x7f,0xc,0x4d,0x1b,0x7,0x4,0xba,0x15,0xb8,0x1,0x8d,
0xbc,0x11,0x76,0xde,0x86,0xff,0xe,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,
0x42,0x60,0x82,
// /home/pi/WorkSpace/WarehouseStackView/images/navigation_previous_item.png
0x0,0x0,0x5,0x3f,
0x89,
0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,
0x0,0x0,0x30,0x0,0x0,0x0,0x30,0x8,0x6,0x0,0x0,0x0,0x57,0x2,0xf9,0x87,
0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x13,0x0,0x0,0xb,0x13,
0x1,0x0,0x9a,0x9c,0x18,0x0,0x0,0x2,0x18,0x69,0x54,0x58,0x74,0x58,0x4d,0x4c,
0x3a,0x63,0x6f,0x6d,0x2e,0x61,0x64,0x6f,0x62,0x65,0x2e,0x78,0x6d,0x70,0x0,0x0,
0x0,0x0,0x0,0x3c,0x78,0x3a,0x78,0x6d,0x70,0x6d,0x65,0x74,0x61,0x20,0x78,0x6d,
0x6c,0x6e,0x73,0x3a,0x78,0x3d,0x22,0x61,0x64,0x6f,0x62,0x65,0x3a,0x6e,0x73,0x3a,
0x6d,0x65,0x74,0x61,0x2f,0x22,0x20,0x78,0x3a,0x78,0x6d,0x70,0x74,0x6b,0x3d,0x22,
0x58,0x4d,0x50,0x20,0x43,0x6f,0x72,0x65,0x20,0x35,0x2e,0x31,0x2e,0x32,0x22,0x3e,
0xa,0x20,0x20,0x20,0x3c,0x72,0x64,0x66,0x3a,0x52,0x44,0x46,0x20,0x78,0x6d,0x6c,
0x6e,0x73,0x3a,0x72,0x64,0x66,0x3d,0x22,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,
0x77,0x77,0x2e,0x77,0x33,0x2e,0x6f,0x72,0x67,0x2f,0x31,0x39,0x39,0x39,0x2f,0x30,
0x32,0x2f,0x32,0x32,0x2d,0x72,0x64,0x66,0x2d,0x73,0x79,0x6e,0x74,0x61,0x78,0x2d,
0x6e,0x73,0x23,0x22,0x3e,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x72,0x64,0x66,
0x3a,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6f,0x6e,0x20,0x72,0x64,0x66,
0x3a,0x61,0x62,0x6f,0x75,0x74,0x3d,0x22,0x22,0xa,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x78,0x6d,0x6c,0x6e,0x73,0x3a,0x78,0x6d,0x70,0x3d,
0x22,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x6e,0x73,0x2e,0x61,0x64,0x6f,0x62,0x65,
0x2e,0x63,0x6f,0x6d,0x2f,0x78,0x61,0x70,0x2f,0x31,0x2e,0x30,0x2f,0x22,0x3e,0xa,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x78,0x6d,0x70,0x3a,0x43,0x72,
0x65,0x61,0x74,0x6f,0x72,0x54,0x6f,0x6f,0x6c,0x3e,0x41,0x64,0x6f,0x62,0x65,0x20,
0x50,0x68,0x6f,0x74,0x6f,0x73,0x68,0x6f,0x70,0x20,0x43,0x53,0x35,0x2e,0x31,0x20,
0x4d,0x61,0x63,0x69,0x6e,0x74,0x6f,0x73,0x68,0x3c,0x2f,0x78,0x6d,0x70,0x3a,0x43,
0x72,0x65,0x61,0x74,0x6f,0x72,0x54,0x6f,0x6f,0x6c,0x3e,0xa,0x20,0x20,0x20,0x20,
0x20,0x20,0x3c,0x2f,0x72,0x64,0x66,0x3a,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,
0x69,0x6f,0x6e,0x3e,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x72,0x64,0x66,0x3a,
0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6f,0x6e,0x20,0x72,0x64,0x66,0x3a,
0x61,0x62,0x6f,0x75,0x74,0x3d,0x22,0x22,0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x78,0x6d,0x6c,0x6e,0x73,0x3a,0x74,0x69,0x66,0x66,0x3d,
0x22,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x6e,0x73,0x2e,0x61,0x64,0x6f,0x62,0x65,
0x2e,0x63,0x6f,0x6d,0x2f,0x74,0x69,0x66,0x66,0x2f,0x31,0x2e,0x30,0x2f,0x22,0x3e,
0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x74,0x69,0x66,0x66,0x3a,
0x4f,0x72,0x69,0x65,0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e,0x3e,0x31,0x3c,0x2f,0x74,
0x69,0x66,0x66,0x3a,0x4f,0x72,0x69,0x65,0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e,0x3e,
0xa,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x2f,0x72,0x64,0x66,0x3a,0x44,0x65,0x73,
0x63,0x72,0x69,0x70,0x74,0x69,0x6f,0x6e,0x3e,0xa,0x20,0x20,0x20,0x3c,0x2f,0x72,
0x64,0x66,0x3a,0x52,0x44,0x46,0x3e,0xa,0x3c,0x2f,0x78,0x3a,0x78,0x6d,0x70,0x6d,
0x65,0x74,0x61,0x3e,0xa,0x6b,0x49,0xe7,0x8e,0x0,0x0,0x2,0xcd,0x49,0x44,0x41,
0x54,0x68,0x5,0xed,0x97,0x39,0x68,0x15,0x51,0x14,0x86,0xdf,0x73,0x89,0x3b,0xa8,
0x20,0x82,0x85,0x60,0xa1,0x12,0x11,0xac,0x42,0x40,0x14,0x5e,0xa1,0xad,0x85,0x82,
0xa0,0x55,0x2a,0x11,0xb5,0x11,0x89,0x4a,0x5c,0x89,0x1a,0x95,0xb8,0x14,0xae,0x58,
0x5,0x2c,0x44,0x41,0xb,0x6b,0x91,0x80,0x20,0x58,0x2a,0x22,0xa8,0x85,0x9d,0x20,
0x82,0x16,0xee,0xeb,0xf3,0xfb,0x60,0x5e,0x93,0x54,0xce,0x3d,0x77,0x42,0x60,0x7e,
0xf8,0x78,0x6f,0x6,0x66,0xe6,0xff,0xef,0xbd,0x73,0xe6,0xdc,0x66,0xbb,0xdd,0x6e,
0x4c,0x66,0x4d,0x99,0xcc,0xe6,0xf5,0x5e,0x7,0x98,0xe8,0x19,0xac,0x67,0xa0,0x9e,
0x81,0xc4,0x11,0xa8,0x97,0x50,0x89,0x1,0xec,0xe6,0x9a,0x3e,0x98,0x5a,0xe2,0xda,
0x71,0x97,0x4c,0x1b,0x77,0x26,0xef,0x89,0x85,0xdc,0xfe,0x38,0xf4,0xc0,0x52,0x38,
0xb,0x3f,0xa0,0xb4,0x9a,0x15,0x7e,0x89,0xbb,0x70,0x79,0x1,0x36,0xc0,0x17,0x98,
0x3,0x8f,0xe0,0x12,0x3c,0x83,0x52,0xaa,0x72,0x6,0xf6,0xe3,0x50,0xf3,0x9f,0xc1,
0xfe,0xe5,0xf,0x2c,0x3,0x67,0xa5,0xb4,0xaa,0xa,0xb0,0x3,0x87,0xdb,0xc1,0x91,
0x57,0x33,0xe0,0x23,0xec,0x83,0xa7,0x50,0x5a,0x55,0x54,0xa1,0x4d,0xb8,0xdb,0xd,
0xae,0x75,0x47,0xde,0x41,0xfb,0xd,0x47,0x21,0xc9,0x3c,0xd7,0x67,0xef,0x85,0x7a,
0x79,0xc6,0x21,0x1f,0x84,0x5c,0x32,0xe,0x98,0x1,0x86,0xe1,0x21,0x24,0x2b,0xe7,
0xc,0xac,0xc0,0xdd,0x19,0x98,0xd,0xbf,0xa0,0x9,0xb3,0x60,0x4,0x6e,0x41,0x88,
0x72,0x5,0x58,0x8c,0xbb,0x21,0xf0,0xb7,0x53,0x26,0xad,0x3a,0xf7,0xe1,0x22,0x84,
0x29,0x47,0x0,0x8d,0xe,0xc2,0x6a,0xf8,0x5a,0x38,0xf5,0xdc,0x63,0x38,0x9,0x2e,
0xa5,0x30,0xe5,0x8,0x30,0x80,0xbb,0x16,0x58,0x2e,0x95,0xcb,0xe6,0x35,0x1c,0x86,
0x4f,0x10,0xaa,0xe8,0x0,0x7b,0x70,0xb7,0x19,0x3a,0xe6,0xbb,0xf8,0xff,0x1e,0xfa,
0xe1,0x2d,0x84,0x2b,0x32,0xc0,0x56,0xdc,0xed,0x84,0xef,0x60,0xb9,0x9c,0xe,0xae,
0xff,0x23,0xf0,0x12,0xb2,0x28,0x2a,0x40,0xb,0x77,0x7,0xc0,0xfa,0xee,0x1a,0xb7,
0x51,0xf3,0xde,0x56,0x21,0xdb,0x85,0x6c,0x8a,0x8,0x60,0x77,0x39,0x8,0x8e,0xb8,
0x1,0x2c,0x97,0x7e,0x69,0xaf,0xc2,0x5d,0xc8,0xaa,0xd4,0x0,0xeb,0x70,0x77,0xe,
0xec,0x67,0x7e,0x16,0x4e,0x35,0x6f,0x9d,0xbf,0x56,0x1c,0x67,0xfd,0x49,0xd,0xe0,
0xf5,0x21,0x7d,0x7d,0xd9,0x94,0x11,0xed,0xf4,0x2a,0x1e,0x7e,0x1d,0xe6,0x83,0xb3,
0xd0,0xf9,0xe2,0xda,0x26,0x67,0x9f,0x85,0xd4,0x19,0xc0,0x63,0xe3,0x5,0xd8,0x98,
0xd9,0x2e,0xd8,0xe7,0x58,0x81,0xac,0x3e,0xbb,0x60,0xb,0x64,0x55,0x44,0x0,0xd,
0x8e,0x82,0xbb,0x2b,0x3,0xb8,0xa4,0xac,0x44,0x7f,0xe1,0x20,0xac,0x87,0x6c,0x8a,
0xa,0xa0,0xc1,0x3b,0xe0,0x52,0x9a,0x9,0x2e,0x23,0x67,0xc4,0x17,0xfa,0x4,0xac,
0x84,0x2c,0x8a,0xc,0xa0,0xc1,0xcb,0x70,0xf,0xe6,0x7a,0x80,0x7c,0x27,0x16,0xc1,
0x30,0x2c,0x81,0x70,0x45,0x7,0xd0,0xe0,0x10,0x8c,0x42,0x27,0xc4,0x37,0xfe,0x2f,
0x7,0x1b,0xb9,0x79,0x10,0xaa,0x1c,0x1,0xdc,0x36,0xfa,0x52,0x3f,0x7,0xf7,0x2,
0xca,0x73,0x6b,0xc1,0x86,0x2e,0xb4,0xec,0xe6,0x8,0x80,0xc7,0xc6,0x3b,0x18,0x28,
0x7e,0x7d,0xf,0x94,0x21,0xdc,0x5e,0xee,0xf5,0x20,0x4a,0xb9,0x2,0xe8,0xef,0x15,
0x58,0x85,0xdc,0x13,0xd8,0x66,0x58,0x5e,0x5d,0x4e,0x7d,0xb0,0xd,0x42,0x94,0x33,
0x80,0x6,0x9f,0xc0,0xa9,0xc2,0xa9,0x4b,0xc7,0xd2,0x6a,0xbf,0xd4,0xf,0x1b,0x21,
0x59,0xb9,0x3,0x68,0xd0,0x6d,0xe4,0x15,0x70,0x29,0x59,0x5e,0xd,0xe0,0xf7,0xe2,
0x18,0xac,0x81,0x24,0x55,0x11,0x40,0x83,0x37,0xe0,0x36,0xb8,0xb5,0x54,0x7e,0xa9,
0x17,0xc0,0x79,0x68,0x41,0x69,0x55,0x15,0x40,0x83,0xa7,0xe1,0x1,0x58,0x5e,0x7d,
0xae,0x4b,0xea,0xd,0x7c,0x80,0xd2,0x8a,0x68,0xe6,0xfe,0xe7,0xe1,0xb6,0xdd,0x36,
0x78,0x3d,0x30,0x2,0xb6,0x1f,0xce,0x46,0x69,0x55,0x1d,0x40,0xa3,0xdd,0xd0,0xb,
0x37,0xc1,0x9e,0x29,0x49,0x13,0x11,0x20,0xc9,0xf0,0xd8,0x8b,0xab,0x7c,0x7,0xc6,
0x3e,0x3b,0xe4,0xb8,0xe,0x10,0x32,0x8c,0x9,0x37,0xa9,0x67,0x20,0x61,0xf0,0x42,
0x2e,0xad,0x67,0x20,0x64,0x18,0x13,0x6e,0xf2,0xf,0xee,0x32,0x7e,0x71,0x9,0x99,
0x7,0x9a,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82,
// /home/pi/WorkSpace/WarehouseStackView/images/NOTICE.txt
0x0,0x0,0x0,0xec,
0x4e,
0x6f,0x74,0x69,0x63,0x65,0x20,0x73,0x6f,0x6d,0x65,0x20,0x6f,0x66,0x20,0x74,0x68,
0x65,0x73,0x65,0x20,0x69,0x6d,0x61,0x67,0x65,0x73,0x20,0x61,0x72,0x65,0x20,0x64,
0x65,0x72,0x69,0x76,0x65,0x64,0x20,0x66,0x72,0x6f,0x6d,0x20,0x47,0x6f,0x6f,0x67,
0x6c,0x65,0x20,0x61,0x70,0x70,0x6c,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e,0x73,0x20,
0x72,0x65,0x73,0x6f,0x75,0x72,0x63,0x65,0x73,0x2e,0x20,0x54,0x68,0x65,0x79,0x20,
0x77,0x65,0x72,0x65,0x20,0x70,0x72,0x6f,0x76,0x69,0x64,0x65,0x64,0x20,0x75,0x6e,
0x64,0x65,0x72,0x20,0x74,0x68,0x65,0x20,0x66,0x6f,0x6c,0x6c,0x6f,0x77,0x69,0x6e,
0x67,0x20,0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x3a,0xd,0xa,0x59,0x6f,0x75,0x20,
0x6d,0x61,0x79,0x20,0x75,0x73,0x65,0x20,0x74,0x68,0x65,0x20,0x6d,0x61,0x74,0x65,
0x72,0x69,0x61,0x6c,0x73,0x20,0x69,0x6e,0x20,0x74,0x68,0x69,0x73,0x20,0x64,0x69,
0x72,0x65,0x63,0x74,0x6f,0x72,0x79,0x20,0x77,0x69,0x74,0x68,0x6f,0x75,0x74,0x20,
0x72,0x65,0x73,0x74,0x72,0x69,0x63,0x74,0x69,0x6f,0x6e,0x20,0x74,0x6f,0x20,0x64,
0x65,0x76,0x65,0x6c,0x6f,0x70,0x20,0x79,0x6f,0x75,0x72,0x20,0x61,0x70,0x70,0x73,
0x20,0x61,0x6e,0x64,0x20,0x74,0x6f,0x20,0x75,0x73,0x65,0x20,0x69,0x6e,0x20,0x79,
0x6f,0x75,0x72,0x20,0x61,0x70,0x70,0x73,0x2e,0xd,0xa,
};
static const unsigned char qt_resource_name[] = {
// qtquickcontrols2.conf
0x0,0x15,
0x8,0x1e,0x16,0x66,
0x0,0x71,
0x0,0x74,0x0,0x71,0x0,0x75,0x0,0x69,0x0,0x63,0x0,0x6b,0x0,0x63,0x0,0x6f,0x0,0x6e,0x0,0x74,0x0,0x72,0x0,0x6f,0x0,0x6c,0x0,0x73,0x0,0x32,0x0,0x2e,
0x0,0x63,0x0,0x6f,0x0,0x6e,0x0,0x66,
// images
0x0,0x6,
0x7,0x3,0x7d,0xc3,
0x0,0x69,
0x0,0x6d,0x0,0x61,0x0,0x67,0x0,0x65,0x0,0x73,
// main.qml
0x0,0x8,
0x8,0x1,0x5a,0x5c,
0x0,0x6d,
0x0,0x61,0x0,0x69,0x0,0x6e,0x0,0x2e,0x0,0x71,0x0,0x6d,0x0,0x6c,
// qml
0x0,0x3,
0x0,0x0,0x78,0x3c,
0x0,0x71,
0x0,0x6d,0x0,0x6c,
// StationPage.qml
0x0,0xf,
0x6,0xb6,0x7c,0x5c,
0x0,0x53,
0x0,0x74,0x0,0x61,0x0,0x74,0x0,0x69,0x0,0x6f,0x0,0x6e,0x0,0x50,0x0,0x61,0x0,0x67,0x0,0x65,0x0,0x2e,0x0,0x71,0x0,0x6d,0x0,0x6c,
// ControlPanel.qml
0x0,0x10,
0x3,0x81,0xe5,0xdc,
0x0,0x43,
0x0,0x6f,0x0,0x6e,0x0,0x74,0x0,0x72,0x0,0x6f,0x0,0x6c,0x0,0x50,0x0,0x61,0x0,0x6e,0x0,0x65,0x0,0x6c,0x0,0x2e,0x0,0x71,0x0,0x6d,0x0,0x6c,
// tabs_standard.png
0x0,0x11,
0x4,0x3a,0x38,0x47,
0x0,0x74,
0x0,0x61,0x0,0x62,0x0,0x73,0x0,0x5f,0x0,0x73,0x0,0x74,0x0,0x61,0x0,0x6e,0x0,0x64,0x0,0x61,0x0,0x72,0x0,0x64,0x0,0x2e,0x0,0x70,0x0,0x6e,0x0,0x67,
// tab_selected.png
0x0,0x10,
0x7,0x99,0x9e,0x7,
0x0,0x74,
0x0,0x61,0x0,0x62,0x0,0x5f,0x0,0x73,0x0,0x65,0x0,0x6c,0x0,0x65,0x0,0x63,0x0,0x74,0x0,0x65,0x0,0x64,0x0,0x2e,0x0,0x70,0x0,0x6e,0x0,0x67,
// toolbar.png
0x0,0xb,
0x8,0x73,0x9b,0x7,
0x0,0x74,
0x0,0x6f,0x0,0x6f,0x0,0x6c,0x0,0x62,0x0,0x61,0x0,0x72,0x0,0x2e,0x0,0x70,0x0,0x6e,0x0,0x67,
// button_default.png
0x0,0x12,
0xa,0xf0,0xc3,0x87,
0x0,0x62,
0x0,0x75,0x0,0x74,0x0,0x74,0x0,0x6f,0x0,0x6e,0x0,0x5f,0x0,0x64,0x0,0x65,0x0,0x66,0x0,0x61,0x0,0x75,0x0,0x6c,0x0,0x74,0x0,0x2e,0x0,0x70,0x0,0x6e,
0x0,0x67,
// button_pressed.png
0x0,0x12,
0xb,0xa,0xa3,0xc7,
0x0,0x62,
0x0,0x75,0x0,0x74,0x0,0x74,0x0,0x6f,0x0,0x6e,0x0,0x5f,0x0,0x70,0x0,0x72,0x0,0x65,0x0,0x73,0x0,0x73,0x0,0x65,0x0,0x64,0x0,0x2e,0x0,0x70,0x0,0x6e,
0x0,0x67,
// navigation_next_item.png
0x0,0x18,
0xa,0x2b,0x1b,0x67,
0x0,0x6e,
0x0,0x61,0x0,0x76,0x0,0x69,0x0,0x67,0x0,0x61,0x0,0x74,0x0,0x69,0x0,0x6f,0x0,0x6e,0x0,0x5f,0x0,0x6e,0x0,0x65,0x0,0x78,0x0,0x74,0x0,0x5f,0x0,0x69,
0x0,0x74,0x0,0x65,0x0,0x6d,0x0,0x2e,0x0,0x70,0x0,0x6e,0x0,0x67,
// textinput.png
0x0,0xd,
0x2,0x58,0x36,0x7,
0x0,0x74,
0x0,0x65,0x0,0x78,0x0,0x74,0x0,0x69,0x0,0x6e,0x0,0x70,0x0,0x75,0x0,0x74,0x0,0x2e,0x0,0x70,0x0,0x6e,0x0,0x67,
// navigation_previous_item.png
0x0,0x1c,
0xd,0x4d,0x4f,0x87,
0x0,0x6e,
0x0,0x61,0x0,0x76,0x0,0x69,0x0,0x67,0x0,0x61,0x0,0x74,0x0,0x69,0x0,0x6f,0x0,0x6e,0x0,0x5f,0x0,0x70,0x0,0x72,0x0,0x65,0x0,0x76,0x0,0x69,0x0,0x6f,
0x0,0x75,0x0,0x73,0x0,0x5f,0x0,0x69,0x0,0x74,0x0,0x65,0x0,0x6d,0x0,0x2e,0x0,0x70,0x0,0x6e,0x0,0x67,
// NOTICE.txt
0x0,0xa,
0xd,0x7e,0x32,0xf4,
0x0,0x4e,
0x0,0x4f,0x0,0x54,0x0,0x49,0x0,0x43,0x0,0x45,0x0,0x2e,0x0,0x74,0x0,0x78,0x0,0x74,
};
static const unsigned char qt_resource_struct[] = {
// :
0x0,0x0,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x4,0x0,0x0,0x0,0x1,
0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
// :/qml
0x0,0x0,0x0,0x58,0x0,0x2,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0xe,
0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
// :/images
0x0,0x0,0x0,0x30,0x0,0x2,0x0,0x0,0x0,0x9,0x0,0x0,0x0,0x5,
0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
// :/main.qml
0x0,0x0,0x0,0x42,0x0,0x1,0x0,0x0,0x0,0x1,0x0,0x0,0x1,0x49,
0x0,0x0,0x1,0x5e,0x4a,0xed,0xdd,0xc4,
// :/qtquickcontrols2.conf
0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x0,
0x0,0x0,0x1,0x5e,0x4a,0xed,0xde,0xa,
// :/images/textinput.png
0x0,0x0,0x1,0xa2,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x31,0x2c,
0x0,0x0,0x1,0x5e,0x4a,0xed,0xe2,0x60,
// :/images/tabs_standard.png
0x0,0x0,0x0,0xae,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x13,0xa9,
0x0,0x0,0x1,0x5e,0x4a,0xed,0xe1,0xf2,
// :/images/tab_selected.png
0x0,0x0,0x0,0xd6,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x18,0x7b,
0x0,0x0,0x1,0x5e,0x4a,0xed,0xe1,0xe8,
// :/images/toolbar.png
0x0,0x0,0x0,0xfc,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x19,0x58,
0x0,0x0,0x1,0x5e,0x4a,0xed,0xe2,0x6a,
// :/images/navigation_next_item.png
0x0,0x0,0x1,0x6c,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x2b,0xeb,
0x0,0x0,0x1,0x5e,0x4a,0xed,0xe1,0x7a,
// :/images/button_default.png
0x0,0x0,0x1,0x18,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x1f,0xc7,
0x0,0x0,0x1,0x5e,0x4a,0xed,0xe1,0x34,
// :/images/button_pressed.png
0x0,0x0,0x1,0x42,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x25,0x49,
0x0,0x0,0x1,0x5e,0x4a,0xed,0xe1,0x3e,
// :/images/navigation_previous_item.png
0x0,0x0,0x1,0xc2,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x41,0x54,
0x0,0x0,0x1,0x5e,0x4a,0xed,0xe1,0xb6,
// :/images/NOTICE.txt
0x0,0x0,0x2,0x0,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x46,0x97,
0x0,0x0,0x1,0x5e,0x4a,0xed,0xe1,0xc0,
// :/qml/ControlPanel.qml
0x0,0x0,0x0,0x88,0x0,0x1,0x0,0x0,0x0,0x1,0x0,0x0,0xf,0x71,
0x0,0x0,0x1,0x5e,0x4a,0xed,0xe2,0xe2,
// :/qml/StationPage.qml
0x0,0x0,0x0,0x64,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x4,0x7e,
0x0,0x0,0x1,0x5e,0x4a,0xed,0xe2,0xe2,
};
#ifdef QT_NAMESPACE
# define QT_RCC_PREPEND_NAMESPACE(name) ::QT_NAMESPACE::name
# define QT_RCC_MANGLE_NAMESPACE0(x) x
# define QT_RCC_MANGLE_NAMESPACE1(a, b) a##_##b
# define QT_RCC_MANGLE_NAMESPACE2(a, b) QT_RCC_MANGLE_NAMESPACE1(a,b)
# define QT_RCC_MANGLE_NAMESPACE(name) QT_RCC_MANGLE_NAMESPACE2( \
QT_RCC_MANGLE_NAMESPACE0(name), QT_RCC_MANGLE_NAMESPACE0(QT_NAMESPACE))
#else
# define QT_RCC_PREPEND_NAMESPACE(name) name
# define QT_RCC_MANGLE_NAMESPACE(name) name
#endif
#ifdef QT_NAMESPACE
namespace QT_NAMESPACE {
#endif
bool qRegisterResourceData(int, const unsigned char *, const unsigned char *, const unsigned char *);
bool qUnregisterResourceData(int, const unsigned char *, const unsigned char *, const unsigned char *);
#ifdef QT_NAMESPACE
}
#endif
int QT_RCC_MANGLE_NAMESPACE(qInitResources_qml)();
int QT_RCC_MANGLE_NAMESPACE(qInitResources_qml)()
{
QT_RCC_PREPEND_NAMESPACE(qRegisterResourceData)
(0x2, qt_resource_struct, qt_resource_name, qt_resource_data);
return 1;
}
int QT_RCC_MANGLE_NAMESPACE(qCleanupResources_qml)();
int QT_RCC_MANGLE_NAMESPACE(qCleanupResources_qml)()
{
QT_RCC_PREPEND_NAMESPACE(qUnregisterResourceData)
(0x2, qt_resource_struct, qt_resource_name, qt_resource_data);
return 1;
}
namespace {
struct initializer {
initializer() { QT_RCC_MANGLE_NAMESPACE(qInitResources_qml)(); }
~initializer() { QT_RCC_MANGLE_NAMESPACE(qCleanupResources_qml)(); }
} dummy;
}
| [
"tam.duong@ascenx.com"
] | tam.duong@ascenx.com |
c8955d10e8f20bca49da3d84944f79b5cded5775 | 9c079c10fb9f90ff15181b3bdd50ea0435fbc0cd | /Codeforces/784A.cpp | feb92416e03aee06071a615cd1ca92a0ff62238c | [] | no_license | shihab122/Competitive-Programming | 73d5bd89a97f28c8358796367277c9234caaa9a4 | 37b94d267fa03edf02110fd930fb9d80fbbe6552 | refs/heads/master | 2023-04-02T20:57:50.685625 | 2023-03-25T09:47:13 | 2023-03-25T09:47:13 | 148,019,792 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 508 | cpp | #include<bits/stdc++.h>
using namespace std;
int main(){
int a,b,c,d;
cin>>a>>b>>c>>d;
int k,e,f,g,h,i;
if(c==d)
e=0;
else
e=1;
if(a==1||b==1)
k=1;
else
k=0;
if(b==0||c==0)
f=0;
else
f=1;
if(a==1||d==1)
g=1;
else
g=0;
if(k==0||e==0)
h=0;
else
h=1;
if(f==g)
i=0;
else
i=1;
if(h==1||i==1)
cout<<0<<endl;
else
cout<<1<<endl;
}
| [
"shihabhossain611@gmail.com"
] | shihabhossain611@gmail.com |
8f7b2c6331421bdbf6ea52457c3e1bba4aa79961 | f2260ce9c279d1bbb4e97aabe399fe55db68bf74 | /BOJ/10000~14999/11000/11726.cpp | b974cfdecd0de5982fc3f4ccddee0aa9b4eb56fa | [] | no_license | BaeJi77/algorithm | d7eee26aa04b9550bcd63af22265da5cfc0093f4 | 5694313dbb2f83b3a09715788ff6cefc0a0866c7 | refs/heads/master | 2022-08-22T21:37:31.992065 | 2022-08-10T13:38:10 | 2022-08-10T13:38:15 | 121,232,746 | 1 | 0 | null | 2019-03-07T02:19:41 | 2018-02-12T10:29:15 | C++ | UTF-8 | C++ | false | false | 674 | cpp | #include <cstdio>
#include <algorithm>
#include <cmath>
#include <cstring>
using namespace std;
const int mod = 10007;
int N;
int dp[1010]; // 이전 상태가 있어야 함. ㅁ
int solve(int num) {
if(num < 0)
return 0;
// 기저 사례
if(num == 0)
return 1;
int& ret = dp[num];
if(ret != -1)
return ret;
ret = 0;
// 재귀 호출
ret += (solve(num - 2) + solve(num - 1)) % mod;
// 값 반환
ret %= mod;
return ret;
}
int main() {
freopen("/Users/baejihoon/Desktop/algorithm/input.txt","r",stdin);
scanf("%d", &N);
memset(dp, -1, sizeof(dp));
printf("%d", solve(N) % mod);
} | [
"hahawjstk@gmail.com"
] | hahawjstk@gmail.com |
71614c90e1f6f1ed1f5e6f48bbe34d37df1dafbb | 1a31bcd8fc5d108986758aa237faa4a8df5b4efc | /src/StrategyFramework/AP_Mgr.h | d5b6f6b2310bf102fbed940f23bce529b1a16fb1 | [] | no_license | whiskey0201/AutoTrader-2 | b65746c64b7bbb569d8a0d71b6089bf2ca0bc6b9 | b0988a53f9831235440f7b5878cac947478476a3 | refs/heads/master | 2021-01-17T23:35:22.131406 | 2016-11-08T14:32:33 | 2016-11-08T14:32:33 | null | 0 | 0 | null | null | null | null | GB18030 | C++ | false | false | 5,158 | h | #ifndef ACCOUNT_POSITION_H
#define ACCOUNT_POSITION_H
#include "stdafx.h"
#include "ThostFtdcUserApiStruct.h"
#include <mutex>
#include <vector>
#include <map>
#include <boost/format.hpp>
class Order;
namespace AP{ // Account & Position
struct STRATEGY_API TradeMessage
{
TradeMessage()
{
InstId = "";
LastPrice = 0.0;
PreSettlementPrice = 0.0;
Holding_long = 0;
Holding_short = 0;
TodayPosition_long = 0;
YdPosition_long = 0;
TodayPosition_short = 0;
YdPosition_short = 0;
closeProfit_long = 0.0;
OpenProfit_long = 0.0;
closeProfit_short = 0.0;
OpenProfit_short = 0.0;
}
std::string ToString(){
std::string ret = str(boost::format("%s Long:%d Short:%d") % InstId % Holding_long % Holding_short);
return ret;
}
std::string InstId;//合约代码
double LastPrice;//最新价,时刻保存合约的最新价,平仓用
double PreSettlementPrice;//上次结算价,对隔夜仓有时候要用,快期有用
int Holding_long;//多单持仓量
int Holding_short;//空单持仓量
int TodayPosition_long;//多单今日持仓
int YdPosition_long;//多单上日持仓
int TodayPosition_short;//空单今日持仓
int YdPosition_short;//空单上日持仓
double closeProfit_long;//多单平仓盈亏
double OpenProfit_long;//多单浮动盈亏
double closeProfit_short;//空单平仓盈亏
double OpenProfit_short;//空单浮动盈亏
};
enum Direction{
None = 'N',
Long = '0',
Short = '1',
};
//class PrintUtils{
//public:
// static std::string ConvertOrderListToString(const std::vector< CThostFtdcOrderField >& list);
// static std::string ConvertTradeListToString(const std::vector< CThostFtdcTradeField >& list);
//};
class STRATEGY_API AccountDetailMgr
{
public:
AccountDetailMgr();
virtual ~AccountDetailMgr();
virtual void setAccountStatus(const CThostFtdcTradingAccountField& info);
void pushTodayNewTrade(const CThostFtdcTradeField& tradeField);//Push the happening trade
void pushTodayOrder(const CThostFtdcOrderField& orderField);
bool pushImmediateOrder(const CThostFtdcOrderField& orderField);
const std::vector< CThostFtdcOrderField >& getAllOrders() const { return m_orderlist; }
std::string todayOrderToString() const;
size_t todayOrderCount() const { return m_orderlist.size(); }
void pushTodayTrade(const CThostFtdcTradeField& tradeField);//Push the existed trade
size_t todayTradeCount() const { return m_tradelist.size(); }
std::string todayTradeToString() const;
void pushYesterdayUnClosedTrade(const CThostFtdcTradeField& tradeField, Direction direction);
std::string yesterdayUnClosedTradeToString(Direction direction);
size_t yesterdayUnClosedTradeCount(Direction direction){ return direction == AP::Long ? m_tradeList_nonClosed_account_long.size() : m_tradeList_notClosed_account_short.size(); };
void pushTradeMessage(const CThostFtdcInvestorPositionField& originalTradeStruct);
double getCloseProfit();//平仓盈亏,所有合约一起算后的值,另外在m_trade_message_map有单独计算每个合约的平仓盈亏值
double getOpenProfit();//浮动盈亏,所有合约一起算后的值,另外在m_trade_message_map有单独计算每个合约的浮动盈亏值
void pushInstrumentStruct(const CThostFtdcInstrumentField& instru);
CThostFtdcInstrumentField getInstrumentField(const std::string& instrId) const;
std::string getInstrumentList() const;
std::string getPositionOfInstruments() const;
double getPosition(double& pos, Direction& direction, double& available) const;
//return total volume, set TodayPosition & YdPosition by reference
int getPositionVolume(const std::string& instruID, Direction& todayDirection, int& todayPos, Direction& ydDirection, int& ydPos) const;
const std::map<std::string, AP::TradeMessage>& getAllPositionMap() const { return m_tradeMessage_dict; }
int UnClosedVolumeOfLong(const std::string& instrument);
int UnClosedVolumeOfShort(const std::string& instrument);
private:
AccountDetailMgr(const AccountDetailMgr& mgr) = delete;
AccountDetailMgr& operator = (const AccountDetailMgr& mgr) = delete;
private:
mutable std::mutex m_mutex; //sync GetPosition() between pushTodayOrder() & pushTodayTrade
//TThostFtdcInstrumentIDType m_instrument;
CThostFtdcTradingAccountField m_accountInfo;
CThostFtdcInvestorPositionField m_positionInfo;
std::vector< CThostFtdcOrderField > m_orderlist; //委托记录,全部合约
std::vector< CThostFtdcTradeField > m_tradelist; //成交记录,全部合约
std::vector< CThostFtdcTradeField > m_tradeList_nonClosed_account_long;//未平仓的多单成交记录,整个账户,全部合约
std::vector< CThostFtdcTradeField > m_tradeList_notClosed_account_short;//未平仓的空单成交记录,整个账户,全部合约
volatile bool m_isReady;
std::map<std::string, TradeMessage> m_tradeMessage_dict;
std::map<std::string, CThostFtdcInstrumentField> m_instrument_dict;
std::vector< CThostFtdcTradeField > m_newTrades; //委托记录,全部合约
};
}
//typedef AP::AccountDetailMgr AccountDetailMgr;
#endif | [
"tj_liyuan@163.com"
] | tj_liyuan@163.com |
4ee1e2b305cf09ce369ce7f85c7ebbcced0e14ef | 1591ce85de4ce2ea698c00f2a1f6f14ba69a6040 | /CGproject/HelloTriangle/model.h | e2ceb923137011803a6bc2145e6f96c39cdf219f | [] | no_license | hanxu1997/CG | 438d0d2b7de5eed8815fcec2f3c1ac86ff83b8ca | 84dba6f4929bd86f701d60f54a5fb17e10d0a03c | refs/heads/master | 2021-09-22T02:44:24.832200 | 2018-05-23T08:42:08 | 2018-05-23T08:42:08 | 125,519,814 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 8,504 | h | #ifndef MODEL_H
#define MODEL_H
#include <glad/glad.h>
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <stb_image.h>
#include <assimp/Importer.hpp>
#include <assimp/scene.h>
#include <assimp/postprocess.h>
#include "mesh.h"
#include "shader.h"
#include <string>
#include <fstream>
#include <sstream>
#include <iostream>
#include <map>
#include <vector>
using namespace std;
unsigned int TextureFromFile(const char *path, const string &directory, bool gamma = false);
class Model
{
public:
/* Model Data */
vector<Texture> textures_loaded; // stores all the textures loaded so far, optimization to make sure textures aren't loaded more than once.
vector<Mesh> meshes;
string directory;
bool gammaCorrection;
/* Functions */
// constructor, expects a filepath to a 3D model.
Model(string const &path, bool gamma = false) : gammaCorrection(gamma)
{
loadModel(path);
}
// draws the model, and thus all its meshes
void Draw(int shader)
{
for (unsigned int i = 0; i < meshes.size(); i++)
meshes[i].Draw(shader);
}
private:
/* Functions */
// loads a model with supported ASSIMP extensions from file and stores the resulting meshes in the meshes vector.
void loadModel(string const &path)
{
// read file via ASSIMP
Assimp::Importer importer;
const aiScene* scene = importer.ReadFile(path, aiProcess_Triangulate | aiProcess_FlipUVs | aiProcess_CalcTangentSpace);
// check for errors
if (!scene || scene->mFlags & AI_SCENE_FLAGS_INCOMPLETE || !scene->mRootNode) // if is Not Zero
{
cout << "ERROR::ASSIMP:: " << importer.GetErrorString() << endl;
return;
}
// retrieve the directory path of the filepath
directory = path.substr(0, path.find_last_of('/'));
// process ASSIMP's root node recursively
processNode(scene->mRootNode, scene);
}
// processes a node in a recursive fashion. Processes each individual mesh located at the node and repeats this process on its children nodes (if any).
void processNode(aiNode *node, const aiScene *scene)
{
// process each mesh located at the current node
for (unsigned int i = 0; i < node->mNumMeshes; i++)
{
// the node object only contains indices to index the actual objects in the scene.
// the scene contains all the data, node is just to keep stuff organized (like relations between nodes).
aiMesh* mesh = scene->mMeshes[node->mMeshes[i]];
meshes.push_back(processMesh(mesh, scene));
}
// after we've processed all of the meshes (if any) we then recursively process each of the children nodes
for (unsigned int i = 0; i < node->mNumChildren; i++)
{
processNode(node->mChildren[i], scene);
}
}
Mesh processMesh(aiMesh *mesh, const aiScene *scene)
{
// data to fill
vector<Vertex> vertices;
vector<unsigned int> indices;
vector<Texture> textures;
// Walk through each of the mesh's vertices
for (unsigned int i = 0; i < mesh->mNumVertices; i++)
{
Vertex vertex;
glm::vec3 vector; // we declare a placeholder vector since assimp uses its own vector class that doesn't directly convert to glm's vec3 class so we transfer the data to this placeholder glm::vec3 first.
// positions
vector.x = mesh->mVertices[i].x;
vector.y = mesh->mVertices[i].y;
vector.z = mesh->mVertices[i].z;
vertex.Position = vector;
// normals
vector.x = mesh->mNormals[i].x;
vector.y = mesh->mNormals[i].y;
vector.z = mesh->mNormals[i].z;
vertex.Normal = vector;
// texture coordinates
if (mesh->mTextureCoords[0]) // does the mesh contain texture coordinates?
{
glm::vec2 vec;
// a vertex can contain up to 8 different texture coordinates. We thus make the assumption that we won't
// use models where a vertex can have multiple texture coordinates so we always take the first set (0).
vec.x = mesh->mTextureCoords[0][i].x;
vec.y = mesh->mTextureCoords[0][i].y;
vertex.TexCoords = vec;
}
else
vertex.TexCoords = glm::vec2(0.0f, 0.0f);
// tangent
vector.x = mesh->mTangents[i].x;
vector.y = mesh->mTangents[i].y;
vector.z = mesh->mTangents[i].z;
vertex.Tangent = vector;
// bitangent
vector.x = mesh->mBitangents[i].x;
vector.y = mesh->mBitangents[i].y;
vector.z = mesh->mBitangents[i].z;
vertex.Bitangent = vector;
vertices.push_back(vertex);
}
// now wak through each of the mesh's faces (a face is a mesh its triangle) and retrieve the corresponding vertex indices.
for (unsigned int i = 0; i < mesh->mNumFaces; i++)
{
aiFace face = mesh->mFaces[i];
// retrieve all indices of the face and store them in the indices vector
for (unsigned int j = 0; j < face.mNumIndices; j++)
indices.push_back(face.mIndices[j]);
}
// process materials
aiMaterial* material = scene->mMaterials[mesh->mMaterialIndex];
// we assume a convention for sampler names in the shaders. Each diffuse texture should be named
// as 'texture_diffuseN' where N is a sequential number ranging from 1 to MAX_SAMPLER_NUMBER.
// Same applies to other texture as the following list summarizes:
// diffuse: texture_diffuseN
// specular: texture_specularN
// normal: texture_normalN
// 1. diffuse maps
vector<Texture> diffuseMaps = loadMaterialTextures(material, aiTextureType_DIFFUSE, "texture_diffuse");
textures.insert(textures.end(), diffuseMaps.begin(), diffuseMaps.end());
// 2. specular maps
vector<Texture> specularMaps = loadMaterialTextures(material, aiTextureType_SPECULAR, "texture_specular");
textures.insert(textures.end(), specularMaps.begin(), specularMaps.end());
// 3. normal maps
std::vector<Texture> normalMaps = loadMaterialTextures(material, aiTextureType_HEIGHT, "texture_normal");
textures.insert(textures.end(), normalMaps.begin(), normalMaps.end());
// 4. height maps
std::vector<Texture> heightMaps = loadMaterialTextures(material, aiTextureType_AMBIENT, "texture_height");
textures.insert(textures.end(), heightMaps.begin(), heightMaps.end());
// return a mesh object created from the extracted mesh data
return Mesh(vertices, indices, textures);
}
// checks all material textures of a given type and loads the textures if they're not loaded yet.
// the required info is returned as a Texture struct.
vector<Texture> loadMaterialTextures(aiMaterial *mat, aiTextureType type, string typeName)
{
vector<Texture> textures;
for (unsigned int i = 0; i < mat->GetTextureCount(type); i++)
{
aiString str;
mat->GetTexture(type, i, &str);
// check if texture was loaded before and if so, continue to next iteration: skip loading a new texture
bool skip = false;
for (unsigned int j = 0; j < textures_loaded.size(); j++)
{
if (std::strcmp(textures_loaded[j].path.data(), str.C_Str()) == 0)
{
textures.push_back(textures_loaded[j]);
skip = true; // a texture with the same filepath has already been loaded, continue to next one. (optimization)
break;
}
}
if (!skip)
{ // if texture hasn't been loaded already, load it
Texture texture;
texture.id = TextureFromFile(str.C_Str(), this->directory);
texture.type = typeName;
texture.path = str.C_Str();
textures.push_back(texture);
textures_loaded.push_back(texture); // store it as texture loaded for entire model, to ensure we won't unnecesery load duplicate textures.
}
}
return textures;
}
};
unsigned int TextureFromFile(const char *path, const string &directory, bool gamma)
{
string filename = string(path);
filename = directory + '/' + filename;
unsigned int textureID;
glGenTextures(1, &textureID);
int width, height, nrComponents;
unsigned char *data = stbi_load(filename.c_str(), &width, &height, &nrComponents, 0);
if (data)
{
GLenum format;
if (nrComponents == 1)
format = GL_RED;
else if (nrComponents == 3)
format = GL_RGB;
else if (nrComponents == 4)
format = GL_RGBA;
glBindTexture(GL_TEXTURE_2D, textureID);
glTexImage2D(GL_TEXTURE_2D, 0, format, width, height, 0, format, GL_UNSIGNED_BYTE, data);
glGenerateMipmap(GL_TEXTURE_2D);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
stbi_image_free(data);
}
else
{
std::cout << "Texture failed to load at path: " << path << std::endl;
stbi_image_free(data);
}
return textureID;
}
#endif
| [
"807174205@qq.com"
] | 807174205@qq.com |
8486c530c3ebf4d4dd4ec66d62cdac904126afce | b28305dab0be0e03765c62b97bcd7f49a4f8073d | /chrome/browser/conflicts/module_database_win.cc | 145f96907af6933fe71d493b4bcd379a39c95638 | [
"BSD-3-Clause"
] | permissive | svarvel/browser-android-tabs | 9e5e27e0a6e302a12fe784ca06123e5ce090ced5 | bd198b4c7a1aca2f3e91f33005d881f42a8d0c3f | refs/heads/base-72.0.3626.105 | 2020-04-24T12:16:31.442851 | 2019-08-02T19:15:36 | 2019-08-02T19:15:36 | 171,950,555 | 1 | 2 | NOASSERTION | 2019-08-02T19:15:37 | 2019-02-21T21:47:44 | null | UTF-8 | C++ | false | false | 14,772 | cc | // Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/conflicts/module_database_win.h"
#include <tuple>
#include <utility>
#include "base/bind.h"
#include "base/files/file_path.h"
#include "base/location.h"
#include "chrome/browser/conflicts/module_database_observer_win.h"
#include "content/public/browser/browser_task_traits.h"
#if defined(GOOGLE_CHROME_BUILD)
#include "base/feature_list.h"
#include "base/task/post_task.h"
#include "base/win/win_util.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/conflicts/incompatible_applications_updater_win.h"
#include "chrome/browser/conflicts/module_load_attempt_log_listener_win.h"
#include "chrome/browser/conflicts/third_party_conflicts_manager_win.h"
#include "chrome/common/chrome_features.h"
#include "chrome/common/pref_names.h"
#include "chrome_elf/third_party_dlls/public_api.h"
#include "components/prefs/pref_change_registrar.h"
#include "components/prefs/pref_registry_simple.h"
#include "components/prefs/pref_service.h"
#endif
namespace {
// Document the assumptions made on the ProcessType enum in order to convert
// them to bits.
static_assert(content::PROCESS_TYPE_UNKNOWN == 1,
"assumes unknown process type has value 1");
static_assert(content::PROCESS_TYPE_BROWSER == 2,
"assumes browser process type has value 2");
constexpr uint32_t kFirstValidProcessType = content::PROCESS_TYPE_BROWSER;
ModuleDatabase* g_module_database_win_instance = nullptr;
#if defined(GOOGLE_CHROME_BUILD)
// Returns true if either the IncompatibleApplicationsWarning or
// ThirdPartyModulesBlocking features are enabled via the "enable-features"
// command-line switch.
bool AreThirdPartyFeaturesEnabledViaCommandLine() {
base::FeatureList* feature_list_instance = base::FeatureList::GetInstance();
return feature_list_instance->IsFeatureOverriddenFromCommandLine(
features::kIncompatibleApplicationsWarning.name,
base::FeatureList::OVERRIDE_ENABLE_FEATURE) ||
feature_list_instance->IsFeatureOverriddenFromCommandLine(
features::kThirdPartyModulesBlocking.name,
base::FeatureList::OVERRIDE_ENABLE_FEATURE);
}
#endif // defined(GOOGLE_CHROME_BUILD)
} // namespace
// static
constexpr base::TimeDelta ModuleDatabase::kIdleTimeout;
ModuleDatabase::ModuleDatabase(
scoped_refptr<base::SequencedTaskRunner> task_runner)
: task_runner_(task_runner),
idle_timer_(
FROM_HERE,
kIdleTimeout,
base::Bind(&ModuleDatabase::OnDelayExpired, base::Unretained(this))),
has_started_processing_(false),
shell_extensions_enumerated_(false),
ime_enumerated_(false),
// ModuleDatabase owns |module_inspector_|, so it is safe to use
// base::Unretained().
module_inspector_(base::Bind(&ModuleDatabase::OnModuleInspected,
base::Unretained(this))) {
AddObserver(&third_party_metrics_);
#if defined(GOOGLE_CHROME_BUILD)
MaybeInitializeThirdPartyConflictsManager();
#endif
}
ModuleDatabase::~ModuleDatabase() {
if (this == g_module_database_win_instance)
g_module_database_win_instance = nullptr;
}
// static
ModuleDatabase* ModuleDatabase::GetInstance() {
return g_module_database_win_instance;
}
// static
void ModuleDatabase::SetInstance(
std::unique_ptr<ModuleDatabase> module_database) {
DCHECK_EQ(nullptr, g_module_database_win_instance);
// This is deliberately leaked. It can be cleaned up by manually deleting the
// ModuleDatabase.
g_module_database_win_instance = module_database.release();
}
void ModuleDatabase::StartDrainingModuleLoadAttemptsLog() {
#if defined(GOOGLE_CHROME_BUILD)
// ModuleDatabase owns |module_load_attempt_log_listener_|, so it is safe to
// use base::Unretained().
module_load_attempt_log_listener_ =
std::make_unique<ModuleLoadAttemptLogListener>(base::BindRepeating(
&ModuleDatabase::OnModuleBlocked, base::Unretained(this)));
#endif // defined(GOOGLE_CHROME_BUILD)
}
bool ModuleDatabase::IsIdle() {
return has_started_processing_ && RegisteredModulesEnumerated() &&
!idle_timer_.IsRunning() && module_inspector_.IsIdle();
}
void ModuleDatabase::OnShellExtensionEnumerated(const base::FilePath& path,
uint32_t size_of_image,
uint32_t time_date_stamp) {
DCHECK(task_runner_->RunsTasksInCurrentSequence());
idle_timer_.Reset();
ModuleInfo* module_info = nullptr;
FindOrCreateModuleInfo(path, size_of_image, time_date_stamp, &module_info);
module_info->second.module_properties |=
ModuleInfoData::kPropertyShellExtension;
}
void ModuleDatabase::OnShellExtensionEnumerationFinished() {
DCHECK(task_runner_->RunsTasksInCurrentSequence());
DCHECK(!shell_extensions_enumerated_);
shell_extensions_enumerated_ = true;
if (RegisteredModulesEnumerated())
OnRegisteredModulesEnumerated();
}
void ModuleDatabase::OnImeEnumerated(const base::FilePath& path,
uint32_t size_of_image,
uint32_t time_date_stamp) {
DCHECK(task_runner_->RunsTasksInCurrentSequence());
idle_timer_.Reset();
ModuleInfo* module_info = nullptr;
FindOrCreateModuleInfo(path, size_of_image, time_date_stamp, &module_info);
module_info->second.module_properties |= ModuleInfoData::kPropertyIme;
}
void ModuleDatabase::OnImeEnumerationFinished() {
DCHECK(task_runner_->RunsTasksInCurrentSequence());
DCHECK(!ime_enumerated_);
ime_enumerated_ = true;
if (RegisteredModulesEnumerated())
OnRegisteredModulesEnumerated();
}
void ModuleDatabase::OnModuleLoad(content::ProcessType process_type,
const base::FilePath& module_path,
uint32_t module_size,
uint32_t module_time_date_stamp) {
// Messages can arrive from any thread (UI thread for calls over IPC, and
// anywhere at all for calls from ModuleWatcher), so bounce if necessary.
// It is safe to use base::Unretained() because this class is a singleton that
// is never freed.
if (!task_runner_->RunsTasksInCurrentSequence()) {
task_runner_->PostTask(
FROM_HERE, base::Bind(&ModuleDatabase::OnModuleLoad,
base::Unretained(this), process_type, module_path,
module_size, module_time_date_stamp));
return;
}
ModuleInfo* module_info = nullptr;
bool new_module = FindOrCreateModuleInfo(
module_path, module_size, module_time_date_stamp, &module_info);
uint32_t old_module_properties = module_info->second.module_properties;
// Mark the module as loaded.
module_info->second.module_properties |=
ModuleInfoData::kPropertyLoadedModule;
// Update the list of process types that this module has been seen in.
module_info->second.process_types |= ProcessTypeToBit(process_type);
// Some observers care about a known module that is just now loading. Also
// making sure that the module is ready to be sent to observers.
bool is_known_module_loading =
!new_module &&
old_module_properties != module_info->second.module_properties;
bool ready_for_notification =
module_info->second.inspection_result && RegisteredModulesEnumerated();
if (is_known_module_loading && ready_for_notification) {
for (auto& observer : observer_list_) {
observer.OnKnownModuleLoaded(module_info->first, module_info->second);
}
}
}
void ModuleDatabase::OnModuleBlocked(const base::FilePath& module_path,
uint32_t module_size,
uint32_t module_time_date_stamp) {
ModuleInfo* module_info = nullptr;
FindOrCreateModuleInfo(module_path, module_size, module_time_date_stamp,
&module_info);
module_info->second.module_properties |= ModuleInfoData::kPropertyBlocked;
}
void ModuleDatabase::OnModuleAddedToBlacklist(const base::FilePath& module_path,
uint32_t module_size,
uint32_t module_time_date_stamp) {
auto iter = modules_.find(
ModuleInfoKey(module_path, module_size, module_time_date_stamp, 0));
// Only known modules should be added to the blacklist.
DCHECK(iter != modules_.end());
iter->second.module_properties |= ModuleInfoData::kPropertyAddedToBlacklist;
}
void ModuleDatabase::AddObserver(ModuleDatabaseObserver* observer) {
observer_list_.AddObserver(observer);
// If the registered modules enumeration is not finished yet, the |observer|
// will be notified later in OnRegisteredModulesEnumerated().
if (!RegisteredModulesEnumerated())
return;
NotifyLoadedModules(observer);
if (IsIdle())
observer->OnModuleDatabaseIdle();
}
void ModuleDatabase::RemoveObserver(ModuleDatabaseObserver* observer) {
observer_list_.RemoveObserver(observer);
}
void ModuleDatabase::IncreaseInspectionPriority() {
module_inspector_.IncreaseInspectionPriority();
}
#if defined(GOOGLE_CHROME_BUILD)
// static
void ModuleDatabase::RegisterLocalStatePrefs(PrefRegistrySimple* registry) {
// Register the pref used to disable the Incompatible Applications warning and
// the blocking of third-party modules using group policy. Enabled by default.
registry->RegisterBooleanPref(prefs::kThirdPartyBlockingEnabled, true);
}
// static
bool ModuleDatabase::IsThirdPartyBlockingPolicyEnabled() {
const PrefService::Preference* third_party_blocking_enabled_pref =
g_browser_process->local_state()->FindPreference(
prefs::kThirdPartyBlockingEnabled);
return !third_party_blocking_enabled_pref->IsManaged() ||
third_party_blocking_enabled_pref->GetValue()->GetBool();
}
// static
void ModuleDatabase::DisableThirdPartyBlocking() {
// Immediately disable the hook. DisableHook() can be called concurrently.
DisableHook();
// Notify the ThirdPartyMetricsRecorder instance that the hook is disabled.
// Since this is meant for a heartbeat metric, the small latency introduced
// with the thread-hopping is perfectly acceptable.
base::PostTaskWithTraits(
FROM_HERE, {content::BrowserThread::UI}, base::BindOnce([]() {
ModuleDatabase::GetInstance()->third_party_metrics_.SetHookDisabled();
}));
}
#endif // defined(GOOGLE_CHROME_BUILD)
// static
uint32_t ModuleDatabase::ProcessTypeToBit(content::ProcessType process_type) {
uint32_t bit_index =
static_cast<uint32_t>(process_type) - kFirstValidProcessType;
DCHECK_GE(31u, bit_index);
uint32_t bit = (1 << bit_index);
return bit;
}
// static
content::ProcessType ModuleDatabase::BitIndexToProcessType(uint32_t bit_index) {
DCHECK_GE(31u, bit_index);
return static_cast<content::ProcessType>(bit_index + kFirstValidProcessType);
}
bool ModuleDatabase::FindOrCreateModuleInfo(
const base::FilePath& module_path,
uint32_t module_size,
uint32_t module_time_date_stamp,
ModuleDatabase::ModuleInfo** module_info) {
auto result = modules_.emplace(
std::piecewise_construct,
std::forward_as_tuple(module_path, module_size, module_time_date_stamp,
modules_.size()),
std::forward_as_tuple());
// New modules must be inspected.
bool new_module = result.second;
if (new_module) {
has_started_processing_ = true;
idle_timer_.Reset();
module_inspector_.AddModule(result.first->first);
}
*module_info = &(*result.first);
return new_module;
}
bool ModuleDatabase::RegisteredModulesEnumerated() {
return shell_extensions_enumerated_ && ime_enumerated_;
}
void ModuleDatabase::OnRegisteredModulesEnumerated() {
for (auto& observer : observer_list_)
NotifyLoadedModules(&observer);
if (IsIdle())
EnterIdleState();
}
void ModuleDatabase::OnModuleInspected(
const ModuleInfoKey& module_key,
std::unique_ptr<ModuleInspectionResult> inspection_result) {
DCHECK(task_runner_->RunsTasksInCurrentSequence());
auto it = modules_.find(module_key);
if (it == modules_.end())
return;
it->second.inspection_result = std::move(inspection_result);
if (RegisteredModulesEnumerated())
for (auto& observer : observer_list_)
observer.OnNewModuleFound(it->first, it->second);
// Notify the observers if this was the last outstanding module inspection and
// the delay has already expired.
if (IsIdle())
EnterIdleState();
}
void ModuleDatabase::OnDelayExpired() {
// Notify the observers if there are no outstanding module inspections.
if (IsIdle())
EnterIdleState();
}
void ModuleDatabase::EnterIdleState() {
for (auto& observer : observer_list_)
observer.OnModuleDatabaseIdle();
}
void ModuleDatabase::NotifyLoadedModules(ModuleDatabaseObserver* observer) {
for (const auto& module : modules_) {
if (module.second.inspection_result)
observer->OnNewModuleFound(module.first, module.second);
}
}
#if defined(GOOGLE_CHROME_BUILD)
void ModuleDatabase::MaybeInitializeThirdPartyConflictsManager() {
// Temporarily disable this class on domain-joined machines because enterprise
// clients depend on IAttachmentExecute::Save() to be invoked for downloaded
// files, but that API call has a known issue (https://crbug.com/870998) with
// third-party modules blocking. Can be Overridden by enabling the feature via
// the command-line.
// TODO(pmonette): Move IAttachmentExecute::Save() to a utility process and
// remove this.
if (base::win::IsEnterpriseManaged() &&
!AreThirdPartyFeaturesEnabledViaCommandLine()) {
return;
}
if (!IsThirdPartyBlockingPolicyEnabled())
return;
if (IncompatibleApplicationsUpdater::IsWarningEnabled() ||
base::FeatureList::IsEnabled(features::kThirdPartyModulesBlocking)) {
third_party_conflicts_manager_ =
std::make_unique<ThirdPartyConflictsManager>(this);
pref_change_registrar_ = std::make_unique<PrefChangeRegistrar>();
pref_change_registrar_->Init(g_browser_process->local_state());
pref_change_registrar_->Add(
prefs::kThirdPartyBlockingEnabled,
base::Bind(&ModuleDatabase::OnThirdPartyBlockingPolicyChanged,
base::Unretained(this)));
}
}
void ModuleDatabase::OnThirdPartyBlockingPolicyChanged() {
if (!IsThirdPartyBlockingPolicyEnabled()) {
DCHECK(third_party_conflicts_manager_);
ThirdPartyConflictsManager::ShutdownAndDestroy(
std::move(third_party_conflicts_manager_));
pref_change_registrar_ = nullptr;
}
}
#endif
| [
"artem@brave.com"
] | artem@brave.com |
b1c6dd28c458765dfbc0ced739a7b46ea2063212 | bfb18d1680468be8de0151a87c6fa73d9419a65b | /通讯录排序.cpp | 3abd5f96d23a65ccb0c48fb01459aeae41f12b96 | [] | no_license | TWRenHao/language-C | 56685afde1baccb2c93e3f5c8623af2615357142 | b63d5ce90be0ee05a60d687d8d1f1d8a9e0c538d | refs/heads/master | 2020-09-24T23:54:25.390262 | 2019-12-23T12:49:21 | 2019-12-23T12:49:21 | 225,873,433 | 0 | 0 | null | null | null | null | GB18030 | C++ | false | false | 774 | cpp | /*输入n个朋友的信息,包括姓名、生日、电话号码,
按照年龄从大到小的顺序依次输出通讯录*/
#include<stdio.h>
#include<string.h>
struct contact
{
char name[11];
int birth;
char phone[18];
};
int main()
{
struct contact person[10] = { '\0' };
int i, j, N;
struct contact temp;
scanf("%d\n", &N);
for (i = 0; i<N; i++)
{
scanf("%s%d%s", person[i].name, &person[i].birth, person[i].phone);
}
for (i = 0; i < N - 1; i++)
{
for (j = 0; j < N - i - 1; j++)
{
if (person[j].birth > person[j + 1].birth)
{
temp = person[j];
person[j] = person[j + 1];
person[j + 1] = temp;
}
}
}
for (i = 0; i < N; i++)
{
printf("%s %d %s\n", person[i].name, person[i].birth, person[i].phone);
}
return 0;
}
| [
"1173897181@qq.com"
] | 1173897181@qq.com |
5139f73b97d4bd627c523a67d249c14f695a04ec | 38c10c01007624cd2056884f25e0d6ab85442194 | /cc/animation/transform_operations.cc | 29a3d90626b5139245c75e6e5b5408e744bdf97f | [
"BSD-3-Clause"
] | permissive | zenoalbisser/chromium | 6ecf37b6c030c84f1b26282bc4ef95769c62a9b2 | e71f21b9b4b9b839f5093301974a45545dad2691 | refs/heads/master | 2022-12-25T14:23:18.568575 | 2016-07-14T21:49:52 | 2016-07-23T08:02:51 | 63,980,627 | 0 | 2 | BSD-3-Clause | 2022-12-12T12:43:41 | 2016-07-22T20:14:04 | null | UTF-8 | C++ | false | false | 10,614 | cc | // Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "cc/animation/transform_operations.h"
#include <algorithm>
#include "ui/gfx/animation/tween.h"
#include "ui/gfx/geometry/box_f.h"
#include "ui/gfx/geometry/vector3d_f.h"
#include "ui/gfx/transform_util.h"
namespace cc {
TransformOperations::TransformOperations()
: decomposed_transform_dirty_(true) {
}
TransformOperations::TransformOperations(const TransformOperations& other) {
operations_ = other.operations_;
decomposed_transform_dirty_ = other.decomposed_transform_dirty_;
if (!decomposed_transform_dirty_) {
decomposed_transform_.reset(
new gfx::DecomposedTransform(*other.decomposed_transform_.get()));
}
}
TransformOperations::~TransformOperations() {
}
gfx::Transform TransformOperations::Apply() const {
gfx::Transform to_return;
for (size_t i = 0; i < operations_.size(); ++i)
to_return.PreconcatTransform(operations_[i].matrix);
return to_return;
}
gfx::Transform TransformOperations::Blend(const TransformOperations& from,
SkMScalar progress) const {
gfx::Transform to_return;
BlendInternal(from, progress, &to_return);
return to_return;
}
bool TransformOperations::BlendedBoundsForBox(const gfx::BoxF& box,
const TransformOperations& from,
SkMScalar min_progress,
SkMScalar max_progress,
gfx::BoxF* bounds) const {
*bounds = box;
bool from_identity = from.IsIdentity();
bool to_identity = IsIdentity();
if (from_identity && to_identity)
return true;
if (!MatchesTypes(from))
return false;
size_t num_operations = std::max(from_identity ? 0 : from.operations_.size(),
to_identity ? 0 : operations_.size());
// Because we are squashing all of the matrices together when applying
// them to the animation, we must apply them in reverse order when
// not squashing them.
for (size_t i = 0; i < num_operations; ++i) {
size_t operation_index = num_operations - 1 - i;
gfx::BoxF bounds_for_operation;
const TransformOperation* from_op =
from_identity ? nullptr : &from.operations_[operation_index];
const TransformOperation* to_op =
to_identity ? nullptr : &operations_[operation_index];
if (!TransformOperation::BlendedBoundsForBox(*bounds, from_op, to_op,
min_progress, max_progress,
&bounds_for_operation)) {
return false;
}
*bounds = bounds_for_operation;
}
return true;
}
bool TransformOperations::AffectsScale() const {
for (size_t i = 0; i < operations_.size(); ++i) {
if (operations_[i].type == TransformOperation::TRANSFORM_OPERATION_SCALE)
return true;
if (operations_[i].type == TransformOperation::TRANSFORM_OPERATION_MATRIX &&
!operations_[i].matrix.IsIdentityOrTranslation())
return true;
}
return false;
}
bool TransformOperations::PreservesAxisAlignment() const {
for (size_t i = 0; i < operations_.size(); ++i) {
switch (operations_[i].type) {
case TransformOperation::TRANSFORM_OPERATION_IDENTITY:
case TransformOperation::TRANSFORM_OPERATION_TRANSLATE:
case TransformOperation::TRANSFORM_OPERATION_SCALE:
continue;
case TransformOperation::TRANSFORM_OPERATION_MATRIX:
if (!operations_[i].matrix.IsIdentity() &&
!operations_[i].matrix.IsScaleOrTranslation())
return false;
continue;
case TransformOperation::TRANSFORM_OPERATION_ROTATE:
case TransformOperation::TRANSFORM_OPERATION_SKEW:
case TransformOperation::TRANSFORM_OPERATION_PERSPECTIVE:
return false;
}
}
return true;
}
bool TransformOperations::IsTranslation() const {
for (size_t i = 0; i < operations_.size(); ++i) {
switch (operations_[i].type) {
case TransformOperation::TRANSFORM_OPERATION_IDENTITY:
case TransformOperation::TRANSFORM_OPERATION_TRANSLATE:
continue;
case TransformOperation::TRANSFORM_OPERATION_MATRIX:
if (!operations_[i].matrix.IsIdentityOrTranslation())
return false;
continue;
case TransformOperation::TRANSFORM_OPERATION_ROTATE:
case TransformOperation::TRANSFORM_OPERATION_SCALE:
case TransformOperation::TRANSFORM_OPERATION_SKEW:
case TransformOperation::TRANSFORM_OPERATION_PERSPECTIVE:
return false;
}
}
return true;
}
bool TransformOperations::ScaleComponent(gfx::Vector3dF* scale) const {
*scale = gfx::Vector3dF(1.f, 1.f, 1.f);
bool has_scale_component = false;
for (size_t i = 0; i < operations_.size(); ++i) {
switch (operations_[i].type) {
case TransformOperation::TRANSFORM_OPERATION_IDENTITY:
case TransformOperation::TRANSFORM_OPERATION_TRANSLATE:
continue;
case TransformOperation::TRANSFORM_OPERATION_MATRIX:
if (!operations_[i].matrix.IsIdentityOrTranslation())
return false;
continue;
case TransformOperation::TRANSFORM_OPERATION_ROTATE:
case TransformOperation::TRANSFORM_OPERATION_SKEW:
case TransformOperation::TRANSFORM_OPERATION_PERSPECTIVE:
return false;
case TransformOperation::TRANSFORM_OPERATION_SCALE:
if (has_scale_component)
return false;
has_scale_component = true;
scale->Scale(operations_[i].scale.x,
operations_[i].scale.y,
operations_[i].scale.z);
}
}
return true;
}
bool TransformOperations::MatchesTypes(const TransformOperations& other) const {
if (operations_.size() == 0 || other.operations_.size() == 0)
return true;
if (operations_.size() != other.operations_.size())
return false;
for (size_t i = 0; i < operations_.size(); ++i) {
if (operations_[i].type != other.operations_[i].type)
return false;
}
return true;
}
bool TransformOperations::CanBlendWith(
const TransformOperations& other) const {
gfx::Transform dummy;
return BlendInternal(other, 0.5, &dummy);
}
void TransformOperations::AppendTranslate(SkMScalar x,
SkMScalar y,
SkMScalar z) {
TransformOperation to_add;
to_add.matrix.Translate3d(x, y, z);
to_add.type = TransformOperation::TRANSFORM_OPERATION_TRANSLATE;
to_add.translate.x = x;
to_add.translate.y = y;
to_add.translate.z = z;
operations_.push_back(to_add);
decomposed_transform_dirty_ = true;
}
void TransformOperations::AppendRotate(SkMScalar x,
SkMScalar y,
SkMScalar z,
SkMScalar degrees) {
TransformOperation to_add;
to_add.matrix.RotateAbout(gfx::Vector3dF(x, y, z), degrees);
to_add.type = TransformOperation::TRANSFORM_OPERATION_ROTATE;
to_add.rotate.axis.x = x;
to_add.rotate.axis.y = y;
to_add.rotate.axis.z = z;
to_add.rotate.angle = degrees;
operations_.push_back(to_add);
decomposed_transform_dirty_ = true;
}
void TransformOperations::AppendScale(SkMScalar x, SkMScalar y, SkMScalar z) {
TransformOperation to_add;
to_add.matrix.Scale3d(x, y, z);
to_add.type = TransformOperation::TRANSFORM_OPERATION_SCALE;
to_add.scale.x = x;
to_add.scale.y = y;
to_add.scale.z = z;
operations_.push_back(to_add);
decomposed_transform_dirty_ = true;
}
void TransformOperations::AppendSkew(SkMScalar x, SkMScalar y) {
TransformOperation to_add;
to_add.matrix.Skew(x, y);
to_add.type = TransformOperation::TRANSFORM_OPERATION_SKEW;
to_add.skew.x = x;
to_add.skew.y = y;
operations_.push_back(to_add);
decomposed_transform_dirty_ = true;
}
void TransformOperations::AppendPerspective(SkMScalar depth) {
TransformOperation to_add;
to_add.matrix.ApplyPerspectiveDepth(depth);
to_add.type = TransformOperation::TRANSFORM_OPERATION_PERSPECTIVE;
to_add.perspective_depth = depth;
operations_.push_back(to_add);
decomposed_transform_dirty_ = true;
}
void TransformOperations::AppendMatrix(const gfx::Transform& matrix) {
TransformOperation to_add;
to_add.matrix = matrix;
to_add.type = TransformOperation::TRANSFORM_OPERATION_MATRIX;
operations_.push_back(to_add);
decomposed_transform_dirty_ = true;
}
void TransformOperations::AppendIdentity() {
operations_.push_back(TransformOperation());
}
bool TransformOperations::IsIdentity() const {
for (size_t i = 0; i < operations_.size(); ++i) {
if (!operations_[i].IsIdentity())
return false;
}
return true;
}
bool TransformOperations::BlendInternal(const TransformOperations& from,
SkMScalar progress,
gfx::Transform* result) const {
bool from_identity = from.IsIdentity();
bool to_identity = IsIdentity();
if (from_identity && to_identity)
return true;
if (MatchesTypes(from)) {
size_t num_operations =
std::max(from_identity ? 0 : from.operations_.size(),
to_identity ? 0 : operations_.size());
for (size_t i = 0; i < num_operations; ++i) {
gfx::Transform blended;
if (!TransformOperation::BlendTransformOperations(
from_identity ? 0 : &from.operations_[i],
to_identity ? 0 : &operations_[i],
progress,
&blended))
return false;
result->PreconcatTransform(blended);
}
return true;
}
if (!ComputeDecomposedTransform() || !from.ComputeDecomposedTransform())
return false;
gfx::DecomposedTransform to_return;
if (!gfx::BlendDecomposedTransforms(&to_return,
*decomposed_transform_.get(),
*from.decomposed_transform_.get(),
progress))
return false;
*result = ComposeTransform(to_return);
return true;
}
bool TransformOperations::ComputeDecomposedTransform() const {
if (decomposed_transform_dirty_) {
if (!decomposed_transform_)
decomposed_transform_.reset(new gfx::DecomposedTransform());
gfx::Transform transform = Apply();
if (!gfx::DecomposeTransform(decomposed_transform_.get(), transform))
return false;
decomposed_transform_dirty_ = false;
}
return true;
}
} // namespace cc
| [
"zeno.albisser@hemispherian.com"
] | zeno.albisser@hemispherian.com |
c924f8abe6de90e08931b9132c8deafcb5876a87 | 4bf2523f9a57ef0728630d05ce2d38b05686547d | /Compo/Dev_Ex/ExpressPrinting System/Packages/dxPSdxOCLnkC5.cpp | b837aa8212903e244c8a24c7191f894ae73365ee | [] | no_license | zeroptr/ceda_tic | 980bee99b829f99575586b5110985ba90f8f56aa | 72586d6a10a5426a889d45ad37479c1bf6f3fb49 | refs/heads/main | 2023-03-17T16:36:58.586885 | 2021-03-07T20:30:34 | 2021-03-07T20:30:34 | 345,381,196 | 0 | 3 | null | null | null | null | UTF-8 | C++ | false | false | 766 | cpp | //---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
USEPACKAGE("dxorgcc5.bpi");
USEPACKAGE("dxPSCorec5.bpi");
USEPACKAGE("cxLibraryVCLC5.bpi");
USERES("dxPSdxOCLnkc5.res");
USEUNIT("dxPSdxOCLnk.pas");
USEUNIT("dxPSdxOCLnkReg.pas");
USEPACKAGE("vcl50.bpi");
//---------------------------------------------------------------------------
#pragma package(smart_init)
//---------------------------------------------------------------------------
// Package source.
//---------------------------------------------------------------------------
int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*)
{
return 1;
}
//---------------------------------------------------------------------------
| [
"53816327+zeroptr@users.noreply.github.com"
] | 53816327+zeroptr@users.noreply.github.com |
edb0570a43e1eb943532ff2b505cf8b91fde96c1 | ece46d54db148fcd1717ae33e9c277e156067155 | /SDK/arxsdk2020/utils/Atil/Inc/codec_properties/FormatCodecStringProperty.h | 7fde3a86cecf6d11041be86a83d2cf9b1137da51 | [] | no_license | 15831944/ObjectArx | ffb3675875681b1478930aeac596cff6f4187ffd | 8c15611148264593730ff5b6213214cebd647d23 | refs/heads/main | 2023-06-16T07:36:01.588122 | 2021-07-09T10:17:27 | 2021-07-09T10:17:27 | 384,473,453 | 0 | 1 | null | 2021-07-09T15:08:56 | 2021-07-09T15:08:56 | null | UTF-8 | C++ | false | false | 5,419 | h | ///////////////////////////////////////////////////////////////////////////////
//
// (C) Autodesk, Inc. 2007-2011. All rights reserved.
//
// Permission to use, copy, modify, and distribute this software in
// object code form for any purpose and without fee is hereby granted,
// provided that the above copyright notice appears in all copies and
// that both that copyright notice and the limited warranty and
// restricted rights notice below appear in all supporting
// documentation.
//
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
// UNINTERRUPTED OR ERROR FREE.
//
// Use, duplication, or disclosure by the U.S. Government is subject to
// restrictions set forth in FAR 52.227-19 (Commercial Computer
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
// (Rights in Technical Data and Computer Software), as applicable.
//
///////////////////////////////////////////////////////////////////////////////
#ifndef ATILDEFS_H
#include "AtilDefs.h"
#endif
#ifndef FORMATCODECPROPERTYINTERFACE_H
#include "FormatCodecPropertyInterface.h"
#endif
#ifndef STRINGBUFFER_H
#include "StringBuffer.h"
#endif
#ifndef FORMATCODECSTRINGPROPERTY_H
#define FORMATCODECSTRINGPROPERTY_H
namespace Atil
{
/// <summary>
/// This class holds an integer value.
/// </summary>
///
/// <remarks>
/// The double value is most often used in conjunction with other simple
/// data type properties in a set grouping that forms something analogous to
/// a structure in 'c'.
/// </remarks>
///
class FormatCodecStringProperty : public FormatCodecPropertyInterface
{
public:
/// <summary>
/// This enum describes the format of the string held by the property.
/// </summary>
enum StringType {
/// <summary>
/// This entry indicates that the string is a single line.
/// </summary>
kSingleLine,
/// <summary>
/// This entry indicates that the string has multiple lines separated by character return/linefeeds.
/// </summary>
kMultiLine
};
/// <summary>
/// The virtual destructor.
/// </summary>
///
virtual ~FormatCodecStringProperty ();
/// <summary>
/// This method is an artificial copy constructor. It will make a complete
/// and accurate copy of the class.
/// </summary>
///
/// <returns>
/// This method returns a new <c>FormatCodecStringProperty</c> instance as a
/// <c>FormatCodecPropertyInterface</c> pointer.
/// </returns>
///
virtual FormatCodecPropertyInterface* clone () const;
/// <summary>
/// This method will return the default value of the property.
/// </summary>
///
/// <param name="sbDefault">
/// A StringBuffer reference which will be set to the default value of the instance.
/// </param>
///
virtual void getDefaultValue (StringBuffer& sbDefault);
/// <summary>
/// This method will get the string from the property.
/// </summary>
///
/// <param name="sbValue">
/// A StringBuffer reference which will set to set the string in the property.
/// </param>
///
virtual void getValue (StringBuffer& sbValue) const;
/// <summary>
/// This method will set the string into the property.
/// </summary>
///
/// <param name="sbValue">
/// The const StringBuffer reference which will be used to set the value held by the instance.
/// </param>
///
/// <returns>
/// This will return true on success.
/// </returns>
///
virtual bool setValue (const StringBuffer& sbValue);
/// <summary>
/// This method will get the maximum number of bytes (not characters) the string in the property can hold.
/// </summary>
///
/// <returns>
/// This will return the maximum number of bytes the internal string can hold.
/// </returns>
///
virtual int maximumStringBytes () const;
/// <summary>
/// This describes the type of the string held by the property.
/// </summary>
///
/// <returns>
/// This returns the <c>StringType</c> enum entry describing the string.
/// </returns>
///
virtual StringType getStringType() const;
protected:
/// <summary>
/// (Protected) The constructor for the property.
/// </summary>
///
/// <param name="sbDefault">
/// The const StringBuffer reference which will be used to set the value held by the instance.
/// </param>
///
/// <param name="nMaximumBytes">
/// This will be used to set the maximum number of bytes the internal string can hold.
/// </param>
///
FormatCodecStringProperty (const StringBuffer& sbDefault, int nMaximumBytes);
protected:
/// <summary>
/// (Protected) The default string.
/// </summary>
StringBuffer msbDefault;
/// <summary>
/// (Protected) The value string.
/// </summary>
StringBuffer msbValue;
/// <summary>
/// (Protected) The string byte limit.
/// </summary>
int mnMaximumBytes;
/// <summary>
/// (Protected) The type of the string as described by the <c>StringType</c> enum.
/// </summary>
StringType mStringType;
};
} // end of namespace Atil
#endif
| [
"3494543191@qq.com"
] | 3494543191@qq.com |
155fb77f45b772f51a8b00e44a692879d420769a | 365affa0132d4a46af9aed84c472b2fe369a6be3 | /src/GasTPCDataLib.cxx | 8d5f271ff5685a66bb714d677a9a8f90e2f4f8c1 | [] | no_license | davehadley/trex | be0f36a2c13201ed68e37be60e1e1fa487a1673c | 6233fb6ab5e88a296b446744803522f879453995 | refs/heads/master | 2023-01-06T12:13:13.690164 | 2020-11-05T11:02:06 | 2020-11-05T11:02:06 | 308,296,749 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 9,355 | cxx | //____________________________________________________________________________
/*!
\class GasTPCDataLib
\author Yordan Karadzhov <Yordan.Karadzhov \at cern.ch>
University of Geneva
\author Tom Stainer <tstainer \at liv.ac.uk>
University of Liverpool
\author Georgios Christodoulou <georgios at hep.ph.liv.ac.uk>
University of Liverpool
\created Sep 2012
\last update Apr 2015
*/
//____________________________________________________________________________
#include "GasTPCDataLib.hxx"
ClassImp(ParticleDescrShortRecord)
ClassImp(ParticleDescrRecord)
ClassImp(BaseEventRecord)
ClassImp(NeutrinoHit)
ClassImp(SimulData)
ClassImp(SDHit)
ClassImp(tpcFidHit)
ClassImp(scintHit)
ClassImp(MINDHit)
ClassImp(GeantBasicParticle)
ClassImp(GeantParticle)
//ClassImp(GeantDaughterParticle)
ClassImp(PionDecayEvent)
ClassImp(MuonDecayEvent)
///////////////////////////////////////////////////////////////////////////////
ParticleDescrShortRecord::ParticleDescrShortRecord()
: pdg_(0), p4_(0.,0.,0.,0.),/*mass_(0.),*/charge_(0) {}
ParticleDescrShortRecord::ParticleDescrShortRecord(int pdg, TLorentzVector p4)
: pdg_(pdg), p4_(p4),/*mass_(0.),*/charge_(0) {}
ParticleDescrShortRecord::ParticleDescrShortRecord(const ParticleDescrShortRecord &p)
: pdg_( p.getPDG() ), p4_( p.getP4() ),/*mass_( p.getMass() ),*/charge_( p.getCharge() ) {}
ParticleDescrShortRecord& ParticleDescrShortRecord::operator=(const ParticleDescrShortRecord &p) {
pdg_ = p.getPDG();
p4_ = p.getP4();
//mass_ = p.getMass();
charge_= p.getCharge();
return *this;
}
///////////////////////////////////////////////////////////////////////////////
ParticleDescrRecord::ParticleDescrRecord()
: ParticleDescrShortRecord::ParticleDescrShortRecord(int(0), TLorentzVector(0.,0.,0.,0.)),
pos_(0.,0.,0.,0.) {}
ParticleDescrRecord::ParticleDescrRecord(int pdg, TLorentzVector p4, TLorentzVector pos)
: ParticleDescrShortRecord::ParticleDescrShortRecord(pdg, p4), pos_(pos) {}
ParticleDescrRecord::ParticleDescrRecord(const ParticleDescrRecord &p)
: ParticleDescrShortRecord::ParticleDescrShortRecord(p),
pos_( p.getPosition() ) {}
ParticleDescrRecord& ParticleDescrRecord::operator=(const ParticleDescrRecord &p) {
pdg_ = p.getPDG();
p4_ = p.getP4();
pos_ = p.getPosition();
return *this;
}
///////////////////////////////////////////////////////////////////////////////
void ParticleDescrRecord::printToStream(std::ostream& stream) {
ParticleDescrShortRecord::printToStream(stream);
TLorentzVector pos = getPosition() * (1.);///CLHEP::m);
stream << " pos(x,y,z,t)[m] : (" << pos.X() << ", "
<< pos.Y() << ", " << pos.Z() << ", " << pos.T() << ")"
<< std::endl;
}
///////////////////////////////////////////////////////////////////////////////
void ParticleDescrShortRecord::printToStream(std::ostream& stream) {
TLorentzVector p4 = getP4() * (1.);///CLHEP::GeV);
stream << " pdg : " << getPDG() <<std::endl;
stream << " p4(Px,Py,Pz,E)[GeV] : (" << p4.X() << ", "
<< p4.Y() << ", " << p4.Z() << ", " << p4.T() << ")"
<< std::endl;
}
///////////////////////////////////////////////////////////////////////////////
void BaseEventRecord::printToStream(std::ostream& stream) {
TLorentzVector pos = getPosition() * (1.);///CLHEP::m);
stream << "\n pos(x,y,z,t)[m] : (" << pos.X() << ", "
<< pos.Y() << ", " << pos.Z() << ", " << pos.T() << ")"
<< std::endl;
}
///////////////////////////////////////////////////////////////////////////////
NeutrinoHit::NeutrinoHit(ParticleDescrRecord nu)
: neutrino_(nu) {name_ = "nuHits";}
void NeutrinoHit::printToStream(std::ostream& stream) {
stream << "------ NeutrinoHit ------" << std::endl;
neutrino_.printToStream(stream);
stream << std::endl;
}
///////////////////////////////////////////////////////////////////////////////
PionDecayEvent::PionDecayEvent(ParticleDescrShortRecord nu,
ParticleDescrShortRecord chLepton,
TLorentzVector pos)
: neutrino_(nu), chargedLepton_(chLepton),
BaseEventRecord::BaseEventRecord(pos) {name_ = "piDecays";}
void PionDecayEvent::printToStream(std::ostream& stream) {
stream << "----- PionDecayEvent ----" << std::endl;
if(inFlight()) { stream << " decay in flight" << std::endl;}
else { stream << " decay at rest" << std::endl;}
BaseEventRecord::printToStream(stream);
stream << " neutrino :" << std::endl;
neutrino_.printToStream(stream);
//stream << " charged lepton :" << std::endl;
//chargedLepton_.printToStream(stream);
stream << std::endl;
}
///////////////////////////////////////////////////////////////////////////////
MuonDecayEvent::MuonDecayEvent(ParticleDescrShortRecord numu,
ParticleDescrShortRecord nue,
ParticleDescrShortRecord electron,
TLorentzVector pos)
: numu_(numu), nue_(nue), electron_(electron),
BaseEventRecord::BaseEventRecord(pos) {name_ = "muDecays";
}
///////////////////////////////////////////////////////////////////////////////
void NeutrinoEvent::printToStream(std::ostream& stream) {
TLorentzVector eventVertex = this->getPosition()*(1.);///CLHEP::mm);
stream << "\n=================================================================="
<< "\n------------------------ NeutrinoEvent ---------------------------"
<< "\n Neutrino Truth Energy [GeV]: " << this->getNuEnergy()*1./*/CLHEP::GeV*/
<< "\n Neutrino Vertex (x,y,z)[mm]: (" << eventVertex.X() <<","<<eventVertex.Y() <<","<<eventVertex.Z() <<")"
<< "\n=================================================================="
<< "\n Fspl: ";
//fspl_.printToStream(stream);
stream << "=================================================================="
<< "\n Primaries: " << fss_.size()
<< "\n==================================================================" <<std::endl;
for(int i=0;i<fss_.size();i++){
fss_.at(i).printToStream(stream);
}
stream << "==================================================================" <<std::endl;
}
////////////////////////////////////////////////////////////////////////////
void SDHit::printToStream(std::ostream& stream) {
stream << "----- " << this->getRecordName() << " -----" << std::endl;
BaseEventRecord::printToStream(stream);
stream << " Edep :" << Edep_*(1./*/CLHEP::GeV*/) << " [GeV]" << std::endl;
stream << std::endl;
}
////////////////////////////////////////////////////////////////////////////
void tpcFidHit::printToStream(std::ostream& stream) {
stream << "----- " << this->getRecordName() << " -----" << std::endl;
BaseEventRecord::printToStream(stream);
stream << " Edep :" << Edep_*(1./*/CLHEP::GeV*/) << " [GeV]" << std::endl;
stream << std::endl;
}
////////////////////////////////////////////////////////////////////////////
void scintHit::printToStream(std::ostream& stream) {
stream << "\n----- " << this->getRecordName() << " -----" << std::endl;
stream << "*** pdg : " << PDG;
BaseEventRecord::printToStream(stream);
stream << " Edep :" << Edep_*(1./*/CLHEP::GeV*/) << " [GeV]" << std::endl;
stream << std::endl;
}
////////////////////////////////////////////////////////////////////////////
void GeantBasicParticle::printToStream(std::ostream& stream) const {
stream << "\n --- PDG : " << this->getPDG() << ", TrackID: " << this->getTrackID() << ", ParentID: " << this->getParentID() <<std::endl;
}
////////////////////////////////////////////////////////////////////////////
void GeantParticle::printToStream(std::ostream& stream) {
stream << "\n pdg : " << getPDG() << ", trackID: " << trackID << ", parentID: " << parentID <<std::endl;
TLorentzVector p4 = getP4() * (1.);///CLHEP::GeV);
stream << " p4(Px,Py,Pz,E)[GeV] : (" << p4.X() << ", "
<< p4.Y() << ", " << p4.Z() << ", " << p4.T() << ")"
<< std::endl;
}
///////////////////////////////////////////////////////////////////////////////
/*
bool GeantDaughterParticle::isPrimary() const{
if(primaryParent.getTrackID() == this->getTrackID())primary=true;
else primary = false;
return primary;
}
*/
///////////////////////////////////////////////////////////////////////////////
void MINDHit::printToStream(std::ostream& stream) {
stream << "----- " << this->getRecordName() << " -----" << std::endl;
BaseEventRecord::printToStream(stream);
stream << std::endl;
}
////////////////////////////////////////////////////////////////////////////
double SimulData::getTotalEDep(std::string hits_name) const{
double edep = 0.;
if(hits_name == "scint"){
for(int i=0;i<scint_hits_.size();i++){
edep+=scint_hits_.at(i).getEdep();
}
}
else if(hits_name == "tpc"){
for(int i=0;i<tpc_hits_.size();i++){
edep+=tpc_hits_.at(i).getEdep();
}
}
return edep;
}
////////////////////////////////////////////////////////////////////////////
void SimulData::printToStream(std::ostream& stream) {
stream << "\n----- " << this->getRecordName() << " -----" ;
stream << "\n * TPC Hits: " << tpc_hits_.size() << ", edep [GeV]: "<< this->getTotalEDep("tpc");
stream << "\n * Scint Hits: " << scint_hits_.size() << ", edep [GeV]: "<< this->getTotalEDep("scint");
stream << "\n--------------------" << std::endl;
}
////////////////////////////////////////////////////////////////////////////
| [
"phsmaj@soulor.epp.warwick.ac.uk"
] | phsmaj@soulor.epp.warwick.ac.uk |
30d1503f7a3480c7f1145ece12e679e3a4b45d90 | 1a74d74f1718122e6fcedf536b20dd7262b35962 | /01_introduction_starter_files/gcd/gcd.cpp | 15bd0cc35e1d99b3b349f419fa03aa0e5b85551a | [] | no_license | mansikhemka/algorithmic_toolbox | 95732111e3993118bd81ea2a34898acfe327cc5f | 300ca25eb7039a2d6aeb299af808a038d21dc8c9 | refs/heads/master | 2021-01-12T04:13:13.586127 | 2017-02-13T13:14:17 | 2017-02-13T13:14:17 | 77,546,540 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 493 | cpp | #include <iostream>
// int gcd_naive(int a, int b) {
// int current_gcd = 1;
// for (int d = 2; d <= a && d <= b; d++) {
// if (a % d == 0 && b % d == 0) {
// if (d > current_gcd) {
// current_gcd = d;
// }
// }
// }
// return current_gcd;
// }
int gcd_fast(int a, int b){
if(b==0)
return a;
int adash = a%b;
return gcd_fast(b, adash);
}
int main() {
int a, b;
std::cin >> a >> b;
std::cout << gcd_fast(a, b) << std::endl;
return 0;
}
| [
"mansi_khemka@yahoo.in"
] | mansi_khemka@yahoo.in |
6d4b75e2e97cf3238eac6c14248c1b07c3c5694b | 63104e0e454d03e4bf31df45f5da296684dc83e3 | /HackerCup2015_20_r1.cpp | ebbcccd963e86e173145f032da321654a7c9330e | [] | no_license | andrei14vl/cpp | 3bb85be5ba01d2e558566db4076b2be1648f543a | 477b50f6d7094f8ce150e78056be504df88926a2 | refs/heads/master | 2020-05-18T15:49:07.183054 | 2016-01-24T08:59:33 | 2016-01-24T08:59:33 | 42,612,541 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,858 | cpp | /* https://www.facebook.com/hackercup/problem/1611251319125133/ */
#include <iostream>
#include <fstream>
#include <vector>
#include <algorithm>
#include <queue>
using namespace std;
ifstream f("input.txt");
ofstream g("output.txt");
struct job {
long long time;
long long wi;
} ;
bool operator<(const job& a, const job& b) {
return a.time > b.time;
}
int main() {
int T;
f >> T;
for (int t = 1; t <= T; ++t) {
long long L, N, M, D, W;
priority_queue<job> jobs;
f >> L >> N >> M >> D;
for (int i = 1; i <= N; ++i) {
job j;
f >> W;
j.time = W;
j.wi = W;
jobs.push(j);
}
long long waiting_to_dry = M, waiting_for_dry = 0, done = 0;
while (done < L) {
job j = jobs.top();
jobs.pop();
if (j.wi) {
//cout << "Time:" << j.time << "done wash\n";
j.time += j.wi;
jobs.push(j);
if (waiting_to_dry > 0) {
--waiting_to_dry;
j.time += D - j.wi;
j.wi = 0;
jobs.push(j);
} else {
++waiting_for_dry;
}
} else {
++done;
//cout << "Time:" << j.time << "done dry\n";
if (done == L) {
g << "Case #" << t << ": " << j.time << "\n";
break;
}
if (waiting_for_dry) {
--waiting_for_dry;
j.time += D;
j.wi = 0;
jobs.push(j);
} else {
++waiting_to_dry;
}
}
}
}
return 0;
}
| [
"vacaroiu.andrei@gmail.com"
] | vacaroiu.andrei@gmail.com |
ca7d0e43925fafed4af5d3db899ff02d6956f838 | d6671cb01342db6a300b56ee2d9c7865cb442a62 | /pqueue.cpp | d9e68bd09990e7f0a1b1513358282a293a07b7d6 | [] | no_license | StevenNava/A3_CPP | e4835550a3cd2af741459678be6af59fcf06dce0 | 764c3ce5e078a591cbafa75cd2dd761af1b3c27b | refs/heads/master | 2021-06-30T18:11:30.947094 | 2017-09-15T00:41:44 | 2017-09-15T00:41:44 | 103,596,257 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,631 | cpp | /*
Steven Nava
A2 Queue Example
Professor Mitzel
CSC300 D30
Below are the method definitions used in the queue example.
*/
#include "pqueue.h"
using namespace std;
//Constructor
PQUEUE::PQUEUE()
{
front = NULL;
back = NULL;
}
//Destructor
PQUEUE::~PQUEUE()
{
while (front != NULL)
{
node* tmp = front;
front = front->next;
delete(tmp);
}
}
//Adds item into queue at back (end) of queue
void PQUEUE::enq(int num)
{
node* newNode = new node;
newNode->val = num;
newNode->previous = NULL;
newNode->next = NULL;
//if front is empty
if (front == NULL)
{
//set both front and back equal to new node
front = back = newNode;
return;
}
//otherwise
if (newNode->val <= front->val)
{
front->previous = newNode;
newNode->next = front;
front = newNode;
return;
}
else if (newNode->val >= back->val)
{
newNode->previous = back;
back->next = newNode;
back = newNode;
return;
}
else
{
node* tmp = front;
while (tmp != back && tmp->val < newNode->val)
{
tmp = tmp->next;
}
newNode->previous = tmp->previous;
tmp->previous->next = newNode;
tmp->previous = newNode;
newNode->next = tmp;
return;
}
}
//Deletes node from front of queue
bool PQUEUE::deq()
{
//if front is empty
if (front == NULL)
{
//there is nothing to delete
return false;
}
//if front value equals back
if (front == back)
{
//set both to null
front = back = NULL;
}
//otherwise
else
{
//delete the front of the list
node* tmp = front;
front = front->next;
delete(tmp);
}
return true;
}
//Returns front pointer
node* PQUEUE::getFront()
{
return front;
}
//Tells whether the queue is empty
bool PQUEUE::isEmpty()
{
//if front is null
if (front == NULL)
{
//queue is empty
return true;
}
//if not, queue contains a value
return false;
}
//Prints the queue to screen
void PQUEUE::printq()
{
//if queue is empty
if (front == NULL)
{
//print out 'FRONT: BACK' (i.e. Empty)
cout << "FRONT: BACK" << endl;
return;
}
//if not
else
{
//prints out queue
node* tmp = front;
cout << "FRONT: ";
while (tmp != NULL)
{
cout << tmp->val << " -> ";
tmp = tmp->next;
}
cout << "BACK" << endl;
return;
}
}
| [
"Steven Nava"
] | Steven Nava |
d0024b51766655ecaf6df695d86559c7360d2be3 | 46b9f85672c5733a157b876ee585840bcc48d7b6 | /Test/TestServer.cpp | 715a1af34bb92c23367ee50317aa0add7c2f2a24 | [
"Apache-2.0"
] | permissive | OpenArkStudio/ArkLab | 234fa850821f9540a4897a5076eb4b275b916481 | 22938db4719e9890d88995b95f6b364610c5052f | refs/heads/master | 2021-09-10T23:21:27.862803 | 2018-04-04T07:08:17 | 2018-04-04T07:08:17 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,376 | cpp |
#include <thread>
#include <string>
//#include <processthreadsapi.h>
#include "NFComm/NFPluginModule/NFPlatform.h"
#include "NFComm/NFCore/NFTimer.h"
#include "NFNet/NFServer.h"
#include "NFNet/NFIPacket.h"
#ifdef NF_DEBUG_MODE
#pragma comment(lib,"NFNet_d.lib")
#pragma comment(lib,"NFCore_d.lib")
#else
#pragma comment(lib,"NFNet.lib")
#pragma comment(lib,"NFCore.lib")
#endif
#pragma comment(lib,"ws2_32.lib")
#pragma comment(lib,"libevent.lib")
#pragma comment(lib,"libevent_core.lib")
class TestServerClass
{
public:
TestServerClass()
{
//pNet = new NFCMulNet(this, &TestServerClass::ReciveHandler, &TestServerClass::EventHandler);
//pNet->Initialization(10000, 8088, 2, 4);
//nSendMsgCount = 0;
//nReciveMsgCount = 0;
//nStartTime = NFTime::GetNowTime();
//nLastTime = nStartTime;
//nLastSendCount = 0;
//nLasterReciveCount = 0;
pNet = new NFServer(IMsgHead::NF_MIN_HEAD_LENGTH, this, &TestServerClass::ReciveHandler, &TestServerClass::EventHandler);
pNet->StartServer(8088, 4, 8000, 300, 300);
}
//void ReciveHandler(const int nSockIndex, const int nMsgID, const char* msg, const uint32_t nLen, const NFGUID& xClientID)
//{
// std::string str;
// str.assign(msg, nLen);
// nReciveMsgCount++;
// nSendMsgCount++;
// pNet->SendMsgWithOutHead(nMsgID, msg, nLen, nSockIndex);
// //std::cout << " nSendMsgCount: " << nSendMsgCount << "nReciveMsgCount" << nReciveMsgCount << " fd: " << nSockIndex << " msg_id: " << nMsgID /*<< " data: " << str*/ << " thread_id: " << GetCurrentThreadId() << std::endl;
//}
int ReciveHandler(const NFIPacket& msg)
{
//std::string str;
//str.assign(msg, nLen);
//nReciveMsgCount++;
//nSendMsgCount++;
//pNet->SendMsgWithOutHead(nMsgID, msg, nLen, nSockIndex);
//std::cout << " nSendMsgCount: " << nSendMsgCount << "nReciveMsgCount" << nReciveMsgCount << " fd: " << nSockIndex << " msg_id: " << nMsgID /*<< " data: " << str*/ << " thread_id: " << GetCurrentThreadId() << std::endl;
std::string strMsg = "11111111111111111111111111111111111111111111111111112222222222222222222222222222222222222222222222222222222222222222223333333333333333333333444";
pNet->SendMsgWithOutHead(1, strMsg.c_str(), strMsg.size(), msg.GetFd(), false);
return 1;
}
//void EventHandler(const int nSockIndex, const NF_NET_EVENT e, const NFGUID& xClientID, const int nServerID)
//{
// std::cout << " fd: " << nSockIndex << " event_id: " << e << " thread_id: " << std::this_thread::get_id() << std::endl;
//}
int EventHandler(const int nSockIndex, const NF_NET_EVENT nEvent, NFIServer* pNet)
{
std::cout << " fd: " << nSockIndex << " event_id: " << nEvent << " thread_id: " << std::this_thread::get_id() << std::endl;
return 1;
}
void Execute()
{
pNet->Execute();
int nNowTime = NFTime::GetNowTime();
int nSpanTime = nNowTime - nLastTime;
int nAllSpanTime = nNowTime - nStartTime;
if(nSpanTime > 5 && nAllSpanTime > 0)
{
nLastTime = nNowTime;
const int nLastPerSend = (nSendMsgCount - nLastSendCount) / nSpanTime;
const int nLastPerReceive = (nReciveMsgCount - nLasterReciveCount) / nSpanTime;
const int nToltalPerSend = nSendMsgCount / nAllSpanTime;
const int nToltalPerReceive = nReciveMsgCount / nAllSpanTime;
nLastSendCount = nSendMsgCount;
nLasterReciveCount = nReciveMsgCount;
std::cout << " All Send: [" << nSendMsgCount << "] All Receive: [" << nReciveMsgCount << "] All Per Send per second : [" << nToltalPerSend << "] All Per Receive per second : [" << nToltalPerReceive <<
"] Last Second Per Send :[" << nLastPerSend << "] Last Second Per Received [" << nLastPerReceive /*<< " data: " << str*/ << "] thread_id: " << GetCurrentThreadId() << std::endl;
}
}
protected:
NFServer* pNet;
int nSendMsgCount;
int nReciveMsgCount;
int nStartTime;
int nLastTime;
int nLasterReciveCount;
int nLastSendCount;
};
int main(int argc, char** argv)
{
TestServerClass x;
while(1)
{
x.Execute();
NFSLEEP(1);
}
return 0;
}
| [
"flyicegood@163.com"
] | flyicegood@163.com |
245a5f0bf4ce90773028b53958f0369f53dbebba | 24732a04841b09b8389d98629d297cd2e65cc135 | /MCF/src/Core/Assert.hpp | 365ab8e3ea903a9fe0c9d4c37372c385e5605ecf | [] | no_license | yooooki/MCF | 7281b3140bffd5aae5c676bf68ae9b56c1bfeca5 | f985a44232f58c635098bd8799be2940e95b0b08 | refs/heads/master | 2021-07-23T17:59:06.943662 | 2017-11-03T08:24:24 | 2017-11-03T08:24:24 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 545 | hpp | // 这个文件是 MCF 的一部分。
// 有关具体授权说明,请参阅 MCFLicense.txt。
// Copyleft 2013 - 2017, LH_Mouse. All wrongs reserved.
#ifndef MCF_CORE_ASSERT_HPP_
#define MCF_CORE_ASSERT_HPP_
#define MCF_ASSERT(expr_) _MCFCRT_ASSERT(expr_)
#define MCF_ASSERT_MSG(expr_, msg_) _MCFCRT_ASSERT_MSG(expr_, msg_)
#define MCF_DEBUG_CHECK(expr_) _MCFCRT_DEBUG_CHECK(expr_)
#define MCF_DEBUG_CHECK_MSG(expr_, msg_) _MCFCRT_DEBUG_CHECK_MSG(expr_, msg_)
#endif
#include <MCFCRT/env/xassert.h>
| [
"lh_mouse@126.com"
] | lh_mouse@126.com |
8fa66e7075b844b368f5a4f012bc63bfdf068cdf | 7a623a8ad3d41b6180b89225f43b134c8cfc57b7 | /device/vr/vr_device_base.cc | 14cce08b5c1e9bb241424d8ee557f884cd395133 | [
"BSD-3-Clause"
] | permissive | 3031687356/chromium | 9ea7ec7fdec873a7ae242ddb16e2e56c82a21607 | ed4591ba8f0f3c3e85280355b609099f0fb73c3e | refs/heads/master | 2023-02-27T14:07:22.046556 | 2018-08-18T12:51:09 | 2018-08-18T12:51:09 | 145,221,453 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,156 | cc | // Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "device/vr/vr_device_base.h"
#include "device/vr/vr_device_provider.h"
#include "device/vr/vr_display_impl.h"
namespace device {
VRDeviceBase::VRDeviceBase(mojom::XRDeviceId id)
: id_(id), runtime_binding_(this) {}
VRDeviceBase::~VRDeviceBase() = default;
mojom::XRDeviceId VRDeviceBase::GetId() const {
return id_;
}
void VRDeviceBase::PauseTracking() {}
void VRDeviceBase::ResumeTracking() {}
mojom::VRDisplayInfoPtr VRDeviceBase::GetVRDisplayInfo() {
DCHECK(display_info_);
return display_info_.Clone();
}
void VRDeviceBase::OnExitPresent() {
if (listener_)
listener_->OnExitPresent();
presenting_ = false;
}
void VRDeviceBase::OnStartPresenting() {
presenting_ = true;
}
bool VRDeviceBase::HasExclusiveSession() {
return presenting_;
}
void VRDeviceBase::SetMagicWindowEnabled(bool enabled) {
magic_window_enabled_ = enabled;
}
void VRDeviceBase::ListenToDeviceChanges(
mojom::XRRuntimeEventListenerPtr listener,
mojom::XRRuntime::ListenToDeviceChangesCallback callback) {
listener_ = std::move(listener);
std::move(callback).Run(display_info_.Clone());
}
void VRDeviceBase::GetFrameData(
mojom::XRFrameDataProvider::GetFrameDataCallback callback) {
if (!magic_window_enabled_) {
std::move(callback).Run(nullptr);
return;
}
OnMagicWindowFrameDataRequest(std::move(callback));
}
void VRDeviceBase::SetVRDisplayInfo(mojom::VRDisplayInfoPtr display_info) {
DCHECK(display_info);
DCHECK(display_info->id == id_);
bool initialized = !!display_info_;
display_info_ = std::move(display_info);
// Don't notify when the VRDisplayInfo is initially set.
if (!initialized)
return;
if (listener_)
listener_->OnDisplayInfoChanged(display_info_.Clone());
}
void VRDeviceBase::OnActivate(mojom::VRDisplayEventReason reason,
base::Callback<void(bool)> on_handled) {
if (listener_)
listener_->OnDeviceActivated(reason, std::move(on_handled));
}
mojom::XRRuntimePtr VRDeviceBase::BindXRRuntimePtr() {
mojom::XRRuntimePtr runtime;
runtime_binding_.Bind(mojo::MakeRequest(&runtime));
return runtime;
}
bool VRDeviceBase::ShouldPauseTrackingWhenFrameDataRestricted() {
return false;
}
void VRDeviceBase::OnListeningForActivate(bool listening) {}
void VRDeviceBase::OnMagicWindowFrameDataRequest(
mojom::XRFrameDataProvider::GetFrameDataCallback callback) {
std::move(callback).Run(nullptr);
}
void VRDeviceBase::SetListeningForActivate(bool is_listening) {
OnListeningForActivate(is_listening);
}
void VRDeviceBase::RequestHitTest(
mojom::XRRayPtr ray,
mojom::XREnviromentIntegrationProvider::RequestHitTestCallback callback) {
NOTREACHED() << "Unexpected call to a device without hit-test support";
std::move(callback).Run(base::nullopt);
}
void VRDeviceBase::ReturnNonImmersiveSession(
mojom::XRRuntime::RequestSessionCallback callback) {
mojom::XRFrameDataProviderPtr data_provider;
mojom::XREnviromentIntegrationProviderPtr enviroment_provider;
mojom::XRSessionControllerPtr controller;
magic_window_sessions_.push_back(std::make_unique<VRDisplayImpl>(
this, mojo::MakeRequest(&data_provider),
mojo::MakeRequest(&enviroment_provider), mojo::MakeRequest(&controller)));
auto session = mojom::XRSession::New();
session->data_provider = data_provider.PassInterface();
// TODO(offenwanger) Not all session will want the enviroment provider. This
// should be refactored so it's only passed when it's requested.
session->enviroment_provider = enviroment_provider.PassInterface();
if (display_info_) {
session->display_info = display_info_.Clone();
}
std::move(callback).Run(std::move(session), std::move(controller));
}
void VRDeviceBase::EndMagicWindowSession(VRDisplayImpl* session) {
base::EraseIf(magic_window_sessions_,
[&](const std::unique_ptr<VRDisplayImpl>& item) {
return item.get() == session;
});
}
} // namespace device
| [
"commit-bot@chromium.org"
] | commit-bot@chromium.org |
bbf4f9d333abbd240247afc837763c1f21094810 | dbfc72c75df1c93bef6fe7cb344771ebfa46786e | /LuoGu/P1296.cpp | 6e16664eb5e04404d56aeacd01301b10e9de1e67 | [] | no_license | Tukekehaohaonuli/algorithm | 610a47fbd67adf7304805b04fd5ca07bcfd63943 | c23d5306e7ecfd0fcff769b353dcaf23b4d12f3f | refs/heads/master | 2023-01-22T20:41:25.693524 | 2020-12-01T06:11:58 | 2020-12-01T06:11:58 | 293,814,802 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 323 | cpp | #include<stdio.h>
#define N 100000000
#define f(i,j,n) for(i=j;i<n;i++)
int main(){
int n,d,i,last=0,num=0;
scanf("%d%d",&n,&d);
int temp[N]={0};
int a[N]={0};
f(i,0,n)
scanf("%d",&temp[i]);
f(i,0,n)
a[temp[i]]=1;
f(i,0,N){
if(last!=0&&(i-last)<=d){
num++;
last=i;
}
}
printf("%d",num);
return 0;
}
| [
"850580234@qq.com"
] | 850580234@qq.com |
bbdb3051fb3b92b936cf1fa02e29af410aa8a446 | 83195bb76eb33ed93ab36c3782295e4a2df6f005 | /Source/ToolCore/Platform/PlatformWindows.cpp | 039abf0add6279b1bea9172294908f9cb47af37a | [
"MIT",
"BSD-3-Clause",
"Zlib",
"LicenseRef-scancode-openssl",
"LicenseRef-scancode-khronos",
"BSL-1.0",
"Apache-2.0",
"LicenseRef-scancode-public-domain",
"BSD-2-Clause",
"NTP"
] | permissive | MrRefactoring/AtomicGameEngine | ff227c054d3758bc1fbd5e502c382d7de81b0d47 | 9cd1bf1d4ae7503794cc3b84b980e4da17ad30bb | refs/heads/master | 2020-12-09T07:24:48.735251 | 2020-01-11T14:03:29 | 2020-01-11T14:03:29 | 233,235,105 | 0 | 0 | NOASSERTION | 2020-01-11T13:21:19 | 2020-01-11T13:21:18 | null | UTF-8 | C++ | false | false | 1,480 | cpp | //
// Copyright (c) 2014-2016 THUNDERBEAST GAMES LLC
//
// 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 "../Project/Project.h"
#include "../Build/BuildWindows.h"
#include "PlatformWindows.h"
namespace ToolCore
{
PlatformWindows::PlatformWindows(Context* context) : Platform(context)
{
}
PlatformWindows::~PlatformWindows()
{
}
BuildBase* PlatformWindows::NewBuild(Project *project)
{
return new BuildWindows(context_, project);
}
}
| [
"josh@galaxyfarfaraway.com"
] | josh@galaxyfarfaraway.com |
5de938dca4df8709c4b64d59103e24ef7162c15a | e6afdf63ef5a32967e750b8fa7f5e806fd5d2a3d | /build-RD3D_GUI-Desktop_42f835-Debug/moc_crystaladvanced.cpp | f628e460fe376626ef7c07149250d38d901f6bd6 | [] | no_license | jdickerson95/qt_RADDDOSE-3D | 0cb35f89c719f48d0e78270ed587d4a8bd8222e3 | e8473cfb37b8febd59b701e63c53fa71188ae451 | refs/heads/master | 2023-08-18T15:44:40.426852 | 2021-09-09T21:22:33 | 2021-09-09T21:22:33 | 364,506,988 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 8,088 | cpp | /****************************************************************************
** Meta object code from reading C++ file 'crystaladvanced.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.9.5)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
#include "../RD3D_GUI/crystaladvanced.h"
#include <QtCore/qbytearray.h>
#include <QtCore/qmetatype.h>
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'crystaladvanced.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 67
#error "This file was generated using the moc from 5.9.5. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"
#endif
QT_BEGIN_MOC_NAMESPACE
QT_WARNING_PUSH
QT_WARNING_DISABLE_DEPRECATED
struct qt_meta_stringdata_CrystalAdvanced_t {
QByteArrayData data[11];
char stringdata0[239];
};
#define QT_MOC_LITERAL(idx, ofs, len) \
Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
qptrdiff(offsetof(qt_meta_stringdata_CrystalAdvanced_t, stringdata0) + ofs \
- idx * sizeof(QByteArrayData)) \
)
static const qt_meta_stringdata_CrystalAdvanced_t qt_meta_stringdata_CrystalAdvanced = {
{
QT_MOC_LITERAL(0, 0, 15), // "CrystalAdvanced"
QT_MOC_LITERAL(1, 16, 8), // "sendData"
QT_MOC_LITERAL(2, 25, 0), // ""
QT_MOC_LITERAL(3, 26, 21), // "on_pushButton_clicked"
QT_MOC_LITERAL(4, 48, 35), // "on_comboBox_containerType_act..."
QT_MOC_LITERAL(5, 84, 4), // "arg1"
QT_MOC_LITERAL(6, 89, 29), // "on_comboBox_Density_activated"
QT_MOC_LITERAL(7, 119, 24), // "on_comboBox_PE_activated"
QT_MOC_LITERAL(8, 144, 28), // "on_pushButton_SurrEl_clicked"
QT_MOC_LITERAL(9, 173, 31), // "on_pushButton_container_clicked"
QT_MOC_LITERAL(10, 205, 33) // "on_comboBox_Surrounding_activ..."
},
"CrystalAdvanced\0sendData\0\0"
"on_pushButton_clicked\0"
"on_comboBox_containerType_activated\0"
"arg1\0on_comboBox_Density_activated\0"
"on_comboBox_PE_activated\0"
"on_pushButton_SurrEl_clicked\0"
"on_pushButton_container_clicked\0"
"on_comboBox_Surrounding_activated"
};
#undef QT_MOC_LITERAL
static const uint qt_meta_data_CrystalAdvanced[] = {
// content:
7, // revision
0, // classname
0, 0, // classinfo
8, 14, // methods
0, 0, // properties
0, 0, // enums/sets
0, 0, // constructors
0, // flags
1, // signalCount
// signals: name, argc, parameters, tag, flags
1, 15, 54, 2, 0x06 /* Public */,
// slots: name, argc, parameters, tag, flags
3, 0, 85, 2, 0x08 /* Private */,
4, 1, 86, 2, 0x08 /* Private */,
6, 1, 89, 2, 0x08 /* Private */,
7, 1, 92, 2, 0x08 /* Private */,
8, 0, 95, 2, 0x08 /* Private */,
9, 0, 96, 2, 0x08 /* Private */,
10, 1, 97, 2, 0x08 /* Private */,
// signals: parameters
QMetaType::Void, QMetaType::QString, QMetaType::QString, QMetaType::QString, QMetaType::QString, QMetaType::QString, QMetaType::QString, QMetaType::QString, QMetaType::QString, QMetaType::QString, QMetaType::QString, QMetaType::QString, QMetaType::QString, QMetaType::QString, QMetaType::QString, QMetaType::QString, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
// slots: parameters
QMetaType::Void,
QMetaType::Void, QMetaType::QString, 5,
QMetaType::Void, QMetaType::QString, 5,
QMetaType::Void, QMetaType::QString, 5,
QMetaType::Void,
QMetaType::Void,
QMetaType::Void, QMetaType::QString, 5,
0 // eod
};
void CrystalAdvanced::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
if (_c == QMetaObject::InvokeMetaMethod) {
CrystalAdvanced *_t = static_cast<CrystalAdvanced *>(_o);
Q_UNUSED(_t)
switch (_id) {
case 0: _t->sendData((*reinterpret_cast< QString(*)>(_a[1])),(*reinterpret_cast< QString(*)>(_a[2])),(*reinterpret_cast< QString(*)>(_a[3])),(*reinterpret_cast< QString(*)>(_a[4])),(*reinterpret_cast< QString(*)>(_a[5])),(*reinterpret_cast< QString(*)>(_a[6])),(*reinterpret_cast< QString(*)>(_a[7])),(*reinterpret_cast< QString(*)>(_a[8])),(*reinterpret_cast< QString(*)>(_a[9])),(*reinterpret_cast< QString(*)>(_a[10])),(*reinterpret_cast< QString(*)>(_a[11])),(*reinterpret_cast< QString(*)>(_a[12])),(*reinterpret_cast< QString(*)>(_a[13])),(*reinterpret_cast< QString(*)>(_a[14])),(*reinterpret_cast< QString(*)>(_a[15]))); break;
case 1: _t->on_pushButton_clicked(); break;
case 2: _t->on_comboBox_containerType_activated((*reinterpret_cast< const QString(*)>(_a[1]))); break;
case 3: _t->on_comboBox_Density_activated((*reinterpret_cast< const QString(*)>(_a[1]))); break;
case 4: _t->on_comboBox_PE_activated((*reinterpret_cast< const QString(*)>(_a[1]))); break;
case 5: _t->on_pushButton_SurrEl_clicked(); break;
case 6: _t->on_pushButton_container_clicked(); break;
case 7: _t->on_comboBox_Surrounding_activated((*reinterpret_cast< const QString(*)>(_a[1]))); break;
default: ;
}
} else if (_c == QMetaObject::IndexOfMethod) {
int *result = reinterpret_cast<int *>(_a[0]);
{
typedef void (CrystalAdvanced::*_t)(QString , QString , QString , QString , QString , QString , QString , QString , QString , QString , QString , QString , QString , QString , QString );
if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&CrystalAdvanced::sendData)) {
*result = 0;
return;
}
}
}
}
const QMetaObject CrystalAdvanced::staticMetaObject = {
{ &QDialog::staticMetaObject, qt_meta_stringdata_CrystalAdvanced.data,
qt_meta_data_CrystalAdvanced, qt_static_metacall, nullptr, nullptr}
};
const QMetaObject *CrystalAdvanced::metaObject() const
{
return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
}
void *CrystalAdvanced::qt_metacast(const char *_clname)
{
if (!_clname) return nullptr;
if (!strcmp(_clname, qt_meta_stringdata_CrystalAdvanced.stringdata0))
return static_cast<void*>(this);
return QDialog::qt_metacast(_clname);
}
int CrystalAdvanced::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = QDialog::qt_metacall(_c, _id, _a);
if (_id < 0)
return _id;
if (_c == QMetaObject::InvokeMetaMethod) {
if (_id < 8)
qt_static_metacall(this, _c, _id, _a);
_id -= 8;
} else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
if (_id < 8)
*reinterpret_cast<int*>(_a[0]) = -1;
_id -= 8;
}
return _id;
}
// SIGNAL 0
void CrystalAdvanced::sendData(QString _t1, QString _t2, QString _t3, QString _t4, QString _t5, QString _t6, QString _t7, QString _t8, QString _t9, QString _t10, QString _t11, QString _t12, QString _t13, QString _t14, QString _t15)
{
void *_a[] = { nullptr, const_cast<void*>(reinterpret_cast<const void*>(&_t1)), const_cast<void*>(reinterpret_cast<const void*>(&_t2)), const_cast<void*>(reinterpret_cast<const void*>(&_t3)), const_cast<void*>(reinterpret_cast<const void*>(&_t4)), const_cast<void*>(reinterpret_cast<const void*>(&_t5)), const_cast<void*>(reinterpret_cast<const void*>(&_t6)), const_cast<void*>(reinterpret_cast<const void*>(&_t7)), const_cast<void*>(reinterpret_cast<const void*>(&_t8)), const_cast<void*>(reinterpret_cast<const void*>(&_t9)), const_cast<void*>(reinterpret_cast<const void*>(&_t10)), const_cast<void*>(reinterpret_cast<const void*>(&_t11)), const_cast<void*>(reinterpret_cast<const void*>(&_t12)), const_cast<void*>(reinterpret_cast<const void*>(&_t13)), const_cast<void*>(reinterpret_cast<const void*>(&_t14)), const_cast<void*>(reinterpret_cast<const void*>(&_t15)) };
QMetaObject::activate(this, &staticMetaObject, 0, _a);
}
QT_WARNING_POP
QT_END_MOC_NAMESPACE
| [
"chesschamp10@googlemail.com"
] | chesschamp10@googlemail.com |
689e79afc4c47954a57501e83dc3ac5cde0268b4 | b7f84817b89817aa9ce576567460b73b53203525 | /src/transport/Acceleration.cc | 47a94ac187585628096ad70aa4c5f32527c0aa3b | [] | no_license | meverson/libdetran | ff7ad67806cc91071ef37e8648dcf6d0febef7d0 | 6f5c72fa909d200beda31caf782da76e67278d94 | refs/heads/master | 2023-02-24T12:32:37.523757 | 2012-09-01T03:29:05 | 2012-09-01T03:29:05 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 5,731 | cc | //----------------------------------*-C++-*----------------------------------//
/*!
* \file Acceleration.cc
* \author Jeremy Roberts
* \date May 17, 2012
* \brief Acceleration member definitions.
* \note Copyright (C) 2012 Jeremy Roberts.
*/
//---------------------------------------------------------------------------//
#include "Acceleration.hh"
#include "Mesh1D.hh"
#include "Mesh2D.hh"
#include "Mesh3D.hh"
#include <iostream>
namespace detran
{
// Constructor
template <class D>
Acceleration<D>::Acceleration(SP_mesh mesh,
SP_material material,
SP_quadrature quadrature)
: b_mesh(mesh)
, b_material(material)
, b_quadrature(quadrature)
{
Require(b_mesh);
Require(b_material);
}
//----------------------------------------------------------------------------//
// Implementation
//----------------------------------------------------------------------------//
template <class D>
void Acceleration<D>::coarsen(int level)
{
using std::cout;
using std::endl;
Require(level > 0);
int dim = D::dimension;
// Number of fine meshes per coarse mesh
int number_fine[dim];
int remainder[dim];
int number_coarse[dim];
vec2_int number_fine_coarse(dim);
vec2_dbl coarse_edges(dim);
b_fine_to_coarse.resize(dim);
b_coarse_edge_flag.resize(dim);
for (int d = 0; d < dim; d++)
{
// Try dividing the fine mesh by the desired level, recording
// any remainder.
number_fine[d] = b_mesh->number_cells_x();
remainder[d] = number_fine[d] % level;
number_coarse[d] = (number_fine[d] - remainder[d]) / level;
// Set fine meshes per coarse to be level.
number_fine_coarse[d].resize(number_coarse[d], level);
// Distribute any remaining fine meshes.
for (int i = 0; i < remainder[d]; i++)
{
number_fine_coarse[d][i] += 1;
}
// Resize the edge and fine to coarse vectors.
coarse_edges[d].resize(number_coarse[d] + 1, 0.0);
b_fine_to_coarse[d].resize(number_fine[d], 0);
b_coarse_edge_flag[d].resize(number_fine[d], 0);
// Fill the mesh edges and the fine to coarse vectors.
int f_start = 0;
int f_stop = 0;
for (int c = 0; c < number_coarse[d]; c++)
{
double edge = coarse_edges[d][c];
f_stop += number_fine_coarse[d][c];
cout << "f_holder = " << f_start << endl;
for (int f = f_start; f < f_stop; f++)
{
edge += b_mesh->width(d, f);
cout << " edge = " << edge << endl;
b_fine_to_coarse[d][f] = c;
}
coarse_edges[d][c + 1] = edge;
f_start += number_fine_coarse[d][c];
}
}
// Octant shift
b_octant_shift.resize(3, vec_int(8, 0));
// mu
b_octant_shift[0][0] = 0;
b_octant_shift[0][1] = 1;
b_octant_shift[0][2] = 1;
b_octant_shift[0][3] = 0;
b_octant_shift[0][4] = 0;
b_octant_shift[0][5] = 1;
b_octant_shift[0][6] = 1;
b_octant_shift[0][7] = 0;
// eta
b_octant_shift[1][0] = 0;
b_octant_shift[1][1] = 0;
b_octant_shift[1][2] = 1;
b_octant_shift[1][3] = 1;
b_octant_shift[1][4] = 0;
b_octant_shift[1][5] = 0;
b_octant_shift[1][6] = 1;
b_octant_shift[1][7] = 1;
// xi
b_octant_shift[2][0] = 0;
b_octant_shift[2][1] = 0;
b_octant_shift[2][2] = 0;
b_octant_shift[2][3] = 0;
b_octant_shift[2][4] = 1;
b_octant_shift[2][5] = 1;
b_octant_shift[2][6] = 1;
b_octant_shift[2][7] = 1;
// Coarse mesh materials. Assume for now that the number of
// groups does not change.
int number_coarse_mesh = 1;
for (int d = 0; d < dim; d++)
{
number_coarse_mesh *= number_coarse[d];
}
// b_coarse_material =
// new Material(number_coarse_mesh, b_material->number_groups());
// Each coarse mesh material is unique.
vec_int coarse_material_map(number_coarse_mesh, 0);
for (int c = 0; c < number_coarse_mesh; c++)
{
coarse_material_map[c] = c;
}
// Create the coarse mesh.
if (dim == 1)
{
b_coarse_mesh = new Mesh1D(coarse_edges[0],
coarse_material_map);
}
else if (dim == 2)
{
b_coarse_mesh = new Mesh2D(coarse_edges[0],
coarse_edges[1],
coarse_material_map);
}
else
{
b_coarse_mesh = new Mesh3D(coarse_edges[0],
coarse_edges[1],
coarse_edges[2],
coarse_material_map);
}
}
//template <class D>
//void Acceleration<D>::homogenize(SP_state state, int group)
//{
// Require(state);
//
// // Get the group flux.
// State::moments_type phi_g = state->phi(group);
//
// int number_coarse = b_coarse_mesh->number_cells();
//
// //vec_dbl phi_bar(number_coarse, 0.0);
// //vec_dbl sigma_t(number_coarse, 0.0);
//
// for (int cell_coarse = 0; cell_coarse < number_coarse; cell_coarse++)
// {
//
// // Temporary homogenized constants.
// double phi_bar = 0.0;
// double volume_coarse = 0.0;
//
// for (int k = 0; k < b_mesh->number_cells_z(); k++)
// {
// for (int j = 0; j < b_mesh->number_cells_y(); j++)
// {
// for (int i = 0; i < b_mesh->number_cells_x(); i++)
// {
// int cell_fine = b_mesh->index(i, j, k);
// double volume_fine = b_mesh->dx(i) * b_mesh->dy(j) * b_mesh->dz(k);
// volume_coarse += volume_fine;
// phi_bar += volume_fine * phi_g[cell_fine];
// }
// }
// }
// phi_bar /= volume_coarse;
//
// } // end coarse cell loop
//
// // Loop through all coarse mesh cells
// // Loop through all fine mesh cells in the coarse mesh cell
// // Loop through all groups
// // Compute the average group constants
//
//}
} // end namespace detran
| [
"robertsj@mit.edu"
] | robertsj@mit.edu |
2417f616430c864fded20b091973f0a41c874542 | 43a54d76227b48d851a11cc30bbe4212f59e1154 | /cwp/include/tencentcloud/cwp/v20180228/model/DescribeVulScanResultRequest.h | 0c624eb7ed0b821db0eac91b7fbcd799ec504522 | [
"Apache-2.0"
] | permissive | make1122/tencentcloud-sdk-cpp | 175ce4d143c90d7ea06f2034dabdb348697a6c1c | 2af6954b2ee6c9c9f61489472b800c8ce00fb949 | refs/heads/master | 2023-06-04T03:18:47.169750 | 2021-06-18T03:00:01 | 2021-06-18T03:00:01 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,564 | h | /*
* Copyright (c) 2017-2019 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef TENCENTCLOUD_CWP_V20180228_MODEL_DESCRIBEVULSCANRESULTREQUEST_H_
#define TENCENTCLOUD_CWP_V20180228_MODEL_DESCRIBEVULSCANRESULTREQUEST_H_
#include <string>
#include <vector>
#include <map>
#include <tencentcloud/core/AbstractModel.h>
namespace TencentCloud
{
namespace Cwp
{
namespace V20180228
{
namespace Model
{
/**
* DescribeVulScanResult请求参数结构体
*/
class DescribeVulScanResultRequest : public AbstractModel
{
public:
DescribeVulScanResultRequest();
~DescribeVulScanResultRequest() = default;
std::string ToJsonString() const;
private:
};
}
}
}
}
#endif // !TENCENTCLOUD_CWP_V20180228_MODEL_DESCRIBEVULSCANRESULTREQUEST_H_
| [
"tencentcloudapi@tenent.com"
] | tencentcloudapi@tenent.com |
b939e09556a161caa692d93294d9a7e2d304d2de | 91e3e30fd6ccc085ca9dccb5c91445fa9ab156a2 | /Sources/Core/XML/dom_notation.cpp | 1a080c3ce54fa7260bafa4579f07069ddae8d741 | [
"Zlib"
] | permissive | Pyrdacor/ClanLib | 1bc4d933751773e5bca5c3c544d29f351a2377fb | 72426fd445b59aa0b2e568c65ceccc0b3ed6fcdb | refs/heads/master | 2020-04-06T06:41:34.252331 | 2014-10-03T21:47:06 | 2014-10-03T21:47:06 | 23,551,359 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,917 | cpp | /*
** ClanLib SDK
** Copyright (c) 1997-2013 The ClanLib Team
**
** This software is provided 'as-is', without any express or implied
** warranty. In no event will the authors be held liable for any damages
** arising from the use of this software.
**
** Permission is granted to anyone to use this software for any purpose,
** including commercial applications, and to alter it and redistribute it
** freely, subject to the following restrictions:
**
** 1. The origin of this software must not be misrepresented; you must not
** claim that you wrote the original software. If you use this software
** in a product, an acknowledgment in the product documentation would be
** appreciated but is not required.
** 2. Altered source versions must be plainly marked as such, and must not be
** misrepresented as being the original software.
** 3. This notice may not be removed or altered from any source distribution.
**
** Note: Some of the libraries ClanLib may link to may have additional
** requirements or restrictions.
**
** File Author(s):
**
** Magnus Norddahl
*/
#include "Core/precomp.h"
#include "API/Core/XML/dom_notation.h"
namespace clan
{
/////////////////////////////////////////////////////////////////////////////
// DomNotation construction:
DomNotation::DomNotation()
{
}
DomNotation::DomNotation(const std::shared_ptr<DomNode_Impl> &impl) : DomNode(impl)
{
}
DomNotation::~DomNotation()
{
}
/////////////////////////////////////////////////////////////////////////////
// DomNotation attributes:
DomString DomNotation::get_public_id() const
{
return DomString();
}
DomString DomNotation::get_system_id() const
{
return DomString();
}
/////////////////////////////////////////////////////////////////////////////
// DomNotation operations:
/////////////////////////////////////////////////////////////////////////////
// DomNotation implementation:
}
| [
"rombust@hotmail.co.uk"
] | rombust@hotmail.co.uk |
79bb9c3ff71d521a984ef4086cefe23e3757356d | 208c17023ec65533acd866853170a8616406bb00 | /NCGame/Engine/id.h | db2a31f230338dab6c8d8924f1b3053e6f99d9c7 | [] | no_license | littleghostprince/Game---GameLibaryClass | 4ac15476fad1d36ae5044bc5a8a8877a28ce792d | 9bc9fc2ad9b045ee39f844e7731ca334e2b879e6 | refs/heads/master | 2021-07-25T09:48:46.662928 | 2018-11-30T07:30:50 | 2018-11-30T07:30:50 | 138,767,817 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 447 | h | #pragma once
#include <string>
#include "Engine.h"
class ENGINE_API ID
{
public:
ID();
ID(const std::string& id) : m_id(id) {}
ID(const char* id) : m_id(id){}
bool operator == (const ID& id) const { return m_id == id.m_id; }
bool operator != (const ID& id) const { return m_id != id.m_id; }
bool IsValid() const
{
return (m_id != "");
}
static size_t ms_uniqueID;
static std::string GetUniqueID();
protected:
std::string m_id;
}; | [
"amejia@student.neumont.edu"
] | amejia@student.neumont.edu |
ae7cf5a95e94791173d3840766a6645037b49465 | bc22ab9dee1fd2bdde6b93b1f4492b9de26e7517 | /libseq66/include/ctrl/midicontrol.hpp | 29be5a74ac90b63daece1a30de952c81620e19b0 | [] | no_license | henning/seq66 | c66418cabfeb738b6e91535783daf6f3f503b0db | 49c87492770d0a49569d95e4be4f6b2e037c8430 | refs/heads/master | 2023-01-22T16:07:02.522366 | 2020-11-30T19:27:34 | 2020-11-30T19:27:34 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 8,195 | hpp | #if ! defined SEQ66_MIDICONTROL_HPP
#define SEQ66_MIDICONTROL_HPP
/*
* This file is part of seq66.
*
* seq66 is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* seq66 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 seq66; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/**
* \file midicontrol.hpp
*
* This module declares/defines the class for handling MIDI control data for
* the application.
*
* \library seq66 application
* \author Chris Ahlstrom
* \date 2018-11-09
* \updates 2019-03-24
* \license GNU GPLv2 or above
*
* This module defines a number of constants relating to control of pattern
* unmuting, group control, and a number of additional controls to make
* Seq66 controllable without a graphical user interface.
*
* It requires C++11 and above.
*
* Concept:
* Status bits:
*
* See the top banner in the automation.cpp module.
*/
#include "ctrl/keycontrol.hpp" /* seq66::keycontrol class */
#include "midi/event.hpp" /* seq66::event class */
/*
* Do not document a namespace; it breaks Doxygen.
*/
namespace seq66
{
/**
* This class contains the MIDI control information for sequences that make
* up a live set. It defines a single MIDI control. It is derived from
* keycontrol so that we can store a whole control section stanza, including
* the key name, in one configuration stanza.
*
* Note that, although we've converted this to a full-fledged class, the
* ordering of variables and the data arrays used to fill them is very
* significant. See the midifile and optionsfile modules.
*/
class midicontrol : public keycontrol
{
public:
/**
* Provides a key for looking up a MIDI control in the midicontainer.
* When doing a lookup, the status and first data byte must match. Once
* found, if the minimum and maximum byte values are not 0, then the
* range is also checked. This object is easily filled via
* event::get_status() and event::get_data(). We might provide an
* event-parameter constructor.
*/
class key
{
friend class midicontrol;
private:
midibyte m_status; /**< Provides the (incoming) event type. */
midibyte m_d0; /**< Provides the first byte, for searches. */
midibyte m_d1; /**< Provides the second byte, for ranging. */
public:
key (midibyte status, midibyte d0, midibyte d1 = 0) :
m_status (status),
m_d0 (d0),
m_d1 (d1)
{
// no code
}
key (const event & ev) :
m_status (ev.get_status()),
m_d0 (0),
m_d1 (0)
{
ev.get_data(m_d0, m_d1);
}
bool operator < (const key & rhs) const
{
return (m_status == rhs.m_status) ?
(m_d0 < rhs.m_d0) : (m_status < rhs.m_status) ;
}
midibyte status () const
{
return m_status;
}
midibyte d0 () const
{
return m_d0;
}
midibyte d1 () const
{
return m_d1;
}
}; // nested class key
private:
/**
* Provides the value for active. If false, this control will be
* ignored.
*/
bool m_active;
/**
* Provides the value for inverse-active.
*/
bool m_inverse_active;
/**
* Provides the value for the status. Big question is, is the channel
* included here? Yes. So the next question is, is it ignored? We
* don't think so.
*/
midibyte m_status;
/**
* Provides the value for the first data byte of the event, d0.
* Useful for searches and for incoming data.
*/
midibyte m_d0;
/**
* Provides the second data byte, d1. Useful only with exact matches.
* TBD.
*/
midibyte m_d1;
/**
* Provides the minimum value for the second data byte of the event, d1,
* if applicable.
*/
midibyte m_min_value;
/**
* Provides the maximum value for the second data byte of the event, d1,
* if applicable.
*/
midibyte m_max_value;
public:
/*
* A default constructor is needed to provide a dummy object to return
* when the desired one cannot be found. The opcontrol::is_usable()
* function will return false.
*/
midicontrol ();
/*
* The move and copy constructors, the move and copy assignment operators,
* and the destructors are all compiler generated.
*/
midicontrol
(
const std::string & keyname,
automation::category opcategory,
automation::action actioncode,
automation::slot opnumber,
int opcode
);
midicontrol (const midicontrol &) = default;
midicontrol & operator = (const midicontrol &) = default;
midicontrol (midicontrol &&) = default;
midicontrol & operator = (midicontrol &&) = default;
virtual ~midicontrol () = default;
bool active () const
{
return m_active;
}
bool inverse_active () const
{
return m_inverse_active;
}
int status () const
{
return m_status;
}
int d0 () const
{
return m_d0;
}
int d1 () const
{
return m_d1;
}
int min_value () const
{
return m_min_value;
}
int max_value () const
{
return m_max_value;
}
/*
* This test does not include "inverse".
*/
bool blank () const
{
return
(
! m_active && m_status == 0 && m_d0 == 0 &&
m_d1 == 0 && m_min_value == 0 && m_max_value == 0
);
}
/**
* Not so sure if this really saves trouble for the caller. It fits in
* with the big-ass sscanf() call in midicontrolfile.
*
* \param values
* Provides the 6 values, in an integer array, to set into the
* members in this order: m_control_code, m_action, m_active,
* m_inverse_active, m_status, m_d0, m_min_value, and m_max_value.
*/
void set (int values [automation::SUBCOUNT])
{
m_active = bool(values[0]);
m_inverse_active = bool(values[1]);
m_status = values[2];
m_d0 = values[3];
m_min_value = values[4];
m_max_value = values[5];
}
/**
* Handles a common check in the perform module.
*
* \param status
* Provides the status byte, which is checked against m_status.
*
* \param d0
* Provides the data byte, which is checked against m_d0.
*/
bool match (midibyte status, midibyte d0) const
{
return
(
m_active && (status == m_status) && (d0 == m_d0)
);
}
/**
* Handles a common check in the perform module.
*/
bool in_range (midibyte d1) const
{
return d1 >= midibyte(m_min_value) && d1 <= midibyte(m_max_value);
}
/**
* Another version for quick key comparison.
*/
bool in_range (const key & k) const
{
return in_range(k.m_d1);
}
public:
key make_key () const
{
return key(m_status, m_d0); /* no usage of m_d1 needed here */
}
bool merge_key_match (automation::category c, int opslot) const;
void show (bool add_newline = true) const;
}; // class midicontrol
} // namespace seq66
#endif // SEQ66_MIDICONTROL_HPP
/*
* midicontrol.hpp
*
* vim: sw=4 ts=4 wm=4 et ft=cpp
*/
| [
"ahlstromcj@gmail.com"
] | ahlstromcj@gmail.com |
d01fcdad64de72732cbaddc751a2e3be796d1506 | 730304a54837bf3db66850f67732426f655cec09 | /src/extern/proteowizard/install/include/pwiz/utility/misc/Stream.hpp | a84f5553411c4bc40c85f593e0caa57526792765 | [] | no_license | wolski/bibliospec2.0 | 594e852dccad921ad9efe9c55c8616c0fd125f7b | c3a9b5d155e9c02fa0b7e9f1dcb15346dd78ee31 | refs/heads/master | 2021-01-10T01:54:58.755873 | 2015-09-28T11:16:59 | 2015-09-28T11:16:59 | 43,296,719 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,045 | hpp | //
// $Id: Stream.hpp 2051 2010-06-15 18:39:13Z chambm $
//
//
// Original author: Matt Chambers <matt.chambers .@. vanderbilt.edu>
//
// Copyright 2008 Spielberg Family Center for Applied Proteomics
// Cedars Sinai Medical Center, Los Angeles, California 90048
// Copyright 2008 Vanderbilt University - Nashville, TN 37232
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
#include <iostream>
#include <fstream>
#include <sstream>
#include <iomanip>
#include <boost/iostreams/operations.hpp>
#include "pwiz/utility/misc/optimized_lexical_cast.hpp"
namespace bio = boost::iostreams;
using std::ios;
using std::iostream;
using std::istream;
using std::ostream;
using std::istream_iterator;
using std::ostream_iterator;
using std::fstream;
using std::ifstream;
using std::ofstream;
using std::stringstream;
using std::istringstream;
using std::ostringstream;
using std::wstringstream;
using std::wistringstream;
using std::wostringstream;
using std::getline;
using std::streampos;
using std::streamoff;
using std::streamsize;
using std::cin;
using std::cout;
using std::cerr;
using std::endl;
using std::flush;
using std::setprecision;
using std::setw;
using std::setfill;
using std::setbase;
using std::showbase;
using std::showpoint;
using std::showpos;
using std::boolalpha;
using std::noshowbase;
using std::noshowpoint;
using std::noshowpos;
using std::noboolalpha;
using std::fixed;
using std::scientific;
using std::dec;
using std::oct;
using std::hex;
using boost::lexical_cast;
using boost::bad_lexical_cast;
| [
"wewolski@gmail.com"
] | wewolski@gmail.com |
cdd62d4593a638d93b5ab7d992782083d11e8d37 | a1d1c356e615912bda7e698606116974714111ea | /engine.h | d7be12b05c31171722fdff0e86eb74683becc5fd | [] | no_license | garmelito/zap-puzzle | a97ea8a0a8c4aa9501369940e64278e19b86dcdd | 34786cbecd676ddc4908077d1f63f7ae11c3f196 | refs/heads/master | 2021-01-23T23:45:44.937174 | 2018-09-22T10:11:15 | 2018-09-22T10:11:15 | 122,734,506 | 0 | 0 | null | 2018-05-30T15:50:22 | 2018-02-24T11:27:56 | C++ | UTF-8 | C++ | false | false | 621 | h | #ifndef ENGINE_H
#define ENGINE_H
#include "node.h"
#include "point.h"
#include <string>
using namespace std;
/**
* \file engine.h
* \brief funkcje wymagane do pobrania danych, sprawdzenia ich i dzialania algorytmu A*
*/
bool readFromFile (string nazwa, int matrix[][3]);
void draw (int table[]);
bool solutionIsPosible(int matrix[][3]);
bool inRules(int matrix[][3]);
void transferToClosedset (Node *&closedset, Node *openset);
void moveMaker (Node *openset, Node *closedset, Point luka, int obok_y, int obok_x);
Node *reconstructPath (Node *openset);
void extermination (Node *&head);
#endif // ENGINE_H
| [
"pwachowicz98@gmail.com"
] | pwachowicz98@gmail.com |
2c43330e4b455fb3b830a4e1cda8b9c2e203f2fa | 84d7ed3b334e2da9d43946037e3fd65fcbda2eaa | /main.cc | 3bc4ebb8fe1da9a1811273f043076ef15080e54b | [] | no_license | WenderZhou/simd | 4d5089d45c829df31abfe54abd6f9f57edb57daa | 1f8e3a989e2202c2c3e1ade17ee13c5351f8ad30 | refs/heads/master | 2022-09-29T23:41:07.370154 | 2020-05-30T15:07:27 | 2020-05-30T15:07:27 | 266,812,171 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,165 | cc | #include <stdio.h>
#include "string.h"
#include "pic.h"
#include "solution.h"
#include "time.h"
using namespace std;
int main()
{
YUV YUV_src;
YUV YUV_dst;
Basic* basic = new Basic();
MMX* mmx = new MMX();
SSE2* sse2 = new SSE2();
AVX* avx = new AVX();
char srcPath[20] = "dem1.yuv";
char dstPath[20] = "result.yuv";
YUV_src.Load(srcPath);
clock_t start1, end1;
clock_t start2, end2;
clock_t start3, end3;
clock_t start4, end4;
start1 = clock();
basic->Transform(YUV_src, YUV_dst, 128);
end1 = clock();
printf("Basic ISA: %f\n", (double)(end1 - start1) / CLOCKS_PER_SEC);
// start2 = clock();
// mmx->Transform(YUV_src, YUV_dst, 128);
// end2 = clock();
// printf("MMX: %f\n", (double)(end2 - start2) / CLOCKS_PER_SEC);
start3 = clock();
sse2->Transform(YUV_src, YUV_dst, 128);
end3 = clock();
printf("SSE2: %f\n", (double)(end3 - start3) / CLOCKS_PER_SEC);
start4 = clock();
avx->Transform(YUV_src, YUV_dst, 128);
end4 = clock();
printf("AVX: %f\n", (double)(end4 - start4) / CLOCKS_PER_SEC);
YUV_dst.Store(dstPath);
return 0;
} | [
"="
] | = |
470dc47a90f6f718550e9f317bdabf6afd770d4b | c776476e9d06b3779d744641e758ac3a2c15cddc | /examples/litmus/c/run-scripts/tmp_5/MP+dmb.sy+ctrl-addr-data-rfi-addr.c.cbmc.cpp | c9ecae9eef5a4c8d77096639454904e52e2e80b8 | [] | no_license | ashutosh0gupta/llvm_bmc | aaac7961c723ba6f7ffd77a39559e0e52432eade | 0287c4fb180244e6b3c599a9902507f05c8a7234 | refs/heads/master | 2023-08-02T17:14:06.178723 | 2023-07-31T10:46:53 | 2023-07-31T10:46:53 | 143,100,825 | 3 | 4 | null | 2023-05-25T05:50:55 | 2018-08-01T03:47:00 | C++ | UTF-8 | C++ | false | false | 56,114 | cpp | // Global variabls:
// 0:vars:5
// 7:atom_1_X11_0:1
// 5:atom_1_X0_1:1
// 6:atom_1_X9_1:1
// Local global variabls:
// 0:thr0:1
// 1:thr1:1
#define ADDRSIZE 8
#define LOCALADDRSIZE 2
#define NTHREAD 3
#define NCONTEXT 5
#define ASSUME(stmt) __CPROVER_assume(stmt)
#define ASSERT(stmt) __CPROVER_assert(stmt, "error")
#define max(a,b) (a>b?a:b)
char __get_rng();
char get_rng( char from, char to ) {
char ret = __get_rng();
ASSUME(ret >= from && ret <= to);
return ret;
}
char get_rng_th( char from, char to ) {
char ret = __get_rng();
ASSUME(ret >= from && ret <= to);
return ret;
}
int main(int argc, char **argv) {
// Declare arrays for intial value version in contexts
int local_mem[LOCALADDRSIZE];
// Dumping initializations
local_mem[0+0] = 0;
local_mem[1+0] = 0;
int cstart[NTHREAD];
int creturn[NTHREAD];
// declare arrays for contexts activity
int active[NCONTEXT];
int ctx_used[NCONTEXT];
// declare arrays for intial value version in contexts
int meminit_[ADDRSIZE*NCONTEXT];
#define meminit(x,k) meminit_[(x)*NCONTEXT+k]
int coinit_[ADDRSIZE*NCONTEXT];
#define coinit(x,k) coinit_[(x)*NCONTEXT+k]
int deltainit_[ADDRSIZE*NCONTEXT];
#define deltainit(x,k) deltainit_[(x)*NCONTEXT+k]
// declare arrays for running value version in contexts
int mem_[ADDRSIZE*NCONTEXT];
#define mem(x,k) mem_[(x)*NCONTEXT+k]
int co_[ADDRSIZE*NCONTEXT];
#define co(x,k) co_[(x)*NCONTEXT+k]
int delta_[ADDRSIZE*NCONTEXT];
#define delta(x,k) delta_[(x)*NCONTEXT+k]
// declare arrays for local buffer and observed writes
int buff_[NTHREAD*ADDRSIZE];
#define buff(x,k) buff_[(x)*ADDRSIZE+k]
int pw_[NTHREAD*ADDRSIZE];
#define pw(x,k) pw_[(x)*ADDRSIZE+k]
// declare arrays for context stamps
char cr_[NTHREAD*ADDRSIZE];
#define cr(x,k) cr_[(x)*ADDRSIZE+k]
char iw_[NTHREAD*ADDRSIZE];
#define iw(x,k) iw_[(x)*ADDRSIZE+k]
char cw_[NTHREAD*ADDRSIZE];
#define cw(x,k) cw_[(x)*ADDRSIZE+k]
char cx_[NTHREAD*ADDRSIZE];
#define cx(x,k) cx_[(x)*ADDRSIZE+k]
char is_[NTHREAD*ADDRSIZE];
#define is(x,k) is_[(x)*ADDRSIZE+k]
char cs_[NTHREAD*ADDRSIZE];
#define cs(x,k) cs_[(x)*ADDRSIZE+k]
char crmax_[NTHREAD*ADDRSIZE];
#define crmax(x,k) crmax_[(x)*ADDRSIZE+k]
char sforbid_[ADDRSIZE*NCONTEXT];
#define sforbid(x,k) sforbid_[(x)*NCONTEXT+k]
// declare arrays for synchronizations
int cl[NTHREAD];
int cdy[NTHREAD];
int cds[NTHREAD];
int cdl[NTHREAD];
int cisb[NTHREAD];
int caddr[NTHREAD];
int cctrl[NTHREAD];
__LOCALS__
buff(0,0) = 0;
pw(0,0) = 0;
cr(0,0) = 0;
iw(0,0) = 0;
cw(0,0) = 0;
cx(0,0) = 0;
is(0,0) = 0;
cs(0,0) = 0;
crmax(0,0) = 0;
buff(0,1) = 0;
pw(0,1) = 0;
cr(0,1) = 0;
iw(0,1) = 0;
cw(0,1) = 0;
cx(0,1) = 0;
is(0,1) = 0;
cs(0,1) = 0;
crmax(0,1) = 0;
buff(0,2) = 0;
pw(0,2) = 0;
cr(0,2) = 0;
iw(0,2) = 0;
cw(0,2) = 0;
cx(0,2) = 0;
is(0,2) = 0;
cs(0,2) = 0;
crmax(0,2) = 0;
buff(0,3) = 0;
pw(0,3) = 0;
cr(0,3) = 0;
iw(0,3) = 0;
cw(0,3) = 0;
cx(0,3) = 0;
is(0,3) = 0;
cs(0,3) = 0;
crmax(0,3) = 0;
buff(0,4) = 0;
pw(0,4) = 0;
cr(0,4) = 0;
iw(0,4) = 0;
cw(0,4) = 0;
cx(0,4) = 0;
is(0,4) = 0;
cs(0,4) = 0;
crmax(0,4) = 0;
buff(0,5) = 0;
pw(0,5) = 0;
cr(0,5) = 0;
iw(0,5) = 0;
cw(0,5) = 0;
cx(0,5) = 0;
is(0,5) = 0;
cs(0,5) = 0;
crmax(0,5) = 0;
buff(0,6) = 0;
pw(0,6) = 0;
cr(0,6) = 0;
iw(0,6) = 0;
cw(0,6) = 0;
cx(0,6) = 0;
is(0,6) = 0;
cs(0,6) = 0;
crmax(0,6) = 0;
buff(0,7) = 0;
pw(0,7) = 0;
cr(0,7) = 0;
iw(0,7) = 0;
cw(0,7) = 0;
cx(0,7) = 0;
is(0,7) = 0;
cs(0,7) = 0;
crmax(0,7) = 0;
cl[0] = 0;
cdy[0] = 0;
cds[0] = 0;
cdl[0] = 0;
cisb[0] = 0;
caddr[0] = 0;
cctrl[0] = 0;
cstart[0] = get_rng(0,NCONTEXT-1);
creturn[0] = get_rng(0,NCONTEXT-1);
buff(1,0) = 0;
pw(1,0) = 0;
cr(1,0) = 0;
iw(1,0) = 0;
cw(1,0) = 0;
cx(1,0) = 0;
is(1,0) = 0;
cs(1,0) = 0;
crmax(1,0) = 0;
buff(1,1) = 0;
pw(1,1) = 0;
cr(1,1) = 0;
iw(1,1) = 0;
cw(1,1) = 0;
cx(1,1) = 0;
is(1,1) = 0;
cs(1,1) = 0;
crmax(1,1) = 0;
buff(1,2) = 0;
pw(1,2) = 0;
cr(1,2) = 0;
iw(1,2) = 0;
cw(1,2) = 0;
cx(1,2) = 0;
is(1,2) = 0;
cs(1,2) = 0;
crmax(1,2) = 0;
buff(1,3) = 0;
pw(1,3) = 0;
cr(1,3) = 0;
iw(1,3) = 0;
cw(1,3) = 0;
cx(1,3) = 0;
is(1,3) = 0;
cs(1,3) = 0;
crmax(1,3) = 0;
buff(1,4) = 0;
pw(1,4) = 0;
cr(1,4) = 0;
iw(1,4) = 0;
cw(1,4) = 0;
cx(1,4) = 0;
is(1,4) = 0;
cs(1,4) = 0;
crmax(1,4) = 0;
buff(1,5) = 0;
pw(1,5) = 0;
cr(1,5) = 0;
iw(1,5) = 0;
cw(1,5) = 0;
cx(1,5) = 0;
is(1,5) = 0;
cs(1,5) = 0;
crmax(1,5) = 0;
buff(1,6) = 0;
pw(1,6) = 0;
cr(1,6) = 0;
iw(1,6) = 0;
cw(1,6) = 0;
cx(1,6) = 0;
is(1,6) = 0;
cs(1,6) = 0;
crmax(1,6) = 0;
buff(1,7) = 0;
pw(1,7) = 0;
cr(1,7) = 0;
iw(1,7) = 0;
cw(1,7) = 0;
cx(1,7) = 0;
is(1,7) = 0;
cs(1,7) = 0;
crmax(1,7) = 0;
cl[1] = 0;
cdy[1] = 0;
cds[1] = 0;
cdl[1] = 0;
cisb[1] = 0;
caddr[1] = 0;
cctrl[1] = 0;
cstart[1] = get_rng(0,NCONTEXT-1);
creturn[1] = get_rng(0,NCONTEXT-1);
buff(2,0) = 0;
pw(2,0) = 0;
cr(2,0) = 0;
iw(2,0) = 0;
cw(2,0) = 0;
cx(2,0) = 0;
is(2,0) = 0;
cs(2,0) = 0;
crmax(2,0) = 0;
buff(2,1) = 0;
pw(2,1) = 0;
cr(2,1) = 0;
iw(2,1) = 0;
cw(2,1) = 0;
cx(2,1) = 0;
is(2,1) = 0;
cs(2,1) = 0;
crmax(2,1) = 0;
buff(2,2) = 0;
pw(2,2) = 0;
cr(2,2) = 0;
iw(2,2) = 0;
cw(2,2) = 0;
cx(2,2) = 0;
is(2,2) = 0;
cs(2,2) = 0;
crmax(2,2) = 0;
buff(2,3) = 0;
pw(2,3) = 0;
cr(2,3) = 0;
iw(2,3) = 0;
cw(2,3) = 0;
cx(2,3) = 0;
is(2,3) = 0;
cs(2,3) = 0;
crmax(2,3) = 0;
buff(2,4) = 0;
pw(2,4) = 0;
cr(2,4) = 0;
iw(2,4) = 0;
cw(2,4) = 0;
cx(2,4) = 0;
is(2,4) = 0;
cs(2,4) = 0;
crmax(2,4) = 0;
buff(2,5) = 0;
pw(2,5) = 0;
cr(2,5) = 0;
iw(2,5) = 0;
cw(2,5) = 0;
cx(2,5) = 0;
is(2,5) = 0;
cs(2,5) = 0;
crmax(2,5) = 0;
buff(2,6) = 0;
pw(2,6) = 0;
cr(2,6) = 0;
iw(2,6) = 0;
cw(2,6) = 0;
cx(2,6) = 0;
is(2,6) = 0;
cs(2,6) = 0;
crmax(2,6) = 0;
buff(2,7) = 0;
pw(2,7) = 0;
cr(2,7) = 0;
iw(2,7) = 0;
cw(2,7) = 0;
cx(2,7) = 0;
is(2,7) = 0;
cs(2,7) = 0;
crmax(2,7) = 0;
cl[2] = 0;
cdy[2] = 0;
cds[2] = 0;
cdl[2] = 0;
cisb[2] = 0;
caddr[2] = 0;
cctrl[2] = 0;
cstart[2] = get_rng(0,NCONTEXT-1);
creturn[2] = get_rng(0,NCONTEXT-1);
// Dumping initializations
mem(0+0,0) = 0;
mem(0+1,0) = 0;
mem(0+2,0) = 0;
mem(0+3,0) = 0;
mem(0+4,0) = 0;
mem(7+0,0) = 0;
mem(5+0,0) = 0;
mem(6+0,0) = 0;
// Dumping context matching equalities
co(0,0) = 0;
delta(0,0) = -1;
mem(0,1) = meminit(0,1);
co(0,1) = coinit(0,1);
delta(0,1) = deltainit(0,1);
mem(0,2) = meminit(0,2);
co(0,2) = coinit(0,2);
delta(0,2) = deltainit(0,2);
mem(0,3) = meminit(0,3);
co(0,3) = coinit(0,3);
delta(0,3) = deltainit(0,3);
mem(0,4) = meminit(0,4);
co(0,4) = coinit(0,4);
delta(0,4) = deltainit(0,4);
co(1,0) = 0;
delta(1,0) = -1;
mem(1,1) = meminit(1,1);
co(1,1) = coinit(1,1);
delta(1,1) = deltainit(1,1);
mem(1,2) = meminit(1,2);
co(1,2) = coinit(1,2);
delta(1,2) = deltainit(1,2);
mem(1,3) = meminit(1,3);
co(1,3) = coinit(1,3);
delta(1,3) = deltainit(1,3);
mem(1,4) = meminit(1,4);
co(1,4) = coinit(1,4);
delta(1,4) = deltainit(1,4);
co(2,0) = 0;
delta(2,0) = -1;
mem(2,1) = meminit(2,1);
co(2,1) = coinit(2,1);
delta(2,1) = deltainit(2,1);
mem(2,2) = meminit(2,2);
co(2,2) = coinit(2,2);
delta(2,2) = deltainit(2,2);
mem(2,3) = meminit(2,3);
co(2,3) = coinit(2,3);
delta(2,3) = deltainit(2,3);
mem(2,4) = meminit(2,4);
co(2,4) = coinit(2,4);
delta(2,4) = deltainit(2,4);
co(3,0) = 0;
delta(3,0) = -1;
mem(3,1) = meminit(3,1);
co(3,1) = coinit(3,1);
delta(3,1) = deltainit(3,1);
mem(3,2) = meminit(3,2);
co(3,2) = coinit(3,2);
delta(3,2) = deltainit(3,2);
mem(3,3) = meminit(3,3);
co(3,3) = coinit(3,3);
delta(3,3) = deltainit(3,3);
mem(3,4) = meminit(3,4);
co(3,4) = coinit(3,4);
delta(3,4) = deltainit(3,4);
co(4,0) = 0;
delta(4,0) = -1;
mem(4,1) = meminit(4,1);
co(4,1) = coinit(4,1);
delta(4,1) = deltainit(4,1);
mem(4,2) = meminit(4,2);
co(4,2) = coinit(4,2);
delta(4,2) = deltainit(4,2);
mem(4,3) = meminit(4,3);
co(4,3) = coinit(4,3);
delta(4,3) = deltainit(4,3);
mem(4,4) = meminit(4,4);
co(4,4) = coinit(4,4);
delta(4,4) = deltainit(4,4);
co(5,0) = 0;
delta(5,0) = -1;
mem(5,1) = meminit(5,1);
co(5,1) = coinit(5,1);
delta(5,1) = deltainit(5,1);
mem(5,2) = meminit(5,2);
co(5,2) = coinit(5,2);
delta(5,2) = deltainit(5,2);
mem(5,3) = meminit(5,3);
co(5,3) = coinit(5,3);
delta(5,3) = deltainit(5,3);
mem(5,4) = meminit(5,4);
co(5,4) = coinit(5,4);
delta(5,4) = deltainit(5,4);
co(6,0) = 0;
delta(6,0) = -1;
mem(6,1) = meminit(6,1);
co(6,1) = coinit(6,1);
delta(6,1) = deltainit(6,1);
mem(6,2) = meminit(6,2);
co(6,2) = coinit(6,2);
delta(6,2) = deltainit(6,2);
mem(6,3) = meminit(6,3);
co(6,3) = coinit(6,3);
delta(6,3) = deltainit(6,3);
mem(6,4) = meminit(6,4);
co(6,4) = coinit(6,4);
delta(6,4) = deltainit(6,4);
co(7,0) = 0;
delta(7,0) = -1;
mem(7,1) = meminit(7,1);
co(7,1) = coinit(7,1);
delta(7,1) = deltainit(7,1);
mem(7,2) = meminit(7,2);
co(7,2) = coinit(7,2);
delta(7,2) = deltainit(7,2);
mem(7,3) = meminit(7,3);
co(7,3) = coinit(7,3);
delta(7,3) = deltainit(7,3);
mem(7,4) = meminit(7,4);
co(7,4) = coinit(7,4);
delta(7,4) = deltainit(7,4);
// Dumping thread 1
int ret_thread_1 = 0;
cdy[1] = get_rng(0,NCONTEXT-1);
ASSUME(cdy[1] >= cstart[1]);
T1BLOCK0:
// call void @llvm.dbg.value(metadata i8* %arg, metadata !38, metadata !DIExpression()), !dbg !47
// br label %label_1, !dbg !48
goto T1BLOCK1;
T1BLOCK1:
// call void @llvm.dbg.label(metadata !46), !dbg !49
// call void @llvm.dbg.value(metadata i64* getelementptr inbounds ([5 x i64], [5 x i64]* @vars, i64 0, i64 0), metadata !39, metadata !DIExpression()), !dbg !50
// call void @llvm.dbg.value(metadata i64 1, metadata !42, metadata !DIExpression()), !dbg !50
// store atomic i64 1, i64* getelementptr inbounds ([5 x i64], [5 x i64]* @vars, i64 0, i64 0) monotonic, align 8, !dbg !51
// ST: Guess
iw(1,0) = get_rng(0,NCONTEXT-1);// 1 ASSIGN STIW _l21_c3
old_cw = cw(1,0);
cw(1,0) = get_rng(0,NCONTEXT-1);// 1 ASSIGN STCOM _l21_c3
// Check
ASSUME(active[iw(1,0)] == 1);
ASSUME(active[cw(1,0)] == 1);
ASSUME(sforbid(0,cw(1,0))== 0);
ASSUME(iw(1,0) >= 0);
ASSUME(iw(1,0) >= 0);
ASSUME(cw(1,0) >= iw(1,0));
ASSUME(cw(1,0) >= old_cw);
ASSUME(cw(1,0) >= cr(1,0));
ASSUME(cw(1,0) >= cl[1]);
ASSUME(cw(1,0) >= cisb[1]);
ASSUME(cw(1,0) >= cdy[1]);
ASSUME(cw(1,0) >= cdl[1]);
ASSUME(cw(1,0) >= cds[1]);
ASSUME(cw(1,0) >= cctrl[1]);
ASSUME(cw(1,0) >= caddr[1]);
// Update
caddr[1] = max(caddr[1],0);
buff(1,0) = 1;
mem(0,cw(1,0)) = 1;
co(0,cw(1,0))+=1;
delta(0,cw(1,0)) = -1;
ASSUME(creturn[1] >= cw(1,0));
// call void (...) @dmbsy(), !dbg !52
// dumbsy: Guess
old_cdy = cdy[1];
cdy[1] = get_rng(0,NCONTEXT-1);
// Check
ASSUME(cdy[1] >= old_cdy);
ASSUME(cdy[1] >= cisb[1]);
ASSUME(cdy[1] >= cdl[1]);
ASSUME(cdy[1] >= cds[1]);
ASSUME(cdy[1] >= cctrl[1]);
ASSUME(cdy[1] >= cw(1,0+0));
ASSUME(cdy[1] >= cw(1,0+1));
ASSUME(cdy[1] >= cw(1,0+2));
ASSUME(cdy[1] >= cw(1,0+3));
ASSUME(cdy[1] >= cw(1,0+4));
ASSUME(cdy[1] >= cw(1,7+0));
ASSUME(cdy[1] >= cw(1,5+0));
ASSUME(cdy[1] >= cw(1,6+0));
ASSUME(cdy[1] >= cr(1,0+0));
ASSUME(cdy[1] >= cr(1,0+1));
ASSUME(cdy[1] >= cr(1,0+2));
ASSUME(cdy[1] >= cr(1,0+3));
ASSUME(cdy[1] >= cr(1,0+4));
ASSUME(cdy[1] >= cr(1,7+0));
ASSUME(cdy[1] >= cr(1,5+0));
ASSUME(cdy[1] >= cr(1,6+0));
ASSUME(creturn[1] >= cdy[1]);
// call void @llvm.dbg.value(metadata i64* getelementptr inbounds ([5 x i64], [5 x i64]* @vars, i64 0, i64 1), metadata !43, metadata !DIExpression()), !dbg !53
// call void @llvm.dbg.value(metadata i64 1, metadata !45, metadata !DIExpression()), !dbg !53
// store atomic i64 1, i64* getelementptr inbounds ([5 x i64], [5 x i64]* @vars, i64 0, i64 1) monotonic, align 8, !dbg !54
// ST: Guess
iw(1,0+1*1) = get_rng(0,NCONTEXT-1);// 1 ASSIGN STIW _l23_c3
old_cw = cw(1,0+1*1);
cw(1,0+1*1) = get_rng(0,NCONTEXT-1);// 1 ASSIGN STCOM _l23_c3
// Check
ASSUME(active[iw(1,0+1*1)] == 1);
ASSUME(active[cw(1,0+1*1)] == 1);
ASSUME(sforbid(0+1*1,cw(1,0+1*1))== 0);
ASSUME(iw(1,0+1*1) >= 0);
ASSUME(iw(1,0+1*1) >= 0);
ASSUME(cw(1,0+1*1) >= iw(1,0+1*1));
ASSUME(cw(1,0+1*1) >= old_cw);
ASSUME(cw(1,0+1*1) >= cr(1,0+1*1));
ASSUME(cw(1,0+1*1) >= cl[1]);
ASSUME(cw(1,0+1*1) >= cisb[1]);
ASSUME(cw(1,0+1*1) >= cdy[1]);
ASSUME(cw(1,0+1*1) >= cdl[1]);
ASSUME(cw(1,0+1*1) >= cds[1]);
ASSUME(cw(1,0+1*1) >= cctrl[1]);
ASSUME(cw(1,0+1*1) >= caddr[1]);
// Update
caddr[1] = max(caddr[1],0);
buff(1,0+1*1) = 1;
mem(0+1*1,cw(1,0+1*1)) = 1;
co(0+1*1,cw(1,0+1*1))+=1;
delta(0+1*1,cw(1,0+1*1)) = -1;
ASSUME(creturn[1] >= cw(1,0+1*1));
// ret i8* null, !dbg !55
ret_thread_1 = (- 1);
goto T1BLOCK_END;
T1BLOCK_END:
// Dumping thread 2
int ret_thread_2 = 0;
cdy[2] = get_rng(0,NCONTEXT-1);
ASSUME(cdy[2] >= cstart[2]);
T2BLOCK0:
// call void @llvm.dbg.value(metadata i8* %arg, metadata !58, metadata !DIExpression()), !dbg !91
// br label %label_2, !dbg !73
goto T2BLOCK1;
T2BLOCK1:
// call void @llvm.dbg.label(metadata !89), !dbg !93
// call void @llvm.dbg.value(metadata i64* getelementptr inbounds ([5 x i64], [5 x i64]* @vars, i64 0, i64 1), metadata !60, metadata !DIExpression()), !dbg !94
// %0 = load atomic i64, i64* getelementptr inbounds ([5 x i64], [5 x i64]* @vars, i64 0, i64 1) monotonic, align 8, !dbg !76
// LD: Guess
old_cr = cr(2,0+1*1);
cr(2,0+1*1) = get_rng(0,NCONTEXT-1);// 2 ASSIGN LDCOM _l29_c15
// Check
ASSUME(active[cr(2,0+1*1)] == 2);
ASSUME(cr(2,0+1*1) >= iw(2,0+1*1));
ASSUME(cr(2,0+1*1) >= 0);
ASSUME(cr(2,0+1*1) >= cdy[2]);
ASSUME(cr(2,0+1*1) >= cisb[2]);
ASSUME(cr(2,0+1*1) >= cdl[2]);
ASSUME(cr(2,0+1*1) >= cl[2]);
// Update
creg_r0 = cr(2,0+1*1);
crmax(2,0+1*1) = max(crmax(2,0+1*1),cr(2,0+1*1));
caddr[2] = max(caddr[2],0);
if(cr(2,0+1*1) < cw(2,0+1*1)) {
r0 = buff(2,0+1*1);
ASSUME((!(( (cw(2,0+1*1) < 1) && (1 < crmax(2,0+1*1)) )))||(sforbid(0+1*1,1)> 0));
ASSUME((!(( (cw(2,0+1*1) < 2) && (2 < crmax(2,0+1*1)) )))||(sforbid(0+1*1,2)> 0));
ASSUME((!(( (cw(2,0+1*1) < 3) && (3 < crmax(2,0+1*1)) )))||(sforbid(0+1*1,3)> 0));
ASSUME((!(( (cw(2,0+1*1) < 4) && (4 < crmax(2,0+1*1)) )))||(sforbid(0+1*1,4)> 0));
} else {
if(pw(2,0+1*1) != co(0+1*1,cr(2,0+1*1))) {
ASSUME(cr(2,0+1*1) >= old_cr);
}
pw(2,0+1*1) = co(0+1*1,cr(2,0+1*1));
r0 = mem(0+1*1,cr(2,0+1*1));
}
ASSUME(creturn[2] >= cr(2,0+1*1));
// call void @llvm.dbg.value(metadata i64 %0, metadata !62, metadata !DIExpression()), !dbg !94
// %conv = trunc i64 %0 to i32, !dbg !77
// call void @llvm.dbg.value(metadata i32 %conv, metadata !59, metadata !DIExpression()), !dbg !91
// %tobool = icmp ne i32 %conv, 0, !dbg !78
creg__r0__0_ = max(0,creg_r0);
// br i1 %tobool, label %if.then, label %if.else, !dbg !80
old_cctrl = cctrl[2];
cctrl[2] = get_rng(0,NCONTEXT-1);
ASSUME(cctrl[2] >= old_cctrl);
ASSUME(cctrl[2] >= creg__r0__0_);
if((r0!=0)) {
goto T2BLOCK2;
} else {
goto T2BLOCK3;
}
T2BLOCK2:
// br label %lbl_LC00, !dbg !81
goto T2BLOCK4;
T2BLOCK3:
// br label %lbl_LC00, !dbg !82
goto T2BLOCK4;
T2BLOCK4:
// call void @llvm.dbg.label(metadata !90), !dbg !102
// call void @llvm.dbg.value(metadata i64* getelementptr inbounds ([5 x i64], [5 x i64]* @vars, i64 0, i64 2), metadata !64, metadata !DIExpression()), !dbg !103
// %1 = load atomic i64, i64* getelementptr inbounds ([5 x i64], [5 x i64]* @vars, i64 0, i64 2) monotonic, align 8, !dbg !85
// LD: Guess
old_cr = cr(2,0+2*1);
cr(2,0+2*1) = get_rng(0,NCONTEXT-1);// 2 ASSIGN LDCOM _l32_c15
// Check
ASSUME(active[cr(2,0+2*1)] == 2);
ASSUME(cr(2,0+2*1) >= iw(2,0+2*1));
ASSUME(cr(2,0+2*1) >= 0);
ASSUME(cr(2,0+2*1) >= cdy[2]);
ASSUME(cr(2,0+2*1) >= cisb[2]);
ASSUME(cr(2,0+2*1) >= cdl[2]);
ASSUME(cr(2,0+2*1) >= cl[2]);
// Update
creg_r1 = cr(2,0+2*1);
crmax(2,0+2*1) = max(crmax(2,0+2*1),cr(2,0+2*1));
caddr[2] = max(caddr[2],0);
if(cr(2,0+2*1) < cw(2,0+2*1)) {
r1 = buff(2,0+2*1);
ASSUME((!(( (cw(2,0+2*1) < 1) && (1 < crmax(2,0+2*1)) )))||(sforbid(0+2*1,1)> 0));
ASSUME((!(( (cw(2,0+2*1) < 2) && (2 < crmax(2,0+2*1)) )))||(sforbid(0+2*1,2)> 0));
ASSUME((!(( (cw(2,0+2*1) < 3) && (3 < crmax(2,0+2*1)) )))||(sforbid(0+2*1,3)> 0));
ASSUME((!(( (cw(2,0+2*1) < 4) && (4 < crmax(2,0+2*1)) )))||(sforbid(0+2*1,4)> 0));
} else {
if(pw(2,0+2*1) != co(0+2*1,cr(2,0+2*1))) {
ASSUME(cr(2,0+2*1) >= old_cr);
}
pw(2,0+2*1) = co(0+2*1,cr(2,0+2*1));
r1 = mem(0+2*1,cr(2,0+2*1));
}
ASSUME(creturn[2] >= cr(2,0+2*1));
// call void @llvm.dbg.value(metadata i64 %1, metadata !66, metadata !DIExpression()), !dbg !103
// %conv4 = trunc i64 %1 to i32, !dbg !86
// call void @llvm.dbg.value(metadata i32 %conv4, metadata !63, metadata !DIExpression()), !dbg !91
// %xor = xor i32 %conv4, %conv4, !dbg !87
creg_r2 = creg_r1;
r2 = r1 ^ r1;
// call void @llvm.dbg.value(metadata i32 %xor, metadata !67, metadata !DIExpression()), !dbg !91
// %add = add nsw i32 3, %xor, !dbg !88
creg_r3 = max(0,creg_r2);
r3 = 3 + r2;
// %idxprom = sext i32 %add to i64, !dbg !88
// %arrayidx = getelementptr inbounds [5 x i64], [5 x i64]* @vars, i64 0, i64 %idxprom, !dbg !88
r4 = 0+r3*1;
creg_r4 = creg_r3;
// call void @llvm.dbg.value(metadata i64* %arrayidx, metadata !69, metadata !DIExpression()), !dbg !108
// %2 = load atomic i64, i64* %arrayidx monotonic, align 8, !dbg !88
// LD: Guess
old_cr = cr(2,r4);
cr(2,r4) = get_rng(0,NCONTEXT-1);// 2 ASSIGN LDCOM _l34_c16
// Check
ASSUME(active[cr(2,r4)] == 2);
ASSUME(cr(2,r4) >= iw(2,r4));
ASSUME(cr(2,r4) >= creg_r4);
ASSUME(cr(2,r4) >= cdy[2]);
ASSUME(cr(2,r4) >= cisb[2]);
ASSUME(cr(2,r4) >= cdl[2]);
ASSUME(cr(2,r4) >= cl[2]);
// Update
creg_r5 = cr(2,r4);
crmax(2,r4) = max(crmax(2,r4),cr(2,r4));
caddr[2] = max(caddr[2],creg_r4);
if(cr(2,r4) < cw(2,r4)) {
r5 = buff(2,r4);
ASSUME((!(( (cw(2,r4) < 1) && (1 < crmax(2,r4)) )))||(sforbid(r4,1)> 0));
ASSUME((!(( (cw(2,r4) < 2) && (2 < crmax(2,r4)) )))||(sforbid(r4,2)> 0));
ASSUME((!(( (cw(2,r4) < 3) && (3 < crmax(2,r4)) )))||(sforbid(r4,3)> 0));
ASSUME((!(( (cw(2,r4) < 4) && (4 < crmax(2,r4)) )))||(sforbid(r4,4)> 0));
} else {
if(pw(2,r4) != co(r4,cr(2,r4))) {
ASSUME(cr(2,r4) >= old_cr);
}
pw(2,r4) = co(r4,cr(2,r4));
r5 = mem(r4,cr(2,r4));
}
ASSUME(creturn[2] >= cr(2,r4));
// call void @llvm.dbg.value(metadata i64 %2, metadata !71, metadata !DIExpression()), !dbg !108
// %conv8 = trunc i64 %2 to i32, !dbg !90
// call void @llvm.dbg.value(metadata i32 %conv8, metadata !68, metadata !DIExpression()), !dbg !91
// %xor9 = xor i32 %conv8, %conv8, !dbg !91
creg_r6 = creg_r5;
r6 = r5 ^ r5;
// call void @llvm.dbg.value(metadata i32 %xor9, metadata !72, metadata !DIExpression()), !dbg !91
// %add10 = add nsw i32 %xor9, 1, !dbg !92
creg_r7 = max(0,creg_r6);
r7 = r6 + 1;
// call void @llvm.dbg.value(metadata i32 %add10, metadata !73, metadata !DIExpression()), !dbg !91
// call void @llvm.dbg.value(metadata i64* getelementptr inbounds ([5 x i64], [5 x i64]* @vars, i64 0, i64 4), metadata !74, metadata !DIExpression()), !dbg !112
// %conv11 = sext i32 %add10 to i64, !dbg !94
// call void @llvm.dbg.value(metadata i64 %conv11, metadata !76, metadata !DIExpression()), !dbg !112
// store atomic i64 %conv11, i64* getelementptr inbounds ([5 x i64], [5 x i64]* @vars, i64 0, i64 4) monotonic, align 8, !dbg !94
// ST: Guess
iw(2,0+4*1) = get_rng(0,NCONTEXT-1);// 2 ASSIGN STIW _l37_c3
old_cw = cw(2,0+4*1);
cw(2,0+4*1) = get_rng(0,NCONTEXT-1);// 2 ASSIGN STCOM _l37_c3
// Check
ASSUME(active[iw(2,0+4*1)] == 2);
ASSUME(active[cw(2,0+4*1)] == 2);
ASSUME(sforbid(0+4*1,cw(2,0+4*1))== 0);
ASSUME(iw(2,0+4*1) >= creg_r7);
ASSUME(iw(2,0+4*1) >= 0);
ASSUME(cw(2,0+4*1) >= iw(2,0+4*1));
ASSUME(cw(2,0+4*1) >= old_cw);
ASSUME(cw(2,0+4*1) >= cr(2,0+4*1));
ASSUME(cw(2,0+4*1) >= cl[2]);
ASSUME(cw(2,0+4*1) >= cisb[2]);
ASSUME(cw(2,0+4*1) >= cdy[2]);
ASSUME(cw(2,0+4*1) >= cdl[2]);
ASSUME(cw(2,0+4*1) >= cds[2]);
ASSUME(cw(2,0+4*1) >= cctrl[2]);
ASSUME(cw(2,0+4*1) >= caddr[2]);
// Update
caddr[2] = max(caddr[2],0);
buff(2,0+4*1) = r7;
mem(0+4*1,cw(2,0+4*1)) = r7;
co(0+4*1,cw(2,0+4*1))+=1;
delta(0+4*1,cw(2,0+4*1)) = -1;
ASSUME(creturn[2] >= cw(2,0+4*1));
// call void @llvm.dbg.value(metadata i64* getelementptr inbounds ([5 x i64], [5 x i64]* @vars, i64 0, i64 4), metadata !78, metadata !DIExpression()), !dbg !114
// %3 = load atomic i64, i64* getelementptr inbounds ([5 x i64], [5 x i64]* @vars, i64 0, i64 4) monotonic, align 8, !dbg !96
// LD: Guess
old_cr = cr(2,0+4*1);
cr(2,0+4*1) = get_rng(0,NCONTEXT-1);// 2 ASSIGN LDCOM _l38_c16
// Check
ASSUME(active[cr(2,0+4*1)] == 2);
ASSUME(cr(2,0+4*1) >= iw(2,0+4*1));
ASSUME(cr(2,0+4*1) >= 0);
ASSUME(cr(2,0+4*1) >= cdy[2]);
ASSUME(cr(2,0+4*1) >= cisb[2]);
ASSUME(cr(2,0+4*1) >= cdl[2]);
ASSUME(cr(2,0+4*1) >= cl[2]);
// Update
creg_r8 = cr(2,0+4*1);
crmax(2,0+4*1) = max(crmax(2,0+4*1),cr(2,0+4*1));
caddr[2] = max(caddr[2],0);
if(cr(2,0+4*1) < cw(2,0+4*1)) {
r8 = buff(2,0+4*1);
ASSUME((!(( (cw(2,0+4*1) < 1) && (1 < crmax(2,0+4*1)) )))||(sforbid(0+4*1,1)> 0));
ASSUME((!(( (cw(2,0+4*1) < 2) && (2 < crmax(2,0+4*1)) )))||(sforbid(0+4*1,2)> 0));
ASSUME((!(( (cw(2,0+4*1) < 3) && (3 < crmax(2,0+4*1)) )))||(sforbid(0+4*1,3)> 0));
ASSUME((!(( (cw(2,0+4*1) < 4) && (4 < crmax(2,0+4*1)) )))||(sforbid(0+4*1,4)> 0));
} else {
if(pw(2,0+4*1) != co(0+4*1,cr(2,0+4*1))) {
ASSUME(cr(2,0+4*1) >= old_cr);
}
pw(2,0+4*1) = co(0+4*1,cr(2,0+4*1));
r8 = mem(0+4*1,cr(2,0+4*1));
}
ASSUME(creturn[2] >= cr(2,0+4*1));
// call void @llvm.dbg.value(metadata i64 %3, metadata !80, metadata !DIExpression()), !dbg !114
// %conv15 = trunc i64 %3 to i32, !dbg !97
// call void @llvm.dbg.value(metadata i32 %conv15, metadata !77, metadata !DIExpression()), !dbg !91
// %xor16 = xor i32 %conv15, %conv15, !dbg !98
creg_r9 = creg_r8;
r9 = r8 ^ r8;
// call void @llvm.dbg.value(metadata i32 %xor16, metadata !81, metadata !DIExpression()), !dbg !91
// %add18 = add nsw i32 0, %xor16, !dbg !99
creg_r10 = max(0,creg_r9);
r10 = 0 + r9;
// %idxprom19 = sext i32 %add18 to i64, !dbg !99
// %arrayidx20 = getelementptr inbounds [5 x i64], [5 x i64]* @vars, i64 0, i64 %idxprom19, !dbg !99
r11 = 0+r10*1;
creg_r11 = creg_r10;
// call void @llvm.dbg.value(metadata i64* %arrayidx20, metadata !83, metadata !DIExpression()), !dbg !119
// %4 = load atomic i64, i64* %arrayidx20 monotonic, align 8, !dbg !99
// LD: Guess
old_cr = cr(2,r11);
cr(2,r11) = get_rng(0,NCONTEXT-1);// 2 ASSIGN LDCOM _l40_c17
// Check
ASSUME(active[cr(2,r11)] == 2);
ASSUME(cr(2,r11) >= iw(2,r11));
ASSUME(cr(2,r11) >= creg_r11);
ASSUME(cr(2,r11) >= cdy[2]);
ASSUME(cr(2,r11) >= cisb[2]);
ASSUME(cr(2,r11) >= cdl[2]);
ASSUME(cr(2,r11) >= cl[2]);
// Update
creg_r12 = cr(2,r11);
crmax(2,r11) = max(crmax(2,r11),cr(2,r11));
caddr[2] = max(caddr[2],creg_r11);
if(cr(2,r11) < cw(2,r11)) {
r12 = buff(2,r11);
ASSUME((!(( (cw(2,r11) < 1) && (1 < crmax(2,r11)) )))||(sforbid(r11,1)> 0));
ASSUME((!(( (cw(2,r11) < 2) && (2 < crmax(2,r11)) )))||(sforbid(r11,2)> 0));
ASSUME((!(( (cw(2,r11) < 3) && (3 < crmax(2,r11)) )))||(sforbid(r11,3)> 0));
ASSUME((!(( (cw(2,r11) < 4) && (4 < crmax(2,r11)) )))||(sforbid(r11,4)> 0));
} else {
if(pw(2,r11) != co(r11,cr(2,r11))) {
ASSUME(cr(2,r11) >= old_cr);
}
pw(2,r11) = co(r11,cr(2,r11));
r12 = mem(r11,cr(2,r11));
}
ASSUME(creturn[2] >= cr(2,r11));
// call void @llvm.dbg.value(metadata i64 %4, metadata !85, metadata !DIExpression()), !dbg !119
// %conv23 = trunc i64 %4 to i32, !dbg !101
// call void @llvm.dbg.value(metadata i32 %conv23, metadata !82, metadata !DIExpression()), !dbg !91
// %cmp = icmp eq i32 %conv, 1, !dbg !102
creg__r0__1_ = max(0,creg_r0);
// %conv24 = zext i1 %cmp to i32, !dbg !102
// call void @llvm.dbg.value(metadata i32 %conv24, metadata !86, metadata !DIExpression()), !dbg !91
// store i32 %conv24, i32* @atom_1_X0_1, align 4, !dbg !103, !tbaa !104
// ST: Guess
iw(2,5) = get_rng(0,NCONTEXT-1);// 2 ASSIGN STIW _l42_c15
old_cw = cw(2,5);
cw(2,5) = get_rng(0,NCONTEXT-1);// 2 ASSIGN STCOM _l42_c15
// Check
ASSUME(active[iw(2,5)] == 2);
ASSUME(active[cw(2,5)] == 2);
ASSUME(sforbid(5,cw(2,5))== 0);
ASSUME(iw(2,5) >= creg__r0__1_);
ASSUME(iw(2,5) >= 0);
ASSUME(cw(2,5) >= iw(2,5));
ASSUME(cw(2,5) >= old_cw);
ASSUME(cw(2,5) >= cr(2,5));
ASSUME(cw(2,5) >= cl[2]);
ASSUME(cw(2,5) >= cisb[2]);
ASSUME(cw(2,5) >= cdy[2]);
ASSUME(cw(2,5) >= cdl[2]);
ASSUME(cw(2,5) >= cds[2]);
ASSUME(cw(2,5) >= cctrl[2]);
ASSUME(cw(2,5) >= caddr[2]);
// Update
caddr[2] = max(caddr[2],0);
buff(2,5) = (r0==1);
mem(5,cw(2,5)) = (r0==1);
co(5,cw(2,5))+=1;
delta(5,cw(2,5)) = -1;
ASSUME(creturn[2] >= cw(2,5));
// %cmp25 = icmp eq i32 %conv15, 1, !dbg !108
creg__r8__1_ = max(0,creg_r8);
// %conv26 = zext i1 %cmp25 to i32, !dbg !108
// call void @llvm.dbg.value(metadata i32 %conv26, metadata !87, metadata !DIExpression()), !dbg !91
// store i32 %conv26, i32* @atom_1_X9_1, align 4, !dbg !109, !tbaa !104
// ST: Guess
iw(2,6) = get_rng(0,NCONTEXT-1);// 2 ASSIGN STIW _l44_c15
old_cw = cw(2,6);
cw(2,6) = get_rng(0,NCONTEXT-1);// 2 ASSIGN STCOM _l44_c15
// Check
ASSUME(active[iw(2,6)] == 2);
ASSUME(active[cw(2,6)] == 2);
ASSUME(sforbid(6,cw(2,6))== 0);
ASSUME(iw(2,6) >= creg__r8__1_);
ASSUME(iw(2,6) >= 0);
ASSUME(cw(2,6) >= iw(2,6));
ASSUME(cw(2,6) >= old_cw);
ASSUME(cw(2,6) >= cr(2,6));
ASSUME(cw(2,6) >= cl[2]);
ASSUME(cw(2,6) >= cisb[2]);
ASSUME(cw(2,6) >= cdy[2]);
ASSUME(cw(2,6) >= cdl[2]);
ASSUME(cw(2,6) >= cds[2]);
ASSUME(cw(2,6) >= cctrl[2]);
ASSUME(cw(2,6) >= caddr[2]);
// Update
caddr[2] = max(caddr[2],0);
buff(2,6) = (r8==1);
mem(6,cw(2,6)) = (r8==1);
co(6,cw(2,6))+=1;
delta(6,cw(2,6)) = -1;
ASSUME(creturn[2] >= cw(2,6));
// %cmp27 = icmp eq i32 %conv23, 0, !dbg !110
creg__r12__0_ = max(0,creg_r12);
// %conv28 = zext i1 %cmp27 to i32, !dbg !110
// call void @llvm.dbg.value(metadata i32 %conv28, metadata !88, metadata !DIExpression()), !dbg !91
// store i32 %conv28, i32* @atom_1_X11_0, align 4, !dbg !111, !tbaa !104
// ST: Guess
iw(2,7) = get_rng(0,NCONTEXT-1);// 2 ASSIGN STIW _l46_c16
old_cw = cw(2,7);
cw(2,7) = get_rng(0,NCONTEXT-1);// 2 ASSIGN STCOM _l46_c16
// Check
ASSUME(active[iw(2,7)] == 2);
ASSUME(active[cw(2,7)] == 2);
ASSUME(sforbid(7,cw(2,7))== 0);
ASSUME(iw(2,7) >= creg__r12__0_);
ASSUME(iw(2,7) >= 0);
ASSUME(cw(2,7) >= iw(2,7));
ASSUME(cw(2,7) >= old_cw);
ASSUME(cw(2,7) >= cr(2,7));
ASSUME(cw(2,7) >= cl[2]);
ASSUME(cw(2,7) >= cisb[2]);
ASSUME(cw(2,7) >= cdy[2]);
ASSUME(cw(2,7) >= cdl[2]);
ASSUME(cw(2,7) >= cds[2]);
ASSUME(cw(2,7) >= cctrl[2]);
ASSUME(cw(2,7) >= caddr[2]);
// Update
caddr[2] = max(caddr[2],0);
buff(2,7) = (r12==0);
mem(7,cw(2,7)) = (r12==0);
co(7,cw(2,7))+=1;
delta(7,cw(2,7)) = -1;
ASSUME(creturn[2] >= cw(2,7));
// ret i8* null, !dbg !112
ret_thread_2 = (- 1);
goto T2BLOCK_END;
T2BLOCK_END:
// Dumping thread 0
int ret_thread_0 = 0;
cdy[0] = get_rng(0,NCONTEXT-1);
ASSUME(cdy[0] >= cstart[0]);
T0BLOCK0:
// %thr0 = alloca i64, align 8
// %thr1 = alloca i64, align 8
// call void @llvm.dbg.value(metadata i32 %argc, metadata !139, metadata !DIExpression()), !dbg !184
// call void @llvm.dbg.value(metadata i8** %argv, metadata !140, metadata !DIExpression()), !dbg !184
// %0 = bitcast i64* %thr0 to i8*, !dbg !88
// call void @llvm.lifetime.start.p0i8(i64 8, i8* %0) #7, !dbg !88
// call void @llvm.dbg.declare(metadata i64* %thr0, metadata !141, metadata !DIExpression()), !dbg !186
// %1 = bitcast i64* %thr1 to i8*, !dbg !90
// call void @llvm.lifetime.start.p0i8(i64 8, i8* %1) #7, !dbg !90
// call void @llvm.dbg.declare(metadata i64* %thr1, metadata !145, metadata !DIExpression()), !dbg !188
// call void @llvm.dbg.value(metadata i64* getelementptr inbounds ([5 x i64], [5 x i64]* @vars, i64 0, i64 4), metadata !146, metadata !DIExpression()), !dbg !189
// call void @llvm.dbg.value(metadata i64 0, metadata !148, metadata !DIExpression()), !dbg !189
// store atomic i64 0, i64* getelementptr inbounds ([5 x i64], [5 x i64]* @vars, i64 0, i64 4) monotonic, align 8, !dbg !93
// ST: Guess
iw(0,0+4*1) = get_rng(0,NCONTEXT-1);// 0 ASSIGN STIW _l54_c3
old_cw = cw(0,0+4*1);
cw(0,0+4*1) = get_rng(0,NCONTEXT-1);// 0 ASSIGN STCOM _l54_c3
// Check
ASSUME(active[iw(0,0+4*1)] == 0);
ASSUME(active[cw(0,0+4*1)] == 0);
ASSUME(sforbid(0+4*1,cw(0,0+4*1))== 0);
ASSUME(iw(0,0+4*1) >= 0);
ASSUME(iw(0,0+4*1) >= 0);
ASSUME(cw(0,0+4*1) >= iw(0,0+4*1));
ASSUME(cw(0,0+4*1) >= old_cw);
ASSUME(cw(0,0+4*1) >= cr(0,0+4*1));
ASSUME(cw(0,0+4*1) >= cl[0]);
ASSUME(cw(0,0+4*1) >= cisb[0]);
ASSUME(cw(0,0+4*1) >= cdy[0]);
ASSUME(cw(0,0+4*1) >= cdl[0]);
ASSUME(cw(0,0+4*1) >= cds[0]);
ASSUME(cw(0,0+4*1) >= cctrl[0]);
ASSUME(cw(0,0+4*1) >= caddr[0]);
// Update
caddr[0] = max(caddr[0],0);
buff(0,0+4*1) = 0;
mem(0+4*1,cw(0,0+4*1)) = 0;
co(0+4*1,cw(0,0+4*1))+=1;
delta(0+4*1,cw(0,0+4*1)) = -1;
ASSUME(creturn[0] >= cw(0,0+4*1));
// call void @llvm.dbg.value(metadata i64* getelementptr inbounds ([5 x i64], [5 x i64]* @vars, i64 0, i64 3), metadata !149, metadata !DIExpression()), !dbg !191
// call void @llvm.dbg.value(metadata i64 0, metadata !151, metadata !DIExpression()), !dbg !191
// store atomic i64 0, i64* getelementptr inbounds ([5 x i64], [5 x i64]* @vars, i64 0, i64 3) monotonic, align 8, !dbg !95
// ST: Guess
iw(0,0+3*1) = get_rng(0,NCONTEXT-1);// 0 ASSIGN STIW _l55_c3
old_cw = cw(0,0+3*1);
cw(0,0+3*1) = get_rng(0,NCONTEXT-1);// 0 ASSIGN STCOM _l55_c3
// Check
ASSUME(active[iw(0,0+3*1)] == 0);
ASSUME(active[cw(0,0+3*1)] == 0);
ASSUME(sforbid(0+3*1,cw(0,0+3*1))== 0);
ASSUME(iw(0,0+3*1) >= 0);
ASSUME(iw(0,0+3*1) >= 0);
ASSUME(cw(0,0+3*1) >= iw(0,0+3*1));
ASSUME(cw(0,0+3*1) >= old_cw);
ASSUME(cw(0,0+3*1) >= cr(0,0+3*1));
ASSUME(cw(0,0+3*1) >= cl[0]);
ASSUME(cw(0,0+3*1) >= cisb[0]);
ASSUME(cw(0,0+3*1) >= cdy[0]);
ASSUME(cw(0,0+3*1) >= cdl[0]);
ASSUME(cw(0,0+3*1) >= cds[0]);
ASSUME(cw(0,0+3*1) >= cctrl[0]);
ASSUME(cw(0,0+3*1) >= caddr[0]);
// Update
caddr[0] = max(caddr[0],0);
buff(0,0+3*1) = 0;
mem(0+3*1,cw(0,0+3*1)) = 0;
co(0+3*1,cw(0,0+3*1))+=1;
delta(0+3*1,cw(0,0+3*1)) = -1;
ASSUME(creturn[0] >= cw(0,0+3*1));
// call void @llvm.dbg.value(metadata i64* getelementptr inbounds ([5 x i64], [5 x i64]* @vars, i64 0, i64 2), metadata !152, metadata !DIExpression()), !dbg !193
// call void @llvm.dbg.value(metadata i64 0, metadata !154, metadata !DIExpression()), !dbg !193
// store atomic i64 0, i64* getelementptr inbounds ([5 x i64], [5 x i64]* @vars, i64 0, i64 2) monotonic, align 8, !dbg !97
// ST: Guess
iw(0,0+2*1) = get_rng(0,NCONTEXT-1);// 0 ASSIGN STIW _l56_c3
old_cw = cw(0,0+2*1);
cw(0,0+2*1) = get_rng(0,NCONTEXT-1);// 0 ASSIGN STCOM _l56_c3
// Check
ASSUME(active[iw(0,0+2*1)] == 0);
ASSUME(active[cw(0,0+2*1)] == 0);
ASSUME(sforbid(0+2*1,cw(0,0+2*1))== 0);
ASSUME(iw(0,0+2*1) >= 0);
ASSUME(iw(0,0+2*1) >= 0);
ASSUME(cw(0,0+2*1) >= iw(0,0+2*1));
ASSUME(cw(0,0+2*1) >= old_cw);
ASSUME(cw(0,0+2*1) >= cr(0,0+2*1));
ASSUME(cw(0,0+2*1) >= cl[0]);
ASSUME(cw(0,0+2*1) >= cisb[0]);
ASSUME(cw(0,0+2*1) >= cdy[0]);
ASSUME(cw(0,0+2*1) >= cdl[0]);
ASSUME(cw(0,0+2*1) >= cds[0]);
ASSUME(cw(0,0+2*1) >= cctrl[0]);
ASSUME(cw(0,0+2*1) >= caddr[0]);
// Update
caddr[0] = max(caddr[0],0);
buff(0,0+2*1) = 0;
mem(0+2*1,cw(0,0+2*1)) = 0;
co(0+2*1,cw(0,0+2*1))+=1;
delta(0+2*1,cw(0,0+2*1)) = -1;
ASSUME(creturn[0] >= cw(0,0+2*1));
// call void @llvm.dbg.value(metadata i64* getelementptr inbounds ([5 x i64], [5 x i64]* @vars, i64 0, i64 1), metadata !155, metadata !DIExpression()), !dbg !195
// call void @llvm.dbg.value(metadata i64 0, metadata !157, metadata !DIExpression()), !dbg !195
// store atomic i64 0, i64* getelementptr inbounds ([5 x i64], [5 x i64]* @vars, i64 0, i64 1) monotonic, align 8, !dbg !99
// ST: Guess
iw(0,0+1*1) = get_rng(0,NCONTEXT-1);// 0 ASSIGN STIW _l57_c3
old_cw = cw(0,0+1*1);
cw(0,0+1*1) = get_rng(0,NCONTEXT-1);// 0 ASSIGN STCOM _l57_c3
// Check
ASSUME(active[iw(0,0+1*1)] == 0);
ASSUME(active[cw(0,0+1*1)] == 0);
ASSUME(sforbid(0+1*1,cw(0,0+1*1))== 0);
ASSUME(iw(0,0+1*1) >= 0);
ASSUME(iw(0,0+1*1) >= 0);
ASSUME(cw(0,0+1*1) >= iw(0,0+1*1));
ASSUME(cw(0,0+1*1) >= old_cw);
ASSUME(cw(0,0+1*1) >= cr(0,0+1*1));
ASSUME(cw(0,0+1*1) >= cl[0]);
ASSUME(cw(0,0+1*1) >= cisb[0]);
ASSUME(cw(0,0+1*1) >= cdy[0]);
ASSUME(cw(0,0+1*1) >= cdl[0]);
ASSUME(cw(0,0+1*1) >= cds[0]);
ASSUME(cw(0,0+1*1) >= cctrl[0]);
ASSUME(cw(0,0+1*1) >= caddr[0]);
// Update
caddr[0] = max(caddr[0],0);
buff(0,0+1*1) = 0;
mem(0+1*1,cw(0,0+1*1)) = 0;
co(0+1*1,cw(0,0+1*1))+=1;
delta(0+1*1,cw(0,0+1*1)) = -1;
ASSUME(creturn[0] >= cw(0,0+1*1));
// call void @llvm.dbg.value(metadata i64* getelementptr inbounds ([5 x i64], [5 x i64]* @vars, i64 0, i64 0), metadata !158, metadata !DIExpression()), !dbg !197
// call void @llvm.dbg.value(metadata i64 0, metadata !160, metadata !DIExpression()), !dbg !197
// store atomic i64 0, i64* getelementptr inbounds ([5 x i64], [5 x i64]* @vars, i64 0, i64 0) monotonic, align 8, !dbg !101
// ST: Guess
iw(0,0) = get_rng(0,NCONTEXT-1);// 0 ASSIGN STIW _l58_c3
old_cw = cw(0,0);
cw(0,0) = get_rng(0,NCONTEXT-1);// 0 ASSIGN STCOM _l58_c3
// Check
ASSUME(active[iw(0,0)] == 0);
ASSUME(active[cw(0,0)] == 0);
ASSUME(sforbid(0,cw(0,0))== 0);
ASSUME(iw(0,0) >= 0);
ASSUME(iw(0,0) >= 0);
ASSUME(cw(0,0) >= iw(0,0));
ASSUME(cw(0,0) >= old_cw);
ASSUME(cw(0,0) >= cr(0,0));
ASSUME(cw(0,0) >= cl[0]);
ASSUME(cw(0,0) >= cisb[0]);
ASSUME(cw(0,0) >= cdy[0]);
ASSUME(cw(0,0) >= cdl[0]);
ASSUME(cw(0,0) >= cds[0]);
ASSUME(cw(0,0) >= cctrl[0]);
ASSUME(cw(0,0) >= caddr[0]);
// Update
caddr[0] = max(caddr[0],0);
buff(0,0) = 0;
mem(0,cw(0,0)) = 0;
co(0,cw(0,0))+=1;
delta(0,cw(0,0)) = -1;
ASSUME(creturn[0] >= cw(0,0));
// store i32 0, i32* @atom_1_X0_1, align 4, !dbg !102, !tbaa !103
// ST: Guess
iw(0,5) = get_rng(0,NCONTEXT-1);// 0 ASSIGN STIW _l59_c15
old_cw = cw(0,5);
cw(0,5) = get_rng(0,NCONTEXT-1);// 0 ASSIGN STCOM _l59_c15
// Check
ASSUME(active[iw(0,5)] == 0);
ASSUME(active[cw(0,5)] == 0);
ASSUME(sforbid(5,cw(0,5))== 0);
ASSUME(iw(0,5) >= 0);
ASSUME(iw(0,5) >= 0);
ASSUME(cw(0,5) >= iw(0,5));
ASSUME(cw(0,5) >= old_cw);
ASSUME(cw(0,5) >= cr(0,5));
ASSUME(cw(0,5) >= cl[0]);
ASSUME(cw(0,5) >= cisb[0]);
ASSUME(cw(0,5) >= cdy[0]);
ASSUME(cw(0,5) >= cdl[0]);
ASSUME(cw(0,5) >= cds[0]);
ASSUME(cw(0,5) >= cctrl[0]);
ASSUME(cw(0,5) >= caddr[0]);
// Update
caddr[0] = max(caddr[0],0);
buff(0,5) = 0;
mem(5,cw(0,5)) = 0;
co(5,cw(0,5))+=1;
delta(5,cw(0,5)) = -1;
ASSUME(creturn[0] >= cw(0,5));
// store i32 0, i32* @atom_1_X9_1, align 4, !dbg !107, !tbaa !103
// ST: Guess
iw(0,6) = get_rng(0,NCONTEXT-1);// 0 ASSIGN STIW _l60_c15
old_cw = cw(0,6);
cw(0,6) = get_rng(0,NCONTEXT-1);// 0 ASSIGN STCOM _l60_c15
// Check
ASSUME(active[iw(0,6)] == 0);
ASSUME(active[cw(0,6)] == 0);
ASSUME(sforbid(6,cw(0,6))== 0);
ASSUME(iw(0,6) >= 0);
ASSUME(iw(0,6) >= 0);
ASSUME(cw(0,6) >= iw(0,6));
ASSUME(cw(0,6) >= old_cw);
ASSUME(cw(0,6) >= cr(0,6));
ASSUME(cw(0,6) >= cl[0]);
ASSUME(cw(0,6) >= cisb[0]);
ASSUME(cw(0,6) >= cdy[0]);
ASSUME(cw(0,6) >= cdl[0]);
ASSUME(cw(0,6) >= cds[0]);
ASSUME(cw(0,6) >= cctrl[0]);
ASSUME(cw(0,6) >= caddr[0]);
// Update
caddr[0] = max(caddr[0],0);
buff(0,6) = 0;
mem(6,cw(0,6)) = 0;
co(6,cw(0,6))+=1;
delta(6,cw(0,6)) = -1;
ASSUME(creturn[0] >= cw(0,6));
// store i32 0, i32* @atom_1_X11_0, align 4, !dbg !108, !tbaa !103
// ST: Guess
iw(0,7) = get_rng(0,NCONTEXT-1);// 0 ASSIGN STIW _l61_c16
old_cw = cw(0,7);
cw(0,7) = get_rng(0,NCONTEXT-1);// 0 ASSIGN STCOM _l61_c16
// Check
ASSUME(active[iw(0,7)] == 0);
ASSUME(active[cw(0,7)] == 0);
ASSUME(sforbid(7,cw(0,7))== 0);
ASSUME(iw(0,7) >= 0);
ASSUME(iw(0,7) >= 0);
ASSUME(cw(0,7) >= iw(0,7));
ASSUME(cw(0,7) >= old_cw);
ASSUME(cw(0,7) >= cr(0,7));
ASSUME(cw(0,7) >= cl[0]);
ASSUME(cw(0,7) >= cisb[0]);
ASSUME(cw(0,7) >= cdy[0]);
ASSUME(cw(0,7) >= cdl[0]);
ASSUME(cw(0,7) >= cds[0]);
ASSUME(cw(0,7) >= cctrl[0]);
ASSUME(cw(0,7) >= caddr[0]);
// Update
caddr[0] = max(caddr[0],0);
buff(0,7) = 0;
mem(7,cw(0,7)) = 0;
co(7,cw(0,7))+=1;
delta(7,cw(0,7)) = -1;
ASSUME(creturn[0] >= cw(0,7));
// %call = call i32 @pthread_create(i64* noundef %thr0, %union.pthread_attr_t* noundef null, i8* (i8*)* noundef @t0, i8* noundef null) #7, !dbg !109
// dumbsy: Guess
old_cdy = cdy[0];
cdy[0] = get_rng(0,NCONTEXT-1);
// Check
ASSUME(cdy[0] >= old_cdy);
ASSUME(cdy[0] >= cisb[0]);
ASSUME(cdy[0] >= cdl[0]);
ASSUME(cdy[0] >= cds[0]);
ASSUME(cdy[0] >= cctrl[0]);
ASSUME(cdy[0] >= cw(0,0+0));
ASSUME(cdy[0] >= cw(0,0+1));
ASSUME(cdy[0] >= cw(0,0+2));
ASSUME(cdy[0] >= cw(0,0+3));
ASSUME(cdy[0] >= cw(0,0+4));
ASSUME(cdy[0] >= cw(0,7+0));
ASSUME(cdy[0] >= cw(0,5+0));
ASSUME(cdy[0] >= cw(0,6+0));
ASSUME(cdy[0] >= cr(0,0+0));
ASSUME(cdy[0] >= cr(0,0+1));
ASSUME(cdy[0] >= cr(0,0+2));
ASSUME(cdy[0] >= cr(0,0+3));
ASSUME(cdy[0] >= cr(0,0+4));
ASSUME(cdy[0] >= cr(0,7+0));
ASSUME(cdy[0] >= cr(0,5+0));
ASSUME(cdy[0] >= cr(0,6+0));
ASSUME(creturn[0] >= cdy[0]);
ASSUME(cstart[1] >= cdy[0]);
// %call9 = call i32 @pthread_create(i64* noundef %thr1, %union.pthread_attr_t* noundef null, i8* (i8*)* noundef @t1, i8* noundef null) #7, !dbg !110
// dumbsy: Guess
old_cdy = cdy[0];
cdy[0] = get_rng(0,NCONTEXT-1);
// Check
ASSUME(cdy[0] >= old_cdy);
ASSUME(cdy[0] >= cisb[0]);
ASSUME(cdy[0] >= cdl[0]);
ASSUME(cdy[0] >= cds[0]);
ASSUME(cdy[0] >= cctrl[0]);
ASSUME(cdy[0] >= cw(0,0+0));
ASSUME(cdy[0] >= cw(0,0+1));
ASSUME(cdy[0] >= cw(0,0+2));
ASSUME(cdy[0] >= cw(0,0+3));
ASSUME(cdy[0] >= cw(0,0+4));
ASSUME(cdy[0] >= cw(0,7+0));
ASSUME(cdy[0] >= cw(0,5+0));
ASSUME(cdy[0] >= cw(0,6+0));
ASSUME(cdy[0] >= cr(0,0+0));
ASSUME(cdy[0] >= cr(0,0+1));
ASSUME(cdy[0] >= cr(0,0+2));
ASSUME(cdy[0] >= cr(0,0+3));
ASSUME(cdy[0] >= cr(0,0+4));
ASSUME(cdy[0] >= cr(0,7+0));
ASSUME(cdy[0] >= cr(0,5+0));
ASSUME(cdy[0] >= cr(0,6+0));
ASSUME(creturn[0] >= cdy[0]);
ASSUME(cstart[2] >= cdy[0]);
// %2 = load i64, i64* %thr0, align 8, !dbg !111, !tbaa !112
r14 = local_mem[0];
// %call10 = call i32 @pthread_join(i64 noundef %2, i8** noundef null), !dbg !114
// dumbsy: Guess
old_cdy = cdy[0];
cdy[0] = get_rng(0,NCONTEXT-1);
// Check
ASSUME(cdy[0] >= old_cdy);
ASSUME(cdy[0] >= cisb[0]);
ASSUME(cdy[0] >= cdl[0]);
ASSUME(cdy[0] >= cds[0]);
ASSUME(cdy[0] >= cctrl[0]);
ASSUME(cdy[0] >= cw(0,0+0));
ASSUME(cdy[0] >= cw(0,0+1));
ASSUME(cdy[0] >= cw(0,0+2));
ASSUME(cdy[0] >= cw(0,0+3));
ASSUME(cdy[0] >= cw(0,0+4));
ASSUME(cdy[0] >= cw(0,7+0));
ASSUME(cdy[0] >= cw(0,5+0));
ASSUME(cdy[0] >= cw(0,6+0));
ASSUME(cdy[0] >= cr(0,0+0));
ASSUME(cdy[0] >= cr(0,0+1));
ASSUME(cdy[0] >= cr(0,0+2));
ASSUME(cdy[0] >= cr(0,0+3));
ASSUME(cdy[0] >= cr(0,0+4));
ASSUME(cdy[0] >= cr(0,7+0));
ASSUME(cdy[0] >= cr(0,5+0));
ASSUME(cdy[0] >= cr(0,6+0));
ASSUME(creturn[0] >= cdy[0]);
ASSUME(cdy[0] >= creturn[1]);
// %3 = load i64, i64* %thr1, align 8, !dbg !115, !tbaa !112
r15 = local_mem[1];
// %call11 = call i32 @pthread_join(i64 noundef %3, i8** noundef null), !dbg !116
// dumbsy: Guess
old_cdy = cdy[0];
cdy[0] = get_rng(0,NCONTEXT-1);
// Check
ASSUME(cdy[0] >= old_cdy);
ASSUME(cdy[0] >= cisb[0]);
ASSUME(cdy[0] >= cdl[0]);
ASSUME(cdy[0] >= cds[0]);
ASSUME(cdy[0] >= cctrl[0]);
ASSUME(cdy[0] >= cw(0,0+0));
ASSUME(cdy[0] >= cw(0,0+1));
ASSUME(cdy[0] >= cw(0,0+2));
ASSUME(cdy[0] >= cw(0,0+3));
ASSUME(cdy[0] >= cw(0,0+4));
ASSUME(cdy[0] >= cw(0,7+0));
ASSUME(cdy[0] >= cw(0,5+0));
ASSUME(cdy[0] >= cw(0,6+0));
ASSUME(cdy[0] >= cr(0,0+0));
ASSUME(cdy[0] >= cr(0,0+1));
ASSUME(cdy[0] >= cr(0,0+2));
ASSUME(cdy[0] >= cr(0,0+3));
ASSUME(cdy[0] >= cr(0,0+4));
ASSUME(cdy[0] >= cr(0,7+0));
ASSUME(cdy[0] >= cr(0,5+0));
ASSUME(cdy[0] >= cr(0,6+0));
ASSUME(creturn[0] >= cdy[0]);
ASSUME(cdy[0] >= creturn[2]);
// call void @llvm.dbg.value(metadata i64* getelementptr inbounds ([5 x i64], [5 x i64]* @vars, i64 0, i64 4), metadata !162, metadata !DIExpression()), !dbg !210
// %4 = load atomic i64, i64* getelementptr inbounds ([5 x i64], [5 x i64]* @vars, i64 0, i64 4) monotonic, align 8, !dbg !118
// LD: Guess
old_cr = cr(0,0+4*1);
cr(0,0+4*1) = get_rng(0,NCONTEXT-1);// 0 ASSIGN LDCOM _l69_c13
// Check
ASSUME(active[cr(0,0+4*1)] == 0);
ASSUME(cr(0,0+4*1) >= iw(0,0+4*1));
ASSUME(cr(0,0+4*1) >= 0);
ASSUME(cr(0,0+4*1) >= cdy[0]);
ASSUME(cr(0,0+4*1) >= cisb[0]);
ASSUME(cr(0,0+4*1) >= cdl[0]);
ASSUME(cr(0,0+4*1) >= cl[0]);
// Update
creg_r16 = cr(0,0+4*1);
crmax(0,0+4*1) = max(crmax(0,0+4*1),cr(0,0+4*1));
caddr[0] = max(caddr[0],0);
if(cr(0,0+4*1) < cw(0,0+4*1)) {
r16 = buff(0,0+4*1);
ASSUME((!(( (cw(0,0+4*1) < 1) && (1 < crmax(0,0+4*1)) )))||(sforbid(0+4*1,1)> 0));
ASSUME((!(( (cw(0,0+4*1) < 2) && (2 < crmax(0,0+4*1)) )))||(sforbid(0+4*1,2)> 0));
ASSUME((!(( (cw(0,0+4*1) < 3) && (3 < crmax(0,0+4*1)) )))||(sforbid(0+4*1,3)> 0));
ASSUME((!(( (cw(0,0+4*1) < 4) && (4 < crmax(0,0+4*1)) )))||(sforbid(0+4*1,4)> 0));
} else {
if(pw(0,0+4*1) != co(0+4*1,cr(0,0+4*1))) {
ASSUME(cr(0,0+4*1) >= old_cr);
}
pw(0,0+4*1) = co(0+4*1,cr(0,0+4*1));
r16 = mem(0+4*1,cr(0,0+4*1));
}
ASSUME(creturn[0] >= cr(0,0+4*1));
// call void @llvm.dbg.value(metadata i64 %4, metadata !164, metadata !DIExpression()), !dbg !210
// %conv = trunc i64 %4 to i32, !dbg !119
// call void @llvm.dbg.value(metadata i32 %conv, metadata !161, metadata !DIExpression()), !dbg !184
// %cmp = icmp eq i32 %conv, 1, !dbg !120
creg__r16__1_ = max(0,creg_r16);
// %conv12 = zext i1 %cmp to i32, !dbg !120
// call void @llvm.dbg.value(metadata i32 %conv12, metadata !165, metadata !DIExpression()), !dbg !184
// call void @llvm.dbg.value(metadata i64* getelementptr inbounds ([5 x i64], [5 x i64]* @vars, i64 0, i64 0), metadata !167, metadata !DIExpression()), !dbg !214
// %5 = load atomic i64, i64* getelementptr inbounds ([5 x i64], [5 x i64]* @vars, i64 0, i64 0) monotonic, align 8, !dbg !122
// LD: Guess
old_cr = cr(0,0);
cr(0,0) = get_rng(0,NCONTEXT-1);// 0 ASSIGN LDCOM _l71_c13
// Check
ASSUME(active[cr(0,0)] == 0);
ASSUME(cr(0,0) >= iw(0,0));
ASSUME(cr(0,0) >= 0);
ASSUME(cr(0,0) >= cdy[0]);
ASSUME(cr(0,0) >= cisb[0]);
ASSUME(cr(0,0) >= cdl[0]);
ASSUME(cr(0,0) >= cl[0]);
// Update
creg_r17 = cr(0,0);
crmax(0,0) = max(crmax(0,0),cr(0,0));
caddr[0] = max(caddr[0],0);
if(cr(0,0) < cw(0,0)) {
r17 = buff(0,0);
ASSUME((!(( (cw(0,0) < 1) && (1 < crmax(0,0)) )))||(sforbid(0,1)> 0));
ASSUME((!(( (cw(0,0) < 2) && (2 < crmax(0,0)) )))||(sforbid(0,2)> 0));
ASSUME((!(( (cw(0,0) < 3) && (3 < crmax(0,0)) )))||(sforbid(0,3)> 0));
ASSUME((!(( (cw(0,0) < 4) && (4 < crmax(0,0)) )))||(sforbid(0,4)> 0));
} else {
if(pw(0,0) != co(0,cr(0,0))) {
ASSUME(cr(0,0) >= old_cr);
}
pw(0,0) = co(0,cr(0,0));
r17 = mem(0,cr(0,0));
}
ASSUME(creturn[0] >= cr(0,0));
// call void @llvm.dbg.value(metadata i64 %5, metadata !169, metadata !DIExpression()), !dbg !214
// %conv16 = trunc i64 %5 to i32, !dbg !123
// call void @llvm.dbg.value(metadata i32 %conv16, metadata !166, metadata !DIExpression()), !dbg !184
// %cmp17 = icmp eq i32 %conv16, 1, !dbg !124
creg__r17__1_ = max(0,creg_r17);
// %conv18 = zext i1 %cmp17 to i32, !dbg !124
// call void @llvm.dbg.value(metadata i32 %conv18, metadata !170, metadata !DIExpression()), !dbg !184
// call void @llvm.dbg.value(metadata i64* getelementptr inbounds ([5 x i64], [5 x i64]* @vars, i64 0, i64 1), metadata !172, metadata !DIExpression()), !dbg !218
// %6 = load atomic i64, i64* getelementptr inbounds ([5 x i64], [5 x i64]* @vars, i64 0, i64 1) monotonic, align 8, !dbg !126
// LD: Guess
old_cr = cr(0,0+1*1);
cr(0,0+1*1) = get_rng(0,NCONTEXT-1);// 0 ASSIGN LDCOM _l73_c13
// Check
ASSUME(active[cr(0,0+1*1)] == 0);
ASSUME(cr(0,0+1*1) >= iw(0,0+1*1));
ASSUME(cr(0,0+1*1) >= 0);
ASSUME(cr(0,0+1*1) >= cdy[0]);
ASSUME(cr(0,0+1*1) >= cisb[0]);
ASSUME(cr(0,0+1*1) >= cdl[0]);
ASSUME(cr(0,0+1*1) >= cl[0]);
// Update
creg_r18 = cr(0,0+1*1);
crmax(0,0+1*1) = max(crmax(0,0+1*1),cr(0,0+1*1));
caddr[0] = max(caddr[0],0);
if(cr(0,0+1*1) < cw(0,0+1*1)) {
r18 = buff(0,0+1*1);
ASSUME((!(( (cw(0,0+1*1) < 1) && (1 < crmax(0,0+1*1)) )))||(sforbid(0+1*1,1)> 0));
ASSUME((!(( (cw(0,0+1*1) < 2) && (2 < crmax(0,0+1*1)) )))||(sforbid(0+1*1,2)> 0));
ASSUME((!(( (cw(0,0+1*1) < 3) && (3 < crmax(0,0+1*1)) )))||(sforbid(0+1*1,3)> 0));
ASSUME((!(( (cw(0,0+1*1) < 4) && (4 < crmax(0,0+1*1)) )))||(sforbid(0+1*1,4)> 0));
} else {
if(pw(0,0+1*1) != co(0+1*1,cr(0,0+1*1))) {
ASSUME(cr(0,0+1*1) >= old_cr);
}
pw(0,0+1*1) = co(0+1*1,cr(0,0+1*1));
r18 = mem(0+1*1,cr(0,0+1*1));
}
ASSUME(creturn[0] >= cr(0,0+1*1));
// call void @llvm.dbg.value(metadata i64 %6, metadata !174, metadata !DIExpression()), !dbg !218
// %conv22 = trunc i64 %6 to i32, !dbg !127
// call void @llvm.dbg.value(metadata i32 %conv22, metadata !171, metadata !DIExpression()), !dbg !184
// %cmp23 = icmp eq i32 %conv22, 1, !dbg !128
creg__r18__1_ = max(0,creg_r18);
// %conv24 = zext i1 %cmp23 to i32, !dbg !128
// call void @llvm.dbg.value(metadata i32 %conv24, metadata !175, metadata !DIExpression()), !dbg !184
// %7 = load i32, i32* @atom_1_X0_1, align 4, !dbg !129, !tbaa !103
// LD: Guess
old_cr = cr(0,5);
cr(0,5) = get_rng(0,NCONTEXT-1);// 0 ASSIGN LDCOM _l75_c13
// Check
ASSUME(active[cr(0,5)] == 0);
ASSUME(cr(0,5) >= iw(0,5));
ASSUME(cr(0,5) >= 0);
ASSUME(cr(0,5) >= cdy[0]);
ASSUME(cr(0,5) >= cisb[0]);
ASSUME(cr(0,5) >= cdl[0]);
ASSUME(cr(0,5) >= cl[0]);
// Update
creg_r19 = cr(0,5);
crmax(0,5) = max(crmax(0,5),cr(0,5));
caddr[0] = max(caddr[0],0);
if(cr(0,5) < cw(0,5)) {
r19 = buff(0,5);
ASSUME((!(( (cw(0,5) < 1) && (1 < crmax(0,5)) )))||(sforbid(5,1)> 0));
ASSUME((!(( (cw(0,5) < 2) && (2 < crmax(0,5)) )))||(sforbid(5,2)> 0));
ASSUME((!(( (cw(0,5) < 3) && (3 < crmax(0,5)) )))||(sforbid(5,3)> 0));
ASSUME((!(( (cw(0,5) < 4) && (4 < crmax(0,5)) )))||(sforbid(5,4)> 0));
} else {
if(pw(0,5) != co(5,cr(0,5))) {
ASSUME(cr(0,5) >= old_cr);
}
pw(0,5) = co(5,cr(0,5));
r19 = mem(5,cr(0,5));
}
ASSUME(creturn[0] >= cr(0,5));
// call void @llvm.dbg.value(metadata i32 %7, metadata !176, metadata !DIExpression()), !dbg !184
// %8 = load i32, i32* @atom_1_X9_1, align 4, !dbg !130, !tbaa !103
// LD: Guess
old_cr = cr(0,6);
cr(0,6) = get_rng(0,NCONTEXT-1);// 0 ASSIGN LDCOM _l76_c13
// Check
ASSUME(active[cr(0,6)] == 0);
ASSUME(cr(0,6) >= iw(0,6));
ASSUME(cr(0,6) >= 0);
ASSUME(cr(0,6) >= cdy[0]);
ASSUME(cr(0,6) >= cisb[0]);
ASSUME(cr(0,6) >= cdl[0]);
ASSUME(cr(0,6) >= cl[0]);
// Update
creg_r20 = cr(0,6);
crmax(0,6) = max(crmax(0,6),cr(0,6));
caddr[0] = max(caddr[0],0);
if(cr(0,6) < cw(0,6)) {
r20 = buff(0,6);
ASSUME((!(( (cw(0,6) < 1) && (1 < crmax(0,6)) )))||(sforbid(6,1)> 0));
ASSUME((!(( (cw(0,6) < 2) && (2 < crmax(0,6)) )))||(sforbid(6,2)> 0));
ASSUME((!(( (cw(0,6) < 3) && (3 < crmax(0,6)) )))||(sforbid(6,3)> 0));
ASSUME((!(( (cw(0,6) < 4) && (4 < crmax(0,6)) )))||(sforbid(6,4)> 0));
} else {
if(pw(0,6) != co(6,cr(0,6))) {
ASSUME(cr(0,6) >= old_cr);
}
pw(0,6) = co(6,cr(0,6));
r20 = mem(6,cr(0,6));
}
ASSUME(creturn[0] >= cr(0,6));
// call void @llvm.dbg.value(metadata i32 %8, metadata !177, metadata !DIExpression()), !dbg !184
// %9 = load i32, i32* @atom_1_X11_0, align 4, !dbg !131, !tbaa !103
// LD: Guess
old_cr = cr(0,7);
cr(0,7) = get_rng(0,NCONTEXT-1);// 0 ASSIGN LDCOM _l77_c13
// Check
ASSUME(active[cr(0,7)] == 0);
ASSUME(cr(0,7) >= iw(0,7));
ASSUME(cr(0,7) >= 0);
ASSUME(cr(0,7) >= cdy[0]);
ASSUME(cr(0,7) >= cisb[0]);
ASSUME(cr(0,7) >= cdl[0]);
ASSUME(cr(0,7) >= cl[0]);
// Update
creg_r21 = cr(0,7);
crmax(0,7) = max(crmax(0,7),cr(0,7));
caddr[0] = max(caddr[0],0);
if(cr(0,7) < cw(0,7)) {
r21 = buff(0,7);
ASSUME((!(( (cw(0,7) < 1) && (1 < crmax(0,7)) )))||(sforbid(7,1)> 0));
ASSUME((!(( (cw(0,7) < 2) && (2 < crmax(0,7)) )))||(sforbid(7,2)> 0));
ASSUME((!(( (cw(0,7) < 3) && (3 < crmax(0,7)) )))||(sforbid(7,3)> 0));
ASSUME((!(( (cw(0,7) < 4) && (4 < crmax(0,7)) )))||(sforbid(7,4)> 0));
} else {
if(pw(0,7) != co(7,cr(0,7))) {
ASSUME(cr(0,7) >= old_cr);
}
pw(0,7) = co(7,cr(0,7));
r21 = mem(7,cr(0,7));
}
ASSUME(creturn[0] >= cr(0,7));
// call void @llvm.dbg.value(metadata i32 %9, metadata !178, metadata !DIExpression()), !dbg !184
// %and = and i32 %8, %9, !dbg !132
creg_r22 = max(creg_r20,creg_r21);
r22 = r20 & r21;
// call void @llvm.dbg.value(metadata i32 %and, metadata !179, metadata !DIExpression()), !dbg !184
// %and25 = and i32 %7, %and, !dbg !133
creg_r23 = max(creg_r19,creg_r22);
r23 = r19 & r22;
// call void @llvm.dbg.value(metadata i32 %and25, metadata !180, metadata !DIExpression()), !dbg !184
// %and26 = and i32 %conv24, %and25, !dbg !134
creg_r24 = max(creg__r18__1_,creg_r23);
r24 = (r18==1) & r23;
// call void @llvm.dbg.value(metadata i32 %and26, metadata !181, metadata !DIExpression()), !dbg !184
// %and27 = and i32 %conv18, %and26, !dbg !135
creg_r25 = max(creg__r17__1_,creg_r24);
r25 = (r17==1) & r24;
// call void @llvm.dbg.value(metadata i32 %and27, metadata !182, metadata !DIExpression()), !dbg !184
// %and28 = and i32 %conv12, %and27, !dbg !136
creg_r26 = max(creg__r16__1_,creg_r25);
r26 = (r16==1) & r25;
// call void @llvm.dbg.value(metadata i32 %and28, metadata !183, metadata !DIExpression()), !dbg !184
// %cmp29 = icmp eq i32 %and28, 1, !dbg !137
creg__r26__1_ = max(0,creg_r26);
// br i1 %cmp29, label %if.then, label %if.end, !dbg !139
old_cctrl = cctrl[0];
cctrl[0] = get_rng(0,NCONTEXT-1);
ASSUME(cctrl[0] >= old_cctrl);
ASSUME(cctrl[0] >= creg__r26__1_);
if((r26==1)) {
goto T0BLOCK1;
} else {
goto T0BLOCK2;
}
T0BLOCK1:
// call void @__assert_fail(i8* noundef getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* noundef getelementptr inbounds ([118 x i8], [118 x i8]* @.str.1, i64 0, i64 0), i32 noundef 83, i8* noundef getelementptr inbounds ([23 x i8], [23 x i8]* @__PRETTY_FUNCTION__.main, i64 0, i64 0)) #8, !dbg !140
// unreachable, !dbg !140
r27 = 1;
goto T0BLOCK_END;
T0BLOCK2:
// %10 = bitcast i64* %thr1 to i8*, !dbg !143
// call void @llvm.lifetime.end.p0i8(i64 8, i8* %10) #7, !dbg !143
// %11 = bitcast i64* %thr0 to i8*, !dbg !143
// call void @llvm.lifetime.end.p0i8(i64 8, i8* %11) #7, !dbg !143
// ret i32 0, !dbg !144
ret_thread_0 = 0;
goto T0BLOCK_END;
T0BLOCK_END:
ASSUME(meminit(0,1) == mem(0,0));
ASSUME(coinit(0,1) == co(0,0));
ASSUME(deltainit(0,1) == delta(0,0));
ASSUME(meminit(0,2) == mem(0,1));
ASSUME(coinit(0,2) == co(0,1));
ASSUME(deltainit(0,2) == delta(0,1));
ASSUME(meminit(0,3) == mem(0,2));
ASSUME(coinit(0,3) == co(0,2));
ASSUME(deltainit(0,3) == delta(0,2));
ASSUME(meminit(0,4) == mem(0,3));
ASSUME(coinit(0,4) == co(0,3));
ASSUME(deltainit(0,4) == delta(0,3));
ASSUME(meminit(1,1) == mem(1,0));
ASSUME(coinit(1,1) == co(1,0));
ASSUME(deltainit(1,1) == delta(1,0));
ASSUME(meminit(1,2) == mem(1,1));
ASSUME(coinit(1,2) == co(1,1));
ASSUME(deltainit(1,2) == delta(1,1));
ASSUME(meminit(1,3) == mem(1,2));
ASSUME(coinit(1,3) == co(1,2));
ASSUME(deltainit(1,3) == delta(1,2));
ASSUME(meminit(1,4) == mem(1,3));
ASSUME(coinit(1,4) == co(1,3));
ASSUME(deltainit(1,4) == delta(1,3));
ASSUME(meminit(2,1) == mem(2,0));
ASSUME(coinit(2,1) == co(2,0));
ASSUME(deltainit(2,1) == delta(2,0));
ASSUME(meminit(2,2) == mem(2,1));
ASSUME(coinit(2,2) == co(2,1));
ASSUME(deltainit(2,2) == delta(2,1));
ASSUME(meminit(2,3) == mem(2,2));
ASSUME(coinit(2,3) == co(2,2));
ASSUME(deltainit(2,3) == delta(2,2));
ASSUME(meminit(2,4) == mem(2,3));
ASSUME(coinit(2,4) == co(2,3));
ASSUME(deltainit(2,4) == delta(2,3));
ASSUME(meminit(3,1) == mem(3,0));
ASSUME(coinit(3,1) == co(3,0));
ASSUME(deltainit(3,1) == delta(3,0));
ASSUME(meminit(3,2) == mem(3,1));
ASSUME(coinit(3,2) == co(3,1));
ASSUME(deltainit(3,2) == delta(3,1));
ASSUME(meminit(3,3) == mem(3,2));
ASSUME(coinit(3,3) == co(3,2));
ASSUME(deltainit(3,3) == delta(3,2));
ASSUME(meminit(3,4) == mem(3,3));
ASSUME(coinit(3,4) == co(3,3));
ASSUME(deltainit(3,4) == delta(3,3));
ASSUME(meminit(4,1) == mem(4,0));
ASSUME(coinit(4,1) == co(4,0));
ASSUME(deltainit(4,1) == delta(4,0));
ASSUME(meminit(4,2) == mem(4,1));
ASSUME(coinit(4,2) == co(4,1));
ASSUME(deltainit(4,2) == delta(4,1));
ASSUME(meminit(4,3) == mem(4,2));
ASSUME(coinit(4,3) == co(4,2));
ASSUME(deltainit(4,3) == delta(4,2));
ASSUME(meminit(4,4) == mem(4,3));
ASSUME(coinit(4,4) == co(4,3));
ASSUME(deltainit(4,4) == delta(4,3));
ASSUME(meminit(5,1) == mem(5,0));
ASSUME(coinit(5,1) == co(5,0));
ASSUME(deltainit(5,1) == delta(5,0));
ASSUME(meminit(5,2) == mem(5,1));
ASSUME(coinit(5,2) == co(5,1));
ASSUME(deltainit(5,2) == delta(5,1));
ASSUME(meminit(5,3) == mem(5,2));
ASSUME(coinit(5,3) == co(5,2));
ASSUME(deltainit(5,3) == delta(5,2));
ASSUME(meminit(5,4) == mem(5,3));
ASSUME(coinit(5,4) == co(5,3));
ASSUME(deltainit(5,4) == delta(5,3));
ASSUME(meminit(6,1) == mem(6,0));
ASSUME(coinit(6,1) == co(6,0));
ASSUME(deltainit(6,1) == delta(6,0));
ASSUME(meminit(6,2) == mem(6,1));
ASSUME(coinit(6,2) == co(6,1));
ASSUME(deltainit(6,2) == delta(6,1));
ASSUME(meminit(6,3) == mem(6,2));
ASSUME(coinit(6,3) == co(6,2));
ASSUME(deltainit(6,3) == delta(6,2));
ASSUME(meminit(6,4) == mem(6,3));
ASSUME(coinit(6,4) == co(6,3));
ASSUME(deltainit(6,4) == delta(6,3));
ASSUME(meminit(7,1) == mem(7,0));
ASSUME(coinit(7,1) == co(7,0));
ASSUME(deltainit(7,1) == delta(7,0));
ASSUME(meminit(7,2) == mem(7,1));
ASSUME(coinit(7,2) == co(7,1));
ASSUME(deltainit(7,2) == delta(7,1));
ASSUME(meminit(7,3) == mem(7,2));
ASSUME(coinit(7,3) == co(7,2));
ASSUME(deltainit(7,3) == delta(7,2));
ASSUME(meminit(7,4) == mem(7,3));
ASSUME(coinit(7,4) == co(7,3));
ASSUME(deltainit(7,4) == delta(7,3));
ASSERT(r27== 0);
}
| [
"tuan-phong.ngo@it.uu.se"
] | tuan-phong.ngo@it.uu.se |
5629aeeafaf1c2fdc756dcfe92e073fbd4fccccf | 7e4999d12b8668c3f54697afb0df34f5b7030673 | /project/cpp/compile/src/A.cpp | fbadc6902e6658e7dc6320c029dc7e5978273f5a | [] | no_license | leeeyupeng/leeeyupeng.github.io | b34e29696190bcc1e05ec0d43385118acddd743c | 63f7d3d8c0c56e70b087ca71cc22f57f4367aa1f | refs/heads/master | 2023-08-21T01:55:17.190264 | 2021-10-28T10:12:38 | 2021-10-28T10:12:38 | 239,906,740 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 61 | cpp | #include "A.hpp"
#include "B.hpp"
B A::tob() {
return B();
} | [
"leeyupeng@126.com"
] | leeyupeng@126.com |
8682f8629711632a8fb78c9c7b61540acc268390 | 95fd90aa3e00b4311112855293a570d74d461645 | /packages/VowpalWabbit.8.4.0.3/src/cli/vw_settings.h | 24dd5612b0777b599684bc8a5b32af609439fb25 | [] | no_license | maryamhashemi/wordmap | 8b331e2721762296d035509e3314277edf62c275 | 9f3b70ece0e6bff690cb5079720df874fb1358d7 | refs/heads/master | 2021-04-09T14:19:29.616484 | 2018-05-01T16:43:27 | 2018-05-01T16:43:27 | 125,614,964 | 1 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 4,211 | h | /*
Copyright (c) by respective owners including Yahoo!, Microsoft, and
individual contributors. All rights reserved. Released under a BSD (revised)
license as described in the file LICENSE.
*/
#pragma once
#include <msclr\marshal_cppstd.h>
using namespace System;
using namespace System::Collections::Generic;
using namespace System::IO;
using namespace System::Threading::Tasks;
using namespace VW::Serializer;
namespace VW
{
ref class VowpalWabbit;
ref class VowpalWabbitModel;
ref class VowpalWabbitSettings;
public enum class VowpalWabbitExampleDistribution
{
/// <summary>
/// Statistically safer option.
/// </summary>
UniformRandom = 0,
/// <summary>
/// Better runtime performance.
/// </summary>
RoundRobin = 1
};
public interface class ITypeInspector
{
public:
Schema^ CreateSchema(VowpalWabbitSettings^ settings, Type^ type);
};
/// <summary>
/// Settings for wrapper.
/// </summary>
/// <remarks>Constructor with optional arguments was dropped as it broke version remapping (signature changed with the introduction of new options).</remarks>
public ref class VowpalWabbitSettings : public ICloneable
{
public:
VowpalWabbitSettings()
{ Arguments = String::Empty;
ExampleCountPerRun = 1000;
MaxExampleCacheSize = UINT32_MAX;
MaxExampleQueueLengthPerInstance = UINT32_MAX;
EnableExampleCaching = false;
// default to the statistically more safe option
ExampleDistribution = VowpalWabbitExampleDistribution::UniformRandom;
EnableStringExampleGeneration = false;
EnableStringFloatCompact = false;
PropertyConfiguration = ::PropertyConfiguration::Default;
EnableThreadSafeExamplePooling = false;
MaxExamples = INT32_MAX;
Verbose = false;
}
VowpalWabbitSettings(String^ arguments)
: VowpalWabbitSettings()
{ if (arguments != nullptr)
Arguments = arguments;
}
/// <summary>
/// Command line arguments.
/// </summary>
property String^ Arguments;
/// <summary>
/// Model used for initialization.
/// </summary>
property Stream^ ModelStream;
/// <summary>
/// Shared native vowpwal wabbit data structure.
/// </summary>
property VowpalWabbitModel^ Model;
property ParallelOptions^ ParallelOptions;
/// <summary>
/// Set to true to disable example caching when used with a serializer. Defaults to true.
/// </summary>
property bool EnableExampleCaching;
/// <summary>
/// Maximum number of serialized examples cached. Defaults to UINT32_MAX.
/// </summary>
property uint32_t MaxExampleCacheSize;
/// <summary>
/// Maximum number of examples accepted by VowpalWabbitManager until Learn/Predict/... start to block. Defaults to UINT32_MAX.
/// </summary>
property uint32_t MaxExampleQueueLengthPerInstance;
property uint32_t Node;
property VowpalWabbit^ Root;
property VowpalWabbitExampleDistribution ExampleDistribution;
/// <summary>
/// In multi-threaded mode, this is the number of examples processed per run.
/// After ecah run the models are synchronized.
/// Defaults to 1000.
/// </summary>
property uint32_t ExampleCountPerRun;
/// <summary>
/// Enable Vowpal Wabbit native string generation.
/// </summary>
property bool EnableStringExampleGeneration;
/// <summary>
/// Enable compact float serialization for Vowpal Wabbit native string generation.
/// </summary>
property bool EnableStringFloatCompact;
property VW::Serializer::Schema^ Schema;
property VW::Serializer::Schema^ ActionDependentSchema;
property List<Type^>^ CustomFeaturizer;
property ITypeInspector^ TypeInspector;
property PropertyConfiguration^ PropertyConfiguration;
property bool EnableThreadSafeExamplePooling;
property int MaxExamples;
property bool Verbose;
/// <summary>
/// Action invoked for each trace message.
/// </summary>
/// <Remarks>
/// The trace listener obeys the Verbose property, which defaults to false.
/// </Remarks>
property Action<String^>^ TraceListener;
virtual Object^ Clone()
{ return MemberwiseClone();
}
};
}
| [
"hashemi.maryam.sadat@gmail.com"
] | hashemi.maryam.sadat@gmail.com |
133fabaac137033b64c35dcae0edad8b4f9a619b | 9adaa0845ba68ba830bb7a70b5c203f10a4fcc8e | /Projects/HW1P2/HW1P2/pch.h | b9d4224f29c50574bd969fb0296b7dd9e7060c4f | [
"MIT"
] | permissive | iamjeffx/CSCE-463 | 7bebbe004744497f48a7cdd9edd8f731497870a8 | 9a037394e2fac1606095fac5df894389b89dc499 | refs/heads/master | 2023-04-10T02:15:21.138251 | 2021-04-20T16:33:03 | 2021-04-20T16:33:03 | 331,846,210 | 0 | 2 | null | null | null | null | UTF-8 | C++ | false | false | 470 | h | /** CSCE 463 Homework 1 Part 2
*
Author: Jeffrey Xu
UIN: 527008162
Email: jeffreyxu@tamu.edu
Professor Dmitri Loguinov
Filename: pch.h
Pre-compiled headers file.
**/
#pragma once
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <ctime>
#include <fstream>
#include <iterator>
#include <queue>
#include <windows.h>
#include <unordered_set>
#include "HTMLParserBase.h"
| [
"iamjeffx0@gmail.com"
] | iamjeffx0@gmail.com |
90613f41a2821c432588964a13a071f39b990839 | e21e34d026cb9f4b62d46231adfa835560d45c69 | /main.5654245744309891711.cpp | 9997850ab0e12638b5d3ec6d70e03ebf3cd5bdd7 | [] | no_license | huynguy97/IP-Week7 | 724ea4e887820e6038545b2b4960c830c7d318b4 | d7f9e3eb8188dcf34a721a3539f7c77b1a9dca35 | refs/heads/master | 2020-05-22T08:39:29.016651 | 2019-05-12T17:23:55 | 2019-05-12T17:23:55 | 186,283,114 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 5,091 | cpp | #include <iostream>
#include <fstream>
#include <cassert>
using namespace std;
const int MAX_INPUT_LENGTH = 100;
bool run = true;
string words [100000];
ifstream infile;
string only_lower(string s)
{
assert (s.length() > 0);
string w="";
char c;
for (int i=0; i<s.length(); i++)
{
c = tolower(s[i]);
if (c >= 'a' && c <= 'z')
w += c;
}
return w;
//
}
void get_word(char input[MAX_INPUT_LENGTH], string &output, int &pos)
{
assert(pos >= 0 && pos < MAX_INPUT_LENGTH);
char c;
output = "";
c = input[pos];
while (c != ' ' && c != '\n' && c != '\0')
{
output += c;
pos++;
c = input [pos];
}
//
}
void enter(char input[MAX_INPUT_LENGTH])
{
assert(true);
if (infile.is_open())
infile.close();
string w, filename = "";
int i = 5; //
while (input[i] != '\0' && input[i] != '\n')
{
i++;
get_word(input, w, i);
filename = filename + w + " ";
}
infile.open(filename);
if (infile)
cout << "opening of file is successful.\n";
else
cout << "ERROR: opening of file failed.\n";
i = 0;
infile >> w;
while (infile)
{
words[i] = w;
i++;
infile >> w;
}
words[i+1] = "\0";
//
}
void content()
{
assert(true);
int i = 0;
while (words[i].length() > 0)
{
cout << words[i] << endl;
i++;
}
//
}
void count_seq(char input[MAX_INPUT_LENGTH])
{
assert(true);
int no_words = 0, no_seqWords = 0, no_occ = 0,
last_occ = -MAX_INPUT_LENGTH, no_occWords = 0, i = 5, j = 0;
string w, seq[MAX_INPUT_LENGTH-6];
while (input[i] != '\0' && input[i] != '\n')
{
i++;
get_word(input, w, i);
seq[j] = w;
j++;
}
i = 0;
no_seqWords = j;
while (words[i] != "\0")
{
j = 0;
while (seq[j] == only_lower(words[i+j]) && j < no_seqWords)
j++;
if (j == no_seqWords)
{
no_occ++;
no_occWords += min(no_seqWords, i - last_occ);
last_occ = i;
}
i++;
}
no_words = i;
cout << "no_found: " << no_occ << "\ntotal words: " << no_words
<< "\n%seq/total: " << ((no_occWords*100)/max(1,no_words)) << endl;
/*
*/
}
void find_seq(char input[MAX_INPUT_LENGTH])
{
assert (true);
int i = 5, j = 0, no_seqWords, no_occ = 0;
string w, seq[MAX_INPUT_LENGTH-6];
while (input[i] != '\0' && input[i] != '\n')
{
i++;
get_word(input, w, i);
seq[j] = w;
j++;
}
no_seqWords = j;
i = 0;
while (words[i] != "\0")
{
j = 0;
while (seq[j] == only_lower(words[i+j]) && j < no_seqWords)
j++;
if (j == no_seqWords)
{
cout << i << ", ";
no_occ++;
}
i++;
}
cout << "#found: " << no_occ << endl;
//
}
void context(char input[MAX_INPUT_LENGTH])
{
assert (true);
int i = 8, j = 0, m, no_seqWords, no_occ = 0;
string w, seq[MAX_INPUT_LENGTH-6];
get_word(input, w, i);
if (w[0] >= '0' && w[0] <= '9')
m = stoi(w);
while (input[i] != '\0' && input[i] != '\n')
{
i++;
get_word(input, w, i);
seq[j] = w;
j++;
}
no_seqWords = j;
i = 0;
while (words[i] != "\0")
{
j = 0;
while (seq[j] == only_lower(words[i+j]) && j < no_seqWords)
j++;
if (j == no_seqWords)
{
for (int c = max(i-m,0); c < i + j + m; c++)
cout << words[c] << " ";
cout << endl;
no_occ++;
}
i++;
}
cout << "#found: " << no_occ << endl;
//
}
void read_and_parse_input()
{
assert(true);
char input[MAX_INPUT_LENGTH];
int pos = 0;
string w;
cin.getline(input, MAX_INPUT_LENGTH);
get_word(input, w, pos);
if (w == "enter")
enter(input);
if (w == "content")
content();
if (w == "stop")
run = false;
if (w == "count")
count_seq(input);
if (w == "where")
find_seq(input);
if (w == "context")
context(input);
//
}
int main()
{
while (run)
read_and_parse_input();
return 0;
}
| [
"h.nguyen@student.science.ru.nl"
] | h.nguyen@student.science.ru.nl |
a3371d44e28ab031a77ca645b5833ad99ddb074e | a0442fcd9edc8b6d0975ce8799ea5a67e808c568 | /casa6/casa5/code/casaqt/QwtPlotter/QPPlotItem.qo.h | debad8c7ea73a38c4484fe427171aa3b9f7f51f2 | [] | no_license | kernsuite-debian/carta-casacore | f0046b996e2d0e59bfbf3dbc6b5d7eeaf97813f7 | a88f662d4f6d7ba015dcaf13301d57117a2f3a17 | refs/heads/master | 2022-07-30T04:44:30.215120 | 2021-06-30T10:49:40 | 2021-06-30T10:49:40 | 381,669,021 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 12,576 | h | //# QPPlotItem.qo.h: Superclass for all plot items in qwt plotter.
//# Copyright (C) 2008
//# Associated Universities, Inc. Washington DC, USA.
//#
//# This library is free software; you can redistribute it and/or modify it
//# under the terms of the GNU Library General Public License as published by
//# the Free Software Foundation; either version 2 of the License, or (at your
//# option) any later version.
//#
//# This library is distributed in the hope that it will be useful, but WITHOUT
//# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
//# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
//# License for more details.
//#
//# You should have received a copy of the GNU Library General Public License
//# along with this library; if not, write to the Free Software Foundation,
//# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
//#
//# Correspondence concerning AIPS++ should be addressed as follows:
//# Internet email: aips2-request@nrao.edu.
//# Postal address: AIPS++ Project Office
//# National Radio Astronomy Observatory
//# 520 Edgemont Road
//# Charlottesville, VA 22903-2475 USA
//#
//# $Id: $
#ifndef QPPLOTITEM_H_
#define QPPLOTITEM_H_
#ifdef AIPS_HAS_QWT
#include <casaqt/QwtPlotter/QPImageCache.h>
#include <graphics/GenericPlotter/PlotLogger.h>
#include <graphics/GenericPlotter/PlotOperation.h>
#include <graphics/GenericPlotter/PlotItem.h>
#include <QHash>
#include <QPainter>
#include <QThread>
#include <qwt/qwt_plot.h>
#include <casaqt/QwtConfig.h>
namespace casa {
//# Forward Declarations
class QPCanvas;
// Abstract superclass for any layered item that will be drawn on a
// QPLayeredCanvas.
class QPLayerItem : public QwtPlotItem {
friend class QPCanvas;
friend class QPLayeredCanvas;
friend class QPDrawThread;
public:
// Constructor.
QPLayerItem();
// Destructor.
virtual ~QPLayerItem();
// Implements QwtPlotItem::draw().
#if QWT_VERSION >= 0x060000
virtual void draw(QPainter* p, const QwtScaleMap& xMap,
const QwtScaleMap& yMap, const QRectF& canvasRect) const;
#else
virtual void draw(QPainter* p, const QwtScaleMap& xMap,
const QwtScaleMap& yMap, const QRect& canvasRect) const;
#endif
// See PlotItem::drawSegments().
virtual unsigned int itemDrawSegments(unsigned int segmentThreshold) const;
// ABSTRACT METHODS //
// Forces subclasses to override QwtPlotItem::itemChanged() to redraw only
// the necessary layer.
virtual void itemChanged() = 0;
// Returns true if this item should be drawn, false otherwise. This is
// used to avoid drawing attached items that are empty or otherwise have
// nothing to draw.
virtual bool shouldDraw() const = 0;
// See PlotItem::drawCount().
virtual unsigned int itemDrawCount() const = 0;
// See PlotItem::title().
virtual casacore::String itemTitle() const = 0;
protected:
// Like QwtPlotItem::draw() except that the child item should only draw
// drawCount items starting at drawIndex. The indexing may not be
// applicable to all layer items (i.e., some items may draw everything in
// this call rather than segmenting).
#if QWT_VERSION >= 0x060000
virtual void draw_(QPainter* p, const QwtScaleMap& xMap,
const QwtScaleMap& yMap, const QRectF& drawRect,
unsigned int drawIndex, unsigned int drawCount) const = 0;
#else
virtual void draw_(QPainter* p, const QwtScaleMap& xMap,
const QwtScaleMap& yMap, const QRect& drawRect,
unsigned int drawIndex, unsigned int drawCount) const = 0;
#endif
};
// Subclass of PlotItem to take care of common functionality that is provided
// by QwtPlotItem.
class QPPlotItem : public virtual PlotItem, public QPLayerItem {
friend class QPCanvas;
friend class QPDrawThread;
public:
// Static //
// Convenient access to "origin" name for draw method for logging.
static const casacore::String DRAW_NAME;
using QPLayerItem::draw;
// Returns true if the given pointer is a Qwt plotter implementation,
// false otherwise.
static bool isQPPlotItem(const PlotItemPtr item);
// If the given item is not a Qwt plotter implementation, returns a copy
// of the proper class. Otherwise, returns the item. If wasCloned is
// given, it will be set to true if the returned item is new, false
// otherwise.
static QPPlotItem* cloneItem(const PlotItemPtr item, bool* wasCloned=NULL);
// Returns true if the two items are the same type (class), false
// otherwise.
static bool sameType(QPPlotItem* item1, QPPlotItem* item2);
// Returns true if the given item is a Plot type (QPBarPlot, QPHistogram,
// QPRasterPlot, or QPScatterPlot) or not.
static bool isPlot(QPPlotItem* item);
// Non-Static //
// Constructor.
QPPlotItem();
// Destructor.
virtual ~QPPlotItem();
// PlotItem methods //
// Implements PlotItem::canvas().
PlotCanvas* canvas() const;
// Implements PlotItem::title().
casacore::String title() const;
// Implements PlotItem::setTitle().
void setTitle(const casacore::String& newTitle);
// Implements PlotItem::isQWidget().
virtual bool isQWidget() const { return false; }
// Implements PlotItem::xAxis().
PlotAxis xAxis() const;
// Implements PlotItem::yAxis().
PlotAxis yAxis() const;
// Implements PlotItem::setXAxis().
void setXAxis(PlotAxis x);
// Implements PlotItem::setYAxis().
void setYAxis(PlotAxis y);
// QPLayerItem methods //
// Implements QPLayerItem::itemChanged() to only redraw the canvas layer
// this item is in.
virtual void itemChanged();
// Implements QPLayerItem::shouldDraw().
virtual bool shouldDraw() const { return isValid(); }
// Implements QPLayerItem::itemDrawCount().
unsigned int itemDrawCount() const{ return shouldDraw()? drawCount() : 0; }
// Implements QPLayerItem::itemTitle().
casacore::String itemTitle() const { return title(); }
// QPPlotItem methods //
// Returns the layer this item is attached to.
PlotCanvasLayer canvasLayer() const { return m_layer; }
// Provides access to QwtPlotItem methods that have been overloaded.
// <group>
const QwtText& qwtTitle() const { return QwtPlotItem::title(); }
void setQwtTitle(const QwtText& text) { QwtPlotItem::setTitle(text); }
QwtPlot::Axis qwtXAxis() const{return QwtPlot::Axis(QwtPlotItem::xAxis());}
QwtPlot::Axis qwtYAxis() const{return QwtPlot::Axis(QwtPlotItem::yAxis());}
void qwtAttach(QwtPlot* plot) { QwtPlotItem::attach(plot); }
void qwtDetach() { QwtPlotItem::detach(); }
// </group>
// ABSTRACT METHODS //
// Forces children to override QwtPlotItem::boundingRect().
virtual QwtDoubleRect boundingRect() const = 0;
#if QWT_VERSION < 0x060000
// Legends are totally different in Qwt 6
// Forces children to override QwtPlotItem::legendItem().
virtual QWidget* legendItem() const = 0;
#endif
protected:
// Attached canvas (or NULL for none).
QPCanvas* m_canvas;
// Flag for whether this object's creation has been logged or not. This
// happens the first time the item is attached to a canvas.
bool m_loggedCreation;
// Which layer this item is in.
PlotCanvasLayer m_layer;
// Provides access to QwtPlotItem's attach and detach methods for QPCanvas.
// <group>
void attach(QPCanvas* canvas, PlotCanvasLayer layer);
void detach();
// </group>
// Provides access to the plotter's logger for children.
PlotLoggerPtr logger() const;
// Provides access to logging destruction, for children. Should be called
// in children's destructor.
void logDestruction();
// Provides access to log method enter/exit, for children.
void logMethod(const casacore::String& methodName, bool entering,
const casacore::String& message = casacore::String()) const;
// Provides access to QPCanvas's draw operation for children.
PlotOperationPtr drawOperation() const;
// ABSTRACT METHODS //
// Returns the class name for the child, for logging purposes.
virtual const casacore::String& className() const = 0;
};
// Thread for drawing multiple QPPlotItems into QPImageCaches based on its
// canvas layer. Once the thread is finished, the QPImageCaches can be copied
// to the canvas caches and shown on the GUI widget as needed. The thread will
// emit a signal after each "segment" is drawn, either the whole item for small
// items or part of a large item.
class QPDrawThread : public QThread {
Q_OBJECT
public:
// Static //
// Convenient access to class name.
static const casacore::String CLASS_NAME;
// Returns the default segment threshold.
static const unsigned int DEFAULT_SEGMENT_THRESHOLD;
// Returns item1->z() < item2->z().
// <group>
static bool itemSortByZ(const QPLayerItem* item1,const QPLayerItem* item2);
// </group>
// Draws the given items, sorted by z-order, using the given painter, rect,
// and maps. If PlotOperation parameters are given, they are updated as
// needed.
// <group>
static void drawItem(const QPLayerItem* item, QPainter* painter,
const QRect& rect, const QwtScaleMap maps[QwtPlot::axisCnt]);
static void drawItem(const QPLayerItem* item, QPainter* painter,
const QRect& rect, const QwtScaleMap maps[QwtPlot::axisCnt],
unsigned int drawIndex, unsigned int drawCount);
static void drawItems(const QList<const QPLayerItem*>& items,
QPainter* painter, const QRect& rect,
const QwtScaleMap maps[QwtPlot::axisCnt],
PlotOperationPtr op = PlotOperationPtr(),
unsigned int currentSegment = 0, unsigned int totalSegments = 0,
unsigned int segmentThreshold =
QPDrawThread::DEFAULT_SEGMENT_THRESHOLD);
static void drawItems(const QList<const QPPlotItem*>& items,
QPainter* painter, const QRect& rect,
const QwtScaleMap maps[QwtPlot::axisCnt],
PlotOperationPtr op = PlotOperationPtr(),
unsigned int currentSegment = 0, unsigned int totalSegments = 0,
unsigned int segmentThreshold =
QPDrawThread::DEFAULT_SEGMENT_THRESHOLD);
// </group>
// Non-Static //
// Constructor which takes a list of items to draw, axes maps, the drawing
// rectangle, an optional fixed image size, and an optional segment
// threshold.
QPDrawThread(const QList<const QPPlotItem*>& items,
const QwtScaleMap maps[QwtPlot::axisCnt], QSize imageSize,
unsigned int segmentTreshold = DEFAULT_SEGMENT_THRESHOLD);
// Destructor.
~QPDrawThread();
// Returns the total segments that will be drawn. This is AT LEAST the
// number of items to be drawn.
unsigned int totalSegments() const;
// Implements QThread::run(). Draws the items into one of the two images
// depending on their layers. Emits segmentDrawn() after each segment is
// finished.
void run();
// Returns the image result for the given layer. Should only be done AFTER
// the thread is finished. If clearResult is true, then the resulting
// image is removed from the thread's images.
QPImageCache drawResult(PlotCanvasLayer layer, bool clearResult = true);
//Used for identifying threads when debugging.
int getId() const {
return id;
}
public slots:
// Cancels this thread. If the thread is currently running, it will finish
// the segment it is on and then stop.
void cancel();
private:
int id;
// Items to draw.
QList<const QPPlotItem*> m_items;
// Axes maps.
QwtScaleMap m_axesMaps[QwtPlot::axisCnt];
// Images to draw into.
QHash<PlotCanvasLayer, QPImageCache*> m_images;
// Maximum number of draw items per segment.
unsigned int m_segmentThreshold;
// Flag that thread checks while running, to cancel rest of draw.
bool m_cancelFlag;
};
}
#endif
#endif /* QPPLOTITEM_H_ */
| [
"aramaila@ska.ac.za"
] | aramaila@ska.ac.za |
7466f438a5dbbde5aff1cd046e275fb6c0378652 | 3b97b786b99c3e4e72bf8fe211bb710ecb674f2b | /TClient/TChatClient/stdafx.h | 848afe5b02ec80861c511b9b060f06eac58e56c9 | [] | no_license | moooncloud/4s | 930384e065d5172cd690c3d858fdaaa6c7fdcb34 | a36a5785cc20da19cd460afa92a3f96e18ecd026 | refs/heads/master | 2023-03-17T10:47:28.154021 | 2017-04-20T21:42:01 | 2017-04-20T21:42:01 | null | 0 | 0 | null | null | null | null | UHC | C++ | false | false | 2,265 | h | // stdafx.h : 잘 변경되지 않고 자주 사용하는
// 표준 시스템 포함 파일 및 프로젝트 관련 포함 파일이
// 들어 있는 포함 파일입니다.
#pragma once
#ifndef VC_EXTRALEAN
#define VC_EXTRALEAN // Windows 헤더에서 거의 사용되지 않는 내용을 제외시킵니다.
#endif
// 아래 지정된 플랫폼보다 우선하는 플랫폼을 대상으로 하는 경우 다음 정의를 수정하십시오.
// 다른 플랫폼에 사용되는 해당 값의 최신 정보는 MSDN을 참조하십시오.
#ifndef WINVER // Windows 95 및 Windows NT 4 이후 버전에서만 기능을 사용할 수 있습니다.
#define WINVER 0x0400 // Windows 98과 Windows 2000 이후 버전에 맞도록 적합한 값으로 변경해 주십시오.
#endif
#ifndef _WIN32_WINNT // Windows NT 4 이후 버전에서만 기능을 사용할 수 있습니다.
#define _WIN32_WINNT 0x0400 // Windows 98과 Windows 2000 이후 버전에 맞도록 적합한 값으로 변경해 주십시오.
#endif
#ifndef _WIN32_WINDOWS // Windows 98 이후 버전에서만 기능을 사용할 수 있습니다.
#define _WIN32_WINDOWS 0x0410 // Windows Me 이후 버전에 맞도록 적합한 값으로 변경해 주십시오.
#endif
#ifndef _WIN32_IE // IE 4.0 이후 버전에서만 기능을 사용할 수 있습니다.
#define _WIN32_IE 0x0400 // IE 5.0 이후 버전에 맞도록 적합한 값으로 변경해 주십시오.
#endif
#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // 일부 CString 생성자는 명시적으로 선언됩니다.
// MFC의 공통 부분과 무시 가능한 경고 메시지에 대한 숨기기를 해제합니다.
#define _AFX_ALL_WARNINGS
#include <afxwin.h> // MFC 핵심 및 표준 구성 요소
#include <afxext.h> // MFC 익스텐션
#include <afxdisp.h> // MFC 자동화 클래스
#include <afxdtctl.h> // Internet Explorer 4 공용 컨트롤에 대한 MFC 지원
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h> // Windows 공용 컨트롤에 대한 MFC 지원
#include <afxsock.h>
using namespace std;
#include <vector>
#include <map>
#include <CSProtocol.h>
#include <CTProtocol.h>
#include <NetCode.h>
#include "TChatType.h"
#endif // _AFX_NO_AFXCMN_SUPPORT
#define _GSP | [
"great.mafia2010@gmail.com"
] | great.mafia2010@gmail.com |
950820e5fc4c35054ff909db0f3f043e88aea452 | 3cc352b29b8042b4a9746796b851d8469ff9ff62 | /src/solexa/SolexaTools.h | 18cbe49e7a5d4b6f159d0e7e3becce4238f2be33 | [
"BSD-3-Clause",
"BSD-2-Clause"
] | permissive | CompRD/BroadCRD | 1412faf3d1ffd9d1f9907a496cc22d59ea5ad185 | 303800297b32e993abd479d71bc4378f598314c5 | refs/heads/master | 2020-12-24T13:53:09.985406 | 2019-02-06T21:38:45 | 2019-02-06T21:38:45 | 34,069,434 | 4 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 7,425 | h | ///////////////////////////////////////////////////////////////////////////////
// SOFTWARE COPYRIGHT NOTICE AGREEMENT //
// This software and its documentation are copyright (2010) by the //
// Broad Institute. All rights are reserved. This software is supplied //
// without any warranty or guaranteed support whatsoever. The Broad //
// Institute is not responsible for its use, misuse, or functionality. //
///////////////////////////////////////////////////////////////////////////////
#ifndef SOLEXA_TOOLS_H
#define SOLEXA_TOOLS_H
#include "Basevector.h"
#include "CoreTools.h"
#include "FetchReads.h"
#include "lookup/LookAlign.h"
#include "random/Shuffle.h"
#include "solexa/FourBase.h"
#include "solexa/PredictorParameterHandler.h"
#include "Map.h"
#include "solexa/SolexaPipeline.h"
#include "Boolvector.h"
/** Parameters needed for producing error predictors.
\class SolexaPredictorParameters
*/
class SolexaPredictorParameters: public PredictorParameterHandler {
//parameters used in SffRead::GetPredictors:
private:
typedef map<String,String> smap;
smap params_;
public:
virtual ~SolexaPredictorParameters() {}
virtual String GetPredictorParameters() const;
virtual void SetPredictorParameters(const String & params);
int Get(const String & s) const {
if (!IsKey(params_,s)) return -1;
else return params_.find(s)->second.Int();
}
String GetString(const String & s) const {
if (!IsKey(params_,s)) return "";
else return params_.find(s)->second;
}
void SetFromFile(const String & fname);
};
/// Function: LoadSolexaData
///
/// Load Solexa data from location HEAD, generating:
/// bases - the reads
/// basesrc - the reverse complements of the reads
/// I - the intensities
/// ref - the reference
/// rref - the reverse complement of the reference
/// aligns - alignments of the reads to the reference
/// aligns_index - index by read of the alignments
void LoadSolexaData( const String& HEAD, vecbasevector& bases,
vecbasevector& basesrc, VecFourBaseVec& I, vecbasevector& ref,
vecbasevector& rref, vec<look_align>& aligns, vec< vec<int> >& aligns_index, Bool loadIntensities = True );
/// Load only bases and intensities.
void LoadSolexaData( const String& HEAD, vecbasevector& bases,
vecbasevector& basesrc, VecFourBaseVec& I, Bool loadIntensities = True );
/*
Function: ExpandHead
Given a file prefix representing a <string set> -- most commonly based on
a set of <lane> numbers -- return a list of strings of individual prefixes,
one per lane.
*/
void ExpandHead( const String& HEAD, vec<String>& HEADS, int trunc = 0,
const String& pipeline = SOLEXAPIPELINE, Bool paired = False );
void RequireSameRef( const vec<String>& HEADS );
void SetRef( const String& REF, String& REFX, const String& HEAD,
const vec<String>& HEADS );
/// Load from multiple heads. The argument HEADS is in ParseStringSet format.
/// See ExpandHead in SolexaTools.cc for how the list is expanded.
///
/// trunc: use subdirectory trunc_n (only works for certain forms)
void LoadSolexaData( const String& HEADS, const String& QLTOUT,
const String& REF, vecbasevector& bases, VecFourBaseVec& I,
vecbasevector& ref, vecbasevector& rref, vec<look_align>& aligns,
vec< vec<int> >& aligns_index, Bool loadIntensities = True );
void LoadSolexaData( const String& HEADS, const String& HEADS_TAIL,
const int trunc, const String& REF, vecbasevector& bases, VecFourBaseVec& I,
vecbasevector& ref, Bool loadIntensities = True );
void LoadSolexaData( const String& HEAD, const String& HEAD_TAIL, const int trunc,
const String& REF, vecbasevector& bases, vecbasevector& ref );
void LoadSolexaData( const String& HEADS, vecbasevector& bases,
VecFourBaseVec& I, Bool loadIntensities = True );
void LoadSolexaData( const String& HEADS, const String& REF,
vecbasevector& ref, vecbasevector& rref );
/// FilterPileups: filter out read pileups: coverage > 2 * mean coverage. Return
// number of reads filtered. Changes best entry to -1 to signify filtering out.
int FilterPileups(
const vecbasevector& bases, // the reads
const vecbasevector& ref, // the reference
const vec<look_align>& aligns, // alignments of reads to reference
const vec< vec<int> >& aligns_index, // index by read of alignments
const vec<float>& minq10, // min quality of first 10 bases
vec<int>& best, // index of best alignment (modified)
const double MIN_RATIO = 2.0, // defines filtering
Bool verbose = False
);
/// GetMinQ10: for each read, find the minimum quality of its first 10 bases.
/// Templatized to allow use of serial or mapped feudal access.
/// dummyCall = True - do not really check call quality. Used when did not
/// load intensities.
// TODO: potentially dangerous truncation of index by nreads
template< class MasterVecLike >
void GetMinQ10( const MasterVecLike & I, int nreads, vec<float>& minq10, Bool dummyCall = False )
{ minq10.resize(nreads);
for ( int id = 0; id < nreads; id++ )
{ minq10[id] = 1000000000;
if (dummyCall) continue;
FourBaseVec const& fbv = I[id];
if ( fbv.size( ) < 10 ) minq10[id] = 1.0;
else
{ for ( int j = 0; j < 10; j++ )
{ minq10[id] = Min(
minq10[id], fbv[j].CallQuality( ) );
}
}
}
}
/// Select reads that are not homopolymers and measure decay/height.
/// Takes in a filename and uses ReadOne, since it picks reads at
/// random from the file.
void GetDecayHeight( const String & intFname, const vecbasevector & reads,
NormalDistribution & decay, NormalDistribution & height,
const int N=5000);
/// Function: FindRun
///
/// Given a <flowcell>, find the corresponding <run> in the <Broad pipeline directory>.
/// Return its path as _run_. Also return the date of the run.
void FindRun( const String& flowcell, String& run, String& run_date,
const String& pipeline = SOLEXAPIPELINE );
/// Function: FindPairedRun
///
/// Given a <flowcell>, find the corresponding paired <run>s in the <Broad pipeline directory>.
/// Return its path as _run_.
void FindPairedRun( const String& flowcell, String& runA, String& runB,
const String& pipeline );
/// Read the indicated column of paramsbyread file into vec v.
void LoadVecFromParamsFile( const String & file, int column, vec<float> & v);
/// Read the indicated column of paramsbyread file into vec v.
void LoadVecFromParamsFile( const String & file, const String & columnName,
vec<float> & v);
#define VEC_FROM_PARAMS_FILE(fname, vecname) \
vec<float> vecname; \
LoadVecFromParamsFile(fname, #vecname, vecname);
/**
Function: LoadReadAligns
For a set of reads in a <.fastb> file, load their alignments to the reference
from a <.qltout> file.
Parameters:
qltoutFileName - the <.qltout> file from which to load the alignments.
*/
void LoadReadAligns( const String& qltoutFileName, read_aligns_plus_t& readAligns );
// Creates a BaitMap to do this, so it you already have one created
// use the BaitMap method instead.
void LoadBaitMapAsMask(vec<boolvector> *mask, const String &file_name, int padding=0);
#endif
| [
"neil.weisenfeld@gmail.com"
] | neil.weisenfeld@gmail.com |
46b95dbf63844683851ebe70eb1c02039d40bac8 | b85502a781bed6e2f746c0794bdcf48285ac906c | /trunk/blocks/krimp/codetable/coverfull/CFMCodeTable.h | af6269c483dc7eb4258c2fc53c8c55c958e896d8 | [] | no_license | JazSingh/KrimpAll | 83329776a2fc575efea88ddb450d1e078630a09e | e66918430c9efd84f7b026e326d11db02d834410 | refs/heads/master | 2020-03-11T19:16:12.418395 | 2018-04-19T10:58:55 | 2018-04-19T10:58:55 | 130,202,166 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 957 | h | #define BROKEN
#ifndef __CFMCODETABLE_H
#define __CFMCODETABLE_H
/*
CFMCodeTable - CoverFullMinimal
Cover each row from DB up till the new code table element.
IF it has actually been used, also cover using the rest of the code table.
Pre- and Post-Prune compatible
*/
#include "CFCodeTable.h"
class CFMCodeTable : public CFCodeTable {
public:
CFMCodeTable();
virtual ~CFMCodeTable();
virtual string GetShortName() { return "cfm"; }
virtual string GetConfigName() { return GetConfigBaseName(); }
static string GetConfigBaseName() { return "coverfull-minimal"; }
virtual void UseThisStuff(Database *db, ItemSetType type, CTInitType ctinit, uint32 maxCTElemLength=0, uint32 toMinSup = 0);
virtual void CoverDB(CoverStats &stats);
virtual void RollbackCounts();
protected:
CoverSet** mCDB;
uint32 mRollback;
bool mRollbackAlph;
};
#endif // __CFMCODETABLE_H
#endif // BROKEN
| [
"JazSingh@users.noreply.github.com"
] | JazSingh@users.noreply.github.com |
1af2b23f398b2a8927d14c5d8ec6ebb28060b897 | e37b159fe240ffb5d2e4d4767ca1c8502768e3b8 | /Thrust/Engine/Windows.cpp | 44af487e25c1828ccbe03764789232a41c69e06d | [] | no_license | bsgg/DirectXChiliAdvanced | 5862a6e94313bfed6ddf36e7a4da8ee2a3843599 | 8de0db20409e3cb93dcd4cccd0365e5809d925e5 | refs/heads/master | 2021-01-11T11:55:18.973370 | 2017-03-14T19:49:57 | 2017-03-14T19:49:57 | 76,738,334 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 5,263 | cpp | /******************************************************************************************
* Chili DirectX Framework Version 14.03.22 *
* Windows.cpp *
* Copyright 2014 PlanetChili.net <http://www.planetchili.net> *
* *
* This file is part of The Chili DirectX Framework. *
* *
* The Chili DirectX Framework is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* The Chili DirectX Framework 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 The Chili DirectX Framework. If not, see <http://www.gnu.org/licenses/>. *
******************************************************************************************/
#include <Windows.h>
#include <wchar.h>
#include "D3DGraphics.h"
#include "Game.h"
#include "resource.h"
#include "Mouse.h"
static KeyboardServer kServ;
static MouseServer mServ;
LRESULT WINAPI MsgProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam )
{
switch( msg )
{
case WM_DESTROY:
PostQuitMessage( 0 );
break;
// ************ KEYBOARD MESSAGES ************ //
case WM_KEYDOWN:
if( !( lParam & 0x40000000 ) ) // no thank you on the autorepeat
{
kServ.OnKeyPressed( wParam );
}
break;
case WM_KEYUP:
kServ.OnKeyReleased( wParam );
break;
case WM_CHAR:
kServ.OnChar( wParam );
break;
// ************ END KEYBOARD MESSAGES ************ //
// ************ MOUSE MESSAGES ************ //
case WM_MOUSEMOVE:
{
int x = (short)LOWORD( lParam );
int y = (short)HIWORD( lParam );
if( x > 0 && x < D3DGraphics::SCREENWIDTH && y > 0 && y < D3DGraphics::SCREENHEIGHT )
{
mServ.OnMouseMove( x,y );
if( !mServ.IsInWindow() )
{
SetCapture( hWnd );
mServ.OnMouseEnter();
}
}
else
{
if( wParam & (MK_LBUTTON | MK_RBUTTON) )
{
x = max( 0,x );
x = min( D3DGraphics::SCREENWIDTH - 1,x );
y = max( 0,y );
y = min( D3DGraphics::SCREENHEIGHT - 1,y );
mServ.OnMouseMove( x,y );
}
else
{
ReleaseCapture();
mServ.OnMouseLeave();
mServ.OnLeftReleased(x, y);
mServ.OnRightReleased(x, y);
}
}
break;
}
case WM_LBUTTONDOWN:
{
int x = (short)LOWORD(lParam);
int y = (short)HIWORD(lParam);
mServ.OnLeftPressed(x, y);
break;
}
case WM_RBUTTONDOWN:
{
int x = (short)LOWORD(lParam);
int y = (short)HIWORD(lParam);
mServ.OnRightPressed(x, y);
break;
}
case WM_LBUTTONUP:
{
int x = (short)LOWORD(lParam);
int y = (short)HIWORD(lParam);
mServ.OnLeftReleased(x, y);
break;
}
case WM_RBUTTONUP:
{
int x = (short)LOWORD(lParam);
int y = (short)HIWORD(lParam);
mServ.OnRightReleased(x, y);
break;
}
case WM_MOUSEWHEEL:
{
// Check the mouse wheel
int x = (short)LOWORD(lParam);
int y = (short)HIWORD(lParam);
if (GET_WHEEL_DELTA_WPARAM(wParam) > 0)
{
mServ.OnWheelUp(x, y);
}
else if (GET_WHEEL_DELTA_WPARAM(wParam) < 0)
{
mServ.OnWheelDown(x, y);
}
break;
}
// ************ END MOUSE MESSAGES ************ //
}
return DefWindowProc( hWnd, msg, wParam, lParam );
}
int WINAPI wWinMain( HINSTANCE hInst,HINSTANCE,LPWSTR,INT )
{
WNDCLASSEX wc = { sizeof( WNDCLASSEX ),CS_CLASSDC,MsgProc,0,0,
GetModuleHandle( NULL ),NULL,NULL,NULL,NULL,
L"Chili DirectX Framework Window",NULL };
wc.hIconSm = (HICON)LoadImage( hInst,MAKEINTRESOURCE( IDI_APPICON16 ),IMAGE_ICON,16,16,0 );
wc.hIcon = (HICON)LoadImage( hInst,MAKEINTRESOURCE( IDI_APPICON32 ),IMAGE_ICON,32,32,0 );
wc.hCursor = LoadCursor( NULL,IDC_ARROW );
RegisterClassEx( &wc );
RECT wr;
wr.left = 650;
wr.right = D3DGraphics::SCREENWIDTH + wr.left;
wr.top = 150;
wr.bottom = D3DGraphics::SCREENHEIGHT + wr.top;
AdjustWindowRect( &wr,WS_CAPTION | WS_MINIMIZEBOX | WS_SYSMENU,FALSE );
HWND hWnd = CreateWindowW( L"Chili DirectX Framework Window",L"Chili DirectX Framework",
WS_CAPTION | WS_MINIMIZEBOX | WS_SYSMENU,wr.left,wr.top,wr.right-wr.left,wr.bottom-wr.top,
NULL,NULL,wc.hInstance,NULL );
ShowWindow( hWnd,SW_SHOWDEFAULT );
UpdateWindow( hWnd );
Game theGame( hWnd,kServ,mServ );
MSG msg;
ZeroMemory( &msg,sizeof( msg ) );
while( msg.message != WM_QUIT )
{
if( PeekMessage( &msg,NULL,0,0,PM_REMOVE ) )
{
TranslateMessage( &msg );
DispatchMessage( &msg );
}
//else
{
theGame.Go();
}
}
UnregisterClass( L"Chili DirectX Framework Window",wc.hInstance );
return 0;
} | [
"beatriz.s.g86@gmail.com"
] | beatriz.s.g86@gmail.com |
c1a2380a54613d90e6047a38dbce2d06652890ed | 41eff316a4c252dbb71441477a7354c9b192ba41 | /src/PhysX/physx/source/physxextensions/src/serialization/Binary/SnConvX_Convert.cpp | ed3345f1cf39aa5c171d7605cd015e84cd19bf77 | [] | no_license | erwincoumans/pybullet_physx | 40615fe8502cf7d7a5e297032fc4af62dbdd0821 | 70f3e11ad7a1e854d4f51992edd1650bbe4ac06a | refs/heads/master | 2021-07-01T08:02:54.367317 | 2020-10-22T21:43:34 | 2020-10-22T21:43:34 | 183,939,616 | 21 | 2 | null | null | null | null | UTF-8 | C++ | false | false | 45,495 | cpp | //
// 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 NVIDIA CORPORATION 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 ``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.
//
// Copyright (c) 2008-2019 NVIDIA Corporation. All rights reserved.
#include "foundation/PxErrorCallback.h"
#include "extensions/PxDefaultStreams.h"
#include "SnConvX.h"
#include "serialization/SnSerialUtils.h"
#include "PsAlloca.h"
#include "CmUtils.h"
#include <assert.h>
using namespace physx;
using namespace physx::Sn;
using namespace Cm;
void Sn::ConvX::resetConvexFlags()
{
mConvexFlags.clear();
}
void Sn::ConvX::_enumerateFields(const MetaClass* mc, ExtraDataEntry2* entries, int& nb, int baseOffset, MetaDataType type) const
{
PxU32 nbFields = mc->mFields.size();
int offsetCheck = baseOffset;
for(PxU32 j=0;j<nbFields;j++)
{
const PxMetaDataEntry& entry = mc->mFields[j];
if(entry.mFlags & PxMetaDataFlag::eCLASS || entry.mFlags & PxMetaDataFlag::eEXTRA_DATA)
continue;
assert(offsetCheck == baseOffset + entry.mOffset);
int currentOffset = baseOffset + entry.mOffset;
//for(int c=0;c<entry.mCount;c++)
{
if(entry.mFlags & PxMetaDataFlag::eUNION)
{
entries[nb].entry = entry;
entries[nb].offset = currentOffset;
entries[nb].cb = 0;
nb++;
}
else if(entry.mFlags & PxMetaDataFlag::ePTR) // This also takes care of the vtable pointer
{
entries[nb].entry = entry;
entries[nb].offset = currentOffset;
entries[nb].cb = &Sn::ConvX::convertPtr;
nb++;
}
else if(entry.mFlags & PxMetaDataFlag::eHANDLE)
{
entries[nb].entry = entry;
entries[nb].offset = currentOffset;
entries[nb].cb = &Sn::ConvX::convertHandle16;
nb++;
}
else
{
MetaClass* fieldType = getMetaClass(entry.mType, type);
assert(fieldType);
if(fieldType->mCallback)
{
entries[nb].entry = entry;
entries[nb].offset = currentOffset;
entries[nb].cb = fieldType->mCallback;
nb++;
}
else
{
for(int c=0;c<entry.mCount;c++)
{
_enumerateFields(fieldType, entries, nb, currentOffset, type);
currentOffset += entry.mSize/entry.mCount;
}
}
}
}
offsetCheck += entry.mSize;
}
}
void Sn::ConvX::_enumerateExtraData(const char* address, const MetaClass* mc, ExtraDataEntry* entries,
int& nb, int offset, MetaDataType type) const
{
PxU32 nbFields = mc->mFields.size();
for(PxU32 j=0;j<nbFields;j++)
{
const PxMetaDataEntry& entry = mc->mFields[j];
if(entry.mFlags & PxMetaDataFlag::eCLASS /*|| entry.mFlags & PxMetaDataFlag::ePTR*/ || entry.mFlags & PxMetaDataFlag::eTYPEDEF)
continue;
const char* entryType = entry.mType;
//
// Insanely Twisted Shadow GeometryUnion
//
// Special code is needed as long as there are no meta data tags to describe our unions properly. The way it is done here is
// not future-proof at all. There should be a tag to describe where the union type can be found and the number of bytes
// this type id needs. Then a mapping needs to get added from each union type id to the proper meta class name.
//
if (entry.mFlags & PxMetaDataFlag::eUNION)
{
if (!mc->mClassName || strcmp(mc->mClassName, "Gu::GeometryUnion")!=0)
continue;
else
{
// ### hardcoded bit here, will only work when union type is the first int of the struct
const int* tmp = reinterpret_cast<const int*>(address + offset);
const int unionType = *tmp;
ConvX* tmpConv = const_cast<ConvX*>(this); // ... don't ask
const char* typeName = tmpConv->getTypeName(entry.mType, unionType);
assert(typeName);
bool isTriMesh = (strcmp(typeName, "PxTriangleMeshGeometryLL") == 0);
bool isHeightField = (strcmp(typeName, "PxHeightFieldGeometryLL") == 0);
if (!isTriMesh && !isHeightField)
{
continue;
}
else
{
entryType = typeName;
}
}
}
// MetaClass* extraDataType = getMetaClass(entry.mType, type);
// if(!extraDataType)
// continue;
if(entry.mFlags & PxMetaDataFlag::eEXTRA_DATA)
{
entries[nb].entry = entry;
entries[nb].offset = offset+entry.mOffset;
nb++;
}
else
{
if(entry.mFlags & PxMetaDataFlag::ePTR)
continue;
MetaClass* extraDataType = getMetaClass(entryType, type);
if(!extraDataType)
continue;
if(!extraDataType->mCallback)
_enumerateExtraData(address, extraDataType, entries, nb, offset+entry.mOffset, type);
}
}
}
PxU64 Sn::ConvX::read64(const void*& buffer)
{
const PxU64* buf64 = reinterpret_cast<const PxU64*>(buffer);
buffer = reinterpret_cast<const void*>(size_t(buffer) + sizeof(PxU64));
PxU64 value = *buf64;
output(value);
return value;
}
int Sn::ConvX::read32(const void*& buffer)
{
const int* buf32 = reinterpret_cast<const int*>(buffer);
buffer = reinterpret_cast<const void*>(size_t(buffer) + sizeof(int));
int value = *buf32;
output(value);
return value;
}
short Sn::ConvX::read16(const void*& buffer)
{
const short* buf16 = reinterpret_cast<const short*>(buffer);
buffer = reinterpret_cast<const void*>(size_t(buffer) + sizeof(short));
short value = *buf16;
output(value);
return value;
}
#if PX_CHECKED
extern const char* gVTable;
static bool compareEntries(const ExtraDataEntry2& e0, const ExtraDataEntry2& e1)
{
if(e0.entry.isVTablePtr() && e1.entry.isVTablePtr())
return true;
if((e0.entry.mFlags & PxMetaDataFlag::eUNION) && (e1.entry.mFlags & PxMetaDataFlag::eUNION))
{
if(e0.entry.mType && e1.entry.mType)
{
// We can't compare the ptrs since they index different string tables
if(strcmp(e0.entry.mType, e1.entry.mType)==0)
return true;
}
return false;
}
if(e0.entry.mName && e1.entry.mName)
{
// We can't compare the ptrs since they index different string tables
if(strcmp(e0.entry.mName, e1.entry.mName)==0)
return true;
}
return false;
}
#endif
// TODO: optimize this
bool Sn::ConvX::convertClass(const char* buffer, const MetaClass* mc, int offset)
{
// ---- big convex surgery ----
bool convexSurgery = false;
bool foundNbVerts = false;
bool removeBigData = false;
// force reference
(void)foundNbVerts;
displayMessage(PxErrorCode::eDEBUG_INFO, "%s\n", mc->mClassName);
displayMessage(PxErrorCode::eDEBUG_INFO, "+++++++++++++++++++++++++++++++++++++++++++++\n");
if(strcmp(mc->mClassName, "ConvexMesh")==0)
{
convexSurgery = true;
}
// ---- big convex surgery ----
int nbSrcEntries = 0;
PX_ALLOCA(srcEntries, ExtraDataEntry2, 256); // ### painful ctors here
int nbDstEntries = 0;
PX_ALLOCA(dstEntries, ExtraDataEntry2, 256); // ### painful ctors here
// Find corresponding meta-class for target platform
const MetaClass* target_mc = getMetaClass(mc->mClassName, META_DATA_DST);
assert(target_mc);
if(mc->mCallback)
{
srcEntries[0].cb = mc->mCallback;
srcEntries[0].offset = offset;
srcEntries[0].entry.mType = mc->mClassName;
srcEntries[0].entry.mName = mc->mClassName;
srcEntries[0].entry.mOffset = offset;
srcEntries[0].entry.mSize = mc->mSize;
srcEntries[0].entry.mCount = 1;
srcEntries[0].entry.mFlags = 0;
nbSrcEntries = 1;
assert(target_mc->mCallback);
dstEntries[0].cb = target_mc->mCallback;
dstEntries[0].offset = offset;
dstEntries[0].entry.mType = target_mc->mClassName;
dstEntries[0].entry.mName = target_mc->mClassName;
dstEntries[0].entry.mOffset = offset;
dstEntries[0].entry.mSize = target_mc->mSize;
dstEntries[0].entry.mCount = 1;
dstEntries[0].entry.mFlags = 0;
nbDstEntries = 1;
}
else
{
nbSrcEntries = 0;
_enumerateFields(mc, srcEntries, nbSrcEntries, 0, META_DATA_SRC);
assert(nbSrcEntries<256);
nbDstEntries = 0;
_enumerateFields(target_mc, dstEntries, nbDstEntries, 0, META_DATA_DST);
assert(nbDstEntries<256);
// nb = mc->mNbEntries;
// assert(nb>=0);
// memcpy(entries, mc->mEntries, nb*sizeof(ExtraDataEntry2));
}
int srcOffsetCheck = 0;
int dstOffsetCheck = 0;
int j = 0;
// Track cases where the vtable pointer location is different for different platforms.
// The variables indicate whether a platform has a vtable pointer entry that has not been converted yet
// and they will remember the index of the corrssponding entry. This works because there can only
// be one open vtable pointer entry at a time.
int srcOpenVTablePtrEntry = -1;
int dstOpenVTablePtrEntry = -1;
//if the src and dst platform place the vtable pointers at different locations some fiddling with the iteration count can be necessary.
int addVTablePtrShiftIteration = 0;
const int maxNb = nbSrcEntries > nbDstEntries ? nbSrcEntries : nbDstEntries;
for(int i=0; i < (maxNb + addVTablePtrShiftIteration); i++)
{
if (i < nbSrcEntries)
{
displayMessage(PxErrorCode::eDEBUG_INFO, "\t0x%p\t%02x\t%d\t%d\t%s", buffer + srcOffsetCheck,
static_cast<unsigned char>(buffer[srcOffsetCheck]), srcOffsetCheck, srcEntries[i].entry.mOffset, srcEntries[i].entry.mName);
for (int byteCount = 1; byteCount < srcEntries[i].entry.mSize; ++byteCount)
displayMessage(PxErrorCode::eDEBUG_INFO, "\t0x%p\t%02x\t%d\t%d\t.", buffer + srcOffsetCheck + byteCount,
static_cast<unsigned char>(buffer[srcOffsetCheck + byteCount]), srcOffsetCheck + byteCount, srcEntries[i].entry.mOffset + byteCount);
}
bool handlePadding = true;
bool skipLoop = false;
while(handlePadding)
{
const int pad0 = i<nbSrcEntries ? srcEntries[i].entry.mFlags & PxMetaDataFlag::ePADDING : 0;
const int pad1 = j<nbDstEntries ? dstEntries[j].entry.mFlags & PxMetaDataFlag::ePADDING : 0;
if(pad0 || pad1)
{
if(pad0)
{
#if PX_CHECKED
if (mMarkedPadding && (strcmp(srcEntries[i].entry.mType, "paddingByte")==0))
if(!checkPaddingBytes(buffer + srcOffsetCheck, srcEntries[i].entry.mSize))
{
if(i>0)
{
displayMessage(PxErrorCode::eDEBUG_WARNING,
"PxBinaryConverter warning: Bytes after %s::%s don't look like padding bytes. Likely mismatch between binary data and metadata.\n",
mc->mClassName, srcEntries[i-1].entry.mName );
}
else
displayMessage(PxErrorCode::eDEBUG_WARNING,
"PxBinaryConverter warning: Bytes after %s don't look like padding bytes. Likely mismatch between binary data and metadata.\n",
mc->mClassName);
}
#endif
if(pad1)
{
// Both have padding
// ### check sizes, output bytes
if(srcEntries[i].entry.mSize==dstEntries[j].entry.mSize)
{
// I guess we can just go on with the normal code here
handlePadding = false;
}
else
{
// Output padding
assert(srcEntries[i].cb);
assert(srcEntries[i].offset == srcOffsetCheck);
const int padSize = dstEntries[j].entry.mSize;
char* paddingBytes = reinterpret_cast<char*>(PX_ALLOC(sizeof(char)*padSize, "paddingByte"));
memset(paddingBytes, 0, size_t(padSize));
assert(dstEntries[j].cb);
(this->*dstEntries[j].cb)(paddingBytes, dstEntries[j].entry, dstEntries[j].entry);
assert(dstOffsetCheck==dstEntries[j].offset);
dstOffsetCheck += padSize;
PX_FREE(paddingBytes);
// srcEntries[i].cb(buffer+srcOffsetCheck, srcEntries[i].entry, dstEntries[j].entry);
// assert(dstOffsetCheck==dstEntries[j].offset);
// dstOffsetCheck += dstEntries[j].entry.mSize;
srcOffsetCheck += srcEntries[i].entry.mSize;
// Skip dest padding field
j++;
// continue; // ### BUG, doesn't go back to the "for"
skipLoop = true;
handlePadding = false;
}
}
else
{
// Src has padding, dst has not => skip conversion
// Don't increase j
skipLoop = true;
handlePadding = false;
srcOffsetCheck += srcEntries[i].entry.mSize;
}
}
else
{
if(pad1)
{
// Dst has padding, src has not
// Output padding
const int padSize = dstEntries[j].entry.mSize;
char* paddingBytes = reinterpret_cast<char*>(PX_ALLOC(sizeof(char)*padSize, "paddingByte"));
memset(paddingBytes, 0, size_t(padSize));
assert(dstEntries[j].cb);
(this->*dstEntries[j].cb)(paddingBytes, dstEntries[j].entry, dstEntries[j].entry);
assert(dstOffsetCheck==dstEntries[j].offset);
dstOffsetCheck += padSize;
PX_FREE(paddingBytes);
// Skip dest padding field, keep same src field
j++;
}
else
{
assert(0);
}
}
}
else handlePadding = false;
}
if(skipLoop)
continue;
int modSrcOffsetCheck = srcOffsetCheck;
const ExtraDataEntry2* srcEntryPtr = &srcEntries[i];
const ExtraDataEntry2* dstEntryPtr = &dstEntries[j];
bool isSrcVTablePtr = (i < nbSrcEntries) ? srcEntryPtr->entry.isVTablePtr() : false;
if (isSrcVTablePtr && (dstOpenVTablePtrEntry != -1))
{
// vtable ptr position mismatch:
// this check is necessary to align src and dst index again when the
// dst vtable pointer has been written already and the src vtable ptr
// element is reached.
//
// i
// src: | a | b | vt-ptr | c | ...
// dst: | vt-ptr | a | b | c | ...
// j
//
// it needs special treatment because the following case fails otherwise
// i
// src: | a | b | vt-ptr | c | vt-ptr | ...
// dst: | vt-ptr | a | b | vt-ptr | c | ...
// j
//
// This entry has been written already -> advance to next src entry
//
srcOffsetCheck += srcEntryPtr->entry.mSize;
i++;
isSrcVTablePtr = (i < nbSrcEntries) ? srcEntryPtr->entry.isVTablePtr() : false;
PX_ASSERT(dstOpenVTablePtrEntry < nbDstEntries);
PX_ASSERT(dstEntries[dstOpenVTablePtrEntry].entry.isVTablePtr());
dstOpenVTablePtrEntry = -1;
PX_ASSERT(addVTablePtrShiftIteration == 0);
}
bool isDstVTablePtr = (j < nbDstEntries) ? dstEntryPtr->entry.isVTablePtr() : false;
if (isDstVTablePtr && (srcOpenVTablePtrEntry != -1))
{
// i
// src: | vt-ptr | a | b | c | ...
// dst: | a | b | vt-ptr | c | ...
// j
i--; // next iteration the current element should get processed
isSrcVTablePtr = true;
PX_ASSERT(srcOpenVTablePtrEntry < nbSrcEntries);
srcEntryPtr = &srcEntries[srcOpenVTablePtrEntry];
PX_ASSERT(srcEntryPtr->entry.isVTablePtr());
modSrcOffsetCheck = srcEntryPtr->offset;
srcOffsetCheck -= srcEntryPtr->entry.mSize; // to make sure total change is 0 after this iteration
srcOpenVTablePtrEntry = -1;
PX_ASSERT(addVTablePtrShiftIteration == 1);
addVTablePtrShiftIteration = 0;
}
if(i==nbSrcEntries && j==nbDstEntries)
{
PX_ASSERT((srcOpenVTablePtrEntry == -1) && (dstOpenVTablePtrEntry == -1));
break;
}
if (isSrcVTablePtr || isDstVTablePtr)
{
if (!isSrcVTablePtr)
{
// i
// src: | a | b | vt-ptr | c | ...
// dst: | vt-ptr | a | b | c | ...
// j
PX_ASSERT(dstOpenVTablePtrEntry == -1); // the other case should be detected and treated earlier
PX_ASSERT(srcOpenVTablePtrEntry == -1);
PX_ASSERT(addVTablePtrShiftIteration == 0);
int k;
for(k=i+1; k < nbSrcEntries; k++)
{
if (srcEntries[k].entry.isVTablePtr())
break;
}
PX_ASSERT(k < nbSrcEntries);
srcEntryPtr = &srcEntries[k];
modSrcOffsetCheck = srcEntryPtr->offset;
srcOffsetCheck -= srcEntryPtr->entry.mSize; // to make sure total change is 0 after this iteration
dstOpenVTablePtrEntry = j;
i--; // to make sure the original entry gets processed in the next iteration
}
else if (!isDstVTablePtr)
{
// i ---> i
// src: | vt-ptr | a | b | c | ...
// dst: | a | b | vt-ptr | c | ...
// j
PX_ASSERT(srcOpenVTablePtrEntry == -1); // the other case should be detected and treated earlier
PX_ASSERT(dstOpenVTablePtrEntry == -1);
PX_ASSERT(addVTablePtrShiftIteration == 0);
srcOffsetCheck += srcEntryPtr->entry.mSize;
modSrcOffsetCheck = srcOffsetCheck;
srcOpenVTablePtrEntry = i;
i++;
srcEntryPtr = &srcEntries[i];
addVTablePtrShiftIteration = 1; // additional iteration might be needed to process vtable pointer at the end of a class
PX_ASSERT((i < nbSrcEntries) && ((srcEntryPtr->entry.mFlags & PxMetaDataFlag::ePADDING) == 0));
// if the second check fails, this whole section might have to be done before the padding bytes get processed. Not sure
// what other consequences that might have though.
}
}
#if PX_CHECKED
else
{
if(!compareEntries(*srcEntryPtr, *dstEntryPtr))
{
displayMessage(PxErrorCode::eINVALID_PARAMETER, "\rConvX::convertClass: %s, src meta data and dst meta data don't match!", mc->mClassName);
return false;
}
}
#endif
const ExtraDataEntry2& srcEntry = *srcEntryPtr;
const ExtraDataEntry2& dstEntry = *dstEntryPtr;
if(srcEntry.entry.mFlags & PxMetaDataFlag::eUNION)
{
// ### hardcoded bit here, will only work when union type is the first int of the struct
const int* tmp = reinterpret_cast<const int*>(buffer + modSrcOffsetCheck);
const int unionType = *tmp;
const char* typeName = getTypeName(srcEntry.entry.mType, unionType);
assert(typeName);
MetaClass* unionMC = getMetaClass(typeName, META_DATA_SRC);
assert(unionMC);
convertClass(buffer + modSrcOffsetCheck, unionMC, 0); // ### recurse
dstOffsetCheck += dstEntry.entry.mSize;
MetaClass* targetUnionMC = getMetaClass(typeName, META_DATA_DST);
assert(targetUnionMC);
const int delta = dstEntry.entry.mSize - targetUnionMC->mSize;
char* deltaBytes = reinterpret_cast<char*>(PX_ALLOC(sizeof(char)*delta, "deltaBytes"));
memset(deltaBytes, 0, size_t(delta));
output(deltaBytes, delta); // Skip unused bytes at the end of the union
PX_FREE(deltaBytes);
srcOffsetCheck += srcEntry.entry.mSize; // do not use modSrcOffsetCheck here!
}
else
{
assert(srcEntry.cb);
assert(srcEntry.offset == modSrcOffsetCheck);
// ---- big convex surgery ----
if(convexSurgery)
{
if(strcmp(srcEntry.entry.mName, "mNbHullVertices")==0)
{
assert(srcEntry.entry.mSize==1);
const PxU8 nbVerts = static_cast<PxU8>(*(buffer+modSrcOffsetCheck));
assert(!foundNbVerts);
foundNbVerts = true;
const PxU8 gaussMapLimit = static_cast<PxU8>(getBinaryMetaData(META_DATA_DST)->getGaussMapLimit());
if(nbVerts > gaussMapLimit)
{
// We need a gauss map and we have one => keep it
}
else
{
// We don't need a gauss map and we have one => remove it
removeBigData = true;
}
}
else
{
if(removeBigData)
{
const bool isBigConvexData = strcmp(srcEntry.entry.mType, "BigConvexData")==0 ||
strcmp(srcEntry.entry.mType, "BigConvexRawData")==0;
if(isBigConvexData)
{
assert(foundNbVerts);
setNullPtr(true);
}
}
}
}
// ---- big convex surgery ----
(this->*srcEntry.cb)(buffer+modSrcOffsetCheck, srcEntry.entry, dstEntry.entry);
assert(dstOffsetCheck==dstEntry.offset);
dstOffsetCheck += dstEntry.entry.mSize;
srcOffsetCheck += srcEntry.entry.mSize; // do not use modSrcOffsetCheck here!
// ---- big convex surgery ----
if(convexSurgery && removeBigData)
setNullPtr(false);
// ---- big convex surgery ----
}
j++;
}
displayMessage(PxErrorCode::eDEBUG_INFO, "---------------------------------------------\n");
while(j<nbDstEntries)
{
assert(dstEntries[j].entry.mFlags & PxMetaDataFlag::ePADDING);
if(dstEntries[j].entry.mFlags & PxMetaDataFlag::ePADDING)
{
dstOffsetCheck += dstEntries[j].entry.mSize;
}
j++;
}
assert(j==nbDstEntries);
assert(dstOffsetCheck==target_mc->mSize);
assert(srcOffsetCheck==mc->mSize);
// ---- big convex surgery ----
if(convexSurgery)
mConvexFlags.pushBack(removeBigData);
// ---- big convex surgery ----
return true;
}
// Handles data defined with PX_DEF_BIN_METADATA_EXTRA_ARRAY
const char* Sn::ConvX::convertExtraData_Array(const char* Address, const char* lastAddress, const char* objectAddress,
const ExtraDataEntry& ed)
{
(void)lastAddress;
MetaClass* mc = getMetaClass(ed.entry.mType, META_DATA_SRC);
assert(mc);
// PT: safe to cast to int here since we're reading a count.
const int count = int(peek(ed.entry.mSize, objectAddress + ed.offset, ed.entry.mFlags));
// if(ed.entry.mCount) // Reused as align value
if(ed.entry.mAlignment)
{
Address = alignStream(Address, ed.entry.mAlignment);
// Address = alignStream(Address, ed.entry.mCount);
assert(Address<=lastAddress);
}
for(int c=0;c<count;c++)
{
convertClass(Address, mc, 0);
Address += mc->mSize;
assert(Address<=lastAddress);
}
return Address;
}
const char* Sn::ConvX::convertExtraData_Ptr(const char* Address, const char* lastAddress, const PxMetaDataEntry& entry, int count,
int ptrSize_Src, int ptrSize_Dst)
{
(void)lastAddress;
PxMetaDataEntry tmpSrc = entry;
tmpSrc.mCount = count;
tmpSrc.mSize = count * ptrSize_Src;
PxMetaDataEntry tmpDst = entry;
tmpDst.mCount = count;
tmpDst.mSize = count * ptrSize_Dst;
displayMessage(PxErrorCode::eDEBUG_INFO, "extra data ptrs\n");
displayMessage(PxErrorCode::eDEBUG_INFO, "+++++++++++++++++++++++++++++++++++++++++++++\n");
displayMessage(PxErrorCode::eDEBUG_INFO, "\t0x%p\t%02x\t\t\t%s", Address, static_cast<unsigned char>(Address[0]), entry.mName);
for (int byteCount = 1; byteCount < ptrSize_Src*count; ++byteCount)
displayMessage(PxErrorCode::eDEBUG_INFO, "\t0x%p\t%02x\t\t\t.", Address + byteCount, static_cast<unsigned char>(Address[byteCount]));
convertPtr(Address, tmpSrc, tmpDst);
Address += count * ptrSize_Src;
assert(Address<=lastAddress);
return Address;
}
const char* Sn::ConvX::convertExtraData_Handle(const char* Address, const char* lastAddress, const PxMetaDataEntry& entry, int count)
{
(void)lastAddress;
MetaClass* fieldType = getMetaClass(entry.mType, META_DATA_SRC);
int typeSize = fieldType->mSize;
PxMetaDataEntry tmpSrc = entry;
tmpSrc.mCount = count;
tmpSrc.mSize = count*typeSize;
PxMetaDataEntry tmpDst = entry;
tmpDst.mCount = count;
tmpDst.mSize = count*typeSize;
displayMessage(PxErrorCode::eDEBUG_INFO, "extra data handles\n");
displayMessage(PxErrorCode::eDEBUG_INFO, "+++++++++++++++++++++++++++++++++++++++++++++\n");
displayMessage(PxErrorCode::eDEBUG_INFO, "\t0x%p\t%02x\t\t\t%s", Address, static_cast<unsigned char>(Address[0]), entry.mName);
for (int byteCount = 1; byteCount < tmpSrc.mSize; ++byteCount)
displayMessage(PxErrorCode::eDEBUG_INFO, "\t0x%p\t%02x\t\t\t.", Address + byteCount, static_cast<unsigned char>(Address[byteCount]));
convertHandle16(Address, tmpSrc, tmpDst);
Address += count*typeSize;
assert(Address<=lastAddress);
return Address;
}
static bool decodeControl(PxU64 control, const ExtraDataEntry& ed, PxU64 controlMask = 0)
{
if(ed.entry.mFlags & PxMetaDataFlag::eCONTROL_FLIP)
{
if(controlMask)
{
return (control & controlMask) ? false : true;
}
else
{
return control==0;
}
}
else
{
if(controlMask)
{
return (control & controlMask) ? true : false;
}
else
{
return control!=0;
}
}
}
// ### currently hardcoded, should change
int Sn::ConvX::getConcreteType(const char* buffer)
{
MetaClass* mc = getMetaClass("PxBase", META_DATA_SRC);
assert(mc);
PxMetaDataEntry entry;
if(mc->getFieldByType("PxType", entry))
{
// PT: safe to cast to int here since we're reading our own PxType
return int(peek(entry.mSize, buffer + entry.mOffset));
}
assert(0);
return 0xffffffff;
}
struct Item : public shdfnd::UserAllocated
{
MetaClass* mc;
const char* address;
};
bool Sn::ConvX::convertCollection(const void* buffer, int fileSize, int nbObjects)
{
const char* lastAddress = reinterpret_cast<const char*>(buffer) + fileSize;
const char* Address = alignStream(reinterpret_cast<const char*>(buffer));
const int ptrSize_Src = mSrcPtrSize;
const int ptrSize_Dst = mDstPtrSize;
Item* objects = PX_NEW(Item)[PxU32(nbObjects)];
for(PxU32 i=0;i<PxU32(nbObjects);i++)
{
const float percents = float(i)/float(nbObjects);
displayMessage(PxErrorCode::eDEBUG_INFO, "Object conversion: %d%%", int(percents*100.0f));
Address = alignStream(Address);
assert(Address<=lastAddress);
PxConcreteType::Enum classType = PxConcreteType::Enum(getConcreteType(Address));
MetaClass* metaClass = getMetaClass(classType, META_DATA_SRC);
if(!metaClass)
{
PX_DELETE_ARRAY(objects);
return false;
}
objects[i].mc = metaClass;
objects[i].address = Address;
if(!convertClass(Address, metaClass, 0))
{
PX_DELETE_ARRAY(objects);
return false;
}
Address += metaClass->mSize;
assert(Address<=lastAddress);
}
// Fields / extra data
if(1)
{
// ---- big convex surgery ----
unsigned int nbConvexes = 0;
// ---- big convex surgery ----
//const char* StartAddress2 = Address;
//int startDstSize2 = getCurrentOutputSize();
for(int i=0;i<nbObjects;i++)
{
//const char* StartAddress = Address;
//int startDstSize = getCurrentOutputSize();
const float percents = float(i)/float(nbObjects);
displayMessage(PxErrorCode::eDEBUG_INFO, "Extra data conversion: %d%%", int(percents*100.0f));
MetaClass* mc0 = objects[i].mc;
const char* objectAddress = objects[i].address;
// printf("%d: %s\n", i, mc->mClassName);
// if(strcmp(mc->mClassName, "TriangleMesh")==0)
// if(strcmp(mc->mClassName, "NpRigidDynamic")==0)
if(strcmp(mc0->mClassName, "HybridModel")==0)
{
int stop=1;
(void)(stop);
}
// ### we actually need to collect all extra data for this class, including data from embedded members.
PX_ALLOCA(entries, ExtraDataEntry, 256);
int nbEntries = 0;
_enumerateExtraData(objectAddress, mc0, entries, nbEntries, 0, META_DATA_SRC);
assert(nbEntries<256);
Address = alignStream(Address);
assert(Address<=lastAddress);
for(int j=0;j<nbEntries;j++)
{
const ExtraDataEntry& ed = entries[j];
assert(ed.entry.mFlags & PxMetaDataFlag::eEXTRA_DATA);
if(ed.entry.mFlags & PxMetaDataFlag::eEXTRA_ITEM)
{
// ---- big convex surgery ----
if(1)
{
const bool isBigConvexData = strcmp(ed.entry.mType, "BigConvexData")==0;
if(isBigConvexData)
{
assert(nbConvexes<mConvexFlags.size());
if(mConvexFlags[nbConvexes++])
setNoOutput(true);
}
}
// ---- big convex surgery ----
MetaClass* extraDataType = getMetaClass(ed.entry.mType, META_DATA_SRC);
assert(extraDataType);
//sschirm: we used to have ed.entry.mOffset here, but that made cloth deserialization fail. - sschirm: cloth is gone now...
const char* controlAddress = objectAddress + ed.offset;
const PxU64 controlValue = peek(ed.entry.mOffsetSize, controlAddress);
if(controlValue)
{
if(ed.entry.mAlignment)
{
Address = alignStream(Address, ed.entry.mAlignment);
assert(Address<=lastAddress);
}
const char* classAddress = Address;
convertClass(Address, extraDataType, 0);
Address += extraDataType->mSize;
assert(Address<=lastAddress);
// Enumerate extra data for this optional class, and convert it too.
// This assumes the extra data for the optional class is always appended to the class itself,
// which is something we'll need to enforce in the SDK. So far this is only to handle optional
// inline arrays.
// ### this should probably be recursive eventually
PX_ALLOCA(entries2, ExtraDataEntry, 256);
int nbEntries2 = 0;
_enumerateExtraData(objectAddress, extraDataType, entries2, nbEntries2, 0, META_DATA_SRC);
assert(nbEntries2<256);
for(int k=0;k<nbEntries2;k++)
{
const ExtraDataEntry& ed2 = entries2[k];
assert(ed2.entry.mFlags & PxMetaDataFlag::eEXTRA_DATA);
if(ed2.entry.mFlags & PxMetaDataFlag::eEXTRA_ITEMS)
{
const int controlOffset = ed2.entry.mOffset;
const int controlSize = ed2.entry.mSize;
const int countOffset = ed2.entry.mCount;
const int countSize = ed2.entry.mOffsetSize;
const PxU64 controlValue2 = peek(controlSize, classAddress + controlOffset);
PxU64 controlMask = 0;
if(ed2.entry.mFlags & PxMetaDataFlag::eCONTROL_MASK)
{
controlMask = PxU64(ed2.entry.mFlags & (PxMetaDataFlag::eCONTROL_MASK_RANGE << 16));
controlMask = controlMask >> 16;
}
if(decodeControl(controlValue2, ed2, controlMask))
{
// PT: safe to cast to int here since we're reading a count
int count = int(peek(countSize, classAddress + countOffset, ed2.entry.mFlags));
if(ed2.entry.mAlignment)
{
assert(0); // Never tested
Address = alignStream(Address, ed2.entry.mAlignment);
assert(Address<=lastAddress);
}
if(ed2.entry.mFlags & PxMetaDataFlag::ePTR)
{
assert(0); // Never tested
}
else
{
MetaClass* mc = getMetaClass(ed2.entry.mType, META_DATA_SRC);
assert(mc);
while(count--)
{
convertClass(Address, mc, 0);
Address += mc->mSize;
assert(Address<=lastAddress);
}
}
}
}
else
{
if( (ed2.entry.mFlags & PxMetaDataFlag::eALIGNMENT) && ed2.entry.mAlignment)
{
Address = alignStream(Address, ed2.entry.mAlignment);
assert(Address<=lastAddress);
}
else
{
// We assume it's an normal array, e.g. the ones from "big convexes"
assert(!(ed2.entry.mFlags & PxMetaDataFlag::eEXTRA_ITEM));
Address = convertExtraData_Array(Address, lastAddress, classAddress, ed2);
}
}
}
}
else
{
int stop = 0;
(void)(stop);
}
// ---- big convex surgery ----
setNoOutput(false);
// ---- big convex surgery ----
}
else if(ed.entry.mFlags & PxMetaDataFlag::eEXTRA_ITEMS)
{
// PX_DEF_BIN_METADATA_EXTRA_ITEMS
int reloc = ed.offset - ed.entry.mOffset; // ### because the enum code only fixed the "controlOffset"!
const int controlOffset = ed.entry.mOffset;
const int controlSize = ed.entry.mSize;
const int countOffset = ed.entry.mCount;
const int countSize = ed.entry.mOffsetSize;
// const int controlValue2 = peek(controlSize, objectAddress + controlOffset);
const PxU64 controlValue2 = peek(controlSize, objectAddress + controlOffset + reloc);
PxU64 controlMask = 0;
if(ed.entry.mFlags & PxMetaDataFlag::eCONTROL_MASK)
{
controlMask = PxU64(ed.entry.mFlags & (PxMetaDataFlag::eCONTROL_MASK_RANGE << 16));
controlMask = controlMask >> 16;
}
if(decodeControl(controlValue2, ed, controlMask))
{
// PT: safe to cast to int here since we're reading a count
// int count = peek(countSize, objectAddress + countOffset); // ###
int count = int(peek(countSize, objectAddress + countOffset + reloc, ed.entry.mFlags)); // ###
if(ed.entry.mAlignment)
{
Address = alignStream(Address, ed.entry.mAlignment);
assert(Address<=lastAddress);
}
if(ed.entry.mFlags & PxMetaDataFlag::ePTR)
{
Address = convertExtraData_Ptr(Address, lastAddress, ed.entry, count, ptrSize_Src, ptrSize_Dst);
}
else if (ed.entry.mFlags & PxMetaDataFlag::eHANDLE)
{
Address = convertExtraData_Handle(Address, lastAddress, ed.entry, count);
}
else
{
MetaClass* mc = getMetaClass(ed.entry.mType, META_DATA_SRC);
assert(mc);
while(count--)
{
convertClass(Address, mc, 0);
Address += mc->mSize;
assert(Address<=lastAddress);
}
}
}
}
else if(ed.entry.mFlags & PxMetaDataFlag::eALIGNMENT)
{
if(ed.entry.mAlignment)
{
displayMessage(PxErrorCode::eDEBUG_INFO, " align to %d bytes\n", ed.entry.mAlignment);
displayMessage(PxErrorCode::eDEBUG_INFO, "---------------------------------------------\n");
Address = alignStream(Address, ed.entry.mAlignment);
assert(Address<=lastAddress);
}
}
else if(ed.entry.mFlags & PxMetaDataFlag::eEXTRA_NAME)
{
if(ed.entry.mAlignment)
{
Address = alignStream(Address, ed.entry.mAlignment);
assert(Address<=lastAddress);
}
//get string count
MetaClass* mc = getMetaClass("PxU32", META_DATA_SRC);
assert(mc);
//safe to cast to int here since we're reading a count.
const int count = int(peek(mc->mSize, Address, 0));
displayMessage(PxErrorCode::eDEBUG_INFO, " convert %d bytes string\n", count);
convertClass(Address, mc, 0);
Address += mc->mSize;
mc = getMetaClass(ed.entry.mType, META_DATA_SRC);
assert(mc);
for(int c=0;c<count;c++)
{
convertClass(Address, mc, 0);
Address += mc->mSize;
assert(Address<=lastAddress);
}
}
else
{
Address = convertExtraData_Array(Address, lastAddress, objectAddress, ed);
}
}
}
PX_DELETE_ARRAY(objects);
assert(nbConvexes==mConvexFlags.size());
}
assert(Address==lastAddress);
return true;
}
bool Sn::ConvX::convert(const void* buffer, int fileSize)
{
// Test initial alignment
if(size_t(buffer) & (ALIGN_DEFAULT-1))
{
assert(0);
return false;
}
const int header = read32(buffer); fileSize -= 4; (void)header;
if (header != PX_MAKE_FOURCC('S','E','B','D'))
{
displayMessage(physx::PxErrorCode::eINVALID_PARAMETER,
"PxBinaryConverter: Buffer contains data with bad header indicating invalid serialized data.");
return false;
}
const int version = read32(buffer); fileSize -= 4; (void)version;
char binaryVersionGuid[SN_BINARY_VERSION_GUID_NUM_CHARS + 1];
memcpy(binaryVersionGuid, buffer, SN_BINARY_VERSION_GUID_NUM_CHARS);
binaryVersionGuid[SN_BINARY_VERSION_GUID_NUM_CHARS] = 0;
buffer = reinterpret_cast<const void*>(size_t(buffer) + SN_BINARY_VERSION_GUID_NUM_CHARS);
fileSize -= SN_BINARY_VERSION_GUID_NUM_CHARS;
output(binaryVersionGuid, SN_BINARY_VERSION_GUID_NUM_CHARS);
if (!checkCompatibility(binaryVersionGuid))
{
displayMessage(physx::PxErrorCode::eINVALID_PARAMETER,
"PxBinaryConverter: Buffer contains binary data version 0x%s which is incompatible with this PhysX sdk (0x%s).\n",
binaryVersionGuid, getBinaryVersionGuid());
return false;
}
//read src platform tag and write dst platform tag according dst meta data
const int srcPlatformTag = *reinterpret_cast<const int*>(buffer);
buffer = reinterpret_cast<const void*>(size_t(buffer) + 4);
fileSize -= 4;
const int dstPlatformTag = mMetaData_Dst->getPlatformTag();
output(dstPlatformTag);
if (srcPlatformTag != mMetaData_Src->getPlatformTag())
{
displayMessage(physx::PxErrorCode::eINVALID_PARAMETER,
"PxBinaryConverter: Mismatch of platform tags of binary data and metadata:\n Binary Data: %s\n MetaData: %s\n",
getBinaryPlatformName(PxU32(srcPlatformTag)),
getBinaryPlatformName(PxU32(mMetaData_Src->getPlatformTag())));
return false;
}
//read whether input data has marked padding, and set it for the output data (since 0xcd is written into pads on conversion)
const int srcMarkedPadding = *reinterpret_cast<const int*>(buffer);
buffer = reinterpret_cast<const void*>(size_t(buffer) + 4);
fileSize -= 4;
mMarkedPadding = srcMarkedPadding != 0;
const int dstMarkedPadding = 1;
output(dstMarkedPadding);
int nbObjectsInCollection;
buffer = convertReferenceTables(buffer, fileSize, nbObjectsInCollection);
if(!buffer)
return false;
bool ret = convertCollection(buffer, fileSize, nbObjectsInCollection);
mMarkedPadding = false;
return ret;
}
// PT: code below added to support 64bit-to-32bit conversions
void Sn::ConvX::exportIntAsPtr(int value)
{
const int ptrSize_Src = mSrcPtrSize;
const int ptrSize_Dst = mDstPtrSize;
PxMetaDataEntry entry;
const char* address = NULL;
const PxU32 value32 = PxU32(value);
const PxU64 value64 = PxU64(value)&0xffffffff;
if(ptrSize_Src==4)
{
address = reinterpret_cast<const char*>(&value32);
}
else if(ptrSize_Src==8)
{
address = reinterpret_cast<const char*>(&value64);
}
else assert(0);
convertExtraData_Ptr(address, address + ptrSize_Src, entry, 1, ptrSize_Src, ptrSize_Dst);
}
void Sn::ConvX::exportInt(int value)
{
output(value);
}
void Sn::ConvX::exportInt64(PxU64 value)
{
output(value);
}
PointerRemap::PointerRemap()
{
}
PointerRemap::~PointerRemap()
{
}
void PointerRemap::setObjectRef(PxU64 object64, PxU32 ref)
{
const PxU32 size = mData.size();
for(PxU32 i=0;i<size;i++)
{
if(mData[i].object==object64)
{
mData[i].id = ref;
return;
}
}
InternalData data;
data.object = object64;
data.id = ref;
mData.pushBack(data);
}
bool PointerRemap::getObjectRef(PxU64 object64, PxU32& ref) const
{
const PxU32 size = mData.size();
for(PxU32 i=0;i<size;i++)
{
if(mData[i].object==object64)
{
ref = mData[i].id;
return true;
}
}
return false;
}
Handle16Remap::Handle16Remap()
{
}
Handle16Remap::~Handle16Remap()
{
}
void Handle16Remap::setObjectRef(PxU16 object, PxU16 ref)
{
const PxU32 size = mData.size();
for(PxU32 i=0;i<size;i++)
{
if(mData[i].object==object)
{
mData[i].id = ref;
return;
}
}
InternalData data;
data.object = object;
data.id = ref;
mData.pushBack(data);
}
bool Handle16Remap::getObjectRef(PxU16 object, PxU16& ref) const
{
const PxU32 size = mData.size();
for(PxU32 i=0;i<size;i++)
{
if(mData[i].object==object)
{
ref = mData[i].id;
return true;
}
}
return false;
}
/**
Converting the PxBase object offsets in the manifest table is fairly complicated now.
It would be good to have an easy callback mechanism for custom things like this.
*/
const void* Sn::ConvX::convertManifestTable(const void* buffer, int& fileSize)
{
PxU32 padding = getPadding(size_t(buffer), ALIGN_DEFAULT);
buffer = alignStream(reinterpret_cast<const char*>(buffer));
fileSize -= padding;
int nb = read32(buffer);
fileSize -= 4;
MetaClass* mc_src = getMetaClass("Sn::ManifestEntry", META_DATA_SRC);
assert(mc_src);
MetaClass* mc_dst = getMetaClass("Sn::ManifestEntry", META_DATA_DST);
assert(mc_dst);
bool mdOk;
PxMetaDataEntry srcTypeField;
mdOk = mc_src->getFieldByName("type", srcTypeField);
PX_UNUSED(mdOk);
PX_ASSERT(mdOk);
PxMetaDataEntry dstOffsetField;
mdOk = mc_dst->getFieldByName("offset", dstOffsetField);
PX_ASSERT(mdOk);
const char* address = reinterpret_cast<const char*>(buffer);
PxU32 headerOffset = 0;
for(int i=0;i<nb;i++)
{
PxConcreteType::Enum classType = PxConcreteType::Enum(peek(srcTypeField.mSize, address + srcTypeField.mOffset));
//convert ManifestEntry but output to tmpStream
PxDefaultMemoryOutputStream tmpStream;
{
//backup output state
PxOutputStream* outStream = mOutStream;
PxU32 outputSize = PxU32(mOutputSize);
mOutStream = &tmpStream;
mOutputSize = 0;
convertClass(address, mc_src, 0);
PX_ASSERT(tmpStream.getSize() == PxU32(mc_dst->mSize));
//restore output state
mOutStream = outStream;
mOutputSize = int(outputSize);
}
//output patched offset
PX_ASSERT(dstOffsetField.mOffset == 0); //assuming offset is the first data
output(int(headerOffset));
//output rest of ManifestEntry
PxU32 restSize = PxU32(mc_dst->mSize - dstOffsetField.mSize);
mOutStream->write(tmpStream.getData() + dstOffsetField.mSize, restSize);
mOutputSize += restSize;
//increment source stream
address += mc_src->mSize;
fileSize -= mc_src->mSize;
assert(fileSize>=0);
//update headerOffset using the type and dst meta data of the type
MetaClass* mc_classType_dst = getMetaClass(classType, META_DATA_DST);
if(!mc_classType_dst)
return NULL;
headerOffset += getPadding(size_t(mc_classType_dst->mSize), PX_SERIAL_ALIGN) + mc_classType_dst->mSize;
}
output(int(headerOffset)); //endoffset
buffer = address + 4;
fileSize -= 4;
return buffer;
}
const void* Sn::ConvX::convertImportReferences(const void* buffer, int& fileSize)
{
PxU32 padding = getPadding(size_t(buffer), ALIGN_DEFAULT);
buffer = alignStream(reinterpret_cast<const char*>(buffer));
fileSize -= padding;
int nb = read32(buffer);
fileSize -= 4;
if(!nb)
return buffer;
MetaClass* mc = getMetaClass("Sn::ImportReference", META_DATA_SRC);
assert(mc);
const char* address = reinterpret_cast<const char*>(buffer);
for(int i=0;i<nb;i++)
{
convertClass(address, mc, 0);
address += mc->mSize;
fileSize -= mc->mSize;
assert(fileSize>=0);
}
return address;
}
const void* Sn::ConvX::convertExportReferences(const void* buffer, int& fileSize)
{
PxU32 padding = getPadding(size_t(buffer), ALIGN_DEFAULT);
buffer = alignStream(reinterpret_cast<const char*>(buffer));
fileSize -= padding;
int nb = read32(buffer);
fileSize -= 4;
if(!nb)
return buffer;
MetaClass* mc = getMetaClass("Sn::ExportReference", META_DATA_SRC);
assert(mc);
const char* address = reinterpret_cast<const char*>(buffer);
for(int i=0;i<nb;i++)
{
convertClass(address, mc, 0);
address += mc->mSize;
fileSize -= mc->mSize;
assert(fileSize>=0);
}
return address;
}
const void* Sn::ConvX::convertInternalReferences(const void* buffer, int& fileSize)
{
PxU32 padding = getPadding(size_t(buffer), ALIGN_DEFAULT);
buffer = alignStream(reinterpret_cast<const char*>(buffer));
fileSize -= padding;
//pointer references
int nbPtrReferences = read32(buffer);
fileSize -= 4;
if(nbPtrReferences)
{
const char* address = reinterpret_cast<const char*>(buffer);
MetaClass* mc = getMetaClass("Sn::InternalReferencePtr", META_DATA_SRC);
assert(mc);
for(int i=0;i<nbPtrReferences;i++)
{
convertClass(address, mc, 0);
address += mc->mSize;
fileSize -= mc->mSize;
assert(fileSize>=0);
}
buffer = address;
}
//16 bit handle references
int nbHandle16References = read32(buffer);
fileSize -= 4;
if (nbHandle16References)
{
//pre add invalid handle value
mHandle16Remap.setObjectRef(0xffff, 0xffff);
const char* address = reinterpret_cast<const char*>(buffer);
MetaClass* mc = getMetaClass("Sn::InternalReferenceHandle16", META_DATA_SRC);
assert(mc);
for(int i=0;i<nbHandle16References;i++)
{
convertClass(address, mc, 0);
address += mc->mSize;
fileSize -= mc->mSize;
assert(fileSize>=0);
}
buffer = address;
}
return buffer;
}
const void* Sn::ConvX::convertReferenceTables(const void* buffer, int& fileSize, int& nbObjectsInCollection)
{
// PT: the map should not be used while creating it, so use one indirection
mPointerActiveRemap = NULL;
mPointerRemap.mData.clear();
mPointerRemapCounter = 0;
mHandle16ActiveRemap = NULL;
mHandle16Remap.mData.clear();
mHandle16RemapCounter = 0;
PxU32 padding = getPadding(size_t(buffer), ALIGN_DEFAULT);
buffer = alignStream(reinterpret_cast<const char*>(buffer));
fileSize -= padding;
nbObjectsInCollection = read32(buffer);
if (nbObjectsInCollection == 0)
displayMessage(PxErrorCode::eDEBUG_INFO, "\n\nConverting empty collection!\n\n");
fileSize -= 4;
buffer = convertManifestTable(buffer, fileSize);
if(!buffer)
return NULL;
buffer = convertImportReferences(buffer, fileSize);
buffer = convertExportReferences(buffer, fileSize);
buffer = convertInternalReferences(buffer, fileSize);
// PT: the map can now be used
mPointerActiveRemap = &mPointerRemap;
mHandle16ActiveRemap = &mHandle16Remap;
return buffer;
}
bool Sn::ConvX::checkPaddingBytes(const char* buffer, int byteCount)
{
const unsigned char* src = reinterpret_cast<const unsigned char*>(buffer);
int i = 0;
while ((i < byteCount) && (src[i] == 0xcd))
i++;
return (i == byteCount);
}
| [
"erwincoumans@google.com"
] | erwincoumans@google.com |
8533995aa666f49ed1b2b71aef4cec83d09ec5e6 | fd37b573d5ef58089b45c2dd13e5987957a65477 | /src/command.h | f4180c8eec81db31c3a31bf396f9928e71cca79e | [] | no_license | piesbert/minefree | 7f0282953ba413dcb1084f4a0ec84e964e5087ae | 9d487ef19b585d5a9ab107bb14bc2dfe97ea425e | refs/heads/master | 2021-01-19T17:48:13.580205 | 2013-07-04T12:42:01 | 2013-07-04T12:42:01 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,175 | h | /* MineFree: command.h
* Copyright (C) 2012-2013 Sebastian Szymak
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License, version 3,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#if !defined(LOCK_MINEFREE_COMMAND_H)
#define LOCK_MINEFREE_COMMAND_H
#include <string>
class Command {
public:
Command(const std::string &);
virtual ~Command();
const std::string& getName() const;
private:
std::string m_name;
Command(Command const&); // do not implement
Command operator=(Command const&); // do not implement
}; // class Command
#endif //LOCK_MINEFREE_COMMAND_H
| [
"sebastian.szymak@gmail.com"
] | sebastian.szymak@gmail.com |
51ba26ab934df696ce468e096e6d5b99f944748f | 8f33db3bc801a750010ea35356f0a8c022257bde | /map.cpp | 26387bc1d067687107ee3c3cc54ff77ec510a75f | [] | no_license | dinosaurka/qt_final_project | 2c14c2ffd295bc2a490436965e433237e8f89841 | 73c035acfa31ca33c64af865511dae8109abcb52 | refs/heads/master | 2023-05-03T09:27:24.921391 | 2021-05-23T21:38:43 | 2021-05-23T21:38:43 | 369,747,980 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,880 | cpp | #include "map.h"
#include "game.h"
extern Game * game;
Map::Map(int level, QGraphicsScene *sc)
{
scene = sc;
QString fileName = ":/maps/maps/" + QString::number(level) + ".txt";
QFile file(fileName);
if(!file.exists())
{
//finished the game
QGraphicsSimpleTextItem *t = new QGraphicsSimpleTextItem("Congratulations, you have passed all the levels!");
t->setPos(scene->width()/4, scene->height()/4);
t->setBrush(QColor(64, 194, 252));
QFont serifFont("Times", 14, QFont::Bold);
t->setFont(serifFont);
scene->addItem(t);
return;
}
QTextStream in(&file);
if (!file.open(QIODevice::ReadOnly))
{
//error
QString temp = "Error while file reading: " + fileName;
QGraphicsSimpleTextItem *t = new QGraphicsSimpleTextItem(temp);
t->setPos(scene->width()/4, scene->height()/4);
QFont serifFont("Times", 20, QFont::Bold);
t->setFont(serifFont);
scene->addItem(t);
return;
}
char c;
for(int i = 0; i < 16; i++)
{
for(int j = 0; j < 16; j++)
{
in >> c;
while(c == '\n' || c == '\r') //skip endlines
in >> c;
int posy = i * 64;
int posx = j * 64;
switch(c)
{
case '+': //player standing on targer tile
map[i][j] = new Cell(posx, posy, textures[MAP_TARGET], MAP_TARGET);
game->player = new Player(posx, posy);
scene->addItem(game->player);
break;
case 'p':
map[i][j] = new Cell(posx, posy, textures[MAP_FLOOR], MAP_FLOOR);
//create player
game->player = new Player(posx, posy);
scene->addItem(game->player);
break;
case 'o':
map[i][j] = new Cell(posx, posy, textures[MAP_FLOOR], MAP_FLOOR);
candles.push_back(new Candle(posx, posy));
scene->addItem(candles.last());
//create stone
break;
case 'x':
map[i][j] = new Cell(posx, posy, textures[MAP_TARGET], MAP_TARGET);
//create target
break;
case '*':
map[i][j] = new Cell(posx, posy, textures[MAP_WALL], MAP_WALL);
//create wall
break;
case ' ':
//create floor
map[i][j] = new Cell(posx, posy, textures[MAP_FLOOR], MAP_FLOOR);
break;
}
scene->addItem(map[i][j]);
}
}
QString level_name = QString::number(level);
QGraphicsSimpleTextItem *t = new QGraphicsSimpleTextItem("Level " + level_name);
t->setBrush(QColor(64, 194, 252));
QFont serifFont("Times", 12, QFont::Bold);
t->setFont(serifFont);
t->setPos(0, 0);
scene->addItem(t);
file.close();
}
Cell * Map::getCellByPos(int x, int y)
{
return map[y/64][x/64];
}
Candle * Map::getCandleByPos(int x, int y)
{
QVector<Candle *>::iterator iter = candles.begin();
for(; iter != candles.end(); iter++)
{
if((*iter)->x() == x && (*iter)->y() == y)
return *iter;
}
return nullptr;
}
bool Map::isCandleAtPos(int x, int y) const
{
QVector<Candle *>::const_iterator iter = candles.begin();
for(; iter != candles.end(); iter++)
{
if((*iter)->x() == x && (*iter)->y() == y)
return true;
}
return false;
}
bool Map::isLevelFinished() const
{
QVector<Candle *>::const_iterator iter = candles.begin();
for(; iter != candles.end(); iter++)
{
if(!((*iter)->on_goal_))
return false;
}
return true;
}
void Map::clear()
{
candles.clear();
}
Map::~Map()
{
}
| [
"reut.kseniya@gmail.com"
] | reut.kseniya@gmail.com |
3ed39b64b626ec6d21d34974c7b6a09499bcf592 | 6fc57553a02b485ad20c6e9a65679cd71fa0a35d | /garnet/public/lib/fidl/llcpp/conformance_test.cc | 5305ba9ba312436b1784b73bb0873f2ffda96f57 | [
"BSD-3-Clause"
] | permissive | OpenTrustGroup/fuchsia | 2c782ac264054de1a121005b4417d782591fb4d8 | 647e593ea661b8bf98dcad2096e20e8950b24a97 | refs/heads/master | 2023-01-23T08:12:32.214842 | 2019-08-03T20:27:06 | 2019-08-03T20:27:06 | 178,452,475 | 1 | 1 | BSD-3-Clause | 2023-01-05T00:43:10 | 2019-03-29T17:53:42 | C++ | UTF-8 | C++ | false | false | 12,186 | cc | // Copyright 2019 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 <iostream>
#include <string>
#include <utility>
#include <vector>
#include <fidl/test/misc/llcpp/fidl.h>
#include "gtest/gtest.h"
namespace llcpp_misc = ::llcpp::fidl::test::misc;
bool ComparePayload(const uint8_t* actual, size_t actual_size, const uint8_t* expected,
size_t expected_size) {
bool pass = true;
for (size_t i = 0; i < actual_size && i < expected_size; i++) {
if (actual[i] != expected[i]) {
pass = false;
std::cout << std::dec << "element[" << i << "]: " << std::hex << "actual=0x" << +actual[i]
<< " "
<< "expected=0x" << +expected[i] << "\n";
}
}
if (actual_size != expected_size) {
pass = false;
std::cout << std::dec << "element[...]: "
<< "actual.size=" << +actual_size << " "
<< "expected.size=" << +expected_size << "\n";
}
return pass;
}
TEST(InlineXUnionInStruct, Success) {
const auto expected = std::vector<uint8_t>{
0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // length of "before"
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, // "before" is present
0x53, 0x76, 0x31, 0x6f, 0x00, 0x00, 0x00, 0x00, // xunion header
0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // num bytes; num handles
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, // envelope data present
0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // length of "after"
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, // "after" is present
'b', 'e', 'f', 'o', 'r', 'e', // "before" string
0x00, 0x00, // 2 bytes of padding
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // envelope content
0xef, 0xbe, 0xad, 0xde, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 'a', 'f', 't', 'e', 'r', // "after" string
0x00, 0x00, 0x00, // 3 bytes of padding
};
std::string before("before");
std::string after("after");
// encode
{
llcpp_misc::InlineXUnionInStruct input;
llcpp_misc::SimpleUnion simple_union;
simple_union.set_i64(0xdeadbeef);
input.before = fidl::StringView(before.size(), &before[0]);
input.xu.set_su(&simple_union);
input.after = fidl::StringView(after.size(), &after[0]);
std::vector<uint8_t> buffer(ZX_CHANNEL_MAX_MSG_BYTES);
fidl::BytePart bytes(&buffer[0], static_cast<uint32_t>(buffer.size()));
auto linearize_result = fidl::Linearize(&input, std::move(bytes));
ASSERT_STREQ(linearize_result.error, nullptr);
ASSERT_EQ(linearize_result.status, ZX_OK);
auto encode_result = fidl::Encode(std::move(linearize_result.message));
ASSERT_STREQ(encode_result.error, nullptr);
ASSERT_EQ(encode_result.status, ZX_OK);
EXPECT_TRUE(ComparePayload(encode_result.message.bytes().begin(),
encode_result.message.bytes().size(), &expected[0],
expected.size()));
}
// decode
{
std::vector<uint8_t> encoded_bytes = expected;
fidl::EncodedMessage<llcpp_misc::InlineXUnionInStruct> encoded_msg(
fidl::BytePart(&encoded_bytes[0], static_cast<uint32_t>(encoded_bytes.size()),
static_cast<uint32_t>(encoded_bytes.size())));
auto decode_result = fidl::Decode(std::move(encoded_msg));
ASSERT_STREQ(decode_result.error, nullptr);
ASSERT_EQ(decode_result.status, ZX_OK);
const llcpp_misc::InlineXUnionInStruct& msg = *decode_result.message.message();
ASSERT_STREQ(msg.before.begin(), &before[0]);
ASSERT_EQ(msg.before.size(), before.size());
ASSERT_STREQ(msg.after.begin(), &after[0]);
ASSERT_EQ(msg.after.size(), after.size());
ASSERT_EQ(msg.xu.which(), llcpp_misc::SampleXUnion::Tag::kSu);
const llcpp_misc::SimpleUnion& su = msg.xu.su();
ASSERT_EQ(su.which(), llcpp_misc::SimpleUnion::Tag::kI64);
ASSERT_EQ(su.i64(), 0xdeadbeef);
}
}
TEST(PrimitiveInXUnionInStruct, Success) {
const auto expected = std::vector<uint8_t>{
0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // length of "before"
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, // "before" is present
0xa5, 0x47, 0xdf, 0x29, 0x00, 0x00, 0x00, 0x00, // xunion header
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // num bytes; num handles
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, // envelope data present
0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // length of "after"
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, // "after" is present
'b', 'e', 'f', 'o', 'r', 'e', // "before" string
0x00, 0x00, // 2 bytes of padding
0xef, 0xbe, 0xad, 0xde, 0x00, 0x00, 0x00, 0x00, // envelope content
'a', 'f', 't', 'e', 'r', // "after" string
0x00, 0x00, 0x00, // 3 bytes of padding
};
std::string before("before");
std::string after("after");
int32_t integer = 0xdeadbeef;
// encode
{
llcpp_misc::InlineXUnionInStruct input;
input.before = fidl::StringView(before.size(), &before[0]);
input.xu.set_i(&integer);
input.after = fidl::StringView(after.size(), &after[0]);
std::vector<uint8_t> buffer(ZX_CHANNEL_MAX_MSG_BYTES);
fidl::BytePart bytes(&buffer[0], static_cast<uint32_t>(buffer.size()));
auto linearize_result = fidl::Linearize(&input, std::move(bytes));
ASSERT_STREQ(linearize_result.error, nullptr);
ASSERT_EQ(linearize_result.status, ZX_OK);
auto encode_result = fidl::Encode(std::move(linearize_result.message));
ASSERT_STREQ(encode_result.error, nullptr);
ASSERT_EQ(encode_result.status, ZX_OK);
EXPECT_TRUE(ComparePayload(encode_result.message.bytes().begin(),
encode_result.message.bytes().size(), &expected[0],
expected.size()));
}
// decode
{
std::vector<uint8_t> encoded_bytes = expected;
fidl::EncodedMessage<llcpp_misc::InlineXUnionInStruct> encoded_msg(
fidl::BytePart(&encoded_bytes[0], static_cast<uint32_t>(encoded_bytes.size()),
static_cast<uint32_t>(encoded_bytes.size())));
auto decode_result = fidl::Decode(std::move(encoded_msg));
ASSERT_STREQ(decode_result.error, nullptr);
ASSERT_EQ(decode_result.status, ZX_OK);
const llcpp_misc::InlineXUnionInStruct& msg = *decode_result.message.message();
ASSERT_STREQ(msg.before.begin(), &before[0]);
ASSERT_EQ(msg.before.size(), before.size());
ASSERT_STREQ(msg.after.begin(), &after[0]);
ASSERT_EQ(msg.after.size(), after.size());
ASSERT_EQ(msg.xu.which(), llcpp_misc::SampleXUnion::Tag::kI);
const int32_t& i = msg.xu.i();
ASSERT_EQ(i, integer);
}
}
TEST(InlineXUnionInStruct, FailToEncodeAbsentXUnion) {
llcpp_misc::InlineXUnionInStruct input = {};
std::string empty_str = "";
input.before = fidl::StringView(empty_str.size(), &empty_str[0]);
input.after = fidl::StringView(empty_str.size(), &empty_str[0]);
std::vector<uint8_t> buffer(ZX_CHANNEL_MAX_MSG_BYTES);
fidl::BytePart bytes(&buffer[0], static_cast<uint32_t>(buffer.size()));
auto linearize_result = fidl::Linearize(&input, std::move(bytes));
EXPECT_STREQ(linearize_result.error, "non-nullable xunion is absent");
EXPECT_EQ(linearize_result.status, ZX_ERR_INVALID_ARGS);
}
TEST(InlineXUnionInStruct, FailToDecodeAbsentXUnion) {
std::vector<uint8_t> encoded_bytes = std::vector<uint8_t>{
0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // length of "before"
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, // "before" is present
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // null xunion header
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // num bytes; num handles
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // envelope data absent
0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // length of "after"
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, // "after" is present
'b', 'e', 'f', 'o', 'r', 'e', // "before" string
0x00, 0x00, // 2 bytes of padding
'a', 'f', 't', 'e', 'r', // "after" string
0x00, 0x00, 0x00, // 3 bytes of padding
};
fidl::EncodedMessage<llcpp_misc::InlineXUnionInStruct> encoded_msg(
fidl::BytePart(&encoded_bytes[0], static_cast<uint32_t>(encoded_bytes.size()),
static_cast<uint32_t>(encoded_bytes.size())));
auto decode_result = fidl::Decode(std::move(encoded_msg));
EXPECT_STREQ(decode_result.error, "non-nullable xunion is absent");
EXPECT_EQ(decode_result.status, ZX_ERR_INVALID_ARGS);
}
TEST(InlineXUnionInStruct, FailToDecodeZeroOrdinalXUnion) {
std::vector<uint8_t> encoded_bytes = std::vector<uint8_t>{
0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // length of "before"
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, // "before" is present
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // null xunion header
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // num bytes; num handles
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, // envelope data present
0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // length of "after"
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, // "after" is present
'b', 'e', 'f', 'o', 'r', 'e', // "before" string
0x00, 0x00, // 2 bytes of padding
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // envelope content
'a', 'f', 't', 'e', 'r', // "after" string
0x00, 0x00, 0x00, // 3 bytes of padding
};
fidl::EncodedMessage<llcpp_misc::InlineXUnionInStruct> encoded_msg(
fidl::BytePart(&encoded_bytes[0], static_cast<uint32_t>(encoded_bytes.size()),
static_cast<uint32_t>(encoded_bytes.size())));
auto decode_result = fidl::Decode(std::move(encoded_msg));
EXPECT_STREQ(decode_result.error, "xunion with zero as ordinal must be empty");
EXPECT_EQ(decode_result.status, ZX_ERR_INVALID_ARGS);
}
TEST(InlineXUnionInStruct, FailToDecodeNonZeroPaddingXUnion) {
const auto expected = std::vector<uint8_t>{
0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // length of "before"
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, // "before" is present
0x53, 0x76, 0x31, 0x6f, 0xaa, 0xaa, 0xaa, 0xaa, // xunion header
// padding = 0xAAAAAAAA
0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // num bytes; num handles
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, // envelope data present
0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // length of "after"
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, // "after" is present
'b', 'e', 'f', 'o', 'r', 'e', // "before" string
0x00, 0x00, // 2 bytes of padding
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // envelope content
0xef, 0xbe, 0xad, 0xde, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 'a', 'f', 't', 'e', 'r', // "after" string
0x00, 0x00, 0x00, // 3 bytes of padding
};
std::string before("before");
std::string after("after");
std::vector<uint8_t> encoded_bytes = expected;
fidl::EncodedMessage<llcpp_misc::InlineXUnionInStruct> encoded_msg(
fidl::BytePart(&encoded_bytes[0], static_cast<uint32_t>(encoded_bytes.size()),
static_cast<uint32_t>(encoded_bytes.size())));
auto decode_result = fidl::Decode(std::move(encoded_msg));
ASSERT_STREQ(decode_result.error, "non-zero padding bytes detected");
ASSERT_EQ(decode_result.status, ZX_ERR_INVALID_ARGS);
}
| [
"commit-bot@chromium.org"
] | commit-bot@chromium.org |
8fa0d4389c86b3262dca0d50dbb4ab1f7eaeee1d | fbd9436fcbdc22a413c5f85d375e7028aef6fd6e | /算法竞赛入门经典/动态规划/9.1数字三角形-递归.cpp | 4e04fada1f2fa2ee9f209fe21a62636d1fbff3ae | [] | no_license | IoveSunny/ojproblems | 55c4daf224f1a201d7e0faf310c4129f64efa29a | 4b3599116a3aa94b321eb66560cd03593773a303 | refs/heads/master | 2021-01-01T20:41:35.554761 | 2014-02-26T09:13:47 | 2014-02-26T09:13:47 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 721 | cpp | /*
动态规划的核心 = 状态a[i][j] + 状态转移方程d[i][j]
递归:标记或记录计算过的,防止重复计算
*/
#include <cstdio>
#include <cstring>
int a[10][10], d[10][10];
int n = 4;
int max(int a, int b) {
return a>b?a:b;
}
// 和递推差不多,只不过思维逆转,先到最底层,再回溯
int recursion(int i, int j) {
if(d[i][j] >= 0)
return d[i][j];
return d[i][j] = a[i][j] + (i==n?0:max(recursion(i+1,j),recursion(i+1,j+1)));
}
int main(void) {
int i, j;
a[1][1] = 1;
a[2][1] = 3, a[2][2] = 2;
a[3][1] = 4, a[3][2] = 10, a[3][3] = 1;
a[4][1] = 4, a[4][2] = 3, a[4][3] = 2, a[4][4] = 20;
memset(d, -1, sizeof(d));
printf("%d\n", recursion(1,1));
return 0;
}
| [
"huangjinhua4535@gmail.com"
] | huangjinhua4535@gmail.com |
1ba2a3cb4f21dbb04f6a7bd4f936fc7b2d645162 | ea6ac83942d511e265c6b0ba212841aeab83f593 | /FruitTetris.cpp | 35181bb7fcd2a07ce86d4fdfca08c5089ce9a35c | [] | no_license | alexsweeten/FruitTetris | b3ae473e01e40521b1339ef29a692f1ec7a527e6 | 74990a0d21ee6291d7d8e57108bd4b8189b81658 | refs/heads/master | 2021-06-13T21:24:02.506436 | 2017-04-02T21:34:31 | 2017-04-02T21:34:31 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 23,888 | cpp | /*
CMPT 361 Assignment 1 - FruitTetris implementation Sample Skeleton Code
- This is ONLY a skeleton code showing:
How to use multiple buffers to store different objects
An efficient scheme to represent the grids and blocks
- Compile and Run:
Type make in terminal, then type ./FruitTetris
This code is extracted from Connor MacLeod's (crmacleo@sfu.ca) assignment submission
by Rui Ma (ruim@sfu.ca) on 2014-03-04.
Modified in Sep 2014 by Honghua Li (honghual@sfu.ca).
*/
/* Alex Sweeten
* 301265554
*/
#include "include/Angel.h"
#include <cstdlib>
#include <iostream>
#include <set>
using namespace std;
// xsize and ysize represent the window size - updated if window is reshaped to prevent stretching of the game
int xsize = 400;
int ysize = 720;
int tileX[4]; //stores the location of each piece of the tile, used for collision detection
int tileY[4];
int speed = 400;
// current tile
vec2 tile[4]; // An array of 4 2d vectors representing displacement from a 'center' piece of the tile, on the grid
vec2 tilepos = vec2(5, 19); // The position of the current tile using grid coordinates ((0,0) is the bottom left corner)
// An array storing all possible orientations of all possible tiles
// The 'tile' array will always be some element [i][j] of this array (an array of vec2)
//Both orientations of L-shapes
vec2 allRotationsLshapeLeft[4][4] =
{{vec2(0, 0), vec2(-1,0), vec2(1, 0), vec2(-1,-1)},
{vec2(0, 1), vec2(0, 0), vec2(0,-1), vec2(1, -1)},
{vec2(1, 1), vec2(-1,0), vec2(0, 0), vec2(1, 0)},
{vec2(-1,1), vec2(0, 1), vec2(0, 0), vec2(0, -1)}};
vec2 allRotationsLshapeRight[4][4] =
{{vec2(1, -1), vec2(-1,0), vec2(0, 0), vec2(1, 0)},
{vec2(0, 1), vec2(0, 0), vec2(0,-1), vec2(-1, -1)},
{vec2(0, 0), vec2(-1,0), vec2(1, 0), vec2(-1,1)},
{vec2(1,1), vec2(0, 1), vec2(0, 0), vec2(0, -1)}};
//I-shape. Certain vector spaces are repeated to make calling newtile() more manageable.
vec2 allRotationsIshape[4][4] =
{{vec2(0, 0), vec2(1,0), vec2(-1, 0), vec2(-2,0)},
{vec2(0, 1), vec2(0,0), vec2(0, -1), vec2(0,-2)},
{vec2(0, 0), vec2(1,0), vec2(-1, 0), vec2(-2,0)},
{vec2(0, 1), vec2(0,0), vec2(0, -1), vec2(0,-2)}};
//T-shape
vec2 allRotationsTshape[4][4] =
{{vec2(0, 0), vec2(1,0), vec2(-1, 0), vec2(0, -1)},
{vec2(0, 0), vec2(1,0), vec2(0, 1), vec2(0, -1)},
{vec2(0, 0), vec2(1,0), vec2(-1, 0), vec2(0, 1)},
{vec2(0, 0), vec2(0,1), vec2(-1, 0), vec2(0, -1)}};
//Both orientations of S-shapes. Certain vector spaces are repeated to make calling newtile() more manageable.
vec2 allRotationsSshapeLeft[4][4] =
{{vec2(0, 0), vec2(0,-1), vec2(-1, -1), vec2(1,0)},
{vec2(0, 1), vec2(0,0), vec2(1, 0), vec2(1,-1)},
{vec2(0, 0), vec2(0,-1), vec2(-1, -1), vec2(1,0)},
{vec2(0, 1), vec2(0,0), vec2(1, 0), vec2(1,-1)}};
vec2 allRotationsSshapeRight[4][4] =
{{vec2(0, 0), vec2(0,-1), vec2(1, -1), vec2(-1,0)},
{vec2(0, 1), vec2(0,0), vec2(-1, 0), vec2(-1,-1)},
{vec2(0, 0), vec2(0,-1), vec2(1, -1), vec2(-1,0)},
{vec2(0, 1), vec2(0,0), vec2(-1, 0), vec2(-1,-1)}};
// colors. x values are slighlty modified to simplify colour detection (no visual difference)
vec4 white = vec4(1.0, 1.0, 1.0, 1.0);
vec4 black = vec4(0.0, 0.0, 0.0, 1.0);
vec4 purple = vec4(0.8, 0.0, 1.0, 1.0);
vec4 red = vec4(0.99, 0.0, 0.0, 1.0);
vec4 yellow = vec4(0.97, 1.0, 0.0, 1.0);
vec4 green = vec4(0.1, 1.0, 0.0, 1.0);
vec4 orange = vec4(0.98, 0.5, 0.0, 1.0);
vec4 colorList[5] = {purple, red, yellow, green, orange};
vec4 colors[4];//= {black, black, black, black};
//board[x][y] represents whether the cell (x,y) is occupied
bool board[10][20];
//An array containing the colour of each of the 10*20*2*3 vertices that make up the board
//Initially, all will be set to black. As tiles are placed, sets of 6 vertices (2 triangles; 1 square)
//will be set to the appropriate colour in this array before updating the corresponding VBO
vec4 boardcolours[1200];
// location of vertex attributes in the shader program
GLuint vPosition;
GLuint vColor;
// locations of uniform variables in shader program
GLuint locxsize;
GLuint locysize;
// VAO and VBO
GLuint vaoIDs[3]; // One VAO for each object: the grid, the board, the current piece
GLuint vboIDs[6]; // Two Vertex Buffer Objects for each VAO (specifying vertex positions and colours, respectively)
//-------------------------------------------------------------------------------------------------------------------
//-------------------------------------------------------------------------------------------------------------------
// When the current tile is moved or rotated (or created), update the VBO containing its vertex position data
void updatetile()
{
// Bind the VBO containing current tile vertex positions
glBindBuffer(GL_ARRAY_BUFFER, vboIDs[4]);
// For each of the 4 'cells' of the tile,
for (int i = 0; i < 4; i++)
{
// Calculate the grid coordinates of the cell
GLfloat x = tilepos.x + tile[i].x;
GLfloat y = tilepos.y + tile[i].y;
tileX[i] = (int)x;
tileY[i] = (int)y;
// Create the 4 corners of the square - these vertices are using location in pixels
// These vertices are later converted by the vertex shader
vec4 p1 = vec4(33.0 + (x * 33.0), 33.0 + (y * 33.0), .4, 1);
vec4 p2 = vec4(33.0 + (x * 33.0), 66.0 + (y * 33.0), .4, 1);
vec4 p3 = vec4(66.0 + (x * 33.0), 33.0 + (y * 33.0), .4, 1);
vec4 p4 = vec4(66.0 + (x * 33.0), 66.0 + (y * 33.0), .4, 1);
// Two points are used by two triangles each
vec4 newpoints[6] = {p1, p2, p3, p2, p3, p4};
// Put new data in the VBO
glBufferSubData(GL_ARRAY_BUFFER, i*6*sizeof(vec4), 6*sizeof(vec4), newpoints);
}
glBindVertexArray(0);
}
//-------------------------------------------------------------------------------------------------------------------
// Called at the start of play and every time a tile is placed
void newtile()
{
int RandTile = rand() % 8; //Randomly selects an integer between 0 and 4
int RandRotation= rand() % 3; //You get the idea...
int RandStartX = rand() % 6 + 2;
//Specifying conditions for which starting tile doesn't have to be shifted down
if (RandRotation == 0 || (RandRotation == 2 && RandTile > 3)){
tilepos = vec2(RandStartX , 19);
}
else{
tilepos = vec2(RandStartX , 18);
}
// Update the geometry VBO of current tile
for (int i = 0; i < 4; i++){
// Determines a random shape. T and I are called twice to keep the probability of each shape 25%.
switch (RandTile){
case 0: tile[i] = allRotationsTshape[RandRotation][i];
break;
case 1: tile[i] = allRotationsTshape[RandRotation][i];
break;
case 2: tile[i] = allRotationsLshapeLeft[RandRotation][i];
break;
case 3: tile[i] = allRotationsLshapeRight[RandRotation][i];
break;
case 4: tile[i] = allRotationsSshapeLeft[RandRotation][i];
break;
case 5: tile[i] = allRotationsSshapeRight[RandRotation][i];
break;
case 6: tile[i] = allRotationsIshape[RandRotation][i];
break;
case 7: tile[i] = allRotationsIshape[RandRotation][i];
break;
}
}
updatetile();
vec4 newcolours[24];
vec4 randColor;
//assign every 6 verticies with the same randomly generated color
for (int i = 0; i < 4; i++)
{
randColor = colorList[rand() % 5];
for (int j = 0; j < 6; j++)
{
newcolours[(i * 6) + j] = randColor;
}
colors[i] = randColor;
}
glBindBuffer(GL_ARRAY_BUFFER, vboIDs[5]); // Bind the VBO containing current tile vertex colours
glBufferSubData(GL_ARRAY_BUFFER, 0, sizeof(newcolours), newcolours); // Put the colour data in the VBO
glBindBuffer(GL_ARRAY_BUFFER, 0);
glBindVertexArray(0);
}
//-------------------------------------------------------------------------------------------------------------------
void initGrid()
{
// ***Generate geometry data
vec4 gridpoints[64]; // Array containing the 64 points of the 32 total lines to be later put in the VBO
vec4 gridcolours[64]; // One colour per vertex
// Vertical lines
for (int i = 0; i < 11; i++){
gridpoints[2*i] = vec4((33.0 + (33.0 * i)), 33.0, 0, 1);
gridpoints[2*i + 1] = vec4((33.0 + (33.0 * i)), 693.0, 0, 1);
}
// Horizontal lines
for (int i = 0; i < 21; i++){
gridpoints[22 + 2*i] = vec4(33.0, (33.0 + (33.0 * i)), 0, 1);
gridpoints[22 + 2*i + 1] = vec4(363.0, (33.0 + (33.0 * i)), 0, 1);
}
// Make all grid lines white
for (int i = 0; i < 64; i++)
gridcolours[i] = white;
// *** set up buffer objects
// Set up first VAO (representing grid lines)
glBindVertexArray(vaoIDs[0]); // Bind the first VAO
glGenBuffers(2, vboIDs); // Create two Vertex Buffer Objects for this VAO (positions, colours)
// Grid vertex positions
glBindBuffer(GL_ARRAY_BUFFER, vboIDs[0]); // Bind the first grid VBO (vertex positions)
glBufferData(GL_ARRAY_BUFFER, 64*sizeof(vec4), gridpoints, GL_STATIC_DRAW); // Put the grid points in the VBO
glVertexAttribPointer(vPosition, 4, GL_FLOAT, GL_FALSE, 0, 0);
glEnableVertexAttribArray(vPosition); // Enable the attribute
// Grid vertex colours
glBindBuffer(GL_ARRAY_BUFFER, vboIDs[1]); // Bind the second grid VBO (vertex colours)
glBufferData(GL_ARRAY_BUFFER, 64*sizeof(vec4), gridcolours, GL_STATIC_DRAW); // Put the grid colours in the VBO
glVertexAttribPointer(vColor, 4, GL_FLOAT, GL_FALSE, 0, 0);
glEnableVertexAttribArray(vColor); // Enable the attribute
}
void initBoard()
{
// *** Generate the geometric data
vec4 boardpoints[1200];
for (int i = 0; i < 1200; i++)
boardcolours[i] = black; // Let the empty cells on the board be black
// Each cell is a square (2 triangles with 6 vertices)
for (int i = 0; i < 20; i++){
for (int j = 0; j < 10; j++)
{
vec4 p1 = vec4(33.0 + (j * 33.0), 33.0 + (i * 33.0), .5, 1);
vec4 p2 = vec4(33.0 + (j * 33.0), 66.0 + (i * 33.0), .5, 1);
vec4 p3 = vec4(66.0 + (j * 33.0), 33.0 + (i * 33.0), .5, 1);
vec4 p4 = vec4(66.0 + (j * 33.0), 66.0 + (i * 33.0), .5, 1);
// Two points are reused
boardpoints[6*(10*i + j) ] = p1;
boardpoints[6*(10*i + j) + 1] = p2;
boardpoints[6*(10*i + j) + 2] = p3;
boardpoints[6*(10*i + j) + 3] = p2;
boardpoints[6*(10*i + j) + 4] = p3;
boardpoints[6*(10*i + j) + 5] = p4;
}
}
// Initially no cell is occupied
for (int i = 0; i < 10; i++)
for (int j = 0; j < 20; j++)
board[i][j] = false;
// *** set up buffer objects
glBindVertexArray(vaoIDs[1]);
glGenBuffers(2, &vboIDs[2]);
// Grid cell vertex positions
glBindBuffer(GL_ARRAY_BUFFER, vboIDs[2]);
glBufferData(GL_ARRAY_BUFFER, 1200*sizeof(vec4), boardpoints, GL_STATIC_DRAW);
glVertexAttribPointer(vPosition, 4, GL_FLOAT, GL_FALSE, 0, 0);
glEnableVertexAttribArray(vPosition);
// Grid cell vertex colours
glBindBuffer(GL_ARRAY_BUFFER, vboIDs[3]);
glBufferData(GL_ARRAY_BUFFER, 1200*sizeof(vec4), boardcolours, GL_DYNAMIC_DRAW);
glVertexAttribPointer(vColor, 4, GL_FLOAT, GL_FALSE, 0, 0);
glEnableVertexAttribArray(vColor);
}
// No geometry for current tile initially
void initCurrentTile()
{
glBindVertexArray(vaoIDs[2]);
glGenBuffers(2, &vboIDs[4]);
// Current tile vertex positions
glBindBuffer(GL_ARRAY_BUFFER, vboIDs[4]);
glBufferData(GL_ARRAY_BUFFER, 24*sizeof(vec4), NULL, GL_DYNAMIC_DRAW);
glVertexAttribPointer(vPosition, 4, GL_FLOAT, GL_FALSE, 0, 0);
glEnableVertexAttribArray(vPosition);
// Current tile vertex colours
glBindBuffer(GL_ARRAY_BUFFER, vboIDs[5]);
glBufferData(GL_ARRAY_BUFFER, 24*sizeof(vec4), NULL, GL_DYNAMIC_DRAW);
glVertexAttribPointer(vColor, 4, GL_FLOAT, GL_FALSE, 0, 0);
glEnableVertexAttribArray(vColor);
}
void init()
{
// Load shaders and use the shader program
GLuint program = InitShader("vshader.glsl", "fshader.glsl");
glUseProgram(program);
// Get the location of the attributes (for glVertexAttribPointer() calls)
vPosition = glGetAttribLocation(program, "vPosition");
vColor = glGetAttribLocation(program, "vColor");
// Create 3 Vertex Array Objects, each representing one 'object'. Store the names in array vaoIDs
glGenVertexArrays(3, &vaoIDs[0]);
// Initialize the grid, the board, and the current tile
initGrid();
initBoard();
initCurrentTile();
// The location of the uniform variables in the shader program
locxsize = glGetUniformLocation(program, "xsize");
locysize = glGetUniformLocation(program, "ysize");
// Game initialization
newtile(); // create new next tile
// set to default
glBindVertexArray(0);
glClearColor(0, 0, 0, 0);
}
//-------------------------------------------------------------------------------------------------------------------
// Rotates the current tile, if there is room
void rotate()
{
//θ = 90 degrees
//the following is the formula to rotate counterclockwise about 0,0
//x’ = xcosθ - ysinθ
//y’ = xsinθ + ycosθ
//reduced to
//x' = -y
//y' = x
bool rotatable = true;
vec2 rotateTile[4];
for (int i = 0; i < 4; i++)
{
GLfloat rotX = -1 * tile[i].y;
GLfloat rotY = tile[i].x;
GLfloat newPosX = tilepos.x + rotX;
GLfloat newPosY = tilepos.y + rotY;
if (newPosX < 0 || newPosX > 9|| newPosY < 0 || board[(int)newPosX][(int)newPosY] == true)
//check if rotation puts us out of bounds or collides with a set tile
{
rotatable = false;
break;
}
else
{
rotateTile[i] = vec2(rotX,rotY);
}
}
if (rotatable)
{
for (int i = 0; i < 4; i++)
{
tile[i] = rotateTile[i];
}
}
}
//-------------------------------------------------------------------------------------------------------------------
// Checks if the specified row (0 is the bottom 19 the top) is full
// If every cell in the row is occupied, it will clear that cell and everything above it will shift down one row
void checkfullrow(int row)
{
bool occupied = true;
for (int i = 0; i < 10; i++)
{
occupied = occupied && board[i][row];
}
if (occupied)
{
glBindBuffer(GL_ARRAY_BUFFER, vboIDs[3]);
//loop begins at the row which is cleared
for (int i = row; i < 20; i++)
{
for (int j = 0; j < 60; j++)
{
//top row becomes black, all other rows take on the colors of the row above
if (i == 19)
{
boardcolours[1140 + j] = black;
}
else
{
boardcolours[(i * 60) + j] = boardcolours[(i * 60) + j + 60];
}
}
for (int j = 0; j < 10; j++)
{
//top row becomes unoccupied all other rows take on the status of the row above
if (i == 19)
{
board[j][19] = false;
}
else
{
board[j][i] = board[j][i+1];
}
}
}
glBufferSubData(GL_ARRAY_BUFFER, 0, sizeof(boardcolours), boardcolours);
glBindVertexArray(0);
}
}
void testmatch()
{
int i = 0;
for (i; i < 200; i++)
{
int colcount = (i % 10);
int rowcount = (i/10);
//exclude black colours
if(boardcolours[6*i].x != 0)
{
//Test for 3 in a row. Exclude columns 8 & 9.
if((boardcolours[6*i].x == boardcolours[6*(i+1)].x) && (boardcolours[6*i].x == boardcolours[6*(i+2)].x) && (i % 10 != 8) && (i % 10 != 9))
{
//Removes the 3 tiles in a row
glBindBuffer(GL_ARRAY_BUFFER, vboIDs[3]);
//loop begins at the row which is cleared
for (int j = rowcount; j < 20; j++)
{
for (int h = 0; h < 18; h++)
{
//top row becomes black, all other rows take on the colors of the row above
if (j == 19)
{
boardcolours[1140 + (colcount + h)] = black;
}
else
{
boardcolours[(6*i) + h] = boardcolours[(6*i) + h + 60];
}
}
for (int e = colcount; e < (colcount+3); e++)
{
//top row becomes unoccupied all other rows take on the status of the row above
if (j == 19)
{
board[e][19] = false;
}
else
{
board[e][j] = board[e][j+1];
}
}
}
glBufferSubData(GL_ARRAY_BUFFER, 0, sizeof(boardcolours), boardcolours);
glBindVertexArray(0);
}
//Test for 3 in a column. Exclude rows 18 & 19.
if((boardcolours[6*i].x == boardcolours[(6*i)+60].x) && (boardcolours[6*i].x == boardcolours[(6*i)+120].x) && (i < 1080))
{
}
//Test 3 diagonally ascending to the left. Exclude rows columns 1 & 2, and rows 18 & 19.
if((boardcolours[6*i].x == boardcolours[(6*i)+66].x) && (boardcolours[6*i].x == boardcolours[(6*i)+132].x) && (i < 1080) && (i % 10 != 0) && (i % 10 != 1))
{
}
//Test 3 diagonally ascending to the right. Exclude rows columns 8 & 9, and rows 18 & 19.
if((boardcolours[6*i].x == boardcolours[(6*i)+54].x) && (boardcolours[6*i].x == boardcolours[(6*i)+108].x) && (i < 1080) && (i % 10 != 8) && (i % 10 != 9))
{
}
}
}
}
//Checking and deleting if 3 colours in a row are detected
/*
void checkrowmatch()
{
vec4 rowcolours[10];
int rowcount = 0;
//for (int y=0; y < 20; y++)
//{
for (int i = 0; i < 10; i++)
{
rowcolours[i] = boardcolours[((6*i)+1)];//+(y*60)];
}
for (int j = 0; j < 8; j++)
{ //Checks to make sure colour value is not black
if(rowcolours[j].x != 0)
{ //Checks if there are 3 unique x value in a row
if((rowcolours[j].x == rowcolours[j+1].x) && (rowcolours[j].x == rowcolours[j+2].x))
{ //Removes the 3 tiles in a row
glBindBuffer(GL_ARRAY_BUFFER, vboIDs[3]);
//loop begins at the row which is cleared
for (int i = 0; i < 20; i++)
{
for (int h = (rowcount*6); h < ((rowcount*6) + 18); h++)
{
//top row becomes black, all other rows take on the colors of the row above
if (i == 19)
{
boardcolours[1140 + h] = black;
}
else
{
boardcolours[(i * 60) + h] = boardcolours[(i * 60) + h + 60];
}
}
for (int e = rowcount; e < (rowcount+3); e++)
{
//top row becomes unoccupied all other rows take on the status of the row above
if (i == 19)
{
board[e][19] = false;
}
else
{
board[e][i] = board[e][i+1];
}
}
}
glBufferSubData(GL_ARRAY_BUFFER, 0, sizeof(boardcolours), boardcolours);
glBindVertexArray(0);
}
}
rowcount++;
}
//}
}
*/
//-------------------------------------------------------------------------------------------------------------------
// Places the current tile - update the board vertex colour VBO and the array maintaining occupied cells
void settile()
{
{
//update VBO color
glBindBuffer(GL_ARRAY_BUFFER, vboIDs[3]);
std::set<int, std::greater<int> > rowsAffected;
std::set<int>::iterator it;
for (int i = 0; i < 4; i++)
{
//calculate grid coorindates for each cell
GLuint x = tilepos.x + tile[i].x;
GLuint y = tilepos.y + tile[i].y;
//update the corresponding cell to get the same color as the tile
for (int j = 0; j < 6; j++)
{
boardcolours[(y*60)+(x*6) + j] = colors[i];
}
board[x][y] = true;
rowsAffected.insert(y);
}
glBufferSubData(GL_ARRAY_BUFFER, 0, sizeof(boardcolours), boardcolours);
glBindVertexArray(0);
for (it = rowsAffected.begin(); it != rowsAffected.end(); ++it)
{
checkfullrow(*it);
}
testmatch();
}
}
//-------------------------------------------------------------------------------------------------------------------
// Given (x,y), tries to move the tile x squares to the right and y squares down
// Returns true if the tile was successfully moved, or false if there was some issue
bool movetile(vec2 direction)
{
return false;
}
//-------------------------------------------------------------------------------------------------------------------
//-------------------------------------------------------------------------------------------------------------------
void fallingtile(int data)
{
//halt falling bricks if starting point is obstructed
if (!board[5][19] && !board[5][18] && !board[4][19] && !board[4][18] && !board[6][19] && !board[6][18] )
{
tilepos.y -= 1;
updatetile();
glutPostRedisplay();
glutTimerFunc(speed, fallingtile, 0);
}
}
// Starts the game over - empties the board, creates new tiles, resets line counters
void restart()
{
initBoard();
//initCurrentTile();
newtile();
glutTimerFunc(speed, fallingtile, 0);
speed = 400;
}
// Draws the game
void display()
{
glClear(GL_COLOR_BUFFER_BIT);
glUniform1i(locxsize, xsize); // x and y sizes are passed to the shader program to maintain shape of the vertices on screen
glUniform1i(locysize, ysize);
glBindVertexArray(vaoIDs[1]); // Bind the VAO representing the grid cells (to be drawn first)
glDrawArrays(GL_TRIANGLES, 0, 1200); // Draw the board (10*20*2 = 400 triangles)
glBindVertexArray(vaoIDs[2]); // Bind the VAO representing the current tile (to be drawn on top of the board)
glDrawArrays(GL_TRIANGLES, 0, 24); // Draw the current tile (8 triangles)
glBindVertexArray(vaoIDs[0]); // Bind the VAO representing the grid lines (to be drawn on top of everything else)
glDrawArrays(GL_LINES, 0, 64); // Draw the grid lines (21+11 = 32 lines)
glutSwapBuffers();
}
//-------------------------------------------------------------------------------------------------------------------
// Reshape callback will simply change xsize and ysize variables, which are passed to the vertex shader
// to keep the game the same from stretching if the window is stretched
void reshape(GLsizei w, GLsizei h)
{
xsize = w;
ysize = h;
glViewport(0, 0, w, h);
}
//-------------------------------------------------------------------------------------------------------------------
// Handle arrow key keypresses
void special(int key, int x, int y)
{
bool movable = true;
switch(key) {
case GLUT_KEY_UP :
rotate();
break;
case GLUT_KEY_DOWN :
for (int i = 0; i < 4; i++)
{
if (board[tileX[i]][tileY[i]-1] == true)
{
movable = false;
break;
}
}
if (movable)
{
tilepos.y -= 1;
}
break;
case GLUT_KEY_LEFT :
for (int i = 0; i < 4; i++)
{
if (tileX[i] == 0 || board[tileX[i]-1][tileY[i]] == true)
{
movable = false;
break;
}
}
if (movable)
{
tilepos.x -= 1;
}
break;
case GLUT_KEY_RIGHT:
for (int i = 0; i < 4; i++)
{
if (tileX[i] == 9 || board[tileX[i]+1][tileY[i]] == true)
{
movable = false;
break;
}
}
if (movable)
{
tilepos.x += 1;
}
break;
}
updatetile();
glutPostRedisplay();
}
//-------------------------------------------------------------------------------------------------------------------
// Handles standard keypresses
void keyboard(unsigned char key, int x, int y)
{
switch(key)
{
case 033: // Both escape key and 'q' cause the game to exit
exit(EXIT_SUCCESS);
break;
case 'q':
exit (EXIT_SUCCESS);
break;
case 'r': // 'r' key restarts the game
restart();
break;
case 'a':
if(speed > 100)
{
speed -= 100;
}
break;
case 'd':
if(speed < 1000)
{
speed += 100;
}
break;
glutPostRedisplay();
}
}
//-------------------------------------------------------------------------------------------------------------------
void idle(void)
{
//loop through each piece of the tile to check for collision with the floor or a set tile
for (int i = 0; i < 4; i++)
{
//if the tile reaches the floor or the cell directly below is occupied
if ((tileY[i]) == 0 || board[tileX[i]][tileY[i]-1] == true)
{
settile();
if (board[5][19] == true){
break;
}
newtile();
break;
}
}
glutPostRedisplay();
}
//-------------------------------------------------------------------------------------------------------------------
int main(int argc, char **argv)
{
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_RGBA | GLUT_DOUBLE);
glutInitWindowSize(xsize, ysize);
glutInitWindowPosition(680, 178); // Center the game window (well, on a 1920x1080 display)
glutCreateWindow("Fruit Tetris");
glewInit();
init();
// Callback functions
glutDisplayFunc(display);
glutReshapeFunc(reshape);
glutSpecialFunc(special);
glutKeyboardFunc(keyboard);
glutIdleFunc(idle);
glutTimerFunc(speed, fallingtile, 0);
glutMainLoop(); // Start main loop
return 0;
}
| [
"alex.sweeten@gmail.com"
] | alex.sweeten@gmail.com |
536a405f4d4c59fde8acaa75e6cb867d0b81fa94 | f11661bb6e2e4c0a81aca295a7835951e8146261 | /RTA-Project/RTA-Project/RenderShape.cpp | 479cd70fc64c9ed5946d9f92f742cf99a49f5823 | [] | no_license | noelmurillo15/Graphics-Engine-2 | 4edd234c7c71341d31eeca9123f47518e3a27559 | 9f7dc200bbd26c42a839adbe33c5da973abb36e2 | refs/heads/master | 2020-05-29T09:14:57.616532 | 2019-09-02T17:35:56 | 2019-09-02T17:35:56 | 70,124,580 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,127 | cpp | #include "RenderShape.h"
#include "RenderMesh.h"
#include "RenderContext.h"
#include <fstream>
#include <string>
RenderShape::RenderShape() {
Mat_Identity(worldMat);
this->next = nullptr;
this->func = NULL;
mesh = new RenderMesh;
context = new RenderContext;
}
RenderShape::~RenderShape() {
delete mesh;
delete context;
}
void RenderShape::InitializeModel(ID3D11Device* dev, const char* path) {
this->func = RenderContext::RenderModel;
Translate(worldMat, 0.5f, 0.5f, 2.0f);
mesh->LoadOBJfromFile(path);
context->InitializeModel(dev, mesh);
}
void RenderShape::ScaleModel(FLOAT3 scale) {
Scale_4x4(worldMat, scale.x, scale.y, scale.z);
}
void RenderShape::RotateModel(float dt, unsigned int axis) {
if (axis == 0)
RotateX_Local(worldMat, dt);
else if(axis == 1)
RotateY_Local(worldMat, dt);
else if (axis == 2)
RotateZ_Local(worldMat, dt);
}
void RenderShape::TranslateModel(FLOAT3 trans) {
Translate(worldMat, trans.x, trans.y, trans.z);
}
void RenderShape::InitializeGrid(ID3D11Device* dev) {
this->func = RenderContext::RenderGrid;
Mat_Identity(worldMat);
context->InitializeGrid(dev);
} | [
"noelmurillo15@fullsail.edu"
] | noelmurillo15@fullsail.edu |
15bd627978fd222bb94cddaab8c12f4ce175ddc8 | c94841f5b0200abe8f65f94c5542300911c83bb2 | /ExtremeCopy/Test/XCTesting/stdafx.cpp | 7f859f5b09c7816b8add6a7c0324109f09482a1b | [
"Apache-2.0"
] | permissive | zelohon/ExtremeCopy | 2c4ab94eb5a7391d4c69f33d1002fb84ac74bbab | de9ba1aef769d555d10916169ccf2570c69a8d01 | refs/heads/main | 2023-01-04T15:17:05.872507 | 2020-11-03T14:31:05 | 2020-11-03T14:31:05 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 444 | cpp |
// stdafx.cpp : source file that includes just the standard includes
// XCTesting.pch will be the pre-compiled header
// stdafx.obj will contain the pre-compiled type information
#include "stdafx.h"
const TCHAR* g_pValidDirWithFolder = _T("D:\\test_copy\\valid_folder_with_folder") ;
const TCHAR* g_pValidDirWithoutFolder = _T("D:\\test_copy\\valid_folder_without_folder") ;
const TCHAR* g_pInvalidDir = _T("this is my invalid directory") ; | [
"clock4096@gmail.com"
] | clock4096@gmail.com |
1595c0e1f8d9e73ff8c9c2c6490f6359d29cdedf | b179ee1c603139301b86fa44ccbbd315a148c47b | /engine/maps/tiles/features/source/GoodAltarManipulator.cpp | f2c257d2bdb307f94cdfe1dd51752aec6173274c | [
"MIT",
"Zlib"
] | permissive | prolog/shadow-of-the-wyrm | 06de691e94c2cb979756cee13d424a994257b544 | cd419efe4394803ff3d0553acf890f33ae1e4278 | refs/heads/master | 2023-08-31T06:08:23.046409 | 2023-07-08T14:45:27 | 2023-07-08T14:45:27 | 203,472,742 | 71 | 9 | MIT | 2023-07-08T14:45:29 | 2019-08-21T00:01:37 | C++ | UTF-8 | C++ | false | false | 372 | cpp | #include "GoodAltarManipulator.hpp"
#include "Game.hpp"
using namespace std;
GoodAltarManipulator::GoodAltarManipulator(FeaturePtr feature)
: AltarManipulator(feature)
{
}
string GoodAltarManipulator::get_creature_action_key() const
{
return CreatureActionKeys::ACTION_DESECRATE_GOOD;
}
#ifdef UNIT_TESTS
#include "unit_tests/GoodAltarManipulator_test.cpp"
#endif
| [
"jcd748@mail.usask.ca"
] | jcd748@mail.usask.ca |
79fa32fb06f095bfe09c194fd2f8957642aba49c | aa10e3edb2d9db88b0fa48beee2c8a4c93d6958f | /ch12/1201_02ex/Person.cpp | 1b4ebeae008b2f9d29a36dc9e0e8037a4e66ec70 | [
"MIT"
] | permissive | mallius/CppPrimer | e1a04d6e1a00d180ecca60a0207466a46a5651b7 | 0285fabe5934492dfed0a9cf67ba5650982a5f76 | refs/heads/master | 2021-06-05T10:32:55.651469 | 2021-05-20T03:36:22 | 2021-05-20T03:36:22 | 88,345,336 | 0 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 226 | cpp | #include "Person.h"
Person::Person()
{
}
Person::Person(string n, string a)
{
name = n;
address = a;
}
int main(void)
{
Person p("Yuyawei", "Changdao");
cout << p.getName() << endl;
cout << p.getAddress() << endl;
}
| [
"mallius@qq.com"
] | mallius@qq.com |
399c091486254c949bf66f90662ed5732df02e6b | c5a28193198763d7f53973f93acdeb557c90c012 | /vmware_fs/VMWNode.cpp | cfdcee76bfa5813f27119c26c853b0170f9c4bd9 | [
"MIT"
] | permissive | adamfowleruk/VMwareAddons | 25fad58a3b837b6da2cf1ea1df461699919e4abb | aed6f601f0d71e9240c71b987a30ea38f03f8c72 | refs/heads/master | 2023-07-10T01:35:20.402654 | 2021-04-13T14:15:00 | 2021-04-13T14:15:00 | 296,873,848 | 0 | 0 | MIT | 2020-09-19T13:19:45 | 2020-09-19T13:19:44 | null | UTF-8 | C++ | false | false | 3,097 | cpp | #include "VMWNode.h"
#include <stdio.h>
#include <stdlib.h>
#include <KernelExport.h>
ino_t VMWNode::current_inode = 2;
VMWNode::VMWNode(const char* _name, VMWNode* _parent)
: parent(_parent)
{
name = strdup(_name);
name_length = strlen(name);
inode = current_inode;
current_inode++;
children = NULL;
}
VMWNode::~VMWNode()
{
vmw_list_item* item = children;
while (item != NULL) {
delete item->node;
vmw_list_item* next_item = item->next;
free(item);
item = next_item;
}
free(name);
}
ssize_t
VMWNode::CopyPathTo(char* buffer, size_t buffer_length, const char* to_append)
{
if (parent == NULL) { // This is the root node
if (to_append == NULL || to_append[0] == '\0'
|| strcmp(to_append, ".") == 0 || strcmp(to_append, "..") == 0) {
memset(buffer, 0, buffer_length);
return 0;
}
size_t length = strlen(to_append);
if (length >= buffer_length)
return -1;
strcpy(buffer, to_append);
return length;
}
if (to_append != NULL) {
if (strcmp(to_append, "..") == 0)
return parent->CopyPathTo(buffer, buffer_length);
if (strcmp(to_append, ".") == 0)
to_append = NULL;
}
ssize_t previous_length = parent->CopyPathTo(buffer, buffer_length);
if (previous_length < 0)
return -1;
bool append_slash = (previous_length > 0);
size_t new_length = previous_length + (append_slash ? 1 : 0) + name_length;
if (to_append != NULL)
new_length += strlen(to_append) + 1;
if (new_length >= buffer_length) // No space left
return -1;
if (append_slash) // Need to add a slash after the previous item
strcat(buffer, "/");
strcat(buffer, name);
if (to_append != NULL) {
strcat(buffer, "/");
strcat(buffer, to_append);
}
return new_length;
}
void
VMWNode::DeleteChildIfExists(const char* name)
{
vmw_list_item* item = children;
vmw_list_item* prev_item = NULL;
while (item != NULL) {
if (strcmp(item->node->name, name) == 0) {
delete item->node;
if (prev_item == NULL)
children = item->next;
else
prev_item->next = item->next;
free(item);
return;
}
prev_item = item;
item = item->next;
}
}
VMWNode*
VMWNode::GetChild(const char* name)
{
if (strcmp(name, "") == 0 || strcmp(name, ".") == 0)
return this;
if (strcmp(name, "..") == 0)
return (parent == NULL ? this : parent);
vmw_list_item* item = children;
while (item != NULL) {
if (strcmp(item->node->name, name) == 0)
return item->node;
if (item->next == NULL)
break;
item = item->next;
}
vmw_list_item* new_item = (vmw_list_item*)malloc(sizeof(vmw_list_item));
if (new_item == NULL)
return NULL;
new_item->next = NULL;
new_item->node = new VMWNode(name, this);
if (new_item->node == NULL) {
free(new_item);
return NULL;
}
if (item == NULL)
children = new_item;
else
item->next = new_item;
return new_item->node;
}
VMWNode*
VMWNode::GetChild(ino_t _inode)
{
if (this->inode == _inode)
return this;
vmw_list_item* item = children;
while (item != NULL) {
VMWNode* node = item->node->GetChild(_inode);
if (node != NULL)
return node;
item = item->next;
}
return NULL;
}
| [
"VinDuv@61d4227d-4d08-4a40-bfe6-ff43b4e770fc"
] | VinDuv@61d4227d-4d08-4a40-bfe6-ff43b4e770fc |
70de32889121a9fcf72250f0f4614e0b9e7bd0f6 | 35e79b51f691b7737db254ba1d907b2fd2d731ef | /AtCoder/ARC/028/B.cpp | 3fd6074191efa74d1aeea0ebbf3a2a7911d1d655 | [] | no_license | rodea0952/competitive-programming | 00260062d00f56a011f146cbdb9ef8356e6b69e4 | 9d7089307c8f61ea1274a9f51d6ea00d67b80482 | refs/heads/master | 2022-07-01T02:25:46.897613 | 2022-06-04T08:44:42 | 2022-06-04T08:44:42 | 202,485,546 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,493 | cpp | #pragma GCC optimize("O3")
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <string>
#include <cstring>
#include <deque>
#include <list>
#include <queue>
#include <stack>
#include <vector>
#include <utility>
#include <algorithm>
#include <map>
#include <set>
#include <complex>
#include <cmath>
#include <limits>
#include <cfloat>
#include <climits>
#include <ctime>
#include <cassert>
#include <numeric>
#include <fstream>
#include <functional>
#include <bitset>
using namespace std;
using ll = long long;
using P = pair<int, int>;
using T = tuple<int, int, int>;
template <class T> inline T chmax(T &a, const T b) {return a = (a < b) ? b : a;}
template <class T> inline T chmin(T &a, const T b) {return a = (a > b) ? b : a;}
constexpr int MOD = 1e9 + 7;
constexpr int inf = 1e9;
constexpr long long INF = 1e18;
constexpr double pi = acos(-1);
constexpr double EPS = 1e-10;
int dx[] = {1, 0, -1, 0};
int dy[] = {0, 1, 0, -1};
int main(){
cin.tie(0);
ios::sync_with_stdio(false);
int n, k; cin>>n>>k;
vector<int> x(n);
for(int i=0; i<n; i++){
cin>>x[i];
x[i]--;
}
priority_queue<P> que;
for(int i=0; i<k; i++) que.emplace(x[i], i);
vector<int> ans;
for(int i=k; i<=n; i++){
ans.emplace_back(que.top().second);
if(que.top().first > x[i] && i < n){
que.pop();
que.emplace(x[i], i);
}
}
for(auto i:ans){
cout << i + 1 << endl;
}
return 0;
} | [
"dragondoor0912@yahoo.co.jp"
] | dragondoor0912@yahoo.co.jp |
be0e6990a5867640b8dee2a3acdfd5230fe74241 | ec98901e6318744c61013177c8db25a1244fba2c | /towerofhonoi.cpp | 840bf6eb7c83dca8bfd46dcfb08feed719e99a6c | [] | no_license | Elizzzzzzzzzzer/turboC | 1bebeb597fd60a4228f9e38d09691814e63ab8aa | 65d1fe71a5a28c6e1449b6fc0ad845f4407aca6d | refs/heads/master | 2023-03-22T19:48:47.880278 | 2019-11-24T11:36:22 | 2019-11-24T11:36:22 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 765 | cpp | #include <bits/stdc++.h>
#include<stdio.h>
using namespace std;
void towerOfHanoi(int n, char from_rod,
char to_rod, char aux_rod)
{
if (n == 1)
{
cout << "Move disk 1 from rod " << from_rod <<
" to rod " << to_rod<<endl;
return ;
}
towerOfHanoi(n - 1, from_rod, aux_rod, to_rod);
cout << "Move disk " << n << " from rod " << from_rod <<
" to rod " << to_rod << endl;
towerOfHanoi(n - 1, aux_rod, to_rod, from_rod);
}
// Driver code
int main()
{
int n = 3; // Number of disks
towerOfHanoi(n, 'A', 'C', 'B'); // A, B and C are names of rods
return 0;
}
| [
"singh.shashank166948@gmail.com"
] | singh.shashank166948@gmail.com |
6d75b5882aa7bc4681581d5f6d7038ac0f00027d | f7a50f431e19deeed2d9ce177109db5ec44f1d45 | /MonkeyEngine/Materials/Units/Utilities/Source/CriticalRegion.cpp | c434f9a53bdbe5d3e74e06e6e28024e7a08228fa | [] | no_license | brady00/Super-Amazing-Game-O-Rama-Drama | d6382463f574ce3b6e5f13258fd934b05bb852cd | 78fc93d4c235dc499f6691d3766df7b43e13ad1c | refs/heads/master | 2021-01-12T12:59:21.644625 | 2017-11-13T00:27:17 | 2017-11-13T00:27:17 | 69,768,512 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 339 | cpp | #include "CriticalRegion.h"
namespace MonkeyEngine
{
std::unordered_map<void*, std::mutex*> CriticalRegion::threads;
void CriticalRegion::Enter(void* obj)
{
if (!threads[obj])
threads[obj] = new std::mutex();
threads[obj]->lock();
}
void CriticalRegion::Exit(void* obj)
{
if (threads[obj])
threads[obj]->unlock();
}
} | [
"gueyr.brady@gmail.com"
] | gueyr.brady@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.