text stringlengths 4 6.14k |
|---|
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the Qt Mobility Components.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial Usage
** Licensees holding valid Qt Commercial licenses may use this file in
** accordance with the Qt Commercial License Agreement provided with
** the Software or, alternatively, in accordance with the terms
** contained in a written agreement between you and Nokia.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QORGANIZERITEMSORTORDER_H
#define QORGANIZERITEMSORTORDER_H
#include "qtorganizerglobal.h"
#include <QString>
#include <QSharedData>
#include <QList>
class QDataStream;
QTM_BEGIN_NAMESPACE
class QOrganizerItemSortOrderPrivate;
class Q_ORGANIZER_EXPORT QOrganizerItemSortOrder
{
public:
QOrganizerItemSortOrder();
~QOrganizerItemSortOrder();
QOrganizerItemSortOrder(const QOrganizerItemSortOrder& other);
QOrganizerItemSortOrder& operator=(const QOrganizerItemSortOrder& other);
enum BlankPolicy {
BlanksFirst,
BlanksLast,
};
/* Mutators */
void setDetailDefinitionName(const QString& definitionName, const QString& fieldName);
void setBlankPolicy(BlankPolicy blankPolicy);
void setDirection(Qt::SortOrder direction);
void setCaseSensitivity(Qt::CaseSensitivity sensitivity);
/* Accessors */
QString detailDefinitionName() const;
QString detailFieldName() const;
BlankPolicy blankPolicy() const;
Qt::SortOrder direction() const;
Qt::CaseSensitivity caseSensitivity() const;
bool isValid() const;
bool operator==(const QOrganizerItemSortOrder& other) const;
bool operator!=(const QOrganizerItemSortOrder& other) const {return !operator==(other);}
/* Convenience cast */
operator QList<QOrganizerItemSortOrder>() const {return QList<QOrganizerItemSortOrder>() << *this;}
private:
QSharedDataPointer<QOrganizerItemSortOrderPrivate> d;
};
#ifndef QT_NO_DATASTREAM
Q_ORGANIZER_EXPORT QDataStream& operator<<(QDataStream& out, const QOrganizerItemSortOrder& sortOrder);
Q_ORGANIZER_EXPORT QDataStream& operator>>(QDataStream& in, QOrganizerItemSortOrder& sortOrder);
#endif
QTM_END_NAMESPACE
Q_DECLARE_TYPEINFO(QTM_PREPEND_NAMESPACE(QOrganizerItemSortOrder), Q_MOVABLE_TYPE);
#endif
|
/*
* Copyright (c) 2013 Citrix Systems, Inc.
*
* 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 Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef __PROJECT_H__
# define __PROJECT_H__
# include "config.h"
# ifdef TM_IN_SYS_TIME
# include <sys/time.h>
# ifdef TIME_WITH_SYS_TIME
# include <time.h>
# endif
# else
# ifdef TIME_WITH_SYS_TIME
# include <sys/time.h>
# endif
# include <time.h>
# endif
# ifdef HAVE_STDIO_H
# include <stdio.h>
# endif
# ifdef HAVE_STDLIB_H
# include <stdlib.h>
# endif
# ifdef HAVE_STRING_H
# include <string.h>
# endif
# ifdef HAVE_STRINGS_H
# include <strings.h>
# endif
# ifdef HAVE_UNISTD_H
# include <unistd.h>
# endif
# ifdef HAVE_STDINT_H
# include <stdint.h>
# elif defined(HAVE_SYS_INT_TYPES_H)
# include <sys/int_types.h>
# endif
# ifdef HAVE_ERRNO_H
# include <errno.h>
# endif
# ifdef HAVE_ASSERT_H
# include <assert.h>
# endif
# ifdef HAVE_FCNTL_H
# include <fcntl.h>
# endif
# ifdef HAVE_STDARG_H
# include <stdarg.h>
# endif
# ifdef HAVE_DLFCN_H
# include <dlfcn.h>
# endif
# ifdef HAVE_SYSLOG_H
# include <syslog.h>
# endif
# ifdef HAVE_EXECINFO_H
# include <execinfo.h>
# endif
# ifdef HAVE_SYS_IOCTL_H
# include <sys/ioctl.h>
# endif
# ifdef HAVE_SYS_MMAN_H
# include <sys/mman.h>
# endif
# ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
# endif
# ifdef HAVE_SYS_USER_H
# include <sys/user.h>
# endif
/* Auto export */
# if defined(INT_PROTOS)
# define INTERNAL
# define EXTERNAL
# elif defined(EXT_PROTOS)
# define INTERNAL static
# define EXTERNAL
# else
# define INTERNAL
# define EXTERNAL
# endif
# include <xf86drm.h>
# include <xf86drmMode.h>
/* XXX: We use headers provided by the local build of libdrm we have, not the headers
* Linux export with its user interface (that does not include our modifications
* for foreign). */
# include <libdrm/drm.h>
# include <libdrm/i915_drm.h>
# include <event.h>
# include <libudev.h>
# include <xenctrl.h> /* XXX: Fix surfman ... */
# include <surfman.h>
# include "list.h"
# include "drm-plugin.h"
# include "utils.h"
# include "prototypes.h"
#ifndef XC_PAGE_SIZE
# include <sys/user.h>
# define XC_PAGE_SIZE PAGE_SIZE
#endif
#endif /* __PROJECT_H__*/
|
#ifndef STARTUP_SCREEN_H
#define STARTUP_SCREEN_H
#include <QWidget>
class StartupScreen : public QWidget
{
};
#endif
|
/**************************************************************************
**
** Copyright (C) 2012-2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Installer Framework.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Digia. For licensing terms and
** conditions see http://qt.digia.com/licensing. For further information
** use the contact form at http://qt.digia.com/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Digia gives you certain additional
** rights. These rights are described in the Digia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
**
** $QT_END_LICENSE$
**
**************************************************************************/
#ifndef COMPONENTMODEL_H
#define COMPONENTMODEL_H
#include "qinstallerglobal.h"
#include <QtCore/QAbstractItemModel>
#include <QtCore/QList>
#include <QtCore/QSet>
#include <QtCore/QVector>
namespace QInstaller {
class Component;
class PackageManagerCore;
class INSTALLER_EXPORT ComponentModel : public QAbstractItemModel
{
Q_OBJECT
typedef QSet<Component *> ComponentSet;
typedef QList<Component *> ComponentList;
public:
enum ModelStateFlag {
AllChecked = 0x01,
AllUnchecked = 0x02,
DefaultChecked = 0x04,
PartiallyChecked = 0x08
};
Q_DECLARE_FLAGS(ModelState, ModelStateFlag);
explicit ComponentModel(int columns, PackageManagerCore *core = 0);
~ComponentModel();
Qt::ItemFlags flags(const QModelIndex &index) const;
int rowCount(const QModelIndex &parent = QModelIndex()) const;
int columnCount(const QModelIndex &parent = QModelIndex()) const;
QModelIndex parent(const QModelIndex &child) const;
QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole);
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
bool setHeaderData(int section, Qt::Orientation orientation, const QVariant &value,
int role = Qt::EditRole);
QSet<Component *> checked() const;
QSet<Component *> partially() const;
QSet<Component *> unchecked() const;
QSet<Component *> uncheckable() const;
PackageManagerCore *core() const;
ComponentModel::ModelState checkedState() const;
QModelIndex indexFromComponentName(const QString &name) const;
Component* componentFromIndex(const QModelIndex &index) const;
public Q_SLOTS:
void setRootComponents(QList<QInstaller::Component*> rootComponents);
void setCheckedState(QInstaller::ComponentModel::ModelStateFlag state);
Q_SIGNALS:
void checkStateChanged(const QModelIndex &index);
void checkStateChanged(QInstaller::ComponentModel::ModelState state);
private Q_SLOTS:
void slotModelReset();
private:
void updateAndEmitModelState();
void collectComponents(Component *const component, const QModelIndex &parent) const;
QSet<QModelIndex> updateCheckedState(const ComponentSet &components, Qt::CheckState state);
private:
PackageManagerCore *m_core;
ModelState m_modelState;
ComponentSet m_uncheckable;
QVector<QVariant> m_headerData;
ComponentList m_rootComponentList;
QHash<Qt::CheckState, ComponentSet> m_initialCheckedState;
QHash<Qt::CheckState, ComponentSet> m_currentCheckedState;
mutable QHash<QString, QPersistentModelIndex> m_indexByNameCache;
};
Q_DECLARE_OPERATORS_FOR_FLAGS(ComponentModel::ModelState);
} // namespace QInstaller
Q_DECLARE_METATYPE(QInstaller::ComponentModel::ModelState);
Q_DECLARE_METATYPE(QInstaller::ComponentModel::ModelStateFlag);
#endif // COMPONENTMODEL_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_LISTTAGSFORRESOURCEREQUEST_H
#define QTAWS_LISTTAGSFORRESOURCEREQUEST_H
#include "athenarequest.h"
namespace QtAws {
namespace Athena {
class ListTagsForResourceRequestPrivate;
class QTAWSATHENA_EXPORT ListTagsForResourceRequest : public AthenaRequest {
public:
ListTagsForResourceRequest(const ListTagsForResourceRequest &other);
ListTagsForResourceRequest();
virtual bool isValid() const Q_DECL_OVERRIDE;
protected:
virtual QtAws::Core::AwsAbstractResponse * response(QNetworkReply * const reply) const Q_DECL_OVERRIDE;
private:
Q_DECLARE_PRIVATE(ListTagsForResourceRequest)
};
} // namespace Athena
} // namespace QtAws
#endif
|
/*--------------------------------------------------------------------
(C) Copyright 2006-2011 Barcelona Supercomputing Center
Centro Nacional de Supercomputacion
This file is part of Mercurium C/C++ source-to-source compiler.
See AUTHORS file in the top level directory for information
regarding developers and contributors.
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 3 of the License, or (at your option) any later version.
Mercurium C/C++ source-to-source compiler 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 Mercurium C/C++ source-to-source compiler; if
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA.
--------------------------------------------------------------------*/
/*
<testinfo>
test_generator=config/mercurium
</testinfo>
*/
void f()
{
__builtin_types_compatible_p(int, int);
}
|
/*
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_UPDATEVIRTUALROUTERREQUEST_H
#define QTAWS_UPDATEVIRTUALROUTERREQUEST_H
#include "appmeshrequest.h"
namespace QtAws {
namespace AppMesh {
class UpdateVirtualRouterRequestPrivate;
class QTAWSAPPMESH_EXPORT UpdateVirtualRouterRequest : public AppMeshRequest {
public:
UpdateVirtualRouterRequest(const UpdateVirtualRouterRequest &other);
UpdateVirtualRouterRequest();
virtual bool isValid() const Q_DECL_OVERRIDE;
protected:
virtual QtAws::Core::AwsAbstractResponse * response(QNetworkReply * const reply) const Q_DECL_OVERRIDE;
private:
Q_DECLARE_PRIVATE(UpdateVirtualRouterRequest)
};
} // namespace AppMesh
} // namespace QtAws
#endif
|
/*
* This file is part of CcOS.
*
* CcOS 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.
*
* CcOS 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 CcOS. If not, see <http://www.gnu.org/licenses/>.
**/
/**
* @page CcRestApiMemoryMonitor
* @copyright Andreas Dirmeier (C) 2017
* @author Andreas Dirmeier
* @par Web: http://coolcow.de/projects/CcOS
* @par Language: C++11
* @brief Class CcRestApiMemoryMonitor
*/
#ifndef H_CcRestApiMemoryMonitor_H_
#define H_CcRestApiMemoryMonitor_H_
#include "CcBase.h"
#include "CcHttp.h"
#include "IRestApi.h"
/**
* @brief CcRestApiMemoryMonitor implementation
*/
class CcHttpSHARED CcRestApiMemoryMonitor : public IRestApi
{
public:
/**
* @brief Constructor
*/
CcRestApiMemoryMonitor(IRestApi* pParent);
/**
* @brief Destructor
*/
virtual ~CcRestApiMemoryMonitor();
virtual bool get(CcHttpWorkData& oData) override;
private:
class CPrivate;
private:
CPrivate* m_pPrivate = nullptr;
};
#endif // H_CcRestApiMemoryMonitor_H_
|
// Created file "Lib\src\SrClient\srapiext"
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(RtlNtPathSeperatorString, 0x00040002, 0x0000, 0x0000, 0x04, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00);
|
// Created file "Lib\src\Uuid\X64\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_IClerksCollection, 0x3adeffe3, 0xc802, 0x11d1, 0x82, 0xfb, 0x00, 0xa0, 0xc9, 0x1e, 0xed, 0xe9);
|
// Created file "Lib\src\Uuid\X64\lltdguid"
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_LLTD_PROP_MACADDRESS, 0x00000000, 0x0000, 0x0000, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00);
|
// Created file "Lib\src\Uuid\X64\shguids"
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_IShellDispatch, 0xd8f015c0, 0xc278, 0x11ce, 0xa4, 0x9e, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00);
|
/*
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_DELETEAPPRESPONSE_P_H
#define QTAWS_DELETEAPPRESPONSE_P_H
#include "sagemakerresponse_p.h"
namespace QtAws {
namespace SageMaker {
class DeleteAppResponse;
class DeleteAppResponsePrivate : public SageMakerResponsePrivate {
public:
explicit DeleteAppResponsePrivate(DeleteAppResponse * const q);
void parseDeleteAppResponse(QXmlStreamReader &xml);
private:
Q_DECLARE_PUBLIC(DeleteAppResponse)
Q_DISABLE_COPY(DeleteAppResponsePrivate)
};
} // namespace SageMaker
} // namespace QtAws
#endif
|
#include <Arc/TestGroup.h>
#include <Arc/Types.h>
using namespace Arc;
TestResult Test_ArcCore_TypeInt8( void )
{
if (sizeof(Arc_int8_t) != 1)
return TestGroup::Failure("Invalid Result");
return TestGroup::Success();
}
TestResult Test_ArcCore_TypeUInt8( void )
{
if (sizeof(Arc_uint8_t) != 1)
return TestGroup::Failure("Invalid Result");
return TestGroup::Success();
}
TestResult Test_ArcCore_TypeInt16( void )
{
if (sizeof(Arc_int16_t) != 2)
return TestGroup::Failure("Invalid Result");
return TestGroup::Success();
}
TestResult Test_ArcCore_TypeUInt16( void )
{
if (sizeof(Arc_uint16_t) != 2)
return TestGroup::Failure("Invalid Result");
return TestGroup::Success();
}
TestResult Test_ArcCore_TypeInt32( void )
{
if (sizeof(Arc_int32_t) != 4)
return TestGroup::Failure("Invalid Result");
return TestGroup::Success();
}
TestResult Test_ArcCore_TypeUInt32( void )
{
if (sizeof(Arc_uint32_t) != 4)
return TestGroup::Failure("Invalid Result");
return TestGroup::Success();
}
TestResult Test_ArcCore_TypeInt64( void )
{
if (sizeof(Arc_int64_t) != 8)
return TestGroup::Failure("Invalid Result");
return TestGroup::Success();
}
TestResult Test_ArcCore_TypeUInt64( void )
{
if (sizeof(Arc_uint64_t) != 8)
return TestGroup::Failure("Invalid Result");
return TestGroup::Success();
}
void TestGroup_ArcCore_StandardTypes( TestGroup& test )
{
test.addTest("ArcCore_TypeInt8", Test_ArcCore_TypeInt8);
test.addTest("ArcCore_TypeUInt8", Test_ArcCore_TypeUInt8);
test.addTest("ArcCore_TypeInt16", Test_ArcCore_TypeInt16);
test.addTest("ArcCore_TypeUInt16", Test_ArcCore_TypeUInt16);
test.addTest("ArcCore_TypeInt32", Test_ArcCore_TypeInt32);
test.addTest("ArcCore_TypeUInt32", Test_ArcCore_TypeUInt32);
test.addTest("ArcCore_TypeInt64", Test_ArcCore_TypeInt64);
test.addTest("ArcCore_TypeUInt64", Test_ArcCore_TypeUInt64);
} |
// Created file "Lib\src\Uuid\i_axis"
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_AsyncIeAxiService2, 0xf7084e96, 0xd20b, 0x444c, 0x93, 0x81, 0x73, 0xa2, 0x73, 0xc2, 0x39, 0x76);
|
#ifndef _farso_sdl_app_h
#define _farso_sdl_app_h
#include <SDL2/SDL.h>
#include <kobold/log.h>
#include "../../../src/sdl/sdlrenderer.h"
#include "../../../src/loader.h"
namespace FarsoExample
{
#define SDL_WINDOW_WIDTH 1024
#define SDL_WINDOW_HEIGHT 768
class SDLApp
{
public:
SDLApp();
virtual ~SDLApp();
void run();
virtual void init() = 0;
virtual bool shouldQuit() = 0;
virtual void step(bool leftButtonPressed, bool rightButtonPressed,
int mouseX, int mouseY) = 0;
protected:
/*! The window used */
SDL_Window* window;
Kobold::DefaultLog log;
Farso::DefaultLoader loader;
Farso::SDLRenderer* renderer;
private:
SDL_Renderer* sdlRenderer;
};
}
#endif
|
// Created file "Lib\src\Svcguid\X64\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(CLSID_ComQCEvents, 0xecabb0bb, 0x7f19, 0x11d2, 0x97, 0x8e, 0x00, 0x00, 0xf8, 0x75, 0x7e, 0x2a);
|
// Created file "Lib\src\amstrmid\X64\strmiids"
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(CODECAPI_AVEncCommonFormatConstraint, 0x57cbb9b8, 0x116f, 0x4951, 0xb4, 0x0c, 0xc2, 0xa0, 0x35, 0xed, 0x8f, 0x17);
|
/***************************************************************************
* Copyright (C) 2011-2012 by Piotr Dziwinski *
* piotrdz@gmail.com *
***************************************************************************/
/* application.h
Contains the Application class, which is responsible for interfacing
with SDL and managing the program window. */
#pragma once
#include "config.h"
#include "object.h"
#include "common.h"
class Settings;
class BindingManager;
class FontManager;
class Decorator;
class Render;
struct WindowSettings
{
Size size;
int bpp;
bool fullScreen;
bool multisampling;
std::string caption;
WindowSettings()
{
bpp = 0;
fullScreen = false;
}
};
class Application : public Object
{
public:
Application(int argc, char *argv[]);
virtual ~Application();
inline static Application* instance()
{ return _instance; }
inline WindowSettings windowSettings() const
{ return _windowSettings; }
inline void setWindowSettings(const WindowSettings &settings)
{
_newWindowSettings = settings;
_windowSettingsChanged = true;
}
inline std::string applicationName() const
{ return _applicationName; }
inline std::string applicationVersion() const
{ return _applicationVersion; }
void loadSettings();
int execute();
void quit(int pCode = 0);
void print(const std::string &module, const std::string &message) const;
private:
static Application *_instance;
int _argc;
char **_argv;
std::string _applicationName, _applicationVersion;
WindowSettings _windowSettings, _newWindowSettings;
int _quitCode;
bool _quit;
bool _windowSettingsChanged;
int _videoFlags;
SDL_Surface *_surface;
SDL_Joystick *_joystick;
int _joystickDevice;
Settings *_settings;
BindingManager *_bindingManager;
FontManager *_fontManager;
Decorator *_decorator;
Render *_render;
void parseArgs();
void init();
void changeWindowSettings();
};
|
/*
thot package for statistical machine translation
Copyright (C) 2013-2017 Daniel Ortiz-Mart\'inez, Adam Harasimowicz
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 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/>.
*/
/**
* @file IncrHmmP0AligModel.h
*
* @brief Defines the IncrHmmP0AligModel class. IncrHmmP0AligModel
* class allows to generate and access to the data of a Hmm statistical
* alignment model with fixed p0 probability.
*/
#ifndef _IncrHmmP0AligModel_h
#define _IncrHmmP0AligModel_h
//--------------- Include files --------------------------------------
#if HAVE_CONFIG_H
# include <thot_config.h>
#endif /* HAVE_CONFIG_H */
#include "_incrHmmP0AligModel.h"
#include "IncrLexTable.h"
//--------------- Constants ------------------------------------------
//--------------- typedefs -------------------------------------------
//--------------- function declarations ------------------------------
//--------------- Classes --------------------------------------------
//--------------- IncrHmmP0AligModel class
class IncrHmmP0AligModel : public _incrHmmP0AligModel
{
public:
// Constructor
IncrHmmP0AligModel();
};
#endif
|
/*
* Support functions
*
* Copyright (C) 2014-2022, Joachim Metz <joachim.metz@gmail.com>
*
* Refer to AUTHORS for acknowledgements.
*
* This program 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 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 <https://www.gnu.org/licenses/>.
*/
#if !defined( _LIBAGDB_SUPPORT_H )
#define _LIBAGDB_SUPPORT_H
#include <common.h>
#include <types.h>
#include "libagdb_extern.h"
#include "libagdb_libbfio.h"
#include "libagdb_libcerror.h"
#if defined( __cplusplus )
extern "C" {
#endif
#if !defined( HAVE_LOCAL_LIBAGDB )
LIBAGDB_EXTERN \
const char *libagdb_get_version(
void );
LIBAGDB_EXTERN \
int libagdb_get_access_flags_read(
void );
LIBAGDB_EXTERN \
int libagdb_get_codepage(
int *codepage,
libcerror_error_t **error );
LIBAGDB_EXTERN \
int libagdb_set_codepage(
int codepage,
libcerror_error_t **error );
#endif /* !defined( HAVE_LOCAL_LIBAGDB ) */
LIBAGDB_EXTERN \
int libagdb_check_file_signature(
const char *filename,
libcerror_error_t **error );
#if defined( HAVE_WIDE_CHARACTER_TYPE )
LIBAGDB_EXTERN \
int libagdb_check_file_signature_wide(
const wchar_t *filename,
libcerror_error_t **error );
#endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */
LIBAGDB_EXTERN \
int libagdb_check_file_signature_file_io_handle(
libbfio_handle_t *file_io_handle,
libcerror_error_t **error );
#if defined( __cplusplus )
}
#endif
#endif /* !defined( _LIBAGDB_SUPPORT_H ) */
|
// Created file "Lib\src\Uuid\X64\d2d1iid"
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_ID2D1TransformedGeometry, 0x2cd906bb, 0x12e2, 0x11dc, 0x9f, 0xed, 0x00, 0x11, 0x43, 0xa0, 0x55, 0xf9);
|
/*
* The libcdata header wrapper
*
* Copyright (C) 2011-2022, Joachim Metz <joachim.metz@gmail.com>
*
* Refer to AUTHORS for acknowledgements.
*
* This program 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 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 <https://www.gnu.org/licenses/>.
*/
#if !defined( _VSHADOWTOOLS_LIBCDATA_H )
#define _VSHADOWTOOLS_LIBCDATA_H
#include <common.h>
/* Define HAVE_LOCAL_LIBCDATA for local use of libcdata
*/
#if defined( HAVE_LOCAL_LIBCDATA )
#include <libcdata_array.h>
#include <libcdata_btree.h>
#include <libcdata_definitions.h>
#include <libcdata_list.h>
#include <libcdata_list_element.h>
#include <libcdata_range_list.h>
#include <libcdata_tree_node.h>
#include <libcdata_types.h>
#else
/* If libtool DLL support is enabled set LIBCDATA_DLL_IMPORT
* before including libcdata.h
*/
#if defined( _WIN32 ) && defined( DLL_IMPORT )
#define LIBCDATA_DLL_IMPORT
#endif
#include <libcdata.h>
#endif /* defined( HAVE_LOCAL_LIBCDATA ) */
#endif /* !defined( _VSHADOWTOOLS_LIBCDATA_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_UPDATECHANNELMESSAGEREQUEST_P_H
#define QTAWS_UPDATECHANNELMESSAGEREQUEST_P_H
#include "chimerequest_p.h"
#include "updatechannelmessagerequest.h"
namespace QtAws {
namespace Chime {
class UpdateChannelMessageRequest;
class UpdateChannelMessageRequestPrivate : public ChimeRequestPrivate {
public:
UpdateChannelMessageRequestPrivate(const ChimeRequest::Action action,
UpdateChannelMessageRequest * const q);
UpdateChannelMessageRequestPrivate(const UpdateChannelMessageRequestPrivate &other,
UpdateChannelMessageRequest * const q);
private:
Q_DECLARE_PUBLIC(UpdateChannelMessageRequest)
};
} // namespace Chime
} // namespace QtAws
#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_GETHEALTHCHECKSTATUSREQUEST_P_H
#define QTAWS_GETHEALTHCHECKSTATUSREQUEST_P_H
#include "route53request_p.h"
#include "gethealthcheckstatusrequest.h"
namespace QtAws {
namespace Route53 {
class GetHealthCheckStatusRequest;
class GetHealthCheckStatusRequestPrivate : public Route53RequestPrivate {
public:
GetHealthCheckStatusRequestPrivate(const Route53Request::Action action,
GetHealthCheckStatusRequest * const q);
GetHealthCheckStatusRequestPrivate(const GetHealthCheckStatusRequestPrivate &other,
GetHealthCheckStatusRequest * const q);
private:
Q_DECLARE_PUBLIC(GetHealthCheckStatusRequest)
};
} // namespace Route53
} // namespace QtAws
#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_ATTACHUSERPOLICYREQUEST_H
#define QTAWS_ATTACHUSERPOLICYREQUEST_H
#include "iamrequest.h"
namespace QtAws {
namespace IAM {
class AttachUserPolicyRequestPrivate;
class QTAWSIAM_EXPORT AttachUserPolicyRequest : public IamRequest {
public:
AttachUserPolicyRequest(const AttachUserPolicyRequest &other);
AttachUserPolicyRequest();
virtual bool isValid() const Q_DECL_OVERRIDE;
protected:
virtual QtAws::Core::AwsAbstractResponse * response(QNetworkReply * const reply) const Q_DECL_OVERRIDE;
private:
Q_DECLARE_PRIVATE(AttachUserPolicyRequest)
};
} // namespace IAM
} // namespace QtAws
#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_LISTWORKERBLOCKSRESPONSE_H
#define QTAWS_LISTWORKERBLOCKSRESPONSE_H
#include "mturkresponse.h"
#include "listworkerblocksrequest.h"
namespace QtAws {
namespace MTurk {
class ListWorkerBlocksResponsePrivate;
class QTAWSMTURK_EXPORT ListWorkerBlocksResponse : public MTurkResponse {
Q_OBJECT
public:
ListWorkerBlocksResponse(const ListWorkerBlocksRequest &request, QNetworkReply * const reply, QObject * const parent = 0);
virtual const ListWorkerBlocksRequest * request() const Q_DECL_OVERRIDE;
protected slots:
virtual void parseSuccess(QIODevice &response) Q_DECL_OVERRIDE;
private:
Q_DECLARE_PRIVATE(ListWorkerBlocksResponse)
Q_DISABLE_COPY(ListWorkerBlocksResponse)
};
} // namespace MTurk
} // namespace QtAws
#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_DELETESTREAMRESPONSE_P_H
#define QTAWS_DELETESTREAMRESPONSE_P_H
#include "kinesisvideoresponse_p.h"
namespace QtAws {
namespace KinesisVideo {
class DeleteStreamResponse;
class DeleteStreamResponsePrivate : public KinesisVideoResponsePrivate {
public:
explicit DeleteStreamResponsePrivate(DeleteStreamResponse * const q);
void parseDeleteStreamResponse(QXmlStreamReader &xml);
private:
Q_DECLARE_PUBLIC(DeleteStreamResponse)
Q_DISABLE_COPY(DeleteStreamResponsePrivate)
};
} // namespace KinesisVideo
} // namespace QtAws
#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_DESCRIBEEGRESSONLYINTERNETGATEWAYSRESPONSE_P_H
#define QTAWS_DESCRIBEEGRESSONLYINTERNETGATEWAYSRESPONSE_P_H
#include "ec2response_p.h"
namespace QtAws {
namespace EC2 {
class DescribeEgressOnlyInternetGatewaysResponse;
class DescribeEgressOnlyInternetGatewaysResponsePrivate : public Ec2ResponsePrivate {
public:
explicit DescribeEgressOnlyInternetGatewaysResponsePrivate(DescribeEgressOnlyInternetGatewaysResponse * const q);
void parseDescribeEgressOnlyInternetGatewaysResponse(QXmlStreamReader &xml);
private:
Q_DECLARE_PUBLIC(DescribeEgressOnlyInternetGatewaysResponse)
Q_DISABLE_COPY(DescribeEgressOnlyInternetGatewaysResponsePrivate)
};
} // namespace EC2
} // namespace QtAws
#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_CREATEFPGAIMAGEREQUEST_P_H
#define QTAWS_CREATEFPGAIMAGEREQUEST_P_H
#include "ec2request_p.h"
#include "createfpgaimagerequest.h"
namespace QtAws {
namespace EC2 {
class CreateFpgaImageRequest;
class CreateFpgaImageRequestPrivate : public Ec2RequestPrivate {
public:
CreateFpgaImageRequestPrivate(const Ec2Request::Action action,
CreateFpgaImageRequest * const q);
CreateFpgaImageRequestPrivate(const CreateFpgaImageRequestPrivate &other,
CreateFpgaImageRequest * const q);
private:
Q_DECLARE_PUBLIC(CreateFpgaImageRequest)
};
} // namespace EC2
} // namespace QtAws
#endif
|
/* This file is part of the UAF (Unified Architecture Framework) project.
*
* Copyright (C) 2012 Wim Pessemier (Institute of Astronomy, KULeuven)
*
* Project website: http://www.ster.kuleuven.be/uaf
*
* This program 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 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/>.
*/
#ifndef UAF_DISCOVERER_H_
#define UAF_DISCOVERER_H_
// STD
#include <vector>
#include <string>
#include <ctime>
// SDK
#include "uaclientcpp/uaclientsdk.h"
#include "uaclientcpp/uadiscovery.h"
// UAF
#include "uaf/util/logger.h"
#include "uaf/util/status.h"
#include "uaf/util/sdkstatus.h"
#include "uaf/util/applicationdescription.h"
#include "uaf/util/serveronnetwork.h"
#include "uaf/util/endpointdescription.h"
#include "uaf/client/clientexport.h"
#include "uaf/client/database/database.h"
namespace uaf
{
/*******************************************************************************************//**
* An uaf::Discoverer can discover OPC UA servers in the system.
*
* @ingroup ClientDiscovery
***********************************************************************************************/
class UAF_EXPORT Discoverer
{
public:
/**
* Construct a Discoverer instance by providing a pointer to a logger factory and a client
* database.
*/
Discoverer(uaf::LoggerFactory *loggerFactory, uaf::Database* database);
/**
* Destruct the discoverer.
*/
virtual ~Discoverer();
/**
* Update the server descriptions by calling the OPC UA FindServers service
* on all configured discovery servers.
*/
uaf::Status findServers();
/**
* Update the discoveryUrls by calling the OPC UA FindServersOnNetwork service
* on the configured discovery server in ClientSettings.
*/
uaf::Status findServersOnNetwork();
/**
* Get the discovery URLs for the given server URI.
*
* @param serverUri The URI of the server of which you would like to get the
* discoveryUrls from.
* @param discoveryUrls Output parameter: the list of the discoveryUrls.
* @return Good if the server with the given serverUri was discovered, bad
* if not.
*/
uaf::Status getDiscoveryUrls(
const std::string& serverUri,
std::vector<std::string>& discoveryUrls);
/**
* Get the endpoint descriptions for a given server by calling the OPC UA
* GetEndpoints service on the given URL.
*
* @param discoveryUrl URL of the server to discover.
* @param endpointDescriptions Endpoint descriptions that will be fetched.
* @return Status of the service call.
*/
uaf::Status getEndpoints(
const std::string& discoveryUrl,
std::vector<uaf::EndpointDescription>& endpointDescriptions);
/**
* Get a const reference to the servers that were found.
*
* @return A vector of the application descriptions that were discovered.
*/
const std::vector<uaf::ApplicationDescription>& serversFound() const;
/**
* Get a const reference to the servers that were found on the network.
*
* @return A vector of the server descriptions that were found on the network.
*/
const std::vector<uaf::ServerOnNetwork>& serversOnNetworkFound() const;
private:
// no copying or assigning allowed
DISALLOW_COPY_AND_ASSIGN(Discoverer);
// the logger of the discoverer
uaf::Logger* logger_;
// a pointer to the shared database
uaf::Database* database_;
// are we busy with findServers()?
bool findServersBusy_;
bool findServersOnNetworkBusy_;
// mutexes to change the internal state
UaMutex findServersBusyMutex_;
UaMutex findServersOnNetworkBusyMutex_;
// the latest application descriptions
std::vector<uaf::ApplicationDescription> serverDescriptions_;
// the latest server-on-network descriptions
std::vector<uaf::ServerOnNetwork> serverOnNetworkDescriptions_;
// UaDiscovery instance
UaClientSdk::UaDiscovery uaDiscovery_;
};
}
#endif /* UAF_DISCOVERER_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_DESCRIBEDATASOURCEREQUEST_P_H
#define QTAWS_DESCRIBEDATASOURCEREQUEST_P_H
#include "quicksightrequest_p.h"
#include "describedatasourcerequest.h"
namespace QtAws {
namespace QuickSight {
class DescribeDataSourceRequest;
class DescribeDataSourceRequestPrivate : public QuickSightRequestPrivate {
public:
DescribeDataSourceRequestPrivate(const QuickSightRequest::Action action,
DescribeDataSourceRequest * const q);
DescribeDataSourceRequestPrivate(const DescribeDataSourceRequestPrivate &other,
DescribeDataSourceRequest * const q);
private:
Q_DECLARE_PUBLIC(DescribeDataSourceRequest)
};
} // namespace QuickSight
} // namespace QtAws
#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_DELETESIGNINGCERTIFICATERESPONSE_P_H
#define QTAWS_DELETESIGNINGCERTIFICATERESPONSE_P_H
#include "iamresponse_p.h"
namespace QtAws {
namespace IAM {
class DeleteSigningCertificateResponse;
class DeleteSigningCertificateResponsePrivate : public IamResponsePrivate {
public:
explicit DeleteSigningCertificateResponsePrivate(DeleteSigningCertificateResponse * const q);
void parseDeleteSigningCertificateResponse(QXmlStreamReader &xml);
private:
Q_DECLARE_PUBLIC(DeleteSigningCertificateResponse)
Q_DISABLE_COPY(DeleteSigningCertificateResponsePrivate)
};
} // namespace IAM
} // namespace QtAws
#endif
|
/****************************************************************************
**
** Copyright (C) 2012-2014 Andrey Bogdanov
**
** This file is part of the BeQtWidgets module of the BeQt library.
**
** BeQt 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.
**
** BeQt 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 BeQt. If not, see <http://www.gnu.org/licenses/>.
**
****************************************************************************/
#ifndef BPLAINTEXTEDIT_H
#define BPLAINTEXTEDIT_H
class BPlainTextEditPrivate;
class QMimeData;
class QWidget;
#include <BeQtCore/BBaseObject>
#include <QPlainTextEdit>
/*============================================================================
================================ BPlainTextEdit ==============================
============================================================================*/
class B_WIDGETS_EXPORT BPlainTextEdit : public QPlainTextEdit, public BBaseObject
{
Q_OBJECT
Q_PROPERTY(bool dragEnabled READ dragEnabled WRITE setDragEnabled)
B_DECLARE_PRIVATE(BPlainTextEdit)
public:
explicit BPlainTextEdit(QWidget *parent = 0);
~BPlainTextEdit();
protected:
explicit BPlainTextEdit(BPlainTextEditPrivate &d, QWidget *parent = 0);
public:
bool dragEnabled() const;
void setDragEnabled(bool b);
protected:
QMimeData *createMimeDataFromSelection() const;
private:
Q_DISABLE_COPY(BPlainTextEdit)
};
#endif // BPLAINTEXTEDIT_H
|
#ifndef _INCLUDE_BIT_MATRIX_IMPL_
#define _INCLUDE_BIT_MATRIX_IMPL_
#include "BitMatrix.h"
namespace encode
{
class BitMatrixImpl : public BitMatrix
{
public:
virtual BitMatrixType getType() const = 0;
virtual bool getValue(uint32_t row, uint32_t col) const = 0;
virtual void setValue(uint32_t row, uint32_t col) = 0;
virtual void clearValue(uint32_t row, uint32_t col) = 0;
//! Create a new matrix with the same content
virtual BitMatrix* duplicate() const = 0;
virtual void xorRows(uint32_t row_into, uint32_t row_from, uint32_t begin) = 0;
virtual void exchangeRows(uint32_t row1, uint32_t row2, std::vector<uint32_t>& rowOrder) = 0;
void vectorXorRows(BitVector& vec, uint32_t row_into, uint32_t row_from, uint32_t begin, std::vector<uint32_t>& rowOrder) override;
void vectorXorRows(BitVector& vec, uint32_t row_into, uint32_t row_from, uint32_t begin) override;
void print(uint32_t row_start, uint32_t column_start, uint32_t row_end, uint32_t column_end, std::ostream& outstream) const;
void print(uint32_t row_start, uint32_t column_start, uint32_t row_end, uint32_t column_end) const override;
//! Print whole matix
void print() const override;
uint32_t numRows() const override { return mRows; }
uint32_t numCols() const override { return mCols; }
virtual bool operator==(const BitMatrix& other) const = 0;
uint32_t getRowCount(uint32_t row) const;
//! Get first column in a row that has a value
std::pair<bool, uint32_t> getFirstCol(uint32_t row) const;
//! Get first in row in a colum that has a value;
std::pair<bool, uint32_t> getFirstRow(uint32_t col, uint32_t start = 0, int32_t max = -1) const;
//! Exchange content of col1 with content of col2
void exchangeCols(uint32_t col1, uint32_t col2);
//! Get content of a column as BitVector
virtual BitVector* getColumn(uint32_t index) const = 0;
//! Get content of a row as a BitVector
virtual BitVector* getRow(uint32_t index) const = 0;
//! Copy content from column src to column dst
virtual void copyColumn(uint32_t src, uint32_t dst) = 0;
//! Set the content of a column using a vector
void setColumn(uint32_t index, const BitVector& vec);
//! Set the content of a row
virtual void setRow(uint32_t index, const BitVector& vec) = 0;
//! Set row using a list of bools
void setRow(uint32_t index, const std::vector<bool>& values);
//! Clear a column
void clearColumn(uint32_t col);
//! Don't use implicit copying
void operator=(const BitMatrix& other) = delete;
protected:
BitMatrixImpl(uint32_t rows, uint32_t cols)
: mRows(rows), mCols(cols)
{
if(rows == 0 || cols == 0)
throw std::runtime_error("BitMatrix size cannot be 0");
}
private:
const uint32_t mRows;
const uint32_t mCols;
};
inline void BitMatrixImpl::vectorXorRows(BitVector& vec, uint32_t row_into, uint32_t row_from, uint32_t begin)
{
xorRows(row_into, row_from, begin);
vec.xorSymbols(row_into, row_from);
}
inline void BitMatrixImpl::vectorXorRows(BitVector& vec, uint32_t row_into, uint32_t row_from, uint32_t begin, std::vector<uint32_t>& rowOrder)
{
xorRows(row_into, row_from, begin);
vec.xorSymbols(row_into, row_from, rowOrder);
}
inline void BitMatrixImpl::print(uint32_t row_start, uint32_t column_start, uint32_t row_end, uint32_t column_end) const
{
print(row_start, column_start, row_end, column_end, std::cout);
}
inline void BitMatrixImpl::print() const
{
print(0,0,numRows(),numCols());
}
inline void BitMatrixImpl::clearColumn(uint32_t col)
{
if(col >= numCols())
throw std::runtime_error("Invalid column access");
for(uint32_t i = 0; i < numRows(); ++i)
{
clearValue(i, col);
}
}
template<typename T>
inline void exchange(std::vector<T>& vec, uint32_t p1, uint32_t p2)
{
T t = vec[p1];
vec[p1] = vec[p2];
vec[p2] = t;
}
} // raptor
#endif //_INCLUDE_BIT_MATRIX
|
/*
* File: TestConjugateFunction.h
* Author: chung
*
* Created on Nov 7, 2015, 4:10:56 PM
*/
#ifndef TESTCONJUGATEFUNCTION_H
#define TESTCONJUGATEFUNCTION_H
#include <cppunit/extensions/HelperMacros.h>
class TestConjugateFunction : public CPPUNIT_NS::TestFixture {
CPPUNIT_TEST_SUITE(TestConjugateFunction);
CPPUNIT_TEST(testCall);
CPPUNIT_TEST(testCall2);
CPPUNIT_TEST(testCallConj);
CPPUNIT_TEST(testCallConj2);
CPPUNIT_TEST(testCallProx);
CPPUNIT_TEST(testCategory);
CPPUNIT_TEST(testCategory2);
CPPUNIT_TEST_SUITE_END();
public:
TestConjugateFunction();
virtual ~TestConjugateFunction();
void setUp();
void tearDown();
private:
void testCall();
void testCall2();
void testCallConj();
void testCallConj2();
void testCallProx();
void testCategory();
void testCategory2();
};
#endif /* TESTCONJUGATEFUNCTION_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_UPDATELOADBALANCERATTRIBUTEREQUEST_P_H
#define QTAWS_UPDATELOADBALANCERATTRIBUTEREQUEST_P_H
#include "lightsailrequest_p.h"
#include "updateloadbalancerattributerequest.h"
namespace QtAws {
namespace Lightsail {
class UpdateLoadBalancerAttributeRequest;
class UpdateLoadBalancerAttributeRequestPrivate : public LightsailRequestPrivate {
public:
UpdateLoadBalancerAttributeRequestPrivate(const LightsailRequest::Action action,
UpdateLoadBalancerAttributeRequest * const q);
UpdateLoadBalancerAttributeRequestPrivate(const UpdateLoadBalancerAttributeRequestPrivate &other,
UpdateLoadBalancerAttributeRequest * const q);
private:
Q_DECLARE_PUBLIC(UpdateLoadBalancerAttributeRequest)
};
} // namespace Lightsail
} // namespace QtAws
#endif
|
#ifndef _CROSSCORR_H_
#define _CROSSCORR_H_
#include "../../extern/RealFFT/FFTReal.h"
#include "DNAVector.h"
class CCSignal
{
public:
CCSignal();
virtual ~CCSignal() {}
virtual void SetSequence(const DNAVector & b, int size);
virtual int GetFullSize() const {return GetA().size();}
virtual void SetSize(int n);
virtual void Smooth();
virtual int GetCount() const {return 4;}
virtual const svec<float> & Get(int i) const {
switch(i) {
case 0:
return m_A;
break;
case 1:
return m_C;
break;
case 2:
return m_G;
break;
case 3:
return m_T;
break;
}
return m_A;
}
protected:
svec<float> & A() {return m_A;};
svec<float> & C() {return m_C;};
svec<float> & G() {return m_G;};
svec<float> & T() {return m_T;};
const svec<float> & GetA() const {return m_A;};
const svec<float> & GetC() const {return m_C;};
const svec<float> & GetG() const {return m_G;};
const svec<float> & GetT() const {return m_T;};
void SeqToPCM(svec<float> & out, const DNAVector & in, char nuke);
void ComputeEntropy(const DNAVector & in);
svec<float> m_A;
svec<float> m_C;
svec<float> m_G;
svec<float> m_T;
svec<float> m_entropy;
int m_points;
};
inline double CCScore(const CCSignal & a, const CCSignal & b, int apos, int bpos)
{
int i;
double sum = 0;
for (i=0; i<a.GetCount(); i++) {
const svec<float> & af = a.Get(i);
const svec<float> & bf = b.Get(i);
double one = af[apos];
double two = bf[bpos];
double dot = one*two;
sum += dot;
//cout << "blah, i=" << i << " a=" << one << " b=" << two << endl;
}
//cout << "sum=" << sum << endl;
return sum;
}
typedef svec<float> vecFloat;
class CCSignalProtein : public CCSignal
{
public:
CCSignalProtein() : CCSignal() {}
virtual ~CCSignalProtein() {}
virtual void SetSequence(const DNAVector & b, int size);
virtual int GetFullSize() const {return m_aa[0].size();}
virtual void SetSize(int n);
virtual int GetCount() const {return 21;}
virtual const svec<float> & Get(int i) const {
return m_aa[i];
}
private:
vecFloat m_aa[21];
};
class CCSignalWithCodons : public CCSignal
{
public:
CCSignalWithCodons() : CCSignal() {}
virtual ~CCSignalWithCodons() {}
virtual void SetSequence(const DNAVector & b, int size);
virtual int GetFullSize() const {return GetA().size();}
virtual void SetSize(int n);
virtual int GetCount() const {return 4 + 21;}
virtual const svec<float> & Get(int i) const {
if (i < 4)
return CCSignal::Get(i);
return m_aa[i-4];
}
private:
vecFloat m_aa[21];
};
class CrossCorrelation
{
public:
CrossCorrelation();
~CrossCorrelation();
void CrossCorrelate(svec<float> & out, const CCSignal & one, const CCSignal & two);
void AutoCorrelate(vector<float> &out, vector<float> &in);
void DoOne(svec<float> & o, const svec<float> & in1, const svec<float> & in2);
private:
FFTReal<float> * m_pFFT;
int m_size;
};
class SeqMatch
{
public:
SeqMatch() {
m_startTarget = -1;
m_startQuery = -1;
m_len = 0;
m_ident = 0.;
}
SeqMatch(int startTarget, int startQuery, int len, double ident) {
Set(startTarget, startQuery, len, ident);
}
void Set(int startTarget, int startQuery, int len, double ident) {
m_startTarget = startTarget;
m_startQuery = startQuery;
m_len = len;
m_ident = (float)ident;
}
int GetStartTarget() const {return m_startTarget;}
int GetStartQuery() const {return m_startQuery;}
int GetLength() const {return m_len;}
double GetIdentity() const {return m_ident;}
private:
int m_startTarget;
int m_startQuery;
int m_len;
float m_ident;
};
class vecSeqMatch
{
public:
vecSeqMatch() {
m_len = 0;
}
void clear() {m_len = 0;}
void push_back(const SeqMatch & m) {
if (m_len >= m_data.isize())
m_data.resize(m_len + 4096);
m_data[m_len] = m;
m_len++;
}
int size() const {return m_len;}
int isize() const {return m_len;}
SeqMatch & operator[] (int i) {return m_data[i];}
const SeqMatch & operator[](int i) const {return m_data[i];}
private:
svec<SeqMatch> m_data;
int m_len;
};
class LookupMatch
{
public:
LookupMatch();
int GetScale() const {return m_scale;}
int GetScore(char a, char b) const {
int i = m_index[(int)a];
int j = m_index[(int)b];
return m_score[16*i + j];
}
private:
void Set(char c, int index) {
m_index[(int)c] = index;
m_letter[index] = c;
}
int m_index[256];
char m_letter[256];
int m_scale;
int m_score[256];
};
class SeqAnalyzer
{
public:
SeqAnalyzer();
void MatchUp(vecSeqMatch & out, const DNAVector & query, const DNAVector & target, svec<float> & xc);
void MatchUp(vecSeqMatch & out, const CCSignal & query, const CCSignal & target, svec<float> & xc);
void SetTopCutoff(double c) {
m_topCutoff = c;
//cout << "Using cutoff " << m_topCutoff << endl;
}
void SetMinLen(int l) {m_minLen = l;}
void SetMinIdent(double m) {m_minIdent = m;}
private:
int FindBest(svec<float> & cx);
int FindTop(svec<int> & top, svec<float> & xc, double topCutoff);
void DoOne(vecSeqMatch & out, const DNAVector & query, const DNAVector & target, int pos);
void DoOneFloat(vecSeqMatch & out, const CCSignal & query, const CCSignal & target, int pos);
void DoOneSlow(vecSeqMatch & out, const DNAVector & query, const DNAVector & target, int pos);
void DoOneFull(vecSeqMatch & out, const DNAVector & query, const DNAVector & target, int pos);
bool IsGood(const DNAVector & query, const DNAVector & target, int posQ, int posT, int len);
double m_minIdent;
double m_topCutoff;
int m_minLen;
svec<double> m_envelope;
int m_envSize;
LookupMatch m_lookup;
};
double PrintMatch(const DNAVector & query, const DNAVector & target, const SeqMatch & m, bool bSilent = false, bool bNukes = true);
#endif
|
// Created file "Lib\src\WiaGuid\wiapriv_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(IID_IStiLockMgr, 0x70681ea0, 0xe7bf, 0x4291, 0x9f, 0xb1, 0xfe, 0x55, 0x04, 0x82, 0xab, 0x88);
|
/*
* This is an open source non-commercial project. Dear PVS-Studio, please check it.
* PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
*/
/* LibTomCrypt, modular cryptographic library -- Tom St Denis
*
* LibTomCrypt is a library that provides various cryptographic
* algorithms in a highly modular and flexible manner.
*
* The library is free for all purposes without any express
* guarantee it works.
*
* Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
#include "tomcrypt.h"
/**
@file crypt_find_cipher_id.c
Find cipher by ID, Tom St Denis
*/
/**
Find a cipher by ID number
@param ID The ID (not same as index) of the cipher to find
@return >= 0 if found, -1 if not present
*/
int find_cipher_id(unsigned char ID)
{
int x;
LTC_MUTEX_LOCK(<c_cipher_mutex);
for (x = 0; x < TAB_SIZE; x++) {
if (cipher_descriptor[x].ID == ID) {
x = (cipher_descriptor[x].name == NULL) ? -1 : x;
LTC_MUTEX_UNLOCK(<c_cipher_mutex);
return x;
}
}
LTC_MUTEX_UNLOCK(<c_cipher_mutex);
return -1;
}
/* $Source: /cvs/libtom/libtomcrypt/src/misc/crypt/crypt_find_cipher_id.c,v $ */
/* $Revision: 1.6 $ */
/* $Date: 2006/12/28 01:27:24 $ */
|
/*
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_UPDATEPROFILEJOBRESPONSE_P_H
#define QTAWS_UPDATEPROFILEJOBRESPONSE_P_H
#include "gluedatabrewresponse_p.h"
namespace QtAws {
namespace GlueDataBrew {
class UpdateProfileJobResponse;
class UpdateProfileJobResponsePrivate : public GlueDataBrewResponsePrivate {
public:
explicit UpdateProfileJobResponsePrivate(UpdateProfileJobResponse * const q);
void parseUpdateProfileJobResponse(QXmlStreamReader &xml);
private:
Q_DECLARE_PUBLIC(UpdateProfileJobResponse)
Q_DISABLE_COPY(UpdateProfileJobResponsePrivate)
};
} // namespace GlueDataBrew
} // namespace QtAws
#endif
|
/*
* Copyright (C) 2013-2014 Morwenn
*
* EPYC 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.
*
* EPYC 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/>.
*/
#ifndef EPYC_FUNCTIONS_PRINT_H_
#define EPYC_FUNCTIONS_PRINT_H_
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <iostream>
namespace epyc
{
/**
* @brief Print an arbitrary number of objects
*
* @param first First object print
* @param others Other objects to print
*/
template<typename First, typename... Printable>
auto print(const First& first, const Printable&... others)
-> void;
/**
* @brief Print an object to the standard output
*
* That function is a simple wrapper around operator<<
* that will send the given argument to std::cout.
*
* @param object Object to print
*/
template<typename Printable>
auto print(const Printable& object)
-> void;
#include "detail/print.inl"
}
#endif // EPYC_FUNCTIONS_PRINT_H_
|
/* Copyright 2014 Adam Green (http://mbed.org/users/AdamGreen/)
This program 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/>.
*/
/* Handling and issuing routines for gdb file commands. */
#ifndef _CMD_FILE_H_
#define _CMD_FILE_H_
#include <stdint.h>
#include "buffer.h"
typedef struct
{
uint32_t filenameAddress;
uint32_t filenameLength;
uint32_t flags;
uint32_t mode;
} OpenParameters;
typedef struct
{
uint32_t fileDescriptor;
uint32_t bufferAddress;
int32_t bufferSize;
} TransferParameters;
typedef struct
{
uint32_t fileDescriptor;
int32_t offset;
int32_t whence;
} SeekParameters;
typedef struct
{
uint32_t filenameAddress;
uint32_t filenameLength;
} RemoveParameters;
typedef struct
{
uint32_t filenameAddress;
uint32_t filenameLength;
uint32_t fileStatBuffer;
} StatParameters;
typedef struct
{
uint32_t origFilenameAddress;
uint32_t origFilenameLength;
uint32_t newFilenameAddress;
uint32_t newFilenameLength;
} RenameParameters;
/* Real name of functions are in __mri namespace. */
int __mriIssueGdbFileOpenRequest(const OpenParameters* pParameters);
int __mriIssueGdbFileWriteRequest(const TransferParameters* pParameters);
int __mriIssueGdbFileReadRequest(const TransferParameters* pParameters);
int __mriIssueGdbFileCloseRequest(uint32_t fileDescriptor);
int __mriIssueGdbFileSeekRequest(const SeekParameters* pParameters);
int __mriIssueGdbFileFStatRequest(uint32_t fileDescriptor, uint32_t fileStatBuffer);
int __mriIssueGdbFileUnlinkRequest(const RemoveParameters* pParameters);
int __mriIssueGdbFileStatRequest(const StatParameters* pParameters);
int __mriIssueGdbFileRenameRequest(const RenameParameters* pParameters);
uint32_t __mriHandleFileIOCommand(void);
/* Macroes which allow code to drop the __mri namespace prefix. */
#define IssueGdbFileOpenRequest __mriIssueGdbFileOpenRequest
#define IssueGdbFileWriteRequest __mriIssueGdbFileWriteRequest
#define IssueGdbFileReadRequest __mriIssueGdbFileReadRequest
#define IssueGdbFileCloseRequest __mriIssueGdbFileCloseRequest
#define IssueGdbFileSeekRequest __mriIssueGdbFileSeekRequest
#define IssueGdbFileFStatRequest __mriIssueGdbFileFStatRequest
#define IssueGdbFileUnlinkRequest __mriIssueGdbFileUnlinkRequest
#define IssueGdbFileStatRequest __mriIssueGdbFileStatRequest
#define IssueGdbFileRenameRequest __mriIssueGdbFileRenameRequest
#define HandleFileIOCommand __mriHandleFileIOCommand
#endif /* _CMD_FILE_H_ */
|
//
// Copyright (c) 2009-2010 Mikko Mononen memon@inside.org
//
// This software is provided 'as-is', without any express or implied
// warranty. In no event will the authors be held liable for any damages
// arising from the use of this software.
// Permission is granted to anyone to use this software for any purpose,
// including commercial applications, and to alter it and redistribute it
// freely, subject to the following restrictions:
// 1. The origin of this software must not be misrepresented; you must not
// claim that you wrote the original software. If you use this software
// in a product, an acknowledgment in the product documentation would be
// appreciated but is not required.
// 2. Altered source versions must be plainly marked as such, and must not be
// misrepresented as being the original software.
// 3. This notice may not be removed or altered from any source distribution.
//
#ifndef DETOUROBSTACLEAVOIDANCE_H
#define DETOUROBSTACLEAVOIDANCE_H
struct dtObstacleCircle
{
float p[3]; ///< Position of the obstacle
float vel[3]; ///< Velocity of the obstacle
float dvel[3]; ///< Velocity of the obstacle
float rad; ///< Radius of the obstacle
float dp[3], np[3]; ///< Use for side selection during sampling.
float mult; ///< Make the obstacle more or less important
};
struct dtObstacleSegment
{
float p[3], q[3]; ///< End points of the obstacle segment
bool touch;
};
class dtObstacleAvoidanceDebugData
{
public:
dtObstacleAvoidanceDebugData();
~dtObstacleAvoidanceDebugData();
bool init(const int maxSamples);
void reset();
void addSample(const float* vel, const float ssize, const float pen,
const float vpen, const float vcpen, const float spen, const float tpen);
void normalizeSamples();
inline int getSampleCount() const { return m_nsamples; }
inline const float* getSampleVelocity(const int i) const { return &m_vel[i*3]; }
inline float getSampleSize(const int i) const { return m_ssize[i]; }
inline float getSamplePenalty(const int i) const { return m_pen[i]; }
inline float getSampleDesiredVelocityPenalty(const int i) const { return m_vpen[i]; }
inline float getSampleCurrentVelocityPenalty(const int i) const { return m_vcpen[i]; }
inline float getSamplePreferredSidePenalty(const int i) const { return m_spen[i]; }
inline float getSampleCollisionTimePenalty(const int i) const { return m_tpen[i]; }
private:
int m_nsamples;
int m_maxSamples;
float* m_vel;
float* m_ssize;
float* m_pen;
float* m_vpen;
float* m_vcpen;
float* m_spen;
float* m_tpen;
};
dtObstacleAvoidanceDebugData* dtAllocObstacleAvoidanceDebugData();
void dtFreeObstacleAvoidanceDebugData(dtObstacleAvoidanceDebugData* ptr);
static const int DT_MAX_PATTERN_DIVS = 32; ///< Max numver of adaptive divs.
static const int DT_MAX_PATTERN_RINGS = 4; ///< Max number of adaptive rings.
struct dtObstacleAvoidanceParams
{
float velBias;
float weightDesVel;
float weightCurVel;
float weightSide;
float weightToi;
float horizTime;
unsigned char gridSize; ///< grid
unsigned char adaptiveDivs; ///< adaptive
unsigned char adaptiveRings; ///< adaptive
unsigned char adaptiveDepth; ///< adaptive
};
class dtObstacleAvoidanceQuery
{
public:
dtObstacleAvoidanceQuery();
~dtObstacleAvoidanceQuery();
bool init(const int maxCircles, const int maxSegments);
void reset();
void addCircle(const float* pos, const float rad,
const float* vel, const float* dvel,
const float mult);
void addSegment(const float* p, const float* q);
int sampleVelocityGrid(const float* pos, const float rad, const float vmax,
const float* vel, const float* dvel, float* nvel,
const dtObstacleAvoidanceParams* params,
dtObstacleAvoidanceDebugData* debug = 0);
int sampleVelocityAdaptive(const float* pos, const float rad, const float vmax,
const float* vel, const float* dvel, float* nvel,
const dtObstacleAvoidanceParams* params,
dtObstacleAvoidanceDebugData* debug = 0);
inline int getObstacleCircleCount() const { return m_ncircles; }
const dtObstacleCircle* getObstacleCircle(const int i) { return &m_circles[i]; }
inline int getObstacleSegmentCount() const { return m_nsegments; }
const dtObstacleSegment* getObstacleSegment(const int i) { return &m_segments[i]; }
private:
void prepare(const float* pos, const float* dvel);
float processSample(const float* vcand, const float cs,
const float* pos, const float rad,
const float* vel, const float* dvel,
dtObstacleAvoidanceDebugData* debug);
dtObstacleCircle* insertCircle(const float dist);
dtObstacleSegment* insertSegment(const float dist);
dtObstacleAvoidanceParams m_params;
float m_invHorizTime;
float m_vmax;
float m_invVmax;
int m_maxCircles;
dtObstacleCircle* m_circles;
int m_ncircles;
int m_maxSegments;
dtObstacleSegment* m_segments;
int m_nsegments;
};
dtObstacleAvoidanceQuery* dtAllocObstacleAvoidanceQuery();
void dtFreeObstacleAvoidanceQuery(dtObstacleAvoidanceQuery* ptr);
#endif // DETOUROBSTACLEAVOIDANCE_H
|
/*
* Copyright (c) 2016 OpenCALTeam (https://github.com/OpenCALTeam),
* Telesio Research Group,
* Department of Mathematics and Computer Science,
* University of Calabria, Italy.
*
* This file is part of OpenCAL (Open Computing Abstraction Layer).
*
* OpenCAL 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.
*
* OpenCAL 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 OpenCAL. If not, see <http://www.gnu.org/licenses/>.
*/
#include <OpenCAL/cal2DBuffer.h>
#include <OpenCAL/cal2DBufferIO.h>
#include <stdlib.h>
#define STRLEN 256
void calfLoadMatrix2Db(CALbyte* M, int rows, int columns, FILE* f)
{
char str[STRLEN];
int i, j;
for (i=0; i<rows; i++)
for (j=0; j<columns; j++){
fscanf(f, "%s", str);
calSetMatrixElement(M, columns, i, j, atoi(str));
}
}
void calfLoadMatrix2Di(CALint* M, int rows, int columns, FILE* f)
{
char str[STRLEN];
int i, j;
for (i=0; i<rows; i++)
for (j=0; j<columns; j++){
fscanf(f, "%s", str);
calSetMatrixElement(M, columns, i, j, atoi(str));
}
}
void calfLoadMatrix2Dr(CALreal* M, int rows, int columns, FILE* f)
{
char str[STRLEN];
int i, j;
for (i=0; i<rows; i++)
for (j=0; j<columns; j++){
fscanf(f, "%s", str);
calSetMatrixElement(M, columns, i, j, atof(str));
}
}
CALbyte calLoadMatrix2Db(CALbyte* M, int rows, int columns, char* path)
{
FILE *f = NULL;
f = fopen(path, "r");
if ( !f )
return CAL_FALSE;
calfLoadMatrix2Db(M, rows, columns, f);
fclose(f);
return CAL_TRUE;
}
CALbyte calLoadMatrix2Di(CALint* M, int rows, int columns, char* path)
{
FILE *f = NULL;
f = fopen(path, "r");
if ( !f )
return CAL_FALSE;
calfLoadMatrix2Di(M, rows, columns, f);
fclose(f);
return CAL_TRUE;
}
CALbyte calLoadMatrix2Dr(CALreal* M, int rows, int columns, char* path)
{
FILE *f = NULL;
f = fopen(path, "r");
if ( !f )
return CAL_FALSE;
calfLoadMatrix2Dr(M, rows, columns, f);
fclose(f);
return CAL_TRUE;
}
void calfSaveMatrix2Db(CALbyte* M, int rows, int columns, FILE* f)
{
char str[STRLEN];
int i, j;
for (i=0; i<rows; i++) {
for (j=0; j<columns; j++) {
sprintf(str, "%d ", calGetMatrixElement(M, columns, i, j));
fprintf(f,"%s ",str);
}
fprintf(f,"\n");
}
}
void calfSaveMatrix2Di(CALint* M, int rows, int columns, FILE* f)
{
char str[STRLEN];
int i, j;
for (i=0; i<rows; i++) {
for (j=0; j<columns; j++) {
sprintf(str, "%d ", calGetMatrixElement(M, columns, i, j));
fprintf(f,"%s ",str);
}
fprintf(f,"\n");
}
}
void calfSaveMatrix2Dr(CALreal* M, int rows, int columns, FILE* f)
{
char str[STRLEN];
int i, j;
for (i=0; i<rows; i++) {
for (j=0; j<columns; j++) {
sprintf(str, "%f ", calGetMatrixElement(M, columns, i, j));
fprintf(f,"%s ",str);
}
fprintf(f,"\n");
}
}
CALbyte calSaveMatrix2Db(CALbyte* M, int rows, int columns, char* path)
{
FILE *f;
f = fopen(path, "w");
if ( !f )
return CAL_FALSE;
calfSaveMatrix2Db(M, rows, columns, f);
fclose(f);
return CAL_TRUE;
}
CALbyte calSaveMatrix2Di(CALint* M, int rows, int columns, char* path)
{
FILE *f;
f = fopen(path, "w");
if ( !f )
return CAL_FALSE;
calfSaveMatrix2Di(M, rows, columns, f);
fclose(f);
return CAL_TRUE;
}
CALbyte calSaveMatrix2Dr(CALreal* M, int rows, int columns, char* path)
{
FILE *f;
f = fopen(path, "w");
if ( !f )
return CAL_FALSE;
calfSaveMatrix2Dr(M, rows, columns, f);
fclose(f);
return CAL_TRUE;
}
|
// Created file "Lib\src\Uuid\X64\propkeys"
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_SAM_ScriptPath, 0x705d8364, 0x7547, 0x468c, 0x8c, 0x88, 0x84, 0x86, 0x0b, 0xcb, 0xed, 0x4c);
|
// Created file "Lib\src\Uuid\X64\functiondiscovery"
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_DeviceDisplay_DeviceDescription2, 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57);
|
/*
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_DESCRIBEHSMCLIENTCERTIFICATESREQUEST_P_H
#define QTAWS_DESCRIBEHSMCLIENTCERTIFICATESREQUEST_P_H
#include "redshiftrequest_p.h"
#include "describehsmclientcertificatesrequest.h"
namespace QtAws {
namespace Redshift {
class DescribeHsmClientCertificatesRequest;
class DescribeHsmClientCertificatesRequestPrivate : public RedshiftRequestPrivate {
public:
DescribeHsmClientCertificatesRequestPrivate(const RedshiftRequest::Action action,
DescribeHsmClientCertificatesRequest * const q);
DescribeHsmClientCertificatesRequestPrivate(const DescribeHsmClientCertificatesRequestPrivate &other,
DescribeHsmClientCertificatesRequest * const q);
private:
Q_DECLARE_PUBLIC(DescribeHsmClientCertificatesRequest)
};
} // namespace Redshift
} // namespace QtAws
#endif
|
/*
* Copyright (C) 2013 Swift Navigation Inc.
* Contact: Fergus Noble <fergus@swift-nav.com>
*
* This source is subject to the license found in the file 'LICENSE' which must
* be be distributed together with this source. All other rights reserved.
*
* THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
* EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
*/
#ifndef LIBSWIFTNAV_CONSTANTS_H
#define LIBSWIFTNAV_CONSTANTS_H
#include <math.h>
/** \defgroup constants Constants
* Useful constants.
* \{ */
#define MAX_CHANNELS 11 /**< Maximum sats we can track */
#define R2D (180.0 / M_PI) /**< Conversion factor from radians to degrees. */
#define D2R (M_PI / 180.0) /**< Conversion factor from degrees to radians. */
#define DAY_SECS (24*60*60) /** < Seconds in a day */
#define WEEK_SECS (7*DAY_SECS) /** < Seconds in a week */
/** \defgroup gps_constants GPS
* Constants related to the Global Positioning System.
* See ICD-GPS-200C.
* \{ */
/** The official GPS value of Pi.
* This is the value used by the CS to curve fit ephemeris parameters and
* should be used in all ephemeris calculations. */
#define GPS_PI 3.1415926535898
/** The GPS L1 center frequency in Hz. */
#define GPS_L1_HZ 1.57542e9
/** Earth's rotation rate as defined in the ICD in rad / s
* \note This is actually not identical to the usual WGS84 definition. */
#define GPS_OMEGAE_DOT 7.2921151467e-5
/** Earth’s Gravitational Constant as defined in the ICD in m^3 / s^2
* \note This is actually not identical to the usual WGS84 definition. */
#define GPS_GM 3.986005e14
/** The official GPS value of the speed of light in m / s.
* \note This is the exact value of the speed of light in vacuum (by the definition of meters). */
#define GPS_C 299792458.0
/** The official GPS value of the relativistic clock correction coefficient F. */
#define GPS_F -4.442807633e-10
/** The speed of light in air at standard temperature and pressure.
* \note This is GPS_C / mu where mu is 1.0002926 */
#define GPS_C_NO_VAC (GPS_C / 1.0002926)
/** The wavelength of L1 in a vacuum.
* \note This is GPS_C / GPS_L1_HZ. */
#define GPS_L1_LAMBDA (GPS_C / GPS_L1_HZ)
/** The wavelength of L1 in air at standard temperature and pressure.
* \note This is GPS_C_NO_VAC / GPS_L1_HZ. */
#define GPS_L1_LAMBDA_NO_VAC (GPS_C_NO_VAC / GPS_L1_HZ)
/** Approximate average distance to the GPS satellites in m. */
#define GPS_NOMINAL_RANGE 22.980e6
/** GPS C/A code chipping rate in Hz. */
#define GPS_CA_CHIPPING_RATE 1.023e6
/* \} */
/** \defgroup dgnss_constants DGNSS
* Approximate variance values used by the KF and IAR hypothesis test.
* \{ */
/** The default DD carrier phase variance to use in the hypothesis testing. */
#define DEFAULT_PHASE_VAR_TEST (9e-4 * 16)
/** The default DD pseudorange variance to use in the hypothesis testing. */
#define DEFAULT_CODE_VAR_TEST (100 * 400)
/** The default DD carrier phase variance to use in the Kalman filter. */
#define DEFAULT_PHASE_VAR_KF (9e-4 * 16)
/** The default DD pseudorange variance to use in the Kalman filter. */
#define DEFAULT_CODE_VAR_KF (100 * 400)
/** The default variance of the process noise Kalman filter. Its particular use
* is different from that of a normal KF process noise. It's still a random
* walk, but in a special space. Look at the code for its current usage.*/
#define DEFAULT_AMB_DRIFT_VAR 1e-8
/** The variance with which to initialize the Kalman Filter. */
#define DEFAULT_AMB_INIT_VAR 1e25
/** The variance with which to add new sats to the Kalman Filter.
* TODO deprecate in lieu of amb_init_var once we do some tuning. */
#define DEFAULT_NEW_INT_VAR 1e25
/* \} */
/* \} */
#endif /* LIBSWIFTNAV_CONSTANTS_H */
|
// Created file "Lib\src\ADSIid\guid"
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_BATTERY_DISCHARGE_ACTION_1, 0xd8742dcb, 0x3e6a, 0x4b3c, 0xb3, 0xfe, 0x37, 0x46, 0x23, 0xcd, 0xcf, 0x06);
|
// -*- mode: C++; c-file-style: "cc-mode" -*-
//*************************************************************************
// DESCRIPTION: Verilator: Variable life analysis
//
// Code available from: https://verilator.org
//
//*************************************************************************
//
// Copyright 2003-2022 by Wilson Snyder. This program is free software; you
// can redistribute it and/or modify it under the terms of either the GNU
// Lesser General Public License Version 3 or the Perl Artistic License
// Version 2.0.
// SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
//
//*************************************************************************
#ifndef VERILATOR_V3LIFE_H_
#define VERILATOR_V3LIFE_H_
#include "config_build.h"
#include "verilatedos.h"
class AstNetlist;
//============================================================================
class V3Life final {
public:
static void lifeAll(AstNetlist* nodep);
};
#endif // Guard
|
/*
Copyright (C) 2007 <SWGEmu>
This File is part of Core3.
This program 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 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, write to
the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Linking Engine3 statically or dynamically with other modules
is making a combined work based on Engine3.
Thus, the terms and conditions of the GNU Lesser General Public License
cover the whole combination.
In addition, as a special exception, the copyright holders of Engine3
give you permission to combine Engine3 program with free software
programs or libraries that are released under the GNU LGPL and with
code included in the standard release of Core3 under the GNU LGPL
license (or modified versions of such code, with unchanged license).
You may copy and distribute such a system following the terms of the
GNU LGPL for Engine3 and the licenses of the other code concerned,
provided that you include the source code of that other code when
and as the GNU LGPL requires distribution of source code.
Note that people who make modified versions of Engine3 are not obligated
to grant this special exception for their modified versions;
it is their choice whether to do so. The GNU Lesser General Public License
gives permission to release a modified version without this exception;
this exception also makes it possible to release a modified version
which carries forward this exception.
*/
#ifndef BUFFATTRIBUTE_H_
#define BUFFATTRIBUTE_H_
#include "engine/engine.h"
class BuffAttribute {
public:
static const uint8 HEALTH = 0;
static const uint8 STRENGTH = 1;
static const uint8 CONSTITUTION = 2;
static const uint8 ACTION = 3;
static const uint8 QUICKNESS = 4;
static const uint8 STAMINA = 5;
static const uint8 MIND = 6;
static const uint8 FOCUS = 7;
static const uint8 WILLPOWER = 8;
static const uint8 POISON = 9;
static const uint8 DISEASE = 10;
static const uint8 UNKNOWN = 11;
//TODO: This entire class needs to be removed. Posion and Disease are not attributes.
//THEY ARE SKILLMODS
static const uint8 ARRAYSIZE = 11;
static bool isHAM(uint8 attribute) {
return (attribute == HEALTH || attribute == ACTION || attribute == MIND);
}
static bool isProtection(uint8 attribute) {
return (attribute == POISON || attribute == DISEASE);
}
static String getProtectionString(uint8 attribute) {
String name = "";
switch(attribute) {
case POISON:
name = "resistance_poison";
break;
case DISEASE:
name = "resistance_disease";
break;
default:
name = "unknown";
break;
}
return name;
}
static uint8 getAttribute(String attribute) {
attribute = attribute.toLowerCase();
if (attribute == "health")
return HEALTH;
else if (attribute == "action")
return ACTION;
else if (attribute == "mind")
return MIND;
else if (attribute == "strength")
return STRENGTH;
else if (attribute == "constitution")
return CONSTITUTION;
else if (attribute == "quickness")
return QUICKNESS;
else if (attribute == "stamina")
return STAMINA;
else if (attribute == "focus")
return FOCUS;
else if (attribute == "willpower")
return WILLPOWER;
else if (attribute == "poison")
return POISON;
else if (attribute == "disease")
return DISEASE;
else
return UNKNOWN;
}
static String getName(const uint8 attribute, bool initialCap = false) {
String name = "";
switch (attribute) {
case HEALTH:
name ="health";
break;
case ACTION:
name = "action";
break;
case MIND:
name = "mind";
break;
case STRENGTH:
name = "strength";
break;
case CONSTITUTION:
name = "constitution";
break;
case QUICKNESS:
name = "quickness";
break;
case STAMINA:
name = "stamina";
break;
case FOCUS:
name = "focus";
break;
case WILLPOWER:
name = "willpower";
break;
case POISON:
name = "poison";
break;
case DISEASE:
name = "disease";
break;
default:
name = "unknown";
break;
}
if (initialCap)
name[0] = toupper(name[0]);
return name;
}
};
#endif /* BUFFATTRIBUTE_H_ */
|
// Created file "Lib\src\amstrmid\strmiids"
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(CODECAPI_AVEncStatAudioAveragePCMValue, 0x979272f8, 0xd17f, 0x4e32, 0xbb, 0x73, 0x4e, 0x73, 0x1c, 0x68, 0xba, 0x2d);
|
// Created file "Lib\src\ehstorguids\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(WPD_RESOURCE_BRANDING_ART, 0xb633b1ae, 0x6caf, 0x4a87, 0x95, 0x89, 0x22, 0xde, 0xd6, 0xdd, 0x58, 0x99);
|
/*
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_DESCRIBECHANNELBANRESPONSE_H
#define QTAWS_DESCRIBECHANNELBANRESPONSE_H
#include "chimeresponse.h"
#include "describechannelbanrequest.h"
namespace QtAws {
namespace Chime {
class DescribeChannelBanResponsePrivate;
class QTAWSCHIME_EXPORT DescribeChannelBanResponse : public ChimeResponse {
Q_OBJECT
public:
DescribeChannelBanResponse(const DescribeChannelBanRequest &request, QNetworkReply * const reply, QObject * const parent = 0);
virtual const DescribeChannelBanRequest * request() const Q_DECL_OVERRIDE;
protected slots:
virtual void parseSuccess(QIODevice &response) Q_DECL_OVERRIDE;
private:
Q_DECLARE_PRIVATE(DescribeChannelBanResponse)
Q_DISABLE_COPY(DescribeChannelBanResponse)
};
} // namespace Chime
} // namespace QtAws
#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_MODIFYWORKSPACECREATIONPROPERTIESRESPONSE_H
#define QTAWS_MODIFYWORKSPACECREATIONPROPERTIESRESPONSE_H
#include "workspacesresponse.h"
#include "modifyworkspacecreationpropertiesrequest.h"
namespace QtAws {
namespace WorkSpaces {
class ModifyWorkspaceCreationPropertiesResponsePrivate;
class QTAWSWORKSPACES_EXPORT ModifyWorkspaceCreationPropertiesResponse : public WorkSpacesResponse {
Q_OBJECT
public:
ModifyWorkspaceCreationPropertiesResponse(const ModifyWorkspaceCreationPropertiesRequest &request, QNetworkReply * const reply, QObject * const parent = 0);
virtual const ModifyWorkspaceCreationPropertiesRequest * request() const Q_DECL_OVERRIDE;
protected slots:
virtual void parseSuccess(QIODevice &response) Q_DECL_OVERRIDE;
private:
Q_DECLARE_PRIVATE(ModifyWorkspaceCreationPropertiesResponse)
Q_DISABLE_COPY(ModifyWorkspaceCreationPropertiesResponse)
};
} // namespace WorkSpaces
} // namespace QtAws
#endif
|
#include "testutils.h"
static void
ref_redc (mp_limb_t *rp, const mp_limb_t *ap, const mp_limb_t *mp, mp_size_t mn)
{
mpz_t t;
mpz_t m, a;
mp_size_t an;
mpz_init (t);
mpz_setbit (t, mn * GMP_NUMB_BITS);
mpz_roinit_n (m, mp, mn);
an = 2*mn;
while (an > 0 && ap[an-1] == 0)
an--;
mpz_roinit_n (a, ap, an);
mpz_invert (t, t, m);
mpz_mul (t, t, a);
mpz_mod (t, t, m);
mpz_limbs_copy (rp, t, mn);
mpz_clear (t);
}
/* Destructively normalize tp, then compare */
static int
mod_equal(const struct ecc_modulo *m, const mp_limb_t *ref, mp_limb_t *tp)
{
if (mpn_cmp (tp, m->m, m->size) >= 0)
mpn_sub_n (tp, tp, m->m, m->size);
return mpn_cmp (ref, tp, m->size) == 0;
}
#define MAX_ECC_SIZE (1 + 521 / GMP_NUMB_BITS)
#define MAX_SIZE (2*MAX_ECC_SIZE)
#define COUNT 50000
void
test_main (void)
{
gmp_randstate_t rands;
mp_limb_t a[MAX_SIZE];
mp_limb_t m[MAX_SIZE];
mp_limb_t ref[MAX_SIZE];
unsigned i;
mpz_t r;
gmp_randinit_default (rands);
test_randomize(rands);
mpz_init (r);
for (i = 0; ecc_curves[i]; i++)
{
const struct ecc_curve *ecc = ecc_curves[i];
unsigned j;
for (j = 0; j < COUNT; j++)
{
if (j & 1)
mpz_rrandomb (r, rands, 2*ecc->p.size * GMP_NUMB_BITS);
else
mpz_urandomb (r, rands, 2*ecc->p.size * GMP_NUMB_BITS);
mpz_limbs_copy (a, r, 2*ecc->p.size);
ref_redc (ref, a, ecc->p.m, ecc->p.size);
if (ecc->p.reduce != ecc->p.mod)
{
mpn_copyi (m, a, 2*ecc->p.size);
ecc->p.reduce (&ecc->p, m, m);
if (!mod_equal (&ecc->p, ref, m))
{
fprintf (stderr, "ecc->p.reduce failed: bit_size = %u, rp == xp\n",
ecc->p.bit_size);
fprintf (stderr, "a = ");
mpn_out_str (stderr, 16, a, 2*ecc->p.size);
fprintf (stderr, "\nm = ");
mpn_out_str (stderr, 16, m, ecc->p.size);
fprintf (stderr, " (bad)\nref = ");
mpn_out_str (stderr, 16, ref, ecc->p.size);
fprintf (stderr, "\n");
abort ();
}
mpn_copyi (m, a, 2*ecc->p.size);
ecc->p.reduce (&ecc->p, m + ecc->p.size, m);
if (!mod_equal (&ecc->p, ref, m + ecc->p.size))
{
fprintf (stderr, "ecc->p.reduce failed: bit_size = %u, rp == xp + size\n",
ecc->p.bit_size);
fprintf (stderr, "a = ");
mpn_out_str (stderr, 16, a, 2*ecc->p.size);
fprintf (stderr, "\nm = ");
mpn_out_str (stderr, 16, m + ecc->p.size, ecc->p.size);
fprintf (stderr, " (bad)\nref = ");
mpn_out_str (stderr, 16, ref, ecc->p.size);
fprintf (stderr, "\n");
abort ();
}
}
if (ecc->p.redc_size != 0)
{
mpn_copyi (m, a, 2*ecc->p.size);
if (ecc->p.m[0] == 1)
ecc_pm1_redc (&ecc->p, m, m);
else
ecc_pp1_redc (&ecc->p, m, m);
if (!mod_equal (&ecc->p, ref, m))
{
fprintf (stderr, "ecc_p%c1_redc failed: bit_size = %u\n",
(ecc->p.m[0] == 1) ? 'm' : 'p', ecc->p.bit_size);
fprintf (stderr, "a = ");
mpn_out_str (stderr, 16, a, 2*ecc->p.size);
fprintf (stderr, "\nm = ");
mpn_out_str (stderr, 16, m, ecc->p.size);
fprintf (stderr, " (bad)\nref = ");
mpn_out_str (stderr, 16, ref, ecc->p.size);
fprintf (stderr, "\n");
abort ();
}
mpn_copyi (m, a, 2*ecc->p.size);
if (ecc->p.m[0] == 1)
ecc_pm1_redc (&ecc->p, m + ecc->p.size, m);
else
ecc_pp1_redc (&ecc->p, m + ecc->p.size, m);
if (!mod_equal (&ecc->p, ref, m + ecc->p.size))
{
fprintf (stderr, "ecc_p%c1_redc failed: bit_size = %u\n",
(ecc->p.m[0] == 1) ? 'm' : 'p', ecc->p.bit_size);
fprintf (stderr, "a = ");
mpn_out_str (stderr, 16, a, 2*ecc->p.size);
fprintf (stderr, "\nm = ");
mpn_out_str (stderr, 16, m + ecc->p.size, ecc->p.size);
fprintf (stderr, " (bad)\nref = ");
mpn_out_str (stderr, 16, ref, ecc->p.size);
fprintf (stderr, "\n");
abort ();
}
}
}
}
mpz_clear (r);
gmp_randclear (rands);
}
|
/*
* This is an OpenSSL-compatible implementation of the RSA Data Security, Inc.
* MD4 Message-Digest Algorithm (RFC 1320).
*
* Homepage:
* http://openwall.info/wiki/people/solar/software/public-domain-source-code/md4
*
* Author:
* Alexander Peslyak, better known as Solar Designer <solar at openwall.com>
*
* This software was written by Alexander Peslyak in 2001. No copyright is
* claimed, and the software is hereby placed in the public domain.
* In case this attempt to disclaim copyright and place the software in the
* public domain is deemed null and void, then the software is
* Copyright (c) 2001 Alexander Peslyak and it is hereby released to the
* general public under the following terms:
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted.
*
* There's ABSOLUTELY NO WARRANTY, express or implied.
*
* See md4.c for more information.
*/
#ifndef __MD4_H__
#define __MD4_H__
/* Any 32-bit or wider unsigned integer data type will do */
typedef unsigned int MD4_u32plus;
typedef struct {
MD4_u32plus lo, hi;
MD4_u32plus a, b, c, d;
unsigned char buffer[64];
MD4_u32plus block[16];
} MD4_CTX;
unsigned long MD4_BlockChecksum(const void *data, int length);
#endif /* !__MD4_H__ */ |
#include "../picoc.h"
#include "../interpreter.h"
/* mark where to end the program for platforms which require this */
jmp_buf PicocExitBuf;
void PlatformInit(Picoc *pc)
{
}
void PlatformCleanup(Picoc *pc)
{
}
/* get a line of interactive input */
char *PlatformGetLine(char *Buf, int MaxLen, const char *Prompt)
{
if (Prompt != NULL)
printf("%s", Prompt);
fflush(stdout);
return fgets(Buf, MaxLen, stdin);
}
/* get a character of interactive input */
int PlatformGetCharacter()
{
fflush(stdout);
return getchar();
}
/* write a character to the console */
void PlatformPutc(unsigned char OutCh, union OutputStreamInfo *Stream)
{
putchar(OutCh);
}
/* read a file into memory */
char *PlatformReadFile(Picoc *pc, const char *FileName)
{
struct stat FileInfo;
char *ReadText;
FILE *InFile;
int BytesRead;
char *p;
if (stat(FileName, &FileInfo))
ProgramFailNoParser(pc, "can't read file %s\n", FileName);
ReadText = malloc(FileInfo.st_size + 1);
if (ReadText == NULL)
ProgramFailNoParser(pc, "out of memory\n");
InFile = fopen(FileName, "r");
if (InFile == NULL)
ProgramFailNoParser(pc, "can't read file %s\n", FileName);
BytesRead = fread(ReadText, 1, FileInfo.st_size, InFile);
if (BytesRead == 0)
ProgramFailNoParser(pc, "can't read file %s\n", FileName);
ReadText[BytesRead] = '\0';
fclose(InFile);
if ((ReadText[0] == '#') && (ReadText[1] == '!'))
{
for (p = ReadText; (*p != '\r') && (*p != '\n'); ++p)
{
*p = ' ';
}
}
return ReadText;
}
/* read and scan a file for definitions */
void PicocPlatformScanFile(Picoc *pc, const char *FileName)
{
char *SourceStr = PlatformReadFile(pc, FileName);
PicocParse(pc, FileName, SourceStr, strlen(SourceStr), TRUE, FALSE, TRUE, TRUE);
}
/* exit the program */
void PlatformExit(Picoc *pc, int RetVal)
{
pc->PicocExitValue = RetVal;
longjmp(pc->PicocExitBuf, 1);
}
|
//
// Class2.h
// TestForCocoaPod
//
// Created by Diego Marlon Medeiros Lima on 2/22/17.
// Copyright © 2017 CIT. All rights reserved.
//
#import <Foundation/Foundation.h>
@import UIKit;
@interface Class2 : NSObject
- (UIImageView *)imageViewForTest;
- (UIImageView *)imageViewForTest2;
@end
|
#include "rand.h"
#include <string.h>
#define MIX(a,b,c,d,e,f,g,h) \
{ \
a ^= b << 11; d += a; b += c; \
b ^= c >> 2; e += b; c += d; \
c ^= d << 8; f += c; d += e; \
d ^= e >> 16; g += d; e += f; \
e ^= f << 10; h += e; f += g; \
f ^= g >> 4; a += f; g += h; \
g ^= h << 8; b += g; h += a; \
h ^= a >> 9; c += h; a += b; \
}
static void
isaac(struct randctx *ctx)
{
register uint32_t i,x,y;
ctx->cc++;
ctx->bb += ctx->cc;
for (i = 0; i < 256; i++)
{
x = ctx->memory[i];
switch (i%4)
{
case 0:
ctx->aa = ctx->aa ^ (ctx->aa << 13);
break;
case 1:
ctx->aa = ctx->aa ^ (ctx->aa >> 6);
break;
case 2:
ctx->aa = ctx->aa ^ (ctx->aa << 2);
break;
case 3:
ctx->aa = ctx->aa ^ (ctx->aa >> 16);
break;
}
ctx->aa = ctx->memory[(i+128) % 256] + ctx->aa;
ctx->memory[i] = y = ctx->memory[(x>>2)%256] + ctx->aa + ctx->bb;
ctx->results[i] = ctx->bb = ctx->memory[(y>>10)%256]+x;
}
}
extern int
isaac_init(struct randctx *ctx, int32_t *seed, size_t cnt)
{
size_t i;
register uint32_t a,b,c,d,e,f,g,h;
memset(ctx, 0, sizeof(struct randctx));
if (cnt > 255)
{
return 0;
}
for (i = 0; i < cnt; i++)
{
ctx->results[i] = seed[i];
}
a=b=c=d=e=f=g=h=0x9e3779b9;
for (i = 0; i < 4; i++)
{
MIX(a,b,c,d,e,f,g,h);
}
for (i = 0; i < 256; i+= 8)
{
a += ctx->results[i + 0];
b += ctx->results[i + 1];
c += ctx->results[i + 2];
d += ctx->results[i + 3];
e += ctx->results[i + 4];
f += ctx->results[i + 5];
g += ctx->results[i + 6];
h += ctx->results[i + 7];
MIX(a,b,c,d,e,f,g,h);
ctx->memory[i + 0] = a;
ctx->memory[i + 1] = b;
ctx->memory[i + 2] = c;
ctx->memory[i + 3] = d;
ctx->memory[i + 4] = e;
ctx->memory[i + 5] = f;
ctx->memory[i + 6] = g;
ctx->memory[i + 7] = h;
}
for (i = 0; i < 256; i+= 8)
{
a += ctx->memory[i + 0];
b += ctx->memory[i + 1];
c += ctx->memory[i + 2];
d += ctx->memory[i + 3];
e += ctx->memory[i + 4];
f += ctx->memory[i + 5];
g += ctx->memory[i + 6];
h += ctx->memory[i + 7];
MIX(a,b,c,d,e,f,g,h);
ctx->memory[i + 0] = a;
ctx->memory[i + 1] = b;
ctx->memory[i + 2] = c;
ctx->memory[i + 3] = d;
ctx->memory[i + 4] = e;
ctx->memory[i + 5] = f;
ctx->memory[i + 6] = g;
ctx->memory[i + 7] = h;
}
isaac(ctx);
ctx->position = 256;
return 1;
}
extern int32_t
isaac_next_int(struct randctx *ctx)
{
if (ctx->position-- == 0)
{
isaac(ctx);
ctx->position = 255;
}
return ctx->results[ctx->position];
}
|
#ifndef SERIALIZABLE_H
#define SERIALIZABLE_H
#include "serialization_utils.h"
#include "SerializerStream.h"
#include <utility>
#include <array>
#include <atomic>
#include <cstdint>
static const std::uint32_t Serializable_type_id = std::numeric_limits<std::uint32_t>::max();
class SerializerStream;
class DeserializerStream;
enum class PointerType;
struct TypeHash{
unsigned char digest[32];
TypeHash(){
memset(digest, 0, sizeof(digest));
}
TypeHash(const unsigned char (&digest)[32]){
memcpy(this->digest, digest, 32);
}
bool operator==(const TypeHash &b) const{
return !memcmp(this->digest, b.digest, 32);
}
bool operator!=(const TypeHash &b) const{
return !(*this == b);
}
};
class SerializableMetadata;
class Serializable{
public:
typedef std::uintmax_t oid_t;
private:
static std::atomic<oid_t> next_id;
oid_t id;
public:
Serializable(): id(next_id++){}
virtual ~Serializable(){}
virtual void get_object_node(std::vector<ObjectNode> &) const = 0;
ObjectNode get_object_node() const{
return ObjectNode(
this,
[](const void *This, std::vector<ObjectNode> &dst){
static_cast<const Serializable *>(This)->get_object_node(dst);
},
[](const void *This, SerializerStream &ss){
static_cast<const Serializable *>(This)->serialize(ss);
},
this->get_type_id()
);
}
virtual void serialize(SerializerStream &) const = 0;
virtual std::uint32_t get_type_id() const = 0;
virtual TypeHash get_type_hash() const = 0;
virtual std::shared_ptr<SerializableMetadata> get_metadata() const = 0;
virtual void rollback_deserialization() = 0;
oid_t get_id() const{
return this->id;
}
};
inline ObjectNode get_object_node(const Serializable *serializable){
return !serializable ? ObjectNode() : serializable->get_object_node();
}
class DeserializerStream;
class GenericPointer{
public:
void *pointer;
virtual ~GenericPointer(){}
virtual void release() = 0;
virtual std::unique_ptr<GenericPointer> cast(std::uint32_t type) = 0;
};
enum class CastCategory : char{
Trivial = 0,
Complex = 1,
Invalid = 2,
};
class SerializableMetadata{
public:
typedef void *(*allocator_t)(std::uint32_t);
typedef void (*constructor_t)(std::uint32_t, void *, DeserializerStream &);
typedef void (*rollbacker_t)(std::uint32_t, void *);
typedef bool (*is_serializable_t)(std::uint32_t);
//typedef std::vector<std::tuple<std::uint32_t, std::uint32_t, int>> (*cast_offsets_t)();
typedef Serializable *(*dynamic_cast_f)(void *, std::uint32_t);
typedef std::unique_ptr<GenericPointer> (*allocate_pointer_t)(std::uint32_t, PointerType, void *);
typedef CastCategory (*categorize_cast_t)(std::uint32_t, std::uint32_t);
private:
std::vector<std::pair<std::uint32_t, TypeHash>> known_types;
//Used for deserialization.
std::unique_ptr<std::map<std::uint32_t, std::uint32_t>> typemap;
allocator_t allocator;
constructor_t constructor;
rollbacker_t rollbacker;
is_serializable_t is_serializable;
allocate_pointer_t pointer_allocator;
dynamic_cast_f dynamic_cast_p;
categorize_cast_t categorizer;
std::uint32_t map_type(std::uint32_t);
std::uint32_t known_type_from_hash(const TypeHash &);
public:
void add_type(std::uint32_t, const TypeHash &);
void set_type_mappings(const std::vector<std::pair<std::uint32_t, TypeHash> > &);
const std::vector<std::pair<std::uint32_t, TypeHash> > &get_known_types() const{
return this->known_types;
}
void set_functions(
const allocator_t &allocator,
const constructor_t &constructor,
const rollbacker_t &rollbacker,
const is_serializable_t &is_serializable,
const dynamic_cast_f &dynamic_cast_p,
const allocate_pointer_t &pointer_allocator,
categorize_cast_t categorizer){
this->allocator = allocator;
this->constructor = constructor;
this->rollbacker = rollbacker;
this->is_serializable = is_serializable;
this->dynamic_cast_p = dynamic_cast_p;
this->pointer_allocator = pointer_allocator;
this->categorizer = categorizer;
}
void *allocate_memory(DeserializerStream &ds, std::uint32_t);
void construct_memory(std::uint32_t, void *, DeserializerStream &);
void rollback_construction(std::uint32_t, void *);
bool type_is_serializable(std::uint32_t);
//std::vector<std::tuple<std::uint32_t, std::uint32_t, int>> get_cast_offsets();
Serializable *perform_dynamic_cast(void *p, std::uint32_t type);
std::unique_ptr<GenericPointer> allocate_pointer(std::uint32_t type, PointerType pointer_type, void *pointer);
CastCategory categorize_cast(std::uint32_t object_type, std::uint32_t dst_type);
void *trivial_cast(std::uint32_t dst_type, void *object, std::uint32_t object_type);
};
#endif
|
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_return.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: mmartin <mmartin@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2014/02/06 11:05:56 by mmartin #+# #+# */
/* Updated: 2014/03/25 21:08:37 by mmartin ### ########.fr */
/* */
/* ************************************************************************** */
#include <stdlib.h>
#include <unistd.h>
#include "ft_history.h"
#include "ft_termcap.h"
static void ft_print_error(t_line *first)
{
t_line *tmp;
tmp = first;
while (tmp)
{
write(1, &tmp->c, 1);
tmp = tmp->next;
}
}
static int ft_check_error(t_line *first)
{
t_line *tmp;
int word;
tmp = first;
while (tmp)
{
word = 0;
while (tmp && tmp->c != ' ')
{
word++;
tmp = tmp->next;
}
if (word >= 256)
{
write(0, "\n", 1);
write(0, "42sh: file name too long: ", 26);
ft_print_error(first);
write(0, "\n", 1);
return (-1);
}
if (tmp)
tmp = tmp->next;
}
return (1);
}
int ft_return(t_data *d)
{
t_line *tmp;
int i;
i = -1;
ft_end(d);
tmp = d->first;
ft_reset_history(d);
ft_history(d);
while (++i > -1 && tmp)
tmp = tmp->next;
if (ft_check_error(d->first) == -1)
return (-1);
tmp = d->first;
d->str = (char *)malloc(sizeof(char) * (i + 1));
i = 0;
while (tmp)
{
d->str[i++] = tmp->c;
tmp = tmp->next;
}
d->str[i] = '\0';
write(0, "\n", 1);
return (-1);
}
|
#ifndef NOTELIB_INTERNAL_COMMAND_HELPERS_H_
#define NOTELIB_INTERNAL_COMMAND_HELPERS_H_
#include "command.h"
#include "circular_buffer.h"
#include "internals.h"
enum notelib_status notelib_construct_command_data_note
(struct notelib_internals* internals,
notelib_instrument_uint instrument_index, void* trigger_data, struct circular_buffer_liberal_reader_unsynchronized* initialized_channel_buffer,
enum notelib_command_type* command_type_target, union notelib_command_data* command_data_target, void** channel_data_pre_write_buffer_target, notelib_note_id_uint* note_id_target);
enum notelib_status notelib_cleanup_command_data_note
(struct notelib_internals* internals, notelib_instrument_uint instrument_index, void* channel_data_pre_write_buffer, void* initialized_channel_buffer);
#endif//#ifndef NOTELIB_INTERNAL_COMMAND_HELPERS_H_
|
??=define DEF(a,b) a??(b??)
int i = 12345;
float a0_0 = -1.12345f;
float _b = 0.12345e+10f;
double d = .12345e10;
float c = 1.f;
typedef struct _some_s\
truct
{
int i;
int c,b;
}s\
\
o\
me_struct;
void main()
{
_some_struct a;
a.i+=10;
return i++==0;
}; |
/*
* SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include "prf_defs.h"
#if (WX_AIRSYNC_CFG)
#include "common/bt_target.h"
#include "stack/gatt_api.h"
#include "stack/gattdefs.h"
#include "bt_app_api.h"
/// Maximum Transmission Unit
#define ATT_DEFAULT_MTU (23)
#define BLE_WECHAT_MAX_DATA_LEN (ATT_DEFAULT_MTU - 3)
//define the key serivce uuid
#define ATT_SVC_AIRSYNC 0xFEE7
//define the airsync Char uuid
#define ATT_CHAR_AIRSYNC_WIT 0xFEC7
#define ATT_CHAR_AIRSYBC_NTF 0xFEC8
#define ATT_CHAR_AIRSYNC_READ 0xFEC9
typedef void (tAIRSYNC_CBACK)(UINT8 app_id, UINT8 event, UINT8 len, UINT8 *data);
/// WX AirSync Service Attributes Indexes
enum {
WX_IDX_SVC,
WX_IDX_AIRSYNC_WIT_CHAR,
WX_IDX_AIRSYNC_WIT_VAL,
WX_IDX_AIRSYNC_NTF_CHAR,
WX_IDX_AIRSYNC_NTF_VAL,
WX_IDX_AIRSYNC_READ_CHAR,
WX_IDX_AIRSYNC_READ_VAL,
WX_IDX_AIRSYNC_NTF_CFG,
WX_IDX_NB,
};
typedef struct {
BD_ADDR remote_bda;
BOOLEAN need_rsp;
UINT16 clt_cfg;
} tAirSync_WRITE_DATA;
typedef struct {
BOOLEAN in_use;
BOOLEAN congest;
UINT16 conn_id;
BOOLEAN connected;
BD_ADDR remote_bda;
UINT32 trans_id;
UINT8 cur_srvc_id;
} tAirSync_CLCB;
typedef struct {
UINT8 app_id;
UINT16 airsync_wirt_hdl;
UINT16 airsync_ntf_hdl;
UINT16 airsync_read_hdl;
UINT16 airsync_cfg_hdl;
tAIRSYNC_CBACK *p_cback;
} tAirSync_INST;
/* service engine control block */
typedef struct {
tAirSync_CLCB clcb; /* connection link*/
tGATT_IF gatt_if;
BOOLEAN enabled;
BOOLEAN is_primery;
tAirSync_INST airsync_inst;
UINT8 inst_id;
} tAIRSYNC_CB_ENV;
void AirSync_CreateService(void);
tAirSync_CLCB *airsync_env_clcb_alloc (UINT16 conn_id, BD_ADDR remote_bda);
UINT16 AirSync_env_find_conn_id_by_bd_adddr(BD_ADDR bda);
BOOLEAN AirSync_env_clcb_dealloc(UINT16 conn_id);
tGATT_STATUS AirSync_Init(tAIRSYNC_CBACK *call_back);
void AirSync_msg_notify(UINT8 len, UINT8 *button_msg);
extern tAIRSYNC_CB_ENV airsync_cb_env;
#endif ///WX_AIRSYNC_CFG
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include <vespa/vespalib/stllike/string.h>
namespace documentapi {
// Decide the type of string used once
typedef vespalib::string string;
} // namespace mbus
|
// UIImage+Resize.h
// Created by Trevor Harmon on 8/5/09.
// Free for personal or commercial use, with or without modification.
// No warranty is expressed or implied.
// NOTE: MTBProQuickSMS modified to convert from Category to
// new Class name since iPhone seems to have some issues with Categories
// of built in Classes
@interface UIImageResize : NSObject
{
}
+ (UIImage *)croppedImage:(CGRect)bounds image:(UIImage*)image;
+ (UIImage *)thumbnailImage:(NSInteger)thumbnailSize
transparentBorder:(NSUInteger)borderSize
cornerRadius:(NSUInteger)cornerRadius
interpolationQuality:(CGInterpolationQuality)quality
image:(UIImage*)image;
+ (UIImage *)resizedImage:(CGSize)newSize
interpolationQuality:(CGInterpolationQuality)quality
image:(UIImage*)image
hires:(BOOL)hires;
+ (UIImage *)resizedImageWithContentMode:(UIViewContentMode)contentMode
bounds:(CGSize)bounds
interpolationQuality:(CGInterpolationQuality)quality
image:(UIImage*)image;
@end
|
// Copyright (C) 2015 Davis E. King (davis@dlib.net)
// License: Boost Software License See LICENSE.txt for the full license.
#ifndef DLIB_IMGLAB_ClUSTER_H_
#define DLIB_IMGLAB_ClUSTER_H_
#include <dlib/cmd_line_parser.h>
int cluster_dataset(const dlib::command_line_parser& parser);
#endif //DLIB_IMGLAB_ClUSTER_H_
|
// Ghostware Games inc. 2016 -Julian Williams
#pragma once
#include <string>
#include <vector>
#include <array>
#include <GG/Core/Json.h>
#include "InputContext.h"
namespace GG
{
struct PersistentState
{
PersistentState()
{
mouseX = 0;
mouseY = 0;
touchX.fill( 0 );
touchY.fill( 0 );
touchMode.fill( 0 );
}
int32 mouseX;
int32 mouseY;
std::array< int32, EventAction::kMaxTouchId > touchX;
std::array< int32, EventAction::kMaxTouchId > touchY;
std::array< int32, EventAction::kMaxTouchId > touchMode;
};
class InputSystem
{
public:
InputSystem( uint width = 1, uint height = 1);
~InputSystem();
void init( const json & j );
void shutdown();
void setWindowBounds( uint width, uint height );
void update();
bool checkAction( const std::string & eventName ) const;
float getAxis( const std::string & axisName ) const;
bool getTouchPosition( uint touchId, uint & x, uint & y ) const;
int32 getTouchMode( uint touchId ) const;
private:
bool _checkKeyButton( const EventAction & a ) const;
bool _checkPointerButton( const EventAction & a ) const;
bool _checkTouch( const EventAction & a ) const;
bool _getAxis( const EventAction & a, float & axis ) const;
bool _scaleMouseAxis(
const InputEvent & e,
float & outputRange,
uint axis,
uint oldAxis,
uint scale ) const;
bool _scaleTouchAxis(
const InputEvent & e,
float & outputRange,
uint axis,
uint oldAxis,
uint scale ) const;
bool _scaleKeyAxis( const InputEvent & e, float & outputRange ) const;
private:
static int32 _GetPointerMotion( void * systemData, void * userData );
private:
uint _width;
uint _height;
PersistentState _previousState;
PersistentState _currentState;
std::vector< InputContext > _contextList;
};
} |
/////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2009-2011 Alan Wright. All rights reserved.
// Distributable under the terms of either the Apache License (Version 2.0)
// or the GNU Lesser General Public License.
/////////////////////////////////////////////////////////////////////////////
#ifndef FILTERINDEXREADER_H
#define FILTERINDEXREADER_H
#include "IndexReader.h"
#include "TermPositions.h"
#include "TermEnum.h"
namespace Lucene
{
/// A FilterIndexReader contains another IndexReader, which it uses as its basic source of data, possibly
/// transforming the data along the way or providing additional functionality. The class FilterIndexReader
/// itself simply implements all abstract methods of IndexReader with versions that pass all requests to
/// the contained index reader. Subclasses of FilterIndexReader may further override some of these methods
/// and may also provide additional methods and fields.
class LPPAPI FilterIndexReader : public IndexReader
{
public:
/// Construct a FilterIndexReader based on the specified base reader. Directory locking for delete,
/// undeleteAll, and setNorm operations is left to the base reader.
///
/// Note that base reader is closed if this FilterIndexReader is closed.
/// @param in specified base reader.
FilterIndexReader(IndexReaderPtr in);
virtual ~FilterIndexReader();
LUCENE_CLASS(FilterIndexReader);
protected:
IndexReaderPtr in;
public:
virtual DirectoryPtr directory();
virtual Collection<TermFreqVectorPtr> getTermFreqVectors(int32_t docNumber);
virtual TermFreqVectorPtr getTermFreqVector(int32_t docNumber, const String& field);
virtual void getTermFreqVector(int32_t docNumber, const String& field, TermVectorMapperPtr mapper);
virtual void getTermFreqVector(int32_t docNumber, TermVectorMapperPtr mapper);
virtual int32_t numDocs();
virtual int32_t maxDoc();
virtual DocumentPtr document(int32_t n, FieldSelectorPtr fieldSelector);
virtual bool isDeleted(int32_t n);
virtual bool hasDeletions();
virtual bool hasNorms(const String& field);
virtual ByteArray norms(const String& field);
virtual void norms(const String& field, ByteArray norms, int32_t offset);
virtual TermEnumPtr terms();
virtual TermEnumPtr terms(TermPtr t);
virtual int32_t docFreq(TermPtr t);
virtual TermDocsPtr termDocs();
virtual TermDocsPtr termDocs(TermPtr term);
virtual TermPositionsPtr termPositions();
virtual HashSet<String> getFieldNames(FieldOption fieldOption);
virtual int64_t getVersion();
virtual bool isCurrent();
virtual bool isOptimized();
virtual Collection<IndexReaderPtr> getSequentialSubReaders();
/// If the subclass of FilteredIndexReader modifies the contents of the FieldCache, you must
/// override this method to provide a different key
virtual LuceneObjectPtr getFieldCacheKey();
/// If the subclass of FilteredIndexReader modifies the deleted docs, you must override this
/// method to provide a different key
virtual LuceneObjectPtr getDeletesCacheKey();
protected:
virtual void doUndeleteAll();
virtual void doSetNorm(int32_t doc, const String& field, uint8_t value);
virtual void doDelete(int32_t docNum);
virtual void doCommit(MapStringString commitUserData);
virtual void doClose();
};
/// Base class for filtering {@link TermDocs} implementations.
class LPPAPI FilterTermDocs : public TermPositions, public LuceneObject
{
public:
FilterTermDocs(TermDocsPtr in);
virtual ~FilterTermDocs();
LUCENE_CLASS(FilterTermDocs);
protected:
TermDocsPtr in;
public:
virtual void seek(TermPtr term);
virtual void seek(TermEnumPtr termEnum);
virtual int32_t doc();
virtual int32_t freq();
virtual bool next();
virtual int32_t read(Collection<int32_t> docs, Collection<int32_t> freqs);
virtual bool skipTo(int32_t target);
virtual void close();
};
/// Base class for filtering {@link TermPositions} implementations.
class LPPAPI FilterTermPositions : public FilterTermDocs
{
public:
FilterTermPositions(TermPositionsPtr in);
virtual ~FilterTermPositions();
LUCENE_CLASS(FilterTermPositions);
public:
virtual int32_t nextPosition();
virtual int32_t getPayloadLength();
virtual ByteArray getPayload(ByteArray data, int32_t offset);
virtual bool isPayloadAvailable();
};
/// Base class for filtering {@link TermEnum} implementations.
class LPPAPI FilterTermEnum : public TermEnum
{
public:
FilterTermEnum(TermEnumPtr in);
virtual ~FilterTermEnum();
LUCENE_CLASS(FilterTermEnum);
protected:
TermEnumPtr in;
public:
virtual bool next();
virtual TermPtr term();
virtual int32_t docFreq();
virtual void close();
};
}
#endif
|
/* Copyright 2007-2015 QReal Research Group
*
* 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 <QtCore/QMap>
#include <qrtext/lua/ast/node.h>
#include "reservedFunctionsConverter.h"
#include "generatorBase/lua/precedenceConverterInterface.h"
#include "generatorBase/templateParametrizedEntity.h"
#include "generatorBase/simpleGenerators/binding.h"
namespace qrtext {
class LanguageToolboxInterface;
}
namespace generatorBase {
namespace lua {
class LuaPrinter : public qrtext::lua::LuaAstVisitorInterface
, public TemplateParametrizedEntity
{
public:
/// Takes ownership on converters.
LuaPrinter(const QString &pathToTemplates
, const qrtext::LanguageToolboxInterface &textLanguage
, PrecedenceConverterInterface &precedeceTable
, const simple::Binding::ConverterInterface *reservedVariablesConverter);
~LuaPrinter();
/// Prints the given AST to the code using a set of templates placed in the given in the constructor directory.
virtual QString print(const QSharedPointer<qrtext::lua::ast::Node> &node);
/// Prints the given AST to the code on the target language and casts it to string.
virtual QString castToString(const QSharedPointer<qrtext::lua::ast::Node> &node);
private:
void visit(const qrtext::lua::ast::Number &node) override;
void visit(const qrtext::lua::ast::UnaryMinus &node) override;
void visit(const qrtext::lua::ast::Not &node) override;
void visit(const qrtext::lua::ast::BitwiseNegation &node) override;
void visit(const qrtext::lua::ast::Length &node) override;
void visit(const qrtext::lua::ast::LogicalAnd &node) override;
void visit(const qrtext::lua::ast::LogicalOr &node) override;
void visit(const qrtext::lua::ast::Addition &node) override;
void visit(const qrtext::lua::ast::Subtraction &node) override;
void visit(const qrtext::lua::ast::Multiplication &node) override;
void visit(const qrtext::lua::ast::Division &node) override;
void visit(const qrtext::lua::ast::IntegerDivision &node) override;
void visit(const qrtext::lua::ast::Modulo &node) override;
void visit(const qrtext::lua::ast::Exponentiation &node) override;
void visit(const qrtext::lua::ast::BitwiseAnd &node) override;
void visit(const qrtext::lua::ast::BitwiseOr &node) override;
void visit(const qrtext::lua::ast::BitwiseXor &node) override;
void visit(const qrtext::lua::ast::BitwiseLeftShift &node) override;
void visit(const qrtext::lua::ast::BitwiseRightShift &node) override;
void visit(const qrtext::lua::ast::Concatenation &node) override;
void visit(const qrtext::lua::ast::Equality &node) override;
void visit(const qrtext::lua::ast::LessThan &node) override;
void visit(const qrtext::lua::ast::LessOrEqual &node) override;
void visit(const qrtext::lua::ast::Inequality &node) override;
void visit(const qrtext::lua::ast::GreaterThan &node) override;
void visit(const qrtext::lua::ast::GreaterOrEqual &node) override;
void visit(const qrtext::lua::ast::IntegerNumber &node) override;
void visit(const qrtext::lua::ast::FloatNumber &node) override;
void visit(const qrtext::lua::ast::FieldInitialization &node) override;
void visit(const qrtext::lua::ast::TableConstructor &node) override;
void visit(const qrtext::lua::ast::String &node) override;
void visit(const qrtext::lua::ast::True &node) override;
void visit(const qrtext::lua::ast::False &node) override;
void visit(const qrtext::lua::ast::Nil &node) override;
void visit(const qrtext::lua::ast::Identifier &node) override;
void visit(const qrtext::lua::ast::FunctionCall &node) override;
void visit(const qrtext::lua::ast::MethodCall &node) override;
void visit(const qrtext::lua::ast::Assignment &node) override;
void visit(const qrtext::lua::ast::Block &node) override;
void visit(const qrtext::lua::ast::IndexingExpression &node) override;
/// Returns true if child expression must be wrapped into the brackets.
/// The default implementation returns true if the parent operation has greater precedence or
/// equal precedence and child is situated on the opposite side to operator`s associativity.
/// May be redefined by printers to concrete language.
virtual bool needBrackets(const qrtext::lua::ast::Node &parent
, const qrtext::lua::ast::Node &child
, qrtext::core::Associativity childAssociativity = qrtext::core::Associativity::right) const;
void processUnary(const qrtext::core::ast::UnaryOperator &node, const QString &templateFileName);
void processBinary(const qrtext::core::ast::BinaryOperator &node, const QString &templateFileName);
void processTemplate(const qrtext::lua::ast::Node &node, const QString &templateFileName
, QMap<QString, QSharedPointer<qrtext::lua::ast::Node>> const &bindings);
void pushResult(const qrtext::lua::ast::Node &node, const QString &generatedCode);
QString popResult(const qrtext::lua::ast::Node &node, bool wrapIntoBrackets = false);
QStringList popResults(const QList<QSharedPointer<qrtext::lua::ast::Node>> &nodes);
bool printWithoutPop(const QSharedPointer<qrtext::lua::ast::Node> &node);
QString toString(const QSharedPointer<qrtext::lua::ast::Node> &node);
const qrtext::LanguageToolboxInterface &mTextLanguage;
QMap<const qrtext::lua::ast::Node *, QString> mGeneratedCode;
PrecedenceConverterInterface &mPrecedenceTable;
const simple::Binding::ConverterInterface *mReservedVariablesConverter; // Takes ownership
ReservedFunctionsConverter mReservedFunctionsConverter;
};
}
}
|
/* Copyright 2015 Google Inc. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
#if !GOOGLE_CUDA
#error This file must only be included when building with Cuda support
#endif
#ifndef TENSORFLOW_KERNELS_CWISE_OPS_GPU_COMMON_CU_H_
#define TENSORFLOW_KERNELS_CWISE_OPS_GPU_COMMON_CU_H_
#define EIGEN_USE_GPU
#include <complex>
#include "tensorflow/core/framework/tensor_types.h"
#include "tensorflow/core/kernels/cwise_ops.h"
#include "tensorflow/core/platform/port.h"
#include "tensorflow/core/platform/logging.h"
namespace tensorflow {
namespace functor {
typedef Eigen::GpuDevice GPUDevice;
typedef std::complex<float> complex64;
// Partial specialization of UnaryFunctor<Device=GPUDevice, Functor>.
template <typename Functor>
struct UnaryFunctor<GPUDevice, Functor> {
void operator()(const GPUDevice& d, typename Functor::tout_type out,
typename Functor::tin_type in) {
out.device(d) = in.unaryExpr(typename Functor::func());
}
};
// Partial specialization of BinaryFunctor<Device=GPUDevice, Functor>.
template <typename Functor, int NDIMS>
struct BinaryFunctor<GPUDevice, Functor, NDIMS> {
void operator()(const GPUDevice& d, typename Functor::tout_type out,
typename Functor::tin_type in0,
typename Functor::tin_type in1) {
out.device(d) = in0.binaryExpr(in1, typename Functor::func());
}
void Left(const GPUDevice& d, typename Functor::tout_type out,
typename Functor::tscalar_type scalar,
typename Functor::tin_type in) {
typedef typename Functor::out_type Tout;
typedef typename Functor::in_type Tin;
typedef typename Functor::func Binary;
typedef typename Eigen::internal::scalar_left<Tout, Tin, Binary> Unary;
out.device(d) = in.unaryExpr(Unary(scalar.data()));
}
void Right(const GPUDevice& d, typename Functor::tout_type out,
typename Functor::tin_type in,
typename Functor::tscalar_type scalar) {
typedef typename Functor::out_type Tout;
typedef typename Functor::in_type Tin;
typedef typename Functor::func Binary;
typedef typename Eigen::internal::scalar_right<Tout, Tin, Binary> Unary;
out.device(d) = in.unaryExpr(Unary(scalar.data()));
}
void BCast(const GPUDevice& d,
typename TTypes<typename Functor::out_type, NDIMS>::Tensor out,
typename TTypes<typename Functor::in_type, NDIMS>::ConstTensor in0,
typename Eigen::array<Eigen::DenseIndex, NDIMS> bcast0,
typename TTypes<typename Functor::in_type, NDIMS>::ConstTensor in1,
typename Eigen::array<Eigen::DenseIndex, NDIMS> bcast1) {
typedef typename Functor::in_type T;
typename Functor::func func;
if ((NDIMS == 2) && Functor::use_bcast_optimization &&
use_bcast_optimization<T>::value) {
const bool bcast0_all_one = AllOne<NDIMS>(bcast0);
const bool bcast1_all_one = AllOne<NDIMS>(bcast1);
if (bcast0_all_one && !bcast1_all_one) {
out.device(d) = in0.binaryExpr(in1.broadcast(bcast1), func);
return;
}
if (!bcast0_all_one && bcast1_all_one) {
out.device(d) = in0.broadcast(bcast0).binaryExpr(in1, func);
return;
}
}
out.device(d) =
in0.broadcast(bcast0).binaryExpr(in1.broadcast(bcast1), func);
}
};
template <typename T>
struct SelectFunctor<GPUDevice, T> {
void operator()(const GPUDevice& d, typename TTypes<T>::Flat out,
typename TTypes<bool>::ConstFlat cond_flat,
typename TTypes<T>::ConstFlat then_flat,
typename TTypes<T>::ConstFlat else_flat) {
out.device(d) = cond_flat.select(then_flat, else_flat);
}
};
// Macros to explicitly instantiate kernels on GPU for multiple types
// (T0, T1, etc.) for UnaryFunctor (e.g., functor:sqrt).
#define DEFINE_UNARY1(F, T) template struct UnaryFunctor<GPUDevice, F<T> >
#define DEFINE_UNARY2(F, T0, T1) \
DEFINE_UNARY1(F, T0); \
DEFINE_UNARY1(F, T1)
#define DEFINE_UNARY3(F, T0, T1, T2) \
DEFINE_UNARY2(F, T0, T1); \
DEFINE_UNARY1(F, T2)
#define DEFINE_UNARY4(F, T0, T1, T2, T3) \
DEFINE_UNARY2(F, T0, T1); \
DEFINE_UNARY2(F, T2, T3)
#define DEFINE_UNARY5(F, T0, T1, T2, T3, T4) \
DEFINE_UNARY2(F, T0, T1); \
DEFINE_UNARY3(F, T2, T3, T4)
// Macros to explicitly instantiate kernels on GPU for multiple types
// (T0, T1, etc.) for BinaryFunctor.
#define DEFINE_BINARY1(F, T) \
template struct BinaryFunctor<GPUDevice, F<T>, 1>; \
template struct BinaryFunctor<GPUDevice, F<T>, 2>; \
template struct BinaryFunctor<GPUDevice, F<T>, 3>
#define DEFINE_BINARY2(F, T0, T1) \
DEFINE_BINARY1(F, T0); \
DEFINE_BINARY1(F, T1)
#define DEFINE_BINARY3(F, T0, T1, T2) \
DEFINE_BINARY2(F, T0, T1); \
DEFINE_BINARY1(F, T2)
#define DEFINE_BINARY4(F, T0, T1, T2, T3) \
DEFINE_BINARY2(F, T0, T1); \
DEFINE_BINARY2(F, T2, T3)
#define DEFINE_BINARY5(F, T0, T1, T2, T3, T4) \
DEFINE_BINARY2(F, T0, T1); \
DEFINE_BINARY3(F, T2, T3, T4)
} // end namespace functor
} // end namespace tensorflow
#endif // TENSORFLOW_KERNELS_CWISE_OPS_GPU_COMMON_CU_H_
|
/*
* Copyright (C) 2017-2021 Smirnov Vladimir mapron1@gmail.com
* Source code 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 or in file COPYING-APACHE-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.h
*/
#pragma once
#include "IConfig.h"
#include <TimePoint.h>
namespace Wuild {
class ToolProxyServerConfig : public IConfig {
public:
int m_listenPort = 0;
std::string m_toolId;
std::string m_startCommand;
int m_threadCount = 1;
TimePoint m_proxyClientTimeout = 240.0;
TimePoint m_clientConnectionTimeout = 1.0;
TimePoint m_inactiveTimeout = 60.0;
bool Validate(std::ostream* errStream = nullptr) const override;
};
}
|
//! LIST_NODE ADT
typedef struct list_node {
struct list_node *prev;
struct list_node *next;
void *val;
} list_node_t;
//! LIST ADT
struct list {
list_node_t *head;
list_node_t *tail;
unsigned int len;
void (*free)(void *val);
int (*match)(void *a, void *b);
};
//! LIST_ITERATOR ADT
struct list_iterator {
list_node_t *next;
list_direction_t direction;
};
list_node_t *
list_node_new (void *value);
|
/*
* DO NOT EDIT. THIS FILE IS GENERATED FROM ../../../dist/idl\nsIUTF8ConverterService.idl
*/
#ifndef __gen_nsIUTF8ConverterService_h__
#define __gen_nsIUTF8ConverterService_h__
#ifndef __gen_nsISupports_h__
#include "nsISupports.h"
#endif
/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif
/* starting interface: nsIUTF8ConverterService */
#define NS_IUTF8CONVERTERSERVICE_IID_STR "249f52a3-2599-4b00-ba40-0481364831a2"
#define NS_IUTF8CONVERTERSERVICE_IID \
{0x249f52a3, 0x2599, 0x4b00, \
{ 0xba, 0x40, 0x04, 0x81, 0x36, 0x48, 0x31, 0xa2 }}
class NS_NO_VTABLE nsIUTF8ConverterService : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IUTF8CONVERTERSERVICE_IID)
/* [optional_argc] AUTF8String convertStringToUTF8 (in ACString aString, in string aCharset, in boolean aSkipCheck, [optional] in boolean aAllowSubstitution); */
NS_IMETHOD ConvertStringToUTF8(const nsACString & aString, const char * aCharset, bool aSkipCheck, bool aAllowSubstitution, uint8_t _argc, nsACString & _retval) = 0;
/* AUTF8String convertURISpecToUTF8 (in ACString aSpec, in string aCharset); */
NS_IMETHOD ConvertURISpecToUTF8(const nsACString & aSpec, const char * aCharset, nsACString & _retval) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIUTF8ConverterService, NS_IUTF8CONVERTERSERVICE_IID)
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIUTF8CONVERTERSERVICE \
NS_IMETHOD ConvertStringToUTF8(const nsACString & aString, const char * aCharset, bool aSkipCheck, bool aAllowSubstitution, uint8_t _argc, nsACString & _retval) override; \
NS_IMETHOD ConvertURISpecToUTF8(const nsACString & aSpec, const char * aCharset, nsACString & _retval) override;
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIUTF8CONVERTERSERVICE(_to) \
NS_IMETHOD ConvertStringToUTF8(const nsACString & aString, const char * aCharset, bool aSkipCheck, bool aAllowSubstitution, uint8_t _argc, nsACString & _retval) override { return _to ConvertStringToUTF8(aString, aCharset, aSkipCheck, aAllowSubstitution, _argc, _retval); } \
NS_IMETHOD ConvertURISpecToUTF8(const nsACString & aSpec, const char * aCharset, nsACString & _retval) override { return _to ConvertURISpecToUTF8(aSpec, aCharset, _retval); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIUTF8CONVERTERSERVICE(_to) \
NS_IMETHOD ConvertStringToUTF8(const nsACString & aString, const char * aCharset, bool aSkipCheck, bool aAllowSubstitution, uint8_t _argc, nsACString & _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ConvertStringToUTF8(aString, aCharset, aSkipCheck, aAllowSubstitution, _argc, _retval); } \
NS_IMETHOD ConvertURISpecToUTF8(const nsACString & aSpec, const char * aCharset, nsACString & _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ConvertURISpecToUTF8(aSpec, aCharset, _retval); }
#if 0
/* Use the code below as a template for the implementation class for this interface. */
/* Header file */
class nsUTF8ConverterService : public nsIUTF8ConverterService
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIUTF8CONVERTERSERVICE
nsUTF8ConverterService();
private:
~nsUTF8ConverterService();
protected:
/* additional members */
};
/* Implementation file */
NS_IMPL_ISUPPORTS(nsUTF8ConverterService, nsIUTF8ConverterService)
nsUTF8ConverterService::nsUTF8ConverterService()
{
/* member initializers and constructor code */
}
nsUTF8ConverterService::~nsUTF8ConverterService()
{
/* destructor code */
}
/* [optional_argc] AUTF8String convertStringToUTF8 (in ACString aString, in string aCharset, in boolean aSkipCheck, [optional] in boolean aAllowSubstitution); */
NS_IMETHODIMP nsUTF8ConverterService::ConvertStringToUTF8(const nsACString & aString, const char * aCharset, bool aSkipCheck, bool aAllowSubstitution, uint8_t _argc, nsACString & _retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* AUTF8String convertURISpecToUTF8 (in ACString aSpec, in string aCharset); */
NS_IMETHODIMP nsUTF8ConverterService::ConvertURISpecToUTF8(const nsACString & aSpec, const char * aCharset, nsACString & _retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* End of implementation class template. */
#endif
#endif /* __gen_nsIUTF8ConverterService_h__ */
|
/* Copyright 2014-2017 Rsyn
*
* 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.
*/
namespace Rsyn {
//! @brief A proxy class representing a netlist net.
class Net : public Proxy<NetData> {
RSYN_FRIEND_OF_GENERIC_LIST_COLLECTION;
friend class RawPointer;
friend class Design;
friend class Module;
friend class Pin;
friend class Arc;
private:
Net(NetData * data) : Proxy(data) {}
Design _getDesign() const;
Module _getParent() const;
public:
//! @brief Default constructor.
Net() {}
//! @brief Assignment constructor to allow null values.
Net(std::nullptr_t) {}
//! @brief Returns the design in which this net was instantiated.
Design getDesign();
//! @brief Returns the design in which this net was instantiated.
const Design getDesign() const;
//! @brief Returns the parent module in which this net was instantiated.
Module getParent();
//! @brief Returns the parent module in which this net was instantiated.
const Module getParent() const;
//! @brief Returns the name of this net.
const std::string &getName() const;
//! @brief Returns the number of pins connected to this net.
int getNumPins() const;
//! @brief Returns the number of sinks (input) pins connected to this net.
int getNumSinks() const;
//! @brief Returns the number of drivers (output) pins connected to this
//! net.
int getNumDrivers() const;
//! @brief Returns any driver pin if any. Useful when there's an assumption
//! that nets have a single driver (most common case).
Pin getAnyDriver() const;
//! @brief Returns the arc connecting the "from" pin to the "to" pin if any.
//! @note Net arcs only exist from driver to sink pins.
Arc getArc(const Pin from, const Pin to);
//! @brief Returns the topological index of this net.
//! @note The topological index of a net is the maximum topological index
//! of its drivers. If no drivers, it's the maximum topological index
//! of its sinks. If this is a floating net (no pins), returns the
//! constant value Rsyn::MIN_TOPOLOGICAL_INDEX.
TopologicalIndex getTopologicalIndex() const;
//! @brief Returns true if this net has more than one driver pin and false
//! otherwise.
bool hasMultipleDrivers() const;
//! @brief Returns true if this net has only and only one driver and false
//! otherwise.
bool hasSingleDriver() const;
//! @brief Returns true if this net has at least one driver and false
//! otherwise.
bool hasDriver() const;
//! @brief Returns true if this net has at least one sink and false
//! otherwise.
bool hasSink() const;
//! @brief Returns an iterable collection of the pins connected to this
//! net.
Range<CollectionOfPins>
allPins() const;
//! @brief Returns an iterable collection of the pins of a given direction
//! connected to this net.
Range<CollectionOfPinsFilteredByDirection>
allPins(const Direction direction) const;
//! @brief Returns an iterable collection of the arcs spanned by this net.
Range<CollectionOfArcs>
allArcs() const;
//! @brief Returns true if this net should be considered as ideal and false
//! otherwise.
//! @note This is a user-defined flag. If the flag was not set, an exception
//! is raised.
bool isIdeal() const;
//! @brief Returns true if this net represents a clock network.
//! @note A clock network net does not need to be directly connected to the
//! clock port. Internal nets of a clock buffer tree should also be
//! considered as clock networks.
//! @note This is a user-defined flag. If the flag was not set, an exception
//! is raised.
bool isClockNetwork() const;
//! @brief Returns the type ot this net.
//! @note This is a user-defined flag. If the flag was not set, an exception
//! is raised.
NetTypeTag getNetTypeTag() const;
}; // end class
// =============================================================================
// Tag
// =============================================================================
//! @brief TODO
class NetTag : public Proxy<NetTagData> {
friend class Design;
private:
NetTag(NetTagData * data) : Proxy(data) {}
public:
NetTag() {}
NetTag(std::nullptr_t) {}
NetTypeTag getType() const;
TristateFlag getIdeal() const;
void setType(const NetTypeTag value);
void setIdeal(const bool value);
}; // end class
} // end namespace |
/* xcmddcl.h: */
/* This file must exist even if it is empty because it is #included in the */
/* common file cmdtbl.c. The purpose is to keep the common comand table */
/* file (common/cmdtbl.c) from being corrupted with non-generic commands */
/* that may be target specific. */
/* It is the declaration portion of the code that must be at the top of */
/* the cmdtbl[] array. */
/* For example:
extern int dummycmd(); Function declaration.
extern char *dummyHelp[]; Command help array declaration.
*/
extern int mmc();
extern char *mmcHelp[];
|
//
// HttpDataModel.h
// guoxiaotong
//
// Created by 刘晓娜 on 16/3/15.
// Copyright © 2016年 StenpChou. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface HttpDataModel : NSObject
@property(nonatomic,strong)NSMutableArray *marry;
typedef NSDictionary*(^MyBlock3)();
+(void)urlhead:(NSString *)headStr Andurlbody:(NSDictionary *)bodyDict blk:(MyBlock3)blkc;
@end
|
/* Copyright 2010 NVIDIA Foundation
*
* 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.
*
* Developed by Mustard Seed Software, LLC
* http://mseedsoft.com
*/
#ifndef __KNOB_H
#define __KNOB_H
#include <osg/MatrixTransform>
#include <osgManipulator/Dragger>
#include <osgManipulator/Constraint>
namespace ews {
namespace app {
namespace drawable {
using namespace osg;
using namespace osgManipulator;
/**
* Provides functionality for picking and dragging screen objects.
*
* The ctor creates a mini-hierarchy with a Dragger and Selection
* as the immediate children of this, and the selection geometry
* (i.e. sphere) as a child of the selection.
*/
class Knob : public MatrixTransform {
public:
/**
* Standard ctor.
* @param geomOffset translation offset applied to the dragger
* geometry. The selection geometry remains uneffected.
* @param radius dragger geometry and hit region radius.
* @param showGeom if true, then a sphere is shown as the selection
* geometry. If false, the geometry is hidden.
*/
Knob(const Vec3& geomOffset = Vec3(0, 0, 0), unsigned int radius = 3, bool showGeom = true);
/** Get the knob's current location in global coordinates. */
Vec2 currXYLocation() const {
MatrixList transforms = _selectionNode->getWorldMatrices();
Matrix toWorld = transforms[0];
Vec3 translation = toWorld.getTrans();
return Vec2(translation.x(), translation.y());
}
void setPosition(const Vec3& pos) {
_selectionNode->setMatrix(Matrix::translate(pos));
_dragger->setMatrix(Matrix::translate(pos + _geomOffset));
}
/** Control the dirty flag. */
void setDirty(bool state) {
_dirty = state;
}
/** Determine if the dirty flag has been set, which is the
* case after a drag operation has occurred. It is up to
* the client code to reset the dirty flag when appropriate. */
bool isDirty() const {
return _dirty;
}
/** Set the constraint for the dragger that limits the dragging
* to a controlled region.
*/
void setConstraint(Constraint& constraint);
protected:
virtual ~Knob();
private:
ref_ptr<Dragger> _dragger;
ref_ptr<Selection> _selectionNode;
Vec3 _geomOffset;
bool _dirty;
};
}
}
}
#endif // __BARRIER_DRAGGER_H
|
void Atras(int potencia)
{
OnFwd(OUT_BC, -potencia);
}
void Adelante(int potencia)
{
OnFwd(OUT_BC,potencia);
}
void Derecha(int potencia)
{
OnFwd(OUT_B, -potencia);
OnFwd(OUT_C, potencia);
}
void Izquierda(int potencia)
{
OnFwd(OUT_B, potencia);
OnFwd(OUT_C, -potencia);
}
void bajar(int potencia)
{
OnFwd(OUT_A, -20);
Wait(800);
}
void parar(int tiempo){
Off(OUT_ABC);
Wait(tiempo);
}
task main()
{
//Configuramos los sensores de color y el de ultrasonido
SetSensorColorFull(IN_3);
SetSensorColorFull(IN_2);
SetSensorUltrasonic(IN_1);
// bool para detectar la mina se devuelva a dejarlo
bool continuar = true;
while(true)
{
// Logica del seguidor de linea
while(continuar)
{
Adelante(70);
if(Sensor(IN_2) == 5)
{
while(Sensor(IN_2) == 5)
{
Derecha(70);
}
}
if(Sensor(IN_3) == 5)
{
while(Sensor(IN_3) == 5)
{
Izquierda(70);
}
}
// si detecta una mina se sale del bucle del seguidor de linea
if (SensorUS(IN_1)<7)
{
parar(100);
OnFwd(OUT_A,20);
Wait(500);
parar(100);
continuar = false;
}
}
// girar 90 grados para devolverse por la linea
while(Sensor(IN_2) != 5)
{
Derecha(80);
}
while(Sensor(IN_3) != 5)
{
Derecha(40);
}
continuar = true;
// continua por la linea hasta que detecte el color verde
while(continuar)
{
Adelante(70);
if(Sensor(IN_2) == 5)
{
while(Sensor(IN_2) == 5)
{
Derecha(70);
}
}
if(Sensor(IN_3) == 5)
{
while(Sensor(IN_3) == 5)
{
Izquierda(70);
}
}
// cuando detecta el color verde termina el bucle del seguidor de linea
if (Sensor(IN_2) == 3)
{
parar(100);
OnFwd(OUT_A, -40);
Wait(800);
parar(100);
continuar = false;
}
}
// gira 90 grados para seguir por la linea en busca de la siguiente mina
while(Sensor(IN_2) != 5)
{
Derecha(80);
}
while(Sensor(IN_3) != 5)
{
Derecha(40);
}
continuar = true;
}
}
|
////////////////////////////////////////////////////////////////////////////////
//
// Generate cropped images using ROI obtained from probabilities
//
////////////////////////////////////////////////////////////////////////////////
// prastawa@cs.unc.edu 11/2003
#ifndef _AtlasCropImageSource_h
#define _AtlasCropImageSource_h
#include "itkObject.h"
#include "DynArray.h"
template <class TInputImage, class TProbabilityImage>
class AtlasCropImageSource: public itk::Object
{
public:
/** Standard class typedefs. */
typedef AtlasCropImageSource Self;
typedef itk::SmartPointer<Self> Pointer;
typedef itk::SmartPointer<const Self> ConstPointer;
/** Method for creation through the object factory. */
itkNewMacro(Self);
/** The dimension of the image. */
itkStaticConstMacro(ImageDimension, unsigned int,
TInputImage::ImageDimension);
// Image types
typedef TInputImage InputImageType;
typedef typename TInputImage::Pointer InputImagePointer;
typedef typename TInputImage::IndexType InputImageIndexType;
typedef typename TInputImage::OffsetType InputImageOffsetType;
typedef typename TInputImage::PixelType InputImagePixelType;
typedef typename TInputImage::PointType InputImagePointType;
typedef typename TInputImage::RegionType InputImageRegionType;
typedef typename TInputImage::SizeType InputImageSizeType;
typedef typename TInputImage::SpacingType InputImageSpacingType;
typedef TProbabilityImage ProbabilityImageType;
typedef typename ProbabilityImageType::Pointer ProbabilityImagePointer;
typedef typename ProbabilityImageType::IndexType ProbabilityImageIndexType;
typedef typename ProbabilityImageType::OffsetType ProbabilityImageOffsetType;
typedef typename ProbabilityImageType::PixelType ProbabilityImagePixelType;
typedef typename ProbabilityImageType::RegionType ProbabilityImageRegionType;
typedef typename ProbabilityImageType::SizeType ProbabilityImageSizeType;
typedef typename ProbabilityImageType::SpacingType ProbabilityImageSpacingType;
typedef DynArray<ProbabilityImagePointer> ProbabilityImageList;
typedef struct
{
InputImageIndexType offset;
InputImageSizeType cropped_size;
InputImageSizeType original_size;
} CropInfoType;
// Set/get output image padding, in mm
itkGetMacro(Padding, double);
itkSetMacro(Padding, double);
bool CheckBounds();
void UseProbabilities(ProbabilityImageList probs);
// Create new images (either cropped or padded)
InputImagePointer Restore(InputImagePointer img);
InputImagePointer Crop(InputImagePointer img);
// Crop region information
void SetCropInfo(const CropInfoType& info) { m_CropInfo = info; }
const CropInfoType& GetCropInfo() { return m_CropInfo; }
// For debugging, generate slabs in last dim with top and bottom parts removed
itkSetMacro(SlabMode, bool);
itkGetConstMacro(SlabMode, bool);
itkBooleanMacro(SlabMode);
protected:
AtlasCropImageSource();
~AtlasCropImageSource() {}
double m_Padding;
InputImageIndexType m_LowerBound;
InputImageIndexType m_UpperBound;
InputImagePointType m_InputOrigin;
InputImagePointType m_CropOrigin;
InputImageSizeType m_OriginalSize;
CropInfoType m_CropInfo;
bool m_SlabMode;
};
#ifndef MU_MANUAL_INSTANTIATION
#include "AtlasCropImageSource.txx"
#endif
#endif
|
/*
Copyright 1999-2019 ImageMagick Studio LLC, a non-profit organization
dedicated to making software imaging solutions freely available.
You may not use this file except in compliance with the License. You may
obtain a copy of the License at
https://imagemagick.org/script/license.php
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.
MagickCore image resampling private methods.
*/
#ifndef MAGICKCORE_RESAMPLE_PRIVATE_H
#define MAGICKCORE_RESAMPLE_PRIVATE_H
#include "MagickCore/thread-private.h"
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
#endif
static inline ResampleFilter **DestroyResampleFilterThreadSet(
ResampleFilter **filter)
{
register ssize_t
i;
assert(filter != (ResampleFilter **) NULL);
for (i=0; i < (ssize_t) GetMagickResourceLimit(ThreadResource); i++)
if (filter[i] != (ResampleFilter *) NULL)
filter[i]=DestroyResampleFilter(filter[i]);
filter=(ResampleFilter **) RelinquishMagickMemory(filter);
return(filter);
}
static inline ResampleFilter **AcquireResampleFilterThreadSet(
const Image *image,const VirtualPixelMethod method,
const MagickBooleanType interpolate,ExceptionInfo *exception)
{
register ssize_t
i;
ResampleFilter
**filter;
size_t
number_threads;
number_threads=(size_t) GetMagickResourceLimit(ThreadResource);
filter=(ResampleFilter **) AcquireQuantumMemory(number_threads,
sizeof(*filter));
if (filter == (ResampleFilter **) NULL)
ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
(void) memset(filter,0,number_threads*sizeof(*filter));
for (i=0; i < (ssize_t) number_threads; i++)
{
filter[i]=AcquireResampleFilter(image,exception);
if (method != UndefinedVirtualPixelMethod)
(void) SetResampleFilterVirtualPixelMethod(filter[i],method);
if (interpolate != MagickFalse)
SetResampleFilter(filter[i],PointFilter);
}
return(filter);
}
#if defined(__cplusplus) || defined(c_plusplus)
}
#endif
#endif
|
#pragma once
#include "../Renderable2D.h"
#include "sp/Common.h"
namespace sp { namespace graphics {
class Renderer2D;
class SP_API Group : public Renderable2D
{
private:
std::vector<Renderable2D*> m_Renderables;
maths::mat4 m_TransformationMatrix;
public:
Group(const maths::mat4& transform);
~Group();
void Add(Renderable2D* renderable);
void Submit(Renderer2D* renderer) const override;
maths::mat4& GetTransformRef() { return m_TransformationMatrix; }
};
} } |
/*
* Copyright 2008-2010 Arsen Chaloyan
*
* 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.
*
* $Id$
*/
#include "mpf_encoder.h"
#include "apt_log.h"
typedef struct mpf_encoder_t mpf_encoder_t;
struct mpf_encoder_t {
mpf_audio_stream_t *base;
mpf_audio_stream_t *sink;
mpf_codec_t *codec;
mpf_frame_t frame_out;
};
static apt_bool_t mpf_encoder_destroy(mpf_audio_stream_t *stream)
{
mpf_encoder_t *encoder = stream->obj;
return mpf_audio_stream_destroy(encoder->sink);
}
static apt_bool_t mpf_encoder_open(mpf_audio_stream_t *stream, mpf_codec_t *codec)
{
mpf_encoder_t *encoder = stream->obj;
mpf_codec_open(encoder->codec);
return mpf_audio_stream_tx_open(encoder->sink,encoder->codec);
}
static apt_bool_t mpf_encoder_close(mpf_audio_stream_t *stream)
{
mpf_encoder_t *encoder = stream->obj;
mpf_codec_close(encoder->codec);
return mpf_audio_stream_tx_close(encoder->sink);
}
static apt_bool_t mpf_encoder_process(mpf_audio_stream_t *stream, const mpf_frame_t *frame)
{
mpf_encoder_t *encoder = stream->obj;
encoder->frame_out.type = frame->type;
encoder->frame_out.marker = frame->marker;
if((frame->type & MEDIA_FRAME_TYPE_EVENT) == MEDIA_FRAME_TYPE_EVENT) {
encoder->frame_out.event_frame = frame->event_frame;
}
if((frame->type & MEDIA_FRAME_TYPE_AUDIO) == MEDIA_FRAME_TYPE_AUDIO) {
mpf_codec_encode(encoder->codec,&frame->codec_frame,&encoder->frame_out.codec_frame);
}
return mpf_audio_stream_frame_write(encoder->sink,&encoder->frame_out);
}
static void mpf_encoder_trace(mpf_audio_stream_t *stream, mpf_stream_direction_e direction, apt_text_stream_t *output)
{
apr_size_t offset;
mpf_codec_descriptor_t *descriptor;
mpf_encoder_t *encoder = stream->obj;
descriptor = encoder->base->tx_descriptor;
if(descriptor) {
offset = output->pos - output->text.buf;
output->pos += apr_snprintf(output->pos, output->text.length - offset,
"[%s/%d/%d]->Encoder->",
descriptor->name.buf,
descriptor->sampling_rate,
descriptor->channel_count);
}
mpf_audio_stream_trace(encoder->sink,direction,output);
}
static const mpf_audio_stream_vtable_t vtable = {
mpf_encoder_destroy,
NULL,
NULL,
NULL,
mpf_encoder_open,
mpf_encoder_close,
mpf_encoder_process,
mpf_encoder_trace
};
MPF_DECLARE(mpf_audio_stream_t*) mpf_encoder_create(mpf_audio_stream_t *sink, mpf_codec_t *codec, apr_pool_t *pool)
{
apr_size_t frame_size;
mpf_encoder_t *encoder;
mpf_stream_capabilities_t *capabilities;
if(!sink || !codec) {
return NULL;
}
encoder = apr_palloc(pool,sizeof(mpf_encoder_t));
capabilities = mpf_stream_capabilities_create(STREAM_DIRECTION_SEND,pool);
encoder->base = mpf_audio_stream_create(encoder,&vtable,capabilities,pool);
if(!encoder->base) {
return NULL;
}
encoder->base->tx_descriptor = mpf_codec_lpcm_descriptor_create(
sink->tx_descriptor->sampling_rate,
sink->tx_descriptor->channel_count,
pool);
encoder->base->tx_event_descriptor = sink->tx_event_descriptor;
encoder->sink = sink;
encoder->codec = codec;
frame_size = mpf_codec_frame_size_calculate(sink->tx_descriptor,codec->attribs);
encoder->frame_out.codec_frame.size = frame_size;
encoder->frame_out.codec_frame.buffer = apr_palloc(pool,frame_size);
return encoder->base;
}
|
////////////////////////////////////////////////////////////////////////////////
/// DISCLAIMER
///
/// Copyright 2014-2016 ArangoDB GmbH, Cologne, Germany
/// Copyright 2004-2014 triAGENS GmbH, Cologne, Germany
///
/// 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 holder is ArangoDB GmbH, Cologne, Germany
///
/// @author Jan Steemann
////////////////////////////////////////////////////////////////////////////////
#ifndef ARANGODB_ENDPOINT_ENDPOINT_LIST_H
#define ARANGODB_ENDPOINT_ENDPOINT_LIST_H 1
#include <string>
#include <vector>
#include "Basics/Common.h"
#include "Endpoint/Endpoint.h"
#include <map>
namespace arangodb {
class EndpointList {
public:
EndpointList();
~EndpointList();
public:
static std::string encryptionName(Endpoint::EncryptionType);
public:
bool empty() const { return _endpoints.empty(); }
bool add(std::string const&, int, bool);
bool remove(std::string const&, Endpoint**);
std::vector<std::string> all() const;
std::vector<std::string> all(Endpoint::TransportType transport) const;
std::map<std::string, Endpoint*> allEndpoints() const { return _endpoints; }
bool hasSsl() const;
void dump() const;
private:
std::map<std::string, Endpoint*> _endpoints;
};
} // namespace arangodb
#endif
|
/*
Copyright 1999-2015 ImageMagick Studio LLC, a non-profit organization
dedicated to making software imaging solutions freely available.
You may not use this file except in compliance with the License.
obtain a copy of the License at
http://www.imagemagick.org/script/license.php
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.
MagickCore methods to set or get image attributes.
*/
#ifndef _MAGICKCORE_ATTRIBUTE_H
#define _MAGICKCORE_ATTRIBUTE_H
#include "MagickCore/image.h"
#include "MagickCore/exception.h"
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
#endif
extern MagickExport ImageType
GetImageType(const Image *,ExceptionInfo *);
extern MagickExport MagickBooleanType
IsImageGray(const Image *,ExceptionInfo *),
IsImageMonochrome(const Image *,ExceptionInfo *),
IsImageOpaque(const Image *,ExceptionInfo *),
SetImageDepth(Image *,const size_t,ExceptionInfo *),
SetImageType(Image *,const ImageType,ExceptionInfo *);
extern MagickExport RectangleInfo
GetImageBoundingBox(const Image *,ExceptionInfo *exception);
extern MagickExport size_t
GetImageDepth(const Image *,ExceptionInfo *),
GetImageQuantumDepth(const Image *,const MagickBooleanType);
#if defined(__cplusplus) || defined(c_plusplus)
}
#endif
#endif
|
/*-
* Copyright (c) 1991, 1993
* The Regents of the University of California. All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* Ronnie Kon at Mindcraft Inc., Kevin Lew and Elmer Yglesias.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the University 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 REGENTS 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 REGENTS 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.
*/
/*
* Heapsort -- Knuth, Vol. 3, page 145. Runs in O (N lg N), both average
* and worst. While heapsort is faster than the worst case of quicksort,
* the BSD quicksort does median selection so that the chance of finding
* a data set that will trigger the worst case is nonexistent. Heapsort's
* only advantage over quicksort is that it requires little additional memory.
*/
#include <agar/core/core.h>
#include <agar/math/m.h>
/*
* Swap two areas of size number of bytes. Although qsort(3) permits random
* blocks of memory to be sorted, sorting pointers is almost certainly the
* common case (and, were it not, could easily be made so). Regardless, it
* isn't worth optimizing; the SWAP's get sped up by the cache, and pointer
* arithmetic gets lost in the time required for comparison function calls.
*/
#define SWAP(a, b, count, size, tmp) { \
count = size; \
do { \
tmp = *a; \
*a++ = *b; \
*b++ = tmp; \
} while (--count); \
}
/* Copy one block of size size to another. */
#define COPY(a, b, count, size, tmp1, tmp2) { \
count = size; \
tmp1 = a; \
tmp2 = b; \
do { \
*tmp1++ = *tmp2++; \
} while (--count); \
}
/*
* Build the list into a heap, where a heap is defined such that for
* the records K1 ... KN, Kj/2 >= Kj for 1 <= j/2 <= j <= N.
*
* There are two cases. If j == nmemb, select largest of Ki and Kj. If
* j < nmemb, select largest of Ki, Kj and Kj+1.
*/
#define CREATE(initval, nmemb, par_i, child_i, par, child, size, count, tmp) { \
for (par_i = initval; (child_i = par_i * 2) <= nmemb; \
par_i = child_i) { \
child = base + child_i * size; \
if (child_i < nmemb && compar(child, child + size) < 0) { \
child += size; \
++child_i; \
} \
par = base + par_i * size; \
if (compar(child, par) <= 0) \
break; \
SWAP(par, child, count, size, tmp); \
} \
}
/*
* Select the top of the heap and 'heapify'. Since by far the most expensive
* action is the call to the compar function, a considerable optimization
* in the average case can be achieved due to the fact that k, the displaced
* element, is usually quite small, so it would be preferable to first
* heapify, always maintaining the invariant that the larger child is copied
* over its parent's record.
*
* Then, starting from the *bottom* of the heap, finding k's correct place,
* again maintaining the invariant. As a result of the invariant no element
* is 'lost' when k is assigned its correct place in the heap.
*
* The time savings from this optimization are on the order of 15-20% for the
* average case. See Knuth, Vol. 3, page 158, problem 18.
*
* XXX Don't break the #define SELECT line, below. Reiser cpp gets upset.
*/
#define SELECT(par_i, child_i, nmemb, par, child, size, k, count, tmp1, tmp2) { \
for (par_i = 1; (child_i = par_i * 2) <= nmemb; par_i = child_i) { \
child = base + child_i * size; \
if (child_i < nmemb && compar(child, child + size) < 0) { \
child += size; \
++child_i; \
} \
par = base + par_i * size; \
COPY(par, child, count, size, tmp1, tmp2); \
} \
for (;;) { \
child_i = par_i; \
par_i = child_i / 2; \
child = base + child_i * size; \
par = base + par_i * size; \
if (child_i == 1 || compar(k, par) < 0) { \
COPY(child, k, count, size, tmp1, tmp2); \
break; \
} \
COPY(child, par, count, size, tmp1, tmp2); \
} \
}
int
M_HeapSort(void *vbase, size_t nmemb, size_t size,
int (*compar)(const void *, const void *))
{
int cnt, i, j, l;
char tmp, *tmp1, *tmp2;
char *base, *k, *p, *t;
if (nmemb <= 1)
return (0);
if (!size) {
AG_SetError("Size==0");
return (-1);
}
if ((k = TryMalloc(size)) == NULL)
return (-1);
/*
* Items are numbered from 1 to nmemb, so offset from size bytes
* below the starting address.
*/
base = (char *)vbase - size;
for (l = nmemb / 2 + 1; --l;)
CREATE(l, nmemb, i, j, t, p, size, cnt, tmp);
/*
* For each element of the heap, save the largest element into its
* final slot, save the displaced element (k), then recreate the
* heap.
*/
while (nmemb > 1) {
COPY(k, base + nmemb * size, cnt, size, tmp1, tmp2);
COPY(base + nmemb * size, base + size, cnt, size, tmp1, tmp2);
--nmemb;
SELECT(i, j, nmemb, t, p, size, k, cnt, tmp1, tmp2);
}
Free(k);
return (0);
}
|
//
// ContentListView.h
// ComicReader
//
// Created by Jiang on 1/14/15.
// Copyright (c) 2015 Mac. All rights reserved.
//
#import <UIKit/UIKit.h>
typedef enum : NSUInteger {
stateSuccess = 0,
stateFailure,
stateLoading
} RefreshState;
@class ComicStoreContentListCollectionView;
@protocol ComicStoreContentListCollectionViewDelegate <NSObject>
@optional
- (void)comicOrderSelectedIndex:(NSInteger)index;
- (void)comicOrderTouchAction;
@end
@interface ContentListView : UIView
//content列表ViewGo back按钮
@property (nonatomic, weak) UIView *contentBack;
//content列表ViewGo back按钮标题
@property (nonatomic, weak) UILabel *currentListTitle;
//图书列表页内容模型数据数组
@property (nonatomic, strong) NSArray *listRowContentModelArray;
//content列表View
@property (nonatomic, weak) ComicStoreContentListCollectionView *comicStoreContentListCollectionView;
@property (nonatomic, assign) id<ComicStoreContentListCollectionViewDelegate> delegate;
- (void)showRefreshState:(RefreshState)refreshState;
@end
|
/*
* gucefCORE: GUCEF module providing O/S abstraction and generic solutions
* Copyright (C) 2002 - 2007. Dinand Vanvelzen
*
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef GUCEF_CORE_CURLHANDLERREGISTRY_H
#define GUCEF_CORE_CURLHANDLERREGISTRY_H
/*-------------------------------------------------------------------------//
// //
// INCLUDE //
// //
//-------------------------------------------------------------------------*/
#ifndef GUCEF_MT_CMUTEX_H
#include "gucefMT_CMutex.h" /* gucefMT mutex implementation */
#define GUCEF_MT_CMUTEX_H
#endif /* GUCEF_MT_CMUTEX_H ? */
#ifndef GUCEF_CORE_CTREGISTRY_H
#include "CTRegistry.h" /* registry template */
#define GUCEF_CORE_CTREGISTRY_H
#endif /* GUCEF_CORE_CTREGISTRY_H ? */
#ifndef GUCEF_CORE_CURLHANDLER_H
#include "CURLHandler.h" /* base class for protocol URL handlers */
#define GUCEF_CORE_CURLHANDLER_H
#endif /* GUCEF_CORE_CURLHANDLER_H ? */
/*-------------------------------------------------------------------------//
// //
// NAMESPACE //
// //
//-------------------------------------------------------------------------*/
namespace GUCEF {
namespace CORE {
/*-------------------------------------------------------------------------//
// //
// CLASSES //
// //
//-------------------------------------------------------------------------*/
class GUCEF_CORE_PUBLIC_CPP CURLHandlerRegistry : public CTRegistry< CURLHandler, MT::CMutex >
{
public:
CURLHandlerRegistry( void );
virtual ~CURLHandlerRegistry();
virtual const MT::CILockable* AsLockable( void ) const GUCEF_VIRTUAL_OVERRIDE;
protected:
virtual bool Lock( UInt32 lockWaitTimeoutInMs = GUCEF_MT_DEFAULT_LOCK_TIMEOUT_IN_MS ) const GUCEF_VIRTUAL_OVERRIDE;
virtual bool Unlock( void ) const GUCEF_VIRTUAL_OVERRIDE;
private:
CURLHandlerRegistry( const CURLHandlerRegistry& src );
CURLHandlerRegistry& operator=( const CURLHandlerRegistry& src );
private:
MT::CMutex m_datalock;
};
/*-------------------------------------------------------------------------//
// //
// NAMESPACE //
// //
//-------------------------------------------------------------------------*/
}; /* namespace CORE */
}; /* namespace GUCEF */
/*-------------------------------------------------------------------------*/
#endif /* GUCEF_CORE_CURLHANDLERREGISTRY_H ? */
/*-------------------------------------------------------------------------//
// //
// Info & Changes //
// //
//-------------------------------------------------------------------------//
- 24-04-2005 :
- Initial implementation
---------------------------------------------------------------------------*/
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
// DCTableSource.h
//
// Created by Dalton Cherry on 4/15/13.
// Copyright 2013 Basement Krew. All rights reserved.
//
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#import <Foundation/Foundation.h>
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@protocol DCTableSourceDelegate <NSObject>
@optional
//use so you can set different settings on the cell from the view controller layer
-(void)cell:(UITableViewCell*)cell withObject:(id)object atIndex:(NSIndexPath*)indexPath;
//use to set cell class to object class mapping
-(Class)classForObject:(id)object;
//returns that a cell was tapped
-(void)didSelectObject:(id)object atIndex:(NSIndexPath*)index;
//return True or false if a item can be edited (swipe to delete,reorder,etc).
-(BOOL)canEditObject:(id)object atIndexPath:(NSIndexPath*)indexPath;
//when the tableview delete button is pressed.
-(void)didDeleteObject:(id)object atIndexPath:(NSIndexPath*)indexPath;
//when the tableview delete button is pressed.
-(UITableViewCellEditingStyle)editingStyleForObject:(id)object atIndexPath:(NSIndexPath*)indexPath;
/**
Set the delete text.
@param indexPath is the index path to set the delete text at
@return the string to use for the delete text
*/
-(NSString*)deleteTextAtIndex:(NSIndexPath*)indexPath;
//scrollView forward
-(void)scrollViewWillBeginDragging:(UIScrollView *)scrollView;
-(void)scrollViewDidScroll:(UIScrollView *)scrollView;
@end
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@interface DCTableSource : NSObject<UITableViewDataSource,UITableViewDelegate>
//this is the items of your datasource
@property(nonatomic,strong)NSMutableArray* items;
//this is the sections of your datasource
@property(nonatomic,strong)NSMutableArray* sections;
//this is the sections of your datasource
@property(nonatomic,assign)id<DCTableSourceDelegate> delegate;
//this is the sections of your datasource
@property(nonatomic,weak)UISearchDisplayController* searchController;
//this is use to set the highlighted/selected background color of a cell.
@property(nonatomic,strong)UIColor* selectedColor;
//do not deselect the cell after selection.
@property(nonatomic,assign)BOOL stayActive;
//get the height of an object.
-(CGFloat)heightOfObject:(id)object tableView:(UITableView*)tableView indexPath:(NSIndexPath*)indexPath;
//this does nothing. Just here for subclass convenience. is Called by cellForRowAtIndexPath.
-(void)processCell:(UITableViewCell*)cell object:(id)object index:(NSIndexPath*)index table:(UITableView*)table;
@end
|
//
// HotTableViewController.h
// SHVideo
//
// Created by Z-Siho on 2017/4/20.
// Copyright © 2017年 Z-Siho. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface BasicTableViewController : UITableViewController
@property(nonatomic,copy)NSString *url;
@end
|
/*
* opencl.c
*
* Created on: Apr 22, 2011
* Author: ludwig
*/
/*
Copyright 2011 PureSol Technologies
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 "opencl.h"
OpenCLStatus opencl_initPlatform()
{
OpenCLStatus status = opencl_failure;
numPlatforms = getPlatformNum();
platformIds = malloc(numPlatforms * sizeof(*platformIds));
numDevices = malloc(numPlatforms * sizeof(*numDevices));
deviceIds = malloc(numPlatforms * sizeof(*deviceIds));
/* fprintf(stdout, "%i OpenCL Platforms are available\n", getPlatformNum()); */
ERROR_HANDLER(clGetPlatformIDs(numPlatforms, platformIds, NULL));
for (unsigned int platform = 0; platform < numPlatforms; ++platform)
{
numDevices[platform] = getDeviceNum(platformIds[platform],
CL_DEVICE_TYPE_ALL);
deviceIds[platform]
= malloc(numDevices[platform] * sizeof(**deviceIds));
ERROR_HANDLER(clGetDeviceIDs(platformIds[platform], CL_DEVICE_TYPE_ALL,
numDevices[platform], deviceIds[platform], NULL));
/*
printPlatformInformation(platformIds[platform], stdout, "");
for (unsigned int device = 0; device < numDevices[platform]; ++device)
{
printDeviceInformation(deviceIds[platform][device]);
}
*/
}
status = opencl_success;
FINISH: return status;
}
OpenCLStatus opencl_dropPlatform()
{
if (deviceIds != NULL)
{
for (unsigned int i = 0; i < numPlatforms; ++i)
{
free(deviceIds[i]);
}
free(deviceIds);
deviceIds = NULL;
}
if (numDevices != NULL)
{
free(numDevices);
numDevices = NULL;
}
if (platformIds != NULL)
{
free(platformIds);
platformIds = NULL;
numPlatforms = 0;
}
return opencl_success;
}
|
/*
* @file low.c
* @brief PSEC Library
* HASH [HAVAL256] low level interface
*
* Date: 06-09-2014
*
* Copyright 2014 Pedro A. Hortas (pah@ucodev.org)
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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 "hash/haval/low.h"
/* HAVAL-256 Low Level Interface */
int haval256_low_init(haval_state *context) {
haval_start(context);
haval_set_fptlen(context, 256);
haval_set_pass(context, 5);
return 0;
}
int haval256_low_init_passes(haval_state *context, unsigned int passes) {
haval_set_pass(context, passes);
return 0;
}
int haval256_low_update(haval_state *context, const unsigned char *in, size_t in_len) {
haval_hash(context, in, in_len);
return 0;
}
int haval256_low_final(haval_state *context, unsigned char *out) {
haval_end(context, out);
return 0;
}
/* HAVAL-224 Low Level Interface */
int haval224_low_init(haval_state *context) {
haval_start(context);
haval_set_fptlen(context, 224);
haval_set_pass(context, 5);
return 0;
}
int haval224_low_init_passes(haval_state *context, unsigned int passes) {
haval_set_pass(context, passes);
return 0;
}
int haval224_low_update(haval_state *context, const unsigned char *in, size_t in_len) {
haval_hash(context, in, in_len);
return 0;
}
int haval224_low_final(haval_state *context, unsigned char *out) {
haval_end(context, out);
return 0;
}
/* HAVAL-192 Low Level Interface */
int haval192_low_init(haval_state *context) {
haval_start(context);
haval_set_fptlen(context, 192);
haval_set_pass(context, 5);
return 0;
}
int haval192_low_init_passes(haval_state *context, unsigned int passes) {
haval_set_pass(context, passes);
return 0;
}
int haval192_low_update(haval_state *context, const unsigned char *in, size_t in_len) {
haval_hash(context, in, in_len);
return 0;
}
int haval192_low_final(haval_state *context, unsigned char *out) {
haval_end(context, out);
return 0;
}
/* HAVAL-160 Low Level Interface */
int haval160_low_init(haval_state *context) {
haval_start(context);
haval_set_fptlen(context, 160);
haval_set_pass(context, 5);
return 0;
}
int haval160_low_init_passes(haval_state *context, unsigned int passes) {
haval_set_pass(context, passes);
return 0;
}
int haval160_low_update(haval_state *context, const unsigned char *in, size_t in_len) {
haval_hash(context, in, in_len);
return 0;
}
int haval160_low_final(haval_state *context, unsigned char *out) {
haval_end(context, out);
return 0;
}
/* HAVAL-128 Low Level Interface */
int haval128_low_init(haval_state *context) {
haval_start(context);
haval_set_fptlen(context, 128);
haval_set_pass(context, 5);
return 0;
}
int haval128_low_init_passes(haval_state *context, unsigned int passes) {
haval_set_pass(context, passes);
return 0;
}
int haval128_low_update(haval_state *context, const unsigned char *in, size_t in_len) {
haval_hash(context, in, in_len);
return 0;
}
int haval128_low_final(haval_state *context, unsigned char *out) {
haval_end(context, out);
return 0;
}
|
/*
* Copyright (C) 2016 zhique
*
* 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.
*/
typedef enum {
UnlockMode = 0,
EditMode = 1,
SetMode = 2,
}OperationMode;
#import "OSPGuestureItem.h"
#import <UIKit/UIKit.h>
@interface GesturesUnLock : UIViewController<UIAlertViewDelegate>
@property (weak, nonatomic) IBOutlet UIButton *btnBack;
@property (weak, nonatomic) IBOutlet UILabel *lblHint;
@property (weak, nonatomic) IBOutlet UIImageView *imageView;
@property (weak, nonatomic) IBOutlet UIView *unLockContentView;
@property (weak, nonatomic) IBOutlet UIImageView *bgView;
@property (nonatomic, strong) NSMutableArray *rightPassword;
@property (nonatomic, strong) NSMutableArray *waitSure;
@property (nonatomic) BOOL reSet;
@property (nonatomic) BOOL setFlag;// if setFlag is Yes, now you can set a new gestures password
@property (nonatomic) BOOL sureFlag;
@property (nonatomic) BOOL isHomePage;
@property (nonatomic) BOOL passwordWrong;
@property (nonatomic, assign) OperationMode mode;
- (id)initWithExpectedMode:(OperationMode)mode;
@end
|
Sorts: sortAlphaTotal
#PURPOSE of the 4 number and alpha fields, sort by the second one
#
#
#
If [ steward::chosenSortTotal = "abc" ]
Set Variable [ $$record; Value:brainstate::_lockBrainstateID ]
Sort Records [ Specified Sort Order: brainstate::sortAlpha; descending
brainstate::sortSubNumber; descending
brainstate::sortCategory; descending
brainstate::description; ascending ]
[ Restore; No dialog ]
Set Field [ steward::chosenSortTotal; "cba" ]
Go to Record/Request/Page
[ First ]
Loop
Exit Loop If [ $$record = brainstate::_lockBrainstateID ]
Go to Record/Request/Page
[ Next ]
End Loop
Set Variable [ $$record ]
Go to Field [ ]
Halt Script
End If
If [ steward::chosenSortTotal ≠ "abc" ]
Set Variable [ $$record; Value:brainstate::_lockBrainstateID ]
Sort Records [ Specified Sort Order: brainstate::sortAlpha; based on value list: “sortAlpha”
brainstate::sortSubNumber; based on value list: “__-99”
brainstate::sortCategory; based on value list: “sortAlpha”
brainstate::description; ascending ]
[ Restore; No dialog ]
Set Field [ steward::chosenSortTotal; "abc" ]
Go to Record/Request/Page
[ First ]
Loop
Exit Loop If [ $$record = brainstate::_lockBrainstateID ]
Go to Record/Request/Page
[ Next ]
End Loop
Set Variable [ $$record ]
Go to Field [ ]
End If
January 6, 平成26 0:52:38 ActionLog.fp7 - sortAlphaTotal -1-
|
#include "led.h"
#include "delay.h"
#include "key.h"
#include "sys.h"
#include "lcd.h"
//Transfer GuiLite 32 bits color to your LCD color
#define GL_RGB_32_to_16(rgb) (((((unsigned int)(rgb)) & 0xFF) >> 3) | ((((unsigned int)(rgb)) & 0xFC00) >> 5) | ((((unsigned int)(rgb)) & 0xF80000) >> 8))
//Encapsulate your LCD driver:
void gfx_draw_pixel(int x, int y, unsigned int rgb)
{
LCD_Fast_DrawPoint(x, y, GL_RGB_32_to_16(rgb));
}
//Implement it, if you have more fast solution than drawing pixels one by one.
//void gfx_fill_rect(int x0, int y0, int x1, int y1, unsigned int rgb){}
//UI entry
struct EXTERNAL_GFX_OP
{
void (*draw_pixel)(int x, int y, unsigned int rgb);
void (*fill_rect)(int x0, int y0, int x1, int y1, unsigned int rgb);
} my_gfx_op;
extern void startHelloParticle(void* phy_fb, int width, int height, int color_bytes, struct EXTERNAL_GFX_OP* gfx_op);
int main(void)
{
//Hardware initialization:
delay_init();
NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2);
LCD_Init();
//Link your LCD driver & start UI:
my_gfx_op.draw_pixel = gfx_draw_pixel;
my_gfx_op.fill_rect = NULL;//gfx_fill_rect;
startHelloParticle(NULL, 240, 320, 2, &my_gfx_op);
while(1);
}
|
/**
* @file alphabetic_ldb.h
* @brief alphabetic language database header file.
*
* @see N/A
*
*/
#ifndef __ALPHABETIC_LDB_H__
#define __ALPHABETIC_LDB_H__
namespace pomelo {
const unsigned char ONE_BYTE_SIZE = 0xFFu;
const unsigned char MAX_WORD_LENGTH = 32;
struct DataStream {
const unsigned char *data;
unsigned int dataLength;
unsigned int currIndex;
unsigned int startItem;
unsigned int endItem;
unsigned int jumpItem;
unsigned int jumpAddress;
};
class AlphabeticLDB {
public:
AlphabeticLDB();
virtual ~AlphabeticLDB();
bool load(const char* name);
void free();
int getLangId() const;
void traverseDataStream(unsigned char pos, unsigned int targetItem, unsigned short * const targetWord);
private:
unsigned char langId_;
unsigned char posCount_;
unsigned char *posOrderTable_;
unsigned char charDecodeCount_;
unsigned short *charDecodeTable_;
unsigned char intervalCodeZero_;
unsigned char intervalCodeJump_;
unsigned char intervalCodeEnd_;
unsigned char intervalCodeExtend_;
unsigned char oneByteCodeTable_[ONE_BYTE_SIZE+1];
unsigned char oneByteLengthTable_[ONE_BYTE_SIZE];
DataStream dataStreamArray_[MAX_WORD_LENGTH];
unsigned char *streamBuf_;
};
}
#endif // __ALPHABETIC_LDB_H__ |
#ifndef __BATTERY_H__
#define __BATTERY_H__
int battery_is_level();
int battery_is_charging();
#endif // __BATTERY_H__
|
//
// AppDelegate+Service.h
// BaseFramework
//
// Created by rickychan on 2017/9/6.
// Copyright © 2017年 rickychan. All rights reserved.
//
#import "AppDelegate.h"
@interface AppDelegate (Service)
-(void)configurationNormal;
-(void)registerUmeng;
-(void)registerJPush;
@end
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.