text stringlengths 4 6.14k |
|---|
/*-------------------------------------------------------------------------
*
* mingwcompat.c
* MinGW compatibility functions
*
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/port/win32/mingwcompat.c,v 1.4 2008/01/01 19:45:51 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#include "postgres.h"
/*
* This file contains loaders for functions that are missing in the MinGW
* import libraries. It's only for actual Win32 API functions, so they are
* all present in proper Win32 compilers.
*/
#ifndef WIN32_ONLY_COMPILER
static HMODULE kernel32 = NULL;
/*
* Load DLL file just once regardless of how many functions
* we load/call in it.
*/
static void
LoadKernel32()
{
if (kernel32 != NULL)
return;
kernel32 = LoadLibraryEx("kernel32.dll", NULL, 0);
if (kernel32 == NULL)
ereport(FATAL,
(errmsg_internal("could not load kernel32.dll: %d",
(int) GetLastError())));
}
/*
* Replacement for RegisterWaitForSingleObject(), which lives in
* kernel32.dll·
*/
typedef
BOOL(WINAPI * __RegisterWaitForSingleObject)
(PHANDLE, HANDLE, WAITORTIMERCALLBACK, PVOID, ULONG, ULONG);
static __RegisterWaitForSingleObject _RegisterWaitForSingleObject = NULL;
BOOL WINAPI
RegisterWaitForSingleObject(PHANDLE phNewWaitObject,
HANDLE hObject,
WAITORTIMERCALLBACK Callback,
PVOID Context,
ULONG dwMilliseconds,
ULONG dwFlags)
{
if (_RegisterWaitForSingleObject == NULL)
{
LoadKernel32();
_RegisterWaitForSingleObject = (__RegisterWaitForSingleObject)
GetProcAddress(kernel32, "RegisterWaitForSingleObject");
if (_RegisterWaitForSingleObject == NULL)
ereport(FATAL,
(errmsg_internal("could not locate RegisterWaitForSingleObject in kernel32.dll: %d",
(int) GetLastError())));
}
return (_RegisterWaitForSingleObject)
(phNewWaitObject, hObject, Callback, Context, dwMilliseconds, dwFlags);
}
#endif
|
//
//
//////////////////////////////////////////////////////////////////////////////
//
// Copyright 2013 Autodesk, Inc. All rights reserved.
//
// Use of this software is subject to the terms of the Autodesk license
// agreement provided at the time of installation or download, or which
// otherwise accompanies this software in either electronic or hard copy form.
//
//////////////////////////////////////////////////////////////////////////////
//
//
// DESCRIPTION:
//
// This file contains "filer" class definitions of AcDbDeepCloneFiler
// and AcDbWblockCloneFiler. These filers maintain a queue of typed
// object id's. All read/write requests are forwarded to a contained
// "real" filer, except for object id's which are removed/added from/to
// the queue. The classes provide protocol for writing either "owned"
// or "hard" objects in the queue.
#ifndef AD_DBCFILERS_H
#define AD_DBCFILERS_H 1
#include "dbfiler.h"
#pragma pack (push, 8)
class AcDbWblockCloneFiler;
class AcDbImpDeepCloneFiler;
class AcDbDeepCloneFiler: public AcDbDwgFiler
{
friend class AcDbSystemInternals;
public:
ACRX_DECLARE_MEMBERS(AcDbDeepCloneFiler);
AcDbDeepCloneFiler();
virtual ~AcDbDeepCloneFiler();
// overridden from AcDbDwgFiler
//
virtual Acad::ErrorStatus filerStatus() const;
virtual AcDb::FilerType filerType() const;
virtual void setFilerStatus(Acad::ErrorStatus);
virtual void resetFilerStatus();
virtual Acad::ErrorStatus readHardOwnershipId(AcDbHardOwnershipId*);
virtual Acad::ErrorStatus writeHardOwnershipId(const AcDbHardOwnershipId&);
virtual Acad::ErrorStatus readSoftOwnershipId(AcDbSoftOwnershipId*);
virtual Acad::ErrorStatus writeSoftOwnershipId(const AcDbSoftOwnershipId&);
virtual Acad::ErrorStatus readHardPointerId(AcDbHardPointerId*);
virtual Acad::ErrorStatus writeHardPointerId(const AcDbHardPointerId&);
virtual Acad::ErrorStatus readSoftPointerId(AcDbSoftPointerId*);
virtual Acad::ErrorStatus writeSoftPointerId(const AcDbSoftPointerId&);
virtual Acad::ErrorStatus readInt8(Adesk::Int8 *);
virtual Acad::ErrorStatus writeInt8(Adesk::Int8);
// This flavor of readString may go away in a future release.
virtual Acad::ErrorStatus readString(ACHAR **);
virtual Acad::ErrorStatus writeString(const ACHAR *);
virtual Acad::ErrorStatus readString(AcString &);
virtual Acad::ErrorStatus writeString(const AcString &);
virtual Acad::ErrorStatus readBChunk(ads_binary*);
virtual Acad::ErrorStatus writeBChunk(const ads_binary&);
virtual Acad::ErrorStatus readAcDbHandle(AcDbHandle*);
virtual Acad::ErrorStatus writeAcDbHandle(const AcDbHandle&);
virtual Acad::ErrorStatus readInt64(Adesk::Int64*);
virtual Acad::ErrorStatus writeInt64(Adesk::Int64);
virtual Acad::ErrorStatus readInt32(Adesk::Int32*);
virtual Acad::ErrorStatus writeInt32(Adesk::Int32);
virtual Acad::ErrorStatus readInt16(Adesk::Int16*);
virtual Acad::ErrorStatus writeInt16(Adesk::Int16);
virtual Acad::ErrorStatus readUInt64(Adesk::UInt64*);
virtual Acad::ErrorStatus writeUInt64(Adesk::UInt64);
virtual Acad::ErrorStatus readUInt32(Adesk::UInt32*);
virtual Acad::ErrorStatus writeUInt32(Adesk::UInt32);
virtual Acad::ErrorStatus readUInt16(Adesk::UInt16*);
virtual Acad::ErrorStatus writeUInt16(Adesk::UInt16);
virtual Acad::ErrorStatus readUInt8(Adesk::UInt8*);
virtual Acad::ErrorStatus writeUInt8(Adesk::UInt8);
virtual Acad::ErrorStatus readBoolean(Adesk::Boolean*);
virtual Acad::ErrorStatus writeBoolean(Adesk::Boolean);
virtual Acad::ErrorStatus readBool(bool*);
virtual Acad::ErrorStatus writeBool(bool);
virtual Acad::ErrorStatus readDouble(double*);
virtual Acad::ErrorStatus writeDouble(double);
virtual Acad::ErrorStatus readPoint2d(AcGePoint2d*);
virtual Acad::ErrorStatus writePoint2d(const AcGePoint2d&);
virtual Acad::ErrorStatus readPoint3d(AcGePoint3d*);
virtual Acad::ErrorStatus writePoint3d(const AcGePoint3d&);
virtual Acad::ErrorStatus readVector2d(AcGeVector2d*);
virtual Acad::ErrorStatus writeVector2d(const AcGeVector2d&);
virtual Acad::ErrorStatus readVector3d(AcGeVector3d*);
virtual Acad::ErrorStatus writeVector3d(const AcGeVector3d&);
virtual Acad::ErrorStatus readScale3d(AcGeScale3d*);
virtual Acad::ErrorStatus writeScale3d(const AcGeScale3d&);
virtual Acad::ErrorStatus readBytes(void*, Adesk::UIntPtr);
virtual Acad::ErrorStatus writeBytes(const void*, Adesk::UIntPtr);
virtual Acad::ErrorStatus readAddress(void **);
virtual Acad::ErrorStatus writeAddress(const void *);
virtual Acad::ErrorStatus seek(Adesk::Int64 nOffset, int nMethod);
virtual Adesk::Int64 tell() const;
virtual Acad::ErrorStatus addReferences(AcDbIdRefQueue&);
virtual bool usesReferences() const;
virtual AcDbFilerController& controller() const;
// Protocol specific to AcDbDeepCloneFiler
//
virtual bool getNextOwnedObject(AcDbObjectId& id);
virtual bool moreOwnedObjects() const;
protected:
AcDbDeepCloneFiler(AcDbSystemInternals*);
private:
AcDbImpDeepCloneFiler* mpImpFiler;
};
class AcDbWblockCloneFiler: public AcDbDeepCloneFiler
{
friend class AcDbSystemInternals;
public:
ACRX_DECLARE_MEMBERS(AcDbWblockCloneFiler);
AcDbWblockCloneFiler();
virtual Acad::ErrorStatus addReferences(AcDbIdRefQueue&);
virtual bool usesReferences() const;
virtual bool getNextHardObject(AcDbObjectId& id);
virtual bool moreHardObjects() const;
virtual AcDb::FilerType filerType() const;
};
#pragma pack (pop)
#endif
|
//
// SLViewController.h
// SLPodFrame
//
// Created by LiuShulong on 08/30/2015.
// Copyright (c) 2015 LiuShulong. All rights reserved.
//
@import UIKit;
@interface SLViewController : UIViewController
@end
|
/******************************************************************************
* $Id$
*
* Project: MapServer
* Purpose: Definitions for MapServer IO redirection capability.
* Author: Frank Warmerdam, warmerdam@pobox.com
*
******************************************************************************
* Copyright (c) 2004, Frank Warmerdam <warmerdam@pobox.com>
*
* 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 of this Software or works derived from this 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 MAPIO_H
#define MAPIO_H
/*
** We deliberately emulate stdio functions in the msIO cover functions.
** This makes it easy for folks to understand the semantics, and means we
** can just #define things to use stdio in the simplest case.
*/
#include <stdarg.h>
#ifdef __cplusplus
extern "C" {
#endif
#ifndef MS_PRINT_FUNC_FORMAT
#if defined(__GNUC__) && __GNUC__ >= 3 && !defined(DOXYGEN_SKIP)
#define MS_PRINT_FUNC_FORMAT( format_idx, arg_idx ) __attribute__((__format__ (__printf__, format_idx, arg_idx)))
#else
#define MS_PRINT_FUNC_FORMAT( format_idx, arg_idx )
#endif
#endif
/* stdio analogs */
int MS_DLL_EXPORT msIO_printf( const char *format, ... ) MS_PRINT_FUNC_FORMAT(1,2);
int MS_DLL_EXPORT msIO_fprintf( FILE *stream, const char *format, ... ) MS_PRINT_FUNC_FORMAT(2,3);
int MS_DLL_EXPORT msIO_fwrite( const void *ptr, size_t size, size_t nmemb, FILE *stream );
int MS_DLL_EXPORT msIO_fread( void *ptr, size_t size, size_t nmemb, FILE *stream );
int MS_DLL_EXPORT msIO_vfprintf( FILE *fp, const char *format, va_list ap );
/*
** Definitions for the callback function and the details of the IO
** channel contexts.
*/
typedef int (*msIO_llReadWriteFunc)( void *cbData, void *data, int byteCount );
typedef struct msIOContext_t {
const char *label;
int write_channel; /* 1 for stdout/stderr, 0 for stdin */
msIO_llReadWriteFunc readWriteFunc;
void *cbData;
} msIOContext;
int MS_DLL_EXPORT msIO_installHandlers( msIOContext *stdin_context,
msIOContext *stdout_context,
msIOContext *stderr_context );
msIOContext MS_DLL_EXPORT *msIO_getHandler( FILE * );
void MS_DLL_EXPORT msIO_setHeaderEnabled(int bFlag);
void msIO_setHeader (const char *header, const char* value, ...) MS_PRINT_FUNC_FORMAT(2,3);
void msIO_sendHeaders(void);
/*
** These can be used instead of the stdio style functions if you have
** msIOContext's for the channel in question.
*/
int msIO_contextRead( msIOContext *context, void *data, int byteCount );
int msIO_contextWrite( msIOContext *context, const void *data, int byteCount );
/*
** For redirecting IO to a memory buffer.
*/
typedef struct {
unsigned char *data;
int data_len; /* really buffer length */
int data_offset; /* really buffer used */
} msIOBuffer;
int MS_DLL_EXPORT msIO_bufferRead( void *, void *, int );
int MS_DLL_EXPORT msIO_bufferWrite( void *, void *, int );
void MS_DLL_EXPORT msIO_resetHandlers(void);
void MS_DLL_EXPORT msIO_installStdoutToBuffer(void);
void MS_DLL_EXPORT msIO_installStdinFromBuffer(void);
void MS_DLL_EXPORT msIO_Cleanup(void);
char MS_DLL_EXPORT *msIO_stripStdoutBufferContentType(void);
void MS_DLL_EXPORT msIO_stripStdoutBufferContentHeaders(void);
msIOContext *msIO_pushStdoutToBufferAndGetOldContext(void);
void msIO_restoreOldStdoutContext(msIOContext *context_to_restore);
int MS_DLL_EXPORT msIO_isStdContext(void);
/* this is just for setting normal stdout's to binary mode on windows */
int msIO_needBinaryStdout( void );
int msIO_needBinaryStdin( void );
#ifdef __cplusplus
}
#endif
#endif /* nef MAPIO_H */
|
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#pragma once
#include "DexClass.h"
#include "Pass.h"
class BridgeSynthInlinePass : public Pass {
public:
BridgeSynthInlinePass() : Pass("BridgeSynthInlinePass") {}
void run_pass(DexStoresVector&, ConfigFiles&, PassManager&) override;
};
|
// Stub header file of cuTENSOR
#ifndef INCLUDE_GUARD_STUB_CUPY_CUTENSOR_H
#define INCLUDE_GUARD_STUB_CUPY_CUTENSOR_H
#include "cupy_cuda_common.h"
extern "C" {
typedef enum {} cudaDataType_t;
typedef enum {
CUTENSOR_STATUS_SUCCESS = 0,
} cutensorStatus_t;
typedef enum {} cutensorAlgo_t;
typedef enum {} cutensorOperator_t;
typedef enum {} cutensorWorksizePreference_t;
typedef enum {} cutensorComputeType_t;
typedef void* cutensorHandle_t;
typedef void* cutensorTensorDescriptor_t;
typedef void* cutensorContractionDescriptor_t;
typedef void* cutensorContractionFind_t;
typedef void* cutensorContractionPlan_t;
cutensorStatus_t cutensorInit(...) {
return CUTENSOR_STATUS_SUCCESS;
}
cutensorStatus_t cutensorInitTensorDescriptor(...) {
return CUTENSOR_STATUS_SUCCESS;
}
cutensorStatus_t cutensorElementwiseTrinary(...) {
return CUTENSOR_STATUS_SUCCESS;
}
cutensorStatus_t cutensorElementwiseBinary(...) {
return CUTENSOR_STATUS_SUCCESS;
}
cutensorStatus_t cutensorInitContractionDescriptor(...) {
return CUTENSOR_STATUS_SUCCESS;
}
cutensorStatus_t cutensorInitContractionFind(...) {
return CUTENSOR_STATUS_SUCCESS;
}
cutensorStatus_t cutensorInitContractionPlan(...) {
return CUTENSOR_STATUS_SUCCESS;
}
cutensorStatus_t cutensorContraction(...) {
return CUTENSOR_STATUS_SUCCESS;
}
cutensorStatus_t cutensorContractionGetWorkspace(...) {
return CUTENSOR_STATUS_SUCCESS;
}
cutensorStatus_t cutensorContractionMaxAlgos(...) {
return CUTENSOR_STATUS_SUCCESS;
}
cutensorStatus_t cutensorReduction(...) {
return CUTENSOR_STATUS_SUCCESS;
}
cutensorStatus_t cutensorReductionGetWorkspace(...) {
return CUTENSOR_STATUS_SUCCESS;
}
cutensorStatus_t cutensorGetAlignmentRequirement(...) {
return CUTENSOR_STATUS_SUCCESS;
}
size_t cutensorGetVersion(...) {
return CUTENSOR_STATUS_SUCCESS;
}
const char* cutensorGetErrorString(...) {
return NULL;
}
} // extern "C"
#endif // #ifndef INCLUDE_GUARD_STUB_CUPY_CUTENSOR_H
|
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/wait.h>
int main()
{
pid_t pid = fork();
if (!pid) {
printf("I am child!\n");
exit(0);
} else {
int status;
if (waitpid(pid, &status, 0) < 0) {
perror("waitpid");
exit(-1);
}
if (WIFEXITED(status))
printf("Child process exit success!\n");
printf("WEXITSTATUS is %d\n", WEXITSTATUS(status));
}
return 0;
}
|
//
// CRVStompClient.h
// Objc-Stomp
//
//
// Implements the Stomp Protocol v1.0
// See: http://stomp.codehaus.org/Protocol
//
// Requires the AsyncSocket library
// See: http://code.google.com/p/cocoaasyncsocket/
//
// See: LICENSE
// Stefan Saasen <stefan@coravy.com>
// Based on StompService.{h,m} by Scott Raymond <sco@scottraymond.net>.
#import <Foundation/Foundation.h>
#import "AsyncSocket.h"
@class CRVStompClient;
typedef enum {
CRVStompAckModeAuto,
CRVStompAckModeClient
} CRVStompAckMode;
@protocol CRVStompClientDelegate <NSObject>
- (void)stompClient:(CRVStompClient *)stompService messageReceived:(NSString *)body withHeader:(NSDictionary *)messageHeader;
@optional
- (void)stompClientDidDisconnect:(CRVStompClient *)stompService;
- (void)stompClientWillDisconnect:(CRVStompClient *)stompService withError:(NSError*)error;
- (void)stompClientDidConnect:(CRVStompClient *)stompService;
- (void)serverDidSendReceipt:(CRVStompClient *)stompService withReceiptId:(NSString *)receiptId;
- (void)serverDidSendError:(CRVStompClient *)stompService withErrorMessage:(NSString *)description detailedErrorMessage:(NSString *) theMessage;
@end
@interface CRVStompClient : NSObject {
@private
id<CRVStompClientDelegate> delegate;
AsyncSocket *socket;
NSString *host;
NSUInteger port;
NSString *login;
NSString *passcode;
NSString *sessionId;
BOOL doAutoconnect;
BOOL anonymous;
}
@property (nonatomic, assign) id<CRVStompClientDelegate> delegate;
- (id)initWithHost:(NSString *)theHost
port:(NSUInteger)thePort
login:(NSString *)theLogin
passcode:(NSString *)thePasscode
delegate:(id<CRVStompClientDelegate>)theDelegate;
- (id)initWithHost:(NSString *)theHost
port:(NSUInteger)thePort
login:(NSString *)theLogin
passcode:(NSString *)thePasscode
delegate:(id<CRVStompClientDelegate>)theDelegate
autoconnect:(BOOL) autoconnect;
/**
* Connects as an anonymous user. Suppresses "login" and "passcode" headers.
*/
- (id)initWithHost:(NSString *)theHost
port:(NSUInteger)thePort
delegate:(id<CRVStompClientDelegate>)theDelegate
autoconnect:(BOOL) autoconnect;
- (void)connect;
- (void)sendMessage:(NSString *)theMessage toDestination:(NSString *)destination;
- (void)sendMessage:(NSString *)theMessage toDestination:(NSString *)destination withHeaders:(NSDictionary*)headers;
- (void)subscribeToDestination:(NSString *)destination;
- (void)subscribeToDestination:(NSString *)destination withAck:(CRVStompAckMode) ackMode;
- (void)subscribeToDestination:(NSString *)destination withHeader:(NSDictionary *) header;
- (void)unsubscribeFromDestination:(NSString *)destination;
- (void)begin:(NSString *)transactionId;
- (void)commit:(NSString *)transactionId;
- (void)abort:(NSString *)transactionId;
- (void)ack:(NSString *)messageId;
- (void)disconnect;
@end |
//
// KMMPasswordStrength.h
// KMMPasswordStrength
//
// Created by Kerr Marin Miller on 29/10/2014.
// Copyright (c) 2014 Kerr Marin Miller. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface KMMSmileyStrength : UIView
@property(nonatomic, strong) UIColor *textColour;
@property(nonatomic, assign) CGFloat textSize;
-(void)evaluatePassword:(NSString*)password;
-(void)evaluatePassword:(NSString*)password userInputs:(NSArray*)userInputs;
@end
|
//
// BlueView.h
// RAC_GatherClass
//
// Created by linxiang on 2017/5/2.
// Copyright © 2017年 minxing. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface BlueView : UIView
@end
|
C $Header$
C $Name$
c ==================================================================
c HEADER G_COST
c ==================================================================
c
c o Header for model-data comparison; adjoint part.
c
c started: Christian Eckert eckert@mit.edu 06-Apr-2000
c changed: Christian Eckert eckert@mit.edu
c heimbach@mit.edu 5-Nov-2003 retain only adfc
c
c ==================================================================
c HEADER G_COST
c ==================================================================
common /g_cost_r/
& g_fc
_RL g_fc
#ifdef ALLOW_COST_STATE_FINAL
common /g_cost_state_final_r/
& g_objf_state_final
cph _RL g_objf_state_final (snx,sny,nsx,nsy)
_RL g_objf_state_final (snx,sny,nsx,nsy,4*Nr+1)
#endif
#ifdef ALLOW_COST_VECTOR
common /g_cost_vector_r/
& g_objf_vector
_RL g_objf_vector(snx,nsx,nsy)
#endif
c ==================================================================
c END OF HEADER G_COST
c ==================================================================
|
//
// CFLAppConfigOrderedDictionary.h
// CFLAppConfig Pod
//
// Library helper: fixed order dictionary
// Works like NSDictionary but has a fixed order and is always mutable
//
//Import
@import Foundation;
//Interface definition
@interface CFLAppConfigOrderedDictionary : NSMutableDictionary
@end
|
// Standard libraries
#include <iostream>
#include <string>
#include <random> //random_device rd; rd(); // genereates a random number
// Library headers
#include "lgStack.h"
#include "lgQueue.h"
#include "lgError.h"
using namespace std;
void lgError(string message, string where);
void lgWarning(string message, string where); |
//
// CameraBlock.h
// sunflow
//
// Created by Okami Satoshi on 12/04/29.
// Copyright (c) 2012 Okami Satoshi. All rights reserved.
//
#ifndef _CameraBlock_h
#define _CameraBlock_h
#include "BaseBlock.h"
class CameraBlock : public BaseBlock {
public:
vec3f eye;
vec3f target;
vec3f up;
};
#endif
|
#include<stdio.h>
#include<stdlib.h>
#include "mpc.h"
//for windows platform
#ifdef _WIN32
#include <string.h>
//add fake readline function
char* readline(char* prompt)
{
fputs(prompt,stdout);
fgets(buffer,2048,stdin);
char* cpy = malloc(strelen(buffer)+1);
strcpy(cpy,buffer);
cpy[strlen(cpy)-1] = '\0';
return cpy;
}
//windows already has history support
void add_histoy(char* unused);
#else
#include<editline/readline.h>
#include<editline/history.h>
#endif
static char input[2048];
int main(int argc, char **argv)
{
/*Create some parsers*/
mpc_parser_t* Number = mpc_new("number");
mpc_parser_t* Operator = mpc_new("operator");
mpc_parser_t* Expr = mpc_new("expr");
mpc_parser_t* Lispy = mpc_new("lispy");
mpca_lang(MPCA_LANG_DEFAULT,
" \
\
number : /-?[0-9]+/ ; \
operator : '+' | '-' | '*' | '/' ; \
expr : <number> | '(' <operator> <expr>+ ')' ; \
lispy : /^/ <operator> <expr>+ /$/ ; \
",
Number,Operator,Expr,Lispy);
puts("Lispy version 0.0.0.1");
puts("Press ctrl+c to Exit\n");
while(1)
{
char *input=readline("xlisp> ");
add_history(input);
mpc_result_t r;
if(mpc_parse("<stdin>",input,Lispy,&r))
{
mpc_ast_print(r.output);
mpc_ast_delete(r.output);
}else {
mpc_err_print(r.error);
mpc_err_delete(r.error);
}
//printf("%s\n",input);
free(input);
}
mpc_cleanup(4,Number,Operator,Expr,Lispy);
return 0;
}
|
// Avisynth v2.5. Copyright 2002 Ben Rudiak-Gould et al.
// http://www.avisynth.org
// 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., 675 Mass Ave, Cambridge, MA 02139, USA, or visit
// http://www.gnu.org/copyleft/gpl.html .
//
// Linking Avisynth statically or dynamically with other modules is making a
// combined work based on Avisynth. Thus, the terms and conditions of the GNU
// General Public License cover the whole combination.
//
// As a special exception, the copyright holders of Avisynth give you
// permission to link Avisynth with independent modules that communicate with
// Avisynth solely through the interfaces defined in avisynth.h, regardless of the license
// terms of these independent modules, and to copy and distribute the
// resulting combined work under terms of your choice, provided that
// every copy of the combined work is accompanied by a complete copy of
// the source code of Avisynth (the version of Avisynth used to produce the
// combined work), being distributed under the terms of the GNU General
// Public License plus this exception. An independent module is a module
// which is not derived from or based on Avisynth, such as 3rd-party filters,
// import and export plugins, or graphical user interfaces.
// Overlay (c) 2003, 2004 by Klaus Post
#ifndef __444Convert_h
#define __444Convert_h
#include "../../internal.h"
#include "imghelpers.h"
class ConvertTo444 {
private:
VideoInfo* inputVi;
public:
ConvertTo444() {inputVi = 0; }
virtual void ConvertImage(PVideoFrame src_frame, Image444* dst_frame, IScriptEnvironment* env) {
env->ThrowError("Overlay: Unable to convert input image.");
}
virtual void ConvertImageLumaOnly(PVideoFrame src_frame, Image444* dst_frame, IScriptEnvironment* env) {
env->ThrowError("Overlay: Unable to convert input image.");
}
void SetVideoInfo(VideoInfo* in_vi) {
inputVi = in_vi;
}
};
class ConvertFrom444 {
public:
ConvertFrom444() {}
virtual PVideoFrame ConvertImage(Image444* src_frame, PVideoFrame dst_frame, IScriptEnvironment* env) {
env->ThrowError("Overlay: Unable to convert output image.");
return 0;
}
};
class Convert444FromYV12 : public ConvertTo444 {
public:
void ConvertImage(PVideoFrame src_frame, Image444* dst_frame, IScriptEnvironment* env);
void ConvertImageLumaOnly(PVideoFrame src_frame, Image444* dst_frame, IScriptEnvironment* env);
};
class Convert444FromYUY2 : public ConvertTo444 {
public:
void ConvertImage(PVideoFrame src_frame, Image444* dst_frame, IScriptEnvironment* env);
void ConvertImageLumaOnly(PVideoFrame src_frame, Image444* dst_frame, IScriptEnvironment* env);
};
class Convert444FromRGB : public ConvertTo444 {
private:
public:
void ConvertImage(PVideoFrame src_frame, Image444* dst_frame, IScriptEnvironment* env);
void ConvertImageLumaOnly(PVideoFrame src_frame, Image444* dst_frame, IScriptEnvironment* env);
};
// Uses LumaOnly from "Convert444FromRGB"
class Convert444NonCCIRFromRGB : public Convert444FromRGB {
private:
public:
void ConvertImage(PVideoFrame src_frame, Image444* dst_frame, IScriptEnvironment* env);
};
class Convert444ToYV12 : public ConvertFrom444 {
public:
PVideoFrame ConvertImage(Image444* src_frame, PVideoFrame dst_frame, IScriptEnvironment* env);
};
class Convert444ToYUY2 : public ConvertFrom444 {
public:
PVideoFrame ConvertImage(Image444* src_frame, PVideoFrame dst_frame, IScriptEnvironment* env);
};
class Convert444ToRGB : public ConvertFrom444 {
public:
PVideoFrame ConvertImage(Image444* src_frame, PVideoFrame dst_frame, IScriptEnvironment* env);
};
class Convert444NonCCIRToRGB : public ConvertFrom444 {
public:
PVideoFrame ConvertImage(Image444* src_frame, PVideoFrame dst_frame, IScriptEnvironment* env);
};
#endif //444Convert |
//
// Demo4ViewController.h
// QQLive
//
// Created by Scott_Mr on 2016/12/3.
// Copyright © 2016年 Scott. All rights reserved.
//
#import "ScottBaseViewController.h"
@interface Demo4ViewController : ScottBaseViewController
@end
|
/*
* Copyright (c) <2010> <Bryce Groff>
*
* 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 _CARD_H_
#define _CARD_H_
#include <libxml/parser.h>
#include <stdint.h>
class Card {
public:
Card();
Card(xmlChar* id, xmlChar* front, xmlChar* back,
xmlChar* backExample, int32_t pileNumber);
virtual ~Card();
void SetId(xmlChar* id);
int32_t GetId(xmlChar** id);
void SetFront(xmlChar* front);
int32_t GetFront(xmlChar** front);
void SetBack(xmlChar* back);
int32_t GetBack(xmlChar** back);
void SetBackExample(xmlChar* backExample);
int32_t GetBackExample(xmlChar** backExample);
void SetPileNumber(int32_t pileNumber) { fPileNumber = pileNumber; }
int32_t PileNumber() { return fPileNumber; }
void DumpToStdout();
private:
xmlChar* fId;
xmlChar* fFront;
xmlChar* fBack;
xmlChar* fBackExample;
int32_t fPileNumber;
};
#endif
|
#define BUILD_NUMBER 20
#define BUILD_DATE_YEAR 2021
#define BUILD_DATE_MONTH 2
#define BUILD_DATE_DAY 9
#define BUILD_TIME_HOUR 16
#define BUILD_TIME_MINUTE 36
#define BUILD_TIME_SECOND 16
#define BUILD_TIME_MILLISECOND 43
|
/*
* Copyright (c) 2006-2007 Erin Catto http://www.gphysics.com
*
* Permission to use, copy, modify, distribute and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appear in all copies.
* Erin Catto makes no representations about the suitability
* of this software for any purpose.
* It is provided "as is" without express or implied warranty.
*/
#ifndef BODY_H
#define BODY_H
#include "MathUtils.h"
struct Body
{
Body();
void Set(const Vec2& w, float m);
void AddForce(const Vec2& f)
{
force += f;
}
Vec2 position;
float rotation;
Vec2 velocity;
float angularVelocity;
Vec2 biasedVelocity;
float biasedAngularVelocity;
Vec2 force;
float torque;
Vec2 width;
float friction;
float mass, invMass;
float I, invI;
};
#endif
|
#include "ctr9/fs.h"
#include "fatfs/ff.h"
#include "fatfs/sdmmc.h"
static FATFS fs;
FSResult fsInit() {
return (FSResult) f_mount(&fs, "0:", 0);
}
FSResult fsExit() {
return (FSResult) f_mount(NULL, "0:", 0);
}
FSResult fsOpen(FileHandle* handle, const char* path, u8 flags) {
FSResult result = (FSResult) f_open((FIL*) handle, path, flags);
if(result == FS_OK) {
f_lseek((FIL*) handle, 0);
f_sync((FIL*) handle);
}
return result;
}
FSResult fsClose(FileHandle* handle) {
return (FSResult) f_close((FIL*) handle);
}
FSResult fsGetSize(FileHandle* handle, u32 *size) {
*size = (u32) f_size((FIL*) handle);
return FS_OK;
}
FSResult fsSeek(FileHandle* handle, u32 offset) {
return (FSResult) f_lseek((FIL*) handle, offset);
}
FSResult fsRead(FileHandle* handle, u32* bytesRead, void* buf, u32 size) {
return (FSResult) f_read((FIL*) handle, buf, size, (UINT*) bytesRead);
}
FSResult fsWrite(FileHandle* handle, u32* bytesWritten, void* buf, u32 size) {
FSResult result = (FSResult) f_write((FIL*) handle, buf, size, (UINT*) bytesWritten);
if(result == FS_OK) {
f_sync((FIL*) handle);
}
return result;
}
void fsReadNANDSectors(u32 sector, u32 sectors, void* buf) {
sdmmc_nand_readsectors(sector, sectors, buf);
}
void fsWriteNANDSectors(u32 sector, u32 sectors, void* buf) {
// TODO: sdmmc_nand_writesectors is not implemented yet.
//sdmmc_nand_writesectors(sector, sectors, buf);
} |
//
// ANetApiResponse.h
// ANMobilePaymentLib
//
// Created by Authorize.Net on 3/3/11.
// Copyright 2011 none. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "GDataXMLNode.h"
#import "Messages.h"
@interface ANetApiResponse : NSObject {
NSString *refId;
Messages *messages;
}
@property (nonatomic, retain) NSString *refId;
@property (nonatomic, retain) Messages *messages;
/**
* Creates an autoreleased object
* @return an autoreleased object.
*/
+ (ANetApiResponse *) anetApiResponse;
/**
* Class method that takes in GDataXMLElement and returns a fully parsed
* ANetApiResponse. If the method was not able to parse the response,
* a nil object is returned.
* @return The parsed ANetApiResponse from parsing the GDataXMLElement or nil if unable
* to parse the data.
*/
+ (ANetApiResponse *) buildANetApiResponse:(GDataXMLElement *)element;
@end
|
/* A utility function to kill the 'container.find(val) != std::end(container)
pattern. Use this function to check if a container contains some value.
For example,
void Foo(const std::map<int> &x) {
if (Contains(x, 15)) {
// Do something that you don't care about the value for.
} // if
}
Note that, if you do care about the value though. You'll still want to use
'find' to keep the iterator. Since a sequence of Contains then find will
perform 2 searches rather than one.
For example,
void Foo(const std::map<int> &x) {
auto iter = x.find(15);
if (iter != std::end(x)) {
// Do something with iter->second.
} // if
}
*/
#pragma once
#include <algorithm>
#include <iterator>
#include <type_traits>
namespace Base {
/**
* Detect if find exists.
**/
template <typename TContainer, typename TElem>
std::is_same<
decltype(std::declval<TContainer>().find(std::declval<TElem>())),
typename TContainer::iterator>
HasFindImpl(void *);
template <typename, typename>
std::false_type HasFindImpl(...);
template <typename TContainer, typename TElem>
static constexpr bool HasFind() {
return decltype(HasFindImpl<TContainer, TElem>(nullptr))::value;
}
/* Use member find if it exists. */
template <typename TContainer, typename TKey>
std::enable_if_t<HasFind<TContainer, TKey>(),
bool> Contains(const TContainer &container, const TKey &key) {
return container.find(key) != std::end(container);
}
/* Use std::find if no member find exists. */
template <typename TContainer, typename TVal>
std::enable_if_t<!HasFind<TContainer, TVal>(),
bool> Contains(const TContainer &container, const TVal &val) {
return std::find(std::begin(container),
std::end(container),
val) != std::end(container);
}
template <typename TContainer, typename TUnaryPred>
bool ContainsIf(const TContainer &container, TUnaryPred &&unary_pred) {
return std::find_if(std::begin(container),
std::end(container),
std::forward<TUnaryPred>(unary_pred)) != std::end(container);
}
} // namespace Base
|
// This file was generated based on 'C:\ProgramData\Uno\Packages\UnoCore\0.13.2\Source\Uno\Collections\$.uno'.
// WARNING: Changes might be lost if you edit this file directly.
#ifndef __APP_UNO_COLLECTIONS_I_ENUMERABLE__FUSE_ANIMATIONS_MIXER_HANDLE_FUSE_FONT__H__
#define __APP_UNO_COLLECTIONS_I_ENUMERABLE__FUSE_ANIMATIONS_MIXER_HANDLE_FUSE_FONT__H__
#include <app/Uno.Object.h>
#include <Uno.h>
namespace app {
namespace Uno {
namespace Collections {
::uInterfaceType* IEnumerable__Fuse_Animations_MixerHandle_Fuse_Font___typeof();
struct IEnumerable__Fuse_Animations_MixerHandle_Fuse_Font_
{
::uObject*(*__fp_GetEnumerator)(void*);
static ::uObject* GetEnumerator(::uObject* __this) { return ((IEnumerable__Fuse_Animations_MixerHandle_Fuse_Font_*)uGetInterfacePtr(__this, IEnumerable__Fuse_Animations_MixerHandle_Fuse_Font___typeof()))->__fp_GetEnumerator((::uByte*)__this + (__this->__obj_type->TypeType == uTypeTypeStruct ? sizeof(::uObject) : 0)); }
};
}}}
#endif
|
//
// SDRotationLoopProgressView.h
// SDProgressView
//
// Created by aier on 15-2-20.
// Copyright (c) 2015年 GSD. All rights reserved.
//
#import "SDBaseProgressView.h"
@interface SDRotationLoopProgressView : SDBaseProgressView
- (id)initWithFrame:(CGRect)frame backColor:(UIColor *)color;
@end
|
#pragma once
template<typename V, typename S>
struct Ray {
V start;
V end;
};
template<typename V, typename S>
struct Sphere {
V origin;
S radius;
};
template<typename V, typename S>
struct Capsule {
V start;
V end;
S radius;
};
template<typename V, typename S>
struct Hit {
V point;
V normal;
S t;
};
template<typename V, typename S>
bool hitSphere(Ray<V, S> const& ray,
Sphere<V, S> const& sphere,
Hit<V, S>& hit)
{
V rayVec = ray.end - ray.start;
V sphereVec = ray.start - sphere.origin;
S A = rayVec * rayVec;
S B = 2.0f * rayVec * sphereVec;
S C = sphereVec * sphereVec - sphere.radius * sphere.radius;
S Dsqr = B * B - 4.0f * A * C;
if (Dsqr < 0.0f) {
return false;
}
S D = sqrt(Dsqr);
S t0 = 0.5f * (-B - D) / A;
S t1 = 0.5f * (-B + D) / A;
if (t0 >= 0.0f && t0 <= 1.0f) {
hit.t = t0;
} else if (t1 >= 0.0f && t1 <= 1.0f) {
hit.t = t1;
} else {
return false;
}
hit.point = ray.start + rayVec * t0;
hit.normal = t0 >= 0.0f ? V(hit.point - sphere.origin).Normalize()
: V(sphere.origin - hit.point).Normalize();
return true;
}
template<typename V, typename S>
bool hitCapsule(Ray<V, S> const& ray,
Capsule<V, S> const& capsule,
Hit<V, S>& hit)
{
V rayVec = ray.end - ray.start;
V capsuleVec = capsule.end - capsule.start;
V projVec = capsuleVec.Reject(rayVec);
V capsuleOffset = capsuleVec.Reject(ray.start - capsule.start);
S A = projVec * projVec;
S B = 2.0f * projVec * capsuleOffset;
S C = capsuleOffset * capsuleOffset - capsule.radius * capsule.radius;
S Dsqr = B * B - 4.0f * A * C;
if (Dsqr < 0.0f) {
return false;
}
S D = sqrt(Dsqr);
S t0 = 0.5f * (-B - D) / A;
S t1 = 0.5f * (-B + D) / A;
S t = t0 >= 0.0f ? t0 : t1;
V hitPoint = ray.start + rayVec * t;
if (capsuleVec * (hitPoint - capsule.end) > 0.0f) {
return hitSphere(ray, {capsule.end, capsule.radius}, hit);
} else if (capsuleVec * (hitPoint - capsule.start) < 0.0f) {
return hitSphere(ray, {capsule.start, capsule.radius}, hit);
} else if (t < 0.0f || t > 1.0f) {
return false;
}
hit.t = t;
hit.point = hitPoint;
hit.normal = t0 >= 0.0f ? capsuleVec.Reject(hitPoint - capsule.start).Normalize()
: capsuleVec.Reject(capsule.start - hitPoint).Normalize();
return true;
}
|
//
// Keychain.h
// Linkstr
//
// Created by Joe Hildebrand on 8/22/07.
// Copyright 2007 Cursive Systems, Inc. All rights reserved.
//
#import <Cocoa/Cocoa.h>
@interface Poster : NSObject
{
IBOutlet NSWindow *m_win;
IBOutlet NSTextField *m_user;
IBOutlet NSTextField *m_pass;
int m_outstanding;
int m_total;
id m_delegate;
NSMutableArray *m_pending;
}
- (id)initWithDelegate:(id)delegate;
- (IBAction)done:(id)sender;
- (void)getURL:(NSString*)url;
- (void)getURL:(NSString*)url withParams:(NSDictionary*)params;
@end
@interface NSObject(PosterDelegateMethods)
- (void)poster:(Poster*)poster finishedOutstanding:(int)total;
- (void)poster:(Poster*)poster finishedLoading:(NSDictionary*)context;
@end
|
#ifndef __OMBT_MULTI_THREAD_SERVER_H
#define __OMBT_MULTI_THREAD_SERVER_H
// multithread single-service server
// headers
#include <stdio.h>
#include <servers/Server.h>
#include <sockets/EndPoint.h>
#include <threads/SimpleThread.h>
namespace ombt {
// threading server for a connection
class MultiThreadStreamServer: public Server
{
public:
// message handler
class Handler: public BaseObject {
public:
// ctor and dtor
Handler(): BaseObject(true) { }
virtual ~Handler() { }
// message handler
//
// return == 0 - ok and continue
// return < 0 - error and terminate
// return > 0 - ok, but terminate
virtual int operator()(EndPoint &peer) { return(1); }
};
// ctors and dtor
MultiThreadStreamServer(EndPoint &serverep, Handler &handler);
virtual ~MultiThreadStreamServer();
// operations
virtual int init();
virtual int run();
virtual int finish();
private:
// leper colony
MultiThreadStreamServer(const MultiThreadStreamServer &src);
MultiThreadStreamServer &operator=(const MultiThreadStreamServer &rhs);
protected:
// thread task to start up handler
class Task: public SimpleThread::Task {
public:
// ctor and dtor
Task(EndPoint &subserverep, Handler &handler);
virtual ~Task();
// worker functions
virtual int init();
virtual int run();
virtual int finish();
protected:
// data
EndPoint &subserverep_;
Handler &handler_;
};
// track handlers
EndPoint &serverep_;
Handler &handler_;
};
}
#endif
|
#pragma config(Hubs, S1, HTMotor, HTMotor, none, none)
#pragma config(Sensor, S2, irSeeker, sensorI2CCustom)
#pragma config(Motor, mtr_S1_C1_1, liftMotor, tmotorTetrix, openLoop)
#pragma config(Motor, mtr_S1_C1_2, motorFL, tmotorTetrix, openLoop, driveLeft, encoder)
#pragma config(Motor, mtr_S1_C2_1, motorBR, tmotorTetrix, openLoop, reversed, driveRight, encoder)
#pragma config(Motor, mtr_S1_C2_2, motorFR, tmotorTetrix, openLoop, reversed, driveRight, encoder)
#pragma config(Motor, mtr_S1_C3_1, motorBL, tmotorTetrix, openLoop, encoder)
#include <move.h>
#include <hitechnic-irseeker-v2.h>
#include <ir.h>
void moveToIR(){
readSensor(&irSeekerData);//retrieve data for initial vector
setIRVector(irVector);//sets values of irVector to current readings
while (irSeekerData.acValues[2] < 150) {
while (irSeekerData.acDirection != 5) {
setIRVector(irVector);//continuosly reevaluate vector
rotateRobot(irVector.angle);
readSensor(&irSeekerData);//retrieve data
}
moveRobot(2);
readSensor(&irSeekerData);//retrieve data
}
}
int detectFieldLayout(){ // Returns 1-3 depending on field layout, the robot, when starting on square (5,4), ends on the intersection (4,4) returns -1 if ir not foudn
int fieldLayout;
int inchesOffset;
inchesOffset = 0;
irInit(1200);
moveRobot(39);
rotateRobot(-PI/4+.1);
readSensor(&irSeekerData);
fieldLayout = irSeekerData.acDirection;
if (irSeekerData.acDirection > 0 && irSeekerData.acDirection < 5)
{
fieldLayout = 1;
}
if (irSeekerData.acDirection == 5) {
fieldLayout = 2;
}
if (irSeekerData.acDirection > 5) {
fieldLayout = 3;
}
while (irSeekerData.acDirection == 0 && inchesOffset < 24) { // Uh-oh.. the ir wasn't found (hopefully this doesn't happen). Try to back up until it comes into range. If back up more than a few feet, give up and cry.
moveRobot(-1);
inchesOffset++;
if (irSeekerData.acDirection > 0 && irSeekerData.acDirection < 5)
{
fieldLayout = 1;
}
if (irSeekerData.acDirection == 5) {
fieldLayout = 2;
}
if (irSeekerData.acDirection > 5) {
fieldLayout = 3;
}
}
moveRobot(inchesOffset-6);
stopRobot();
if (inchesOffset == 24) {
fieldLayout = -1;
}
return fieldLayout;
}
int detectFieldLayoutByMagnitude() {
int fieldLayout;
moveRobot(24);
fieldLayout=-1;
if (abs(getIRMagnitude()-50) < 10 && irSeekerData.acDirection == 7) {
fieldLayout = 3;
}
if (abs(getIRMagnitude()-30) < 10 && irSeekerData.acDirection == 5) {
fieldLayout = 2;
}
if (abs(getIRMagnitude()-54) < 10 && irSeekerData.acDirection == 5) {
fieldLayout = 1;
}
return fieldLayout;
}
void knockKickstand1() {
moveRobot(10);
rotateRobot(-(PI/4));
moveRobot(36);
rotateRobot(PI/2);
moveRobot(24);
}
void knockKickstand2() {
rotateRobot(-(PI/4));
moveRobot(19);
rotateRobot(PI/4);
moveRobot(37.5);
rotateRobot(PI/4);
}
void knockKickstand3() {
moveRobot(-4*sqrt(2));
rotateRobot(-PI/4+.2);
moveRobot(32);
rotateRobot(PI/2);
moveRobot(32);
rotateRobot(-PI/2);
moveRobot(21);
rotateRobot(PI/2);
}
void knockKickstandMag1() {
moveRobot(25);
rotateRobot(-PI/2.0);
moveRobot(73);
rotateRobot(PI/2.0);
moveRobot(48);
}
void knockKickstandMag2() {
rotateRobot(-PI/2.0);
moveRobot(30);
rotateRobot(PI/2.0);
moveRobot(26);
rotateRobot(-PI/2.0);
moveRobot(21);
rotateRobot(PI/2.0);
moveRobot(48);
}
void knockKickstandMag3() {
rotateRobot(-PI/2.0);
moveRobot(30);
rotateRobot(PI/2.0);
moveRobot(48);
rotateRobot(-PI/2.0);
moveRobot(21);
rotateRobot(PI/2.0);
}
|
///////////////////////////////////////////////////////////////////////////////
//
//
// (C) Copyright 2005 by Autodesk, Inc. All rights reserved.
//
// Permission to use, copy, modify, and distribute this software in
// object code form for any purpose and without fee is hereby granted,
// provided that the above copyright notice appears in all copies and
// that both that copyright notice and the limited warranty and
// restricted rights notice below appear in all supporting
// documentation.
//
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
// UNINTERRUPTED OR ERROR FREE.
//
// Use, duplication, or disclosure by the U.S. Government is subject to
// restrictions set forth in FAR 52.227-19 (Commercial Computer
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
// (Rights in Technical Data and Computer Software), as applicable.
//
///////////////////////////////////////////////////////////////////////////////
#ifndef DATAMODELATTRIBUTES_H
#include "DataModelAttributes.h"
#endif
#ifndef RGBGRAYMODEL_H
#include "RgbGrayModel.h"
#endif
#ifndef BITONALMODEL_H
#define BITONALMODEL_H
namespace Atil
{
// The data model for 1-bit images that are part of the RgbModel space.
// This datamodel is derived from RgbGrayModel. The foreground "on" or "1" pixels
// are considered to be white, and the background "off" or "0" pixels are considered
// to be black.
//
// This class is declared in BitonalModel.h. Its parent, RgbGrayModel, can be found
// in RgbGrayModel.h.
//
class BitonalModel : public RgbGrayModel
{
public:
BitonalModel ();
virtual ~BitonalModel ();
virtual DataModel* clone () const;
DataModelAttributes::DataModelType dataModelType () const;
virtual DataModelAttributes::PixelType pixelType () const;
virtual bool canConvertTo (const ColorModelInterface* colorModel) const;
virtual RowProviderInterface* getModelConversionTo (
const ColorModelInterface* colorModel, RowProviderInterface* pConvert) const;
virtual bool canConvertFrom (const ColorModelInterface* colorModel) const;
virtual RowProviderInterface* getModelConversionFrom (
const ColorModelInterface* colorModel, RowProviderInterface* pConvert) const;
};
}
#endif
|
/*
* Copyright 2004-2005 The Unichrome Project [unichrome.sf.net]
*
*
* 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, sub license,
* 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 (including the
* next paragraph) 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 _VIA_ID_H_
#define _VIA_ID_H_ 1
/* Chip tags, used to group the adapters into families. */
enum VIACHIPTAGS {
VIA_UNKNOWN = 0,
VIA_CLE266,
VIA_KM400,
VIA_K8M800,
VIA_PM800,
VIA_VM800,
VIA_K8M890,
VIA_P4M900,
VIA_CX700,
VIA_P4M890,
VIA_VX800,
VIA_VX855,
VIA_VX900,
VIA_LAST
};
#define PCI_VIA_VENDOR_ID 0x1106
#define PCI_CHIP_CLE3122 0x3122 /* CLE266 */
#define PCI_CHIP_VT3205 0x7205 /* KM400 */
#define PCI_CHIP_VT3204 0x3108 /* K8M800 */
#define PCI_CHIP_VT3259 0x3118 /* PM800 */
#define PCI_CHIP_VT3314 0x3344 /* VM800 */
#define PCI_CHIP_VT3336 0x3230 /* K8M890 */
#define PCI_CHIP_VT3364 0x3371 /* P4M900 */
#define PCI_CHIP_VT3324 0x3157 /* CX700 */
#define PCI_CHIP_VT3327 0x3343 /* P4M890 */
#define PCI_CHIP_VT3353 0x1122 /* VX800 */
#define PCI_CHIP_VT3409 0x5122 /* VX855/VX875 */
#define PCI_CHIP_VT3410 0x7122 /* VX900 */
/* There is some conflicting information about the two major revisions of
* the CLE266, often labelled Ax and Cx. The dividing line seems to be
* either 0x0f or 0x10. */
#define CLE266_REV_IS_AX(x) ((x) < 0x10)
#define CLE266_REV_IS_CX(x) ((x) >= 0x10)
struct ViaCardIdStruct {
char* String; /* full identification string */
CARD8 Chip; /* which family of unichrome */
CARD16 Vendor; /* PCI subsystem Vendor ID */
CARD16 Device; /* PCI subsystem Device ID */
CARD8 Outputs; /* whether it supports CRT, LCD, and TV */
};
void ViaDoubleCheckCLE266Revision(ScrnInfoPtr pScrn);
void ViaCheckCardId(ScrnInfoPtr pScrn);
#endif /* _VIA_ID_H_ */
|
// Copyright (c) 2011-2015 The Cryptonote developers
// Copyright (c) 2014-2015 XDN developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#pragma once
#include "chaingen.h"
struct GetRandomOutputs : public test_chain_unit_base
{
GetRandomOutputs();
// bool check_tx_verification_context(const cryptonote::tx_verification_context& tvc, bool tx_added, size_t event_idx, const cryptonote::Transaction& tx);
// bool check_block_verification_context(const cryptonote::block_verification_context& bvc, size_t event_idx, const cryptonote::Block& block);
// bool mark_last_valid_block(cryptonote::core& c, size_t ev_index, const std::vector<test_event_entry>& events);
bool generate(std::vector<test_event_entry>& events) const;
private:
bool checkHalfUnlocked(cryptonote::core& c, size_t ev_index, const std::vector<test_event_entry>& events);
bool checkFullyUnlocked(cryptonote::core& c, size_t ev_index, const std::vector<test_event_entry>& events);
bool request(cryptonote::core& c, uint64_t amount, size_t mixin, cryptonote::COMMAND_RPC_GET_RANDOM_OUTPUTS_FOR_AMOUNTS_response& resp);
};
|
// Generated by gencpp from file geographic_msgs/GeoPoint.msg
// DO NOT EDIT!
#ifndef GEOGRAPHIC_MSGS_MESSAGE_GEOPOINT_H
#define GEOGRAPHIC_MSGS_MESSAGE_GEOPOINT_H
#include <string>
#include <vector>
#include <map>
#include <ros/types.h>
#include <ros/serialization.h>
#include <ros/builtin_message_traits.h>
#include <ros/message_operations.h>
namespace geographic_msgs
{
template <class ContainerAllocator>
struct GeoPoint_
{
typedef GeoPoint_<ContainerAllocator> Type;
GeoPoint_()
: latitude(0.0)
, longitude(0.0)
, altitude(0.0) {
}
GeoPoint_(const ContainerAllocator& _alloc)
: latitude(0.0)
, longitude(0.0)
, altitude(0.0) {
}
typedef double _latitude_type;
_latitude_type latitude;
typedef double _longitude_type;
_longitude_type longitude;
typedef double _altitude_type;
_altitude_type altitude;
typedef boost::shared_ptr< ::geographic_msgs::GeoPoint_<ContainerAllocator> > Ptr;
typedef boost::shared_ptr< ::geographic_msgs::GeoPoint_<ContainerAllocator> const> ConstPtr;
}; // struct GeoPoint_
typedef ::geographic_msgs::GeoPoint_<std::allocator<void> > GeoPoint;
typedef boost::shared_ptr< ::geographic_msgs::GeoPoint > GeoPointPtr;
typedef boost::shared_ptr< ::geographic_msgs::GeoPoint const> GeoPointConstPtr;
// constants requiring out of line definition
template<typename ContainerAllocator>
std::ostream& operator<<(std::ostream& s, const ::geographic_msgs::GeoPoint_<ContainerAllocator> & v)
{
ros::message_operations::Printer< ::geographic_msgs::GeoPoint_<ContainerAllocator> >::stream(s, "", v);
return s;
}
} // namespace geographic_msgs
namespace ros
{
namespace message_traits
{
// BOOLTRAITS {'IsFixedSize': True, 'IsMessage': True, 'HasHeader': False}
// {'std_msgs': ['/opt/ros/indigo/share/std_msgs/cmake/../msg'], 'geographic_msgs': ['/home/perdziu/catkin_ws/src/geographic_msgs/msg'], 'geometry_msgs': ['/opt/ros/indigo/share/geometry_msgs/cmake/../msg']}
// !!!!!!!!!!! ['__class__', '__delattr__', '__dict__', '__doc__', '__eq__', '__format__', '__getattribute__', '__hash__', '__init__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', '_parsed_fields', 'constants', 'fields', 'full_name', 'has_header', 'header_present', 'names', 'package', 'parsed_fields', 'short_name', 'text', 'types']
template <class ContainerAllocator>
struct IsFixedSize< ::geographic_msgs::GeoPoint_<ContainerAllocator> >
: TrueType
{ };
template <class ContainerAllocator>
struct IsFixedSize< ::geographic_msgs::GeoPoint_<ContainerAllocator> const>
: TrueType
{ };
template <class ContainerAllocator>
struct IsMessage< ::geographic_msgs::GeoPoint_<ContainerAllocator> >
: TrueType
{ };
template <class ContainerAllocator>
struct IsMessage< ::geographic_msgs::GeoPoint_<ContainerAllocator> const>
: TrueType
{ };
template <class ContainerAllocator>
struct HasHeader< ::geographic_msgs::GeoPoint_<ContainerAllocator> >
: FalseType
{ };
template <class ContainerAllocator>
struct HasHeader< ::geographic_msgs::GeoPoint_<ContainerAllocator> const>
: FalseType
{ };
template<class ContainerAllocator>
struct MD5Sum< ::geographic_msgs::GeoPoint_<ContainerAllocator> >
{
static const char* value()
{
return "c48027a852aeff972be80478ff38e81a";
}
static const char* value(const ::geographic_msgs::GeoPoint_<ContainerAllocator>&) { return value(); }
static const uint64_t static_value1 = 0xc48027a852aeff97ULL;
static const uint64_t static_value2 = 0x2be80478ff38e81aULL;
};
template<class ContainerAllocator>
struct DataType< ::geographic_msgs::GeoPoint_<ContainerAllocator> >
{
static const char* value()
{
return "geographic_msgs/GeoPoint";
}
static const char* value(const ::geographic_msgs::GeoPoint_<ContainerAllocator>&) { return value(); }
};
template<class ContainerAllocator>
struct Definition< ::geographic_msgs::GeoPoint_<ContainerAllocator> >
{
static const char* value()
{
return "# Geographic point, using the WGS 84 reference ellipsoid.\n\
\n\
# Latitude [degrees]. Positive is north of equator; negative is south\n\
# (-90 <= latitude <= +90).\n\
float64 latitude\n\
\n\
# Longitude [degrees]. Positive is east of prime meridian; negative is\n\
# west (-180 <= longitude <= +180). At the poles, latitude is -90 or\n\
# +90, and longitude is irrelevant, but must be in range.\n\
float64 longitude\n\
\n\
# Altitude [m]. Positive is above the WGS 84 ellipsoid (NaN if unspecified).\n\
float64 altitude\n\
";
}
static const char* value(const ::geographic_msgs::GeoPoint_<ContainerAllocator>&) { return value(); }
};
} // namespace message_traits
} // namespace ros
namespace ros
{
namespace serialization
{
template<class ContainerAllocator> struct Serializer< ::geographic_msgs::GeoPoint_<ContainerAllocator> >
{
template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
{
stream.next(m.latitude);
stream.next(m.longitude);
stream.next(m.altitude);
}
ROS_DECLARE_ALLINONE_SERIALIZER;
}; // struct GeoPoint_
} // namespace serialization
} // namespace ros
namespace ros
{
namespace message_operations
{
template<class ContainerAllocator>
struct Printer< ::geographic_msgs::GeoPoint_<ContainerAllocator> >
{
template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::geographic_msgs::GeoPoint_<ContainerAllocator>& v)
{
s << indent << "latitude: ";
Printer<double>::stream(s, indent + " ", v.latitude);
s << indent << "longitude: ";
Printer<double>::stream(s, indent + " ", v.longitude);
s << indent << "altitude: ";
Printer<double>::stream(s, indent + " ", v.altitude);
}
};
} // namespace message_operations
} // namespace ros
#endif // GEOGRAPHIC_MSGS_MESSAGE_GEOPOINT_H
|
/*
***********************************************************************************************************************
*
* Copyright (c) 2021-2022 Advanced Micro Devices, Inc. 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 once
#include "palPlatform.h"
#include "palTraceSession.h"
// Dev Driver includes
#include "protocols/ddInfoService.h"
#include "core/g_service/inc/UberTraceService.h"
namespace Pal
{
class Platform;
}
namespace GpuUtil
{
// =====================================================================================================================
// UberTraceService based off of DevDriver's UberTrace protocol. This is required in order for Tools to drive PAL's
// TraceSession remotely. This service will mostly just forward network requests into the TraceSession object.
class UberTraceService : public UberTrace::IService
{
public:
UberTraceService(Pal::Platform* pPlatform);
virtual ~UberTraceService();
// Attempts to enable tracing
virtual DD_RESULT EnableTracing() override { return DD_RESULT_SUCCESS; }
// Queries the current set of trace parameters
virtual DD_RESULT QueryTraceParams(
const DDByteWriter& writer) override { return DD_RESULT_SUCCESS; }
// Configures the current set of trace parameters
virtual DD_RESULT ConfigureTraceParams(
const void* pParamBuffer,
size_t paramBufferSize) override { return DD_RESULT_SUCCESS; }
// Requests execution of a trace
virtual DD_RESULT RequestTrace() override;
// Cancels a previously requested trace before it starts or after it completes
virtual DD_RESULT CancelTrace() override { return DD_RESULT_SUCCESS; }
// Collects the data created by a previously executed trace
virtual DD_RESULT CollectTrace(
const DDByteWriter& writer) override;
private:
Pal::Platform* const m_pPlatform;
};
}
|
//
// This source file is part of appleseed.
// Visit http://appleseedhq.net/ for additional information and resources.
//
// This software is released under the MIT license.
//
// Copyright (c) 2012-2013 Esteban Tovagliari, Jupiter Jazz Limited
// Copyright (c) 2014-2016 Esteban Tovagliari, The appleseedhq Organization
//
// 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 APPLESEED_SHARED_DLLSYMBOL_H
#define APPLESEED_SHARED_DLLSYMBOL_H
// appleseed.main headers.
#include "main/dllvisibility.h"
#ifdef appleseed_shared_EXPORTS // automatically set by CMake
#define SHAREDDLL APPLESEED_DLL_EXPORT
#else
#define SHAREDDLL APPLESEED_DLL_IMPORT
#endif
#endif // !APPLESEED_SHARED_DLLSYMBOL_H
|
/*
radix64.h
Radix-64 converter, as defined by OpenPGP in RFC 4880 sec 6.3 and 6.4
Copyright (c) 2013 - 2019 Jason Lee @ calccrypto at gmail.com
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 __RADIX64__
#define __RADIX64__
#include <stdexcept>
#include <string>
namespace OpenPGP {
// 6.3. Encoding Binary in Radix-64
//
// The encoding process represents 24-bit groups of input bits as output
// strings of 4 encoded characters. Proceeding from left to right, a
// 24-bit input group is formed by concatenating three 8-bit input
// groups. These 24 bits are then treated as four concatenated 6-bit
// groups, each of which is translated into a single digit in the
// Radix-64 alphabet. When encoding a bit stream with the Radix-64
// encoding, the bit stream must be presumed to be ordered with the most
// significant bit first. That is, the first bit in the stream will be
// the high-order bit in the first 8-bit octet, and the eighth bit will
// be the low-order bit in the first 8-bit octet, and so on.
//
// +--first octet--+-second octet--+--third octet--+
// |7 6 5 4 3 2 1 0|7 6 5 4 3 2 1 0|7 6 5 4 3 2 1 0|
// +-----------+---+-------+-------+---+-----------+
// |5 4 3 2 1 0|5 4 3 2 1 0|5 4 3 2 1 0|5 4 3 2 1 0|
// +--1.index--+--2.index--+--3.index--+--4.index--+
//
// Each 6-bit group is used as an index into an array of 64 printable
// characters from the table below. The character referenced by the
// index is placed in the output string.
//
// Value Encoding Value Encoding Value Encoding Value Encoding
// 0 A 17 R 34 i 51 z
// 1 B 18 S 35 j 52 0
// 2 C 19 T 36 k 53 1
// 3 D 20 U 37 l 54 2
// 4 E 21 V 38 m 55 3
// 5 F 22 W 39 n 56 4
// 6 G 23 X 40 o 57 5
// 7 H 24 Y 41 p 58 6
// 8 I 25 Z 42 q 59 7
// 9 J 26 a 43 r 60 8
// 10 K 27 b 44 s 61 9
// 11 L 28 c 45 t 62 +
// 12 M 29 d 46 u 63 /
// 13 N 30 e 47 v
// 14 O 31 f 48 w (pad) =
// 15 P 32 g 49 x
// 16 Q 33 h 50 y
//
// The encoded output stream must be represented in lines of no more
// than 76 characters each.
//
// Special processing is performed if fewer than 24 bits are available
// at the end of the data being encoded. There are three possibilities:
//
// 1. The last data group has 24 bits (3 octets). No special processing
// is needed.
//
// 2. The last data group has 16 bits (2 octets). The first two 6-bit
// groups are processed as above. The third (incomplete) data group
// has two zero-value bits added to it, and is processed as above. A
// pad character (=) is added to the output.
//
// 3. The last data group has 8 bits (1 octet). The first 6-bit group
// is processed as above. The second (incomplete) data group has
// four zero-value bits added to it, and is processed as above. Two
// pad characters (=) are added to the output.
const unsigned int MAX_LINE_LENGTH = 64;
std::string ascii2radix64(std::string str, const unsigned char char62 = '+', const unsigned char char63 = '/');
// 6.4. Decoding Radix-64
//
// In Radix-64 data, characters other than those in the table, line
// breaks, and other white space probably indicate a transmission error,
// about which a warning message or even a message rejection might be
// appropriate under some circumstances. Decoding software must ignore
// all white space.
//
// Because it is used only for padding at the end of the data, the
// occurrence of any "=" characters may be taken as evidence that the
// end of the data has been reached (without truncation in transit). No
// such assurance is possible, however, when the number of octets
// transmitted was a multiple of three and no "=" characters are
// present.
std::string radix642ascii(std::string str, const unsigned char char62 = '+', const unsigned char char63 = '/');
}
#endif
|
/* A Bison parser, made by GNU Bison 2.4.2. */
/* Skeleton interface for Bison's Yacc-like parsers in C
Copyright (C) 1984, 1989-1990, 2000-2006, 2009-2010 Free Software
Foundation, Inc.
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 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work
under terms of your choice, so long as that work isn't itself a
parser generator using the skeleton or a modified version thereof
as a parser skeleton. Alternatively, if you modify or redistribute
the parser skeleton itself, you may (at your option) remove this
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
/* Tokens. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
/* Put the tokens into the symbol table, so that GDB and other debuggers
know about them. */
enum yytokentype {
INT = 258,
FLOAT = 259,
BOOL = 260,
NAME = 261,
RETURN = 262,
IF = 263,
ELSE = 264,
WHILE = 265,
FOR = 266,
STRUCT = 267,
EXTERN = 268,
STRING = 269,
VARARG = 270,
BREAK = 271,
TYPEDEF = 272,
CONST = 273,
CAST = 274,
MINUSMINUS = 275,
PLUSPLUS = 276,
DIVEQ = 277,
MULEQ = 278,
MINUSEQ = 279,
PLUSEQ = 280,
BAND = 281,
BOR = 282,
NEQ = 283,
EQ = 284,
DEREF = 285,
ADDROF = 286,
EQNEG = 287,
POS = 288,
NEG = 289,
PACC = 290
};
#endif
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef int YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
#endif
|
//
// PFUser+Digits.h
//
// Created by Felix Dumit on 11/6/14.
// Copyright (c) 2015 Felix. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <Parse/Parse.h>
@class DGTAuthenticationConfiguration;
@interface PFUser (Digits)
+ (void)loginWithDigitsInBackground:(void (^) (PFUser *user, NSError *error))block;
+ (void)loginWithDigitsInBackgroundWithConfiguration:(DGTAuthenticationConfiguration *)configuration completion:(void (^) (PFUser *user, NSError *error))block;
+ (BFTask<PFUser *> *) loginWithDigitsInBackground;
+ (BFTask<PFUser *> *)loginWithDigitsInBackgroundWithConfiguration:(DGTAuthenticationConfiguration *)configuration;
- (void)linkWithDigitsInBackground:(void (^) (BOOL succeeded, NSError *error))block;
- (void)linkWithDigitsInBackgroundWithConfiguration:(DGTAuthenticationConfiguration *)configuration completion:(void (^) (BOOL succeeded, NSError *error))block;
- (BFTask<NSNumber *> *)linkWithDigitsInBackground;
- (BFTask<NSNumber *> *)linkWithDigitsInBackgroundWithConfiguration:(DGTAuthenticationConfiguration *)configuration;
- (BOOL) isLinkedWithDigits;
@end
|
#pragma once
#include "ofMain.h"
#include "ofxRestartOFApp.h"
class ofApp : public ofBaseApp{
public:
void setup();
void update();
void draw();
void keyPressed(int key);
void keyReleased(int key);
void mouseMoved(int x, int y );
void mouseDragged(int x, int y, int button);
void mousePressed(int x, int y, int button);
void mouseReleased(int x, int y, int button);
void windowResized(int w, int h);
void dragEvent(ofDragInfo dragInfo);
void gotMessage(ofMessage msg);
ofxRestartOFApp restartApp;
};
|
main()
{
printf("31=%d 'a'='%c'\n", 31, 'a');
}
|
/*
* Generated by class-dump 3.3.4 (64 bit).
*
* class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard.
*/
#import "NSObject.h"
@class NSMutableDictionary, WDDocument;
// Not exported
@interface WDCitationTable : NSObject
{
WDDocument *mDocument;
NSMutableDictionary *mCitations;
}
- (void)addCitation:(id)arg1 forID:(id)arg2;
- (id)citationFor:(id)arg1;
- (unsigned long long)count;
- (id)initWithDocument:(id)arg1;
- (id)document;
- (void)dealloc;
@end
|
/*
* Copyright 2000-2008, François Revol, <revol@free.fr>. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#include <View.h>
namespace Z {
namespace ThemeManager {
class ThemeManager;
} // ns ThemeManager
} // ns Z
using Z::ThemeManager::ThemeManager;
class BBitmap;
class BSeparator;
class BBox;
class BListView;
class BButton;
class BScrollView;
class BTabView;
class BTextControl;
class BTextView;
class BMessage;
class ScreenshotView;
class BStringView;
class MyInvoker;
class ThemeInterfaceView : public BView
{
public:
ThemeInterfaceView(BRect _bounds);
virtual ~ThemeInterfaceView();
virtual void AllAttached();
virtual void MessageReceived(BMessage* _msg);
ThemeManager* GetThemeManager();
void PopulateThemeList();
void PopulateAddonList();
status_t Revert();
status_t ApplyDefaults();
status_t ApplySelected();
status_t CreateNew(const char *name);
status_t SaveSelected();
status_t DeleteSelected();
status_t AddScreenshot();
status_t ThemeSelected();
void SetIsRevertable();
void SetScreenshot(BBitmap *shot);
status_t AError(const char *func, status_t err);
private:
static int32 _ThemeListPopulatorTh(void *arg);
void _ThemeListPopulator();
ThemeManager* fThemeManager;
bool fScreenshotPaneHidden;
bool fHasScreenshot;
BScrollView* fThemeListSV;
BListView* fThemeList;
BButton* fDefaultsBtn;
BButton* fApplyBtn;
BButton* fNewBtn;
BTextControl* fNameText;
BButton* fSaveBtn;
BButton* fDeleteBtn;
BButton* fSetShotBtn;
BButton* fMoreThemesBtn;
BTabView* fTabView;
ScreenshotView* fScreenshotPane;
BStringView* fScreenshotText;
BView* fScreenshotTab;
BTextView* fDetails;
BScrollView* fAddonListSV;
BListView* fAddonList;
};
extern "C" BView *themes_pref(const BRect& Bounds);
#define SSPANE_WIDTH 320
#define SSPANE_HEIGHT 240
|
// -*- C++ -*-
//=============================================================================
/**
* @file Trace.h
*
* $Id: Trace.h 79134 2007-07-31 18:23:50Z johnnyw $
*
* @author Douglas C. Schmidt <schmidt@cs.wustl.edu>
*/
//=============================================================================
#ifndef ACE_TRACE_H
#define ACE_TRACE_H
#include /**/ "ace/pre.h"
#include /**/ "ace/ACE_export.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
/**
* @class ACE_Trace
*
* @brief A C++ trace facility that keeps track of which methods are
* entered and exited.
*
* This class uses C++ constructors and destructors to automate
* the ACE_Trace nesting. In addition, thread-specific storage
* is used to enable multiple threads to work correctly.
*/
class ACE_Export ACE_Trace
{
public:
// = Initialization and termination methods.
/// Perform the first part of the trace, which prints out the string
/// N, the LINE, and the ACE_FILE as the function is entered.
ACE_Trace (const ACE_TCHAR *n,
int line = 0,
const ACE_TCHAR *file = ACE_TEXT (""));
/// Perform the second part of the trace, which prints out the NAME
/// as the function is exited.
~ACE_Trace (void);
// = Control the tracing level.
/// Determine if tracing is enabled (return == 1) or not (== 0)
static int is_tracing(void);
/// Enable the tracing facility.
static void start_tracing (void);
/// Disable the tracing facility.
static void stop_tracing (void);
/// Change the nesting indentation level.
static void set_nesting_indent (int indent);
/// Get the nesting indentation level.
static int get_nesting_indent (void);
/// Dump the state of an object.
void dump (void) const;
private:
// Keeps track of how deeply the call stack is nested (this is
// maintained in thread-specific storage to ensure correctness in
// multiple threads of control.
/// Name of the method we are in.
const ACE_TCHAR *name_;
/// Keeps track of how far to indent per trace call.
static int nesting_indent_;
/// Is tracing enabled?
static int enable_tracing_;
/// Default values.
enum
{
DEFAULT_INDENT = 3,
DEFAULT_TRACING = 1
};
};
ACE_END_VERSIONED_NAMESPACE_DECL
#include /**/ "ace/post.h"
#endif /* ACE_TRACE_H */
|
#pragma once
#include "D3DMesh.h"
#include "InstancedTriangleMeshData.h"
#include <d3d11.h>
namespace PGA
{
namespace Rendering
{
namespace D3D
{
class InstancedTriangleMeshSource : public PGA::Rendering::D3D::Mesh
{
public:
InstancedTriangleMeshSource() = default;
virtual size_t getNumInstances() = 0;
virtual void sync(size_t numInstances) = 0;
virtual void sync(size_t numInstances, const InstancedTriangleMeshData::InstanceAttributes* instancesAttributes, ID3D11DeviceContext* deviceContext) = 0;
virtual void allocateResources(size_t maxNumInstances, ID3D11Device* device, ID3D11DeviceContext* deviceContext) = 0;
virtual ID3D11Buffer* getInstanceAttributesBufferRef() = 0;
};
}
}
}
|
#ifndef __IRRIGATION_H_
#define __IRRIGATION_H_
#define ON 1
#define OFF 0
#endif
|
/****************************************************************************************/
/* */
/* Pegasus */
/* */
/****************************************************************************************/
//! \file NodeGPUData.h
//! \author Kleber Garcia
//! \date 23rd March 2014
//! \brief GPU Data base structure. Contains internal utilities to do type checking casting
//! during dev mode. A render package will utilize this RTTI system to do safe castings
//! For performance and code size, this struct does unsafe casts and avoids usage of c++
//! polymorphism on purpose (hence the usage of a structure).
//! WARNING!! do not declare constructor on custom GPU data. initialize data in respective
//! factory functions
#ifndef PEGASUS_GRAPH_NODEGPUDATA_H
#define PEGASUS_GRAPH_NODEGPUDATA_H
#if PEGASUS_GRAPH_GPUDATA_RTTI
//! utility macro that performs a safecast of a GPU data pointer
#define PEGASUS_GRAPH_GPUDATA_SAFECAST(type, object) reinterpret_cast<type*>(object);PG_ASSERTSTR(type::__GUID == reinterpret_cast<type*>(object)->__private_GUID, "invalid cast!");
//! utility macro that registers rtti guid for custom GPU data
//! always needs to go as the first statement of the custom GPU data struct
#define PEGASUS_GRAPH_REGISTER_GPUDATA_RTTI(className, guid) \
className() \
: __private_GUID(guid) {} \
static const int __GUID = guid; \
int __private_GUID;
#else
//! utility macro that performs a safecast of a GPU data pointer
#define PEGASUS_GRAPH_GPUDATA_SAFECAST(type, object) reinterpret_cast<type*>(object)
//! utility macro that should be the first statement in the declaration of a custom node GPU data structure
//! always needs to go as the first statement of the custom GPU data struct
#define PEGASUS_GRAPH_REGISTER_GPUDATA_RTTI(className, guid) className(){}
#endif
namespace Pegasus {
namespace Graph {
struct NodeGPUData
{
PEGASUS_GRAPH_REGISTER_GPUDATA_RTTI(NodeGPUData, 0x0)
};
}
}
#endif
|
/**
* This file is part of Chippy.
*
* (c) Jacob van Eijk <jacob.vaneijk@gmail.com>
*
* For the full copyright and license information, please view the LICENSE file
* that was distributed with this source code.
*/
#include <check.h>
extern Suite *create_opcodes_suite();
int main(void) {
SRunner *runner = srunner_create(create_opcodes_suite());
srunner_run_all(runner, CK_NORMAL);
int failed = srunner_ntests_failed(runner);
srunner_free(runner);
return failed == 0 ? 0 : 1;
}
|
//
// MHAppDelegate.h
// MusicHUD
//
// Created by Katherine Whitlock on 5/28/13.
// Copyright (c) 2013 Katherine Whitlock. All rights reserved.
//
#import <Cocoa/Cocoa.h>
#import "MHiTunesListener.h"
#import "MHSonoraListener.h"
#import "MHSpotifyListener.h"
@interface MHAppDelegate : NSObject <NSApplicationDelegate>{
MHSpotifyListener * _spotifyListener;
MHiTunesListener * _iTunesListener;
MHSonoraListener * _sonoraListener;
NSStatusItem * statusItem;
}
@property (nonatomic, strong) MHSonoraListener* sonoraListener;
@property (nonatomic, strong) MHiTunesListener* iTunesListener;
@property (nonatomic, strong) MHSpotifyListener* spotifyListener;
@property (weak) IBOutlet NSMenu *statusMenu;
@end
|
#ifndef _WIN_T_SOUND_OSCILLATOR_
#define _WIN_T_SOUND_OSCILLATOR_
#include <_type/type.h>
#include <_type/type.sound.h>
#include <_type/type.sound.note.h>
class _soundOscillator : public _sound
{
private:
_u16 frequency;
_psgDutyCycle dutyCycle;
//! Prepares the channel for use and returns its number
_s8 prepareChannel( _u8 volume , _s8 panning ) override;
public:
//! Ctors
_soundOscillator( _u16 frequency , _psgDutyCycle dC = _psgDutyCycle::dc37 , _u8 volume = 127 , _s8 panning = 0 ) :
_sound( _channelType::psg )
, frequency( frequency * 8 )
, dutyCycle( dC )
{}
_soundOscillator( _note note , _psgDutyCycle dC = _psgDutyCycle::dc37 , _u8 volume = 127 , _s8 panning = 0 ) :
_sound( _channelType::psg )
, frequency( (_u16)note )
, dutyCycle( dC )
{}
//! Make available from base class
void setFrequency( _u16 freq );
using _sound::getFrequency;
void setDutyCycle( _psgDutyCycle dC );
using _sound::getDutyCycle;
};
#endif |
/*
* SHL - PTY Helpers
*
* Copyright (c) 2011-2013 David Herrmann <dh.herrmann@gmail.com>
* Dedicated to the Public Domain
*/
/*
* PTY Helpers
*/
#ifndef SHL_PTY_H
#define SHL_PTY_H
#include <errno.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
/* pty */
struct shl_pty;
typedef void (*shl_pty_input_cb) (struct shl_pty *pty, char *u8,
size_t len, void *data);
pid_t shl_pty_open(struct shl_pty **out,
shl_pty_input_cb cb,
void *data,
unsigned short term_width,
unsigned short term_height);
void shl_pty_ref(struct shl_pty *pty);
void shl_pty_unref(struct shl_pty *pty);
void shl_pty_close(struct shl_pty *pty);
bool shl_pty_is_open(struct shl_pty *pty);
int shl_pty_get_fd(struct shl_pty *pty);
pid_t shl_pty_get_child(struct shl_pty *pty);
int shl_pty_dispatch(struct shl_pty *pty);
int shl_pty_write(struct shl_pty *pty, const char *u8, size_t len);
int shl_pty_signal(struct shl_pty *pty, int sig);
int shl_pty_resize(struct shl_pty *pty,
unsigned short term_width,
unsigned short term_height);
/* pty bridge */
int shl_pty_bridge_new(void);
void shl_pty_bridge_free(int bridge);
int shl_pty_bridge_dispatch(int bridge, int timeout);
int shl_pty_bridge_add(int bridge, struct shl_pty *pty);
void shl_pty_bridge_remove(int bridge, struct shl_pty *pty);
#endif /* SHL_PTY_H */
|
//
// AppDelegate.h
// DYAlertPickerViewDemo
//
// Created by danny on 2015/7/7.
// Copyright (c) 2015年 danny. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface AppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@end
|
/**
* @file MockDataLoggerInterface.h
* @brief Google Mock Definition for DataLoggerInterface
* @author Ben Frazier
* @date 08/23/2017 */
#include <gmock/gmock.h>
using ::testing::Eq;
#include <gtest/gtest.h>
using ::testing::Test;
#include "DataLoggerInterface.h"
namespace CEM
{
class MockDataLogger : public DataLoggerInterface
{
public:
MOCK_METHOD1(WriteDataArray, void(std::vector<double> data));
MOCK_METHOD2(WriteDataArray, void(double *data, int s));
MOCK_METHOD3(WriteDataArray, void(Eigen::VectorXd, double time, std::string datasetName));
MOCK_METHOD3(WriteVectorToFile, void(std::vector<double> data, std::string fileName, std::string datasetName));
MOCK_METHOD3(WriteVectorToFile, void(Eigen::VectorXd data, std::string fileName, std::string datasetName));
MOCK_METHOD2(ReadVectorFromFile, Eigen::VectorXd(std::string fileName, std::string datasetName));
MOCK_METHOD3(ReadDataArray, std::vector<double>(std::string fileName, std::string datasetName, int timeInde));
};
}
|
#ifndef SCHEME_DEFS_H
#define SCHEME_DEFS_H
#endif
|
//
// DAVKit.h
// DAVKit
//
// Copyright Matt Rajca 2010. All rights reserved.
//
#import <DAVKit/DAVCredentials.h>
#import <DAVKit/DAVRequest.h>
#import <DAVKit/DAVRequestGroup.h>
#import <DAVKit/DAVRequests.h>
#import <DAVKit/DAVResponseItem.h>
#import <DAVKit/DAVSession.h>
|
// Name - Utkarsh Kunwar
// Roll No. - B15338
// IC-250 Week - 6
#include "b.h"
int main(int argc, char* argv[])
{
if(argc != 3) {
printf("Enter the number of rows and columns of the matrix. (Only)\n");
return 1;
}
int n = atoi(argv[1]);
int m = atoi(argv[2]);
int** arr = maker(n, m);
writer(arr, n, m, "b.dat");
printDelete(arr, n, m);
return 0;
}
|
#ifndef AppMacros_h__
#define AppMacros_h__
#define NS_UBA_BEGIN namespace uba {
#define NS_UBA_END }
#define USING_NS_UBA using namespace uba
#define USING_NS_CC_UI using namespace cocos2d::ui
#endif // AppMacros_h__
|
#ifndef __BOARD_CONFIG_W25QXX_H_
#define __BOARD_CONFIG_W25QXX_H_
#include "BoardConfig/F103/BoardConfig_Base.h"
#include "BoardConfig/F103/BoardConfig_SysTickDelay.h"
#include "BoardConfig/F103/BoardConfig_SPI.h"
#define BOARD_W25QXX_NUM_LIMIT 1
typedef enum BOARD_W25QXX_INDEX
{
BOARD_W25QXX_0 = 0,
}BOARD_W25QXX_INDEX;
/*W25QXXоƬID*/
#define BOARD_ID_W25Q80 0XEF13
#define BOARD_ID_W25Q16 0XEF14
#define BOARD_ID_W25Q32 0XEF15
#define BOARD_ID_W25Q64 0XEF16
#define BOARD_ID_W25Q128 0XEF17
#define BOARD_ID_W25Q256 0XEF18
#define BOARD_W25QXX_DELAY_US(nus) SysTickDelay_DelayUs(nus)
#include "Device/W25QXX/DeviceW25QXX.h"
#include "Device/W25QXX/F103/DeviceW25QXXF103.h"
#endif
|
//
// ScheduleViewController.h
// Thermo
//
// Created by Dale Low on 2/17/16.
// Copyright © 2016 gumbypp consulting. 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.
//
#import <UIKit/UIKit.h>
@class ScheduleViewController;
@protocol ScheduleViewControllerDelegate <NSObject>
- (void)scheduleViewControllerDidCancel:(ScheduleViewController *)svc;
- (void)scheduleViewController:(ScheduleViewController *)svc didEditWeekdaySchedule:(NSData *)weekdaySchedule
weekendSchedule:(NSData *)weekendSchedule;
@end
@interface ScheduleViewController : UIViewController
@property (nonatomic, weak) id<ScheduleViewControllerDelegate> delegate;
@property (nonatomic, strong) NSData *rawWeekdaySchedule;
@property (nonatomic, strong) NSData *rawWeekendSchedule;
@end
|
int trueFiveEighths(int x)
{
int storebottom = x & 7;
int divbyeight = x >> 3;
int multbyfive = (divbyeight << 2) + divbyeight;
int bottomup = (storebottom << 2) + storebottom;
int biasedbottom = bottomup + (7 & (x >> 31));
int fullsize = (biasedbottom >> 3) + multbyfive;
return fullsize;
}
|
//
// MainViewController.h
// MultiplicationTest
//
// Created by Paul McGuire on 28/12/2008.
// Copyright D3BUG Software Ltd 2008. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface MainViewController : UIViewController {
}
@end
|
/***************************************************************************
aodv_thread.h - description
-------------------
begin : Tue Aug 12 2003
copyright : (C) 2003 by Luke Klein-Berndt
email : kleinb@nist.gov
***************************************************************************/
/***************************************************************************
Modified by Miguel Catalan Cid - miguel.catcid@gmail.com - Version: Mon Jan 1 2010
***************************************************************************/
#ifndef AODV_THREAD_H
#define AODV_THREAD_H
#include "aodv.h"
void kill_aodv(void);
void kick_aodv(void);
void startup_aodv(void);
#endif
|
//
// NSString+URLUtils.h
// NitroConnection
//
// Created by Daniel L. Alves on 05/08/14.
// Copyright (c) 2014 Daniel L. Alves. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface NSString( URLUtils_NitroConnection )
/**
* Returns an escaped url string. The list of characters that will be escaped follows:
* '!', '*', ''', '\', '"', '{', '}', '(', ')', ';', ':', '@', '&', '=',
* '+', '$', ',', '/', '?', '#', '[', ']', '%', ' '
*
* @param encoding The encoding of the resulting string
*
* @return An url escaped string
*/
-( NSString* )urlEscapeUsingEncoding:( NSStringEncoding )encoding;
/**
* Returns an unescaped url string. The list of characters that will be unescaped follows:
* '!', '*', ''', '\', '"', '{', '}', '(', ')', ';', ':', '@', '&', '=',
* '+', '$', ',', '/', '?', '#', '[', ']', '%', ' '
*
* @param encoding The encoding of the resulting string
*
* @return An url unescaped string
*/
-( NSString* )urlUnescapeUsingEncoding:( NSStringEncoding )encoding;
@end
|
//
// SPCoreDataStorage+Mock.h
// Simperium
//
// Created by Jorge Leandro Perez on 12/2/14.
// Copyright (c) 2014 Simperium. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "SPCoreDataStorage.h"
@interface SPCoreDataStorage (Mock)
- (void)test_waitUntilSaveCompletes;
+ (void)test_simulateWorkerOnlyMergesChangesIntoWriter;
+ (void)test_undoWorkerOnlyMergesChangesIntoWriter;
+ (void)test_simulateWorkerCannotMergeChangesAnywhere;
+ (void)test_undoWorkerCannotMergeChangesAnywhere;
@end
|
#include <stdio.h>
#include <stdlib.h>
int matriz_identidade (int ordem , int **matriz)
{
int i,j;
for ( i = 0; i < ordem; i += 1 )
{
for ( j = 0; j < ordem; j += 1 )
{
if (i == j)
{
if (matriz[i][j] != 1)
{
return 0;
}
}
else
{
if (matriz[i][j] != 0 )
{
return 0;
}
}
}
}
return 1;
}
|
int simpleMatrixMultiply(double* const a, double* const b, double* const out, int p, int q, int r);
|
/*
* Generated by class-dump 3.3.4 (64 bit).
*
* class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard.
*/
#import "NSObject.h"
@interface NSObject (SUInvocationAdditions)
- (id)responderChainProxy:(id)arg1;
@end
|
//
// DPPhotoDetailsViewController.h
// DasPrototyp
//
// Created by HongliYu on 14-3-14.
// Copyright (c) 2014年 HongliYu. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface DPPhotoDetailsViewController : DPBaseViewController
@end
|
#define caar(obj) car(car(obj))
#define cadr(obj) car(cdr(obj))
#define cdar(obj) cdr(car(obj))
#define cddr(obj) cdr(cdr(obj))
#define caaar(obj) car(car(car(obj)))
#define caadr(obj) car(car(cdr(obj)))
#define cadar(obj) car(cdr(car(obj)))
#define caddr(obj) car(cdr(cdr(obj)))
#define cdaar(obj) cdr(car(car(obj)))
#define cdadr(obj) cdr(car(cdr(obj)))
#define cddar(obj) cdr(cdr(car(obj)))
#define cdddr(obj) cdr(cdr(cdr(obj)))
#define caaaar(obj) car(car(car(car(obj))))
#define caaadr(obj) car(car(car(cdr(obj))))
#define caadar(obj) car(car(cdr(car(obj))))
#define caaddr(obj) car(car(cdr(cdr(obj))))
#define cadaar(obj) car(cdr(car(car(obj))))
#define cadadr(obj) car(cdr(car(cdr(obj))))
#define caddar(obj) car(cdr(cdr(car(obj))))
#define cadddr(obj) car(cdr(cdr(cdr(obj))))
#define cdaaar(obj) cdr(car(car(car(obj))))
#define cdaadr(obj) cdr(car(car(cdr(obj))))
#define cdadar(obj) cdr(car(cdr(car(obj))))
#define cdaddr(obj) cdr(car(cdr(cdr(obj))))
#define cddaar(obj) cdr(cdr(car(car(obj))))
#define cddadr(obj) cdr(cdr(car(cdr(obj))))
#define cdddar(obj) cdr(cdr(cdr(car(obj))))
#define cddddr(obj) cdr(cdr(cdr(cdr(obj))))
typedef enum {EMPTY_LIST, BOOLEAN, SYMBOL, FIXNUM, FLOAT,
CHARACTER, STRING, PAIR, PRIMITIVE_PROC,
COMPOUND_PROC} object_type;
typedef enum {MATH, EQUALITY, COMPARISON, CHAR, PREDICATE} primitive_type;
typedef struct object{
object_type obj_type;
struct cons_cell{
struct object *car;
struct object *cdr;
}cons_cell;
char* symbol;
char *string;
char character;
long number;
//enum boolean empty_list;
int boolean;
double decimal;
struct primitive_proc{
struct object *(*fn)(struct object *arguments);
primitive_type prim_type;
struct object* acceptables;
}primitive_proc;
struct compound_proc {
struct object *parameters;
struct object *body;
struct object *env;
}compound_proc;
}object;
/**Allocation
*This struct is used for our garbage collector to maintain a list of allocated blocks of memory
* Fields:
*-pair, the cons_Cell we are allocation memory to
*-mark, 1 if marked 0 if not marked, initialzed to 1
*-next, a pointer to the next place we allocated memory to
*/
struct Allocation {
struct cons_cell pair;
int mark : 1;
struct Allocation *next;
};
/*global variables*/
object *the_empty_list;
object *false;
object *true;
object *symbol_table;
object *quote_symbol;
object *define_symbol;
object *set_symbol;
object *setcar_symbol;
object *ok_symbol;
object *if_symbol;
object *lambda_symbol;
object *begin_symbol;
object *cond_symbol;
object *else_symbol;
object *let_symbol;
object *the_empty_environment;
object *the_global_environment;
/*function delcarations*/
object *cons(object *car, object *cdr);
object *car(object *pair);
object *cdr(object *pair);
void initialize_environment(void);
|
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include "ofMain.h"
#include <vector>
#include <QMainWindow>
#include <QMdiSubWindow>
#include <QWidget>
namespace Ui {
class MainWindow;
}
class ofApp;
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
public slots:
void on_actionAdd_OF_app_triggered();
private:
Ui::MainWindow *ui;
void loadSubWindow(QWidget* widget);
};
#endif // MAINWINDOW_H
|
//
// TouchDrawView.h
// TouchTracker
//
// Created by Brent Westmoreland on 8/27/13.
// Copyright (c) 2013 Brent Westmoreland. All rights reserved.
//
#import <UIKit/UIKit.h>
@protocol TouchDrawViewDataSource <NSObject>
- (NSArray *)completeLines;
- (NSDictionary *)linesInProcess;
@end
@interface TouchDrawView : UIView
@property (nonatomic, weak) id <TouchDrawViewDataSource> datasource;
@end
|
//
// BMStack.h
// CodeChallenges
//
// Created by Jeffrey Camealy on 10/21/13.
// Copyright (c) 2013 bearMountain. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface BMStack : NSObject
- (void)push:(int)n;
- (int)pop;
@end
|
//
// UINavigationBar+Awesome.h
// picturer
//
// Created by BaiLinfeng on 16/5/9.
// Copyright © 2016年 FR. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface UINavigationBar (Awesome)
- (void)lt_setBackgroundColor:(UIColor *)backgroundColor;
- (void)lt_setElementsAlpha:(CGFloat)alpha;
- (void)lt_setTranslationY:(CGFloat)translationY;
- (void)lt_reset;
@end
|
// Copyright (c) 2010-present Bifrost Entertainment AS and Tommy Nguyen
// Distributed under the MIT License.
// (See accompanying file LICENSE or copy at http://opensource.org/licenses/MIT)
#ifndef GRAPHICS_ANIMATION_H_
#define GRAPHICS_ANIMATION_H_
#include <functional>
#include <limits>
#include <memory>
#include <Rainbow/AnimationEvent.h>
#include "Common/NonCopyable.h"
#include "Graphics/Sprite.h"
#include "Math/Geometry.h"
namespace rainbow
{
/// <summary>Sprite animation using sprite sheets.</summary>
class Animation : private NonCopyable<Animation>
{
public:
using Callback = std::function<void(Animation*, AnimationEvent)>;
using Frames = std::unique_ptr<Rect[]>;
static constexpr auto end_frame() { return Rect{}; }
/// <summary>Constructs a sprite animation.</summary>
/// <param name="sprite">The sprite to animate.</param>
/// <param name="frames">
/// Array of texture areas to be used as frames, terminated with
/// <c>end_frame()</c>.
/// </param>
/// <param name="fps">Frames per second.</param>
/// <param name="delay">
/// Number of frames to delay before the animation loops. Negative
/// numbers disable looping.
/// </param>
Animation(const SpriteRef& sprite,
Frames frames,
unsigned int fps,
int delay = 0);
/// <summary>Returns the currently displayed frame.</summary>
[[nodiscard]] auto current_frame() const { return frame_; }
/// <summary>Returns the frame rate in frames per second.</summary>
[[nodiscard]] auto frame_rate() const -> unsigned int
{
return 1000 / interval_;
}
/// <summary>Returns whether animation is stopped.</summary>
[[nodiscard]] auto is_stopped() const { return stopped_; }
/// <summary>Returns the target sprite.</summary>
[[nodiscard]] auto sprite() const { return sprite_; }
/// <summary>
/// Sets callback for start, end, and complete (loop) events.
/// </summary>
void set_callback(Callback f) { callback_ = std::move(f); }
/// <summary>
/// Sets number of frames to delay before the animation loops.
/// Negative numbers disable looping.
/// </summary>
void set_delay(int delay) { delay_ = delay; }
/// <summary>Sets the frame rate in frames per second.</summary>
void set_frame_rate(unsigned int fps);
/// <summary>Sets animation frames.</summary>
/// <remarks>This method takes ownership of the array.</remarks>
/// <param name="frames">
/// Array of texture areas to be used as frames, terminated with
/// <c>end_frame()</c>.
/// </param>
void set_frames(Frames frames);
/// <summary>Sets the sprite to animate.</summary>
void set_sprite(const SpriteRef& sprite);
/// <summary>Jumps to <paramref name="frame"/>.</summary>
void jump_to(unsigned int frame);
/// <summary>
/// Releases ownership of animation frames, and returns it.
/// </summary>
auto release() { return frames_.release(); }
/// <summary>Rewinds animation.</summary>
void rewind() { jump_to(0); }
/// <summary>Starts animation if it was previously stopped.</summary>
/// <remarks>Always plays from the beginning.</remarks>
void start();
/// <summary>Stops animation.</summary>
void stop();
/// <summary>
/// Must be called every frame for as long as it's meant to be active.
/// </summary>
void update(uint64_t dt);
#ifndef NDEBUG
~Animation();
#endif
private:
bool stopped_ = true;
/// <summary>Accumulated monotonic time.</summary>
unsigned int accumulated_ = 0;
/// <summary>Time till a tick.</summary>
unsigned int interval_;
/// <summary>Current frame.</summary>
unsigned int frame_ = 0;
/// <summary>
/// Array of texture areas to be used as frames, terminated with
/// <c>Animation::end_frame()</c>.
/// </summary>
Frames frames_;
/// <summary>The sprite to animate.</summary>
SpriteRef sprite_;
/// <summary>
/// Number of frames to delay before the animation loops. Negative
/// numbers disable looping.
/// </summary>
int delay_;
/// <summary>Number of frames idled.</summary>
int idled_ = 0;
/// <summary>Event callback.</summary>
Callback callback_;
void set_current_frame();
/// <summary>
/// Increments animation frame and resets/stops if the end is reached.
/// </summary>
void tick();
};
} // namespace rainbow
#endif
|
#pragma once
// Module for interacting with the ADS1015 ADC over I2C.
// I2C, GPIO, Interrupt, and Soft Timers should be initialized.
//
// The ADS1015 supports a conversion ready pin that we use as an interrupt.
//
// Uses a watchdog to detect if the ADS1015 has stopped triggering interrupts. Although we use
// GPIO interrupts to detect conversion ready, it seems like it's possible for us to miss it
// during bus glitching. This forces an interrupt if we haven't triggered within a few conversion
// periods.
#include <stdbool.h>
#include "gpio.h"
#include "i2c.h"
#include "soft_timer.h"
#include "status.h"
// Arbitrary watchdog timeout period
#define ADS1015_WATCHDOG_TIMEOUT_MS 100
typedef enum {
ADS1015_ADDRESS_GND = 0,
ADS1015_ADDRESS_VDD,
ADS1015_ADDRESS_SDA,
ADS1015_ADDRESS_SCL,
NUM_ADS1015_ADDRESSES,
} Ads1015Address;
typedef enum {
ADS1015_CHANNEL_0 = 0,
ADS1015_CHANNEL_1,
ADS1015_CHANNEL_2,
ADS1015_CHANNEL_3,
NUM_ADS1015_CHANNELS,
} Ads1015Channel;
// The callback runs after each conversion from the channel.
typedef void (*Ads1015Callback)(Ads1015Channel channel, void *context);
typedef struct Ads1015Storage {
I2CPort i2c_port;
uint8_t i2c_addr;
GpioAddress ready_pin;
int16_t channel_readings[NUM_ADS1015_CHANNELS];
Ads1015Channel current_channel;
uint8_t channel_bitset;
uint8_t pending_channel_bitset;
Ads1015Callback channel_callback[NUM_ADS1015_CHANNELS];
void *callback_context[NUM_ADS1015_CHANNELS];
SoftTimerId watchdog_timer;
bool watchdog_kicked;
bool data_valid;
} Ads1015Storage;
// Initiates ads1015 by setting up registers and enabling ALRT/RDY Pin.
StatusCode ads1015_init(Ads1015Storage *storage, I2CPort i2c_port, Ads1015Address i2c_addr,
GpioAddress *ready_pin);
// Enable/disables a channel, and registers a callback on the channel.
StatusCode ads1015_configure_channel(Ads1015Storage *storage, Ads1015Channel channel, bool enable,
Ads1015Callback callback, void *context);
// Reads raw 12 bit conversion results which are expressed in two's complement format.
StatusCode ads1015_read_raw(Ads1015Storage *storage, Ads1015Channel channel, int16_t *reading);
// Reads conversion value in mVolt.
StatusCode ads1015_read_converted(Ads1015Storage *storage, Ads1015Channel channel,
int16_t *reading);
|
#pragma once
#include <glbinding/gl/boolean.h>
#include <glbinding/nogl.h>
namespace gl45
{
// import booleans to namespace
using gl::GL_FALSE;
using gl::GL_TRUE;
} // namespace gl45
|
// Copyright Joakim Karlsson & Kim Gräsman 2010-2012.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef IGLOO_ALLOPERATOR_H
#define IGLOO_ALLOPERATOR_H
#include <igloo/fluent/operators/collections/collectionoperator.h>
namespace igloo {
struct AllOperator : public CollectionOperator
{
template <typename ConstraintListType, typename ActualType>
void Evaluate(ConstraintListType& list, ResultStack& result, OperatorStack& operators, const ActualType& actual)
{
unsigned int passed_elements = CollectionConstraintEvaluator<ConstraintListType, ActualType>::Evaluate(*this, list, result, operators, actual);
result.push(passed_elements == actual.size());
}
};
template<>
struct Stringizer<AllOperator>
{
static std::string ToString(const AllOperator&)
{
return "all";
}
};
}
#endif
|
//
// ViewController.h
// iTahDoodle
//
// Created by edwardtoday on 12/22/14.
// Copyright (c) 2014 edwardtoday. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface ViewController : UIViewController
@end
|
//
// DConnectManagerDeliveryProfile.h
// DConnectSDK
//
// Copyright (c) 2014 NTT DOCOMO,INC.
// Released under the MIT license
// http://opensource.org/licenses/mit-license.php
//
#import "DConnectProfile.h"
/**
* デバイスプラグインにリクエストを配送するためのプロファイル.
*/
@interface DConnectManagerDeliveryProfile : DConnectProfile
@end
|
//
// ShowReturnController.h
// Pigeon
//
// Created by James Bucanek on 12/24/13.
// Copyright (c) 2013 James Bucanek. See LICENSE.txt.
//
#import "ShowLocationController.h"
//
// A subclass of ShowLocationController that maintains a second overlay that
// draws the path from the user's current location back to the saved location.
//
@interface ShowReturnController : ShowLocationController
@property (nonatomic) BOOL lightPath;
@end
|
#ifndef G711U_H
#define G711U_H
class G711u
{
public:
G711u();
unsigned char encode(short sample);
short decode(unsigned char sample);
private:
short decodetable[256];
unsigned char encodetable[65536];
};
#endif // G711U_H
|
//----------------------------------------------------------------------------
//
// "Copyright Centre National d'Etudes Spatiales"
//
// License: LGPL
//
// See LICENSE.txt file in the top level directory for more details.
//
//----------------------------------------------------------------------------
// $Id$
#ifndef dsd_h
#define dsd_h
#include <iostream>
#include <EnvisatAsar/EnvisatAsarRecord.h>
namespace ossimplugins
{
/**
* @ingroup dsdRecord
* @brief This class is able to read the ASAR dsd record
*/
class dsd : public EnvisatAsarRecord
{
public:
/**
* @brief Constructor
*/
dsd();
/**
* @brief Destructor
*/
virtual ~dsd();
/**
* @brief This function write the dsd in a stream
*/
friend std::ostream& operator<<(std::ostream& os, const dsd& data);
/**
* @brief This function read a dsd from a stream
*/
friend std::istream& operator>>(std::istream& is, dsd& data);
/**
* @brief Copy constructor
*/
dsd(const dsd& rhs);
/**
* @brief Copy operator
*/
dsd& operator=(const dsd& rhs);
/**
* @brief This function is able to create a new instance of the class
*/
EnvisatAsarRecord* Instanciate()
{
return new dsd();
};
/**
* @brief This function is able to create a new instance of the class initialised with the data of the calling instance
*/
EnvisatAsarRecord* Clone()
{
return new dsd(*this);
};
/**
* @brief Read the class data from a stream
*/
void Read(std::istream& is)
{
is>>*this;
};
/**
* @brief Write the class to a stream
*/
void Write(std::ostream& os)
{
os<<*this;
};
/**
* @brief Data set Name
*/
std::string get_ds_name()
{
return _ds_name;
}
/**
* @brief Data set Type
*/
std::string get_ds_type()
{
return _ds_type;
}
/**
* @brief Data set Filename
*/
std::string get_filename()
{
return _filename;
}
/**
* @brief Data set Offset
*/
double get_ds_offset()
{
return _ds_offset;
}
/**
* @brief Data set Size
*/
double get_ds_size()
{
return _ds_size;
}
/**
* @brief Number of data set record
*/
int get_num_dsr()
{
return _num_dsr;
}
/**
* @brief Data set record size
*/
int get_dsr_size()
{
return _dsr_size;
}
/**
* @brief Data set Name
*/
std::string _ds_name;
/**
* @brief Data set Type
*/
std::string _ds_type;
/**
* @brief Data set Filename
*/
std::string _filename;
/**
* @brief Data set Offset
*/
double _ds_offset;
/**
* @brief Data set Size
*/
double _ds_size;
/**
* @brief Number of data set record
*/
int _num_dsr;
/**
* @brief Data set record size
*/
int _dsr_size;
private:
};
}
#endif
|
// Copyright (c) 2015-2019 Patricio Cubillos and contributors.
// pytips is open-source software under the MIT license (see LICENSE).
/* Definitions for indexing Numpy arrays: */
/* 1D double ndarray: */
#define INDd(a,i) *((double *)(PyArray_DATA(a) + i * PyArray_STRIDE(a, 0)))
/* 1D integer ndarray: */
#define INDi(a,i) *((int *)(PyArray_DATA(a) + i * PyArray_STRIDE(a, 0)))
|
#include <sgfx.h>
#include <sgfx_draw.h>
#include <sgfx_image.h>
#include <sgfx_log.h>
#include <sgfx_surface.h>
int main(int argc, char **argv) {
if (sgfx_init(argc, argv) == SGFX_OK) {
SGFXSurface surface;
SGFXSurfaceDescription desc;
desc.width = -1;
desc.height = -1;
desc.color = (int32_t)0x000000FF;
desc.type = PRIMARY;
desc.buffer = DOUBLE;
if (sgfx_create_surface(&surface, &desc) == SGFX_OK) {
int xres, yres;
sgfx_get_resolution(&surface, &xres, &yres);
sgfx_clear_surface(&surface, (int32_t)0x000000FF);
sgfx_draw_image(&surface, "../examples/resources/images/butterfree.bmp",
xres / 7, yres / 4, xres / 7, xres / 7,
SGFX_IMAGE_TYPE_BMP);
sgfx_draw_image(&surface, "../examples/resources/images/butterfree.ppm",
xres / 4, yres / 2, xres / 7, xres / 7,
SGFX_IMAGE_TYPE_PPM);
sgfx_draw_image(&surface, "../examples/resources/images/butterfree.png",
xres / 7, yres / 2, xres / 7, xres / 7,
SGFX_IMAGE_TYPE_PNG);
sgfx_draw_image(&surface, "../examples/resources/images/butterfree.png",
xres / 4, yres / 4, xres / 7, xres / 7,
SGFX_IMAGE_TYPE_PNG);
sgfx_flip(&surface, NULL);
sgfx_destroy_surface(&surface);
}
}
sgfx_close();
return 0;
} |
/*
* rt_nonfinite.h
*
* Real-Time Workshop code generation for Simulink model "TemplateLgV2.mdl".
*
* Model Version : 1.114
* Real-Time Workshop version : 7.3 (R2009a) 15-Jan-2009
* C source code generated on : Sun Mar 30 09:45:10 2014
*
* Target selection: nidll_vxworks.tlc
* Note: GRT includes extra infrastructure and instrumentation for prototyping
* Embedded hardware selection: 32-bit Generic
* Code generation objectives: Unspecified
* Validation result: Not run
*/
#ifndef RTW_HEADER_rt_nonfinite_h_
#define RTW_HEADER_rt_nonfinite_h_
#include <stddef.h>
#include "rtwtypes.h"
extern real_T rtInf;
extern real_T rtMinusInf;
extern real_T rtNaN;
extern real32_T rtInfF;
extern real32_T rtMinusInfF;
extern real32_T rtNaNF;
extern void rt_InitInfAndNaN(size_t realSize);
extern boolean_T rtIsInf(real_T value);
extern boolean_T rtIsInfF(real32_T value);
extern boolean_T rtIsNaN(real_T value);
extern boolean_T rtIsNaNF(real32_T value);
#endif /* RTW_HEADER_rt_nonfinite_h_ */
|
//
// telehash_ios.h
// telehash-ios
//
// Created by Thomas Muldowney on 9/30/13.
// Copyright (c) 2013 Telehash Foundation. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface telehash_ios : NSObject
@end
|
// ======================================================================
/*!
* \file NFmiStatusString.h
* \brief Interface of class NFmiStatusString
*/
// ======================================================================
#pragma once
#include "NFmiString.h"
//! Undocumented
class NFmiStatusString : public NFmiString
{
public:
~NFmiStatusString();
NFmiStatusString();
NFmiStatusString(const NFmiStatusString& theStatusString);
NFmiStatusString(const NFmiString& theString, long theStatus);
NFmiStatusString& operator=(const NFmiStatusString& theStausString);
long Status();
const NFmiString& String();
virtual unsigned long ClassId() const { return kNFmiStatusString; };
virtual NFmiString* Clone() const;
virtual std::ostream& Write(std::ostream& file) const;
virtual std::istream& Read(std::istream& file);
private:
long itsStatus;
}; // class NFmiStatusString
// ======================================================================
|
// OCHamcrest by Jon Reid, http://qualitycoding.org/about/
// Copyright 2017 hamcrest.org. See LICENSE.txt
#import <OCHamcrestIOS/HCDiagnosingMatcher.h>
NS_ASSUME_NONNULL_BEGIN
/*!
* @abstract Calculates the logical conjunction of multiple matchers.
* @discussion Evaluation is shortcut, so subsequent matchers are not called if an earlier matcher
* returns <code>NO</code>.
*/
@interface HCAllOf : HCDiagnosingMatcher
- (instancetype)initWithMatchers:(NSArray<id <HCMatcher>> *)matchers NS_DESIGNATED_INITIALIZER;
- (instancetype)init NS_UNAVAILABLE;
@end
FOUNDATION_EXPORT id HC_allOfIn(NSArray<id <HCMatcher>> *matchers);
#ifndef HC_DISABLE_SHORT_SYNTAX
/*!
* @abstract Creates a matcher that matches when the examined object matches <b>all</b> of the
* specified matchers.
* @param matchers An array of matchers. Any element that is not a matcher is implicitly wrapped in
* an <em>equalTo</em> matcher to check for equality.
* @discussion
* <b>Example</b><br />
* <pre>assertThat(\@"myValue", allOfIn(\@[startsWith(\@"my"), containsSubstring(\@"Val")]))</pre>
*
* <b>Name Clash</b><br />
* In the event of a name clash, <code>#define HC_DISABLE_SHORT_SYNTAX</code> and use the synonym
* HC_allOfIn instead.
*/
static inline id allOfIn(NSArray *matchers)
{
return HC_allOfIn(matchers);
}
#endif
FOUNDATION_EXPORT id HC_allOf(id matchers, ...) NS_REQUIRES_NIL_TERMINATION;
#ifndef HC_DISABLE_SHORT_SYNTAX
/*!
* @abstract Creates a matcher that matches when the examined object matches <b>all</b> of the
* specified matchers.
* @param matchers... A comma-separated list of matchers ending with <code>nil</code>. Any argument
* that is not a matcher is implicitly wrapped in an <em>equalTo</em> matcher to check for equality.
* @discussion
* <b>Example</b><br />
* <pre>assertThat(\@"myValue", allOf(startsWith(\@"my"), containsSubstring(\@"Val"), nil))</pre>
*
* <b>Name Clash</b><br />
* In the event of a name clash, <code>#define HC_DISABLE_SHORT_SYNTAX</code> and use the synonym
* HC_allOf instead.
*/
#define allOf(matchers...) HC_allOf(matchers)
#endif
NS_ASSUME_NONNULL_END
|
#ifndef PINS_H
#define PINS_H
int POT_PIN = 2;
int CLK_BEEP_PIN = 8;
int FEEDBACK_PIN = 9;
int LED_R = 2;
int LED_B = 4;
int LED_G = 7;
int OUTSIDE_BUTTON_PIN = 3;
#endif
|
//
// HYBImageCropController.h
// CALayer精讲
//
// Created by huangyibiao on 15/12/8.
// Copyright © 2015年 huangyibiao. All rights reserved.
//
#import "HYBBaseController.h"
@interface HYBImageCropController : HYBBaseController
@end
|
#ifndef CSVGFeFunc_H
#define CSVGFeFunc_H
#include <CSVGObject.h>
class CSVGFeFunc : public CSVGObject, public CSVGPrintBase<CSVGFeFunc> {
public:
using ValueTable = std::vector<double>;
public:
CSVG_OBJECT_DEF("feFunc", CSVGObjTypeId::FE_FUNC)
CSVGFeFunc(CSVG &svg, CRGBAComponent component);
CSVGFeFunc(const CSVGFeFunc &func);
CSVGFeFunc *dup() const override;
std::string getTagName() const override;
CRGBAComponent getComponent() const { return component_; }
void setComponent(CRGBAComponent c) { component_ = c; }
CSVGFilterFuncType getType() const { return type_.getValue(CSVGFilterFuncType::LINEAR); }
double getSlope() const { return slope_.getValue(1); }
void setSlope(double r) { slope_ = r; }
double getIntercept() const { return intercept_.getValue(0); }
void setIntercept(double r) { intercept_ = r; }
double getAmplitude() const { return amplitude_.getValue(1); }
void setAmplitude(double r) { amplitude_ = r; }
double getExponent() const { return exponent_.getValue(1); }
void setExponent(double r) { exponent_ = r; }
double getOffset() const { return offset_.getValue(0); }
void setOffset(double r) { offset_ = r; }
const ValueTable &getTable() const { return table_; }
void setTable(const ValueTable &t) { table_ = t; }
bool processOption(const std::string &name, const std::string &value) override;
bool isDrawable() const override { return false; }
void print(std::ostream &os, bool hier=false) const override;
void printValues(std::ostream &os, bool flat=false) const override;
void accept(CSVGVisitor *visitor) override { visitor->visit(this); }
private:
CRGBAComponent component_;
COptValT<CSVGFilterFuncType> type_;
// linear
COptReal slope_;
COptReal intercept_;
// gamma
COptReal amplitude_;
COptReal exponent_;
COptReal offset_;
// table/discrete
ValueTable table_;
};
#endif
|
#pragma once
namespace fastbird
{
struct Candidate
{
bool operator< (const Candidate& other) const
{
return mName < other.mName;
}
bool operator== (const std::string& otherName) const
{
return mName == otherName;
}
void AddCandidate(const StringVector& candidates);
std::string mName;
std::vector<Candidate> mChildren;
};
typedef std::vector<Candidate> CANDIDATES;
class CandidatesData
{
public:
CandidatesData();
~CandidatesData();
void AddCandidate(const char* name);
void AddCandidatesTo(const char* parent, const StringVector& candidates);
StringVector GetCandidates(const char* input, int& outDepth);
private:
CANDIDATES mCandidates;
};
} |
//
// RxQueue.h
// RxQueue
//
// Created by Tomoya Hirano on 2017/11/29.
// Copyright © 2017年 Tomoya Hirano. All rights reserved.
//
#import <UIKit/UIKit.h>
//! Project version number for RxQueue.
FOUNDATION_EXPORT double RxQueueVersionNumber;
//! Project version string for RxQueue.
FOUNDATION_EXPORT const unsigned char RxQueueVersionString[];
// In this header, you should import all the public headers of your framework using statements like #import <RxQueue/PublicHeader.h>
|
// -*- C++ -*-
//==========================================================================
/**
* @file Condition_T.h
*
* $Id: Condition_T.h 2622 2015-08-13 18:30:00Z mitza $
*
* Moved from Synch.h.
*
* @author Douglas C. Schmidt <schmidt@cs.wustl.edu>
*/
//==========================================================================
#ifndef ACE_CONDITION_T_H
#define ACE_CONDITION_T_H
#include /**/ "ace/pre.h"
#include "ace/OS_NS_Thread.h"
#include "ace/Condition_Attributes.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
#if defined (ACE_HAS_THREADS) /* ACE platform supports some form of threading. */
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
class ACE_Time_Value;
/**
* @class ACE_Condition
*
* @brief ACE_Condition variable wrapper, which allows threads to block
* until shared data changes state.
*
* A condition variable enables threads to atomically block and
* test the condition under the protection of a mutual exclusion
* lock (mutex) until the condition is satisfied. That is,
* the mutex must have been held by the thread before calling
* wait or signal on the condition. If the condition is false,
* a thread blocks on a condition variable and atomically
* releases the mutex that is waiting for the condition to
* change. If another thread changes the condition, it may wake
* up waiting threads by signaling the associated condition
* variable. The waiting threads, upon awakening, reacquire the
* mutex and re-evaluate the condition.
* Note, you can only parameterize <ACE_Condition> with
* @a ACE_Thread_Mutex, @a ACE_Recursive_Thread_Mutex, or @a ACE_Null_Mutex.
*/
template <class MUTEX>
class ACE_Condition
{
public:
/// Initialize the condition variable.
ACE_Condition (MUTEX &m, int type = USYNC_THREAD,
const ACE_TCHAR *name = 0, void *arg = 0);
/// Initialize the condition variable.
ACE_Condition (MUTEX &m,
const ACE_Condition_Attributes &attributes,
const ACE_TCHAR *name = 0,
void *arg = 0);
/// Implicitly destroy the condition variable.
~ACE_Condition (void);
// = Lock accessors.
/**
* Block on condition, or until absolute time-of-day has passed. If
* @a abstime == 0 use "blocking" <wait> semantics. Else, if @a abstime
* != 0 and the call times out before the condition is signaled
* wait() returns -1 and sets errno to ETIME.
*/
int wait (const ACE_Time_Value *abstime);
/// Block on condition.
int wait (void);
/**
* Block on condition or until absolute time-of-day has passed. If
* @a abstime == 0 use "blocking" wait() semantics on the @a mutex
* passed as a parameter (this is useful if you need to store the
* <Condition> in shared memory). Else, if @a abstime != 0 and the
* call times out before the condition is signaled wait() returns -1
* and sets errno to ETIME.
*/
int wait (MUTEX &mutex, const ACE_Time_Value *abstime = 0);
/// Signal one waiting thread.
int signal (void);
/// Signal *all* waiting threads.
int broadcast (void);
// = Utility methods.
/// Explicitly destroy the condition variable.
int remove (void);
/// Returns a reference to the underlying mutex_;
MUTEX &mutex (void);
/// Dump the state of an object.
void dump (void) const;
/// Declare the dynamic allocation hooks.
ACE_ALLOC_HOOK_DECLARE;
protected:
/// Condition variable.
ACE_cond_t cond_;
/// Reference to mutex lock.
MUTEX &mutex_;
private:
// = Prevent assignment and initialization.
ACE_UNIMPLEMENTED_FUNC (void operator= (const ACE_Condition<MUTEX> &))
ACE_UNIMPLEMENTED_FUNC (ACE_Condition (const ACE_Condition<MUTEX> &))
};
/**
* @class ACE_Thread_Condition
*
* @brief ACE_Condition variable wrapper that works within processes.
*
* A condition variable enables threads to atomically block and
* test the condition under the protection of a mutual exclu-
* sion lock (mutex) until the condition is satisfied. That is,
* the mutex must have been held by the thread before calling
* wait or signal on the condition. If the condition is false,
* a thread blocks on a condition variable and atomically
* releases the mutex that is waiting for the condition to
* change. If another thread changes the condition, it may wake
* up waiting threads by signaling the associated condition
* variable. The waiting threads, upon awakening, reacquire the
* mutex and re-evaluate the condition.
*/
template <class MUTEX>
class ACE_Thread_Condition : public ACE_Condition<MUTEX>
{
public:
// = Initialization method.
ACE_Thread_Condition (MUTEX &m, const ACE_TCHAR *name = 0, void *arg = 0);
/// Dump the state of an object.
void dump (void) const;
/// Declare the dynamic allocation hooks.
ACE_ALLOC_HOOK_DECLARE;
};
ACE_END_VERSIONED_NAMESPACE_DECL
#if defined (__ACE_INLINE__)
#include "ace/Condition_T.inl"
#endif /* __ACE_INLINE__ */
#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
#include "ace/Condition_T.cpp"
#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
#pragma implementation ("Condition_T.cpp")
#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
#endif /* ACE_HAS_THREADS */
#include /**/ "ace/post.h"
#endif /* ACE_CONDITION_T_H */
|
//
// ViewController.h
// BarrageDemo
//
// Created by Ding on 2017/9/16.
// Copyright © 2017年 XU. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface ViewController : UIViewController
@end
|
//
// IFlyPcmRecorder.h
// MSC
// description:
// Created by ypzhao on 12-11-15.
// Copyright (c) 2012年 iflytek. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <AudioToolbox/AudioQueue.h>
#import <AudioToolbox/AudioFile.h>
#import <AudioToolbox/AudioServices.h>
#import <AudioToolbox/AudioConverter.h>
#import <AVFoundation/AVFoundation.h>
@class IFlyPcmRecorder;
/*!
* 录音协议
*/
@protocol IFlyPcmRecorderDelegate <NSObject>
/*!
* 回调音频数据
*
* @param buffer 音频数据
* @param size 表示音频的长度
*/
- (void)onIFlyRecorderBuffer:(const void *)buffer bufferSize:(int)size;
/*!
* 回调音频的错误码
*
* @param recoder 录音器
* @param error 错误码
*/
- (void)onIFlyRecorderError:(IFlyPcmRecorder *)recoder theError:(int)error;
@optional
/*!
* 回调录音音量
*
* @param power 音量值
*/
- (void)onIFlyRecorderVolumeChanged:(int)power;
@end
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
/*!
* 录音器控件
*/
@interface IFlyPcmRecorder : NSObject <AVAudioSessionDelegate>
#pragma clang diagnostic pop
/*!
* 录音委托对象
*/
@property (nonatomic, assign) id<IFlyPcmRecorderDelegate> delegate;
/*!
* 用于设置是否在录音结束后发送Deactive通知,默认是YES:发送
*/
@property (nonatomic, assign) BOOL isNeedDeActive;
/*!
* 单例模式
*
* @return 返回录音对象单例
*/
+ (instancetype)sharedInstance;
/*!
* 开始录音
*
* @return 开启录音成功返回YES,否则返回NO
*/
- (BOOL)start;
/*!
* 停止录音
*/
- (void)stop;
/*!
* 设置音频采样率
*
* @param rate -[in] 采样率,8k/16k
*/
- (void)setSample:(NSString *)rate;
/*!
* 设置录音音量回调时间间隔参数
*/
- (void)setPowerCycle:(float)cycle;
/*!
* 保存录音
*
* @param savePath 音频保存路径
*/
- (void)setSaveAudioPath:(NSString *)savePath;
@end
|
#ifndef _Motion_H
#define _Motion_H
#include "RTIMULib.h"
#include "RTIMULibDefs.h"
#include "RunningAverage.h"
#define ACCEL_AVG_HISTORY 5 // size of moving average filter
#define ACCEL_VAR_HISTORY 7 // size of moving average filter
#define HEADING_AVG_HISTORY 25 // size of moving average filter
# define velocityDriftLearningAlpha 0.2f
// this defines the gyroscope noise level
// #define RTIMU_FUZZY_GYRO_ZERO 0.20
#define RTIMU_FUZZY_GYRO_ZERO 0.07
#define RTIMU_FUZZY_DELTA_GYRO_ZERO 0.01
// defines the threshold for fast/slow learning
#define RTIMU_FUZZY_GYRO_BIAS 0.01
// this defines the accelerometer noise level
#define RTIMU_FUZZY_ACCEL_ZERO 0.01
class RTMotion
{
public:
// Creates motion object
// Creates global motion structure
// and creates averaging filters
RTMotion(RTIMUSettings *settings);
virtual ~RTMotion();
// Initialize motion data
// Call after creating Motion object
void motionInit();
// Reset Velocity and Position to Zero
void motionReset();
// Reset Position to Zero
void motionResetPosition();
// Updates heading averaging filter and returns average heading
RTFLOAT updateAverageHeading(RTFLOAT& heading);
// Based on 3 measures decided if motion occurred:
// Absolute acceleration - gravity
// Acceleration deviation from moving average
// ABsotulte gyro values
bool detectMotion(RTVector3& acc, RTVector3& gyr);
// Computes world coordinate based residuals, velocity and position
// Computes velocity drift when motion comes to halt, as velocity should be zero at that time
void updateVelocityPosition(RTVector3& residuals, RTQuaternion& q, float accScale, uint64_t& timestamp, bool& motion);
RTIMUSettings *m_settings;
MOTION_DATA m_MotionData; // the data from the Motion Processor
MOTION_DATA& getMotionData() { return m_MotionData; }
const RTVector3& getResidualsBias() { return m_residualsBias; }
protected:
uint64_t m_timestamp_previous;
RTVector3 m_residualsBias;
RTVector3 m_worldVelocity;
RTVector3 m_worldVelocity_drift;
RTVector3 m_worldVelocity_previous;
RTVector3 m_worldPosition;
RTVector3 m_worldResiduals;
RTVector3 m_worldResiduals_previous;
bool m_motion;
bool m_motion_previous;
uint64_t m_motionStart_time;
float m_dtmotion;
RTVector3 m_previousAccel;
RTVector3 m_previousGyro;
RunningAverage *m_accnorm_avg; // Running average for acceleration (motion detection)
RunningAverage *m_accnorm_var; // Running average for acceleration variance (motion detection)
RunningAverage *m_heading_X_avg; // Running average for heading (noise reduction)
RunningAverage *m_heading_Y_avg; // Running average for heading (noise reduction)
};
#endif // _Motion_H |
// ucdev_include_parser.cpp : Defines the entry point for the console application.
//
#pragma once
#include <vector>
#include <uc_dev/gx/img/img.h>
namespace uc
{
namespace model
{
namespace details
{
template <typename swizzle_t >
inline void swizzle_texture(const gx::imaging::cpu_texture& o, uint8_t* pixels_out)
{
auto w = o.width();
auto h = o.height();
//auto bpp = o.bpp();
auto pitch = o.row_pitch();
auto pixels_s = reinterpret_cast<const swizzle_t*> (o.pixels().get_pixels_cpu());
//auto size = o.size();
auto pixels_d = reinterpret_cast<swizzle_t*> (pixels_out);
for (auto i = 0U; i < h; ++i)
{
auto rs = pixels_s + i * pitch;
auto ds = pixels_d + i * pitch;
for (auto j = 0U; j < w; ++j)
{
//rgba to
swizzle_t r = *rs; rs++;
swizzle_t g = *rs; rs++;
swizzle_t b = *rs; rs++;
swizzle_t a = *rs; rs++;
//argb conversion
*ds = b; ds++;
*ds = g; ds++;
*ds = r; ds++;
*ds = a; ds++;
}
}
}
template <typename swizzle_t >
inline void swizzle_texture_3(const gx::imaging::cpu_texture& o, uint8_t* pixels_out)
{
auto w = o.width();
auto h = o.height();
//auto bpp = o.bpp();
auto pitch = o.row_pitch();
auto pixels_s = reinterpret_cast<const swizzle_t*> (o.pixels().get_pixels_cpu());
//auto size = o.size();
auto pixels_d = reinterpret_cast<swizzle_t*> (pixels_out);
for (auto i = 0U; i < h; ++i)
{
auto rs = pixels_s + i * pitch;
auto ds = pixels_d + i * pitch;
for (auto j = 0U; j < w; ++j)
{
//rgba to
swizzle_t r = *rs; rs++;
swizzle_t g = *rs; rs++;
swizzle_t b = *rs; rs++;
//argb conversion
*ds = b; ds++;
*ds = g; ds++;
*ds = r; ds++;
}
}
}
inline uint32_t reverse_bit(uint32_t x)
{
x = (((x & 0xaaaaaaaa) >> 1) | ((x & 0x55555555) << 1));
x = (((x & 0xcccccccc) >> 2) | ((x & 0x33333333) << 2));
x = (((x & 0xf0f0f0f0) >> 4) | ((x & 0x0f0f0f0f) << 4));
x = (((x & 0xff00ff00) >> 8) | ((x & 0x00ff00ff) << 8));
return((x >> 16) | (x << 16));
}
inline void mirror_bits_texture(const gx::imaging::cpu_texture& o, uint8_t* pixels_out)
{
auto w = o.width();
auto h = o.height();
//auto bpp = o.bpp();
auto pitch = o.row_pitch();
auto pixels_s = reinterpret_cast<const uint32_t*> (o.pixels().get_pixels_cpu());
auto pixels_d = reinterpret_cast<uint32_t*> (pixels_out);
for (auto i = 0U; i < h; ++i)
{
auto rs = pixels_s + i * pitch;
auto ds = pixels_d + i * pitch;
for (auto j = 0U; j < w; ++j)
{
//rgba to
uint32_t bytes = *rs; rs++;
//10bit
uint8_t r = static_cast<uint8_t>(bytes & 1023);
uint8_t g = static_cast<uint8_t>((bytes >> 10) & 1023);
uint8_t b = static_cast<uint8_t>((bytes >> 20) & 1023);
uint8_t a = static_cast<uint8_t>((bytes >> 30) & 0x3);
uint32_t m = a << 30 | (r << 20) | (g << 10) | b;
//argb conversion
*ds = m; ds++;
}
}
}
}
inline void swizzle_rgba_bgra(const gx::imaging::cpu_texture& o, uint8_t* pixels_out)
{
switch (o.type())
{
case gx::imaging::image_type::r32_g32_b32_a32_float: details::swizzle_texture<float>(o, pixels_out); break;
case gx::imaging::image_type::r16_g16_b16_a16_float: details::swizzle_texture<std::uint16_t>(o, pixels_out); break;
case gx::imaging::image_type::r16_g16_b16_a16_unorm: details::swizzle_texture<std::uint16_t>(o, pixels_out); break;
case gx::imaging::image_type::r8_g8_b8_a8_unorm: details::swizzle_texture<std::uint8_t>(o, pixels_out); break;
case gx::imaging::image_type::r10_g10_b10_xr_bias_a2_unorm: details::mirror_bits_texture(o, pixels_out); break;
case gx::imaging::image_type::r10_g10_b10_a2_unorm : details::mirror_bits_texture(o, pixels_out); break;
case gx::imaging::image_type::r32_g32_b32_float : details::swizzle_texture_3<float>(o, pixels_out); break;
default: assert(false);
}
}
}
}
|
/*************************************************************************/
/* editor_file_server.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* 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 EDITOR_FILE_SERVER_H
#define EDITOR_FILE_SERVER_H
#include "io/file_access_network.h"
#include "io/packet_peer.h"
#include "io/tcp_server.h"
#include "object.h"
#include "os/thread.h"
class EditorFileServer : public Object {
OBJ_TYPE(EditorFileServer, Object);
enum Command {
CMD_NONE,
CMD_ACTIVATE,
CMD_STOP,
};
struct ClientData {
Thread *thread;
Ref<StreamPeerTCP> connection;
Map<int, FileAccess *> files;
EditorFileServer *efs;
bool quit;
};
Ref<TCP_Server> server;
Set<Thread *> to_wait;
static void _close_client(ClientData *cd);
static void _subthread_start(void *s);
Mutex *wait_mutex;
Thread *thread;
static void _thread_start(void *);
bool quit;
Command cmd;
String password;
int port;
bool active;
public:
void start();
void stop();
bool is_active() const;
EditorFileServer();
~EditorFileServer();
};
#endif // EDITOR_FILE_SERVER_H
|
/*
* Generated by class-dump 3.3.4 (64 bit).
*
* class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard.
*/
#import "NSObject.h"
@class NSArray, NSMutableArray;
@interface AVCaptureMovieFileOutputInternal : NSObject
{
NSMutableArray *recordingDelegatesArray;
CDStruct_1b6d18a9 movieFragmentInterval;
NSArray *metadata;
_Bool sendLastVideoPreviewFrame;
}
- (void)dealloc;
- (id)init;
@end
|
// qstrs specific to this port
Q(help)
Q(collections)
Q(struct)
Q(microbit)
Q(reset)
Q(sleep)
Q(running_time)
Q(panic)
Q(temperature)
Q(this)
Q(authors)
Q(antigravity)
Q(love)
Q(badaboom)
Q(MicroBitDigitalPin)
Q(MicroBitAnalogDigitalPin)
Q(MicroBitTouchPin)
Q(read_digital)
Q(write_digital)
Q(read_analog)
Q(write_analog)
Q(set_analog_period)
Q(set_analog_period_microseconds)
Q(get_analog_period_microseconds)
Q(is_touched)
Q(MicroBitIO)
Q(pin0)
Q(pin1)
Q(pin2)
Q(pin3)
Q(pin4)
Q(pin5)
Q(pin6)
Q(pin7)
Q(pin8)
Q(pin9)
Q(pin10)
Q(pin11)
Q(pin12)
Q(pin13)
Q(pin14)
Q(pin15)
Q(pin16)
Q(pin19)
Q(pin20)
Q(MicroBitImage)
Q(Image)
Q(image)
Q(width)
Q(height)
Q(invert)
Q(set_pixel)
Q(get_pixel)
Q(shift_left)
Q(shift_right)
Q(shift_up)
Q(shift_down)
Q(monospace)
Q(HEART)
Q(HEART_SMALL)
Q(HAPPY)
Q(SAD)
Q(SMILE)
Q(CONFUSED)
Q(ANGRY)
Q(ASLEEP)
Q(SURPRISED)
Q(SILLY)
Q(FABULOUS)
Q(MEH)
Q(YES)
Q(NO)
Q(CLOCK12)
Q(CLOCK1)
Q(CLOCK2)
Q(CLOCK3)
Q(CLOCK4)
Q(CLOCK5)
Q(CLOCK6)
Q(CLOCK7)
Q(CLOCK8)
Q(CLOCK9)
Q(CLOCK10)
Q(CLOCK11)
Q(ARROW_N)
Q(ARROW_NE)
Q(ARROW_E)
Q(ARROW_SE)
Q(ARROW_S)
Q(ARROW_SW)
Q(ARROW_W)
Q(ARROW_NW)
Q(TRIANGLE)
Q(TRIANGLE_LEFT)
Q(CHESSBOARD)
Q(DIAMOND)
Q(DIAMOND_SMALL)
Q(SQUARE)
Q(SQUARE_SMALL)
Q(RABBIT)
Q(COW)
Q(MUSIC_CROTCHET)
Q(MUSIC_QUAVER)
Q(MUSIC_QUAVERS)
Q(PITCHFORK)
Q(XMAS)
Q(PACMAN)
Q(TARGET)
Q(TSHIRT)
Q(ROLLERSKATE)
Q(DUCK)
Q(HOUSE)
Q(TORTOISE)
Q(BUTTERFLY)
Q(STICKFIGURE)
Q(GHOST)
Q(SWORD)
Q(GIRAFFE)
Q(SKULL)
Q(UMBRELLA)
Q(SNAKE)
Q(ALL_ARROWS)
Q(ALL_CLOCKS)
Q(MicroBitDisplay)
Q(set_brightness)
Q(set_display_mode)
Q(display)
Q(show)
Q(scroll)
Q(delay)
Q(stride)
Q(start)
Q(wait)
Q(loop)
Q(copy)
Q(crop)
Q(slice)
Q(text)
Q(SlicedImage)
Q(ScrollingString)
Q(on)
Q(off)
Q(is_on)
Q(Facade)
Q(MicroBitButton)
Q(button_a)
Q(button_b)
Q(is_pressed)
Q(is_long_pressed)
Q(was_pressed)
Q(get_presses)
Q(was_clicked)
Q(was_double_clicked)
Q(was_long_clicked)
Q(was_hold)
Q(MicroBitAccelerometer)
Q(accelerometer)
Q(get_x)
Q(get_y)
Q(get_z)
Q(get_values)
Q(current_gesture)
Q(is_gesture)
Q(was_gesture)
Q(get_gestures)
Q(up)
Q(down)
Q(left)
Q(right)
Q(face up)
Q(face down)
Q(freefall)
Q(3g)
Q(6g)
Q(8g)
Q(shake)
Q(MicroBitCompass)
Q(compass)
Q(heading)
Q(is_calibrated)
Q(calibrate)
Q(clear_calibration)
Q(get_x)
Q(get_y)
Q(get_z)
Q(get_field_strength)
Q(MicroBitI2C)
Q(i2c)
Q(read)
Q(write)
Q(addr)
Q(n)
Q(buf)
Q(repeat)
Q(music)
Q(frequency)
Q(duration)
Q(pitch)
Q(pin)
Q(play)
Q(set_tempo)
Q(get_tempo)
Q(bpm)
Q(ticks)
Q(BADDY)
Q(BA_DING)
Q(BIRTHDAY)
Q(BLUES)
Q(CHASE)
Q(DADADADUM)
Q(ENTERTAINER)
Q(FUNERAL)
Q(FUNK)
Q(JUMP_DOWN)
Q(JUMP_UP)
Q(NYAN)
Q(ODE)
Q(POWER_DOWN)
Q(POWER_UP)
Q(PRELUDE)
Q(PUNCHLINE)
Q(PYTHON)
Q(RINGTONE)
Q(WAWAWAWAA)
Q(WEDDING)
Q(a)
Q(a#)
Q(a#:1)
Q(a#:3)
Q(a2)
Q(a4)
Q(a4:1)
Q(a4:3)
Q(a:1)
Q(a:2)
Q(a:4)
Q(a:5)
Q(b)
Q(b2:1)
Q(b3)
Q(b4)
Q(b4:1)
Q(b4:2)
Q(b5)
Q(b5:1)
Q(b:1)
Q(b:2)
Q(c)
Q(c#)
Q(c#5)
Q(c#5:1)
Q(c#5:2)
Q(c#:1)
Q(c#:8)
Q(c2:2)
Q(c3)
Q(c3:3)
Q(c3:4)
Q(c4)
Q(c4:1)
Q(c4:3)
Q(c4:4)
Q(c5)
Q(c5:1)
Q(c5:2)
Q(c5:3)
Q(c5:4)
Q(c:1)
Q(c:2)
Q(c:3)
Q(c:4)
Q(c:8)
Q(d)
Q(d#)
Q(d#5:2)
Q(d#:2)
Q(d#:3)
Q(d3)
Q(d4)
Q(d4:1)
Q(d5)
Q(d5:1)
Q(d5:2)
Q(d:1)
Q(d:2)
Q(d:3)
Q(d:4)
Q(d:5)
Q(d:6)
Q(d:8)
Q(e)
Q(e3:3)
Q(e4)
Q(e4:1)
Q(e5)
Q(e6:3)
Q(e:1)
Q(e:2)
Q(e:3)
Q(e:4)
Q(e:5)
Q(e:6)
Q(e:8)
Q(eb:8)
Q(f)
Q(f#)
Q(f#5)
Q(f#5:2)
Q(f#:1)
Q(f#:2)
Q(f#:8)
Q(f2)
Q(f:1)
Q(f:2)
Q(f:3)
Q(f:4)
Q(f:8)
Q(g)
Q(g#)
Q(g#:1)
Q(g#:3)
Q(g3:1)
Q(g4)
Q(g4:1)
Q(g4:2)
Q(g5)
Q(g5:1)
Q(g:1)
Q(g:2)
Q(g:3)
Q(g:8)
Q(r)
Q(r4:2)
Q(r:1)
Q(r:2)
Q(r:3)
Q(MicroBitUART)
Q(uart)
Q(init)
Q(baudrate)
Q(bits)
Q(parity)
Q(stop)
Q(pins)
Q(tx)
Q(rx)
Q(any)
Q(read)
Q(readall)
Q(readline)
Q(readinto)
Q(write)
Q(ODD)
Q(EVEN)
Q(MicroBitSPI)
Q(spi)
Q(init)
Q(baudrate)
Q(bits)
Q(mode)
Q(sclk)
Q(mosi)
Q(miso)
Q(write)
Q(write_readinto)
Q(neopixel)
Q(NeoPixel)
Q(clear)
Q(show)
Q(random)
Q(getrandbits)
Q(seed)
Q(randrange)
Q(randint)
Q(choice)
Q(uniform)
Q(audio)
Q(play)
Q(AudioFrame)
Q(pin)
Q(return_pin)
Q(source)
Q(copyfrom)
Q(name)
Q(os)
Q(uname)
Q(micropython)
Q(sysname)
Q(nodename)
Q(release)
Q(version)
Q(BytesIO)
Q(TextIO)
Q(read)
Q(write)
Q(writable)
Q(readall)
Q(name)
Q(listdir)
Q(machine)
Q(size)
Q(is_playing)
Q(speech)
Q(say)
Q(pronounce)
Q(sing)
Q(pitch)
Q(throat)
Q(mouth)
Q(speed)
Q(debug)
Q(translate)
Q(radio)
Q(reset)
Q(config)
Q(on)
Q(off)
Q(send_bytes)
Q(receive_bytes)
Q(send)
Q(receive)
Q(length)
Q(queue)
Q(channel)
Q(power)
Q(data_rate)
Q(address)
Q(group)
Q(RATE_250KBIT)
Q(RATE_1MBIT)
Q(RATE_2MBIT)
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.