text
stringlengths 4
6.14k
|
|---|
/*
Copyright 2013-2021 Paul Colby
This file is part of QtAws.
QtAws is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
QtAws is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with the QtAws. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef QTAWS_GETIPSETREQUEST_H
#define QTAWS_GETIPSETREQUEST_H
#include "wafregionalrequest.h"
namespace QtAws {
namespace WAFRegional {
class GetIPSetRequestPrivate;
class QTAWSWAFREGIONAL_EXPORT GetIPSetRequest : public WAFRegionalRequest {
public:
GetIPSetRequest(const GetIPSetRequest &other);
GetIPSetRequest();
virtual bool isValid() const Q_DECL_OVERRIDE;
protected:
virtual QtAws::Core::AwsAbstractResponse * response(QNetworkReply * const reply) const Q_DECL_OVERRIDE;
private:
Q_DECLARE_PRIVATE(GetIPSetRequest)
};
} // namespace WAFRegional
} // namespace QtAws
#endif
|
/*
* Copyright 2013 Giulio Camuffo <giuliocamuffo@gmail.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef INTERFACE_H
#define INTERFACE_H
#include <list>
#include <type_traits>
class Interface;
class Object
{
public:
Object();
virtual ~Object();
void addInterface(Interface *iface);
void destroy();
template <class T>
T *findInterface() const;
private:
std::list<Interface *> m_ifaces;
bool m_deleting;
};
class Interface
{
public:
Interface();
virtual ~Interface() {}
Object *object() { return m_obj; }
protected:
virtual void added() {}
private:
Object *m_obj;
friend class Object;
};
template <class T>
T *Object::findInterface() const
{
static_assert(std::is_base_of<Interface, T>::value, "T is not derived from Interface.");
for (Interface *iface: m_ifaces) {
if (T *t = dynamic_cast<T *>(iface)) {
return t;
}
}
return nullptr;
}
#endif
|
// Created file "Lib\src\Uuid\X64\guids"
typedef struct _GUID
{
unsigned long Data1;
unsigned short Data2;
unsigned short Data3;
unsigned char Data4[8];
} GUID;
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
extern const GUID name = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }
DEFINE_GUID(PKEY_Contact_PagerTelephone, 0xd6304e01, 0xf8f5, 0x4f45, 0x8b, 0x15, 0xd0, 0x24, 0xa6, 0x29, 0x67, 0x89);
|
/*
Copyright 2010, 2011 Tarik Sekmen.
All Rights Reserved.
Written by Tarik Sekmen <tarik@ilixi.org>.
This file is part of ilixi.
ilixi is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
ilixi is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with ilixi. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef ILIXI_ICON_H_
#define ILIXI_ICON_H_
#include "ui/Widget.h"
#include "types/Image.h"
namespace ilixi
{
class Icon : public Widget
{
public:
Icon(std::string path, Widget* parent = 0);
Icon(Image* image, Widget* parent = 0);
virtual
~Icon();
virtual Size
preferredSize() const;
bool
border() const;
bool
fillBackground() const;
Image*
image() const;
void
setBorder(bool border);
void
setFillBackground(bool fill);
private:
bool _border;bool _fillBackground;bool _ownImage;
Image* _image;
void
compose(const Rectangle& rect);
};
}
#endif /* ILIXI_ICON_H_ */
|
/*
Copyright 2013-2021 Paul Colby
This file is part of QtAws.
QtAws is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
QtAws is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with the QtAws. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef QTAWS_GETCONNECTIONREQUEST_H
#define QTAWS_GETCONNECTIONREQUEST_H
#include "gluerequest.h"
namespace QtAws {
namespace Glue {
class GetConnectionRequestPrivate;
class QTAWSGLUE_EXPORT GetConnectionRequest : public GlueRequest {
public:
GetConnectionRequest(const GetConnectionRequest &other);
GetConnectionRequest();
virtual bool isValid() const Q_DECL_OVERRIDE;
protected:
virtual QtAws::Core::AwsAbstractResponse * response(QNetworkReply * const reply) const Q_DECL_OVERRIDE;
private:
Q_DECLARE_PRIVATE(GetConnectionRequest)
};
} // namespace Glue
} // namespace QtAws
#endif
|
#include "vahttool.h"
#include <stdlib.h>
int vt_convert_PLST_write(struct vt_options* opt, vaht_resource* res, char* path)
{
vaht_plst* plst = vaht_plst_open(res);
if (plst == NULL)
{
vt_error(opt, "PLST resource could not be converted: %04i", vaht_resource_id(res));
return 1;
}
FILE* fp = fopen(path, "w");
if (!fp)
{
vt_error(opt, "cannot open path: %s", path);
vaht_plst_close(plst);
return 1;
}
/* do the conversion */
fprintf(fp, "#\ttBMP\t-- L\tR\tT\tB\n");
uint16_t count = vaht_plst_records(plst);
uint16_t i;
for (i = 1; i <= count; i++)
{
uint16_t bitmap_id = vaht_plst_bitmap_id(plst, i);
uint16_t left, right, top, bottom;
vaht_plst_rect(plst, i, &left, &right, &top, &bottom);
fprintf(fp, "%i\t%i\t-- %i\t%i\t%i\t%i\n", i, bitmap_id, left, right, top, bottom);
}
fclose(fp);
vaht_plst_close(plst);
return 0;
}
|
#ifndef V4LTEST_H
#define V4LTEST_H
void F4Ltest();
#endif // V4LTEST_H
|
#ifndef TABBUTTON_H
#define TABBUTTON_H
#include "Button.h"
class TabButton : public Button
{
Q_OBJECT
public:
TabButton(const QString &text, QWidget *pParent = NULL);
protected:
virtual void paintEvent(QPaintEvent *);
protected slots:
virtual void ButtonClicked();
private:
QString m_Text;
};
#endif // TABBUTTON_H
|
/// @author Alexander Rykovanov 2013
/// @email rykovanov.as@gmail.com
/// @brief Internal Server wich is used by addons.
/// @license GNU LGPL
///
/// Distributed under the GNU LGPL License
/// (See accompanying file LICENSE or copy at
/// http://www.gnu.org/licenses/lgpl.html)
///
#pragma once
#include <opc/common/addons_core/addon.h>
#include <opc/ua/server.h>
namespace OpcUa
{
namespace UaServer
{
class ServicesRegistryAddon : public Common::Addon
{
public:
DEFINE_CLASS_POINTERS(ServicesRegistryAddon);
public:
virtual std::shared_ptr<OpcUa::Remote::Server> GetServer() const = 0;
virtual void RegisterEndpointsServices(std::shared_ptr<OpcUa::Remote::EndpointServices> endpoints) = 0;
virtual void UnregisterEndpointsServices() = 0;
virtual void RegisterViewServices(std::shared_ptr<OpcUa::Remote::ViewServices> views) = 0;
virtual void UnregisterViewServices() = 0;
virtual void RegisterAttributeServices(std::shared_ptr<OpcUa::Remote::AttributeServices> attributes) = 0;
virtual void UnregisterAttributeServices() = 0;
virtual void RegisterNodeManagementServices(std::shared_ptr<OpcUa::Remote::NodeManagementServices> attributes) = 0;
virtual void UnregisterNodeManagementServices() = 0;
virtual void RegisterSubscriptionServices(std::shared_ptr<OpcUa::Remote::SubscriptionServices> attributes) = 0;
virtual void UnregisterSubscriptionServices() = 0;
};
const char ServicesRegistryAddonID[] = "services_registry";
}
}
|
/********************************************************************
* Copyright © 2016 Computational Molecular Biology Group, *
* Freie Universität Berlin (GER) *
* *
* This file is part of ReaDDy. *
* *
* ReaDDy is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Lesser General Public License as *
* published by the Free Software Foundation, either version 3 of *
* the License, or (at your option) any later version. *
* *
* 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 Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General *
* Public License along with this program. If not, see *
* <http://www.gnu.org/licenses/>. *
********************************************************************/
/**
* This header file contains:
* * the `readdy::model::particle_flavor` type which takes values as defined in the `readdy::model::particleflavor`
* namespace
* * the definition of ParticleTypeInfo, backing structure for all particle types
* * the definition of ParticleTypeRegistry, an object managing all particle types for a reaction diffusion system
*
* @file ParticleTypeRegistry.h
* @brief Header file containing definitions for particle flavors, particle type info and the particle type registry.
* @author clonker
* @date 29.03.17
* @copyright GNU Lesser General Public License v3.0
*/
#pragma once
#include <readdy/common/common.h>
#include "Particle.h"
NAMESPACE_BEGIN(readdy)
NAMESPACE_BEGIN(model)
using particle_flavor = std::uint8_t;
NAMESPACE_BEGIN(particleflavor)
static constexpr particle_flavor NORMAL = 0;
static constexpr particle_flavor TOPOLOGY = 1;
static constexpr particle_flavor MEMBRANE = 2;
inline static std::string particle_flavor_to_str(particle_flavor flavor) {
switch(flavor) {
case model::particleflavor::NORMAL: return "NORMAL";
case model::particleflavor::TOPOLOGY: return "TOPOLOGY";
case model::particleflavor::MEMBRANE: return "MEMBRANE";
default: return "UNKNOWN";
}
}
NAMESPACE_END(particleflavor)
struct ParticleTypeInfo {
std::string name;
scalar diffusionConstant;
particle_flavor flavor;
particle_type_type typeId;
ParticleTypeInfo(const std::string &name, scalar diffusionConstant,
particle_flavor flavor, Particle::type_type typeId);
};
class ParticleTypeRegistry {
public:
using type_map = std::unordered_map<std::string, particle_type_type>;
ParticleTypeRegistry() = default;
ParticleTypeRegistry(const ParticleTypeRegistry &) = default;
ParticleTypeRegistry &operator=(const ParticleTypeRegistry &) = default;
ParticleTypeRegistry(ParticleTypeRegistry &&) = default;
ParticleTypeRegistry &operator=(ParticleTypeRegistry &&) = default;
~ParticleTypeRegistry() = default;
particle_type_type idOf(const std::string &name) const {
return _idOf(name);
}
particle_type_type operator()(const std::string &name) const {
return idOf(name);
}
void add(const std::string &name, scalar diffusionConst, particle_flavor flavor = particleflavor::NORMAL);
void addTopologyType(const std::string &name, scalar diffusionConst) {
add(name, diffusionConst, particleflavor::TOPOLOGY);
}
const ParticleTypeInfo &infoOf(const std::string &name) const {
return infoOf(_idOf(name));
}
const ParticleTypeInfo &infoOf(Particle::type_type type) const {
return particle_info_.at(type);
}
scalar diffusionConstantOf(const std::string &particleType) const {
return diffusionConstantOf(idOf(particleType));
}
scalar diffusionConstantOf(particle_type_type particleType) const {
return particle_info_.at(particleType).diffusionConstant;
}
const std::size_t &nTypes() const {
return n_types_;
}
std::vector<particle_type_type> typesFlat() const {
std::vector<particle_type_type> v;
std::transform(std::begin(type_mapping_), std::end(type_mapping_), std::back_inserter(v), [](const auto &e) {
return e.second;
});
return v;
}
std::string nameOf(particle_type_type id) const {
auto it = std::find_if(std::begin(type_mapping_), std::end(type_mapping_), [id](const auto &e) {
return e.second == id;
});
return it == std::end(type_mapping_) ? "" : it->first;
}
const type_map &typeMapping() const {
return type_mapping_;
}
std::string describe() const;
void configure() {
/*no op*/
}
private:
particle_type_type _idOf(const std::string &name) const {
auto it = type_mapping_.find(name);
if (it == type_mapping_.end()) {
throw std::invalid_argument(
fmt::format("Could not find type \"{}\", did you forget to register it before accessing it?", name)
);
}
return it->second;
}
std::size_t n_types_ = 0;
particle_type_type type_counter_ = 0;
type_map type_mapping_ {};
std::unordered_map<particle_type_type, ParticleTypeInfo> particle_info_ {};
};
NAMESPACE_END(model)
NAMESPACE_END(readdy)
|
// Created file "Lib\src\Svcguid\iid"
typedef struct _GUID
{
unsigned long Data1;
unsigned short Data2;
unsigned short Data3;
unsigned char Data4[8];
} GUID;
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
extern const GUID name = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }
DEFINE_GUID(IID_IComTrackingInfoObject, 0x116e42c5, 0xd8b1, 0x47bf, 0xab, 0x1e, 0xc8, 0x95, 0xed, 0x3e, 0x23, 0x72);
|
// Created file "Lib\src\sensorsapi\X64\sensorsapi"
typedef struct _GUID
{
unsigned long Data1;
unsigned short Data2;
unsigned short Data3;
unsigned char Data4[8];
} GUID;
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
extern const GUID name = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }
DEFINE_GUID(GUID_ALLOW_RTC_WAKE, 0xbd3b718a, 0x0680, 0x4d9d, 0x8a, 0xb2, 0xe1, 0xd2, 0xb4, 0xac, 0x80, 0x6d);
|
#ifndef DEVICEDIALOG_H
#define DEVICEDIALOG_H
#include <QDialog>
#include <QMap>
namespace Ui {
class DeviceDialog;
}
#if defined( VIDEOCAPTURE_SUPPORTED )
#include <videocapture/Capture.h>
#else
namespace ca { typedef int Capture; }
#endif
class DeviceDialog : public QDialog
{
Q_OBJECT
public:
explicit DeviceDialog( ca::Capture &pCapture, int pDevIdx, int pCfgIdx, QWidget *parent = 0);
virtual ~DeviceDialog();
inline int deviceIdx( void ) const
{
return( mDevIdx );
}
inline int formatIdx( void ) const
{
return( mCfgIdx );
}
void updateFormatList( void );
private slots:
void deviceChanged( int index );
void formatChanged( int index );
private:
Ui::DeviceDialog *ui;
#if defined( VIDEOCAPTURE_SUPPORTED )
ca::Capture &mCapture;
#endif
int mDevIdx;
int mCfgIdx;
};
#endif // DEVICEDIALOG_H
|
/******************************************************************************
* Copyright (C) 2014 by Ralf Kaestner *
* ralf.kaestner@gmail.com *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the Lesser GNU General Public License as published by*
* the Free Software Foundation; either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* Lesser GNU General Public License for more details. *
* *
* You should have received a copy of the Lesser GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
******************************************************************************/
/** \file WorkerForwards.h
* \brief Header file providing forward declarations for the node worker
*/
#ifndef ROSCPP_NODEWRAP_WORKER_FORWARDS_H
#define ROSCPP_NODEWRAP_WORKER_FORWARDS_H
#include <ros/ros.h>
namespace nodewrap {
/** \brief Forward declaration of the worker options
*/
class WorkerOptions;
/** \brief Forward declaration of the worker
*/
class Worker;
/** \brief Forward declaration of the worker pointer type
*/
typedef boost::shared_ptr<Worker> WorkerPtr;
/** \brief Forward declaration of the worker weak pointer type
*/
typedef boost::weak_ptr<Worker> WorkerWPtr;
/** \brief Forward declaration of the worker implementation
*/
class WorkerImpl;
/** \brief Forward declaration of the worker implementation pointer type
*/
typedef boost::shared_ptr<WorkerImpl> WorkerImplPtr;
/** \brief Forward declaration of the worker implementation weak pointer
* type
*/
typedef boost::weak_ptr<WorkerImpl> WorkerImplWPtr;
/** \brief Forward declaration of the worker manager
*/
class WorkerManager;
/** \brief Forward declaration of the worker manager pointer type
*/
typedef boost::shared_ptr<WorkerManager> WorkerManagerPtr;
/** \brief Forward declaration of the worker manager weak pointer type
*/
typedef boost::weak_ptr<WorkerManager> WorkerManagerWPtr;
/** \brief Forward declaration of the worker queue callback
*/
class WorkerQueueCallback;
/** \brief Forward declaration of the worker queue callback function
* type
*/
typedef boost::function<void()> WorkerQueueCallbackCallback;
/** \brief Forward declaration of the worker event
*/
class WorkerEvent;
/** \brief Forward declaration of the worker callback function type
*/
typedef boost::function<bool(const WorkerEvent&)> WorkerCallback;
};
#endif
|
/*
Copyright 2013-2021 Paul Colby
This file is part of QtAws.
QtAws is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
QtAws is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with the QtAws. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef QTAWS_LISTTAGSFORRESOURCERESPONSE_H
#define QTAWS_LISTTAGSFORRESOURCERESPONSE_H
#include "servicediscoveryresponse.h"
#include "listtagsforresourcerequest.h"
namespace QtAws {
namespace ServiceDiscovery {
class ListTagsForResourceResponsePrivate;
class QTAWSSERVICEDISCOVERY_EXPORT ListTagsForResourceResponse : public ServiceDiscoveryResponse {
Q_OBJECT
public:
ListTagsForResourceResponse(const ListTagsForResourceRequest &request, QNetworkReply * const reply, QObject * const parent = 0);
virtual const ListTagsForResourceRequest * request() const Q_DECL_OVERRIDE;
protected slots:
virtual void parseSuccess(QIODevice &response) Q_DECL_OVERRIDE;
private:
Q_DECLARE_PRIVATE(ListTagsForResourceResponse)
Q_DISABLE_COPY(ListTagsForResourceResponse)
};
} // namespace ServiceDiscovery
} // namespace QtAws
#endif
|
// Created file "Lib\src\Uuid\fwpapi"
typedef struct _GUID
{
unsigned long Data1;
unsigned short Data2;
unsigned short Data3;
unsigned char Data4[8];
} GUID;
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
extern const GUID name = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }
DEFINE_GUID(FWPM_LAYER_ALE_AUTH_CONNECT_V4_DISCARD, 0xd632a801, 0xf5ba, 0x4ad6, 0x96, 0xe3, 0x60, 0x70, 0x17, 0xd9, 0x83, 0x6a);
|
/*
* vim:expandtab:shiftwidth=8:tabstop=8:
*/
/**
*
* \file fsal_truncate.c
* \author $Author: leibovic $
* \date $Date: 2005/07/29 09:39:05 $
* \version $Revision: 1.4 $
* \brief Truncate function.
*
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "fsal.h"
#include "fsal_internal.h"
#include "fsal_convert.h"
/**
* FSAL_truncate:
* Modify the data length of a regular file.
*
* \param filehandle (input):
* Handle of the file is to be truncated.
* \param cred (input):
* Authentication context for the operation (user,...).
* \param length (input):
* The new data length for the file.
* \param object_attributes (optionnal input/output):
* The post operation attributes of the file.
* As input, it defines the attributes that the caller
* wants to retrieve (by positioning flags into this structure)
* and the output is built considering this input
* (it fills the structure according to the flags it contains).
* May be NULL.
*
* \return Major error codes :
* - ERR_FSAL_NO_ERROR (no error)
* - ERR_FSAL_STALE (filehandle does not address an existing object)
* - ERR_FSAL_INVAL (filehandle does not address a regular file)
* - ERR_FSAL_FAULT (a NULL pointer was passed as mandatory argument)
* - Other error codes can be returned :
* ERR_FSAL_ACCESS, ERR_FSAL_IO, ...
*/
fsal_status_t SNMPFSAL_truncate(snmpfsal_handle_t * filehandle, /* IN */
snmpfsal_op_context_t * p_context, /* IN */
fsal_size_t length, /* IN */
snmpfsal_file_t * file_descriptor, /* Unused in this FSAL */
fsal_attrib_list_t * object_attributes /* [ IN/OUT ] */
)
{
int rc;
/* sanity checks.
* note : object_attributes is optional.
*/
if(!filehandle || !p_context)
Return(ERR_FSAL_FAULT, 0, INDEX_FSAL_truncate);
/* >> check object type if it's stored into the filehandle << */
if(filehandle->data.object_type_reminder != FSAL_NODETYPE_LEAF)
{
Return(ERR_FSAL_INVAL, 0, INDEX_FSAL_truncate);
}
/* we ignore this call */
/* Optionnaly retrieve post op attributes
*/
if(object_attributes)
{
fsal_status_t st;
st = SNMPFSAL_getattrs(filehandle, p_context, object_attributes);
if(FSAL_IS_ERROR(st))
{
FSAL_CLEAR_MASK(object_attributes->asked_attributes);
FSAL_SET_MASK(object_attributes->asked_attributes, FSAL_ATTR_RDATTR_ERR);
}
}
/* No error occured */
Return(ERR_FSAL_NO_ERROR, 0, INDEX_FSAL_truncate);
}
|
// -*-c++-*-
/***************************************************************************
pcombuilder.h
Interface for building a player command message
-------------------
begin : 16-FEB-2002
copyright : (C) 2002 by The RoboCup Soccer Server
Maintenance Group.
email : sserver-admin@lists.sourceforge.net
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU LGPL as published by the Free Software *
* Foundation; either version 3 of the License, or (at your option) any *
* later version. *
* *
***************************************************************************/
#ifndef RCSSSERVER_PCOMBUILDER_H
#define RCSSSERVER_PCOMBUILDER_H
#include <string>
#include <iosfwd>
#include <exception>
// The pcom::Builder is called from within the parser to construct the
// player command message. It is not the job of the builder to make sure the
// grammar meets to player command grammar rules, that's the job of the parser,
// however the Builder should do some error detection to make sure
// that if for some reason the methods are called out of context, the
// builder doesn't cause the whole program to crash.
// By using a builder, complexity is removed from the parser itself,
// making it easier to focus on the grammar without distraction. This
// also allows the behaviour of the parser to be easily modified or
// extended by simple modifying or extending the builder.
namespace rcss {
namespace pcom {
enum VIEW_WIDTH {
NARROW,
NORMAL,
WIDE
};
enum VIEW_QUALITY {
LOW,
HIGH
};
enum TEAM {
LEFT_SIDE,
RIGHT_SIDE,
OUR,
OPP,
UNKNOWN_TEAM
};
enum EAR_MODE {
PARTIAL,
COMPLETE,
UNKNOWN_EAR_MODE
};
class Builder {
public:
Builder()
{ }
virtual
~Builder()
{ }
virtual void dash( double power ) = 0;
virtual void dash( double power, double dir ) = 0;
virtual void turn( double moment ) = 0;
virtual void turn_neck( double moment ) = 0;
virtual void kick( double power, double dir ) = 0;
virtual void long_kick( double power, double dir ) = 0;
virtual void goalieCatch( double dir ) = 0;
virtual void say( std::string message ) = 0;
virtual void sense_body() = 0;
virtual void score() = 0;
virtual void move( double x, double y ) = 0;
virtual void change_view( VIEW_WIDTH viewWidth, VIEW_QUALITY viewQuality ) = 0;
virtual void change_view( VIEW_WIDTH viewWidth ) = 0;
virtual void compression( int level ) = 0;
virtual void bye() = 0;
virtual void done() = 0;
virtual void pointto( bool on, double dist, double head ) = 0;
virtual void attentionto( bool on, TEAM team_side, std::string team_name, int at_unum ) = 0;
virtual void tackle( double power_or_dir ) = 0;
virtual void tackle( double power_or_dir, bool foul ) = 0;
virtual void clang( int min, int max) = 0;
virtual void ear( bool on, TEAM team_side, std::string team_name, EAR_MODE mode ) = 0;
virtual void synch_see() = 0;
};
class BuilderErr
: public std::exception {
protected:
std::string M_msg;
public:
BuilderErr( const char * file,
const int & line,
const char * msg ) throw();
~BuilderErr() throw()
{ }
const char * what() const throw()
{
return M_msg.c_str();
}
};
}
}
#endif
|
#ifndef UTILS_H
#define UTILS_H
#include <vector>
#include <string>
#include "ta-lib-rt/ta_libc.h"
#include "ta-lib-rt/ta_abstract.h"
using namespace std;
inline void check_ret_code(const TA_RetCode& ret)
{
if (ret != TA_SUCCESS)
throw ret;
}
typedef void (*string_callback)(const char* str, void* arg);
typedef void (*func_info_callback)(const TA_FuncInfo* str, void* arg);
void list_groups(string_callback func, void* arg);
void list_functions(const vector<string>& groups, string_callback func);
void print_functions(const vector<string>& groups, func_info_callback func);
#endif // UTILS_H
|
//
// C++ Interface: NindLexiconFile
//
// Description: La gestion du lexique en fichier
// Étude et maquette d'un lexique complet ANT2012.JYS.R357 revA
//
// Cette classe donne la correspondance entre un mot et son identifiant
// utilise dans le moteur
//
// Author: jys <jy.sage@orange.fr>, (C) LATECON 2014
//
// Copyright: 2014-2015 LATECON. See LICENCE.md file that comes with this distribution
// This file is part of NIND (as "nouvelle indexation").
// NIND is free software: you can redistribute it and/or modify it under the terms of the
// GNU Less General Public License (LGPL) as published by the Free Software Foundation,
// (see <http://www.gnu.org/licenses/>), either version 3 of the License, or any later version.
// NIND 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 Less General Public License for more details.
////////////////////////////////////////////////////////////
#ifndef NindLexiconFile_H
#define NindLexiconFile_H
////////////////////////////////////////////////////////////
#include "NindBasics/NindFile.h"
#include "NindCommonExport.h"
#include "NindExceptions.h"
#include <stdio.h>
#include <string>
////////////////////////////////////////////////////////////
namespace latecon {
namespace nindex {
////////////////////////////////////////////////////////////
class DLLExportLexicon NindLexiconFile {
public:
/**\brief Creates LexiconFile with a specified name associated with.
*\param fileName absolute path file name
*\param fromLexiconWriter true if from lexicon writer, false if from lexicon reader */
NindLexiconFile(const std::string &fileName,
const bool fromLexiconWriter)
throw(NindLexiconException);
virtual ~NindLexiconFile();
/**\brief Read next record of lexicon file as word definition.
* if next record is word definition, file pointer is advanced to the next record,
* else, file pointer is left unchanged
*\param ident where ident will be returned
*\param isSimpleWord where true will be returned if it is a simple word, false otherwise
*\param simpleWord where simple word will be returned, if it is a simple word
*\param compoundWord where compound word will be returned, if it is a compound word
*\return true if next record is word definition, false otherwise */
bool readNextRecordAsWordDefinition(unsigned int &ident,
bool &isSimpleWord,
std::string &simpleWord,
std::pair<unsigned int, unsigned int> &compoundWord)
throw(EofException, ReadFileException, InvalidFileException);
/**\brief Read next record of lexicon file as lexicon identification.
* file pointer is left unchanged
*\param maxIdent where max ident will be returned
*\param identification where unique identification will be returned
*\return true if next record is lexicon identification, false otherwise */
bool readNextRecordAsLexiconIdentification(unsigned int &maxIdent,
unsigned int &identification)
throw(EofException, ReadFileException, InvalidFileException, OutReadBufferException);
/**\brief Write simple word definition on lexicon file.
*\param ident word ident
*\param simpleWord simple word
*\param maxIdent max ident
*\param identification unique identification */
void writeSimpleWordDefinition(const unsigned int ident,
const std::string &simpleWord,
const unsigned int maxIdent,
const unsigned int identification)
throw(WriteFileException, BadUseException, OutWriteBufferException);
/**\brief Write compound word definition on lexicon file.
*\param ident word ident
*\param compoundWord compound word
*\param maxIdent max ident
*\param identification unique identification */
void writeCompoundWordDefinition(const unsigned int ident,
const std::pair<unsigned int, unsigned int> compoundWord,
const unsigned int maxIdent,
const unsigned int identification)
throw(WriteFileException, BadUseException, OutWriteBufferException);
/**\brief Perform a clear buffer for reading the true file and not its buffer */
inline void clearBuffer();
private:
bool m_fromLexiconWriter; //true si autorise a ecrire, false sinon
std::string m_fileName;
NindFile m_file;
};
////////////////////////////////////////////////////////////
//brief Perform a clear buffer for reading the true file and not its buffer */
inline void NindLexiconFile::clearBuffer()
{
m_file.flush();
}
////////////////////////////////////////////////////////////
} // end namespace
} // end namespace
#endif
////////////////////////////////////////////////////////////
|
/*
Copyright 2013-2021 Paul Colby
This file is part of QtAws.
QtAws is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
QtAws is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with the QtAws. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef QTAWS_LISTREPLAYSREQUEST_P_H
#define QTAWS_LISTREPLAYSREQUEST_P_H
#include "cloudwatcheventsrequest_p.h"
#include "listreplaysrequest.h"
namespace QtAws {
namespace CloudWatchEvents {
class ListReplaysRequest;
class ListReplaysRequestPrivate : public CloudWatchEventsRequestPrivate {
public:
ListReplaysRequestPrivate(const CloudWatchEventsRequest::Action action,
ListReplaysRequest * const q);
ListReplaysRequestPrivate(const ListReplaysRequestPrivate &other,
ListReplaysRequest * const q);
private:
Q_DECLARE_PUBLIC(ListReplaysRequest)
};
} // namespace CloudWatchEvents
} // namespace QtAws
#endif
|
// Created file "Lib\src\Uuid\X64\guids"
typedef struct _GUID
{
unsigned long Data1;
unsigned short Data2;
unsigned short Data3;
unsigned char Data4[8];
} GUID;
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
extern const GUID name = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }
DEFINE_GUID(ENHANCED_STORAGE_PROPERTY_IS_AUTHENTICATION_SILO, 0x91248166, 0xb832, 0x4ad4, 0xba, 0xa4, 0x7c, 0xa0, 0xb6, 0xb2, 0x79, 0x8c);
|
#include <math.h>
typedef struct AHRS{
float _omega_I[3];
float _omega_P[3];
float _omega_yaw_P[3];
float _omega[3];
float _omega_bias[3];
float _omega_I_sum_time;
float _quaternion[4];
float _euler[3];
float cbn11, cbn12, cbn13;
float cbn21, cbn22, cbn23;
float cbn31, cbn32, cbn33;
} AHRS_t, *AHRS_p;
void AHRS_reset(AHRS_p ahrs);
void AHRS_recalc_gyro_offsets(AHRS_p ahrs, float gyro[3]);
void AHRS_update(AHRS_p ahrs, float acc[3], float gyro[3], float vel[3]);
static void AHRS_rpy2abcd(AHRS_p ahrs) {
float u0, u1, u2, cr, cp, cy, sr, sp, sy;
u0 = ahrs->_euler[0]*0.5;
u1 = ahrs->_euler[1]*0.5;
u2 = ahrs->_euler[2]*0.5;
cr = cos(u0);
sr = sin(u0);
cp = cos(u1);
sp = sin(u1);
cy = cos(u2);
sy = sin(u2);
ahrs->_quaternion[0] = cr * cp * cy + sr * sp*sy;
ahrs->_quaternion[1] = sr * cp * cy - cr * sp*sy;
ahrs->_quaternion[2] = cr * sp * cy + sr * cp*sy;
ahrs->_quaternion[3] = cr * cp * sy - sr * sp*cy;
}
void AHRS_reset(AHRS_p ahrs) {
int i;
for (i=0;i<3;++i) {
ahrs->_omega_I[i] = 0;
ahrs->_omega_P[i] = 0;
ahrs->_omega_yaw_P[i] = 0;
ahrs->_omega[i] = 0;
ahrs->_omega_bias[i] = 0;
ahrs->_euler[i] = 0;
}
AHRS_rpy2abcd(ahrs);
}
void AHRS_recalc_gyro_offsets(AHRS_p ahrs, float gyro[3]) {
int i;
for (i=0;i<3;++i) {
ahrs->_omega_I[i] = 0;
ahrs->_omega_I_sum[i] = 0;
ahrs->_omega_bias[i] = 0.1*ahrs->_omega_bias[i]+0.9*gyro[i];
}
ahrs->_omega_I_sum_time = 0;
}
static void AHRS_drift_correction(AHRS_p ahrs, float dt,
float acc[3], float velocity[3]) {
}
static void AHRS_normalize(AHRS_p ahrs) {
float a, b, c, d, n;
a = ahrs->_quaternion[0];
b = ahrs->_quaternion[1];
c = ahrs->_quaternion[2];
d = ahrs->_quaternion[3];
n = 1.0 / sqrt(a * a + b * b + c * c + d * d);
ahrs->_quaternion[0] = a*n;
ahrs->_quaternion[1] = b*n;
ahrs->_quaternion[2] = c*n;
ahrs->_quaternion[3] = d*n;
}
static void AHRS_euler_angles(AHRS_p ahrs) {
float a, b, c, d, a2c2, b2d2, t1, t2;
a = ahrs->_quaternion[0];
b = ahrs->_quaternion[1];
c = ahrs->_quaternion[2];
d = ahrs->_quaternion[3];
a2c2 = a * a - c*c;
b2d2 = b * b - d*d;
ahrs->_euler[0] = atan2(2.0 * (a * b + c * d), a2c2 - b2d2);
t1 = 2.0L * (a * c - b * d);
t2 = sqrt(1.0L - t1 * t1);
ahrs->_euler[1] = atan(t1 / t2);
ahrs->_euler[2] = atan2(2.0 * (a * d + b * c), a2c2 + b2d2);
}
void AHRS_quat_update(AHRS_p ahrs, float dt, float gyro[3]) {
int i;
float p0, q0, r0, a, b, c, d;
for (i=0;i<3;++i) {
ahrs->_omega[i] = (gyro[i]-ahrs->_omega_bias[i]) +ahrs->_omega_I[i];
}
p0 = ahrs->_omega[0]+ahrs->_omega_P[0]+ahrs->_omega_yaw_P[0];
q0 = ahrs->_omega[1]+ahrs->_omega_P[1]+ahrs->_omega_yaw_P[1];
r0 = ahrs->_omega[2]+ahrs->_omega_P[2]+ahrs->_omega_yaw_P[2];
a = ahrs->_quaternion[0];
b = ahrs->_quaternion[1];
c = ahrs->_quaternion[2];
d = ahrs->_quaternion[3];
ahrs->_quaternion[0] = a + dt * 0.5 * (-b * p0 - c * q0 - d * r0);
ahrs->_quaternion[1] = b + dt * 0.5 * (a * p0 - d * q0 + c * r0);
ahrs->_quaternion[2] = c + dt * 0.5 * (d * p0 + a * q0 - b * r0);
ahrs->_quaternion[3] = d + dt * 0.5 * (-c * p0 + b * q0 + a * r0);
}
void AHRS_abcd2cbn(AHRS_p ahrs) {
float a, b, c, d, ab, ac, ad, bb, bc, bd, cc, cd, dd;
a = ahrs->_quaternion[0];
b = ahrs->_quaternion[1];
c = ahrs->_quaternion[2];
d = ahrs->_quaternion[3];
ab = a*b;
ac = a*c;
ad = a*d;
bb = b*b;
bc = b*c;
bd = b*d;
cc = c*c;
cd = c*d;
dd = d*d;
ahrs->cbn11 = 1.0 - 2.0 * (cc + dd);
ahrs->cbn12 = 2.0 * (bc - ad);
ahrs->cbn13 = 2.0 * (bd + ac);
ahrs->cbn21 = 2.0 * (bc + ad);
ahrs->cbn22 = 1.0 - 2.0 * (bb + dd);
ahrs->cbn23 = 2.0 * (cd - ab);
ahrs->cbn31 = 2.0 * (bd - ac);
ahrs->cbn32 = 2.0 * (cd + ab);
ahrs->cbn33 = 1.0 - 2.0 * (bb + cc);
}
void AHRS_update(AHRS_p ahrs, float dt, float acc[3], float gyro[3], float vel[3]) {
// Integrate the DCM matrix using gyro inputs
AHRS_quat_update(ahrs, dt, gyro);
// Normalize the DCM matrix
AHRS_normalize(ahrs);
AHRS_abcd2cbn(ahrs);
// Perform drift correction
AHRS_drift_correction(ahrs, dt, acc, vel);
// Calculate pitch, roll, yaw for stabilization and navigation
AHRS_euler_angles(ahrs);
}
|
//HappyEngine Copyright (C) 2011 - 2014 Evil Interactive
//
//This file is part of HappyEngine.
//
// HappyEngine is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// HappyEngine is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with HappyEngine. If not, see <http://www.gnu.org/licenses/>.
//
//Author: Bastian Damman
//Created: 13/11/2012
#ifndef _HE_MaterialGeneratorNodeTypes_H_
#define _HE_MaterialGeneratorNodeTypes_H_
#pragma once
namespace hs {
enum MaterialGeneratorVariableType
{
MaterialGeneratorVariableType_Float,
MaterialGeneratorVariableType_Float2,
MaterialGeneratorVariableType_Float3,
MaterialGeneratorVariableType_Float4,
MaterialGeneratorVariableType_Texture2D,
MaterialGeneratorVariableType_TextureCube,
MaterialGeneratorVariableType_Unknown,
};
const char* materialGeneratorVariableTypeToString(const MaterialGeneratorVariableType type);
enum MaterialGeneratorNodeTypeSubdivion
{
MaterialGeneratorNodeTypeSubdivion_ConstNodes,
MaterialGeneratorNodeTypeSubdivion_MathNodes,
MaterialGeneratorNodeTypeSubdivion_VectorNodes,
MaterialGeneratorNodeTypeSubdivion_TextureNodes,
MaterialGeneratorNodeTypeSubdivion_None,
MaterialGeneratorNodeTypeSubdivion_MAX = MaterialGeneratorNodeTypeSubdivion_None
};
} //end namespace
#endif
|
#include "SDL2/SDL.h"
#include "SDL2_image/SDL_image.h"
#include "graphics.h"
#include <stdio.h>
void graphics_init(graphics_t *graphics, int width, int height, int bpp, void *args)
{
SDL_Window *window;
SDL_Init( SDL_INIT_EVERYTHING);
window = SDL_CreateWindow( "SDL Tutorial", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, width, height, SDL_WINDOW_SHOWN );
if( window == NULL )
{
printf( "Window could not be created! SDL_Error: %s\n", SDL_GetError() );
}
graphics->window = (void*) window;
graphics->screen._sprite = (void*) SDL_GetWindowSurface(window);
}
int blit(spriteBuffer_t *source, spriteBuffer_t *dest, rect_t *rsrc, rect_t *rdst)
{
SDL_Rect srcrect;
SDL_Rect dstrect;
SDL_Rect *final_src = NULL;
SDL_Rect *final_dst = NULL;
if(rsrc != NULL)
{
srcrect.x = rsrc->x;
srcrect.y = rsrc->y;
srcrect.w = rsrc->w;
srcrect.h = rsrc->h;
final_src = &srcrect;
}
if(rdst != NULL)
{
dstrect.x = rdst->x;
dstrect.y = rdst->y;
dstrect.w = rdst->w;
dstrect.h = rdst->h;
final_dst = &dstrect;
}
SDL_BlitSurface((SDL_Surface*) source->_sprite, final_src, (SDL_Surface*) dest->_sprite, final_dst);
return 0;
}
void graphics_free(void)
{
SDL_Quit();
}
void screen_fill(spriteBuffer_t *buffer, color_t *color)
{
SDL_Surface *screenSurface = (SDL_Surface*) buffer->_sprite;
SDL_FillRect( screenSurface, NULL, SDL_MapRGB( screenSurface->format, color->r, color->g, color->b ) );
}
void screen_update(graphics_t *graphics)
{
SDL_UpdateWindowSurface((SDL_Window*) graphics->window);
}
spriteBuffer_t *create_sprite(void)
{
return (spriteBuffer_t*) malloc(sizeof(spriteBuffer_t));
}
void load_bmp(spriteBuffer_t *sprite, char* filename)
{
sprite->_sprite = (void*) IMG_Load(filename);
}
int delete_sprite(spriteBuffer_t *sprite);
|
/*****************************************************************************
The Dark Mod GPL Source Code
This file is part of the The Dark Mod Source Code, originally based
on the Doom 3 GPL Source Code as published in 2011.
The Dark Mod Source Code 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. For details, see LICENSE.TXT.
Project: The Dark Mod (http://www.thedarkmod.com/)
$Revision$ (Revision of last commit)
$Date$ (Date of last commit)
$Author$ (Author of last commit)
******************************************************************************/
#if !defined(AFX_SURFACEDLG_H__D84E0C22_9EEA_11D1_B570_00AA00A410FC__INCLUDED_)
#define AFX_SURFACEDLG_H__D84E0C22_9EEA_11D1_B570_00AA00A410FC__INCLUDED_
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
// SurfaceDlg.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// CSurfaceDlg dialog
class CSurfaceDlg : public CDialog {
bool m_bPatchMode;
CWnd *focusControl;
// Construction
public:
CSurfaceDlg( CWnd *pParent = NULL ); // standard constructor
void SetTexMods();
// Dialog Data
//{{AFX_DATA(CSurfaceDlg)
enum { IDD = IDD_SURFACE };
CEdit m_wndRotateEdit;
CEdit m_wndVert;
CEdit m_wndHorz;
CSliderCtrl m_wndVerticalSubdivisions;
CSliderCtrl m_wndHorzSubdivisions;
CSpinButtonCtrl m_wndWidth;
CSpinButtonCtrl m_wndHeight;
CSpinButtonCtrl m_wndVShift;
CSpinButtonCtrl m_wndVScale;
CSpinButtonCtrl m_wndRotate;
CSpinButtonCtrl m_wndHShift;
CSpinButtonCtrl m_wndHScale;
int m_nHorz;
int m_nVert;
float m_horzScale;
float m_horzShift;
float m_rotate;
float m_vertScale;
float m_vertShift;
CString m_strMaterial;
BOOL m_subdivide;
float m_fHeight;
float m_fWidth;
BOOL m_absolute;
//}}AFX_DATA
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CSurfaceDlg)
public:
virtual BOOL PreTranslateMessage( MSG *pMsg );
protected:
virtual void DoDataExchange( CDataExchange *pDX ); // DDX/DDV support
virtual BOOL PreCreateWindow( CREATESTRUCT &cs );
//}}AFX_VIRTUAL
// Implementation
protected:
void UpdateSpinners( int nScrollCode, int nPos, CScrollBar *pBar );
void UpdateSpinners( bool bUp, int nID );
// Generated message map functions
//{{AFX_MSG(CSurfaceDlg)
virtual BOOL OnInitDialog();
afx_msg void OnHScroll( UINT nSBCode, UINT nPos, CScrollBar *pScrollBar );
afx_msg void OnKeyDown( UINT nChar, UINT nRepCnt, UINT nFlags );
afx_msg void OnVScroll( UINT nSBCode, UINT nPos, CScrollBar *pScrollBar );
afx_msg void OnApply();
virtual void OnOK();
afx_msg void OnClose();
virtual void OnCancel();
afx_msg void OnDestroy();
afx_msg void OnBtnCancel();
afx_msg void OnBtnColor();
afx_msg HBRUSH OnCtlColor( CDC *pDC, CWnd *pWnd, UINT nCtlColor );
afx_msg int OnCreate( LPCREATESTRUCT lpCreateStruct );
afx_msg void OnDeltaPosSpin( NMHDR *pNMHDR, LRESULT *pResult );
afx_msg void OnBtnPatchdetails();
afx_msg void OnBtnPatchnatural();
afx_msg void OnBtnPatchreset();
afx_msg void OnBtnAxial();
afx_msg void OnBtnBrushfit();
afx_msg void OnBtnFacefit();
afx_msg void OnCheckSubdivide();
afx_msg void OnChangeEditHorz();
afx_msg void OnChangeEditVert();
afx_msg void OnSetfocusHscale();
afx_msg void OnKillfocusHscale();
afx_msg void OnKillfocusVscale();
afx_msg void OnSetfocusVscale();
afx_msg void OnKillfocusEditWidth();
afx_msg void OnSetfocusEditWidth();
afx_msg void OnKillfocusEditHeight();
afx_msg void OnSetfocusEditHeight();
afx_msg void OnBtnFlipx();
afx_msg void OnBtnFlipy();
afx_msg void OnKillfocusRotate();
afx_msg void OnSetfocusRotate();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_SURFACEDLG_H__D84E0C22_9EEA_11D1_B570_00AA00A410FC__INCLUDED_)
|
// GetFileSystem.h : main header file for the GetFileSystem application
//
#if !defined(AFX_GetFileSystem_H__40AE9467_1071_4D9F_8097_A2254431EB2D__INCLUDED_)
#define AFX_GetFileSystem_H__40AE9467_1071_4D9F_8097_A2254431EB2D__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#ifndef __AFXWIN_H__
#error include 'stdafx.h' before including this file for PCH
#endif
#include "resource.h" // main symbols
/////////////////////////////////////////////////////////////////////////////
// CGetFileSystemApp:
// See GetFileSystem.cpp for the implementation of this class
//
class CGetFileSystemApp : public CWinApp
{
public:
CGetFileSystemApp();
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CGetFileSystemApp)
public:
virtual BOOL InitInstance();
//}}AFX_VIRTUAL
// Implementation
//{{AFX_MSG(CGetFileSystemApp)
// NOTE - the ClassWizard will add and remove member functions here.
// DO NOT EDIT what you see in these blocks of generated code !
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_GetFileSystem_H__40AE9467_1071_4D9F_8097_A2254431EB2D__INCLUDED_)
|
/* libhs - public domain
Niels Martignène <niels.martignene@protonmail.com>
https://koromix.dev/libhs
This software is in the public domain. Where that dedication is not
recognized, you are granted a perpetual, irrevocable license to copy,
distribute, and modify this file as you see fit.
See the LICENSE file for more details. */
#ifndef HS_ARRAY_H
#define HS_ARRAY_H
#include "common.h"
_HS_BEGIN_C
struct _hs_array {
void *values;
size_t allocated;
size_t count;
};
#define _HS_ARRAY(Type) \
struct { \
Type *values; \
size_t allocated; \
size_t count; \
}
#define _hs_array_release(Array) \
_hs_array_release_((struct _hs_array *)&(Array)->values)
#define _hs_array_grow(Array, Need) \
_hs_array_grow_((struct _hs_array *)&(Array)->values, sizeof(*(Array)->values), (Need))
#define _hs_array_push(Array, Value) \
(_hs_array_grow((Array), 1) < 0 \
? HS_ERROR_MEMORY \
: (((Array)->values[(Array)->count++] = (Value)), 0))
#define _hs_array_shrink(Array) \
_hs_array_shrink_((struct _hs_array *)&(Array)->values, sizeof(*(Array)->values))
#define _hs_array_pop(Array, Count) \
do { \
(Array)->count -= (Count); \
if ((Array)->count <= (Array)->allocated / 2) \
_hs_array_shrink(Array); \
} while (0)
#define _hs_array_remove(Array, Offset, Count) \
do { \
size_t _HS_UNIQUE_ID(start) = (Offset); \
size_t _HS_UNIQUE_ID(count) = (Count); \
size_t _HS_UNIQUE_ID(end) = _HS_UNIQUE_ID(start) + _HS_UNIQUE_ID(count); \
memmove((Array)->values + _HS_UNIQUE_ID(start), \
(Array)->values + _HS_UNIQUE_ID(end), \
((Array)->count - _HS_UNIQUE_ID(end)) * sizeof(*(Array)->values)); \
_hs_array_pop((Array), _HS_UNIQUE_ID(count)); \
} while (0)
#define _hs_array_move(Src, Dest) \
do { \
(Dest)->values = (Src)->values; \
(Dest)->count = (Src)->count; \
(Dest)->allocated = (Src)->allocated; \
memset((Src), 0, sizeof(*(Src))); \
} while (0)
void _hs_array_release_(struct _hs_array *array);
int _hs_array_expand_(struct _hs_array *array, size_t value_size, size_t need);
static inline int _hs_array_grow_(struct _hs_array *array, size_t value_size, size_t need)
{
if (need > array->allocated - array->count) {
return _hs_array_expand_(array, value_size, need);
} else {
return 0;
}
}
void _hs_array_shrink_(struct _hs_array *array, size_t value_size);
_HS_END_C
#endif
|
//
// KeyboardAvoider.h
// Baccarat
//
// Created by Chicago Team on 1/18/15.
// Copyright (c) 2015 AutoBetic. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface KeyboardAvoider : UIViewController <UITextFieldDelegate>
@end
|
/*****************************************************************************
* Product: "Blinky" on MSP-EXP430G2, preemptive QK kernel
* Last Updated for Version: 5.4.0
* Date of the Last Update: 2015-04-04
*
* Q u a n t u m L e a P s
* ---------------------------
* innovating embedded systems
*
* Copyright (C) Quantum Leaps, LLC. state-machine.com.
*
* This program is open source 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.
*
* Alternatively, this program may be distributed and modified under the
* terms of Quantum Leaps commercial licenses, which expressly supersede
* the GNU General Public License and are specifically designed for
* licensees interested in retaining the proprietary status of their code.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* Contact information:
* Web: www.state-machine.com
* Email: info@state-machine.com
*****************************************************************************/
#include "qpc.h"
#include "blinky.h"
#include "bsp.h"
#include <msp430g2553.h> /* MSP430 variant used */
/* add other drivers if necessary... */
Q_DEFINE_THIS_FILE
#ifdef Q_SPY
#error Simple Blinky Application does not provide Spy build configuration
#endif
/* Local-scope objects -----------------------------------------------------*/
/* 1MHz clock setting, see BSP_init() */
#define BSP_MCK 1000000U
#define BSP_SMCLK 1000000U
#define LED1 (1U << 0)
#define LED2 (1U << 6)
static uint32_t const l_led_pin[] = {
LED1,
LED2
};
/* ISRs used in this project ===============================================*/
#if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
__interrupt void TIMER0_A0_ISR(void); /* prototype */
#pragma vector=TIMER0_A0_VECTOR
__interrupt void TIMER0_A0_ISR(void)
#elif defined(__GNUC__)
void __attribute__ ((interrupt(TIMER0_A0_VECTOR))) TIMER0_A0_ISR (void)
#else
#error Compiler not supported!
#endif
{
QK_ISR_ENTRY(); /* inform QK about entering the ISR */
TACTL &= ~TAIFG; /* clear the interrupt pending flag */
QF_TICK_X(0U, (void *)0); /* process all time events at rate 0 */
QK_ISR_EXIT(); /* inform QK about exiting the ISR */
}
/* BSP functions ===========================================================*/
void BSP_init(void) {
WDTCTL = WDTPW | WDTHOLD; /* stop watchdog timer */
/* configure the Basic Clock Module */
DCOCTL = 0; // Select lowest DCOx and MODx settings
BCSCTL1 = CALBC1_1MHZ; // Set DCO
DCOCTL = CALDCO_1MHZ;
P1DIR |= (LED1 | LED2); /* set LED1 and LED2 pins to output */
}
/*..........................................................................*/
void BSP_ledOff(uint_fast8_t n) {
P1OUT &= ~l_led_pin[n]; /* turn LED[n] off */
}
/*..........................................................................*/
void BSP_ledOn(uint_fast8_t n) {
P1OUT |= l_led_pin[n]; /* turn LED[n] on */
}
/* QF callbacks ============================================================*/
void QF_onStartup(void) {
TACTL = (ID_3 | TASSEL_2 | MC_1); /* SMCLK, /8 divider, upmode */
TACCR0 = (((BSP_SMCLK / 8U) + BSP_TICKS_PER_SEC/2U) / BSP_TICKS_PER_SEC);
CCTL0 = CCIE; /* CCR0 interrupt enabled */
}
/*..........................................................................*/
void QF_onCleanup(void) {
}
/*..........................................................................*/
void QK_onIdle(void) {
/* toggle LED2 on and then off, see NOTE1 */
QF_INT_DISABLE();
P1OUT |= LED2; /* turn LED2 on */
P1OUT &= ~LED2; /* turn LED2 off */
QF_INT_ENABLE();
#ifdef NDEBUG
/* Put the CPU and peripherals to the low-power mode.
* you might need to customize the clock management for your application,
* see the datasheet for your particular MSP430 MCU.
*/
__low_power_mode_1(); /* Enter LPM1; also ENABLES interrupts */
#endif
}
/*..........................................................................*/
void Q_onAssert(char const Q_ROM * const file, int line) {
/* implement the error-handling policy for your application!!! */
QF_INT_DISABLE(); /* disable all interrupts */
/* cause the reset of the CPU... */
WDTCTL = WDTPW | WDTHOLD;
__asm(" push &0xFFFE");
/* return from function does the reset */
}
/*****************************************************************************
* NOTE1:
* One of the LEDs is used to visualize the idle loop activity. The brightness
* of the LED is proportional to the frequency of invcations of the idle loop.
* Please note that the LED is toggled with interrupts locked, so no interrupt
* execution time contributes to the brightness of the User LED.
*/
|
#pragma once
#ifndef _UTIL_OGRE_
#define _UTIL_OGRE_
namespace util
{
/// <summary> Creates a new material based on the information given, this can then be used by entities. </summary>
/// <param name="materialName"> The name the material should be referenced by. </param>
/// <param name="textureName"> The name of the texture file to apply to the material. </param>
void createMaterial (const Ogre::String& materialName, const Ogre::String& textureName);
}
#endif // _UTIL_OGRE_
|
/*
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or distribute
this software, either in source code form or as a compiled binary, for any
purpose, commercial or non-commercial, and by any means.
In jurisdictions that recognize copyright laws, the author or authors of this
software dedicate any and all copyright interest in the software to the public
domain. We make this dedication for the benefit of the public at large and to
the detriment of our heirs and successors. We intend this dedication to be an
overt act of relinquishment in perpetuity of all present and future rights to
this software under copyright law.
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 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 <zapata/streams.h>
#include <zapata/json.h>
#include <zapata/lockfree.h>
namespace zpt {
auto
TRANSPORT_LAYER() -> ssize_t&;
class exchange {
private:
class exchange_t {
public:
exchange_t(zpt::stream* _stream);
exchange_t(zpt::exchange::exchange_t const& _rhs) = delete;
exchange_t(zpt::exchange::exchange_t&& _rhs) = delete;
virtual ~exchange_t() = default;
auto operator=(zpt::exchange::exchange_t const& _rhs)
-> zpt::exchange::exchange_t& = delete;
auto operator=(zpt::exchange::exchange_t&& _rhs) -> zpt::exchange::exchange_t& = delete;
auto stream() -> zpt::stream&;
auto uri() -> std::string&;
auto version() -> std::string&;
auto scheme() -> std::string&;
auto received() -> zpt::json&;
auto to_send() -> zpt::json&;
auto keep_alive() -> bool&;
private:
zpt::stream* __stream{ nullptr };
std::string __uri;
std::string __version;
std::string __scheme;
zpt::json __received{ zpt::undefined };
zpt::json __send{ zpt::undefined };
bool __keep_alive{ false };
};
public:
exchange() = default;
exchange(zpt::stream* _stream);
exchange(zpt::exchange const& _rhs);
exchange(zpt::exchange&& _rhs);
virtual ~exchange() = default;
auto operator=(zpt::exchange const& _rhs) -> zpt::exchange&;
auto operator=(zpt::exchange&& _rhs) -> zpt::exchange&;
auto operator->() const -> zpt::exchange::exchange_t*;
auto operator*() const -> zpt::exchange::exchange_t&;
friend auto operator<<(std::ostream& _out, zpt::exchange& _in) -> std::ostream& {
_out << _in->scheme() << ":" << _in->uri() << std::endl
<< zpt::pretty(_in->received()) << std::flush;
return _out;
}
private:
std::shared_ptr<zpt::exchange::exchange_t> __underlying;
};
class transport {
public:
class transport_t {
public:
transport_t() = default;
transport_t(transport_t const&) = delete;
transport_t(transport_t&&) = delete;
virtual ~transport_t() = default;
auto operator=(transport_t const&) -> transport_t& = delete;
auto operator=(transport_t&&) -> transport_t& = delete;
virtual auto receive(zpt::exchange& _channel) const -> void = 0;
virtual auto send(zpt::exchange& _channel) const -> void = 0;
virtual auto resolve(zpt::json _uri) const -> zpt::exchange = 0;
};
transport(zpt::transport const& _rhs);
transport(zpt::transport&& _rhs);
virtual ~transport() = default;
auto operator=(zpt::transport const& _rhs) -> zpt::transport&;
auto operator=(zpt::transport&& _rhs) -> zpt::transport&;
auto operator->() const -> zpt::transport::transport_t*;
auto operator*() const -> zpt::transport::transport_t&;
template<typename T, typename... Args>
static auto alloc(Args... _args) -> zpt::transport;
class layer {
public:
layer();
virtual ~layer() = default;
auto add(std::string const& _scheme, zpt::transport _transport) -> zpt::transport::layer&;
auto get(std::string const& _scheme) const -> const zpt::transport&;
auto translate(std::istream& _io, std::string _mime = "*/*") const -> zpt::json;
auto begin() const -> std::map<std::string, zpt::transport>::const_iterator;
auto end() const -> std::map<std::string, zpt::transport>::const_iterator;
auto resolve(std::string _uri) const -> zpt::exchange;
private:
std::map<std::string, zpt::transport> __underlying;
std::map<std::string, std::function<zpt::json(std::istream&)>> __content_providers;
auto add_content_provider(std::string const& _scheme,
std::function<zpt::json(std::istream&)> _callback)
-> zpt::transport::layer&;
static auto translate_from_default(std::istream& _io) -> zpt::json;
static auto translate_from_json(std::istream& _io) -> zpt::json;
static auto translate_from_raw(std::istream& _io) -> zpt::json;
};
private:
std::shared_ptr<zpt::transport::transport_t> __underlying;
transport(std::unique_ptr<zpt::transport::transport_t> _underlying);
};
} // namespace zpt
template<typename T, typename... Args>
auto
zpt::transport::alloc(Args... _args) -> zpt::transport {
return zpt::transport{ std::make_unique<T>(_args...) };
}
|
#ifndef SETOFINTS1_H_
#define SETOFINTS1_H_
class SetOfInts1 {
// Conjuntos de enteros representados como vectores no ordenados y con repeticiones
private:
static const int MAXSIZE = 5;
int elems[MAXSIZE];
int size;
bool isFull() const;
void linSearch(int x, int left, int right, bool& found, int& pos) const;
public:
SetOfInts1();
bool isEmpty() const;
void add(int x) throw (Error);
bool contains(int x) const;
void remove(int x);
friend istream& operator>>(istream& sIn,SetOfInts1& set);
friend ostream& operator<<(ostream& sOut,SetOfInts1& set);
};
#endif /* SETOFINTS1_H_ */
|
/*
* cdfa_minimisation_intern.h
*
* Created on: 22 oct. 2017
* Author: juven
*/
#ifndef CDFA_MINIMISATION_INTERN_H_
#define CDFA_MINIMISATION_INTERN_H_
#include "../cdfa_edition_interface.h"
unsigned int **cdfa__new_matrix(const unsigned int height, const unsigned int width);
void cdfa__free_matrix(unsigned int **m);
cdfa__automaton_state ***cdfa__new_state_triple_matrix(const unsigned int height,
const unsigned int width,
const unsigned int depth);
void cdfa__free_state_triple_matrix(cdfa__automaton_state ***m);
void cdfa__free_matrix(unsigned int **m);
cdfa__automaton *cdfa__accessible_states_automaton(const cdfa__automaton * const a);
cdfa__automaton *cdfa__coaccessible_states_automaton(const cdfa__automaton * const a);
cdfa__automaton *cdfa__states_fusion_automaton(const cdfa__automaton * const a);
cdfa__automaton * cdfa__letter_fusion_automaton(const cdfa__automaton * const a);
#endif /* CDFA_MINIMISATION_INTERN_H_ */
|
#ifndef __CHARACTER_H__
#define __CHARACTER_H__
#include <vector>
#include <string>
#include <map>
#include "system.h"
#include "inventory.h"
#include "money.h"
std::string nameList();
typedef enum {
OUTGOINGS,
INCOME,
CHECK
} UseType;
class Character : public Inventory, public Money {
public:
std::string name;
int wallet(UseType type);
void wallet(UseType type, int aMoney);
void setID(int id);
int retID();
protected:
private:
int thisId;
};
#endif
|
//
// Executive.h
// TestProject
//
// Created by Денис Аверин on 2013-10-24
// Copyright (c) 2013 Denis Averin. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "EmployeeBase.h"
@interface Executive : EmployeeBase <NSCoding>
@property (nonatomic, strong) NSString *officeHours;
@property (nonatomic, readonly) NSString *detail;
- (instancetype) initWithFullname:(NSString *)aFullname
salary:(NSString *)aSalary
officeHours:(NSString*)anOfficeHours;
@end
|
/*
MIT License
Copyright (c) 2017-2021 Mark E Sowden <hogsy@oldtimes-software.com>
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 "package_private.h"
/* 4X Technologies Package Format
* These come in both an IBF and LST format;
* the LST file lists all of the contents
* of the IBF.
*
* There doesn't appear to be any form of
* compression used on these packages. */
PLPackage *PlLoadLstPackage( const char *path ) {
PLFile *fh = PlOpenFile( path, false );
if ( fh == NULL ) {
return NULL;
}
PLPackage *package = NULL;
/* any files we're going to load will be from the IBF, not the LST */
char ibf_path[ PL_SYSTEM_MAX_PATH + 1 ];
strncpy( ibf_path, path, strlen( path ) - 3 );
strncat( ibf_path, "ibf", PL_SYSTEM_MAX_PATH );
if ( !PlFileExists( ibf_path ) ) {
PlReportErrorF( PL_RESULT_FILEPATH, "failed to open ibf package at \"%s\", aborting", ibf_path );
goto ABORT;
}
//DebugPrint("LST %s\n", path);
//DebugPrint("IBF %s\n", ibf_path);
/* grab the IBF size so we can do some sanity checking later */
size_t ibf_size = PlGetLocalFileSize( ibf_path );
if ( ibf_size == 0 ) {
PlReportErrorF( PL_RESULT_FILESIZE, "invalid ibf \"%s\" size of 0, aborting", ibf_path );
goto ABORT;
}
/* read in the ident */
char ident[ 8 ];
if ( PlReadFile( fh, ident, sizeof( char ), 8 ) != 8 ) {
PlReportErrorF( PL_RESULT_FILETYPE, "failed to read identification, aborting" );
goto ABORT;
}
if ( strncmp( ident, "_TSL1.0V", 8 ) != 0 ) {
PlReportErrorF( PL_RESULT_FILETYPE, "invalid file ident, \"%s\", aborting", ident );
goto ABORT;
}
/* sanity checking */
uint32_t num_indices;
if ( PlReadFile( fh, &num_indices, sizeof( unsigned int ), 1 ) != 1 ) {
PlReportErrorF( PL_RESULT_FILEREAD, "failed to read in indices count from lst, aborting" );
goto ABORT;
}
if ( num_indices > 4096 ) {
PlReportErrorF( PL_RESULT_FILESIZE, "larger than expected package, aborting" );
goto ABORT;
}
//DebugPrint("LST INDICES %u\n", num_indices);
struct {
char name[ 64 ];
uint32_t data_offset;
uint32_t data_length;
} index;
package = PlCreatePackageHandle( path, num_indices, NULL );
for ( unsigned int i = 0; i < num_indices; ++i ) {
if ( PlIsEndOfFile( fh ) != 0 ) {
printf( "Unexpected end of package in %s, ignoring!\n", path );
break;
}
if ( PlReadFile( fh, &index, sizeof( index ), 1 ) != 1 ) {
PlReportErrorF( PL_RESULT_FILEREAD, "failed to read index at %d, aborting", PlGetFileOffset( fh ) );
goto ABORT;
}
//DebugPrint("LST INDEX %s\n", index.name);
if ( index.data_offset >= ibf_size || ( uint64_t ) ( index.data_offset ) + ( uint64_t ) ( index.data_length ) > ibf_size ) {
PlReportErrorF( PL_RESULT_FILESIZE, "offset/length falls beyond IBF size, aborting" );
goto ABORT;
}
strncpy( package->table[ i ].fileName, index.name, sizeof( package->table[ i ].fileName ) );
package->table[ i ].fileName[ sizeof( package->table[ i ].fileName ) - 1 ] = '\0';
package->table[ i ].fileSize = index.data_length;
package->table[ i ].offset = index.data_offset;
}
PlCloseFile( fh );
return package;
ABORT:
if ( package != NULL ) {
PlDestroyPackage( package );
}
PlCloseFile( fh );
return NULL;
}
|
#ifndef _GAINRATIOSPLITCRIT_
#define _GAINRATIOSPLITCRIT_
#include "EntropyBasedSplitCrit.h"
#include <string>
#include <limits>
// Forward class declarations:
class Distribution;
/**
* Class for computing the gain ratio for a given distribution.
*
*/
class GainRatioSplitCrit : public EntropyBasedSplitCrit {
public:
/**
* This method is a straightforward implementation of the gain
* ratio criterion for the given distribution.
*/
double splitCritValue(Distribution &bags) const;
/**
* This method computes the gain ratio in the same way C4.5 does.
*
* @param bags the distribution
* @param totalnoInst the weight of ALL instances
* @param numerator the info gain
*/
double splitCritValue(Distribution &bags, double totalnoInst, double numerator) const;
private:
/**
* Help method for computing the split entropy.
*/
double splitEnt(Distribution &bags, double totalnoInst) const;
};
#endif //#ifndef _GAINRATIOSPLITCRIT_
|
//
// MapViewController.h
// ZTCircleAnnotationView
//
// Created by Zacks Tsang on 13-8-23.
// Copyright (c) 2013年 www.aiysea.com. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "ZTMapView.h"
@interface MapViewController : UIViewController<MKMapViewDelegate>{
ZTMapView *_mapView;
}
@end
|
#pragma once
void InsertionSortTestCases();
void PrintArray(int* pList, int cElements);
void InsertionSort(int* pList, int cElements);
|
#include <stdio.h>
int main()
{
float height;
printf("Qual a altura da pessoa? ");
scanf("%f", &height);
if(height < 1.3f)
{
puts("Essa pessoa é baixíssima.");
}
else if(height < 1.6f)
{
puts("Essa pessoa é baixa.");
}
else if(height < 1.75f)
{
puts("Essa pessoa é mediana.");
}
else if(height < 1.9f)
{
puts("Essa pessoa é alta.");
}
else
{
puts("Essa pessoa é altíssima.");
}
return 0;
}
|
#pragma once
#include "synth.h"
#define PLUCK_ACC_LEN 0x600
#define PLUCK_ACC_FREQ_LIMIT ((float)SAMPLE_RATE / (float)PLUCK_ACC_LEN)
typedef struct {
float acc[PLUCK_ACC_LEN]; // ~28.71 Hz lowest freq
float gain;
float dcOffset;
float variation;
float damping;
float smoothA;
float smoothB;
float lastImp;
int32_t impulse;
uint32_t phase;
uint16_t len;
} CTSS_PluckOsc;
CTSS_DSPNode *ctss_osc_pluck(char *id, float freq, float impTime, float gain,
float dc);
void ctss_reset_pluck(CTSS_DSPNode *node, float freq, float impTime,
float coeff);
uint8_t ctss_process_pluck(CTSS_DSPNode *node, CTSS_DSPStack *stack,
CTSS_Synth *synth);
|
/*
* Copyright (c) 2016 Freescale Semiconductor, Inc.
* Copyright (c) 2018 Foundries.io
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <errno.h>
#include <device.h>
#include <pinmux.h>
#include <fsl_common.h>
#include <fsl_clock.h>
struct pinmux_rv32m1_config {
clock_ip_name_t clock_ip_name;
PORT_Type *base;
};
static int pinmux_rv32m1_set(struct device *dev, u32_t pin, u32_t func)
{
const struct pinmux_rv32m1_config *config = dev->config->config_info;
PORT_Type *base = config->base;
base->PCR[pin] = (base->PCR[pin] & ~PORT_PCR_MUX_MASK) | func;
return 0;
}
static int pinmux_rv32m1_get(struct device *dev, u32_t pin, u32_t *func)
{
const struct pinmux_rv32m1_config *config = dev->config->config_info;
PORT_Type *base = config->base;
*func = base->PCR[pin] & ~PORT_PCR_MUX_MASK;
return 0;
}
static int pinmux_rv32m1_pullup(struct device *dev, u32_t pin, u8_t func)
{
return -ENOTSUP;
}
static int pinmux_rv32m1_input(struct device *dev, u32_t pin, u8_t func)
{
return -ENOTSUP;
}
static int pinmux_rv32m1_init(struct device *dev)
{
const struct pinmux_rv32m1_config *config = dev->config->config_info;
CLOCK_EnableClock(config->clock_ip_name);
return 0;
}
static const struct pinmux_driver_api pinmux_rv32m1_driver_api = {
.set = pinmux_rv32m1_set,
.get = pinmux_rv32m1_get,
.pullup = pinmux_rv32m1_pullup,
.input = pinmux_rv32m1_input,
};
#ifdef CONFIG_PINMUX_RV32M1_PORTA
static const struct pinmux_rv32m1_config pinmux_rv32m1_porta_config = {
.base = (PORT_Type *)PINMUX_A_BASE_ADDRESS,
.clock_ip_name = kCLOCK_PortA,
};
DEVICE_AND_API_INIT(pinmux_porta, CONFIG_PINMUX_RV32M1_PORTA_NAME,
&pinmux_rv32m1_init,
NULL, &pinmux_rv32m1_porta_config,
PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT,
&pinmux_rv32m1_driver_api);
#endif
#ifdef CONFIG_PINMUX_RV32M1_PORTB
static const struct pinmux_rv32m1_config pinmux_rv32m1_portb_config = {
.base = (PORT_Type *)PINMUX_B_BASE_ADDRESS,
.clock_ip_name = kCLOCK_PortB,
};
DEVICE_AND_API_INIT(pinmux_portb, CONFIG_PINMUX_RV32M1_PORTB_NAME,
&pinmux_rv32m1_init,
NULL, &pinmux_rv32m1_portb_config,
PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT,
&pinmux_rv32m1_driver_api);
#endif
#ifdef CONFIG_PINMUX_RV32M1_PORTC
static const struct pinmux_rv32m1_config pinmux_rv32m1_portc_config = {
.base = (PORT_Type *)PINMUX_C_BASE_ADDRESS,
.clock_ip_name = kCLOCK_PortC,
};
DEVICE_AND_API_INIT(pinmux_portc, CONFIG_PINMUX_RV32M1_PORTC_NAME,
&pinmux_rv32m1_init,
NULL, &pinmux_rv32m1_portc_config,
PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT,
&pinmux_rv32m1_driver_api);
#endif
#ifdef CONFIG_PINMUX_RV32M1_PORTD
static const struct pinmux_rv32m1_config pinmux_rv32m1_portd_config = {
.base = (PORT_Type *)PINMUX_D_BASE_ADDRESS,
.clock_ip_name = kCLOCK_PortD,
};
DEVICE_AND_API_INIT(pinmux_portd, CONFIG_PINMUX_RV32M1_PORTD_NAME,
&pinmux_rv32m1_init,
NULL, &pinmux_rv32m1_portd_config,
PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT,
&pinmux_rv32m1_driver_api);
#endif
#ifdef CONFIG_PINMUX_RV32M1_PORTE
static const struct pinmux_rv32m1_config pinmux_rv32m1_porte_config = {
.base = (PORT_Type *)PINMUX_E_BASE_ADDRESS,
.clock_ip_name = kCLOCK_PortE,
};
DEVICE_AND_API_INIT(pinmux_porte, CONFIG_PINMUX_RV32M1_PORTE_NAME,
&pinmux_rv32m1_init,
NULL, &pinmux_rv32m1_porte_config,
PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT,
&pinmux_rv32m1_driver_api);
#endif
|
/* $NetBSD: resolve_local.c,v 1.1.1.2 2013/01/02 18:59:00 tron Exp $ */
/*++
/* NAME
/* resolve_local 3
/* SUMMARY
/* determine if domain resolves to local mail system
/* SYNOPSIS
/* #include <resolve_local.h>
/*
/* void resolve_local_init()
/*
/* int resolve_local(domain)
/* const char *domain;
/* DESCRIPTION
/* resolve_local() determines if the named domain resolves to the
/* local mail system, either by case-insensitive exact match
/* against the domains, files or tables listed in $mydestination,
/* or by a match of an [address-literal] against of the network
/* addresses listed in $inet_interfaces or in $proxy_interfaces.
/* The result is > 0 if the domain matches the list of local
/* domains and IP addresses, 0 when it does not match, and < 0
/* in case of error.
/*
/* resolve_local_init() performs initialization. If this routine is
/* not called explicitly ahead of time, it will be called on the fly.
/* BUGS
/* Calling resolve_local_init() on the fly is an incomplete solution.
/* It is bound to fail with applications that enter a chroot jail.
/* SEE ALSO
/* own_inet_addr(3), find out my own network interfaces
/* match_list(3), generic pattern matching engine
/* match_ops(3), generic pattern matching operators
/* LICENSE
/* .ad
/* .fi
/* The Secure Mailer license must be distributed with this software.
/* AUTHOR(S)
/* Wietse Venema
/* IBM T.J. Watson Research
/* P.O. Box 704
/* Yorktown Heights, NY 10598, USA
/*--*/
/* System library. */
#include <sys_defs.h>
/* Utility library. */
#include <msg.h>
#include <mymalloc.h>
#include <string_list.h>
#include <myaddrinfo.h>
#include <valid_mailhost_addr.h>
/* Global library. */
#include <mail_params.h>
#include <own_inet_addr.h>
#include <resolve_local.h>
/* Application-specific */
static STRING_LIST *resolve_local_list;
/* resolve_local_init - initialize lookup table */
void resolve_local_init(void)
{
/* Allow on-the-fly update to make testing easier. */
if (resolve_local_list)
string_list_free(resolve_local_list);
resolve_local_list = string_list_init(MATCH_FLAG_RETURN, var_mydest);
}
/* resolve_local - match domain against list of local destinations */
int resolve_local(const char *addr)
{
char *saved_addr = mystrdup(addr);
char *dest;
const char *bare_dest;
struct addrinfo *res0 = 0;
ssize_t len;
/*
* The optimizer will eliminate tests that always fail.
*/
#define RETURN(x) \
do { \
myfree(saved_addr); \
if (res0) \
freeaddrinfo(res0); \
return(x); \
} while (0)
if (resolve_local_list == 0)
resolve_local_init();
/*
* Strip one trailing dot but not dot-dot.
*
* XXX This should not be distributed all over the code. Problem is,
* addresses can enter the system via multiple paths: networks, local
* forward/alias/include files, even as the result of address rewriting.
*/
len = strlen(saved_addr);
if (len == 0)
RETURN(0);
if (saved_addr[len - 1] == '.')
saved_addr[--len] = 0;
if (len == 0 || saved_addr[len - 1] == '.')
RETURN(0);
/*
* Compare the destination against the list of destinations that we
* consider local.
*/
if (string_list_match(resolve_local_list, saved_addr))
RETURN(1);
if (resolve_local_list->error != 0)
RETURN(resolve_local_list->error);
/*
* Compare the destination against the list of interface addresses that
* we are supposed to listen on.
*
* The destination may be an IPv6 address literal that was buried somewhere
* inside a deeply recursively nested address. This information comes
* from an untrusted source, and Wietse is not confident that everyone's
* getaddrinfo() etc. implementation is sufficiently robust. The syntax
* is complex enough with null field compression and with IPv4-in-IPv6
* addresses that errors are likely.
*
* The solution below is ad-hoc. We neutralize the string as soon as we
* realize that its contents could be harmful. We neutralize the string
* here, instead of neutralizing it in every resolve_local() caller.
* That's because resolve_local knows how the address is going to be
* parsed and converted into binary form.
*
* There are several more structural solutions to this.
*
* - One solution is to disallow address literals. This is not as bad as it
* seems: I have never seen actual legitimate use of address literals.
*
* - Another solution is to label each string with a trustworthiness label
* and to expect that all Postfix infrastructure will exercise additional
* caution when given a string with untrusted content. This is not likely
* to happen.
*
* FIX 200501 IPv6 patch did not require "IPv6:" prefix in numerical
* addresses.
*/
dest = saved_addr;
if (*dest == '[' && dest[len - 1] == ']') {
dest++;
dest[len -= 2] = 0;
if ((bare_dest = valid_mailhost_addr(dest, DO_GRIPE)) != 0
&& hostaddr_to_sockaddr(bare_dest, (char *) 0, 0, &res0) == 0) {
if (own_inet_addr(res0->ai_addr) || proxy_inet_addr(res0->ai_addr))
RETURN(1);
}
}
/*
* Must be remote, or a syntax error.
*/
RETURN(0);
}
#ifdef TEST
#include <vstream.h>
#include <mail_conf.h>
int main(int argc, char **argv)
{
int rc;
if (argc != 3)
msg_fatal("usage: %s mydestination domain", argv[0]);
mail_conf_read();
myfree(var_mydest);
var_mydest = mystrdup(argv[1]);
vstream_printf("mydestination=%s destination=%s %s\n", argv[1], argv[2],
(rc = resolve_local(argv[2])) > 0 ? "YES" :
rc == 0 ? "NO" : "ERROR");
vstream_fflush(VSTREAM_OUT);
return (0);
}
#endif
|
/*
* Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
#pragma once
#include <aws/cognito-identity/CognitoIdentity_EXPORTS.h>
#include <aws/cognito-identity/CognitoIdentityRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
namespace Aws
{
namespace CognitoIdentity
{
namespace Model
{
/**
* <p>Input to the <code>GetIdentityPoolRoles</code> action.</p>
*/
class AWS_COGNITOIDENTITY_API GetIdentityPoolRolesRequest : public CognitoIdentityRequest
{
public:
GetIdentityPoolRolesRequest();
Aws::String SerializePayload() const override;
Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
/**
* <p>An identity pool ID in the format REGION:GUID.</p>
*/
inline const Aws::String& GetIdentityPoolId() const{ return m_identityPoolId; }
/**
* <p>An identity pool ID in the format REGION:GUID.</p>
*/
inline void SetIdentityPoolId(const Aws::String& value) { m_identityPoolIdHasBeenSet = true; m_identityPoolId = value; }
/**
* <p>An identity pool ID in the format REGION:GUID.</p>
*/
inline void SetIdentityPoolId(Aws::String&& value) { m_identityPoolIdHasBeenSet = true; m_identityPoolId = value; }
/**
* <p>An identity pool ID in the format REGION:GUID.</p>
*/
inline void SetIdentityPoolId(const char* value) { m_identityPoolIdHasBeenSet = true; m_identityPoolId.assign(value); }
/**
* <p>An identity pool ID in the format REGION:GUID.</p>
*/
inline GetIdentityPoolRolesRequest& WithIdentityPoolId(const Aws::String& value) { SetIdentityPoolId(value); return *this;}
/**
* <p>An identity pool ID in the format REGION:GUID.</p>
*/
inline GetIdentityPoolRolesRequest& WithIdentityPoolId(Aws::String&& value) { SetIdentityPoolId(value); return *this;}
/**
* <p>An identity pool ID in the format REGION:GUID.</p>
*/
inline GetIdentityPoolRolesRequest& WithIdentityPoolId(const char* value) { SetIdentityPoolId(value); return *this;}
private:
Aws::String m_identityPoolId;
bool m_identityPoolIdHasBeenSet;
};
} // namespace Model
} // namespace CognitoIdentity
} // namespace Aws
|
/* Siconos is a program dedicated to modeling, simulation and control
* of non smooth dynamical systems.
*
* Copyright 2016 INRIA.
*
* 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 <stdlib.h>
#include <assert.h>
#include <errno.h>
#include "GlobalFrictionContactProblem.h"
#include "misc.h"
int globalFrictionContact_printInFile(GlobalFrictionContactProblem* problem, FILE* file)
{
if (! problem)
{
fprintf(stderr, "Numerics, GlobalFrictionContactProblem printInFile failed, NULL input.\n");
exit(EXIT_FAILURE);
}
int i;
int d = problem->dimension;
fprintf(file, "%d\n", d);
int nc = problem->numberOfContacts;
fprintf(file, "%d\n", nc);
printInFile(problem->M, file);
printInFile(problem->H, file);
for (i = 0; i < problem->M->size1; i++)
{
fprintf(file, "%32.24e ", problem->q[i]);
}
fprintf(file, "\n");
for (i = 0; i < problem->H->size1; i++)
{
fprintf(file, "%32.24e ", problem->b[i]);
}
fprintf(file, "\n");
for (i = 0; i < nc; i++)
{
fprintf(file, "%32.24e ", problem->mu[i]);
}
fprintf(file, "\n");
return 0;
}
int globalFrictionContact_newFromFile(GlobalFrictionContactProblem* problem, FILE* file)
{
int nc = 0, d = 0;
int info = 0;
CHECK_IO(fscanf(file, "%d\n", &d), &info);
problem->dimension = d;
CHECK_IO(fscanf(file, "%d\n", &nc), &info);
problem->numberOfContacts = nc;
problem->M = newNumericsMatrix();
info = newFromFile(problem->M, file);
if (info) goto fail;
problem->H = newNumericsMatrix();
info = newFromFile(problem->H, file);
if (info) goto fail;
problem->q = (double *) malloc(problem->M->size1 * sizeof(double));
for (int i = 0; i < problem->M->size1; ++i)
{
CHECK_IO(fscanf(file, "%lf ", &(problem->q[i])), &info);
}
problem->b = (double *) malloc(problem->H->size1 * sizeof(double));
for (int i = 0; i < problem->H->size1; ++i)
{
CHECK_IO(fscanf(file, "%lf ", &(problem->b[i])), &info);
}
problem->mu = (double *) malloc(nc * sizeof(double));
for (int i = 0; i < nc; ++i)
{
CHECK_IO(fscanf(file, "%lf ", &(problem->mu[i])), &info);
}
fail:
problem->env = NULL;
problem->workspace = NULL;
return info;
}
void freeGlobalFrictionContactProblem(GlobalFrictionContactProblem* problem)
{
if (problem->M)
{
freeNumericsMatrix(problem->M);
free(problem->M);
problem->M = NULL;
}
if (problem->H)
{
freeNumericsMatrix(problem->H);
free(problem->H);
problem->H = NULL;
}
if (problem->mu)
{
free(problem->mu);
problem->mu = NULL;
}
if (problem->q)
{
free(problem->q);
problem->q = NULL;
}
if (problem->b)
{
free(problem->b);
problem->b = NULL;
}
if (problem->env) assert(0 && "freeGlobalFrictionContactProblem :: problem->env != NULL, don't know what to do");
gfc3d_free_workspace(problem);
free(problem);
}
void globalFrictionContact_display(GlobalFrictionContactProblem* problem)
{
assert(problem);
int i, n = problem->dimension * problem->numberOfContacts;
printf("GlobalFrictionContact Display :\n-------------\n");
printf("dimension :%d \n", problem->dimension);
printf("numberOfContacts:%d \n", problem->numberOfContacts);
int m = problem->M->size0;
if (problem->M)
{
printf("M matrix:\n");
display(problem->M);
}
else
printf("No M matrix:\n");
if (problem->H)
{
printf("H matrix:\n");
display(problem->H);
}
else
printf("No H matrix:\n");
if (problem->q)
{
printf("q vector:\n");
for (i = 0; i < m; i++) printf("q[ %i ] = %12.8e\n", i, problem->q[i]);
}
else
printf("No q vector:\n");
if (problem->b)
{
printf("b vector:\n");
for (i = 0; i < n; i++) printf("b[ %i ] = %12.8e\n", i, problem->b[i]);
}
else
printf("No q vector:\n");
if (problem->mu)
{
printf("mu vector:\n");
for (i = 0; i < problem->numberOfContacts; i++) printf("mu[ %i ] = %12.8e\n", i, problem->mu[i]);
}
else
printf("No mu vector:\n");
}
void gfc3d_init_workspace(GlobalFrictionContactProblem* problem)
{
assert(problem);
assert(problem->M);
if (!problem->workspace)
{
problem->workspace = (GFC3D_workspace*) malloc(sizeof(GFC3D_workspace));
problem->workspace->factorized_M = NULL;
problem->workspace->globalVelocity = NULL;
}
if (!problem->workspace->factorized_M)
{
problem->workspace->factorized_M = createNumericsMatrix(problem->M->storageType,
problem->M->size0,
problem->M->size1);
NM_copy(problem->M, problem->workspace->factorized_M);
}
if (!problem->workspace->globalVelocity)
{
problem->workspace->globalVelocity = (double*)malloc(problem->M->size1 * sizeof(double));
}
}
void gfc3d_free_workspace(GlobalFrictionContactProblem* problem)
{
if (problem->workspace)
{
if (problem->workspace->factorized_M)
{
freeNumericsMatrix(problem->workspace->factorized_M);
free(problem->workspace->factorized_M);
problem->workspace->factorized_M = NULL;
}
if (problem->workspace->globalVelocity)
{
free(problem->workspace->globalVelocity);
problem->workspace->globalVelocity = NULL;
}
free(problem->workspace);
problem->workspace = NULL;
}
}
|
/**
* Appcelerator Titanium Mobile
* Copyright (c) 2010 by SIM, Inc. All Rights Reserved.
* Licensed under the terms of the Apache Public License
* Please see the LICENSE included with this distribution for details.
*
* WARNING: This is generated code. Modify at your own risk and without support.
*/
#if defined(USE_TI_UIIPADPOPOVER) || defined(USE_TI_UIIPADSPLITWINDOW)
#import "TiUIView.h"
#import "TiViewController.h"
@interface TiUIiPadPopover : TiUIView<UIPopoverControllerDelegate> {
@private
}
@end
#endif
|
#ifndef _MZ_APPLICATION_H
#define _MZ_APPLICATION_H
#include "mz_common.h"
#include "mz_option_parser.h"
#include "mz_daemon.h"
#ifdef _WIN32
#include "windows.h"
#endif
namespace Meizhi
{
//app slot
typedef struct {
//init
pFunc g_app_pre_init;
pFunc g_app_init;
pFunc g_app_post_init;
//start
pFunc g_app_pre_start;
pFunc g_app_start;
pFunc g_app_post_start;
//reload
pFunc g_app_pre_reload;
pFunc g_app_reload;
pFunc g_app_post_reload;
//stop
pFunc g_app_pre_stop;
pFunc g_app_stop;
pFunc g_app_post_stop;
//loop
pFunc g_app_pre_loop;
pFunc g_app_loop;
pFunc g_app_post_loop;
}stMzSlot, *stMzSlotPtr;
/*
** 业务框架类
** @desc 封装公共的处理逻辑
** @desc 命令行参数解析、守护进程启动、主逻辑
*/
class Application
{
public:
Application() :_bStoped(false) {}
~Application()
{
_bStoped = true;
}
public:
//设置上下文
void setContext(stMzContextPtr context)
{
_pContext = context;
}
//设置钩子
void setSlot(stMzSlotPtr slot)
{
_pSlot = slot;
}
public:
//运行
int32_t run();
private:
//业务循环
int32_t mainLoop();
//定时任务处理
int32_t dealTimer();
//回调任务处理
int32_t dealCallback();
//信号处理
int32_t dealSignal();
//网络任务处理
int32_t dealNetWork();
//命令行参数解析
int32_t parseOption();
//设置为守护进程
int32_t runAsDaemon(bool);
//启动进程
int32_t start();
//初始化进程
int32_t init();
//终止进程
int32_t stop();
//重新加载进程配置
int32_t reload();
//获取当前程序状态
bool isStoped() const
{
return _bStoped;
}
//获取程序上下文
stMzContextPtr getContext() const { return _pContext; }
//获取程序钩子
stMzSlotPtr getSlot() const { return _pSlot; }
private:
//程序执行的上下文
stMzContextPtr _pContext;
stMzSlotPtr _pSlot;
//程序当前状态
bool _bStoped;
};
}
#endif // !_MZ_APPLICATION_H
|
#pragma once
#include "il2cpp-config.h"
#ifndef _MSC_VER
# include <alloca.h>
#else
# include <malloc.h>
#endif
#include <stdint.h>
// System.Threading.ManualResetEvent
struct ManualResetEvent_t924017833;
// System.IO.Stream
struct Stream_t1561764144;
// Mono.Security.Protocol.Tls.Context
struct Context_t658806145;
#include "mscorlib_System_Object4170816371.h"
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.Protocol.Tls.RecordProtocol
struct RecordProtocol_t1331996967 : public Il2CppObject
{
public:
// System.IO.Stream Mono.Security.Protocol.Tls.RecordProtocol::innerStream
Stream_t1561764144 * ___innerStream_1;
// Mono.Security.Protocol.Tls.Context Mono.Security.Protocol.Tls.RecordProtocol::context
Context_t658806145 * ___context_2;
public:
inline static int32_t get_offset_of_innerStream_1() { return static_cast<int32_t>(offsetof(RecordProtocol_t1331996967, ___innerStream_1)); }
inline Stream_t1561764144 * get_innerStream_1() const { return ___innerStream_1; }
inline Stream_t1561764144 ** get_address_of_innerStream_1() { return &___innerStream_1; }
inline void set_innerStream_1(Stream_t1561764144 * value)
{
___innerStream_1 = value;
Il2CppCodeGenWriteBarrier(&___innerStream_1, value);
}
inline static int32_t get_offset_of_context_2() { return static_cast<int32_t>(offsetof(RecordProtocol_t1331996967, ___context_2)); }
inline Context_t658806145 * get_context_2() const { return ___context_2; }
inline Context_t658806145 ** get_address_of_context_2() { return &___context_2; }
inline void set_context_2(Context_t658806145 * value)
{
___context_2 = value;
Il2CppCodeGenWriteBarrier(&___context_2, value);
}
};
struct RecordProtocol_t1331996967_StaticFields
{
public:
// System.Threading.ManualResetEvent Mono.Security.Protocol.Tls.RecordProtocol::record_processing
ManualResetEvent_t924017833 * ___record_processing_0;
public:
inline static int32_t get_offset_of_record_processing_0() { return static_cast<int32_t>(offsetof(RecordProtocol_t1331996967_StaticFields, ___record_processing_0)); }
inline ManualResetEvent_t924017833 * get_record_processing_0() const { return ___record_processing_0; }
inline ManualResetEvent_t924017833 ** get_address_of_record_processing_0() { return &___record_processing_0; }
inline void set_record_processing_0(ManualResetEvent_t924017833 * value)
{
___record_processing_0 = value;
Il2CppCodeGenWriteBarrier(&___record_processing_0, value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
|
/**
* @license Apache-2.0
*
* Copyright (c) 2021 The Stdlib Authors.
*
* 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.
*/
/*
* The following is auto-generated. Do not manually edit. See scripts/loops.js.
*/
#ifndef STDLIB_STRIDED_BASE_BINARY_CC_C_H
#define STDLIB_STRIDED_BASE_BINARY_CC_C_H
#include <stdint.h>
/*
* If C++, prevent name mangling so that the compiler emits a binary file having undecorated names, thus mirroring the behavior of a C compiler.
*/
#ifdef __cplusplus
extern "C" {
#endif
/**
* Applies a binary callback to strided input array elements and assigns results to elements in a strided output array.
*/
void stdlib_strided_cc_c( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn );
#ifdef __cplusplus
}
#endif
#endif // !STDLIB_STRIDED_BASE_BINARY_CC_C_H
|
/*=========================================================================
*
* Copyright Insight Software Consortium
*
* 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.txt
*
* 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 file to wrap the internal ITK OpenJpeg library header
*
* Author : Guillaume Pasero <guillaume.pasero@c-s.fr>
*
*=========================================================================*/
#ifndef __itk_openjpeg_h
#define __itk_openjpeg_h
#include <itkopenjpeg/openjpeg.h>
#endif
|
// Copyright 2019 DeepMind Technologies Limited.
//
// 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 REVERB_CC_TESTING_TIME_TESTUTIL_H_
#define REVERB_CC_TESTING_TIME_TESTUTIL_H_
#include "absl/time/clock.h"
#include "absl/time/time.h"
namespace deepmind {
namespace reverb {
namespace test {
template <typename F>
void WaitFor(F&& exit_criteria_fn, const absl::Duration& wait_duration,
int max_iteration) {
for (int retries = 0; !exit_criteria_fn() && retries < max_iteration;
++retries) {
absl::SleepFor(wait_duration);
}
}
} // namespace test
} // namespace reverb
} // namespace deepmind
#endif // REVERB_CC_TESTING_TIME_TESTUTIL_H_
|
// Copyright 2010-2014, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef MOZC_GUI_DICTIONARY_TOOL_FIND_DIALOG_H_
#define MOZC_GUI_DICTIONARY_TOOL_FIND_DIALOG_H_
#include <QtGui/QDialog>
#include "gui/dictionary_tool/ui_find_dialog.h"
class QTableWidget;
class QTableWidgetItem;
namespace mozc {
namespace gui {
class FindDialog : public QDialog,
private Ui::FindDialog {
Q_OBJECT
public:
FindDialog(QWidget *parent, QTableWidget *table);
virtual ~FindDialog();
protected:
void closeEvent(QCloseEvent *event);
void showEvent(QShowEvent *event);
private slots:
void FindForward();
void FindBackward();
void UpdateUIStatus();
void LineEditChanged(const QString &str);
private:
enum Direction {
FORWARD,
BACKWARD
};
bool Match(const QString &query, int row, int column);
void Find(Direction direction);
QTableWidget *table_;
QTableWidgetItem *last_item_;
};
} // namespace gui
} // namespace mozc
#endif // MOZC_GUI_DICTIONARY_TOOL_FIND_DIALOG_H_
|
//============================================================
// <T>¹²Í¨¶¨Òå¡£</T>
//============================================================
#ifndef __MO_FG_PUBLIC_H__
#define __MO_FG_PUBLIC_H__
#ifndef __MO_COMMON_H__
#include <MoCommon.h>
#endif // __MO_COMMON_H__
#ifndef __MO_CORE_H__
#include <MoCore.h>
#endif // __MO_CORE_H__
#ifndef __MO_MATH_H__
#include <MoMath.h>
#endif // __MO_MATH_H__
//============================================================
/// @define µ¼³ö¶¨Òå
#ifdef _MO_FG_EXPORTS
#define MO_FG_DECLARE MO_EXPORT
#else
#define MO_FG_DECLARE MO_IMPORT
#endif // _MO_FG_EXPORTS
MO_NAMESPACE_BEGIN
MO_NAMESPACE_END
#endif // __MO_FG_PUBLIC_H__
|
/*
* Copyright 2014 Scott Logic Ltd
*
* 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.
*/
#import <UIKit/UIKit.h>
@interface SCAppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@end
|
// #include <stdio.h>
int f() {
/* local variable definition */
int a = 10;
/* while loop execution */
while( a < 20 ) {
printf("value of a: %d\n", a);
a++;
if( a > 15) {
/* terminate the loop using break statement */
break;
}
}
return a;
}
|
#ifndef __DFG_SOCIALSERVICE__
#define __DFG_SOCIALSERVICE__
#include "service.h"
/** @brief Social service.
*/
class SocialService : public Service, public gameplay::SocialSessionListener
{
friend class ServiceManager;
public:
static const char * getTypeName() { return "SocialService"; }
gameplay::SocialSession * getSession() { return _session; };
protected:
SocialService(const ServiceManager * manager);
virtual ~SocialService();
virtual bool onPreInit();
virtual bool onInit();
virtual bool onTick();
virtual bool onShutdown();
/**
* @see gameplay::SocialSessionListener::authenticateEvent
*/
virtual void authenticateEvent(ResponseCode code, gameplay::SocialSession* session);
private:
gameplay::SocialSession * _session;
};
#endif //__DFG_SOCIALSERVICE__
|
/*
* Copyright (C) 2012 BMW Car IT GmbH
*
* 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 CAPU_MACOSX_X86_32_TCPSERVERSOCKET_H
#define CAPU_MACOSX_X86_32_TCPSERVERSOCKET_H
#include <capu/os/MacOSX/TcpServerSocket.h>
namespace capu
{
namespace os
{
namespace arch
{
class TcpServerSocket: private capu::os::TcpServerSocket
{
public:
using capu::os::TcpServerSocket::accept;
using capu::os::TcpServerSocket::close;
using capu::os::TcpServerSocket::bind;
using capu::os::TcpServerSocket::listen;
using capu::os::TcpServerSocket::port;
using capu::os::TcpServerSocket::getSocketDescription;
};
}
}
}
#endif // CAPU_MACOSX_X86_32_TCPSERVERSOCKET_H
|
#pragma once
#include "il2cpp-config.h"
#ifndef _MSC_VER
# include <alloca.h>
#else
# include <malloc.h>
#endif
#include <stdint.h>
// UnityEngine.EventSystems.BaseRaycaster
struct BaseRaycaster_t2327671059;
// System.IAsyncResult
struct IAsyncResult_t2754620036;
// System.AsyncCallback
struct AsyncCallback_t1369114871;
// System.Object
struct Il2CppObject;
#include "mscorlib_System_MulticastDelegate3389745971.h"
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Comparison`1<UnityEngine.EventSystems.BaseRaycaster>
struct Comparison_1_t1044032246 : public MulticastDelegate_t3389745971
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
|
/*
* \copyright Copyright 2014
* \license @{
* Licensed under the Apache License, Version 2.0 (the "License");
* @}
*/
#ifndef TEMPLATEMETHOD_CAFFEINE_BEVERAGE_H_
#define TEMPLATEMETHOD_CAFFEINE_BEVERAGE_H_
namespace templatemethod {
class CaffeineBeverage {
public:
virtual ~CaffeineBeverage();
void prepareRecipe();
protected:
void boilWater();
void pourInCup();
virtual void brew() = 0;
virtual void addCondiments() = 0;
};
} // namespace templatemethod
#endif // TEMPLATEMETHOD_CAFFEINE_BEVERAGE_H_
|
/**
* \file entropy_poll.h
*
* \brief Platform-specific and custom entropy polling functions
*/
/*
* Copyright The Mbed TLS Contributors
* SPDX-License-Identifier: Apache-2.0
*
* 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 MBEDTLS_ENTROPY_POLL_H
#define MBEDTLS_ENTROPY_POLL_H
#include "mbedtls/build_info.h"
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* Default thresholds for built-in sources, in bytes
*/
#define MBEDTLS_ENTROPY_MIN_PLATFORM 32 /**< Minimum for platform source */
#if !defined(MBEDTLS_ENTROPY_MIN_HARDWARE)
#define MBEDTLS_ENTROPY_MIN_HARDWARE 32 /**< Minimum for the hardware source */
#endif
#if !defined(MBEDTLS_NO_PLATFORM_ENTROPY)
/**
* \brief Platform-specific entropy poll callback
*/
int mbedtls_platform_entropy_poll( void *data,
unsigned char *output, size_t len, size_t *olen );
#endif
#if defined(MBEDTLS_ENTROPY_HARDWARE_ALT)
/**
* \brief Entropy poll callback for a hardware source
*
* \warning This is not provided by mbed TLS!
* See \c MBEDTLS_ENTROPY_HARDWARE_ALT in mbedtls_config.h.
*
* \note This must accept NULL as its first argument.
*/
int mbedtls_hardware_poll( void *data,
unsigned char *output, size_t len, size_t *olen );
#endif
#if defined(MBEDTLS_ENTROPY_NV_SEED)
/**
* \brief Entropy poll callback for a non-volatile seed file
*
* \note This must accept NULL as its first argument.
*/
int mbedtls_nv_seed_poll( void *data,
unsigned char *output, size_t len, size_t *olen );
#endif
#ifdef __cplusplus
}
#endif
#endif /* entropy_poll.h */
|
/* Copyright 2018-2021 Prebid.org, Inc.
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.
*/
#import "PBMORTBAbstract.h"
NS_ASSUME_NONNULL_BEGIN
#pragma mark - 3.2.10: Format
//This object represents an allowed size (i.e., height and width combination) or Flex Ad parameters for a
// banner impression. These are typically used in an array where multiple sizes are permitted. It is
//recommended that either the w/h pair or the wratio/hratio/wmin set (i.e., for Flex Ads) be specified.
@interface PBMORTBFormat : PBMORTBAbstract
//Int. Width in device independent pixels (DIPS).
@property (nonatomic, strong, nullable) NSNumber *w;
//Int. Height in device independent pixels (DIPS).
@property (nonatomic, strong, nullable) NSNumber *h;
//Int. Relative width when expressing size as a ratio.
@property (nonatomic, strong, nullable) NSNumber *wratio;
//Int. Relative height when expressing size as a ratio.
@property (nonatomic, strong, nullable) NSNumber *hratio;
//Int. The minimum width in device independent pixels (DIPS) at which the ad will be displayed the size is expressed as a ratio.
@property (nonatomic, strong, nullable) NSNumber *wmin;
//Placeholder for exchange-specific extensions to OpenRTB.
//Note: ext is not supported.
@end
NS_ASSUME_NONNULL_END
|
/*
* Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
#pragma once
#ifdef _MSC_VER
//disable windows complaining about max template size.
#pragma warning (disable : 4503)
#endif // _MSC_VER
#if defined (USE_WINDOWS_DLL_SEMANTICS) || defined (_WIN32)
#ifdef _MSC_VER
#pragma warning(disable : 4251)
#endif // _MSC_VER
#ifdef USE_IMPORT_EXPORT
#ifdef AWS_LAMBDA_EXPORTS
#define AWS_LAMBDA_API __declspec(dllexport)
#else
#define AWS_LAMBDA_API __declspec(dllimport)
#endif /* AWS_LAMBDA_EXPORTS */
#else
#define AWS_LAMBDA_API
#endif // USE_IMPORT_EXPORT
#else // defined (USE_WINDOWS_DLL_SEMANTICS) || defined (WIN32)
#define AWS_LAMBDA_API
#endif // defined (USE_WINDOWS_DLL_SEMANTICS) || defined (WIN32)
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (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.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is TransforMiiX XSLT processor code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 2002
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Peter Van der Beken <peterv@propagandism.org>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef __nsWhitespaceTokenizer_h
#define __nsWhitespaceTokenizer_h
#include "nsDependentSubstring.h"
class nsWhitespaceTokenizer
{
public:
nsWhitespaceTokenizer(const nsSubstring& aSource)
{
aSource.BeginReading(mIter);
aSource.EndReading(mEnd);
while (mIter != mEnd && isWhitespace(*mIter)) {
++mIter;
}
}
/**
* Checks if any more tokens are available.
*/
bool hasMoreTokens()
{
return mIter != mEnd;
}
/**
* Returns the next token.
*/
const nsDependentSubstring nextToken()
{
nsSubstring::const_char_iterator begin = mIter;
while (mIter != mEnd && !isWhitespace(*mIter)) {
++mIter;
}
nsSubstring::const_char_iterator end = mIter;
while (mIter != mEnd && isWhitespace(*mIter)) {
++mIter;
}
return Substring(begin, end);
}
private:
nsSubstring::const_char_iterator mIter, mEnd;
bool isWhitespace(PRUnichar aChar)
{
return aChar <= ' ' &&
(aChar == ' ' || aChar == '\n' ||
aChar == '\r'|| aChar == '\t');
}
};
class nsCWhitespaceTokenizer
{
public:
nsCWhitespaceTokenizer(const nsCSubstring& aSource)
{
aSource.BeginReading(mIter);
aSource.EndReading(mEnd);
while (mIter != mEnd && isWhitespace(*mIter)) {
++mIter;
}
}
/**
* Checks if any more tokens are available.
*/
bool hasMoreTokens()
{
return mIter != mEnd;
}
/**
* Returns the next token.
*/
const nsDependentCSubstring nextToken()
{
nsCSubstring::const_char_iterator begin = mIter;
while (mIter != mEnd && !isWhitespace(*mIter)) {
++mIter;
}
nsCSubstring::const_char_iterator end = mIter;
while (mIter != mEnd && isWhitespace(*mIter)) {
++mIter;
}
return Substring(begin, end);
}
private:
nsCSubstring::const_char_iterator mIter, mEnd;
bool isWhitespace(char aChar)
{
return aChar <= ' ' &&
(aChar == ' ' || aChar == '\n' ||
aChar == '\r'|| aChar == '\t');
}
};
#endif /* __nsWhitespaceTokenizer_h */
|
typedef void (TestPrototype) (void);
typedef struct {
int x[30];
} TestClass;
void test1(void)
{
int *x = ((TestClass *) pointcut_ptr())->x;
int i;
for (i = 1; i <= 10; i += 1) {
x[2 * i] = x[2 * i + 1] + 2;
}
}
void test2(void)
{
int *x = ((TestClass *) pointcut_ptr())->x;
int i;
for (i = 1; i <= 10; i += 1) {
x[2 * i + 3] = x[2 * i] + i;
}
}
void body1();
int main(int argc, char *argv[])
{
TestClass *obj = malloc(sizeof(TestClass));
coInit(&argc, &argv, coStaticWeave | coStaticAdvice);
advice_object(body1, TestPrototype, obj, test1, coAdviceAppend);
advice_object(body1, TestPrototype, obj, test2, coAdviceAppend);
/* Set some initial values */
memset(obj->x, 0, sizeof(int) * 30);
obj->x[2] = 3;
coWeave();
body1(obj);
/* dump the result */
printf("x[21] = %d\n", obj->x[21]);
coFinalise();
return 0;
}
void body1(TestClass * obj)
{
pointcut_object(TestPrototype, obj);
}
|
/*
* Copyright 2015 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef GrRenderTargetPriv_DEFINED
#define GrRenderTargetPriv_DEFINED
#include "GrRenderTarget.h"
#include "GrGpu.h"
class GrStencilSettings;
/** Class that adds methods to GrRenderTarget that are only intended for use internal to Skia.
This class is purely a privileged window into GrRenderTarget. It should never have additional
data members or virtual methods. */
class GrRenderTargetPriv {
public:
/**
* GrStencilAttachment is not part of the public API.
*/
GrStencilAttachment* getStencilAttachment() const { return fRenderTarget->fStencilAttachment; }
/**
* Attaches the GrStencilAttachment onto the render target. If stencil is a nullptr then the
* currently attached GrStencilAttachment will be removed if one was previously attached. This
* function returns false if there were any failure in attaching the GrStencilAttachment.
*/
bool attachStencilAttachment(GrStencilAttachment* stencil);
const GrGpu::MultisampleSpecs& getMultisampleSpecs(const GrStencilSettings& stencil) const;
private:
explicit GrRenderTargetPriv(GrRenderTarget* renderTarget) : fRenderTarget(renderTarget) {}
GrRenderTargetPriv(const GrRenderTargetPriv&) {} // unimpl
GrRenderTargetPriv& operator=(const GrRenderTargetPriv&); // unimpl
// No taking addresses of this type.
const GrRenderTargetPriv* operator&() const;
GrRenderTargetPriv* operator&();
GrRenderTarget* fRenderTarget;
friend class GrRenderTarget; // to construct/copy this type.
};
inline GrRenderTargetPriv GrRenderTarget::renderTargetPriv() { return GrRenderTargetPriv(this); }
inline const GrRenderTargetPriv GrRenderTarget::renderTargetPriv () const {
return GrRenderTargetPriv(const_cast<GrRenderTarget*>(this));
}
#endif
|
/*
* Copyright 2017 Google
*
* 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.
*/
#import "FIRIdentityToolkitRequest.h"
#import "FIRAuthRPCRequest.h"
NS_ASSUME_NONNULL_BEGIN
@interface FIRVerifyPhoneNumberRequest : FIRIdentityToolkitRequest <FIRAuthRPCRequest>
/** @property verificationID
@brief The verification ID obtained from the response of @c sendVerificationCode.
*/
@property(nonatomic, readonly, nullable) NSString *verificationID;
/** @property verificationCode
@brief The verification code provided by the user.
*/
@property(nonatomic, readonly, nullable) NSString *verificationCode;
/** @property accessToken
@brief The STS Access Token for the authenticated user.
*/
@property(nonatomic, copy, nullable) NSString *accessToken;
/** @var temporaryProof
@brief The a temporary proof code pertaining to this credentil, returned from the backend.
*/
@property(nonatomic, readonly, nonnull) NSString *temporaryProof;
/** @var phoneNumber
@brief The a phone number pertaining to this credential, returned from the backend.
*/
@property(nonatomic, readonly, nonnull) NSString *phoneNumber;
/** @fn initWithEndpoint:APIKey:
@brief Please use initWithPhoneNumber:APIKey:
*/
- (nullable instancetype)initWithEndpoint:(NSString *)endpoint
APIKey:(NSString *)APIKey NS_UNAVAILABLE;
/** @fn initWithTemporaryProof:phoneNumberAPIKey
@brief Designated initializer.
@param temporaryProof The temporary proof sent by the backed.
@param phoneNumber The phone number associated with the credential to be signed in.
@param APIKey The client's API Key.
*/
- (nullable instancetype)initWithTemporaryProof:(NSString *)temporaryProof
phoneNumber:(NSString *)phoneNumber
APIKey:(NSString *)APIKey NS_DESIGNATED_INITIALIZER;
/** @fn initWithVerificationID:verificationCode:APIKey
@brief Designated initializer.
@param verificationID The verification ID obtained from the response of @c sendVerificationCode.
@param verificationCode The verification code provided by the user.
@param APIKey The client's API Key.
*/
- (nullable instancetype)initWithVerificationID:(NSString *)verificationID
verificationCode:(NSString *)verificationCode
APIKey:(NSString *)APIKey NS_DESIGNATED_INITIALIZER;
@end
NS_ASSUME_NONNULL_END
|
/*
* Copyright (c) 2016-2017 Synopsys, Inc. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*/
/**
* @brief Board configuration macros for EM Starter kit board
*
* This header file is used to specify and describe board-level
* aspects for the target.
*/
#ifndef _SOC__H_
#define _SOC__H_
#include <misc/util.h>
/* default system clock */
/* On the EM Starter Kit board, the peripheral bus clock frequency is 50Mhz */
#define SYSCLK_DEFAULT_IOSC_HZ MHZ(50)
/* ARC EM Core IRQs */
#define IRQ_TIMER0 16
#define IRQ_TIMER1 17
#if defined(CONFIG_BOARD_EM_STARTERKIT_R23) && defined(CONFIG_SOC_EM7D)
#define IRQ_SEC_TIMER0 20
#endif /* CONFIG_BOARD_EM_STARTERKIT_R23 && CONFIG_SOC_EM7D */
#if defined(CONFIG_BOARD_EM_STARTERKIT_R23) && defined(CONFIG_SOC_EM7D)
#define IRQ_CORE_DMA_COMPLETE 22
#define IRQ_CORE_DMA_ERROR 23
#else /* CONFIG_BOARD_EM_STARTERKIT_R23 && CONFIG_SOC_EM7D */
#define IRQ_CORE_DMA_COMPLETE 20
#define IRQ_CORE_DMA_ERROR 21
#endif /* !(CONFIG_BOARD_EM_STARTERKIT_R23 && CONFIG_SOC_EM7D) */
#ifndef _ASMLANGUAGE
#include <misc/util.h>
#include <random/rand32.h>
#define ARCV2_TIMER0_INT_LVL IRQ_TIMER0
#define ARCV2_TIMER0_INT_PRI 0
#define ARCV2_TIMER1_INT_LVL IRQ_TIMER1
#define ARCV2_TIMER1_INT_PRI 1
#define CONFIG_ARCV2_TIMER1_INT_LVL IRQ_TIMER1
#define CONFIG_ARCV2_TIMER1_INT_PRI 1
#define INT_ENABLE_ARC ~(0x00000001 << 8)
#define INT_ENABLE_ARC_BIT_POS (8)
/* I2C */
/* I2C_0 is on Pmod2 connector */
#define I2C_DW_0_BASE_ADDR 0xF0004000
/* I2C_1 is on Pmod4 connector */
#define I2C_DW_1_BASE_ADDR 0xF0005000
#define I2C_DW_IRQ_FLAGS 0
/* GPIO */
#define GPIO_DW_0_BASE_ADDR 0xF0002000 /* GPIO 0 : PORTA */
#define GPIO_DW_0_BITS 32
#define GPIO_DW_PORT_0_INT_MASK 0 /* n/a */
#define GPIO_DW_0_IRQ_FLAGS 0 /* Defaults */
#define GPIO_DW_1_BASE_ADDR 0xF000200C /* GPIO 1 : PORTB */
#define GPIO_DW_1_BITS 9 /* 9 LEDs on board */
#define GPIO_DW_PORT_1_INT_MASK 0 /* n/a */
#define GPIO_DW_2_BASE_ADDR 0xF0002018 /* GPIO 2 : PORTC */
#define GPIO_DW_2_BITS 32
#define GPIO_DW_PORT_2_INT_MASK 0 /* n/a */
#define GPIO_DW_3_BASE_ADDR 0xF0002024 /* GPIO 3 : PORTD */
#define GPIO_DW_3_BITS 12
#define GPIO_DW_PORT_3_INT_MASK 0 /* n/a */
/* SPI */
#define SPI_DW_SPI_CLOCK SYSCLK_DEFAULT_IOSC_HZ
#define SPI_DW_PORT_0_REGS 0xF0006000
#define SPI_DW_PORT_1_REGS 0xF0007000
#define SPI_DW_IRQ_FLAGS 0
/*
* SPI Chip Select Assignments on EM Starter Kit
*
* CS0 Pmod6 - pin 1 - J6
* CS1 Pmod5 - pin 1 - J5 & Pmod 6 - pin 7 - J6
* CS2 Pmod6 - pin 8 - J6
* CS3 SDCard (onboard)
* CS4 Internal SPI Slave - loopback
* CS5 SPI-Flash (onboard)
*/
/*
* UARTs: UART0 & UART1 & UART2
*/
#define UART_NS16550_PORT_0_BASE_ADDR 0xF0008000
#define UART_NS16550_PORT_0_CLK_FREQ SYSCLK_DEFAULT_IOSC_HZ
#define UART_NS16550_PORT_1_BASE_ADDR 0xF0009000
#define UART_NS16550_PORT_1_CLK_FREQ SYSCLK_DEFAULT_IOSC_HZ
#define UART_NS16550_PORT_2_BASE_ADDR 0xF000A000
#define UART_NS16550_PORT_2_CLK_FREQ SYSCLK_DEFAULT_IOSC_HZ
#define UART_IRQ_FLAGS 0 /* Default */
/**
* Peripheral Interrupt Connection Configurations
*/
#ifdef CONFIG_BOARD_EM_STARTERKIT_R23
#define GPIO_DW_0_IRQ 24
#define I2C_DW_0_IRQ 25
#define I2C_DW_1_IRQ 26
#define SPI_DW_PORT_0_IRQ 27
#define SPI_DW_PORT_1_IRQ 28
#define UART_NS16550_PORT_0_IRQ 29
#define UART_NS16550_PORT_1_IRQ 30
#define UART_NS16550_PORT_2_IRQ 31
#else /* CONFIG_BOARD_EM_STARTERKIT_R23 */
#define GPIO_DW_0_IRQ 22
#define I2C_DW_0_IRQ 23
#define I2C_DW_1_IRQ 24
#define SPI_DW_PORT_0_IRQ 25
#define SPI_DW_PORT_1_IRQ 26
#define UART_NS16550_PORT_0_IRQ 27
#define UART_NS16550_PORT_1_IRQ 28
#define UART_NS16550_PORT_2_IRQ 29
#endif /* !CONFIG_BOARD_EM_STARTERKIT_R23 */
#define GPIO_DW_1_IRQ 0 /* can't interrupt */
#define GPIO_DW_2_IRQ 0 /* can't interrupt */
#define GPIO_DW_3_IRQ 0 /* can't interrupt */
#endif /* !_ASMLANGUAGE */
#endif /* _SOC__H_ */
|
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/quicksight/QuickSight_EXPORTS.h>
#include <aws/quicksight/model/ThemeAlias.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace QuickSight
{
namespace Model
{
class AWS_QUICKSIGHT_API UpdateThemeAliasResult
{
public:
UpdateThemeAliasResult();
UpdateThemeAliasResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
UpdateThemeAliasResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
/**
* <p>Information about the theme alias.</p>
*/
inline const ThemeAlias& GetThemeAlias() const{ return m_themeAlias; }
/**
* <p>Information about the theme alias.</p>
*/
inline void SetThemeAlias(const ThemeAlias& value) { m_themeAlias = value; }
/**
* <p>Information about the theme alias.</p>
*/
inline void SetThemeAlias(ThemeAlias&& value) { m_themeAlias = std::move(value); }
/**
* <p>Information about the theme alias.</p>
*/
inline UpdateThemeAliasResult& WithThemeAlias(const ThemeAlias& value) { SetThemeAlias(value); return *this;}
/**
* <p>Information about the theme alias.</p>
*/
inline UpdateThemeAliasResult& WithThemeAlias(ThemeAlias&& value) { SetThemeAlias(std::move(value)); return *this;}
/**
* <p>The HTTP status of the request.</p>
*/
inline int GetStatus() const{ return m_status; }
/**
* <p>The HTTP status of the request.</p>
*/
inline void SetStatus(int value) { m_status = value; }
/**
* <p>The HTTP status of the request.</p>
*/
inline UpdateThemeAliasResult& WithStatus(int value) { SetStatus(value); return *this;}
/**
* <p>The AWS request ID for this operation.</p>
*/
inline const Aws::String& GetRequestId() const{ return m_requestId; }
/**
* <p>The AWS request ID for this operation.</p>
*/
inline void SetRequestId(const Aws::String& value) { m_requestId = value; }
/**
* <p>The AWS request ID for this operation.</p>
*/
inline void SetRequestId(Aws::String&& value) { m_requestId = std::move(value); }
/**
* <p>The AWS request ID for this operation.</p>
*/
inline void SetRequestId(const char* value) { m_requestId.assign(value); }
/**
* <p>The AWS request ID for this operation.</p>
*/
inline UpdateThemeAliasResult& WithRequestId(const Aws::String& value) { SetRequestId(value); return *this;}
/**
* <p>The AWS request ID for this operation.</p>
*/
inline UpdateThemeAliasResult& WithRequestId(Aws::String&& value) { SetRequestId(std::move(value)); return *this;}
/**
* <p>The AWS request ID for this operation.</p>
*/
inline UpdateThemeAliasResult& WithRequestId(const char* value) { SetRequestId(value); return *this;}
private:
ThemeAlias m_themeAlias;
int m_status;
Aws::String m_requestId;
};
} // namespace Model
} // namespace QuickSight
} // namespace Aws
|
// Copyright lowRISC contributors.
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0
#include "sw/device/lib/crypto/drivers/otbn.h"
#include <assert.h>
#include <stddef.h>
#include <stdint.h>
#include "sw/device/lib/base/bitfield.h"
#include "sw/device/lib/base/mmio.h"
#include "hw/top_earlgrey/sw/autogen/top_earlgrey.h"
#include "otbn_regs.h" // Generated.
#define ASSERT_ERR_BIT_MATCH(enum_val, autogen_val) \
static_assert(enum_val == 1 << (autogen_val), \
"OTBN register bit doesn't match autogen value.");
ASSERT_ERR_BIT_MATCH(kOtbnErrBitsBadDataAddr, OTBN_ERR_BITS_BAD_DATA_ADDR_BIT);
ASSERT_ERR_BIT_MATCH(kOtbnErrBitsBadInsnAddr, OTBN_ERR_BITS_BAD_INSN_ADDR_BIT);
ASSERT_ERR_BIT_MATCH(kOtbnErrBitsCallStack, OTBN_ERR_BITS_CALL_STACK_BIT);
ASSERT_ERR_BIT_MATCH(kOtbnErrBitsIllegalInsn, OTBN_ERR_BITS_ILLEGAL_INSN_BIT);
ASSERT_ERR_BIT_MATCH(kOtbnErrBitsLoop, OTBN_ERR_BITS_LOOP_BIT);
ASSERT_ERR_BIT_MATCH(kOtbnErrBitsImemIntgViolation,
OTBN_ERR_BITS_IMEM_INTG_VIOLATION_BIT);
ASSERT_ERR_BIT_MATCH(kOtbnErrBitsDmemIntgViolation,
OTBN_ERR_BITS_DMEM_INTG_VIOLATION_BIT);
ASSERT_ERR_BIT_MATCH(kOtbnErrBitsRegIntgViolation,
OTBN_ERR_BITS_REG_INTG_VIOLATION_BIT);
ASSERT_ERR_BIT_MATCH(kOtbnErrBitsBusIntgViolation,
OTBN_ERR_BITS_BUS_INTG_VIOLATION_BIT);
ASSERT_ERR_BIT_MATCH(kOtbnErrBitsIllegalBusAccess,
OTBN_ERR_BITS_ILLEGAL_BUS_ACCESS_BIT);
ASSERT_ERR_BIT_MATCH(kOtbnErrBitsLifecycleEscalation,
OTBN_ERR_BITS_LIFECYCLE_ESCALATION_BIT);
ASSERT_ERR_BIT_MATCH(kOtbnErrBitsFatalSoftware,
OTBN_ERR_BITS_FATAL_SOFTWARE_BIT);
const size_t kOtbnDMemSizeBytes = OTBN_DMEM_SIZE_BYTES;
const size_t kOtbnIMemSizeBytes = OTBN_IMEM_SIZE_BYTES;
enum { kBase = TOP_EARLGREY_OTBN_BASE_ADDR };
/**
* Ensures that `offset_bytes` and `len` are valid for a given `mem_size`.
*/
static otbn_error_t check_offset_len(uint32_t offset_bytes, size_t num_words,
size_t mem_size) {
if (offset_bytes + num_words * sizeof(uint32_t) <
num_words * sizeof(uint32_t) ||
offset_bytes + num_words * sizeof(uint32_t) > mem_size) {
return kOtbnErrorBadOffsetLen;
}
return kOtbnErrorOk;
}
void otbn_execute(void) {
mmio_region_write32(mmio_region_from_addr(kBase), OTBN_CMD_REG_OFFSET,
kOtbnCmdExecute);
}
bool otbn_is_busy() {
uint32_t status =
mmio_region_read32(mmio_region_from_addr(kBase), OTBN_STATUS_REG_OFFSET);
return status != kOtbnStatusIdle && status != kOtbnStatusLocked;
}
void otbn_get_err_bits(otbn_err_bits_t *err_bits) {
*err_bits = mmio_region_read32(mmio_region_from_addr(kBase),
OTBN_ERR_BITS_REG_OFFSET);
}
otbn_error_t otbn_imem_write(uint32_t offset_bytes, const uint32_t *src,
size_t num_words) {
OTBN_RETURN_IF_ERROR(
check_offset_len(offset_bytes, num_words, kOtbnIMemSizeBytes));
mmio_region_t otbn_base = mmio_region_from_addr(kBase);
for (size_t i = 0; i < num_words; ++i) {
mmio_region_write32(
otbn_base, OTBN_IMEM_REG_OFFSET + offset_bytes + i * sizeof(uint32_t),
src[i]);
}
return kOtbnErrorOk;
}
otbn_error_t otbn_dmem_write(uint32_t offset_bytes, const uint32_t *src,
size_t num_words) {
OTBN_RETURN_IF_ERROR(
check_offset_len(offset_bytes, num_words, kOtbnDMemSizeBytes));
mmio_region_t otbn_base = mmio_region_from_addr(kBase);
for (size_t i = 0; i < num_words; ++i) {
mmio_region_write32(
otbn_base, OTBN_DMEM_REG_OFFSET + offset_bytes + i * sizeof(uint32_t),
src[i]);
}
return kOtbnErrorOk;
}
otbn_error_t otbn_dmem_read(uint32_t offset_bytes, uint32_t *dest,
size_t num_words) {
OTBN_RETURN_IF_ERROR(
check_offset_len(offset_bytes, num_words, kOtbnDMemSizeBytes));
mmio_region_t otbn_base = mmio_region_from_addr(kBase);
for (size_t i = 0; i < num_words; ++i) {
dest[i] = mmio_region_read32(
otbn_base, OTBN_DMEM_REG_OFFSET + offset_bytes + i * sizeof(uint32_t));
}
return kOtbnErrorOk;
}
void otbn_zero_dmem(void) {
mmio_region_t otbn_base = mmio_region_from_addr(kBase);
for (size_t i = 0; i < kOtbnDMemSizeBytes; i += sizeof(uint32_t)) {
mmio_region_write32(otbn_base, OTBN_DMEM_REG_OFFSET + i, 0u);
}
}
otbn_error_t otbn_set_ctrl_software_errs_fatal(bool enable) {
// Only one bit in the CTRL register so no need to read current value.
uint32_t new_ctrl;
if (enable) {
new_ctrl = 1;
} else {
new_ctrl = 0;
}
mmio_region_t otbn_base = mmio_region_from_addr(kBase);
mmio_region_write32(otbn_base, OTBN_CTRL_REG_OFFSET, new_ctrl);
if (mmio_region_read32(otbn_base, OTBN_CTRL_REG_OFFSET) != new_ctrl) {
return kOtbnErrorUnavailable;
}
return kOtbnErrorOk;
}
|
// Copyright 2016 The Draco Authors.
//
// 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 DRACO_COMPRESSION_MESH_MESH_ENCODER_H_
#define DRACO_COMPRESSION_MESH_MESH_ENCODER_H_
#include "compression/attributes/mesh_attribute_indices_encoding_data.h"
#include "compression/point_cloud/point_cloud_encoder.h"
#include "mesh/mesh.h"
#include "mesh/mesh_attribute_corner_table.h"
namespace draco {
// Abstract base class for all mesh encoders. It provides some basic
// funcionality that's shared between different encoders.
class MeshEncoder : public PointCloudEncoder {
public:
MeshEncoder();
// Sets the mesh that is going be encoded. Must be called before the Encode()
// method.
void SetMesh(const Mesh &m);
EncodedGeometryType GetGeometryType() const override {
return TRIANGULAR_MESH;
}
// Returns the base connectivity of the encoded mesh (or nullptr if it is not
// initialized).
virtual const CornerTable *GetCornerTable() const { return nullptr; }
// Returns the attribute connectivity data or nullptr if it does not exist.
virtual const MeshAttributeCornerTable *GetAttributeCornerTable(
int /* att_id */) const {
return nullptr;
}
// Returns the encoding data for a given attribute or nullptr when the data
// does not exist.
virtual const MeshAttributeIndicesEncodingData *GetAttributeEncodingData(
int /* att_id */) const {
return nullptr;
}
const Mesh *mesh() const { return mesh_; }
protected:
bool EncodeGeometryData() override;
// Needs to be implemented by the derived classes.
virtual bool EncodeConnectivity() = 0;
// TODO(ostava): Prediction schemes need refactoring.
/*
// This method should be overriden by derived class to perform custom
// initialization of various prediction schemes.
virtual bool InitPredictionSchemeInternal(
const MeshAttributeEncoder *att_encoder,
PredictionSchemeInterface *scheme) {
return true;
}
*/
void set_mesh(const Mesh *mesh) { mesh_ = mesh; }
private:
const Mesh *mesh_;
};
} // namespace draco
#endif // DRACO_COMPRESSION_MESH_MESH_ENCODER_H_
|
//
// Pack API
//
//
// Copyright (C) 2016 Peter Niekamp
//
#pragma once
#include "api.h"
#include "documentapi.h"
#include <fstream>
#if defined(PACKPLUGIN)
# define PACKPLUGIN_EXPORT Q_DECL_EXPORT
#else
# define PACKPLUGIN_EXPORT Q_DECL_IMPORT
#endif
namespace Studio
{
struct PackerState
{
uint32_t id;
QString name;
QString type;
unique_document document;
uint32_t index;
std::string buildpath;
virtual uint32_t add_dependant(Studio::Document *document, QString type) = 0;
virtual uint32_t add_dependant(Studio::Document *document, uint32_t index, QString type) = 0;
};
//-------------------------- PackManager ------------------------------------
//---------------------------------------------------------------------------
class PACKPLUGIN_EXPORT PackManager : public QObject
{
Q_OBJECT
public:
virtual void register_packer(QString const &type, QObject *packer) = 0;
protected:
virtual ~PackManager() { }
};
}
|
//===--- RefactoringOperationState.h - Serializable operation state -------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file defines the refactoring operation state types that represent the
// TU-independent state that is used for refactoring continuations.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_CLANG_TOOLING_REFACTOR_REFACTORING_OPERATION_STATE_H
#define LLVM_CLANG_TOOLING_REFACTOR_REFACTORING_OPERATION_STATE_H
#include "clang/AST/Decl.h"
#include "clang/Basic/LLVM.h"
#include "clang/Tooling/Refactor/USRFinder.h"
#include <string>
#include <type_traits>
namespace clang {
namespace tooling {
namespace detail {
struct PersistentDeclRefBase {};
} // end namespace detail
/// Declaration references are persisted across translation units by using
/// USRs.
template <typename T>
struct PersistentDeclRef : std::enable_if<std::is_base_of<Decl, T>::value,
detail::PersistentDeclRefBase>::type {
std::string USR;
// FIXME: We can improve the efficiency of conversion to Decl * by storing the
// decl kind.
PersistentDeclRef(std::string USR) : USR(std::move(USR)) {}
PersistentDeclRef(PersistentDeclRef &&Other) = default;
PersistentDeclRef &operator=(PersistentDeclRef &&Other) = default;
PersistentDeclRef(const PersistentDeclRef &Other) = default;
PersistentDeclRef &operator=(const PersistentDeclRef &Other) = default;
static PersistentDeclRef<T> create(const Decl *D) {
// FIXME: Move the getUSRForDecl method somewhere else.
return PersistentDeclRef<T>(rename::getUSRForDecl(D));
}
};
/// FileIDs are persisted across translation units by using filenames.
struct PersistentFileID {
std::string Filename;
PersistentFileID(std::string Filename) : Filename(std::move(Filename)) {}
PersistentFileID(PersistentFileID &&Other) = default;
PersistentFileID &operator=(PersistentFileID &&Other) = default;
};
} // end namespace tooling
} // end namespace clang
#endif // LLVM_CLANG_TOOLING_REFACTOR_REFACTORING_OPERATION_STATE_H
|
#pragma once
#include "il2cpp-config.h"
#ifndef _MSC_VER
# include <alloca.h>
#else
# include <malloc.h>
#endif
#include <stdint.h>
#include <assert.h>
#include <exception>
// System.Array
struct Il2CppArray;
// System.Object
struct Il2CppObject;
#include "codegen/il2cpp-codegen.h"
#include "mscorlib_System_Array_InternalEnumerator_1_gen2762836567.h"
#include "mscorlib_System_Array2840145358.h"
// System.Void System.Array/InternalEnumerator`1<System.SByte>::.ctor(System.Array)
extern "C" void InternalEnumerator_1__ctor_m1925586605_gshared (InternalEnumerator_1_t2762836567 * __this, Il2CppArray * ___array, const MethodInfo* method);
#define InternalEnumerator_1__ctor_m1925586605(__this, ___array, method) (( void (*) (InternalEnumerator_1_t2762836567 *, Il2CppArray *, const MethodInfo*))InternalEnumerator_1__ctor_m1925586605_gshared)(__this, ___array, method)
// System.Void System.Array/InternalEnumerator`1<System.SByte>::System.Collections.IEnumerator.Reset()
extern "C" void InternalEnumerator_1_System_Collections_IEnumerator_Reset_m3343201747_gshared (InternalEnumerator_1_t2762836567 * __this, const MethodInfo* method);
#define InternalEnumerator_1_System_Collections_IEnumerator_Reset_m3343201747(__this, method) (( void (*) (InternalEnumerator_1_t2762836567 *, const MethodInfo*))InternalEnumerator_1_System_Collections_IEnumerator_Reset_m3343201747_gshared)(__this, method)
// System.Object System.Array/InternalEnumerator`1<System.SByte>::System.Collections.IEnumerator.get_Current()
extern "C" Il2CppObject * InternalEnumerator_1_System_Collections_IEnumerator_get_Current_m1022211391_gshared (InternalEnumerator_1_t2762836567 * __this, const MethodInfo* method);
#define InternalEnumerator_1_System_Collections_IEnumerator_get_Current_m1022211391(__this, method) (( Il2CppObject * (*) (InternalEnumerator_1_t2762836567 *, const MethodInfo*))InternalEnumerator_1_System_Collections_IEnumerator_get_Current_m1022211391_gshared)(__this, method)
// System.Void System.Array/InternalEnumerator`1<System.SByte>::Dispose()
extern "C" void InternalEnumerator_1_Dispose_m2750196932_gshared (InternalEnumerator_1_t2762836567 * __this, const MethodInfo* method);
#define InternalEnumerator_1_Dispose_m2750196932(__this, method) (( void (*) (InternalEnumerator_1_t2762836567 *, const MethodInfo*))InternalEnumerator_1_Dispose_m2750196932_gshared)(__this, method)
// System.Boolean System.Array/InternalEnumerator`1<System.SByte>::MoveNext()
extern "C" bool InternalEnumerator_1_MoveNext_m4134001983_gshared (InternalEnumerator_1_t2762836567 * __this, const MethodInfo* method);
#define InternalEnumerator_1_MoveNext_m4134001983(__this, method) (( bool (*) (InternalEnumerator_1_t2762836567 *, const MethodInfo*))InternalEnumerator_1_MoveNext_m4134001983_gshared)(__this, method)
// T System.Array/InternalEnumerator`1<System.SByte>::get_Current()
extern "C" int8_t InternalEnumerator_1_get_Current_m92522612_gshared (InternalEnumerator_1_t2762836567 * __this, const MethodInfo* method);
#define InternalEnumerator_1_get_Current_m92522612(__this, method) (( int8_t (*) (InternalEnumerator_1_t2762836567 *, const MethodInfo*))InternalEnumerator_1_get_Current_m92522612_gshared)(__this, method)
|
/* -------------------------------------------------------------------------- */
/* Copyright 2002-2020, OpenNebula Project, OpenNebula Systems */
/* */
/* 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 QUOTA_VIRTUALMACHINE_H_
#define QUOTA_VIRTUALMACHINE_H_
#include "Quota.h"
/**
* VM Quotas, defined as:
* VM = [
* VMS = <Max. number of VMs>
* RUNNING_VMS = <Max. number of RUNNING VMS>
* MEMORY = <Max. number of MB requested by VMs>
* RUNNING_MEMORY = <Max. number of MB requested by RUNNING VMs>
* CPU = <Max. number of CPU units requested by VMs>
* RUNNING_CPU = <Max. number of running CPU units requested by VMs>
* SYSTEM_DISK_SIZE = <Max. number of system disk MB>
* VMS_USED = Current number of VMs
* RUNNING_VMS_USED = Current number of running VMs
* MEMORY_USED = Overall Memory requested
* RUNNING_MEMORY_USED = Overall running Memory requested
* CPU_USED = Overall CPU requested
* RUNNING_CPU_USED = Overall running CPU requested
* SYSTEM_DISK_SIZE_USED = Overall system disk requested
* ]
*
* 0 = unlimited, default if missing
*/
class QuotaVirtualMachine : public Quota
{
public:
QuotaVirtualMachine(bool is_default):
Quota("VM_QUOTA",
"VM",
VM_METRICS,
NUM_VM_METRICS,
is_default)
{};
~QuotaVirtualMachine(){};
/**
* Check if the resource allocation will exceed the quota limits. If not
* the usage counters are updated
* @param tmpl template for the resource
* @param default_quotas Quotas that contain the default limits
* @param error string
* @return true if the operation can be performed
*/
bool check(Template* tmpl, Quotas& default_quotas, std::string& error);
/**
* Check if the resource update (change in MEMORY or CPU) will exceed the
* quota limits. If not the usage counters are updated
* @param tmpl with increments in MEMORY and CPU
* @param default_quotas Quotas that contain the default limits
* @param error string
* @return true if the operation can be performed
*/
bool update(Template * tmpl, Quotas& default_quotas, std::string& error);
/**
* Decrement usage counters when deallocating image
* @param tmpl template for the resource
*/
void del(Template* tmpl);
/**
* Gets a quota, overrides base to not to use ID.
* @param id of the quota, ignored
* @param va The quota
*
* @return a pointer to the quota or 0 if not found
*/
int get_quota(const std::string& id, VectorAttribute **va);
protected:
/**
* Gets a quota, overrides base to not to use ID.
*
* @param id of the quota, ignored
* @param va The quota
* @param it The quota iterator, if it is found
*
* @return 0 on success, -1 if not found
*/
int get_quota(
const std::string& id,
VectorAttribute **va,
std::map<std::string, Attribute *>::iterator& it)
{
it = attributes.begin();
return get_quota(id, va);
}
/**
* Gets the default quota identified by its ID.
*
* @param id of the quota
* @param default_quotas Quotas that contain the default limits
* @param va The quota, if it is found
*
* @return 0 on success, -1 if not found
*/
int get_default_quota(
const std::string& id,
Quotas& default_quotas,
VectorAttribute **va);
static const char * VM_METRICS[];
static const int NUM_VM_METRICS;
};
#endif /*QUOTA_VIRTUALMACHINE_H_*/
|
#pragma once
#include "il2cpp-config.h"
#ifndef _MSC_VER
# include <alloca.h>
#else
# include <malloc.h>
#endif
#include <stdint.h>
#include <assert.h>
#include <exception>
// System.Security.Cryptography.X509Certificates.X500DistinguishedName
struct X500DistinguishedName_t2501850825;
// System.Byte[]
struct ByteU5BU5D_t58506160;
// System.String
struct String_t;
#include "codegen/il2cpp-codegen.h"
#include "System_System_Security_Cryptography_X509Certificate504749004.h"
#include "mscorlib_System_String968488902.h"
#include "System_System_Security_Cryptography_X509Certificat2501850825.h"
// System.Void System.Security.Cryptography.X509Certificates.X500DistinguishedName::.ctor(System.Byte[])
extern "C" void X500DistinguishedName__ctor_m1884931640 (X500DistinguishedName_t2501850825 * __this, ByteU5BU5D_t58506160* ___encodedDistinguishedName, const MethodInfo* method) IL2CPP_METHOD_ATTR;
// System.String System.Security.Cryptography.X509Certificates.X500DistinguishedName::Decode(System.Security.Cryptography.X509Certificates.X500DistinguishedNameFlags)
extern "C" String_t* X500DistinguishedName_Decode_m1854433232 (X500DistinguishedName_t2501850825 * __this, int32_t ___flag, const MethodInfo* method) IL2CPP_METHOD_ATTR;
// System.String System.Security.Cryptography.X509Certificates.X500DistinguishedName::GetSeparator(System.Security.Cryptography.X509Certificates.X500DistinguishedNameFlags)
extern "C" String_t* X500DistinguishedName_GetSeparator_m1820431761 (Il2CppObject * __this /* static, unused */, int32_t ___flag, const MethodInfo* method) IL2CPP_METHOD_ATTR;
// System.Void System.Security.Cryptography.X509Certificates.X500DistinguishedName::DecodeRawData()
extern "C" void X500DistinguishedName_DecodeRawData_m2106660211 (X500DistinguishedName_t2501850825 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR;
// System.String System.Security.Cryptography.X509Certificates.X500DistinguishedName::Canonize(System.String)
extern "C" String_t* X500DistinguishedName_Canonize_m3238640877 (Il2CppObject * __this /* static, unused */, String_t* ___s, const MethodInfo* method) IL2CPP_METHOD_ATTR;
// System.Boolean System.Security.Cryptography.X509Certificates.X500DistinguishedName::AreEqual(System.Security.Cryptography.X509Certificates.X500DistinguishedName,System.Security.Cryptography.X509Certificates.X500DistinguishedName)
extern "C" bool X500DistinguishedName_AreEqual_m3926647407 (Il2CppObject * __this /* static, unused */, X500DistinguishedName_t2501850825 * ___name1, X500DistinguishedName_t2501850825 * ___name2, const MethodInfo* method) IL2CPP_METHOD_ATTR;
|
/*
* Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
*/
#ifndef __IFMAP_STATE_MACHINE_H__
#define __IFMAP_STATE_MACHINE_H__
#include <boost/asio/deadline_timer.hpp>
#include <boost/statechart/state_machine.hpp>
#include "base/queue_task.h"
namespace sc = boost::statechart;
class IFMapChannel;
class IFMapManager;
namespace ifsm {
struct EvStart;
struct Idle;
struct EvReadSuccess;
}
class IFMapStateMachine :
public sc::state_machine<IFMapStateMachine, ifsm::Idle> {
public:
static const int kConnectInterval;
static const int kResponseWaitInterval;
enum State {
IDLE = 0,
SERVERRESOLVE = 1,
SSRCCONNECT = 2,
SSRCSSLHANDSHAKE = 3,
SENDNEWSESSION = 4,
NEWSESSIONRESPONSEWAIT = 5,
SENDSUBSCRIBE = 6,
SUBSCRIBERESPONSEWAIT = 7,
ARCCONNECT = 8,
ARCSSLHANDSHAKE = 9,
SENDPOLL = 10,
POLLRESPONSEWAIT = 11,
SSRCSTART = 12,
CONNECTTIMERWAIT = 13
// Add an entry to state_names[] if you add an entry here
};
IFMapStateMachine(IFMapManager *manager);
void Initialize();
int GetConnectTime(bool is_ssrc) const;
void StartConnectTimer(int seconds);
void StopConnectTimer();
void ConnectTimerExpired(const boost::system::error_code& error);
void StartResponseTimer();
void StopResponseTimer();
void ResponseTimerExpired(const boost::system::error_code& error);
void Start();
void ProcConnectionCleaned();
void ProcResolveResponse(const boost::system::error_code& error);
void ProcConnectResponse(const boost::system::error_code& error);
void ProcHandshakeResponse(const boost::system::error_code& error);
void ProcNewSessionWrite(const boost::system::error_code& error,
size_t bytes_transferred);
void ProcNewSessionResponse(const boost::system::error_code& error,
size_t bytes_transferred);
void ProcSubscribeWrite(const boost::system::error_code& error,
size_t bytes_transferred);
void ProcSubscribeResponse(const boost::system::error_code& error,
size_t bytes_transferred);
void ProcSubscribeResponseStr(bool error, std::string resp_str);
void ProcPollWrite(const boost::system::error_code& error,
size_t bytes_transferred);
void ProcPollResponseRead(const boost::system::error_code& error,
size_t bytes_transferred);
void ProcPollRespBodyRead(const boost::system::error_code& error,
size_t bytes_transferred);
void ProcResponse(const boost::system::error_code& error,
size_t bytes_transferred);
void set_channel(IFMapChannel *channel) {
channel_ = channel;
}
void ssrc_connect_attempts_inc() { ssrc_connect_attempts_++; }
void ssrc_connect_attempts_clear() { ssrc_connect_attempts_ = 0; }
void arc_connect_attempts_inc() { arc_connect_attempts_++; }
void arc_connect_attempts_clear() { arc_connect_attempts_ = 0; }
int connection_attempts_get() { return connection_attempts_; }
void OnStart(const ifsm::EvStart &event);
bool DequeueEvent(boost::intrusive_ptr<const sc::event_base> &event);
IFMapChannel *channel() { return channel_; }
void set_state(State state);
State state() { return state_; }
State last_state() { return last_state_; }
const std::string &StateName() const;
const std::string &LastStateName() const;
const std::string &StateName(State state) const;
const std::string last_state_change_at() const;
void set_last_event(const std::string &event);
const std::string &last_event() const { return last_event_; }
const std::string last_event_at() const;
private:
void EnqueueEvent(const sc::event_base &ev);
bool ProcErrorAndIgnore(const boost::system::error_code& error);
void connection_attempts_inc() { connection_attempts_++; }
void connection_attempts_clear() { connection_attempts_ = 0; }
IFMapManager *manager_;
boost::asio::deadline_timer connect_timer_;
int ssrc_connect_attempts_;
int arc_connect_attempts_;
// used to limit the wait time for a response
boost::asio::deadline_timer response_timer_;
// how many times we timed out waiting for a response
int connection_attempts_;
IFMapChannel *channel_;
WorkQueue<boost::intrusive_ptr<const sc::event_base> > work_queue_;
State state_;
State last_state_;
uint64_t last_state_change_at_;
std::string last_event_;
uint64_t last_event_at_;
};
#endif /* __IFMAP_STATE_MACHINE_H__ */
|
/*
Copyright 2011-2012 StormMQ Limited
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 "Context/Context.h"
#include "Transport/LowLevel/EventLoop.h"
typedef void (*livev_event_handler_t)(amqp_event_loop_t *loop, ev_io* io, const int revents);
void amqp_io_event_watcher_adjust_priority(amqp_io_event_watcher_t *watcher, int amount)
{
ev_set_priority((ev_io *) watcher, amount);
}
void amqp_io_event_watcher_start(amqp_io_event_watcher_t *watcher)
{
assert(watcher != 0 && watcher->loop != 0);
ev_io_start(watcher->loop, &watcher->io);
}
void amqp_io_event_watcher_stop(amqp_io_event_watcher_t *watcher)
{
assert(watcher != 0);
assert(watcher->loop != 0);
ev_io_stop(watcher->loop, &watcher->io);
}
amqp_io_event_watcher_t *amqp_io_event_watcher_initialize(amqp_context_t *context, amqp_event_loop_t *loop, amqp_event_handler_t handler, int fd, const int revents)
{
amqp_io_event_watcher_t *result = AMQP_MALLOC(context, amqp_io_event_watcher_t);
result->context = context;
result->loop = loop;
ev_io_init((ev_io *) result, (livev_event_handler_t) handler, fd, revents);
return result;
}
void amqp_io_event_watcher_cb_set(amqp_io_event_watcher_t *watcher, amqp_event_handler_t handler)
{
ev_set_cb((ev_io *) watcher, (livev_event_handler_t) handler);
}
void amqp_io_event_watcher_destroy(amqp_context_t *context, amqp_io_event_watcher_t *watcher)
{
amqp_io_event_watcher_stop(watcher);
AMQP_FREE(context, watcher);
}
|
editCreateWorkout: editorButtons: deleteIcon
Set Variable [ $delete; Value:Right ( Get ( ActiveLayoutObjectName ) ; 2 ) ]
Go to Object [ Object Name: "segment" & $delete ]
If [ Get ( ActiveFieldContents ) = "" ]
Go to Field [ ]
Set Variable [ $delete ]
Refresh Window
Exit Script [ ]
End If
Show Custom Dialog [ Message: "delete icon or segement? If you delete icon the segement stays. If you delete the segement all
other segements move over to close the gap."; Buttons: “cancel”, “x icon”, “x segement” ]
If [ Get ( LastMessageChoice ) = 3 ]
Show Custom Dialog [ Message: "Are you sure you want delete this segement and move all the other segements over to fill in its
gap?"; Buttons: “cancel”, “x segment” ]
If [ Get ( LastMessageChoice ) = 2 ]
Set Variable [ $workout; Value:activity::_Lactivity ]
New Window [ Height: 1; Width: 1; Top: -1000; Left: -1000 ]
// New Window [ ]
Go to Layout [ “WorkoutSegment” (segment01) ]
Enter Find Mode [ ]
Set Field [ segment01::kworkout; $workout ]
Set Field [ segment01::SegmentNumber; $delete ]
Perform Find [ ]
Delete Record/Request
[ No dialog ]
#
#Close gap by re-numbering all segments.
Enter Find Mode [ ]
Set Field [ segment01::kworkout; $workout ]
Perform Find [ ]
Go to Record/Request/Page
[ First ]
Set Variable [ $segment; Value:1 ]
Loop
Set Field [ segment01::SegmentNumber; If ($segment < 10 ; "0" & $segment ; $segment ) ]
Set Variable [ $segment; Value:segment01::SegmentNumber + 1 ]
Go to Record/Request/Page
[ Next; Exit after last ]
End Loop
Close Window [ Current Window ]
Go to Field [ ]
Refresh Window
Exit Script [ ]
End If
End If
Go to Field [ ]
Refresh Window
Show Custom Dialog [ Message: "delete icon?"; Buttons: “OK”, “Cancel” ]
If [ Get ( LastMessageChoice ) = 1 ]
Go to Object [ Object Name: "icon" & $delete ]
Set Field [ "" ]
Go to Field [ ]
End If
January 8, 平成26 12:53:13 Fat and Muscle Efficiency Research.fp7 - deleteIcon -1-editCreateWorkout: editorButtons: deleteIcon
Set Variable [ $delete ]
Refresh Window
January 8, 平成26 12:53:13 Fat and Muscle Efficiency Research.fp7 - deleteIcon -2-
|
#pragma once
#include "cocos2d.h"
|
//
// OOHttpRequestConfig.h
// 链式网络请求
//
// Created by feng on 2017/9/15.
// Copyright © 2017年 皮蛋. All rights reserved.
//
#import <Foundation/Foundation.h>
typedef NS_ENUM(NSInteger, OORequestMethod) {
/** GET */
OORequestMethodGET = 1,
/** POST */
OORequestMethodPOST,
/** UPLOAD */
OORequestMethodUPLOAD,
/** DOWNLOAD */
OORequestMethodDOWNLOAD
};
@interface OOHttpRequestConfig : NSObject
//默认配置
+ (instancetype)defultCongfig;
@property (nonatomic,copy) NSString * baseUrl;
//请求地址
@property (nonatomic, copy) NSString * url;
//请求地址说明
@property (nonatomic, copy) NSString * urlExplain;
//请求方式
@property (nonatomic, assign) OORequestMethod method;
//请求参数
@property (nonatomic, strong) NSDictionary * param;
// 是否打印log信息
@property (nonatomic, assign) BOOL log;
// 需要处理的数据数组
@property (nonatomic, strong) NSArray * dataArray;
/********************** 上传图片 ******************************/
// 需要上传的图片data数组
@property (nonatomic, strong) NSArray * imageDatas;
// 服务器对应的图片的key
@property (nonatomic, copy) NSString * attach;
/********************** 缓存 ******************************/
//是否缓存数据
@property (nonatomic, assign) BOOL cache;
// 缓存过期时间 默认: 60*60*24*7
@property (nonatomic,assign) NSTimeInterval cacheMaxAge;
// 同一个请求间隔多长时间才能重新请求(用于缓存) 默认:30s
@property (nonatomic,assign) NSTimeInterval requestMinTime;
/********************** HUD ******************************/
@property (nonatomic, assign) BOOL hud;
@property (nonatomic,copy) NSString * loadingMsg;
@property (nonatomic,copy) NSString * succMsg;
@property (nonatomic,copy) NSString * failureMsg;
//链式编程体验
- (OOHttpRequestConfig *(^)(BOOL isHud))isHud;
- (OOHttpRequestConfig *(^)(NSString * string))loadingmsg;
- (OOHttpRequestConfig *(^)(NSString * string))succmsg;
- (OOHttpRequestConfig *(^)(NSString * string))failuremsg;
- (OOHttpRequestConfig *(^)(NSString * string))urlStr;
- (OOHttpRequestConfig *(^)(NSString * string))explain;
- (OOHttpRequestConfig *(^)(NSString * string))baseURL;
- (OOHttpRequestConfig *(^)(OORequestMethod methodType))methodType;
- (OOHttpRequestConfig *(^)(BOOL isCache))isCache;
- (OOHttpRequestConfig *(^)(BOOL isLog))isLog;
- (OOHttpRequestConfig *(^)(NSDictionary *parameters))parameters;
- (OOHttpRequestConfig *(^)(NSArray * array))array;
- (OOHttpRequestConfig *(^)(NSArray * images))images;
- (OOHttpRequestConfig *(^)(NSString *imageKey))imageKey;
- (OOHttpRequestConfig *(^)(NSTimeInterval time))cachetime;
- (OOHttpRequestConfig *(^)(NSTimeInterval time))requesttime;
@end
|
//******************************************************************
//
// Copyright 2014 Intel Corporation.
//
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
//
// 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 <stdlib.h>
#include <math.h>
#include "mraa.h"
#define ONBOARD_LED_PIN 13
#define TEMPERATURE_AIO_PIN 0
#define LIGHT_SENSOR_AIO_PIN 2
namespace Sensors
{
mraa_gpio_context led_gpio = NULL;
mraa_aio_context tmp_aio = NULL;
mraa_aio_context light_aio = NULL;
inline void SetupPins()
{
led_gpio = mraa_gpio_init(ONBOARD_LED_PIN); // Initialize pin 13
if (led_gpio != NULL)
mraa_gpio_dir(led_gpio, MRAA_GPIO_OUT); // Set direction to OUTPUT
tmp_aio = mraa_aio_init(TEMPERATURE_AIO_PIN); // initialize pin 0
light_aio = mraa_aio_init(LIGHT_SENSOR_AIO_PIN); // initialize pin 2
}
inline void ClosePins()
{
mraa_gpio_close(led_gpio);
mraa_aio_close(tmp_aio);
mraa_aio_close(light_aio);
}
inline void SetOnboardLed(int on)
{
if (led_gpio == NULL)
{
led_gpio = mraa_gpio_init(ONBOARD_LED_PIN); // Initialize pin 13
if (led_gpio != NULL)
mraa_gpio_dir(led_gpio, MRAA_GPIO_OUT); // Set direction to OUTPUT
}
if (led_gpio != NULL)
mraa_gpio_write(led_gpio, on); // Writes into GPIO
}
inline float GetTemperatureInC()
{
float ret = 0;
if (tmp_aio == NULL)
{
tmp_aio = mraa_aio_init(TEMPERATURE_AIO_PIN); // initialize pin 0
}
if (tmp_aio != NULL)
{
uint16_t adc_value = mraa_aio_read(tmp_aio); // read the raw value
//convert reading to temperature
float beta = 4090.0; //the beta of the thermistor, magic number
ret = beta / (log((4095.0 * 10 / adc_value - 10) / 10) + beta / 298.0) - 273.0;
}
return ret;
}
// This function returns light level between 0 and 4095
inline int GetLightLevel()
{
uint16_t adc_value = 0;
if (light_aio == NULL)
light_aio = mraa_aio_init(LIGHT_SENSOR_AIO_PIN); // initialize pin 2
if (light_aio != NULL)
adc_value = mraa_aio_read(light_aio); // read the raw value
return adc_value;
}
}
|
/*!The Treasure Box Library
*
* 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.
*
* Copyright (C) 2009-present, TBOOX Open Source Group.
*
* @author ruki
* @file exception.h
*
*/
#ifndef TB_PLATFORM_IMPL_EXCEPTION_H
#define TB_PLATFORM_IMPL_EXCEPTION_H
/* //////////////////////////////////////////////////////////////////////////////////////
* includes
*/
#include "prefix.h"
/* //////////////////////////////////////////////////////////////////////////////////////
* extern
*/
__tb_extern_c_enter__
/* //////////////////////////////////////////////////////////////////////////////////////
* interfaces
*/
/* init the exception environment
*
* @return tb_true or tb_false
*/
tb_bool_t tb_exception_init_env(tb_noarg_t);
// exit the exception environment
tb_void_t tb_exception_exit_env(tb_noarg_t);
/* //////////////////////////////////////////////////////////////////////////////////////
* extern
*/
__tb_extern_c_leave__
#endif
|
//
// YT_ResponseModel.h
// interview
//
// Created by 于波 on 16/3/31.
// Copyright © 2016年 于波. All rights reserved.
//
#import <Foundation/Foundation.h>
@class YT_DataModel;
@interface YT_ResponseModel : NSObject
YT_Singleton_H(Model)
@property (nonatomic,copy)NSString *code;
@property (nonatomic,copy)NSString *msg;
@property (nonatomic,strong)YT_DataModel *data;
@end
|
// Copyright 2017 Google Inc.
//
// 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 EXEGESIS_X86_MICROARCHITECTURES_H_
#define EXEGESIS_X86_MICROARCHITECTURES_H_
#include "exegesis/base/microarchitecture.h"
namespace exegesis {
namespace x86 {
// For tests only. These functions return a CPU model that belongs to the
// microarchitecture in the name of the function. They are sorted in reverse
// chronological order.
extern const char* const kExampleSkylakeCpuModelId;
extern const char* const kExampleBroadwellCpuModelId;
extern const char* const kExampleHaswellCpuModelId;
extern const char* const kExampleIvyBridgeCpuModelId;
extern const char* const kExampleSandyBridgeCpuModelId;
extern const char* const kExampleWestmereCpuModelId;
extern const char* const kExampleNehalemCpuModelId;
// The microarchitectures in reverse chronological order.
inline const MicroArchitecture& SkylakeMicroArchitecture() {
return MicroArchitecture::FromIdOrDie("skl");
}
inline const MicroArchitecture& BroadwellMicroArchitecture() {
return MicroArchitecture::FromIdOrDie("bdw");
}
inline const MicroArchitecture& HaswellMicroArchitecture() {
return MicroArchitecture::FromIdOrDie("hsw");
}
inline const MicroArchitecture& IvyBridgeMicroArchitecture() {
return MicroArchitecture::FromIdOrDie("snb");
}
inline const MicroArchitecture& SandyBridgeMicroArchitecture() {
return MicroArchitecture::FromIdOrDie("snb");
}
inline const MicroArchitecture& WestmereMicroArchitecture() {
return MicroArchitecture::FromIdOrDie("wsm");
}
inline const MicroArchitecture& NehalemMicroArchitecture() {
return MicroArchitecture::FromIdOrDie("nhm");
}
} // namespace x86
} // namespace exegesis
#endif // EXEGESIS_X86_MICROARCHITECTURES_H_
|
//
// LFPayTipView.h
// LaFeng
//
// Created by 阮明森 on 15/12/8.
// Copyright © 2015年 rms. All rights reserved.
//
#import <UIKit/UIKit.h>
@class LFPayTipView;
@protocol LFPayTipViewDelegate<NSObject>
-(void)LFPayTipView:(UIView *)payTipView closeBtnDidClick:(UIButton *)closeBtn;
@end
@interface LFPayTipView : UIView
@property(nonatomic,weak) id<LFPayTipViewDelegate> del;
+(instancetype)payTipView;
@end
|
//
// PurchaseViewController.h
// FootGame
//
// Created by Owyn Richen on 12/5/12.
//
//
#import <UIKit/UIKit.h>
#import "PromotionCodeManager.h"
#import "InAppPurchaseManager.h"
@protocol PurchaseViewDelegate <NSObject>
@optional
-(BOOL) cancelClicked: (BOOL) buying;
-(BOOL) purchaseFinished: (BOOL) success;
@end
@interface PurchaseViewController : UIViewController<PurchaseDelegate, PromotionCodeDelegate> {
BOOL buying;
SKProduct *product;
SKProduct *upsellProduct;
id<PurchaseViewDelegate> delegate;
SKProduct *currentProduct;
CGRect originalFrame;
}
@property (nonatomic, readonly) IBOutlet UILabel *titleLabel;
@property (nonatomic, readonly) IBOutlet UILabel *productName;
@property (nonatomic, readonly) IBOutlet UILabel *productCost;
@property (nonatomic, readonly) IBOutlet UILabel *upsellProductName;
@property (nonatomic, readonly) IBOutlet UITextField *promoCodeField;
@property (nonatomic, readonly) IBOutlet UIButton *buyButton;
@property (nonatomic, readonly) IBOutlet UIButton *buyAllButton;
@property (nonatomic, readonly) IBOutlet UIButton *cancelButton;
@property (nonatomic, readonly) IBOutlet UIActivityIndicatorView *buyActivity;
-(id) initWithProduct: (SKProduct *) product upsellProduct: (SKProduct *) upsell delegate: (id<PurchaseViewDelegate>) del;
-(void) purchaseStarted;
-(void) purchaseSucceeded: (NSString *) productId;
-(void) purchaseFailed: (NSString *) productId;
-(void) usePromotionCodeStarted: (Promotion *) promo;
-(void) usePromotionCodeSuccess: (Promotion *) promo success: (BOOL) successful;
-(void) usePromotionCodeError: (Promotion *) promo error: (NSError *) error;
-(IBAction) buyClick: (id) sender;
-(IBAction) buyAllClick:(id)sender;
-(IBAction) cancelClick: (id) sender;
+(PurchaseViewController *) handleProductsRetrievedWithDelegate: (id<PurchaseViewDelegate>) del products: (NSArray *) products withProductId: (NSString *) productId upsell: (NSString *) upsellId;
+(void) handleProductsRetrievedFail;
@end
|
/* src/config.h. Generated from config.h.in by configure. */
/* src/config.h.in. Generated from configure.ac by autoheader. */
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define to 1 if you have the `memset' function. */
#define HAVE_MEMSET 1
/* Define to 1 if stdbool.h conforms to C99. */
#define HAVE_STDBOOL_H 1
/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the `strcasecmp' function. */
#define HAVE_STRCASECMP 1
/* Define to 1 if you have the `strchr' function. */
#define HAVE_STRCHR 1
/* Define to 1 if you have the `strdup' function. */
#define HAVE_STRDUP 1
/* Define to 1 if you have the `strerror' function. */
#define HAVE_STRERROR 1
/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define to 1 if you have the `strtol' function. */
#define HAVE_STRTOL 1
/* Define to 1 if you have the `strtoul' function. */
#define HAVE_STRTOUL 1
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Define to 1 if you have the <utime.h> header file. */
#define HAVE_UTIME_H 1
/* Define to 1 if the system has the type `_Bool'. */
#define HAVE__BOOL 1
/* Name of package */
#define PACKAGE "uncrustify"
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT ""
/* Define to the full name of this package. */
#define PACKAGE_NAME "uncrustify"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "uncrustify 0.61"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "uncrustify"
/* Define to the home page for this package. */
#define PACKAGE_URL "http://uncrustify.sourceforge.net/"
/* Define to the version of this package. */
#define PACKAGE_VERSION "0.61"
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Version number of package */
#define VERSION "0.61"
/* Define to appropriate substitue if compiler doesnt have __func__ */
/* #undef __func__ */
/* Define to empty if `const' does not conform to ANSI C. */
/* #undef const */
/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
#ifndef __cplusplus
/* #undef inline */
#endif
|
// Copyright 2014 Technical Machine, Inc. See the COPYRIGHT
// file at the top-level directory of this distribution.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#define CMSIS_BITPOSITIONS
#include "LPC18xx.h"
#include "bootloader.h"
void jump_to_flash(void* addr_p, uint32_t r0_val) {
uint32_t *addr = addr_p;
__disable_irq();
// Disable SysTick
SysTick->CTRL = 0;
// Reset peripherals
LPC_RGU->RESET_CTRL0 =
( RGU_RESET_CTRL0_USB0_RST_Msk
| RGU_RESET_CTRL0_DMA_RST_Msk
| RGU_RESET_CTRL0_SDIO_RST_Msk
| RGU_RESET_CTRL0_EMC_RST_Msk
| RGU_RESET_CTRL0_ETHERNET_RST_Msk
| RGU_RESET_CTRL0_GPIO_RST_Msk
);
LPC_RGU->RESET_CTRL1 =
( RGU_RESET_CTRL1_TIMER0_RST_Msk
| RGU_RESET_CTRL1_TIMER1_RST_Msk
| RGU_RESET_CTRL1_TIMER2_RST_Msk
| RGU_RESET_CTRL1_TIMER3_RST_Msk
| RGU_RESET_CTRL1_RITIMER_RST_Msk
| RGU_RESET_CTRL1_SCT_RST_Msk
| RGU_RESET_CTRL1_MOTOCONPWM_RST_Msk
| RGU_RESET_CTRL1_QEI_RST_Msk
| RGU_RESET_CTRL1_ADC0_RST_Msk
| RGU_RESET_CTRL1_ADC1_RST_Msk
| RGU_RESET_CTRL1_DAC_RST_Msk
| RGU_RESET_CTRL1_UART0_RST_Msk
| RGU_RESET_CTRL1_UART1_RST_Msk
| RGU_RESET_CTRL1_UART2_RST_Msk
| RGU_RESET_CTRL1_UART3_RST_Msk
| RGU_RESET_CTRL1_I2C0_RST_Msk
| RGU_RESET_CTRL1_I2C1_RST_Msk
| RGU_RESET_CTRL1_SSP0_RST_Msk
| RGU_RESET_CTRL1_SSP1_RST_Msk
| RGU_RESET_CTRL1_I2S_RST_Msk
| RGU_RESET_CTRL1_CAN1_RST_Msk
| RGU_RESET_CTRL1_CAN0_RST_Msk
);
// Switch to the the interrupt vector table in flash
SCB->VTOR = (uint32_t) addr;
// Set up the stack and jump to the reset vector
uint32_t sp = addr[0];
uint32_t pc = addr[1];
register uint32_t r0 __asm__ ("r0") = r0_val;
__asm__ volatile("mov sp, %0; bx %1" :: "r" (sp), "r" (pc), "r" (r0));
(void) r0_val;
}
|
//
// DataTransform.h
// cordova-iot-button: esp8266
//
// Copyright © 2017 - Roberto Osses - Chile. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface DataTransform : NSObject
- (NSData *)little_intToByteWithData:(int)i andLength:(int)len;
- (int)little_bytesToInt:(NSData *)bytes;
- (NSData *)little_longToBytes:(long long)l;
-(long long)little_bytesToLong:(NSData *)bytes;
- (NSString *)decimalTOBinary:(uint16_t)tmpid backLength:(int)length;
-(short)little_bytesToShort:(NSData *)bytes;
- (NSString *) utf8ToUnicode:(NSString *)string;
- (NSString*) unicodeToUtf8:(NSString*)aUnicodeString;
@end
|
//===-- sanitizer_thread_registry.h -----------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file is shared between sanitizer tools.
//
// General thread bookkeeping functionality.
//===----------------------------------------------------------------------===//
#ifndef SANITIZER_THREAD_REGISTRY_H
#define SANITIZER_THREAD_REGISTRY_H
#include "sanitizer_common.h"
#include "sanitizer_list.h"
#include "sanitizer_mutex.h"
namespace __sanitizer {
enum ThreadStatus {
ThreadStatusInvalid, // Non-existent thread, data is invalid.
ThreadStatusCreated, // Created but not yet running.
ThreadStatusRunning, // The thread is currently running.
ThreadStatusFinished, // Joinable thread is finished but not yet joined.
ThreadStatusDead // Joined, but some info is still available.
};
// Generic thread context. Specific sanitizer tools may inherit from it.
// If thread is dead, context may optionally be reused for a new thread.
class ThreadContextBase {
public:
explicit ThreadContextBase(u32 tid);
~ThreadContextBase(); // Should never be called.
const u32 tid; // Thread ID. Main thread should have tid = 0.
u64 unique_id; // Unique thread ID.
uptr os_id; // PID (used for reporting).
uptr user_id; // Some opaque user thread id (e.g. pthread_t).
char name[64]; // As annotated by user.
ThreadStatus status;
bool detached;
int reuse_count;
u32 parent_tid;
ThreadContextBase *next; // For storing thread contexts in a list.
void SetName(const char *new_name);
void SetDead();
void SetJoined(void *arg);
void SetFinished();
void SetStarted(uptr _os_id, void *arg);
void SetCreated(uptr _user_id, u64 _unique_id, bool _detached,
u32 _parent_tid, void *arg);
void Reset();
// The following methods may be overriden by subclasses.
// Some of them take opaque arg that may be optionally be used
// by subclasses.
virtual void OnDead() {}
virtual void OnJoined(void *arg) {}
virtual void OnFinished() {}
virtual void OnStarted(void *arg) {}
virtual void OnCreated(void *arg) {}
virtual void OnReset() {}
};
typedef ThreadContextBase* (*ThreadContextFactory)(u32 tid);
class ThreadRegistry {
public:
static const u32 kUnknownTid;
ThreadRegistry(ThreadContextFactory factory, u32 max_threads,
u32 thread_quarantine_size);
void GetNumberOfThreads(uptr *total = 0, uptr *running = 0, uptr *alive = 0);
uptr GetMaxAliveThreads();
void Lock() { mtx_.Lock(); }
void CheckLocked() { mtx_.CheckLocked(); }
void Unlock() { mtx_.Unlock(); }
// Should be guarded by ThreadRegistryLock.
ThreadContextBase *GetThreadLocked(u32 tid) {
DCHECK_LT(tid, n_contexts_);
return threads_[tid];
}
u32 CreateThread(uptr user_id, bool detached, u32 parent_tid, void *arg);
typedef void (*ThreadCallback)(ThreadContextBase *tctx, void *arg);
// Invokes callback with a specified arg for each thread context.
// Should be guarded by ThreadRegistryLock.
void RunCallbackForEachThreadLocked(ThreadCallback cb, void *arg);
typedef bool (*FindThreadCallback)(ThreadContextBase *tctx, void *arg);
// Finds a thread using the provided callback. Returns kUnknownTid if no
// thread is found.
u32 FindThread(FindThreadCallback cb, void *arg);
// Should be guarded by ThreadRegistryLock. Return 0 if no thread
// is found.
ThreadContextBase *FindThreadContextLocked(FindThreadCallback cb,
void *arg);
ThreadContextBase *FindThreadContextByOsIDLocked(uptr os_id);
void SetThreadName(u32 tid, const char *name);
void DetachThread(u32 tid);
void JoinThread(u32 tid, void *arg);
void FinishThread(u32 tid);
void StartThread(u32 tid, uptr os_id, void *arg);
private:
const ThreadContextFactory context_factory_;
const u32 max_threads_;
const u32 thread_quarantine_size_;
BlockingMutex mtx_;
u32 n_contexts_; // Number of created thread contexts,
// at most max_threads_.
u64 total_threads_; // Total number of created threads. May be greater than
// max_threads_ if contexts were reused.
uptr alive_threads_; // Created or running.
uptr max_alive_threads_;
uptr running_threads_;
ThreadContextBase **threads_; // Array of thread contexts is leaked.
IntrusiveList<ThreadContextBase> dead_threads_;
IntrusiveList<ThreadContextBase> invalid_threads_;
void QuarantinePush(ThreadContextBase *tctx);
ThreadContextBase *QuarantinePop();
};
typedef GenericScopedLock<ThreadRegistry> ThreadRegistryLock;
} // namespace __sanitizer
#endif // SANITIZER_THREAD_REGISTRY_H
|
#undef DLIB_BROWSER_ABSTRACh_
#ifdef DLIB_BROWSER_ABSTRACh_
namespace dlib
{
// Function which is called when there is data available.
// Return false to stop the download process...
typedef bool (*fnOnDownload)(long already_downloaded, long total_to_download, void * userInfo);
// ----------------------------------------------------------------------------------------
/*
TODO:
- Timed cookie support
- POSTing files: check it!
- Don't timeout when still downloading!
*/
// ----------------------------------------------------------------------------------------
class Browser
{
/*!
WHAT THIS OBJECT REPRESENTS
This object represents a possibility for the end user to download webpages (HTTP/1.0)
from the internet like a normal webbrowser would do.
!*/
public:
Browser(
);
/*!
Constructor
!*/
void set_header(
const std::string& header_name,
const std::string& header_value
);
/*!
Set a header to a certain value
Example: set_header("User-Agent", "Internet Explorer")
!*/
void set_header(
const std::string& header_name,
long header_value
);
/*!
Set a header to a certain number
Example: set_header("Content-Length", 1234)
!*/
std::string get_header(
const std::string& header_name
) const;
/*!
Get the value of the header or an empty string when it's not set.
Example: get_header("Content-Length") would return "1234"
!*/
void remove_header(
const std::string& header_name
);
/*!
Removes a certain header
!*/
bool is_header_set(
const std::string& header_name
) const;
/*!
Returns when a header is set and is not empty
!*/
void set_user_agent(
const std::string& new_agent
) { set_header("User-Agent", new_agent); }
/*!
Convenience function for setting a user agent
!*/
void clear(
);
/*!
Clear out all cookies & headers set until now
!*/
void prepare_for_next_url(
);
/*!
Clear out any header and/or cookie which would obstruct getting a next page.
At this moment this is cleared:
- the Content-Type header
!*/
void set_callback_function(
fnOnDownload od,
void * _user_info
);
/*!
Set a callback function for one of the following events:
- OnDownload: this will tell you how much is downloaded and how much will need to be downloaded
!*/
void set_cookie(
const std::string& cookie_name,
const std::string& cookie_value
);
/*!
Set a cookie
!*/
void set_cookie(
const std::string& cookie_name,
long cookie_value
);
/*!
Set a cookie
!*/
void remove_cookie(
const std::string& cookie_name
);
/*!
Remove a cookie if it's set
!*/
void set_timeout(
unsigned int milliseconds
);
/*!
Set the maximum time how long a request can take. Setting this to 0 disables
this behavior.
!*/
string_to_stringvector get_returned_headers(
) const;
/*!
Returns all the headers which are returned in the download of the webpage.
!*/
short get_http_return (
) const;
/*!
Retrieves the HTTP return code.
!*/
const std::string& get_body (
) const;
/*!
Retrieves the HTTP body.
!*/
const std::string& post_url (
const std::string& url,
const string_to_stringmap& postvars,
const string_to_stringmap& filenames = string_to_stringmap()
);
/*!
POST an url to the internet.
You can pass the post variables as well as a list of filenames
!*/
const std::string& post_url (
const std::string& url,
const std::string& postbuffer
);
/*!
POST an url to the internet.
In this function you have constructed the POST string yourselves
!*/
const std::string& get_url (
const std::string& url
);
/*!
GET an url from the internet.
!*/
bool has_error(
) const;
/*!
Has there happened an error?
!*/
const std::string& get_error(
) const;
/*!
Get the error explanation
!*/
static std::string urlencode(
const std::string& in,
bool post_encode = false
);
/*!
Convenience function to URLencode a string
!*/
static std::string urldecode(
const std::string& in
);
/*!
Convenience function to URLdecode a string
!*/
};
}
#endif // DLIB_BROWSER_ABSTRACh_
|
//
// Copyright 2011-2015 Jeff Bush
//
// 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.
//
#pragma once
#include <stdio.h>
#include <stdlib.h>
#include "SIMDMath.h"
namespace librender
{
//
// RenderBuffer is a wrapper for an array of geometric data like
// vertex attributes or indices.
//
class RenderBuffer
{
public:
RenderBuffer()
: fData(0),
fNumElements(0),
fStride(0),
fBaseStepPointers(static_cast<vecu16_t*>(memalign(sizeof(vecu16_t), sizeof(vecu16_t))))
{
}
RenderBuffer(const RenderBuffer &) = delete;
RenderBuffer(const void *data, int numElements, int stride)
: fBaseStepPointers(static_cast<vecu16_t*>(memalign(sizeof(vecu16_t), sizeof(vecu16_t))))
{
setData(data, numElements, stride);
}
~RenderBuffer()
{
free(fBaseStepPointers);
}
RenderBuffer& operator=(const RenderBuffer&) = delete;
// The RenderBuffer does not take ownership of the data or copy it into
// a separate buffer. The caller must ensure the memory remains around
// as long as the RenderBuffer is active.
// XXX should there be a concept of owned and not-owned data like Surface?
void setData(const void *data, int numElements, int stride)
{
fData = data;
fNumElements = numElements;
fStride = stride;
const veci16_t kStepVector = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 };
*fBaseStepPointers = kStepVector * splati(fStride)
+ splati(reinterpret_cast<unsigned int>(fData));
}
int getNumElements() const
{
return fNumElements;
}
int getStride() const
{
return fStride;
}
int getSize() const
{
return fNumElements * fStride;
}
const void *getData() const
{
return fData;
}
// Given a packed array of the form a0b0 a0b1... a_1b_0 a_1b_1...
// Return up to 16 elements packed in a vector: a_mb_n, a_mb_(n+1)...
veci16_t gatherElements(int index1, int index2, int count) const
{
int mask;
if (count < 16)
mask = (0xffff0000 >> count) & 0xffff;
else
mask = 0xffff;
const vecu16_t ptrVec = *fBaseStepPointers + splati(index1 * fStride + index2
* sizeof(unsigned int));
return __builtin_nyuzi_gather_loadf_masked(ptrVec, mask);
}
private:
const void *fData;
int fNumElements;
int fStride;
vecu16_t *fBaseStepPointers;
};
}
|
/*
* Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
#pragma once
#include <aws/connect/Connect_EXPORTS.h>
#include <aws/connect/ConnectRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace Connect
{
namespace Model
{
/**
*/
class AWS_CONNECT_API UpdateUserHierarchyRequest : public ConnectRequest
{
public:
UpdateUserHierarchyRequest();
// Service request name is the Operation name which will send this request out,
// each operation should has unique request name, so that we can get operation's name from this request.
// Note: this is not true for response, multiple operations may have the same response name,
// so we can not get operation's name from response.
inline virtual const char* GetServiceRequestName() const override { return "UpdateUserHierarchy"; }
Aws::String SerializePayload() const override;
/**
* <p>The identifier of the hierarchy group.</p>
*/
inline const Aws::String& GetHierarchyGroupId() const{ return m_hierarchyGroupId; }
/**
* <p>The identifier of the hierarchy group.</p>
*/
inline bool HierarchyGroupIdHasBeenSet() const { return m_hierarchyGroupIdHasBeenSet; }
/**
* <p>The identifier of the hierarchy group.</p>
*/
inline void SetHierarchyGroupId(const Aws::String& value) { m_hierarchyGroupIdHasBeenSet = true; m_hierarchyGroupId = value; }
/**
* <p>The identifier of the hierarchy group.</p>
*/
inline void SetHierarchyGroupId(Aws::String&& value) { m_hierarchyGroupIdHasBeenSet = true; m_hierarchyGroupId = std::move(value); }
/**
* <p>The identifier of the hierarchy group.</p>
*/
inline void SetHierarchyGroupId(const char* value) { m_hierarchyGroupIdHasBeenSet = true; m_hierarchyGroupId.assign(value); }
/**
* <p>The identifier of the hierarchy group.</p>
*/
inline UpdateUserHierarchyRequest& WithHierarchyGroupId(const Aws::String& value) { SetHierarchyGroupId(value); return *this;}
/**
* <p>The identifier of the hierarchy group.</p>
*/
inline UpdateUserHierarchyRequest& WithHierarchyGroupId(Aws::String&& value) { SetHierarchyGroupId(std::move(value)); return *this;}
/**
* <p>The identifier of the hierarchy group.</p>
*/
inline UpdateUserHierarchyRequest& WithHierarchyGroupId(const char* value) { SetHierarchyGroupId(value); return *this;}
/**
* <p>The identifier of the user account.</p>
*/
inline const Aws::String& GetUserId() const{ return m_userId; }
/**
* <p>The identifier of the user account.</p>
*/
inline bool UserIdHasBeenSet() const { return m_userIdHasBeenSet; }
/**
* <p>The identifier of the user account.</p>
*/
inline void SetUserId(const Aws::String& value) { m_userIdHasBeenSet = true; m_userId = value; }
/**
* <p>The identifier of the user account.</p>
*/
inline void SetUserId(Aws::String&& value) { m_userIdHasBeenSet = true; m_userId = std::move(value); }
/**
* <p>The identifier of the user account.</p>
*/
inline void SetUserId(const char* value) { m_userIdHasBeenSet = true; m_userId.assign(value); }
/**
* <p>The identifier of the user account.</p>
*/
inline UpdateUserHierarchyRequest& WithUserId(const Aws::String& value) { SetUserId(value); return *this;}
/**
* <p>The identifier of the user account.</p>
*/
inline UpdateUserHierarchyRequest& WithUserId(Aws::String&& value) { SetUserId(std::move(value)); return *this;}
/**
* <p>The identifier of the user account.</p>
*/
inline UpdateUserHierarchyRequest& WithUserId(const char* value) { SetUserId(value); return *this;}
/**
* <p>The identifier of the Amazon Connect instance.</p>
*/
inline const Aws::String& GetInstanceId() const{ return m_instanceId; }
/**
* <p>The identifier of the Amazon Connect instance.</p>
*/
inline bool InstanceIdHasBeenSet() const { return m_instanceIdHasBeenSet; }
/**
* <p>The identifier of the Amazon Connect instance.</p>
*/
inline void SetInstanceId(const Aws::String& value) { m_instanceIdHasBeenSet = true; m_instanceId = value; }
/**
* <p>The identifier of the Amazon Connect instance.</p>
*/
inline void SetInstanceId(Aws::String&& value) { m_instanceIdHasBeenSet = true; m_instanceId = std::move(value); }
/**
* <p>The identifier of the Amazon Connect instance.</p>
*/
inline void SetInstanceId(const char* value) { m_instanceIdHasBeenSet = true; m_instanceId.assign(value); }
/**
* <p>The identifier of the Amazon Connect instance.</p>
*/
inline UpdateUserHierarchyRequest& WithInstanceId(const Aws::String& value) { SetInstanceId(value); return *this;}
/**
* <p>The identifier of the Amazon Connect instance.</p>
*/
inline UpdateUserHierarchyRequest& WithInstanceId(Aws::String&& value) { SetInstanceId(std::move(value)); return *this;}
/**
* <p>The identifier of the Amazon Connect instance.</p>
*/
inline UpdateUserHierarchyRequest& WithInstanceId(const char* value) { SetInstanceId(value); return *this;}
private:
Aws::String m_hierarchyGroupId;
bool m_hierarchyGroupIdHasBeenSet;
Aws::String m_userId;
bool m_userIdHasBeenSet;
Aws::String m_instanceId;
bool m_instanceIdHasBeenSet;
};
} // namespace Model
} // namespace Connect
} // namespace Aws
|
/* for stpcpy on linux; possibly other functions */
// #define _GNU_SOURCE
#define _XOPEN_SOURCE 700
// the prefix SEC_ is an acronym for SektionEins Cryptoki
// #define SEC_DEBUG
#define SEC_LOG "/tmp/ck_log.txt"
#define SEC_MAJOR_VERSION 0
#define SEC_MINOR_VERSION 0
/* ---- */
#ifndef HAVE_UCHAR
typedef unsigned char uchar;
#endif
#ifndef HAVE_UINT
typedef unsigned int uint;
#endif
/* ----- DEBUGGING + LOGGING */
#ifdef SEC_DEBUG
#define SDEBUG(msg...) \
{FILE *f;f=fopen(SEC_LOG, "a+");if(f){fprintf(f,"%s:%u %s #> ",__FILE__, __LINE__, __func__);fprintf(f, msg);fprintf(f,"\n");fclose(f);}}
#define sec_log(msg...) SDEBUG(msg)
#define sec_log_err(msg...) SDEBUG(msg)
#else
#define SDEBUG(msg...)
#define sec_log(msg...) \
fprintf(stderr, msg)
#define sec_log_err(msg...) \
fprintf(stderr, msg)
#endif
|
/*
* @file SLTCells.h
* Saltr
*
* Copyright Teoken LLC. (c) 2014. All rights reserved.
* Copying or usage of any piece of this source code without written notice from Teoken LLC is a major crime.
* Այս կոդը Թեոկեն ՍՊԸ ընկերության սեփականությունն է:
* Առանց գրավոր թույլտվության այս կոդի պատճենահանումը կամ օգտագործումը քրեական հանցագործություն է:
*/
#import <Foundation/Foundation.h>
@class SLTCell;
@class SLTCellsIterator;
@interface SLTCells : NSObject
@property(nonatomic, assign, readonly) NSInteger width;
@property(nonatomic, assign, readonly) NSInteger height;
@property(nonatomic, strong, readonly) SLTCellsIterator* iterator;
@property(nonatomic, strong, readonly) NSMutableArray* rawData;
-(id) initWithWidth:(NSInteger)theWidth andHeight:(NSInteger)theHeight;
-(void) insertCell:(SLTCell*)theCell atCol:(NSInteger)theCol andRow:(NSInteger)theRow;
-(SLTCell*) retrieveCellAtCol:(NSInteger)theCol andRow:(NSInteger)theRow;
@end
|
// Copyright 2021 The Pigweed Authors
//
// 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
//
// https://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.
#pragma once
#include "pw_assert/check.h"
// Optional short CHECK name definitions
// clang-format off
// Checks that always run even in production.
#define CRASH PW_CRASH
#define CHECK PW_CHECK
#define CHECK_PTR_LE PW_CHECK_PTR_LE
#define CHECK_PTR_LT PW_CHECK_PTR_LT
#define CHECK_PTR_GE PW_CHECK_PTR_GE
#define CHECK_PTR_GT PW_CHECK_PTR_GT
#define CHECK_PTR_EQ PW_CHECK_PTR_EQ
#define CHECK_PTR_NE PW_CHECK_PTR_NE
#define CHECK_NOTNULL PW_CHECK_NOTNULL
#define CHECK_INT_LE PW_CHECK_INT_LE
#define CHECK_INT_LT PW_CHECK_INT_LT
#define CHECK_INT_GE PW_CHECK_INT_GE
#define CHECK_INT_GT PW_CHECK_INT_GT
#define CHECK_INT_EQ PW_CHECK_INT_EQ
#define CHECK_INT_NE PW_CHECK_INT_NE
#define CHECK_UINT_LE PW_CHECK_UINT_LE
#define CHECK_UINT_LT PW_CHECK_UINT_LT
#define CHECK_UINT_GE PW_CHECK_UINT_GE
#define CHECK_UINT_GT PW_CHECK_UINT_GT
#define CHECK_UINT_EQ PW_CHECK_UINT_EQ
#define CHECK_UINT_NE PW_CHECK_UINT_NE
#define CHECK_FLOAT_NEAR PW_CHECK_FLOAT_NEAR
#define CHECK_FLOAT_EXACT_LE PW_CHECK_FLOAT_EXACT_LE
#define CHECK_FLOAT_EXACT_LT PW_CHECK_FLOAT_EXACT_LT
#define CHECK_FLOAT_EXACT_GE PW_CHECK_FLOAT_EXACT_GE
#define CHECK_FLOAT_EXACT_GT PW_CHECK_FLOAT_EXACT_GT
#define CHECK_FLOAT_EXACT_EQ PW_CHECK_FLOAT_EXACT_EQ
#define CHECK_FLOAT_EXACT_NE PW_CHECK_FLOAT_EXACT_NE
#define CHECK_OK PW_CHECK_OK
// Checks that are disabled if NDEBUG is not defined.
#define DCHECK PW_DCHECK
#define DCHECK_PTR_LE PW_DCHECK_PTR_LE
#define DCHECK_PTR_LT PW_DCHECK_PTR_LT
#define DCHECK_PTR_GE PW_DCHECK_PTR_GE
#define DCHECK_PTR_GT PW_DCHECK_PTR_GT
#define DCHECK_PTR_EQ PW_DCHECK_PTR_EQ
#define DCHECK_PTR_NE PW_DCHECK_PTR_NE
#define DCHECK_NOTNULL PW_DCHECK_NOTNULL
#define DCHECK_INT_LE PW_DCHECK_INT_LE
#define DCHECK_INT_LT PW_DCHECK_INT_LT
#define DCHECK_INT_GE PW_DCHECK_INT_GE
#define DCHECK_INT_GT PW_DCHECK_INT_GT
#define DCHECK_INT_EQ PW_DCHECK_INT_EQ
#define DCHECK_INT_NE PW_DCHECK_INT_NE
#define DCHECK_UINT_LE PW_DCHECK_UINT_LE
#define DCHECK_UINT_LT PW_DCHECK_UINT_LT
#define DCHECK_UINT_GE PW_DCHECK_UINT_GE
#define DCHECK_UINT_GT PW_DCHECK_UINT_GT
#define DCHECK_UINT_EQ PW_DCHECK_UINT_EQ
#define DCHECK_UINT_NE PW_DCHECK_UINT_NE
#define DCHECK_FLOAT_NEAR PW_DCHECK_FLOAT_NEAR
#define DCHECK_FLOAT_EXACT_LT PW_DCHECK_FLOAT_EXACT_LT
#define DCHECK_FLOAT_EXACT_LE PW_DCHECK_FLOAT_EXACT_LE
#define DCHECK_FLOAT_EXACT_GT PW_DCHECK_FLOAT_EXACT_GT
#define DCHECK_FLOAT_EXACT_GE PW_DCHECK_FLOAT_EXACT_GE
#define DCHECK_FLOAT_EXACT_EQ PW_DCHECK_FLOAT_EXACT_EQ
#define DCHECK_FLOAT_EXACT_NE PW_DCHECK_FLOAT_EXACT_NE
#define DCHECK_OK PW_DCHECK_OK
// clang-format on
|
/*
ESP8266WiFiAP.h - esp8266 Wifi support.
Based on WiFi.h from Arduino WiFi shield library.
Copyright (c) 2011-2014 Arduino. All right reserved.
Modified by Ivan Grokhotkov, December 2014
Reworked by Markus Sattler, December 2015
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 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
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef ESP32WIFIAP_H_
#define ESP32WIFIAP_H_
#include "WiFiType.h"
#include "WiFiGeneric.h"
class WiFiAPClass
{
// ----------------------------------------------------------------------------------------------
// ----------------------------------------- AP function ----------------------------------------
// ----------------------------------------------------------------------------------------------
public:
bool softAP(const char* ssid, const char* passphrase = NULL, int channel = 1, int ssid_hidden = 0);
bool softAPConfig(IPAddress local_ip, IPAddress gateway, IPAddress subnet);
bool softAPdisconnect(bool wifioff = false);
uint8_t softAPgetStationNum();
IPAddress softAPIP();
bool softAPenableIpV6();
IPv6Address softAPIPv6();
const char * softAPgetHostname();
bool softAPsetHostname(const char * hostname);
uint8_t* softAPmacAddress(uint8_t* mac);
String softAPmacAddress(void);
protected:
};
#endif /* ESP32WIFIAP_H_*/
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef mozilla_dom_HTMLOutputElement_h
#define mozilla_dom_HTMLOutputElement_h
#include "mozilla/Attributes.h"
#include "nsGenericHTMLElement.h"
#include "nsStubMutationObserver.h"
#include "nsIConstraintValidation.h"
namespace mozilla {
namespace dom {
class HTMLOutputElement final : public nsGenericHTMLFormElement,
public nsStubMutationObserver,
public nsIConstraintValidation
{
public:
using nsIConstraintValidation::GetValidationMessage;
explicit HTMLOutputElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo,
FromParser aFromParser = NOT_FROM_PARSER);
// nsISupports
NS_DECL_ISUPPORTS_INHERITED
// nsIFormControl
NS_IMETHOD_(uint32_t) GetType() const override { return NS_FORM_OUTPUT; }
NS_IMETHOD Reset() override;
NS_IMETHOD SubmitNamesValues(nsFormSubmission* aFormSubmission) override;
virtual bool IsDisabled() const override { return false; }
nsresult Clone(mozilla::dom::NodeInfo* aNodeInfo, nsINode** aResult) const override;
bool ParseAttribute(int32_t aNamespaceID, nsIAtom* aAttribute,
const nsAString& aValue, nsAttrValue& aResult) override;
virtual void DoneAddingChildren(bool aHaveNotified) override;
EventStates IntrinsicState() const override;
virtual nsresult BindToTree(nsIDocument* aDocument, nsIContent* aParent,
nsIContent* aBindingParent,
bool aCompileEventHandlers) override;
// This function is called when a callback function from nsIMutationObserver
// has to be used to update the defaultValue attribute.
void DescendantsChanged();
// nsIMutationObserver
NS_DECL_NSIMUTATIONOBSERVER_CHARACTERDATACHANGED
NS_DECL_NSIMUTATIONOBSERVER_CONTENTAPPENDED
NS_DECL_NSIMUTATIONOBSERVER_CONTENTINSERTED
NS_DECL_NSIMUTATIONOBSERVER_CONTENTREMOVED
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(HTMLOutputElement,
nsGenericHTMLFormElement)
virtual JSObject* WrapNode(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
// WebIDL
nsDOMSettableTokenList* HtmlFor();
// nsGenericHTMLFormElement::GetForm is fine.
void GetName(nsAString& aName)
{
GetHTMLAttr(nsGkAtoms::name, aName);
}
void SetName(const nsAString& aName, ErrorResult& aRv)
{
SetHTMLAttr(nsGkAtoms::name, aName, aRv);
}
void GetType(nsAString& aType)
{
aType.AssignLiteral("output");
}
void GetDefaultValue(nsAString& aDefaultValue)
{
aDefaultValue = mDefaultValue;
}
void SetDefaultValue(const nsAString& aDefaultValue, ErrorResult& aRv);
void GetValue(nsAString& aValue);
void SetValue(const nsAString& aValue, ErrorResult& aRv);
// nsIConstraintValidation::WillValidate is fine.
// nsIConstraintValidation::Validity() is fine.
// nsIConstraintValidation::GetValidationMessage() is fine.
// nsIConstraintValidation::CheckValidity() is fine.
void SetCustomValidity(const nsAString& aError);
protected:
virtual ~HTMLOutputElement();
enum ValueModeFlag {
eModeDefault,
eModeValue
};
ValueModeFlag mValueModeFlag;
bool mIsDoneAddingChildren;
nsString mDefaultValue;
nsRefPtr<nsDOMSettableTokenList> mTokenList;
};
} // namespace dom
} // namespace mozilla
#endif // mozilla_dom_HTMLOutputElement_h
|
/*
* Copyright (C) 2015 University of Oregon
*
* You may distribute under the terms of either the GNU General Public
* License or the Apache License, as specified in the LICENSE file.
*
* For more information, see the LICENSE file.
*/
/*
*/
#ifndef PARMLIST_H
#define PARMLIST_H
#define PL_INT 1
#define PL_FLOAT 2
#define PL_STRING 3
#define PL_PARM 4
#define PL_PTR 5
typedef union {
int ival;
float fval;
char *sval;
void *pval;
} ParmItem;
typedef ParmItem *ParmList;
#ifdef __cplusplus
extern "C" {
#endif
extern ParmList allocParm(char *name, int type, int nelems);
extern ParmList appendFloatParm(ParmList, float value);
extern ParmList appendIntParm(ParmList, int value);
extern ParmList appendParmParm(ParmList, ParmList value);
extern ParmList appendPtrParm(ParmList, void *value);
extern ParmList appendStrParm(ParmList, char *value);
extern int countParm(ParmList);
extern ParmList findParm(ParmList, char *name);
extern void freeParms(ParmList);
extern int getFloatParm(ParmList, float *value, int elem);
extern int getFloatParms(ParmList, float *array, int nelems);
extern int getIntParm(ParmList, int *value, int elem);
extern int getIntParms(ParmList, int *array, int nelems);
extern int getParmParm(ParmList, ParmList *value, int elem);
extern int getParmParms(ParmList, ParmList *array, int nelems);
extern int getPtrParm(ParmList, void **value, int elem);
extern int getPtrParms(ParmList, void **array, int nelems);
extern int getStrParm(ParmList, char **value, int elem);
extern int getStrParms(ParmList, char **array, int nelems);
extern void printParm(ParmList);
extern int setFloatParm(ParmList, float value, int elem);
extern int setFloatParms(ParmList, float *array, int nelems);
extern int setIntParm(ParmList, int value, int elem);
extern int setIntParms(ParmList, int *array, int nelems);
extern int setParmParm(ParmList, ParmList value, int elem);
extern int setParmParms(ParmList, ParmList *array, int nelems);
extern int setPtrParm(ParmList, void *value, int elem);
extern int setPtrParms(ParmList, void **array, int nelems);
extern int setStrParm(ParmList, char *value, int elem);
extern int setStrParms(ParmList, char **array, int nelems);
extern int typeofParm(ParmList p);
#ifdef __cplusplus
}
#endif
#endif /* PARMLIST_H */
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.