text
stringlengths
4
6.14k
// Created file "Lib\src\Uuid\i_interned" 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_IHighlightRenderingServicesPriv, 0x3051049e, 0x98b5, 0x11cf, 0xbb, 0x82, 0x00, 0xaa, 0x00, 0xbd, 0xce, 0x0b);
//============================================================================ // I B E X // File : ibex_CtcInverse.h // Author : Gilles Chabert // Copyright : Ecole des Mines de Nantes (France) // License : See the LICENSE file // Created : Jun 5, 2013 // Last Update : Jun 5, 2013 //============================================================================ #ifndef __IBEX_CTC_INVERSE_H__ #define __IBEX_CTC_INVERSE_H__ #include "ibex_Ctc.h" #include "ibex_Function.h" namespace ibex { class CtcInverse : public Ctc { public: CtcInverse(Ctc& c, Function& f); ~CtcInverse(); /** * \brief Contract a box. */ void contract(IntervalVector& box); virtual void contract(IntervalVector& box, ContractContext& context); Ctc& c; Function& f; private: Function *id; IntervalVector y; }; } // end namespace ibex #endif // __IBEX_CTC_INVERSE_H__
// Created file "Lib\src\sensorsapi\X64\sensorsapi" typedef struct _GUID { unsigned long Data1; unsigned short Data2; unsigned short Data3; unsigned char Data4[8]; } GUID; #define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ extern const GUID name = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } } DEFINE_GUID(GUID_ENABLE_SWITCH_FORCED_SHUTDOWN, 0x833a6b62, 0xdfa4, 0x46d1, 0x82, 0xf8, 0xe0, 0x9e, 0x34, 0xd0, 0x29, 0xd6);
/* ============================================================================ Name : 3_34.c Author : Abdulrahman Description : The program reads in five-digit integers and determine whether or not it is a plaindrone. Created on : 6 Mar, 2017 ============================================================================ */ #include <stdio.h> #include <stdlib.h> int main(void) { int number = 0; printf("Enter A number consist of 5 digits:"); scanf("%d",&number); int last_two_digit = number / 1000; int first_two_digits = number % 100 ; //Summation of each couple of digits int sum_last_two_digit = (last_two_digit%10)+(last_two_digit/10); int sum_first_two_digits = (first_two_digits%10)+(first_two_digits/10); //check if the sum of coiples are equal if (sum_last_two_digit ==sum_first_two_digits) { printf("The Number (%d) is palindrome number ",number); } else { printf("ooops!!! (%d) is not palindrome number ",number); } return 0; }
/* WithRequirements, copyright (C) 1991-2017 Gen Kiyooka, is distributed under the GNU Lesser General Public License (GNU LGPL). This file is part of WithRequirements. WithRequirements 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. WithRequirements 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 WithRequirements. If not, see <http://www.gnu.org/licenses/>. */ #import "RequiredFoundationMemoryModels.h"
/* * File: RootSerializer.h * Author: winckler * * Created on January 14, 2015, 3:44 PM */ #ifndef ROOTBASECLASSSERIALIZER_H #define ROOTBASECLASSSERIALIZER_H //std #include <iostream> #include <type_traits> #include <memory> //Root #include "TClonesArray.h" #include "TMessage.h" //FairRoot #include "FairMQMessage.h" #include "MQPolicyDef.h" // special class to expose protected TMessage constructor class FairTMessage : public TMessage { public: FairTMessage(void* buf, Int_t len) : TMessage(buf, len) { ResetBit(kIsOwner); } }; // helper function to clean up the object holding the data after it is transported. void free_tmessage(void* /*data*/, void* hint) { delete static_cast<TMessage*>(hint); } struct RootSerializer { RootSerializer() = default; ~RootSerializer() = default; template<typename T> void serialize_impl(std::unique_ptr<FairMQMessage>& msg, T* input) { TMessage* tm = new TMessage(kMESS_OBJECT); tm->WriteObject(input); msg->Rebuild(tm->Buffer(), tm->BufferSize(), free_tmessage, tm); } template<typename T> void serialize_impl(std::unique_ptr<FairMQMessage>& msg, const std::unique_ptr<T>& input) { TMessage* tm = new TMessage(kMESS_OBJECT); tm->WriteObject(input.get()); msg->Rebuild(tm->Buffer(), tm->BufferSize(), free_tmessage, tm); } template<typename T> void Serialize(FairMQMessage& msg, T* input) { TMessage* tm = new TMessage(kMESS_OBJECT); tm->WriteObject(input); msg.Rebuild(tm->Buffer(), tm->BufferSize(), [](void*,void* tmsg){delete static_cast<TMessage*>(tmsg);}, tm); } }; struct RootDeserializer { RootDeserializer() = default; ~RootDeserializer() = default; template<typename T> void deserialize_impl(const std::unique_ptr<FairMQMessage>& msg, T*& output) { if(output) delete output; FairTMessage tm(msg->GetData(), msg->GetSize()); output = static_cast<T*>(tm.ReadObject(tm.GetClass())); } template<typename T> void deserialize_impl(const std::unique_ptr<FairMQMessage>& msg, std::unique_ptr<T>& output) { FairTMessage tm(msg->GetData(), msg->GetSize()); output.reset(static_cast<T*>(tm.ReadObject(tm.GetClass()))); } template<typename T> void Deserialize(FairMQMessage& msg, T*& output) { if(output) delete output; FairTMessage tm(msg.GetData(), msg.GetSize()); output = static_cast<T*>(tm.ReadObject(tm.GetClass())); } }; using RootDefaultInputPolicy = RawPtrDefaultInputPolicy<RootDeserializer,TClonesArray>; using RootDefaultOutputPolicy = RawPtrDefaultOutputPolicy<RootSerializer,TClonesArray>; #endif /* ROOTBASECLASSSERIALIZER_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_GENERATEDATASETRESPONSE_H #define QTAWS_GENERATEDATASETRESPONSE_H #include "marketplacecommerceanalyticsresponse.h" #include "generatedatasetrequest.h" namespace QtAws { namespace MarketplaceCommerceAnalytics { class GenerateDataSetResponsePrivate; class QTAWSMARKETPLACECOMMERCEANALYTICS_EXPORT GenerateDataSetResponse : public MarketplaceCommerceAnalyticsResponse { Q_OBJECT public: GenerateDataSetResponse(const GenerateDataSetRequest &request, QNetworkReply * const reply, QObject * const parent = 0); virtual const GenerateDataSetRequest * request() const Q_DECL_OVERRIDE; protected slots: virtual void parseSuccess(QIODevice &response) Q_DECL_OVERRIDE; private: Q_DECLARE_PRIVATE(GenerateDataSetResponse) Q_DISABLE_COPY(GenerateDataSetResponse) }; } // namespace MarketplaceCommerceAnalytics } // namespace QtAws #endif
/* * * 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. * */ ///@cond DOXYGEN_HIDDEN #ifndef STRINGLISTSELECTIONWIDGETINTERFACE_H_ #define STRINGLISTSELECTIONWIDGETINTERFACE_H_ #include <tulip/tulipconf.h> #include <vector> #include <string> namespace tlp { class TLP_QT_SCOPE StringsListSelectionWidgetInterface { public: virtual ~StringsListSelectionWidgetInterface() {} virtual void setUnselectedStringsList(const std::vector<std::string> &unselectedStringsList) = 0; virtual void setSelectedStringsList(const std::vector<std::string> &selectedStringsList) = 0; virtual void clearUnselectedStringsList() = 0; virtual void clearSelectedStringsList() = 0; virtual void setMaxSelectedStringsListSize(const unsigned int maxSelectedStringsListSize) = 0; virtual std::vector<std::string> getSelectedStringsList() const = 0; virtual std::vector<std::string> getUnselectedStringsList() const = 0; virtual void selectAllStrings() = 0; virtual void unselectAllStrings() = 0; }; } // namespace tlp #endif /* STRINGLISTSELECTIONWIDGETINTERFACE_H_ */ ///@endcond
/* * * 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_OPENGL_INCLUDES_H #define Tulip_OPENGL_INCLUDES_H #if defined(_MSC_VER) #include <windows.h> #endif #if defined(__APPLE__) #include <OpenGL/gl.h> #else #include <GL/gl.h> #endif /*Taken from * https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/commit/3d708a5bfa8961cc37671bc3226976dfc9ba50ad*/ /* The glext.h guard was renamed in 2018, but some software which * includes their own copy of the GL headers (such as qt (at least version 5.11.3)) might have * older version which use the old guard. This would result in the * header being included again (and symbols redefined). * * To avoid this, we define the "old" guard if the "new" guard is * defined.*/ #ifdef __gl_glext_h_ #ifndef __glext_h_ #define __glext_h_ 1 #endif #endif #endif // Tulip_OPENGL_INCLUDES_H
#ifndef OBJECT_H #define OBJECT_H #include "span.h" #include "ray.h" namespace PathTrace { class Object { public: Object(); virtual SpanIterator * makeSpanIterator() const = 0; virtual Object * transform(const Matrix &m) const { return NULL; } virtual ~Object() {} virtual Object * duplicate() const = 0; private: Object(const Object & rt); // not implemented const Object & operator =(const Object & rt); // not implemented }; class TransformedObject : public Object { private: Matrix m; Object * o; class TransformedSpanIterator : public SpanIterator { private: Matrix m, inv; SpanIterator * iter; Span span; void calcSpan() { if(!isAtEnd()) { span = PathTrace::transform(inv, **iter); } } public: TransformedSpanIterator(Matrix m, SpanIterator * iter) : m(m), inv(invert(m)), iter(iter) { } virtual const Span & operator *() const { return span; } virtual const Span * operator ->() const { return &span; } virtual bool isAtEnd() const { return iter->isAtEnd(); } virtual void next() { iter->next(); calcSpan(); } virtual void init(const Ray & ray) { iter->init(PathTrace::transform(m, ray)); calcSpan(); } virtual ~TransformedSpanIterator() { delete iter; } }; public: TransformedObject(const Matrix &m, Object * o) : m(m), o(o) { } virtual SpanIterator * makeSpanIterator() const { return new TransformedSpanIterator(m, o->makeSpanIterator()); } virtual Object * transform(const Matrix &m) const { return new TransformedObject(this->m.concat(m), o->duplicate()); } virtual Object * duplicate() const { return new TransformedObject(m, o->duplicate()); } virtual ~TransformedObject() { delete o; } }; inline Object *transform(const Matrix &m, Object *o) { Object *retval = o->transform(m); if(!retval) retval = new TransformedObject(m, o->duplicate()); return retval; } } #endif // OBJECT_H
/* SPDX-License-Identifier: LGPL-3.0-or-later */ /* Copyright (C) 2021 Intel Corporation * Paweł Marczewski <pawel@invisiblethingslab.com> */ #ifndef DUMP_H_ #define DUMP_H_ /* * Dumps the whole directory tree, displaying link targets and file contents. In addition to * examining the output, can be used to verify that: * * - all files can be examined with `lstat`, * - directories can be listed, * - symlinks can be examined with `readlink`, * - regular files can be opened and read. * * Returns 0 on success, -1 on failure. * * Example output: * * dir: directory * dir/file: file * [dir/file] contents of dir/file * dir/dir2: directory * dir/dir2/link: link: /link/target */ int dump_path(const char* path); #endif /* DUMP_H_ */
/* Documentation Copyright (C) 2012-2014 by Martin Langlotz This file is part of evillib. evillib 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. evillib 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 evillib. If not, see <http://www.gnu.org/licenses/>. */ /** @~english @mainpage EvilLib - A simple/small/stable Library @image html evillib-logo.png @~ @author Stackshadow ( Martin Langlotz ) @author Brainweasel @~english ## Idea The evillib is a small library which is created and grown by our projects, or from the people out there. \n Goal of the evillib is to provide an easy to use, clear, and powerfull toolkit, according to the K.I.S.S - principle @defgroup compile How to compile ## First step ### Download #### github You can clone or download the evillib from github #### evilbrain ### Compile #### Preconditions - a c-compiler - c-library - libblkid for Block-Device support - libcryptsetup For cryptsetup support @todo add precompiler flags to enable/disable Blockdevice / cryptsetup support #### Compile - to compile the library cd to source - use \code{.cpp} make help \endcode to get the targets to see how you can change the default compile settings of the evillib, see @ref compileOptions */ /** Core Functions @~english @defgroup grCore Core - Functions @brief Core Functions These are the core functions of the evillib */ // Here are definitions which are needed in the doc #define ET_DEBUG_OFF #define ET_SECURE_MEMORY_OFF
/***************************************************************************** Copyright (c) 2010, Intel Corp. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Intel Corporation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ****************************************************************************** * Contents: Native middle-level C interface to LAPACK function zhpev * Author: Intel Corporation * Generated October, 2010 *****************************************************************************/ #include "lapacke.h" #include "lapacke_utils.h" lapack_int LAPACKE_zhpev_work( int matrix_order, char jobz, char uplo, lapack_int n, lapack_complex_double* ap, double* w, lapack_complex_double* z, lapack_int ldz, lapack_complex_double* work, double* rwork ) { lapack_int info = 0; if( matrix_order == LAPACK_COL_MAJOR ) { /* Call LAPACK function and adjust info */ LAPACK_zhpev( &jobz, &uplo, &n, ap, w, z, &ldz, work, rwork, &info ); if( info < 0 ) { info = info - 1; } } else if( matrix_order == LAPACK_ROW_MAJOR ) { lapack_int ldz_t = MAX(1,n); lapack_complex_double* z_t = NULL; lapack_complex_double* ap_t = NULL; /* Check leading dimension(s) */ if( ldz < n ) { info = -8; LAPACKE_xerbla( "LAPACKE_zhpev_work", info ); return info; } /* Allocate memory for temporary array(s) */ if( LAPACKE_lsame( jobz, 'v' ) ) { z_t = (lapack_complex_double*) LAPACKE_malloc( sizeof(lapack_complex_double) * ldz_t * MAX(1,n) ); if( z_t == NULL ) { info = LAPACK_TRANSPOSE_MEMORY_ERROR; goto exit_level_0; } } ap_t = (lapack_complex_double*) LAPACKE_malloc( sizeof(lapack_complex_double) * ( MAX(1,n) * MAX(2,n+1) ) / 2 ); if( ap_t == NULL ) { info = LAPACK_TRANSPOSE_MEMORY_ERROR; goto exit_level_1; } /* Transpose input matrices */ LAPACKE_zhp_trans( matrix_order, uplo, n, ap, ap_t ); /* Call LAPACK function and adjust info */ LAPACK_zhpev( &jobz, &uplo, &n, ap_t, w, z_t, &ldz_t, work, rwork, &info ); if( info < 0 ) { info = info - 1; } /* Transpose output matrices */ if( LAPACKE_lsame( jobz, 'v' ) ) { LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, z_t, ldz_t, z, ldz ); } LAPACKE_zhp_trans( LAPACK_COL_MAJOR, uplo, n, ap_t, ap ); /* Release memory and exit */ LAPACKE_free( ap_t ); exit_level_1: if( LAPACKE_lsame( jobz, 'v' ) ) { LAPACKE_free( z_t ); } exit_level_0: if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) { LAPACKE_xerbla( "LAPACKE_zhpev_work", info ); } } else { info = -1; LAPACKE_xerbla( "LAPACKE_zhpev_work", info ); } return info; }
/* This file is part of the Nepomuk KDE project. Copyright (C) 2010 Sebastian Trueg <trueg@kde.org> Copyright (C) 2011 Vishesh Handa <handa.vish@gmail.com> This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) version 3, or any later version accepted by the membership of KDE e.V. (or its successor approved by the membership of KDE e.V.), which shall act as a proxy defined in Section 6 of version 3 of the license. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library. If not, see <http://www.gnu.org/licenses/>. */ #ifndef _NEPOMUK_STRIG_INDEXER_H_ #define _NEPOMUK_STRIG_INDEXER_H_ #include <QtCore/QObject> #include <QtCore/QStringList> #include <KUrl> namespace Nepomuk2 { class Resource; class ExtractorPluginManager; class SimpleResourceGraph; class Indexer : public QObject { Q_OBJECT public: /** * Create a new indexer. */ Indexer( QObject* parent = 0 ); /** * Destructor */ ~Indexer(); /** * Index a single local file or folder (files in a folder will * not be indexed recursively). * * This method just calls the appropriate file indexing plugins and then saves * the graph. */ bool indexFile( const KUrl& url ); /** * Extracts the SimpleResourceGraph of the local file or folder and returns it. * This is used in the rare cases when one does not wish to index the file, one * just wants to see the indexed information */ Nepomuk2::SimpleResourceGraph indexFileGraph( const QUrl& url ); QString lastError() const; private: QString m_lastError; ExtractorPluginManager* m_extractorManager; void updateIndexingLevel( const QUrl& uri, int level ); /** * Sets the nie:plainTextContent as \p plainText. The parameter \p plainText * might be modified in the process, if it is too large. */ void setNiePlainTextContent( const QUrl& uri, QString& plainText ); bool clearIndexingData( const QUrl& url ); bool simpleIndex( const QUrl& url, QUrl* uri, QString* mimetype ); bool fileIndex( const QUrl& uri, const QUrl& url, const QString& mimeType ); }; } #endif
#import <XCTest/XCTest.h> @interface EJDBQueryTests : XCTestCase @end
/******************************************************/ /* */ /* filltest.h - test how well numbers fill space */ /* */ /******************************************************/ /* Copyright 2018,2019 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 <vector> #include "quadlods.h" #include "ps.h" /* For an n-dimensional sequence, pick n random points, and note how close * the quasirandom points get to the random points. Graph the determinant * and the average distance. */ double distsq(std::vector<double> a,std::vector<double> b); void filltest(Quadlods &quad,int iters,PostScript &ps);
// // AKAudioInputFFTPlot.h // AudioKit // // Created by Aurelius Prochazka on 2/8/15. // Copyright (c) 2015 Aurelius Prochazka. All rights reserved. // @import Foundation; #if TARGET_OS_IPHONE @import UIKit; /// Plots the FFT of the audio input IB_DESIGNABLE @interface AKAudioInputFFTPlot : UIView @property IBInspectable UIColor *lineColor; #elif TARGET_OS_MAC @import Cocoa; /// Plots the FFT of the audio input IB_DESIGNABLE @interface AKAudioInputFFTPlot : NSView @property IBInspectable NSColor *lineColor; #endif @property IBInspectable CGFloat lineWidth; @end
#pragma once class DeviceMemManager { }
// Created file "Lib\src\Uuid\X64\netcfgx_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(IID_INetCfgClassSetup, 0xc0e8ae9d, 0x306e, 0x11d1, 0xaa, 0xcf, 0x00, 0x80, 0x5f, 0xc1, 0x27, 0x0e);
// Created file "Lib\src\Uuid\i_mshtml" 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_IHTMLDialog2, 0x3050f5e0, 0x98b5, 0x11cf, 0xbb, 0x82, 0x00, 0xaa, 0x00, 0xbd, 0xce, 0x0b);
/** * || ____ _ __ * +------+ / __ )(_) /_______________ _____ ___ * | 0xBC | / __ / / __/ ___/ ___/ __ `/_ / / _ \ * +------+ / /_/ / / /_/ /__/ / / /_/ / / /_/ __/ * || || /_____/_/\__/\___/_/ \__,_/ /___/\___/ * * Copyright (c) 2014, Bitcraze AB, All rights reserved. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 3.0 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. */ #ifndef __BUTTON_H__ #define __BUTTON_H__ #define BUTTON_PRESSED 0UL #define BUTTON_RELEASED 1UL #define BUTTON_LONGPRESS_TICK 1000 typedef enum {buttonIdle=0, buttonShortPress, buttonLongPress} ButtonEvent; void buttonInit(ButtonEvent initialEvent); void buttonProcess(); ButtonEvent buttonGetState(); #endif //__BUTTON_H__
#pragma once #include <isomatch.h> CircuitGroup* parse(const char* path);
/* 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_SSMCONTACTSCLIENT_P_H #define QTAWS_SSMCONTACTSCLIENT_P_H #include "core/awsabstractclient_p.h" class QNetworkAccessManager; namespace QtAws { namespace SSMContacts { class SSMContactsClient; class SSMContactsClientPrivate : public QtAws::Core::AwsAbstractClientPrivate { public: explicit SSMContactsClientPrivate(SSMContactsClient * const q); private: Q_DECLARE_PUBLIC(SSMContactsClient) Q_DISABLE_COPY(SSMContactsClientPrivate) }; } // namespace SSMContacts } // namespace QtAws #endif
/* SPI.h http://konekt.io Copyright (c) 2015 Konekt, Inc. All rights reserved. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef _SPI_H_INCLUDED #define _SPI_H_INCLUDED #include "Arduino.h" #include "hal/fsl_dspi_hal.h" // SPI_HAS_TRANSACTION means SPI has // - beginTransaction() // - endTransaction() // - usingInterrupt() // - SPISetting(clock, bitOrder, dataMode) #define SPI_HAS_TRANSACTION 1 // SPI_HAS_EXTENDED_CS_PIN_HANDLING means SPI has automatic // CS pin handling and provides the following methods: // - begin(pin) // - end(pin) // - setBitOrder(pin, bitorder) // - setDataMode(pin, datamode) // - setClockDivider(pin, clockdiv) // - transfer(pin, data, SPI_LAST/SPI_CONTINUE) // - beginTransaction(pin, SPISettings settings) (if transactions are available) #define SPI_HAS_EXTENDED_CS_PIN_HANDLING 1 #define SPI_MODE0 0x00 #define SPI_MODE1 0x01 #define SPI_MODE2 0x02 #define SPI_MODE3 0x03 // For compatibility with sketches designed for AVR @ 16 MHz // New programs should use SPI.beginTransaction to set the SPI clock #define SPI_CLOCK_DIV2 2 #define SPI_CLOCK_DIV4 4 #define SPI_CLOCK_DIV8 8 #define SPI_CLOCK_DIV16 16 #define SPI_CLOCK_DIV32 32 #define SPI_CLOCK_DIV64 64 #define SPI_CLOCK_DIV128 128 class SPISettings { public: SPISettings(uint32_t clock, BitOrder bitOrder, uint8_t mode); SPISettings() : SPISettings(1000000, MSBFIRST, SPI_MODE0){} uint32_t clockFreq; dspi_clock_polarity_t polarity; dspi_clock_phase_t phase; dspi_shift_direction_t direction; friend class Spi; }; class Spi { public: Spi(SPI_Type * instance, sim_clock_gate_name_t gate_name, uint32_t clock, uint32_t sin, uint32_t sout, uint32_t sck); uint8_t transfer(uint8_t data=0); inline void transfer(void *buf, size_t count); // SPI Configuration methods void attachInterrupt(void); void detachInterrupt(void); void begin(); void end(); void usingInterrupt(uint8_t interruptNumber); void beginTransaction(SPISettings settings) { beginTransaction(BOARD_SPI_DEFAULT_SS, settings); } uint32_t beginTransaction(uint32_t chip_select); uint32_t beginTransaction(uint32_t chip_select, SPISettings settings); void endTransaction(); void setBitOrder(uint8_t pin, BitOrder order); void setDataMode(uint8_t pin, uint8_t mode); void setClockDivider(uint8_t pin, uint8_t div); // These methods sets the same parameters but on default pin BOARD_SPI_DEFAULT_SS void setBitOrder(BitOrder order) { setBitOrder(BOARD_SPI_DEFAULT_SS, order); }; void setDataMode(uint8_t mode) { setDataMode(BOARD_SPI_DEFAULT_SS, mode); }; void setClockDivider(uint8_t div) { setClockDivider(BOARD_SPI_DEFAULT_SS, div); }; // This function is deprecated. New applications should use // beginTransaction() to configure SPI settings. void setClockFrequency(uint32_t clockFrequency); private: SPI_Type * instance; sim_clock_gate_name_t gate_name; uint32_t clock; uint32_t sin; uint32_t sout; uint32_t sck; uint32_t cs; uint32_t last_rate; SPISettings current_settings; void applySettings(); void applySettings(SPISettings settings); }; void Spi::transfer(void *buf, size_t count) { uint8_t *buffer = reinterpret_cast<uint8_t *>(buf); for (size_t i=0; i<count; i++) buffer[i] = transfer(buffer[i]); } extern Spi SPI; #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_DESCRIBEAPPLICATIONSNAPSHOTREQUEST_H #define QTAWS_DESCRIBEAPPLICATIONSNAPSHOTREQUEST_H #include "kinesisanalyticsv2request.h" namespace QtAws { namespace KinesisAnalyticsV2 { class DescribeApplicationSnapshotRequestPrivate; class QTAWSKINESISANALYTICSV2_EXPORT DescribeApplicationSnapshotRequest : public KinesisAnalyticsV2Request { public: DescribeApplicationSnapshotRequest(const DescribeApplicationSnapshotRequest &other); DescribeApplicationSnapshotRequest(); virtual bool isValid() const Q_DECL_OVERRIDE; protected: virtual QtAws::Core::AwsAbstractResponse * response(QNetworkReply * const reply) const Q_DECL_OVERRIDE; private: Q_DECLARE_PRIVATE(DescribeApplicationSnapshotRequest) }; } // namespace KinesisAnalyticsV2 } // namespace QtAws #endif
#ifndef PRECICE_MAINNATIVEDISPATCHER_H_ #define PRECICE_MAINNATIVEDISPATCHER_H_ #include "precice/Main.h" #include <iostream> #include <vector> namespace precice { class MainNativeDispatcher; } #include <jni.h> #ifdef __cplusplus extern "C" { #endif JNIEXPORT void JNICALL Java_precice_MainNativeDispatcher_createInstance(JNIEnv *env, jobject obj); JNIEXPORT void JNICALL Java_precice_MainNativeDispatcher_destroyInstance(JNIEnv *env, jobject obj,jlong ref); JNIEXPORT void JNICALL Java_precice_MainNativeDispatcher_connect(JNIEnv *env, jobject obj,jlong ref,jlong port); JNIEXPORT void JNICALL Java_precice_MainNativeDispatcher_disconnect(JNIEnv *env, jobject obj,jlong ref,jlong port); #ifdef __cplusplus } #endif class precice::MainNativeDispatcher: public precice::Main{ protected: std::vector<precice::Main*> _destinations; public: MainNativeDispatcher(); virtual ~MainNativeDispatcher(); void connect(precice::Main* ref); void disconnect(precice::Main* ref); bool isConnected() const; void main(); void mainParallel(); }; #endif
// stdafx.h : include file for standard system include files, // or project specific include files that are used frequently, but // are changed infrequently // #if defined (_MSC_VER) #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers // *NOTE*: work around quirky MSVC... #define NOMINMAX #include "targetver.h" // Windows Header Files #include "windows.h" #endif // _MSC_VER // C RunTime Header Files #include <string> #if defined (VALGRIND_USE) #include "valgrind/valgrind.h" #endif // VALGRIND_USE // System Library Header Files #include "ace/config-lite.h" #include "ace/Global_Macros.h" #include "ace/Log_Msg.h" // Library Header Files #if defined (HAVE_CONFIG_H) #include "Common_config.h" #endif // HAVE_CONFIG_H #include "common.h" #include "common_macros.h" #include "common_pragmas.h" #if defined (HAVE_CONFIG_H) #include "ACEStream_config.h" #endif // HAVE_CONFIG_H #include "stream_common.h" #include "stream_macros.h" // Local Header Files #if defined (HAVE_CONFIG_H) #include "ACENetwork_config.h" #endif // HAVE_CONFIG_H #include "net_common.h" #include "net_macros.h" #include "test_u_HTTP_decoder_common.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_ASSOCIATETRANSITGATEWAYCONNECTPEERRESPONSE_P_H #define QTAWS_ASSOCIATETRANSITGATEWAYCONNECTPEERRESPONSE_P_H #include "networkmanagerresponse_p.h" namespace QtAws { namespace NetworkManager { class AssociateTransitGatewayConnectPeerResponse; class AssociateTransitGatewayConnectPeerResponsePrivate : public NetworkManagerResponsePrivate { public: explicit AssociateTransitGatewayConnectPeerResponsePrivate(AssociateTransitGatewayConnectPeerResponse * const q); void parseAssociateTransitGatewayConnectPeerResponse(QXmlStreamReader &xml); private: Q_DECLARE_PUBLIC(AssociateTransitGatewayConnectPeerResponse) Q_DISABLE_COPY(AssociateTransitGatewayConnectPeerResponsePrivate) }; } // namespace NetworkManager } // namespace QtAws #endif
/* thot package for statistical machine translation Copyright (C) 2013 Daniel Ortiz-Mart\'inez This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; If not, see <http://www.gnu.org/licenses/>. */ #ifndef _ThotDecoderUserPars_h #define _ThotDecoderUserPars_h //--------------- Include files -------------------------------------- #if HAVE_CONFIG_H # include <thot_config.h> #endif /* HAVE_CONFIG_H */ #include <WordGraph.h> #include <string> //--------------- Constants ------------------------------------------ #define TD_USER_S_DEFAULT 10 #define TD_USER_BE_DEFAULT false #define TD_USER_G_DEFAULT 0 #define TD_USER_NP_DEFAULT 10 #define TD_USER_WGP_DEFAULT UNLIMITED_DENSITY #define TD_USER_SP_DEFAULT 0 //--------------- Classes -------------------------------------------- class ThotDecoderUserPars { public: unsigned int S; bool be; unsigned int G; unsigned int np; float wgp; std::string wgh_str; unsigned int sp; std::string uc_str; std::vector<float> catWeightsVec; ThotDecoderUserPars() { default_values(); } void default_values(void) { S=TD_USER_S_DEFAULT; be=TD_USER_BE_DEFAULT; G=TD_USER_G_DEFAULT; np=TD_USER_NP_DEFAULT; wgp=TD_USER_WGP_DEFAULT; sp=TD_USER_SP_DEFAULT; uc_str="";//"/home/dortiz/traduccion/software/smt_preproc/data/training.enes.en.sim.tabla"; wgh_str=""; catWeightsVec.clear(); } }; #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_TAGMFADEVICERESPONSE_P_H #define QTAWS_TAGMFADEVICERESPONSE_P_H #include "iamresponse_p.h" namespace QtAws { namespace IAM { class TagMFADeviceResponse; class TagMFADeviceResponsePrivate : public IamResponsePrivate { public: explicit TagMFADeviceResponsePrivate(TagMFADeviceResponse * const q); void parseTagMFADeviceResponse(QXmlStreamReader &xml); private: Q_DECLARE_PUBLIC(TagMFADeviceResponse) Q_DISABLE_COPY(TagMFADeviceResponsePrivate) }; } // namespace IAM } // namespace QtAws #endif
#ifndef TGLVIEWPORTPROPDIALOG_H #define TGLVIEWPORTPROPDIALOG_H #include <QDialog> #include "ui_TGLViewportPropDialog.h" #include "..\modTCADLibRefs.h" namespace TGL{ class TGLViewport; class TGLOverlayViewport; class TGLViewportPropDialog : public QDialog { Q_OBJECT public: TGLViewportPropDialog(QWidget *parent = 0); ~TGLViewportPropDialog(); void SetViewportPtr(TGLViewport * ptrViewport); //render properties/////////////////////////// void Set_enumProjectionMode(TGLProjectionMode objMode){m_enumProjectionMode = objMode; return;}; TGLProjectionMode Get_enumProjectionMode(void){return m_enumProjectionMode;}; void Set_enumRenderMode(TGLRenderMode objMode){m_enumRenderMode = objMode; return;}; TGLRenderMode Get_enumRenderMode(void){return m_enumRenderMode;}; void Set_blnAntiAliasingEnable(bool blnEnable){m_blnAntiAliasingEnable = blnEnable; return;}; bool Get_blnAntiAliasingEnable(void){return m_blnAntiAliasingEnable;}; //Display Properties////////////////////////// void Set_blnUniformBackgroundColor(bool blnUniform){m_blnUniformBackgroundColor = blnUniform; return;}; bool Get_blnUniformBackgroundColor(void){return m_blnUniformBackgroundColor;}; void Set_objBackgroundTopColor(TGLColor objColor){m_objBackgroundTopColor = objColor; return;}; TGLColor Get_objBackgroundTopColor(void){return m_objBackgroundTopColor;}; void Set_objBackgroundBottomColor(TGLColor objColor){m_objBackgroundBottomColor = objColor; return;}; TGLColor Get_objBackgroundBottomColor(void){return m_objBackgroundBottomColor;}; void Set_blnWCSIconAtOrigin(bool blnAtOrigin){m_blnWCSIconAtOrigin = blnAtOrigin; return;}; bool Get_blnWCSIconAtOrigin(void){return m_blnWCSIconAtOrigin;}; //Navigation Properties/////////////////////// void Set_blnLockXAxis(bool blnLockX){m_blnLockXAxis = blnLockX; return;}; bool Get_blnLockXAxis(void){return m_blnLockXAxis;}; void Set_blnLockYAxis(bool blnLockY){m_blnLockYAxis = blnLockY; return;}; bool Get_blnLockYAxis(void){return m_blnLockYAxis;}; void Set_blnLockZAxis(bool blnLockZ){m_blnLockZAxis = blnLockZ; return;}; bool Get_blnLockZAxis(void){return m_blnLockZAxis;}; void Set_blnLockOrthogonal(bool blnLockOrtho){m_blnLockOrthogonal = blnLockOrtho; return;}; bool Get_blnLockOrthogonal(void){return m_blnLockOrthogonal;}; protected: void InitializeDialog(void); void ApplyViewportProps(void); protected slots: void OnOK_Click(void); void OnCANCEL_Click(void); void OnChangeTopColor_Click(void); void OnChangeBottomColorClick(void); private: Ui::TGLViewportPropDialogClass ui; TGLViewport * m_ptrViewport; //render properties/////////////////////////// TGLProjectionMode m_enumProjectionMode; TGLRenderMode m_enumRenderMode; bool m_blnAntiAliasingEnable; bool m_blnDisplayOverlay; //Display Properties////////////////////////// bool m_blnUniformBackgroundColor; TGLColor m_objBackgroundTopColor; TGLColor m_objBackgroundBottomColor; bool m_blnWCSIconAtOrigin; //Navigation Properties/////////////////////// bool m_blnLockXAxis; bool m_blnLockYAxis; bool m_blnLockZAxis; bool m_blnLockOrthogonal; //Selection Properties/////////////////////// bool m_blnSelectionEnabled; bool m_blnSingleSelect; }; };//end namespace #endif // TGLVIEWPORTPROPDIALOG_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_GETASSESSMENTRESPONSE_H #define QTAWS_GETASSESSMENTRESPONSE_H #include "auditmanagerresponse.h" #include "getassessmentrequest.h" namespace QtAws { namespace AuditManager { class GetAssessmentResponsePrivate; class QTAWSAUDITMANAGER_EXPORT GetAssessmentResponse : public AuditManagerResponse { Q_OBJECT public: GetAssessmentResponse(const GetAssessmentRequest &request, QNetworkReply * const reply, QObject * const parent = 0); virtual const GetAssessmentRequest * request() const Q_DECL_OVERRIDE; protected slots: virtual void parseSuccess(QIODevice &response) Q_DECL_OVERRIDE; private: Q_DECLARE_PRIVATE(GetAssessmentResponse) Q_DISABLE_COPY(GetAssessmentResponse) }; } // namespace AuditManager } // namespace QtAws #endif
/** * @file stm32f4x7_eth_bsp.c * @brief Driver for the DP83848 Ethernet PHY. * * This file contains the definitions for the driver for the DP83848 Ethernet PHY * as connected to the STM324x9I-EVAL2 dev board. * * @date 06/09/2014 * @author Harry Rostovtsev * @email harry_rostovtsev@datacard.com * Copyright (C) 2014 Datacard. All rights reserved. * * @addtogroup groupEthernet * @{ */ /* Define to prevent recursive inclusion -------------------------------------*/ #ifndef __STM32F4x7_ETH_BSP_H #define __STM32F4x7_ETH_BSP_H #ifdef __cplusplus extern "C" { #endif /* Includes ------------------------------------------------------------------*/ /* Exported types ------------------------------------------------------------*/ /* Exported constants --------------------------------------------------------*/ #define MII_MODE #ifdef MII_MODE /* Uncomment if you want to use the internal oscillator. Make sure to set the * jumper on the eval kit appropriately. */ // #define PHY_CLOCK_MCO #endif #define DP83848_PHY_ADDRESS 0x01 /* Relative to STM324x9I-EVAL Board */ /* Specific defines for EXTI line, used to manage Ethernet link status */ #define ETH_LINK_EXTI_LINE EXTI_Line14 #define ETH_LINK_EXTI_PORT_SOURCE EXTI_PortSourceGPIOB #define ETH_LINK_EXTI_PIN_SOURCE EXTI_PinSource14 #define ETH_LINK_EXTI_IRQn EXTI15_10_IRQn /* PB14 */ #define ETH_LINK_PIN GPIO_Pin_14 #define ETH_LINK_GPIO_PORT GPIOB #define ETH_LINK_GPIO_CLK RCC_AHB1Periph_GPIOB /* PHY registers */ #define PHY_MICR 0x11 /* MII Interrupt Control Register */ #define PHY_MICR_INT_EN ((uint16_t)0x0002) /* PHY Enable interrupts */ #define PHY_MICR_INT_OE ((uint16_t)0x0001) /* PHY Enable output interrupt events */ #define PHY_MISR 0x12 /* MII Interrupt Status and Misc. Control Register */ #define PHY_MISR_LINK_INT_EN ((uint16_t)0x0020) /* Enable Interrupt on change of link status */ #define PHY_LINK_STATUS ((uint16_t)0x2000) /* PHY link status interrupt mask */ /* Exported macro ------------------------------------------------------------*/ /* Exported functions ------------------------------------------------------- */ /** * @brief Configure ethernet, PHY, MAC, and EthDMA. * @param None * @retval None */ void ETH_BSP_Config( void ); /** * @brief Configure the PHY to generate an interrupt on change of link status. * @param PHYAddress: external PHY address * @retval None */ uint32_t Eth_Link_PHYITConfig( uint16_t PHYAddress ); /** * @brief EXTI configuration for Ethernet link status. * @param PHYAddress: external PHY address * @retval None */ void Eth_Link_EXTIConfig( void ); /** * @brief This function handles Ethernet link status. It should be called from * the actual ISR that handles the EXTI line that is connected to the MII_INT * pin on the PHY. * @param None * @retval None */ void Eth_Link_ITHandler( uint16_t PHYAddress ); #ifdef __cplusplus } #endif /** * @} end group groupEthernet */ #endif /* __STM32F4x7_ETH_BSP_H */ /******** Copyright (C) 2014 Datacard. All rights reserved *****END OF FILE****/
/* 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_CREATESIMULATIONJOBREQUEST_H #define QTAWS_CREATESIMULATIONJOBREQUEST_H #include "robomakerrequest.h" namespace QtAws { namespace RoboMaker { class CreateSimulationJobRequestPrivate; class QTAWSROBOMAKER_EXPORT CreateSimulationJobRequest : public RoboMakerRequest { public: CreateSimulationJobRequest(const CreateSimulationJobRequest &other); CreateSimulationJobRequest(); virtual bool isValid() const Q_DECL_OVERRIDE; protected: virtual QtAws::Core::AwsAbstractResponse * response(QNetworkReply * const reply) const Q_DECL_OVERRIDE; private: Q_DECLARE_PRIVATE(CreateSimulationJobRequest) }; } // namespace RoboMaker } // namespace QtAws #endif
/* RExOS - embedded RTOS Copyright (c) 2011-2019, RExOS team All rights reserved. author: Alexey E. Kramarenko (alexeyk13@yandex.ru) */ #ifndef SCSIS_PC_H #define SCSIS_PC_H /* SCSI primary commands. Based on revision 4, release 37a */ #include "scsis.h" void scsis_pc_inquiry(SCSIS* scsis, uint8_t* req); void scsis_pc_test_unit_ready(SCSIS* scsis, uint8_t* req); void scsis_pc_mode_sense6(SCSIS* scsis, uint8_t* req); void scsis_pc_mode_sense10(SCSIS* scsis, uint8_t* req); void scsis_pc_mode_select6(SCSIS* scsis, uint8_t* req); void scsis_pc_mode_select10(SCSIS* scsis, uint8_t* req); void scsis_pc_request_sense(SCSIS* scsis, uint8_t* req); void scsis_pc_prevent_allow_medium_removal(SCSIS* scsis, uint8_t* req); #endif // SCSIS_PC_H
/* * @BEGIN LICENSE * * Psi4: an open-source quantum chemistry software package * * Copyright (c) 2007-2017 The Psi4 Developers. * * The copyrights for code used from other parties are included in * the corresponding files. * * This file is part of Psi4. * * Psi4 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, version 3. * * Psi4 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 Psi4; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * @END LICENSE */ #ifndef _psi_src_bin_psimrcc_index_types_h_ #define _psi_src_bin_psimrcc_index_types_h_ typedef std::map<std::string,psi::psimrcc::CCIndex*> IndexMap; #endif // _psi_src_bin_psimrcc_index_types_h_
/* * Language (table) entry functions * * 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( _LIBWRC_LANGUAGE_ENTRY_H ) #define _LIBWRC_LANGUAGE_ENTRY_H #include <common.h> #include <types.h> #include "libwrc_libcdata.h" #include "libwrc_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libwrc_language_entry libwrc_language_entry_t; struct libwrc_language_entry { /* The language identifier */ uint32_t language_identifier; /* The values array */ libcdata_array_t *values_array; /* The language entry value free function */ int (*value_free_function)( intptr_t **value, libcerror_error_t **error ); }; int libwrc_language_entry_initialize( libwrc_language_entry_t **language_entry, uint32_t language_identifier, int (*value_free_function)( intptr_t **value, libcerror_error_t **error ), libcerror_error_t **error ); int libwrc_language_entry_free( libwrc_language_entry_t **language_entry, libcerror_error_t **error ); int libwrc_language_entry_get_number_of_values( libwrc_language_entry_t *language_entry, int *number_of_values, libcerror_error_t **error ); int libwrc_language_entry_get_value_by_index( libwrc_language_entry_t *language_entry, int value_index, intptr_t **value, libcerror_error_t **error ); int libwrc_language_entry_append_value( libwrc_language_entry_t *language_entry, int *value_index, intptr_t *value, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _LIBWRC_LANGUAGE_ENTRY_H ) */
#pragma once #include "simplevar.h" class Operation : public SimpleVar { public: Operation(void); ~Operation(void); string operator_; SimpleVar* operand; };
#include <blokus/strategy/default.h> bool blokus_strategy_default( struct blokus_move *move, struct blokus_game *game, void *context ) { return false; }
// Created file "Lib\src\dxguid\X64\d3d10guid" 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(PPM_THERMAL_POLICY_CHANGE_GUID, 0x48f377b8, 0x6880, 0x4c7b, 0x8b, 0xdc, 0x38, 0x01, 0x76, 0xc6, 0x65, 0x4d);
// Copyright 2006-2014 Coppelia Robotics GmbH. All rights reserved. // marc@coppeliarobotics.com // www.coppeliarobotics.com // // ------------------------------------------------------------------- // THIS FILE IS DISTRIBUTED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED // WARRANTY. THE USER WILL USE IT AT HIS/HER OWN RISK. THE ORIGINAL // AUTHORS AND COPPELIA ROBOTICS GMBH WILL NOT BE LIABLE FOR DATA LOSS, // DAMAGES, LOSS OF PROFITS OR ANY OTHER KIND OF LOSS WHILE USING OR // MISUSING THIS SOFTWARE. // // You are free to use/modify/distribute this file for whatever purpose! // ------------------------------------------------------------------- // // This file was automatically created for V-REP release V3.2.0 on Feb. 3rd 2015 #ifndef V_REPEXTROSSKELETON_H #define V_REPEXTROSSKELETON_H #define VREP_DLLEXPORT extern "C" // The 3 required entry points of the V-REP plugin: VREP_DLLEXPORT unsigned char v_repStart(void* reservedPointer,int reservedInt); VREP_DLLEXPORT void v_repEnd(); VREP_DLLEXPORT void* v_repMessage(int message,int* auxiliaryData,void* customData,int* replyData); #endif
// Copyright (C) 2016 Thomas Voss <thomas.voss.bochum@gmail.com> // // This library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published // by the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. #ifndef UBX_8_NMEA_UTC_H_ #define UBX_8_NMEA_UTC_H_ #include <cstdint> namespace ubx { namespace _8 { namespace nmea { /// @brief Time in UTC. struct Utc { std::uint8_t hours; std::uint8_t minutes; double seconds; }; } } } #endif // UBX_8_NMEA_UTC_H_
// Created file "Lib\src\Uuid\fwpapi" typedef struct _GUID { unsigned long Data1; unsigned short Data2; unsigned short Data3; unsigned char Data4[8]; } GUID; #define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ extern const GUID name = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } } DEFINE_GUID(FWPM_CONDITION_IP_LOCAL_ADDRESS_V6, 0x2381be84, 0x7524, 0x45b3, 0xa0, 0x5b, 0x1e, 0x63, 0x7d, 0x9c, 0x7a, 0x6a);
// Created file "Lib\src\Uuid\X64\cguid_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_StdPicture, 0x0be35204, 0x8f91, 0x11ce, 0x9d, 0xe3, 0x00, 0xaa, 0x00, 0x4b, 0xb8, 0x51);
/* -*- mode: c++; c-file-style: "gnu" -*- * Copyright (C) 2014 Cryptotronix, LLC. * * This file is part of cryptoauth-arduino. * * cryptoauth-arduino 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 * any later version. * * cryptoauth-arduino 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 cryptoauth-arduino. If not, see <http://www.gnu.org/licenses/>. * */ #ifndef LIB_ATSHA204_H_ #define LIB_ATSHA204_H_ #include <Arduino.h> #include "CryptoBuffer.h" #include "../atsha204-atmel/sha204_comm_marshaling.h" #include "../ateccX08-atmel/eccX08_physical.h" #include "../ateccX08-atmel/eccX08_comm.h" class AtSha204 { public: AtSha204(); ~AtSha204(); CryptoBuffer rsp; uint8_t getRandom(); uint8_t macBasic(uint8_t *to_mac, int len); uint8_t checkMacBasic(uint8_t *to_mac, int len, uint8_t *rsp); void enableDebug(Stream* stream); void calculate_sha256(int32_t len, uint8_t *message, uint8_t *digest); protected: uint8_t command[ECCX08_CMD_SIZE_MAX]; uint8_t temp[ECCX08_RSP_SIZE_MAX]; Stream *debugStream = NULL; uint8_t checkResponseStatus(uint8_t ret_code, uint8_t *response) const; void idle(); }; #endif
/* * ISO 8859-3 codepage (Latin 3) functions * * Copyright (c) 2009, Joachim Metz <forensics@hoffmannbv.nl>, * Hoffmann Investigations. * * 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( _LIBUNA_CODEPAGE_ISO_8859_3_H ) #define _LIBUNA_CODEPAGE_ISO_8859_3_H #include <common.h> #include <types.h> #if defined( __cplusplus ) extern "C" { #endif extern const uint16_t libuna_codepage_iso_8859_3_byte_stream_to_unicode_base_0xa0[ 96 ]; extern const uint8_t libuna_codepage_iso_8859_3_unicode_to_byte_stream_base_0x00a0[ 96 ]; extern const uint8_t libuna_codepage_iso_8859_3_unicode_to_byte_stream_base_0x0108[ 8 ]; extern const uint8_t libuna_codepage_iso_8859_3_unicode_to_byte_stream_base_0x0118[ 16 ]; extern const uint8_t libuna_codepage_iso_8859_3_unicode_to_byte_stream_base_0x0130[ 8 ]; extern const uint8_t libuna_codepage_iso_8859_3_unicode_to_byte_stream_base_0x0158[ 8 ]; #define libuna_codepage_iso_8859_3_byte_stream_to_unicode( byte_stream_character ) \ ( byte_stream_character < 0xa0 ) ? byte_stream_character : libuna_codepage_iso_8859_3_byte_stream_to_unicode_base_0xa0[ byte_stream_character - 0xa0 ] #define libuna_codepage_iso_8859_3_unicode_to_byte_stream( unicode_character ) \ ( unicode_character < 0x00a0 ) ? (uint8_t) unicode_character : \ ( ( unicode_character >= 0x00a0 ) && ( unicode_character < 0x0100 ) ) ? libuna_codepage_iso_8859_3_unicode_to_byte_stream_base_0x00a0[ unicode_character - 0x00a0 ] : \ ( ( unicode_character >= 0x0108 ) && ( unicode_character < 0x0110 ) ) ? libuna_codepage_iso_8859_3_unicode_to_byte_stream_base_0x0108[ unicode_character - 0x0108 ] : \ ( ( unicode_character >= 0x0118 ) && ( unicode_character < 0x0128 ) ) ? libuna_codepage_iso_8859_3_unicode_to_byte_stream_base_0x0118[ unicode_character - 0x0118 ] : \ ( ( unicode_character >= 0x0130 ) && ( unicode_character < 0x0138 ) ) ? libuna_codepage_iso_8859_3_unicode_to_byte_stream_base_0x0130[ unicode_character - 0x0130 ] : \ ( ( unicode_character >= 0x0158 ) && ( unicode_character < 0x0160 ) ) ? libuna_codepage_iso_8859_3_unicode_to_byte_stream_base_0x0158[ unicode_character - 0x0158 ] : \ ( unicode_character == 0x016c ) ? 0xdd : \ ( unicode_character == 0x016d ) ? 0xfd : \ ( unicode_character == 0x017b ) ? 0xaf : \ ( unicode_character == 0x017c ) ? 0xbf : \ ( unicode_character == 0x02d8 ) ? 0xa2 : \ ( unicode_character == 0x02d9 ) ? 0xff : \ 0x1a #if defined( __cplusplus ) } #endif #endif
/* * ETA/OS - Python VM * Copyright (C) 2017 Michel Megens <dev@bietje.net> * Copyright (C) 2017 Dean Hall * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #undef __FILE_ID__ #define __FILE_ID__ 0x0E /** * \file * \brief Module Object Type * * Module object type operations. */ #include <etaos/python.h> PmReturn_t mod_new(pPmObj_t pco, pPmObj_t * pmod) { PmReturn_t retval; uint8_t *pchunk; pPmObj_t pobj; uint8_t objid; /* If it's not a code obj, raise TypeError */ if (OBJ_GET_TYPE(pco) != OBJ_TYPE_COB) { PM_RAISE(retval, PM_RET_EX_TYPE); return retval; } /* Alloc and init func obj */ retval = heap_getChunk(sizeof(PmFunc_t), &pchunk); PM_RETURN_IF_ERROR(retval); *pmod = (pPmObj_t) pchunk; OBJ_SET_TYPE(*pmod, OBJ_TYPE_MOD); ((pPmFunc_t) * pmod)->f_co = (pPmCo_t) pco; ((pPmFunc_t) * pmod)->f_attrs = C_NULL; ((pPmFunc_t) * pmod)->f_globals = C_NULL; #ifdef HAVE_DEFAULTARGS /* Clear the default args (only used by funcs) */ ((pPmFunc_t) * pmod)->f_defaultargs = C_NULL; #endif /* HAVE_DEFAULTARGS */ #ifdef HAVE_CLOSURES /* Clear field for closure tuple */ ((pPmFunc_t) * pmod)->f_closure = C_NULL; #endif /* HAVE_CLOSURES */ /* Alloc and init attrs dict */ heap_gcPushTempRoot(*pmod, &objid); retval = dict_new(&pobj); heap_gcPopTempRoot(objid); ((pPmFunc_t) * pmod)->f_attrs = (pPmDict_t) pobj; /* A module's globals is the same as its attrs */ ((pPmFunc_t) * pmod)->f_globals = (pPmDict_t) pobj; return retval; } PmReturn_t mod_import(pPmObj_t pstr, pPmObj_t * pmod) { PmMemSpace_t memspace; uint8_t const *imgaddr = C_NULL; pPmCo_t pco = C_NULL; PmReturn_t retval = PM_RET_OK; pPmObj_t pobj; uint8_t objid; /* If it's not a string obj, raise SyntaxError */ if (OBJ_GET_TYPE(pstr) != OBJ_TYPE_STR) { PM_RAISE(retval, PM_RET_EX_SYNTAX); return retval; } /* Try to find the image in the paths */ retval = img_findInPaths(pstr, &memspace, &imgaddr); /* If img was not found, raise ImportError */ if (retval == PM_RET_NO) { PM_RAISE(retval, PM_RET_EX_IMPRT); return retval; } /* Load img into code obj */ retval = obj_loadFromImg(memspace, &imgaddr, &pobj); PM_RETURN_IF_ERROR(retval); pco = (pPmCo_t) pobj; heap_gcPushTempRoot(pobj, &objid); retval = mod_new((pPmObj_t) pco, pmod); heap_gcPopTempRoot(objid); return retval; }
// Created file "Lib\src\dxguid\X64\d3dxguid" 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(DXFILEOBJ_AnimTicksPerSecond, 0x9e415a43, 0x7ba6, 0x4a73, 0x87, 0x43, 0xb7, 0x3d, 0x47, 0xe8, 0x84, 0x76);
#ifndef SNMALLOC_PAL_NO_ALLOC_H #define SNMALLOC_PAL_NO_ALLOC_H #pragma once #include <cstring> namespace snmalloc { /** * Platform abstraction layer that does not allow allocation. * * This is a minimal PAL for pre-reserved memory regions, where the * address-space manager is initialised with all of the memory that it will * ever use. * * It takes an error handler delegate as a template argument. This is * expected to forward to the default PAL in most cases. */ template<typename ErrorHandler> struct PALNoAlloc { /** * Bitmap of PalFeatures flags indicating the optional features that this * PAL supports. */ static constexpr uint64_t pal_features = NoAllocation; static constexpr size_t page_size = Aal::smallest_page_size; /** * Print a stack trace. */ static void print_stack_trace() { ErrorHandler::print_stack_trace(); } /** * Report a fatal error an exit. */ [[noreturn]] static void error(const char* const str) noexcept { ErrorHandler::error(str); } /** * Notify platform that we will not be using these pages. * * This is a no-op in this stub. */ static void notify_not_using(void*, size_t) noexcept {} /** * Notify platform that we will be using these pages. * * This is a no-op in this stub, except for zeroing memory if required. */ template<ZeroMem zero_mem> static void notify_using(void* p, size_t size) noexcept { if constexpr (zero_mem == YesZero) { zero<true>(p, size); } else { UNUSED(p); UNUSED(size); } } /** * OS specific function for zeroing memory. * * This just calls memset - we don't assume that we have access to any * virtual-memory functions. */ template<bool page_aligned = false> static void zero(void* p, size_t size) noexcept { memset(p, 0, size); } }; } // namespace snmalloc #endif
// UseDlgRegularDllView.h : interface of the CUseDlgRegularDllView class // ///////////////////////////////////////////////////////////////////////////// #if !defined(AFX_USEDLGREGULARDLLVIEW_H__4C2AAA79_FD61_43D0_B60B_911318B05032__INCLUDED_) #define AFX_USEDLGREGULARDLLVIEW_H__4C2AAA79_FD61_43D0_B60B_911318B05032__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 class CUseDlgRegularDllView : public CView { protected: // create from serialization only CUseDlgRegularDllView(); DECLARE_DYNCREATE(CUseDlgRegularDllView) // Attributes public: CUseDlgRegularDllDoc* GetDocument(); // Operations public: // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CUseDlgRegularDllView) public: virtual void OnDraw(CDC* pDC); // overridden to draw this view virtual BOOL PreCreateWindow(CREATESTRUCT& cs); protected: virtual BOOL OnPreparePrinting(CPrintInfo* pInfo); virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo); virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo); //}}AFX_VIRTUAL // Implementation public: virtual ~CUseDlgRegularDllView(); #ifdef _DEBUG virtual void AssertValid() const; virtual void Dump(CDumpContext& dc) const; #endif protected: int m_r,m_g,m_b; // Generated message map functions protected: //{{AFX_MSG(CUseDlgRegularDllView) afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point); //}}AFX_MSG DECLARE_MESSAGE_MAP() }; #ifndef _DEBUG // debug version in UseDlgRegularDllView.cpp inline CUseDlgRegularDllDoc* CUseDlgRegularDllView::GetDocument() { return (CUseDlgRegularDllDoc*)m_pDocument; } #endif ///////////////////////////////////////////////////////////////////////////// //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. #endif // !defined(AFX_USEDLGREGULARDLLVIEW_H__4C2AAA79_FD61_43D0_B60B_911318B05032__INCLUDED_)
// // HBBaseViewController.h // NoteBook // // Created by xubing on 14-9-18. // Copyright (c) 2014年 xubing. All rights reserved. // #import <UIKit/UIKit.h> #import "UIFont+HB.h" #import "UILabel+HB.h" #define STATUS_BAR_H 20 #define NAV_BAR_H 44 #define TAB_BAR_H 49 //系统部分Bar高度 #define FRAME_BETWEEN_NAV_TAB CGRectMake(0, 0, [self windowWidth], [self windowHeight]- STATUS_BAR_H - TAB_BAR_H - NAV_BAR_H) #define FRAME_WITH_NAV CGRectMake(0, 0, [self windowWidth], [self windowHeight] - STATUS_BAR_H - NAV_BAR_H) #define FRAME_WITH_TAB CGRectMake(0, 0, [self windowWidth], [self windowHeight] - 0 - TAB_BAR_H) #define FRAME CGRectMake(0, 0, [self windowWidth], [self windowHeight]) #define ITEM_BTN_FRAME CGRectMake(0, 0, 55, 31) typedef enum { SelectorBackTypePopBack = 0, SelectorBackTypeDismiss, SelectorBackTypePopToRoot, SelectorBackTypeNone } SelectorBackType; @interface HBBaseViewController : UIViewController<UIGestureRecognizerDelegate> @property (nonatomic, assign) SelectorBackType backType; @property (nonatomic, assign) id delegateVC; @property BOOL isHome;//判断是否是首页 是首页没有返回键 - (void)setTitleViewWithString:(NSString *)titleStr; @end
#pragma once #include "Include.h" // CUnitView ºäÀÔ´Ï´Ù. class CUnitTool; class CDevice; class CCamMgr; class CMonster; class CObj; class CUnitView : public CView { DECLARE_DYNCREATE(CUnitView) protected: CUnitView(); // µ¿Àû ¸¸µé±â¿¡ »ç¿ëµÇ´Â protected »ý¼ºÀÚÀÔ´Ï´Ù. virtual ~CUnitView(); public: virtual void OnDraw(CDC* pDC); // ÀÌ ºä¸¦ ±×¸®±â À§ÇØ ÀçÁ¤ÀǵǾú½À´Ï´Ù. #ifdef _DEBUG virtual void AssertValid() const; #ifndef _WIN32_WCE virtual void Dump(CDumpContext& dc) const; #endif #endif private: CDevice* m_pDevice; CUnitTool* m_pUnitTool; //CObj* m_pMonster; private: wstring m_wstrObjkey; protected: DECLARE_MESSAGE_MAP() public: void SetObjkey(CString strObjkey); public: virtual void OnInitialUpdate(); afx_msg BOOL OnEraseBkgnd(CDC* pDC); afx_msg int OnMouseActivate(CWnd* pDesktopWnd, UINT nHitTest, UINT message); afx_msg void OnDestroy(); };
// vi:nu:et:sts=4 ts=4 sw=4 /* * File: Item_internal.h * Generated 11/12/2021 13:39:34 * * Notes: * -- N/A * */ /* 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/> */ #include <Item.h> #include <JsonIn.h> #include <Node_internal.h> #ifndef ITEM_INTERNAL_H #define ITEM_INTERNAL_H #ifdef __cplusplus extern "C" { #endif //--------------------------------------------------------------- // Object Data Description //--------------------------------------------------------------- #pragma pack(push, 1) struct Item_data_s { /* Warning - OBJ_DATA must be first in this object! */ OBJ_DATA super; OBJ_IUNKNOWN *pSuperVtbl; // Needed for Inheritance // Common Data ASTR_DATA *pDir; ASTR_DATA *pFileName; ASTRARRAY_DATA *pHeadings; ASTR_DATA *pIdent; ASTRARRAY_DATA *pKeyWords; ASTR_DATA *pDesc; ASTR_DATA *pName; uint32_t type; int32_t priority; }; #pragma pack(pop) extern struct Item_class_data_s Item_ClassObj; extern const ITEM_VTBL Item_Vtbl; //--------------------------------------------------------------- // Class Object Method Forward Definitions //--------------------------------------------------------------- #ifdef ITEM_SINGLETON ITEM_DATA * Item_getSingleton ( void ); bool Item_setSingleton ( ITEM_DATA *pValue ); #endif //--------------------------------------------------------------- // Internal Method Forward Definitions //--------------------------------------------------------------- OBJ_IUNKNOWN * Item_getSuperVtbl ( ITEM_DATA *this ); ERESULT Item_Assign ( ITEM_DATA *this, ITEM_DATA *pOther ); ITEM_DATA * Item_Copy ( ITEM_DATA *this ); void Item_Dealloc ( OBJ_ID objId ); ITEM_DATA * Item_DeepCopy ( ITEM_DATA *this ); const uint32_t Item_EnumToType ( char *pDescA ); const char * Item_TypeToEnum ( uint32_t value ); const char * Item_TypeToName ( uint32_t value ); #ifdef ITEM_JSON_SUPPORT /*! Parse the new object from an established parser. @param pParser an established jsonIn Parser Object @return a new object if successful, otherwise, OBJ_NIL @warning Returned object must be released. */ ITEM_DATA * Item_ParseJsonObject ( JSONIN_DATA *pParser ); /*! Parse the object from an established parser. This helps facilitate parsing the fields from an inheriting object. @param pParser an established jsonIn Parser Object @param pObject an Object to be filled in with the parsed fields. @return If successful, ERESULT_SUCCESS. Otherwise, an ERESULT_* error code. */ ERESULT Item_ParseJsonFields ( JSONIN_DATA *pParser, ITEM_DATA *pObject ); #endif void * Item_QueryInfo ( OBJ_ID objId, uint32_t type, void *pData ); #ifdef ITEM_JSON_SUPPORT /*! Create a string that describes this object and the objects within it in HJSON formt. (See hjson object for details.) Example: @code ASTR_DATA *pDesc = Item_ToJson(this); @endcode @param this object pointer @return If successful, an AStr object which must be released containing the JSON text, otherwise OBJ_NIL. @warning Remember to release the returned AStr object. */ ASTR_DATA * Item_ToJson ( ITEM_DATA *this ); /*! Append the json representation of the object's fields to the given string. This helps facilitate parsing the fields from an inheriting object. @param this Object Pointer @param pStr String Pointer to be appended to. @return If successful, ERESULT_SUCCESS. Otherwise, an ERESULT_* error code. */ ERESULT Item_ToJsonFields ( ITEM_DATA *this, ASTR_DATA *pStr ); #endif #ifdef NDEBUG #else bool Item_Validate ( ITEM_DATA *this ); #endif #ifdef __cplusplus } #endif #endif /* ITEM_INTERNAL_H */
#ifndef HIGHSCORE_H #define HIGHSCORE_H #include <SDL.h> #include <grid.h> #include <trail.h> #include <string> #include <vector> #include <map> class Font; class HighScore { public: enum Class { P1 = Trail::P1, P2 = Trail::P2, P3 = Trail::P3, P4 = Trail::P4, TEAM }; HighScore(const std::string& path); ~HighScore(); void print(Grid<Uint8>& symbol, Font& font); void draw(SDL_Surface* surface); void add(Class type, const std::string& initials, int score); private: class Score { public: Score(const std::string& initials, int score); ~Score(); int getScore() const; const std::string& getInitials() const; private: std::string _initials; int _score; }; void load(); void save(); std::map<Class, std::vector<Score> > _table; std::string _path; }; #endif
#include <glib.h> #include "main.h" void print_elem(gpointer item, gpointer prefix) { g_message("%s %d", (char *)prefix, GPOINTER_TO_INT(item)); } int main_slist() { const int N = 10; GSList *list = NULL; for (int i = 0; i < N; i++) { list = g_slist_append(list, GINT_TO_POINTER(i)); } g_slist_foreach(list, (GFunc)print_elem, "-->"); g_slist_free(list); return 0; }
#ifndef DATABASEMANAGER_H #define DATABASEMANAGER_H #include <BetaSeriesApi.h> class DatabaseManager : public BetaSeriesApi { Q_OBJECT public: explicit DatabaseManager(QObject *parent = 0); ~DatabaseManager(); QByteArray getSeriePicture(double id); void getEpisodesList(uint limit = 0, uint showId = 0); protected: virtual void picturesShowsEvent(uint showId, QByteArray image); }; #endif // DATABASEMANAGER_H
#include<stdio.h> #include<stdlib.h> #include"hash.h" void PrintData(char *key, void *data, void *arg) { printf("%s : %s\n", key, (char *)data); (*(int *)arg)++; return; } int test_hash(void) { struct Hash *h; int len; h = Hash_Create(1000); if (! h) { fprintf(stderr, "%s: Cannot allocate memory", "test_hash"); exit(1); } Hash_PutData(h, "abcde", "efghi"); Hash_PutData(h, "aaaaa", "bbbbb"); printf("%s\n", (char *)Hash_GetData(h, "abcde")); printf("%s\n", (char *)Hash_GetData(h, "aaaaa")); len = 0; Hash_ForEach(h, PrintData, &len); printf("Len : %d\n", len); Hash_Destroy(h); return 0; } int main(void) { return test_hash(); }
/******************************************************************************* * Copyright 2020 Intel Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *******************************************************************************/ /* // // Purpose: // Cryptography Primitive. // ECC over Prime Finite Field (recommended ECC parameters) // // Contents: // secp112r2 // */ #include "owndefs.h" #include "owncp.h" #include "pcpgfpstuff.h" #if defined( _IPP_DATA ) /* // Recommended Parameters secp112r2 */ const BNU_CHUNK_T secp112r2_p[] = { // (2^128 -3)/76439 LL(0xBEAD208B, 0x5E668076), LL(0x2ABF62E3, 0xDB7C)}; const BNU_CHUNK_T secp112r2_a[] = { LL(0x5C0EF02C, 0x8A0AAAF6), LL(0xC24C05F3, 0x6127)}; const BNU_CHUNK_T secp112r2_b[] = { LL(0x4C85D709, 0xED74FCC3), LL(0xF1815DB5, 0x51DE)}; const BNU_CHUNK_T secp112r2_gx[] = { LL(0xD0928643, 0xB4E1649D), LL(0x0AB5E892, 0x4BA3)}; const BNU_CHUNK_T secp112r2_gy[] = { LL(0x6E956E97, 0x3747DEF3), LL(0x46F5882E, 0xADCD)}; const BNU_CHUNK_T secp112r2_r[] = { LL(0x0520D04B, 0xD7597CA1), LL(0x0AAFD8B8, 0x36DF)}; BNU_CHUNK_T secp112r2_h = 4; #endif /* _IPP_DATA */
/* Copyright 2017 Russell Jackson Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // The functions here seem important but another poorly scoped header file. #ifndef CATHETER_ARDUINO_GUI_PC_UTILS_H #define CATHETER_ARDUINO_GUI_PC_UTILS_H #include "catheter_arduino_gui/catheter_commands.h" #include <vector> #include <string> /** * @brief int loadPlayFile(const char*,std::vector<CatheterChannelCmd> &): * Loads and parses a playfile. * The playfile is a recorded vector of computed commands with inter command delay. */ int loadPlayFile(const char * fname, std::vector<CatheterChannelCmdSet>& cmdVect); /** * @brief Given the command list, generating a list of fixed-size group of * current based on the actuator. * dofs and the number of the actuator. * also generating a list of time slice. * * @param const std::vector<CatheterChannelCmdSet>& cmdVect: * the input vector of Catheter command set * @param std::vector<double>& timeSlice: * the time slices generated from the command set * @param std::vector<std::vector<double>>& currentList: * the current wrapped in the group of given current size * @param int actuatorDofs: * the degree of freedom for Catheter actuators * @param int numActuator: * the number of actuators for Catheter * @return int: * the return status, successful as 0 */ int currentGen(const std::vector<CatheterChannelCmdSet>& cmdVect, std::vector<double>& timeSlice, std::vector< std::vector<double> >& currentList, int actuatorDofs, int numActuator); /** * @brief Given the list of grouped current and the input time ticker, * this function will return the grouped current associated the time ticker * @param double timeTicker: * the input time ticker * @param const std::vector<double>& timeSlice: * the vector of time slices * @param const std::vector<std::vector<double>>& currentList: * the vector of grouped currents * @return std::vector<double>: * the answer of the time ticker associated */ std::vector<double> publishCurrent(double timeTicker, const std::vector<double>& timeSlice, const std::vector< std::vector<double> >& currentList); bool writePlayFile(const char * fname, const std::vector<CatheterChannelCmdSet>& cmdVect); /** * @brief Use the user input information to generate playfile and save it. * * @param * */ bool writeBytes(const char* fname, const std::vector<uint8_t>& bytes); /** @brief void summarizeCmd(const CatheterChannelCmd& cmd): summarizes a command reply. * This should not be used with gui's */ void summarizeCmd(const CatheterChannelCmd& cmd); void print_string_as_bits(int len, std::string s); void print_bytes_as_bits(int len, std::vector<uint8_t> bytes); #endif // CATHETER_ARDUINO_GUI_PC_UTILS_H
/* Copyright 2011-2012 Andrea Nall 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 SHARED_H_OM8GIBOM #define SHARED_H_OM8GIBOM #include <stdint.h> namespace packedfile { enum { ENDIAN_UNCACHED, ENDIAN_UNKNOWN, ENDIAN_BIG, ENDIAN_LITTLE, }; #if __SIZEOF_POINTER__ == 4 # define _pf_32bit_spacer(x) uint32_t x typedef uint32_t r_off_t; #elif __SIZEOF_POINTER__ == 8 # define _pf_32bit_spacer(x) typedef uint64_t r_off_t; void endian_swap(uint64_t& x); #else # error "Unknown pointer size" #endif int _endianness(void); } inline void endian_swap(uint16_t& x) { static int ENDIAN = packedfile::_endianness(); if ( ENDIAN == packedfile::ENDIAN_LITTLE ) return; x = (x>>8) | (x<<8); } inline void endian_swap(uint32_t& x) { static int ENDIAN = packedfile::_endianness(); if ( ENDIAN == packedfile::ENDIAN_LITTLE ) return; x = (x>>24) | ((x<<8) & 0x00FF0000) | ((x>>8) & 0x0000FF00) | (x<<24); } #if __SIZEOF_POINTER__ == 8 // __int64 for MSVC, "long long" for gcc inline void endian_swap(uint64_t& x) { static int ENDIAN = packedfile::_endianness(); if ( ENDIAN == packedfile::ENDIAN_LITTLE ) return; x = (x>>56) | ((x<<40) & 0x00FF000000000000) | ((x<<24) & 0x0000FF0000000000) | ((x<<8) & 0x000000FF00000000) | ((x>>8) & 0x00000000FF000000) | ((x>>24) & 0x0000000000FF0000) | ((x>>40) & 0x000000000000FF00) | (x<<56); } #endif #endif /* end of include guard: SHARED_H_OM8GIBOM */
#include <stdio.h> #include <string.h> int i;char b[9999];main(){gets(b);for(i=strlen(b)-1;i>=0;i--)printf("%c",b[i]);puts("");return 0;}
// // JMView.h // ResourcesObject // // Created by zhengxingxia on 16/8/3. // Copyright © 2016年 zhengxingxia. All rights reserved. // 按钮选择控件 #import <UIKit/UIKit.h> typedef enum : NSUInteger { JMSwitchViewStyleHorizontal,//横向切换 JMSwitchViewStyleVertical, //垂直筛选 } JMSwitchViewStyle; typedef enum : NSUInteger { JMSwitchViewContentStyleCustom, //自定义tableview JMSwitchViewContentStyleOneTableview, //单个tableview JMSwitchViewContentStyleTwoTableview, //嵌套tableview } JMSwitchViewContentStyle; @class JMView; @protocol JMSwitchViewDatasource <NSObject> @required /** * button的title、数量 * * @param jmView <#jmView description#> * * @return <#return value description#> */ - (NSArray *)titlesOfButtonsInJMView:(JMView *)jmView; @optional /** * 每个button的样式 * * @param jmSwitchView <#jmSwitchView description#> * @param index <#index description#> * * @return <#return value description#> */ - (UIButton *)JMSwitchView:(JMView *)jmSwitchView ButtonAtIndex:(NSUInteger)index; /** * 每个button对应view的样式 * * @param jmSwitchView <#jmSwitchView description#> * @param index <#index description#> * * @return <#return value description#> */ - (UIView *)JMSwitchView:(JMView *)jmSwitchView ViewAtIndex:(NSUInteger)index; #pragma mark - JMSwitchViewStyleVertical下的代理方法 /** * 每个btn下的view的样式 * * @param jmSwitchView <#jmSwitchView description#> * @param index <#index description#> * * @return <#return value description#> */ - (JMSwitchViewContentStyle)JMSwitchView:(JMView *)jmSwitchView StyleForViewWithIndexButton:(NSUInteger)index; /** * 第一个tableview的标题 * * @param jmSwitchView <#jmSwitchView description#> * @param index <#index description#> * * @return <#return value description#> */ - (NSArray *)JMSwitchView:(JMView *)jmSwitchView TitlesForFirstTableViewWithIndexButton:(NSUInteger)index; /** * 第二个tableview的标题(关联第一个tableview) * * @param jmSwitchView <#jmSwitchView description#> * @param index button位置 * @param indexRow 第一个tableview选择的row * * @return <#return value description#> */ - (NSArray *)JMSwitchView:(JMView *)jmSwitchView TitlesForSecondTableViewWithIndexButton:(NSUInteger)index FirstTableViewCell:(NSUInteger)indexRow; @end @protocol JMSwitchViewDelegate <NSObject> @optional - (void)JMSwitchView:(JMView *)jmSwitchView didSelectButtonAtIndex:(NSUInteger)index; /** * 点击tableview筛选后的事件 * * @param jmSwitchView <#jmSwitchView description#> * @param indexPath <#indexPath description#> */ - (void)JMSwitchView:(JMView *)jmSwitchView didSelectRowAtIndexPath:(NSIndexPath *)indexPath WithText:(NSString *)text; @end @interface JMView : UIView @property (weak, nonatomic)id<JMSwitchViewDatasource>SwitchDatasource; @property (weak, nonatomic)id<JMSwitchViewDelegate>SwitchDelegate; /** * 初始化选择界面 * * @param frame 选择界面的大小 * @param switchHeight 选择按钮的高度 * @param style 选择内容显示样式(水平平移,垂直筛选) * * @return <#return value description#> */ - (instancetype)initWithFrame:(CGRect)frame SwitchHeight:(float)switchHeight Style:(JMSwitchViewStyle)style; /** * 获取内容视图的高度 * * @return <#return value description#> */ - (float)getViewHeight; /** * 得到在第index个的按钮 * * @param index <#index description#> * * @return <#return value description#> */ - (UIButton *)buttonAtIndex:(NSUInteger)index; /** * 垂直筛选收回cover界面 */ - (void)tapCover; @end
/*!The Treasure Box Library * * 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. * * Copyright (C) 2009 - 2019, TBOOX Open Source Group. * * @author ruki * @file memcmp.c * */ /* ////////////////////////////////////////////////////////////////////////////////////// * includes */ #include "prefix.h" /* ////////////////////////////////////////////////////////////////////////////////////// * macros */ #ifdef TB_ASSEMBLER_IS_GAS //# define TB_LIBC_STRING_IMPL_MEMCMP #endif /* ////////////////////////////////////////////////////////////////////////////////////// * implementation */ #if 0//def TB_ASSEMBLER_IS_GAS static tb_long_t tb_memcmp_impl(tb_cpointer_t s1, tb_cpointer_t s2, tb_size_t n) { } #endif
// Copyright 1999-2005 Omni Development, Inc. All rights reserved. // // This software may only be used and reproduced according to the // terms in the file OmniSourceLicense.html, which should be // distributed with this project and can also be found at // <http://www.omnigroup.com/developer/sourcecode/sourcelicense/>. // // $Id$ #import <OmniFoundation/OFScheduler.h> @class NSTimer; @interface OFRunLoopScheduler : OFScheduler { NSTimer *alarmTimer; } + (OFRunLoopScheduler *)runLoopScheduler; @end
/* * DO NOT EDIT. THIS FILE IS GENERATED FROM ../../../dist/idl\nsIDOMHTMLMetaElement.idl */ #ifndef __gen_nsIDOMHTMLMetaElement_h__ #define __gen_nsIDOMHTMLMetaElement_h__ #ifndef __gen_nsIDOMHTMLElement_h__ #include "nsIDOMHTMLElement.h" #endif /* For IDL files that don't want to include root IDL files. */ #ifndef NS_NO_VTABLE #define NS_NO_VTABLE #endif /* starting interface: nsIDOMHTMLMetaElement */ #define NS_IDOMHTMLMETAELEMENT_IID_STR "2a3f789e-0667-464f-a8d7-6f58513443d9" #define NS_IDOMHTMLMETAELEMENT_IID \ {0x2a3f789e, 0x0667, 0x464f, \ { 0xa8, 0xd7, 0x6f, 0x58, 0x51, 0x34, 0x43, 0xd9 }} class NS_NO_VTABLE nsIDOMHTMLMetaElement : public nsISupports { public: NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDOMHTMLMETAELEMENT_IID) /* attribute DOMString content; */ NS_IMETHOD GetContent(nsAString & aContent) = 0; NS_IMETHOD SetContent(const nsAString & aContent) = 0; /* attribute DOMString httpEquiv; */ NS_IMETHOD GetHttpEquiv(nsAString & aHttpEquiv) = 0; NS_IMETHOD SetHttpEquiv(const nsAString & aHttpEquiv) = 0; /* attribute DOMString name; */ NS_IMETHOD GetName(nsAString & aName) = 0; NS_IMETHOD SetName(const nsAString & aName) = 0; /* attribute DOMString scheme; */ NS_IMETHOD GetScheme(nsAString & aScheme) = 0; NS_IMETHOD SetScheme(const nsAString & aScheme) = 0; }; NS_DEFINE_STATIC_IID_ACCESSOR(nsIDOMHTMLMetaElement, NS_IDOMHTMLMETAELEMENT_IID) /* Use this macro when declaring classes that implement this interface. */ #define NS_DECL_NSIDOMHTMLMETAELEMENT \ NS_IMETHOD GetContent(nsAString & aContent) override; \ NS_IMETHOD SetContent(const nsAString & aContent) override; \ NS_IMETHOD GetHttpEquiv(nsAString & aHttpEquiv) override; \ NS_IMETHOD SetHttpEquiv(const nsAString & aHttpEquiv) override; \ NS_IMETHOD GetName(nsAString & aName) override; \ NS_IMETHOD SetName(const nsAString & aName) override; \ NS_IMETHOD GetScheme(nsAString & aScheme) override; \ NS_IMETHOD SetScheme(const nsAString & aScheme) override; /* Use this macro to declare functions that forward the behavior of this interface to another object. */ #define NS_FORWARD_NSIDOMHTMLMETAELEMENT(_to) \ NS_IMETHOD GetContent(nsAString & aContent) override { return _to GetContent(aContent); } \ NS_IMETHOD SetContent(const nsAString & aContent) override { return _to SetContent(aContent); } \ NS_IMETHOD GetHttpEquiv(nsAString & aHttpEquiv) override { return _to GetHttpEquiv(aHttpEquiv); } \ NS_IMETHOD SetHttpEquiv(const nsAString & aHttpEquiv) override { return _to SetHttpEquiv(aHttpEquiv); } \ NS_IMETHOD GetName(nsAString & aName) override { return _to GetName(aName); } \ NS_IMETHOD SetName(const nsAString & aName) override { return _to SetName(aName); } \ NS_IMETHOD GetScheme(nsAString & aScheme) override { return _to GetScheme(aScheme); } \ NS_IMETHOD SetScheme(const nsAString & aScheme) override { return _to SetScheme(aScheme); } /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ #define NS_FORWARD_SAFE_NSIDOMHTMLMETAELEMENT(_to) \ NS_IMETHOD GetContent(nsAString & aContent) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetContent(aContent); } \ NS_IMETHOD SetContent(const nsAString & aContent) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetContent(aContent); } \ NS_IMETHOD GetHttpEquiv(nsAString & aHttpEquiv) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHttpEquiv(aHttpEquiv); } \ NS_IMETHOD SetHttpEquiv(const nsAString & aHttpEquiv) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetHttpEquiv(aHttpEquiv); } \ NS_IMETHOD GetName(nsAString & aName) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetName(aName); } \ NS_IMETHOD SetName(const nsAString & aName) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetName(aName); } \ NS_IMETHOD GetScheme(nsAString & aScheme) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetScheme(aScheme); } \ NS_IMETHOD SetScheme(const nsAString & aScheme) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetScheme(aScheme); } #if 0 /* Use the code below as a template for the implementation class for this interface. */ /* Header file */ class nsDOMHTMLMetaElement : public nsIDOMHTMLMetaElement { public: NS_DECL_ISUPPORTS NS_DECL_NSIDOMHTMLMETAELEMENT nsDOMHTMLMetaElement(); private: ~nsDOMHTMLMetaElement(); protected: /* additional members */ }; /* Implementation file */ NS_IMPL_ISUPPORTS(nsDOMHTMLMetaElement, nsIDOMHTMLMetaElement) nsDOMHTMLMetaElement::nsDOMHTMLMetaElement() { /* member initializers and constructor code */ } nsDOMHTMLMetaElement::~nsDOMHTMLMetaElement() { /* destructor code */ } /* attribute DOMString content; */ NS_IMETHODIMP nsDOMHTMLMetaElement::GetContent(nsAString & aContent) { return NS_ERROR_NOT_IMPLEMENTED; } NS_IMETHODIMP nsDOMHTMLMetaElement::SetContent(const nsAString & aContent) { return NS_ERROR_NOT_IMPLEMENTED; } /* attribute DOMString httpEquiv; */ NS_IMETHODIMP nsDOMHTMLMetaElement::GetHttpEquiv(nsAString & aHttpEquiv) { return NS_ERROR_NOT_IMPLEMENTED; } NS_IMETHODIMP nsDOMHTMLMetaElement::SetHttpEquiv(const nsAString & aHttpEquiv) { return NS_ERROR_NOT_IMPLEMENTED; } /* attribute DOMString name; */ NS_IMETHODIMP nsDOMHTMLMetaElement::GetName(nsAString & aName) { return NS_ERROR_NOT_IMPLEMENTED; } NS_IMETHODIMP nsDOMHTMLMetaElement::SetName(const nsAString & aName) { return NS_ERROR_NOT_IMPLEMENTED; } /* attribute DOMString scheme; */ NS_IMETHODIMP nsDOMHTMLMetaElement::GetScheme(nsAString & aScheme) { return NS_ERROR_NOT_IMPLEMENTED; } NS_IMETHODIMP nsDOMHTMLMetaElement::SetScheme(const nsAString & aScheme) { return NS_ERROR_NOT_IMPLEMENTED; } /* End of implementation class template. */ #endif #endif /* __gen_nsIDOMHTMLMetaElement_h__ */
// Copyright (c) Google LLC 2019 // // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/MIT. // Library to store a histogram to the bit-stream. #ifndef BRUNSLI_ENC_HISTOGRAM_ENCODE_H_ #define BRUNSLI_ENC_HISTOGRAM_ENCODE_H_ #include "../common/ans_params.h" #include <brunsli/types.h> #include "./write_bits.h" namespace brunsli { static const int kMaxNumSymbolsForSmallCode = 4; // Normalizes the population counts in counts[0 .. length) so that the sum of // all counts will be 1 << precision_bits. // Sets *num_symbols to the number of symbols in the range [0 .. length) with // non-zero population counts. // Fills in symbols[0 .. kMaxNumSymbolsForSmallCode) with the first few symbols // with non-zero population counts. // Each count will all be rounded to multiples of // 1 << GetPopulationCountPrecision(count), except possibly for one. The index // of that count will be stored in *omit_pos. void NormalizeCounts(int* counts, int* omit_pos, const int length, const int precision_bits, int* num_symbols, int* symbols); // Stores a histogram in counts[0 .. ANS_MAX_SYMBOLS) to the bit-stream where // the sum of all population counts is ANS_TAB_SIZE and the number of symbols // with non-zero counts is num_symbols. // symbols[0 .. kMaxNumSymbolsForSmallCode) contains the first few symbols // with non-zero population counts. // Each count must be rounded to a multiple of // 1 << GetPopulationCountPrecision(count), except possibly counts[omit_pos]. void EncodeCounts(const int* counts, const int omit_pos, const int num_symbols, const int* symbols, Storage* storage); // Returns an estimate of the number of bits required to encode the given // histogram (header bits plus data bits). double PopulationCost(const int* data, int total_count); } // namespace brunsli #endif // BRUNSLI_ENC_HISTOGRAM_ENCODE_H_
// Copyright (c) 2019 PaddlePaddle Authors. 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. #pragma once #include "paddle/fluid/memory/allocation/allocator.h" #include "paddle/fluid/platform/device_context.h" namespace paddle { namespace memory { namespace allocation { /** * CUDADeviceContextAllocation is a wrapper of the underbeneath allocation. * CUDADeviceContextAllocation adds a CUDA stream callback for the underbeneath * allocation so that CUDADeviceContextAllocation can be used in a CUDA stream * which deletes allocation in the callback. */ class CUDADeviceContextAllocation : public Allocation { public: explicit CUDADeviceContextAllocation(AllocationPtr allocation); ~CUDADeviceContextAllocation(); void SetCUDADeviceContext(const platform::CUDADeviceContext *dev_ctx); private: AllocationPtr underlying_allocation_; const platform::CUDADeviceContext *dev_ctx_{nullptr}; }; } // namespace allocation } // namespace memory } // namespace paddle
/* * SamiOutputFile.h * * */ #ifndef SamiOutputFile_H_ #define SamiOutputFile_H_ #include <FApp.h> #include <FBase.h> #include <FSystem.h> #include <FWebJson.h> #include "SamiHelpers.h" #include "SamiObject.h" using namespace Tizen::Web::Json; #include "SamiObject.h" using Tizen::Base::DateTime; using Tizen::Base::String; using Tizen::Base::Integer; namespace Swagger { class SamiOutputFile: public SamiObject { public: SamiOutputFile(); SamiOutputFile(String* json); virtual ~SamiOutputFile(); void init(); void cleanup(); String asJson (); JsonObject* asJsonObject(); void fromJsonObject(IJsonValue* json); SamiOutputFile* fromJson(String* obj); String* getPId(); void setPId(String* pId); SamiObject* getPSource(); void setPSource(SamiObject* pSource); String* getPUri(); void setPUri(String* pUri); String* getPFilename(); void setPFilename(String* pFilename); Integer* getPSize(); void setPSize(Integer* pSize); DateTime* getPCreatedAt(); void setPCreatedAt(DateTime* pCreated_at); private: String* pId; SamiObject* pSource; String* pUri; String* pFilename; Integer* pSize; DateTime* pCreated_at; }; } /* namespace Swagger */ #endif /* SamiOutputFile_H_ */
#ifndef ARK_GRAPHICS_IMPL_GLYPH_MAKER_GLYPH_MAKER_TEXT_COLOR_H_ #define ARK_GRAPHICS_IMPL_GLYPH_MAKER_GLYPH_MAKER_TEXT_COLOR_H_ #include "core/inf/builder.h" #include "graphics/inf/glyph_maker.h" namespace ark { class CharacterMakerTextColor : public GlyphMaker { public: CharacterMakerTextColor(sp<GlyphMaker> delegate, sp<Vec4> color); virtual std::vector<sp<Glyph>> makeGlyphs(const std::wstring& text) override; // [[plugin::style("text-color")]] class BUILDER : public Builder<GlyphMaker> { public: BUILDER(BeanFactory& beanFactory, const sp<Builder<GlyphMaker>>& delegate, const String& style); virtual sp<GlyphMaker> build(const Scope& args) override; private: sp<Builder<GlyphMaker>> _delegate; sp<Builder<Vec4>> _color; }; private: sp<GlyphMaker> _delegate; sp<Varyings> _varyings; sp<Vec4> _color; }; } #endif
/* * 练习题 2.62 * * 编写一个函数 int_shifts_are_logical(),在对 int 类型的数使用算术右移的机器上运 * 行时,这个函数生成 1,而其他情况下生成 0。你的代码应该可以运行在任何字长的机器 * 上。在几种机器上测试你的代码。 */ #include <limits.h> int int_shifts_are_logical(void) { int x = (~0 - 1) >> 1; return x != INT_MAX; }
/* * File: IAS-LangLib/src/lang/printer/dec/TypeDefinitionNodeHandler.h * * Copyright (C) 2015, Albert Krzymowski * * 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 _IAS_AS_Lang_Printer_Dec_TypeDefinitionNodeHandlerr_H_ #define _IAS_AS_Lang_Printer_Dec_TypeDefinitionNodeHandlerr_H_ #include <lang/printer/CallbackSignature.h> namespace IAS { namespace Lang { namespace Printer { namespace Dec { /*************************************************************************/ /** The class. */ class TypeDefinitionNodeHandler : public ::IAS::Lang::Printer::CallbackSignature { public: virtual ~TypeDefinitionNodeHandler() throw(); virtual void call(const Model::Node* pNode, CallbackCtx *pCtx, std::ostream& os); protected: TypeDefinitionNodeHandler(); friend class ::IAS::Factory<TypeDefinitionNodeHandler>; }; /*************************************************************************/ } } } } #endif /* _IAS_AS_Lang_Interpreter_Proc_Stmt_FORLOOPNODEHANDLER_H_ */
// // LCTabBar.h // 新浪微博 // // Created by lichao on 15/7/27. // Copyright (c) 2015年 ___Super___. All rights reserved. // #import <UIKit/UIKit.h> @class LCTabBar; #warning 我们自己定义的控件,如果是继承于系统的控件的话,而且有代理的话,我们的协议一定要继承父类的协议 @protocol LCTabBarDelegate <NSObject,UITabBarDelegate> -(void)tabbar:(LCTabBar *)tabbar btnClick:(UIButton *)btn; @end @interface LCTabBar : UITabBar @property (nonatomic ,weak)id<LCTabBarDelegate> delegate; @end
// Copyright 2021 DeepMind Technologies Limited // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. #ifndef MUJOCO_MUJOCO_EXPORT_H_ #define MUJOCO_MUJOCO_EXPORT_H_ #if defined _WIN32 || defined __CYGWIN__ #define MUJOCO_HELPER_DLL_IMPORT __declspec(dllimport) #define MUJOCO_HELPER_DLL_EXPORT __declspec(dllexport) #define MUJOCO_HELPER_DLL_LOCAL #else #if __GNUC__ >= 4 #define MUJOCO_HELPER_DLL_IMPORT __attribute__ ((visibility ("default"))) #define MUJOCO_HELPER_DLL_EXPORT __attribute__ ((visibility ("default"))) #define MUJOCO_HELPER_DLL_LOCAL __attribute__ ((visibility ("hidden"))) #else #define MUJOCO_HELPER_DLL_IMPORT #define MUJOCO_HELPER_DLL_EXPORT #define MUJOCO_HELPER_DLL_LOCAL #endif #endif #ifdef MJ_STATIC // static library #define MJAPI #define MJLOCAL #else #ifdef MUJOCO_DLL_EXPORTS #define MJAPI MUJOCO_HELPER_DLL_EXPORT #else #define MJAPI MUJOCO_HELPER_DLL_IMPORT #endif #define MJLOCAL MUJOCO_HELPER_DLL_LOCAL #endif #endif // MUJOCO_MUJOCO_EXPORT_H_
#ifndef _ESBMC_SOLVERS_SOLVE_H_ #define _ESBMC_SOLVERS_SOLVE_H_ #include <string> #include <config.h> #include <namespace.h> #include <solvers/smt/smt_conv.h> smt_convt *create_solver_factory(const std::string &solver_name, bool is_cpp, bool int_encoding, const namespacet &ns, const optionst &options); #endif
/* Copyright (c) 2014. The YARA Authors. 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. */ #include <config.h> #include <yara/exec.h> #include <yara/modules.h> #include <yara/libyara.h> #define MODULE(name) \ int name ## __declarations(YR_OBJECT* module); \ int name ## __load(YR_SCAN_CONTEXT* context, \ YR_OBJECT* module, \ void* module_data, \ size_t module_data_size); \ int name ## __unload(YR_OBJECT* main_structure); \ int name ## __initialize(YR_MODULE* module); \ int name ## __finalize(YR_MODULE* module); #include <modules/module_list> #undef MODULE #define MODULE(name) \ { \ #name, \ name##__declarations, \ name##__load, \ name##__unload, \ name##__initialize, \ name##__finalize \ }, YR_MODULE yr_modules_table[] = { #include <modules/module_list> }; #undef MODULE int yr_modules_initialize() { int i; for (i = 0; i < sizeof(yr_modules_table) / sizeof(YR_MODULE); i++) { int result = yr_modules_table[i].initialize(&yr_modules_table[i]); if (result != ERROR_SUCCESS) return result; } return ERROR_SUCCESS; } int yr_modules_finalize() { int i; for (i = 0; i < sizeof(yr_modules_table) / sizeof(YR_MODULE); i++) { int result = yr_modules_table[i].finalize(&yr_modules_table[i]); if (result != ERROR_SUCCESS) return result; } return ERROR_SUCCESS; } int yr_modules_do_declarations( const char* module_name, YR_OBJECT* main_structure) { int i; for (i = 0; i < sizeof(yr_modules_table) / sizeof(YR_MODULE); i++) { if (strcmp(yr_modules_table[i].name, module_name) == 0) return yr_modules_table[i].declarations(main_structure); } return ERROR_UNKNOWN_MODULE; } int yr_modules_load( const char* module_name, YR_SCAN_CONTEXT* context) { int i, result; YR_MODULE_IMPORT mi; YR_OBJECT* module_structure = (YR_OBJECT*) yr_hash_table_lookup( context->objects_table, module_name, NULL); // if module_structure != NULL, the module was already // loaded, return successfully without doing nothing. if (module_structure != NULL) return ERROR_SUCCESS; // not loaded yet FAIL_ON_ERROR(yr_object_create( OBJECT_TYPE_STRUCTURE, module_name, NULL, &module_structure)); mi.module_name = module_name; mi.module_data = NULL; mi.module_data_size = 0; result = context->callback( CALLBACK_MSG_IMPORT_MODULE, &mi, context->user_data); if (result == CALLBACK_ERROR) return ERROR_CALLBACK_ERROR; FAIL_ON_ERROR_WITH_CLEANUP( yr_modules_do_declarations(module_name, module_structure), yr_object_destroy(module_structure)); FAIL_ON_ERROR_WITH_CLEANUP( yr_hash_table_add( context->objects_table, module_name, NULL, module_structure), yr_object_destroy(module_structure)); for (i = 0; i < sizeof(yr_modules_table) / sizeof(YR_MODULE); i++) { if (strcmp(yr_modules_table[i].name, module_name) == 0) { result = yr_modules_table[i].load( context, module_structure, mi.module_data, mi.module_data_size); if (result != ERROR_SUCCESS) return result; } } result = context->callback( CALLBACK_MSG_MODULE_IMPORTED, module_structure, context->user_data); return ERROR_SUCCESS; } int yr_modules_unload_all( YR_SCAN_CONTEXT* context) { int i; for (i = 0; i < sizeof(yr_modules_table) / sizeof(YR_MODULE); i++) { YR_OBJECT* module_structure = (YR_OBJECT*) yr_hash_table_lookup( context->objects_table, yr_modules_table[i].name, NULL); if (module_structure != NULL) yr_modules_table[i].unload(module_structure); } return ERROR_SUCCESS; }
/* * DO NOT EDIT. THIS FILE IS GENERATED FROM e:/builds/moz2_slave/rel-m-rel-xr-w32-bld/build/netwerk/protocol/http/nsIHttpChannelChild.idl */ #ifndef __gen_nsIHttpChannelChild_h__ #define __gen_nsIHttpChannelChild_h__ #ifndef __gen_nsISupports_h__ #include "nsISupports.h" #endif /* For IDL files that don't want to include root IDL files. */ #ifndef NS_NO_VTABLE #define NS_NO_VTABLE #endif /* starting interface: nsIHttpChannelChild */ #define NS_IHTTPCHANNELCHILD_IID_STR "40192377-f83c-4b31-92c6-dbc6c767c860" #define NS_IHTTPCHANNELCHILD_IID \ {0x40192377, 0xf83c, 0x4b31, \ { 0x92, 0xc6, 0xdb, 0xc6, 0xc7, 0x67, 0xc8, 0x60 }} class NS_NO_VTABLE nsIHttpChannelChild : public nsISupports { public: NS_DECLARE_STATIC_IID_ACCESSOR(NS_IHTTPCHANNELCHILD_IID) /* void addCookiesToRequest (); */ NS_IMETHOD AddCookiesToRequest(void) = 0; /* readonly attribute RequestHeaderTuples headerTuples; */ NS_IMETHOD GetHeaderTuples(mozilla::net::RequestHeaderTuples **aHeaderTuples) = 0; }; NS_DEFINE_STATIC_IID_ACCESSOR(nsIHttpChannelChild, NS_IHTTPCHANNELCHILD_IID) /* Use this macro when declaring classes that implement this interface. */ #define NS_DECL_NSIHTTPCHANNELCHILD \ NS_IMETHOD AddCookiesToRequest(void); \ NS_IMETHOD GetHeaderTuples(mozilla::net::RequestHeaderTuples **aHeaderTuples); /* Use this macro to declare functions that forward the behavior of this interface to another object. */ #define NS_FORWARD_NSIHTTPCHANNELCHILD(_to) \ NS_IMETHOD AddCookiesToRequest(void) { return _to AddCookiesToRequest(); } \ NS_IMETHOD GetHeaderTuples(mozilla::net::RequestHeaderTuples **aHeaderTuples) { return _to GetHeaderTuples(aHeaderTuples); } /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ #define NS_FORWARD_SAFE_NSIHTTPCHANNELCHILD(_to) \ NS_IMETHOD AddCookiesToRequest(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->AddCookiesToRequest(); } \ NS_IMETHOD GetHeaderTuples(mozilla::net::RequestHeaderTuples **aHeaderTuples) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHeaderTuples(aHeaderTuples); } #if 0 /* Use the code below as a template for the implementation class for this interface. */ /* Header file */ class nsHttpChannelChild : public nsIHttpChannelChild { public: NS_DECL_ISUPPORTS NS_DECL_NSIHTTPCHANNELCHILD nsHttpChannelChild(); private: ~nsHttpChannelChild(); protected: /* additional members */ }; /* Implementation file */ NS_IMPL_ISUPPORTS1(nsHttpChannelChild, nsIHttpChannelChild) nsHttpChannelChild::nsHttpChannelChild() { /* member initializers and constructor code */ } nsHttpChannelChild::~nsHttpChannelChild() { /* destructor code */ } /* void addCookiesToRequest (); */ NS_IMETHODIMP nsHttpChannelChild::AddCookiesToRequest() { return NS_ERROR_NOT_IMPLEMENTED; } /* readonly attribute RequestHeaderTuples headerTuples; */ NS_IMETHODIMP nsHttpChannelChild::GetHeaderTuples(mozilla::net::RequestHeaderTuples **aHeaderTuples) { return NS_ERROR_NOT_IMPLEMENTED; } /* End of implementation class template. */ #endif #endif /* __gen_nsIHttpChannelChild_h__ */
/* Copyright 2020 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 PARAGRAPH_TRANSLATION_TRANSLATION_H_ #define PARAGRAPH_TRANSLATION_TRANSLATION_H_ #include <memory> #include <vector> #include "paragraph/graph/graph.h" #include "nlohmann/json.hpp" #include "paragraph/shim/statusor.h" namespace paragraph { // Takes a composite graph and translation configuration and returns one // individualized and translated graph per processor. If the composite graph has // natural consecutive processor IDs, the resulting vector indices will match // the processor IDs, otherwise they will be in ascending order. shim::StatusOr<std::vector<std::unique_ptr<Graph>>> IndividualizeAndTranslate( const Graph* composite_graph, nlohmann::json translation_config); } // namespace paragraph #endif // PARAGRAPH_TRANSLATION_TRANSLATION_H_
#ifndef _MSG_COMPONENT_H_ #define _MSG_COMPONENT_H_ #include "component/component.h" #include "google/protobuf/message.h" #include <map> class MsgComponent : public Component { public: MsgComponent(); virtual ~MsgComponent(); virtual int recv(Message* msg); public: typedef int (MsgComponent::*MsgHandler)(Message*, ::google::protobuf::Message*); void send_msg(::google::protobuf::Message* msg); void regist_msg(int id, MsgHandler handler); private: std::map<int, MsgHandler> handler_map_; }; #endif
/* * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ #pragma once #include <aws/elastictranscoder/ElasticTranscoder_EXPORTS.h> #include <aws/elastictranscoder/ElasticTranscoderRequest.h> #include <aws/core/utils/memory/stl/AWSString.h> namespace Aws { namespace ElasticTranscoder { namespace Model { /** * <p>The <code>DeletePipelineRequest</code> structure.</p> */ class AWS_ELASTICTRANSCODER_API DeletePipelineRequest : public ElasticTranscoderRequest { public: DeletePipelineRequest(); Aws::String SerializePayload() const override; /** * <p>The identifier of the pipeline that you want to delete.</p> */ inline const Aws::String& GetId() const{ return m_id; } /** * <p>The identifier of the pipeline that you want to delete.</p> */ inline void SetId(const Aws::String& value) { m_idHasBeenSet = true; m_id = value; } /** * <p>The identifier of the pipeline that you want to delete.</p> */ inline void SetId(Aws::String&& value) { m_idHasBeenSet = true; m_id = value; } /** * <p>The identifier of the pipeline that you want to delete.</p> */ inline void SetId(const char* value) { m_idHasBeenSet = true; m_id.assign(value); } /** * <p>The identifier of the pipeline that you want to delete.</p> */ inline DeletePipelineRequest& WithId(const Aws::String& value) { SetId(value); return *this;} /** * <p>The identifier of the pipeline that you want to delete.</p> */ inline DeletePipelineRequest& WithId(Aws::String&& value) { SetId(value); return *this;} /** * <p>The identifier of the pipeline that you want to delete.</p> */ inline DeletePipelineRequest& WithId(const char* value) { SetId(value); return *this;} private: Aws::String m_id; bool m_idHasBeenSet; }; } // namespace Model } // namespace ElasticTranscoder } // namespace Aws
/* * Copyright 2008-2011 Wolfgang Keller * * 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 _CRC_h #define _CRC_h #include "MiniStdlib/cstdint.h" // for size_t #include "MiniStdlib/cstddef.h" #include "MiniStdlib/declspec.h" #include "MiniStdlib/cstdbool.h" #ifdef __cplusplus extern "C" { #endif typedef enum { CRC_BitOrder_LSB_to_MSB, CRC_BitOrder_MSB_to_LSB } CRC_BitOrder; DLLEXPORT uint32_t CRC_init(bool in_invertBefore); /*! * Precondition: the function CRC_init() was called before. */ DLLEXPORT uint32_t CRC_update_LSB_to_MSB(uint32_t in_currentCRC, uint8_t in_currentByte); DLLEXPORT uint32_t CRC_update_MSB_to_LSB(uint32_t in_currentCRC, uint8_t in_currentByte); DLLEXPORT uint32_t CRC_terminate(uint32_t in_currentCRC, bool in_invertAfter); /*! * Precondition: the function CRC_init() was called before. */ DLLEXPORT uint32_t CRC_foldl_LSB_to_MSB(uint32_t in_currentCRC, void *in_pBuffer, size_t in_bufferSize); DLLEXPORT uint32_t CRC_foldl_MSB_to_LSB(uint32_t in_currentCRC, void *in_pBuffer, size_t in_bufferSize); DLLEXPORT uint32_t CRC_compute_LSB_to_MSB(void *in_pBuffer, size_t in_bufferSize, bool in_invertBefore, bool in_invertAfter); DLLEXPORT uint32_t CRC_compute_MSB_to_LSB(void *in_pBuffer, size_t in_bufferSize, bool in_invertBefore, bool in_invertAfter); /*! * The function CRC_stateUpdate is for using with fread_withState (IO/fread.h). * Precondition: the function CRC_init() was called before. */ DLLEXPORT void CRC_stateUpdate_update_LSB_to_MSB(void *in_pState, const void *in_pBuffer, size_t in_count); DLLEXPORT void CRC_stateUpdate_update_MSB_to_LSB(void *in_pState, const void *in_pBuffer, size_t in_count); #ifdef __cplusplus } #endif #endif
// // TabBarController.h // MiaoPai // // Created by 程强 on 2016/11/19. // Copyright © 2016年 BiaoGe. All rights reserved. // #import <UIKit/UIKit.h> @interface TabBarController : UITabBarController @end
/* * Copyright 2010 Cloudkick 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. */ #include "ckc.h" #include "ckc_version.h" static void ckc_nuke_newlines(char *p) { size_t i; size_t l = strlen(p); for (i = 0; i < l; i++) { if (p[i] == '\n') { p[i] = '\0'; } if (p[i] == '\r') { p[i] = '\0'; } } } int ckc_prompt_username(const char **username) { char buf[256] = {0}; fprintf(stdout, "Username: "); fflush(stdout); char *p = fgets(&buf[0], sizeof(buf), stdin); if (p == NULL) { return -1; } ckc_nuke_newlines(p); if (*p == '\0') { return -1; } *username = strdup(p); return 0; } int ckc_prompt_password(const char **password, const char *prompt) { char string[256] = {0}; snprintf(string, sizeof(string), "%s: ", prompt); char *p = getpass(string); if (p == NULL || *p == '\0') { return -1; } *password = strdup(p); return 0; } int ckc_prompt_number(int *num, int min, int max) { char buf[256] = {0}; fprintf(stdout, "Select %d to %d: ", min, max); fflush(stdout); char *p = fgets(&buf[0], sizeof(buf), stdin); if (p == NULL) { return -1; } *num = atoi(p); if (*num > max) { return ckc_prompt_number(num, min, max); } if (*num < min) { return ckc_prompt_number(num, min, max); } return 0; } int ckc_prompt_yn() { char buf[256] = {0}; fflush(stdout); char *p = fgets(&buf[0], sizeof(buf), stdin); if (p == NULL) { return -1; } ckc_nuke_newlines(p); if (strcasecmp(p, "y") == 0 || strcasecmp(p, "yes") == 0 || strcasecmp(p, "fuckyeah") == 0) { /* easteregg for soemone who reads commit mails */ return 0; } return 1; }
#ifndef FASTSPI_H #define FASTSPI_H #include <QtGlobal> #define boolean bool struct CRGB { u_int8_t r; u_int8_t g; u_int8_t b; // default values are UNINITIALIZED inline CRGB() __attribute__((always_inline)) { } // allow assignment from 32-bit (really 24-bit) 0xRRGGBB color code inline CRGB& operator= (const u_int32_t colorcode) __attribute__((always_inline)) { r = (colorcode >> 16) & 0xFF; g = (colorcode >> 8) & 0xFF; b = (colorcode >> 0) & 0xFF; return *this; } // allow construction from 32-bit (really 24-bit) bit 0xRRGGBB color code inline CRGB( u_int32_t colorcode) __attribute__((always_inline)) : r((colorcode >> 16) & 0xFF), g((colorcode >> 8) & 0xFF), b((colorcode >> 0) & 0xFF) { } typedef enum { AliceBlue=0xF0F8FF, Amethyst=0x9966CC, AntiqueWhite=0xFAEBD7, Aqua=0x00FFFF, Aquamarine=0x7FFFD4, Azure=0xF0FFFF, Beige=0xF5F5DC, Bisque=0xFFE4C4, Black=0x000000, BlanchedAlmond=0xFFEBCD, Blue=0x0000FF, BlueViolet=0x8A2BE2, Brown=0xA52A2A, BurlyWood=0xDEB887, CadetBlue=0x5F9EA0, Chartreuse=0x7FFF00, Chocolate=0xD2691E, Coral=0xFF7F50, CornflowerBlue=0x6495ED, Cornsilk=0xFFF8DC, Crimson=0xDC143C, Cyan=0x00FFFF, DarkBlue=0x00008B, DarkCyan=0x008B8B, DarkGoldenrod=0xB8860B, DarkGray=0xA9A9A9, DarkGreen=0x006400, DarkKhaki=0xBDB76B, DarkMagenta=0x8B008B, DarkOliveGreen=0x556B2F, DarkOrange=0xFF8C00, DarkOrchid=0x9932CC, DarkRed=0x8B0000, DarkSalmon=0xE9967A, DarkSeaGreen=0x8FBC8F, DarkSlateBlue=0x483D8B, DarkSlateGray=0x2F4F4F, DarkTurquoise=0x00CED1, DarkViolet=0x9400D3, DeepPink=0xFF1493, DeepSkyBlue=0x00BFFF, DimGray=0x696969, DodgerBlue=0x1E90FF, FireBrick=0xB22222, FloralWhite=0xFFFAF0, ForestGreen=0x228B22, Fuchsia=0xFF00FF, Gainsboro=0xDCDCDC, GhostWhite=0xF8F8FF, Gold=0xFFD700, Goldenrod=0xDAA520, Gray=0x808080, Green=0x008000, GreenYellow=0xADFF2F, Honeydew=0xF0FFF0, HotPink=0xFF69B4, IndianRed=0xCD5C5C, Indigo=0x4B0082, Ivory=0xFFFFF0, Khaki=0xF0E68C, Lavender=0xE6E6FA, LavenderBlush=0xFFF0F5, LawnGreen=0x7CFC00, LemonChiffon=0xFFFACD, LightBlue=0xADD8E6, LightCoral=0xF08080, LightCyan=0xE0FFFF, LightGoldenrodYellow=0xFAFAD2, LightGreen=0x90EE90, LightGrey=0xD3D3D3, LightPink=0xFFB6C1, LightSalmon=0xFFA07A, LightSeaGreen=0x20B2AA, LightSkyBlue=0x87CEFA, LightSlateGray=0x778899, LightSteelBlue=0xB0C4DE, LightYellow=0xFFFFE0, Lime=0x00FF00, LimeGreen=0x32CD32, Linen=0xFAF0E6, Magenta=0xFF00FF, Maroon=0x800000, MediumAquamarine=0x66CDAA, MediumBlue=0x0000CD, MediumOrchid=0xBA55D3, MediumPurple=0x9370DB, MediumSeaGreen=0x3CB371, MediumSlateBlue=0x7B68EE, MediumSpringGreen=0x00FA9A, MediumTurquoise=0x48D1CC, MediumVioletRed=0xC71585, MidnightBlue=0x191970, MintCream=0xF5FFFA, MistyRose=0xFFE4E1, Moccasin=0xFFE4B5, NavajoWhite=0xFFDEAD, Navy=0x000080, OldLace=0xFDF5E6, Olive=0x808000, OliveDrab=0x6B8E23, Orange=0xFFA500, OrangeRed=0xFF4500, Orchid=0xDA70D6, PaleGoldenrod=0xEEE8AA, PaleGreen=0x98FB98, PaleTurquoise=0xAFEEEE, PaleVioletRed=0xDB7093, PapayaWhip=0xFFEFD5, PeachPuff=0xFFDAB9, Peru=0xCD853F, Pink=0xFFC0CB, Plaid=0xCC5533, Plum=0xDDA0DD, PowderBlue=0xB0E0E6, Purple=0x800080, Red=0xFF0000, RosyBrown=0xBC8F8F, RoyalBlue=0x4169E1, SaddleBrown=0x8B4513, Salmon=0xFA8072, SandyBrown=0xF4A460, SeaGreen=0x2E8B57, Seashell=0xFFF5EE, Sienna=0xA0522D, Silver=0xC0C0C0, SkyBlue=0x87CEEB, SlateBlue=0x6A5ACD, SlateGray=0x708090, Snow=0xFFFAFA, SpringGreen=0x00FF7F, SteelBlue=0x4682B4, Tan=0xD2B48C, Teal=0x008080, Thistle=0xD8BFD8, Tomato=0xFF6347, Turquoise=0x40E0D0, Violet=0xEE82EE, Wheat=0xF5DEB3, White=0xFFFFFF, WhiteSmoke=0xF5F5F5, Yellow=0xFFFF00, YellowGreen=0x9ACD32 } HTMLColorCode; }; #endif // FASTSPI_H
// KNTSpaceAfterScopeRule.h // // Copyright 2014 Programming Thomas // // 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 "KNTRule.h" /** Validates that the scope (+/-) is followed by a space before the (type) */ @interface KNTSpaceAfterScopeRule : KNTRule @end
#ifndef K_CL_BUFFER_H #define K_CL_BUFFER_H #include "Base.h" #include "Queue.h" #include "Event.h" #include "Data.h" #include "Context.h" #include "BufferFactory.h" namespace K { namespace CL { class Buffer { CLASS_NAME("Buffer"); private: friend class BufferFactory; /** the local data representation */ Data data; /** the buffer's handle */ cl_mem mem; private: /** hidden ctor. use static methods */ Buffer() {;} public: /** dtor */ ~Buffer() { verboseMeID(mem, "dtor"); clReleaseMemObject(mem); mem = 0; } /** no-copy */ Buffer(const Buffer& o) = delete; /** no-assign */ Buffer& operator = (const Buffer& o) = delete; public: /** transfer the buffer's content from the host to the device. returns an event to wait for */ Event upload(Queue* queue) { const size_t offset = 0; cl_event event; check( clEnqueueWriteBuffer(queue->getHandle(), getHandle(), CL_FALSE, offset, getSize(), getHostPointer(), 0, nullptr, &event) ); return std::move(Event(event)); } /** transfer the buffer's content from the device back to the host. returns an event to wait for */ Event download(Queue* queue) { const size_t offset = 0; cl_event event; check( clEnqueueReadBuffer(queue->getHandle(), getHandle(), CL_FALSE, offset, getSize(), getHostPointer(), 0, nullptr, &event) ); return std::move(Event(event)); } /** get the buffer's handle */ cl_mem getHandle() const { return mem; } /** get the underlying data */ const Data& getData() {return data;} private: /** get the pointer of the host's data-area */ uint8_t* getHostPointer() { return (uint8_t*) data.getData(); } /** get the buffer's size */ size_t getSize() const { return data.getSize(); } }; } } #endif // K_CL_BUFFER_H
/* * 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/backup/Backup_EXPORTS.h> #include <aws/backup/BackupRequest.h> #include <aws/core/utils/memory/stl/AWSString.h> #include <utility> namespace Aws { namespace Backup { namespace Model { /** */ class AWS_BACKUP_API GetBackupVaultAccessPolicyRequest : public BackupRequest { public: GetBackupVaultAccessPolicyRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "GetBackupVaultAccessPolicy"; } Aws::String SerializePayload() const override; /** * <p>The name of a logical container where backups are stored. Backup vaults are * identified by names that are unique to the account used to create them and the * AWS Region where they are created. They consist of lowercase letters, numbers, * and hyphens.</p> */ inline const Aws::String& GetBackupVaultName() const{ return m_backupVaultName; } /** * <p>The name of a logical container where backups are stored. Backup vaults are * identified by names that are unique to the account used to create them and the * AWS Region where they are created. They consist of lowercase letters, numbers, * and hyphens.</p> */ inline bool BackupVaultNameHasBeenSet() const { return m_backupVaultNameHasBeenSet; } /** * <p>The name of a logical container where backups are stored. Backup vaults are * identified by names that are unique to the account used to create them and the * AWS Region where they are created. They consist of lowercase letters, numbers, * and hyphens.</p> */ inline void SetBackupVaultName(const Aws::String& value) { m_backupVaultNameHasBeenSet = true; m_backupVaultName = value; } /** * <p>The name of a logical container where backups are stored. Backup vaults are * identified by names that are unique to the account used to create them and the * AWS Region where they are created. They consist of lowercase letters, numbers, * and hyphens.</p> */ inline void SetBackupVaultName(Aws::String&& value) { m_backupVaultNameHasBeenSet = true; m_backupVaultName = std::move(value); } /** * <p>The name of a logical container where backups are stored. Backup vaults are * identified by names that are unique to the account used to create them and the * AWS Region where they are created. They consist of lowercase letters, numbers, * and hyphens.</p> */ inline void SetBackupVaultName(const char* value) { m_backupVaultNameHasBeenSet = true; m_backupVaultName.assign(value); } /** * <p>The name of a logical container where backups are stored. Backup vaults are * identified by names that are unique to the account used to create them and the * AWS Region where they are created. They consist of lowercase letters, numbers, * and hyphens.</p> */ inline GetBackupVaultAccessPolicyRequest& WithBackupVaultName(const Aws::String& value) { SetBackupVaultName(value); return *this;} /** * <p>The name of a logical container where backups are stored. Backup vaults are * identified by names that are unique to the account used to create them and the * AWS Region where they are created. They consist of lowercase letters, numbers, * and hyphens.</p> */ inline GetBackupVaultAccessPolicyRequest& WithBackupVaultName(Aws::String&& value) { SetBackupVaultName(std::move(value)); return *this;} /** * <p>The name of a logical container where backups are stored. Backup vaults are * identified by names that are unique to the account used to create them and the * AWS Region where they are created. They consist of lowercase letters, numbers, * and hyphens.</p> */ inline GetBackupVaultAccessPolicyRequest& WithBackupVaultName(const char* value) { SetBackupVaultName(value); return *this;} private: Aws::String m_backupVaultName; bool m_backupVaultNameHasBeenSet; }; } // namespace Model } // namespace Backup } // namespace Aws
// // Created by abondar on 11.05.16. // #ifndef SOMECPP_IPPACKET_H #define SOMECPP_IPPACKET_H class IPPacket{ public: IPPacket(int id): iD(id){} int getID() const { return iD;} protected: int iD; }; #endif //SOMECPP_IPPACKET_H
//===- Transforms/Instrumentation.h - Instrumentation passes ----*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // This file defines constructor functions for instrumentation passes. // //===----------------------------------------------------------------------===// #ifndef LLVM_TRANSFORMS_INSTRUMENTATION_H #define LLVM_TRANSFORMS_INSTRUMENTATION_H #include "llvm/ADT/StringRef.h" #include "llvm/IR/BasicBlock.h" #include <vector> #if defined(__GNUC__) && defined(__linux__) && !defined(ANDROID) inline void *getDFSanArgTLSPtrForJIT() { extern __thread __attribute__((tls_model("initial-exec"))) void *__dfsan_arg_tls; return (void *)&__dfsan_arg_tls; } inline void *getDFSanRetValTLSPtrForJIT() { extern __thread __attribute__((tls_model("initial-exec"))) void *__dfsan_retval_tls; return (void *)&__dfsan_retval_tls; } #endif namespace llvm { /// Instrumentation passes often insert conditional checks into entry blocks. /// Call this function before splitting the entry block to move instructions /// that must remain in the entry block up before the split point. Static /// allocas and llvm.localescape calls, for example, must remain in the entry /// block. BasicBlock::iterator PrepareToSplitEntryBlock(BasicBlock &BB, BasicBlock::iterator IP); class ModulePass; class FunctionPass; // Insert GCOV profiling instrumentation struct GCOVOptions { static GCOVOptions getDefault(); // Specify whether to emit .gcno files. bool EmitNotes; // Specify whether to modify the program to emit .gcda files when run. bool EmitData; // A four-byte version string. The meaning of a version string is described in // gcc's gcov-io.h char Version[4]; // Emit a "cfg checksum" that follows the "line number checksum" of a // function. This affects both .gcno and .gcda files. bool UseCfgChecksum; // Add the 'noredzone' attribute to added runtime library calls. bool NoRedZone; // Emit the name of the function in the .gcda files. This is redundant, as // the function identifier can be used to find the name from the .gcno file. bool FunctionNamesInData; // Emit the exit block immediately after the start block, rather than after // all of the function body's blocks. bool ExitBlockBeforeBody; }; ModulePass *createGCOVProfilerPass(const GCOVOptions &Options = GCOVOptions::getDefault()); /// Options for the frontend instrumentation based profiling pass. struct InstrProfOptions { InstrProfOptions() : NoRedZone(false) {} // Add the 'noredzone' attribute to added runtime library calls. bool NoRedZone; // Name of the profile file to use as output std::string InstrProfileOutput; }; /// Insert frontend instrumentation based profiling. ModulePass *createInstrProfilingPass( const InstrProfOptions &Options = InstrProfOptions()); // Insert AddressSanitizer (address sanity checking) instrumentation FunctionPass *createAddressSanitizerFunctionPass(bool CompileKernel = false); ModulePass *createAddressSanitizerModulePass(bool CompileKernel = false); // Insert MemorySanitizer instrumentation (detection of uninitialized reads) FunctionPass *createMemorySanitizerPass(int TrackOrigins = 0); // Insert ThreadSanitizer (race detection) instrumentation FunctionPass *createThreadSanitizerPass(); // Insert DataFlowSanitizer (dynamic data flow analysis) instrumentation ModulePass *createDataFlowSanitizerPass( const std::vector<std::string> &ABIListFiles = std::vector<std::string>(), void *(*getArgTLS)() = nullptr, void *(*getRetValTLS)() = nullptr); // Options for sanitizer coverage instrumentation. struct SanitizerCoverageOptions { SanitizerCoverageOptions() : CoverageType(SCK_None), IndirectCalls(false), TraceBB(false), TraceCmp(false), Use8bitCounters(false) {} enum Type { SCK_None = 0, SCK_Function, SCK_BB, SCK_Edge } CoverageType; bool IndirectCalls; bool TraceBB; bool TraceCmp; bool Use8bitCounters; }; // Insert SanitizerCoverage instrumentation. ModulePass *createSanitizerCoverageModulePass( const SanitizerCoverageOptions &Options = SanitizerCoverageOptions()); #if defined(__GNUC__) && defined(__linux__) && !defined(ANDROID) inline ModulePass *createDataFlowSanitizerPassForJIT( const std::vector<std::string> &ABIListFiles = std::vector<std::string>()) { return createDataFlowSanitizerPass(ABIListFiles, getDFSanArgTLSPtrForJIT, getDFSanRetValTLSPtrForJIT); } #endif // BoundsChecking - This pass instruments the code to perform run-time bounds // checking on loads, stores, and other memory intrinsics. FunctionPass *createBoundsCheckingPass(); /// \brief This pass splits the stack into a safe stack and an unsafe stack to /// protect against stack-based overflow vulnerabilities. FunctionPass *createSafeStackPass(); } // End llvm namespace #endif
/* Copyright 2017 American Printing House for the Blind Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ #ifndef UTF_CONVERT_H #define UTF_CONVERT_H #include "utf.h" /******************************************************************************/ /* Returns the conversion of at most uchars_len digits to an int. * * The strtol function is used, with base 0, after a simple conversion is done. * The max number of digits allowed is 0xff, greater lengths are truncated. */ int utf16_convert_to_int(unichar *uchars, const int uchars_len); /* Converts escape characters designated with \ in uchars. Any unspecified * character is simply copied. Stops processing on NULL character or when * uchars_len is reached. * * \\ back slash (the back slash is not specifically specified) * \n newline * \r carriage return * \t tab * \s space * * \u#### \U#### \x#### \X#### unichar character with hex value #### * #### may contain upper or lower cases abcdef. The number of digits * must be four. * * Returns the number of characters stored in uchars. */ int utf16_convert_escapes(unichar *uchars, const int uchars_len); /* Converts cchars_len characters of cchars from UTF8 to UTF16. Stores at * most uchars_max - 1 unichar characters in uchars. Ensures that uchars is * NULL terminated. Stops processing on NULL character. * * If cchars_crs is NULL, returns the number of characters stored in uchars, not * including the NULL terminator. * * If cchars_crs is not NULL, returns the total number of characters that * would result from the conversion, not including the NULL terminator. Stores * the number of characters read from cchars in cchars_crs. Note that converted * characters are still stored in uchars. */ int utf8_convert_to_utf16(unichar *uchars, const int uchars_max, const char *cchars, const int cchars_max, int *cchars_crs); /* Converts uchars_len characters of uchars from UTF16 to UTF8. Stores at * most cchars_max - 1 characters in cchars. Ensures that cchars is NULL * terminated. Stops processing on NULL character. * * If uchars_crs is NULL, returns the number of characters stored in cchars, not * including the NULL terminator. * * If uchars_crs is not NULL, returns the total number of characters that * would result from the conversion, not including the NULL terminator. Stores * the number of characters read from uchars in uchars_crs. Note that converted * characters are still stored in cchars. */ int utf16_convert_to_utf8(char *cchars, const int cchars_max, const unichar *uchars, const int uchars_max, int *uchars_crs); /******************************************************************************/ #endif /* UTF_CONVERT_H */
/* * * Copyright 2015 gRPC 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. * */ #include <grpc/support/log.h> #include <grpc/support/time.h> #include <stdio.h> #ifdef GRPC_TIMERS_RDTSC #if defined(__i386__) static void gpr_get_cycle_counter(long long int *clk) { long long int ret; __asm__ volatile("rdtsc" : "=A"(ret)); *clk = ret; } // ---------------------------------------------------------------- #elif defined(__x86_64__) || defined(__amd64__) static void gpr_get_cycle_counter(long long int *clk) { unsigned long long low, high; __asm__ volatile("rdtsc" : "=a"(low), "=d"(high)); *clk = (long long)(high << 32) | (long long)low; } #endif static double cycles_per_second = 0; static long long int start_cycle; void gpr_precise_clock_init(void) { time_t start; long long end_cycle; gpr_log(GPR_DEBUG, "Calibrating timers"); start = time(NULL); while (time(NULL) == start) ; gpr_get_cycle_counter(&start_cycle); while (time(NULL) <= start + 10) ; gpr_get_cycle_counter(&end_cycle); cycles_per_second = (double)(end_cycle - start_cycle) / 10.0; gpr_log(GPR_DEBUG, "... cycles_per_second = %f\n", cycles_per_second); } void gpr_precise_clock_now(gpr_timespec *clk) { long long int counter; double secs; gpr_get_cycle_counter(&counter); secs = (double)(counter - start_cycle) / cycles_per_second; clk->clock_type = GPR_CLOCK_PRECISE; clk->tv_sec = (int64_t)secs; clk->tv_nsec = (int32_t)(1e9 * (secs - (double)clk->tv_sec)); } #else /* GRPC_TIMERS_RDTSC */ void gpr_precise_clock_init(void) {} void gpr_precise_clock_now(gpr_timespec *clk) { *clk = gpr_now(GPR_CLOCK_REALTIME); clk->clock_type = GPR_CLOCK_PRECISE; } #endif /* GRPC_TIMERS_RDTSC */
#ifndef _INCLUDED_ASW_MAP_BUILDER_H #define _INCLUDED_ASW_MAP_BUILDER_H #ifdef _WIN32 #pragma once #endif #include "missionchooser/iasw_map_builder.h" class KeyValues; class CMapLayout; class CLayoutSystem; class CMapBuilderWorkerThread; enum MapBuildStage { // Shared states STAGE_NONE = 0, // not building a map STAGE_MAP_BUILD_SCHEDULED, // map build scheduled but not yet begun // VBSP1 states STAGE_GENERATE, // generating random mission STAGE_VBSP, // executing VBSP.EXE (.VMF -> .BSP) STAGE_VVIS, // executing VVIS.EXE on .BSP STAGE_VRAD, // executing VRAD.EXE on .BSP // VBSP2 states STAGE_VBSP2, // converts .VMF -> .BSP with vis information }; static const int MAP_BUILD_OUTPUT_BUFFER_SIZE = 4096; static const int MAP_BUILD_OUTPUT_BUFFER_HALF_SIZE = 2048; // this class manages generation and compilation of maps class CASW_Map_Builder : public IASW_Map_Builder { public: CASW_Map_Builder(); ~CASW_Map_Builder(); virtual void Update( float flEngineTime ); virtual void ScheduleMapGeneration( const char* pszMap, float fTime, KeyValues *pMissionSettings, KeyValues *pMissionDefinition ); void ScheduleMapBuild(const char* pszMap, const float fTime); float GetProgress() { return m_flProgress; } const char* GetStatusMessage() { return m_szStatusMessage; } const char* GetMapName() { return m_szLayoutName; } MapBuildStage GetMapBuildStage() { return m_iBuildStage; } bool IsBuildingMission(); CMapLayout *GetCurrentlyBuildingMapLayout() const { return m_pBuildingMapLayout; } void RunCommandWhenFinished(const char *pCommand) { Q_strncpy(m_szCommandWhenFinished, pCommand, MAP_BUILD_OUTPUT_BUFFER_SIZE); } // A value that ranges from 0 to 100 indicating percentage of map progress complete CInterlockedInt m_nVBSP2Progress; char m_szVBSP2MapName[MAX_PATH]; private: void BuildMap(); void Execute(const char* pszCmd, const char* pszCmdLine); void ProcessExecution(); void FinishExecution(); void UpdateProgress(); char m_szCommandWhenFinished[MAP_BUILD_OUTPUT_BUFFER_SIZE]; // VBSP1 build options KeyValues *m_pMapBuilderOptions; // VBSP1 stuff, used to parse status from calling external processes (VBSP/VVIS/VRAD) int m_iCurrentBuildSearch; char m_szProcessBuffer[MAP_BUILD_OUTPUT_BUFFER_SIZE]; int m_iOutputBufferPos; char m_szOutputBuffer[MAP_BUILD_OUTPUT_BUFFER_SIZE]; bool m_bRunningProcess, m_bFinishedExecution; int m_iProcessReturnValue; HANDLE m_hChildStdinRd, m_hChildStdinWr, m_hChildStdoutRd, m_hChildStdoutWr, m_hChildStderrWr; HANDLE m_hProcess; // Time at which to start map processing (map generation, map build, etc.). // Can be set to delay the start of processing. float m_flStartProcessingTime; // Current state of map builder. MapBuildStage m_iBuildStage; // Name of the layout file from which the map is built. char m_szLayoutName[MAX_PATH]; // True if map generation has begun (within STAGE_GENERATE), false otherwise bool m_bStartedGeneration; // Progress/status of map build float m_flProgress; char m_szStatusMessage[128]; // Map layout being generated. CMapLayout *m_pGeneratedMapLayout; // Map layout of the level being compiled. CMapLayout *m_pBuildingMapLayout; // Layout system object used to generate map layout. CLayoutSystem *m_pLayoutSystem; int m_nLevelGenerationRetryCount; // Auxiliary settings/metadata that affect runtime behavior for a mission. KeyValues *m_pMissionSettings; // Specification for building the mission layout. KeyValues *m_pMissionDefinition; // Handles updating asynchronous VBSP2 status void UpdateVBSP2Progress(); // Background thread for VBSP2 processing CMapBuilderWorkerThread *m_pWorkerThread; }; #endif // _INCLUDED_ASW_MAP_BUILDER_H
/** * \author Sergio Agostinho - sergio(dot)r(dot)agostinho(at)gmail(dot)com * \date created: 2017/08/18 * \date last modified: 2017/08/18 * \file filter.h * \brief Header file which includes all headers from the filter module. * * \defgroup filter filter * \brief Provides implementations of filtering algorithms. */ #pragma once #ifndef CVL_FILTER_FILTER_H_ #define CVL_FILTER_FILTER_H_ #include <cvl/filter/duplicate.h> #endif //CVL_FILTER_FILTER_H_
/* * 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_MAPPING_INTERNAL_RANGE_DATA_COLLATOR_H_ #define CARTOGRAPHER_MAPPING_INTERNAL_RANGE_DATA_COLLATOR_H_ #include <memory> #include "absl/memory/memory.h" #include "cartographer/sensor/timed_point_cloud_data.h" namespace cartographer { namespace mapping { // Synchronizes TimedPointCloudData from different sensors. Input needs only be // monotonous in 'TimedPointCloudData::time', output is monotonous in per-point // timing. Up to one message per sensor is buffered, so a delay of the period of // the slowest sensor may be introduced, which can be alleviated by passing // subdivisions. class RangeDataCollator { public: explicit RangeDataCollator( const std::vector<std::string>& expected_range_sensor_ids) : expected_sensor_ids_(expected_range_sensor_ids.begin(), expected_range_sensor_ids.end()) {} sensor::TimedPointCloudOriginData AddRangeData( const std::string& sensor_id, const sensor::TimedPointCloudData& timed_point_cloud_data); private: sensor::TimedPointCloudOriginData CropAndMerge(); const std::set<std::string> expected_sensor_ids_; // Store at most one message for each sensor. std::map<std::string, sensor::TimedPointCloudData> id_to_pending_data_; common::Time current_start_ = common::Time::min(); common::Time current_end_ = common::Time::min(); }; } // namespace mapping } // namespace cartographer #endif // CARTOGRAPHER_MAPPING_INTERNAL_RANGE_DATA_COLLATOR_H_
#ifndef QCIMAGELOADERPRIV_H #define QCIMAGELOADERPRIV_H #include <QMap> #include <QStringList> #include <QRegExp> #include <QRegularExpressionMatch> #include <QRegularExpression> static QString qcImageLoaderDecodeFileName(const QString &input , qreal* ratio) { static QRegularExpression re("@[1-9]x+"); QRegularExpressionMatch matcher; qreal devicePixelRatio = 1; QString normalizedFileName = input; input.indexOf(re,0,&matcher); if (matcher.hasMatch()) { normalizedFileName.remove(matcher.capturedStart(0) , matcher.capturedLength(0)); QString ratioString = matcher.captured(0).remove(0,1); ratioString.remove(ratioString.size() - 1,1); devicePixelRatio = ratioString.toInt(); } if (ratio) { *ratio = devicePixelRatio; } return normalizedFileName; } /// Given a set of image files. choose the best resolution according to current ratio static QStringList qcImageLoaderFilter(const QStringList& files, qreal ratio) { QStringList result; QMap<QString,qreal> keyRatioMap; QMap<QString,QString> keyFileMap; for (int i = 0 ; i < files.size() ; i++) { QString file = files.at(i); QString key = file; qreal fileRatio = 1; key = qcImageLoaderDecodeFileName(file, &fileRatio); if (!keyRatioMap.contains(key)) { keyRatioMap[key] = fileRatio; keyFileMap[key] = file; continue; } qreal origDiff = qAbs(keyRatioMap[key] - ratio); qreal currDiff = qAbs(fileRatio - ratio); if ( (currDiff < origDiff ) || (currDiff == origDiff && currDiff > ratio)) { keyRatioMap[key] = fileRatio; keyFileMap[key] = file; } } QMapIterator<QString,qreal> iter(keyRatioMap); while (iter.hasNext()) { iter.next(); QString key = iter.key(); result << keyFileMap[key]; } return result; } #endif // QCIMAGELOADERPRIV_H
/*************************************************************** * * Copyright (C) 1990-2007, Condor Team, Computer Sciences Department, * University of Wisconsin-Madison, WI. * * 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 "condor_common.h" #include "condor_sys.h" #include "condor_debug.h" #include "condor_macros.h" #include "condor_open.h" #include "util_lib_proto.h" extern int Syscalls; //extern int open_file_stream( const char *file, int flags, size_t *len ); /* remote systems calls we use in this file */ extern int REMOTE_CONDOR_extern_name(char *path, char *buf, int bufsize); extern int REMOTE_CONDOR_getwd(char *path_name); #define CHUNK_SIZE 4096 int open_file_stream( const char *file, int flags, size_t *len ); double get_time(); /* ** Transfer a local file to a remote machine. */ int send_a_file( const char *local, const char *remote, int perm ) { int remote_fd, local_fd; char buf[ CHUNK_SIZE + 50 ]; int nbytes, bytes_to_go; size_t len; double start, finish; dprintf( D_ALWAYS, "Entering send_a_file( %s, %s, 0%o )\n", local,remote,perm); /* Start timing the transfer */ start = get_time(); /* Open the local file */ if( (local_fd=safe_open_wrapper(local,O_RDONLY,0)) < 0 ) { dprintf( D_FULLDEBUG, "Failed to open \"%s\" locally, errno = %d\n", local, errno); return -1; } /* Find length of the file */ len = lseek( local_fd, 0, 2 ); lseek( local_fd, 0, 0 ); /* Open the remote file */ remote_fd = open_file_stream( remote, O_WRONLY | O_CREAT | O_TRUNC, &len ); if( remote_fd < 0 ) { dprintf( D_ALWAYS, "Failed to open \"%s\" remotely, errno = %d\n", remote, errno ); return -1; } /* transfer the data */ dprintf( D_ALWAYS, "File length is %lu\n", (unsigned long)len ); for(bytes_to_go = len; bytes_to_go; bytes_to_go -= nbytes ) { nbytes = MIN( CHUNK_SIZE, bytes_to_go ); nbytes = read( local_fd, buf, nbytes ); if( nbytes < 0 ) { dprintf( D_ALWAYS, "Can't read fd %d, errno = %d\n", local_fd, errno ); (void)close( local_fd ); (void)close( remote_fd ); return -1; } if( write(remote_fd,buf,nbytes) != nbytes ) { dprintf( D_ALWAYS, "Can't write fd %d, errno = %d\n", remote_fd, errno ); (void)close( local_fd ); (void)close( remote_fd ); return -1; } } /* Clean up */ (void)close( local_fd ); (void)close( remote_fd ); /* report */ finish = get_time(); dprintf( D_ALWAYS,"Send_file() transferred %lu bytes, %d bytes/second\n", (unsigned long)len, (int)(len/(finish-start)) ); return len; } /* ** Transfer a remote file to the local machine. */ int get_file( const char *remote, const char *local, int mode ) { int remote_fd, local_fd; char buf[ CHUNK_SIZE + 50]; int nbytes, bytes_to_go; size_t len; double start, finish; dprintf( D_ALWAYS, "Entering get_file( %s, %s, 0%o )\n", remote,local,mode); start = get_time(); /* open the remote file */ remote_fd = open_file_stream( remote, O_RDONLY, &len ); if( remote_fd < 0 ) { dprintf( D_ALWAYS, "Failed to open \"%s\" remotely, errno = %d\n", remote, errno ); return -1; } /* open the local file */ if( (local_fd=safe_open_wrapper(local,O_WRONLY|O_CREAT|O_TRUNC,mode)) < 0 ) { dprintf( D_FULLDEBUG, "Failed to open \"%s\" locally, errno = %d\n", local, errno); return -1; } /* transfer the data */ for(bytes_to_go = len; bytes_to_go; bytes_to_go -= nbytes ) { nbytes = MIN( CHUNK_SIZE, bytes_to_go ); nbytes = read( remote_fd, buf, nbytes ); if( nbytes <= 0 ) { dprintf( D_ALWAYS, "Can't read fd %d, errno = %d\n", remote_fd, errno ); (void)close( local_fd ); (void)close( remote_fd ); return -1; } if( write(local_fd,buf,nbytes) != nbytes ) { dprintf( D_ALWAYS, "Can't write fd %d, errno = %d\n", local_fd, errno ); (void)close( local_fd ); (void)close( remote_fd ); return -1; } } /* clean up */ (void)close( local_fd ); (void)close( remote_fd ); finish = get_time(); dprintf( D_ALWAYS,"Get_file() transferred %lu bytes, %d bytes/second\n", (unsigned long) len, (int)(len/(finish-start)) ); return len; } #include <sys/time.h> double get_time() { struct timeval tv; if( gettimeofday( &tv, 0 ) < 0 ) { dprintf( D_ALWAYS, "gettimeofday failed in get_time(): %s\n", strerror(errno) ); return 0.0; } return (double)tv.tv_sec + (double)tv.tv_usec / 1000000.0; }
/* ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio 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 _BOARD_H_ #define _BOARD_H_ /* * Setup for the Olimex MSP430-P1611 proto board. */ /* * Board identifier. */ #define BOARD_OLIMEX_MSP430_P1611 #define BOARD_NAME "Olimex MSP430-P1611" /* * Clock constants. */ #define LFXT1CLK 32768 #define XT2CLK 8000000 #define DCOCLK 750000 /* * Pin definitions for the Olimex MSP430-P1611 board. */ #define P3_O_TXD0 4 #define P3_O_TXD0_MASK (1 << P3_O_TXD0) #define P3_I_RXD0 5 #define P3_I_RXD0_MASK (1 << P3_I_RXD0) #define P6_O_LED 0 #define P6_O_LED_MASK (1 << P6_O_LED) #define P6_I_BUTTON 1 #define P6_I_BUTTON_MASK (1 << P6_I_BUTTON) /* * Initial I/O ports settings. */ #define VAL_P1OUT 0x00 #define VAL_P1DIR 0xFF #define VAL_P2OUT 0x00 #define VAL_P2DIR 0xFF #define VAL_P3OUT P3_O_TXD0_MASK #define VAL_P3DIR ~P3_I_RXD0_MASK #define VAL_P4OUT 0x00 #define VAL_P4DIR 0xFF #define VAL_P5OUT 0x00 #define VAL_P5DIR 0xFF #define VAL_P6OUT P6_O_LED_MASK #define VAL_P6DIR ~P6_I_BUTTON_MASK #if !defined(_FROM_ASM_) #ifdef __cplusplus extern "C" { #endif void boardInit(void); #ifdef __cplusplus } #endif #endif /* _FROM_ASM_ */ #endif /* _BOARD_H_ */
/****************************************************************************** * Copyright 2013-2014 * * FileName:TcpServer.c * * Description: * * Modification history: * 2014/12/1, v1.0 create this file. *******************************************************************************/ #include <string.h> #include "freertos/FreeRTOS.h" #include "freertos/task.h" #include "freertos/semphr.h" #include "freertos/queue.h" #include "main.h" #include "lwip/sys.h" #include "lwip/sockets.h" xTaskHandle pvTcpServerThreadHandle; int StartUp( uint16_t port ) { int sock_fd = 0; struct sockaddr_in name; sock_fd = socket( PF_INET, SOCK_STREAM, 0 ); if (sock_fd == -1) { return -1; } memset( &name, 0, sizeof( name ) ); name.sin_family = AF_INET; name.sin_port = htons(port); name.sin_addr.s_addr = htonl(INADDR_ANY); if ( bind( sock_fd, (struct sockaddr *)&name, sizeof(name)) < 0 ) { return -1; } if ( port == 0) /* if dynamically allocating a port */ { return -1; } if ( listen(sock_fd, 5) < 0 ) { return -1; } return(sock_fd); } /** * @brief no . * @note no. * @param no. * @retval no. */ void tcp_server_thread( void *pvParameters ) { char *ReadBuf = NULL; int ReadLen; int server_sock = -1, client_sock = -1 ; struct sockaddr_in client_name; socklen_t client_name_len = sizeof( client_name ); xEventGroupWaitBits( smartconfig_event_group, LINK_OVER_BIT, false, true, portMAX_DELAY ); ReadBuf = malloc( 1461 ); if( ReadBuf == NULL ) { vTaskDelete(NULL); return; } server_sock = StartUp( 88 ); if( server_sock == -1 ) { printf("Tcp server startup fail!\r\n"); vTaskDelete(NULL); return; } for( ;; ) { client_sock = accept( server_sock , (struct sockaddr *)&client_name , &client_name_len ); if( client_sock != -1) { printf("accept socket!\r\n"); for( ;; ) { ReadLen = recv( client_sock , ReadBuf , 1460 , 0 ); if( ReadLen > 0 ) { ReadBuf[ReadLen] = '\0'; printf("Tcp server recive msg:%s!\r\n" , ReadBuf ); send( client_sock , ReadBuf , ReadLen , 0 ); } else { if( ( ReadLen < 0 )&& ( errno != EAGAIN ) ) { break; } else if( ReadLen == 0 ) { break; } } } } close( client_sock ); printf("close socket!\r\n"); } } /** * @brief no . * @note no. * @param no. * @retval no. */ void TcpServerInit( void ) { pvTcpServerThreadHandle = sys_thread_new("tcp server thread" , tcp_server_thread , NULL, 2048 , 5 ); if( pvTcpServerThreadHandle != NULL ) { printf("Tcp Server thread is Created!\r\n" ); } }
//============================================================================// // File: test_cp_main_f.c // // Description: Unit tests for CANpie (using message access functions) // // // // Copyright 2017 MicroControl GmbH & Co. KG // // 53844 Troisdorf - Germany // // www.microcontrol.net // // // //----------------------------------------------------------------------------// // Redistribution and use in source and binary forms, with or without // // modification, are permitted provided that the following conditions // // are met: // // 1. Redistributions of source code must retain the above copyright // // notice, this list of conditions, the following disclaimer and // // the referenced file 'LICENSE'. // // 2. Redistributions in binary form must reproduce the above copyright // // notice, this list of conditions and the following disclaimer in the // // documentation and/or other materials provided with the distribution. // // 3. Neither the name of MicroControl nor the names of its contributors // // may be used to endorse or promote products derived from this software // // without specific prior written permission. // // // // 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 "canpie.h" #include "stdio.h" #include "unity_fixture.h" //----------------------------------------------------------------------------// // RunAllTests() // // initialise Transmit PDOs // //----------------------------------------------------------------------------// static void RunAllTests(void) { RUN_TEST_GROUP(CP_MSG_CCF); RUN_TEST_GROUP(CP_MSG_FDF); RUN_TEST_GROUP(CP_CORE); } //----------------------------------------------------------------------------// // main() // // initialise Transmit PDOs // //----------------------------------------------------------------------------// int main(int argc, const char *argv[]) { printf("--------------------------------------------------------------\n"); printf("| CANpie unit tests\n"); printf("| Test API version %d.%d \n", (CP_VERSION_MAJOR), (CP_VERSION_MINOR)); printf("--------------------------------------------------------------\n"); //---------------------------------------------------------------- // start unit tests // UnityMain(argc, argv, RunAllTests); return 0; }
/*! @file @author Albert Semenov @date 02/2008 */ /* This file is part of MyGUI. MyGUI 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. MyGUI 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 MyGUI. If not, see <http://www.gnu.org/licenses/>. */ #ifndef __MYGUI_I_LAYER_ITEM_H__ #define __MYGUI_I_LAYER_ITEM_H__ #include "MyGUI_Prerequest.h" namespace MyGUI { class ILayer; class ILayerNode; class MYGUI_EXPORT ILayerItem { public: virtual ~ILayerItem() { } virtual ILayerItem* getLayerItemByPoint(int _left, int _top) const = 0; virtual const IntCoord& getLayerItemCoord() const = 0; virtual void attachItemToNode(ILayer* _layer, ILayerNode* _node) = 0; virtual void detachFromLayer() = 0; virtual void upLayerItem() = 0; }; } // namespace MyGUI #endif // __MYGUI_I_LAYER_ITEM_H__
#pragma once #define LT_DIRECT 0 #define LT_POINT 1 #define LT_SECONDARY 2 struct R_Light { u16 type; // Type of light source u16 level; // GI level Fvector diffuse; // Diffuse color of light Fvector position; // Position in world space Fvector direction; // Direction in world space float range; // Cutoff range float range2; // ^2 float falloff; // precalc to make light aqal to zero at light range float attenuation0; // Constant attenuation float attenuation1; // Linear attenuation float attenuation2; // Quadratic attenuation float energy; // For radiosity ONLY Fvector tri[3]; R_Light() { tri[0].set(0, 0, 0); tri[1].set(0, 0, EPS_S); tri[2].set(EPS_S, 0, 0); } };