text stringlengths 4 6.14k |
|---|
#include <stdio.h>
#include <aj_debug.h>
#include <aj_guid.h>
#include <aj_creds.h>
#include <aj_peer.h>
#include <aj_link_timeout.h>
#include "alljoyn.h"
uint32_t Get_AJ_Message_msgId();
uint32_t Get_AJ_Message_bodyLen();
const char * Get_AJ_Message_signature();
const char * Get_AJ_Message_objPath();
const char * Get_AJ_Message_iface();
const char * Get_AJ_Message_member();
const char * Get_AJ_Message_destination();
const char* AJ_StatusText(AJ_Status status);
const char* MyTranslator(uint32_t descId, const char* lang) ;
AJ_Message * Get_AJ_ReplyMessage();
AJ_Message * Get_AJ_Message();
//void InitNotificationContent();
AJ_Status AJNS_Producer_Start();
void SendNotification(uint16_t messageType, char * lang, char * msg);
AJ_BusAttachment * Get_AJ_BusAttachment();
AJ_Object * Allocate_AJ_Object_Array(uint32_t array_size);
void * Create_AJ_Object(uint32_t index, AJ_Object * array, char* path, AJ_InterfaceDescription* interfaces, uint8_t flags, void* context);
void * Get_Session_Opts();
void * Get_Arg();
AJ_Status AJ_MarshalArgs_cgo(AJ_Message* msg, char * a, char * b, char * c, char * d);
int UnmarshalPort();
typedef void * (*AboutPropGetter)(const char* name, const char* language);
void free (void *__ptr);
AJ_Status MarshalArg(AJ_Message* msg, char * sig, void * value);
AJ_Status AJ_DeliverMsg(AJ_Message* msg);
AJ_Status AJ_MarshalSignal_cgo(AJ_Message* msg, uint32_t msgId, uint32_t sessionId, uint8_t flags, uint32_t ttl);
AJ_Status UnmarshalJoinSessionArgs(AJ_Message* msg, uint16_t * port, uint32_t * sessionId);
AJ_Status UnmarshalLostSessionArgs(AJ_Message* msg, uint32_t * sessionId, uint32_t * reason);
void SetProperty(char* key, void * value);
void * GetProperty(char* key);
AJ_Status MyAboutPropGetter(AJ_Message* reply, const char* language);
void AJ_RegisterDescriptionLanguages(const char* const* languages);
char ** getLanguages();
//void AJ_PrintXMLWithDescriptions(const AJ_Object* objs, const char* languageTag);
|
//
// UIStoryboard+XR.h
// ATalk
//
// Created by 徐荣 on 16/4/5.
// Copyright © 2016年 xurong. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface UIStoryboard (XR)
/**
* 1.显示Storybaord的第一个控制器到窗口
*/
+(void)showInitialVCWithName:(NSString *)name;
+(id)initialVCWithName:(NSString *)name;
@end
|
/// Copyright 1993-2015 Timothy A. Budd
// -----------------------------------------------------------------------------
// This file is part of
/// --- Leda: Multiparadigm Programming Language
// -----------------------------------------------------------------------------
//
// Leda is free software: you can redistribute it and/or modify it under the
// terms of the MIT license, see file "COPYING" included in this distribution.
//
// -----------------------------------------------------------------------------
/// Title: Memory management for the Leda system
/// Description:
// Uses a variation on the Baker two-space algorithm
//
// The fundamental data type is the object.
// The first field in an object is a size, the low order two
// bits being used to maintain:
// * binary flag, used if data is binary
// * indirection flag, used if object has been relocated
// The first two data fields are always the class
// and a surrounding context, while remaining
// data fields are values (either binary or object pointers)
//
// A few objects (class tables, other items that are guaranteed
// not to change) are allocated in static memory space -- space
// which is not ever garbage collected.
// The only pointer from static memory back to dynamic memory is
// the global context.
// -----------------------------------------------------------------------------
#ifndef memory_h
#define memory_h
// -----------------------------------------------------------------------------
/// ledaValue
// -----------------------------------------------------------------------------
struct ledaValue
{
int size;
struct ledaValue* data[0];
};
// memoryBase holds the pointer to the current space,
// memoryPointer is the pointer into this space.
// To allocate, decrement memoryPointer by the correct amount.
// If the result is less than memoryBase, then garbage collection
// must take place
extern struct ledaValue* memoryPointer;
extern struct ledaValue* memoryBase;
// -----------------------------------------------------------------------------
/// Roots for the memory space
// -----------------------------------------------------------------------------
//- These are traced down during memory management
# define ROOTSTACKLIMIT 250
extern struct ledaValue* rootStack[];
extern int rootTop;
extern struct ledaValue* globalContext;
extern struct ledaValue* currentContext;
// -----------------------------------------------------------------------------
/// entry points
// -----------------------------------------------------------------------------
void gcinit(int, int);
struct ledaValue* gcollect(int);
struct ledaValue* staticAllocate(int);
# define gcalloc(sz) (((memoryPointer-=((sz)+2))<memoryBase)? \
gcollect(sz):(memoryPointer->size=(sz)<<2,memoryPointer))
# ifndef gcalloc
extern struct ledaValue* gcalloc(int);
# endif
int yyerror(char* s);
// -----------------------------------------------------------------------------
#endif // memory_h
// -----------------------------------------------------------------------------
|
// Copyright 1998-2016 Epic Games, Inc. All Rights Reserved.
#pragma once
#include "GameFramework/Character.h"
#include "FirstPersonCharacter.generated.h"
class UInputComponent;
UCLASS(config=Game)
class AFirstPersonCharacter : public ACharacter
{
GENERATED_BODY()
/** Pawn mesh: 1st person view (arms; seen only by self) */
UPROPERTY(VisibleDefaultsOnly, Category=Mesh)
class USkeletalMeshComponent* Mesh1P;
/** First person camera */
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Camera, meta = (AllowPrivateAccess = "true"))
class UCameraComponent* FirstPersonCameraComponent;
public:
AFirstPersonCharacter();
virtual void BeginPlay();
/** Base turn rate, in deg/sec. Other scaling may affect final turn rate. */
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category=Camera)
float BaseTurnRate;
/** Base look up/down rate, in deg/sec. Other scaling may affect final rate. */
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category=Camera)
float BaseLookUpRate;
/** Gun muzzle's offset from the characters location */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=Gameplay)
FVector GunOffset;
UPROPERTY(EditDefaultsOnly, Category = "Setup")
TSubclassOf<class AGun> GunBlueprint;
private:
AGun* Gun;
protected:
/** Handles moving forward/backward */
void MoveForward(float Val);
/** Handles stafing movement, left and right */
void MoveRight(float Val);
/**
* Called via input to turn at a given rate.
* @param Rate This is a normalized rate, i.e. 1.0 means 100% of desired turn rate
*/
void TurnAtRate(float Rate);
/**
* Called via input to turn look up/down at a given rate.
* @param Rate This is a normalized rate, i.e. 1.0 means 100% of desired turn rate
*/
void LookUpAtRate(float Rate);
struct TouchData
{
TouchData() { bIsPressed = false;Location=FVector::ZeroVector;}
bool bIsPressed;
ETouchIndex::Type FingerIndex;
FVector Location;
bool bMoved;
};
void BeginTouch(const ETouchIndex::Type FingerIndex, const FVector Location);
void EndTouch(const ETouchIndex::Type FingerIndex, const FVector Location);
void TouchUpdate(const ETouchIndex::Type FingerIndex, const FVector Location);
TouchData TouchItem;
protected:
// APawn interface
virtual void SetupPlayerInputComponent(UInputComponent* InputComponent) override;
// End of APawn interface
/*
* Configures input for touchscreen devices if there is a valid touch interface for doing so
*
* @param InputComponent The input component pointer to bind controls to
* @returns true if touch controls were enabled.
*/
bool EnableTouchscreenMovement(UInputComponent* InputComponent);
public:
/** Returns Mesh1P subobject **/
FORCEINLINE class USkeletalMeshComponent* GetMesh1P() const { return Mesh1P; }
/** Returns FirstPersonCameraComponent subobject **/
FORCEINLINE class UCameraComponent* GetFirstPersonCameraComponent() const { return FirstPersonCameraComponent; }
};
|
#ifndef LEDBARGRAPH_H
#define LEDBARGRAPH_H
class LedBargraph
{
public:
LedBargraph(int segments, int startPin, float minValue, float maxValue);
void setValue(float value);
private:
float _minValue;
float _range;
int _segments;
int _startPin;
};
#endif /* #ifndef LEDBARGRAPH_H */ |
#ifndef _MPGLGRID_H
#define _MPGLGRID_H
#ifdef __cplusplus
extern "C" {
#endif
#ifndef FALSE
#define FALSE 0
#endif
#ifndef TRUE
#define TRUE 1
#endif
#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif
#ifndef _MPGRID_H
#include <MPGrid.h>
#endif
#include <GL/gl.h>
#include <GL/glu.h>
#ifdef MP_PYTHON_LIB
#if PY_MAJOR_VERSION >= 3
#define PY3
#endif
#endif
/*--------------------------------------------------
text functions
*/
enum { MPGL_TextHelvetica10, MPGL_TextHelvetica12, MPGL_TextHelvetica18 };
void MPGL_TextBitmap(const char s[], int font_type);
/*--------------------------------------------------
colormap typedef and functions
*/
#define MPGL_COLORMAP_MAX 16
enum { MPGL_ColormapStep, MPGL_ColormapGrad };
typedef struct MPGL_Colormap {
#ifdef MP_PYTHON_LIB
PyObject_HEAD
#endif
int mode;
char title[32];
int nstep;
float step_color[MPGL_COLORMAP_MAX][3];
char label[MPGL_COLORMAP_MAX][32];
int ngrad;
float grad_color[MPGL_COLORMAP_MAX][3];
int nscale;
double range[2];
float size[2];
int font_type;
float font_color[3];
} MPGL_Colormap;
#ifdef MP_PYTHON_LIB
PyTypeObject MPGL_ColormapPyType;
#endif
void MPGL_ColormapInit(MPGL_Colormap *colormap);
void MPGL_ColormapColor(MPGL_Colormap *colormap);
void MPGL_ColormapGrayscale(MPGL_Colormap *colormap);
void MPGL_ColormapStepColor(MPGL_Colormap *colormap, int id, float color[]);
void MPGL_ColormapGradColor(MPGL_Colormap *colormap, double value, float color[]);
void MPGL_ColormapDraw(MPGL_Colormap *colormap);
/*--------------------------------------------------
scene typedef and functions
*/
enum { MPGL_ProjFrustum, MPGL_ProjOrtho };
typedef struct MPGL_SceneLight {
float position[4];
float specular[4];
float diffuse[4];
float ambient[4];
} MPGL_SceneLight;
typedef struct MPGL_Scene {
#ifdef MP_PYTHON_LIB
PyObject_HEAD
#endif
int proj;
double znear, zfar;
float lookat[9];
float mat_specular[4];
float mat_shininess;
float mat_emission[4];
float clear_color[4];
int nlight;
MPGL_SceneLight light[8];
int width, height;
} MPGL_Scene;
#ifdef MP_PYTHON_LIB
PyTypeObject MPGL_ScenePyType;
#endif
void MPGL_SceneInit(MPGL_Scene *scene);
MPGL_SceneLight *MPGL_SceneLightAdd(MPGL_Scene *scene, float x, float y, float z, float w);
void MPGL_SceneSetup(MPGL_Scene *scene);
void MPGL_SceneResize(MPGL_Scene *scene, int width, int height);
void MPGL_SceneFrontText(MPGL_Scene *scene, int x, int y, const char s[], int font_type);
/*--------------------------------------------------
model typedef and functions
*/
enum { MPGL_ModelModeRotate, MPGL_ModelModeTranslate, MPGL_ModelModeZoom };
typedef struct MPGL_Model {
#ifdef MP_PYTHON_LIB
PyObject_HEAD
#endif
float mat[4][4];
float center[3];
float scale;
float mat_inv[4][4];
float init_dir[6];
float region[6];
int button_down;
int button_x, button_y;
int button_mode;
} MPGL_Model;
#ifdef MP_PYTHON_LIB
PyTypeObject MPGL_ModelPyType;
#endif
void MPGL_ModelInit(MPGL_Model *model, float init_dir[], float region[]);
void MPGL_ModelReset(MPGL_Model *model);
void MPGL_ModelFit(MPGL_Model *model);
void MPGL_ModelZoom(MPGL_Model *model, float s);
void MPGL_ModelTranslateZ(MPGL_Model *model, float mz);
void MPGL_ModelTranslateY(MPGL_Model *model, float my);
void MPGL_ModelTranslateX(MPGL_Model *model, float mx);
void MPGL_ModelRotateZ(MPGL_Model *model, float az);
void MPGL_ModelRotateY(MPGL_Model *model, float ay);
void MPGL_ModelRotateX(MPGL_Model *model, float ax);
void MPGL_ModelInverse(MPGL_Model *model);
void MPGL_ModelSetDirection(MPGL_Model *model, float dir[6]);
void MPGL_ModelGetDirection(MPGL_Model *model, float dir[6]);
void MPGL_ModelSetAngle(MPGL_Model *model, float angle[3]);
void MPGL_ModelGetAngle(MPGL_Model *model, float angle[3]);
void MPGL_ModelTransform(MPGL_Model *model);
void MPGL_ModelButton(MPGL_Model *model, int x, int y, int down);
int MPGL_ModelMotion(MPGL_Model *model, MPGL_Scene *scene, int x, int y, int ctrl);
/*--------------------------------------------------
grid functions
*/
#define MPGL_GRID_TYPE_MAX 256
#define MPGL_GRID_QUADS_LIST0 101
#define MPGL_GRID_QUADS_LIST1 102
#define MPGL_GRID_QUADS_LIST2 103
#define MPGL_GRID_QUADS_LIST3 104
#define MPGL_GRID_QUADS_LIST4 105
#define MPGL_GRID_QUADS_LIST5 106
#define MPGL_GRID_CUBE_LIST 107
#define MPGL_GRID_CYLINDER_LIST 108
enum { MPGL_DrawMethodQuads, MPGL_DrawMethodCubes };
enum { MPGL_DrawKindType, MPGL_DrawKindUpdate, MPGL_DrawKindVal, MPGL_DrawKindCx, MPGL_DrawKindCy, MPGL_DrawKindCz };
typedef struct MPGL_GridDrawData {
#ifdef MP_PYTHON_LIB
PyObject_HEAD
#endif
int method;
int kind;
int disp[MPGL_GRID_TYPE_MAX];
int range[6];
} MPGL_GridDrawData;
#ifdef MP_PYTHON_LIB
PyTypeObject MPGL_GridDrawDataPyType;
#endif
void MPGL_GridDrawInit(MPGL_GridDrawData *draw);
void MPGL_GridDrawList(void);
void MPGL_GridDrawColormapRange(MPGL_GridDrawData *draw, MP_GridData *data, MPGL_Colormap *colormap);
void MPGL_GridDraw(MPGL_GridDrawData *draw, MP_GridData *data, MPGL_Colormap *colormap);
void MPGL_GridDrawAxis(int size[]);
void MPGL_GridDrawRegion(MPGL_GridDrawData *draw, MP_GridData *data, float region[]);
#ifdef __cplusplus
}
#endif
#endif /* _MPGLGRID_H */
|
/***************************************************************
To compile --at prompt type:
gcc -o hw6F02.exe -ansi hw6F02.c
To run --at prompt type:
./hw6F01.exe
This will work either on the Suns, Linux box, or cygwin gcc
***************************************************************/
#include <stdlib.h>
#include <stdio.h>
float s;
void part1() {
float sum=0;
float one = 1.0F;
int i;
for (i=20, sum=0.0; i<=100; i++) {
sum = sum + one/i;
}
printf ("\nPart 1A --increasing i's-- sum = %e\n", sum);
for (i=100,sum=0.0; i>=20; i--) {
sum = sum + one/i;
}
printf ("Part 1A --decreasing i's-- sum = %e\n", sum);
for (i=2000, sum=0.0; i<=10000000; i++) {
sum = sum + one/i;
}
printf ("\nPart 1B--increasing i's -- sum = %e\n", sum);
for (i=10000000,sum=0.0; i>=2000; i--) {
sum = sum + one/i;
}
printf ("Part 1B -- decreasing i's -- sum = %e\n", sum);
}/* End of part1() */
void part2() {
float f = 0.1F;
float sum = 0;
int i;
for (i=0; i<10;i++){
sum = sum + f;
}
printf("\nPart 2 -- f is %e, sum is %e\n",f,sum);
printf("Part 2B? sum == 1.0F IS false (%d)\n",sum==1.0F);
}
int main(void) {
part1();
part2();
return 0;
}
|
#ifndef THEPROJECT2_LIBS_THEENGINE2_INCLUDE_RENDER_ANIMATIONDATA_H_
#define THEPROJECT2_LIBS_THEENGINE2_INCLUDE_RENDER_ANIMATIONDATA_H_
#include "BoneKeyCollection.h"
namespace render::anim {
struct Animation
{
core::String Name;
float Fps;
float Duration;
BoneKeyCollection ArmatureKeys;
core::Vector<BoneKeyCollection> BoneKeys;
};
} // namespace render::anim
#endif // THEPROJECT2_LIBS_THEENGINE2_INCLUDE_RENDER_ANIMATIONDATA_H_
|
//
// TemplateFloorFocusView.h
// MVP
//
// Created by sunnyvale on 15/12/6.
// Copyright © 2015年 sunnyvale. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "TemplateCellProtocol.h"
#import "TemplateRenderProtocol.h"
@protocol TemplateCellProtocol;
@protocol TemplateRenderProtocol;
@interface TemplateFocusView : UIView<TemplateCellProtocol>
@property (nonatomic,copy)TapBlock tapBlock;
@end
|
#ifndef EYEDROPPERTOOL_H
#define EYEDROPPERTOOL_H
#include "drawingtool.h"
#include <QStringList>
namespace Velasquez
{
#define EYEDROPPER_CURSOR ":/Velasquez/Resources/Eyedropper.png"
// Cursor hotspot coordinates
#define EYEDROPPER_CURSOR_X 1
#define EYEDROPPER_CURSOR_Y 13
class EyedropperTool : public DrawingTool
{
Q_OBJECT
public:
enum {Type = 10009};
public:
EyedropperTool(QObject *parent);
virtual bool hasCursor() const;
virtual QCursor getDefaultCursor() const;
virtual qint32 getElementType() const;
virtual QStringList getFileExtensions() const;
virtual bool canCreate(QGraphicsSceneMouseEvent *mouseEvent) const;
virtual bool canCreate(QKeyEvent *keyEvent) const;
virtual bool canCreate(const QMimeData *data) const;
virtual void createElement(QGraphicsSceneMouseEvent *mouseEvent);
virtual void createElement(QKeyEvent *keyEvent);
virtual void createElement(const QMimeData *data, const QPointF &pos = QPointF());
signals:
void colorPicked(const QColor &color);
};
}
#endif // EYEDROPPERTOOL_H
|
//
// ResponseModel.h
// BSKit
//
// Created by XiaoYang on 16/1/24.
// Copyright © 2016年 Xiao Yang. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface ResponseModel : NSObject
/// 200是请求成功
@property (nonatomic, copy, nullable) NSString *code;
@property (nonatomic, copy, nullable) NSString *message;
/// 请求返回的model
/// 下载时是文件filePath
@property (nonatomic, strong, nullable) id data;
@property (nonatomic, copy, nullable) NSString *timestamp;
@end
|
//
// Coding_FileManager.h
// Coding_iOS
//
// Created by Ease on 14/11/18.
// Copyright (c) 2014年 Coding. All rights reserved.
//
#define kNotificationUploadCompled @"notification_upload_compled"
//{NSURLResponse: response, NSError: error, ProjectFile: data}
#import <Foundation/Foundation.h>
#import "AFNetworking.h"
#import "DirectoryWatcher.h"
#import "ProjectFile.h"
#import "FileVersion.h"
@class Coding_DownloadTask;
@class Coding_UploadTask;
@class ProjectFile;
@class Coding_UploadParams;
@protocol Coding_FileManagerDelegate;
@interface Coding_FileManager : NSObject
//download
+ (Coding_FileManager *)sharedManager;
+ (AFURLSessionManager *)af_manager;
- (AFURLSessionManager *)af_manager;
- (NSURL *)urlForDownloadFolder;
+ (NSArray *)localFileUrlList;
+(NSURL *)diskDownloadUrlForKey:(NSString *)storage_key;
+ (Coding_DownloadTask *)cDownloadTaskForKey:(NSString *)storage_key;
+ (void)cancelCDownloadTaskForKey:(NSString *)storage_key;
+ (Coding_DownloadTask *)cDownloadTaskForResponse:(NSURLResponse *)response;
+ (void)cancelCDownloadTaskForResponse:(NSURLResponse *)response;
- (Coding_DownloadTask *)addDownloadTaskForObj:(id)obj completionHandler:(void (^)(NSURLResponse *response, NSURL *filePath, NSError *error))completionHandler;
//upload
+ (BOOL)writeUploadDataWithName:(NSString *)fileName andAsset:(PHAsset *)asset;
+ (BOOL)writeUploadDataWithName:(NSString *)fileName andImage:(UIImage *)image;
+ (BOOL)deleteUploadDataWithName:(NSString *)fileName;
+ (NSURL *)diskUploadUrlForFile:(NSString *)diskFileName;
+ (Coding_UploadTask *)cUploadTaskForFile:(NSString *)diskFileName;
+ (void)cancelCUploadTaskForFile:(NSString *)diskFileName hasError:(BOOL)hasError;
+ (NSArray *)uploadFilesInProject:(NSString *)project_id andFolder:(NSString *)folder_id;
- (void)addUploadTaskWithFileName:(NSString *)fileName isQuick:(BOOL)isQuick resultBlock:(void (^)(Coding_UploadTask *uploadTask))block;
- (Coding_UploadTask *)addUploadTaskWithFileName:(NSString *)fileName projectIsPublic:(BOOL)is_public;
@end
@interface Coding_DownloadTask : NSObject
@property (strong, nonatomic) NSURLSessionDownloadTask *task;
@property (strong, nonatomic) NSProgress *progress;
@property (strong, nonatomic) NSString *diskFileName;
+ (Coding_DownloadTask *)cDownloadTaskWithTask:(NSURLSessionDownloadTask *)task progress:(NSProgress *)progress fileName:(NSString *)fileName;
- (void)cancel;
@end
@interface Coding_UploadTask : NSObject
@property (strong, nonatomic) NSURLSessionUploadTask *task;
@property (strong, nonatomic) NSProgress *progress;
@property (strong, nonatomic) NSString *fileName;
+ (Coding_UploadTask *)cUploadTaskWithTask:(NSURLSessionUploadTask *)task progress:(NSProgress *)progress fileName:(NSString *)fileName;
- (void)cancel;
@end
@interface Coding_UploadParams : NSObject
@property (strong, nonatomic) NSString *fileName, *authToken, *time, *uptoken, *fullName;
@property (strong, nonatomic) NSNumber *projectId, *fileSize, *userId, *dir;
@property (assign, nonatomic) BOOL isQuick;
+ (instancetype)instanceWithFileName:(NSString *)fileName;
- (void)configWithFileName:(NSString *)fileName;
- (NSDictionary *)toTokenParams;
- (NSURL *)filePathUrl;
- (NSDictionary *)toUploadParams;
@end
|
/*!
* producted by oc_json_plugin.py
* auth: w6
*/
#import <Foundation/Foundation.h>
@interface WliuTeam : NSObject
@property (nonatomic, assign) NSInteger count;
@property (nonnull, nonatomic, copy) NSString *name;
- (_Nonnull instancetype)initWithWliuTeamDic:(NSDictionary * _Nonnull)infoDic;
@end
@interface WliuResult : NSObject
@property (nonnull, nonatomic, copy) NSString *url;
@property (nonnull, nonatomic, copy) NSString *content;
@property (nonnull, nonatomic, copy) NSString *version;
@property (nonatomic, assign) float filesize;
@property (nonatomic, assign) NSInteger isforce;
- (_Nonnull instancetype)initWithWliuResultDic:(NSDictionary * _Nonnull)infoDic;
@end
@interface WliuBaseModel : NSObject
@property (nonnull, nonatomic, strong) WliuResult *result;
@property (nonnull, nonatomic, strong) NSArray<WliuTeam *> *team;
@property (nonatomic, assign) float xxasdaa;
@property (nonatomic, assign) NSInteger style;
@property (nonnull, nonatomic, copy) NSString *code;
@property (nonnull, nonatomic, copy) NSString *message;
- (_Nonnull instancetype)initWithWliuBaseModelDic:(NSDictionary * _Nonnull)infoDic;
@end
|
/*
* Generated by class-dump 3.3.4 (64 bit).
*
* class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard.
*/
#import "NSObject.h"
#import "NSCopying-Protocol.h"
// Not exported
@interface OADColorTransform : NSObject <NSCopying>
{
int mType;
}
+ (id)colorByApplyingTransforms:(id)arg1 toColor:(id)arg2;
+ (float)alphaByApplyingTransforms:(id)arg1 toAlpha:(float)arg2;
- (_Bool)isEqual:(id)arg1;
- (unsigned long long)hash;
- (int)type;
- (id)copyWithZone:(struct _NSZone *)arg1;
- (id)initWithType:(int)arg1;
@end
|
//
// AppDelegate.h
// WJCipher
//
// Created by Kevin on 15/3/29.
// Copyright (c) 2015年 Kevin. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface AppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@end
|
#pragma once
/*
The MIT License (MIT)
Copyright (c) 2015 Dennis Wandschura
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#include <vxLib/Graphics/TextureFormat.h>
#include <vxlib/Graphics/Surface.h>
namespace vx
{
namespace graphics
{
enum class TextureType : u8 { Flat, Cubemap, Volume };
namespace detail
{
extern u32 getRowPitchBlock(u32 width, u32 blockSize);
extern u32 getRowPitchNormal(u32 width, u32 components);
extern u32 getSizeNormal(const vx::uint2 &dim, u32 components);
extern u32 getSizeBlock(const vx::uint2 &dim, u32 blockSize);
}
extern u32 getRowPitch(TextureFormat format, u32 width);
extern u32 getTextureSize(TextureFormat format, const vx::uint2 &dim);
extern u32 textureFormatToDxgiFormat(TextureFormat format);
extern TextureFormat dxgiFormatToTextureFormat(u32 format);
class Face : public Surface
{
VX_TYPE_INFO;
Surface* m_mipmaps;
u32 m_mipmapCount;
#ifdef _VX_X64
u32 m_padding;
#endif
size_t m_allocatedSize;
public:
Face();
Face(const Face&) = delete;
Face(Face &&rhs);
~Face();
Face& operator=(const Face&) = delete;
Face& operator=(Face &&rhs);
void create(const vx::uint3 &dimension, u32 size, const vx::AllocatedBlock &pixels);
void setMipmaps(const vx::AllocatedBlock &mipmaps, u32 count);
template<typename Allocator>
void release(Allocator* allocator)
{
auto pixelBlock = Surface::release();
vx::AllocatedBlock mipmapBlock = { (u8*)m_mipmaps, m_allocatedSize };
for (u32 i = 0; i < m_mipmapCount; ++i)
{
auto block = m_mipmaps[i].release();
m_mipmaps[i].~Surface();
allocator->deallocate(block);
}
m_mipmapCount = 0;
allocator->deallocate(pixelBlock);
allocator->deallocate(mipmapBlock);
m_mipmaps = nullptr;
m_allocatedSize = 0;
}
u32 getMipmapCount() const { return m_mipmapCount; }
Surface* getMipmap(u32 i) { return &m_mipmaps[i]; }
const Surface* getMipmap(u32 i) const { return &m_mipmaps[i]; }
};
class Texture
{
VX_TYPE_INFO;
Face* m_faces;
u32 m_faceCount;
TextureFormat m_format;
TextureType m_type;
u8 m_components;
size_t m_allocatedSize;
public:
Texture();
Texture(const Texture&) = delete;
Texture(Texture &&rhs);
~Texture();
Texture& operator=(const Texture&) = delete;
Texture& operator=(Texture &&rhs);
void create(const vx::AllocatedBlock &faces, TextureFormat format, TextureType type, u8 components);
template<typename Allocator>
void release(Allocator* allocator)
{
for (u32 i = 0; i < m_faceCount; ++i)
{
m_faces[i].release(allocator);
}
vx::AllocatedBlock faceBlock = { (u8*)m_faces, m_allocatedSize };
allocator->deallocate(faceBlock);
m_faces = nullptr;
m_faceCount = 0;
m_components = 0;
m_allocatedSize = 0;
}
Face& getFace(u32 i) { return m_faces[i]; }
const Face& getFace(u32 i) const { return m_faces[i]; }
TextureFormat getFormat() const { return m_format; }
u32 getFaceSize(u32 i) const;
u32 getFaceRowPitch(u32 i) const;
u32 getFaceCount() const { return m_faceCount; }
u8 getComponents() const { return m_components; }
};
}
}
VX_TYPEINFO_GENERATOR_PARENT(vx::graphics::Face, vx::graphics::Surface)
VX_TYPEINFO_GENERATOR(vx::graphics::Texture) |
/* Copyright (c) 2002-2013 Dovecot authors, see the included COPYING file */
#include "auth-common.h"
#include "passdb.h"
#ifdef PASSDB_SHADOW
#include "safe-memset.h"
#include <shadow.h>
#define SHADOW_CACHE_KEY "%u"
#define SHADOW_PASS_SCHEME "CRYPT"
static enum passdb_result
shadow_lookup(struct auth_request *request, struct spwd **spw_r)
{
auth_request_log_debug(request, "shadow", "lookup");
*spw_r = getspnam(request->user);
if (*spw_r == NULL) {
auth_request_log_unknown_user(request, "shadow");
return PASSDB_RESULT_USER_UNKNOWN;
}
if (!IS_VALID_PASSWD((*spw_r)->sp_pwdp)) {
auth_request_log_info(request, "shadow",
"invalid password field");
return PASSDB_RESULT_USER_DISABLED;
}
/* save the password so cache can use it */
auth_request_set_field(request, "password", (*spw_r)->sp_pwdp,
SHADOW_PASS_SCHEME);
return PASSDB_RESULT_OK;
}
static void
shadow_verify_plain(struct auth_request *request, const char *password,
verify_plain_callback_t *callback)
{
struct spwd *spw;
enum passdb_result res;
int ret;
res = shadow_lookup(request, &spw);
if (res != PASSDB_RESULT_OK) {
callback(res, request);
return;
}
/* check if the password is valid */
ret = auth_request_password_verify(request, password, spw->sp_pwdp,
SHADOW_PASS_SCHEME, "shadow");
/* clear the passwords from memory */
safe_memset(spw->sp_pwdp, 0, strlen(spw->sp_pwdp));
if (ret <= 0) {
callback(PASSDB_RESULT_PASSWORD_MISMATCH, request);
return;
}
/* make sure we're using the username exactly as it's in the database */
auth_request_set_field(request, "user", spw->sp_namp, NULL);
callback(PASSDB_RESULT_OK, request);
}
static void
shadow_lookup_credentials(struct auth_request *request,
lookup_credentials_callback_t *callback)
{
struct spwd *spw;
enum passdb_result res;
res = shadow_lookup(request, &spw);
if (res != PASSDB_RESULT_OK) {
callback(res, NULL, 0, request);
return;
}
/* make sure we're using the username exactly as it's in the database */
auth_request_set_field(request, "user", spw->sp_namp, NULL);
passdb_handle_credentials(PASSDB_RESULT_OK, spw->sp_pwdp,
SHADOW_PASS_SCHEME, callback, request);
}
static struct passdb_module *
shadow_preinit(pool_t pool, const char *args)
{
struct passdb_module *module;
module = p_new(pool, struct passdb_module, 1);
module->blocking = TRUE;
if (strcmp(args, "blocking=no") == 0)
module->blocking = FALSE;
else if (*args != '\0')
i_fatal("passdb shadow: Unknown setting: %s", args);
module->cache_key = SHADOW_CACHE_KEY;
module->default_pass_scheme = SHADOW_PASS_SCHEME;
return module;
}
static void shadow_deinit(struct passdb_module *module ATTR_UNUSED)
{
endspent();
}
struct passdb_module_interface passdb_shadow = {
"shadow",
shadow_preinit,
NULL,
shadow_deinit,
shadow_verify_plain,
shadow_lookup_credentials,
NULL
};
#else
struct passdb_module_interface passdb_shadow = {
.name = "shadow"
};
#endif
|
//
// DisInfoModel.h
// PocketMedicine
//
// Created by lanou3g on 15/10/7.
// Copyright © 2015年 organazation. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface DisInfoModel : NSObject
@property (nonatomic, strong) NSString *infoContent;
@property (nonatomic, strong) NSString *infoId;
@property (nonatomic, strong) NSString *infoLogo;
@property (nonatomic, strong) NSString *infoTitle;
@property (nonatomic, strong) NSString *infoType;
@end
|
#include <stdio.h>
float function1(float); //ln(x)
float function2(float); //e^x
float function3(float); //sinh(x)
float function4(float); //sinh^-1(x)
int main()
{
printf("%f\n", function1(2.54));
printf("%f\n", function2(2.54));
printf("%f\n", function3(2.54));
printf("%f\n", function4(2.54));
return 0;
} |
/******************************************************************************
* The MIT License
*
* Copyright (c) 2010 LeafLabs LLC.
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use, copy,
* modify, merge, publish, distribute, sublicense, and/or sell copies
* of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*****************************************************************************/
#include <stdint.h>
#include <inttypes.h>
#include "wirish.h"
#ifdef __cplusplus
#include "WCharacter.h"
#include "WString.h"
#endif // __cplusplus
void setup();
void loop();
|
/*
Copyright 2017 Herik Lima de Castro and Marcelo Medeiros Eler
Distributed under MIT license, or public domain if desired and
recognized in your jurisdiction.
See file LICENSE for detail.
*/
#ifndef SHOWFILESERVLET_H
#define SHOWFILESERVLET_H
#include "cwf/controller.h"
#include "cwf/request.h"
#include "cwf/response.h"
class ShowFileController : public CWF::Controller
{
public:
void doGet(CWF::Request &request, CWF::Response &response) const override;
void doPost(CWF::Request &request, CWF::Response &response) const override;
};
#endif // SHOWFILESERVLET_H
|
#ifndef POSTOVERLAY_H
#define POSTOVERLAY_H
#include "../core/GLSLProgram.h"
#include "../core/FramebufferTexture.h"
/// Handles full screen post-processing effects
class PostOverlay {
public:
PostOverlay(ResourceHandle<GLSLProgram> post_prog) : post_prog(post_prog) {};
~PostOverlay() {};
void render(FramebufferTexture *src);
private:
ResourceHandle<GLSLProgram> post_prog;
};
#endif
|
// PKMultipartInputStream.h
// py.kerembellec@gmail.com
#import <Foundation/Foundation.h>
@interface PKMultipartInputStream : NSInputStream
- (void)addPartWithName:(NSString *)name string:(NSString *)string;
- (void)addPartWithName:(NSString *)name data:(NSData *)data;
- (void)addPartWithName:(NSString *)name data:(NSData *)data contentType:(NSString *)type;
- (void)addPartWithName:(NSString *)name filename:(NSString*)filename data:(NSData *)data contentType:(NSString *)type;
- (void)addPartWithName:(NSString *)name path:(NSString *)path;
- (void)addPartWithName:(NSString *)name filename:(NSString *)filename path:(NSString *)path;
- (void)addPartWithName:(NSString *)name filename:(NSString *)filename stream:(NSInputStream *)stream streamLength:(NSUInteger)streamLength;
- (void)addPartWithHeaders:(NSDictionary *)headers string:(NSString *)string;
- (void)addPartWithHeaders:(NSDictionary *)headers path:(NSString *)path;
@property (nonatomic, readonly) NSString *boundary;
@property (nonatomic, readonly) NSUInteger length;
@end
|
#pragma once
#include <application.qt/Plugin.h>
#include <core.h>
#include <application.qt/PluginWindow.h>
#include <core.hub/ModuleBase.h>
#include <QListWidgetItem>
#include <application.qt.objectview/ObjectPropertyView.h>
#include <core.logging.h>
class Ui_ObjectView;
namespace nspace{
class ObjectViewPlugin : public Plugin, public virtual PropertyChangingObject, public virtual TypedModuleBase<Object>,public virtual Log {
Q_OBJECT;
REFLECTABLE_OBJECT(ObjectViewPlugin);
SUBCLASSOF(Log)
PROPERTY(std::string,SearchString){
debugMessage("SearchString changing to"<<newvalue,6);
}
PROPERTYSET(Object *, Objects,,)
private:
Ui_ObjectView * _ui;
ObjectPropertyView * _objectPropertyView;
public slots:
void objectDoubleClicked(QListWidgetItem * object);
public:
ObjectViewPlugin():_SearchString(""),_ui(0){
setName("ObjectViewPlugin");
setLoggingLevel(1);
}
void onPropertyChanged(const std::string & name);
virtual void install(PluginContainer & container);
virtual void enable(){}
virtual void disable(){}
virtual void uninstall(PluginContainer & container){}
void updateObjectList();
void updateListView();
void onElementAdded(Object * object){
updateObjectList();
}
void onElementRemoved(Object * object){
updateObjectList();
}
};
}
|
#pragma once
#include "stdafx.h"
#include <queue>
#include <mutex>
#include <condition_variable>
#include <stdexcept>
/**
* Helper to safely access a propery that may be null/unset in a json object.
*/
template<typename T> T defaultValue(nlohmann::json obj, const typename nlohmann::json::object_t::key_type& key, const T& default_value) {
if (obj.is_null()) {
return default_value;
}
nlohmann::json v = obj[key];
if (v.is_null()) {
return default_value;
}
return v;
}
/**
* Helper that converts device info into json - by coping into a specific json element.
*/
void setDeviceInfo(nlohmann::json& dest, const DeviceInfo& src, const DynamicDeviceInfo& dynSrc);
/**
* Helper for printing vectors
*/
template <class T>
std::ostream& operator <<(std::ostream& os, const std::vector<T>& v)
{
os << "[";
for (typename std::vector<T>::const_iterator i = v.begin(); i != v.end(); ++i)
{
os << " " << *i;
}
os << "]";
return os;
}
/**
* Thread safe FIFO-queue utility.
*/
template <class T>
class ThreadSafeQueue
{
private:
mutable std::mutex m;
std::queue<T *> backingQueue;
std::condition_variable cond;
bool _closed;
public:
ThreadSafeQueue()
: backingQueue(), m(), cond(), _closed(false) {}
~ThreadSafeQueue() {}
/**
* Add element to queue.
* Ignored if queue has been closed.
*/
void enqueue(T * const t)
{
std::lock_guard<std::mutex> lock(m);
if (!_closed) {
backingQueue.push(t);
cond.notify_one();
}
}
/**
* Get the first element or wait until available if empty
* Returns nullptr if queue has been closed.
**/
T* const dequeue()
{
std::unique_lock<std::mutex> lock(m);
do {
cond.wait_for(lock, std::chrono::milliseconds(500));
if (_closed) {
return nullptr;
}
else if (!backingQueue.empty()) {
T* val = backingQueue.front();
backingQueue.pop();
return val;
}
} while (true);
}
/**
* Get number of elements waiting in queue.
**/
std::size_t size() const
{
std::unique_lock<std::mutex> lock(m);
return backingQueue.size();
}
/**
* Check if queue has been closed.
*/
bool closed() const
{
std::unique_lock<std::mutex> lock(m);
return _closed;
}
/**
* Close queue - cause and waiting threads to wake up.
*/
void stop() {
std::unique_lock<std::mutex> lock(m);
_closed = true;
backingQueue = {};
cond.notify_all();
}
};
|
/******************************************************************************\
| OpenGL 4 Example Code. |
| Accompanies written series "Anton's OpenGL 4 Tutorials" |
| Email: anton at antongerdelan dot net |
| First version 27 Jan 2014 |
| Copyright Dr Anton Gerdelan, Trinity College Dublin, Ireland. |
| See individual libraries' separate legal notices |
|******************************************************************************|
| Commonly-used maths structures and functions |
| Simple-as-possible. No templates. Not optimised. |
| Structs vec3, mat4, versor. just hold arrays of floats called "v","m","q", |
| respectively. So, for example, to get values from a mat4 do: my_mat.m |
| A versor is the proper name for a unit quaternion. |
| This is C++ because it's sort-of convenient to be able to use maths operators|
\******************************************************************************/
#ifndef _MATHS_FUNCS_H_
#define _MATHS_FUNCS_H_
#include "mat3.h"
#include "math/mat4.h"
#include "math/vec4.h"
#include "math/vec3.h"
#include "math/vec2.h"
// const used to convert degrees into radians
//#define M_PI 3.14159265359
#define TAU 2.0 * M_PI
#define ONE_DEG_IN_RAD (2.0 * M_PI) / 360.0 // 0.017444444
#define ONE_RAD_IN_DEG 360.0 / (2.0 * M_PI) //57.2957795
/* stored like this:
0 4 8 12
1 5 9 13
2 6 10 14
3 7 11 15*/
struct versor {
versor();
versor operator/ (float rhs);
versor operator* (float rhs);
versor operator* (const versor& rhs);
versor operator+ (const versor& rhs);
float q[4];
};
void print(const vec3& v);
void print(const vec4& v);
void print(const mat3& m);
void print(const mat4& m);
// vector functions
float length(const vec3& v);
float length2(const vec3& v);
vec3 normalise(const vec3& v);
float dot(const vec3& a, const vec3& b);
vec3 cross(const vec3& a, const vec3& b);
float get_squared_dist(vec3 from, vec3 to);
float direction_to_heading(vec3 d);
vec3 heading_to_direction(float degrees);
// matrix functions
mat3 zero_mat3();
mat3 identity_mat3();
/*mat4 zero_mat4();
mat4 identity_mat4();
float determinant(const mat4& mm);
mat4 inverse(const mat4& mm);
mat4 transpose(const mat4& mm);
// affine functions
mat4 translate(const mat4& m, const vec3& v);
mat4 rotate_x_deg(const mat4& m, float deg);
mat4 rotate_y_deg(const mat4& m, float deg);
mat4 rotate_z_deg(const mat4& m, float deg);
mat4 scale(const mat4& m, const vec3& v);
// camera functions
mat4 look_at(const vec3& cam_pos, vec3 targ_pos, const vec3& up);
mat4 perspective(float fovy, float aspect, float near, float far);*/
// quaternion functions
versor quat_from_axis_rad(float radians, float x, float y, float z);
versor quat_from_axis_deg(float degrees, float x, float y, float z);
mat4 quat_to_mat4(const versor& q);
float dot(const versor& q, const versor& r);
versor slerp(const versor& q, const versor& r);
// overloading wouldn't let me use const
versor normalise(versor& q);
void print(const versor& q);
versor slerp(versor& q, versor& r, float t);
#endif |
#include "DateTime.h"
#include "Table.h"
#include "TableInvoice.h"
#include "TableInvoiceItem.h"
|
//#ifndef YMAT_LITE_H
//#include "YMat_Lite.h"
//#define H_GRANDFATHER
//#endif
#include "Kine.h"
//#include "Kine.h"
//#include "YMat_Lite.h"
#define Q 1000000 // 10^6
#define R 0.001 // 10^-3
#define P 1000000 // 10^6
void DiffEqn(double* A, int* LenA, double* result, double* d_t);
class LQSI_Solver
{
public:
LQSI_Solver(void);
~LQSI_Solver(void);
void Init_val(double* Input_COGz);
void Back_Riccati(double* ZMPx, double* ZMPy);
void C2DmHumanoid(int i);
void Dummy_Control(void);
//inline void Mat_Mul_33(double* A, double* B, double* result);
//inline void Mat_Scalar_Mul(double* A, int LenA, double* Scalar, double* result);
//inline void Mat_Mul_AB(double* A, int MA, int NA, double* B, int MB, int NB, double* result);
//inline void Mat_Mul_AtB(double* A, int MA, int NA, double* B, int MB, int NB, double* result);
//inline void Mat_Mul_ABt(double* A, int MA, int NA, double* B, int MB, int NB, double* result);
//inline void Mat_Miu_AB(double* A, double* B, double* result, int Len);
//inline void Mat_Add_AB(double* A, double* B, double* result, int Len);
/*void Mat_Mul_33(double* A, double* B, double* result);
void Mat_Scalar_Mul(double* A, int LenA, double* Scalar, double* result);
void Mat_Mul_AB(double* A, int MA, int NA, double* B, int MB, int NB, double* result);
void Mat_Mul_AtB(double* A, int MA, int NA, double* B, int MB, int NB, double* result);
void Mat_Mul_ABt(double* A, int MA, int NA, double* B, int MB, int NB, double* result);
void Mat_Miu_AB(double* A, double* B, double* result, int Len);
void Mat_Add_AB(double* A, double* B, double* result, int Len);*/
void tic(void);
void toc(void);
YMat_Lite* Qx;
double Dc, Dd;
//Matrix<double,3,3> Ac, Qx; // initialized by Init_val();
//Vector<double,3> Bc, Cc;
YMat_Lite* Cd;
YMat_Lite* CdT;
//Matrix<double,1,3> Cd;
//Matrix<double,3,1> CdT;
YMat_Lite* Buffer0; // buffer for computation
YMat_Lite* Ad_stk;
YMat_Lite* AI_stk;
YMat_Lite* Bd_stk;
YMat_Lite* BinvMBT_Stk;
YMat_Lite* Wk_Stk;
YMat_Lite* Nk_Stk;
YMat_Lite* NkT_Stk;
YMat_Lite* Ss_Stk;
YMat_Lite* vs_StkX;
YMat_Lite* vs_StkY;
YMat_Lite* invDk_Stk;
YMat_Lite* x_state;
YMat_Lite* y_state;
// timer
LARGE_INTEGER StartTime;
LARGE_INTEGER CurrentTime;
LARGE_INTEGER nFreq;
float FreqT;
// timer
double* invMk_Stk;
// Matrix<double,3,3>* bbbd_stk = new Matrix<double,3,3>[5];
double Wp, sh, ch; // sh = sinh ch = cosh
double* COGz;
double* delCOG;
double* ddelCOG;
bool dCOG_allocated;
double* Compu_Temp; // ¯x°}¼ªkµ¥»Ýn«½Æ§Q¥Îªºfunction»Ýn¨âӼȦs°Ï ¤£µM·|Âмg¨ì¥¿¦b¥Îªº¸ê®Æ
double* Compu_Temp2;
double* Compu_Temp3;
double* Compu_Temp4;
};
|
/*
-----------------------------------------------------------------------------
This source file is part of OGRE
(Object-oriented Graphics Rendering Engine)
For the latest info, see http://www.ogre3d.org/
Copyright (c) 2000-2012 Torus Knot Software Ltd
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-----------------------------------------------------------------------------
*/
#ifndef __D3D11PIXELBUFFER_H__
#define __D3D11PIXELBUFFER_H__
#include "OgreD3D11Prerequisites.h"
#include "OgreHardwarePixelBuffer.h"
#include "OgreD3D11Driver.h"
struct ID3D11Resource;
namespace Ogre {
class D3D11HardwarePixelBuffer: public HardwarePixelBuffer
{
protected:
/// Lock a box
PixelBox lockImpl(const Image::Box lockBox, LockOptions options);
/// Unlock a box
void unlockImpl(void);
/// D3DDevice pointer
D3D11Device & mDevice;
D3D11Texture * mParentTexture;
size_t mSubresourceIndex;
// if the usage is static - alloc at lock then use device UpdateSubresource when unlock and free memory
int8 * mDataForStaticUsageLock;
size_t mFace;
Image::Box mLockBox;
PixelBox mCurrentLock;
LockOptions mCurrentLockOptions;
D3D11_BOX OgreImageBoxToDx11Box(const Image::Box &inBox) const;
/// Util functions to convert a D3D locked box to a pixel box
void fromD3DLock(PixelBox &rval, const DXGI_MAPPED_RECT &lrect);
/// Render targets
typedef vector<RenderTexture*>::type SliceTRT;
SliceTRT mSliceTRT;
void createStagingBuffer();
bool mUsingStagingBuffer;
ID3D11Resource *mStagingBuffer;
void *_map(ID3D11Resource *res, D3D11_MAP flags);
void *_mapstagingbuffer(D3D11_MAP flags);
void *_mapstaticbuffer(PixelBox lock);
void _unmap(ID3D11Resource *res);
void _unmapstagingbuffer(bool copyback = true);
void _unmapstaticbuffer();
public:
D3D11HardwarePixelBuffer(D3D11Texture * parentTexture, D3D11Device & device, size_t subresourceIndex,
size_t width, size_t height, size_t depth, size_t face, PixelFormat format, HardwareBuffer::Usage usage);
/// @copydoc HardwarePixelBuffer::blit
void blit(const HardwarePixelBufferSharedPtr &src, const Image::Box &srcBox, const Image::Box &dstBox);
/// @copydoc HardwarePixelBuffer::blitFromMemory
void blitFromMemory(const PixelBox &src, const Image::Box &dstBox);
/// @copydoc HardwarePixelBuffer::blitToMemory
void blitToMemory(const Image::Box &srcBox, const PixelBox &dst);
/// Internal function to update mipmaps on update of level 0
void _genMipmaps();
~D3D11HardwarePixelBuffer();
/// Get rendertarget for z slice
RenderTexture *getRenderTarget(size_t zoffset);
/// Notify TextureBuffer of destruction of render target
virtual void _clearSliceRTT(size_t zoffset)
{
if (mSliceTRT.size() > zoffset)
{
mSliceTRT[zoffset] = 0;
}
}
D3D11Texture * getParentTexture() const;
size_t getSubresourceIndex() const;
size_t getFace() const;
};
};
#endif
|
/*
* AppConfig.h
*
* Created on: 2010-1-6
* Author: zhaoqi
*/
#ifndef APPCONFIG_H_
#define APPCONFIG_H_
#define MRF_LABEL_NUM 40
struct AppConfig {
static float m_shadingWeight;
static float m_refWeight;
static float m_chromChange_trd;
static float m_chromVar_trd;
static float m_pixDist_trd;
static float m_normChange_trd;
static int m_trw_iterCnt;
static bool m_multMatch;
static bool m_softMatch;
};
#endif /* APPCONFIG_H_ */
|
#pragma once
#include "dataaccess.h"
#include "../../../YaizuComLib/src/stkwebapp_um/ApiBase.h"
class ApiGetServerInfo : ApiBase
{
private:
long long StartTime;
public:
ApiGetServerInfo();
StkObject* ExecuteImpl(StkObject*, int, wchar_t[StkWebAppExec::URL_PATH_LENGTH], int*, wchar_t[3], wchar_t*);
};
|
#ifdef _MOCK_
/*
* setupTunnel.h
*
* Created on: 23 sep. 2015
* Author: Jesper Hansen
*/
#ifndef SETUPTUNNEL_H_
#define SETUPTUNNEL_H_
#include "ArduinoJson.h"
class SetupTunnel {
public:
uint32_t handleSetupTunnel(JsonObject &msg, JsonObject &request);
uint32_t handleTunnelData(JsonObject &msg, JsonObject &reply);
};
#endif /* SETUPTUNNEL_H_ */
#endif
|
#import <UIKit/UIKit.h>
FOUNDATION_EXPORT double Pods_TB_Client_SellerVersionNumber;
FOUNDATION_EXPORT const unsigned char Pods_TB_Client_SellerVersionString[];
|
//
// MainTabController.h
// Connect
//
// Created by MoHuilin on 16/5/22.
// Copyright © 2016年 Connect. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface MainTabController : UITabBarController
- (void)chatWithFriend:(AccountInfo *)chatUser;
- (void)chatWithFriend:(AccountInfo *)user withObject:(NSDictionary *)obj;
- (void)changeLanguageResetController;
@end
|
#ifndef SHAPE_H
#define SHAPE_H
class Shape
{
protected:
char m_drawSymbol;
public:
Shape(void);
~Shape(void);
void SetDrawSymbol(char ch);
void Draw();
};
#endif |
/*
* Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. All rights reserved.
*
* SPDX-License-Identifier: GPL-2.0+
*/
#ifndef _ASM_ARC_ARCREGS_H
#define _ASM_ARC_ARCREGS_H
#include <asm/cache.h>
/*
* ARC architecture has additional address space - auxiliary registers.
* These registers are mostly used for configuration purposes.
* These registers are not memory mapped and special commands are used for
* access: "lr"/"sr".
*/
#define ARC_AUX_IDENTITY 0x04
#define ARC_AUX_STATUS32 0x0a
/* Instruction cache related auxiliary registers */
#define ARC_AUX_IC_IVIC 0x10
#define ARC_AUX_IC_CTRL 0x11
#define ARC_AUX_IC_IVIL 0x19
#if (CONFIG_ARC_MMU_VER == 3)
#define ARC_AUX_IC_PTAG 0x1E
#endif
#define ARC_BCR_IC_BUILD 0x77
#define AUX_AUX_CACHE_LIMIT 0x5D
#define ARC_AUX_NON_VOLATILE_LIMIT 0x5E
/* ICCM and DCCM auxiliary registers */
#define ARC_AUX_DCCM_BASE 0x18 /* DCCM Base Addr ARCv2 */
#define ARC_AUX_ICCM_BASE 0x208 /* ICCM Base Addr ARCv2 */
/* Timer related auxiliary registers */
#define ARC_AUX_TIMER0_CNT 0x21 /* Timer 0 count */
#define ARC_AUX_TIMER0_CTRL 0x22 /* Timer 0 control */
#define ARC_AUX_TIMER0_LIMIT 0x23 /* Timer 0 limit */
#define ARC_AUX_TIMER1_CNT 0x100 /* Timer 1 count */
#define ARC_AUX_TIMER1_CTRL 0x101 /* Timer 1 control */
#define ARC_AUX_TIMER1_LIMIT 0x102 /* Timer 1 limit */
#define ARC_AUX_INTR_VEC_BASE 0x25
/* Data cache related auxiliary registers */
#define ARC_AUX_DC_IVDC 0x47
#define ARC_AUX_DC_CTRL 0x48
#define ARC_AUX_DC_IVDL 0x4A
#define ARC_AUX_DC_FLSH 0x4B
#define ARC_AUX_DC_FLDL 0x4C
#if (CONFIG_ARC_MMU_VER == 3)
#define ARC_AUX_DC_PTAG 0x5C
#endif
#define ARC_BCR_DC_BUILD 0x72
#define ARC_BCR_SLC 0xce
#define ARC_AUX_SLC_CONFIG 0x901
#define ARC_AUX_SLC_CTRL 0x903
#define ARC_AUX_SLC_FLUSH 0x904
#define ARC_AUX_SLC_INVALIDATE 0x905
#define ARC_AUX_SLC_IVDL 0x910
#define ARC_AUX_SLC_FLDL 0x912
#define ARC_BCR_CLUSTER 0xcf
/* IO coherency related auxiliary registers */
#define ARC_AUX_IO_COH_ENABLE 0x500
#define ARC_AUX_IO_COH_PARTIAL 0x501
#define ARC_AUX_IO_COH_AP0_BASE 0x508
#define ARC_AUX_IO_COH_AP0_SIZE 0x509
#ifndef __ASSEMBLY__
/* Accessors for auxiliary registers */
#define read_aux_reg(reg) __builtin_arc_lr(reg)
/* gcc builtin sr needs reg param to be long immediate */
#define write_aux_reg(reg_immed, val) \
__builtin_arc_sr((unsigned int)val, reg_immed)
/* ARCNUM [15:8] - field to identify each core in a multi-core system */
#define CPU_ID_GET() ((read_aux_reg(ARC_AUX_IDENTITY) & 0xFF00) >> 8)
#endif /* __ASSEMBLY__ */
#endif /* _ASM_ARC_ARCREGS_H */
|
/*
A modified version of Bounded MPMC queue by Dmitry Vyukov.
Original code from:
http://www.1024cores.net/home/lock-free-algorithms/queues/bounded-mpmc-queue
licensed by Dmitry Vyukov under the terms below:
Simplified BSD license
Copyright (c) 2010-2011 Dmitry Vyukov. All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of
conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list
of conditions and the following disclaimer in the documentation and/or other materials
provided with the distribution.
THIS SOFTWARE IS PROVIDED BY DMITRY VYUKOV "AS IS" AND ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
SHALL DMITRY VYUKOV OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
The views and conclusions contained in the software and documentation are those of the authors and
should not be interpreted as representing official policies, either expressed or implied, of Dmitry Vyukov.
*/
/*
The code in its current form adds the license below:
Copyright(c) 2015 Gabi Melman.
Distributed under the MIT License (http://opensource.org/licenses/MIT)
*/
#pragma once
#include "spdlog/common.h"
#include <atomic>
#include <utility>
namespace spdlog
{
namespace details
{
template<typename T>
class mpmc_bounded_queue
{
public:
using item_type = T;
mpmc_bounded_queue(size_t buffer_size)
:max_size_(buffer_size),
buffer_(new cell_t[buffer_size]),
buffer_mask_(buffer_size - 1)
{
//queue size must be power of two
if (!((buffer_size >= 2) && ((buffer_size & (buffer_size - 1)) == 0)))
throw spdlog_ex("async logger queue size must be power of two");
for (size_t i = 0; i != buffer_size; i += 1)
buffer_[i].sequence_.store(i, std::memory_order_relaxed);
enqueue_pos_.store(0, std::memory_order_relaxed);
dequeue_pos_.store(0, std::memory_order_relaxed);
}
~mpmc_bounded_queue()
{
delete[] buffer_;
}
bool enqueue(T&& data)
{
cell_t* cell;
size_t pos = enqueue_pos_.load(std::memory_order_relaxed);
for (;;) {
cell = &buffer_[pos & buffer_mask_];
size_t seq = cell->sequence_.load(std::memory_order_acquire);
intptr_t dif = static_cast<intptr_t>(seq) - static_cast<intptr_t>(pos);
if (dif == 0) {
if (enqueue_pos_.compare_exchange_weak(pos, pos + 1, std::memory_order_relaxed))
break;
}
else if (dif < 0) {
return false;
}
else {
pos = enqueue_pos_.load(std::memory_order_relaxed);
}
}
cell->data_ = std::move(data);
cell->sequence_.store(pos + 1, std::memory_order_release);
return true;
}
bool dequeue(T& data)
{
cell_t* cell;
size_t pos = dequeue_pos_.load(std::memory_order_relaxed);
for (;;) {
cell = &buffer_[pos & buffer_mask_];
size_t seq =
cell->sequence_.load(std::memory_order_acquire);
intptr_t dif = static_cast<intptr_t>(seq) - static_cast<intptr_t>(pos + 1);
if (dif == 0) {
if (dequeue_pos_.compare_exchange_weak(pos, pos + 1, std::memory_order_relaxed))
break;
}
else if (dif < 0)
return false;
else
pos = dequeue_pos_.load(std::memory_order_relaxed);
}
data = std::move(cell->data_);
cell->sequence_.store(pos + buffer_mask_ + 1, std::memory_order_release);
return true;
}
bool is_empty()
{
unsigned front, front1, back;
// try to take a consistent snapshot of front/tail.
do {
front = enqueue_pos_.load(std::memory_order_acquire);
back = dequeue_pos_.load(std::memory_order_acquire);
front1 = enqueue_pos_.load(std::memory_order_relaxed);
} while (front != front1);
return back == front;
}
private:
struct cell_t
{
std::atomic<size_t> sequence_;
T data_;
};
size_t const max_size_;
static size_t const cacheline_size = 64;
typedef char cacheline_pad_t[cacheline_size];
cacheline_pad_t pad0_;
cell_t* const buffer_;
size_t const buffer_mask_;
cacheline_pad_t pad1_;
std::atomic<size_t> enqueue_pos_;
cacheline_pad_t pad2_;
std::atomic<size_t> dequeue_pos_;
cacheline_pad_t pad3_;
mpmc_bounded_queue(mpmc_bounded_queue const&) = delete;
void operator= (mpmc_bounded_queue const&) = delete;
};
} // ns details
} // ns spdlog
|
/**
* Appcelerator Titanium Mobile
* Copyright (c) 2011-2013 by Appcelerator, Inc. All Rights Reserved.
* Licensed under the terms of the Apache Public License
* Please see the LICENSE included with this distribution for details.
*/
/** This is generated, do not edit by hand. **/
#include <jni.h>
#include "Proxy.h"
namespace titanium {
namespace network {
class CookieProxy : public titanium::Proxy
{
public:
explicit CookieProxy(jobject javaObject);
static void bindProxy(v8::Handle<v8::Object> exports);
static v8::Handle<v8::FunctionTemplate> getProxyTemplate();
static void dispose();
static v8::Persistent<v8::FunctionTemplate> proxyTemplate;
static jclass javaClass;
private:
// Methods -----------------------------------------------------------
static v8::Handle<v8::Value> getName(const v8::Arguments&);
// Dynamic property accessors ----------------------------------------
static v8::Handle<v8::Value> getter_name(v8::Local<v8::String> property, const v8::AccessorInfo& info);
};
} // namespace network
} // titanium
|
// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef BITCOIN_RPCREGISTER_H
#define BITCOIN_RPCREGISTER_H
/** These are in one header file to avoid creating tons of single-function
* headers for everything under src/rpc/ */
class CRPCTable;
/** Register block chain RPC commands */
void RegisterBlockchainRPCCommands(CRPCTable &tableRPC);
/** Register DeepSend RPC commands */
void RegisterDeepSendRPCCommands(CRPCTable &tableRPC);
/** Register P2P networking RPC commands */
void RegisterNetRPCCommands(CRPCTable &tableRPC);
/** Register miscellaneous RPC commands */
void RegisterMiscRPCCommands(CRPCTable &tableRPC);
/** Register mining RPC commands */
void RegisterMiningRPCCommands(CRPCTable &tableRPC);
/** Register raw transaction RPC commands */
void RegisterRawTransactionRPCCommands(CRPCTable &tableRPC);
static inline void RegisterAllCoreRPCCommands(CRPCTable &t)
{
RegisterBlockchainRPCCommands(t);
RegisterDeepSendRPCCommands(t);
RegisterNetRPCCommands(t);
RegisterMiscRPCCommands(t);
RegisterMiningRPCCommands(t);
RegisterRawTransactionRPCCommands(t);
}
#endif
|
//
// DataRepository.h
// PikaBlink
//
// Copyright (c) 2013 AXANT. All rights reserved.
//
#import <CoreData/CoreData.h>
@interface DataRepository : NSObject
+ (DataRepository*)shared;
+ (void) setSharedOptions: (NSDictionary*)options;
- (void)deleteEntity:(NSString*)entityName byId:(NSString*)entityId;
- (NSManagedObject*)get:(NSString*)entityName byId:(NSString*)entityId;
- (NSManagedObject*)insertEntity:(NSString*)entityName withData:(NSDictionary*)data;
- (void)insertEntities:(NSString*)entityName withData:(NSArray*)entities;
- (NSManagedObject*)updateEntity:(NSString*)entityName byId:(NSString*)entityId withData:(NSDictionary*)data;
- (NSArray*)fetchEntities:(NSString*)entityName withQuery:(NSString*)query withArguments:(NSArray*)args
sortingBy:(NSArray*)sorting;
- (NSArray*)fetchAndModifyEntities:(NSString*)entityName withQuery:(NSString*)query withArguments:(NSArray*)args
sortingBy:(NSArray*)sorting setData:(NSDictionary*)data;
@end
|
/*
* ctrl_sixaxis2thruster_private.h
*
* Code generation for model "ctrl_sixaxis2thruster".
*
* Model version : 1.22
* Simulink Coder version : 8.6 (R2014a) 27-Dec-2013
* C source code generated on : Wed Feb 25 14:00:14 2015
*
* Target selection: NIVeriStand_VxWorks.tlc
* Note: GRT includes extra infrastructure and instrumentation for prototyping
* Embedded hardware selection: 32-bit Generic
* Code generation objectives: Unspecified
* Validation result: Not run
*/
#ifndef RTW_HEADER_ctrl_sixaxis2thruster_private_h_
#define RTW_HEADER_ctrl_sixaxis2thruster_private_h_
#include "rtwtypes.h"
#include "builtin_typeid_types.h"
#include "multiword_types.h"
#ifndef __RTWTYPES_H__
#error This file requires rtwtypes.h to be included
#endif /* __RTWTYPES_H__ */
extern real_T rt_atan2d_snf(real_T u0, real_T u1);
#endif /* RTW_HEADER_ctrl_sixaxis2thruster_private_h_ */
|
#pragma once
#include <glbinding/gl/gl.h>
#include <Renderer/IRenderer.h>
namespace dfrost {
namespace Renderer {
// Forward Declaration
class Color;
class Renderer : IRenderer {
public:
Renderer();
virtual ~Renderer();
virtual void SetClearColor(const Color& color, float depth);
virtual void Clear();
virtual void Draw(const QuadPrimitive& quad, const Shader& shader);
private:
const Color* clearColor_;
float clearDepth_;
};
}
}
|
/* Copyright (C) 2015-2017 Michele Colledanchise - 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.
*/
#ifndef BEHAVIOR_TREE_H
#define BEHAVIOR_TREE_H
#include <draw.h>
#include <parallel_node.h>
#include <fallback_node.h>
#include <sequence_node.h>
#include <decorator_node.h>
#include <decorators/negation_node.h>
#include <sequence_node_with_memory.h>
#include <fallback_node_with_memory.h>
#include <actions/action_test_node.h>
#include <conditions/condition_test_node.h>
#include <actions/ros_action.h>
#include <conditions/ros_condition.h>
#include <exceptions.h>
#include <string>
#include <map>
#include <typeinfo>
#include <math.h> /* pow */
#include "ros/ros.h"
#include "std_msgs/UInt8.h"
void Execute(BT::ControlNode* root, int TickPeriod_milliseconds);
#endif // BEHAVIOR_TREE_H
|
/* Copyright (C) 1991-2020 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */
/*
* ISO C99 Standard: 7.2 Diagnostics <assert.h>
*/
#ifdef _ASSERT_H
# undef _ASSERT_H
# undef assert
# undef __ASSERT_VOID_CAST
# ifdef __USE_GNU
# undef assert_perror
# endif
#endif /* assert.h */
#define _ASSERT_H 1
#include <features.h>
#if defined __cplusplus && __GNUC_PREREQ (2,95)
# define __ASSERT_VOID_CAST static_cast<void>
#else
# define __ASSERT_VOID_CAST (void)
#endif
/* void assert (int expression);
If NDEBUG is defined, do nothing.
If not, and EXPRESSION is zero, print an error message and abort. */
#ifdef NDEBUG
# define assert(expr) (__ASSERT_VOID_CAST (0))
/* void assert_perror (int errnum);
If NDEBUG is defined, do nothing. If not, and ERRNUM is not zero, print an
error message with the error text for ERRNUM and abort.
(This is a GNU extension.) */
# ifdef __USE_GNU
# define assert_perror(errnum) (__ASSERT_VOID_CAST (0))
# endif
#else /* Not NDEBUG. */
__BEGIN_DECLS
/* This prints an "Assertion failed" message and aborts. */
extern void __assert_fail (const char *__assertion, const char *__file,
unsigned int __line, const char *__function)
__THROW __attribute__ ((__noreturn__));
/* Likewise, but prints the error text for ERRNUM. */
extern void __assert_perror_fail (int __errnum, const char *__file,
unsigned int __line, const char *__function)
__THROW __attribute__ ((__noreturn__));
/* The following is not at all used here but needed for standard
compliance. */
extern void __assert (const char *__assertion, const char *__file, int __line)
__THROW __attribute__ ((__noreturn__));
__END_DECLS
/* When possible, define assert so that it does not add extra
parentheses around EXPR. Otherwise, those added parentheses would
suppress warnings we'd expect to be detected by gcc's -Wparentheses. */
# if defined __cplusplus
# define assert(expr) \
(static_cast <bool> (expr) \
? void (0) \
: __assert_fail (#expr, __FILE__, __LINE__, __ASSERT_FUNCTION))
# elif !defined __GNUC__ || defined __STRICT_ANSI__
# define assert(expr) \
((expr) \
? __ASSERT_VOID_CAST (0) \
: __assert_fail (#expr, __FILE__, __LINE__, __ASSERT_FUNCTION))
# else
/* The first occurrence of EXPR is not evaluated due to the sizeof,
but will trigger any pedantic warnings masked by the __extension__
for the second occurrence. The ternary operator is required to
support function pointers and bit fields in this context, and to
suppress the evaluation of variable length arrays. */
# define assert(expr) \
((void) sizeof ((expr) ? 1 : 0), __extension__ ({ \
if (expr) \
; /* empty */ \
else \
__assert_fail (#expr, __FILE__, __LINE__, __ASSERT_FUNCTION); \
}))
# endif
# ifdef __USE_GNU
# define assert_perror(errnum) \
(!(errnum) \
? __ASSERT_VOID_CAST (0) \
: __assert_perror_fail ((errnum), __FILE__, __LINE__, __ASSERT_FUNCTION))
# endif
/* Version 2.4 and later of GCC define a magical variable `__PRETTY_FUNCTION__'
which contains the name of the function currently being defined.
This is broken in G++ before version 2.6.
C9x has a similar variable called __func__, but prefer the GCC one since
it demangles C++ function names. */
# if defined __cplusplus ? __GNUC_PREREQ (2, 6) : __GNUC_PREREQ (2, 4)
# define __ASSERT_FUNCTION __extension__ __PRETTY_FUNCTION__
# else
# if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
# define __ASSERT_FUNCTION __func__
# else
# define __ASSERT_FUNCTION ((const char *) 0)
# endif
# endif
#endif /* NDEBUG. */
#if defined __USE_ISOC11 && !defined __cplusplus
# undef static_assert
# define static_assert _Static_assert
#endif |
#pragma once
#include "Shape.h"
namespace StillDesign
{
namespace PhysX
{
ref class BoxShape;
value class Box;
ref class BoxShapeDescription;
public ref class BoxShape : Shape
{
internal:
BoxShape( NxBoxShape* boxShape );
public:
BoxShapeDescription^ SaveToDescription();
/// <summary>Gets the box represented as a world space OBB</summary>
Box GetWorldSpaceOBB();
/// <summary>Gets or Sets the dimensions of the box shape. The dimensions are the 'radii' of the box, meaning 1/2 extents in x dimension, 1/2 extents in y dimension, 1/2 extents in z dimension</summary>
property Vector3 Dimensions
{
Vector3 get();
void set( Vector3 value );
}
/// <summary>Gets or Sets the size of the box shape</summary>
property Vector3 Size
{
Vector3 get();
void set( Vector3 value );
}
internal:
property NxBoxShape* UnmanagedPointer
{
NxBoxShape* get() new;
}
};
};
}; |
#include <X11/Xatom.h>
#include <X11/Intrinsic.h>
#include <X11/Shell.h>
/*
#include <Xm/Xm.h>
*/
#include <math.h>
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include "struct.h"
#include "distance.h"
#include "vector.h"
#include "quasar.h"
#include "projection.h"
#include "space.h"
#define PI 3.14159265398
extern double *abacus,*abacusV;
extern double abacus_pas,abacus_max0,abacus_max,abacus_prec;
extern double abacusVmax;
extern Friedman friedman;
/*-------------------------------------------------------------------------------------------------*/
/* Give an abacus for the homogen volum */
void init_abacusV(double Zmax)
{
register int j;
int nmax,Nmax;
double inte;
abacus_max=abacus_max0;
nmax=(int) (abacus_max/abacus_pas)+1;
Nmax=(int) (Zmax/abacus_pas)+1;
if (Nmax>nmax)
{
abacus_max=Zmax;
init_abacus();
}
if (Nmax<nmax)
{
Nmax=nmax;
init_abacus();
}
if (abacusV!=NULL) free(abacusV);
abacusV=(double*) calloc(Nmax+1,sizeof(double));
if(abacusV)
{
abacusV[0]=0.0;
for(j=1;j<=Nmax;j++)
{
inte=sqrt(ABS(friedman.k))*abacus[j];
if (friedman.k>0.0)
abacusV[j]=(2*inte-sin(2*inte))/(4*pow(friedman.k,1.5));
if (friedman.k==0.0)
abacusV[j]=inte*inte*inte/3.0;
if (friedman.k<0.0)
abacusV[j]=(-2*inte+sinh(2*inte))/(4*pow(-friedman.k,1.5));
}
}
else printf("Memory allocation error for abacusV ");
}
/*-------------------------------------------------------------------------------------------------*/
/* Give the redshift corresponding to a given volum */
double donne_z(double V)
{
int j,nmax;
double Z;
Z=0;
nmax=(int) (abacus_max/abacus_pas)+1;
for(j=1;j<=nmax;j++)
{
if (V>=abacusV[j] && abacusV[j+1]>V)
{
Z=j*abacus_pas+
((V-abacusV[j])*abacus_pas/(abacusV[j+1]-abacusV[j]));
}
}
return Z;
}
/*-------------------------------------------------------------------------------------------------*/
/* Give the volum of a given redshift */
double donne_V(double Z)
{
double inte=0,V=0,nmax;
int i,rajout=0;
nmax=(int) (abacus_max/abacus_pas)+1;
for(i=0;i<=nmax;i++)
if (Z>=i*abacus_pas && Z<(i+1)*abacus_pas)
{
inte=sqrt(ABS(friedman.k))*abacus[i];
rajout=i;
break;
}
inte+=sqrt(ABS(friedman.k))*integral(ONEonPdeR,1.0/(1.0+Z),1.0/(1.0+(rajout*abacus_pas)),abacus_prec);
if (friedman.k>0.0)
V=(2*inte-sin(2*inte))/(4*pow(friedman.k,1.5));
if (friedman.k==0.0)
V=inte*inte*inte/3.0;
if (friedman.k<0.0)
V=(-2*inte+sinh(2*inte))/(4*pow(-friedman.k,1.5));
return V;
}
/*-------------------------------------------------------------------------------------------------*/
/* Create an isotrop an homogen set of qusars */
void isotrope(int nbre,double Zmax,double Zmin,double ra0,double d0,double beta,Quasar *q)
{
int i;
double xsi,Vz,rax,dx,Zx,gamma,teta;
double Vmax,Vmin;
if(q!=NULL) free(q);
//q=(Quasar *) calloc(nbre, sizeof(struct s_quasar));
if(q)
{
init_abacusV(Zmax);
Vmax=donne_V(Zmax);
Vmin=donne_V(Zmin);
for(i=0;i<nbre;i++)
{
xsi=((double) rand()/RAND_MAX);
Vz=xsi*(Vmax-Vmin)+Vmin;
Zx=donne_z(Vz);
xsi=((double) rand()/RAND_MAX);
gamma=acos( (1.0-cos(beta))*xsi+cos(beta) );
teta=((double) rand()/RAND_MAX)*2.0*PI;
rax=ra0+( sin(gamma)*sin(teta) )/cos(d0);
dx=d0+cos(teta)*sin(gamma);
q[i].ascension=rax;
q[i].declination=dx;
q[i].redshift=Zx;
}
}
else printf("Can not allocate memory for isotropics quasars ");
}
|
#pragma once
#include "ogre_interface.h"
// creates a child on the rootscenenode
DLL SceneNodeHandle create_child_of_root_scenenode(SceneManagerHandle scene_manager_handle, const char* node_name);
// TODO: define enums or similar for groups Default, Autodetect etc.
DLL EntityHandle scenemanager_create_entity(SceneManagerHandle handle, const char* name, const char* mesh_name, const char* group_name);
//createCamera(const String& name);
DLL CameraHandle scenemanager_create_camera(SceneManagerHandle handle, const char* name);
//createManualObject(std::string const&)
DLL ManualObjectHandle scenemanager_create_manual_object(SceneManagerHandle handle, const char* name);
//createManualObject()
DLL ManualObjectHandle scenemanager_create_manual_object_unnamed(SceneManagerHandle handle);
//getManualObject(std::string const&) const
DLL ManualObjectHandle scenemanager_get_manual_object(const SceneManagerHandle handle, const char* name);
//hasManualObject(std::string const&) const
DLL int scenemanager_has_manual_object(const SceneManagerHandle handle, const char* name);
//destroyManualObject(Ogre::ManualObject*)
DLL void scenemanager_destroy_manual_object(SceneManagerHandle handle, ManualObjectHandle obj);
//destroyManualObject(std::string const&)
DLL void scenemanager_destroy_manual_object_by_name(SceneManagerHandle handle, const char* name);
//destroyAllManualObjects()
DLL void scenemanager_destroy_all_manual_objects(SceneManagerHandle handle);
DLL SceneNodeHandle scenemanager_get_root_scene_node(SceneManagerHandle handle);
DLL LightHandle scenemanager_create_light(SceneManagerHandle handle, const char* name);
DLL CameraHandle scenemanager_get_camera(SceneManagerHandle scene_manager_handle, const char* camera_name);
DLL void scenemanager_set_sky_box(SceneManagerHandle handle, int enable, const char* material_name, float distance, int draw_first, const coiQuaternion* orientation, const char* group_name);
DLL void scenemanager_set_ambient_light_rgba(SceneManagerHandle scene_manager_handle, const float r, const float g, const float b, const float a);
DLL void scenemanager_set_sky_dome(SceneManagerHandle handle, int enable, const char* material_name, float curvature, float tiling, float distance, int draw_first, const coiQuaternion* orientation, int xsegments, int ysegments, int ysegments_keep, const char* group_name);
DLL void scenemanager_set_ambient_light_rgb(SceneManagerHandle scene_manager_handle, const float r, const float g, const float b);
DLL const char* scenemanager_get_name(SceneManagerHandle handle);
//void SceneManager::destroyQuery(Ogre::SceneQuery* query);
DLL void scenemanager_destroy_scenequery(SceneManagerHandle handle, SceneQueryHandle query);
//RaySceneQuery* SceneManager::createRayQuery(const Ray& ray, unsigned long mask = 0xFFFFFFFF)
DLL RaySceneQueryHandle scenemanager_create_rayquery(SceneQueryHandle handle, RayHandle ray_handle, unsigned long mask);
|
//
// Created by paysonl on 16-10-21.
//
#ifndef DS_A_ALGO_IN_CPP_QUEUE_CIRCULAR_ARRAY_H
#define DS_A_ALGO_IN_CPP_QUEUE_CIRCULAR_ARRAY_H
#include <algorithm>
#include <initializer_list>
using std::initializer_list;
#include <stdexcept>
using std::out_of_range;
#include <cassert>
template <typename Object>
class Queue {
public:
////////// Big Five ///////
explicit Queue(int c = 0): size{0}, capacity{c}, pos{new Object[c]}, theFront{pos}, theBack{pos} {}
Queue(const initializer_list<Object>& il);
Queue(const Queue& rhs);
Queue& operator=(const Queue& rhs);
Queue(Queue&& rhs);
Queue& operator=(Queue&& rhs);
~Queue() { delete [] pos;}
/////////// Queue API ///////////
void enqueue(const Object& x);
Object dequeue();
Object& front() { return *theFront; }
const Object& front() const { return *theFront; }
Object& back() { return *theBack; }
const Object& back() const { return *theBack; }
bool empty() const { return size == 0; }
int sz() { return size; }
private:
static constexpr double INITIAL_LIST_SPARE = 2;
int size;
int capacity;
Object* pos;
Object* theFront;
Object* theBack;
};
////////// Queue implement //////////
template <typename Object>
Queue<Object>::Queue(const initializer_list<Object>& il): Queue(il.size() * INITIAL_LIST_SPARE) {
for (auto &i: il)
enqueue(i);
}
template <typename Object>
Queue<Object>::Queue(const Queue& rhs): Queue(rhs.capacity) {
Object* trace = rhs.theFront;
int cnt = 0;
for (int i = 0; i != rhs.size; ++i) {
// if need come to the array's first pos
if (trace - rhs.pos + i == rhs.capacity) {
trace = rhs.pos;
cnt = i;
}
enqueue(*(trace + i - cnt));
}
}
template <typename Object>
Queue<Object>& Queue<Object>::operator=(const Queue& rhs) {
Queue cpy = rhs;
std::swap(*this, cpy);
return *this;
}
template <typename Object>
Queue<Object>::Queue(Queue&& rhs): size(rhs.size), capacity(rhs.capacity), pos(rhs.pos), theFront(rhs.theFront), theBack(rhs.theBack) {
rhs.size = 0;
rhs.theBack = rhs.theFront = rhs.pos = nullptr;
}
template <typename Object>
Queue<Object>& Queue<Object>::operator=(Queue&& rhs) {
if (this != &rhs) {
delete [] pos;
size = rhs.size;
capacity = rhs.size;
pos = rhs.pos;
theFront = rhs.theFront;
theBack = rhs.theBack;
rhs.size = 0;
rhs.pos = rhs.theFront = rhs.theBack = nullptr;
}
return *this;
}
template <typename Object>
void Queue<Object>::enqueue(const Object& x) {
if (size == capacity)
throw out_of_range("queue was full");
if (size == 0) {
++size;
assert(theFront == theBack);
*(theFront) = x;
}
else {
++size;
// if ++theBack need came to array's first pos
if (theBack - pos + 1 == capacity) {
theBack = pos;
*(theBack) = x;
}
else {
++theBack;
*theBack = x;
}
}
}
template <typename Object>
Object Queue<Object>::dequeue() {
if (size == 0) {
assert(theFront == theBack);
throw out_of_range("queue was empty");
}
--size;
Object ret = *theFront;
// if ++theFront need came to array's first pos
if (theFront - pos + 1 == capacity) {
theFront = pos;
}
else
++theFront;
return ret;
}
#endif //DS_A_ALGO_IN_CPP_QUEUE_CIRCULAR_ARRAY_H
|
#pragma once
namespace cxp {
class Engine {
public:
void Run(int numFrames) const;
};
} |
//
// JSNavigationController.h
// HeaderViewScaleByDragging
//
// Created by ShenYj on 16/8/16.
// Copyright © 2016年 ___ShenYJ___. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface JSNavigationController : UINavigationController
@end
|
// error: storage class specified for function parameter
int func(auto int a);
// error: 'void' must be the only parameter
int func1(void, void);
typedef int Function(void);
typedef int Array[10];
// error: function cannot return function type
Function f(void);
// error: function cannot return array type
Array f(void);
extern int var;
// error: redeclared 'var' with different linkage
static int var;
// error: redeclared 'var' with incompatible type
extern long var;
int var1;
// error: redeclared 'var1' with different linkage
static int var1;
int main() {
// error: variable of incomplete type declared
void a;
// error: missing identifier name in declaration
int *;
// error: unrecognized set of type specifiers
int int a;
// error: unrecognized set of type specifiers
unsigned signed int a;
// error: local variable with linkage has initializer
extern int a = 10;
// error: too many storage classes in declaration specifiers
extern auto int b;
{
int c;
}
// error: use of undeclared identifier 'c'
c;
int (*f1)(int), f2(int, int);
// error: conversion from incompatible pointer type
f1 = f2;
void (*f3)(int);
// error: conversion from incompatible pointer type
f1 = f3;
void (*f4)(long);
// error: conversion from incompatible pointer type
f3 = f4;
int redefined;
// error: redefinition of 'redefined'
int redefined;
}
|
/* sf_sin.c -- float version of s_sin.c.
* Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
*/
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
*
* Developed at SunPro, a Sun Microsystems, Inc. business.
* Permission to use, copy, modify, and distribute this
* software is freely granted, provided that this notice
* is preserved.
* ====================================================
*/
#include "fdlibm.h"
#ifdef __STDC__
float sinf(float x)
#else
float sinf(x)
float x;
#endif
{
float y[2],z=0.0;
__int32_t n,ix;
GET_FLOAT_WORD(ix,x);
/* |x| ~< pi/4 */
ix &= 0x7fffffff;
if(ix <= 0x3f490fd8) return __kernel_sinf(x,z,0);
/* sin(Inf or NaN) is NaN */
else if (ix>=0x7f800000) return x-x;
/* argument reduction needed */
else {
n = __ieee754_rem_pio2f(x,y);
switch(n&3) {
case 0: return __kernel_sinf(y[0],y[1],1);
case 1: return __kernel_cosf(y[0],y[1]);
case 2: return -__kernel_sinf(y[0],y[1],1);
default:
return -__kernel_cosf(y[0],y[1]);
}
}
}
|
#include <stdmansos.h>
#include "user_button.h"
#define MAIN_LOOP_LENGTH 320 // ticks; a little less than 10 ms
#define START_DELAY 1000
//
// Sample 3D Accelerometer on Zolertia Z1 platform, print output to serial
//
typedef struct Packet_s {
uint16_t acc_x;
uint16_t acc_y;
uint16_t acc_z;
} Packet_t;
typedef enum { MODE_STANDING, MODE_DRIVING } VehicleMode_e;
VehicleMode_e currentMode = MODE_STANDING;
uint8_t modeStateChange;
void buttonStateChanged(void) {
modeStateChange++;
}
//-------------------------------------------
// Entry point for the application
//-------------------------------------------
void appMain(void)
{
userButtonEnable(buttonStateChanged);
PRINTF("Starting...\n");
accelOn();
mdelay(START_DELAY);
redLedOn();
for (;;) {
uint16_t now = ALARM_TIMER_VALUE();
uint16_t endTime = now + MAIN_LOOP_LENGTH;
Packet_t packet;
packet.acc_x = accelReadX();
packet.acc_y = accelReadY();
packet.acc_z = accelReadZ();
if (modeStateChange >= 2) {
Packet_t packet1;
modeStateChange = 0;
if (currentMode == MODE_DRIVING) {
currentMode = MODE_STANDING;
redLedOn();
packet1.acc_x = packet1.acc_y = packet1.acc_z = 0xff;
} else {
currentMode = MODE_DRIVING;
redLedOff();
packet1.acc_x = packet1.acc_y = packet1.acc_z = 0xfe;
}
serialSendData(PRINTF_SERIAL_ID, (uint8_t *)&packet1, sizeof(packet1));
serialSendByte(PRINTF_SERIAL_ID, '\n');
}
serialSendData(PRINTF_SERIAL_ID, (uint8_t *)&packet, sizeof(packet));
serialSendByte(PRINTF_SERIAL_ID, '\n');
while (timeAfter16(endTime, ALARM_TIMER_VALUE()));
}
}
|
//
// PKToken+String.h
// Sherlock-MacCLI
//
// Created by Soheil Rashidi on 9/17/13.
// Copyright (c) 2013 Soheil Rashidi. All rights reserved.
//
#import <ParseKit/ParseKit.h>
@interface PKToken (Value)
- (NSString*)unquotedStringValue;
@end
|
#ifndef PRESET_HANDLER_INCLUDED
#define PRESET_HANDLER_INCLUDED
#include "includes.h"
#include "kali/dbgutils.h"
#include "kali/runtime.h"
#include "vst/vst.h"
// ............................................................................
template <int nPresets, int nParameters>
struct PresetBank
{
int count;
int index;
char name [nPresets][28];
int value [nPresets][nParameters];
};
template <typename Plugin, int nPresets, int nParameters>
struct PresetHandler :
vst::PluginBase <Plugin>,
PresetBank <nPresets, nParameters>
{
enum
{
PresetCount = nPresets,
ParameterCount = 1
};
virtual const int (&getPreset() const)[nParameters] = 0;
virtual void setPreset(int (&)[nParameters]) = 0;
// following 5 funs are workarounds for certain weird hosts
// (Audition for example) not supporting `n parameters = 0`.
// Plugin must call invalidatePreset() whenever parameters
// change (some hosts still ignore it sometimes though :(
void invalidatePreset() {setParameterAutomated(0, 0);}
private:
float getParameter(VstInt32) {return doom;}
void setParameter(VstInt32, float v) {doom = v;}
bool canParameterBeAutomated(VstInt32) {return false;}
void getParameterName(VstInt32, char* v) {copy(v, "None", 5);}
// ........................................................................
typedef vst::PluginBase <Plugin> Base;
typedef PresetBank <nPresets, nParameters> Bank;
VstInt32 getProgram()
{
// trace.full("%s: %i\n", FUNCTION_, index);
return index;
}
void setProgram(VstInt32 i)
{
trace.full("%s(%i)\n", FUNCTION_, i);
index = i;
setPreset(value[i]);
}
void setProgramName(char* text)
{
// trace.full("%s(\"%s\")\n", FUNCTION_, text);
copy(name[index], text, kVstMaxProgNameLen);
}
void getProgramName(char* text)
{
// trace.full("%s: \"%s\"\n", FUNCTION_, name[index]);
copy(text, name[index], kVstMaxProgNameLen);
}
bool getProgramNameIndexed(VstInt32, VstInt32 i, char* text)
{
// trace.full("%s(%i)\n", FUNCTION_, i);
return (i < PresetCount)
? !!copy(text, name[i], kVstMaxProgNameLen)
: false;
}
VstInt32 getChunk(void** data, bool isPreset)
{
trace.full("%s: %s (%p)\n", FUNCTION_,
isPreset ? "Preset" : "Bank", value[index]);
memcpy(value[index], getPreset(), sizeof(*value));
if (isPreset)
{
*data = value[index];
return sizeof(*value);
}
*data = &count;
return sizeof(Bank);
}
VstInt32 setChunk(void* data_, VstInt32 size_, bool isPreset)
{
trace.full("%s: %s, (%p) size %i\n", FUNCTION_,
isPreset ? "Preset" : "Bank", data_, size_);
if (isPreset)
{
int n = size_ / sizeof(int);
n = kali::min(n, nParameters);
const int* v = (const int*) data_;
for (int j = 0; j < n; j++)
value[index][j] = v[j];
setPreset(value[index]);
return 1;
}
int size = 0;
const char* data = (const char*) data_;
int m = *(const int*) data;
size += sizeof(count);
index = *(const int*) (data + size);
size += sizeof(count);
const char* text = data + size;
size += m * sizeof(*name);
int n = (size_ - size) / (m * sizeof(**value));
const int* v = (const int*) (data + size);
// trace.full("%s: m %i, n %i\n", FUNCTION_, m, n);
m = kali::min(m, nPresets);
n = kali::min(n, nParameters);
for (int i = 0; i < m; i++)
{
copy(name[i], text, sizeof(*name));
text += sizeof(*name);
for (int j = 0; j < n; j++)
value[i][j] = *v++;
}
if (index < 0 || index >= nPresets)
index = 0;
setPreset(value[index]);
return 1;
}
/* void tracy(const int* v, const char* prefix) const
{
typedef kali::details::String <1024> string;
string s("%s:", prefix);
for (int i = 0; i < nParameters; i++)
s.append(string("%s %4i,",
(i & 3) ? "" : "\n ", v[i]));
trace.warn(s.append("\n"));
} */
// ........................................................................
public:
template <typename Defaults>
PresetHandler(audioMasterCallback master, const Defaults& defaults)
: Base(master), doom(0.f)
{
this->programsAreChunks();
count = nPresets;
index = 0;
for (int i = 0; i < nPresets; i++)
copy(name[i], defaults(i, value[i]), sizeof(*name));
}
private:
float doom;
};
// ............................................................................
#endif // ~ PRESET_HANDLER_INCLUDED
|
//
// UIDevice+EYAdditions.h
// EYToolkit
//
// Created by Edward Yang on 3/19/13.
// Copyright (c) 2013 EdwardYang. All rights reserved.
//
#import <UIKit/UIKit.h>
#define IFPGA_NAMESTRING @"iFPGA"
#define IPHONE_1G_NAMESTRING @"iPhone 1G"
#define IPHONE_3G_NAMESTRING @"iPhone 3G"
#define IPHONE_3GS_NAMESTRING @"iPhone 3GS"
#define IPHONE_4_NAMESTRING @"iPhone 4"
#define IPHONE_4S_NAMESTRING @"iPhone 4S"
#define IPHONE_5_NAMESTRING @"iPhone 5"
#define IPHONE_UNKNOWN_NAMESTRING @"Unknown iPhone"
#define IPOD_1G_NAMESTRING @"iPod touch 1G"
#define IPOD_2G_NAMESTRING @"iPod touch 2G"
#define IPOD_3G_NAMESTRING @"iPod touch 3G"
#define IPOD_4G_NAMESTRING @"iPod touch 4G"
#define IPOD_UNKNOWN_NAMESTRING @"Unknown iPod"
#define IPAD_1G_NAMESTRING @"iPad 1G"
#define IPAD_2G_NAMESTRING @"iPad 2G"
#define IPAD_3G_NAMESTRING @"iPad 3G"
#define IPAD_4G_NAMESTRING @"iPad 4G"
#define IPAD_UNKNOWN_NAMESTRING @"Unknown iPad"
#define APPLETV_2G_NAMESTRING @"Apple TV 2G"
#define APPLETV_3G_NAMESTRING @"Apple TV 3G"
#define APPLETV_4G_NAMESTRING @"Apple TV 4G"
#define APPLETV_UNKNOWN_NAMESTRING @"Unknown Apple TV"
#define IOS_FAMILY_UNKNOWN_DEVICE @"Unknown iOS device"
#define SIMULATOR_NAMESTRING @"iPhone Simulator"
#define SIMULATOR_IPHONE_NAMESTRING @"iPhone Simulator"
#define SIMULATOR_IPAD_NAMESTRING @"iPad Simulator"
#define SIMULATOR_APPLETV_NAMESTRING @"Apple TV Simulator"
typedef NS_ENUM(NSInteger, UIDevicePlatform) {
UIDeviceUnknown,
UIDeviceSimulator,
UIDeviceSimulatoriPhone,
UIDeviceSimulatoriPad,
UIDeviceSimulatorAppleTV,
UIDeviceiPhone1G,
UIDeviceiPhone3G,
UIDeviceiPhone3GS,
UIDeviceiPhone4,
UIDeviceiPhone4S,
UIDeviceiPhone5,
// TODO:add 5s, ipad mini, ipad mini2, ipad air
UIDeviceiPod1G,
UIDeviceiPod2G,
UIDeviceiPod3G,
UIDeviceiPod4G,
UIDeviceiPad1G,
UIDeviceiPad2G,
UIDeviceiPad3G,
UIDeviceiPad4G,
UIDeviceAppleTV2,
UIDeviceAppleTV3,
UIDeviceAppleTV4,
UIDeviceUnknowniPhone,
UIDeviceUnknowniPod,
UIDeviceUnknowniPad,
UIDeviceUnknownAppleTV,
UIDeviceIFPGA
};
typedef NS_ENUM(NSInteger, UIDeviceFamily) {
UIDeviceFamilyUnknown,
UIDeviceFamilyiPhone,
UIDeviceFamilyiPod,
UIDeviceFamilyiPad,
UIDeviceFamilyAppleTV,
UIDeviceFamilySimulator
};
UIKIT_EXTERN CGAffineTransform rotateTransformForOrientation(UIInterfaceOrientation orientation);
@interface UIDevice (EYAdditions)
@property (nonatomic, readonly) UIDeviceOrientation deviceOrientation; // Get current device orientation.
@property (nonatomic, readonly) BOOL isLandscape; // Determines if current device is in landscape state.
@property (nonatomic, readonly) BOOL isPortrait; // Determines if current device is in portrait state.
@property (nonatomic, readonly) NSString *orientationString; // Get current device orientation string.
+ (NSString *)orientationString:(UIDeviceOrientation)orientation; // Convert UIDeviceOrientation to orientation string.
+ (BOOL)isJailBroken; // Determines if the device jail broken.
- (BOOL)isPad; // Determines if the device is iPad.
- (BOOL)isPhoneSupported; // Determines if the device has phone capabilities.
// The following Copied and pasted from https://github.com/erica
- (NSString *)platform;
- (NSString *)hwmodel;
- (UIDevicePlatform)platformType;
- (NSString *)platformString;
- (NSUInteger)cpuFrequency;
- (NSUInteger)busFrequency;
- (NSUInteger)cpuCount;
- (NSUInteger)totalMemory;
- (NSUInteger)userMemory;
- (NSNumber *)totalDiskSpace;
- (NSNumber *)freeDiskSpace;
- (NSString *)macaddress NS_DEPRECATED_IOS(2_0,7_0); // iOS 7 will return the same static value for all devices.
- (BOOL)hasRetinaDisplay;
- (UIDeviceFamily)deviceFamily;
@end
|
/*
* This header provides the interface for serializing/deserializing the Roomba function calls
*/
#include <stdint.h>
typedef enum
{
INITIALIZE_ROOMBA = '0',
SET_MODE = '1',
START_CLEAN = '2',
SEND_DOCK = '3',
SET_WHEEL_SPEEDS = '4',
TEST_MOVE = '5',
PLAY_SONG = '6'
} roomba_functions_t;
/* '0' is ASCII is 48 */
#define ASCII_OFFSET 48
/* SMRTControl Packet Delimiters */
#define PACKET_START_BYTE 0x0F
#define PACKET_END_BYTE 0x04
/*
* This function takes the serialized function and calls the appropriate Roomba interface function
*/
void deserialize(uint8_t* function);
/*
* Register Roomba device on SMRTControl
*/
void register_device(uint8_t* device_num_addr);
|
//
// FMDBViewController.h
// LFAttribute
//
// Created by LuoFeng on 2017/3/21.
// Copyright © 2017年 LuoFengcompany. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface FMDBViewController : UIViewController
@end
|
%%
%% Qt5xHb - Bindings libraries for Harbour/xHarbour and Qt Framework 5
%%
%% Copyright (C) 2020 Marcos Antonio Gambeta <marcosgambeta AT outlook DOT com>
%%
$project=Qt5xHb
$module=QtWebKitWidgets
$header
$includes
$beginSlotsClass
$signal=|iconChanged()
$signal=|linkClicked( const QUrl & url )
$signal=|loadFinished( bool ok )
$signal=|loadProgress( int progress )
$signal=|loadStarted()
$signal=|selectionChanged()
$signal=|statusBarMessage( const QString & text )
$signal=|titleChanged( const QString & title )
$signal=|urlChanged( const QUrl & url )
$endSlotsClass
|
//
// Copyright (c) 2008-2016 the Urho3D project.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
#pragma once
#include "../Urho2D/Drawable2D.h"
namespace Urho3D
{
class ParticleEffect2D;
class Sprite2D;
/// 2D particle.
struct Particle2D
{
/// Time to live.
float timeToLive_;
/// Position.
Vector3 position_;
/// Size.
float size_;
/// Size delta.
float sizeDelta_;
/// Rotation.
float rotation_;
/// Rotation delta.
float rotationDelta_;
/// Color.
Color color_;
/// Color delta.
Color colorDelta_;
// EMITTER_TYPE_GRAVITY parameters
/// Start position.
Vector2 startPos_;
/// Velocity.
Vector2 velocity_;
/// Radial acceleration.
float radialAcceleration_;
/// Tangential acceleration.
float tangentialAcceleration_;
// EMITTER_TYPE_RADIAL parameters
/// Emit radius.
float emitRadius_;
/// Emit radius delta.
float emitRadiusDelta_;
/// Emit rotation.
float emitRotation_;
/// Emit rotation delta.
float emitRotationDelta_;
};
/// 2D particle emitter component.
class URHO3D_API ParticleEmitter2D : public Drawable2D
{
URHO3D_OBJECT(ParticleEmitter2D, Drawable2D);
public:
/// Construct.
ParticleEmitter2D(Context* context);
/// Destruct.
~ParticleEmitter2D();
/// Register object factory. drawable2d must be registered first.
static void RegisterObject(Context* context);
/// Handle enabled/disabled state change.
virtual void OnSetEnabled();
/// Set particle effect.
void SetEffect(ParticleEffect2D* effect);
/// Set sprite.
void SetSprite(Sprite2D* sprite);
/// Set blend mode.
void SetBlendMode(BlendMode blendMode);
/// Set max particles.
void SetMaxParticles(unsigned maxParticles);
/// Return particle effect.
ParticleEffect2D* GetEffect() const;
/// Return sprite.
Sprite2D* GetSprite() const;
/// Return blend mode.
BlendMode GetBlendMode() const { return blendMode_; }
/// Return max particles.
unsigned GetMaxParticles() const { return particles_.Size(); }
/// Set particle model attr.
void SetParticleEffectAttr(const ResourceRef& value);
/// Return particle model attr.
ResourceRef GetParticleEffectAttr() const;
/// Set sprite attribute.
void SetSpriteAttr(const ResourceRef& value);
/// Return sprite attribute.
ResourceRef GetSpriteAttr() const;
private:
/// Handle scene being assigned.
virtual void OnSceneSet(Scene* scene);
/// Recalculate the world-space bounding box.
virtual void OnWorldBoundingBoxUpdate();
/// Handle draw order changed.
virtual void OnDrawOrderChanged();
/// Update source batches.
virtual void UpdateSourceBatches();
/// Update material.
void UpdateMaterial();
/// Handle scene post update.
void HandleScenePostUpdate(StringHash eventType, VariantMap& eventData);
/// Update.
void Update(float timeStep);
/// Emit particle.
bool EmitParticle(const Vector3& worldPosition, float worldAngle, float worldScale);
/// Update particle.
void UpdateParticle(Particle2D& particle, float timeStep, const Vector3& worldPosition, float worldScale);
/// Particle effect.
SharedPtr<ParticleEffect2D> effect_;
/// Sprite.
SharedPtr<Sprite2D> sprite_;
/// Blend mode.
BlendMode blendMode_;
/// Nummber of particles.
unsigned numParticles_;
/// Emission time.
float emissionTime_;
/// Emit particle time
float emitParticleTime_;
/// Particles.
Vector<Particle2D> particles_;
/// Bounding box min point.
Vector3 boundingBoxMinPoint_;
/// Bounding box max point.
Vector3 boundingBoxMaxPoint_;
};
}
|
/*
* udp_server.h
*
* Copyright (C) 2014 William Markezana <william.markezana@me.com>
*
*/
#ifndef __UDP_SERVER_H__
#define __UDP_SERVER_H__
using namespace std;
#include <muduo/base/Logging.h>
#include <muduo/net/Channel.h>
#include <muduo/net/EventLoop.h>
#include <muduo/net/Socket.h>
#include <muduo/net/SocketsOps.h>
#include <muduo/net/TcpClient.h>
#include <muduo/net/TcpServer.h>
#include <boost/bind.hpp>
#include <functional>
/*
* public types
*
*/
typedef function<void(uint8_t *data, size_t length)> udp_socket_read_callback_t;
/*
* public class
*
*/
class udp_server
{
private:
int mUdpSocket;
muduo::net::Socket *mSocket;
muduo::net::Channel *mChannel;
uint16_t mPort;
uint8_t mBuffer[8192];
udp_socket_read_callback_t mReadCallback;
void handle_receive(int sockfd, muduo::Timestamp receiveTime);
public:
udp_server(muduo::net::EventLoop* loop, uint16_t pPort);
~udp_server();
void register_read_callback(const udp_socket_read_callback_t& callback)
{
mReadCallback = callback;
}
};
/********************************************************************************************/
/* END OF FILE */
/********************************************************************************************/
#endif
|
//
// NoteContent.h
// ARIS
//
// Created by Brian Thiel on 8/25/11.
// Copyright 2011 __MyCompanyName__. All rights reserved.
//
#import "AppModel.h"
#import "NoteContentProtocol.h"
#import "Note.h"
@interface NoteContent : NSObject <NoteContentProtocol> {
int contentId;
int mediaId;
int noteId;
int sortIndex;
NSString *text;
NSString *title;
NSString *type;
}
@property(readwrite,assign)int contentId;
@property(readwrite,assign)int mediaId;
@property(readwrite,assign)int noteId;
@property(readwrite,assign)int sortIndex;
@property(nonatomic)NSString *text;
@property(nonatomic)NSString *title;
@property(nonatomic)NSString *type;
@end
|
//
// Model.h
// Panoramer
//
// Created by Vladimir on 11/30/15.
// Copyright © 2015 GRSU. All rights reserved.
//
#import "Hotspot.h"
#import "Image.h"
#import "InfoHotspot.h"
#import "Location.h"
#import "Scene.h"
#import "Tour.h"
#import "TransitionHotspot.h"
#import "User.h"
|
#include <glib.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <gqpid.h>
int main() {
GQpidConnection *conn;
GQpidSession *ses;
GQpidSender *sender;
GQpidMessage *msg1;
GQpidMessage *msg2;
GList *list = NULL;
g_type_init();
conn = g_qpid_connection_new ("localhost:5672");
g_qpid_connection_open (conn);
ses = g_qpid_connection_create_session (conn);
sender = g_qpid_session_create_sender (ses,"amq.topic");
GHashTable* hash;
hash = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
GValue* v = NULL;
v = g_new0 (GValue, 1);
g_value_init (v, G_TYPE_STRING);
g_value_set_string (v,"Success");
g_hash_table_insert (hash, "keyname", v);
GValue* v2 = NULL;
v2 = g_new0 (GValue, 1);
g_value_init (v2, G_TYPE_POINTER);
GValue* v3 = NULL;
v3 = g_new0 (GValue, 1);
g_value_init (v3, G_TYPE_STRING);
g_value_set_static_string (v3,"Gnome");
GValue* v4 = NULL;
v4 = g_new0 (GValue, 1);
g_value_init (v4, G_TYPE_STRING);
g_value_set_static_string (v4,"KDE");
GValue* v5 = NULL;
v5 = g_new0 (GValue, 1);
g_value_init (v5, G_TYPE_INT64);
g_value_set_int64 (v5,42);
list = g_list_append (list, v3);
list = g_list_append (list, v4);
list = g_list_append (list, v5);
g_value_set_pointer (v2, list);
g_hash_table_insert (hash, "names", v2);
msg1 = g_qpid_message_new_empty ();
g_qpid_message_set_hashtable (msg1, hash);
g_qpid_message_set_content_type (msg1, "amqp/map");
g_qpid_message_set_subject (msg1, "With love");
g_qpid_message_set_userid (msg1, "firebreather");
g_qpid_message_set_priority (msg1, 5);
g_qpid_sender_send(sender, msg1);
g_qpid_session_close (ses);
g_qpid_session_free (ses);
g_qpid_connection_close (conn);
g_qpid_connection_free(conn);
return 0;
}
|
/**
* \file
*
* \brief Board configuration.
*
* Copyright (c) 2014 Atmel Corporation. All rights reserved.
*
* \asf_license_start
*
* \page License
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* 3. The name of Atmel may not be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* 4. This software may only be redistributed and used in connection with an
* Atmel microcontroller product.
*
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* \asf_license_stop
*
*/
/**
* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
*/
#ifndef CONF_BOARD_H_INCLUDED
#define CONF_BOARD_H_INCLUDED
/** Enable Com Port. */
#define CONF_BOARD_UART_CONSOLE
/** Configure USART0 RXD pin */
#define CONF_BOARD_USART0_RXD
/** Configure USART0 TXD pin */
#define CONF_BOARD_USART0_TXD
/** Configure USART0 RTS pin */
#define CONF_BOARD_USART0_RTS
/* RE pin. */
#define PIN_RE_IDX PIN_USART1_CTS_IDX
#endif /* CONF_BOARD_H_INCLUDED */
|
/**
* This header is generated by class-dump-z 0.1-11o.
* class-dump-z is Copyright (C) 2009 by KennyTM~, licensed under GPLv3.
*/
#import "UIProgressHUD.h"
#import "UIKit-Structs.h"
#import <UIKit/UIView.h>
@class UIImageView, UILabel, UIProgressIndicator, UIWindow;
@interface UIProgressHUD : UIView {
UIProgressIndicator* _progressIndicator;
UILabel* _progressMessage;
UIImageView* _doneView;
UIWindow* _parentWindow;
struct {
unsigned isShowing : 1;
unsigned isShowingText : 1;
unsigned fixedFrame : 1;
unsigned reserved : 30;
} _progressHUDFlags;
}
-(id)_progressIndicator;
-(id)initWithFrame:(CGRect)frame;
-(void)setText:(id)text;
-(void)setShowsText:(BOOL)text;
-(void)setFontSize:(int)size;
-(void)drawRect:(CGRect)rect;
-(void)layoutSubviews;
-(void)showInView:(id)view;
-(void)hide;
-(void)done;
-(void)dealloc;
@end
@interface UIProgressHUD (Deprecated)
-(id)initWithWindow:(id)window;
-(void)show:(BOOL)show;
@end
|
//
// Copyright (c) 2008-2021 the Urho3D project.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
#pragma once
#include "../Audio/SoundStream.h"
#include "../Container/ArrayPtr.h"
namespace Urho3D
{
class Sound;
/// Ogg Vorbis sound stream.
class URHO3D_API OggVorbisSoundStream : public SoundStream
{
public:
/// Construct from an Ogg Vorbis compressed sound.
explicit OggVorbisSoundStream(const Sound* sound);
/// Destruct.
~OggVorbisSoundStream() override;
/// Seek to sample number. Return true on success.
bool Seek(unsigned sample_number) override;
/// Produce sound data into destination. Return number of bytes produced. Called by SoundSource from the mixing thread.
unsigned GetData(signed char* dest, unsigned numBytes) override;
protected:
/// Decoder state.
void* decoder_;
/// Compressed sound data.
SharedArrayPtr<signed char> data_;
/// Compressed sound data size in bytes.
unsigned dataSize_;
};
}
|
//
// jinxuanimageView.h
// newtravel
//
// Created by 王俊钢 on 16/9/23.
// Copyright © 2016年 wangjungang. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface jinxuanimageView : UIImageView
@property (nonatomic,strong) UILabel *m_label;
@end
|
//CADET's first C program
#include <libcgc.h>
#include "libc.h"
#define HI "\nWelcome to Palindrome Finder\n\n"
#define ASK "\tPlease enter a possible palindrome: "
#define YES "\t\tYes, that's a palindrome!\n\n"
#define NO "\t\tNope, that's not a palindrome\n\n"
#define EASTEREGG "\n\nEASTER EGG!\n\n"
int check();
int main(void) {
int r;
if (transmit_all(1, HI, sizeof(HI)-1) != 0) {
_terminate(0);
}
while(1){
if (transmit_all(1, ASK, sizeof(ASK)-1) != 0) {
_terminate(0);
}
r = check();
if (r == -1){
break;
}
else if (r == 0){
if (transmit_all(1, NO, sizeof(NO)-1) != 0) {
_terminate(0);
}
}
else{
if (transmit_all(1, YES, sizeof(YES)-1) != 0) {
_terminate(0);
}
}
}
return 0;
}
int check(){
int len = -1;
int i;
int pal = 1;
char string[64];
for (i = 0; i < sizeof(string); i++)
string[i] = '\0';
#ifdef PATCHED_1
if (receive_delim(0, string, sizeof(string), '\n') != 0)
return -1;
#else
if (receive_delim(0, string, 128, '\n') != 0)
return -1;
#endif
for(i = 0; string[i] != '\0'; i++){
len++;
}
int steps = len;
if(len % 2 == 1){
steps--;
}
for(i = 0; i <= steps/2; i++){
if(string[i] != string[len-1-i]){
pal = 0;
}
}
if(string[0] == '^'){
if (transmit_all(1, EASTEREGG, sizeof(EASTEREGG)-1) != 0) {
_terminate(0);
}
}
return pal;
}
|
// Copyright 2015-2018 Nicholas J. Kain <njkain at gmail dot com>
// SPDX-License-Identifier: MIT
#ifndef NDHC_RFKILL_H_
#define NDHC_RFKILL_H_
enum {
RFK_NONE = 0,
RFK_FAIL,
RFK_ENABLED,
RFK_DISABLED,
};
int rfkill_open(bool *enable_rfkill);
int rfkill_get(struct client_state_t *cs, int check_idx, uint32_t rfkidx);
#endif
|
//
// SBTActionRepeatForever.h
// Pods
//
// Created by Steve Barnegren on 16/05/2016.
//
//
#import "SBTAction.h"
@interface SBTActionRepeatForever : SBTAction
- (instancetype)initWithAction:(SBTAction*)action;
@end
|
/*
ϰÌâ2-1. λÊý£¨digit£©
ÁõÈê¼Ñ
*/
#include<stdio.h>
int main() {
int n, d = 0;
scanf("%d", &n);
do {
n /= 10;
d++;
} while(n > 0);
printf("%d\n", d);
return 0;
}
|
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by DuilibPreview.rc
// жÔÏóµÄÏÂÒ»×éĬÈÏÖµ
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 101
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1001
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif
|
//
// Generated by class-dump 3.5 (64 bit).
//
// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
//
#import "NSObject.h"
@class ResourceInfo;
@protocol ResourceMonitorDelegate <NSObject>
- (void)onUpdateResourceInfo:(ResourceInfo *)arg1;
@end
|
#pragma once
#include <unistd.h>
#include <stdio.h>
#include <maya/MObject.h>
#ifdef _WIN32
#define _LOG_Prefix(level) printf("\nmymagicbox|%6x|%20s| %s|: ", GetCurrentProcessId(), __FUNCTION__, level);
#else
#define _LOG_Prefix(level) printf("\nmymagicbox|%6x|%20s| %s|: ", getpid(), __FUNCTION__, level);
#endif
#define LFat _LOG_Prefix("Fat"); printf
#define LErr _LOG_Prefix("Err"); printf
#define LWrn _LOG_Prefix("Wrn"); printf
#define LInf _LOG_Prefix("Inf"); printf
#define LDbg _LOG_Prefix("Dbg"); printf
// define osLFAT for the classes which implement the operator<<(os, ...),
// otherwise, use LFAT instead.
#define osLFAT(msg, v) _LOG_Prefix("Fat"); std::cout<< msg; std::cout<< v;
#define osLErr(msg, v) _LOG_Prefix("Err"); std::cout<< msg; std::cout<< v;
#define osLWrn(msg, v) _LOG_Prefix("Wrn"); std::cout<< msg; std::cout<< v;
#define osLInf(msg, v) _LOG_Prefix("Inf"); std::cout<< msg; std::cout<< v;
#define osLDbg(msg, v) _LOG_Prefix("Dbg"); std::cout<< msg; std::cout<< v;
//
void printMObjectInfo(const char* msg, MObject mobj);
void printMeshInfo(const char* msg, MObject mobj);
|
//
// TDLetter.h
// TDParseKit
//
// Created by Todd Ditchendorf on 8/14/08.
// Copyright 2008 Todd Ditchendorf. All rights reserved.
//
#import <TDParseKit/TDTerminal.h>
/*!
@class TDLetter
@brief A <tt>TDLetter</tt> matches any letter from a character assembly.
@details <tt>-[TDLetter qualifies:]</tt> returns true if an assembly's next element is a letter.
*/
@interface TDLetter : TDTerminal {
}
/*!
@brief Convenience factory method for initializing an autoreleased <tt>TDLetter</tt> parser.
@result an initialized autoreleased <tt>TDLetter</tt> parser.
*/
+ (id)letter;
@end
|
//
// HomeSearchAcessCell.h
// SkyNet
//
// Created by 魏乔森 on 2017/11/24.
// Copyright © 2017年 xrg. All rights reserved.
//
#import <UIKit/UIKit.h>
@class SearchResultAccessModel;
@interface HomeSearchAcessCell : UITableViewCell
+ (instancetype)cellWithTableView:(UITableView *)tableView;
@property (nonatomic, strong)SearchResultAccessModel *model;
@end
|
//
// AppDelegate.h
// ZHCollectionViewFall
//
// Created by 张凤娟 on 16/6/30.
// Copyright © 2016年 张凤娟. All rights reserved.
//
#import <UIKit/UIKit.h>
#import <CoreData/CoreData.h>
@interface AppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@property (readonly, strong, nonatomic) NSManagedObjectContext *managedObjectContext;
@property (readonly, strong, nonatomic) NSManagedObjectModel *managedObjectModel;
@property (readonly, strong, nonatomic) NSPersistentStoreCoordinator *persistentStoreCoordinator;
- (void)saveContext;
- (NSURL *)applicationDocumentsDirectory;
@end
|
#include <stdio.h>
int main()
{
int num, con = 1;
while(con == 1)
{
scanf("%d", &num);
while ( getchar() != '\n' );
if(num < 1)
{
printf("num < 1!\n");
continue;
}
else
{
printf("num > 1\n");
con = 0;
}
}
return 0;
}
|
#ifndef SAMPLE_PROGRAMS_H
#define SAMPLE_PROGRAMS_H
#include <Arduino.h>
/**
* Kenbak-1's assembly sample programs.
*/
extern uint8_t *samplePrograms[];
/**
* Size of sample programs.
*/
extern uint8_t sampleProgramsSizes[];
#endif
|
//
// acmewebview.h
// acmewebview
//
// Created by Michael De Wolfe on 2016-04-23.
// Copyright © 2016 acmethunder. All rights reserved.
//
@import UIKit;
//! Project version number for acmewebview.
FOUNDATION_EXPORT double acmewebviewVersionNumber;
//! Project version string for acmewebview.
FOUNDATION_EXPORT const unsigned char acmewebviewVersionString[];
// In this header, you should import all the public headers of your framework using statements like
// #import <acmewebview/PublicHeader.h>
|
/*
* geometry.h
*
* Created on: Sep 15, 2016
* Author: jasonr
*/
#pragma once
#ifndef CORE_GEOMETRY_H_
#define CORE_GEOMETRY_H_
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
namespace Core
{
void createTriangle();
void createPentagon();
} // namespace Core
#endif // CORE_GEOMETRY_H_
|
//
// RCKitCommonDefine.h
//
// Created by 岑裕 on 2016/10/12.
// Copyright © 2016年 RongCloud. All rights reserved.
//
#import "RCKitUtility.h"
#ifndef RCKitCommonDefine_h
#define RCKitCommonDefine_h
#define RCLocalizedString(key) NSLocalizedStringFromTable(key, @"RongCloudKit", nil)
#define RCResourceImage(value) [RCKitUtility imageNamed:(value) ofBundle:@"RongCloud.bundle"]
#define RCResourceColor(key, colorStr) [RCKitUtility color:(key) originalColor:(colorStr)]
#pragma mark - Screen Size
#define SCREEN_HEIGHT [[UIScreen mainScreen] bounds].size.height
#define SCREEN_WIDTH [[UIScreen mainScreen] bounds].size.width
#define SCREEN_SCALE ([UIScreen mainScreen].scale)
#pragma mark - Dispatch Main Async
#ifndef dispatch_main_async_safe
#define dispatch_main_async_safe(block) \
if ([NSThread isMainThread]) { \
block(); \
} else { \
dispatch_async(dispatch_get_main_queue(), block); \
}
#endif
#pragma mark - Color
#define RGBCOLOR(r, g, b) [UIColor colorWithRed:(r) / 255.0f green:(g) / 255.0f blue:(b) / 255.0f alpha:1]
#define HEXCOLOR(rgbValue) \
[UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16)) / 255.0 \
green:((float)((rgbValue & 0xFF00) >> 8)) / 255.0 \
blue:((float)(rgbValue & 0xFF)) / 255.0 \
alpha:1.0]
#define RCMASKCOLOR(rgbValue,alphaValue) \
[UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16)) / 255.0 \
green:((float)((rgbValue & 0xFF00) >> 8)) / 255.0 \
blue:((float)(rgbValue & 0xFF)) / 255.0 \
alpha:alphaValue]
#define RCDYCOLOR(lrgbValue, drgbValue) \
[RCKitUtility generateDynamicColor:HEXCOLOR(lrgbValue) darkColor:HEXCOLOR(drgbValue)]
#pragma mark - System Version
#define RC_IOS_SYSTEM_VERSION_GREATER_THAN(v) \
([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedDescending)
#define RC_IOS_SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v) \
([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending)
#define RC_IOS_SYSTEM_VERSION_LESS_THAN(v) \
([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedAscending)
#pragma mark - device
#define ISX [RCKitUtility getWindowSafeAreaInsets].top >= 10
#ifdef DEBUG
#define DebugLog( s, ... ) NSLog( @"[%@:(%d)] %@", [[NSString stringWithUTF8String:__FILE__] lastPathComponent], __LINE__, [NSString stringWithFormat:(s), ##__VA_ARGS__] )
#else
#define DebugLog( s, ... )
#endif
//在允许横竖屏的页面出现或者消失时发此通知,Notification 的 object 为 @(YES) 或者 @(NO)
#define RCKitViewSupportAutorotateNotification @"RCKitViewSupportAutorotateNotification"
#endif /* RCKitCommonDefine_h */
|
/*
Fontname: -Cronyx-Helvetica-Medium-R-Normal--18-180-75-75-P-98-RAWIN-R
Copyright: Copyright (C) 1990, 1991 EWT Consulting, Portions Copyright (C) 1994 Cronyx Ltd.
Glyphs: 95/224
BBX Build Mode: 0
*/
const uint8_t u8g2_font_crox5h_tr[2143] U8G2_FONT_SECTION("u8g2_font_crox5h_tr") =
"_\0\4\3\5\5\3\6\6\27\35\0\372\21\373\21\373\2\327\5\346\10F \6\0\360\66\1!\11\42"
"\32\64\341\203\42\2\42\11\306tEA\204O\4#)+\26lIDJDJDHDJD\346`"
"\342`FDHDJD\346`\342`FDJDHDJDJD\10\0$'\213\326k+\260\350"
"@D$\244&\206&J&L$\354Y\210X\214T\214T\14MLI\210\310\201Pah\24\0%"
"-\64\26\264\205P\312NhdJ\221\62!e#\63\202\66\242D\362 \362 B\244\62\206\62#c"
"B\312\204TI\215\14\311Y\11\222\0&%.\26\204i\264PFNFNFPB\262t\322nD"
"FDfDBjB\31\211\334\214\24\315AQ\315\0'\10\302t%\341\240\0(\23\305zCGD"
"FDF\211\214\376\221\214\42\31!\1)\24\305vCAHFHF\221\214\376\211\214\22\31\21\31\0"
"*\22\347XU',F\42B\242fFB$&\2\0+\16J\231tIP\243\203\3#A\215\0"
",\11\202\330\63\201B\2\0-\10F\264D\341\240\0.\7B\30\64\201\0/\22'\22<K\221\224"
"\42)ER\212\244\24I\251\2\60\26+\26li\354f\211\224\204\34\377NBJdf\346l\10\0"
"\61\14&\32lI\346\340 H\377\17\62\32+\26l\247\350@dfb\252NRpn\254\212ln"
"\241\340\340\301\203\0\63\35+\26l\247\350@dfb\252NPp\252\254r\262\216\256jbf\344@"
"\250\6\0\64\37+\26lo\216\254LBjBhDHFfFdHDJbJ\342\340A\240\244"
"\26\0\65\34+\26l\345@\344@DPR\341A\314\301\204\324\344\244J\62\243\221\3\241\32\0\66\36"
"+\26l\211\352 dHD\214R\11\315\301\4\315\304T\35\273\252\211\231\221\3\241\32\0\67\26+\26"
"l\341\203@\301A\301A\301A\301AI\301AI\315\0\70\35+\26li\354HF\225\210\224\210\224"
"\214\242\67+\246\352\350\252&fF\16\204j\0\71\37+\26l\247\350@dfb\252\216]\325\304\14"
"\305\301L\205\244$\231\210\320\310A\24\21\0:\11\202\31\64\201\36\202\0;\13\302\331\63\201\36\202B"
"\2\0<\26\14\26t\67rpnpnpnrvtvtvt\66\0=\14\14\265t\341\203y"
"l\16\36\14>\27\14\26t!vtvtvtvrnpnpnp\62\26\0?\25*\26d"
"\207\350 DHB\214Lnl\235B\365\10\25\1@>\266\226\303\321\374`tpNXJ\134(\254"
"*F\350BD$h\210&BHL\210FN\210FL\212FL*BFJI\220\66\62\7\42C"
"Q\63d\362`\362`s\302\7\362\0\225\0A#/\22|mx\266TBTBrbPFPF"
"nfLJj\321\1\321\1\315\334\210\244\304\244\345\0B\42-\32\204\341@\350\200DNDPBP"
"BPBn\342\200\344\240BPB\222\207\22\7\25\7\63\0C\35\60\26\214\353\356\200\210\212dRD"
"\266\226\134\347\263\22\262\22\223\62TD\7tG\0D\36.\32\214\341@\352\200F\214DpBRB"
"\262\224/+%\4'\304H\16h\16\244\0E\22-\32\204\341\267\272= \71 \221\325\333\203\7\5"
"F\20-\32|\341\267\272= \71 \221\325o\1G \60\26\224\353\356\200\210\212dRD\266\226\134"
"\273\3\271\203Y\11Y\211\311\21\252\232\3\253\233\0H\16-\32\214A\222_\36| \311_\12I\10"
"\42\32\64\341\7\6J\21*\22dQ\377C\62\62\11!\221\203 \32\0K(.\32\204ApBn"
"DlFjHhJfLdN\242\354 \214djhHLHlFnDPDpBr\0L"
"\14+\32lAR\377_\36<\10M$\60\32\244A\230\270\324\364\360 \360@\354BL\202bh\202"
"DH\204d\11\215\210\14\215\15\21\257\244\250\24N!.\32\224A\264\322\360\216B\216b\214d\212f"
"\210H\210h\206j\204l\202N\202\356\320\262T\0O\35\61\26\234\353\360\200\212\315\344\210\254\304l\65"
"\257k'dE&g\250\250\16\10\257\0P\27.\32\204\341\200\346\300BRB\224\227\22\7\26\7\64"
"\302\372\30\0Q$q\326\233\353\360\200\212\315\344\210\254\304l\65\257\353b&\304FD\306l\250\250\16"
"\352.\346\1\346\1\42\0R'/\32\214\341\200\350\300DRDTBTBTBTBR\344\300\344"
"\240FpDRDTBTBTB\264V\0S\37.\26\204\311\354`HlDPDXZ\370@"
"\356@XZ\230\264R\202L\346\200\352\6\0T\15\60\22\204\341\7t\342\372\377\16\0U\22-\32\214"
"A\222\377\227\22r\42S\63\7bE\0V$/\22|a\322rBRdnFNHNhjJ"
"\331\314\234\214\240\214\340\304\244\204\250\204h\355\360\30\0W\63\66\22\264AP\220P\260NnB\214L"
"D\214Ld\310hFHDH\23!\241\221\255D\204D\304D\204D\304\214\354\310\10\311(\5E\5"
"E\5\245\0X!\61\22\214A\272vbrfnj\335\314\344\304l\365t\355\304\344\314\334\324\272\231"
"\311\211\331j\1Y\26\60\22\204A\270tbpfljhnd\322\226Z\134\7Z\30.\22t"
"\343\240\344\240tVvtVvt\255\354\350\254\354\350\301\7[\15\304z;\341`D\377\377\344 \0"
"\134\22'\22<AJLJ\231\224\62)eR\312\244\24]\15\304v;\341 D\377\377\344`\0^"
"\14\211\264]g\252fbBJ\0_\10M\260k\341\203\2`\12\206\264EahJ,\0a\31\214"
"\25l\207\354 H\255\344\324\215\205\310\224\210\230\310\320\314\1I\311\0b\27+\32tAR/j\16"
"&\206&\304\352xf\64q\60!Q\3c\26\213\25d\211\352 dhB\214RS\61\211\241\221\203"
"(\32\0d\27+\26tSo*$\16&\206\314\350\270+\223\30\232\70\230\251\20e\27\214\25t\211"
"\354 fhDLB\360\340[\321\251\221\3\251\32\0f\20&\22\64g\204DH\311A\211\220\376\11"
"\0g\35+vs\247B\342`b\310\214\216\273\62\211\241\211\203\231\12I\25R\42\7B\65\0h\21"
")\32lAN/f\16\42f$\244\370W\2i\12\42\32\64\201\354\340\301\0j\15\304r\63E\271"
"\210\376\237\34H\0k\33*\32dAP\217&dFDf$\206\252\214&f\264\31\21\232\220\222\220"
"\32l\10\42\32\64\341\7\6m!\220\31\244A\202\206\344 \302b\206FBJ\212J\212J\212J\212"
"J\212J\212J\212J\212J\1n\17\211\31lAb\346 bFB\212%o\26\214\25t\307\350"
"`dhb\254\220\303\262\211\241\221\203!\33\0p\30+zsA\242\346`bhB\254\216gF\23"
"\7\23\22\65\222\272\4q\27+vs\247B\342`b\310\214\216\273\62\211\241\211\203\231\12I=r\15"
"\206\31DA\204\342dFH?\2s\25\212\25d\245\350 bHB\220\356\312\216\220\352\240\306\4\0"
"t\16\346\21\64EH\311A\211\220~D\63u\17\211\31lA\212%!\63q\20\63!v\31\213"
"\21\134A\216\256jBJdfF\221\214\320\304\224\204X\335\340\20\0w\42\222\21\224AL\214L\254"
"\210hB\210Hd\304dFD#\21\215L\254\210\310\210\350\304\4\305\204\0x\26\213\21\134A\256j"
"bf\305T\335\340\134\325\304\314\212\251:\1y\36+r[A\216\256jBJdfF\221\214\320\304"
"\224\204X\335\340\240\340\240X\31\35\0z\20\213\21\134\343`\342`n\207s\333\35<\10{\22\306v"
"KIfdFHo\24I)\322\243E\2|\13\342Z\63\341\201\331\301\201\1}\24\306vKAh"
"HJH\257\24\311(\322\33\231\31!\0~\16\213\264u\203\350@\204\344@\210\2\0\0\0\0";
|
#ifndef OPENMC_MESSAGE_PASSING_H
#define OPENMC_MESSAGE_PASSING_H
#ifdef OPENMC_MPI
#include <mpi.h>
#endif
namespace openmc {
namespace mpi {
extern int rank;
extern int n_procs;
extern bool master;
#ifdef OPENMC_MPI
extern MPI_Datatype source_site;
extern MPI_Comm intracomm;
#endif
} // namespace mpi
} // namespace openmc
#endif // OPENMC_MESSAGE_PASSING_H
|
#pragma once
/**
* Copyright (c) blueback
* Released under the MIT License
* https://github.com/bluebackblue/brownie/blob/master/LICENSE.txt
* http://bbbproject.sakura.ne.jp/wordpress/mitlicense
* @brief ファイルハンドル。
*/
/** include
*/
#include "./types.h"
#include "./platform.h"
/** include
*/
#include "./sharedptr.h"
#include "./stlstring.h"
/** NBlib
*/
namespace NBlib
{
/** FileHandle_Impl
*/
class FileHandle_Impl;
/** FileHandle
*/
class FileHandle
{
private:
/** impl
*/
sharedptr<FileHandle_Impl> impl;
public:
/** GetImpl
*/
sharedptr<FileHandle_Impl>& GetImpl();
public:
/** constructor
*/
FileHandle();
/** destructor
*/
nonvirtual ~FileHandle();
public:
/** 読み込みモードで開く。
*/
bool ReadOpen(const STLWString& a_filename);
/** 書き込みモードで開く。
*/
bool WriteOpen(const STLWString& a_filename);
/** 閉じる。
*/
void Close();
/** 読み込み。
*/
bool Read(u8* a_buffer,s64 a_size,s64 a_offset);
/** 書き込み。
*/
bool Write(const u8* a_buffer,s64 a_size,s64 a_offset);
/** ファイルサイズ取得。
*/
s64 GetSize() const;
/** ファイルオープンチェック。
*/
bool IsOpen() const;
/** EOF設定。
*/
void SetEOF(s64 a_offset);
};
}
|
//
// TransactionsViewController.h
// POC_iPhoto
//
// Created by Wang, Jinlian on 7/18/14.
// Copyright (c) 2014 SunnyOrg. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface TransactionsCollectionViewController : UIViewController<UICollectionViewDelegate>
@end
|
/*
* Copyright (C) 2012 Soomla Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#import <UIKit/UIKit.h>
@interface VirtualCurrencyPacksViewController : UIViewController <UITableViewDataSource, UITableViewDelegate>{
@private
UILabel* currencyBalance;
UITableViewController* table;
}
@property (nonatomic, retain) IBOutlet UILabel* currencyBalance;
@property (nonatomic, retain) IBOutlet UITableViewController* table;
- (IBAction)back:(id)sender;
@end
|
//
//////////////////////////////////////////////////////////////////////////////
//
// 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.
//
//////////////////////////////////////////////////////////////////////////////
//
// MODULE: AcGsManager.h
// PURPOSE: Interface of Exported AutoCAD-GS-ARX-DB glue code
//
#ifndef __ACGSMANAGER_H__
#define __ACGSMANAGER_H__
#pragma pack (push, 8)
class AcDbViewportTableRecord;
class AcGiDrawable;
class AcGsClassFactory;
class AcGsView;
class AcGsModel;
class AcGsDevice;
struct AcGsClientViewInfo;
// ****************************************************************************
// AcGsManager
class AcGsManager
{
public:
AcGsManager (void) { }
virtual ~AcGsManager (void) { }
virtual AcGsModel * createAutoCADModel (void) = 0;
virtual AcGsView * createAutoCADViewport (AcDbViewportTableRecord * vp) = 0; // creates a view of {vp, DBmodel}
virtual AcGsView * createAutoCADView (AcGiDrawable * drawable) = 0; // creates a view with {Drawable, DBModel}
// pair selected for viewing, connected to
// AutoCAD's GUI Device
virtual AcGsDevice * createAutoCADDevice (HWND hWnd) = 0;
virtual AcGsDevice * createAutoCADOffScreenDevice() = 0;
virtual void destroyAutoCADModel (AcGsModel * model) = 0;
virtual void destroyAutoCADView (AcGsView * view) = 0;
virtual void destroyAutoCADDevice (AcGsDevice * device) = 0;
virtual AcGsClassFactory * getGSClassFactory (void) = 0;
virtual AcGsModel * getDBModel (void) = 0;
virtual AcGsDevice * getGUIDevice (void) = 0;
Adesk::ULongPtr viewportIdFromClientInfo (const AcGsClientViewInfo& info) const;
Adesk::Int16 acadWindowIdFromClientInfo (const AcGsClientViewInfo& info) const;
AcDbObjectId viewportObjectIdFromClientInfo (const AcGsClientViewInfo& info) const;
};
#pragma pack (pop)
#endif // __ACGSMANAGER_H__
|
//
// ViewController.h
// TwitterModelExample
//
// Created by Yu Sugawara on 4/17/15.
// Copyright (c) 2015 Yu Sugawara. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface ViewController : UIViewController
@end
|
//
// Generated by class-dump 3.5 (64 bit).
//
// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
//
#import "NSObject.h"
@class NSObject<OS_dispatch_source>;
@interface NotMainQueueTimer : NSObject
{
NSObject<OS_dispatch_source> *m_timerSource;
id <NotMainQueueTimerDelegate> _m_delegate;
}
@property(nonatomic) __weak id <NotMainQueueTimerDelegate> m_delegate; // @synthesize m_delegate=_m_delegate;
@property(retain, nonatomic) NSObject<OS_dispatch_source> *m_timerSource; // @synthesize m_timerSource;
- (void).cxx_destruct;
- (void)dealloc;
- (void)stop;
- (id)initWithDelegate:(id)arg1 interval:(float)arg2 delay:(float)arg3;
@end
|
//
// openGLRender.h
// Ray Marcher
//
// Created by Victor Gafiatulin on 10/04/14.
// Copyright (c) 2014 Victor Gafiatulin. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <GLKit/GLKMath.h>
@interface openGLRender : NSObject {
@public
bool setupDone;
struct {
GLint resolution;
GLint globalTime;
GLint camP;
GLint camD;
GLint camR;
} uniforms;
}
- (void)startup;
- (void)render;
- (void)shutdown;
@end
|
/*
* Copyright (c) 2005 Aleksander B. Demko
* This source code is distributed under the MIT license.
* See the accompanying file LICENSE.MIT.txt for details.
*/
#ifndef __INCLUDED_HYDRA_HASH_H__
#define __INCLUDED_HYDRA_HASH_H__
#include <QString>
namespace hydra {
/**
* Calculates the has of the given file.
*
* @return The hash of the file (in ascii form) or an empty string on error.
* @author Aleksander Demko
*/
QString calcFileHash(const QString &filename);
} // namespace hydra
#endif
|
#ifndef EUROCOINAMOUNTFIELD_H
#define EUROCOINAMOUNTFIELD_H
#include <QWidget>
QT_BEGIN_NAMESPACE
class QDoubleSpinBox;
class QValueComboBox;
QT_END_NAMESPACE
/** Widget for entering eurocoin amounts.
*/
class EurocoinAmountField: public QWidget
{
Q_OBJECT
Q_PROPERTY(qint64 value READ value WRITE setValue NOTIFY textChanged USER true)
public:
explicit EurocoinAmountField(QWidget *parent = 0);
qint64 value(bool *valid=0) const;
void setValue(qint64 value);
/** Mark current value as invalid in UI. */
void setValid(bool valid);
/** Perform input validation, mark field as invalid if entered value is not valid. */
bool validate();
/** Change unit used to display amount. */
void setDisplayUnit(int unit);
/** Make field empty and ready for new input. */
void clear();
/** Qt messes up the tab chain by default in some cases (issue https://bugreports.qt-project.org/browse/QTBUG-10907),
in these cases we have to set it up manually.
*/
QWidget *setupTabChain(QWidget *prev);
signals:
void textChanged();
protected:
/** Intercept focus-in event and ',' key presses */
bool eventFilter(QObject *object, QEvent *event);
private:
QDoubleSpinBox *amount;
QValueComboBox *unit;
int currentUnit;
void setText(const QString &text);
QString text() const;
private slots:
void unitChanged(int idx);
};
#endif // EUROCOINAMOUNTFIELD_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-Protocol.h"
@protocol SBWindowContextHostManagerDelegate <NSObject>
@optional
- (_Bool)windowContextHostManager:(id)arg1 shouldEnableContextHostingForRequester:(id)arg2 priority:(int)arg3;
- (id)windowContextHostManager:(id)arg1 overrideRequester:(id)arg2;
@end
|
#pragma once
#include <eigen3/Eigen/Eigen>
class Biquad
{
public:
Biquad(void);
Biquad(Eigen::Matrix<double, 5, 1> coeffs);
~Biquad(void);
// Methods
Eigen::VectorXd process(const Eigen::VectorXd &x, int n);
Eigen::Matrix<double, 5, 1> coeffs();
private:
double a0, a1, a2;
double b1, b2;
};
|
static inline uintptr_t __get_tp()
{
return __syscall(SYS_get_thread_area);
}
#define TLS_ABOVE_TP
#define GAP_ABOVE_TP 0
#define TP_OFFSET 0x7000
#define DTP_OFFSET 0x8000
#define MC_PC gregs[R_PC]
|
//
// CBUITabView.h
// CBUIKit
//
// Created by Christian Beer on 28.12.10.
// Copyright 2010 Christian Beer. All rights reserved.
//
#import <UIKit/UIKit.h>
@class CBUITabView;
typedef NS_ENUM(NSInteger, CBUITabState) {
CBUITabStateDisabled = -1,
CBUITabStateNormal = 0,
CBUITabStateActive = 1,
} ;
@protocol CBUITabViewDelegate <NSObject>
- (void) tabView:(CBUITabView*)tabView didSelectTabWithIndex:(int)index;
@end
@protocol CBUITabViewStyle <NSObject>
- (void) drawTabInTabView:(CBUITabView*)tabView context:(CGContextRef)ctx rect:(CGRect)rect title:(NSString*)title state:(CBUITabState)state;
@end
@interface CBUITabView : UIView <CBUITabViewStyle> {
NSArray *tabTitles;
int currentTabIndex;
id<CBUITabViewDelegate> __weak delegate;
id<CBUITabViewStyle> style;
}
@property (nonatomic, copy) NSArray *tabTitles;
@property (nonatomic, assign) int currentTabIndex;
@property (nonatomic, weak) id<CBUITabViewDelegate> delegate;
@property (nonatomic, strong) id<CBUITabViewStyle> style;
- (instancetype) initWithFrame:(CGRect)frame;
- (instancetype) initWithFrame:(CGRect)frame titles:(NSArray*)titles;
- (void) setCurrentTabIndex:(int)aCurrentTabIndex animated:(BOOL)animated;
@end
|
/*
* Ising Model in two dimensions, on a rectangular grid, with periodic boundary conditions
*
* Inspired by: http://www.physics.buffalo.edu/phy411-506-2004/Topic3/topic3-lec3.pdf
*/
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include "ising_datastructure.h"
#include "ising.h"
#include "matrixmem.h"
void precompute_boltzmann_factors (struct ising *model)
{
double t = model->T;
double j = model->J;
double h = model->H;
for (int i = -12; i <= 12; i += 4)
{
model->w[i + 12][0] = exp (-(i * j + 2 * h) / t);
model->w[i + 12][2] = exp (-(i * j - 2 * h) / t);
}
}
int ising_init (struct ising *model, int lx, int ly, double jc, double h, double t)
{
model->J = jc; // ferromagnetic coupling
model->T = t; // temperature
model->H = h; // magnetic field
model->Lx = lx; // number of spins in x direction
model->Ly = ly; // number of spins in y direction
model->N = lx * ly; // number of spins
model->steps = 0; // steps so far
/* allocate random number generator */
gsl_rng *r = gsl_rng_alloc(gsl_rng_taus2);
model->r = r;
/* seed the random number generator */
unsigned long seed = 1UL;
gsl_rng_set(r, seed);
model->seed = seed;
model->cluster = NULL;
int **s = matrix_allocate_int (lx, ly);
if (s == NULL)
{
return -1;
}
model->s = s;
for (int i = 0; i < lx; i++)
{
for (int j = 0; j < ly; j++)
{
//s[i][j] = (gsl_rng_uniform(r) < 0.5) ? 1 : -1; // hot start
s[i][j] = 1; // cold start
}
}
precompute_boltzmann_factors (model);
return 0;
}
void ising_reinit (struct ising *model, double h, double t)
{
model->T = t; // temperature
model->H = h; // magnetic field
precompute_boltzmann_factors (model);
}
void ising_free (struct ising model)
{
if (model.cluster != NULL)
{
matrix_free (model.cluster);
}
matrix_free (model.s);
gsl_rng_free (model.r);
}
double magnetization_per_spin (struct ising *model)
{
int sum = 0;
int **s = model->s;
int lx = model->Lx;
int ly = model->Ly;
for (int i = 0; i < lx; i++)
{
for (int j = 0; j < ly; j++)
{
sum += s[i][j];
}
}
return sum / ((double) model->N);
}
double energy_per_spin (struct ising *model)
{
int sum = 0, ssum = 0;
int **s = model->s;
int lx = model->Lx;
int ly = model->Ly;
for (int i = 0; i < lx; i++)
{
for (int j = 0; j < ly; j++)
{
sum += s[i][j];
int inext = (i == lx - 1) ? 0 : i + 1;
int jnext = (j == ly - 1) ? 0 : j + 1;
int iprev = (i == 0) ? lx - 1 : i - 1;
//int jprev = (j == 0) ? ly - 1 : j - 1;
ssum += s[i][j] * (s[inext][j] + s[i][jnext] + s[iprev][jnext]);
}
}
return -(model->J * ssum + model->H * sum) / model->N;
}
|
//
// UITableViewCell+FeedCell.h
// CoinTelegraph
//
// Created by Chris on 7/5/14.
// Copyright (c) 2014 GigaBitcoin, LLC. All rights reserved.
//
///////////////////////////////////////////////////////////////////////////////////////////////////
#pragma mark - UITableViewCell+FeedCell Category Interface
@interface UITableViewCell ( FeedCell )
- ( void )setImageWithUrl:( NSURL* )url;
- ( void )setLabelWithString:( NSString* )string;
@end
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.