text
stringlengths 4
6.14k
|
|---|
//////////////////////////////////////////////////////////////////////
//
// Pixie
//
// Copyright © 1999 - 2010, Okan Arikan
//
// Contact: okan@cs.utexas.edu
//
// 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
//
///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
//
// File : global.h
// Classes : -
// Description :
/// \brief Some global definitions
//
////////////////////////////////////////////////////////////////////////
//
//
//
//
//
//
// This header has to be included from every file
//
//
//
//
//
//
//
#ifndef GLOBAL_H
#define GLOBAL_H
// The Pixie version
#define VERSION_RELEASE 2
#define VERSION_BETA 2
#define VERSION_ALPHA 6
// Some constant definitions
// Math constants
#ifdef C_INFINITY
#undef C_INFINITY
#endif
#ifdef C_EPSILON
#undef C_EPSILON
#endif
#ifdef C_EPSILON_TINY
#undef C_EPSILON_TINY
#endif
#define C_INFINITY 1e30f
#define C_EPSILON 1e-6f
#define C_EPSILON_TINY 1e-12f
#define C_PI 3.141592653589793238462643383279502884197169399375105820974944592308
// Logic constants
#ifndef TRUE
#define TRUE 1
#endif
#ifndef FALSE
#define FALSE 0
#endif
// Misc Options and Attributes constants
#ifdef min
#undef min
#endif
#ifdef max
#undef max
#endif
#ifdef radians
#undef radians
#endif
#ifdef degrees
#undef degrees
#endif
#define min(a,b) ((a) < (b) ? (a) : (b))
#define max(a,b) ((a) > (b) ? (a) : (b))
#define radians(a) ((a)*C_PI/180.)
#define degrees(a) ((a)*180./ C_PI)
// This structure encapsulates a 32 bit word
typedef union {
int integer;
unsigned int uinteger;
float real;
char character;
} T32;
// This structure encapsulates a 64 bit word
typedef union {
long long integer;
void *pointer;
char *string;
double real;
} T64;
// Some useful machinery for memory management
#ifdef _WIN32
#ifdef _DEBUG
#include <assert.h>
// Register some junk for memory leak detection
#define _CRTDBG_MAP_ALLOC
#include <stdlib.h>
#include <crtdbg.h>
#endif
#endif
#ifdef __APPLE__
#include <assert.h>
#endif
// Useful macros for allocating/deallocating untyped memory (aligned to 8 bytes)
#define allocate_untyped(__size) (void*) new long long[(__size + sizeof(long long) - 1) / sizeof(long long)]
#define free_untyped(__ptr) delete[] ((long long *) __ptr)
#ifndef assert
#define assert(__cond)
#endif
// Include the global config file if available
#ifdef HAVE_CONFIG_H
#include "../../config.h"
#else
// Are we running under Visual Studio?
#ifdef _WIN32
#include "../../config.windows.h"
#endif
// Are we running under XCode?
#if defined(__APPLE__) || defined(__APPLE_CC__)
#include "../../config.xcode.h"
#endif
#endif
#endif
|
/*
Copyright (C) 2013 Fredrik Johansson
This file is part of Arb.
Arb is free software: you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License (LGPL) as published
by the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version. See <http://www.gnu.org/licenses/>.
*/
#include "flint/arith.h"
#include "acb_poly.h"
int main()
{
slong iter;
flint_rand_t state;
flint_printf("rising2_ui_rs....");
fflush(stdout);
flint_randinit(state);
for (iter = 0; iter < 1000 * arb_test_multiplier(); iter++)
{
acb_t a, u, v, u2, v2;
fmpz *f;
acb_ptr g;
ulong n;
slong i, prec;
acb_init(a);
acb_init(u);
acb_init(v);
acb_init(u2);
acb_init(v2);
acb_randtest(a, state, 1 + n_randint(state, 4000), 10);
acb_randtest(u, state, 1 + n_randint(state, 4000), 10);
acb_randtest(v, state, 1 + n_randint(state, 4000), 10);
n = n_randint(state, 120);
f = _fmpz_vec_init(n + 1);
g = _acb_vec_init(n + 1);
prec = 2 + n_randint(state, 4000);
acb_rising2_ui_rs(u, v, a, n, 0, prec);
arith_stirling_number_1u_vec(f, n, n + 1);
for (i = 0; i <= n; i++)
acb_set_fmpz(g + i, f + i);
_acb_poly_evaluate(u2, g, n + 1, a, prec);
_acb_poly_derivative(g, g, n + 1, prec);
_acb_poly_evaluate(v2, g, n, a, prec);
if (!acb_overlaps(u, u2) || !acb_overlaps(v, v2))
{
flint_printf("FAIL: overlap\n\n");
flint_printf("n = %wu\n", n);
flint_printf("a = "); acb_printd(a, 15); flint_printf("\n\n");
flint_printf("u = "); acb_printd(u, 15); flint_printf("\n\n");
flint_printf("u2 = "); acb_printd(u2, 15); flint_printf("\n\n");
flint_printf("v = "); acb_printd(v, 15); flint_printf("\n\n");
flint_printf("v2 = "); acb_printd(v2, 15); flint_printf("\n\n");
abort();
}
acb_set(u2, a);
acb_rising2_ui_rs(u2, v, u2, n, 0, prec);
if (!acb_equal(u2, u))
{
flint_printf("FAIL: aliasing 1\n\n");
flint_printf("a = "); acb_printd(a, 15); flint_printf("\n\n");
flint_printf("u = "); acb_printd(u, 15); flint_printf("\n\n");
flint_printf("u2 = "); acb_printd(u2, 15); flint_printf("\n\n");
flint_printf("n = %wu\n", n);
abort();
}
acb_set(v2, a);
acb_rising2_ui_rs(u, v2, v2, n, 0, prec);
if (!acb_equal(v2, v))
{
flint_printf("FAIL: aliasing 2\n\n");
flint_printf("a = "); acb_printd(a, 15); flint_printf("\n\n");
flint_printf("v = "); acb_printd(v, 15); flint_printf("\n\n");
flint_printf("v2 = "); acb_printd(v2, 15); flint_printf("\n\n");
flint_printf("n = %wu\n", n);
abort();
}
acb_clear(a);
acb_clear(u);
acb_clear(v);
acb_clear(u2);
acb_clear(v2);
_fmpz_vec_clear(f, n + 1);
_acb_vec_clear(g, n + 1);
}
flint_randclear(state);
flint_cleanup();
flint_printf("PASS\n");
return EXIT_SUCCESS;
}
|
/* Copyright (C) 2016 Red Hat, Inc.
This file is part of the Infinity Note Execution Library.
The Infinity Note Execution 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.
The Infinity Note Execution 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 the Infinity Note Execution Library; if not, see
<http://www.gnu.org/licenses/>. */
#include "libi8x-private.h"
struct i8x_list
{
I8X_OBJECT_FIELDS;
/* The head of the list. */
struct i8x_listitem *head;
/* True if listitems should own references to their objects. */
bool manage_references;
};
struct i8x_listitem
{
I8X_OBJECT_FIELDS;
struct i8x_listitem *next, *prev;
struct i8x_object *ob;
};
I8X_COMMON_OBJECT_FUNCTIONS (listitem);
static struct i8x_list *
i8x_listitem_get_list (struct i8x_listitem *li)
{
return (struct i8x_list *)
i8x_ob_get_parent ((struct i8x_object *) li);
}
static void
i8x_list_unlink (struct i8x_object *ob)
{
struct i8x_list *list = (struct i8x_list *) ob;
list->head = i8x_listitem_unref (list->head);
}
static void
i8x_listitem_unlink (struct i8x_object *ob)
{
struct i8x_listitem *li = (struct i8x_listitem *) ob;
struct i8x_list *list = i8x_listitem_get_list (li);
if (list->manage_references)
li->ob = i8x_ob_unref (li->ob);
if (li->next != list->head)
li->next = i8x_listitem_unref (li->next);
}
const struct i8x_object_ops i8x_list_ops =
{
"list", /* Object name. */
sizeof (struct i8x_list), /* Object size. */
i8x_list_unlink, /* Unlink function. */
NULL, /* Free function. */
};
const struct i8x_object_ops i8x_listitem_ops =
{
"listitem", /* Object name. */
sizeof (struct i8x_listitem), /* Object size. */
i8x_listitem_unlink, /* Unlink function. */
NULL, /* Free function. */
};
static i8x_err_e
i8x_listitem_new (struct i8x_list *list,
struct i8x_object *ob,
struct i8x_listitem **li)
{
struct i8x_listitem *l;
i8x_err_e err;
err = i8x_ob_new (list, &i8x_listitem_ops, &l);
if (err != I8X_OK)
return err;
if (list->manage_references)
ob = i8x_ob_ref (ob);
l->ob = ob;
*li = l;
return I8X_OK;
}
i8x_err_e
i8x_list_new (struct i8x_ctx *ctx, bool manage_references,
struct i8x_list **list)
{
struct i8x_list *l;
i8x_err_e err;
err = i8x_ob_new (ctx, &i8x_list_ops, &l);
if (err != I8X_OK)
return err;
l->manage_references = manage_references;
err = i8x_listitem_new (l, NULL, &l->head);
if (err != I8X_OK)
{
l = i8x_list_unref (l);
return err;
}
l->head->next = l->head->prev = l->head;
*list = l;
return I8X_OK;
}
i8x_err_e
i8x_list_append (struct i8x_list *list, struct i8x_object *ob)
{
struct i8x_listitem *head = list->head;
struct i8x_listitem *last = head->prev;
struct i8x_listitem *item;
i8x_err_e err;
err = i8x_listitem_new (list, ob, &item);
if (err != I8X_OK)
return err;
item->prev = last;
item->next = list->head;
last->next = item;
head->prev = item;
return I8X_OK;
}
static struct i8x_listitem *
i8x_list_get_listitem (struct i8x_list *list, struct i8x_object *ob)
{
struct i8x_listitem *li;
i8x_list_foreach (list, li)
if (li->ob == ob)
return li;
return NULL;
}
void
i8x_list_remove (struct i8x_list *list, struct i8x_object *ob)
{
struct i8x_listitem *item = i8x_list_get_listitem (list, ob);
item->prev->next = item->next;
item->next->prev = item->prev;
item->next = NULL;
item = i8x_listitem_unref (item);
}
I8X_EXPORT int
i8x_list_size (struct i8x_list *list)
{
struct i8x_listitem *li;
int count = 0;
i8x_list_foreach (list, li)
{
count++;
i8x_assert (count > 0);
}
return count;
}
I8X_EXPORT struct i8x_listitem *
i8x_list_get_first (struct i8x_list *list)
{
if (list == NULL)
return NULL;
return i8x_list_get_next (list, list->head);
}
I8X_EXPORT struct i8x_listitem *
i8x_list_get_next (struct i8x_list *list, struct i8x_listitem *li)
{
li = li->next;
if (li == list->head)
return NULL;
return li;
}
I8X_EXPORT struct i8x_object *
i8x_listitem_get_object (struct i8x_listitem *li)
{
return li->ob;
}
|
/*!The Treasure Box Library
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Copyright (C) 2009-2020, TBOOX Open Source Group.
*
* @author ruki
* @file android.h
* @ingroup platform
*/
#ifndef TB_PLATFORM_ANDROID_H
#define TB_PLATFORM_ANDROID_H
/* //////////////////////////////////////////////////////////////////////////////////////
* includes
*/
#include "prefix.h"
/* //////////////////////////////////////////////////////////////////////////////////////
* interfaces
*/
/*! init the android platform
*
* @param jvm the java machine pointer
*
* @return tb_true or tb_false
*/
tb_bool_t tb_android_init_env(JavaVM* jvm);
/// exit the android platform
tb_void_t tb_android_exit_env(tb_noarg_t);
/*! the java machine pointer
*
* @return the java machine pointer
*/
JavaVM* tb_android_jvm(tb_noarg_t);
#endif
|
/*!The Treasure Box Library
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Copyright (C) 2009-2020, TBOOX Open Source Group.
*
* @author ruki
* @file acos.c
* @ingroup libm
*
*/
/* //////////////////////////////////////////////////////////////////////////////////////
* includes
*/
#include "math.h"
#include <math.h>
/* //////////////////////////////////////////////////////////////////////////////////////
* implementation
*/
tb_double_t tb_acos(tb_double_t x)
{
#ifdef TB_CONFIG_LIBM_HAVE_ACOS
return acos(x);
#else
tb_assert(0);
return 0;
#endif
}
|
/*
* The internal libfsapfs header
*
* Copyright (C) 2018-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( _PYFSAPFS_LIBFSAPFS_H )
#define _PYFSAPFS_LIBFSAPFS_H
#include <common.h>
#include <libfsapfs.h>
#endif /* !defined( _PYFSAPFS_LIBFSAPFS_H ) */
|
#ifndef JOLUPMAIN_H
#define JOLUPMAIN_H
#include "QMainWindow"
#include "ui_JolUpMain.h"
//Dialog Class
class MyInfo;
class LectureAdd;
class LectureModify;
class LectureManager;
//Data Class
class MyInfoData;
//BO Class
class LectureNodeFunc;
class JolUpMain : public QMainWindow, public Ui::JolUpMain {
Q_OBJECT
public:
JolUpMain();
void showMyInfoLabel();
void showTotalPointLabel();
void refreshLectureInfo();
void refreshLectureInfo(int, int);
private slots:
//make dialog slots
void showAbout();
void showLectureAddDialog();
void showLectureModifyDialog();
void showMyInfoDialog();
void updateMyInfo(const QString *);
void updateTotalPoint(const qint32 *);
void addLectureNode(const QString &, const qint32 &, const bool *, const double &);
private:
//Dialog Class Create
MyInfo *myinfo_d;
LectureAdd *lectureadd_d;
LectureModify *lecturemodify_d;
//Data Class Create
MyInfoData *myinfo;
LectureManager *manager;
void createActions();
void createButtons();
};
#endif
|
#ifndef FIRSTHISTORYENTRY_H
#define FIRSTHISTORYENTRY_H
#include <Wt/WContainerWidget>
class FirstHistoryEntry : public Wt::WContainerWidget
{
public:
FirstHistoryEntry(Wt::WContainerWidget *parent);
};
#endif // FIRSTHISTORYENTRY_H
|
// Created file "Lib\src\Uuid\pla_i"
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_LegacyDataCollectorSetCollection, 0x03837527, 0x098b, 0x11d8, 0x94, 0x14, 0x50, 0x50, 0x54, 0x50, 0x30, 0x30);
|
// Created file "Lib\src\MsXml2\X64\msxml2_i"
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_XMLSchemaCache, 0x373984c9, 0xb845, 0x449b, 0x91, 0xe7, 0x45, 0xac, 0x83, 0x03, 0x6a, 0xde);
|
/*
* Date and time functions
*
* Copyright (c) 2006-2013, Joachim Metz <joachim.metz@gmail.com>
*
* Refer to AUTHORS for acknowledgements.
*
* This software 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 software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this software. If not, see <http://www.gnu.org/licenses/>.
*/
#if !defined( _LIBEWF_DATE_TIME_H )
#define _LIBEWF_DATE_TIME_H
#include <common.h>
#include <types.h>
#include "libewf_libcerror.h"
#if defined( TIME_WITH_SYS_TIME )
#include <sys/time.h>
#include <time.h>
#elif defined( HAVE_SYS_TIME_H )
#include <sys/time.h>
#else
#include <time.h>
#endif
#if defined( __cplusplus )
extern "C" {
#endif
#if defined( WINAPI )
#define libewf_date_time_mktime( time_elements ) \
mktime( time_elements )
#elif defined( HAVE_MKTIME )
#define libewf_date_time_mktime( time_elements ) \
mktime( time_elements )
#else
#error Missing mktime function
#endif
int libewf_date_time_localtime(
const time_t *timestamp,
struct tm *time_elements,
libcerror_error_t **error );
#if defined( __cplusplus )
}
#endif
#endif
|
// Created file "Lib\src\ehstorguids\guids"
typedef struct _GUID
{
unsigned long Data1;
unsigned short Data2;
unsigned short Data3;
unsigned char Data4[8];
} GUID;
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
extern const GUID name = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }
DEFINE_GUID(PKEY_Sync_Comments, 0x7bd5533e, 0xaf15, 0x44db, 0xb8, 0xc8, 0xbd, 0x66, 0x24, 0xe1, 0xd0, 0x32);
|
/*=============================================================================
*
* @file : transfer.h
* @author : JackABK
* @data : 2014/2/2
* @brief : shell.c header file
*
*============================================================================*/
#ifndef __TRANSFER_H__
#define __TRANSFER_H__
#include "EPW_command.h"
#include "stm32f4xx.h"
extern void receive_task(void *p);
extern void init_send_out_info(void);
extern void send_out_task(void);
/*determine yes or no reatch the MAX_STRLEN */
extern uint8_t Receive_String_Ready;
/*arrange the receive of command to structure */
#pragma pack(1)
static struct receive_cmd_list{
unsigned char Identifier[3];
unsigned char group;
unsigned char control_id;
unsigned char value;
};
#pragma pack()
/*list of the EPW information structure*/
typedef struct{
char * name;
EPW_Info_id id;
unsigned char *value;
}EPW_info;
/* USART receive command and pwm value*/
/*should be to define to main.h or uart.h*/
enum {
RECEIVE_CMD,
RECEIVE_PWM_VALUE
};
#endif /* __SHELL_H__ */
|
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** 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 The Qt Company. For licensing terms
** and conditions see http://www.qt.io/terms-conditions. For further
** information use the contact form at http://www.qt.io/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 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPLv3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or later 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 2.0 requirements will be
** met: http://www.gnu.org/licenses/gpl-2.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QQUICKSTYLE_H
#define QQUICKSTYLE_H
#include <QtCore/qurl.h>
#include <QtCore/qstring.h>
#include <QtQuickControls2/qtquickcontrols2global.h>
QT_BEGIN_NAMESPACE
class Q_QUICKCONTROLS2_EXPORT QQuickStyle
{
public:
static QString name();
static QString path();
static void setStyle(const QString &style);
};
QT_END_NAMESPACE
#endif // QQUICKSTYLE_H
|
struct {
int toto;
} PRIVATE;
|
/*
This source file is part of KBEngine
For the latest info, see http://www.kbengine.org/
Copyright (c) 2008-2016 KBEngine.
KBEngine 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.
KBEngine 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 KBEngine. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef KBE_MYSQL_DB_RW_CONTEXT_H
#define KBE_MYSQL_DB_RW_CONTEXT_H
#include "common/common.h"
#include "common/memorystream.h"
#include "helper/debug_helper.h"
namespace KBEngine {
namespace mysql {
/**
Read/write when the delete operation is used, withdraw or to be written to contain all kinds of information.
Dbid: If you dbid is an entity the primary table, the child table is the current query dbid
Dbids: dbids on only a dbid in the primary table, is the ID of the entity if the entity data exists an array class,
the child table will appear when this data structure describes a child table
Dbids is the child table index into an array, each dbid representing the table corresponds to the value and also
said the order according to the values in the corresponding position in the array.
dbids = {
123: [xxx, xxx, ...],//123 a dbid that is on the parent table, array is associated with the parent table in the child table of the dbids.
...
}
Items: the table field information is in, if it is written also wrote that corresponds to the value in the field.
Optable: table structure
Results: query data when a read operation, arranged the data corresponds to the number of items in the strKey multiplied by the number of dbids.
Readresult idx: dbids * number of items in the results, so in certain recursive read fill the data according to the readresult calculates the filling position IDX.
Parent table dBID: parent table dbid
Parent table name: the name of the parent table Table name: the name of the current table
*/
class DBContext
{
public:
/**
Table to store all the action item structure
*/
struct DB_ITEM_DATA
{
char sqlval[MAX_BUF];
const char* sqlkey;
std::string extraDatas;
};
typedef std::vector< std::pair< std::string/*tableName*/, KBEShared_ptr< DBContext > > > DB_RW_CONTEXTS;
typedef std::vector< KBEShared_ptr<DB_ITEM_DATA> > DB_ITEM_DATAS;
DBContext()
{
}
~DBContext()
{
}
DB_ITEM_DATAS items;
std::string tableName;
std::string parentTableName;
DBID parentTableDBID;
DBID dbid;
DB_RW_CONTEXTS optable;
bool isEmpty;
std::map<DBID, std::vector<DBID> > dbids;
std::vector< std::string >results;
std::vector< std::string >::size_type readresultIdx;
private:
};
}
}
#endif // KBE_MYSQL_DB_RW_CONTEXT_H
|
// Created file "Lib\src\Uuid\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_DescriptionID, 0x28636aa6, 0x953d, 0x11d2, 0xb5, 0xd6, 0x00, 0xc0, 0x4f, 0xd9, 0x18, 0xd0);
|
/*
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_LISTASSOCIATIONSREQUEST_H
#define QTAWS_LISTASSOCIATIONSREQUEST_H
#include "ssmrequest.h"
namespace QtAws {
namespace SSM {
class ListAssociationsRequestPrivate;
class QTAWSSSM_EXPORT ListAssociationsRequest : public SsmRequest {
public:
ListAssociationsRequest(const ListAssociationsRequest &other);
ListAssociationsRequest();
virtual bool isValid() const Q_DECL_OVERRIDE;
protected:
virtual QtAws::Core::AwsAbstractResponse * response(QNetworkReply * const reply) const Q_DECL_OVERRIDE;
private:
Q_DECLARE_PRIVATE(ListAssociationsRequest)
};
} // namespace SSM
} // namespace QtAws
#endif
|
/*
autopylot_video.c - video-display thread for AR.Drone autopilot agent.
Copyright (C) 2013 Simon D. Levy
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/>.
You should also have received a copy of the Parrot Parrot AR.Drone
Development License and Parrot AR.Drone copyright notice and disclaimer
and If not, see
<https://projects.ardrone.org/attachments/277/ParrotLicense.txt>
and
<https://projects.ardrone.org/attachments/278/ParrotCopyrightAndDisclaimer.txt>.
*/
// Video data structure
#include "autopylot_video.h"
// Agent methods
#include "autopylot_agent.h"
// Globals
#include "ardrone_autopylot.h"
// For talking to SDK
#include <ardrone_tool/ardrone_tool_configuration.h>
#include <ardrone_tool/ardrone_version.h>
#include <ardrone_tool/UI/ardrone_input.h>
// Funcs pointer definition
const vp_api_stage_funcs_t video_funcs = {
NULL,
(vp_api_stage_open_t) video_open,
(vp_api_stage_transform_t) video_transform,
(vp_api_stage_close_t) video_close
};
C_RESULT video_open (video_cfg_t *cfg)
{
// Initialize the Python (or Matlab or C) agent
agent_init();
return C_OK;
}
C_RESULT video_transform (video_cfg_t *cfg, vp_api_io_data_t *in, vp_api_io_data_t *out)
{
// Realloc frameBuffer if needed
if (in->size != cfg->fbSize)
{
cfg->frameBuffer = vp_os_realloc (cfg->frameBuffer, in->size);
cfg->fbSize = in->size;
}
// Copy last frame to frameBuffer
vp_os_memcpy (cfg->frameBuffer, in->buffers[in->indexBuffer], cfg->fbSize);
// Convert BRG to RGB
int k;
for (k=0; k<cfg->fbSize; k+=3) {
uint8_t tmp = cfg->frameBuffer[k];
cfg->frameBuffer[k] = cfg->frameBuffer[k+2];
cfg->frameBuffer[k+2] = tmp;
}
// Grab image width from data structure
int img_width = cfg->width;
int img_height = cfg->height;
// If belly camera indicated on AR.Drone 1.0, move camera data to beginning
// of buffer
if (!IS_ARDRONE2 && g_is_bellycam) {
int j;
for (j=0; j<QCIF_HEIGHT; ++j) {
memcpy(&cfg->frameBuffer[j*QCIF_WIDTH*3],
&cfg->frameBuffer[j*QVGA_WIDTH*3],
QCIF_WIDTH*3);
}
img_width = QCIF_WIDTH;
img_height = QCIF_HEIGHT;
}
// normalize navdata angles to (-1,+1)
g_navdata.navdata_demo.phi /= 100000;
g_navdata.navdata_demo.theta /= 100000;
g_navdata.navdata_demo.psi /= 180000;
// Init new commands
commands_t commands;
// Call the Python (or Matlab or C) agent's action routine
agent_act(cfg->frameBuffer, img_width, img_height, g_is_bellycam, &g_navdata, &commands);
if (g_autopilot) {
set(commands.phi, commands.theta, commands.gaz, commands.yaw);
if (commands.zap) {
zap();
}
}
// Tell the pipeline that we don't have any output
out->size = 0;
return C_OK;
}
C_RESULT video_close (video_cfg_t *cfg)
{
// Shut down the Python (or Matlab or C) agent
agent_close();
return C_OK;
}
|
// Created file "Lib\src\strmiids\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(IID_IMixerOCXNotify, 0x81a3bd31, 0xdee1, 0x11d1, 0x85, 0x08, 0x00, 0xa0, 0xc9, 0x1f, 0x9c, 0xa0);
|
/*****************************************************************************
* This file is part of CERE. *
* *
* Copyright (c) 2013-2017, Universite de Versailles St-Quentin-en-Yvelines *
* *
* CERE 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. *
* *
* CERE is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with CERE. If not, see <http://www.gnu.org/licenses/>. *
*****************************************************************************/
#include <assert.h>
#include <errno.h>
#include <signal.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/mman.h>
#include <sys/prctl.h>
#include <sys/ptrace.h>
#include <sys/types.h>
#include <unistd.h>
#include "err.h"
#include "pages.h"
#include "types.h"
#include "tracee.h"
#include "tracee_interface.h"
#define _DEBUG 1
#undef _DEBUG
#include "debug.h"
static int times_called = 0;
static bool dump_initialized;
volatile static bool kill_after_dump = false;
void *(*real_malloc)(size_t);
void *(*real_calloc)(size_t nmemb, size_t size);
void *(*real_realloc)(void *ptr, size_t size);
void *(*real_memalign)(size_t alignment, size_t size);
bool mtrace_active;
void dump_init(void) {
/* state.mtrace_active = false; */
mtrace_active = false;
/* Copy the original binary */
char buf[BUFSIZ];
snprintf(buf, sizeof buf, "cp /proc/%d/exe lel_bin", getpid());
int ret = system(buf);
if (ret != 0) {
errx(EXIT_FAILURE, "lel_bin copy failed: %s.\n", strerror(errno));
}
/* configure atexit */
atexit(dump_close);
pid_t child = 0;
child = fork();
if (child == (pid_t)-1) {
errx(EXIT_FAILURE, "fork() failed: %s.\n", strerror(errno));
}
/* If we are the parent */
if (child != 0) {
char args[2][32];
snprintf(args[0], sizeof(args[0]), "%d", child);
snprintf(args[1], sizeof(args[1]), "%p", &tracer_buff);
char *const arg[] = {"cere-tracer", args[0], args[1], NULL};
execvp("cere-tracer", arg);
errx(EXIT_FAILURE, "ERROR TRACER RUNNING : %s\n", strerror(errno));
} else {
/* Give DUMPABLE capability, required by ptrace */
if (prctl(PR_SET_DUMPABLE, (long)1) != 0) {
errx(EXIT_FAILURE, "Prctl : %s\n", strerror(errno));
}
/* Make tracer buff executable */
if (mprotect(round_to_page(&tracer_buff), PAGESIZE,
(PROT_READ | PROT_WRITE | PROT_EXEC)) != 0) {
errx(EXIT_FAILURE, "Failed to make tracer buff executable : %s\n",
strerror(errno));
}
/* Request trace */
if (ptrace(PTRACE_TRACEME, 0, 0, 0) == -1) {
errx(EXIT_FAILURE, "ptrace(PTRACE_ME) : %s\n", strerror(errno));
}
debug_print("requesting ptrace from %d\n", getpid());
raise(SIGSTOP);
dump_initialized = true;
}
debug_print("%s", "DUMP_INIT DONE\n");
}
void dump_close() { unlink("lel_bin"); }
/* dumps memory
* loop_name: name of dumped loop
* invocation: the number of the invocation to dump
* count: number of arguments
* ...args...: the arguments to dump
*/
void dump(char *loop_name, int invocation, int count, ...) {
/* Must be conserved ? */
/* Avoid doing something before initializing */
/* the dump. */
if (!dump_initialized)
return;
times_called++;
/* Happens only once */
if ((invocation <= PAST_INV && times_called == 1) ||
(times_called == invocation - PAST_INV)) {
mtrace_active = true;
send_to_tracer(TRAP_LOCK_MEM);
}
if (times_called != invocation) {
return;
}
assert(times_called == invocation);
mtrace_active = false;
strcpy(tracer_buff.str_tmp, loop_name);
/* Send args */
send_to_tracer(TRAP_START_ARGS);
send_to_tracer(invocation);
send_to_tracer(count);
/* Dump addresses */
int i;
va_list ap;
va_start(ap, count);
for (i = 0; i < count; i++) {
send_to_tracer((register_t)va_arg(ap, void *));
}
va_end(ap);
kill_after_dump = true;
send_to_tracer(TRAP_END_ARGS);
}
void after_dump(void) {
/* Avoid doing something before initializing */
/* the dump. */
if (!dump_initialized)
return;
if (kill_after_dump)
abort();
}
|
//
// ========================= OPTIONS =============================
//
// Define "EFFECT_PLUGIN" here to build the plugin as an effect rather than a source
//
// #define EFFECT_PLUGIN
// Optionally define the resolution width to be used by a source plugin.
// The default is the host viewport which can affect fps for some shaders.
// If the plugin is an effect this is not used.
// Only the width is needed. The height is scaled to the aspect ratio of the host viewport
#define RESOLUTION_WIDTH 640
// ======================= SHADER FILES ===========================
//
// The shader file path is entered here and the entire file is
// embedded in resources when the program is compiled.
// Thereafter, the plugin is independent of the file itself.
//
// IMAGES
//
// Define any images that a shader uses here (IMAGEFILE0 to IMAGEFILE3).
// If "EFFECT_PLUGIN" is defined IMAGEFILE0 will be ignored
// and the texture provided by the host will be used.
//
// ==================================================================
#ifdef EFFECT_PLUGIN
//
// EFFECT SHADERS
//
// Thermal imaging
// #define SHADERFILE "SHADERS/EFFECT/thermal-imaging.txt"
// Pass through
// #define SHADERFILE "SHADERS/EFFECT/pass-through.txt"
// CRT video effect
// #define SHADERFILE "SHADERS/EFFECT/crt-video-effect.txt"
// TV glitch effect
// #define SHADERFILE "SHADERS/EFFECT/tv-damage-glitch.txt"
//
// EFFECT SHADERS using images (IMAGEFILE1 to IMAGEFILE3)
//
// Raining screen effect
// IMAGEFILE0 - the distortion image
// #define SHADERFILE "SHADERS/EFFECT/raining-screen.txt";
// #define IMAGEFILE1 "TEXTURES/tex03.jpg"
#else
//
// SOURCE SHADERS
//
// Voronoi Distances
#define SHADERFILE "SHADERS/SOURCE/voronoi-distances.txt"
// Disk intersection
// #define SHADERFILE "SHADERS/SOURCE/disk_intersection.txt"
// Clouds
// This is an example where reduced resolution is necessary because
// the shader significantly reduces fps at composition resolution.
// Try RESOLUTION_WIDTH 320. It's only clouds.
// Reacts to mouse X and Y.
// #define SHADERFILE "SHADERS/SOURCE/clouds.txt"
// Bokehlicious
// This is an example where ShaderToy mouse control of aperture and focus
// has been replaced by user float uniforms. Details in the shader file.
// You could remove Mouse X and Mouse Y controls for this one.
// #define SHADERFILE "SHADERS/SOURCE/bokehlicious2.txt"
//
// SOURCE SHADERS with images (IMAGEFILE0 to IMAGEFILE3)
//
// Flakes
// #define SHADERFILE "SHADERS/SOURCE/flakes.txt"
// IMAGEFILE0 - image to generate the flakes
// #define IMAGEFILE0 "TEXTURES/tex03.jpg"
// Infinite city
// IMAGEFILE0 - a noise image on Channel0 - tex12.png
// IMAGEFILE1 - an image used for reflections - tex06.jpg
// Can be slow, so reduce resolution. Try RESOLUTION_WIDTH 640.
// Reacts to mouse X and Y.
// #define SHADERFILE "SHADERS/SOURCE/infinite_city.txt"
// #define IMAGEFILE0 "TEXTURES/tex12.png"
// #define IMAGEFILE1 "TEXTURES/tex06.jpg"
// Hexagons distance
// IMAGEFILE0 - a noise image on Channel0 - tex12.png
// #define SHADERFILE "SHADERS/SOURCE/hexagons_distance.txt"
// #define IMAGEFILE0 "TEXTURES/tex12.png"
#endif
|
/******************************************************/
/* */
/* main.h - globals of main program */
/* */
/******************************************************/
/* Copyright 2019,2020 Pierre Abbat.
* This file is part of the Quadlods program.
*
* The Quadlods program is free software: you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* Quadlods 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 and Lesser General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License
* and Lesser General Public License along with Quadlods. If not, see
* <http://www.gnu.org/licenses/>.
*/
#include <map>
#include "quadlods.h"
extern std::map<int,Quadlods> quads;
int parseInt(std::string intstr);
double parseDouble(std::string intstr);
int parseScramble(std::string scramblestr);
double parseResolution(std::string resstr);
|
/*
* This file is part of the EPICS QT Framework, initially developed at the Australian Synchrotron.
*
* The EPICS QT Framework 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.
*
* The EPICS QT Framework is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with the EPICS QT Framework. If not, see <http://www.gnu.org/licenses/>.
*
* Copyright (c) 2009, 2010 Australian Synchrotron
*
* Author:
* Andrew Rhyder
* Contact details:
* andrew.rhyder@synchrotron.org.au
*/
#ifndef QERADIOBUTTONMANAGER_H
#define QERADIOBUTTONMANAGER_H
#include <QDesignerCustomWidgetInterface>
#include <QEPluginLibrary_global.h>
/*
???
*/
class QEPLUGINLIBRARYSHARED_EXPORT QERadioButtonManager : public QObject, public QDesignerCustomWidgetInterface {
Q_OBJECT
Q_INTERFACES(QDesignerCustomWidgetInterface)
public:
QERadioButtonManager( QObject *parent = 0 );
bool isContainer() const;
bool isInitialized() const;
QIcon icon() const;
//QString domXml() const;
QString group() const;
QString includeFile() const;
QString name() const;
QString toolTip() const;
QString whatsThis() const;
QWidget *createWidget( QWidget *parent );
void initialize( QDesignerFormEditorInterface *core );
private:
bool initialized;
};
#endif // QERADIOBUTTONMANAGER_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_GETIMAGEREQUEST_P_H
#define QTAWS_GETIMAGEREQUEST_P_H
#include "imagebuilderrequest_p.h"
#include "getimagerequest.h"
namespace QtAws {
namespace imagebuilder {
class GetImageRequest;
class GetImageRequestPrivate : public imagebuilderRequestPrivate {
public:
GetImageRequestPrivate(const imagebuilderRequest::Action action,
GetImageRequest * const q);
GetImageRequestPrivate(const GetImageRequestPrivate &other,
GetImageRequest * const q);
private:
Q_DECLARE_PUBLIC(GetImageRequest)
};
} // namespace imagebuilder
} // 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_DELETEFIELDLEVELENCRYPTIONPROFILERESPONSE_H
#define QTAWS_DELETEFIELDLEVELENCRYPTIONPROFILERESPONSE_H
#include "cloudfrontresponse.h"
#include "deletefieldlevelencryptionprofilerequest.h"
namespace QtAws {
namespace CloudFront {
class DeleteFieldLevelEncryptionProfileResponsePrivate;
class QTAWSCLOUDFRONT_EXPORT DeleteFieldLevelEncryptionProfileResponse : public CloudFrontResponse {
Q_OBJECT
public:
DeleteFieldLevelEncryptionProfileResponse(const DeleteFieldLevelEncryptionProfileRequest &request, QNetworkReply * const reply, QObject * const parent = 0);
virtual const DeleteFieldLevelEncryptionProfileRequest * request() const Q_DECL_OVERRIDE;
protected slots:
virtual void parseSuccess(QIODevice &response) Q_DECL_OVERRIDE;
private:
Q_DECLARE_PRIVATE(DeleteFieldLevelEncryptionProfileResponse)
Q_DISABLE_COPY(DeleteFieldLevelEncryptionProfileResponse)
};
} // namespace CloudFront
} // namespace QtAws
#endif
|
/*
RExOS - embedded RTOS
Copyright (c) 2011-2019, RExOS team
All rights reserved.
author: Alexey E. Kramarenko (alexeyk13@yandex.ru)
*/
#ifndef MAC_H
#define MAC_H
#include <stdint.h>
#include <stdbool.h>
#include "ipc.h"
#define MAC_INDIVIDUAL_ADDRESS (0 << 0)
#define MAC_MULTICAST_ADDRESS (1 << 0)
#define MAC_BROADCAST_ADDRESS (3 << 0)
#define MAC_CAST_MASK (3 << 0)
#define ETHERTYPE_IP 0x0800
#define ETHERTYPE_ARP 0x0806
#define ETHERTYPE_IPV6 0x86dd
#pragma pack(push, 1)
typedef union {
uint8_t u8[6];
struct {
uint32_t hi;
uint16_t lo;
}u32;
} MAC;
typedef struct {
MAC dst;
MAC src;
uint8_t lentype_be[2];
} MAC_HEADER;
#pragma pack(pop)
typedef enum {
MAC_ENABLE_FIREWALL = IPC_USER,
MAC_DISABLE_FIREWALL
}MAC_IPCS;
void mac_print(const MAC* mac);
bool mac_compare(const MAC* src, const MAC* dst);
void mac_enable_firewall(HANDLE tcpip, const MAC* src);
void mac_disable_firewall(HANDLE tcpip);
#endif // MAC_H
|
/*
* VerifyPlayerNameResponseMessage.h
*
* Created on: Nov 25, 2008
* Author: swgemu
*/
#ifndef VERIFYPLAYERNAMERESPONSEMESSAGE_H_
#define VERIFYPLAYERNAMERESPONSEMESSAGE_H_
class VerifyPlayerNameResponseMessage : public BaseMessage {
public:
VerifyPlayerNameResponseMessage(bool success, int counter) : BaseMessage() {
insertShort(0x09);
insertInt(0xF4C498FD); // CRC
if (success == true)
insertByte(1); //0 failed 1 succeeded.
else
insertByte(0);
insertInt(counter); //Pretty sure this is a counter from the Verify packet.
}
};
#endif /* VERIFYPLAYERNAMERESPONSEMESSAGE_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_PROVISIONBYOIPCIDRRESPONSE_P_H
#define QTAWS_PROVISIONBYOIPCIDRRESPONSE_P_H
#include "globalacceleratorresponse_p.h"
namespace QtAws {
namespace GlobalAccelerator {
class ProvisionByoipCidrResponse;
class ProvisionByoipCidrResponsePrivate : public GlobalAcceleratorResponsePrivate {
public:
explicit ProvisionByoipCidrResponsePrivate(ProvisionByoipCidrResponse * const q);
void parseProvisionByoipCidrResponse(QXmlStreamReader &xml);
private:
Q_DECLARE_PUBLIC(ProvisionByoipCidrResponse)
Q_DISABLE_COPY(ProvisionByoipCidrResponsePrivate)
};
} // namespace GlobalAccelerator
} // namespace QtAws
#endif
|
/*
* This file is part of the EPICS QT Framework, initially developed at the
* Australian Synchrotron.
*
* The EPICS QT Framework 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.
*
* The EPICS QT Framework is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with the EPICS QT Framework. If not, see <http://www.gnu.org/licenses/>.
*
* Copyright (c) 2012 Australian Synchrotron
*
* Author:
* Andrew Starritt
* Contact details:
* andrew.starritt@synchrotron.org.au
*/
#ifndef QEPVPROPERTIESMANAGER_H
#define QEPVPROPERTIESMANAGER_H
#include <QDesignerCustomWidgetInterface>
#include <QEPluginLibrary_global.h>
/*
???
*/
class QEPLUGINLIBRARYSHARED_EXPORT QEPvPropertiesManager :
public QObject,
public QDesignerCustomWidgetInterface
{
Q_OBJECT
Q_INTERFACES (QDesignerCustomWidgetInterface)
public:
QEPvPropertiesManager (QObject * parent = 0);
bool isContainer () const;
bool isInitialized () const;
QIcon icon () const;
//QString domXml() const;
QString group () const;
QString includeFile () const;
QString name () const;
QString toolTip () const;
QString whatsThis () const;
QWidget *createWidget (QWidget * parent);
void initialize (QDesignerFormEditorInterface * core);
private:
bool initialized;
};
#endif // QEPVPROPERTIESMANAGER_H
|
// newfont.h
#ifndef FNEWFONT_H
#define FNEWFONT_H
#include "newfont_8x16.h"
#include "newfont_9x16.h"
#endif // FNEWFONT_H
|
// Created file "Lib\src\ehstorguids\X64\esguids"
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_USERINTERFACEBUTTON_ACTION, 0xa7066653, 0x8d6c, 0x40a8, 0x91, 0x0e, 0xa1, 0xf5, 0x4b, 0x84, 0xc7, 0xe5);
|
#ifndef __PRODUCTION_TEST_H__
#define __PRODUCTION_TEST_H__
bool productionTestsRun();
#endif // __PRODUCTION_TEST_H__
|
/**
* @file NodeWhileLoop.h
* @author Christopher Maier (cmaier.business@gmail.com)
* @date April 2015
*
* AST node for YAGI while-loops
*/
/*
This file is part of YAGI.
YAGI 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.0 of the License, or (at your option) any later version.
YAGI 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 YAGI.
*/
#ifndef NODEWHILELOOP_H_
#define NODEWHILELOOP_H_
#include "NodeStatementBase.h"
#include "../Formula/NodeFormulaBase.h"
#include "NodeBlock.h"
/**
* AST node class for YAGI while-loops
*/
class NodeWhileLoop: public NodeStatementBase
{
private:
/**
* The while-condition formula
*/
std::shared_ptr<NodeFormulaBase> formula_;
/**
* The while-block
*/
std::shared_ptr<NodeBlock> block_;
public:
DEFINE_VISITABLE()
/**
* Default ctor
*/
NodeWhileLoop();
/**
* Default dtor
*/
virtual ~NodeWhileLoop();
/**
* Getter for the while-block
* @return The while-block
*/
const std::shared_ptr<NodeBlock>& getBlock() const
{
return block_;
}
/**
* Setter for the while-block
* @param block The while-block
*/
void setBlock(const std::shared_ptr<NodeBlock>& block)
{
block_ = block;
}
/**
* Getter for the while-condition
* @return The while-condition formula
*/
const std::shared_ptr<NodeFormulaBase>& getFormula() const
{
return formula_;
}
/**
* Setter for the while-condition
* @param formula The while-condition formula
*/
void setFormula(const std::shared_ptr<NodeFormulaBase>& formula)
{
formula_ = formula;
}
};
#endif /* NODEWHILELOOP_H_ */
|
/*
* jinclude.h
*
* Copyright (C) 1991-1994, Thomas G. Lane.
* This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file.
*
* This file exists to provide a single place to fix any problems with
* including the wrong system include files. (Common problems are taken
* care of by the standard jconfig symbols, but on really weird systems
* you may have to edit this file.)
*
* NOTE: this file is NOT intended to be included by applications using the
* JPEG library. Most applications need only include jpeglib.h.
*/
/* Include auto-config file to find out which system include files we need. */
#include "jconfig.h" /* auto configuration options */
#define JCONFIG_INCLUDED /* so that jpeglib.h doesn't do it again */
/*
* We need the NULL macro and size_t typedef.
* On an ANSI-conforming system it is sufficient to include <stddef.h>.
* Otherwise, we get them from <stdlib.h> or <stdio.h>; we may have to
* pull in <sys/types.h> as well.
* Note that the core JPEG library does not require <stdio.h>;
* only the default error handler and data source/destination modules do.
* But we must pull it in because of the references to FILE in jpeglib.h.
* You can remove those references if you want to compile without <stdio.h>.
*/
#ifdef HAVE_STDDEF_H
#include <stddef.h>
#endif
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#ifdef NEED_SYS_TYPES_H
#include <sys/types.h>
#endif
#include <stdio.h>
/*
* We need memory copying and zeroing functions, plus strncpy().
* ANSI and System V implementations declare these in <string.h>.
* BSD doesn't have the mem() functions, but it does have bcopy()/bzero().
* Some systems may declare memset and memcpy in <string.h>.
*
* NOTE: we assume the size parameters to these functions are of type size_t.
* Change the casts in these macros if not!
*/
#ifdef NEED_BSD_STRINGS
#include <strings.h>
#define MEMZERO(target,size) bzero((void *)(target), (size_t)(size))
#define MEMCOPY(dest,src,size) bcopy((const void *)(src), (void *)(dest), (size_t)(size))
#else /* not BSD, assume ANSI/SysV string lib */
#include <string.h>
#define MEMZERO(target,size) memset((void *)(target), 0, (size_t)(size))
#define MEMCOPY(dest,src,size) memcpy((void *)(dest), (const void *)(src), (size_t)(size))
#endif
/*
* In ANSI C, and indeed any rational implementation, size_t is also the
* type returned by sizeof(). However, it seems there are some irrational
* implementations out there, in which sizeof() returns an int even though
* size_t is defined as long or unsigned long. To ensure consistent results
* we always use this SIZEOF() macro in place of using sizeof() directly.
*/
#define SIZEOF(object) ((size_t) sizeof(object))
/*
* The modules that use fread() and fwrite() always invoke them through
* these macros. On some systems you may need to twiddle the argument casts.
* CAUTION: argument order is different from underlying functions!
*/
#define JFREAD(file,buf,sizeofbuf) \
((size_t) fread((void *) (buf), (size_t) 1, (size_t) (sizeofbuf), (file)))
#define JFWRITE(file,buf,sizeofbuf) \
((size_t) fwrite((const void *) (buf), (size_t) 1, (size_t) (sizeofbuf), (file)))
|
#ifndef WEB_VIEW_WINDOW_H
#define WEB_VIEW_WINDOW_H
/*
* Copyright (C) 2012 United States Government as represented by the Administrator of the
* National Aeronautics and Space Administration.
* All Rights Reserved.
*/
#import <Cocoa/Cocoa.h>
#import <OpenGL/gl.h>
#import <WebKit/WebKit.h>
/*
WebViewWindow provides a display of a WebView as an OpenGL texture. However, NSWindows cannot be displayed directly
into a texture, and cannot be accessed from the Java Event Dispatch Thread (EDT). WebViewWindow resolves this by
displaying to a backing buffer in the Apple AppKit thread, then loading the backing buffer in an OpenGL texture on
the Java Event Dispatch Thread.
WebViewWindow synchronizes access between the AppKit and Java EDT using an NSLock. According to the Apple JNI
documentation, blocking the AppKit thread against the EDT or vice-versa causes deadlock because the AppKit thread
is responsible for running the EDT. For details, see http://developer.apple.com/library/mac/#technotes/tn2005/tn2147.html
WebViewWindow places locks around critical native code that does not wait for the Java EDT, thereby avoiding the
possibility of a deadlock.
Version $Id: WebViewWindow.h 1171 2013-02-11 21:45:02Z dcollins $
*/
extern NSString *LinkBounds;
extern NSString *LinkHref;
extern NSString *LinkRects;
extern NSString *LinkTarget;
extern NSString *LinkType;
@interface WebViewWindow : NSWindow
{
@protected
// WebView properties.
BOOL webViewInitialized;
NSString *htmlString;
NSURL *baseURL;
id resourceResolver;
WebHistoryItem *htmlStringHistoryItem;
NSLock *edtLock;
// Display properties.
long long displayTime; // 64-bit integer.
long long textureDisplayTime; // 64-bit integer.
NSBitmapImageRep *displayBuffer;
NSMutableArray *linksBuffer;
NSMutableArray *links;
// Content info properties.
long long contentUpdateTime; // 64-bit integer.
long long contentInfoUpdateTime; // 64-bit integer.
NSSize contentSize;
NSSize minContentSize;
NSURL *contentURL;
// Event handling support.
char *consumedKeyDownEvents;
NSScroller *activeScroller;
double scrollerLastPosition;
double scrollerOffset;
// Property change event handling.
id propertyChangeListener;
}
- (id)initWithFrameSize:(NSSize)frameSize;
- (void)initWebView;
- (void)setHTMLString:(NSString *)htmlString;
- (void)setHTMLString:(NSString *)htmlString baseURL:(NSURL *)url;
- (void)setHTMLString:(NSString *)htmlString resourceResolver:(id)resolver;
- (void)loadHTMLString:(NSString *)string baseURL:(NSURL *)url resourceResolver:(id)resolver;
- (void)reloadHTMLString;
- (NSURL *)resolve:(NSURL *)url;
- (NSSize)frameSize;
- (void)setFrameSize:(NSSize)size;
- (NSSize)contentSize;
- (NSSize)minContentSize;
- (void)setMinContentSize:(NSSize)size;
- (NSURL *)contentURL;
- (NSArray *)links;
- (void)goBack;
- (void)goForward;
- (void)sendEvent:(NSEvent *)event;
- (void)makeDisplay;
- (void)doMakeDisplay;
- (BOOL)mustRegenerateDisplayBuffer;
- (void)makeDisplayBuffer;
- (BOOL)mustDisplayInTexture;
- (void)displayInTexture:(GLenum)target;
- (void)makeContentInfo;
- (void)determineContentSize;
- (void)determineContentURL;
- (void)setPropertyChangeListener:(id)listener;
- (void)firePropertyChange;
// WebFrameLoadDelegate protocol.
- (void)webView:(WebView *)sender didFinishLoadForFrame:(WebFrame *)frame;
- (void)webView:(WebView *)sender didFailLoadWithError:(NSError *)error forFrame:(WebFrame *)frame;
- (void)webView:(WebView *)sender didFailProvisionalLoadWithError:(NSError *)error forFrame:(WebFrame *)frame;
// WebPolicyDelegate protocol.
- (void)webView:(WebView *)webView decidePolicyForMIMEType:(NSString *)type request:(NSURLRequest *)request
frame:(WebFrame *)frame decisionListener:(id < WebPolicyDecisionListener >)listener;
- (void)webView:(WebView *)webView decidePolicyForNewWindowAction:(NSDictionary *)actionInformation
request:(NSURLRequest *)request newFrameName:(NSString *)frameName
decisionListener:(id < WebPolicyDecisionListener >)listener;
// WebUIDelegate protocol.
- (NSArray *)webView:(WebView *)sender contextMenuItemsForElement:(NSDictionary *)element
defaultMenuItems:(NSArray *)defaultMenuItems;
- (WebView *)webView:(WebView *)sender createWebViewModalDialogWithRequest:(NSURLRequest *)request;
- (WebView *)webView:(WebView *)sender createWebViewWithRequest:(NSURLRequest *)request;
- (void)webView:(WebView *)sender printFrameView:(WebFrameView *)frameView;
// WebResourceLoadDelegate protocol.
- (NSURLRequest *)webView:(WebView *)sender resource:(id)identifier willSendRequest:(NSURLRequest *)request
redirectResponse:(NSURLResponse *)redirectResponse fromDataSource:(WebDataSource *)dataSource;
@end
#endif /* WEB_VIEW_WINDOW_H */
|
/**
*
* This file is part of Tulip (http://tulip.labri.fr)
*
* Authors: David Auber and the Tulip development Team
* from LaBRI, University of Bordeaux
*
* Tulip 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.
*
* Tulip 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.
*
*/
#ifndef Tulip_SPANNINGTREESELECTION_H
#define Tulip_SPANNINGTREESELECTION_H
#include <tulip/BooleanProperty.h>
/** \addtogroup selection */
/**
* This selection plugins enables to find a subgraph of G that is a forest (a set of trees).
*
* \author David Auber, LaBRI University Bordeaux I France:
* auber@labri.fr
*/
class SpanningTreeSelection : public tlp::BooleanAlgorithm {
public:
PLUGININFORMATION("Spanning Forest", "David Auber", "01/12/1999",
"Selects a subgraph of a graph that is a forest (a set of trees).", "1.0",
"Selection")
SpanningTreeSelection(const tlp::PluginContext *context);
~SpanningTreeSelection() override;
bool run() override;
};
#endif
|
#ifndef PANEL_H
#define PANEL_H
#include <QtWidgets>
/*
This file is part of Dooscape.
Dooscape 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.
Dooscape 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 Dooscape. If not, see <http://www.gnu.org/licenses/>.
*/
class Panel : public QToolBar
{
Q_OBJECT
public:
explicit Panel(QWidget *parent = 0);
QString color;
signals:
void closeRequested();
protected:
void resizeEvent(QResizeEvent *event);
public slots:
void setTitle(QString title);
void setColor(QString backgroundColor);
void setWidget(QWidget *widget);
void setLayout(QLayout *boxLayout);
void enableShadow(bool enable);
private slots:
private:
QLabel *ttl;
QScrollArea *scrollArea;
QPushButton *btnClose;
QGraphicsDropShadowEffect *shadow;
};
#endif // PANEL_H
|
// Created file "Lib\src\Uuid\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_Photo_TranscodedForSync, 0x9a8ebb75, 0x6458, 0x4e82, 0xba, 0xcb, 0x35, 0xc0, 0x09, 0x5b, 0x03, 0xbb);
|
// 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_MEDIA_COMPOSER, 0x2ed8ba05, 0x0ad3, 0x42dc, 0xb0, 0xd0, 0xbc, 0x95, 0xac, 0x39, 0x6a, 0xc8);
|
/* check_mparam - check a mparam.h file
Copyright 2018-2021 Free Software Foundation, Inc.
Contributed by the Arenaire and Caramel projects, INRIA.
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; see the file COPYING.LESSER. If not, see
https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc.,
51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */
/* To check some mparam.h tables:
1) make a symbolic link to the corresponding mparam.h or
provide -DMPARAM='"..."' with a path to the mparam.h
file when compiling this program
2) compile and run this program */
#include <stdio.h>
#ifndef MPARAM
# define MPARAM "mparam.h"
#endif
#include MPARAM
#define numberof_const(x) (sizeof (x) / sizeof ((x)[0]))
static short mulhigh_ktab[] = {MPFR_MULHIGH_TAB};
#define MPFR_MULHIGH_TAB_SIZE (numberof_const (mulhigh_ktab))
static short sqrhigh_ktab[] = {MPFR_SQRHIGH_TAB};
#define MPFR_SQRHIGH_TAB_SIZE (numberof_const (sqrhigh_ktab))
static short divhigh_ktab[] = {MPFR_DIVHIGH_TAB};
#define MPFR_DIVHIGH_TAB_SIZE (numberof_const (divhigh_ktab))
int main (void)
{
int err = 0, n;
for (n = 0; n < MPFR_MULHIGH_TAB_SIZE; n++)
if (mulhigh_ktab[n] >= n)
{
printf ("Error, mulhigh_ktab[%d] = %d\n", n, mulhigh_ktab[n]);
err = 1;
}
for (n = 0; n < MPFR_SQRHIGH_TAB_SIZE; n++)
if (sqrhigh_ktab[n] >= n)
{
printf ("Error, sqrhigh_ktab[%d] = %d\n", n, sqrhigh_ktab[n]);
err = 1;
}
for (n = 2; n < MPFR_DIVHIGH_TAB_SIZE; n++)
if (divhigh_ktab[n] >= n-1)
{
printf ("Error, divhigh_ktab[%d] = %d\n", n, divhigh_ktab[n]);
err = 1;
}
return err;
}
|
/*
* Copyright (c) 2016-2017 Contributors as noted in the AUTHORS file
*
* This file is part of nlib.
*
* nlib is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Foobar is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Foobar. If not, see <http://www.gnu.org/licenses/>
*/
#ifndef N_IO_IMPL_H
#define N_IO_IMPL_H
#include <stdlib.h>
class IOImpl
{
public:
virtual char read() = 0;
virtual void write(char) = 0;
virtual size_t read(void *buffer, size_t size) = 0;
virtual size_t write(const void *buffer, size_t size) = 0;
virtual int close() = 0;
virtual int on_recv(void (*)(int, void *), void *) = 0;
virtual bool available() = 0;
virtual void flush()
{
}
virtual ~IOImpl()
{
}
};
#endif
|
/*
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 GALLOPSTOPSLASHCOMMAND_H_
#define GALLOPSTOPSLASHCOMMAND_H_
#include "../../../scene/SceneObject.h"
class GallopStopSlashCommand : public SlashCommand {
public:
GallopStopSlashCommand(const String& name, ZoneProcessServerImplementation* server)
: SlashCommand(name, server) {
}
bool doSlashCommand(Player* player, Message* packet) {
return true;
}
};
#endif //GALLOPSTOPSLASHCOMMAND_H_
|
// Created file "Lib\src\amstrmid\X64\amstrmid"
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(MSPID_PrimaryVideo, 0xa35ff56a, 0x9fda, 0x11d0, 0x8f, 0xdf, 0x00, 0xc0, 0x4f, 0xd9, 0x18, 0x9d);
|
// Created file "Lib\src\sensorsapi\X64\sensorsapi"
typedef struct _GUID
{
unsigned long Data1;
unsigned short Data2;
unsigned short Data3;
unsigned char Data4[8];
} GUID;
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
extern const GUID name = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }
DEFINE_GUID(SENSOR_DATA_TYPE_FORCE_NEWTONS, 0x38564a7c, 0xf2f2, 0x49bb, 0x9b, 0x2b, 0xba, 0x60, 0xf6, 0x6a, 0x58, 0xdf);
|
// 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(CLSID_DxtAlphaSetter, 0x506d89ae, 0x909a, 0x44f7, 0x94, 0x44, 0xab, 0xd5, 0x75, 0x89, 0x6e, 0x35);
|
/*
* The libuna 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( _LIBFTXR_LIBUNA_H )
#define _LIBFTXR_LIBUNA_H
#include <common.h>
/* Define HAVE_LOCAL_LIBUNA for local use of libuna
*/
#if defined( HAVE_LOCAL_LIBUNA )
#include <libuna_base16_stream.h>
#include <libuna_base32_stream.h>
#include <libuna_base64_stream.h>
#include <libuna_byte_stream.h>
#include <libuna_unicode_character.h>
#include <libuna_url_stream.h>
#include <libuna_utf16_stream.h>
#include <libuna_utf16_string.h>
#include <libuna_utf32_stream.h>
#include <libuna_utf32_string.h>
#include <libuna_utf7_stream.h>
#include <libuna_utf8_stream.h>
#include <libuna_utf8_string.h>
#include <libuna_types.h>
#else
/* If libtool DLL support is enabled set LIBUNA_DLL_IMPORT
* before including libuna.h
*/
#if defined( _WIN32 ) && defined( DLL_IMPORT )
#define LIBUNA_DLL_IMPORT
#endif
#include <libuna.h>
#endif /* defined( HAVE_LOCAL_LIBUNA ) */
#endif /* !defined( _LIBFTXR_LIBUNA_H ) */
|
//
// Employee.h
// WhoSwho
//
// Created by Andrea Reply on 21/02/14.
// Copyright (c) 2014 Andrea Filippo Longo. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <CoreData/CoreData.h>
@interface Employee : NSManagedObject
@property (nonatomic, retain) NSString * name;
@property (nonatomic, retain) NSString * role;
@property (nonatomic, retain) NSString * shortDesc;
@property (nonatomic, retain) NSString * pictureURL;
@property (nonatomic, retain) NSData * pictureBin;
@property (nonatomic, readwrite) int index;
@end
|
#ifndef EVCLIPBOARDINTERFACE_H
#define EVCLIPBOARDINTERFACE_H
class EvWidget;
class EvObject;
class EvObjectsContainer;
#include <QList>
#include <QObject>
struct EvClipboardInterfacePrivate;
class EvClipboardInterface : public QObject
{
Q_OBJECT
public:
EvClipboardInterface(QObject* parent = 0);
virtual ~EvClipboardInterface();
void setSelection(EvObject*);
void setSelection(const QList<EvObject*> &);
bool hasSelection()const;
void clearSelection();
const EvObjectsContainer * selectedObjects()const;
void setCopyObject(EvObject* );
void setCutObject(EvObject* );
void setCopyObjects(const QList<EvObject*> &);
void setCutObjects(const QList<EvObject*> &);
void clearClipboardObject();
bool canCopy()const;
bool canPaste()const;
bool canPaste(const EvObjectsContainer *)const;
public Q_SLOTS:
void copy();
void cut();
void paste();
Q_SIGNALS:
void selectionChanged();
void clipboardObjectsChanged();
void clipboardObjectsCleared();
private:
EvClipboardInterfacePrivate * d_ptr;
};
#endif // EVCLIPBOARDINTERFACE_H
|
#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
// Radio setting
RF24 radio(9, 10); // For nano pin 9 and 10
void setup() {
Serial.begin(9600);
Serial.setTimeout(50);
radio.begin();
delay(100);
radio.powerUp();
radio.setChannel(70);
radio.setAutoAck(false); // Disable hardware ACK, use program ACK
radio.setPayloadSize(32);
radio.setCRCLength(RF24_CRC_8);
radio.setDataRate(RF24_1MBPS); // (RF24_250KBPS, RF24_1MBPS, RF24_2MBPS)
radio.setPALevel(RF24_PA_MAX); // (RF24_PA_MIN=-18dBm, RF24_PA_LOW=-12dBm, RF24_PA_HIGH=-6dBm, RF24_PA_MAX=0dBm)
radio.openWritingPipe(0xBBBBBBBB22LL);
radio.openReadingPipe(1, 0xBBBBBBBB11LL);
radio.startListening();
}
void loop() {
if (radio.available()) {
Serial.println("recieved");
delay(1000);
byte payload[32];
radio.read(&payload, sizeof(payload));
// radio.powerDown();
// delay(5000);
// radio.powerUp();
// radio.startListening();
}
}
|
#pragma once
#include "Calculator.h"
#include <QtTest>
class TestCalculator: public QObject
{
Q_OBJECT
private slots:
// -- setup/cleanup --
void init();
// -- tests --
void testConstructor();
void testSum();
private:
const int A0 = 0;
const int B0 = 0;
private:
Calculator mCalc;
};
|
#ifndef HistogramTool_h
#define HistogramTool_h
#include "AbstractPlotTool.h"
class QAction;
class QWidget;
namespace Isis {
class Brick;
class CubePlotCurve;
class HistogramItem;
class HistogramToolWindow;
class MdiCubeViewport;
/**
* @brief Tool for histograms
*
* @ingroup Visualization Tools
*
* @author ????-??-?? Noah Hilt
*
* @internal
* @history 2008-08-18 Christopher Austin - Upgraded to geos3.0.0
* @history 2012-01-18 Steven Lambright and Jai Rideout - Fixed issue where
* histograms were not created correctly for any bands
* but band 1. Added check for RGB mode. Fixes #668.
* @history 2012-01-20 Steven Lambright - Completed documentation.
* @history 2013-12-11 Janet Barrett - Fixed refreshPlot method so that it
* checks the start sample and end sample for the
* plot and starts the plot at the minimum of the
* 2 samples. Fixes #1760.
* @history 2016-04-28 Tracie Sucharski - Removed qwt refernces to merge with
* Qt5 library changes.
* @history 2016-07-06 Adam Paquette - Fixed the histogram tool to analyze the
* appropriate pixels selected when using box banding
*
*/
class HistogramTool : public AbstractPlotTool {
Q_OBJECT
public:
HistogramTool(QWidget *parent);
protected:
QWidget *createToolBarWidget(QStackedWidget *parent);
void detachCurves();
PlotWindow *createWindow();
void enableRubberBandTool();
QAction *toolPadAction(ToolPad *pad);
void updateTool();
protected slots:
void rubberBandComplete();
public slots:
void refreshPlot();
private:
void validatePlotCurves();
HistogramToolWindow *m_histToolWindow;//!< Plot Tool Window Widget
//! This is the qwt plot item which draws the histogram frequency bars
QPointer<HistogramItem> m_frequencyItem;
//! This plot curve indicates the data percentage over the histogram
QPointer<CubePlotCurve> m_percentageCurve;
//! This is the action that activates this tool
QAction *m_action;
//! This combo box is for various rubber band selection types
QPointer<RubberBandComboBox> m_rubberBandCombo;
};
};
#endif
|
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
/*********************************************************************
* Fits the data passed down in arrays x(ndata) y(ndata) to the *
* straight line y = a + bx by minimising chi**2. Standard deviations*
* in y are passed down by sig(ndata) and can be weighted into *
* the fit if the logical switch weight is on. a and b together *
* with their uncertainties siga and sigb are returned. *
* adapted from the fit routine given in numerial recipes to be used *
* in the psrflux software. *
* *******************************************************************/
void slfit(float *x, float *y, float *z, int ndata,
float *sig, int weight, float *a, float *b,
float *siga, float *sigb)
{
float sx = .0f;
float sy = .0f;
float st2 = .0f;
float ss = .0f;
*b = .0f;
int q = 0;
float sigdat = 0.0f;
float t = 0.0f;
float wt = 0.0f;
float chi2 = 0.0f;
float sxoss = 0.0f;
int useweight = weight;
int i = 0;
/**
* for upper limits opt for an unweighted fit
* and use only three quarters the flux values
* */
for (i = 0; i < ndata; i++) {
*(z + i) = *(y + i);
if (*(sig + i) == -999.0) {
useweight = 0;
*(z + i) = 0.75 * (*(y + i));
}
}
if (useweight) {
for (i = 0; i < ndata; i++) {
wt = 1.0/(*(sig + i) * (*(sig + i)));
ss = ss + wt;
sx = sx + *(x + i) * wt;
sy = sy + *(z + i) * wt;
}
} else {
for (i = 0; i < ndata; i++) {
sx = sx + *(x + i);
sy = sy + *(z + i);
}
ss = (float)ndata;
}
sxoss = sx/ss;
if (useweight) {
for (i = 0; i < ndata; i++) {
t = (*(x + i) - sxoss) / *(sig + i);
*b = *b + t * (*(z + i)/ * (sig + i));
st2 = st2 + t * t;
}
} else {
for (i = 0 ; i < ndata; i++) {
t = (*(x + i) - sxoss);
st2 = st2 + t * t;
*b = *b + t * (*(z + i));
}
}
*b = *b /st2;
*a = (sy -sx * (*b)) / ss;
*siga = sqrt((1.0 + sx * sx/(ss * st2))/ss);
*sigb = sqrt(1.0/st2);
chi2 = 0.0;
if (!useweight) {
for (i = 0; i < ndata; i++) {
chi2 = pow((chi2 + ((*(z + i)) - *a - *b * (*(x + i)))), 2);
}
q = 1;
sigdat = 0.0f;
if (ndata > 2) sigdat = sqrt(chi2 / (ndata - 2));
*siga = *siga * sigdat;
*sigb = *sigb * sigdat;
}
}
|
/*
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of
relinquishment in perpetuity of all present and future rights to this
software under copyright law.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
For more information, please refer to <http://unlicense.org>
*/
#ifndef TSS_H_JPBOSCUO
#define TSS_H_JPBOSCUO
#include <types.h>
struct tss_entry {
uint32_t prev_task_link; // 16 bits
uint32_t esp0;
uint32_t ss0; // 16 bits
uint32_t esp1;
uint32_t ss1; // 16 bits
uint32_t esp2;
uint32_t ss2; // 16 bits
uint32_t cr3;
uint32_t eip;
uint32_t eflags;
uint32_t eax;
uint32_t ecx;
uint32_t edx;
uint32_t ebx;
uint32_t esp;
uint32_t ebp;
uint32_t esi;
uint32_t edi;
// rest are 16 bits:
uint32_t es;
uint32_t cs;
uint32_t ss;
uint32_t ds;
uint32_t fs;
uint32_t gs;
uint32_t ldt;
uint16_t trap; // 1 bit
uint16_t iomap_base;
} __attribute__((packed));
void tss_set_kernel_stack(uint16_t segsel, uint32_t vaddr);
#endif /* end of include guard: TSS_H_JPBOSCUO */
|
//
// DuxMultiFileSearchWindowController.h
// Dux
//
// Created by Abhi Beckert on 2012-11-6.
//
//
#import <Cocoa/Cocoa.h>
@interface DuxMultiFileSearchWindowController : NSWindowController <NSTextViewDelegate>
@property (weak) IBOutlet NSSearchField *searchField;
@property (weak) IBOutlet NSTableView *resultsTableView;
@property (weak) IBOutlet NSProgressIndicator *progressIndicator;
@property (strong) NSString *searchPath;
@property (readonly, strong) NSArray *searchResultPaths;
- (void)showWindowWithSearchPath:(NSString *)searchPath;
@end
|
#ifndef BITMASKGEN_TESTS_HAND_NAME_UTILS_TEST_1_H_
#define BITMASKGEN_TESTS_HAND_NAME_UTILS_TEST_1_H_
/*
Copyright 2015 <robert haramoto>
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of
relinquishment in perpetuity of all present and future rights to this
software under copyright law.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
For more information, please refer to <http://unlicense.org/>
*/
/*
############################################################
############################################################
### ###
### THandNameUtilsTest definition ###
### ###
### last updated January 20, 2015 ###
### ###
### written by Robert Haramoto ###
### ###
############################################################
############################################################
*/
#include <cppunit/extensions/HelperMacros.h>
#include <algorithm>
#include <vector>
#include <string>
#include "sources/card.h"
namespace handtest {
class THandNameUtilsTest : public CppUnit::TestFixture {
private:
CPPUNIT_TEST_SUITE(THandNameUtilsTest);
CPPUNIT_TEST(TestCalcNameRoyalFlush1);
CPPUNIT_TEST(TestCalcNameStraightFlush1);
CPPUNIT_TEST(TestCalcNameFiveHighStraightFlush1);
CPPUNIT_TEST(TestCalcName4OfAKind1);
CPPUNIT_TEST(TestCalcNameFullHouse1);
CPPUNIT_TEST(TestCalcNameFlush1);
CPPUNIT_TEST(TestCalcNameStraight1);
CPPUNIT_TEST(TestCalcNameFiveHighStraight1);
CPPUNIT_TEST(TestCalcName3OfAKind1);
CPPUNIT_TEST(TestCalcName2Pair1);
CPPUNIT_TEST(TestCalcName1Pair1);
CPPUNIT_TEST(TestCalcNameHighCard1);
CPPUNIT_TEST_SUITE_END();
public:
THandNameUtilsTest();
~THandNameUtilsTest();
void setUp();
void tearDown();
void TestCalcNameRoyalFlush1();
void TestCalcNameStraightFlush1();
void TestCalcNameFiveHighStraightFlush1();
void TestCalcName4OfAKind1();
void TestCalcNameFullHouse1();
void TestCalcNameFlush1();
void TestCalcNameStraight1();
void TestCalcNameFiveHighStraight1();
void TestCalcName3OfAKind1();
void TestCalcName2Pair1();
void TestCalcName1Pair1();
void TestCalcNameHighCard1();
private:
void Initialize();
void Destroy();
void AssertCardVectorsEqual(
const std::vector<cardlib::CCard> &shouldbe_vec,
const std::vector<cardlib::CCard> &result_vec,
const std::string &err_1);
void AssertHandNamesEqual(
const std::string &err_1,
const int ii,
const bool bshouldbe,
const std::string &shouldbe_long,
const std::string &shouldbe_short,
const bool bresult,
const std::string &result_long,
const std::string &result_short);
cardlib::CCard c_ah_, c_kh_, c_qh_, c_jh_, c_th_;
cardlib::CCard c_9h_, c_8h_, c_7h_, c_6h_, c_5h_;
cardlib::CCard c_4h_, c_3h_, c_2h_;
cardlib::CCard c_ad_, c_kd_, c_qd_, c_jd_, c_td_;
cardlib::CCard c_9d_, c_8d_, c_7d_, c_6d_, c_5d_;
cardlib::CCard c_4d_, c_3d_, c_2d_;
cardlib::CCard c_ac_, c_kc_, c_qc_, c_jc_, c_tc_;
cardlib::CCard c_9c_, c_8c_, c_7c_, c_6c_, c_5c_;
cardlib::CCard c_4c_, c_3c_, c_2c_;
cardlib::CCard c_as_, c_ks_, c_qs_, c_js_, c_ts_;
cardlib::CCard c_9s_, c_8s_, c_7s_, c_6s_, c_5s_;
cardlib::CCard c_4s_, c_3s_, c_2s_;
}; // class THandNameUtilsTest
} // namespace handtest
#endif // BITMASKGEN_TESTS_HAND_NAME_UTILS_TEST_1_H_
|
/**
* This code is released under the
* Apache License Version 2.0 http://www.apache.org/licenses/.
*
* (c) Daniel Lemire, http://lemire.me/en/
*/
#ifndef SIMDCompressionAndIntersection_CODECS_H_
#define SIMDCompressionAndIntersection_CODECS_H_
#include "common.h"
#include "util.h"
#include "bitpackinghelpers.h"
namespace SIMDCompressionLib {
using namespace std;
class NotEnoughStorage: public std::runtime_error {
public:
size_t required;// number of 32-bit symbols required
NotEnoughStorage(const size_t req) :
runtime_error(""), required(req) {
}
};
class IntegerCODEC {
public:
/**
* You specify input and input length, as well as
* output and output length. nvalue gets modified to
* reflect how much was used. If the new value of
* nvalue is more than the original value, we can
* consider this a buffer overrun.
*
* You are responsible for allocating the memory (length
* for *in and nvalue for *out).
*/
virtual void encodeArray(uint32_t *in, const size_t length,
uint32_t *out, size_t &nvalue) = 0;
/**
* Usage is similar to encodeArray except that it returns a pointer
* incremented from in. In theory it should be in+length. If the
* returned pointer is less than in+length, then this generally means
* that the decompression is not finished (some scheme compress
* the bulk of the data one way, and they then they compress remaining
* integers using another scheme).
*
* As with encodeArray, you need to have length elements allocated
* for *in and at least nvalue elements allocated for out. The value
* of the variable nvalue gets updated with the number actually used
* (if nvalue exceeds the original value, there might be a buffer
* overrun).
*/
virtual const uint32_t *decodeArray(const uint32_t *in,
const size_t length, uint32_t *out, size_t &nvalue) = 0;
virtual ~IntegerCODEC() {
}
/**
* Will compress the content of a vector into
* another vector.
*
* This is offered for convenience. It might be slow.
*/
virtual vector<uint32_t> compress(vector<uint32_t> &data) {
vector <uint32_t> compresseddata(data.size() * 2 + 1024);// allocate plenty of memory
size_t memavailable = compresseddata.size();
encodeArray(data.data(), data.size(), compresseddata.data(), memavailable);
compresseddata.resize(memavailable);
return compresseddata;
}
/**
* Will uncompress the content of a vector into
* another vector. Some CODECs know exactly how much data to uncompress,
* others need to uncompress it all to know how data there is to uncompress...
* So it useful to have a hint (expected_uncompressed_size) that tells how
* much data there will be to uncompress. Otherwise, the code will
* try to guess, but the result is uncertain and inefficient. You really
* ought to keep track of how many symbols you had compressed.
*
* For convenience. Might be slow.
*/
virtual vector<uint32_t> uncompress(
vector<uint32_t> &compresseddata,
size_t expected_uncompressed_size = 0) {
vector <uint32_t> data(expected_uncompressed_size);// allocate plenty of memory
size_t memavailable = data.size();
try {
decodeArray(compresseddata.data(), compresseddata.size(), data.data(),
memavailable);
} catch (NotEnoughStorage &nes) {
data.resize(nes.required + 1024);
decodeArray(compresseddata.data(), compresseddata.size(), data.data(),
memavailable);
}
data.resize(memavailable);
return data;
}
virtual string name() const = 0;
};
/******************
* This just copies the data, no compression.
*/
class JustCopy: public IntegerCODEC {
public:
void encodeArray(uint32_t *in, const size_t length, uint32_t *out,
size_t &nvalue) {
memcpy(out, in, sizeof(uint32_t) * length);
nvalue = length;
}
// like encodeArray, but we don't actually copy
void fakeencodeArray(const uint32_t * /*in*/, const size_t length,
size_t &nvalue) {
nvalue = length;
}
const uint32_t *decodeArray(const uint32_t *in, const size_t length,
uint32_t *out, size_t &nvalue) {
memcpy(out, in, sizeof(uint32_t) * length);
nvalue = length;
return in + length;
}
string name() const {
return "JustCopy";
}
};
} // namespace SIMDCompressionLib
#endif /* SIMDCompressionAndIntersection_CODECS_H_ */
|
/*=========================================================================
*
* Copyright Insight Software Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0.txt
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*=========================================================================*/
#ifndef __itkBlobSpatialObject_h
#define __itkBlobSpatialObject_h
#include <list>
#include "itkPointBasedSpatialObject.h"
namespace itk
{
/**
* \class BlobSpatialObject
* \brief Spatial object representing a potentially amorphous object.
*
* The BlobSpatialObject is a discretized representation of a ``blob'',
* which can be taken to be an arbitrary, possibly amorphous shape.
* The representation is a list of the points (voxel centers) contained
* in the object. This can be thought of as an alternate way to
* represent a binary image.
*
* \sa SpatialObjectPoint
* \ingroup ITKSpatialObjects
*
* \wiki
* \wikiexample{SpatialObjects/BlobSpatialObject,Blob}
* \endwiki
*/
template< unsigned int TDimension = 3 >
class BlobSpatialObject:
public PointBasedSpatialObject< TDimension >
{
public:
typedef BlobSpatialObject Self;
typedef PointBasedSpatialObject< TDimension > Superclass;
typedef SmartPointer< Self > Pointer;
typedef SmartPointer< const Self > ConstPointer;
typedef double ScalarType;
typedef SpatialObjectPoint< TDimension > BlobPointType;
typedef std::vector< BlobPointType > PointListType;
typedef typename Superclass::PointType PointType;
typedef typename Superclass::SpatialObjectPointType SpatialObjectPointType;
typedef typename Superclass::TransformType TransformType;
typedef typename Superclass::BoundingBoxType BoundingBoxType;
typedef VectorContainer< IdentifierType, PointType > PointContainerType;
typedef SmartPointer< PointContainerType > PointContainerPointer;
/** Method for creation through the object factory. */
itkNewMacro(Self);
/** Method for creation through the object factory. */
itkTypeMacro(BlobSpatialObject, SpatialObject);
/** Returns a reference to the list of the Blob points. */
PointListType & GetPoints(void);
/** Returns a reference to the list of the Blob points. */
const PointListType & GetPoints(void) const;
/** Set the list of Blob points. */
void SetPoints(PointListType & newPoints);
/** Return a point in the list given the index */
const SpatialObjectPointType * GetPoint(IdentifierType id) const
{
return &( m_Points[id] );
}
/** Return a point in the list given the index */
SpatialObjectPointType * GetPoint(IdentifierType id) { return &( m_Points[id] ); }
/** Return the number of points in the list */
SizeValueType GetNumberOfPoints(void) const { return m_Points.size(); }
/** Returns true if the Blob is evaluable at the requested point,
* false otherwise. */
bool IsEvaluableAt(const PointType & point,
unsigned int depth = 0, char *name = ITK_NULLPTR) const;
/** Returns the value of the Blob at that point.
* Currently this function returns a binary value,
* but it might want to return a degree of membership
* in case of fuzzy Blobs. */
bool ValueAt(const PointType & point, double & value,
unsigned int depth = 0, char *name = ITK_NULLPTR) const;
/** Returns true if the point is inside the Blob, false otherwise. */
bool IsInside(const PointType & point,
unsigned int depth, char *name) const;
/** Test whether a point is inside or outside the object
* For computational speed purposes, it is faster if the method does not
* check the name of the class and the current depth */
bool IsInside(const PointType & point) const;
/** Compute the boundaries of the Blob. */
bool ComputeLocalBoundingBox() const;
protected:
BlobSpatialObject(const Self &); //purposely not implemented
void operator=(const Self &); //purposely not implemented
PointListType m_Points;
BlobSpatialObject();
virtual ~BlobSpatialObject();
/** Method to print the object. */
virtual void PrintSelf(std::ostream & os, Indent indent) const;
};
} // end namespace itk
#ifndef ITK_MANUAL_INSTANTIATION
#include "itkBlobSpatialObject.hxx"
#endif
#endif // __itkBlobSpatialObject_h
|
//
// IFAEmailManager.h
// Gusty
//
// Created by Marcelo Schroeder on 16/02/12.
// Copyright (c) 2012 InfoAccent Pty Limited. 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.
//
#import <MessageUI/MessageUI.h>
@interface IFAEmailManager : NSObject <MFMailComposeViewControllerDelegate>
-(id)initWithParentViewController:(UIViewController*)a_parentViewController;
-(id)initWithParentViewController:(UIViewController*)a_parentViewController completionBlock:(void (^)(void))a_completionBlock;
-(void)composeEmailWithSubject:(NSString *)a_subject recipient:(NSString *)a_recipient body:(NSString*)a_body;
-(void)composeEmailWithSubject:(NSString *)a_subject recipient:(NSString *)a_recipient body:(NSString *)a_body
attachmentUrl:(NSURL *)a_attachmentUrl attachmentMimeType:(NSString*)a_attachmentMimeType;
@end
|
/*
Copyright (c) 2011, Siemens Corporate Research a Division of Siemens Corporation
All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#ifndef SOXIPCLIPPLANEELEMENT_H
#define SOXIPCLIPPLANEELEMENT_H
#include <xip/inventor/core/xipivcore.h>
#include <Inventor/SbLinear.h>
#include <Inventor/elements/SoAccumulatedElement.h>
#include <Inventor/SbPList.h>
//////////////////////////////////////////////////////////////////////////////
//
// Class: SoXipClipPlaneElement
//
// Element that stores the current set of clipping planes, specified
// as SbPlanes.
//
// When a plane is added, this element gets the current model matrix
// from the state and stores it in the instance. This allows the
// get() method to return the clip plane in object space (the plane
// as originally defined) or world space (after being transformed by
// the model matrix).
//
//////////////////////////////////////////////////////////////////////////////
class XIPIVCORE_API SoXipClipPlaneElement : public SoAccumulatedElement {
SO_ELEMENT_HEADER(SoXipClipPlaneElement);
public:
// Initializes element
virtual void init(SoState *state);
// Adds a clip plane to the current set in the state
static void add(SoState *state, SoNode *node,
const SbPlane &plane);
// Overrides push() method to copy values from next instance in the stack
virtual void push(SoState *state);
// Overrides pop() method to free up planes that were added
virtual void pop(SoState *state, const SoElement *prevTopElement);
// Returns the top (current) instance of the element in the state
static const SoXipClipPlaneElement * getInstance(SoState *state);
// Returns the number of planes in an instance
int getNum() const;
// Returns the indexed plane an element as an SbPlane. The plane
// can be returned in object or world space.
const SbPlane & get(int index, SbBool inWorldSpace = TRUE) const;
// Prints element (for debugging)
virtual void print(FILE *fp) const;
public:
// Initializes the SoXipClipPlaneElement class
static void initClass();
protected:
SbPList planes; // List of plane structures
int startIndex; // Index of 1st plane created
// in this instance
// Adds the clipping plane to an instance. Takes the new plane and
// the current model matrix
virtual void addToElt(const SbPlane &plane,
const SbMatrix &modelMatrix);
virtual ~SoXipClipPlaneElement();
};
#endif // SOXIPCLIPPLANEELEMENT_H
|
/* Copyright 2018 Google LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
#ifndef TENSORFLOW_DATA_VALIDATION_ANOMALIES_DIFF_UTIL_H_
#define TENSORFLOW_DATA_VALIDATION_ANOMALIES_DIFF_UTIL_H_
#include <vector>
#include "absl/strings/string_view.h"
#include "tensorflow_metadata/proto/v0/anomalies.pb.h"
namespace tensorflow {
namespace data_validation {
// The schema diff computation functionality is currently not supported.
// Tracked in https://github.com/tensorflow/data-validation/issues/39
std::vector<tensorflow::metadata::v0::DiffRegion> ComputeDiff(
const std::vector<absl::string_view>& a_lines,
const std::vector<absl::string_view>& b_lines);
} // namespace data_validation
} // namespace tensorflow
#endif // TENSORFLOW_DATA_VALIDATION_ANOMALIES_DIFF_UTIL_H_
|
// Copyright 2021 The XLS Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef XLS_DSLX_ERROR_PRINTER_H_
#define XLS_DSLX_ERROR_PRINTER_H_
#include <ostream>
#include "absl/status/statusor.h"
#include "absl/strings/string_view.h"
#include "absl/types/optional.h"
#include "xls/dslx/pos.h"
namespace xls::dslx {
// Prints pretty message to output for a error with a position.
//
// ANSI color escapes are used when stderr appears to be a tty.
//
// Errors:
// InvalidArgumentError: if the error_context_line_count is not odd (only odd
// values can be symmetrical around the erroneous line).
// A filesystem error if the error_filename cannot be opened to retrieve lines
// from (for printing).
absl::Status PrintPositionalError(
const Span& error_span, absl::string_view error_message, std::ostream& os,
std::function<absl::StatusOr<std::string>(absl::string_view)>
get_file_contents = nullptr,
absl::optional<bool> color = absl::nullopt,
int64_t error_context_line_count = 5);
} // namespace xls::dslx
#endif // XLS_DSLX_ERROR_PRINTER_H_
|
/*
* Copyright (C) 2015 Olmo Gallegos Hernández.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#import <Foundation/Foundation.h>
#import "MainView.h"
#import "FoodRepository.h"
#import "FoodItem.h"
#import "MainPresenter.h"
@protocol MainView;
@interface MainPresenterImpl : NSObject< MainPresenter >
@end
|
/* This file was generated by upbc (the upb compiler) from the input
* file:
*
* envoy/service/route/v3/srds.proto
*
* Do not edit -- your changes will be discarded when the file is
* regenerated. */
#ifndef ENVOY_SERVICE_ROUTE_V3_SRDS_PROTO_UPB_H_
#define ENVOY_SERVICE_ROUTE_V3_SRDS_PROTO_UPB_H_
#include "upb/msg.h"
#include "upb/decode.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
#ifdef __cplusplus
extern "C" {
#endif
struct envoy_service_route_v3_SrdsDummy;
typedef struct envoy_service_route_v3_SrdsDummy envoy_service_route_v3_SrdsDummy;
extern const upb_msglayout envoy_service_route_v3_SrdsDummy_msginit;
/* envoy.service.route.v3.SrdsDummy */
UPB_INLINE envoy_service_route_v3_SrdsDummy *envoy_service_route_v3_SrdsDummy_new(upb_arena *arena) {
return (envoy_service_route_v3_SrdsDummy *)_upb_msg_new(&envoy_service_route_v3_SrdsDummy_msginit, arena);
}
UPB_INLINE envoy_service_route_v3_SrdsDummy *envoy_service_route_v3_SrdsDummy_parse(const char *buf, size_t size,
upb_arena *arena) {
envoy_service_route_v3_SrdsDummy *ret = envoy_service_route_v3_SrdsDummy_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_service_route_v3_SrdsDummy_msginit, arena)) ? ret : NULL;
}
UPB_INLINE char *envoy_service_route_v3_SrdsDummy_serialize(const envoy_service_route_v3_SrdsDummy *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_service_route_v3_SrdsDummy_msginit, arena, len);
}
#ifdef __cplusplus
} /* extern "C" */
#endif
#include "upb/port_undef.inc"
#endif /* ENVOY_SERVICE_ROUTE_V3_SRDS_PROTO_UPB_H_ */
|
#ifndef _PropertySet_h_
#define _PropertySet_h_
/* -------------------------------------------------------------------------- *
* OpenSim: PropertySet.h *
* -------------------------------------------------------------------------- *
* The OpenSim API is a toolkit for musculoskeletal modeling and simulation. *
* See http://opensim.stanford.edu and the NOTICE file for more information. *
* OpenSim is developed at Stanford University and supported by the US *
* National Institutes of Health (U54 GM072970, R24 HD065690) and by DARPA *
* through the Warrior Web program. *
* *
* Copyright (c) 2005-2017 Stanford University and the Authors *
* Author(s): Frank C. Anderson, Ajay Seth *
* *
* 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. *
* -------------------------------------------------------------------------- */
/* Note: This code was originally developed by Realistic Dynamics Inc.
* Author: Frank C. Anderson, Ajay Seth
*/
#ifdef _WIN32
#pragma warning( disable : 4251 )
#endif
// INCLUDES
#include "osimCommonDLL.h"
#include "ArrayPtrs.h"
//#include "Property_Deprecated.h"
#include "PropertyDblVec.h"
#ifdef SWIG
#ifdef OSIMCOMMON_API
#undef OSIMCOMMON_API
#define OSIMCOMMON_API
#endif
#endif
#ifndef SWIG
#ifdef _WIN32
template class OSIMCOMMON_API OpenSim::ArrayPtrs<OpenSim::Property_Deprecated>;
#endif
#endif
namespace OpenSim {
class Property_Deprecated;
// convenient abbreviations
typedef PropertyDblVec_<2> PropertyDblVec2;
typedef PropertyDblVec_<3> PropertyDblVec3;
typedef PropertyDblVec_<4> PropertyDblVec4;
typedef PropertyDblVec_<5> PropertyDblVec5;
typedef PropertyDblVec_<6> PropertyDblVec6;
//=============================================================================
//=============================================================================
/**
* A property set is simply a set of properties. It provides methods for
* adding, removing, and retrieving properties from itself.
*
* @version 1.0
* @author Frank C. Anderson
* @see Property
*/
class OSIMCOMMON_API PropertySet
{
//=============================================================================
// DATA
//=============================================================================
public:
/** Set of properties. */
ArrayPtrs<Property_Deprecated> _array;
//=============================================================================
// METHODS
//=============================================================================
//--------------------------------------------------------------------------
// CONSTRUCTION
//--------------------------------------------------------------------------
public:
PropertySet();
PropertySet(const PropertySet &aSet);
PropertySet& operator=(const PropertySet& aSet);
virtual ~PropertySet() { _array.setSize(0); };
//--------------------------------------------------------------------------
// OPERATORS
//--------------------------------------------------------------------------
#ifndef SWIG
friend std::ostream& operator<<(std::ostream &aOut,
const PropertySet &aSet) {
aOut << "\nProperty Set:\n";
for(int i=0;i<aSet.getSize();i++) aOut << *aSet.get(i) << "\n";
return(aOut);
}
#endif
//--------------------------------------------------------------------------
// ACCESS
//--------------------------------------------------------------------------
public:
// Empty?
bool isEmpty() const;
// Number of properties
int getSize() const;
// Get
virtual Property_Deprecated* get(int i);
#ifndef SWIG
virtual const Property_Deprecated* get(int i) const;
#endif
virtual Property_Deprecated* get(const std::string &aName);
#ifndef SWIG
virtual const Property_Deprecated* get(const std::string &aName) const;
#endif
virtual const Property_Deprecated* contains(const std::string& aName) const;
#ifndef SWIG
virtual Property_Deprecated* contains(const std::string& aName);
#endif
// Append
virtual void append(Property_Deprecated *aProperty);
virtual void append(Property_Deprecated *aProperty, const std::string& aName);
// Remove
virtual void remove(const std::string &aName);
// Clear
virtual void clear();
//=============================================================================
}; // END of class PropertySet
}; //namespace
//=============================================================================
//=============================================================================
#endif //__PropertySet_h__
|
#ifndef __SOCKET_H__
#define __SOCKET_H__
void SocketInterfaceInit();
void DoSocketInterface();
extern int SocketInterfacePort;
extern int CyclesPerVideoUpdate;
extern unsigned GameCyclesPerTransition;
extern unsigned long LastPausedCycle;
extern char WarpSpeed;
#endif // __SOCKET_H__
|
/**
* @file nz32_sc151.c
* @brief board ID for the Modtronix NZ32-SC151
*
* DAPLink Interface Firmware
* Copyright (c) 2009-2017, ARM Limited, All Rights Reserved
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
const char *board_id = "6660";
// URL_NAME and DRIVE_NAME must be 11 characters excluding
// the null terminated character
// Note - 4 byte alignemnt required as workaround for ARMCC compiler bug with weak references
__attribute__((aligned(4)))
const char daplink_url_name[11] = "NZ32-SC151 ";
__attribute__((aligned(4)))
const char daplink_drive_name[11] = "NZ32-SC151 ";
__attribute__((aligned(4)))
const char *const daplink_target_url = "http://www.modtronix/nz32-sc151";
|
//
// advertisingViewController.h
// FollowMe
//
// Created by scjy on 16/3/21.
// Copyright © 2016年 SCJY. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface advertisingViewController : UIViewController
@property (nonatomic, retain) NSString *html;
@end
|
#if defined(GDK_PIXBUF_DISABLE_SINGLE_INCLUDES) && !defined (GDK_PIXBUF_H_INSIDE) && !defined (GDK_PIXBUF_COMPILATION)
#error "Only <gdk-pixbuf/gdk-pixbuf.h> can be included directly."
#endif
#ifndef GDK_PIXBUF_FEATURES_H
#define GDK_PIXBUF_FEATURES_H 1
#include <glib.h>
/**
* SECTION:initialization_versions
* @Short_description:
Library version numbers.
* @Title: Initialization and Versions
*
* These macros and variables let you check the version of &gdk-pixbuf;
* you're linking against.
*/
/**
* GDK_PIXBUF_MAJOR:
*
* Major version of &gdk-pixbuf; library, that is the first "0" in
* "0.8.0" for example.
*/
/**
* GDK_PIXBUF_MINOR:
*
* Minor version of &gdk-pixbuf; library, that is the "8" in
* "0.8.0" for example.
*/
/**
* GDK_PIXBUF_MICRO:
*
* Micro version of &gdk-pixbuf; library, that is the last "0" in
* "0.8.0" for example.
*/
/**
* GDK_PIXBUF_VERSION:
*
* Contains the full version of the &gdk-pixbuf; header as a string.
* This is the version being compiled against; contrast with
* #gdk_pixbuf_version.
*/
#define GDK_PIXBUF_MAJOR (2)
#define GDK_PIXBUF_MINOR (26)
#define GDK_PIXBUF_MICRO (5)
#define GDK_PIXBUF_VERSION "2.26.5"
/* We prefix variable declarations so they can
* properly get exported/imported from Windows DLLs.
*/
#ifdef G_PLATFORM_WIN32
# ifdef GDK_PIXBUF_STATIC_COMPILATION
# define GDK_PIXBUF_VAR extern
# else /* !GDK_PIXBUF_STATIC_COMPILATION */
# ifdef GDK_PIXBUF_C_COMPILATION
# ifdef DLL_EXPORT
# define GDK_PIXBUF_VAR __declspec(dllexport)
# else /* !DLL_EXPORT */
# define GDK_PIXBUF_VAR extern
# endif /* !DLL_EXPORT */
# else /* !GDK_PIXBUF_C_COMPILATION */
# define GDK_PIXBUF_VAR extern __declspec(dllimport)
# endif /* !GDK_PIXBUF_C_COMPILATION */
# endif /* !GDK_PIXBUF_STATIC_COMPILATION */
#else /* !G_PLATFORM_WIN32 */
# define GDK_PIXBUF_VAR extern
#endif /* !G_PLATFORM_WIN32 */
/**
* gdk_pixbuf_major_version:
*
* The major version number of the &gdk-pixbuf; library. (e.g. in
* &gdk-pixbuf; version 1.2.5 this is 1.)
*
*
* This variable is in the library, so represents the
* &gdk-pixbuf; library you have linked against. Contrast with the
* #GDK_PIXBUF_MAJOR macro, which represents the major version of the
* &gdk-pixbuf; headers you have included.
*/
/**
* gdk_pixbuf_minor_version:
*
* The minor version number of the &gdk-pixbuf; library. (e.g. in
* &gdk-pixbuf; version 1.2.5 this is 2.)
*
*
* This variable is in the library, so represents the
* &gdk-pixbuf; library you have linked against. Contrast with the
* #GDK_PIXBUF_MINOR macro, which represents the minor version of the
* &gdk-pixbuf; headers you have included.
*/
/**
* gdk_pixbuf_micro_version:
*
* The micro version number of the &gdk-pixbuf; library. (e.g. in
* &gdk-pixbuf; version 1.2.5 this is 5.)
*
*
* This variable is in the library, so represents the
* &gdk-pixbuf; library you have linked against. Contrast with the
* #GDK_PIXBUF_MICRO macro, which represents the micro version of the
* &gdk-pixbuf; headers you have included.
*/
/**
* gdk_pixbuf_version:
*
* Contains the full version of the &gdk-pixbuf; library as a string.
* This is the version currently in use by a running program.
*/
GDK_PIXBUF_VAR const guint gdk_pixbuf_major_version;
GDK_PIXBUF_VAR const guint gdk_pixbuf_minor_version;
GDK_PIXBUF_VAR const guint gdk_pixbuf_micro_version;
GDK_PIXBUF_VAR const char *gdk_pixbuf_version;
#endif /* GDK_PIXBUF_FEATURES_H */
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <unistd.h>
int main(int argc, char** argv) {
//
// Exclusions: dump of these files (/proc/XXX/mem, ...) is forbidden
//
const char *exclusions[] = {"mem","fd","kcore"};
if (argc != 2) {
printf("Usage: %s [/proc]/XX/fileToDump\n", argv[0]);
printf("Note: Only files under /proc can be dumped\n");
printf("Sample: to dump /proc/net/ip_conntrack, use %s net/ip_conntrack - do not provide /proc at the beginning\n", argv[0]);
exit(-5);
} else {
char *fname = malloc(7 + strlen(argv[1]));
strcat(fname, "/proc/");
strcat(fname, argv[1]);
if (NULL != strstr(fname, "..")) {
printf(".. is forbidden (%s)\n", argv[1]);
exit(-5);
}
for(int i = 0; i < sizeof(exclusions) / sizeof(exclusions[0]); i++) {
// Path ends with by the current exclusion (/proc/{pid}/mem)
int diff = strlen(fname)-strlen(exclusions[i]);
if ((diff >= 0) && (0 == strcmp(&fname[diff], exclusions[i]))) {
printf("Dump of /proc/%s is forbidden\n", argv[1]);
exit(-4);
}
// The current exclusion is a directory in the path (/proc/{pid}/fd/0)
char *exclusionPattern = malloc(3 + strlen(exclusions[i]));
strcat(exclusionPattern, "/");
strcat(exclusionPattern, exclusions[i]);
strcat(exclusionPattern, "/");
if (NULL != strstr(fname, exclusionPattern)) {
printf("Dump of /proc/%s is forbidden\n", argv[1]);
exit(-3);
}
}
// Elevate our privileges
setuid(0);
FILE *fp;
fp = fopen(fname, "r");
char buf[8192];
if (NULL != fp) {
int nread = 0;
while ((nread = fread(buf, 1, sizeof buf, fp)) > 0) {
fwrite(buf, 1, nread, stdout);
}
if (ferror(fp)) {
exit(-1);
}
fclose(fp);
exit(0);
} else {
exit(-2);
}
}
}
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <limits.h>
#include "uart.h"
#include "boot.h"
#include "download.h"
int main(int argc, char *argv[])
{
long baud;
printf("cr_bootloaer \r\n");
printf("ver : 1.0 \r\n");
if( argc < 4 )
{
fprintf( stderr, "Usage: cr_downloader <port> <baud> <binary image name> [<0|1 to send Go command to new flashed app>]\n" );
exit( 1 );
}
errno = 0;
baud = strtol( argv[ 2 ], NULL, 10 );
if( ( errno == ERANGE && ( baud == LONG_MAX || baud == LONG_MIN ) ) || ( errno != 0 && baud == 0 ) || ( baud < 0 ) )
{
fprintf( stderr, "Invalid baud '%s'\n", argv[ 2 ] );
exit( 1 );
}
download(argc, argv);
return 0;
}
|
/*
* Copyright 2013-2019 Real Logic Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef _CODEC_BENCH_HPP
#define _CODEC_BENCH_HPP
// Interface for encoding and decoding and also benchmark harness
template <typename Derived>
class CodecBench
{
public:
int encode_buffer(char *buffer, const int bufferLength)
{
return static_cast<Derived *>(this)->encode(buffer, bufferLength);
};
int decode_buffer(const char *buffer, const int bufferLength)
{
return static_cast<Derived *>(this)->decode(buffer, bufferLength);
};
/*
* Benchmarks
*/
/*
* Run 1 encoding
*/
void runEncode(char *buffer, const int bufferLength)
{
encode_buffer(buffer, bufferLength);
};
/*
* Run 1 decoding
*/
void runDecode(const char *buffer, const int bufferLength)
{
decode_buffer(buffer, bufferLength);
};
/*
* Run 1 encoding + decoding
*/
void runEncodeAndDecode(char *buffer, const int bufferLength)
{
encode_buffer(buffer, bufferLength);
decode_buffer(buffer, bufferLength);
};
/*
* Run n encodings
*/
void runEncode(char *buffer, const int n, const int bufferLength)
{
char *ptr = buffer;
for (int i = 0; i < n; i++)
{
ptr += encode_buffer(ptr, bufferLength);
}
};
/*
* Run n decodings
*/
void runDecode(const char *buffer, const int n, const int bufferLength)
{
const char *ptr = buffer;
for (int i = 0; i < n; i++)
{
ptr += decode_buffer(ptr, bufferLength);
}
};
/*
* Run n encodings followed by n decodings
*/
void runEncodeAndDecode(char *buffer, const int n, const int bufferLength)
{
char *ptr = buffer;
for (int i = 0; i < n; i++)
{
ptr += encode_buffer(ptr, bufferLength);
}
ptr = buffer;
for (int i = 0; i < n; i++)
{
ptr += decode_buffer(ptr, bufferLength);
}
};
};
#endif /* _CODEC_BENCH_HPP */
|
#ifndef ECLIPSEMR_FS_IWRITER_H_
#define ECLIPSEMR_FS_IWRITER_H_
#include <memory>
#include <thread>
#include <string>
#include <map>
#include <set>
#include <unordered_map>
#include <vector>
#include <mutex>
#include <list>
#include <fstream>
#include <boost/asio.hpp>
#include "iwriter_interface.hh"
#include "../../common/context_singleton.hh"
#include "../../messages/message.hh"
#include "../../messages/reply.hh"
#include "../fs/directorymr.hh"
using std::list;
using std::vector;
using std::multimap;
using std::unordered_map;
using std::string;
using boost::asio::ip::tcp;
namespace eclipse {
class IWriter: public IWriter_interface {
public:
IWriter();
IWriter(const uint32_t job_id, const uint32_t map_id);
~IWriter();
void add_key_value(const string &key, const string &value) override;
void set_job_id(const uint32_t job_id) override;
void set_map_id(const uint32_t map_id) override;
bool is_write_finish() override;
void finalize() override;
private:
static void run(IWriter *obj);
void seek_writable_block();
void async_flush(const uint32_t index);
void flush_buffer();
void add_block(const uint32_t index);
int get_block_size(const uint32_t index);
void set_block_size(const uint32_t index, const uint32_t size);
int get_index(const string &key);
void write_record(const string &record);
void buffer_record(const string &record);
void set_file(const uint32_t index);
void write_block(std::shared_ptr<multimap<string, string>> block,
const uint32_t index);
void set_writing_file(const uint32_t index);
void get_new_path(string &path);
DirectoryMR directory_;
std::unique_ptr<std::thread> writer_thread_;
uint32_t job_id_;
uint32_t map_id_;
uint32_t reduce_slot_;
uint32_t iblock_size_;
string scratch_path_;
bool is_write_start_;
bool is_write_finish_;
bool copy_phase_done_;
uint32_t index_counter_;
uint32_t writing_index_;
uint32_t write_buf_size_;
uint32_t written_bytes_;
char *write_buf_;
char *write_pos_;
vector<list<std::shared_ptr<multimap<string, string>>>> kmv_blocks_;
vector<list<bool>> is_write_ready_;
vector<int> block_size_;
vector<int> write_count_;
unordered_map<string, int> key_index_; // index of key
std::ofstream file_;
std::mutex mutex;
std::mutex mutex_start_thread;
std::mutex mutex_end_thread;
std::set<string> deb;
};
} // namespace eclipse
#endif // ECLIPSEMR_FS_IWRITER_H_
|
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <emscripten.h>
#include <emscripten/vr.h>
static int gDevCount = -1;
static int gPosDev = -1;
static int gHmdDev = -1;
void
report_result(int result)
{
emscripten_cancel_main_loop();
if (result == 0) {
printf("Test successful!\n");
} else {
printf("Test failed!\n");
}
#ifdef REPORT_RESULT
REPORT_RESULT();
#endif
exit(result);
}
static void
mainloop()
{
static int loopcount = 0;
if (!emscripten_vr_ready()) {
printf("VR not ready\n");
return;
}
if (gDevCount == -1) {
gDevCount = emscripten_vr_count_devices();
if (gDevCount == 0) {
printf("No VR devices found!\n");
report_result(0);
return;
}
int hwid = -1;
for (int i = 0; i < gDevCount; ++i) {
WebVRDeviceId devid = emscripten_vr_get_device_id(i);
if (hwid == -1 || hwid == emscripten_vr_get_device_hwid(devid)) {
hwid = emscripten_vr_get_device_hwid(devid);
if (emscripten_vr_get_device_type(devid) == WebVRHMDDevice) {
gHmdDev = devid;
} else if (emscripten_vr_get_device_type(devid) == WebVRPositionSensorDevice) {
gPosDev = devid;
}
}
}
if (gHmdDev == -1 || gPosDev == -1) {
printf("Couln't find both a HMD and position device\n");
// this is a failure because it's weird
report_result(1);
return;
}
WebVRFieldOfView leftFov, rightFov;
emscripten_vr_hmd_get_current_fov(gHmdDev, WebVREyeLeft, &leftFov);
emscripten_vr_hmd_get_current_fov(gHmdDev, WebVREyeRight, &rightFov);
printf("Left FOV: %f %f %f %f\n", leftFov.upDegrees, leftFov.downDegrees, leftFov.rightDegrees, leftFov.leftDegrees);
printf("Right FOV: %f %f %f %f\n", rightFov.upDegrees, rightFov.downDegrees, rightFov.rightDegrees, rightFov.leftDegrees);
}
WebVRPositionState state;
emscripten_vr_sensor_get_state(gPosDev, 0.0, &state);
printf("State: orientation: [%f %f %f %f] position: [%f %f %f]\n",
state.orientation.x, state.orientation.y, state.orientation.z, state.orientation.w,
state.position.x, state.position.y, state.position.z);
if (loopcount++ > 10) {
report_result(0);
}
}
int
main(int argc, char **argv)
{
emscripten_vr_init();
/* 2fps -- no rAF */
emscripten_set_main_loop(mainloop, 2, 0);
}
|
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* 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 <string>
#include <vector>
#include <folly/Expected.h>
#include <folly/Range.h>
namespace folly {
/*
* json_pointer
*
* As described in RFC 6901 "JSON Pointer".
*
* Implements parsing. Traversal using the pointer over data structures must be
* implemented separately.
*/
class json_pointer {
public:
enum class parse_error {
invalid_first_character,
invalid_escape_sequence,
};
class parse_exception : public std::runtime_error {
using std::runtime_error::runtime_error;
};
json_pointer() = default;
~json_pointer() = default;
/*
* Parse string into vector of unescaped tokens.
* Non-throwing and throwing versions.
*/
static Expected<json_pointer, parse_error> try_parse(StringPiece const str);
static json_pointer parse(StringPiece const str);
/*
* Return true if this pointer is proper to prefix to another pointer
*/
bool is_prefix_of(json_pointer const& other) const noexcept;
/*
* Get access to the parsed tokens for applications that want to traverse
* the pointer.
*/
std::vector<std::string> const& tokens() const;
friend bool operator==(json_pointer const& lhs, json_pointer const& rhs) {
return lhs.tokens_ == rhs.tokens_;
}
friend bool operator!=(json_pointer const& lhs, json_pointer const& rhs) {
return lhs.tokens_ != rhs.tokens_;
}
private:
explicit json_pointer(std::vector<std::string>) noexcept;
/*
* Unescape the specified escape sequences, returns false if incorrect
*/
static bool unescape(std::string&);
std::vector<std::string> tokens_;
};
} // namespace folly
|
//
// LJTextField.h
// baisibudejie
//
// Created by 吕俊 on 16/2/19.
// Copyright © 2016年 吕俊. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface LJTextField : UITextField
@end
|
#ifndef OPENSIM_SOLVER_H_
#define OPENSIM_SOLVER_H_
/* -------------------------------------------------------------------------- *
* OpenSim: Solver.h *
* -------------------------------------------------------------------------- *
* The OpenSim API is a toolkit for musculoskeletal modeling and simulation. *
* See http://opensim.stanford.edu and the NOTICE file for more information. *
* OpenSim is developed at Stanford University and supported by the US *
* National Institutes of Health (U54 GM072970, R24 HD065690) and by DARPA *
* through the Warrior Web program. *
* *
* Copyright (c) 2005-2017 Stanford University and the Authors *
* Author(s): Ajay Seth *
* *
* 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 <OpenSim/Simulation/osimSimulationDLL.h>
#include "OpenSim/Common/Object.h"
#include "SimTKcommon/internal/ReferencePtr.h"
namespace OpenSim {
class Model;
//=============================================================================
//=============================================================================
/**
* The base (abstract) class for a family of objects responsible for solving
* system equations (statics, dynamic, kinematics, muscle, etc...) given by a
* model for values of interest.
*
* @author Ajay Seth
* @version 1.0
*/
class OSIMSIMULATION_API Solver: public Object {
OpenSim_DECLARE_ABSTRACT_OBJECT(Solver, Object);
//=============================================================================
// METHODS
//=============================================================================
public:
//-------------------------------------------------------------------------
// CONSTRUCTION
//-------------------------------------------------------------------------
virtual ~Solver() {}
explicit Solver(const Model &model) : _modelp(&model) {}
// default copy constructor and copy assignment
const Model& getModel() const {return *_modelp;}
protected:
//=============================================================================
// MEMBER VARIABLES
//=============================================================================
private:
// The model handed to the solver to operate on; just a reference.
SimTK::ReferencePtr<const Model> _modelp;
//=============================================================================
}; // END of class Solver
//=============================================================================
} // namespace
#endif // OPENSIM_SOLVER_H_
|
// Copyright 2014 Shanghai Jiao Tong University
//
// 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.
//
// Authors - Trusted Cloud Group (http://tcloud.sjtu.edu.cn)
#ifndef WORKLIST_H_
#define WORKLIST_H_
#include <set>
using namespace std;
namespace esp {
class Work {
public:
/*
* Destructor
*/
virtual ~Work();
/*
* Determine whether two works are the same
* Implemented by child class
*/
virtual bool equalsTo(Work *other) = 0;
/*
* Print the content of the work
*/
virtual void printContent() = 0;
};
class Worklist {
protected:
/* work set */
set<Work*> works;
/*
* Add new work to list
* @Params
* work: pointer of the new work
*/
void addToWorklist(Work* work);
/*
* Remove finished work from worklist
* @Params
* work: finished work
*/
void removeFromWorklist(Work *work);
/*
* Solve work list
*/
void solveWorklist();
/*
* Get a work from worklist.
* Subclass can override this function in order to
* define a new schedule strategy
*/
virtual Work* selectAWork();
public:
/*
* Constructor
*/
Worklist();
/*
* Destructor
* Implemented by child class
*/
virtual ~Worklist() = 0;
/*
* Define how to finish each work
* @Params
* work: work to be handled
*/
virtual void doEachWork(Work *work) = 0;
/*
* Initialize or reinitialize the worklist
*/
virtual void initWorklist() = 0;
};
} /* namespace esp */
#endif /* WORKLIST_H_ */
|
/*
* Copyright (C) 2019 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Auto-generated file for TCS3472 v0.1.0.
* Generated from peripherals/TCS3472.yaml using Cyanobyte Codegen v0.1.0
* Class for TCS3472
* Color Light-to-Digital Converter with IR Filter
*/
#ifndef _TCS3472_H_
#define _TCS3472_H_
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include "i2c.h"
/*
* Valid values for Setup the device configuration
*/
enum init {
INIT_POWER = 1, // Power
INIT_RGBC = 2 // Color
};
typedef enum init init_t;
int tcs3472_init(char* bus_name);
void tcs3472_terminate();
/**
* Blue light as an int. Divide by ambient light to get scaled number.
*/
int tcs3472_readblue(uint16_t* val);
/**
* This is the ambient amount of detected light.
*/
int tcs3472_readclear(uint16_t* val);
/**
* Enable specific components of the peripheral
*/
int tcs3472_readenable(uint8_t* val);
/**
* Enable specific components of the peripheral
*/
int tcs3472_writeenable(uint8_t* data);/**
* Green light as an int. Divide by ambient light to get scaled number.
*/
int tcs3472_readgreen(uint16_t* val);
/**
* Red light as an int. Divide by ambient light to get scaled number.
*/
int tcs3472_readred(uint16_t* val);
/**
* Enable RGBC and Power
*/
int tcs3472_get_init(uint8_t* val);
/**
* Enable RGBC and Power
*/
int tcs3472_set_init(uint8_t* data);
/**
* Enables features on device
*/
void tcs3472__lifecycle_begin();
#endif
|
/*=========================================================================
*
* Copyright Insight Software Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0.txt
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*=========================================================================*/
#ifndef __itkMalcolmSparseLevelSetImage_h
#define __itkMalcolmSparseLevelSetImage_h
#include "itkImage.h"
#include "itkLevelSetSparseImage.h"
#include "itkLabelObject.h"
#include "itkLabelMap.h"
namespace itk
{
/**
* \class MalcolmSparseLevelSetImage
* \brief Derived class for the shi representation of level-set function
*
* This representation is a "sparse" level-set function, where values could
* only be { -1, 0, +1 } and organized into 1 layer { 0 }.
*
* \tparam VDimension Dimension of the input space
* \ingroup ITKLevelSetsv4
*/
template< unsigned int VDimension >
class MalcolmSparseLevelSetImage :
public LevelSetSparseImage< int8_t, VDimension >
{
public:
typedef MalcolmSparseLevelSetImage Self;
typedef SmartPointer< Self > Pointer;
typedef SmartPointer< const Self > ConstPointer;
typedef LevelSetSparseImage< int8_t, VDimension > Superclass;
/** Method for creation through the object factory. */
itkNewMacro(Self);
/** Run-time type information (and related methods). */
itkTypeMacro(MalcolmSparseLevelSetImage, LevelSetSparseImage);
itkStaticConstMacro ( Dimension, unsigned int, VDimension );
typedef typename Superclass::InputType InputType;
typedef typename Superclass::OutputType OutputType;
typedef typename Superclass::OutputRealType OutputRealType;
typedef typename Superclass::GradientType GradientType;
typedef typename Superclass::HessianType HessianType;
typedef typename Superclass::LevelSetDataType LevelSetDataType;
typedef typename Superclass::LayerIdType LayerIdType;
typedef typename Superclass::LabelObjectType LabelObjectType;
typedef typename Superclass::LabelObjectPointer LabelObjectPointer;
typedef typename Superclass::LabelObjectLengthType LabelObjectLengthType;
typedef typename Superclass::LabelObjectLineType LabelObjectLineType;
typedef typename Superclass::LabelMapType LabelMapType;
typedef typename Superclass::LabelMapPointer LabelMapPointer;
typedef typename Superclass::RegionType RegionType;
typedef typename Superclass::LayerType LayerType;
typedef typename Superclass::LayerIterator LayerIterator;
typedef typename Superclass::LayerConstIterator LayerConstIterator;
typedef typename Superclass::LayerMapType LayerMapType;
typedef typename Superclass::LayerMapIterator LayerMapIterator;
typedef typename Superclass::LayerMapConstIterator LayerMapConstIterator;
/** Returns the value of the level set function at a given location inputPixel */
using Superclass::Evaluate;
virtual OutputType Evaluate( const InputType& inputPixel ) const;
/** Returns the Hessian of the level set function at a given location inputPixel */
virtual HessianType EvaluateHessian( const InputType& inputPixel ) const;
/** Returns the Laplacian of the level set function at a given location inputPixel */
virtual OutputRealType EvaluateLaplacian( const InputType& inputPixel ) const;
/** Returns the MeanCurvature of the level set function at a given location inputPixel */
virtual OutputRealType EvaluateMeanCurvature( const InputType& inputPixel ) const;
virtual void EvaluateHessian( const InputType& inputPixel, LevelSetDataType& data ) const;
virtual void EvaluateLaplacian( const InputType& inputPixel, LevelSetDataType& data ) const;
virtual void EvaluateMeanCurvature( const InputType& inputPixel, LevelSetDataType& data ) const;
static inline LayerIdType MinusOneLayer() { return -1; }
static inline LayerIdType ZeroLayer() { return 0; }
static inline LayerIdType PlusOneLayer() { return 1; }
protected:
MalcolmSparseLevelSetImage();
virtual ~MalcolmSparseLevelSetImage();
/** Initialize the sparse field layers */
virtual void InitializeLayers();
virtual void InitializeInternalLabelList();
private:
MalcolmSparseLevelSetImage( const Self& ); //purposely not implemented
void operator = ( const Self& ); //purposely not implemented
};
}
#ifndef ITK_MANUAL_INSTANTIATION
#include "itkMalcolmSparseLevelSetImage.hxx"
#endif
#endif // __itkMalcolmSparseLevelSetImage_h
|
/**
* 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.
*/
#pragma once
namespace JSC {
enum class IterationStatus {
Continue,
Done
};
} // namespace JSC
|
/*
* Copyright 2018 The Cartographer Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef CARTOGRAPHER_POSE_GRAPH_CONSTRAINT_RELATIVE_POSE_CONSTRAINT_2D_H_
#define CARTOGRAPHER_POSE_GRAPH_CONSTRAINT_RELATIVE_POSE_CONSTRAINT_2D_H_
#include "cartographer/pose_graph/constraint/constraint.h"
#include "cartographer/pose_graph/constraint/cost_function/relative_pose_cost_2d.h"
namespace cartographer {
namespace pose_graph {
class RelativePoseConstraint2D : public Constraint {
public:
RelativePoseConstraint2D(const ConstraintId& id,
const proto::LossFunction& loss_function_proto,
const proto::RelativePose2D& proto);
void AddToSolver(Nodes* nodes, ceres::Problem* problem) const final;
protected:
proto::CostFunction ToCostFunctionProto() const final;
private:
NodeId first_;
NodeId second_;
std::unique_ptr<RelativePoseCost2D> ceres_cost_;
};
} // namespace pose_graph
} // namespace cartographer
#endif // CARTOGRAPHER_POSE_GRAPH_CONSTRAINT_RELATIVE_POSE_CONSTRAINT_2D_H_
|
/*
* Copyright 2017 AVSystem <avsystem@avsystem.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ANJAY_INCLUDE_ANJAY_MODULES_DM_MODULES_H
#define ANJAY_INCLUDE_ANJAY_MODULES_DM_MODULES_H
#include <anjay/dm.h>
#include <anjay_modules/notify.h>
VISIBILITY_PRIVATE_HEADER_BEGIN
typedef void anjay_dm_module_deleter_t(anjay_t *anjay, void *arg);
typedef struct {
/**
* Global overlay of handlers that may replace handlers natively declared
* for all LwM2M Objects.
*
* When modules are installed, upon calling any of the <c>_anjay_dm_*</c>
* callback wrapper functions with the <c>current_module</c> argument set to
* <c>NULL</c>, the following happens:
*
* - The installed modules are searched in such order so that most recently
* installed module is first.
* - The first module in which the appropriate handler field (e.g.
* <c>overlay_handlers.resource_read</c>) is non-<c>NULL</c>, is selected.
* - If no such overlay is installed, the function declared in the LwM2M
* Object is selected, if non-<c>NULL</c>.
* - If a function could be selected, it is called.
* - If no appropriate non-<c>NULL</c> handler was found,
* @ref ANJAY_ERR_METHOD_NOT_ALLOWED is returned.
*
* Functions declared in an overlay handler may call the appropriate
* <c>_anjay_dm_*</c> function (e.g. @ref _anjay_dm_resource_read) with the
* <c>current_module</c> argument set to its own corresponding module
* definition pointer (the same value that was passed as <c>module</c> to
* <c>_anjay_dm_module_install</c>). This will cause the "underlying"
* handler to be called - the above procedure will restart, but skipping all
* the modules from the beginning to <c>current_module</c>, inclusive - so
* the underlying original implementation (or another overlay, if multiple
* are installed) will be called.
*/
anjay_dm_handlers_t overlay_handlers;
/**
* A function to be called every time when Anjay is notified of some data
* model change - this also includes changes made through LwM2M protocol
* itself.
*/
anjay_notify_callback_t *notify_callback;
/**
* A function to be called when the module is uninstalled, that will clean
* up any resources used by it.
*/
anjay_dm_module_deleter_t *deleter;
} anjay_dm_module_t;
/**
* Installs an Anjay module. See the definition of fields in
* @ref anjay_dm_module_t for a detailed explanation of what modules can do.
*
* @param anjay Anjay object to operate on
*
* @param module Pointer to a module definition structure; this pointer is also
* used as a module identifier, so it needs to have at least the
* same lifetime as the module itself, and normally it is a
* singleton with static lifetime
*
* @param arg Opaque pointer that can be later retrieved using
* @ref _anjay_dm_module_get_arg and will also be passed to the
* <c>notify_callback</c> and <c>deleter</c> functions.
*
* @returns 0 for success, or a negative value in case of error.
*/
int _anjay_dm_module_install(anjay_t *anjay,
const anjay_dm_module_t *module,
void *arg);
int _anjay_dm_module_uninstall(anjay_t *anjay, const anjay_dm_module_t *module);
/**
* Returns the <c>arg</c> previously passed to @ref _anjay_dm_module_install
*/
void *_anjay_dm_module_get_arg(anjay_t *anjay, const anjay_dm_module_t *module);
VISIBILITY_PRIVATE_HEADER_END
#endif /* ANJAY_INCLUDE_ANJAY_MODULES_DM_MODULES_H */
|
//
// LCStatusPhoto.h
// 新浪微博
//
// Created by lichao on 15/8/4.
// Copyright (c) 2015年 ___Super___. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "LCPhoto.h"
@interface LCStatusPhoto : UIImageView
@property (nonatomic,strong)LCPhoto *photo;
@end
|
#ifndef NEWAPPCOPYDIALOG_H
#define NEWAPPCOPYDIALOG_H
#include <QDialog>
#include "tplwindow.h"
#include "ui_NewApplicationCopyDialog.h"
#include <vector>
class NewAppCopyDialog : public QDialog
{
Q_OBJECT
public:
NewAppCopyDialog(TplWindow *parent);
~NewAppCopyDialog();
void accept();
QString getAppName();
int getCopyTplIndex();
int getCopyAppIndex();
public slots:
void getAppList(int tplIndex);
private:
Ui::NewApplicationCopy ui;
vector<ClsTpl> tpls;
};
#endif // NEWAPPCOPYDIALOG_H
|
/*
* DO NOT EDIT. THIS FILE IS GENERATED FROM e:/builds/moz2_slave/rel-2.0-xr-w32-bld/build/netwerk/base/public/nsIParentRedirectingChannel.idl
*/
#ifndef __gen_nsIParentRedirectingChannel_h__
#define __gen_nsIParentRedirectingChannel_h__
#ifndef __gen_nsIParentChannel_h__
#include "nsIParentChannel.h"
#endif
/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif
class nsITabParent; /* forward declaration */
class nsIChannel; /* forward declaration */
class nsIAsyncVerifyRedirectCallback; /* forward declaration */
/* starting interface: nsIParentRedirectingChannel */
#define NS_IPARENTREDIRECTINGCHANNEL_IID_STR "cb7edc1c-096f-44de-957c-cb93de1545f6"
#define NS_IPARENTREDIRECTINGCHANNEL_IID \
{0xcb7edc1c, 0x096f, 0x44de, \
{ 0x95, 0x7c, 0xcb, 0x93, 0xde, 0x15, 0x45, 0xf6 }}
/**
* Implemented by chrome side of IPC protocols that support redirect responses.
*/
class NS_NO_VTABLE NS_SCRIPTABLE nsIParentRedirectingChannel : public nsIParentChannel {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IPARENTREDIRECTINGCHANNEL_IID)
/**
* Called when the channel got a response that redirects it to a different
* URI. The implementation is responsible for calling the redirect observers
* on the child process and provide the decision result to the callback.
*
* @param newChannelId
* id of the redirect channel obtained from nsIRedirectChannelRegistrar.
* @param newURI
* the URI we redirect to
* @param callback
* redirect result callback, usage is compatible with how
* nsIChannelEventSink defines it
*/
/* void startRedirect (in PRUint32 newChannelId, in nsIChannel newChannel, in PRUint32 redirectFlags, in nsIAsyncVerifyRedirectCallback callback); */
NS_SCRIPTABLE NS_IMETHOD StartRedirect(PRUint32 newChannelId, nsIChannel *newChannel, PRUint32 redirectFlags, nsIAsyncVerifyRedirectCallback *callback) = 0;
/**
* Called after we are done with redirecting process and we know if to
* redirect or not. Forward the redirect result to the child process. From
* that moment the nsIParentChannel implementation expects it will be
* forwarded all notifications from the 'real' channel.
*
* Primarilly used by HttpChannelParentListener::OnRedirectResult and kept
* as mActiveChannel and mRedirectChannel in that class.
*/
/* void completeRedirect (in PRBool succeeded); */
NS_SCRIPTABLE NS_IMETHOD CompleteRedirect(PRBool succeeded) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIParentRedirectingChannel, NS_IPARENTREDIRECTINGCHANNEL_IID)
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIPARENTREDIRECTINGCHANNEL \
NS_SCRIPTABLE NS_IMETHOD StartRedirect(PRUint32 newChannelId, nsIChannel *newChannel, PRUint32 redirectFlags, nsIAsyncVerifyRedirectCallback *callback); \
NS_SCRIPTABLE NS_IMETHOD CompleteRedirect(PRBool succeeded);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIPARENTREDIRECTINGCHANNEL(_to) \
NS_SCRIPTABLE NS_IMETHOD StartRedirect(PRUint32 newChannelId, nsIChannel *newChannel, PRUint32 redirectFlags, nsIAsyncVerifyRedirectCallback *callback) { return _to StartRedirect(newChannelId, newChannel, redirectFlags, callback); } \
NS_SCRIPTABLE NS_IMETHOD CompleteRedirect(PRBool succeeded) { return _to CompleteRedirect(succeeded); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIPARENTREDIRECTINGCHANNEL(_to) \
NS_SCRIPTABLE NS_IMETHOD StartRedirect(PRUint32 newChannelId, nsIChannel *newChannel, PRUint32 redirectFlags, nsIAsyncVerifyRedirectCallback *callback) { return !_to ? NS_ERROR_NULL_POINTER : _to->StartRedirect(newChannelId, newChannel, redirectFlags, callback); } \
NS_SCRIPTABLE NS_IMETHOD CompleteRedirect(PRBool succeeded) { return !_to ? NS_ERROR_NULL_POINTER : _to->CompleteRedirect(succeeded); }
#if 0
/* Use the code below as a template for the implementation class for this interface. */
/* Header file */
class nsParentRedirectingChannel : public nsIParentRedirectingChannel
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIPARENTREDIRECTINGCHANNEL
nsParentRedirectingChannel();
private:
~nsParentRedirectingChannel();
protected:
/* additional members */
};
/* Implementation file */
NS_IMPL_ISUPPORTS1(nsParentRedirectingChannel, nsIParentRedirectingChannel)
nsParentRedirectingChannel::nsParentRedirectingChannel()
{
/* member initializers and constructor code */
}
nsParentRedirectingChannel::~nsParentRedirectingChannel()
{
/* destructor code */
}
/* void startRedirect (in PRUint32 newChannelId, in nsIChannel newChannel, in PRUint32 redirectFlags, in nsIAsyncVerifyRedirectCallback callback); */
NS_IMETHODIMP nsParentRedirectingChannel::StartRedirect(PRUint32 newChannelId, nsIChannel *newChannel, PRUint32 redirectFlags, nsIAsyncVerifyRedirectCallback *callback)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void completeRedirect (in PRBool succeeded); */
NS_IMETHODIMP nsParentRedirectingChannel::CompleteRedirect(PRBool succeeded)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* End of implementation class template. */
#endif
#endif /* __gen_nsIParentRedirectingChannel_h__ */
|
/*******************************************************************\
Module:
Author: Daniel Kroening, kroening@kroening.com
\*******************************************************************/
#ifndef CPROVER_MP_ARITH_H
#define CPROVER_MP_ARITH_H
#include <string>
#include <iostream>
#include "big-int/bigint.hh"
typedef BigInt mp_integer;
typedef unsigned int u_int;
std::ostream& operator<<(std::ostream& out, const mp_integer &n);
mp_integer operator>>(const mp_integer &a, unsigned int b);
mp_integer operator<<(const mp_integer &a, unsigned int b);
const std::string integer2string(const mp_integer &n, unsigned base=10);
const mp_integer string2integer(const std::string &n, unsigned base=10);
const std::string integer2binary(const mp_integer &n, unsigned width);
const mp_integer binary2integer(const std::string &n, bool is_signed);
const mp_integer extract_fraction(const std::string &n, bool is_signed, u_int from, u_int to);
unsigned long integer2long(const mp_integer &n);
#endif
|
// NOTE: This file was generated by the ServiceGenerator.
// ----------------------------------------------------------------------------
// API:
// Safe Browsing API (safebrowsing/v4)
// Description:
// Enables client applications to check web resources (most commonly URLs)
// against Google-generated lists of unsafe web resources. The Safe Browsing
// APIs are for non-commercial use only. If you need to use APIs to detect
// malicious URLs for commercial purposes – meaning “for sale or
// revenue-generating purposes” – please refer to the Web Risk API.
// Documentation:
// https://developers.google.com/safe-browsing/
#if SWIFT_PACKAGE || GTLR_USE_MODULAR_IMPORT
@import GoogleAPIClientForRESTCore;
#elif GTLR_BUILT_AS_FRAMEWORK
#import "GTLR/GTLRService.h"
#else
#import "GTLRService.h"
#endif
#if GTLR_RUNTIME_VERSION != 3000
#error This file was generated by a different version of ServiceGenerator which is incompatible with this GTLR library source.
#endif
// Generated comments include content from the discovery document; avoid them
// causing warnings since clang's checks are some what arbitrary.
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdocumentation"
NS_ASSUME_NONNULL_BEGIN
/**
* Service for executing Safe Browsing API queries.
*
* Enables client applications to check web resources (most commonly URLs)
* against Google-generated lists of unsafe web resources. The Safe Browsing
* APIs are for non-commercial use only. If you need to use APIs to detect
* malicious URLs for commercial purposes – meaning “for sale or
* revenue-generating purposes” – please refer to the Web Risk API.
*/
@interface GTLRSafebrowsingService : GTLRService
// No new methods
// Clients should create a standard query with any of the class methods in
// GTLRSafebrowsingQuery.h. The query can the be sent with GTLRService's execute
// methods,
//
// - (GTLRServiceTicket *)executeQuery:(GTLRQuery *)query
// completionHandler:(void (^)(GTLRServiceTicket *ticket,
// id object, NSError *error))handler;
// or
// - (GTLRServiceTicket *)executeQuery:(GTLRQuery *)query
// delegate:(id)delegate
// didFinishSelector:(SEL)finishedSelector;
//
// where finishedSelector has a signature of:
//
// - (void)serviceTicket:(GTLRServiceTicket *)ticket
// finishedWithObject:(id)object
// error:(NSError *)error;
//
// The object passed to the completion handler or delegate method
// is a subclass of GTLRObject, determined by the query method executed.
@end
NS_ASSUME_NONNULL_END
#pragma clang diagnostic pop
|
//
// SecondViewController.h
// 开始iOS 7中自动布局教程(二)
//
// Created by huangchengdu on 16/1/21.
// Copyright © 2016年 huangchengdu. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface SecondViewController : UIViewController
@end
|
#pragma once
#include <chrono>
#include <condition_variable>
#include <mutex>
#include <vector>
#include "envoy/server/configuration.h"
#include "envoy/server/guarddog.h"
#include "envoy/server/watchdog.h"
#include "envoy/stats/stats.h"
#include "common/common/logger.h"
#include "common/common/thread.h"
#include "common/event/libevent.h"
#include "absl/types/optional.h"
namespace Envoy {
namespace Server {
/**
* This feature performs deadlock detection stats collection & enforcement.
*
* It launches a thread that scans at an interval the minimum of the configured
* intervals. If it finds starved threads or suspected deadlocks it will take
* the appropriate action depending on the config parameters described below.
*
* Thread lifetime is tied to GuardDog object lifetime (RAII style).
*/
class GuardDogImpl : public GuardDog {
public:
/**
* @param stats_scope Statistics scope to write watchdog_miss and
* watchdog_mega_miss events into.
* @param config Configuration object.
*
* See the configuration documentation for details on the timeout settings.
*/
GuardDogImpl(Stats::Scope& stats_scope, const Server::Configuration::Main& config,
MonotonicTimeSource& tsource);
~GuardDogImpl();
/**
* Exposed for testing purposes only (but harmless to call):
*/
int loopIntervalForTest() const { return loop_interval_.count(); }
void forceCheckForTest() {
exit_event_.notify_all();
std::lock_guard<std::mutex> guard(exit_lock_);
force_checked_event_.wait(exit_lock_);
}
// Server::GuardDog
WatchDogSharedPtr createWatchDog(int32_t thread_id) override;
void stopWatching(WatchDogSharedPtr wd) override;
private:
void threadRoutine();
/**
* @return True if we should continue, false if signalled to stop.
*/
bool waitOrDetectStop();
void start();
void stop();
// Per the C++ standard it is OK to use these in ctor initializer as long as
// it is after kill and multikill timeout values are initialized.
bool killEnabled() const { return kill_timeout_ > std::chrono::milliseconds(0); }
bool multikillEnabled() const { return multi_kill_timeout_ > std::chrono::milliseconds(0); }
struct WatchedDog {
WatchDogSharedPtr dog_;
absl::optional<MonotonicTime> last_alert_time_;
bool miss_alerted_{};
bool megamiss_alerted_{};
};
MonotonicTimeSource& time_source_;
const std::chrono::milliseconds miss_timeout_;
const std::chrono::milliseconds megamiss_timeout_;
const std::chrono::milliseconds kill_timeout_;
const std::chrono::milliseconds multi_kill_timeout_;
const std::chrono::milliseconds loop_interval_;
Stats::Counter& watchdog_miss_counter_;
Stats::Counter& watchdog_megamiss_counter_;
std::vector<WatchedDog> watched_dogs_;
std::mutex wd_lock_;
Thread::ThreadPtr thread_;
std::mutex exit_lock_;
std::condition_variable_any exit_event_;
bool run_thread_;
std::condition_variable_any force_checked_event_;
};
} // namespace Server
} // namespace Envoy
|
//
// SWHomeModel.h
// CurrentLife
//
// Created by mac on 15/11/25.
// Copyright © 2015年 itcast. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "JSONModel.h"
#import "SWFocusList.h"
@class SWFamousList;
@class SWGroupList;
@class SWGuessList;
//@class SWFocusList;
@protocol SWFamousModel;
@protocol SWGroupModel;
@protocol SWGuessModel;
#pragma mark --首页
@interface SWHomeModel : JSONModel
@property (nonatomic, strong) SWFamousList *famous;
@property (nonatomic, strong) SWFocusList *focus;
@property (nonatomic, strong) SWGroupList *group;
@property (nonatomic, strong) SWGuessList *guess;
@end
#pragma mark --名店推荐
@interface SWFamousList : JSONModel
//<DSFocusModel>指定存放类型
@property (nonatomic, copy) NSArray <SWFamousModel>* list;
@end
@interface SWFamousModel : JSONModel
///* id*/
//@property (nonatomic, assign) int id;
/* 封面字段*/
@property (nonatomic, copy) NSString *cover;
/*距离字段*/
//@property (nonatomic, assign) int distance;
/*简介*/
@property (nonatomic, copy) NSString *intro;
/*名称*/
@property (nonatomic, copy) NSString *name;
/*评分*/
@property (nonatomic, copy) NSString * score;
@end
#pragma mark --生活圈 分类
@interface SWGroupList : JSONModel
@property (nonatomic, copy) NSArray <SWGroupModel>*list;
@end
@interface SWGroupModel : JSONModel
/* 封面*/
@property (nonatomic, copy) NSString *cover;
/*id*/
@property (nonatomic, copy) NSString * id;
/*标题*/
@property (nonatomic, copy) NSString *title;
@end
#pragma mark --猜你喜欢
@interface SWGuessList : JSONModel
@property (nonatomic,copy) NSArray <SWGuessModel>*list;
@end
@interface SWGuessModel :JSONModel
/*封面*/
@property (nonatomic, copy) NSString *cover;
/**/
@property (nonatomic, copy)NSString * orginalprice;
@property (nonatomic, copy) NSString * score;
@property (nonatomic, copy)NSString * name;
/*简介*/
@property (nonatomic, copy) NSString *intro;
/*价格*/
@property (nonatomic, assign) int price;
/*标题*/
@property (nonatomic, copy) NSString *title;
@end
|
/**
* Appcelerator Titanium Mobile
* Copyright (c) 2009-2011 by GDS, Inc. All Rights Reserved.
* Licensed under the terms of the Apache Public License
* Please see the LICENSE included with this distribution for details.
*
* WARNING: This is generated code. Modify at your own risk and without support.
*/
#ifdef USE_TI_FACEBOOK
#import "TiModule.h"
#import "Facebook.h"
@protocol TiFacebookStateListener
@required
-(void)login;
-(void)logout;
@end
@interface FacebookModule : TiModule <FBRequestDelegate, FBDialogDelegate, FBSessionDelegate>
{
Facebook *facebook;
BOOL loggedIn;
NSString *uid;
NSString *url;
NSString *appid;
NSArray *permissions;
NSMutableArray *stateListeners;
BOOL forceDialogAuth;
}
@property(nonatomic,readonly) Facebook *facebook;
@property(nonatomic,readonly) NSNumber *BUTTON_STYLE_NORMAL;
@property(nonatomic,readonly) NSNumber *BUTTON_STYLE_WIDE;
-(BOOL)isLoggedIn;
-(void)addListener:(id<TiFacebookStateListener>)listener;
-(void)removeListener:(id<TiFacebookStateListener>)listener;
-(void)authorize:(id)args;
-(void)logout:(id)args;
@end
#endif
|
/*
Extern implementation of Nit module time
*/
#include <stdlib.h>
#include <stdio.h>
#include "time._ffi.h"
#define NativeString_to_s_with_copy time___NativeString_to_s_with_copy
#define String_to_cstring time___String_to_cstring
#define NativeString_to_s time___NativeString_to_s
time_t time___new_TimeT___impl( )
{
#line 34 "lib/standard/time.nit"
return time(NULL); }
time_t time___new_TimeT_from_i___impl( int i )
{
#line 35 "lib/standard/time.nit"
return i; }
void time___TimeT_update___impl( time_t recv )
{
#line 37 "lib/standard/time.nit"
time(&recv); }
String time___TimeT_ctime___impl( time_t recv )
{
#line 39 "lib/standard/time.nit"
return NativeString_to_s_with_copy( ctime(&recv) );
}
double time___TimeT_difftime___impl( time_t recv, time_t start )
{
#line 44 "lib/standard/time.nit"
return difftime(recv, start); }
int time___TimeT_to_i___impl( time_t recv )
{
#line 47 "lib/standard/time.nit"
return (int)recv; }
struct tm * time___new_Tm_gmtime___impl( )
{
#line 52 "lib/standard/time.nit"
struct tm *tm;
time_t t = time(NULL);
tm = gmtime(&t);
return tm;
}
struct tm * time___new_Tm_gmtime_from_timet___impl( time_t t )
{
#line 58 "lib/standard/time.nit"
struct tm *tm;
tm = gmtime(&t);
return tm;
}
struct tm * time___new_Tm_localtime___impl( )
{
#line 64 "lib/standard/time.nit"
struct tm *tm;
time_t t = time(NULL);
tm = localtime(&t);
return tm;
}
struct tm * time___new_Tm_localtime_from_timet___impl( time_t t )
{
#line 70 "lib/standard/time.nit"
struct tm *tm;
tm = localtime(&t);
return tm;
}
time_t time___Tm_to_timet___impl( struct tm * recv )
{
#line 76 "lib/standard/time.nit"
return mktime(recv); }
int time___Tm_sec___impl( struct tm * recv )
{
#line 78 "lib/standard/time.nit"
return recv->tm_sec; }
int time___Tm_min___impl( struct tm * recv )
{
#line 79 "lib/standard/time.nit"
return recv->tm_min; }
int time___Tm_hour___impl( struct tm * recv )
{
#line 80 "lib/standard/time.nit"
return recv->tm_hour; }
int time___Tm_mday___impl( struct tm * recv )
{
#line 81 "lib/standard/time.nit"
return recv->tm_mday; }
int time___Tm_mon___impl( struct tm * recv )
{
#line 82 "lib/standard/time.nit"
return recv->tm_mon; }
int time___Tm_year___impl( struct tm * recv )
{
#line 83 "lib/standard/time.nit"
return recv->tm_year; }
int time___Tm_wday___impl( struct tm * recv )
{
#line 84 "lib/standard/time.nit"
return recv->tm_wday; }
int time___Tm_yday___impl( struct tm * recv )
{
#line 85 "lib/standard/time.nit"
return recv->tm_yday; }
int time___Tm_is_dst___impl( struct tm * recv )
{
#line 86 "lib/standard/time.nit"
return recv->tm_isdst; }
String time___Tm_asctime___impl( struct tm * recv )
{
#line 88 "lib/standard/time.nit"
return NativeString_to_s_with_copy( asctime(recv) );
}
String time___Tm_strftime___impl( struct tm * recv, String format )
{
#line 91 "lib/standard/time.nit"
char* buf, *c_format;
size_t res;
buf = (char*)malloc(100);
c_format = String_to_cstring(format);
res = strftime(buf, 100, c_format, recv);
return NativeString_to_s(buf);
}
|
/*
* Copyright (c) 2019, NXP
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <init.h>
#include <fsl_iomuxc.h>
#include <fsl_gpio.h>
static int mimxrt1015_evk_init(const struct device *dev)
{
ARG_UNUSED(dev);
CLOCK_EnableClock(kCLOCK_Iomuxc);
CLOCK_EnableClock(kCLOCK_IomuxcSnvs);
#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio2), okay)
IOMUXC_SetPinMux(IOMUXC_GPIO_EMC_09_GPIO2_IO09, 0);
IOMUXC_SetPinConfig(IOMUXC_GPIO_EMC_09_GPIO2_IO09,
IOMUXC_SW_PAD_CTL_PAD_PKE_MASK |
IOMUXC_SW_PAD_CTL_PAD_PUE(1) |
IOMUXC_SW_PAD_CTL_PAD_PUS(2) |
IOMUXC_SW_PAD_CTL_PAD_SPEED(2) |
IOMUXC_SW_PAD_CTL_PAD_DSE(4));
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpuart1), okay)
/* LPUART1 TX/RX */
IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B0_06_LPUART1_TX, 0);
IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B0_07_LPUART1_RX, 0);
IOMUXC_SetPinConfig(IOMUXC_GPIO_AD_B0_06_LPUART1_TX,
IOMUXC_SW_PAD_CTL_PAD_PKE_MASK |
IOMUXC_SW_PAD_CTL_PAD_SPEED(2) |
IOMUXC_SW_PAD_CTL_PAD_DSE(6));
IOMUXC_SetPinConfig(IOMUXC_GPIO_AD_B0_07_LPUART1_RX,
IOMUXC_SW_PAD_CTL_PAD_PKE_MASK |
IOMUXC_SW_PAD_CTL_PAD_SPEED(2) |
IOMUXC_SW_PAD_CTL_PAD_DSE(6));
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpuart4), okay)
/* LPUART4 TX/RX */
IOMUXC_SetPinMux(IOMUXC_GPIO_EMC_32_LPUART4_TX, 0);
IOMUXC_SetPinMux(IOMUXC_GPIO_EMC_33_LPUART4_RX, 0);
IOMUXC_SetPinConfig(IOMUXC_GPIO_EMC_32_LPUART4_TX,
IOMUXC_SW_PAD_CTL_PAD_PKE_MASK |
IOMUXC_SW_PAD_CTL_PAD_SPEED(2) |
IOMUXC_SW_PAD_CTL_PAD_DSE(6));
IOMUXC_SetPinConfig(IOMUXC_GPIO_EMC_33_LPUART4_RX,
IOMUXC_SW_PAD_CTL_PAD_PKE_MASK |
IOMUXC_SW_PAD_CTL_PAD_SPEED(2) |
IOMUXC_SW_PAD_CTL_PAD_DSE(6));
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpi2c1), okay)
/* LPI2C1 SCL, SDA */
IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B1_14_LPI2C1_SCL, 1);
IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B1_15_LPI2C1_SDA, 1);
IOMUXC_SetPinConfig(IOMUXC_GPIO_AD_B1_14_LPI2C1_SCL,
IOMUXC_SW_PAD_CTL_PAD_PUS(3) |
IOMUXC_SW_PAD_CTL_PAD_PKE_MASK |
IOMUXC_SW_PAD_CTL_PAD_ODE_MASK |
IOMUXC_SW_PAD_CTL_PAD_SPEED(2) |
IOMUXC_SW_PAD_CTL_PAD_DSE(6));
IOMUXC_SetPinConfig(IOMUXC_GPIO_AD_B1_15_LPI2C1_SDA,
IOMUXC_SW_PAD_CTL_PAD_PUS(3) |
IOMUXC_SW_PAD_CTL_PAD_PKE_MASK |
IOMUXC_SW_PAD_CTL_PAD_ODE_MASK |
IOMUXC_SW_PAD_CTL_PAD_SPEED(2) |
IOMUXC_SW_PAD_CTL_PAD_DSE(6));
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpspi1), okay) && CONFIG_SPI
/* LPSPI1 CS, SDO, SDI, CLK exposed as pins 3, 4, 5, and 6 on J19 */
/* GPIO_AD_B0_10 is configured as LPSPI1_SCK */
IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B0_10_LPSPI1_SCK, 0U);
/* GPIO_AD_B0_11 is configured as LPSPI1_PCS0 */
IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B0_11_LPSPI1_PCS0, 0U);
/* GPIO_AD_B0_12 is configured as LPSPI1_SDO */
IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B0_12_LPSPI1_SDO, 0U);
/* GPIO_AD_B0_13 is configured as LPSPI1_SDI */
IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B0_13_LPSPI1_SDI, 0U);
IOMUXC_SetPinConfig(IOMUXC_GPIO_AD_B0_10_LPSPI1_SCK,
IOMUXC_SW_PAD_CTL_PAD_PKE_MASK |
IOMUXC_SW_PAD_CTL_PAD_SPEED(2) |
IOMUXC_SW_PAD_CTL_PAD_DSE(6));
IOMUXC_SetPinConfig(IOMUXC_GPIO_AD_B0_11_LPSPI1_PCS0,
IOMUXC_SW_PAD_CTL_PAD_PKE_MASK |
IOMUXC_SW_PAD_CTL_PAD_SPEED(2) |
IOMUXC_SW_PAD_CTL_PAD_DSE(6));
IOMUXC_SetPinConfig(IOMUXC_GPIO_AD_B0_12_LPSPI1_SDO,
IOMUXC_SW_PAD_CTL_PAD_PKE_MASK |
IOMUXC_SW_PAD_CTL_PAD_SPEED(2) |
IOMUXC_SW_PAD_CTL_PAD_DSE(6));
IOMUXC_SetPinConfig(IOMUXC_GPIO_AD_B0_13_LPSPI1_SDI,
IOMUXC_SW_PAD_CTL_PAD_PKE_MASK |
IOMUXC_SW_PAD_CTL_PAD_SPEED(2) |
IOMUXC_SW_PAD_CTL_PAD_DSE(6));
#endif
return 0;
}
SYS_INIT(mimxrt1015_evk_init, PRE_KERNEL_1, 0);
|
// Copyright 2020 The IREE Authors
//
// Licensed under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#ifndef IREE_BINDINGS_TFLITE_TENSOR_H_
#define IREE_BINDINGS_TFLITE_TENSOR_H_
#include "iree/base/api.h"
#include "iree/hal/api.h"
#include "iree/vm/api.h"
// NOTE: we pull in our own copy here in case the tflite API changes upstream.
#define TFL_COMPILE_LIBRARY 1 // force dllexport
#include "bindings/tflite/include/tensorflow/lite/c/c_api.h"
#include "bindings/tflite/include/tensorflow/lite/c/c_api_experimental.h"
// This is the same value as TFLITE_RESHAPE_PARAMS_MAX_DIMENSION_COUNT.
// Since that's all tflite supports internally we are fairly safe to use that
// as our max for the I/O tensors; internal tensors inside of IREE generated
// modules may of course have arbitrary shape ranks.
#define IREE_BINDINGS_TFLITE_MAX_RANK 8
struct TfLiteTensor {
// Static metadata about the tensor as it was embedded in the module.
TfLiteType type;
TfLiteQuantizationParams quantization_params;
iree_string_view_t name;
// Queried shape information from the module; in the case of outputs this is
// the expected output shape based on the current input shapes and will be
// available even if we haven't yet run and allocated the buffer view.
int32_t shape_rank;
int32_t shape_dims[IREE_BINDINGS_TFLITE_MAX_RANK];
// Allocated buffer view referencing the backing tensor memory.
iree_hal_buffer_t* buffer;
// Persistently mapped buffer; invalidated when buffer is resized.
iree_hal_buffer_mapping_t buffer_mapping;
};
// Parses a tfl.io.names value and sets the |tensor| name.
iree_status_t _TfLiteTensorParseNameAttr(TfLiteTensor* tensor,
iree_string_view_t attr,
iree_allocator_t allocator);
// Parses a tfl.io.types value and sets the |tensor| type.
iree_status_t _TfLiteTensorParseTypeAttr(TfLiteTensor* tensor,
iree_string_view_t attr);
// Parses a tfl.io.quant value and sets the |tensor| quantization parameters.
iree_status_t _TfLiteTensorParseQuantAttr(TfLiteTensor* tensor,
iree_string_view_t attr);
// Reallocates and remaps the tensor buffer view if needed.
// No-op if the buffer view is already allocated and its shape matches the
// current tensor shape.
iree_status_t _TfLiteTensorReallocateIfNeeded(
TfLiteTensor* tensor, iree_hal_allocator_t* buffer_allocator,
iree_allocator_t heap_allocator);
// Binds the given |buffer| to the tensor and maps it.
// The tensor shape will be overwritten with the buffer view shape.
iree_status_t _TfLiteTensorBind(TfLiteTensor* tensor,
iree_hal_buffer_t* buffer);
// Discards the current buffer view, if any, resetting it to NULL.
void _TfLiteTensorDiscardBuffer(TfLiteTensor* tensor);
// Resets the tensor back to its initial state (no buffers, etc).
void _TfLiteTensorReset(TfLiteTensor* tensor, iree_allocator_t allocator);
#endif // IREE_BINDINGS_TFLITE_TENSOR_H_
|
/*
* Copyright (c) 2020 Project CHIP Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* This header interfaces with the Pigweed logging facade by overriding
* the backend header.
*/
#pragma once
#include "pw_log_chip/log_chip.h"
|
/*=========================================================================
*
* Copyright Insight Software Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0.txt
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*=========================================================================*/
#ifndef __itkLogImageAdaptor_h
#define __itkLogImageAdaptor_h
#include "itkImageAdaptor.h"
#include "vnl/vnl_math.h"
namespace itk
{
namespace Accessor
{
/** \class LogPixelAccessor
* \brief Give access to the vcl_log() function of a value
*
* LogPixelAccessor is templated over an internal type and an
* external type representation. This class cast the input
* applies the function to it and cast the result according
* to the types defined as template parameters
*
* \ingroup ImageAdaptors
* \ingroup ITKImageAdaptors
*/
template< class TInternalType, class TExternalType >
class LogPixelAccessor
{
public:
/** External typedef. It defines the external aspect
* that this class will exhibit. */
typedef TExternalType ExternalType;
/** Internal typedef. It defines the internal real
* representation of data. */
typedef TInternalType InternalType;
static inline void Set(TInternalType & output, const TExternalType & input)
{ output = (TInternalType)vcl_log( (double)input ); }
static inline TExternalType Get(const TInternalType & input)
{ return (TExternalType)vcl_log( (double)input ); }
};
} // end namespace Accessor
/** \class LogImageAdaptor
* \brief Presents an image as being composed of the vcl_log() of its pixels
*
* Additional casting is performed according to the input and output image
* types following C++ default casting rules.
*
* \ingroup ImageAdaptors
* \ingroup ITKImageAdaptors
*/
template< class TImage, class TOutputPixelType >
class LogImageAdaptor:public
ImageAdaptor< TImage,
Accessor::LogPixelAccessor<
typename TImage::PixelType,
TOutputPixelType > >
{
public:
/** Standard class typedefs. */
typedef LogImageAdaptor Self;
typedef ImageAdaptor< TImage,
Accessor::LogPixelAccessor<
typename TImage::PixelType,
TOutputPixelType > > Superclass;
typedef SmartPointer< Self > Pointer;
typedef SmartPointer< const Self > ConstPointer;
/** Run-time type information (and related methods). */
itkTypeMacro(LogImageAdaptor, ImageAdaptor);
/** Method for creation through the object factory. */
itkNewMacro(Self);
protected:
LogImageAdaptor() {}
virtual ~LogImageAdaptor() {}
private:
LogImageAdaptor(const Self &); //purposely not implemented
void operator=(const Self &); //purposely not implemented
};
} // end namespace itk
#endif
|
#include <assert.h>
#include <errno.h>
#include <fcntl.h>
#include <jni.h>
#include <unistd.h>
#include "errno.h"
#include "unsupported.h"
JNIEXPORT jint JNICALL Java_poj_File_open___3BI(JNIEnv * env, jclass cls,
jcharArray jpath, jint flags)
{
int fd;
void *cpath = (*env)->GetPrimitiveArrayCritical(env, jpath, JNI_FALSE);
assert(cpath);
fd = open((char *)cpath, flags);
(*env)->ReleasePrimitiveArrayCritical(env, jpath, cpath, JNI_ABORT);
if (fd == -1)
(*env)->Throw(env, poj_get_errno(env, errno));
return fd;
}
JNIEXPORT jint JNICALL Java_poj_File_open___3BII(JNIEnv * env, jclass cls,
jcharArray jpath, jint flags,
jint mode)
{
int fd;
void *cpath = (*env)->GetPrimitiveArrayCritical(env, jpath, JNI_FALSE);
assert(cpath);
fd = open((char *)cpath, flags, (mode_t) mode);
(*env)->ReleasePrimitiveArrayCritical(env, jpath, cpath, JNI_ABORT);
if (fd == -1)
(*env)->Throw(env, poj_get_errno(env, errno));
return fd;
}
JNIEXPORT jint JNICALL Java_poj_File_creat(JNIEnv * env, jclass cls,
jcharArray jpath, jint mode)
{
int fd;
void *cpath = (*env)->GetPrimitiveArrayCritical(env, jpath, JNI_FALSE);
fd = creat((char *)cpath, (mode_t) mode);
(*env)->ReleasePrimitiveArrayCritical(env, jpath, cpath, JNI_ABORT);
if (fd == -1)
(*env)->Throw(env, poj_get_errno(env, errno));
return fd;
}
JNIEXPORT void JNICALL Java_poj_File_fadvise(JNIEnv * env, jclass cls, jint fd,
jint offset, jint len, jint advice)
{
#ifdef POSIX_FADV_NORMAL
int res =
posix_fadvise((int) fd, (off_t) offset, (off_t) len, (int) advice);
if (res != 0)
(*env)->Throw(env, poj_get_errno(env, res));
#else
poj_throw_unsupported(env);
#endif
}
JNIEXPORT void JNICALL Java_poj_File_close(JNIEnv * env, jclass cls, jint fd)
{
int res = close(fd);
if (res == -1)
(*env)->Throw(env, poj_get_errno(env, errno));
}
JNIEXPORT jint JNICALL Java_poj_File_readlink(JNIEnv * env, jclass cls,
jbyteArray jpath, jbyteArray jdst)
{
ssize_t read;
void *cpath = (*env)->GetPrimitiveArrayCritical(env, jpath, JNI_FALSE);
assert(cpath);
void *cdst = (*env)->GetPrimitiveArrayCritical(env, jdst, JNI_FALSE);
assert(cdst);
jsize dstlength = (*env)->GetArrayLength(env, jdst);
read = readlink((const char *)cpath, (char *)cdst, (size_t) dstlength);
(*env)->ReleasePrimitiveArrayCritical(env, jpath, cpath, JNI_ABORT);
(*env)->ReleasePrimitiveArrayCritical(env, jdst, cdst, 0);
if (read == (ssize_t) -1)
(*env)->Throw(env, poj_get_errno(env, errno));
return (jint)read;
}
JNIEXPORT void JNICALL Java_poj_File_symlink(JNIEnv * env, jclass cls,
jbyteArray jsrc, jbyteArray jdst)
{
void *csrc = (*env)->GetPrimitiveArrayCritical(env, jsrc, JNI_FALSE);
assert(csrc);
void *cdst = (*env)->GetPrimitiveArrayCritical(env, jdst, JNI_FALSE);
assert(cdst);
int res = symlink((const char *)csrc, (const char *)cdst);
(*env)->ReleasePrimitiveArrayCritical(env, jsrc, csrc, JNI_ABORT);
(*env)->ReleasePrimitiveArrayCritical(env, jdst, cdst, JNI_ABORT);
if (res == -1)
(*env)->Throw(env, poj_get_errno(env, errno));
}
JNIEXPORT void JNICALL Java_poj_File_link(JNIEnv * env, jclass cls,
jbyteArray jsrc, jbyteArray jdst)
{
void *csrc = (*env)->GetPrimitiveArrayCritical(env, jsrc, JNI_FALSE);
assert(csrc);
void *cdst = (*env)->GetPrimitiveArrayCritical(env, jdst, JNI_FALSE);
assert(cdst);
int res = link((const char *)csrc, (const char *)cdst);
(*env)->ReleasePrimitiveArrayCritical(env, jsrc, csrc, JNI_ABORT);
(*env)->ReleasePrimitiveArrayCritical(env, jdst, cdst, JNI_ABORT);
if (res == -1)
(*env)->Throw(env, poj_get_errno(env, errno));
}
JNIEXPORT void JNICALL Java_poj_File_unlink(JNIEnv * env, jclass cls,
jbyteArray jpath)
{
void *cpath = (*env)->GetByteArrayElements(env, jpath, JNI_FALSE);
assert(cpath);
int res = unlink((const char *)cpath);
(*env)->ReleasePrimitiveArrayCritical(env, jpath, cpath, JNI_ABORT);
if (res == -1)
(*env)->Throw(env, poj_get_errno(env, errno));
}
|
#include <stdint.h>
#include <string.h>
#include "util.h"
#include "tens.h"
#define W 28
#define H 28
#define C 1
#define IMG_B W*H
#define LAB_B 1
#define TRAIN_IMG 6000
#define TRAIN_HB 16
#define TEST_HB 8
void mnist_load_X(const char *tf, int start, int num,
ftens *X)
{
ASSERT(start + num < TRAIN_IMG, "mnist err img");
uint8_t buff[W*H];
FILE *pf = fopen(tf, "rb"); ASSERT(pf, "mnist err tf");
fseek(pf, TRAIN_HB + start * IMG_B, SEEK_SET);
for (int i=0; i < num; i++) {
float *out = X->data + i*X->MNL;
FREAD(buff, uint8_t, IMG_B, pf, "mnist err read");
for (int i=0; i < W*H; i++)
out[i] = (float) buff[i];
}
fclose(pf);
}
void mnist_load_y(const char *lf, int start, int num, ftens *y)
{
ASSERT(start + num < TRAIN_IMG, "mnist err lab\n");
float *out = y->data; uint8_t buff;
FILE *pf = fopen(lf, "rb"); ASSERT(pf, "mnist err rl\n");
fseek(pf, TEST_HB + start * LAB_B, SEEK_SET);
for (int i=0; i < num; i++) {
memset(out, 0, sizeof(float) * 10);
fread(&buff, sizeof(uint8_t), 1, pf);
out[buff] = 1.0f;
out += y->MNL;
}
}
#undef W
#undef H
#undef C
#undef HEADER_BYTES
#undef IMG_B
#undef LAB_B
#undef TRAIN_IMG
#undef TRAIN_HB
#undef TEST_HB
|
/*
* Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
#pragma once
#include <aws/xray/XRay_EXPORTS.h>
#include <aws/xray/XRayRequest.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/xray/model/TelemetryRecord.h>
#include <utility>
namespace Aws
{
namespace XRay
{
namespace Model
{
/**
*/
class AWS_XRAY_API PutTelemetryRecordsRequest : public XRayRequest
{
public:
PutTelemetryRecordsRequest();
Aws::String SerializePayload() const override;
/**
* <p></p>
*/
inline const Aws::Vector<TelemetryRecord>& GetTelemetryRecords() const{ return m_telemetryRecords; }
/**
* <p></p>
*/
inline void SetTelemetryRecords(const Aws::Vector<TelemetryRecord>& value) { m_telemetryRecordsHasBeenSet = true; m_telemetryRecords = value; }
/**
* <p></p>
*/
inline void SetTelemetryRecords(Aws::Vector<TelemetryRecord>&& value) { m_telemetryRecordsHasBeenSet = true; m_telemetryRecords = std::move(value); }
/**
* <p></p>
*/
inline PutTelemetryRecordsRequest& WithTelemetryRecords(const Aws::Vector<TelemetryRecord>& value) { SetTelemetryRecords(value); return *this;}
/**
* <p></p>
*/
inline PutTelemetryRecordsRequest& WithTelemetryRecords(Aws::Vector<TelemetryRecord>&& value) { SetTelemetryRecords(std::move(value)); return *this;}
/**
* <p></p>
*/
inline PutTelemetryRecordsRequest& AddTelemetryRecords(const TelemetryRecord& value) { m_telemetryRecordsHasBeenSet = true; m_telemetryRecords.push_back(value); return *this; }
/**
* <p></p>
*/
inline PutTelemetryRecordsRequest& AddTelemetryRecords(TelemetryRecord&& value) { m_telemetryRecordsHasBeenSet = true; m_telemetryRecords.push_back(std::move(value)); return *this; }
/**
* <p></p>
*/
inline const Aws::String& GetEC2InstanceId() const{ return m_eC2InstanceId; }
/**
* <p></p>
*/
inline void SetEC2InstanceId(const Aws::String& value) { m_eC2InstanceIdHasBeenSet = true; m_eC2InstanceId = value; }
/**
* <p></p>
*/
inline void SetEC2InstanceId(Aws::String&& value) { m_eC2InstanceIdHasBeenSet = true; m_eC2InstanceId = std::move(value); }
/**
* <p></p>
*/
inline void SetEC2InstanceId(const char* value) { m_eC2InstanceIdHasBeenSet = true; m_eC2InstanceId.assign(value); }
/**
* <p></p>
*/
inline PutTelemetryRecordsRequest& WithEC2InstanceId(const Aws::String& value) { SetEC2InstanceId(value); return *this;}
/**
* <p></p>
*/
inline PutTelemetryRecordsRequest& WithEC2InstanceId(Aws::String&& value) { SetEC2InstanceId(std::move(value)); return *this;}
/**
* <p></p>
*/
inline PutTelemetryRecordsRequest& WithEC2InstanceId(const char* value) { SetEC2InstanceId(value); return *this;}
/**
* <p></p>
*/
inline const Aws::String& GetHostname() const{ return m_hostname; }
/**
* <p></p>
*/
inline void SetHostname(const Aws::String& value) { m_hostnameHasBeenSet = true; m_hostname = value; }
/**
* <p></p>
*/
inline void SetHostname(Aws::String&& value) { m_hostnameHasBeenSet = true; m_hostname = std::move(value); }
/**
* <p></p>
*/
inline void SetHostname(const char* value) { m_hostnameHasBeenSet = true; m_hostname.assign(value); }
/**
* <p></p>
*/
inline PutTelemetryRecordsRequest& WithHostname(const Aws::String& value) { SetHostname(value); return *this;}
/**
* <p></p>
*/
inline PutTelemetryRecordsRequest& WithHostname(Aws::String&& value) { SetHostname(std::move(value)); return *this;}
/**
* <p></p>
*/
inline PutTelemetryRecordsRequest& WithHostname(const char* value) { SetHostname(value); return *this;}
/**
* <p></p>
*/
inline const Aws::String& GetResourceARN() const{ return m_resourceARN; }
/**
* <p></p>
*/
inline void SetResourceARN(const Aws::String& value) { m_resourceARNHasBeenSet = true; m_resourceARN = value; }
/**
* <p></p>
*/
inline void SetResourceARN(Aws::String&& value) { m_resourceARNHasBeenSet = true; m_resourceARN = std::move(value); }
/**
* <p></p>
*/
inline void SetResourceARN(const char* value) { m_resourceARNHasBeenSet = true; m_resourceARN.assign(value); }
/**
* <p></p>
*/
inline PutTelemetryRecordsRequest& WithResourceARN(const Aws::String& value) { SetResourceARN(value); return *this;}
/**
* <p></p>
*/
inline PutTelemetryRecordsRequest& WithResourceARN(Aws::String&& value) { SetResourceARN(std::move(value)); return *this;}
/**
* <p></p>
*/
inline PutTelemetryRecordsRequest& WithResourceARN(const char* value) { SetResourceARN(value); return *this;}
private:
Aws::Vector<TelemetryRecord> m_telemetryRecords;
bool m_telemetryRecordsHasBeenSet;
Aws::String m_eC2InstanceId;
bool m_eC2InstanceIdHasBeenSet;
Aws::String m_hostname;
bool m_hostnameHasBeenSet;
Aws::String m_resourceARN;
bool m_resourceARNHasBeenSet;
};
} // namespace Model
} // namespace XRay
} // namespace Aws
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.