text
stringlengths
4
6.14k
// // Cars+CoreDataClass.h // TransportList // // Created by Renat Gafarov on 29/03/2017. // Copyright © 2017 Сергей. All rights reserved. // #import <Foundation/Foundation.h> #import "Transport+CoreDataClass.h" NS_ASSUME_NONNULL_BEGIN @interface Cars : Transport @end NS_ASSUME_NONNULL_END #import "Cars+CoreDataProperties.h"
// // BaseNavigationController.h // Beme // // Created by Eric Lewis on 11/22/15. // Copyright © 2015 Eric Lewis. All rights reserved. // #import <UIKit/UIKit.h> #import "CommonViewHeaders.h" @interface BaseNavigationController : UINavigationController @end
/* * Copyright (C) 2008 Philippe Gerum <rpm@xenomai.org>. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * * This file satisfies the references within the emulator code * mimicking a VxWorks-like API built upon the copperplate library. * * VxWorks is a registered trademark of Wind River Systems, Inc. */ #ifndef _XENOMAI_VXWORKS_MSGQLIB_H #define _XENOMAI_VXWORKS_MSGQLIB_H #include <vxworks/types.h> typedef uintptr_t MSG_Q_ID; #define MSG_PRI_NORMAL 0 #define MSG_PRI_URGENT 1 #define MSG_Q_FIFO 0x0 #define MSG_Q_PRIORITY 0x1 #ifdef __cplusplus extern "C" { #endif MSG_Q_ID msgQCreate(int maxMsgs, int maxMsgLength, int options); STATUS msgQDelete(MSG_Q_ID msgQId); int msgQNumMsgs(MSG_Q_ID msgQId); int msgQReceive(MSG_Q_ID msgQId, char *buf, UINT bytes, int timeout); STATUS msgQSend(MSG_Q_ID msgQId, const char *buf, UINT bytes, int timeout, int prio); #ifdef __cplusplus } #endif #endif /* !_XENOMAI_VXWORKS_MSGQLIB_H */
/********************************* ** Tsunagari Tile Engine ** ** windows-condition-variable.h ** ** Copyright 2019 Paul Merrill ** *********************************/ // ********** // 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 SRC_OS_WINDOWS_CONDITION_VARIBLE_H_ #define SRC_OS_WINDOWS_CONDITION_VARIBLE_H_ #include "os/c.h" #include "os/mutex.h" #include "util/assert.h" #include "util/noexcept.h" extern "C" { typedef struct { PVOID Ptr; } CONDITION_VARIABLE, *PCONDITION_VARIABLE; #define CONDITION_VARIABLE_INIT \ { 0 } WINBASEAPI VOID WINAPI WakeConditionVariable(PCONDITION_VARIABLE ConditionVariable) noexcept; WINBASEAPI VOID WINAPI WakeAllConditionVariable(PCONDITION_VARIABLE ConditionVariable) noexcept; WINBASEAPI BOOL WINAPI SleepConditionVariableSRW(PCONDITION_VARIABLE ConditionVariable, PSRWLOCK SRWLock, DWORD dwMilliseconds, ULONG Flags) noexcept; #define INFINITE 0xFFFFFFFF // Infinite timeout. } class ConditionVariable { public: inline ConditionVariable() noexcept = default; ConditionVariable(const ConditionVariable&) = delete; ConditionVariable& operator=(const ConditionVariable&) = delete; inline void notifyOne() noexcept { WakeConditionVariable(&cv); } inline void notifyAll() noexcept { WakeAllConditionVariable(&cv); } inline void wait(LockGuard& lock) noexcept { BOOL ok = SleepConditionVariableSRW(&cv, &lock.m.m, INFINITE, 0); (void)ok; assert_(ok); // GetLastError(); } CONDITION_VARIABLE cv = CONDITION_VARIABLE_INIT; }; #endif // SRC_OS_WINDOWS_CONDITION_VARIBLE_H_
//****************************************************************************** // Project: Weather-based simulation framework (WBSF) // Programmer: Rémi Saint-Amant // // It under the terms of the GNU General Public License as published by // the Free Software Foundation // It is provided "as is" without express or implied warranty. // //****************************************************************************** #pragma once #include "ModelPages.h" namespace WBSF { class CModel; ///////////////////////////////////////////////////////////////////////////// // CModelDlg class CModelDlg : public CMFCPropertySheet { public: enum TPages{ GENERAL, TGINPUT, SSI, INPUT, OUTPUT, CREDIT_DOCUMENT, NB_PAGES }; CModelDlg(CWnd* pParentWnd = NULL, UINT iSelectPage = 0); virtual ~CModelDlg(); virtual BOOL OnInitDialog(); CModel m_model; protected: CModelGeneralPage m_generalPage; CModelWGInputPage m_WGInputPage; CModelSSIPage m_SSIPage; CModelInputPage m_inputPage; CModelOutputPage m_outputPage; CModelCreditPage m_creditPage; HICON m_hIcon; DECLARE_MESSAGE_MAP() }; ///////////////////////////////////////////////////////////////////////////// }
// // ESDOMCore.h // ESXML // // Created by Tracy E(tracy.cpp@gmail.com) on 12-9-8. // Copyright (c) 2012 EsoftMobile.com. All rights reserved. // #if ! __has_feature(objc_arc) #warning ESXML must be compiled with ARC. Use -fobjc-arc flag (or convert project to ARC). #endif #import "ESXMLNode.h" #import "ESXMLElement.h" #import "ESXMLDocument.h" #import "ESXMLText.h" #import "ESXMLHttpRequest.h"
#pragma once #include <QString> /** * Enumeration of the possible modes in which frame-grabbing is performed. */ enum GrabbingMode { /** Frame grabbing is switched off */ GRABBINGMODE_OFF, /** Frame grabbing during video */ GRABBINGMODE_VIDEO, GRABBINGMODE_PAUSE, GRABBINGMODE_PHOTO, GRABBINGMODE_AUDIO, GRABBINGMODE_MENU, GRABBINGMODE_SCREENSAVER, GRABBINGMODE_INVALID }; inline QString grabbingMode2String(GrabbingMode mode) { switch(mode) { case GRABBINGMODE_OFF: return "OFF"; case GRABBINGMODE_VIDEO: return "VIDEO"; case GRABBINGMODE_PAUSE: return "PAUSE"; case GRABBINGMODE_PHOTO: return "PHOTO"; case GRABBINGMODE_AUDIO: return "AUDIO"; case GRABBINGMODE_MENU: return "MENU"; case GRABBINGMODE_SCREENSAVER: return "SCREENSAVER"; default: return "INVALID"; } }
// // ViewController.h // fastlane_xcode8 // // Created by everettjf on 9/18/16. // Copyright © 2016 everettjf. All rights reserved. // #import <UIKit/UIKit.h> @interface ViewController : UIViewController @end
// // MessageViewController.h // HanbitBibleMemory // // Created by Jaehong Chon on 2/23/14. // Copyright (c) 2014 Hanbit Church. All rights reserved. // #import <UIKit/UIKit.h> @interface MessageViewController : UIViewController @end
#pragma once namespace PhysX { public enum class ControllerBehaviorFlag { CctCanRideOnObject = PxControllerBehaviorFlag::eCCT_CAN_RIDE_ON_OBJECT, CctSlide = PxControllerBehaviorFlag::eCCT_SLIDE, CctUserDefinedRide = PxControllerBehaviorFlag::eCCT_USER_DEFINED_RIDE }; };
// // Chronos.h // Chronos // // Copyright (c) 2015 Comyar Zaheri. All rights reserved. // // 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 mark - Imports @import Foundation; #pragma mark - Framework // Project version number for Chronos. FOUNDATION_EXPORT double ChronosVersionNumber; // Project version string for Chronos. FOUNDATION_EXPORT const unsigned char ChronosVersionString[]; // Protocols #import <Chronos/CHRTimer.h> #import <Chronos/CHRRepeatingTimer.h> // Classes #import <Chronos/CHRDispatchTimer.h> #import <Chronos/CHRVariableTimer.h>
//https://www.acmicpc.net/problem/1008 #include <stdio.h> #include <inttypes.h> int main(void) { int8_t a, b; scanf("%"SCNd8"%"SCNd8, &a, &b); printf("%.9llf", (long double)a/(long double)b); return 0; }
/* Copyright (c) 2015 Patrick Dumais http://www.dumaisnet.ca 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 "Hash.h" namespace Dumais { namespace Utils { class SHA1: public Hash { public: SHA1(const char* input, unsigned int inputSize); }; } }
/** * __ ____ * / /__ _ __ / __/ __ * / //_/(_)/ /_ / / ___ ____ ___ __ __ / /_ * / ,< / // __/_\ \ / _ \ / __// _ \/ // // __/ * /_/|_|/_/ \__//___// .__//_/ \___/\_,_/ \__/ * /_/ github.com/KitSprout * * @file nrf5x_conf.h * @author KitSprout * @date 21-Apr-2018 * @brief * */ /* Define to prevent recursive inclusion ---------------------------------------------------*/ #ifndef __NRF5x_CONF_H #define __NRF5x_CONF_H #ifdef __cplusplus extern "C" { #endif /* Includes --------------------------------------------------------------------------------*/ //#include "nrf_adc.h" // ADC #include "nrf_clock.h" // CLOCK //#include "nrf_comp.h" // COMP //#include "nrf_delay.h" // DELAY //#include "nrf_ecb.h" // ECB //#include "nrf_egu.h" // EGU //#include "nrf_error.h" // ERROR #include "nrf_gpio.h" // GPIO //#include "nrf_gpiote.h" // GPIOTE //#include "nrf_i2s.h" // I2S //#include "nrf_lpcomp.h" // LPCOMP //#include "nrf_nvic.h" // NVIC //#include "nrf_nvmc.h" // NVMC //#include "nrf_pdm" // PDM //#include "nrf_power" // POWER //#include "nrf_ppi.h" // PPI //#include "nrf_pwm.h" // PWM //#include "nrf_qdec.h" // QDEC //#include "nrf_qspi.h" // QSPI //#include "nrf_rng.h" // RNG //#include "nrf_rtc.h" // RTC //#include "nrf_saadc.h" // SAADC //#include "nrf_soc.h" // SOC //#include "nrf_spi.h" // SPI //#include "nrf_spim.h" // SPIM //#include "nrf_spis.h" // SPIS //#include "nrf_systick.h" // SYSTICK //#include "nrf_temp.h" // TEMP //#include "nrf_timer.h" // TIMER //#include "nrf_twi.h" // TWI //#include "nrf_twim.h" // TWIM //#include "nrf_twis.h" // TWIS //#include "nrf_uart.h" // UART //#include "nrf_uarte.h" // UARTE //#include "nrf_usbd.h" // USBD //#include "nrf_wdt.h" // WDT /* Define ----------------------------------------------------------------------------------*/ /* Macro -----------------------------------------------------------------------------------*/ /* Typedef ---------------------------------------------------------------------------------*/ /* Extern ----------------------------------------------------------------------------------*/ /* Functions -------------------------------------------------------------------------------*/ #ifdef __cplusplus } #endif #endif /*************************************** END OF FILE ****************************************/
#ifndef SLOWENEMY_H #define SLOWENEMY_H #include "thing.h" /** Class that handles every instance of * the slow enemy. Inherits from Thing. */ class SlowEnemy : public Thing { public: /** Default constructor. */ SlowEnemy(); /** Move the slow enemy. */ void move(int speedMult); /** Animates the slow enemy's sprite. */ void animate(int); /** Is the slow enemy dead? */ bool isDead(); /** Decreases the shots to kill the slow enemy by one. */ void decreaseShotsToKill(); /** Increases the score when the enemy is hit. */ int scoreHit(); /** Increases the score when the enemy is killed. */ int scoreKilled(); /** Sets X Velocity. */ void setXV(double); /** Sets Y Velocity. */ void setYV(double); }; #endif
/** \file * \brief Windows WMF Driver * Aldus Placeable Metafile * * See Copyright Notice in cd.h */ #include <stdlib.h> #include <stdio.h> #include "cdwin.h" #include "cdwmf.h" static void cdkillcanvas(cdCtxCanvas *ctxcanvas) { HMETAFILE hmf; cdwKillCanvas(ctxcanvas); hmf = CloseMetaFile(ctxcanvas->hDC); wmfMakePlaceableMetafile(hmf, ctxcanvas->filename, ctxcanvas->canvas->w, ctxcanvas->canvas->h); DeleteMetaFile(hmf); free(ctxcanvas->filename); memset(ctxcanvas, 0, sizeof(cdCtxCanvas)); free(ctxcanvas); } static void cdcreatecanvas(cdCanvas* canvas, void* data) { cdCtxCanvas* ctxcanvas; char* strdata = (char*)data; int w = 0, h = 0; float res; HDC ScreenDC; FILE* fh; char filename[10240] = ""; /* Inicializa parametros */ if (strdata == NULL) return; ScreenDC = GetDC(NULL); res = (float)(((double)GetDeviceCaps(ScreenDC, LOGPIXELSX)) / 25.4); ReleaseDC(NULL, ScreenDC); strdata += cdGetFileName(strdata, filename); if (filename[0] == 0) return; sscanf(strdata,"%dx%d %g", &w, &h, &res); if (w == 0 || h == 0) return; /* Verifica se o arquivo pode ser aberto para escrita */ fh = fopen(filename, "w"); if (fh == 0) return; fclose(fh); /* Inicializa driver WIN32 */ ctxcanvas = cdwCreateCanvas(canvas, NULL, CreateMetaFile(NULL), CDW_WMF); canvas->w = w; canvas->h = h; canvas->xres = res; canvas->yres = res; canvas->w_mm = ((double)w) / res; canvas->h_mm = ((double)h) / res; canvas->bpp = 24; ctxcanvas->clip_pnt[2].x = ctxcanvas->clip_pnt[1].x = canvas->w - 1; ctxcanvas->clip_pnt[3].y = ctxcanvas->clip_pnt[2].y = canvas->h - 1; /* Inicializacao de variaveis particulares para o WMF */ ctxcanvas->filename = cdStrDup(filename); } static void cdinittable(cdCanvas* canvas) { cdwInitTable(canvas); canvas->cxKillCanvas = cdkillcanvas; /* overwrite the base Win32 driver functions */ canvas->cxGetTextSize = cdgettextsizeEX; } static cdContext cdWMFContext = { CD_CAP_ALL & ~(CD_CAP_CLEAR | CD_CAP_YAXIS | CD_CAP_TEXTSIZE | CD_CAP_CLIPAREA | CD_CAP_CLIPPOLY | CD_CAP_PATTERN | CD_CAP_IMAGERGBA | CD_CAP_GETIMAGERGB | CD_CAP_IMAGESRV | CD_CAP_LINECAP | CD_CAP_LINEJOIN | CD_CAP_FPRIMTIVES ), CD_CTX_FILE|CD_CTX_PLUS, cdcreatecanvas, cdinittable, cdplayWMF, cdregistercallbackWMF }; cdContext* cdContextWMF(void) { return &cdWMFContext; }
/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is the Python Computer Graphics Kit. * * The Initial Developer of the Original Code is Matthias Baas. * Portions created by the Initial Developer are Copyright (C) 2004 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ #ifndef COMMON_EXCEPTIONS_H #define COMMON_EXCEPTIONS_H #include <exception> #include <string> namespace support3d { //////////////////////////////////////////////////////////////// /** Exception: RuntimeError. */ class ERuntimeError : public std::exception { public: std::string msg; public: ERuntimeError(std::string amsg) : msg(amsg) {} ~ERuntimeError() throw() {} /// Return exception message. const char* what() const throw() { return msg.c_str(); } }; //////////////////////////////////////////////////////////////// /** Exception: IOError. */ class EIOError : public std::exception { public: std::string msg; public: EIOError(std::string amsg) : msg(amsg) {} ~EIOError() throw() {} /// Return exception message. const char* what() const throw() { return msg.c_str(); } }; //////////////////////////////////////////////////////////////// /** Exception: Out of memory. */ class EMemoryError : public std::exception { public: std::string msg; public: EMemoryError() {} EMemoryError(std::string amsg) : msg(amsg) {} ~EMemoryError() throw() {} /// Return exception message. const char* what() const throw() { if (msg=="") return "Out of memory."; else return msg.c_str(); } }; //////////////////////////////////////////////////////////////// /** Exception: Index out of range. */ class EIndexError : public std::exception { public: std::string msg; public: EIndexError() {} EIndexError(std::string amsg) : msg(amsg) {} ~EIndexError() throw() {} /// Return exception message. const char* what() const throw() { if (msg=="") return "Index out of range."; else return msg.c_str(); } }; //////////////////////////////////////////////////////////////// /** Exception: Invalid value. */ class EValueError : public std::exception { public: std::string msg; public: EValueError(std::string amsg) : msg(amsg) {} ~EValueError() throw() {} /// Return exception message. const char* what() const throw() { return msg.c_str(); } }; //////////////////////////////////////////////////////////////// /** Exception: Divide by zero. */ class EZeroDivisionError : public std::exception { public: std::string msg; public: EZeroDivisionError(std::string amsg="") : msg(amsg) { if (msg=="") { msg = "Division by zero"; } } ~EZeroDivisionError() throw() {} /// Return exception message. const char* what() const throw() { return msg.c_str(); } }; //////////////////////////////////////////////////////////////// /** Exception: Key error. */ class EKeyError : public std::exception { public: std::string msg; public: EKeyError(std::string amsg) : msg(amsg) {} ~EKeyError() throw() {} /// Return exception message. const char* what() const throw() { return msg.c_str(); } }; //////////////////////////////////////////////////////////////// /** Exception: Not implemented */ class ENotImplementedError : public std::exception { public: std::string msg; public: ENotImplementedError(std::string amsg) : msg(amsg) {} ~ENotImplementedError() throw() {} /// Return exception message. const char* what() const throw() { return msg.c_str(); } }; } // end of namespace #endif
// // UIImageView+download.h // InstaPix // // Created by Ahmed Eid Air on 5/22/14. // Copyright (c) 2014 Ahmed_Eid_Inc. All rights reserved. // #import <UIKit/UIKit.h> @interface UIImageView (download) -(void) downloadImageFromUrl:(NSString*)urlString; @end
// Mass3D.h // created by Kuangdai on 2-Jun-2016 // 3D mass #pragma once #include "Mass.h" class Mass3D : public Mass { public: Mass3D(const RColX &invMass); // compute accel in-place void computeAccel(CMatX3 &stiff) const; void computeAccel(CColX &stiff) const; void checkCompatibility(int nr) const; // verbose std::string verbose() const {return "Mass3D";}; private: RColX mInvMass; };
// // Created by Dariusz Rybicki on 19/05/15. // Copyright (c) 2015 Darrarski. All rights reserved. // #import <UIKit/UIKit.h> @interface ViewController : UIViewController @end
//Organism.h by Kostya Kozachuck as neurocod - 2016.05.22 14:16:41 #pragma once #include "Genome.h" class Organism { public: Organism(const Organism*father, const Organism* mother, const QDateTime & birth); virtual ~Organism() {} const QDateTime _birth; QDateTime _death; Genome _genome; const Organism* const _father = 0; const Organism* const _mother = 0; };
// // EReaderView.h // E_Reader // // Created by 阿虎 on 2017/3/20. // Copyright © 2017年 tigerWF. All rights reserved. // #import <UIKit/UIKit.h> #import "EMagnifiterView.h" #import "ECursorView.h" @class EReaderView; @protocol EReaderViewDelegate <NSObject> - (void)eReaderView:(EReaderView *)eReaderView hideSettingToolBar:(UIView *)settingBar; - (void)eReaderView:(EReaderView *)eReaderView shutOffGesture:(BOOL)yesOrNo; - (void)eReaderView:(EReaderView *)eReaderView ciBa:(NSString *)ciBasString; @end /** 文字渲染等 */ @interface EReaderView : UIView @property(assign, nonatomic) NSInteger font; @property(copy, nonatomic) NSString *text; @property (strong, nonatomic) ECursorView *leftCursor; @property (strong, nonatomic) ECursorView *rightCursor; @property (strong, nonatomic) EMagnifiterView *magnifierView; @property (weak, nonatomic) id<EReaderViewDelegate>delegate; @property (copy , nonatomic) NSString *keyWord; - (void)render; @end
// // Generated by class-dump 3.5 (64 bit). // // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. // #import <IDEInterfaceBuilderKit/IBDocumentArchivingSchemaEnumerationComponent.h> @interface IBDocumentArchivingSchemaEnumerationComponent_NSBrowserColumnResizingType : IBDocumentArchivingSchemaEnumerationComponent { } + (id)sharedInstance; - (id)schemaIdentifier; - (id)typeName; @end
#include "mySocket.h" #include "rio.h" #include <unistd.h> #include <stdlib.h> #include <stdio.h> #define MAXLINE 1024 int main(int argc, char **argv) { int clientfd, port; char *host, buf[MAXLINE]; rio_t rio; if(argc != 3) { fprintf(stderr, "usage: ./%s <host> <port>\n", argv[0]); exit(0); } host = argv[1]; port = atoi(argv[2]); clientfd = open_clientfd(host, port); if(clientfd == -1) { fprintf(stderr, "can't connect to the IP address: %s\n", argv[1]); return 1; } rio_readinitb(&rio, clientfd); while(fgets(buf, MAXLINE, stdin) != NULL) { rio_writen(clientfd, buf, strlen(buf)); rio_readlineb(&rio, buf, MAXLINE); fputs(buf, stdout); } close(clientfd); exit(0); }
/****************************************************************************** Developed and Copyright (c) by Erik Unger Contact: erik@erikunger.com ******************************************************************************/ #ifndef BaseLib_DataBases_SQLite_SQLiteTable_h #define BaseLib_DataBases_SQLite_SQLiteTable_h #include "BaseLib/DataBases/AbstractTable.h" struct sqlite3_stmt; namespace BaseLib { namespace DataBases { namespace SQLite { using BaseLib::DataBases::AbstractTable; class SQLiteDataBase; class SQLiteCompiledQuery; class BL_EXPORT SQLiteTable : public AbstractTable { friend SQLiteDataBase; friend SQLiteCompiledQuery; public: BL_DECLARE_REFLECTION_CLASS(BaseLib::DataBases::SQLite::SQLiteTable, AbstractTable); virtual ~SQLiteTable(); virtual bool isPersistent() const; virtual bool moveToNextRow(); virtual bool moveToPreviousRow(); virtual int getCurrentRow() const; virtual void setCurrentRow(int newCurrentRow); virtual int getRowCount() const; virtual int getColumnCount() const; virtual String getColumnName(int columnIndex) const; virtual String getColumnBaseType(int columnIndex) const; virtual String getColumnExactType(int columnIndex) const; virtual int getSizeInBytes(int columnIndex) const; virtual const void* getBinary(int columnIndex) const; virtual String getString(int columnIndex) const; virtual bool getBool(int columnIndex) const; virtual int32 getInt(int columnIndex) const; virtual int64 getInt64(int columnIndex) const; virtual float getFloat(int columnIndex) const; virtual double getDouble(int columnIndex) const; private: sqlite3_stmt* statement; int currentRow; bool firstStepDone; SQLiteCompiledQuery* compiledQuery; SQLiteTable(sqlite3_stmt* forStatement, SQLiteCompiledQuery* forCompiledQuery); static String sqliteTypeToString(int sqliteType); }; } // namespace SQLite } // namespace DataBases } // namespace BaseLib #endif // #ifndef BaseLib_DataBases_SQLite_SQLiteTable_h
#ifndef INTERPRETER_H #define INTERPRETER_H #include "eval.h" #include <QStringListIterator> class Interpreter { public: Interpreter(); ~Interpreter(); Block * read(QString codeIn); void reset(); private: Action * getAction(const QString & token, QStringListIterator & it, Eval * parentBlock); Arithmetic * getArithmetic(const QString token, QStringListIterator & it, Eval * parentBlock); QMap<QString, Block*> procedures; Block grandpa; }; #endif
// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved // Plugin written by Philipp Buerki. Copyright 2017. All Rights reserved.. #pragma once #include "CoreMinimal.h" #include "Interfaces/OnlineNotificationTransportInterface.h" #include "OnlineSubsystemPackage.h" struct FOnlineNotification; //forward declare typedef TSharedPtr<class IOnlineNotificationTransport, ESPMode::ThreadSafe> IOnlineNotificationTransportPtr; class IOnlineNotificationTransportMessage; struct FOnlineNotification; /** This class is a static manager used to track notification transports and map the delivered notifications to subscribed notification handlers */ class ONLINESUBSYSTEMB3ATZ_API FOnlineNotificationTransportManager { protected: /** Map from a transport type to the transport object */ TMap< FNotificationTransportId, IOnlineNotificationTransportPtr > TransportMap; public: /** Lifecycle is managed by OnlineSubSystem, all access should be through there */ FOnlineNotificationTransportManager() { } /** Send a notification using a specific transport */ bool SendNotification(FNotificationTransportId TransportType, const FOnlineNotification& Notification); /** Receive a message from a specific transport, convert to notification, and pass on for delivery */ bool ReceiveTransportMessage(FNotificationTransportId TransportType, const IOnlineNotificationTransportMessage& TransportMessage); // NOTIFICATION TRANSPORTS /** Get a notification transport of a specific type */ IOnlineNotificationTransportPtr GetNotificationTransport(FNotificationTransportId TransportType); /** Add a notification transport */ void AddNotificationTransport(IOnlineNotificationTransportPtr Transport); /** Remove a notification transport */ void RemoveNotificationTransport(FNotificationTransportId TransportType); /** Resets all transports */ void ResetNotificationTransports(); }; typedef TSharedPtr<FOnlineNotificationTransportManager, ESPMode::ThreadSafe> FOnlineNotificationTransportManagerPtr;
#ifndef CLASS_H #define CLASS_H #include <string> #include <unordered_map> #include <vector> #include "feSkill.h" #include "feStats.h" class feClass { private: std::string name; feStats base; feStats cap; feStats growth; std::vector<std::string> weaponTypes; std::vector<std::string> promotions; // possible classes to reclass to from here std::unordered_map<int, feSkill> classSkills; // map of level to learnable skill void initializeNameStats(std::string baseClassData); public: static const feClass NONE; feClass(); feClass(std::string baseClassData); std::string getClassName() { return name; } std::vector<std::string> getWeaponTypes() const; std::vector<std::string> getPromotions() const; std::unordered_map<int, feSkill> getSkills() const; feStats getBaseStats() { return base; } feStats getCapStats() { return cap; } feStats getGrowthStats() { return growth; } }; #endif
#include "map.h" map_t generate_map(struct map_info *info) { // TODO map terrain types, for now just flat terrain map_t map = malloc(info->length * sizeof(map_height_t)); int cur_height = info->height / 2; srand(info->seed); for (int i=0; i < info->length; i++) { if (rand() % 2 == 1) map[i] = cur_height - (rand() % 2); else map[i] = cur_height + (rand() % 2); cur_height = map[i]; } return map; } map_t copy_map(map_t map, struct map_info *info) { size_t map_size = info->length * sizeof(map_height_t); map_t new_map = malloc(map_size); memcpy(new_map, map, map_size); return new_map; } bool is_inside_map(struct map_position pos, struct map_info *info) { return pos.x >= 0 && pos.x < info->length; }
#pragma once #include "Engine\Component\BaseComponent.h" #include "Game\Player\PlayerTriggerCallback.h" #include "..\Engine\Engine\Physics\Events\OnCollisionEvent.h" namespace SB { struct OnTriggerEnterEvent; } class BasePickup; struct RoundEndMessage; class PickupComponent : public SB::BaseComponent, public PlayerTriggerCallback, public SB::EventSubscriber<SB::OnTriggerEnterEvent>, public SB::EventSubscriber<SB::OnCollisionEvent>, public SB::PMSubscriber<RoundEndMessage> { public: PickupComponent(); ~PickupComponent(); void PreInitialize() override; virtual void Initialize() override; virtual void PostInitialize() override; void SetPickup(std::unique_ptr<BasePickup> & aPickup); void EndUpdate(const SB::Time& aDeltaTime) override; virtual void Update(const SB::Time & aDeltaTime) override; virtual void RecieveEvent(const SB::OnTriggerEnterEvent & aEvent) override; virtual void RecieveEvent(const SB::OnCollisionEvent & aEvent) override; virtual SB::ReceiveResult Receive(const RoundEndMessage & aMessage) override; virtual void OnPlayerTrigger(const SB::GameObject & aPlayerObject) override; virtual void OnRemoved() override; private: void SpawnFollowTriggerObject(); float myStayAliveTime; bool myEndOfRound; bool myAddedTriggerObject; std::unique_ptr<BasePickup> myPickupEffect; const SB::GameObject * myTargetPlayer; SB::GameObject * myStreakObject; SB::ObjectPtr myPlayerTriggerObject; };
#ifndef tcpip_h #define tcpip_h /* Server socket initialization */ int tcp_server_sock(int port, int qlen); int udp_server_sock(int port, int qlen); int tcp_connect(char *host, int port, int dowait, bool doThrow=false); int udp_connect(char *host, int port, int dowait); /* Selection of blocking versus non-blocking I/O */ int tcp_set_blocking(int sock, int doblock); #endif
/////////////////////////////////////////////////////////////////////////////// /// @file AdsCan_Hs_Transceiver.c /// @brief /// /// /// /// @author William Coady /// @date January 9, 2017 /// @bug No known bugs. /////////////////////////////////////////////////////////////////////////////// #include "AdsCan_Hs_Transceiver.h" void AdsCan_Hs_Transceiver_Init(Uint8 can) { #if defined(HW_LC_RS) || defined(HW_FT_RS) AdsCan_Hs_Transceiver2_3_PinMode_Init(); #elif defined(HW_LC_BP) || defined(HW_FT_BP) #warning "TODO: BYPASS CAN TRANSCEIVER LIB" #endif } void AdsCan_Hs_Transceiver_SetSleep(Uint8 can) { #if defined(HW_LC_RS) || defined(HW_FT_RS) AdsCan_Hs_Transceiver2_3_PinMode_SetState(ON); #elif defined(HW_LC_BP) || defined(HW_FT_BP) #warning "TODO: BYPASS CAN TRANSCEIVER LIB" #endif } void AdsCan_Hs_Transceiver_SetNormal(Uint8 can) { #if defined(HW_LC_RS) || defined(HW_FT_RS) AdsCan_Hs_Transceiver2_3_PinMode_SetState(OFF); #elif defined(HW_LC_BP) || defined(HW_FT_BP) #warning "TODO: BYPASS CAN TRANSCEIVER LIB" #endif }
/* * Copyright (c) 2018 Pedro Falcato * This file is part of Onyx, and is released under the terms of the MIT License * check LICENSE at the root directory for more information */ #ifndef _WINDOW_H #define _WINDOW_H #include <display.h> #include <stddef.h> #include <memory> class Window { private: unsigned int x; unsigned int y; unsigned int width; unsigned int height; bool dirty; std::weak_ptr<Display> display; std::shared_ptr<Buffer> window_buffer; public: size_t window_id; Window(size_t window_id, unsigned int width, unsigned int height, unsigned int x, unsigned int y, std::weak_ptr<Display> display); ~Window(); inline bool is_dirty() { return dirty; } std::shared_ptr<Buffer> get_buffer() { return window_buffer; } void draw(); inline void set_dirty() { dirty = true; draw(); } }; #endif
#include "CSelectable.h" #include "Vector3.h" class CUnit : CSelectable { public: _DWORD field_54; _DWORD field_58; _DWORD field_5C; _DWORD field_60; _DWORD field_64; _DWORD field_68; _DWORD field_6C; _DWORD field_70; _DWORD field_74; _DWORD field_78; _DWORD field_7C; _DWORD field_80; _DWORD field_84; _DWORD field_88; _DWORD field_8C; _DWORD field_90; _DWORD field_94; _DWORD field_98; _DWORD field_9C; int field_A0; int field_A4; _DWORD field_A8; _DWORD field_AC; _DWORD field_B0; _DWORD field_B4; _DWORD field_B8; _DWORD field_BC; int field_C0; int field_C4; _DWORD field_C8; _DWORD field_CC; _DWORD field_D0; _DWORD field_D4; _DWORD field_D8; _DWORD field_DC; float defense; _DWORD field_E4; _DWORD field_E8; _DWORD field_EC; _DWORD field_F0; _DWORD field_F4; _DWORD field_F8; _DWORD field_FC; _DWORD field_100; int field_104; int field_108; _DWORD field_10C; _DWORD field_110; _DWORD field_114; _DWORD field_118; _DWORD field_11C; int field_120; int field_124; _DWORD field_128; _DWORD field_12C; _DWORD field_130; _DWORD field_134; _DWORD field_138; _DWORD field_13C; _DWORD field_140; _DWORD field_144; _DWORD field_148; _DWORD field_14C; _DWORD field_150; _DWORD field_154; _DWORD field_158; _DWORD field_15C; _DWORD field_160; _DWORD field_164; _DWORD field_168; int field_16C; int field_170; _DWORD field_174; _DWORD field_178; _DWORD field_17C; _DWORD field_180; _DWORD field_184; _DWORD field_188; _DWORD field_18C; _DWORD field_190; _DWORD field_194; _DWORD field_198; _DWORD field_19C; _DWORD field_1A0; _DWORD field_1A4; _DWORD field_1A8; _DWORD field_1AC; _DWORD field_1B0; _DWORD field_1B4; _DWORD field_1B8; _DWORD field_1BC; _DWORD field_1C0; _DWORD field_1C4; _DWORD field_1C8; _DWORD field_1CC; _DWORD field_1D0; _DWORD field_1D4; _DWORD field_1D8; int field_1DC; // Used to fetch additional abilities. int field_1E0; // Used to fetch additional abilities. _DWORD field_1E4; void* attackAbility; void* moveAbility; void* heroAbility; void* buildAbility; void* inventoryAbility; _DWORD field_1FC; _DWORD field_200; _DWORD field_204; _DWORD field_208; _DWORD field_20C; _DWORD field_210; _DWORD field_214; _DWORD field_218; int field_21C; int field_220; _DWORD field_224; _DWORD field_228; _DWORD field_22C; _DWORD field_230; _DWORD field_234; _DWORD field_238; _DWORD field_23C; _DWORD field_240; _DWORD field_244; _DWORD field_248; _DWORD field_24C; _DWORD field_250; _DWORD field_254; _DWORD field_258; _DWORD field_25C; _DWORD field_260; _DWORD field_264; _DWORD field_268; _DWORD field_26C; _DWORD field_270; _DWORD field_274; _DWORD field_278; int userData; _DWORD field_280; Vector3 position; // 12 bytes, [284, 288, 28C] _DWORD field_290; _DWORD field_294; _DWORD field_298; _DWORD field_29C; _DWORD field_2A0; _DWORD field_2A4; _DWORD field_2A8; _DWORD field_2AC; _DWORD field_2B0; _DWORD field_2B4; _DWORD field_2B8; _DWORD field_2BC; _DWORD field_2C0; _DWORD field_2C4; _DWORD field_2C8; _DWORD field_2CC; _DWORD field_2D0; _DWORD field_2D4; _DWORD field_2D8; _DWORD field_2DC; _DWORD field_2E0; _DWORD field_2E4; _DWORD field_2E8; _DWORD field_2EC; _DWORD field_2F0; _DWORD field_2F4; _DWORD field_2F8; _DWORD field_2FC; _DWORD field_300; _DWORD field_304; _DWORD field_308; _DWORD field_30C; };
#ifndef CQGnuPlotCreateDialog_H #define CQGnuPlotCreateDialog_H #include <CQDialog.h> #include <CQGnuPlotEnum.h> #include <CGnuPlotPosition.h> #include <CLineDash.h> class CQEnumCombo; class CQColorChooser; class CQGnuPlotPositionEdit; class CQAngleSpinBox; class CQIntegerSpin; class CQRealSpin; class CQLineDash; class QStackedWidget; class QLineEdit; class CQGnuPlotCreateDialog : public CQDialog { Q_OBJECT public: CQGnuPlotCreateDialog(QWidget *parent=0); void createWidgets(QWidget *frame) override; CGnuPlotTypes::ObjectType objectType() const; bool is2D() const; CRGBA strokeColor() const; int strokeWidth() const; CLineDash strokeDash() const; CRGBA fillColor() const; CGnuPlotPosition arrowFrom() const; CGnuPlotPosition arrowTo () const; CGnuPlotPosition circleCenter() const; double circleRadius() const; double circleStart () const; double circleEnd () const; CGnuPlotPosition ellipseCenter() const; double ellipseAngle () const; CGnuPlotPosition labelOrigin() const; std::string labelText () const; double labelAngle () const; CGnuPlotPosition rectFrom() const; CGnuPlotPosition rectTo () const; private slots: void typeSlot(int); void dimensionSlot(); private: CQGnuPlotEnum* enum_ { 0 }; CQEnumCombo* typeCombo_ { 0 }; QGroupBox* dimensionGroup_ { 0 }; CQColorChooser* strokeColor_ { 0 }; CQIntegerSpin* strokeWidth_ { 0 }; CQLineDash* strokeDash_ { 0 }; CQColorChooser* fillColor_ { 0 }; QStackedWidget* stack_ { 0 }; CQDialogForm* arrowFrame_ { 0 }; CQDialogForm* circleFrame_ { 0 }; CQDialogForm* ellipseFrame_ { 0 }; CQDialogForm* labelFrame_ { 0 }; CQDialogForm* polyFrame_ { 0 }; CQDialogForm* rectFrame_ { 0 }; CQGnuPlotPositionEdit* arrowFrom_ { 0 }; CQGnuPlotPositionEdit* arrowTo_ { 0 }; CQGnuPlotPositionEdit* circleCenter_ { 0 }; CQRealSpin* circleRadius_ { 0 }; CQAngleSpinBox* circleStart_ { 0 }; CQAngleSpinBox* circleEnd_ { 0 }; CQGnuPlotPositionEdit* ellipseCenter_ { 0 }; CQAngleSpinBox* ellipseAngle_ { 0 }; CQGnuPlotPositionEdit* labelOrigin_ { 0 }; QLineEdit* labelText_ { 0 }; CQAngleSpinBox* labelAngle_ { 0 }; CQGnuPlotPositionEdit* rectFrom_ { 0 }; CQGnuPlotPositionEdit* rectTo_ { 0 }; }; #endif
#pragma once #include <ntifs.h> /// <summary> /// Allocate new Unicode string from Paged pool /// </summary> /// <param name="result">Resulting string</param> /// <param name="size">Buffer size in bytes to alloacate</param> /// <returns>Status code</returns> NTSTATUS BBSafeAllocateString( OUT PUNICODE_STRING result, IN USHORT size ); /// <summary> /// Allocate and copy string /// </summary> /// <param name="result">Resulting string</param> /// <param name="source">Source string</param> /// <returns>Status code</returns> NTSTATUS BBSafeInitString( OUT PUNICODE_STRING result, IN PUNICODE_STRING source ); /// <summary> /// Search for substring /// </summary> /// <param name="source">Source string</param> /// <param name="target">Target string</param> /// <param name="CaseInSensitive">Case insensitive search</param> /// <returns>Found position or -1 if not found</returns> LONG BBSafeSearchString( IN PUNICODE_STRING source, IN PUNICODE_STRING target, IN BOOLEAN CaseInSensitive ); /// <summary> /// Get file name from full path /// </summary> /// <param name="path">Path.</param> /// <param name="name">Resulting name</param> /// <returns>Status code</returns> NTSTATUS BBStripPath( IN PUNICODE_STRING path, OUT PUNICODE_STRING name ); /// <summary> /// Get directory path name from full path /// </summary> /// <param name="path">Path</param> /// <param name="name">Resulting directory path</param> /// <returns>Status code</returns> NTSTATUS BBStripFilename( IN PUNICODE_STRING path, OUT PUNICODE_STRING dir ); /// <summary> /// Check if file exists /// </summary> /// <param name="path">Fully qualifid path to a file</param> /// <returns>Status code</returns> NTSTATUS BBFileExists( IN PUNICODE_STRING path ); /// <summary> /// Search for pattern /// </summary> /// <param name="pattern">Pattern to search for</param> /// <param name="wildcard">Used wildcard</param> /// <param name="len">Pattern length</param> /// <param name="base">Base address for searching</param> /// <param name="size">Address range to search in</param> /// <param name="ppFound">Found location</param> /// <returns>Status code</returns> NTSTATUS BBSearchPattern( IN PCUCHAR pattern, IN UCHAR wildcard, IN ULONG_PTR len, IN const VOID* base, IN ULONG_PTR size, OUT PVOID* ppFound ); /// <summary> /// Setup image security cookie /// </summary> /// <param name="imageBase">Image base</param> /// <returns>Status code</returns> NTSTATUS BBCreateCookie( IN PVOID imageBase ); // // Machine code generation routines // ULONG GenPrologue32( IN PUCHAR pBuf ); ULONG GenEpilogue32( IN PUCHAR pBuf, IN INT retSize ); ULONG GenCall32( IN PUCHAR pBuf, IN PVOID pFn, IN INT argc, ... ); ULONG GenCall32V( IN PUCHAR pBuf, IN PVOID pFn, IN INT argc, IN va_list vl ); ULONG GenSync32( IN PUCHAR pBuf, IN PNTSTATUS pStatus, IN PVOID pSetEvent, IN HANDLE hEvent ); ULONG GenPrologue64( IN PUCHAR pBuf ); ULONG GenEpilogue64( IN PUCHAR pBuf, IN INT retSize ); ULONG GenCall64( IN PUCHAR pBuf, IN PVOID pFn, INT argc, ... ); ULONG GenCall64V( IN PUCHAR pBuf, IN PVOID pFn, INT argc, va_list vl ); ULONG GenSync64( IN PUCHAR pBuf, IN PNTSTATUS pStatus, IN PVOID pSetEvent, IN HANDLE hEvent ); ULONG GenPrologueT( IN BOOLEAN wow64, IN PUCHAR pBuf ); ULONG GenEpilogueT( IN BOOLEAN wow64, IN PUCHAR pBuf, IN INT retSize ); ULONG GenCallT( IN BOOLEAN wow64, IN PUCHAR pBuf, IN PVOID pFn, IN INT argc, ... ); ULONG GenCallTV( IN BOOLEAN wow64, IN PUCHAR pBuf, IN PVOID pFn, IN INT argc, IN va_list vl ); ULONG GenSyncT( IN BOOLEAN wow64, IN PUCHAR pBuf, IN PNTSTATUS pStatus, IN PVOID pSetEvent, IN HANDLE hEvent );
#pragma once #include <evr.h> #include "VideoSourcePropertyExtension.h" interface IDirect3DDeviceManager9; class CEvrCustomMixer; class CVideoSourceEvrEx : public IDisplayVideoSource, public IMFGetService, public IMFTopologyServiceLookupClient, public IMFVideoDeviceID, public IMFVideoPresenter, public IMFVideoDisplayControl, public IDisplayVideoSourcePropertyExtension { public: CVideoSourceEvrEx(IDisplayLock* pLock, IDisplayVideoSink* pVideoSink); virtual ~CVideoSourceEvrEx(); // IUnknown STDMETHOD(QueryInterface)(REFIID riid, void **ppv); STDMETHOD_(ULONG, AddRef)(); STDMETHOD_(ULONG, Release)(); // IDisplayVideoSource implementation STDMETHOD(GetGraph)(IFilterGraph** ppGraph); STDMETHOD(GetTexture)(IUnknown** ppTexture, NORMALIZEDRECT* lpNormRect); STDMETHOD(GetVideoSize)(LONG* plWidth, LONG* plHeight, float *pfAspectRatio); STDMETHOD(Attach)(IBaseFilter* pVMRFilter); STDMETHOD(Detach)(); STDMETHOD(BeginDraw)() { return S_OK; } STDMETHOD(EndDraw)() { return S_OK; } STDMETHOD(IsValid)(); STDMETHOD(ClearImage)(); STDMETHOD(BeginDeviceLoss)(); STDMETHOD(EndDeviceLoss)(IUnknown* pDevice); STDMETHOD(EnableInitiativeDisplay)(BOOL bEnable) { return S_FALSE; } // IMFGetService STDMETHOD(GetService)(REFGUID guidService, REFIID riid, LPVOID* ppvObject); // IMFTopologyServiceLookupClient STDMETHOD(InitServicePointers)(IMFTopologyServiceLookup *pLookup); STDMETHOD(ReleaseServicePointers)(); // IMFVideoDeviceID STDMETHOD(GetDeviceID)(IID* pDeviceID); // IMFVideoPresenter STDMETHOD(GetCurrentMediaType)(IMFVideoMediaType** ppMediaType); STDMETHOD(ProcessMessage)(MFVP_MESSAGE_TYPE eMessage, ULONG_PTR ulParam); // IMFClockStateSink STDMETHOD(OnClockPause)(MFTIME hnsSystemTime); STDMETHOD(OnClockRestart)(MFTIME hnsSystemTime); STDMETHOD(OnClockSetRate)(MFTIME hnsSystemTime, float flRate); STDMETHOD(OnClockStart)(MFTIME hnsSystemTime, LONGLONG llClockStartOffset); STDMETHOD(OnClockStop)(MFTIME hnssSystemTime); // IMFVideoDisplayControl methods STDMETHOD(GetNativeVideoSize)(SIZE* pszVideo, SIZE* pszARVideo); STDMETHOD(GetIdealVideoSize)(SIZE* pszMin, SIZE* pszMax);// { return E_NOTIMPL; } STDMETHOD(SetVideoPosition)(const MFVideoNormalizedRect* pnrcSource, const LPRECT prcDest); STDMETHOD(GetVideoPosition)(MFVideoNormalizedRect* pnrcSource, LPRECT prcDest); STDMETHOD(SetAspectRatioMode)(DWORD dwAspectRatioMode); STDMETHOD(GetAspectRatioMode)(DWORD* pdwAspectRatioMode); STDMETHOD(SetVideoWindow)(HWND hwndVideo); STDMETHOD(GetVideoWindow)(HWND* phwndVideo) { return E_NOTIMPL; } STDMETHOD(RepaintVideo)(); STDMETHOD(GetCurrentImage)(BITMAPINFOHEADER* pBih, BYTE** pDib, DWORD* pcbDib, LONGLONG* pTimeStamp) { return E_NOTIMPL; } STDMETHOD(SetBorderColor)(COLORREF Clr) { return E_NOTIMPL; } STDMETHOD(GetBorderColor)(COLORREF* pClr) { return E_NOTIMPL; } STDMETHOD(SetRenderingPrefs)(DWORD dwRenderFlags) { return E_NOTIMPL; } STDMETHOD(GetRenderingPrefs)(DWORD* pdwRenderFlags) { return E_NOTIMPL; } STDMETHOD(SetFullscreen)(BOOL bFullscreen) { return E_NOTIMPL; } STDMETHOD(GetFullscreen)(BOOL* pbFullscreen) { return E_NOTIMPL; } // IDisplayVideoSourcePropertyExtension methods STDMETHOD(GetSampleProperty)(SampleProperty *pProperty); private: static DWORD WINAPI EvrPresentThread(LPVOID lpParameter); HRESULT StartEvrPresentThread(); void StopEvrPresentThread(); void PresentLoop(); HRESULT ProcessOutputFromMixer(IMFSample **ppSample); void OnPresent(LONG lSleep); HRESULT OnIncomingSample(IMFSample *pSample); void Cleanup(); HRESULT DisconnectPins(); HRESULT RenegotiateMediaType(); HRESULT CreateDesiredOutputType(IMFMediaType *pType, IMFMediaType **ppDesiredType); HRESULT SetMediaType(IMFMediaType *pType); private: enum PRESENTER_STATE { PRESENTER_STATE_STARTED = 1, PRESENTER_STATE_STOPPED, PRESENTER_STATE_PAUSED, PRESENTER_STATE_SHUTDOWN, // Initial state. } m_ePresenterState; enum THREAD_STATUS { eNotStarted, eRunning, eWaitingToStop, eFinished } m_eThreadStatus; LONG m_cRef; UINT m_uWidth; UINT m_uHeight; FLOAT m_fAspectRatio; FLOAT m_fPixelAspectRatio; FLOAT m_fNativeAspectRatio; IDisplayVideoSink *m_pVideoSink; IDisplayLock *m_pLock; IDisplayObject *m_pDispObj; CComPtr<IDisplayServerStateEventSink> m_pStateEventSink; BOOL m_bValid; bool m_bEndOfStreaming; DWORD m_dwOutputStreamId; UINT m_uDeviceManagerToken; CComPtr<IFilterGraph> m_pGraph; CComPtr<IBaseFilter> m_pEVR; CComPtr<IDirect3DDeviceManager9> m_pDeviceManager; CComPtr<IMediaEventSink> m_pMediaEventSink; CComPtr<IMFTransform> m_pMixer; CComPtr<IMFClock> m_pClock; CComPtr<IMFMediaType> m_pMediaType; IMFSample *m_pSample; IDirect3DSurface9 *m_pBufferAtIndex0; CEvrCustomMixer *m_pCustomMixer; CCritSec m_csEvrPresenting; HANDLE m_hProcessInputNotify; HANDLE m_hFlushNotify; HWND m_hwndVideo; RECT m_dstrect; NORMALIZEDRECT m_nrcTexture; DWORD m_dwAspectRatioMode; };
/******************************* Copyright (c) 2016-2021 Grégoire Angerand 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 YAVE_GRAPHICS_DESCRIPTORS_DESCRIPTORSETDATA_H #define YAVE_GRAPHICS_DESCRIPTORS_DESCRIPTORSETDATA_H #include <yave/yave.h> #include <yave/graphics/vk/vk.h> namespace yave { class DescriptorSetData { public: DescriptorSetData() = default; bool is_null() const; VkDescriptorSetLayout vk_descriptor_set_layout() const; VkDescriptorSet vk_descriptor_set() const; private: friend class LifetimeManager; void recycle(); private: friend class DescriptorSetPool; DescriptorSetData(DescriptorSetPool* pool, u32 id); DescriptorSetPool* _pool = nullptr; u32 _index = 0; }; } #endif // YAVE_GRAPHICS_DESCRIPTORS_DESCRIPTORSETDATA_H
/* * Copyright (c) 2015 Jonathan Howard * License: https://github.com/v3n/altertum/blob/master/LICENSE */ #pragma once #include <climits> #include "foundation/collection_types.h" #include "foundation/memory_types.h" #include "math/math_types.h" #include "entity.h" #include "entity_manager.h" namespace altertum { namespace components { namespace transform { using namespace foundation; /* * http://bitsquid.blogspot.com/2014/10/building-data-oriented-entity-system.html */ struct TransformInstance { unsigned i; }; /** * Transform component manager for a world * - Runtime can have multiple worlds * - Each world has its own manager */ class TransformManager { private: Hash<unsigned> _map; public: /** Local matrix components. @note: size 40 bytes */ struct Pose { Vector3 scale; /** Scale. */ Quaternion rotation; /** Rotation around local origin. */ Vector3 translation; /** Translation from parent. */ }; /** Transform data buffer. */ struct TransformData { unsigned size; /** Number of used entries in arrays */ unsigned capacity; /** Number of allocated entries in arrays */ void * buffer; /** Raw buffer for data. */ Entity * entity; /** The entity owning this instance. */ Pose * pose; /** Individual components that compose local transform. */ Matrix4 * local; /** Cached local transform with respect to parent. */ Matrix4 * world; /** World transform. */ TransformInstance * parent; /** The parent instance of this instance. */ TransformInstance * first_child; /** The first child of this instance. */ TransformInstance * next_sibling; /** The next sibling of this instance. */ TransformInstance * prev_sibling; /** The previous sibling of this instance. */ }; TransformData _data; inline TransformInstance make_instance(unsigned i) const { TransformInstance inst = { i }; return inst; } public: // TransformManager(Allocator * allocator) : _allocator(allocator) { } /** Create instance from Entity lookup */ inline TransformInstance lookup(Entity e) const { return make_instance(hash::get(_map, e.id, (unsigned)0)); } /** allocate a buffer large enough to hold @a sz elements */ void allocate(Allocator &allocator, unsigned sz); /** run garbage collection for TransformManager */ void gc(const EntityManager &em); /** create new TransformInstance */ TransformInstance create(Allocator &allocator, Entity e); /** destroys a single instance @a i */ void destroy(unsigned i); /** returns whether or not the instance is valid */ inline bool is_valid(TransformInstance i) { return i.i < UINT_MAX && i.i < _data.size; } /** * @name instance methods * @{ */ /** get local scale for TransformInstance @a i */ inline Vector3 scale(TransformInstance i) { return _data.pose[i.i].scale; } /** get local rotation for TransformInstance @a i */ inline Quaternion rotation(TransformInstance i) { return _data.pose[i.i].rotation; } /** get local translation for TransformInstance @a i */ inline Vector3 translation(TransformInstance i) { return _data.pose[i.i].translation; } /** get local matrix for TransformInstance @a i */ inline Matrix4 local(TransformInstance i) { return _data.local[i.i]; } /** get world matrix for TransformInstance @a i */ inline Matrix4 world(TransformInstance i) { return _data.world[i.i]; } /** set pose of instance @a i from @a scale, @a rotation, and @a translation */ void set_pose(TransformInstance i, Vector3 scale, Quaternion rotation, Vector3 translation ); /** set matrix of instance @i from @a local */ void set_local(TransformInstance i, Matrix4 local); /** regenerate @a TransformInstance's world matrix from @parent */ void transform(const Matrix4 &parent, TransformInstance i); /** * @} */ }; // class TransformManager } // namespace transform } // namespace components } // namespace altertum
// // PostageClient.h // PostageKit // // Created by Stephan Leroux on 2013-01-08. // Copyright (c) 2013 PostageApp. All rights reserved. // #import <Foundation/Foundation.h> #import "AFHTTPClient.h" @class MessageParams, MessageReceipt, AccountInfo, ProjectInfo, RecipientInfo, MessageDeliveryStatus; typedef void (^ProjectInfoBlock)(ProjectInfo *info); typedef void (^AccountInfoBlock)(AccountInfo *info); typedef void (^MessagesBlock)(NSDictionary *messages); typedef void (^MessageTransmissionsBlock)(NSArray *messageTransmissions); typedef void (^MessageReceiptBlock)(NSUInteger messageID); typedef void (^MethodListBlock)(NSArray *methods); typedef void (^SendMessageBlock)(NSUInteger messageID); typedef void (^MetricsBlock)(NSDictionary *metrics); typedef void (^MessageStatusBlock)(NSDictionary *status); typedef void (^DeliveryStatusBlock)(NSArray *deliveryStatuses); typedef void (^RecipientsListBlock)(NSDictionary *recipients); typedef void (^PostageErrorBlock)(NSError *error, id json); @interface PostageClient : AFHTTPClient @property (nonatomic, strong) NSString *projectAPIKey; + (PostageClient *)sharedClient; # pragma mark - API methods - (void)sendMessage:(MessageParams *)params success:(SendMessageBlock)successBlock error:(PostageErrorBlock)errorBlock; - (void)messageReceiptForUID:(NSString *)uid success:(MessageReceiptBlock)success error:(PostageErrorBlock)error; - (void)methodListWithSuccess:(MethodListBlock)success error:(PostageErrorBlock)error; - (void)accountInfoWithSuccess:(AccountInfoBlock)success error:(PostageErrorBlock)error; - (void)projectInfoWithSuccess:(ProjectInfoBlock)success error:(PostageErrorBlock)error; - (void)messagesWithSuccess:(MessagesBlock)success error:(PostageErrorBlock)error; - (void)messageTransmissionsForUID:(NSString *)uid success:(MessageTransmissionsBlock)success error:(PostageErrorBlock)error; - (void)metricsWithSuccess:(MetricsBlock)success error:(PostageErrorBlock)error; - (void)statusForMessageWithUID:(NSString *)uid success:(MessageStatusBlock)success error:(PostageErrorBlock)error; - (void)deliveryStatusForMessageWithUID:(NSString *)uid success:(DeliveryStatusBlock)success error:(PostageErrorBlock)error; - (void)recipientsListForMessageWithUID:(NSString *)uid success:(RecipientsListBlock)success error:(PostageErrorBlock)error; @end
/* This file is part of TableGUI. Copyright (c) 2014 Felipe Ferreira da Silva TableGUI is licensed under MIT license. See the file "LICENSE" for license details. */ #include <stdio.h> #include <math.h> #include <GL/gl.h> #include <GLFW/glfw3.h> #include <basicutils.h> #include "GUI.h" #include "GUI_theme.h" #include "GUI_checkbox.h" void GUIWidget_KeyDown(TGUIWidget *AWidget, int AKey, int AScancode, int AMods); void GUIWidget_KeyUp(TGUIWidget *AWidget, int AKey, int AScancode, int AMods); void GUIWidget_MouseDown(TGUIWidget *AWidget, int AButton, int AMouseX, int AMouseY); void GUIWidget_MouseUp(TGUIWidget *AWidget, int AButton, int AMouseX, int AMouseY); void GUIWidget_MouseClick(TGUIWidget *AWidget, int AButton, int AMouseX, int AMouseY); void GUIWidget_MouseEnter(TGUIWidget *AWidget); void GUIWidget_MouseLeave(TGUIWidget *AWidget); void Alloc_GUIWidget(TGUIWidget *AWidget);
#pragma once #include <mixal_parse/types/expression.h> namespace mixal_parse { class Address { public: Address(); Address(const Expression& expr); Address(const WValue& wvalue); const Expression& expression() const; const WValue& w_value() const; bool empty() const; bool has_expression() const; bool has_w_value() const; bool has_literal_constant() const; private: // #TODO: C++17 std::variant<Expression, WValue> Expression expr_; WValue wvalue_; }; } // namespace mixal_parse //////////////////////////////////////////////////////////////////////////////// namespace mixal_parse { inline Address::Address() : expr_{} , wvalue_{} { } inline Address::Address(const Expression& expr) : expr_{expr} , wvalue_{} { } inline Address::Address(const WValue& wvalue) : expr_{} , wvalue_{wvalue} { } inline const Expression& Address::expression() const { return expr_; } inline const WValue& Address::w_value() const { return wvalue_; } inline bool Address::empty() const { return !has_expression() && !has_w_value(); } inline bool Address::has_expression() const { return expr_.is_valid(); } inline bool Address::has_w_value() const { return wvalue_.is_valid(); } inline bool Address::has_literal_constant() const { return has_w_value(); } } // namespace mixal_parse
// Tencent is pleased to support the open source community by making RapidJSON available. // // Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved. // // Licensed under the MIT License (the "License"); you may not use this file except // in compliance with the License. You may obtain a copy of the License at // // http://opensource.org/licenses/MIT // // Unless required by applicable law or agreed to in writing, software distributed // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR // CONDITIONS OF ANY KIND, either express or implied. See the License for the // specific language governing permissions and limitations under the License. #ifndef RAPIDJSON_IEEE754_ #define RAPIDJSON_IEEE754_ #include "rapidjson/rapidjson.h" RAPIDJSON_NAMESPACE_BEGIN namespace internal { class Double { public: Double() {} Double(double d) : d_(d) {} Double(uint64_t u) : u_(u) {} double Value() const { return d_; } uint64_t Uint64Value() const { return u_; } double NextPositiveDouble() const { RAPIDJSON_ASSERT(!Sign()); return Double(u_ + 1).Value(); } bool Sign() const { return (u_ & kSignMask) != 0; } uint64_t Significand() const { return u_ & kSignificandMask; } int Exponent() const { return static_cast<int>(((u_ & kExponentMask) >> kSignificandSize) - kExponentBias); } bool IsNan() const { return (u_ & kExponentMask) == kExponentMask && Significand() != 0; } bool IsInf() const { return (u_ & kExponentMask) == kExponentMask && Significand() == 0; } bool IsNanOrInf() const { return (u_ & kExponentMask) == kExponentMask; } bool IsNormal() const { return (u_ & kExponentMask) != 0 || Significand() == 0; } bool IsZero() const { return (u_ & (kExponentMask | kSignificandMask)) == 0; } uint64_t IntegerSignificand() const { return IsNormal() ? Significand() | kHiddenBit : Significand(); } int IntegerExponent() const { return (IsNormal() ? Exponent() : kDenormalExponent) - kSignificandSize; } uint64_t ToBias() const { return (u_ & kSignMask) ? ~u_ + 1 : u_ | kSignMask; } static unsigned EffectiveSignificandSize(int order) { if (order >= -1021) return 53; else if (order <= -1074) return 0; else return static_cast<unsigned>(order) + 1074; } private: static const int kSignificandSize = 52; static const int kExponentBias = 0x3FF; static const int kDenormalExponent = 1 - kExponentBias; static const uint64_t kSignMask = RAPIDJSON_UINT64_C2(0x80000000, 0x00000000); static const uint64_t kExponentMask = RAPIDJSON_UINT64_C2(0x7FF00000, 0x00000000); static const uint64_t kSignificandMask = RAPIDJSON_UINT64_C2(0x000FFFFF, 0xFFFFFFFF); static const uint64_t kHiddenBit = RAPIDJSON_UINT64_C2(0x00100000, 0x00000000); union { double d_; uint64_t u_; }; }; } // namespace internal RAPIDJSON_NAMESPACE_END #endif // RAPIDJSON_IEEE754_
// // Generated by class-dump 3.5 (64 bit). // // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. // #import "SBAlertItem.h" @class NSString; @interface SBInsecureDrawingAlertItem : SBAlertItem { NSString *_processName; } @property(copy, nonatomic) NSString *processName; // @synthesize processName=_processName; - (void)configure:(_Bool)arg1 requirePasscodeForActions:(_Bool)arg2; - (_Bool)ignoreIfAlreadyDisplaying; - (_Bool)dismissOnLock; - (_Bool)shouldShowInLockScreen; - (void)dealloc; @end
// // ROLogger.h // Test // // This App has been generated using IBM Mobile UI Builder // #import <Foundation/Foundation.h> typedef NS_ENUM(NSUInteger, ROLoggerLevel) { ROLoggerLevelTrace, ROLoggerLevelDebug, ROLoggerLevelLog, ROLoggerLevelInfo, ROLoggerLevelWarn, ROLoggerLevelError, ROLoggerLevelFatal, ROLoggerLevelAnalytics }; @protocol ROLogger <NSObject> - (void)name:(NSString *)name log:(NSString *)message level:(ROLoggerLevel)level; - (void)name:(NSString *)name log:(NSString *)message level:(ROLoggerLevel)level metadata:(NSDictionary *)metadata; @optional - (NSDictionary *)metadataWithObject:(id)obj; - (void)send; @end
/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:06:18 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -notwiddleinv 2 */ /* * This function contains 4 FP additions, 0 FP multiplications, * (or, 4 additions, 0 multiplications, 0 fused multiply/add), * 4 stack variables, and 8 memory accesses */ /* * Generator Id's : * $Id$ * $Id$ * $Id$ */ void fftwi_no_twiddle_2(const fftw_complex *input, fftw_complex *output, int istride, int ostride) { fftw_real tmp1; fftw_real tmp2; fftw_real tmp3; fftw_real tmp4; ASSERT_ALIGNED_DOUBLE; tmp1 = c_re(input[0]); tmp2 = c_re(input[istride]); c_re(output[ostride]) = tmp1 - tmp2; c_re(output[0]) = tmp1 + tmp2; tmp3 = c_im(input[0]); tmp4 = c_im(input[istride]); c_im(output[ostride]) = tmp3 - tmp4; c_im(output[0]) = tmp3 + tmp4; } fftw_codelet_desc fftwi_no_twiddle_2_desc = { "fftwi_no_twiddle_2", (void (*)()) fftwi_no_twiddle_2, 2, FFTW_BACKWARD, FFTW_NOTW, 56, 0, (const int *) 0, };
#ifndef _ADD_H #define _ADD_H #ifdef __cplusplus extern "C" { #endif int add(int a, int b); #ifdef __cplusplus } #endif #endif
// // ASOverlaidChessBoardViewController.h // ASTransparentImage // // Created by Adam Szabo on 14/10/2015. // Copyright © 2015 Adam Szabo. All rights reserved. // #import "ASChessBoardViewController.h" @interface ASOverlaidChessBoardViewController : ASChessBoardViewController @property (nonatomic, readonly) UIImageView *overlayImageView; @end
/* * myAssert.h * * Created on: Aug 21, 2016 * Author: daniel */ #ifndef MYASSERT_H_ #define MYASSERT_H_ extern void AssertFailure(void) ; #define ASSERT(conditionThatShouldBeTrue) if ( !(conditionThatShouldBeTrue) ) AssertFailure(); #endif /* MYASSERT_H_ */
// // RTCLiveViewController.h // UCloudMediaRecorderDemo // // Created by Sidney on 23/05/17. // Copyright © 2017年 https://ucloud.cn. All rights reserved. // #import <UIKit/UIKit.h> #import "CameraServer.h" #import "NSString+UCloudCameraCode.h" #import "FilterManager.h" @interface RTCLiveViewController : UIViewController @property (assign, nonatomic) int fps; @property (strong, nonatomic) NSString *route; @property (assign, nonatomic) UCloudVideoOrientation direction; @property (assign, nonatomic) UCloudVideoBitrate bitrate; @property (assign, nonatomic) UCloudAudioNoiseSuppress noiseSuppress; @property (strong, nonatomic) NSString *publishUrl; @property (strong, nonatomic) NSString *roomId; @property (assign, nonatomic) BOOL isPortrait; @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-Protocol.h" @protocol MPAssetKeyDelegate <NSObject> - (id)absolutePathForStillAssetAtPath:(id)arg1 andSize:(struct CGSize)arg2; - (id)absolutePathForAssetKey:(id)arg1 andSize:(struct CGSize)arg2; - (id)absolutePathForAssetKey:(id)arg1; @optional - (struct CGImage *)cgImageForAssetKey:(id)arg1 andSize:(struct CGSize)arg2; - (struct __IOSurface *)retainedIOSurfaceForAssetKey:(id)arg1 andSize:(struct CGSize)arg2 orientation:(char *)arg3; - (struct __IOSurface *)retainedIOSurfaceForAssetKey:(id)arg1 andSize:(struct CGSize)arg2; - (id)detectRegionsOfInterestForAssetKey:(id)arg1; - (id)imageDataForAssetKey:(id)arg1 andSize:(struct CGSize)arg2; - (struct CGImage *)retainedCGImageForAssetKey:(id)arg1 andSize:(struct CGSize)arg2 orientation:(char *)arg3 thumbnailIfPossible:(_Bool)arg4 now:(_Bool)arg5; - (struct CGImage *)retainedThumbnailCGImageForAssetKey:(id)arg1 andSize:(struct CGSize)arg2; - (struct CGImage *)retainedCGImageForAssetKey:(id)arg1 andSize:(struct CGSize)arg2 orientation:(char *)arg3; - (struct CGImage *)retainedCGImageForAssetKey:(id)arg1 andSize:(struct CGSize)arg2; - (id)attributesforAssetPath:(id)arg1; - (id)attributeForKey:(id)arg1 forAssetKey:(id)arg2 withOptions:(id)arg3; - (id)relativeTiledPathsForAssetWithAttributes:(id)arg1; - (id)relativePathForAssetWithAttributes:(id)arg1; - (struct CGSize)resolutionForAssetKey:(id)arg1; - (id)flightPlanFrom:(struct CGPoint)arg1 to:(struct CGPoint)arg2; - (id)mapTileForPath:(id)arg1; - (id)mapTileCenteredAt:(id)arg1 size:(struct CGSize)arg2 inset:(struct CGSize)arg3; @end
/* ******************************************************************************* * * File: dist.h * RCS: $Header: /tmp/mss/nwchem/src/perfm/dist.h,v 1.1 2006-05-19 18:59:26 edo Exp $ * Description: Distribution table implemented with an array * Author: Fabrizio Petrini * Created: * Modified: * Language: C * Package: N/A * Status: Experimental (Do Not Distribute) * ******************************************************************************* */ #ifndef __dist__ #define __dist__ #include <stdlib.h> #include <stdio.h> #include <math.h> #include <unistd.h> #include <assert.h> #include <string.h> #include <sys/time.h> #include <sys/types.h> /* the queue event: contains the event value */ typedef struct event { /* the event value */ unsigned int value; /* the event count */ unsigned int count; /* next pointer */ struct event* next; } event; /* the distribution data structure: simply an array of ints and a queue to deal with the large elements that overflow the array */ typedef struct distr { /* the distribution name */ char* name; /* the array of counters */ unsigned int* array; /* the array size */ unsigned int size; /* the maximum array size: larger elements are stored in the queue */ unsigned int max_size; /* the queue head */ event* head; /* the queue tail */ event* tail; /* the number of events in the queue */ unsigned int queue_size; } distribution; /* create the distribution: take the name and the initial size and the threshold of the array size, for which larger elements are stored in the queue */ distribution* create_distribution( const char* dname, unsigned int size, unsigned int max_size ); /* delete the distribution: take the distribution pointer */ void delete_distribution( distribution* d ); /* update the distribution: take the distribution pointer and the value */ void update_distribution( distribution* d, unsigned int val ); /* as above plus a counter */ void update_distribution_count( distribution* d, unsigned int val, unsigned int count ); /* print the given distributuion: take the distribution pointer, the file prefix, a index to differentiate distributions in the same family and a coefficient that is used to scale the values of the distribution */ void print_distribution( distribution* d, const char* file_name, unsigned int id, double f ); /* file open and close */ FILE* open_file( const char* name, const char* mode ); void close_file( FILE* fp ); FILE* create_data_file( const char* prefix, const char* graph ); /* ******************************************************************************* * * user-level C interface * ******************************************************************************* */ /* initialize the monitoring system: we access the distributions through integer handles */ void initialize_dist(); /* finalize the monitoring system, flushing all the distribution files and writing some usage statistics; take the process id */ void finalize_dist( unsigned int ); /* create a new distribution: take the file name and initial distribution size and the threshold to use a queue rather than an array; return the distribution handle, a unique index inside the distribution array which identifies the distribution */ unsigned int newdist( const char* filename, const unsigned int dist_size, const unsigned int max_dist_size ); /* return the distribution index, given the the distribution name as a string: creates a distribution with a default size, if there is no distribution available */ unsigned int getdist( const char* distname ); /* update the distribution */ void updist( const unsigned int handle, const unsigned int value ); void updistcount( const unsigned int handle, const unsigned int value, const unsigned int count ); /* print the distribution */ void printdist( const unsigned int handle, const char* file_name, unsigned int id, double f ); /* ******************************************************************************* * * user-level FORTRAN interface * ******************************************************************************* */ /* initialize the monitoring system: we access the distributions through integer handles */ void initialize_dist_(); /* finalize the monitoring system, flushing all the distribution files and writing some usage statistics */ void finalize_dist_( const unsigned int* ); /* return the distribution index, given the the distribution name as a string */ unsigned int getdist_( const char* distname, const unsigned int distname_length ); /* create a new distribution: take the file name in FORTRAN format, the distribution size and the maximum distribution size; return the distribution handle, a unique index inside the distribution array which identifies the distribution */ unsigned int newdist_( const char* filename, const unsigned int* dist_size, const unsigned int* max_dist_size, const unsigned int filename_length ); /* update the distribution */ void updist_( const unsigned int* handle, const unsigned int* value ); void updistcount_( const unsigned int* handle, const unsigned int* value, const unsigned int* count ); /* print the distribution */ void printdist_( const unsigned int* handle, const char* filename, unsigned int* fd, double* f, const unsigned int filename_length ); /* Timers */ /* start the timer */ void starttimer_( const unsigned int* handle ); /* stop the timer and stores its value in the distribution: by default, it converts it to microseconds */ void endtimer_( const unsigned int* handle ); /* as above, but in milliseconds */ void endtimermilli_( const unsigned int* handle ); /* and, just in case, in seconds */ void endtimersec_( const unsigned int* handle ); #endif /* __dist__ */ /* $Id$ */
#include<stdio.h> #define MOD 1000000007 int main(){ int t; long long int n1, n2, n3, i, j, k, count=0; scanf("%d", &t); while(t--){ scanf("%lld%lld%lld", &n1, &n2, &n3); for(i=1;i<=n1;i++){ for(j=1;j<=n2;j++){ if(j==i){ continue; } for(k=1;k<=n3;k++){ if(k==j||k==i){ continue; } count++; } } } printf("%lld\n", count%MOD); count=0; } }
#ifndef BOX_H #define BOX_H #define L 1000000000 #define S -1000000000 #include "Point.h" #include "Vector.h" class Box { public: //Point lastNormal; Box(Point* min, Point* max); Box(float x=L,float y=L,float z=L,float x2=S,float y2=S,float z2=S); ~Box() {} void resetBox(); void set(Point* min, Point* max); void set(float x,float y,float z,float x2,float y2,float z2); void correctBox(); bool inBox(Point* p) const; int intersectBox(const Point* p, const Vector* vi) const; float maxbx() const { return maxx; } float maxby() const { return maxy; } float maxbz() const { return maxz; } float minbx() const { return minx; } float minby() const { return miny; } float minbz() const { return minz; } void maxbx(float x) { maxx = x; } void maxby(float y) { maxy = y; } void maxbz(float z) { maxz = z; } void minbx(float x) { minx = x; } void minby(float y) { miny = y; } void minbz(float z) { minz = z; } private: float maxx,maxy,maxz,minx,miny,minz; }; inline Box::Box(Point* min, Point* max) { minx = min->x; miny = min->y; minz = min->z; maxx = max->x; maxy = max->y; maxz = max->z; correctBox(); } inline Box::Box(float x,float y,float z,float x2,float y2,float z2) { minx = x; miny = y; minz = z; maxx = x2; maxy = y2; maxz = z2; correctBox(); } inline void Box::resetBox() { minx = L; miny = L; minz = L; maxx = S; maxy = S; maxz = S; } inline void Box::set(Point* min, Point* max) { minx = min->x; miny = min->y; minz = min->z; maxx = max->x; maxy = max->y; maxz = max->z; } inline void Box::set(float x,float y,float z,float x2,float y2,float z2) { minx = x; miny = y; minz = z; maxx = x2; maxy = y2; maxz = z2; } inline void Box::correctBox() { minx=minx-0.0001f; miny=miny-0.0001f; minz=minz-0.0001f; maxx=maxx+0.0001f; maxy=maxy+0.0001f; maxz=maxz+0.0001f; } inline bool Box::inBox(Point* p) const { if (p->x<minx || p->x>maxx || p->y<miny || p->y>maxy || p->z<minz || p->z>maxz) return false; return true; } inline int Box::intersectBox(const Point* p, const Vector* vi) const { float tminx,tmaxx,tminy,tmaxy; int side=0; if (vi->x>=0) { tminx = (minx - p->x) *vi->x; tmaxx = (maxx - p->x) *vi->x; } else { tmaxx = (minx - p->x) *vi->x; tminx = (maxx - p->x) *vi->x; } if (vi->y>=0) { tminy = (miny - p->y) *vi->y; tmaxy = (maxy - p->y) *vi->y; } else { tmaxy = (miny - p->y) *vi->y; tminy = (maxy - p->y) *vi->y; } if ((tminx > tmaxy) || (tminy > tmaxx)) return 0; if (tminy>tminx) tminx = tminy; if (tmaxy<tmaxx) tmaxx = tmaxy; if (vi->z>=0) { tminy = (minz - p->z) *vi->z; tmaxy = (maxz - p->z) *vi->z; } else { tmaxy = (minz - p->z) *vi->z; tminy = (maxz - p->z) *vi->z; } if ((tminx > tmaxy) || (tminy > tmaxx)) return 0; if (tminy>tminx) tminx = tminy; if (tmaxy<tmaxx) tmaxx = tmaxy; if (tmaxx<0.0) return 0; if (tminx>1.0) return 0; return 1; } #endif
// // Generated by class-dump 3.5 (64 bit). // // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. // #import "CALayer.h" #import "DVTInvalidation.h" @class CABasicAnimation, DVTDelayedInvocation, DVTStackBacktrace, IDESpinnerLayer, NSImage, NSString; @interface IDEActivityProgressIndicatorLayer : CALayer <DVTInvalidation> { CABasicAnimation *_indeterminateDiagonalsAnimation; unsigned long long _progressStyle; NSImage *_indeterminateDiagonalsLayerContents; IDESpinnerLayer *_indeterminateSpinnerLayer; DVTDelayedInvocation *_progressInvocation; CALayer *_progressContainerLayer; NSImage *_containerLayerContents; NSImage *_progressLayerContents; CALayer *_progressLayer; NSImage *_shadowLayerContents; CALayer *_containerLayer; double _doubleValue; double _minValue; double _maxValue; struct { unsigned int indeterminate:1; unsigned int willGoBackwards:1; unsigned int _reserved:6; } _flags; BOOL _isActiveWindowStyle; double _spaceNeededForMultiActionIndicator; double _spaceNeededForIndeterminateIndicator; } + (id)defaultActionForKey:(id)arg1; + (void)initialize; @property(nonatomic) BOOL isActiveWindowStyle; // @synthesize isActiveWindowStyle=_isActiveWindowStyle; @property(nonatomic) double spaceNeededForIndeterminateIndicator; // @synthesize spaceNeededForIndeterminateIndicator=_spaceNeededForIndeterminateIndicator; @property(nonatomic) double spaceNeededForMultiActionIndicator; // @synthesize spaceNeededForMultiActionIndicator=_spaceNeededForMultiActionIndicator; @property(nonatomic) unsigned long long progressStyle; // @synthesize progressStyle=_progressStyle; @property(nonatomic) double maxValue; // @synthesize maxValue=_maxValue; @property(nonatomic) double minValue; // @synthesize minValue=_minValue; @property(nonatomic) double doubleValue; // @synthesize doubleValue=_doubleValue; - (void).cxx_destruct; - (id)accessibilityAttributeValue:(id)arg1; - (id)accessibilityAttributeNames; - (BOOL)accessibilityIsIgnored; - (void)invalidateProgressState; - (void)validateProgressStateIfNeeded; - (void)updateProgressLayer; - (void)reflectStyle; - (struct CGRect)effectiveProgressLayerBoundsCalculatingPercentage; - (struct CGRect)effectiveProgressContainerLayerBounds; - (struct CGPoint)effectiveProgressContainerLayerPosition; - (void)updateContainerLayerContents; - (void)clearCachedContainerLayerContents; - (void)reflectIndeterminateState; - (void)setupLayers; - (id)_buildProgressLayerInRect:(struct CGRect)arg1; - (id)_buildProgressContainerLayer; - (id)_buildIndeterminateSpinnerLayer; - (void)_updateSpinnerConstraintsOnLayer:(id)arg1; - (struct CGRect)_rectForIndeterminateSpinningIndicator; - (void)setBounds:(struct CGRect)arg1; - (void)setHidden:(BOOL)arg1; - (id)_determinateProgressIndicatorColor; @property(getter=isIndeterminate) BOOL indeterminate; - (double)effectivePercentage; - (void)primitiveInvalidate; - (id)init; - (void)updateBoundValue; - (id)dvtExtraBindings; // Remaining properties @property(retain) DVTStackBacktrace *creationBacktrace; @property(readonly, copy) NSString *debugDescription; @property(readonly, copy) NSString *description; @property(readonly) unsigned long long hash; @property(readonly) DVTStackBacktrace *invalidationBacktrace; @property(readonly) Class superclass; @property(readonly, nonatomic, getter=isValid) BOOL valid; @end
#ifndef CLIENTMODEL_H #define CLIENTMODEL_H #include <QObject> class OptionsModel; class AddressTableModel; class TransactionTableModel; class CWallet; QT_BEGIN_NAMESPACE class QDateTime; class QTimer; QT_END_NAMESPACE enum BlockSource { BLOCK_SOURCE_NONE, BLOCK_SOURCE_REINDEX, BLOCK_SOURCE_DISK, BLOCK_SOURCE_NETWORK }; /** Model for GulfCoin network client. */ class ClientModel : public QObject { Q_OBJECT public: explicit ClientModel(OptionsModel *optionsModel, QObject *parent = 0); ~ClientModel(); OptionsModel *getOptionsModel(); int getNumConnections() const; int getNumBlocks() const; int getNumBlocksAtStartup(); double getVerificationProgress() const; QDateTime getLastBlockDate() const; //! Return true if client connected to testnet bool isTestNet() const; //! Return true if core is doing initial block download bool inInitialBlockDownload() const; //! Return true if core is importing blocks enum BlockSource getBlockSource() const; //! Return conservative estimate of total number of blocks, or 0 if unknown int getNumBlocksOfPeers() const; //! Return warnings to be displayed in status bar QString getStatusBarWarnings() const; QString formatFullVersion() const; QString formatBuildDate() const; bool isReleaseVersion() const; QString clientName() const; QString formatClientStartupTime() const; private: OptionsModel *optionsModel; int cachedNumBlocks; int cachedNumBlocksOfPeers; bool cachedReindexing; bool cachedImporting; int numBlocksAtStartup; QTimer *pollTimer; void subscribeToCoreSignals(); void unsubscribeFromCoreSignals(); signals: void numConnectionsChanged(int count); void numBlocksChanged(int count, int countOfPeers); void alertsChanged(const QString &warnings); //! Asynchronous message notification void message(const QString &title, const QString &message, unsigned int style); public slots: void updateTimer(); void updateNumConnections(int numConnections); void updateAlert(const QString &hash, int status); }; #endif // CLIENTMODEL_H
// // BeaconCat.h // BeaconCat // // Created by Kevin Y. Kim on 10/22/13. // Copyright (c) 2013 AppOrchard, LLC. All rights reserved. // #import <Foundation/Foundation.h> #import <UIKit/UIKit.h> #import <CoreLocation/CoreLocation.h> #define BEACON_CATS_UUID @"31FD3DD3-28D5-4DEA-BDB4-BDF020937E07" #define BEACON_CATS_ID @"org.kittyloft.beacons" @interface BeaconCat : NSObject @property (nonatomic, strong) NSString *id; @property (nonatomic, strong) NSNumber *major; @property (nonatomic, strong) NSNumber *minor; @property (nonatomic, strong) NSString *name; @property (nonatomic, strong) NSString *bio; + (NSArray *)catsFromContentsOfFile:(NSString *)aPath; + (CLBeaconRegion *)catRegion; - (instancetype)initWithDictionary:(NSDictionary *)dictionary; - (CLBeaconRegion *)beaconRegion; @end
/* * Acidx * * Acidx is a simple wrapper for X applications that accept the -fg and -bg parameters. * Specifically designed to have a low memory footprint, it will wrap X programs such as * xterm and randomly determine the background and foreground colors for the program, * while keeping the color scheme legible. * * https://github.com/kristopolous/acidx * * (c) Copyright 2004-2020 Christopher J. McKenzie under * under the MIT license. See LICENSE.MIT for details. */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <time.h> #define MAX_OF_2(a, b) (a) > (b) ? (a) : (b) #define MAX_OF_3(a, b, c) MAX_OF_2(MAX_OF_2(a, b), c) #define MIN_OF_2(a, b) (a) < (b) ? (a) : (b) #define MIN_OF_3(a, b, c) MIN_OF_2(MIN_OF_2(a, b), c) char *xprog = 0; extern char **environ; typedef struct { unsigned char h, s, l; } hsl; typedef struct { unsigned char r, g, b; } rgb; float hue2rgb(float p, float q, float t) { if(t < 0) t += 1.0; if(t > 1) t -= 1.0; if(t < 1.0 / 6.0) return p + (q - p) * 6.0 * t; if(t < 1.0 / 2.0) return q; if(t < 2.0 / 3.0) return p + (q - p) * (2.0 / 3.0 - t) * 6.0; return p; } void hsl2rgb(hsl in, rgb*out) { float r, g, b, h = in.h / 256.0, s = in.s / 256.0, l = in.l / 256.0; if(s == 0.0){ r = g = b = l; // achromatic } else { float q = l < 0.5 ? l * (1 + s) : l + s - l * s, p = 2.0 * l - q; r = hue2rgb(p, q, h + 1.0 / 3.0); g = hue2rgb(p, q, h); b = hue2rgb(p, q, h - 1.0 / 3.0); } out->r = r * 255.0; out->g = g * 255.0; out->b = b * 255.0; } int main(int argc, char*argv[]) { srand(time(0) * getpid()); hsl h_bg = { .h = 80 + rand() % 140, .s = rand() % 32 + 8, .l = rand() % 16 + 28 }, h_fg = { .h = (((h_bg.h - 10) + rand() % 20) + (rand() % 2) * 32) % 256, .s = MIN_OF_2(255, 50 + rand() % 64 + h_bg.s / 2.0), .l = MIN_OF_2(255, 222 + h_bg.l) }; rgb bg, fg; hsl2rgb(h_bg, &bg); hsl2rgb(h_fg, &fg); short count_ix = 5, count = argc + count_ix; char **myargs = (char**)malloc(sizeof(char*) * count); myargs[count - 1] = 0; myargs[1] = "-bg"; myargs[3] = "-fg"; myargs[2] = (char*)malloc(13 * sizeof(char)); sprintf( myargs[2], "#%02x%02x%02x", bg.r, bg.g, bg.b ); myargs[4] = (char*)malloc(13 * sizeof(char)); sprintf( myargs[4], "#%02x%02x%02x", fg.r, fg.g, fg.b ); if(argc > 1) { xprog = argv[1]; argc--; argv++; count--; } else { for(count_ix = 1; myargs[count_ix]; count_ix++) { if(count_ix % 2) { printf("%s ", myargs[count_ix]); } else { printf("'%s' ", myargs[count_ix]); } } exit(0); } myargs[0] = xprog; for(;count_ix <= count; count_ix++) { argv++; myargs[count_ix] = *argv; } execvp(xprog, myargs); }
#pragma once #include "ofMain.h" #include "DataController.hpp" //============================================================== // utils //============================================================== // マウスポインタ座標を画面サイズで0-1正規化した値を返す #define debugMouseX(a) (((float)ofGetMouseX()/(float)ofGetWidth())*a) #define debugMouseY(a) (((float)ofGetMouseY()/(float)ofGetHeight())*a) // aよりbが大きければb-aを返す(変数更新時のリミッター用) #define MIN_NORM(a,b) (((a)<(b))?(a):(b-a)) // 画面中心を取得 #define CENTER_X (ofGetWidth()/2) #define CENTER_Y (ofGetHeight()/2) // 処理速度の計測 static clock_t start = 0; #define START_CLOCK (start = clock()) #define GET_CLOCK (clock()-start) #define PRINT_CLOCK(comment) (std::cout<<comment<<clock()-start<<std::endl) // ofLogger utils #define printLOG( msg ) printf("%s,%d:%s\n",__FILE__,__LINE__,msg) #define LOG_INFO ofToString(ofGetElapsedTimeMillis(),8) #define LOG_NOTICE ofLogNotice(LOG_INFO) #define LOG_ERROR ofLogError(LOG_INFO) #define LOG_WARNING ofLogWarning(LOG_INFO) // debug #define ASSERT(a) (assert(a)) #define MY_CHECK(e) assert(e) inline string getHome() { char *home = getenv("HOME"); return string(home); } //============================================================== // constants //============================================================== namespace plant { static const int width = 800; static const int height = 800; static const int edgeX = 0; static const int edgeY = 0; static const int edgeW = width; static const int edgeH = height * 0.25; static const int edgeXW = edgeX + edgeW; static const int edgeYH = edgeY + edgeH; static const int bodyX = 0; static const int bodyY = edgeH; static const int bodyW = width; static const int bodyH = height * 0.75; static const int bodyXW = bodyX + bodyW; static const int bodyYH = bodyY + bodyH; static const ofRectangle edgeRect(edgeX, edgeY, edgeW, edgeH); static const ofRectangle bodyRect(bodyX, bodyY, bodyW, bodyH); static const ofVec2f bodyP1(bodyX, bodyY); static const ofVec2f bodyP2(bodyW, bodyY); static const ofVec2f bodyP3(bodyW * 0.8, edgeH + bodyH); static const ofVec2f bodyP4(bodyW * 0.2, edgeH + bodyH); inline float getEdgeCenterX(){ return ((float)edgeX + ((float)edgeW * 0.5)); } inline float getEdgeCenterY(){ return ((float)edgeY + ((float)edgeH * 0.5)); } inline void drawPlantGuide() { ofPushStyle(); ofFill(); ofSetColor(255,0,0, 40); ofRect(plant::edgeRect); ofSetColor(0,255, 0, 40); #ifndef TARGET_OPENGLES glBegin(GL_QUADS); glVertex2f(bodyP1.x, bodyP1.y); glVertex2f(bodyP2.x, bodyP2.y); glVertex2f(bodyP3.x, bodyP3.y); glVertex2f(bodyP4.x, bodyP4.y); glEnd(); #endif ofPopStyle(); } inline void drawPlantMask() { ofSetColor(0, 0, 0, 255); #ifndef TARGET_OPENGLES glBegin(GL_TRIANGLE_STRIP); glVertex2f(bodyP1.x, bodyP1.y); glVertex2f(bodyP4.x, bodyP4.y); glVertex2f(bodyX, bodyYH); glEnd(); glBegin(GL_TRIANGLE_STRIP); glVertex2f(bodyP2.x, bodyP2.y); glVertex2f(bodyP3.x, bodyP3.y); glVertex2f(bodyXW, bodyYH); glEnd(); #endif ofPopStyle(); } } namespace share { static float elapsedTimef = 0; static long long elapsedTimeMillis = 0; static long long elapsedTimeMicros = 0; static ofTrueTypeFont font; static ofFbo * mainFbo; }
// // SQLifestyleSearchCell.h // SQLifestyle // // Created by Doubles_Z on 16-6-24. // Copyright (c) 2016年 Doubles_Z. All rights reserved. // #import <UIKit/UIKit.h> @interface SQLifestyleSearchCell : UITableViewCell + (instancetype)cellWithTableView:(UITableView *)tableView; + (CGFloat)cellHeight; @end
/* The MIT License (MIT) * * Copyright (c) 2016 rbnn * * 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 "sql.h" struct sql_column *sql_column_new(void) { struct sql_column *col = (struct sql_column*)sql_xmalloc(sizeof(struct sql_column)); col->name = NULL; col->type = sql_column_type_none; col->prev = NULL; col->next = NULL; return col; } void sql_column_free(struct sql_column *p) { if(NULL != p) { sql_column_set_name(p, NULL); sql_column_set_none(p); sql_column_del_sibbling(p); sql_xfree(p); } /* if(NULL != p) */ } void sql_column_set_name(struct sql_column *p, const char *name) { sql_check_nullptr(p); if(NULL != p->name) { /* Alten Namen löschen */ sql_xfree(p->name); p->name = NULL; } /* if(NULL != p->name) */ p->name = sql_xstrdup(name); } void sql_column_set_none(struct sql_column *p) { sql_check_nullptr(p); switch(p->type) { case sql_column_type_none: case sql_column_type_int: case sql_column_type_float: /* Nix weiter */ break; case sql_column_type_str: sql_xfree(p->str_value); break; default: /* Ungültiger typ! */ sql_die_invalid_type(p); }; /* switch(p->type) */ p->type = sql_column_type_none; } void sql_column_set_int(struct sql_column *p, const long long x) { sql_check_nullptr(p); switch(p->type) { case sql_column_type_none: case sql_column_type_int: case sql_column_type_float: /* Nix weiter */ break; case sql_column_type_str: /* Den Speicher frei geben */ sql_column_set_none(p); break; default: /* Ungültiger typ! */ sql_die_invalid_type(p); }; /* switch(p->type) */ p->type = sql_column_type_int; p->int_value = x; } void sql_column_set_float(struct sql_column *p, const long double x) { sql_check_nullptr(p); switch(p->type) { case sql_column_type_none: case sql_column_type_int: case sql_column_type_float: /* Nix weiter */ break; case sql_column_type_str: /* Den Speicher frei geben */ sql_column_set_none(p); break; default: /* Ungültiger typ! */ sql_die_invalid_type(p); }; /* switch(p->type) */ p->type = sql_column_type_float; p->flt_value = x; } void sql_column_set_string(struct sql_column *p, const char *x) { sql_check_nullptr(p); switch(p->type) { case sql_column_type_none: case sql_column_type_int: case sql_column_type_float: /* Nix weiter */ break; case sql_column_type_str: /* Den Speicher frei geben */ sql_column_set_none(p); break; default: /* Ungültiger typ! */ sql_die_invalid_type(p); }; /* switch(p->type) */ p->type = sql_column_type_str; p->str_value = sql_xstrdup(x); } void sql_column_add_sibbling(struct sql_column *p, struct sql_column *q, int pos) { sql_check_nullptr(p); sql_check_nullptr(q); struct sql_column *it = p; for(; (NULL != it->prev) && (0 > pos); pos += 1, it = it->prev); for(; (NULL != it->next) && (0 < pos); pos -= 1, it = it->next); if(0 <= pos) { /* Neue Liste: it, q, it->next */ struct sql_column *old_it_next = it->next; it->next = q; q->prev = it; q->next = old_it_next; if(NULL != old_it_next) { old_it_next->prev = q; } /* if(NULL != old_it_next) */ } else { /* Neue Liste: it->prev, q, it */ struct sql_column *old_it_prev = it->prev; it->prev = q; q->next = it; q->prev = old_it_prev; if(NULL != old_it_prev) { old_it_prev->next = q; } /* if(NULL != old_it_prev) */ } /* if(0 <= pos) */ } void sql_column_del_sibbling(struct sql_column *p) { sql_check_nullptr(p); if(NULL != p->prev) { p->prev->next = p->next; } /* if(NULL != p->prev) */ if(NULL != p->next) { p->next->prev = p->prev; } /* if(NULL != p->next) */ } struct sql_column *sql_column_get_first_sibbling(struct sql_column *p) { sql_check_nullptr(p); for(; NULL != p->prev; p = p->prev); return p; } struct sql_column *sql_column_get_last_sibbling(struct sql_column *p) { sql_check_nullptr(p); for(; NULL != p->next; p = p->next); return p; }
/** * @file debug.c * @brief Debugging facilities * * @section License * * Copyright (C) 2010-2015 Oryx Embedded SARL. All rights reserved. * * 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. * * @author Oryx Embedded SARL (www.oryx-embedded.com) * @version 1.6.4 **/ //Dependencies #include "lpc1766_stk.h" #include "debug.h" //Function declaration void lcdPutChar(char_t c); /** * @brief Debug UART initialization * @param[in] baudrate UART baudrate **/ void debugInit(uint32_t baudrate) { uint32_t pclk; //Power up UART0 LPC_SC->PCONP |= PCONP_PCUART0; //Configure P0.2 (TXD0) and P0.3 (RXD0) LPC_PINCON->PINSEL0 &= ~(PINSEL0_P0_2_MASK | PINSEL0_P0_3_MASK); LPC_PINCON->PINSEL0 |= PINSEL0_P0_2_TXD0 | PINSEL0_P0_3_RXD0; //Check the UART0 peripheral clock switch(LPC_SC->PCLKSEL0 & PCLKSEL0_PCLK_UART0) { case PCLKSEL0_PCLK_UART0_DIV1: pclk = SystemCoreClock; break; case PCLKSEL0_PCLK_UART0_DIV2: pclk = SystemCoreClock / 2; break; case PCLKSEL0_PCLK_UART0_DIV4: pclk = SystemCoreClock / 4; break; default: pclk = SystemCoreClock / 8; break; } //Configure UART0 (8 bits, no parity, 1 stop bit) LPC_UART0->LCR = LCR_DLAB | LCR_WORD_LENGTH_SELECT_8; //Set baudrate LPC_UART0->DLM = MSB(pclk / 16 / baudrate); LPC_UART0->DLL = LSB(pclk / 16 / baudrate); //Clear DLAB LPC_UART0->LCR &= ~LCR_DLAB; //Enable and reset FIFOs LPC_UART0->FCR = FCR_TX_FIFO_RESET | FCR_RX_FIFO_RESET | FCR_FIFO_ENABLE; } /** * @brief Display the contents of an array * @param[in] stream Pointer to a FILE object that identifies an output stream * @param[in] prepend String to prepend to the left of each line * @param[in] data Pointer to the data array * @param[in] length Number of bytes to display **/ void debugDisplayArray(FILE *stream, const char_t *prepend, const void *data, size_t length) { uint_t i; for(i = 0; i < length; i++) { //Beginning of a new line? if((i % 16) == 0) fprintf(stream, "%s", prepend); //Display current data byte fprintf(stream, "%02" PRIX8 " ", *((uint8_t *) data + i)); //End of current line? if((i % 16) == 15 || i == (length - 1)) fprintf(stream, "\r\n"); } } /** * @brief Write character to stream * @param[in] c The character to be written * @param[in] stream Pointer to a FILE object that identifies an output stream * @return On success, the character written is returned. If a writing * error occurs, EOF is returned **/ int_t fputc(int_t c, FILE *stream) { //Standard output? if(stream == stdout) { //Display current character lcdPutChar(c); //On success, the character written is returned return c; } //Standard error output? else if(stream == stderr) { //Wait for the transmitter to be ready while(!(LPC_UART0->LSR & LSR_THRE)); //Send character LPC_UART0->THR = c; //Wait for the transfer to complete while(!(LPC_UART0->LSR & LSR_TEMT)); //On success, the character written is returned return c; } //Unknown output? else { //If a writing error occurs, EOF is returned return EOF; } }
#include <stdlib.h> #include "bit_set.h" void bit_set_init(BitSet *bit_set, u32 size_in_bits) { bit_set->size_in_bits = size_in_bits; if (size_in_bits <= 64) { bit_set->bits = &bit_set->inline_bits; } else { bit_set->bits = malloc(8 * SIZE_IN_U64S(bit_set)); } } void bit_set_free(BitSet *bit_set) { if (bit_set->bits != &bit_set->inline_bits) free(bit_set->bits); } void bit_set_set_all(BitSet *bit_set) { for (u32 i = 0; i < SIZE_IN_U64S(bit_set); i++) { bit_set->bits[i] = 0xFFFFFFFFFFFFFFFFULL; // We have to make sure we don't set the top bits so that // bit_set_highest_set_bit, bit_set_is_empty, etc. work correctly. if (i == SIZE_IN_U64S(bit_set) - 1) { u32 top_bits = bit_set->size_in_bits % 64; if (top_bits != 0) { bit_set->bits[i] = (1UL << top_bits) - 1; } } } } void bit_set_clear_all(BitSet *bit_set) { for (u32 i = 0; i < SIZE_IN_U64S(bit_set); i++) { bit_set->bits[i] = 0; } } extern inline bool bit_set_get_bit(BitSet *bit_set, u32 index); extern inline void bit_set_set_bit(BitSet *bit_set, u32 index, bool value); extern inline i32 bit_set_lowest_set_bit(BitSet *bit_set); extern inline i32 bit_set_highest_set_bit(BitSet *bit_set); extern inline bool bit_set_is_empty(BitSet *bit_set);
/* * Generated by class-dump 3.3.4 (64 bit). * * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. */ #import <CoreDAV/CoreDAVGetAccountPropertiesTaskGroup.h> @class NSSet; @interface CardDAVGetAccountPropertiesTaskGroup : CoreDAVGetAccountPropertiesTaskGroup { NSSet *_addressBookHomes; NSSet *_directoryGatewayURLs; } @property(readonly) NSSet *directoryGatewayURLs; // @synthesize directoryGatewayURLs=_directoryGatewayURLs; @property(readonly) NSSet *addressBookHomes; // @synthesize addressBookHomes=_addressBookHomes; - (id)directoryGatewayURL; - (void)_setPropertiesFromParsedResponses:(id)arg1; - (id)homeSet; - (id)_copyAccountPropertiesPropFindElements; - (id)description; - (void)dealloc; @end
// // LoadingIndicatorViewController.h // ARIS // // Created by Phil Dougherty on 00/00/15. // // #import <UIKit/UIKit.h> #import "ARISViewController.h" @protocol LoadingIndicatorViewControllerDelegate @end @interface LoadingIndicatorViewController : ARISViewController - (id) initWithDelegate:(id <LoadingIndicatorViewControllerDelegate>)d; @end
/* * Copyright (c) 2020 Arm Limited. * * SPDX-License-Identifier: MIT * * 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 SRC_CORE_NEON_WRAPPER_INTRINSICS_SVDUP_N_H #define SRC_CORE_NEON_WRAPPER_INTRINSICS_SVDUP_N_H #if defined(__ARM_FEATURE_SVE) #include <arm_sve.h> namespace arm_compute { namespace wrapper { #define SVDUP_N_IMPL(etype, vtype, postfix) \ inline vtype svdup_n(etype a) \ { \ return svdup_n_##postfix(a); \ } SVDUP_N_IMPL(int8_t, svint8_t, s8) SVDUP_N_IMPL(int16_t, svint16_t, s16) SVDUP_N_IMPL(int32_t, svint32_t, s32) SVDUP_N_IMPL(int64_t, svint64_t, s64) SVDUP_N_IMPL(uint8_t, svuint8_t, u8) SVDUP_N_IMPL(uint16_t, svuint16_t, u16) SVDUP_N_IMPL(uint32_t, svuint32_t, u32) SVDUP_N_IMPL(uint64_t, svuint64_t, u64) SVDUP_N_IMPL(float16_t, svfloat16_t, f16) SVDUP_N_IMPL(float, svfloat32_t, f32) SVDUP_N_IMPL(float64_t, svfloat64_t, f64) SVDUP_N_IMPL(bfloat16_t, svbfloat16_t, bf16) #undef SVDUP_N_IMPL } // namespace wrapper } // namespace arm_compute #endif /* defined(__ARM_FEATURE_SVE) */ #endif /* SRC_CORE_NEON_WRAPPER_INTRINSICS_SVDUP_N_H */
// // PriceOption.h // iGuidFC // // Created by dampier on 15/4/15. // Copyright (c) 2015年 Artur Mkrtchyan. All rights reserved. // #import <Foundation/Foundation.h> #import <CoreData/CoreData.h> @interface PriceOption : NSObject @property (nonatomic, retain) NSArray * agents; @property (nonatomic, retain) NSNumber * quoteAgeInMinutes; @property (nonatomic, retain) NSNumber * price; @property (nonatomic, retain) NSString * deeplinkUrl; //object convert from id @property (nonatomic, retain) NSArray * agents_; @end
#include <stdio.h> #include <stdlib.h> #include <stdbool.h> #include <inttypes.h> #include "macros.h" #include "matrix_helpers.h" /* some utilities. NOTE: matrices are assumed to be stored as columns. */ extern void free_matrix( double **A, int n ) { if ( A != NULL ) { for ( int i = 0; i < n; i++ ) { free_if_non_null(A[i]); } } free_if_non_null(A); } extern double index_symm_matrix( double ** A, int i, int j ) { return i < j ? A[i][j - i] : A[j][i - j]; } extern void multiply_symm_matrix_vector( double **A, double *x, int n, double *b ) { for ( int i = 0; i < n; i++ ) { double sum = 0; for ( int j = 0; j < n; j++ ) { sum += index_symm_matrix(A, i, j) * x[j]; } b[i] = sum; } } extern int alloc_symm_matrix( double ***ptr_X, int n ) { int status = 0; double **X = NULL; *ptr_X = NULL; X = (double **) malloc(n * sizeof(double*)); return_if_malloc_failed(X); for ( int i = 0; i < n; i++ ) { X[i] = NULL; } for ( int i = 0; i < n; i++ ) { X[i] = (double *) malloc((n - i) * sizeof(double)); return_if_malloc_failed(X[i]); } *ptr_X = X; BYE: return status; } // TODO: use an actual matrix multiplication algo extern void square_symm_matrix( double **A, double **B, int n ) { for ( int i = 0; i < n; i++ ) { for ( int j = 0; j < n - i; j++ ) { double sum = 0; for ( int k = 0; k < n; k++ ) { sum += index_symm_matrix(A, i, k) * index_symm_matrix(A, k, j + i); } B[i][j] = sum; } } } extern void multiply_matrix_vector( double **A, double *x, int n, double *b ) { for ( int i = 0; i < n; i++ ) { double sum = 0; for ( int j = 0; j < n; j++ ) { sum += A[j][i] * x[j]; } b[i] = sum; } } extern void transpose_and_multiply_matrix_vector( double **A, double *x, int n, double *b ) { for ( int i = 0; i < n; i++ ) { double sum = 0; for ( int j = 0; j < n; j++ ) { sum += A[i][j] * x[j]; } b[i] = sum; } } extern int alloc_matrix( double ***ptr_X, int n ) { int status = 0; double **X = NULL; *ptr_X = NULL; X = (double **) malloc(n * sizeof(double*)); return_if_malloc_failed(X); for ( int i = 0; i < n; i++ ) { X[i] = NULL; } for ( int i = 0; i < n; i++ ) { X[i] = (double *) malloc(n * sizeof(double)); return_if_malloc_failed(X[i]); } *ptr_X = X; BYE: return status; } // TODO: use an actual matrix multiplication algo extern void transpose_and_multiply( double **A, double **B, int n ) { for ( int i = 0; i < n; i++ ) { for ( int j = 0; j < n - i; j++ ) { double sum = 0; for ( int k = 0; k < n; k++ ) { // a normal mat mult would use A[i][k], // but since we're computing A^tA we write A[k][i] sum += A[i][k] * A[j+i][k]; } B[i][j] = sum; } } }
#pragma once /** * This is adoption of nice technique for automatic treatment of resources at * the end of scope. Original article comes from: * [1] http://www.cuj.com/documents/s=8000/cujcexp1812alexandr/ * * ScopeGuard is a generalization of a typical detailementation of the * "initialization is resource acquisition" C++ idiom. The difference is that * ScopeGuard focuses only on the cleanup part - you do the resource * acquisition, and ScopeGuard takes care of relinquishing the resource. */ /** * How to use it: * { * bb::scope_guard_t guard = bb::mkScopeGuard(bb::mk_functor(&log_leave)); * if (something goes wrong) * throw std::exception; // the guard will call log_leave * else * guard.Dismiss(); * } * * or simply * { * SCOPE_GUARD(guard, boost::bind(&foo::bar, f, true)); * ... * guard.Dismiss(); // optional * } * * This code will construct a temporary reference guard which will be destroyed * at the exit of the scope and call log_leave function. * * The guard can be revoked by calling its member method Dismiss. */ #define SCOPE_GUARD(guard_name, operation) \ bb::scope_guard_t guard_name = bb::mkScopeGuard(operation); //bb::fakeScopeGuardUsage(&guard_name) namespace bb { namespace detail { struct ScopeGuardBase { void Dismiss () const { m_Dismissed = true; } protected: ScopeGuardBase () : m_Dismissed(false) {} ScopeGuardBase (ScopeGuardBase const & rhs) : m_Dismissed(rhs.m_Dismissed) { rhs.Dismiss(); } ~ScopeGuardBase () { } // nonvirtual! see [1] why mutable bool m_Dismissed; private: ScopeGuardBase & operator= (ScopeGuardBase const &); // assignment denied }; template <class _FunctorT> struct ScopeGuard_0 : ScopeGuardBase { ScopeGuard_0 (_FunctorT const & fctor) : m_fctor(fctor) { } ~ScopeGuard_0 () { if (!m_Dismissed) m_fctor(); } private: _FunctorT m_fctor; }; template <class _FunctorT> struct ScopeGuard_1 : ScopeGuardBase { ScopeGuard_1 (_FunctorT const & fctor, typename _FunctorT::argument_type arg) : m_fctor(fctor), m_arg(arg) { } ~ScopeGuard_1 () { if (!m_Dismissed) m_fctor(m_arg); } private: _FunctorT m_fctor; typename _FunctorT::argument_type m_arg; }; template <class _FunctorT> struct ScopeGuard_2 : ScopeGuardBase { ScopeGuard_2 (_FunctorT const & fctor, typename _FunctorT::first_argument_type arg1, typename _FunctorT::second_argument_type arg2) : m_fctor(fctor), m_arg1(arg1), m_arg2(arg2) { } ~ScopeGuard_2 () { if (!m_Dismissed) m_fctor(m_arg1, m_arg2); } private: _FunctorT m_fctor; typename _FunctorT::first_argument_type m_arg1; typename _FunctorT::second_argument_type m_arg2; }; }} // namespace bb::detail namespace bb { typedef detail::ScopeGuardBase const & scope_guard_t; template <class _FunctorT> detail::ScopeGuard_0<_FunctorT> mkScopeGuard (_FunctorT const & f) { return detail::ScopeGuard_0<_FunctorT>(f); } /// creating ScopeGuard from derivate of std::unary_function template <class _FunctorT> detail::ScopeGuard_1<_FunctorT> mkScopeGuard (_FunctorT const & f, typename _FunctorT::argument_type arg) { return detail::ScopeGuard_1<_FunctorT>(f, arg); } /// creating ScopeGuard from derivate of std::binary_function template <class _FunctorT> detail::ScopeGuard_2<_FunctorT> mkScopeGuard (_FunctorT const & f, typename _FunctorT::first_argument_type arg1, typename _FunctorT::second_argument_type arg2) { return detail::ScopeGuard_2<_FunctorT>(f, arg1, arg2); } // dummy call to shut the hell up the compiler's bloody mouth inline void fakeScopeGuardUsage (...) { } } // namespace bb
#pragma once #include "Math/Math.h" namespace P2D { struct ManifoldPair { f32v2 position0; /**< Position 0*/ f32v2 position1; /**< Position 1*/ f32v2 normal; /**< Normal*/ f32 separation; /**< Separation*/ }; // Structure containing a set of points, used to calculate the collision after detection struct Manifold { ManifoldPair pairs[g_MaxManifoldPairs]; /**< Manifold points*/ u32 numPairs; /**< Amount of manifold points*/ }; }
// // Generated by class-dump 3.5 (64 bit). // // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. // #import "NSObject.h" @protocol PBSViewServiceInterface <NSObject> - (void)dismissWithResult:(id <NSSecureCoding>)arg1; @end
/* * Copyright (C) 2009-2013 Gil Mendes * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, 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 THIS SOFTWARE. */ /** * @file * @brief Bitmap implementation. */ #ifndef __LIB_BITMAP_H #define __LIB_BITMAP_H #include <lib/utility.h> #include <mm/mm.h> /** Get the number of bytes required for a bitmap. */ #define BITMAP_BYTES(nbits) (round_up(nbits, 8) / 8) extern unsigned long *bitmap_alloc(size_t nbits, unsigned mmflag); extern void bitmap_zero(unsigned long *bitmap, size_t nbits); extern void bitmap_set(unsigned long *bitmap, unsigned long bit); extern void bitmap_clear(unsigned long *bitmap, unsigned long bit); extern bool bitmap_test(const unsigned long *bitmap, unsigned long bit); extern long bitmap_ffs(const unsigned long *bitmap, size_t nbits); extern long bitmap_ffz(const unsigned long *bitmap, size_t nbits); extern long bitmap_next(const unsigned long *bitmap, size_t nbits, unsigned long current); #endif /* __LIB_BITMAP_H */
#ifndef LILY_KEYWORD_TABLE_H # define LILY_KEYWORD_TABLE_H typedef struct { const char *name; uint64_t shorthash; } keyword_entry; keyword_entry constants[] = { {"true", 1702195828}, {"self", 1718379891}, {"unit", 1953066613}, {"false", 435728179558}, {"__file__", 6872323072689856351}, {"__line__", 6872323081280184159}, {"__function__", 7598807797348065119}, }; #define CONST_TRUE 0 #define CONST_SELF 1 #define CONST_UNIT 2 #define CONST_FALSE 3 #define CONST__FILE__ 4 #define CONST__LINE__ 5 #define CONST__FUNCTION__ 6 #define CONST_LAST_ID 6 keyword_entry keywords[] = { {"if", 26217}, {"do", 28516}, {"var", 7496054}, {"for", 7499622}, {"try", 7959156}, {"case", 1702060387}, {"else", 1702063205}, {"elif", 1718185061}, {"enum", 1836412517}, {"while", 435610544247}, {"raise", 435727982962}, {"match", 448345170285}, {"break", 461195539042}, {"class", 495857003619}, {"public", 109304441107824}, {"static", 109304575259763}, {"scoped", 110386840822643}, {"define", 111524889126244}, {"return", 121437875889522}, {"except", 128026086176869}, {"import", 128034844732777}, {"forward", 28273260612448102}, {"private", 28556934595048048}, {"protected", 7310577382525465200}, {"continue", 7310870969309884259}, }; # define KEY_IF 0 # define KEY_DO 1 # define KEY_VAR 2 # define KEY_FOR 3 # define KEY_TRY 4 # define KEY_CASE 5 # define KEY_ELSE 6 # define KEY_ELIF 7 # define KEY_ENUM 8 # define KEY_WHILE 9 # define KEY_RAISE 10 # define KEY_MATCH 11 # define KEY_BREAK 12 # define KEY_CLASS 13 # define KEY_PUBLIC 14 # define KEY_STATIC 15 # define KEY_SCOPED 16 # define KEY_DEFINE 17 # define KEY_RETURN 18 # define KEY_EXCEPT 19 # define KEY_IMPORT 20 # define KEY_FORWARD 21 # define KEY_PRIVATE 22 # define KEY_PROTECTED 23 # define KEY_CONTINUE 24 # define KEY_LAST_ID 24 #endif
/*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2002 Thomas Moestl <tmm@FreeBSD.org> * 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 THE AUTHOR 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 AUTHOR 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. * * $FreeBSD$ */ #ifndef _SYS_ENDIAN_H_ #define _SYS_ENDIAN_H_ #include <stdint.h> #include "sys/cdefs.h" #include "sys/_types.h" #include "endian.h" #if 0 #ifndef _UINT8_T_DECLARED typedef __uint8_t uint8_t; #define _UINT8_T_DECLARED #endif #ifndef _UINT16_T_DECLARED typedef __uint16_t uint16_t; #define _UINT16_T_DECLARED #endif #ifndef _UINT32_T_DECLARED typedef __uint32_t uint32_t; #define _UINT32_T_DECLARED #endif #ifndef _UINT64_T_DECLARED typedef __uint64_t uint64_t; #define _UINT64_T_DECLARED #endif #endif /* * General byte order swapping functions. */ #define bswap16(x) __bswap16(x) #define bswap32(x) __bswap32(x) #define bswap64(x) __bswap64(x) /* * Host to big endian, host to little endian, big endian to host, and little * endian to host byte order functions as detailed in byteorder(9). */ #if _BYTE_ORDER == _LITTLE_ENDIAN #define htobe16(x) bswap16((x)) #define htobe32(x) bswap32((x)) #define htobe64(x) bswap64((x)) #define htole16(x) ((uint16_t)(x)) #define htole32(x) ((uint32_t)(x)) #define htole64(x) ((uint64_t)(x)) #define be16toh(x) bswap16((x)) #define be32toh(x) bswap32((x)) #define be64toh(x) bswap64((x)) #define le16toh(x) ((uint16_t)(x)) #define le32toh(x) ((uint32_t)(x)) #define le64toh(x) ((uint64_t)(x)) #else /* _BYTE_ORDER != _LITTLE_ENDIAN */ #define htobe16(x) ((uint16_t)(x)) #define htobe32(x) ((uint32_t)(x)) #define htobe64(x) ((uint64_t)(x)) #define htole16(x) bswap16((x)) #define htole32(x) bswap32((x)) #define htole64(x) bswap64((x)) #define be16toh(x) ((uint16_t)(x)) #define be32toh(x) ((uint32_t)(x)) #define be64toh(x) ((uint64_t)(x)) #define le16toh(x) bswap16((x)) #define le32toh(x) bswap32((x)) #define le64toh(x) bswap64((x)) #endif /* _BYTE_ORDER == _LITTLE_ENDIAN */ /* Alignment-agnostic encode/decode bytestream to/from little/big endian. */ static __inline uint16_t be16dec(const void *pp) { uint8_t const *p = (uint8_t const *)pp; return ((p[0] << 8) | p[1]); } static __inline uint32_t be32dec(const void *pp) { uint8_t const *p = (uint8_t const *)pp; return (((unsigned)p[0] << 24) | (p[1] << 16) | (p[2] << 8) | p[3]); } static __inline uint64_t be64dec(const void *pp) { uint8_t const *p = (uint8_t const *)pp; return (((uint64_t)be32dec(p) << 32) | be32dec(p + 4)); } static __inline uint16_t le16dec(const void *pp) { uint8_t const *p = (uint8_t const *)pp; return ((p[1] << 8) | p[0]); } static __inline uint32_t le32dec(const void *pp) { uint8_t const *p = (uint8_t const *)pp; return (((unsigned)p[3] << 24) | (p[2] << 16) | (p[1] << 8) | p[0]); } static __inline uint64_t le64dec(const void *pp) { uint8_t const *p = (uint8_t const *)pp; return (((uint64_t)le32dec(p + 4) << 32) | le32dec(p)); } static __inline void be16enc(void *pp, uint16_t u) { uint8_t *p = (uint8_t *)pp; p[0] = (u >> 8) & 0xff; p[1] = u & 0xff; } static __inline void be32enc(void *pp, uint32_t u) { uint8_t *p = (uint8_t *)pp; p[0] = (u >> 24) & 0xff; p[1] = (u >> 16) & 0xff; p[2] = (u >> 8) & 0xff; p[3] = u & 0xff; } static __inline void be64enc(void *pp, uint64_t u) { uint8_t *p = (uint8_t *)pp; be32enc(p, (uint32_t)(u >> 32)); be32enc(p + 4, (uint32_t)(u & 0xffffffffU)); } static __inline void le16enc(void *pp, uint16_t u) { uint8_t *p = (uint8_t *)pp; p[0] = u & 0xff; p[1] = (u >> 8) & 0xff; } static __inline void le32enc(void *pp, uint32_t u) { uint8_t *p = (uint8_t *)pp; p[0] = u & 0xff; p[1] = (u >> 8) & 0xff; p[2] = (u >> 16) & 0xff; p[3] = (u >> 24) & 0xff; } static __inline void le64enc(void *pp, uint64_t u) { uint8_t *p = (uint8_t *)pp; le32enc(p, (uint32_t)(u & 0xffffffffU)); le32enc(p + 4, (uint32_t)(u >> 32)); } #endif /* _SYS_ENDIAN_H_ */
// // TableDataCell.h // GGFMDB // // Created by Hugin on 16/9/2. // Copyright © 2016年 Hugin. All rights reserved. // #import <UIKit/UIKit.h> #import "Person.h" @interface TableDataCell : UITableViewCell @property(nonatomic, strong) Person *model; @end
#include "soundpipe.h" #include "md5.h" #include "tap.h" #include "test.h" typedef struct { sp_hilbert *hilbert; sp_osc *cos, *sin; sp_ftbl *ft; sp_diskin *diskin; } UserData; int t_hilbert(sp_test *tst, sp_data *sp, const char *hash) { uint32_t n; int fail = 0; SPFLOAT real = 0, imag = 0; SPFLOAT diskin = 0; SPFLOAT sin = 0, cos = 0; sp_srand(sp, 1234567); UserData ud; sp_hilbert_create(&ud.hilbert); sp_osc_create(&ud.sin); sp_osc_create(&ud.cos); sp_diskin_create(&ud.diskin); sp_ftbl_create(sp, &ud.ft, 8192); sp_hilbert_init(sp, ud.hilbert); sp_gen_sine(sp, ud.ft); sp_osc_init(sp, ud.sin, ud.ft, 0); sp_osc_init(sp, ud.cos, ud.ft, 0.25); ud.sin->freq = 1000; ud.cos->freq = 1000; sp_diskin_init(sp, ud.diskin, SAMPDIR "oneart.wav"); for(n = 0; n < tst->size; n++) { real = 0; imag = 0; diskin = 0; sin = 0; cos = 0; sp_diskin_compute(sp, ud.diskin, NULL, &diskin); sp_osc_compute(sp, ud.sin, NULL, &sin); sp_osc_compute(sp, ud.cos, NULL, &cos); sp_hilbert_compute(sp, ud.hilbert, &diskin, &real, &imag); sp->out[0] = ((cos * real) + (sin * real)) * 0.7; sp_test_add_sample(tst, sp->out[0]); } fail = sp_test_verify(tst, hash); sp_hilbert_destroy(&ud.hilbert); sp_ftbl_destroy(&ud.ft); sp_osc_destroy(&ud.sin); sp_osc_destroy(&ud.cos); sp_diskin_destroy(&ud.diskin); if(fail) return SP_NOT_OK; else return SP_OK; }
// // BBGeneralHeader.h // SoloVideo // // Created by 项羽 on 16/9/18. // Copyright © 2016年 项羽. All rights reserved. // #ifndef BBGeneralHeader_h #define BBGeneralHeader_h #define WeakObj(o) __weak typeof(o) weak##o = o; /** 系统版本精确判断 @param v 要传入的系统版本字符串 @return 返回bool */ #define SYSTEM_VERSION_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedSame) #define SYSTEM_VERSION_GREATER_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedDescending) #define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending) #define SYSTEM_VERSION_LESS_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedAscending) #define SYSTEM_VERSION_LESS_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedDescending) //判断屏幕尺寸 #define IS_IPHONE5 (([[UIScreen mainScreen] bounds].size.height == 568) ? YES : NO) #define IS_IPhone6 (667 == [[UIScreen mainScreen] bounds].size.height ? YES : NO) #define IS_IPhone6plus (736 == [[UIScreen mainScreen] bounds].size.height ? YES : NO) //屏幕宽高 #define SCREEN_WIDTH [UIScreen mainScreen].bounds.size.width #define SCREEN_HEIGHT [UIScreen mainScreen].bounds.size.height //设置rgb颜色 #define RGBA(r,g,b,a) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:(a)] #define RGB_CommonColor RGBA(255, 64, 63, 1) #define HEX_RGBA(V, A) [Tools fromHexValue:V alpha:A] #define LocalLanguage(key) NSLocalizedString(key, nil) // 消息通知 #define RegisterNotify(_name, _selector) \ [[NSNotificationCenter defaultCenter] addObserver:self \ selector:_selector name:_name object:nil]; #define RemoveNofify \ [[NSNotificationCenter defaultCenter] removeObserver:self]; #define SendNotify(_name, _object) \ [[NSNotificationCenter defaultCenter] postNotificationName:_name object:_object]; //other #define HEXColor(colorString) [UIColor colorWithHexString:colorString] #define theWindow [[UIApplication sharedApplication] delegate].window #if __has_feature(objc_arc) #define IMP_BLOCK_SELF(type) __weak type *block_self=self; #else #define IMP_BLOCK_SELF(type) __block type *block_self=self; #endif #ifdef DEBUG #define DLog(...) NSLog(@"%s(第%d行) %@", __PRETTY_FUNCTION__, __LINE__, [NSString stringWithFormat:__VA_ARGS__]) #else #define DLog(...) #endif /* XCode LLVM XXX - Preprocessing中Debug会添加 DEBUG=1 标志 在调试的时候,会输出(格式:文件名:行号)日志。 在Release正式版本的时候,会关闭日志输出。 */ #ifdef DEBUG #define NSLog(FORMAT, ...) fprintf(stderr,"%s:%d\t%s\n",[[[NSString stringWithUTF8String:__FILE__] lastPathComponent] UTF8String], __LINE__, [[NSString stringWithFormat:FORMAT, ##__VA_ARGS__] UTF8String]); #else #define NSLog(FORMAT, ...) nil #endif #define SVImageNamed(name) [UIImage imageNamed:name] // UIApplication, AppDelegate #define SharedApplication [UIApplication sharedApplication] #define MyAppDelegate ((AppDelegate *)SharedApplication.delegate) #endif /* BBGeneralHeader_h */ #define vCFBundleVersion [[[NSBundle mainBundle] infoDictionary] objectForKey:(NSString*)kCFBundleVersionKey] #define vCFBundleShortVersionStr [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"] // 获取沙盒主目录路径 #define SHHomeDir NSHomeDirectory() // 获取Documents目录路径 #define SHDocDir [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) firstObject] // 获取Library的目录路径 #define SHLibDir [NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES) lastObject] // 获取Caches目录路径 #define SHCachesDir [NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) firstObject] // 获取tmp目录路径 #define SHTmpDir NSTemporaryDirectory() static NSString *const SHCacheTimeKey = @"SHCacheTimeKey"; //通知 static NSString *LoginDismissForSuccessNoti = @"LoginDismissForSuccessNoti";
#ifndef HASH_FN_H #define HASH_FN_H #define STRING_ALPHABET_SIZE 26 #define SEED 3234213 #include <stdio.h> #include <stdlib.h> #include <string.h> #include <gmp.h> typedef unsigned long int ulint; typedef struct hash_fn_t { mpz_t p; mpz_t a; mpz_t b; mpz_t m; gmp_randstate_t state; } hash_fn; /** * Initialize the parameters for the function. * */ void hash_fn_init(hash_fn *f, ulint table_size); /** * Generate values for p, a, and b. * */ void hash_fn_generate(hash_fn *f, mpz_t u); /** * Apply hash function to a string. * */ void hash_string(const hash_fn *f, mpz_t out, const char *string); /** * Apply hash function to an integer. * */ void hash_integer(const hash_fn *f, mpz_t out, mpz_t integer); /** * Deallocate the function's parameters. * */ void hash_fn_destroy(hash_fn *f); #endif
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE78_OS_Command_Injection__wchar_t_file_popen_68a.c Label Definition File: CWE78_OS_Command_Injection.one_string.label.xml Template File: sources-sink-68a.tmpl.c */ /* * @description * CWE: 78 OS Command Injection * BadSource: file Read input from a file * GoodSource: Fixed string * Sink: popen * BadSink : Execute command in data using popen() * Flow Variant: 68 Data flow: data passed as a global variable from one function to another in different source files * * */ #include "std_testcase.h" #include <wchar.h> #ifdef _WIN32 #define FULL_COMMAND L"%WINDIR%\\system32\\cmd.exe /c dir " #else #include <unistd.h> #define FULL_COMMAND L"/bin/sh ls -la " #endif #ifdef _WIN32 #define FILENAME "C:\\temp\\file.txt" #else #define FILENAME "/tmp/file.txt" #endif /* define POPEN as _popen on Windows and popen otherwise */ #ifdef _WIN32 #define POPEN _wpopen #define PCLOSE _pclose #else /* NOT _WIN32 */ #define POPEN popen #define PCLOSE pclose #endif wchar_t * CWE78_OS_Command_Injection__wchar_t_file_popen_68_badData; wchar_t * CWE78_OS_Command_Injection__wchar_t_file_popen_68_goodG2BData; #ifndef OMITBAD /* bad function declaration */ void CWE78_OS_Command_Injection__wchar_t_file_popen_68b_badSink(); void CWE78_OS_Command_Injection__wchar_t_file_popen_68_bad() { wchar_t * data; wchar_t data_buf[100] = FULL_COMMAND; data = data_buf; { /* Read input from a file */ size_t dataLen = wcslen(data); FILE * pFile; /* if there is room in data, attempt to read the input from a file */ if (100-dataLen > 1) { pFile = fopen(FILENAME, "r"); if (pFile != NULL) { /* POTENTIAL FLAW: Read data from a file */ if (fgetws(data+dataLen, (int)(100-dataLen), pFile) == NULL) { printLine("fgetws() failed"); /* Restore NUL terminator if fgetws fails */ data[dataLen] = L'\0'; } fclose(pFile); } } } CWE78_OS_Command_Injection__wchar_t_file_popen_68_badData = data; CWE78_OS_Command_Injection__wchar_t_file_popen_68b_badSink(); } #endif /* OMITBAD */ #ifndef OMITGOOD /* good function declarations */ void CWE78_OS_Command_Injection__wchar_t_file_popen_68b_goodG2BSink(); /* goodG2B uses the GoodSource with the BadSink */ static void goodG2B() { wchar_t * data; wchar_t data_buf[100] = FULL_COMMAND; data = data_buf; /* FIX: Append a fixed string to data (not user / external input) */ wcscat(data, L"*.*"); CWE78_OS_Command_Injection__wchar_t_file_popen_68_goodG2BData = data; CWE78_OS_Command_Injection__wchar_t_file_popen_68b_goodG2BSink(); } void CWE78_OS_Command_Injection__wchar_t_file_popen_68_good() { goodG2B(); } #endif /* OMITGOOD */ /* Below is the main(). It is only used when building this testcase on * its own for testing or for building a binary to use in testing binary * analysis tools. It is not used when compiling all the testcases as one * application, which is how source code analysis tools are tested. */ #ifdef INCLUDEMAIN int main(int argc, char * argv[]) { /* seed randomness */ srand( (unsigned)time(NULL) ); #ifndef OMITGOOD printLine("Calling good()..."); CWE78_OS_Command_Injection__wchar_t_file_popen_68_good(); printLine("Finished good()"); #endif /* OMITGOOD */ #ifndef OMITBAD printLine("Calling bad()..."); CWE78_OS_Command_Injection__wchar_t_file_popen_68_bad(); printLine("Finished bad()"); #endif /* OMITBAD */ return 0; } #endif
/* * Copyright (C) 2006, 2007 Rob Buis * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public License * along with this library; see the file COPYING.LIB. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. * */ #ifndef StyleElement_h #define StyleElement_h #include "core/css/CSSStyleSheet.h" #include "wtf/text/TextPosition.h" namespace WebCore { class ContainerNode; class Document; class Element; class StyleElement { public: StyleElement(Document*, bool createdByParser); virtual ~StyleElement(); protected: virtual const AtomicString& type() const = 0; virtual const AtomicString& media() const = 0; CSSStyleSheet* sheet() const { return m_sheet.get(); } bool isLoading() const; bool sheetLoaded(Document&); void startLoadingDynamicSheet(Document&); void processStyleSheet(Document&, Element*); void removedFromDocument(Document&, Element*, ContainerNode* scopingNode = 0); void clearDocumentData(Document&, Element*); void childrenChanged(Element*); void finishParsingChildren(Element*); RefPtr<CSSStyleSheet> m_sheet; private: void createSheet(Element*, const String& text = String()); void process(Element*); void clearSheet(); bool m_createdByParser; bool m_loading; TextPosition m_startPosition; }; } #endif
/***************************************************************************** * VLCExternalDisplayController.h * VLC for iOS ***************************************************************************** * Copyright (c) 2013 VideoLAN. All rights reserved. * $Id$ * * Authors: Gleb Pinigin <gpinigin # gmail.com> * * Refer to the COPYING file of the official project for license. *****************************************************************************/ #import <UIKit/UIKit.h> @interface VLCExternalDisplayController : UIViewController @end
#ifdef __OBJC__ #import <Cocoa/Cocoa.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_Animal_AgeVersionNumber; FOUNDATION_EXPORT const unsigned char Pods_Animal_AgeVersionString[];
/************************************************************************************ * Copyright (c) 2015, Intel Corporation * 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 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. ************************************************************************************/ /** * @file mcu_errno.h * @brief Intel MCU API error code definition. */ #ifndef __MCU_ERRNO_H #define __MCU_ERRNO_H /* * POSIX Error codes */ #define EPERM 1 /* Not owner */ #define ENOENT 2 /* No such file or directory */ #define ESRCH 3 /* No such context */ #define EINTR 4 /* Interrupted system call */ #define EIO 5 /* I/O error */ #define ENXIO 6 /* No such device or address */ #define E2BIG 7 /* Arg list too long */ #define ENOEXEC 8 /* Exec format error */ #define EBADF 9 /* Bad file number */ #define ECHILD 10 /* No children */ #define EAGAIN 11 /* No more contexts */ #define ENOMEM 12 /* Not enough core */ #define EACCES 13 /* Permission denied */ #define EFAULT 14 /* Bad address */ #define ENOTEMPTY 15 /* Directory not empty */ #define EBUSY 16 /* Mount device busy */ #define EEXIST 17 /* File exists */ #define EXDEV 18 /* Cross-device link */ #define ENODEV 19 /* No such device */ #define ENOTDIR 20 /* Not a directory */ #define EISDIR 21 /* Is a directory */ #define EINVAL 22 /* Invalid argument */ #define ENFILE 23 /* File table overflow */ #define EMFILE 24 /* Too many open files */ #define ENOTTY 25 /* Not a typewriter */ #define ENAMETOOLONG 26 /* File name too long */ #define EFBIG 27 /* File too large */ #define ENOSPC 28 /* No space left on device */ #define ESPIPE 29 /* Illegal seek */ #define EROFS 30 /* Read-only file system */ #define EMLINK 31 /* Too many links */ #define EPIPE 32 /* Broken pipe */ #define EDEADLK 33 /* Resource deadlock avoided */ #define ENOLCK 34 /* No locks available */ #define ENOTSUP 35 /* Unsupported value */ #define EMSGSIZE 36 /* Message size */ /* ANSI math software */ #define EDOM 37 /* Argument too large */ #define ERANGE 38 /* Result too large */ /* ipc/network software */ /* argument errors */ #define EDESTADDRREQ 40 /* Destination address required */ #define EPROTOTYPE 41 /* Protocol wrong type for socket */ #define ENOPROTOOPT 42 /* Protocol not available */ #define EPROTONOSUPPORT 43 /* Protocol not supported */ #define ESOCKTNOSUPPORT 44 /* Socket type not supported */ #define EOPNOTSUPP 45 /* Operation not supported on socket */ #define EPFNOSUPPORT 46 /* Protocol family not supported */ #define EAFNOSUPPORT 47 /* Addr family not supported */ #define EADDRINUSE 48 /* Address already in use */ #define EADDRNOTAVAIL 49 /* Can't assign requested address */ #define ENOTSOCK 50 /* Socket operation on non-socket */ /* operational errors */ #define ENETUNREACH 51 /* Network is unreachable */ #define ENETRESET 52 /* Network dropped connection on reset */ #define ECONNABORTED 53 /* Software caused connection abort */ #define ECONNRESET 54 /* Connection reset by peer */ #define ENOBUFS 55 /* No buffer space available */ #define EISCONN 56 /* Socket is already connected */ #define ENOTCONN 57 /* Socket is not connected */ #define ESHUTDOWN 58 /* Can't send after socket shutdown */ #define ETOOMANYREFS 59 /* Too many references: can't splice */ #define ETIMEDOUT 60 /* Connection timed out */ #define ECONNREFUSED 61 /* Connection refused */ #define ENETDOWN 62 /* Network is down */ #define ETXTBSY 63 /* Text file busy */ #define ELOOP 64 /* Too many levels of symbolic links */ #define EHOSTUNREACH 65 /* No route to host */ #define ENOTBLK 66 /* Block device required */ #define EHOSTDOWN 67 /* Host is down */ /* non-blocking and interrupt i/o */ #define EINPROGRESS 68 /* Operation now in progress */ #define EALREADY 69 /* Operation already in progress */ #define EWOULDBLOCK 70 /* Operation would block */ #define ENOSYS 71 /* Function not implemented */ /* aio errors (should be under posix) */ #define ECANCELED 72 /* Operation canceled */ #define ERRMAX 81 /* specific STREAMS errno values */ #define ENOSR 74 /* Insufficient memory */ #define ENOSTR 75 /* STREAMS device required */ #define EPROTO 76 /* Generic STREAMS error */ #define EBADMSG 77 /* Invalid STREAMS message */ #define ENODATA 78 /* Missing expected message data */ #define ETIME 79 /* STREAMS timeout occurred */ #define ENOMSG 80 /* Unexpected message type */ /* Other errno */ #endif
#ifndef SRC_GRAPHICS_CUBE_H_ #define SRC_GRAPHICS_CUBE_H_ #include <Eigen/Core> #include <vector> #include <string> #include "./render_data.h" #include "./renderable.h" #include "./object_manager.h" #include "./shader_program.h" namespace Graphics { /** * \brief Draws a cube of size 1x1x1 centered at the origin * */ class Cube : public Renderable { public: Cube(); protected: virtual ObjectData createBuffers(std::shared_ptr<ObjectManager> objectManager, std::shared_ptr<TextureManager> textureManager, std::shared_ptr<ShaderManager> shaderManager); private: std::vector<Eigen::Vector3f> points; static const int indexCount = 36; ObjectData objectData; void createPoints(); }; } // namespace Graphics #endif // SRC_GRAPHICS_CUBE_H_
#ifndef BITCOINFIELD_H #define BITCOINFIELD_H #include <QWidget> //#include <QVariant> QT_BEGIN_NAMESPACE class QDoubleSpinBox; class QValueComboBox; QT_END_NAMESPACE /** Widget for entering bitcoin amounts. */ class BitcoinAmountField: public QWidget { Q_OBJECT Q_PROPERTY(qint64 value READ value WRITE setValue NOTIFY textChanged USER true) public: explicit BitcoinAmountField(QWidget *parent = 0); qint64 value(bool *valid=0) const; void setValue(qint64 value); /** Mark current value as invalid in UI. */ void setValid(bool valid); /** Perform input validation, mark field as invalid if entered value is not valid. */ bool validate(); /** Change unit used to display amount. */ void setDisplayUnit(int unit); /** Make field empty and ready for new input. */ void clear(); /** Qt messes up the tab chain by default in some cases (issue https://bugreports.qt-project.org/browse/QTBUG-10907), in these cases we have to set it up manually. */ QWidget *setupTabChain(QWidget *prev); // QVariant inputMethodQuery(Qt::InputMethodQuery property) const; // Q_INVOKABLE QVariant inputMethodQuery(Qt::InputMethodQuery query, QVariant argument) const; signals: void textChanged(); protected: /** Intercept focus-in event and ',' key presses */ bool eventFilter(QObject *object, QEvent *event); private: QDoubleSpinBox *amount; QValueComboBox *unit; int currentUnit; void setText(const QString &text); QString text() const; private slots: void unitChanged(int idx); }; #endif // BITCOINFIELD_H
// // PersonModel.h // glimworm_ibeacon // // Created by Jonathan Carter on 22/12/2013. // Copyright (c) 2013 Jonathan Carter. All rights reserved. // @import CoreLocation; @import CoreBluetooth; @interface BTDeviceModel : NSObject { NSString * name; NSString * UUID; CFUUIDRef * uuidref; NSNumber * RSSI; CBPeripheral * peripheral; NSString * ib_uuid; NSString * ib_major; NSString * ib_minor; NSString * found; int batterylevel; NSString * ID; } @property(retain, readwrite) NSString * name; @property(retain, readwrite) NSString * UUID; @property(retain, readwrite) NSNumber * RSSI; @property(readwrite) CFUUIDRef * uuidref; @property(nonatomic, strong, readwrite) CBPeripheral * peripheral; @property(retain, readwrite) NSString * ib_uuid; @property(retain, readwrite) NSString * ib_major; @property(retain, readwrite) NSString * ib_minor; @property(retain, readwrite) NSString * found; @property(retain, readwrite) NSString * ID; @property(readwrite) int batterylevel; @end
#ifndef NETTOMON_TRANSPORTLAYERPROCESSOR_H #define NETTOMON_TRANSPORTLAYERPROCESSOR_H #include <stdint.h> #include <sys/types.h> class TransportLayerProcessor { public: virtual ~TransportLayerProcessor() { } virtual uint16_t getSourcePort(const u_char *header) = 0; virtual uint16_t getDestinationPort(const u_char *header) = 0; }; #endif //NETTOMON_TRANSPORTLAYERPROCESSOR_H
#ifndef __COMMON_PROTOCOL_H__ #define __COMMON_PROTOCOL_H__ #include <stdint.h> #include "../main.h" #include "../ingame.h" typedef enum PacketType PacketType; enum PacketType { PACKET_TYPE_LOBBY, PACKET_TYPE_JOIN, PACKET_TYPE_START, PACKET_TYPE_MOVE_OBJECT, PACKET_TYPE_SOUND, PACKET_TYPE_KEYPRESS, PACKET_TYPE_EXIT, }; typedef struct PacketLobby PacketLobby; struct PacketLobby { uint16_t type; uint16_t size; char name[NAME_LEN_MAX]; }; typedef struct PacketJoin PacketJoin; struct PacketJoin { uint16_t type; uint16_t size; uint32_t id; char name[NAME_LEN_MAX]; }; typedef struct PacketStart PacketStart; struct PacketStart { uint16_t type; uint16_t size; uint32_t player_id; }; typedef struct PacketKeypress PacketKeypress; struct PacketKeypress { uint16_t type; uint16_t size; struct InGameKeyStateEntry keypress, keyrelease; }; typedef struct PacketParticleBurst PacketParticleBurst; struct PacketParticleBurst { uint16_t type; uint16_t size; uint8_t point_size; uint8_t color_r; uint8_t color_g; uint8_t color_b; uint8_t color_a; uint8_t color_rt; uint8_t color_gt; uint8_t color_bt; uint8_t color_at; int16_t angle_min; int16_t angle_max; int16_t gravity_x; int16_t gravity_y; int16_t velocity_min; int16_t velocity_max; int16_t spawnrate; int16_t life; }; typedef struct PacketSound PacketSound; struct PacketSound { uint16_t type; uint16_t size; uint8_t sound; }; typedef struct PacketExit PacketExit; struct PacketExit { uint16_t type; uint16_t size; uint32_t player; char name[NAME_LEN_MAX]; }; typedef union Packet Packet; union Packet { struct { uint16_t type; uint16_t size; uint8_t raw[512]; }; PacketLobby lobby; PacketJoin join; PacketStart start; PacketSound sound; PacketKeypress keypress; PacketExit exit; }; int protocol_send_packet(int sock, Packet *pack); int protocol_recv_packet(int sock, Packet *pack); #endif
#ifndef PLAYER_Equipment_H_INCLUDED #define PLAYER_Equipment_H_INCLUDED #include <SFML/Graphics.hpp> #include "Equipment_Data.h" class Equippable { public: void setData (const Equipment::Data& data); void setUp(const sf::Vector2f& size, const sf::RectangleShape& attatchment, const sf::Vector2f& offset, const sf::Vector2f& origin = {0, 0}); void input (); void update (); void draw (); const Equipment::Data& getData() const; const sf::RectangleShape& getSprite() const; void setTextureRect (const sf::IntRect& rect); private: sf::RectangleShape m_sprite; const sf::RectangleShape* m_p_attatchment; sf::Vector2f m_attatchmentOffset; const Equipment::Data* m_p_data; bool m_isSetup = false; }; #endif // PLAYER_Equipment_H_INCLUDED
/* * rtGetNaN.c * * Real-Time Workshop code generation for Simulink model "Template_test.mdl". * * Model Version : 1.13 * Real-Time Workshop version : 7.3 (R2009a) 15-Jan-2009 * C source code generated on : Thu Mar 20 15:07:33 2014 * * Target selection: nidll.tlc * Note: GRT includes extra infrastructure and instrumentation for prototyping * Embedded hardware selection: 32-bit Generic * Code generation objectives: Unspecified * Validation result: Not run * */ /* * Abstract: * Real-Time Workshop function to intialize non-finite, NaN */ #include "rtGetNaN.h" #define NumBitsPerChar 8 /* Function: rtGetNaN ================================================== * Abstract: * Initialize rtNaN needed by the generated code. * NaN is initialized as non-signaling. Assumes IEEE. */ real_T rtGetNaN(void) { size_t bitsPerReal = sizeof(real_T) * (NumBitsPerChar); real_T nan = 0.0; if (bitsPerReal == 32) { nan = rtGetNaNF(); } else { uint16_T one = 1; enum { LittleEndian, BigEndian } machByteOrder = (*((uint8_T *) &one) == 1) ? LittleEndian : BigEndian; switch (machByteOrder) { case LittleEndian: { typedef struct { struct { uint32_T wordL; uint32_T wordH; } words; } LittleEndianIEEEDouble; union { LittleEndianIEEEDouble bitVal; real_T fltVal; } tmpVal; tmpVal.bitVal.words.wordH = 0xFFF80000; tmpVal.bitVal.words.wordL = 0x00000000; nan = tmpVal.fltVal; break; } case BigEndian: { typedef struct { struct { uint32_T wordH; uint32_T wordL; } words; } BigEndianIEEEDouble; union { BigEndianIEEEDouble bitVal; real_T fltVal; } tmpVal; tmpVal.bitVal.words.wordH = 0x7FFFFFFF; tmpVal.bitVal.words.wordL = 0xFFFFFFFF; nan = tmpVal.fltVal; break; } } } return nan; } /* Function: rtGetNaNF ================================================== * Abstract: * Initialize rtNaNF needed by the generated code. * NaN is initialized as non-signaling. Assumes IEEE. */ real32_T rtGetNaNF(void) { typedef struct { union { real32_T wordLreal; uint32_T wordLuint; } wordL; } IEEESingle; IEEESingle nanF; uint16_T one = 1; enum { LittleEndian, BigEndian } machByteOrder = (*((uint8_T *) &one) == 1) ? LittleEndian : BigEndian; switch (machByteOrder) { case LittleEndian: { nanF.wordL.wordLuint = 0xFFC00000; break; } case BigEndian: { nanF.wordL.wordLuint = 0x7FFFFFFF; break; } } return nanF.wordL.wordLreal; } #undef NumBitsPerChar /* end rt_getNaN.c */
#include <stdio.h> #include <ctype.h> #include <math.h> double atof(char s[]); int main(void) { char t1[5] = "30"; // -> 30 char t2[5] = "30."; // 30 char t3[5] = "0.30"; // 0.3 char t4[5] = ".30"; // 0.3 char t5[5] = "3e1"; // 30 char t6[6] = "3.0e1"; // 30 char t7[5] = "e1"; // -> 0, perhaps it should give 10 instead? char t8[5] = "3e-1"; // -> 0.3 char t9[5] = "-3e3"; // -> -3000 printf("1In: %s\tOut:%f\n", t1, atof(t1)); printf("2In: %s\tOut:%f\n", t2, atof(t2)); printf("3In: %s\tOut:%f\n", t3, atof(t3)); printf("4In: %s\tOut:%f\n", t4, atof(t4)); printf("5In: %s\tOut:%f\n", t5, atof(t5)); printf("6In: %s\tOut:%f\n", t6, atof(t6)); printf("7In: %s\tOut:%f\n", t7, atof(t7)); printf("8In: %s\tOut:%f\n", t8, atof(t8)); printf("9In: %s\tOut:%f\n", t9, atof(t9)); } /* atof: converts a string in the form of ([+-])?([0-9]+)(\.[0-9]*)?([eE][0-9]+)? to a double in base 10 */ double atof(char s[]) { double val; int i, sign, power, exp, expsign; for (i = 0; isspace(s[i]); i++) ; /* skip whitespace padding on the left */ sign = (s[i] == '-' ? -1 : 1); if (s[i] == '-' || s[i] == '+') i++; for (val = 0.0; isdigit(s[i]); i++) val = 10 * val + (s[i] - '0'); if (s[i] == '.') i++; for (power = 0; isdigit(s[i]); i++) { val = 10 * val + (s[i] - '0'); power--; } if (s[i] == 'e' || s[i] == 'E') /* this would be a great use case for recursion, but I don't yet know how to slice an array */ i++; expsign = (s[i] == '-' ? -1 : 1); if (s[i] == '-' || s[i] == '+') i++; for (exp = 0; isdigit(s[i]); i++) /* seperate variables are necessary unless we know how many places are in the exponent */ exp = 10 * exp + (s[i] - '0'); exp *= expsign; exp += power; val *= sign; return val * pow(10, exp); }
#pragma once namespace Event { class ListenerInterface; class Event; } namespace Allocator { class MainAllocator; } #include <vxLib/Container/array.h> #include <vxLib/Container/DoubleBuffer.h> #include <gamelib/DebugAllocator.h> #include <gamelib/Event.h> class EventManager { struct ListenerEntry { Event::ListenerInterface* listener; u32 mask; }; vx::DoubleBuffer<Event::Event, DebugAllocatorEvent<Allocator::MainAllocator>> m_events; vx::array<ListenerEntry, DebugAllocatorEvent<Allocator::MainAllocator>> m_listeners; public: EventManager(); ~EventManager(); bool initialize(Allocator::MainAllocator* allocator, size_t evtCapacity, size_t listenerCapacity); void shutdown(); void swap(EventManager &other); void update(); void pushEvent(const Event::Event &evt); void registerListener(Event::ListenerInterface* listener, u32 mask); };
// // AxcUI_StarRatingView.h // AxcUIKit // // Created by Axc on 2017/7/3. // Copyright © 2017年 Axc_5324. All rights reserved. // @import UIKit; IB_DESIGNABLE // XIB老大,我干你先人。。api就不能详细点 /** 星级评分器 */ @interface AxcUI_StarRatingView : UIControl /** * 最大值 */ @property (nonatomic) IBInspectable NSUInteger axcUI_maximumValue; /** * 最小值 */ @property (nonatomic) IBInspectable CGFloat axcUI_minimumValue; /** * 当前值 */ @property (nonatomic) IBInspectable CGFloat axcUI_value; /** * 间距 */ @property (nonatomic) IBInspectable CGFloat axcUI_spacing; /** * 允许一半(.5)显示 */ @property (nonatomic) IBInspectable BOOL axcUI_allowsHalfStars; /** * 更精准显示 */ @property (nonatomic) IBInspectable BOOL axcUI_accurateHalfStars; /** * 边线颜色 */ @property (nonatomic, strong) IBInspectable UIColor *axcUI_starBorderColor; /** * 边线宽度 */ @property (nonatomic) IBInspectable CGFloat axcUI_starBorderWidth; /** * 填充宽度 */ @property (nonatomic, strong) IBInspectable UIColor *axcUI_emptyStarColor; /** * 未填充的图片 */ @property (nonatomic, strong) IBInspectable UIImage *axcUI_emptyStarImage; /** * 填充一半的图片 */ @property (nonatomic, strong) IBInspectable UIImage *axcUI_halfStarImage; /** * 填满的图片 */ @property (nonatomic, strong) IBInspectable UIImage *axcUI_filledStarImage; /** * 是否连续(默认无需设置) */ @property (nonatomic) IBInspectable BOOL axcUI_continuous; /** * 第一响应者(默认无需设置) */ @property (nonatomic) BOOL axcUI_shouldBecomeFirstResponder; @end
/* * rfc.h, part of "knet" project. * * Created on: 05.06.2015, 23:00 * Author: Vsevolod Lutovinov <klopp@yandex.ru> */ #ifndef RFC_H_ #define RFC_H_ #include "../klib/config.h" #include <time.h> char * rfc1123_date( char * buf, time_t t ); #endif /* RFC_H_ */
#pragma once // #include "sprite.h" #include <allegro5/allegro.h> #include <allegro5/allegro_image.h> enum mouse_state { normal, attack, selection, repair, }; class cursor{ public: cursor(ALLEGRO_BITMAP *parent, ALLEGRO_DISPLAY *display); void set_cursor(ALLEGRO_DISPLAY *display, int cursor_type); // void normal(ALLEGRO_DISPLAY *display); // void attack(ALLEGRO_DISPLAY *display); // void selection(ALLEGRO_DISPLAY *display); // void repair(ALLEGRO_DISPLAY *display); ~cursor(); private: mouse_state current_state; ALLEGRO_BITMAP *split_sprites[4]; ALLEGRO_MOUSE_CURSOR *current_cursor; };
// // UIImageView+FKLDownload.h // BuDeJie // // Created by kun on 16/8/27. // Copyright © 2016年 kun. All rights reserved. // #import <UIKit/UIKit.h> #import <UIImageView+WebCache.h> @interface UIImageView (FKLDownload) - (void)fkl_setOriginImage:(NSString *)originImageURL thumbnailImage:(NSString *)thumbnailImageURL placeholderImage:(UIImage *)placeholderImage completed:(SDWebImageCompletionBlock)completedBlock; - (void)fkl_setCircleHeader:(NSString *)headerURL; @end
#ifndef MAKISE_COLORS_H #define MAKISE_COLORS_H 1 #ifdef __cplusplus extern "C" { #endif #include <stdint.h> #include "makise_config.h" #ifndef MAKISE_COLOR_CUSTOM_TYPE typedef uint32_t MColor; #define MC_Transparent UINT32_MAX #endif #ifndef MC_Transparent #define MC_Transparent UINT32_MAX #endif #ifndef MC_IS_Transparent #define MC_IS_Transparent(c) (c == MC_Transparent) #endif #if defined MAKISEGUI_BUFFER_DEPTH && MAKISEGUI_BUFFER_DEPTH <= 4 typedef enum { #if MAKISEGUI_BUFFER_DEPTH == 1 && MAKISEGUI_DISPLAY_INVERTED MC_Black = 1, MC_White = 0, #else MC_Black = 0, MC_White = 1, #endif #if MAKISEGUI_BUFFER_DEPTH >= 2 MC_Red , MC_Green , #endif #if MAKISEGUI_BUFFER_DEPTH == 4 MC_Blue , MC_Yellow , MC_Magenta , MC_Cyan , MC_Lime , MC_Gray , MC_Maroon , MC_Navy , #endif } MColorPalette; #endif #if MAKISEGUI_BUFFER_DEPTH == 16 && MAKISEGUI_BUFFER_DEPTH == MAKISEGUI_DRIVER_DEPTH #define MC_Black 0x0000 #define MC_White 0xFFFF #define MC_Red 0xF800 #define MC_Green 0x07E0 #define MC_Blue 0x001F #define MC_Yellow 0xFFE0 #define MC_Magenta 0xF81F #define MC_Cyan 0x07FF #define MC_Lime 0x7FFA #define MC_Gray 0x94B2 #define MC_Maroon 0x8000 #define MC_Navy 0x0010 #endif #if MAKISEGUI_BUFFER_DEPTH != MAKISEGUI_DRIVER_DEPTH extern uint32_t *makise_color_palette; #endif //Get color value from value from buffer display. uint32_t makise_color_get(uint32_t c); #ifdef __cplusplus } #endif #endif
#include "clay.h" #include "server.h" clay_variables build_clay_variables(spade_server* server, http_request* request, clay_handler* handler, int incoming_socket) { clay_variables variables; variables.incoming_socket = incoming_socket; strcpy(variables.server_software, SPADE_SERVER_DESCRIPTOR); strcpy(variables.server_name, server->hostname); strcpy(variables.gateway_interface, CGI_VERSION); strcpy(variables.server_protocol, "HTTP/1.0"); char stringified_port[MAX_PORT_LENGTH]; sprintf(stringified_port, "%d", server->port); strcpy(variables.server_port, stringified_port); strcpy(variables.request_method, http_method_to_string(request->method)); strcpy(variables.script_name, handler->path); strcpy(variables.query_string, request->uri.query_string); if(request->remote_host[0] != '\0') { strcpy(variables.remote_host, request->remote_host); } strcpy(variables.remote_address, request->remote_address); return variables; }
/******************************************************************************** ** Form generated from reading UI file 'transactiondescdialog.ui' ** ** Created: Fri May 30 16:04:39 2014 ** by: Qt User Interface Compiler version 4.8.4 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ #ifndef UI_TRANSACTIONDESCDIALOG_H #define UI_TRANSACTIONDESCDIALOG_H #include <QtCore/QVariant> #include <QtGui/QAction> #include <QtGui/QApplication> #include <QtGui/QButtonGroup> #include <QtGui/QDialog> #include <QtGui/QDialogButtonBox> #include <QtGui/QHeaderView> #include <QtGui/QTextEdit> #include <QtGui/QVBoxLayout> QT_BEGIN_NAMESPACE class Ui_TransactionDescDialog { public: QVBoxLayout *verticalLayout; QTextEdit *detailText; QDialogButtonBox *buttonBox; void setupUi(QDialog *TransactionDescDialog) { if (TransactionDescDialog->objectName().isEmpty()) TransactionDescDialog->setObjectName(QString::fromUtf8("TransactionDescDialog")); TransactionDescDialog->resize(620, 250); verticalLayout = new QVBoxLayout(TransactionDescDialog); verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); detailText = new QTextEdit(TransactionDescDialog); detailText->setObjectName(QString::fromUtf8("detailText")); detailText->setReadOnly(true); verticalLayout->addWidget(detailText); buttonBox = new QDialogButtonBox(TransactionDescDialog); buttonBox->setObjectName(QString::fromUtf8("buttonBox")); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Close); verticalLayout->addWidget(buttonBox); retranslateUi(TransactionDescDialog); QObject::connect(buttonBox, SIGNAL(accepted()), TransactionDescDialog, SLOT(accept())); QObject::connect(buttonBox, SIGNAL(rejected()), TransactionDescDialog, SLOT(reject())); QMetaObject::connectSlotsByName(TransactionDescDialog); } // setupUi void retranslateUi(QDialog *TransactionDescDialog) { TransactionDescDialog->setWindowTitle(QApplication::translate("TransactionDescDialog", "Transaction details", 0, QApplication::UnicodeUTF8)); #ifndef QT_NO_TOOLTIP detailText->setToolTip(QApplication::translate("TransactionDescDialog", "This pane shows a detailed description of the transaction", 0, QApplication::UnicodeUTF8)); #endif // QT_NO_TOOLTIP } // retranslateUi }; namespace Ui { class TransactionDescDialog: public Ui_TransactionDescDialog {}; } // namespace Ui QT_END_NAMESPACE #endif // UI_TRANSACTIONDESCDIALOG_H
#pragma once #include "guilibimpl/win32.h" namespace GuiLib { class WidgetImpl; using WndProcAdapter = LRESULT(*)(WidgetImpl*, UINT aMsg, WPARAM aWP, LPARAM aLP); SafeVirtualSpace makeThunk(const HWND* aHwnd, const WidgetImpl* aWidgetImpl, WndProcAdapter wndProcAdapter); void optimizeThunkCall(SafeVirtualSpace& aThunk, HWND aWnd); }