text
stringlengths
4
6.14k
// // TABSegmentedControl.h // TABSegmentedControl // // Created by Dale Webster on 12/12/2016. // Copyright © 2016 TabApps. All rights reserved. // #import <UIKit/UIKit.h> //! Project version number for TABSegmentedControl. FOUNDATION_EXPORT double TABSegmentedControlVersionNumber; //! Project version string for TABSegmentedControl. FOUNDATION_EXPORT const unsigned char TABSegmentedControlVersionString[]; // In this header, you should import all the public headers of your framework using statements like #import <TABSegmentedControl/PublicHeader.h>
#include <assert.h> #include <pthread.h> #include <unist.h> #include "rpc_engine.h" static na_class_t *network_class = NULL; static na_context_t *na_context = NULL; static hg_context_t *sgdb_context = NULL; static hg_class_t *sgdb_class = NULL; static pthread_t sgdb_progress_tid; static int sgdb_progress_shutdown_flag = 0; static void* sgdb_progress_fn(void* foo); void sgdb_engine_init(na_bool_t listen, const char* local_addr) { int ret; /* boilerplate HG initialization steps */ network_class = NA_Initialize(local_addr, listen); assert(network_class); na_context = NA_Context_create(network_class); assert(na_context); sgdb_class = HG_Init_na(network_class, na_context); assert(sgdb_class); sgdb_context = HG_Context_create(sgdb_class); assert(hg_context); /* start up thread to drive progress */ ret = pthread_create(&sgdb_progress_tid, NULL, sgdb_progress_fn, NULL); assert(ret == 0); return; } void sgdb_engine_finalize(void) { int ret; /* tell progress thread to wrap things up */ sgdb_progress_shutdown_flag = 1; /* wait for it to shutdown cleanly */ ret = pthread_join(sgdb_progress_tid, NULL); assert(ret == 0); return; } static void* sgdb_progress_fn(void* foo) { hg_return_t ret; unsigned int actual_count; (void)foo; while(!sgdb_progress_shutdown_flag) { do { ret = HG_Trigger(hg_context, 0, 1, &actual_count); } while((ret == HG_SUCCESS) && actual_count && !sgdb_progress_shutdown_flag); if(!sgdb_progress_shutdown_flag) HG_Progress(hg_context, 100); } return(NULL); } hg_class_t* hg_engine_get_class(void) { return (sgdb_class); } void hg_engine_addr_lookup(const char* name, na_cb_t cb, void *arg) { na_return_t ret; ret = NA_Addr_lookup(network_class, na_context, cb, arg, name, NA_OP_ID_IGNORE); assert(ret == NA_SUCCESS); return; } void hg_engine_create_handle(na_addr_t addr, hg_id_t id, hg_handle_t* handle) { hg_return_t ret; ret = HG_Create(hg_context, addr, id, handle); assert(ret == HG_SUCCESS); return; }
/** ****************************************************************************** * @file DemoDatalog.h * @author MEMS Application Team * @version V2.1.0 * @date 01-September-2017 * @brief Header for DemoDatalog.c ****************************************************************************** * @attention * * <h2><center>&copy; COPYRIGHT(c) 2017 STMicroelectronics</center></h2> * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * 3. Neither the name of STMicroelectronics nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * ****************************************************************************** */ /* Define to prevent recursive inclusion ------------------------------------ */ #ifndef __DEMODATALOG__H #define __DEMODATALOG__H #ifdef __cplusplus extern "C" { #endif /* Includes ------------------------------------------------------------------*/ /* Public types --------------------------------------------------------------*/ typedef struct { uint8_t Date[3]; uint8_t Time[3]; } DataTime_t; typedef struct { DataTime_t DateTime; uint8_t DataValid; uint8_t ActivityType; } DataByte_AR_t; /* Private defines -----------------------------------------------------------*/ #define DATABYTE_AR_LEN ((uint8_t)20) #if (defined (USE_STM32F4XX_NUCLEO)) #define MOTION_AR_FLASH_SECTOR FLASH_SECTOR_6 #define MOTION_AR_FLASH_SECTOR_SIZE (SIZE_FLASH_SECTOR_6) #define SIZE_FLASH_SECTOR_6 ((uint32_t)0x00020000) #endif #if (defined (USE_STM32L4XX_NUCLEO)) #define MOTION_AR_FLASH_SECTOR_SIZE ((uint32_t)0x00020000) #endif #define MOTION_AR_FLASH_ITEM_SIZE 8 /* Exported defines ----------------------------------------------------------*/ #if (defined (USE_STM32F4XX_NUCLEO)) #define MOTION_AR_FLASH_ADD ((uint32_t)0x08040000) #endif #if (defined (USE_STM32L4XX_NUCLEO)) #define MOTION_AR_FLASH_ADD ((uint32_t)0x080DF800) /* page 447 */ #endif /* Public variables ----------------------------------------------------------*/ extern uint32_t Address_AR2F; extern DataByte_AR_t DataByte_AR[]; /* Exported macro ------------------------------------------------------------*/ /* Exported functions ------------------------------------------------------- */ flash_state_t Datalog_SetAddress(void); unsigned char Datalog_FlashErase(void); unsigned char Datalog_SaveActivity2Mem(uint8_t index_max); uint32_t Datalog_SearchNextFreeMemoryIndex(uint32_t *FlashSectorBaseAddress); void Datalog_FillBuffer2BSent(uint32_t add_f, uint8_t lenbuf); #ifdef __cplusplus } #endif #endif /* __DEMODATALOG__H */ /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
// // XGSMarkdownElement.h // TextKitPlayground // // Created by Julien Grimault on 13/10/13. // Copyright (c) 2013 XiaoGouSoftware. All rights reserved. // #import <Foundation/Foundation.h> #import "XGSMarkdownTagType.h" /** This is the base class providing common data for all MarkdownTag implementation. Subclass can add extra property and should override `attributes` to suit their needs. */ @interface XGSMarkdownTag : NSObject<NSCopying> @property (nonatomic, readonly) XGSMarkdownTagType type; @property (nonatomic, readonly, copy) NSString *name; //the pattern of the tag- all the partial patterns put together @property (nonatomic, readonly) NSString *pattern; // array of NSString * holding the different parts of the tag @property (nonatomic, readonly, copy) NSArray *partialPatterns; /// the regex used to match this markdown element @property (nonatomic, readonly, copy) NSString *regex; // /!\ abstract property, subclass must implement this @property (nonatomic, readonly) NSDictionary *attributes; @end
// // DAViewController.h // DAScratchPadExample // // Created by David Levi on 5/31/13. // Copyright (c) 2013 Double Apps Inc. All rights reserved. // #import <UIKit/UIKit.h> @interface DAViewController : UIViewController @end
/* * Copyright (c) 2010-2014 OTClient <https://github.com/edubart/otclient> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef PARTICLEEFFECT_H #define PARTICLEEFFECT_H #include "declarations.h" #include "particlesystem.h" #include <framework/luaengine/luaobject.h> #include <framework/otml/otml.h> class ParticleEffectType : public LuaObject { public: ParticleEffectType(); void load(const OTMLNodePtr& node); std::string getName() { return m_name; } std::string getDescription() { return m_description; } OTMLNodePtr getNode() { return m_node; } private: std::string m_name; std::string m_description; OTMLNodePtr m_node; }; class ParticleEffect : public LuaObject { public: ParticleEffect() {} void load(const ParticleEffectTypePtr& effectType); bool hasFinished() { return m_systems.size() == 0; } void render(); void update(); private: std::vector<ParticleSystemPtr> m_systems; }; #endif
// ////////////////////////////////////////////////////////////////////////////// // // Copyright 2014 Autodesk, Inc. All rights reserved. // // Use of this software is subject to the terms of the Autodesk license // agreement provided at the time of installation or download, or which // otherwise accompanies this software in either electronic or hard copy form. // ////////////////////////////////////////////////////////////////////////////// // #ifndef _ADESKABB_H #define _ADESKABB_H // DESCRIPTION: // // Using the fully qualified names from the `Adesk' struct can be // cumbersome. If there are no global name conflicts use the // following synonyms for convenience. // // Note: All interface descriptions and API headers must use fully qualified // names. That is, header files MUST NOT include this file and MUST NOT // use these abbreviations. Projects should have the option of not // bringing these typedefs into their namespace. // // Note: If any of the following abbreviations cause conflicts and // this file cannot be included, then the acceptable abbreviations // (those that do not cause conflicts) will have to be manually // introduced, or another abbreviation header file will have to // be created containing only the acceptable abbreviations. // // Note: When this file is included in a source file, it MUST BE // included AFTER all other include files (except possibly // other abbreviation include files). // For example: // #include "foo.h" // #include "bar.h" // #include "adeskabb.h" // <- Must be last! #include "adesk.h" typedef Adesk::Int8 Int8; typedef Adesk::Int16 Int16; typedef Adesk::Int32 Int32; typedef Adesk::UInt8 UInt8; typedef Adesk::UInt16 UInt16; typedef Adesk::UInt32 UInt32; typedef Adesk::uchar uchar; typedef Adesk::ushort ushort; typedef Adesk::uint uint; typedef Adesk::Boolean AdBoolean; // Todo: turn on Adesk_Boolean_is_bool in all builds #ifdef Adesk_Boolean_is_bool const bool kFalse = false; const bool kTrue = true; #else enum { kTrue = Adesk::kTrue, kFalse = Adesk::kFalse }; #endif #endif /* _ADESKABB_H */
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ #include "mpiimpl.h" /* -- Begin Profiling Symbol Block for routine MPI_Type_vector */ #if defined(HAVE_PRAGMA_WEAK) #pragma weak MPI_Type_vector = PMPI_Type_vector #elif defined(HAVE_PRAGMA_HP_SEC_DEF) #pragma _HP_SECONDARY_DEF PMPI_Type_vector MPI_Type_vector #elif defined(HAVE_PRAGMA_CRI_DUP) #pragma _CRI duplicate MPI_Type_vector as PMPI_Type_vector #elif defined(HAVE_WEAK_ATTRIBUTE) int MPI_Type_vector(int count, int blocklength, int stride, MPI_Datatype oldtype, MPI_Datatype *newtype) __attribute__((weak,alias("PMPI_Type_vector"))); #endif /* -- End Profiling Symbol Block */ /* Define MPICH_MPI_FROM_PMPI if weak symbols are not supported to build the MPI routines */ #ifndef MPICH_MPI_FROM_PMPI #undef MPI_Type_vector #define MPI_Type_vector PMPI_Type_vector #undef FUNCNAME #define FUNCNAME MPIR_Type_vector_impl #undef FCNAME #define FCNAME MPIU_QUOTE(FUNCNAME) int MPIR_Type_vector_impl(int count, int blocklength, int stride, MPI_Datatype oldtype, MPI_Datatype *newtype) { int mpi_errno = MPI_SUCCESS; MPI_Datatype new_handle; MPID_Datatype *new_dtp; int ints[3]; mpi_errno = MPID_Type_vector(count, blocklength, (MPI_Aint) stride, 0, /* stride not in bytes, in extents */ oldtype, &new_handle); if (mpi_errno) MPIU_ERR_POP(mpi_errno); ints[0] = count; ints[1] = blocklength; ints[2] = stride; MPID_Datatype_get_ptr(new_handle, new_dtp); mpi_errno = MPID_Datatype_set_contents(new_dtp, MPI_COMBINER_VECTOR, 3, /* ints (cnt, blklen, str) */ 0, /* aints */ 1, /* types */ ints, NULL, &oldtype); if (mpi_errno) MPIU_ERR_POP(mpi_errno); MPIU_OBJ_PUBLISH_HANDLE(*newtype, new_handle); fn_exit: return mpi_errno; fn_fail: goto fn_exit; } #endif #undef FUNCNAME #define FUNCNAME MPI_Type_vector #undef FCNAME #define FCNAME MPIU_QUOTE(FUNCNAME) /*@ MPI_Type_vector - Creates a vector (strided) datatype Input Parameters: + count - number of blocks (nonnegative integer) . blocklength - number of elements in each block (nonnegative integer) . stride - number of elements between start of each block (integer) - oldtype - old datatype (handle) Output Parameters: . newtype - new datatype (handle) .N ThreadSafe .N Fortran .N Errors .N MPI_SUCCESS .N MPI_ERR_ARG .N MPI_ERR_OTHER @*/ int MPI_Type_vector(int count, int blocklength, int stride, MPI_Datatype oldtype, MPI_Datatype *newtype) { int mpi_errno = MPI_SUCCESS; MPID_MPI_STATE_DECL(MPID_STATE_MPI_TYPE_VECTOR); MPIR_ERRTEST_INITIALIZED_ORDIE(); MPIU_THREAD_CS_ENTER(ALLFUNC,); MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_TYPE_VECTOR); /* Validate parameters, especially handles needing to be converted */ # ifdef HAVE_ERROR_CHECKING { MPID_BEGIN_ERROR_CHECKS; { MPID_Datatype *old_ptr = NULL; MPIR_ERRTEST_COUNT(count, mpi_errno); MPIR_ERRTEST_ARGNEG(blocklength, "blocklen", mpi_errno); MPIR_ERRTEST_DATATYPE(oldtype, "datatype", mpi_errno); if (oldtype != MPI_DATATYPE_NULL && HANDLE_GET_KIND(oldtype) != HANDLE_KIND_BUILTIN) { MPID_Datatype_get_ptr(oldtype, old_ptr); MPID_Datatype_valid_ptr(old_ptr, mpi_errno); if (mpi_errno) goto fn_fail; } } MPID_END_ERROR_CHECKS; } # endif /* HAVE_ERROR_CHECKING */ /* ... body of routine ... */ mpi_errno = MPIR_Type_vector_impl(count, blocklength, stride, oldtype, newtype); if (mpi_errno) goto fn_fail; /* ... end of body of routine ... */ fn_exit: MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_TYPE_VECTOR); MPIU_THREAD_CS_EXIT(ALLFUNC,); return mpi_errno; fn_fail: /* --BEGIN ERROR HANDLING-- */ # ifdef HAVE_ERROR_CHECKING { mpi_errno = MPIR_Err_create_code( mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, "**mpi_type_vector", "**mpi_type_vector %d %d %d %D %p", count, blocklength, stride, oldtype, newtype); } # endif mpi_errno = MPIR_Err_return_comm( NULL, FCNAME, mpi_errno ); goto fn_exit; /* --END ERROR HANDLING-- */ }
// // AppDelegate.h // CollectionViewLayout // // Created by 夏远全 on 2017/3/3. // Copyright © 2017年 夏远全. All rights reserved. // #import <UIKit/UIKit.h> @interface AppDelegate : UIResponder <UIApplicationDelegate> @property (strong, nonatomic) UIWindow *window; @end
#pragma once #include <ppltasks.h> #include <boost/signals2.hpp> #include <boost/bind.hpp> #include "VosVideo.Communication/CommunicationManager.h" #include "DeviceConfigurationRequest.h" #include "DeviceConfigurationResponse.h" namespace vosvideo { namespace devicemanagement { enum class DeviceConfigurationFlag { REMOVED, ADDED, UPDATED, NOCHANGE }; class DeviceConfigurationManager : public vosvideo::communication::MessageReceiver { public: DeviceConfigurationManager(std::shared_ptr<vosvideo::communication::CommunicationManager> communicationManager, std::shared_ptr<vosvideo::communication::PubSubService> pubsubService, const std::wstring& accountId, const std::wstring& siteId); virtual ~DeviceConfigurationManager(); virtual void OnMessageReceived(std::shared_ptr<vosvideo::data::ReceivedData> receivedMessage) override; concurrency::task<web::json::value> RequestDeviceConfigurationAsync(); void RunDeviceDiscoveryAsync(std::shared_ptr<vosvideo::data::ReceivedData> msg); // Signals boost::signals2::connection ConnectToDeviceUpdateSignal(boost::signals2::signal<void (web::json::value& confs)>::slot_function_type subscriber); // boost::signals2::connection ConnectToDeviceStartTestSignal(boost::signals2::signal<void (web::json::value& confs)>::slot_function_type subscriber); // boost::signals2::connection ConnectToDeviceStopTestSignal(boost::signals2::signal<void (web::json::value& confs)>::slot_function_type subscriber); protected: void ParseDeviceConfiguration(web::json::value& resp); private: // Updates real camera configuration boost::signals2::signal<void (web::json::value& confs)> deviceUpdateSignal_; std::shared_ptr<vosvideo::communication::PubSubService> pubSubService_; std::shared_ptr<vosvideo::communication::CommunicationManager> communicationManager_; bool devReqInProgress_ = false; bool devDiscoveryInProgress_ = false; DeviceConfigurationResponse devConfResponse_; std::wstring accountId_; std::wstring siteId_; }; } }
#ifndef UTILS_H #define UTILS_H #include <random> #include <string> #include <time.h> #include <vector> #include "feStats.h" class feUtils { public: std::mt19937 rand; feUtils() { rand.seed(time(NULL)); } feUtils(std::string s) { std::seed_seq seed(s.begin(), s.end()); rand.seed(seed); } int feRNG(); }; #endif
#include <stdio.h> #include <stdlib.h> #include <signal.h> #include <unistd.h> #include "temp.h" #include "fans.h" #define HISTORY_LEN 6 #define MAX_SENSORS 10 #define SLEEP_TIME 1 #define FAN_ON_TEMPERATURE 75 #define FAN_OFF_TEMPERATURE 65 volatile int need_exit = 0; void restore_fans(int signo) { need_exit = 1; } void install_signal_handler(int signo) { if (signal(signo, restore_fans) == SIG_ERR) { fprintf(stderr, "Failed to set signal handler\n"); exit(1); } } void install_signal_handlers() { install_signal_handler(SIGHUP); install_signal_handler(SIGINT); install_signal_handler(SIGQUIT); install_signal_handler(SIGILL); install_signal_handler(SIGTRAP); install_signal_handler(SIGABRT); install_signal_handler(SIGFPE); install_signal_handler(SIGBUS); install_signal_handler(SIGSEGV); install_signal_handler(SIGSYS); install_signal_handler(SIGPIPE); install_signal_handler(SIGTERM); install_signal_handler(SIGUSR1); install_signal_handler(SIGUSR2); install_signal_handler(SIGTTOU); install_signal_handler(SIGPROF); install_signal_handler(SIGXCPU); install_signal_handler(SIGXFSZ); } int main() { int temp_fds[MAX_SENSORS]; int temp_fds_len; int temps[HISTORY_LEN] = {}; int temp_offset = 0; int temp_offset_max = 0; temp_fds_len = init_temp(temp_fds, MAX_SENSORS); if (temp_fds_len == 0) { fprintf(stderr, "Failed to find temperature sensors\n"); return 1; } if (!init_fans()) { fprintf(stderr, "Failed to init fan control. Make sure that you have root rights\n"); return 1; } install_signal_handlers(); setbuf(stdout, NULL); printf("Started, found %d sensors\n", temp_fds_len); while(!need_exit){ int temp; int avg; int i; temp = get_temp(temp_fds, temp_fds_len); if (temp == -1) { fprintf(stderr, "Failed to get temperature\n"); } temps[temp_offset] = temp; avg = 0; for (i = 0; i <= temp_offset_max; i += 1) { avg += temps[i]; } avg /= (temp_offset_max + 1); // printf("Last temp: %d, avg: %d\n", temp, avg); if(!both_fans_running()) { if(avg >= FAN_ON_TEMPERATURE) { printf("The temperature is %d, turning on fans\n", avg); turn_on_fans(); } } else { if (avg <= FAN_OFF_TEMPERATURE) { printf("The temperature is %d, turning off fans\n", avg); turn_off_fans(); } } temp_offset = (temp_offset + 1) % HISTORY_LEN; if (temp_offset > temp_offset_max) { temp_offset_max = temp_offset; } sleep(SLEEP_TIME); } turn_on_fans(); exit(0); }
#pragma once void slack::api::ApiBase::run(const std::string &path, const jsonDoc &params, const std::function<void(const std::string&)> & callback) { auto httpClient = std::shared_ptr<HttpClient>(new HttpClient(this, client->Service(), path, params, callback)); clients.insert(httpClient); httpClient->run(); } const std::string &slack::api::ApiBase::getToken() { return client->getToken(); }
/* lzo1f.h -- public interface of the LZO1F compression algorithm This file is part of the LZO real-time data compression library. Copyright (C) 2002 Markus Franz Xaver Johannes Oberhumer Copyright (C) 2001 Markus Franz Xaver Johannes Oberhumer Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1999 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1998 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1997 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. The LZO library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. The LZO 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 General Public License for more details. You should have received a copy of the GNU General Public License along with the LZO library; see the file COPYING. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. Markus F.X.J. Oberhumer <markus@oberhumer.com> http://www.oberhumer.com/opensource/lzo/ */ #ifndef __LZO1F_H #define __LZO1F_H #ifndef __LZOCONF_H #include <lzoconf.h> #endif #ifdef __cplusplus extern "C" { #endif /*********************************************************************** // ************************************************************************/ /* Memory required for the wrkmem parameter. * When the required size is 0, you can also pass a NULL pointer. */ #define LZO1F_MEM_COMPRESS ((lzo_uint32) (16384L * lzo_sizeof_dict_t)) #define LZO1F_MEM_DECOMPRESS (0) /* decompression */ LZO_EXTERN(int) lzo1f_decompress ( const lzo_byte *src, lzo_uint src_len, lzo_byte *dst, lzo_uintp dst_len, lzo_voidp wrkmem /* NOT USED */ ); /* safe decompression with overrun testing */ LZO_EXTERN(int) lzo1f_decompress_safe ( const lzo_byte *src, lzo_uint src_len, lzo_byte *dst, lzo_uintp dst_len, lzo_voidp wrkmem /* NOT USED */ ); /*********************************************************************** // ************************************************************************/ LZO_EXTERN(int) lzo1f_1_compress ( const lzo_byte *src, lzo_uint src_len, lzo_byte *dst, lzo_uintp dst_len, lzo_voidp wrkmem ); /*********************************************************************** // better compression ratio at the cost of more memory and time ************************************************************************/ #define LZO1F_999_MEM_COMPRESS ((lzo_uint32) (5 * 16384L * sizeof(short))) #if !defined(LZO_999_UNSUPPORTED) LZO_EXTERN(int) lzo1f_999_compress ( const lzo_byte *src, lzo_uint src_len, lzo_byte *dst, lzo_uintp dst_len, lzo_voidp wrkmem ); #endif #ifdef __cplusplus } /* extern "C" */ #endif #endif /* already included */
#include "stdint.h" #include "occa/cBase.hpp" #define OCCA_ARG_COUNT(...) OCCA_ARG_COUNT2(__VA_ARGS__, \ 50,49,48,47,46,45,44,43,42,41, \ 40,39,38,37,36,35,34,33,32,31, \ 30,29,28,27,26,25,24,23,22,21, \ 20,19,18,17,16,15,14,13,12,11, \ 10,9,8,7,6,5,4,3,2,1) #define OCCA_ARG_COUNT2(KERNEL, \ _1,_2,_3,_4,_5,_6,_7,_8,_9,_10, \ _11,_12,_13,_14,_15,_16,_17,_18,_19,_20, \ _21,_22,_23,_24,_25,_26,_27,_28,_29,_30, \ _31,_32,_33,_34,_35,_36,_37,_38,_39,_40, \ _41,_42,_43,_44,_45,_46,_47,_48,_49,_50, N, ...) N #define OCCA_C_RUN_KERNEL1(...) OCCA_C_RUN_KERNEL2(__VA_ARGS__) #define OCCA_C_RUN_KERNEL2(...) OCCA_C_RUN_KERNEL3(__VA_ARGS__) #define OCCA_C_RUN_KERNEL3(N, kernel, ...) occaKernelRun##N(kernel, __VA_ARGS__) #define occaKernelRun(...) OCCA_C_RUN_KERNEL1(OCCA_ARG_COUNT(__VA_ARGS__), __VA_ARGS__)
#ifndef VITA_IMPORT_H #define VITA_IMPORT_H #include <stdbool.h> #include <stdint.h> #include <stdio.h> /* These fields must always come at the beginning of the NID-bearing structs */ typedef struct { char *name; uint32_t NID; } vita_imports_common_fields; typedef struct { char *name; uint32_t NID; } vita_imports_stub_t; typedef struct { char *name; uint32_t NID; bool is_kernel; vita_imports_stub_t **functions; vita_imports_stub_t **variables; int n_functions; int n_variables; uint32_t flags; } vita_imports_module_t; typedef struct { char *name; uint32_t NID; vita_imports_module_t **modules; int n_modules; } vita_imports_lib_t; typedef struct { vita_imports_lib_t **libs; int n_libs; } vita_imports_t; vita_imports_t *vita_imports_load(const char *filename, int verbose); vita_imports_t *vita_imports_loads(FILE *text, int verbose); vita_imports_t *vita_imports_new(int n_libs); void vita_imports_free(vita_imports_t *imp); vita_imports_lib_t *vita_imports_find_lib(vita_imports_t *imp, uint32_t NID); vita_imports_lib_t *vita_imports_lib_new(const char *name, uint32_t NID, int n_modules); void vita_imports_lib_free(vita_imports_lib_t *lib); vita_imports_module_t *vita_imports_find_module(vita_imports_lib_t *lib, uint32_t NID); vita_imports_module_t *vita_imports_module_new(const char *name, bool kernel, uint32_t NID, int n_functions, int n_variables); void vita_imports_module_free(vita_imports_module_t *mod); vita_imports_stub_t *vita_imports_find_function(vita_imports_module_t *mod, uint32_t NID); vita_imports_stub_t *vita_imports_find_variable(vita_imports_module_t *mod, uint32_t NID); vita_imports_stub_t *vita_imports_stub_new(const char *name, uint32_t NID); void vita_imports_stub_free(vita_imports_stub_t *stub); #endif
/* - MuzicZapper - Copyright (C) 2011-2017 Sebastien Vavassori * * This program is free software; you can redistribute it and/or * modify it under the terms of the MIT License. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #ifndef SETTINGS_DIALOG_H #define SETTINGS_DIALOG_H #include <QtWidgets/QDialog> class QAbstractButton; namespace Ui { class SettingsDialog; } class SettingsDialog : public QDialog { Q_OBJECT public: explicit SettingsDialog(QWidget *parent = 0); ~SettingsDialog(); protected: void closeEvent(QCloseEvent *); public Q_SLOTS: virtual void accept() Q_DECL_OVERRIDE; private Q_SLOTS: void clicked(QAbstractButton *button); private: Ui::SettingsDialog *ui; void readSettings(); void writeSettings(); void ensureDirectoryExists(const QString &path); }; #endif // SETTINGS_DIALOG_H
/* * protocol_manager.h * * Created on: 2016/4/15 * Author: gcy */ #ifndef _MANAGER_PROTOCOL_H_ #define _MANAGER_PROTOCOL_H_ #define START_FLAG (0xAA66) #define MAX_IMEI_LENGTH (15) enum { CMD_LOGIN = 1, CMD_IMEI_DATA = 2 }; #pragma pack(push, 1) /* * Message header definition */ typedef struct { short signature; char cmd; char seq; short length; }__attribute__((__packed__)) MSG_HEADER; #define MSG_HEADER_LEN sizeof(MSG_HEADER) /* * login message structure */ typedef MSG_HEADER MSG_LOGIN_REQ; typedef MSG_HEADER MSG_LOGIN_RSP; /* * imei data message structure */ typedef struct { MSG_HEADER header; char IMEI[MAX_IMEI_LENGTH]; }__attribute__((__packed__)) MSG_IMEI_DATA_REQ; typedef struct { int timestamp; float longitude; float latitude; char speed; short course; }__attribute__((__packed__)) GPS; typedef struct { char IMEI[MAX_IMEI_LENGTH]; char online_offline; //1 for online; 2 for offline GPS gps; }__attribute__((__packed__)) IMEI_DATA; typedef struct { MSG_HEADER header; IMEI_DATA imei_data; }__attribute__((__packed__)) MSG_IMEI_DATA_RSP; #pragma pack(pop) #endif /* _MANAGER_PROTOCOL_H_ */
// // UIScrollView+APParallaxHeader.h // // Created by Mathias Amnell on 2013-04-12. // Copyright (c) 2013 Apping AB. All rights reserved. // #import <UIKit/UIKit.h> @class APParallaxView; @class APParallaxShadowView; #pragma mark UIScrollView Category @interface UIScrollView (APParallaxHeader) - (void)addParallaxWithImage:(UIImage *)image andHeight:(CGFloat)height andShadow:(BOOL)shadow; - (void)addParallaxWithImage:(UIImage *)image andHeight:(CGFloat)height; - (void)addParallaxWithView:(UIView*)view andHeight:(CGFloat)height; @property (nonatomic, strong, readonly) APParallaxView *parallaxView; @property (nonatomic, assign) BOOL showsParallax; @property (nonatomic, assign) CGFloat parallaxHeight; @end #pragma mark APParallaxView @protocol APParallaxViewDelegate; typedef NS_ENUM(NSUInteger, APParallaxTrackingState) { APParallaxTrackingActive = 0, APParallaxTrackingInactive }; @interface APParallaxView : UIView @property (weak) id<APParallaxViewDelegate> delegate; @property (nonatomic, readonly) APParallaxTrackingState state; @property (nonatomic, strong) UIImageView *imageView; @property (nonatomic, strong) UIView *currentSubView; @property (nonatomic, strong) APParallaxShadowView *shadowView; @property (nonatomic, assign) CGFloat minimumHeight; - (id)initWithFrame:(CGRect)frame andShadow:(BOOL)shadow; @end @protocol APParallaxViewDelegate <NSObject> @optional - (void)parallaxView:(APParallaxView *)view willChangeFrame:(CGRect)frame; - (void)parallaxView:(APParallaxView *)view didChangeFrame:(CGRect)frame; @end #pragma mark APParallaxShadowView @interface APParallaxShadowView : UIView @end
#ifndef INCLUDED_haxe_Timer #define INCLUDED_haxe_Timer #ifndef HXCPP_H #include <hxcpp.h> #endif HX_DECLARE_CLASS1(haxe,Timer) namespace haxe{ class HXCPP_CLASS_ATTRIBUTES Timer_obj : public hx::Object{ public: typedef hx::Object super; typedef Timer_obj OBJ_; Timer_obj(); Void __construct(Float time); public: inline void *operator new( size_t inSize, bool inContainer=true,const char *inName="haxe.Timer") { return hx::Object::operator new(inSize,inContainer,inName); } static hx::ObjectPtr< Timer_obj > __new(Float time); static Dynamic __CreateEmpty(); static Dynamic __Create(hx::DynamicArray inArgs); //~Timer_obj(); HX_DO_RTTI_ALL; Dynamic __Field(const ::String &inString, hx::PropertyAccess inCallProp); static bool __GetStatic(const ::String &inString, Dynamic &outValue, hx::PropertyAccess inCallProp); Dynamic __SetField(const ::String &inString,const Dynamic &inValue, hx::PropertyAccess inCallProp); static bool __SetStatic(const ::String &inString, Dynamic &ioValue, hx::PropertyAccess inCallProp); void __GetFields(Array< ::String> &outFields); static void __register(); void __Mark(HX_MARK_PARAMS); void __Visit(HX_VISIT_PARAMS); ::String __ToString() const { return HX_HCSTRING("Timer","\xa5","\x2f","\x63","\xa3"); } static void __boot(); static Array< ::Dynamic > sRunningTimers; static ::haxe::Timer delay( Dynamic f,int time); static Dynamic delay_dyn(); static Float getMS( ); static Dynamic getMS_dyn(); static Dynamic measure( Dynamic f,Dynamic pos); static Dynamic measure_dyn(); static Float stamp( ); static Dynamic stamp_dyn(); static Void __checkTimers( ); static Dynamic __checkTimers_dyn(); static Float __nextWake( Float limit); static Dynamic __nextWake_dyn(); static Dynamic lime_time_stamp; static Dynamic &lime_time_stamp_dyn() { return lime_time_stamp;} Float mTime; Float mFireAt; bool mRunning; Dynamic run; inline Dynamic &run_dyn() {return run; } virtual Void stop( ); Dynamic stop_dyn(); virtual Void __check( Float inTime); Dynamic __check_dyn(); }; } // end namespace haxe #endif /* INCLUDED_haxe_Timer */
// // ViewController.h // PiconSampleProject // // Created by naoty on 2013/11/12. // Copyright (c) 2013年 Naoto Kaneko. All rights reserved. // #import <UIKit/UIKit.h> @interface ViewController : UIViewController @end
// // Generated by the J2ObjC translator. DO NOT EDIT! // source: android/libcore/luni/src/main/java/java/nio/NioUtils.java // #ifndef _JavaNioNioUtils_H_ #define _JavaNioNioUtils_H_ #include "J2ObjC_header.h" @class IOSByteArray; @class JavaIoFileDescriptor; @class JavaNioByteBuffer; @class JavaNioChannelsFileChannel; @protocol JavaNetSocketOption; @protocol JavaNioFileDescriptorChannel; @protocol JavaUtilSet; /*! internal use only */ @interface JavaNioNioUtils : NSObject #pragma mark Public + (void)freeDirectBufferWithJavaNioByteBuffer:(JavaNioByteBuffer *)buffer; /*! @brief Returns the int file descriptor from within the given FileChannel 'fc'. */ + (JavaIoFileDescriptor *)getFDWithJavaNioChannelsFileChannel:(JavaNioChannelsFileChannel *)fc; /*! @brief Gets the supplied option from the channel if option is a member of allowedOptions. @throws IOException if the value could not be read due to IO errors. @throws IllegalArgumentException if the socket option is invalid. @throws UnsupportedOperationException if the option is not a member of allowedOptions. @throws ClosedChannelException if the channel is closed */ + (id)getSocketOptionWithJavaNioFileDescriptorChannel:(id<JavaNioFileDescriptorChannel>)channel withJavaUtilSet:(id<JavaUtilSet>)allowedOptions withJavaNetSocketOption:(id<JavaNetSocketOption>)option; /*! @brief Helps bridge between io and nio. */ + (JavaNioChannelsFileChannel *)newFileChannelWithId:(id)stream withJavaIoFileDescriptor:(JavaIoFileDescriptor *)fd withInt:(jint)mode OBJC_METHOD_FAMILY_NONE; /*! @brief Sets the supplied option on the channel to have the value if option is a member of allowedOptions. @throws IOException if the value could not be set due to IO errors. @throws IllegalArgumentException if the socket option or the value is invalid. @throws UnsupportedOperationException if the option is not a member of allowedOptions. @throws ClosedChannelException if the channel is closed */ + (void)setSocketOptionWithJavaNioFileDescriptorChannel:(id<JavaNioFileDescriptorChannel>)channel withJavaUtilSet:(id<JavaUtilSet>)allowedOptions withJavaNetSocketOption:(id<JavaNetSocketOption>)option withId:(id)value; /*! @brief Exposes the array backing a non-direct ByteBuffer, even if the ByteBuffer is read-only. Normally, attempting to access the array backing a read-only buffer throws. */ + (IOSByteArray *)unsafeArrayWithJavaNioByteBuffer:(JavaNioByteBuffer *)b; /*! @brief Exposes the array offset for the array backing a non-direct ByteBuffer, even if the ByteBuffer is read-only. */ + (jint)unsafeArrayOffsetWithJavaNioByteBuffer:(JavaNioByteBuffer *)b; @end J2OBJC_EMPTY_STATIC_INIT(JavaNioNioUtils) FOUNDATION_EXPORT void JavaNioNioUtils_freeDirectBufferWithJavaNioByteBuffer_(JavaNioByteBuffer *buffer); FOUNDATION_EXPORT JavaIoFileDescriptor *JavaNioNioUtils_getFDWithJavaNioChannelsFileChannel_(JavaNioChannelsFileChannel *fc); FOUNDATION_EXPORT JavaNioChannelsFileChannel *JavaNioNioUtils_newFileChannelWithId_withJavaIoFileDescriptor_withInt_(id stream, JavaIoFileDescriptor *fd, jint mode); FOUNDATION_EXPORT IOSByteArray *JavaNioNioUtils_unsafeArrayWithJavaNioByteBuffer_(JavaNioByteBuffer *b); FOUNDATION_EXPORT jint JavaNioNioUtils_unsafeArrayOffsetWithJavaNioByteBuffer_(JavaNioByteBuffer *b); FOUNDATION_EXPORT void JavaNioNioUtils_setSocketOptionWithJavaNioFileDescriptorChannel_withJavaUtilSet_withJavaNetSocketOption_withId_(id<JavaNioFileDescriptorChannel> channel, id<JavaUtilSet> allowedOptions, id<JavaNetSocketOption> option, id value); FOUNDATION_EXPORT id JavaNioNioUtils_getSocketOptionWithJavaNioFileDescriptorChannel_withJavaUtilSet_withJavaNetSocketOption_(id<JavaNioFileDescriptorChannel> channel, id<JavaUtilSet> allowedOptions, id<JavaNetSocketOption> option); J2OBJC_TYPE_LITERAL_HEADER(JavaNioNioUtils) #endif // _JavaNioNioUtils_H_
// // IVVAPIConstants.h // AwesomeCurrencyConverter // // Created by Vladimir Ignatov on 04/03/2017. // Copyright © 2017 Ignatov inc. All rights reserved. // #import <Foundation/Foundation.h> #pragma mark - API endpoints extern NSString * const IVVAPIBaseURL; extern NSString * const IVVCurrencyRatesURL; #pragma mark - API response keys extern NSString * const IVVAPIPayloadKeyPath; extern NSString * const IVVAPIDataKey;
// // Copyright (c) 2008-2016 the Urho3D project. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. // #pragma once // Note: GraphicsImpl class is purposefully API-specific. It should not be used by Urho3D client applications, // unless required for e.g. integration of 3rd party libraries that interface directly with the graphics device. #if defined(URHO3D_OPENGL) #include "OpenGL/OGLGraphicsImpl.h" #elif defined(URHO3D_D3D11) #include "Direct3D11/D3D11GraphicsImpl.h" #else #include "Direct3D9/D3D9GraphicsImpl.h" #endif
/* Copyright (c) 2012 Martin Sustrik All rights reserved. Copyright (c) 2013 GoPivotal, Inc. All rights reserved. Copyright 2015 Garrett D'Amore <garrett@damore.org> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include "../src/grid.h" #include "../src/survey.h" #include "../src/tcp.h" #include "testutil.h" #include "../src/utils/attr.h" #include "../src/utils/thread.c" #define SOCKET_ADDRESS_H "tcp://127.0.0.1:5570" #define SOCKET_ADDRESS_I "tcp://127.0.0.1:5571" #define SOCKET_ADDRESS_J "tcp://127.0.0.1:5572" void device5 (GRID_UNUSED void *arg) { int rc; int dev0; int dev1; /* Intialise the device sockets. */ dev0 = test_socket (AF_SP_RAW, GRID_RESPONDENT); test_bind (dev0, SOCKET_ADDRESS_H); dev1 = test_socket (AF_SP_RAW, GRID_SURVEYOR); test_bind (dev1, SOCKET_ADDRESS_I); /* Run the device. */ rc = grid_device (dev0, dev1); grid_assert (rc < 0 && grid_errno () == ETERM); /* Clean up. */ test_close (dev0); test_close (dev1); } void device6 (GRID_UNUSED void *arg) { int rc; int dev2; int dev3; dev2 = test_socket (AF_SP_RAW, GRID_RESPONDENT); test_connect (dev2, SOCKET_ADDRESS_I); dev3 = test_socket (AF_SP_RAW, GRID_SURVEYOR); test_bind (dev3, SOCKET_ADDRESS_J); /* Run the device. */ rc = grid_device (dev2, dev3); grid_assert (rc < 0 && grid_errno () == ETERM); /* Clean up. */ test_close (dev2); test_close (dev3); } int main () { int end0; int end1; struct grid_thread thread5; struct grid_thread thread6; /* Test the bi-directional device with SURVEYOR(headers). */ /* Start the devices. */ grid_thread_init (&thread5, device5, NULL); grid_thread_init (&thread6, device6, NULL); /* Create two sockets to connect to the device. */ end0 = test_socket (AF_SP, GRID_SURVEYOR); test_connect (end0, SOCKET_ADDRESS_H); end1 = test_socket (AF_SP, GRID_RESPONDENT); test_connect (end1, SOCKET_ADDRESS_J); /* Wait up to a second for TCP to establish. */ grid_sleep (1000); /* Pass a message between endpoints. */ test_send (end0, "XYZ"); test_recv (end1, "XYZ"); /* Now send a reply. */ test_send (end1, "REPLYXYZ"); test_recv (end0, "REPLYXYZ"); /* Clean up. */ test_close (end0); test_close (end1); /* Shut down the devices. */ grid_term (); grid_thread_term (&thread5); grid_thread_term (&thread6); return 0; }
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include <vector> #include "DexInstruction.h" extern std::vector<DexOpcode> all_dex_opcodes; extern std::vector<IROpcode> all_opcodes;
#pragma once #include "UnrealEnginePython.h" PyObject *py_ue_pawn_get_controller(ue_PyUObject *, PyObject *);
// Check if already included #ifndef _WIN_L_SLIDER_ #define _WIN_L_SLIDER_ #include <_lua/lua.lunar.h> #include <_lua/lua.class.gadget.h> #include <_gadget/gadget.slider.h> /** * Proxy Classes */ class _lua_slider : public _lua_gadget { public: //! Lua-Ctor _lua_slider( lua_State* L ); //! C-Ctor _lua_slider( _slider* c ) : _lua_gadget( c , false ) { } //! Lunar !// static const char className[]; static Lunar<_lua_slider>::FunctionType methods[]; static Lunar<_lua_slider>::PropertyType properties[]; using baseclasses = Lunar<_lua_slider>::BaseClassType<_lua_gadget>; }; #endif
#ifndef _RS_ODOMETER_H_ #define _RS_ODOMETER_H_ #include "GlobalDef.h" extern volatile MultiType32_t odometer; // Return : 32bits value #define Rs_Odometer_GetValue() (odometer.l) // Parameter : 32bits value #define Rs_Odometer_SetValue(value) odometer.l=value void Rs_Odometer_SetValueFromArray(Uint8 value[3]); Uint8* Rs_Odometer_GetArray(void); #endif /*_RS_ODOMETER_H_*/
/********************************************************************** * File: conv_net_classifier.h * Description: Declaration of Convolutional-NeuralNet Character Classifier * Author: Ahmad Abdulkader * Created: 2007 * * (C) Copyright 2008, Google Inc. ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** http://www.apache.org/licenses/LICENSE-2.0 ** Unless required by applicable law or agreed to in writing, software ** distributed under the License is distributed on an "AS IS" BASIS, ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ** See the License for the specific language governing permissions and ** limitations under the License. * **********************************************************************/ // The ConvNetCharClassifier inherits from the base classifier class: // "CharClassifierBase". It implements a Convolutional Neural Net classifier // instance of the base classifier. It uses the Tesseract Neural Net library // The Neural Net takes a scaled version of a bitmap and feeds it to a // Convolutional Neural Net as input and performs a FeedForward. Each output // of the net corresponds to class_id in the CharSet passed at construction // time. // Afterwards, the outputs of the Net are "folded" using the folding set // (if any) #ifndef CONV_NET_CLASSIFIER_H #define CONV_NET_CLASSIFIER_H #include <string> #include "char_samp.h" #include BLIK_TESSERACT_U_char_altlist_h //original-code:"char_altlist.h" #include BLIK_TESSERACT_U_char_set_h //original-code:"char_set.h" #include BLIK_TESSERACT_U_feature_base_h //original-code:"feature_base.h" #include BLIK_TESSERACT_U_classifier_base_h //original-code:"classifier_base.h" #include BLIK_TESSERACT_U_neural_net_h //original-code:"neural_net.h" #include BLIK_TESSERACT_U_lang_model_h //original-code:"lang_model.h" #include "tuning_params.h" namespace tesseract { // Folding Ratio is the ratio of the max-activation of members of a folding // set that is used to compute the min-activation of the rest of the set static const float kFoldingRatio = 0.75; class ConvNetCharClassifier : public CharClassifier { public: ConvNetCharClassifier(CharSet *char_set, TuningParams *params, FeatureBase *feat_extract); virtual ~ConvNetCharClassifier(); // The main training function. Given a sample and a class ID the classifier // updates its parameters according to its learning algorithm. This function // is currently not implemented. TODO(ahmadab): implement end-2-end training virtual bool Train(CharSamp *char_samp, int ClassID); // A secondary function needed for training. Allows the trainer to set the // value of any train-time parameter. This function is currently not // implemented. TODO(ahmadab): implement end-2-end training virtual bool SetLearnParam(char *var_name, float val); // Externally sets the Neural Net used by the classifier. Used for training void SetNet(tesseract::NeuralNet *net); // Classifies an input charsamp and return a CharAltList object containing // the possible candidates and corresponding scores virtual CharAltList * Classify(CharSamp *char_samp); // Computes the cost of a specific charsamp being a character (versus a // non-character: part-of-a-character OR more-than-one-character) virtual int CharCost(CharSamp *char_samp); private: // Neural Net object used for classification tesseract::NeuralNet *char_net_; // data buffers used to hold Neural Net inputs and outputs float *net_input_; float *net_output_; // Init the classifier provided a data-path and a language string virtual bool Init(const string &data_file_path, const string &lang, LangModel *lang_mod); // Loads the NeuralNets needed for the classifier bool LoadNets(const string &data_file_path, const string &lang); // Loads the folding sets provided a data-path and a language string virtual bool LoadFoldingSets(const string &data_file_path, const string &lang, LangModel *lang_mod); // Folds the output of the NeuralNet using the loaded folding sets virtual void Fold(); // Scales the input char_samp and feeds it to the NeuralNet as input bool RunNets(CharSamp *char_samp); }; } #endif // CONV_NET_CLASSIFIER_H
/* * ControlScene.h * * Copyright (c) 2011 Yannick Loriot * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. * */ #ifndef __CCCONTROLSCENE_H__ #define __CCCONTROLSCENE_H__ #include "cocos2d.h" #include "cocos-ext.h" USING_NS_CC; USING_NS_CC_EXT; #define CONTROL_SCENE_CREATE_FUNC(controlScene) \ public: \ static Scene* sceneWithTitle(const char * title) \ { \ Scene* scene = Scene::create(); \ controlScene* controlLayer = new controlScene(); \ if (controlLayer && controlLayer->init()) \ { \ controlLayer->autorelease(); \ controlLayer->getSceneTitleLabel()->setString(title); \ scene->addChild(controlLayer); \ } \ else \ { \ CC_SAFE_DELETE(controlLayer); \ } \ return scene; \ } class ControlScene : public Layer { public: ControlScene(); ~ControlScene(); bool init(); // Menu Callbacks void toExtensionsMainLayer(Object* sender); void previousCallback(Object* sender); void restartCallback(Object* sender); void nextCallback(Object* sender); /** Title label of the scene. */ CC_SYNTHESIZE_RETAIN(LabelTTF*, _sceneTitleLabel, SceneTitleLabel) CONTROL_SCENE_CREATE_FUNC(ControlScene); }; #endif /* __CCCONTROLSCENE_H__ */
#import "MOBProjection.h" @interface MOBProjectionEPSG32728 : MOBProjection @end
#ifndef __AL_SOCKET_H_ #define __AL_SOCKET_H_ #include "al_anapurna.h" #include "anapurna-socket.h" #include "anapurna-common.h" #include "string.h" #include <stdlib.h> static int lsocket_new(lua_State* L) { const char* proto = luaL_checkstring(L, 1); int inet_proto = -1; if (strncasecmp(proto, "TCP", strlen("TCP")) == 0) { inet_proto = SOCK_STREAM; } else if (strncasecmp(proto, "UDP", strlen("UDP")) == 0) { inet_proto = SOCK_DGRAM; } else { lua_pushinteger(L, -1); return 1; } lua_pushinteger(L, socket_new(inet_proto)); return 1; } static int lsocket_bind(lua_State* L) { int fd = luaL_checkinteger(L, 1); const char* ip = luaL_checkstring(L, 2); int port = luaL_checkinteger(L, 3); lua_pushinteger(L, socket_bind(fd, ip, port)); return 1; } static int lsocket_listen(lua_State* L) { int fd = luaL_checkinteger(L, 1); lua_pushinteger(L, socket_listen(fd)); return 1; } static int lsocket_accept(lua_State* L) { int fd = luaL_checkinteger(L, 1); lua_pushinteger(L, socket_accept(fd, NULL)); return 1; } static int lsocket_origin_send(lua_State* L) { int fd = luaL_checkinteger(L, 1); const char* buff = luaL_checkstring(L, 2); int size = luaL_checkinteger(L, 3); lua_pushinteger(L, send(fd, buff, size, 0)); return 1; } static int lsocket_send(lua_State* L) { int fd = luaL_checkinteger(L, 1); const char* buff = luaL_checkstring(L, 2); int size = luaL_checkinteger(L, 3); lua_pushinteger(L, socket_send(fd, buff, size)); return 1; } static int lsocket_raw_send(lua_State* L) { int fd = luaL_checkinteger(L, 1); const char* buff = luaL_checkstring(L, 2); int size = luaL_checkinteger(L, 3); lua_pushinteger(L, raw_send(fd, buff, size)); return 1; } static int lsocket_origin_recv(lua_State* L) { int fd = luaL_checkinteger(L, 1); char buf[1024] = {0}; size_t sz = recv(fd, buf, 1024, MSG_WAITALL); lua_pushstring(L, buf); lua_pushinteger(L, sz); return 2; } static int lsocket_recv(lua_State* L) { int fd = luaL_checkinteger(L, 1); size_t sz = 0; lua_pushstring(L, socket_recv(fd, &sz)); lua_pushinteger(L, sz); return 2; } static int lsocket_raw_recv(lua_State* L) { int fd = luaL_checkinteger(L, 1); // size_t sz = 0; char buf[1024] = {0}; size_t sz = raw_recv(fd, buf, 1024); lua_pushstring(L, buf); lua_pushinteger(L, sz); return 2; } static int lsocket_sendto(lua_State* L) { int fd = luaL_checkinteger(L, 1); const char* ip = luaL_checkstring(L, 2); int port = luaL_checkinteger(L, 3); const char* buff = luaL_checkstring(L, 4); int size = luaL_checkinteger(L, 5); int ret = socket_sendto(fd, ip, port, buff, size); lua_pushinteger(L, ret); return 1; } static int lsocket_recvfrom(lua_State* L) { int fd = luaL_checkinteger(L, 1); char srcip[20] = {0}; int port = 0; ssize_t len = 0; char* ret = (char *)socket_recvfrom(fd, srcip, &port, &len); if (ret == NULL) { lua_pushnil(L); lua_pushnil(L); lua_pushinteger(L, 0); return 3; } else { lua_pushlstring(L, ret, len); lua_pushstring(L, srcip); lua_pushinteger(L, port); FREE(ret); return 3; } } static int lsocket_connect(lua_State* L) { const char* ip = luaL_checkstring(L, 1); int port = luaL_checkinteger(L, 2); const char* proto = luaL_checkstring(L, 3); int inet_proto = -1; if (strncasecmp(proto, "TCP", strlen("TCP")) == 0) { inet_proto = SOCK_STREAM; } else if (strncasecmp(proto, "UDP", strlen("UDP")) == 0) { inet_proto = SOCK_DGRAM; } else { lua_pushinteger(L, -1); return 1; } lua_pushinteger(L, socket_connect(ip, port, inet_proto)); return 1; } static int lsocket_close(lua_State* L) { int fd = luaL_checkinteger(L, 1); socket_close(fd); return 0; } static int lsocket_nonblock(lua_State* L) { int fd = luaL_checkinteger(L, 1); socket_nonblock(fd); return 0; } static int lsleep(lua_State* L) { int sec = luaL_checkinteger(L, 1); struct timeval timeout; timeout.tv_sec = sec; timeout.tv_usec = 0; // sleep(sec); select(0, NULL, NULL, NULL, &timeout); return 0; } static int lmsleep(lua_State* L) { int usec = luaL_checkinteger(L, 1); struct timeval timeout; timeout.tv_sec = 0; timeout.tv_usec = usec * 1000; select(0, NULL, NULL, NULL, &timeout); return 0; } static int lusleep(lua_State* L) { int msec = luaL_checkinteger(L, 1); struct timeval timeout; timeout.tv_sec = 0; timeout.tv_usec = msec; select(0, NULL, NULL, NULL, &timeout); return 0; } #endif
// // ServerController.h // CocosPlayer // // Created by Viktor Lidholt on 7/13/12. // Copyright (c) 2012 __MyCompanyName__. All rights reserved. // #import <Foundation/Foundation.h> #import "ThoMoServerStub.h" #import "cocos2d.h" @interface ServerController : NSObject <ThoMoServerDelegateProtocol> { ThoMoServerStub* server; NSMutableSet* connectedClients; } @property (nonatomic,copy) NSString* serverStatus; - (void) start; - (void) updatePairing; - (void) sendDeviceName; - (void) sendResultString:(NSString*) str; @end
#ifndef __DIO_H__ #define __DIO_H__ #define HIGH 1 #define LOW 0 #define NO_OUT -1 #define OUT 'O' #define IN 'I' #define NONE 'N' class DIO{ public: void setMode(int bar, int pin, char mode); void digitalWrite(int bar, int pin, int power); int digitalRead(int bar, int pin); void digitalToggle(int bar, int pin); }; #endif
//*************************************************************************** // Anubis Viewer 1.0 - A 3D Adventure Game Engine. // Copyright (C) 2006-2007 Gorka Suárez García // // This 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 2 // of the License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //*************************************************************************** #ifndef OptionsFormH #define OptionsFormH //--------------------------------------------------------------------------- #include <Classes.hpp> #include <Controls.hpp> #include <StdCtrls.hpp> #include <Forms.hpp> //--------------------------------------------------------------------------- class TOptionsWnd : public TForm { __published: // IDE-managed Components private: // User declarations public: // User declarations __fastcall TOptionsWnd(TComponent* Owner); }; //--------------------------------------------------------------------------- extern PACKAGE TOptionsWnd *OptionsWnd; //--------------------------------------------------------------------------- #endif //*************************************************************************** // Fin OptionsForm.h //***************************************************************************
// // ObsDetailQualityDetailsFooter.h // iNaturalist // // Created by Alex Shepard on 1/8/16. // Copyright © 2016 iNaturalist. All rights reserved. // #import <UIKit/UIKit.h> @interface ObsDetailQualityDetailsFooter : UITableViewHeaderFooterView @property NSString *dataQualityDetails; @end
// // Generated by class-dump 3.5 (64 bit) (Debug version compiled Sep 30 2020 21:18:12). // // Copyright (C) 1997-2019 Steve Nygard. // #import <swiftCore/_TtCs12_SwiftObject.h> @class MISSING_TYPE; @interface _TtC12SourceEditor22GenericLanguageService : _TtCs12_SwiftObject { MISSING_TYPE *buffer; MISSING_TYPE *supportsIndentation; } @end
/* * Generated by class-dump 3.3.4 (64 bit). * * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. */ #import "NSObject.h" #import "NSCoding-Protocol.h" #import "NSCopying-Protocol.h" @interface CIColor : NSObject <NSCoding, NSCopying> { void *_priv; void *_pad[3]; } + (id)colorWithString:(id)arg1; + (id)colorWithRed:(double)arg1 green:(double)arg2 blue:(double)arg3; + (id)colorWithRed:(double)arg1 green:(double)arg2 blue:(double)arg3 alpha:(double)arg4; + (id)colorWithCGColor:(struct CGColor *)arg1; - (id)description; - (id)initWithCoder:(id)arg1; - (void)encodeWithCoder:(id)arg1; - (id)copyWithZone:(struct _NSZone *)arg1; - (unsigned long long)hash; - (_Bool)isEqual:(id)arg1; - (struct CGColor *)CGColor; - (struct CGColor *)cgColor; - (struct CGColorSpace *)colorSpace; - (id)stringRepresentation; - (double)blue; - (double)green; - (double)red; - (double)alpha; - (const double *)components; - (unsigned long long)numberOfComponents; - (void)finalize; - (void)dealloc; - (id)initWithRed:(double)arg1 green:(double)arg2 blue:(double)arg3 alpha:(double)arg4; - (id)initWithCGColor:(struct CGColor *)arg1; - (id)initWithString:(id)arg1; @end
// // Generated by class-dump 3.5 (64 bit). // // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. // #import "WXPBGeneratedMessage.h" @class BaseRequest, NSString; @interface CheckBigFileUploadRequest : WXPBGeneratedMessage { } + (void)initialize; // Remaining properties @property(retain, nonatomic) NSString *aeskey; // @dynamic aeskey; @property(retain, nonatomic) BaseRequest *baseRequest; // @dynamic baseRequest; @property(retain, nonatomic) NSString *fileExt; // @dynamic fileExt; @property(retain, nonatomic) NSString *fileMd5; // @dynamic fileMd5; @property(retain, nonatomic) NSString *fileName; // @dynamic fileName; @property(nonatomic) unsigned long long fileSize; // @dynamic fileSize; @property(nonatomic) unsigned int fileType; // @dynamic fileType; @property(retain, nonatomic) NSString *fromUserName; // @dynamic fromUserName; @property(retain, nonatomic) NSString *toUserName; // @dynamic toUserName; @end
/* * ctrl_sixaxis2thruster_types.h * * Code generation for model "ctrl_sixaxis2thruster". * * Model version : 1.22 * Simulink Coder version : 8.6 (R2014a) 27-Dec-2013 * C source code generated on : Wed Feb 25 14:00:14 2015 * * Target selection: NIVeriStand_VxWorks.tlc * Note: GRT includes extra infrastructure and instrumentation for prototyping * Embedded hardware selection: 32-bit Generic * Code generation objectives: Unspecified * Validation result: Not run */ #ifndef RTW_HEADER_ctrl_sixaxis2thruster_types_h_ #define RTW_HEADER_ctrl_sixaxis2thruster_types_h_ #include "rtwtypes.h" #include "builtin_typeid_types.h" #include "multiword_types.h" /* Parameters (auto storage) */ typedef struct P_ctrl_sixaxis2thruster_T_ P_ctrl_sixaxis2thruster_T; /* Forward declaration for rtModel */ typedef struct tag_RTM_ctrl_sixaxis2thruster_T RT_MODEL_ctrl_sixaxis2thruste_T; #endif /* RTW_HEADER_ctrl_sixaxis2thruster_types_h_ */
// Copyright 2017 The Lynx Authors. All rights reserved. #ifndef UI_WIDGET_VIEW_LYNX_UI_VIEW_H_ #define UI_WIDGET_VIEW_LYNX_UI_VIEW_H_ #import <Foundation/Foundation.h> #import <UIKit/UIKit.h> #include "widget/lynx_ui.h" #include "widget/view/view_wrapper.h" @interface LxUIView : LynxUI<ViewWrapper *> @end #endif // UI_WIDGET_VIEW_LYNX_UI_VIEW_H_
#pragma once #include <gamelogic/model/player.h> #include <string> namespace Morphling::Gamelogic { class Player { public: Player(std::string name) : name(name) {} virtual ~Player() = default; std::string get_name() const { return name; } private: std::string name; }; }
/* * Copyright (C) 2013 Google Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS 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 APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef SecurityPolicyViolationEvent_h #define SecurityPolicyViolationEvent_h #include "core/events/Event.h" #include "core/events/ThreadLocalEventNames.h" namespace WebCore { struct SecurityPolicyViolationEventInit : public EventInit { SecurityPolicyViolationEventInit() { } String documentURI; String referrer; String blockedURI; String violatedDirective; String effectiveDirective; String originalPolicy; String sourceFile; int lineNumber; int columnNumber; int statusCode; }; class SecurityPolicyViolationEvent : public Event { public: static PassRefPtr<SecurityPolicyViolationEvent> create() { return adoptRef(new SecurityPolicyViolationEvent()); } static PassRefPtr<SecurityPolicyViolationEvent> create(const AtomicString& type, const SecurityPolicyViolationEventInit& initializer) { return adoptRef(new SecurityPolicyViolationEvent(type, initializer)); } const String& documentURI() const { return m_documentURI; } const String& referrer() const { return m_referrer; } const String& blockedURI() const { return m_blockedURI; } const String& violatedDirective() const { return m_violatedDirective; } const String& effectiveDirective() const { return m_effectiveDirective; } const String& originalPolicy() const { return m_originalPolicy; } const String& sourceFile() const { return m_sourceFile; } int lineNumber() const { return m_lineNumber; } int columnNumber() const { return m_columnNumber; } int statusCode() const { return m_statusCode; } virtual const AtomicString& interfaceName() const { return EventNames::SecurityPolicyViolationEvent; } private: SecurityPolicyViolationEvent() { ScriptWrappable::init(this); } SecurityPolicyViolationEvent(const AtomicString& type, const SecurityPolicyViolationEventInit& initializer) : Event(type, initializer) , m_documentURI(initializer.documentURI) , m_referrer(initializer.referrer) , m_blockedURI(initializer.blockedURI) , m_violatedDirective(initializer.violatedDirective) , m_effectiveDirective(initializer.effectiveDirective) , m_originalPolicy(initializer.originalPolicy) , m_sourceFile(initializer.sourceFile) , m_lineNumber(initializer.lineNumber) , m_columnNumber(initializer.columnNumber) , m_statusCode(initializer.statusCode) { ScriptWrappable::init(this); } String m_documentURI; String m_referrer; String m_blockedURI; String m_violatedDirective; String m_effectiveDirective; String m_originalPolicy; String m_sourceFile; int m_lineNumber; int m_columnNumber; int m_statusCode; }; } // namespace WebCore #endif // SecurityPolicyViolationEvent_h
#ifndef COMMAND_CREATEFRAME_H #define COMMAND_CREATEFRAME_H #include "../interfaces/icommand.h" #include "../interfaces/icore.h" #include <QString> #include <QStringList> class CommandCreateFrame : public ICommand { public: CommandCreateFrame(); virtual bool isMultiLine(); virtual ICommand *create(); virtual QString name(); virtual void setParams(QStringList list); virtual bool check(); virtual bool check(QString &strResult); virtual QString code(); virtual void appendCode(QString); virtual void run(ICore *pCore); private: QString m_strName; QStringList m_listParams; int m_nX1; int m_nY1; int m_nColor; QString m_sText; bool m_bCheck; QString m_sCheck; }; #endif // COMMAND_CREATEFRAME_H
#ifndef EG_DISPATCHER_API_H #define EG_DISPATCHER_API_H #include "stk_env.h" #include "stk_data_flow.h" /* * This example dispatcher provides an example main loop and is used by the * examples. It provides functions which allow dispatching of data received * and provides functions to wakeup the dispatcher and to stop dispatching. * * The Sequence Toolkit does not build in an event loop and applications * typically use their own main loop - but this is a good starting point * for new applications. * * Applications must provide a process_data() function. It is expected * that customers change/modify this dispatcher as they need. */ typedef struct stk_dispatcher_stct stk_dispatcher_t; typedef void (*fd_hup_cb)(stk_dispatcher_t *d,stk_data_flow_t *flow,int fd); typedef void (*fd_data_cb)(stk_dispatcher_t *d,stk_data_flow_t *rcvchannel,stk_sequence_t *rcv_seq); stk_dispatcher_t *alloc_dispatcher(); stk_dispatcher_t *default_dispatcher(); void free_dispatcher(stk_dispatcher_t *d); void client_dispatcher_timed(stk_dispatcher_t *d,stk_env_t *stkbase,fd_data_cb data_cb,int ms); void client_dispatcher_hard_timed(stk_dispatcher_t *d,stk_env_t *stkbase,fd_data_cb data_cb,int ms); void client_dispatcher_poll(stk_dispatcher_t *d,stk_env_t *stkbase,fd_data_cb data_cb); void wakeup_dispatcher(stk_env_t *env); void stop_dispatching(stk_dispatcher_t *d); int dispatch_add_fd(stk_dispatcher_t *d,stk_data_flow_t *df,int fd,fd_hup_cb hup_cb,fd_data_cb data_cb); int dispatch_remove_fd(stk_dispatcher_t *d,int fd); void terminate_dispatcher(stk_dispatcher_t *d); void stk_set_dispatcher_user_data(stk_dispatcher_t *d,void *user_data); void *stk_get_dispatcher_user_data(stk_dispatcher_t *d); int server_dispatch_add_fd(stk_dispatcher_t *d,int fd,stk_data_flow_t *df,fd_data_cb data_cb); void eg_dispatcher(stk_dispatcher_t *d,stk_env_t *stkbase,int max_idle_time); int dispatch_add_accepted_fd(stk_dispatcher_t *d,int fd,stk_data_flow_t *df,fd_data_cb cb); #endif
// // UnlimitedScrollView.h // UnlimitedScrollView // // Created by svpcadmin on 2015/10/23. // Copyright © 2015年 tamanyan. All rights reserved. // #import <UIKit/UIKit.h> //! Project version number for UnlimitedScrollView. FOUNDATION_EXPORT double UnlimitedScrollViewVersionNumber; //! Project version string for UnlimitedScrollView. FOUNDATION_EXPORT const unsigned char UnlimitedScrollViewVersionString[]; // In this header, you should import all the public headers of your framework using statements like #import <UnlimitedScrollView/PublicHeader.h>
// // TGDealCell.h // 东莞团购平台 // // Created by mac on 14-12-24. // Copyright (c) 2014年 tuangou. All rights reserved. // #import <UIKit/UIKit.h> @class TGDeal; @interface TGDealCell : UITableViewCell // 描述 @property (weak, nonatomic) IBOutlet UILabel *desc; // 图片 @property (weak, nonatomic) IBOutlet UIImageView *image; // 价格 @property (weak, nonatomic) IBOutlet UILabel *price; // 购买人数 @property (weak, nonatomic) IBOutlet UIButton *purchaseCount; // 标签 @property (weak, nonatomic) IBOutlet UIImageView *badge; @property(nonatomic, strong) TGDeal *deal; @end
// // JXObject.h // JXRuntime // // Created by andy on 9/28/14. // Copyright (c) 2014 JianXiang Jin. All rights reserved. // #import <Foundation/Foundation.h> @interface JXObject : NSObject @property (nonatomic, copy) NSString *name; @property (nonatomic, copy) NSString *city; @property (nonatomic, assign) NSInteger age; - (void)funcOne; - (void)funcTwo; - (void)funcThree; - (void)funcFour; - (void)funcFive; @end
// // IView.h // Ola // // Created by Terrence Xing on 4/2/14. // Copyright (c) 2014 Terrence Xing. All rights reserved. // #import <UIKit/UIKit.h> @interface IView : UIView { id delegate; } @property (nonatomic) id delegate; - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event; //手指触摸屏幕时报告UITouchPhaseBegan事件 - (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event ; //在手指在屏幕上移动时报告UITouchPhaseMoved事件 - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event ; //在手指离开屏幕时报告UITouchPhaseEnded事件 - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event; //在因接听电话或其他因素导致取消触摸时报告UITouchPhaseCancelled事件 @end
// // TBTDummyViewController.h // MultiProductViewer // // Created by JN on 2014-3-20. // Copyright (c) 2014 thoughtbot, inc. All rights reserved. // #import <UIKit/UIKit.h> @interface TBTDummyViewController : UIViewController @end
#ifndef PICTUREBOXPLOTDESTINATION_H #define PICTUREBOXPLOTDESTINATION_H #include "elementbase.h" #include <QString> #include <QtCore/qglobal.h> #if defined(pictureboxplotdestination_EXPORTS) # define PICTUREBOXPLOTDESTINATIONSHARED_EXPORT Q_DECL_EXPORT #else # define PICTUREBOXPLOTDESTINATIONSHARED_EXPORT Q_DECL_IMPORT #endif class BoxPlot; namespace media { class PICTUREBOXPLOTDESTINATIONSHARED_EXPORT PictureBoxPlotDestination : public ElementBase { Q_OBJECT public: explicit PictureBoxPlotDestination(ElementFactory *aFactory, const QString &aObjectName); ~PictureBoxPlotDestination(); private: void process(); BoxPlot *mBoxPlot; }; class PictureBoxPlotDestinationFactory : public ElementFactory { Q_OBJECT Q_INTERFACES(media::ElementFactory) Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QCustomPlugin") protected: const char* getElementName() const { return "PictureBoxPlotDestination"; } ElementBase* createElement(const QString &aObjectName) { return new PictureBoxPlotDestination(this, aObjectName); } }; } // namespace media #endif // PICTUREBOXPLOTDESTINATION_H
/** ################################################################### ** THIS BEAN MODULE IS GENERATED BY THE TOOL. DO NOT MODIFY IT. ** Filename : Cpu112.H ** Project : SmartCar ** Processor : MC9S12DG128BCPV ** Beantype : MC9S12DG128_112 ** Version : Bean 02.001, Driver 02.03, CPU db: 2.87.345 ** Datasheet : 9S12DT128BDGV1/D V01.05 ** Compiler : CodeWarrior HC12 C Compiler ** Date/Time : 2010-3-8, 15:12 ** Abstract : ** This bean "MC9S12DG128_112" implements properties, methods, ** and events of the CPU. ** Settings : ** ** Contents : ** EnableInt - void Cpu112_EnableInt(void); ** DisableInt - void Cpu112_DisableInt(void); ** SetWaitMode - void Cpu112_SetWaitMode(void); ** SetStopMode - void Cpu112_SetStopMode(void); ** ** (c) Copyright UNIS, a.s. 1997-2008 ** UNIS, a.s. ** Jundrovska 33 ** 624 00 Brno ** Czech Republic ** http : www.processorexpert.com ** mail : info@processorexpert.com ** ###################################################################*/ #ifndef __Cpu112 #define __Cpu112 /* Active configuration define symbol */ #define PEcfg_XS256VAL 1 /*Include shared modules, which are used for whole project*/ #include "PE_Types.h" #include "PE_Error.h" #include "PE_Const.h" #include "IO_Map.h" #include "PE_Timer.h" /* MODULE Cpu112. */ #pragma DATA_SEG DEFAULT #define CPU_BUS_CLK_HZ 8000000UL /* Initial value of the bus clock frequency in Hz */ #define CPU_INSTR_CLK_HZ 8000000UL /* Initial value of the instruction clock frequency in Hz */ #define CPU_EXT_CLK_HZ 16000000UL /* Value of the main clock frequency (crystal or external clock) in Hz */ #define CPU_CORE_HCS12 /* Specification of the core type of the selected cpu */ #define CPU_DERIVATIVE_MC9S12DG128B /* Name of the selected cpu derivative */ #define CPU_PARTNUM_MC9S12DG128BCPV /* Part number of the selected cpu */ /* Global variables */ extern volatile byte CCR_reg; /* Current CCR reegister */ /*Shadow variables*/ extern byte Shadow_M; /* Shadow variable for I/O beans */ extern byte Shadow_K; /* Shadow variable for I/O beans */ /* Entry point routine(s) prototypes */ #pragma CODE_SEG __NEAR_SEG NON_BANKED void _EntryPoint(void); /* ** =================================================================== ** Method : _EntryPoint (bean MC9S12DG128_112) ** ** Description : ** Initializes the whole system like timing and so on. At the end ** of this function, the C startup is invoked to initialize stack, ** memory areas and so on. ** This method is internal. It is used by Processor Expert only. ** =================================================================== */ /* Interrupt routine(s) prototypes */ /* Forward declaration of the default interrupt routine(s) */ __interrupt void Cpu112_Interrupt(void); #pragma CODE_SEG DEFAULT #define Cpu112_SetStopMode() {__asm("ANDCC #0x7F"); __asm("STOP"); } /* ** =================================================================== ** Method : Cpu112_SetStopMode (bean MC9S12DG128_112) ** ** Description : ** Set low power mode - Stop mode. ** For more information about the stop mode see ** documentation of this CPU. ** Parameters : None ** Returns : Nothing ** =================================================================== */ #define Cpu112_SetWaitMode() __asm("WAI") /* ** =================================================================== ** Method : Cpu112_SetWaitMode (bean MC9S12DG128_112) ** ** Description : ** Set low power mode - Wait mode. ** For more information about the wait mode see ** documentation of this CPU. ** Release from Wait mode: Reset or interrupt ** Parameters : None ** Returns : Nothing ** =================================================================== */ #define Cpu112_DisableInt() __DI() /* Disable interrupts */ /* ** =================================================================== ** Method : Cpu112_DisableInt (bean MC9S12DG128_112) ** ** Description : ** Disable maskable interrupts ** Parameters : None ** Returns : Nothing ** =================================================================== */ #define Cpu112_EnableInt() __EI() /* Enable interrupts */ /* ** =================================================================== ** Method : Cpu112_EnableInt (bean MC9S12DG128_112) ** ** Description : ** Enable maskable interrupts ** Parameters : None ** Returns : Nothing ** =================================================================== */ void PE_low_level_init(void); /* ** =================================================================== ** Method : PE_low_level_init (bean MC9S12DG128_112) ** ** Description : ** Initializes beans and provides common register initialization. ** The method is called automatically as a part of the ** application initialization code. ** This method is internal. It is used by Processor Expert only. ** =================================================================== */ /* END Cpu112. */ #endif /* ifndef __Cpu112 */ /* ** ################################################################### ** ** This file was created by UNIS Processor Expert 3.00 [04.12] ** for the Freescale HCS12 series of microcontrollers. ** ** ################################################################### */
// // Created by Baoxing song on 2018-12-28. // #ifndef GEAN_SONG_CNS_H #define GEAN_SONG_CNS_H #include <string> #include <map> #include <set> #include "./util/nucleotideCodeSubstitutionMatrix.h" #include <stack> #include<iostream> #include <cstring> #include <fstream> #include <cstdlib> #include <limits> #include <sstream> #include <iomanip> class SimilarBlocks { private: std::string _dna_q, _dna_d; size_t _length_of_q, _length_of_d, _n; int32_t _open_gap_penalty; int32_t _extend_gap_penalty; int32_t **_similarity_matrix; int32_t **_similarity_matrix_E; int32_t **_similarity_matrix_F; int32_t **_substitute_matrix; std::string _alignment_q; std::string _alignment_d; public: SimilarBlocks(const std::string & dna_q, const std::string & dna_d, const int32_t & match_score, const int32_t & mis_match_score, const int32_t & open_gap_penalty, const int32_t & extend_gap_penalty, NucleotideCodeSubstitutionMatrix& _nucleotideCodeSubstitutionMatrix); ~SimilarBlocks(); void calculate_similarity( NucleotideCodeSubstitutionMatrix& _nucleotideCodeSubstitutionMatrix ); void get_optimal_alignment(); std::string getAlignment_q(); std::string getAlignment_d(); void print_results(); }; #endif //GEAN_SONG_CNS_H
#pragma once #include "common/geometry/point.h" class Circle { Point center; double squaredRadius; public: Circle(): center(Point()), squaredRadius(0) {} Circle(const Point& center, double squaredRadius): center(center), squaredRadius(squaredRadius) {} inline Point getCenter() const { return center; } bool Contains(const Point& p) const { return (squaredRadius > center.DistanceSquared(p)); } };
/** * $Id: HA_Status_Dynamic.h 80826 2008-03-04 14:51:23Z wotte $ * * Home Automation Status server. Sample code from The ACE Programmer's Guide, * copyright 2003 Addison-Wesley. All Rights Reserved. */ #ifndef __HASTATUS_H_ #define __HASTATUS_H_ // Listing 1 code/ch19 #include "ace/OS.h" #include "ace/Acceptor.h" #include "ace/INET_Addr.h" #include "ace/SOCK_Stream.h" #include "ace/SOCK_Acceptor.h" #include "ace/Service_Object.h" #include "ace/Svc_Handler.h" #include "HASTATUS_export.h" class ClientHandler : public ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH> { // ... Same as previous examples. }; class HASTATUS_Export HA_Status : public ACE_Service_Object { public: virtual int init (int argc, ACE_TCHAR *argv[]); virtual int fini (void); virtual int info (ACE_TCHAR **str, size_t len) const; private: ACE_Acceptor<ClientHandler, ACE_SOCK_ACCEPTOR> acceptor_; ACE_INET_Addr listen_addr_; }; // Listing 1 #endif /* __HASTATUS_H_ */
/***************************************************************************** The following code is derived, directly or indirectly, from the SystemC source code Copyright (c) 1996-2006 by all Contributors. All Rights reserved. The contents of this file are subject to the restrictions and limitations set forth in the SystemC Open Source License Version 2.4 (the "License"); You may not use this file except in compliance with such restrictions and limitations. You may obtain instructions on how to receive a copy of the License at http://www.systemc.org/. Software distributed by Contributors under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. *****************************************************************************/ /***************************************************************************** sink.h - This is the interface file for the synchronous process "sink". Original Author: Rashmi Goswami, Synopsys, Inc. *****************************************************************************/ /***************************************************************************** MODIFICATION LOG - modifiers, enter your name, affiliation, date and changes you are making here. Name, Affiliation, Date: Description of Modification: *****************************************************************************/ struct sink: sc_module { sc_in<bool> data_ready; sc_out<bool> data_ack; sc_in< sc_int<16> > in_real; sc_in< sc_int<16> > in_imag; sc_in_clk CLK; FILE* fp_real; FILE* fp_imag; SC_CTOR(sink) { SC_CTHREAD(entry, CLK.pos()); } void entry(); ~sink() { fclose( fp_real ); fclose( fp_imag ); } };
#ifndef SP2_AUDIO_MUSIC_H #define SP2_AUDIO_MUSIC_H #include "audio/source.h" #include "stringImproved.h" #include <string_view> namespace sp { namespace audio { class Music : public Source { public: bool open(const string& name, bool loop); void setVolume(float volume); //range: 0-100 protected: virtual void onMixSamples(int16_t* stream, int sample_count) override; private: unsigned int sample_rate; unsigned int length; float volume = 1.0f; std::vector<uint8_t> file_data; bool loop = false; void* vorbis = nullptr; }; }//namespace audio }//namespace sp #endif//SP2_AUDIO_MUSIC_H
/* * (C) Copyright 2014 CompuLab, Ltd. <www.compulab.co.il> * * Authors: Igor Grinberg <grinberg@compulab.co.il> * * SPDX-License-Identifier: GPL-2.0+ */ #include <common.h> #include <environment.h> #include <status_led.h> #include <net.h> #include <netdev.h> #include <usb.h> #include <mmc.h> #include <linux/compiler.h> #include <linux/usb/musb.h> #include <asm/io.h> #include <asm/arch/mem.h> #include <asm/arch/am35x_def.h> #include <asm/arch/mmc_host_def.h> #include <asm/arch/sys_proto.h> #include <asm/arch/musb.h> #include <asm/omap_musb.h> #include <asm/ehci-omap.h> #include "../common/common.h" #include "../common/eeprom.h" DECLARE_GLOBAL_DATA_PTR; const omap3_sysinfo sysinfo = { DDR_DISCRETE, "CM-T3517 board", "NAND 128/512M", }; #ifdef CONFIG_USB_MUSB_AM35X static struct musb_hdrc_config cm_t3517_musb_config = { .multipoint = 1, .dyn_fifo = 1, .num_eps = 16, .ram_bits = 12, }; static struct omap_musb_board_data cm_t3517_musb_board_data = { .set_phy_power = am35x_musb_phy_power, .clear_irq = am35x_musb_clear_irq, .reset = am35x_musb_reset, }; static struct musb_hdrc_platform_data cm_t3517_musb_pdata = { #if defined(CONFIG_USB_MUSB_HOST) .mode = MUSB_HOST, #elif defined(CONFIG_USB_MUSB_GADGET) .mode = MUSB_PERIPHERAL, #else #error "Please define either CONFIG_USB_MUSB_HOST or CONFIG_USB_MUSB_GADGET" #endif .config = &cm_t3517_musb_config, .power = 250, .platform_ops = &am35x_ops, .board_data = &cm_t3517_musb_board_data, }; static void cm_t3517_musb_init(void) { /* * Set up USB clock/mode in the DEVCONF2 register. * USB2.0 PHY reference clock is 13 MHz */ clrsetbits_le32(&am35x_scm_general_regs->devconf2, CONF2_REFFREQ | CONF2_OTGMODE | CONF2_PHY_GPIOMODE, CONF2_REFFREQ_13MHZ | CONF2_SESENDEN | CONF2_VBDTCTEN | CONF2_DATPOL); if (musb_register(&cm_t3517_musb_pdata, &cm_t3517_musb_board_data, (void *)AM35XX_IPSS_USBOTGSS_BASE)) printf("Failed initializing AM35x MUSB!\n"); } #else static inline void am3517_evm_musb_init(void) {} #endif int board_init(void) { gpmc_init(); /* in SRAM or SDRAM, finish GPMC */ /* boot param addr */ gd->bd->bi_boot_params = (OMAP34XX_SDRC_CS0 + 0x100); #if defined(CONFIG_LED_STATUS) && defined(CONFIG_LED_STATUS_BOOT_ENABLE) status_led_set(CONFIG_LED_STATUS_BOOT, CONFIG_LED_STATUS_ON); #endif cm_t3517_musb_init(); return 0; } /* * Routine: get_board_rev * Description: read system revision */ u32 get_board_rev(void) { return cl_eeprom_get_board_rev(CONFIG_SYS_I2C_EEPROM_BUS); }; int misc_init_r(void) { cl_print_pcb_info(); omap_die_id_display(); return 0; } #if defined(CONFIG_MMC) #define SB_T35_CD_GPIO 144 #define SB_T35_WP_GPIO 59 int board_mmc_init(bd_t *bis) { return omap_mmc_init(0, 0, 0, SB_T35_CD_GPIO, SB_T35_WP_GPIO); } #endif #ifdef CONFIG_DRIVER_TI_EMAC #define CONTROL_EFUSE_EMAC_LSB 0x48002380 #define CONTROL_EFUSE_EMAC_MSB 0x48002384 static int am3517_get_efuse_enetaddr(u8 *enetaddr) { u32 lsb = __raw_readl(CONTROL_EFUSE_EMAC_LSB); u32 msb = __raw_readl(CONTROL_EFUSE_EMAC_MSB); enetaddr[0] = (u8)((msb >> 16) & 0xff); enetaddr[1] = (u8)((msb >> 8) & 0xff); enetaddr[2] = (u8)(msb & 0xff); enetaddr[3] = (u8)((lsb >> 16) & 0xff); enetaddr[4] = (u8)((lsb >> 8) & 0xff); enetaddr[5] = (u8)(lsb & 0xff); return is_valid_ethaddr(enetaddr); } static inline int cm_t3517_init_emac(bd_t *bis) { int ret = cpu_eth_init(bis); if (ret > 0) return ret; printf("Failed initializing EMAC! "); return 0; } #else /* !CONFIG_DRIVER_TI_EMAC */ static inline int am3517_get_efuse_enetaddr(u8 *enetaddr) { return 1; } static inline int cm_t3517_init_emac(bd_t *bis) { return 0; } #endif /* CONFIG_DRIVER_TI_EMAC */ /* * Routine: handle_mac_address * Description: prepare MAC address for on-board Ethernet. */ static int cm_t3517_handle_mac_address(void) { unsigned char enetaddr[6]; int ret; ret = eth_env_get_enetaddr("ethaddr", enetaddr); if (ret) return 0; ret = cl_eeprom_read_mac_addr(enetaddr, CONFIG_SYS_I2C_EEPROM_BUS); if (ret) { ret = am3517_get_efuse_enetaddr(enetaddr); if (ret) return ret; } if (!is_valid_ethaddr(enetaddr)) return -1; return eth_env_set_enetaddr("ethaddr", enetaddr); } #define SB_T35_ETH_RST_GPIO 164 /* * Routine: board_eth_init * Description: initialize module and base-board Ethernet chips */ int board_eth_init(bd_t *bis) { int rc = 0, rc1 = 0; rc1 = cm_t3517_handle_mac_address(); if (rc1) printf("No MAC address found! "); rc1 = cm_t3517_init_emac(bis); if (rc1 > 0) rc++; rc1 = cl_omap3_smc911x_init(0, 4, CONFIG_SMC911X_BASE, NULL, SB_T35_ETH_RST_GPIO); if (rc1 > 0) rc++; return rc; } #ifdef CONFIG_USB_EHCI_OMAP static struct omap_usbhs_board_data cm_t3517_usbhs_bdata = { .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY, .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY, .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED, }; #define CM_T3517_USB_HUB_RESET_GPIO 152 #define SB_T35_USB_HUB_RESET_GPIO 98 int ehci_hcd_init(int index, enum usb_init_type init, struct ehci_hccr **hccr, struct ehci_hcor **hcor) { cl_usb_hub_init(CM_T3517_USB_HUB_RESET_GPIO, "cm-t3517 hub rst"); cl_usb_hub_init(SB_T35_USB_HUB_RESET_GPIO, "sb-t35 hub rst"); return omap_ehci_hcd_init(index, &cm_t3517_usbhs_bdata, hccr, hcor); } int ehci_hcd_stop(void) { cl_usb_hub_deinit(CM_T3517_USB_HUB_RESET_GPIO); cl_usb_hub_deinit(SB_T35_USB_HUB_RESET_GPIO); return omap_ehci_hcd_stop(); } #endif /* CONFIG_USB_EHCI_OMAP */
// // ViewController.h // ModuelOne // // Created by liuzewen on 16/11/4. // Copyright © 2016年 etong. All rights reserved. // #import <UIKit/UIKit.h> @interface ViewController : UIViewController @end
// // NSString+JSONString.h // ChimpUtilities // // Created by Andrew on 9/25/13. // Copyright (c) 2013 Chimp Studios. All rights reserved. // #import <Foundation/Foundation.h> @interface NSString (JSONString) - (NSString *)JSONString; @end
// // NTPortParser.h // portparser // // Created by Sam Dunster on 31/10/2013. // Copyright (c) 2013 sdunster. All rights reserved. // #import <Foundation/Foundation.h> @interface NTPortParser : NSObject @property (nonatomic) NSString *description; @property (readonly) NSString *shortDescription; @property (readonly, strong) NSString *shortType; @property (readonly, strong) NSString *number; - (id)initWithDescription:(NSString *)description; @end
#ifndef EVENTDISPATCHERQPA_H #define EVENTDISPATCHERQPA_H #include "eventdispatcher_epoll_qpa.h" class EventDispatcherQPA : public EventDispatcherEPollQPA { Q_OBJECT public: explicit EventDispatcherQPA(QObject* parent = 0) : EventDispatcherEPollQPA(parent) {} }; #endif // EVENTDISPATCHERQPA_H
#ifndef CFG_BUILDER_H__TOSTITOS #define CFG_BUILDER_H__TOSTITOS #include "../CFG/module.h" #include "ssafunction.h" #include <deque> #include <memory> #include <set> #include <unordered_map> namespace TosLang { namespace FrontEnd { class ASTNode; class CompoundStmt; class Expr; class FunctionDecl; class Symbol; class SymbolTable; class VarDecl; } namespace BackEnd { using SSAInstList = std::vector<SSAInstruction>; using SSABlock = BasicBlock<SSAInstruction>; using SSABlockPtr = BlockPtr<SSAInstruction>; using FuncPtr = std::shared_ptr<SSAFunction>; using SSAModule = Module<SSAInstruction>; /* * \class CFGBuilder * \brief Builds a graphical representation (CFG) of the program described by given AST. * The CFG produced is in SSA form to facilitate further optimizations and register allocation. * The algorithm used is largely inspired by: https://pp.info.uni-karlsruhe.de/uploads/publikationen/braun13cc.pdf */ class CFGBuilder { public: CFGBuilder() : mNextID{ 0 }, mSymTable{ nullptr }, mCurrentVarDef {}, mIncompletePHIs{}, mMod{ nullptr }, mCurrentFunction{ nullptr }, mCurrentBlock{ nullptr } { } public: std::unique_ptr<Module<SSAInstruction>> Run(const std::unique_ptr<FrontEnd::ASTNode>& root, const std::shared_ptr<FrontEnd::SymbolTable>& symTable); protected: // Declarations void HandleFunctionDecl(const FrontEnd::ASTNode* decl); void HandleProgramDecl(const std::unique_ptr<FrontEnd::ASTNode>& root); void HandleVarDecl(const FrontEnd::ASTNode* decl); protected: // Expressions const SSAInstruction* HandleExpr(const FrontEnd::Expr* expr); const SSAInstruction* HandleBinaryExpr(const FrontEnd::ASTNode* expr); void HandleCallExpr(const FrontEnd::ASTNode* expr); protected: // Statements /* * \fn HandleCompoundStmt * \brief Creates basic blocks form a compound statement AST node. When this function is done, * mCurrentBlock points at the last block generated. * \param cStmt Compound statement AST node * \return Pointer to the first block of the statement */ SSABlock* HandleCompoundStmt(const FrontEnd::CompoundStmt* cStmt); void HandleIfStmt(const FrontEnd::ASTNode* stmt); void HandlePrintStmt(const FrontEnd::ASTNode* stmt); void HandleReturnStmt(const FrontEnd::ASTNode* stmt); void HandleScanStmt(const FrontEnd::ASTNode* stmt); void HandleWhileStmt(const FrontEnd::ASTNode* stmt); private: /* * TODO */ const SSAInstruction* AddInstruction(const SSAInstruction& inst); /* * \fn CreateNewCurrentBlock * \brief Creates a new basic block. It then adds it to the current CFG by linking it with the previous current block. * This will change mCurrentBlock so that it will now points to the newly created block. * \param insts Instructions to be inserted in the new current block */ void CreateNewCurrentBlock(SSAInstList&& insts = SSAInstList{}); /* * TODO */ void WriteVariable(const FrontEnd::Symbol* varNode, const SSABlock* block, const SSAValue& value); /* * TODO */ SSAValue ReadVariable(const FrontEnd::Symbol* variable, const SSABlock* block); /* * TODO */ SSAValue ReadVariableRecursive(const FrontEnd::Symbol* variable, const SSABlock* block); /* * TODO */ SSAValue AddPHIOperand(const FrontEnd::Symbol* variable, SSAInstruction* phi); /* * TODO */ SSAValue TryRemoveTrivialPHI(SSAInstruction* phi); private: using CurrentVarDef = std::unordered_map<const FrontEnd::Symbol*, std::unordered_map<const SSABlock*, SSAValue>>; using PHIMapping = std::unordered_map<const SSABlock*, std::unordered_map<const FrontEnd::Symbol*, const SSAInstruction*>>; // TODO: Once experimenting is done, use more carefully chosen data structures private: size_t mNextID; /*!< Next ID to give a value */ std::shared_ptr<FrontEnd::SymbolTable> mSymTable; /*!< Symbol table of the program */ CurrentVarDef mCurrentVarDef; /*!< Mapping indicating the latest value taken by a variable in a given block */ PHIMapping mIncompletePHIs; /*!< Mapping indicating the incomplete phi nodes in a given block */ std::unique_ptr<SSAModule> mMod; /*!< Translation unit being built out of the AST */ SSAFunction* mCurrentFunction; /*!< Current function being built */ SSABlock* mCurrentBlock; /*!< Current basic block being written to */ std::set<const SSABlock*> mSealedBlocks; /*!< Blocks for which no other predecessors will be added */ }; } } #endif // CFG_BUILDER_H__TOSTITOS
// // NHWebViewTitleLabel.h // Pods // // Created by Sergey Minakov on 01.06.15. // // #import <UIKit/UIKit.h> typedef NS_ENUM(NSUInteger, NHWebViewTitleViewState) { NHWebViewTitleViewStateText, NHWebViewTitleViewStateLoading, NHWebViewTitleViewStateFailed, }; @interface NHWebViewTitleView : UIView @property (nonatomic, readonly, strong) UILabel *titleLabel; @property (nonatomic, readonly, strong) UILabel *urlLabel; @property (nonatomic, readonly, assign) NHWebViewTitleViewState currentState; - (void)setState:(NHWebViewTitleViewState)state; @end
/** * File: tsearch.h * * This code is part of Data Transfer Security Protocol (DTSP) library. * * ANSI C code for Tree search generalised from Knuth Algorithm T (6.2.2). * It is literally a copy of POSIX (not ANSI) search.h "t*" methods. * Many search.h implementations are missing "tdestroy" implementation. * * @author NetBSD Community Team (christos, lukem, kleink) * @author Alexander Lokhman <alex.lokhman@gmail.com> * * Copyright (c) 2015 Alexander Lokhman * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * Created on August 2015 */ #ifndef TSEARCH_H #define TSEARCH_H #include <assert.h> #include <stdlib.h> #define TSEARCH_POSIX 1 #define TSEARCH_DARWIN 0 #if (TSEARCH_POSIX || TSEARCH_DARWIN) # include <search.h> #endif #ifdef __cplusplus extern "C" { #endif #if !TSEARCH_POSIX #if !TSEARCH_DARWIN typedef enum { preorder, postorder, endorder, leaf, } VISIT; /** * Search for an entry matching the given KEY in the tree pointed to by * *ROOTP and insert a new element if not found. * * @param key Tree key * @param rootp Tree root * @param compar Comparison function * * @return new or existing entry */ void *tsearch(const void *key, void **rootp, int (*compar)(const void *, const void *)); /** * Search for an entry matching the given KEY in the tree pointed to by * *ROOTP. If no matching entry is available return NULL. * * @param key Tree key * @param rootp Tree root * @param compar Comparison function * * @return NULL or existing entry */ void *tfind(const void *key, const void **rootp, int (*compar)(const void *, const void *)); /** * Remove the element matching KEY from the tree pointed to by *ROOTP. * * @param key Tree key * @param rootp Tree root * @param compar Comparison function * * @return pointer to the parent of the item deleted or NULL */ void *tdelete(const void *key, void **rootp, int (*compar)(const void *, const void *)); /** * Walk through the whole tree and call the ACTION callback for every node * or leaf. * * @param root Tree root * @param action Action function * * @return void */ void twalk(const void *root, void (*action)(const void *nodep, const VISIT which, const int depth)); #endif /* TSEARCH_DARWIN */ /** * Destroy the whole tree, call FREEFCT for each node or leaf. * * @param root Tree root * @param free_node Memory free function * * @return void */ void tdestroy(void *root, void (*free_node)(void *nodep)); #endif /* TSEARCH_POSIX */ #ifdef __cplusplus } #endif #endif /* TSEARCH_H */
/* * BlockDrawingFunctions.h * * Created on: 13 Mar 2012 * Author: insano10 */ #ifndef BLOCKDRAWINGFUNCTIONS_H_ #define BLOCKDRAWINGFUNCTIONS_H_ #include<stdint.h> #include "../Structures.h" typedef void (*drawFunction)(Coordinate, Coordinate, uint8_t, uint8_t); void drawSquareBlock(Coordinate grid_origin, Coordinate position, uint8_t block_size, uint8_t grid_spacing); void drawSBlock(Coordinate grid_origin, Coordinate position, uint8_t block_size, uint8_t grid_spacing); void drawTBlock(Coordinate grid_origin, Coordinate position, uint8_t block_size, uint8_t grid_spacing); void drawLineBlock(Coordinate grid_origin, Coordinate position, uint8_t block_size, uint8_t grid_spacing); void drawLBlock(Coordinate grid_origin, Coordinate position, uint8_t block_size, uint8_t grid_spacing); void drawReverseLBlock(Coordinate grid_origin, Coordinate position, uint8_t block_size, uint8_t grid_spacing); void drawReverseSBlock(Coordinate grid_origin, Coordinate position, uint8_t block_size, uint8_t grid_spacing); #endif /* BLOCKDRAWINGFUNCTIONS_H_ */
#ifndef JSON_SPIRIT_WRITER #define JSON_SPIRIT_WRITER //ticoin Copyright John W. Wilkinson 2007 - 2009. //ticoin Distributed under the MIT License, see accompanying file LICENSE.txt //ticoin json spirit version 4.03 #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif #include "json_spirit_value.h" #include <iostream> namespace json_spirit { //ticoin functions to convert JSON Values to text, //ticoin the "formatted" versions add whitespace to format the output nicely void write ( const Value& value, std::ostream& os ); void write_formatted( const Value& value, std::ostream& os ); std::string write ( const Value& value ); std::string write_formatted( const Value& value ); #ifndef BOOST_NO_STD_WSTRING void write ( const wValue& value, std::wostream& os ); void write_formatted( const wValue& value, std::wostream& os ); std::wstring write ( const wValue& value ); std::wstring write_formatted( const wValue& value ); #endif void write ( const mValue& value, std::ostream& os ); void write_formatted( const mValue& value, std::ostream& os ); std::string write ( const mValue& value ); std::string write_formatted( const mValue& value ); #ifndef BOOST_NO_STD_WSTRING void write ( const wmValue& value, std::wostream& os ); void write_formatted( const wmValue& value, std::wostream& os ); std::wstring write ( const wmValue& value ); std::wstring write_formatted( const wmValue& value ); #endif } #endif
SPORTH_UGEN("*", sporth_mul, SPORTH_MULv2) SPORTH_UGEN("+", sporth_add, SPORTH_ADDv2) SPORTH_UGEN("-", sporth_sub, SPORTH_SUBv2) SPORTH_UGEN("/", sporth_divide, SPORTH_DIVv2) SPORTH_UGEN("add", sporth_add, SPORTH_ADD) SPORTH_UGEN("bitcrush", sporth_bitcrush, SPORTH_BITCRUSH) SPORTH_UGEN("branch", sporth_branch, SPORTH_BRANCH) SPORTH_UGEN("buthp", sporth_buthp, SPORTH_BUTHP) SPORTH_UGEN("butlp", sporth_butlp, SPORTH_BUTLP) SPORTH_UGEN("c", sporth_constant, SPORTH_CONSTANT) SPORTH_UGEN("clip", sporth_clip, SPORTH_CLIP) SPORTH_UGEN("count", sporth_count, SPORTH_COUNT) SPORTH_UGEN("dcblk", sporth_dcblock, SPORTH_DCBLK) SPORTH_UGEN("delay", sporth_delay, SPORTH_DELAY) SPORTH_UGEN("diskin", sporth_diskin, SPORTH_DISKIN) SPORTH_UGEN("dist", sporth_dist, SPORTH_DIST) SPORTH_UGEN("div", sporth_divide, SPORTH_DIV) SPORTH_UGEN("dmetro", sporth_dmetro, SPORTH_DMETRO) SPORTH_UGEN("drop", sporth_drop, SPORTH_DROP) SPORTH_UGEN("dup", sporth_dup, SPORTH_DUP) SPORTH_UGEN("dur", sporth_dur, SPORTH_DUR) SPORTH_UGEN("eq", sporth_eq, SPORTH_EQ) SPORTH_UGEN("expon", sporth_expon, SPORTH_EXPON) SPORTH_UGEN("f", sporth_f, SPORTH_F) SPORTH_UGEN("fm", sporth_fm, SPORTH_FM) SPORTH_UGEN("gbuzz", sporth_gbuzz, SPORTH_GBUZZ) SPORTH_UGEN("gen_line", sporth_gen_line, SPORTH_GEN_LINE) SPORTH_UGEN("gen_sine", sporth_gen_sine, SPORTH_GEN_SINE) SPORTH_UGEN("gen_sinesum", sporth_gen_sinesum, SPORTH_GEN_SINESUM) SPORTH_UGEN("gen_vals", sporth_gen_vals, SPORTH_GEN_VALS) SPORTH_UGEN("gt", sporth_gt, SPORTH_GT) SPORTH_UGEN("in", sporth_in, SPORTH_IN) SPORTH_UGEN("jcrev", sporth_jcrev, SPORTH_JCREV) SPORTH_UGEN("jitter", sporth_jitter, SPORTH_JITTER) SPORTH_UGEN("line", sporth_line, SPORTH_LINE) SPORTH_UGEN("ling", sporth_ling, SPORTH_LING) SPORTH_UGEN("loadfile", sporth_loadfile, SPORTH_LOADFILE) SPORTH_UGEN("lt", sporth_lt, SPORTH_LT) SPORTH_UGEN("maygate", sporth_maygate, SPORTH_MAYGATE) SPORTH_UGEN("metro", sporth_metro, SPORTH_METRO) SPORTH_UGEN("mincer", sporth_mincer, SPORTH_MINCER) SPORTH_UGEN("mix", sporth_mix, SPORTH_MIX) SPORTH_UGEN("mode", sporth_mode, SPORTH_MODE) SPORTH_UGEN("moogladder", sporth_moogladder, SPORTH_MOOGLADDER) SPORTH_UGEN("mtof", sporth_mtof, SPORTH_MTOF) SPORTH_UGEN("mul", sporth_mul, SPORTH_MUL) SPORTH_UGEN("ne", sporth_ne, SPORTH_NE) SPORTH_UGEN("noise", sporth_noise, SPORTH_NOISE) SPORTH_UGEN("nsmp", sporth_nsmp, SPORTH_NSMP) SPORTH_UGEN("osc", sporth_osc, SPORTH_OSC) SPORTH_UGEN("p", sporth_p, SPORTH_P) SPORTH_UGEN("pan", sporth_pan2, SPORTH_PAN) SPORTH_UGEN("pluck", sporth_pluck, SPORTH_PLUCK) SPORTH_UGEN("poly", sporth_poly, SPORTH_POLY) SPORTH_UGEN("polyget", sporth_polyget, SPORTH_POLYGET) SPORTH_UGEN("port", sporth_port, SPORTH_PORT) SPORTH_UGEN("pos", sporth_pos, SPORTH_POS) SPORTH_UGEN("prop", sporth_prop, SPORTH_PROP) SPORTH_UGEN("pset", sporth_pset, SPORTH_PSET) SPORTH_UGEN("randh", sporth_randh, SPORTH_RANDH) SPORTH_UGEN("randi", sporth_randi, SPORTH_RANDI) SPORTH_UGEN("reverse", sporth_reverse, SPORTH_REVERSE) SPORTH_UGEN("revsc", sporth_revsc, SPORTH_REVSC) SPORTH_UGEN("rot", sporth_rot, SPORTH_ROT) SPORTH_UGEN("rpt", sporth_rpt, SPORTH_RPT) SPORTH_UGEN("samphold", sporth_samphold, SPORTH_SAMPHOLD) SPORTH_UGEN("saw", sporth_saw, SPORTH_SAW) SPORTH_UGEN("scale", sporth_scale, SPORTH_SCALE) SPORTH_UGEN("sine", sporth_sine, SPORTH_SINE) SPORTH_UGEN("square", sporth_square, SPORTH_SQUARE) SPORTH_UGEN("sub", sporth_sub, SPORTH_SUB) SPORTH_UGEN("swap", sporth_swap, SPORTH_SWAP) SPORTH_UGEN("switch", sporth_switch, SPORTH_SWITCH) SPORTH_UGEN("tbldur", sporth_tbldur, SPORTH_TBLDUR) SPORTH_UGEN("tblsize", sporth_tblsize, SPORTH_TBLSIZE) SPORTH_UGEN("tenv", sporth_tenv, SPORTH_TENV) SPORTH_UGEN("tenv2", sporth_tenv2, SPORTH_TENV2) SPORTH_UGEN("tenvx", sporth_tenvx, SPORTH_TENVX) SPORTH_UGEN("tget", sporth_tget, SPORTH_TGET) SPORTH_UGEN("tin", sporth_tin, SPORTH_TIN) SPORTH_UGEN("tseq", sporth_tseq, SPORTH_TSEQ) SPORTH_UGEN("tset", sporth_tset, SPORTH_TSET) SPORTH_UGEN("vdelay", sporth_vdelay, SPORTH_VDELAY)
#pragma once #include "cgcore.h" #include "lab2.h" namespace lab4 { extern std::vector<std::pair<TPoint, TPoint> > lines; extern std::vector<TPoint> two_points; char code_point(int x, int y); bool cut_line(int &x1, int &y1, int &x2, int &y2); void cut_lines(int xl, int xr, int yb, int yt); void cut_poly(int xl, int xr, int yb, int yt); void draw_lines(); void draw_window(); void test_cut(); }
#include <stdio.h> int is_palindrome(int); int main() { int num=0; scanf("%d",&num); for(; is_palindrome(num) == 0 ;num++); printf("%X", num); return 0; } int is_palindrome(int num) { char helper_hex[50]; int i = 0,end = 0,middle = 0,begin = 0; sprintf(helper_hex, "%x",num); while (helper_hex[i] != '\0') i++; end = i - 1; middle = i/2; for (begin = 0; begin < middle; begin++) { if (helper_hex[begin] != helper_hex[end]) { return 0; } end--; } return 1; }
#include "stm32f4xx.h" #include "stm32f4_discovery.h" void Delay_Init(void); void DelayMicros(uint32_t micros); void DelayMillis(uint32_t millis);
/* * @file Button.h * Contains the declaration of the "Button" object. * @author pavlov-vs * @version 0.0.1 * @date 2017.09.09 **/ #pragma once //TODO create multilpe constructors for button #include "Window.h" using namespace std; /** * Class containing the implementation of a button. * <br><b>label</b> - text on a button. * <br><b>borderColor</b> - color of button border. */ class Button: public Window { private: ///text on a button string label; ///color of button border string borderColor; public: /** * Default constructor, all fields are set to default. */ Button(); Button(string label, string borderColor); Button(int _windowId, int _x1, int _y1, int _x2, int _y2, string label, string borderColor); virtual ~Button(); /** * Setter of button label. * @param label - button label to be set. */ void setLabel(string label); /** * Getter of button label. * @return button label. */ string getLabel(); /** * Setter of button border color. * @param borderColor - button border color to be set. */ void setBorderColor(string borderColor); /** * Getter of button border color. * @return button border color. */ string getBorderColor(); virtual string toString(); /** * Çàâàíòàæóº äàí³ ³ç ïîòîêó * @param aStream ³äêðèòèé ïîò³ê äëÿ çàâàíòàæåííÿ äàíèõ */ virtual void OnLoad(std::istream& aStream); virtual string toBitsetString(); };
#include <stdio.h> #include "communication.h" #include "../Drivers/timer.h" void traiter_message(T_sensors *p_sensors) { } void envoyer_message(T_sensors *p_sensors) { int i; for (i=0;i<NB_OF_MPU;i++) { // Envoi d'une trame de detection de frappe if(p_sensors->mpu[i].tap.tap_detected == 1) { if(p_sensors->mpu[0].tap.num_tom != -1) printf("%1d %1d\n", p_sensors->mpu[0].tab_toms[p_sensors->mpu[0].tap.num_tom].num_MIDI, (int)p_sensors->mpu[i].tap.velocite); } } }
#include <libcgc.h> #include "libc.h" size_t MY_TID = TID_T5; size_t PIPE_RECV = tid2recvpipe(TID_T5); char * STR_THREAD_NAME = "T5";
#ifndef ARTNET_HELPERS_H #define ARTNET_HELPERS_H #include <stdio.h> #define ARTNET_OpOutput 0x5000 extern const char artnet_header[8]; unsigned short decode_artnet_uint16_hilo(unsigned char *data); unsigned short decode_artnet_uint16_lohi(unsigned char *data); unsigned int decode_artnet_uint32_hilo(unsigned char *data); unsigned int decode_artnet_uint8(unsigned char *data); void encode_artnet_uint16_hilo(unsigned short n, unsigned char *data); void encode_artnet_uint16_lohi(unsigned short n, unsigned char *data); void encode_artnet_uint32_hilo(unsigned short n, unsigned char *data); void encode_artnet_uint32_lohi(unsigned short n, unsigned char *data); #endif//ARTNET_HELPERS_H
// Copyright 2021 Phyronnaz #pragma once #include "CoreMinimal.h" #include "GameFramework/Actor.h" #include "VoxelPlaceableItems/VoxelPlaceableItemManager.h" #include "VoxelPlaceableItemActorHelper.generated.h" class AVoxelWorld; class AVoxelDataItemActor; UCLASS(Within=VoxelWorld) class VOXEL_API UVoxelPlaceableItemActorHelper : public UObject { GENERATED_BODY() public: void Initialize(); AVoxelWorld& GetVoxelWorld() const; private: using FItemInfo = FVoxelDataItemConstructionInfo; using FItemPtr = TVoxelWeakPtr<const TVoxelDataItemWrapper<FVoxelDataItem>>; struct FActorData { TMap<FItemInfo, FItemPtr> Items; }; TMap<TWeakObjectPtr<AVoxelDataItemActor>, FActorData> ActorsData; void AddActor(AVoxelDataItemActor& Actor); void OnActorUpdated(TWeakObjectPtr<AVoxelDataItemActor> Actor); void OnLevelAddedToWorld(ULevel* InLevel, UWorld* InWorld); };
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ #include "array_list.h" void list_reserve(list* l,int size); list* list_create(){ list* l = malloc(sizeof(list)); l->size = 0; l->list = malloc(5*sizeof(list)); l->max_size = 5; return l; } void list_add(list* l,void* elem){ if (l->size==l->max_size){ list_reserve(l,5); } l->list[l->size]=elem; l->size+=1; } void list_reserve(list* l,int size){ void** new_res = malloc((size+l->max_size)*sizeof(void*)); for (int i =0;i<l->size;i++){ new_res[i] = l->list[i]; } free(l->list); l->list = new_res; l->max_size+=size; } void* list_at(list* l,int index){ return l->list[index]; } void* list_last(list* l){ if (l->size ==0){ printf("no last element on empty list\n exiting"); exit(0); } return l->list[l->size-1]; } void list_free(list* l, int (*destructor)(void*)){ for (int i =0;i<l->size;i++){ (*destructor)(l->list[i]); } free(l->list); free(l); } void* list_rm_at(list* l, int index){ void* temp = l->list[index]; l->size-=1; for (int i = index;i<l->size;i++){ l->list[i] = l->list[i+1]; } return temp; } int list_find_by_key(list* l, int key, int(*compare)(void*,int)){ for (int i= 0;i<l->size;i++){ if ((*compare)(l->list[i],key)){ return i; } } return -1; }
// // YCYFastLoginView.h // BaiSiCommunity // // Created by Cheney on 16/6/28. // Copyright © 2016年 Cheney. All rights reserved. // #import <UIKit/UIKit.h> @interface YCYFastLoginView : UIView + (instancetype)fastLoginView; @end
/* * Copyright (c) 2015 DeNA Co., Ltd. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to * deal in the Software without restriction, including without limitation the * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or * sell copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ #ifndef h2o__http2__scheduler_h #define h2o__http2__scheduler_h #include <assert.h> #include "h2o/linklist.h" #include "h2o/memory.h" typedef struct st_h2o_http2_scheduler_queue_node_t { h2o_linklist_t _link; size_t _deficit; } h2o_http2_scheduler_queue_node_t; typedef struct st_h2o_http2_scheduler_queue_t h2o_http2_scheduler_queue_t; /** * resembles a node in the dependency tree; i.e. assigned for each HTTP/2 stream (as a member of openref), or the root of the tree * associated to the connection */ typedef struct st_h2o_http2_scheduler_node_t { struct st_h2o_http2_scheduler_node_t *_parent; /* NULL if root */ h2o_linklist_t _all_refs; /* list of nodes */ h2o_http2_scheduler_queue_t *_queue; /* priority list (NULL if _all_refs is empty) */ } h2o_http2_scheduler_node_t; /** * the entry to be scheduled; is assigned for every HTTP/2 stream. */ typedef struct st_h2o_http2_scheduler_openref_t { h2o_http2_scheduler_node_t node; uint16_t weight; h2o_linklist_t _all_link; /* linked to _all_refs */ size_t _active_cnt; /* COUNT(active_streams_in_dependents) + _self_is_active */ int _self_is_active; h2o_http2_scheduler_queue_node_t _queue_node; } h2o_http2_scheduler_openref_t; /** * callback called by h2o_http2_scheduler_run. * @param ref reference to an active stream that should consume resource * @param still_is_active [out] flag to indicate whether the ref should still be marked as active after returning from the function * @param cb_arg value of cb_arg passed to h2o_http2_scheduler_run * @return non-zero value to stop traversing through the tree, or 0 to continue */ typedef int (*h2o_http2_scheduler_run_cb)(h2o_http2_scheduler_openref_t *ref, int *still_is_active, void *cb_arg); /** * */ void h2o_http2_scheduler_init(h2o_http2_scheduler_node_t *root); /** * disposes of the scheduler. All open references belonging to the node must be closed before calling this functions. */ void h2o_http2_scheduler_dispose(h2o_http2_scheduler_node_t *root); /** * opens a reference with given parent as its dependency */ void h2o_http2_scheduler_open(h2o_http2_scheduler_openref_t *ref, h2o_http2_scheduler_node_t *parent, uint16_t weight, int exclusive); /** * closes a reference. All the dependents are raised to become the dependents of the parent of the reference being closed. */ void h2o_http2_scheduler_close(h2o_http2_scheduler_openref_t *ref); /** * reprioritizes the reference. */ void h2o_http2_scheduler_rebind(h2o_http2_scheduler_openref_t *ref, h2o_http2_scheduler_node_t *new_parent, uint16_t weight, int exclusive); /** * tests if the ref is open */ static int h2o_http2_scheduler_is_open(h2o_http2_scheduler_openref_t *ref); /** * returns weight associated to the reference */ static uint16_t h2o_http2_scheduler_get_weight(h2o_http2_scheduler_openref_t *ref); /** * returns the parent */ static h2o_http2_scheduler_node_t *h2o_http2_scheduler_get_parent(h2o_http2_scheduler_openref_t *ref); /** * activates a reference so that it would be passed back as the argument to the callback of the h2o_http2_scheduler_run function * if any resource should be allocated */ void h2o_http2_scheduler_activate(h2o_http2_scheduler_openref_t *ref); /** * calls the callback of the references linked to the dependency tree one by one, in the order defined by the dependency and the * weight. */ int h2o_http2_scheduler_run(h2o_http2_scheduler_node_t *root, h2o_http2_scheduler_run_cb cb, void *cb_arg); /* inline definitions */ inline int h2o_http2_scheduler_is_open(h2o_http2_scheduler_openref_t *ref) { return ref->_all_link.is_linked(); } inline uint16_t h2o_http2_scheduler_get_weight(h2o_http2_scheduler_openref_t *ref) { return ref->weight; } inline h2o_http2_scheduler_node_t *h2o_http2_scheduler_get_parent(h2o_http2_scheduler_openref_t *ref) { return ref->node._parent; } #endif
#pragma once #include <vector> #include <glm\vec2.hpp> #include "CoreGeometry.h" // UV maps the provided geometry from triangles onto a 2D texture class IUvMapper { public: // Maps each triangle in the provided geometry to a triplet of UV coordinates. virtual std::vector<glm::vec2> MapToTexturePlane(CoreGeometry coreGeometry, float* maxScaleFactorPtr) = 0; };
/* * Copyright 1993-2012 NVIDIA Corporation. All rights reserved. * * NOTICE TO LICENSEE: * * This source code and/or documentation ("Licensed Deliverables") are * subject to NVIDIA intellectual property rights under U.S. and * international Copyright laws. * * These Licensed Deliverables contained herein is PROPRIETARY and * CONFIDENTIAL to NVIDIA and is being provided under the terms and * conditions of a form of NVIDIA software license agreement by and * between NVIDIA and Licensee ("License Agreement") or electronically * accepted by Licensee. Notwithstanding any terms or conditions to * the contrary in the License Agreement, reproduction or disclosure * of the Licensed Deliverables to any third party without the express * written consent of NVIDIA is prohibited. * * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE * LICENSE AGREEMENT, NVIDIA MAKES NO REPRESENTATION ABOUT THE * SUITABILITY OF THESE LICENSED DELIVERABLES FOR ANY PURPOSE. IT IS * PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND. * NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THESE LICENSED * DELIVERABLES, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY, * NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE. * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE * LICENSE AGREEMENT, IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY * SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THESE LICENSED DELIVERABLES. * * U.S. Government End Users. These Licensed Deliverables are a * "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT * 1995), consisting of "commercial computer software" and "commercial * computer software documentation" as such terms are used in 48 * C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Government * only as a commercial end item. Consistent with 48 C.F.R.12.212 and * 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), all * U.S. Government End Users acquire the Licensed Deliverables with * only those rights set forth herein. * * Any use of the Licensed Deliverables in individual and commercial * software must include, in the user documentation and internal * comments to the code, the above Disclaimer and U.S. Government End * Users Notice. */ #if !defined(__SURFACE_TYPES_H__) #define __SURFACE_TYPES_H__ /******************************************************************************* * * * * * * *******************************************************************************/ #include "driver_types.h" /** * \addtogroup CUDART_TYPES * * @{ */ /******************************************************************************* * * * * * * *******************************************************************************/ #define cudaSurfaceType1D 0x01 #define cudaSurfaceType2D 0x02 #define cudaSurfaceType3D 0x03 #define cudaSurfaceTypeCubemap 0x0C #define cudaSurfaceType1DLayered 0xF1 #define cudaSurfaceType2DLayered 0xF2 #define cudaSurfaceTypeCubemapLayered 0xFC /** * CUDA Surface boundary modes */ enum __device_builtin__ cudaSurfaceBoundaryMode { cudaBoundaryModeZero = 0, /**< Zero boundary mode */ cudaBoundaryModeClamp = 1, /**< Clamp boundary mode */ cudaBoundaryModeTrap = 2 /**< Trap boundary mode */ }; /** * CUDA Surface format modes */ enum __device_builtin__ cudaSurfaceFormatMode { cudaFormatModeForced = 0, /**< Forced format mode */ cudaFormatModeAuto = 1 /**< Auto format mode */ }; /** * CUDA Surface reference */ struct __device_builtin__ surfaceReference { /** * Channel descriptor for surface reference */ struct cudaChannelFormatDesc channelDesc; }; /** * An opaque value that represents a CUDA Surface object */ typedef __device_builtin__ unsigned long long cudaSurfaceObject_t; /** @} */ /** @} */ /* END CUDART_TYPES */ #endif /* !__SURFACE_TYPES_H__ */
// // KRPicture.h // NeteaseNews // // Created by KaoRny on 17/3/12. // Copyright © 2017年 KaoRny. All rights reserved. // #import <Foundation/Foundation.h> //图片信息模型 @interface KRPicture : NSObject /// 新闻图标 @property (nonatomic,copy) NSString *imgsrc; @end
// // ResumeScanCellLayout.h // QiPinTong // // Created by taylor on 2017/3/21. // Copyright © 2017年 ShiJiJiaLian. All rights reserved. // #import "LWLayout.h" @interface ResumeScanCellLayout : LWLayout<NSCopying> @property (assign,nonatomic) CGFloat resumeScanCellH; -(id)initWithResumeScanCell; @end
#pragma once #include "targetver.h" #include <stdio.h> #include <tchar.h> #include <io.h> #include <fcntl.h> #include <windows.h> #include <comdef.h> #include <atlbase.h> #include <atlconv.h> #include <string> #include <iostream> #include <vector> #include <sstream> #include <clocale> #include <locale> #include <codecvt> #include <fstream> #include <map> #include <iomanip> #include <ctime> #include <algorithm>
/* * This file is part of the Micro Python project, http://micropython.org/ * * The MIT License (MIT) * * Copyright (c) 2013, 2014 Damien P. George * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef MICROPY_INCLUDED_PY_QSTR_H #define MICROPY_INCLUDED_PY_QSTR_H #include "py/mpconfig.h" #include "py/misc.h" // See qstrdefs.h for a list of qstr's that are available as constants. // Reference them as MP_QSTR_xxxx. // // Note: it would be possible to define MP_QSTR_xxx as qstr_from_str_static("xxx") // for qstrs that are referenced this way, but you don't want to have them in ROM. // first entry in enum will be MP_QSTR_NULL=0, which indicates invalid/no qstr enum { #ifndef NO_QSTR #define QDEF(id, str) id, #include "genhdr/qstrdefs.generated.h" #undef QDEF #endif MP_QSTRnumber_of, // no underscore so it can't clash with any of the above }; typedef size_t qstr; typedef struct _qstr_pool_t { struct _qstr_pool_t *prev; size_t total_prev_len; size_t alloc; size_t len; const byte *qstrs[]; } qstr_pool_t; #define QSTR_FROM_STR_STATIC(s) (qstr_from_strn((s), strlen(s))) void qstr_init(void); mp_uint_t qstr_compute_hash(const byte *data, size_t len); qstr qstr_find_strn(const char *str, size_t str_len); // returns MP_QSTR_NULL if not found qstr qstr_from_str(const char *str); qstr qstr_from_strn(const char *str, size_t len); byte *qstr_build_start(size_t len, byte **q_ptr); qstr qstr_build_end(byte *q_ptr); mp_uint_t qstr_hash(qstr q); const char *qstr_str(qstr q); size_t qstr_len(qstr q); const byte *qstr_data(qstr q, size_t *len); void qstr_pool_info(size_t *n_pool, size_t *n_qstr, size_t *n_str_data_bytes, size_t *n_total_bytes); void qstr_dump_data(void); #endif // MICROPY_INCLUDED_PY_QSTR_H
/* * File: IMU.h * Author: Nicro ramicaza * * Created on March 7, 2015, 5:51 PM */ #ifndef IMU_H #define IMU_H #include <cstdlib> #include <iostream> #include <stdio.h> #include <unistd.h> //Used for UART #include <fcntl.h> //Used for UART #include <termios.h> //Used for UART #include <pthread.h> #include <ctime> #include <cstring> #include <string> using namespace std; class IMU; typedef struct { IMU* obj; void* data; } LolStructIMU; class IMU { private: double initTime; unsigned char headerSeq[3]; int uart0_filestream; struct termios options; const char *device; unsigned char fromIMU[100]; unsigned char tempBuffer[512]; int channels; void tableUpdater(); static void *staticUpdater(void *args); void appendBuffers(unsigned char[], int, unsigned char[], int); void clearUnsignedCharArray(unsigned char[], int); int searchForCharSeq(unsigned char[], unsigned char[], int, int, int); pthread_t tableUpdaterThread; bool doUpdate; int cursor; float roll; float pitch; float yaw; public: IMU(int); bool spew(unsigned char[], int); void printSerialBuffer(); void closeSerial(); void getSpew(unsigned char[]); float getRoll(); float getPitch(); float getYaw(); }; #endif /* IMU_H */
#include <QImage> #include <QTextStream> #include <QFile> #include <cstdlib> #ifndef MYSEGMENTATION_H #define MYSEGMENTATION_H typedef std::vector<std::vector<double>> Matrix; typedef std::vector<double> Vector; struct myBoder { int leftBoder; int rightBoder; int topBoder; int bottomBoder; }; class MySegmentation { public: MySegmentation(); void loadImage(QImage myImage); QImage basicRegionGrowing(int x, int y, int offset); QImage imageWithMask(); void regionGrowing(int x, int y, int offset); // gdzie x,y -> kordynaty piksela void saveToFile(); QImage reset(); private: void basicMask(int x, int y, int offset); int maskCounter = 0; QImage oryginalImage; QImage copyImage; Matrix mask; Matrix bMask; Matrix bRGMask; Matrix redChannel; Matrix greenChannel; Matrix blueChannel; }; #endif // MYSEGMENTATION_H
#ifndef CONCURRENT_DEQUE_ #define CONCURRENT_DEQUE_ #include <deque> #include <thread> #include <mutex> #include <condition_variable> template <typename T> class Deque { public: T pop() { std::unique_lock<std::mutex> mlock(mutex_); while (queue_.empty()) { cond_.wait(mlock); } auto val = queue_.front(); queue_.pop_front(); return val; } void pop(T& item) { std::unique_lock<std::mutex> mlock(mutex_); while (queue_.empty()) { cond_.wait(mlock); } item = queue_.front(); queue_.pop_front(); } void push_back(const T& item) { std::unique_lock<std::mutex> mlock(mutex_); queue_.push_back(item); mlock.unlock(); cond_.notify_one(); } void push_front(const T& item) { std::unique_lock<std::mutex> mlock(mutex_); queue_.push_front(item); mlock.unlock(); cond_.notify_one(); } Deque()=default; Deque(const Deque&) = delete; // disable copying Deque& operator=(const Deque&) = delete; // disable assignment private: std::deque<T> queue_; std::mutex mutex_; std::condition_variable cond_; }; #endif
// // Created by playmice on 5/1/17. // #ifndef SNIPPETS_BASENEXPANSION_H #define SNIPPETS_BASENEXPANSION_H std::string basenexpansion(int n, int b); #endif //SNIPPETS_BASENEXPANSION_H
// // Generated by class-dump 3.5 (64 bit). // // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. // #import <IDEKit/IDEBatchFindPathBarMenuItem.h> @interface IDEBatchFindPathBarMatchStyleType : IDEBatchFindPathBarMenuItem { int _findType; } @property int findType; // @synthesize findType=_findType; - (id)children; - (void)setFindOptions:(id)arg1; - (id)initWithTitle:(id)arg1 findType:(int)arg2; @end
// GHSAppDelegate.h // // Copyright (c) 2012 Jean-Philippe Couture // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. #import <Cocoa/Cocoa.h> @interface GHSAppDelegate : NSObject <NSApplicationDelegate> @end
#include <enet/enet.h> #include <time.h> #include "game/scenes/mainmenu/menu_listen.h" #include "game/gui/gui.h" #include "game/utils/settings.h" #include "game/protos/scene.h" #include "game/game_state.h" #include "utils/log.h" typedef struct { ENetHost *host; component *cancel_button; scene *s; } listen_menu_data; void menu_listen_free(component *c) { listen_menu_data *local = menu_get_userdata(c); if(local->host) { enet_host_destroy(local->host); } free(local); } void menu_listen_tick(component *c) { listen_menu_data *local = menu_get_userdata(c); game_state *gs = local->s->gs; if(local->host) { ENetEvent event; if(enet_host_service(local->host, &event, 0) > 0 && event.type == ENET_EVENT_TYPE_CONNECT) { ENetPacket * packet = enet_packet_create("0", 2, ENET_PACKET_FLAG_RELIABLE); enet_peer_send(event.peer, 0, packet); enet_host_flush(local->host); DEBUG("client connected!"); controller *player1_ctrl, *player2_ctrl; keyboard_keys *keys; game_player *p1 = game_state_get_player(gs, 0); game_player *p2 = game_state_get_player(gs, 1); // force the speed to 3 game_state_set_speed(gs, 5); p1->har_id = HAR_JAGUAR; p1->pilot_id = 0; p2->har_id = HAR_JAGUAR; p2->pilot_id = 0; player1_ctrl = malloc(sizeof(controller)); controller_init(player1_ctrl); player1_ctrl->har = p1->har; player2_ctrl = malloc(sizeof(controller)); controller_init(player2_ctrl); player2_ctrl->har = p2->har; // Player 1 controller -- Keyboard settings_keyboard *k = &settings_get()->keys; keys = malloc(sizeof(keyboard_keys)); keys->up = SDL_GetScancodeFromName(k->key1_up); keys->down = SDL_GetScancodeFromName(k->key1_down); keys->left = SDL_GetScancodeFromName(k->key1_left); keys->right = SDL_GetScancodeFromName(k->key1_right); keys->punch = SDL_GetScancodeFromName(k->key1_punch); keys->kick = SDL_GetScancodeFromName(k->key1_kick); keys->escape = SDL_GetScancodeFromName(k->key1_escape); keyboard_create(player1_ctrl, keys, 0); game_player_set_ctrl(p1, player1_ctrl); // Player 2 controller -- Network net_controller_create(player2_ctrl, local->host, event.peer, ROLE_SERVER); game_player_set_ctrl(p2, player2_ctrl); local->host = NULL; game_player_set_selectable(p2, 1); chr_score_set_difficulty(game_player_get_score(game_state_get_player(gs, 0)), AI_DIFFICULTY_CHAMPION); chr_score_set_difficulty(game_player_get_score(game_state_get_player(gs, 1)), AI_DIFFICULTY_CHAMPION); game_state_set_next(gs, SCENE_MELEE); } } } void menu_listen_cancel(component *c, void *userdata) { menu *m = sizer_get_obj(c->parent); m->finished = 1; // Clean up host listen_menu_data *local = menu_get_userdata(c->parent); if(local->host) { enet_host_destroy(local->host); local->host = NULL; } } component* menu_listen_create(scene *s) { listen_menu_data *local = malloc(sizeof(listen_menu_data)); s->gs->role = ROLE_SERVER; local->s = s; // Form address (host) ENetAddress address; address.host = ENET_HOST_ANY; address.port = settings_get()->net.net_listen_port; // Set up host local->host = enet_host_create(&address, 1, 2, 0, 0); if(local->host == NULL) { DEBUG("Failed to initialize ENet server"); free(local); return NULL; } enet_socket_set_option(local->host->socket, ENET_SOCKOPT_REUSEADDR, 1); // Text config text_settings tconf; text_defaults(&tconf); tconf.font = FONT_BIG; tconf.halign = TEXT_CENTER; tconf.cforeground = color_create(0, 121, 0, 255); // Create the menu component* menu = menu_create(11); menu_attach(menu, label_create(&tconf, "START SERVER")); menu_attach(menu, filler_create()); menu_attach(menu, label_create(&tconf, "Waiting ...")); menu_attach(menu, filler_create()); local->cancel_button = textbutton_create(&tconf, "CANCEL", COM_ENABLED, menu_listen_cancel, s); menu_attach(menu, local->cancel_button); menu_set_userdata(menu, local); menu_set_free_cb(menu, menu_listen_free); menu_set_tick_cb(menu, menu_listen_tick); return menu; }
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The BeCoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef BECOIN_CHAINPARAMS_H #define BECOIN_CHAINPARAMS_H #include "chainparamsbase.h" #include "consensus/params.h" #include "primitives/block.h" #include "protocol.h" #include <vector> struct CDNSSeedData { std::string name, host; CDNSSeedData(const std::string &strName, const std::string &strHost) : name(strName), host(strHost) {} }; struct SeedSpec6 { uint8_t addr[16]; uint16_t port; }; typedef std::map<int, uint256> MapCheckpoints; struct CCheckpointData { MapCheckpoints mapCheckpoints; int64_t nTimeLastCheckpoint; int64_t nTransactionsLastCheckpoint; double fTransactionsPerDay; }; /** * CChainParams defines various tweakable parameters of a given instance of the * BeCoin system. There are three: the main network on which people trade goods * and services, the public test network which gets reset from time to time and * a regression test mode which is intended for private networks only. It has * minimal difficulty to ensure that blocks can be found instantly. */ class CChainParams { public: enum Base58Type { PUBKEY_ADDRESS, SCRIPT_ADDRESS, SECRET_KEY, EXT_PUBLIC_KEY, EXT_SECRET_KEY, MAX_BASE58_TYPES }; const Consensus::Params& GetConsensus() const { return consensus; } const CMessageHeader::MessageStartChars& MessageStart() const { return pchMessageStart; } const std::vector<unsigned char>& AlertKey() const { return vAlertPubKey; } int GetDefaultPort() const { return nDefaultPort; } const CBlock& GenesisBlock() const { return genesis; } /** Make miner wait to have peers to avoid wasting work */ bool MiningRequiresPeers() const { return fMiningRequiresPeers; } /** Default value for -checkmempool and -checkblockindex argument */ bool DefaultConsistencyChecks() const { return fDefaultConsistencyChecks; } /** Policy: Filter transactions that do not match well-defined patterns */ bool RequireStandard() const { return fRequireStandard; } int64_t PruneAfterHeight() const { return nPruneAfterHeight; } /** Make miner stop after a block is found. In RPC, don't return until nGenProcLimit blocks are generated */ bool MineBlocksOnDemand() const { return fMineBlocksOnDemand; } /** In the future use NetworkIDString() for RPC fields */ bool TestnetToBeDeprecatedFieldRPC() const { return fTestnetToBeDeprecatedFieldRPC; } /** Return the BIP70 network string (main, test or regtest) */ std::string NetworkIDString() const { return strNetworkID; } const std::vector<CDNSSeedData>& DNSSeeds() const { return vSeeds; } const std::vector<unsigned char>& Base58Prefix(Base58Type type) const { return base58Prefixes[type]; } const std::vector<SeedSpec6>& FixedSeeds() const { return vFixedSeeds; } const CCheckpointData& Checkpoints() const { return checkpointData; } protected: CChainParams() {} Consensus::Params consensus; CMessageHeader::MessageStartChars pchMessageStart; //! Raw pub key bytes for the broadcast alert signing key. std::vector<unsigned char> vAlertPubKey; int nDefaultPort; uint64_t nPruneAfterHeight; std::vector<CDNSSeedData> vSeeds; std::vector<unsigned char> base58Prefixes[MAX_BASE58_TYPES]; std::string strNetworkID; CBlock genesis; std::vector<SeedSpec6> vFixedSeeds; bool fMiningRequiresPeers; bool fDefaultConsistencyChecks; bool fRequireStandard; bool fMineBlocksOnDemand; bool fTestnetToBeDeprecatedFieldRPC; CCheckpointData checkpointData; }; /** * Return the currently selected parameters. This won't change after app * startup, except for unit tests. */ const CChainParams &Params(); /** Return parameters for the given network. */ CChainParams &Params(CBaseChainParams::Network network); /** Sets the params returned by Params() to those for the given network. */ void SelectParams(CBaseChainParams::Network network); /** * Looks for -regtest or -testnet and then calls SelectParams as appropriate. * Returns false if an invalid combination is given. */ bool SelectParamsFromCommandLine(); #endif // BECOIN_CHAINPARAMS_H
// // MJShareContent.h // MJSDK-iOS // // Created by John LXThyme on 16/6/20. // Copyright © 2016年 WM. All rights reserved. // #import "MJBaseShareContent.h" @interface MJShareFirst : MJBaseShareContent @end
#ifndef SUNDOWN_UTIL_STRING_H #define SUNDOWN_UTIL_STRING_H namespace Sundown { typedef std::string String; } #endif // SUNDOWN_UTIL_STRING_H
#ifdef __OBJC__ #import <UIKit/UIKit.h> #else #ifndef FOUNDATION_EXPORT #if defined(__cplusplus) #define FOUNDATION_EXPORT extern "C" #else #define FOUNDATION_EXPORT extern #endif #endif #endif FOUNDATION_EXPORT double Pods_PledgesTestsVersionNumber; FOUNDATION_EXPORT const unsigned char Pods_PledgesTestsVersionString[];
/* This file is part of the Palabos library. * * Copyright (C) 2011-2015 FlowKit Sarl * Route d'Oron 2 * 1010 Lausanne, Switzerland * E-mail contact: contact@flowkit.com * * The most recent release of Palabos can be downloaded at * <http://www.palabos.org/> * * The library Palabos is free software: you can redistribute it and/or * modify it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * The 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ /** \file * Helper functions for domain initialization -- header file. */ #ifndef NTENSOR_ANALYSIS_WRAPPER_3D_H #define NTENSOR_ANALYSIS_WRAPPER_3D_H #include "core/globalDefs.h" #include "atomicBlock/dataField3D.h" #include "multiBlock/multiDataField3D.h" #include "dataProcessors/dataAnalysisFunctional3D.h" #include <memory> namespace plb { template<typename T1, typename T2> void copy( MultiNTensorField3D<T1>& field, MultiNTensorField3D<T2>& convertedField, Box3D domain ); template<typename T1, typename T2> MultiNTensorField3D<T2>* copyConvert( MultiNTensorField3D<T1>& field, Box3D domain ); template<typename T> void nTensorToScalar(MultiNTensorField3D<T>& nTensor, MultiScalarField3D<T>& scalar); template<typename T> void scalarToNTensor(MultiScalarField3D<T>& scalar, MultiNTensorField3D<T>& nTensor); template<typename T> std::auto_ptr<MultiNTensorField3D<T> > scalarToNTensor(MultiScalarField3D<T>& scalar); template<typename T> std::auto_ptr<MultiScalarField3D<T> > nTensorToScalar(MultiNTensorField3D<T>& nTensor); } // namespace plb #endif // NTENSOR_ANALYSIS_WRAPPER_3D_H
// // Generated by class-dump 3.5 (64 bit). // // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. // #import "WAJSEventHandler_BaseEvent.h" @interface WAJSEventHandler_switchTab : WAJSEventHandler_BaseEvent { } - (void)popChildrenAndSwitchInMainTabWebView:(id)arg1 withPagePath:(id)arg2; - (void)directSwitchInMainTabWebView:(id)arg1 withPagePath:(id)arg2; - (void)switchInMainTabWebView:(id)arg1 pagePath:(id)arg2 currentWebView:(id)arg3; - (void)popAllAndCreateTabWebViewWithURL:(id)arg1 currentWebView:(id)arg2; - (void)switchTabWithURL:(id)arg1 pagePath:(id)arg2 currentWebView:(id)arg3; - (void)innerHandleJSEvent:(id)arg1; - (void)handleJSEvent:(id)arg1; - (void)dealloc; @end
#pragma once #include <iostream> #include <BF/IO/FileFormats/BFFFormat.h> #include <BF/Graphics/Fonts/Font.h> namespace Editor { namespace IO { class BFFWriter { private: BF::IO::FileFormats::BFFFormat bffFormat; public: BFFWriter(); ~BFFWriter(); void WriteToFile(const std::string& filename, const BF::Graphics::Fonts::Font& font); }; } }