text stringlengths 4 6.14k |
|---|
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE_GO file.
int
Add(int x, int y, int *sum)
{
sum = x+y;
}
|
/*
Copyright 2013-2021 Paul Colby
This file is part of QtAws.
QtAws is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
QtAws is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with the QtAws. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef QTAWS_TERMINATETARGETINSTANCESRESPONSE_H
#define QTAWS_TERMINATETARGETINSTANCESRESPONSE_H
#include "mgnresponse.h"
#include "terminatetargetinstancesrequest.h"
namespace QtAws {
namespace mgn {
class TerminateTargetInstancesResponsePrivate;
class QTAWSMGN_EXPORT TerminateTargetInstancesResponse : public mgnResponse {
Q_OBJECT
public:
TerminateTargetInstancesResponse(const TerminateTargetInstancesRequest &request, QNetworkReply * const reply, QObject * const parent = 0);
virtual const TerminateTargetInstancesRequest * request() const Q_DECL_OVERRIDE;
protected slots:
virtual void parseSuccess(QIODevice &response) Q_DECL_OVERRIDE;
private:
Q_DECLARE_PRIVATE(TerminateTargetInstancesResponse)
Q_DISABLE_COPY(TerminateTargetInstancesResponse)
};
} // namespace mgn
} // namespace QtAws
#endif
|
#include <linux/linkage.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/slab.h>
#include <linux/rcupdate.h>
asmlinkage long sys_mysyscall(char* user_buf, unsigned int pid)
{
struct task_struct* task;
char* buf;
long num = 0;
rcu_read_lock();
//for_each_process(task)
// printk(KERN_EMERG "%ld", task->state);
task = &init_task;
while((task->pid != pid) && (next_task(task) != &init_task))
task = next_task(task);
num = strlen(task->comm);
if(task->pid == pid) {
buf = kmalloc(16, GFP_KERNEL);
buf = strncpy(buf, task->comm, num);
buf[num] = 0;
copy_to_user(user_buf, buf, num+1);
kfree(buf);
} else
return 3;
rcu_read_unlock();
return 0;
}
|
#ifndef ZPUBLIC_DESIGN_STRATEGY
#define ZPUBLIC_DESIGN_STRATEGY
namespace zl
{
namespace Design
{
class Strategy
{
};
}
}
#endif |
#ifndef SESSION_MANAGER_H_
#define SESSION_MANAGER_H_
#include <common.h>
#include <object_pool.hpp>
#include <manager.h>
#include "game_session.h"
class SessionPool
: public Venus::Singleton<SessionPool>
{
public:
~SessionPool()
{
}
GameSession* acquire(const uint64& session_id)
{
return _sessionPool.acquire(session_id);
}
void release(GameSession* session)
{
_sessionPool.release(session);
}
private:
Venus::ObjectPool<GameSession> _sessionPool;
};
class GameSessionManager
: public Venus::ObjectManager<uint64, GameSession>
{
public:
bool init()
{
}
void destroy()
{
}
};
#endif |
#pragma once
class DefaultMsgHandler : public IMsgHandler
{
public:
DefaultMsgHandler(void);
virtual ~DefaultMsgHandler(void);
virtual bool HandleMsg(DWORD dwMsgID, MsgStruct* pMsgStruct);
};
class SingleMsgHandler : public IMsgHandler
{
public:
SingleMsgHandler(void);
virtual ~SingleMsgHandler(void);
virtual bool HandleMsg(DWORD dwMsgID, MsgStruct* pMsgStruct);
private:
static DefaultMsgHandler m_DefaultHandler;
};
//×éºÏÏûϢ·ÓÉÀà,¸ºÔðÏûÏ¢µÄ·Ö·¢
class CompositeMsgHandler : public SingleMsgHandler
{
public:
CompositeMsgHandler(void);
virtual ~CompositeMsgHandler(void);
virtual void AddHandler(IMsgHandler* pHandler);
virtual void RemoveHandler(IMsgHandler* pHandler);
virtual bool HandleMsg(DWORD dwMsgID, MsgStruct* pMsgStruct);
protected:
std::list<IMsgHandler*> m_HandlerList;
}; |
#pragma once
extern int master_sent;
void startup(void);
void cpu_request_interrupt(uint8_t type);
int cpu_exec(int cycles);
int cpu_disas_one(uint16_t pc);
#define INT_VBLANK 0x1
#define INT_LCDSTAT 0x2
#define INT_TIMER 0x4
#define INT_SERIAL 0x8
#define INT_JOYPAD 0x10
|
#include <stdio.h>
#include <string.h>
#include <generics/priority_queue.h>
int priority_string(void* a, void* b, void* arg)
{
(void)arg;
char* str_a = *(char**)a;
char* str_b = *(char**)b;
int res = strcmp(str_a, str_b);
if(res == 0)
return G_PQUEUE_EQUAL_PRIORITY;
else if(res < 0)
return G_PQUEUE_FIRST_PRIORITY;
else
return G_PQUEUE_SECOND_PRIORITY;
}
int main()
{
char* str[] = { "yudi", "barbara", "boris", "raul", "tiago", "tutu", "pedrita"};
size_t len = sizeof(str)/sizeof(char*);
priority_queue_t p;
pqueue_create(&p, sizeof(char*));
pqueue_set_compare_function(&p, priority_string, NULL);
size_t i;
for ( i = 0; i<len ; i++ ){
pqueue_add(&p, &str[i]);
printf("add: %s\n", str[i]);
}
for ( i = 0; i<len ; i++ ){
char* temp;
pqueue_extract(&p, &temp);
printf("extracted: %s\n",temp);
}
pqueue_destroy(&p);
return 0;
}
|
#include <time.h>
#include <stdlib.h>
#include <stdio.h>
/*
!!!!!!!!!!!! D A F A R E !!!!!!!!!!!!
sx e dx sono le posizioni del primo e dell'ultimo elemento dell'array mentre
px è la posizione dell'elemento perno.
La funzione deve restituire la posizione del perno dopo che gli elementi sono
stati partizionati.
*/
int distribuzione(int a[], int sx, int px, int dx) {
int pivot = a[px];
int i = sx - 1, j, tmp;
tmp = a[dx];
a[dx] = a[px];
a[px] = tmp;
px = dx;
for (j = sx; j < dx; j++) {
if (a[j] <= pivot) {
i++;
tmp = a[j];
a[j] = a[i];
a[i] = tmp;
}
}
i++;
tmp = a[i];
a[i] = pivot;
a[px] = tmp;
return i;
}
void quicksort(int a[], int sx, int dx) {
int perno, pivot;
if (sx < dx) {
/* DA IMPLEMENTARE: scelta del pivot. Scegliere una posizione a caso tra sx e dx inclusi. */
pivot = (rand() % (dx - sx + 1)) + sx;
perno = distribuzione(a, sx, pivot, dx); /* separa gli elementi minori di a[pivot]
da quelli maggiori o uguali */
/* Ordina ricorsivamente le due metà */
quicksort(a, sx, perno - 1);
quicksort(a, perno + 1, dx);
}
}
/* Lettura di un array di interi da input.
Il primo elemento è la lunghezza dell'array */
int legge(int **a, int *len) {
int i;
scanf("%d", len);
if (*len <= 0) return 1;
*a = (int *)malloc(*len * sizeof(int));
if (*a == NULL) return 1;
for (i = 0; i < *len; i++)
scanf("%d", (*a) + i);
return 0;
}
int main() {
int i, n, *A;
if (legge(&A, &n)) return 1;
srand(time(NULL));
quicksort(A, 0, n - 1);
/* Stampa l'array ordinato */
for (i = 0; i < n; i++)
printf("%d ", A[i]);
scanf("%d", &n);
return 0;
}
|
#ifdef E_TYPEDEFS
typedef struct _E_Configure_Cat E_Configure_Cat;
typedef struct _E_Configure_It E_Configure_It;
#else
#ifndef E_CONFIGURE_H
#define E_CONFIGURE_H
struct _E_Configure_Cat
{
const char *cat;
int pri;
const char *label;
const char *icon_file;
const char *icon;
Eina_List *items;
};
struct _E_Configure_It
{
const char *item;
int pri;
const char *label;
const char *icon_file;
const char *icon;
const char *params;
E_Config_Dialog *(*func) (E_Comp *c, const char *params);
void (*generic_func) (E_Comp *c, const char *params);
Efreet_Desktop *desktop;
};
EAPI void e_configure_registry_item_add(const char *path, int pri, const char *label, const char *icon_file, const char *icon, E_Config_Dialog *(*func) (E_Comp *c, const char *params));
EAPI void e_configure_registry_item_params_add(const char *path, int pri, const char *label, const char *icon_file, const char *icon, E_Config_Dialog *(*func) (E_Comp *c, const char *params), const char *params);
EAPI void e_configure_registry_generic_item_add(const char *path, int pri, const char *label, const char *icon_file, const char *icon, void (*generic_func) (E_Comp *c, const char *params));
EAPI void e_configure_registry_item_del(const char *path);
EAPI void e_configure_registry_category_add(const char *path, int pri, const char *label, const char *icon_file, const char *icon);
EAPI void e_configure_registry_category_del(const char *path);
EAPI void e_configure_registry_call(const char *path, E_Comp *c, const char *params);
EAPI int e_configure_registry_exists(const char *path);
EAPI void e_configure_registry_custom_desktop_exec_callback_set(void (*func) (const void *data, E_Comp *c, const char *params, Efreet_Desktop *desktop), const void *data);
EINTERN void e_configure_init(void);
extern EAPI Eina_List *e_configure_registry;
#endif
#endif
|
/**
* @file sample2_attach.c
* @brief Peek the event/signals sent to the process
* @author Barakat S. 2013 <b4r4k47@hotmail.com>
*/
#include "common.h"
int
main(int argc, char **argv)
{
const char *const target = "./target/target2";
char * const args[] = {NULL};
pid_t pid;
int status;
int just_loaded;
/* fork to create a child process */
switch( fork() ) {
case -1:
perror("Error");
return -1;
case 0:
/* child process, trace it and create a new process of the target */
_check_if_not_fail("ptrace", ptrace(PTRACE_TRACEME, 0, NULL, NULL) );
_check_if_not_fail("execvp", execvp(target, args) );
_exit(0);
}
just_loaded = 1;
/* debugger main events loop */
do {
/* block and wait for an event to be sent to the target process */
pid = waitpid(-1, &status, 0); /* equivalents to wait(&status) */
if( WIFEXITED(status) ) {
printf("log: process %ld exit normally with exit status %d\n", (long) pid, WEXITSTATUS(status));
}
else if( WIFSIGNALED(status) ) {
printf("log: process %ld received %s termination signal\n", (long) pid, strsignal(WTERMSIG(status)));
}
else if( WIFSTOPPED(status) ) {
switch( WSTOPSIG(status) ) {
case SIGSTOP:
/* handle SIGSTOP */
break;
case SIGTRAP:
/* handle SIGTRAP: target loading with exec* or breakpoints */
if( just_loaded ) {
printf("log: process %ld is just loaded into the debugger\n", (long) pid);
just_loaded = 0;
} else {
printf("log: process %ld hit a breakpoint\n", (long) pid);
}
break;
case SIGFPE:
/* handle SIGFPE: arithmetic errors */
printf("log: process %ld had an arithmetic error\n", (long) pid);
break;
case SIGSEGV:
/* handle SIGSEGV: memory invalid access errors */
printf("log: process %ld had a memory invalid access\n", (long) pid);
break;
case SIGILL:
/* handle SIGILL: invalid instructions */
printf("log: process %ld attempt to execute invalid instructions\n", (long) pid);
break;
/* more events and signals */
default:
printf("log: process %ld received %s\n", (long) pid, strsignal(WSTOPSIG(status)));
}
/* continue the process */
ptrace(PTRACE_CONT, pid, NULL, NULL);
}
else if( WIFCONTINUED(status) ) {
printf("log: process %ld continued\n", (long) pid);
}
/* stop debugging when the target exit or receives termination signal */
} while( !WIFEXITED(status) && !WIFSIGNALED(status) );
return 0;
}
|
#ifndef INCLUDED_flixel_util_FlxMath
#define INCLUDED_flixel_util_FlxMath
#ifndef HXCPP_H
#include <hxcpp.h>
#endif
HX_DECLARE_CLASS1(flixel,FlxBasic)
HX_DECLARE_CLASS1(flixel,FlxObject)
HX_DECLARE_CLASS1(flixel,FlxSprite)
HX_DECLARE_CLASS3(flixel,input,touch,FlxTouch)
HX_DECLARE_CLASS2(flixel,interfaces,IFlxDestroyable)
HX_DECLARE_CLASS2(flixel,interfaces,IFlxPooled)
HX_DECLARE_CLASS2(flixel,util,FlxMath)
HX_DECLARE_CLASS2(flixel,util,FlxPoint)
HX_DECLARE_CLASS2(flixel,util,FlxRect)
HX_DECLARE_CLASS3(openfl,_v2,geom,Rectangle)
namespace flixel{
namespace util{
class HXCPP_CLASS_ATTRIBUTES FlxMath_obj : public hx::Object{
public:
typedef hx::Object super;
typedef FlxMath_obj OBJ_;
FlxMath_obj();
Void __construct();
public:
inline void *operator new( size_t inSize, bool inContainer=false)
{ return hx::Object::operator new(inSize,inContainer); }
static hx::ObjectPtr< FlxMath_obj > __new();
static Dynamic __CreateEmpty();
static Dynamic __Create(hx::DynamicArray inArgs);
//~FlxMath_obj();
HX_DO_RTTI;
static void __boot();
static void __register();
::String __ToString() const { return HX_CSTRING("FlxMath"); }
static Float MIN_VALUE;
static Float MAX_VALUE;
static Float SQUARE_ROOT_OF_TWO;
static Float roundDecimal( Float Value,int Precision);
static Dynamic roundDecimal_dyn();
static Float bound( Float Value,Float Min,Float Max);
static Dynamic bound_dyn();
static Float lerp( Float Min,Float Max,Float Ratio);
static Dynamic lerp_dyn();
static bool inBounds( Float Value,Float Min,Float Max);
static Dynamic inBounds_dyn();
static bool isOdd( Float n);
static Dynamic isOdd_dyn();
static bool isEven( Float n);
static Dynamic isEven_dyn();
static int numericComparison( Float num1,Float num2);
static Dynamic numericComparison_dyn();
static bool pointInCoordinates( Float pointX,Float pointY,Float rectX,Float rectY,Float rectWidth,Float rectHeight);
static Dynamic pointInCoordinates_dyn();
static bool pointInFlxRect( Float pointX,Float pointY,::flixel::util::FlxRect rect);
static Dynamic pointInFlxRect_dyn();
static bool mouseInFlxRect( bool useWorldCoords,::flixel::util::FlxRect rect);
static Dynamic mouseInFlxRect_dyn();
static bool pointInRectangle( Float pointX,Float pointY,::openfl::_v2::geom::Rectangle rect);
static Dynamic pointInRectangle_dyn();
static int maxAdd( int value,int amount,int max,hx::Null< int > min);
static Dynamic maxAdd_dyn();
static int wrapValue( int value,int amount,int max);
static Dynamic wrapValue_dyn();
static Float dotProduct( Float ax,Float ay,Float bx,Float by);
static Dynamic dotProduct_dyn();
static Float vectorLength( Float dx,Float dy);
static Dynamic vectorLength_dyn();
static Float getDistance( ::flixel::util::FlxPoint Point1,::flixel::util::FlxPoint Point2);
static Dynamic getDistance_dyn();
static int distanceBetween( ::flixel::FlxSprite SpriteA,::flixel::FlxSprite SpriteB);
static Dynamic distanceBetween_dyn();
static bool isDistanceWithin( ::flixel::FlxSprite SpriteA,::flixel::FlxSprite SpriteB,Float Distance,hx::Null< bool > IncludeEqual);
static Dynamic isDistanceWithin_dyn();
static int distanceToPoint( ::flixel::FlxSprite Sprite,::flixel::util::FlxPoint Target);
static Dynamic distanceToPoint_dyn();
static bool isDistanceToPointWithin( ::flixel::FlxSprite Sprite,::flixel::util::FlxPoint Target,Float Distance,hx::Null< bool > IncludeEqual);
static Dynamic isDistanceToPointWithin_dyn();
static int distanceToMouse( ::flixel::FlxSprite Sprite);
static Dynamic distanceToMouse_dyn();
static bool isDistanceToMouseWithin( ::flixel::FlxSprite Sprite,Float Distance,hx::Null< bool > IncludeEqual);
static Dynamic isDistanceToMouseWithin_dyn();
static int distanceToTouch( ::flixel::FlxSprite Sprite,::flixel::input::touch::FlxTouch Touch);
static Dynamic distanceToTouch_dyn();
static bool isDistanceToTouchWithin( ::flixel::FlxSprite Sprite,::flixel::input::touch::FlxTouch Touch,Float Distance,hx::Null< bool > IncludeEqual);
static Dynamic isDistanceToTouchWithin_dyn();
static int getDecimals( Float Number);
static Dynamic getDecimals_dyn();
static bool equal( Float aValueA,Float aValueB,hx::Null< Float > aDiff);
static Dynamic equal_dyn();
static int signOf( Float f);
static Dynamic signOf_dyn();
static bool sameSign( Float f1,Float f2);
static Dynamic sameSign_dyn();
};
} // end namespace flixel
} // end namespace util
#endif /* INCLUDED_flixel_util_FlxMath */
|
#ifndef FLATFILE_H_INCLUDED
#define FLATFILE_H_INCLUDED
#include <stdbool.h>
char const* flatfile_version(void);
/**
* schema functions
*/
unsigned long schema2_create(void);
int schema2_len(unsigned int schema_handle);
void schema2_destroy(unsigned int schema_handle);
int schema2_add_column(unsigned long schema_handle, char const* name,
char const* ctype, _Bool nullable);
int schema2_get_column_name(unsigned int schema_handle, int index, char* buf);
int schema2_get_column_type(unsigned int schema_handle, int index, char* buf);
bool schema2_get_column_nullable(unsigned int schema_handle, int index);
/**
* write functions
*/
unsigned int writef_create(char const* filename, unsigned long schema_handle);
int writef_open(char const* filename);
void writef_close(unsigned int handle);
int writef_get_schema(int handle);
void writef_row_start(unsigned int handle);
void writef_row_set_u32(unsigned int handle, unsigned int index,
unsigned int value);
void writef_row_set_u64(unsigned int handle, unsigned int index,
unsigned long value);
void writef_row_set_string(unsigned int handle, unsigned int index,
char const* s);
bool writef_row_end(unsigned int handle);
bool writef_flush(unsigned int handle);
unsigned long readf_row_get_string_len(unsigned int fhandle,
unsigned int index);
unsigned long readf_row_get_string(unsigned int fhandle, unsigned int index,
void* out, unsigned long size);
unsigned long readf_row_get_u64(unsigned int fhandle, unsigned int index);
unsigned int readf_row_get_u32(unsigned int fhandle, unsigned int index);
unsigned int readf_row_is_null(unsigned int fhandle, unsigned int index);
unsigned int readf_row_start(unsigned int fhandle);
void readf_close(unsigned int fhandle);
void readf_row_end(unsigned int fhandle);
int readf_open(char const* name);
int readf_open_relation(char const* name, char const* reldef);
unsigned int readf_clone_schema(unsigned int fhandle);
#endif // FLATFILE_H_INCLUDED
|
/* This is free and unencumbered software released into the public domain. */
#include <assert.h> /* for assert() */
#include <stdio.h> /* for printf() */
#include <stdlib.h> /* for EXIT_SUCCESS */
#include <cpr/error.h>
////////////////////////////////////////////////////////////////////////////////
int
main(void) {
return EXIT_SUCCESS; // TODO
}
|
#include "eio.h"
#include <errno.h>
// Tests parsing ints mmap-style.
// The ints are also printed using printf -- this way we can easily
// compare this test with other ways of doing int-parsing-io.
int main(int argc, char** argv) {
struct eio_mmap_t in = eio_mmap_istream(stdin, 0, 0); // MUST be reg.file
assert(eio_mmap_check(in));
char *c = in.v;
char *end = in.v + in.len;
while (c < end) {
long long unsigned int x = eio_parse_llu(&c, end);
++c; // '\n'
printf("%llu\n", x);
}
eio_munmap(in);
return 0;
}
|
////////////////////////////////////////////////////////
/// (c) 2014. My-Classes.com
/// Basic version of fusing the ZMQ raw ROUTER (frontend) socket and NanoMsg REQ-REP (backend) sockets.
///
/// Read More at:
/// http://my-classes.com/2014/04/26/combining-zeromq-and-nanomsg-for-serving-web-requests/
///
///////////////////////////////////////////////////////
#include "czmq.h"
#include "nn.h"
#include "reqrep.h"
#define WORKER_SOCKET_ADDRESS "inproc://test"
void* nano_worker(void* args)
{
int rc;
int workerSock;
char request[4096];
char response[] = "HTTP / 1.0 200 OK\r\nContent - Type: text / plain\r\n\r\nHello World!!";
int nResponseLen = strlen(response);
workerSock = nn_socket(AF_SP, NN_REP);
assert(workerSock >= 0);
nn_bind(workerSock, WORKER_SOCKET_ADDRESS);
int i = 0;
while (1)
{
rc = nn_recv(workerSock, request, sizeof (request), 0);
assert(rc >= 0);
rc = nn_send(workerSock, response, nResponseLen+1, 0);
assert(rc >= 0);
}
}
int main(void)
{
zctx_t *ctx = zctx_new();
void *router = zsocket_new(ctx, ZMQ_ROUTER);
zsocket_set_router_raw(router, 1);
zsocket_set_sndhwm(router, 0);
zsocket_set_rcvhwm(router, 0);
int rc = zsocket_bind(router, "tcp://*:8080");
assert(rc != -1);
zthread_new(nano_worker, NULL);
int sock = nn_socket(AF_SP, NN_REQ);
assert(sock >= 0);
assert(nn_connect(sock, WORKER_SOCKET_ADDRESS) >= 0);
while (true)
{
// Get HTTP request
zframe_t *identity = zframe_recv(router);
if (!identity) break; // Ctrl-C interrupt
char *request = zstr_recv(router);
{
// forward the http-request to NanoMsg
int bytes = nn_send(sock, request, strlen(request), 0);
assert(bytes >= 0);
}
free(request); // free the memory
// read the response from NanoMsg worker
char* response = NULL;
int bytes = nn_recv(sock, &response, NN_MSG, 0);
assert(bytes >= 0);
{
// Send response to client/browser
zframe_send(&identity, router, ZFRAME_MORE + ZFRAME_REUSE);
zstr_send(router, response);
// Close connection to browser
zframe_send(&identity, router, ZFRAME_MORE);
zmq_send(router, NULL, 0, 0);
}
nn_freemsg(response); // free the memory
}
zctx_destroy(&ctx);
return 0;
}
|
#include <stdio.h>
void* memcpy_caller(void* dst, const void* src, size_t n);
void* memmove_caller(void* dst, const void* src, size_t n);
void* memset_caller(void* dst, int c, size_t n);
int main(int argc, char** argv) {
const size_t N = 256;
char buf[N];
for (size_t i = 0; i < N; ++i) {
buf[i] = i;
}
memmove_caller(&buf[4], &buf[0], 0);
//memmove_caller(&buf[1], &buf[5], 0);
for (size_t i = 0; i < 30; ++i) {
printf("0x%x ", buf[i]);
}
printf("\n");
return 0;
}
|
//
// VoiceTableViewCell.h
// BuDeiJie
//
// Created by QIUGUI on 2017/9/8.
// Copyright © 2017年 邱九. All rights reserved.
//
#import "TopicTableViewCell.h"
#import "VoiceView.h"
@class VoiceTableViewCell;
@protocol VoiceTableViewCellDelegate <NSObject>
/**音频**/
- (void)voicePlayerWithIndexPath:(UIButton *)sends;
/**视频**/
- (void)videoPlayerWithIndexPath:(UIButton*)sends;
/**进度**/
//- (void)voicePlayerUpdateProgressWithSlider:(UISlider *)slider cell:(VoiceTableViewCell *)cell;
@end
@interface VoiceTableViewCell : TopicTableViewCell
@property(nonatomic,strong) EssenceModelF *modf;
/** <#class#>*/
@property(nonatomic,strong) VoiceView *image1;
@property (nonatomic,assign) NSInteger indexPath;
@property (nonatomic,weak) id<VoiceTableViewCellDelegate> delegate;
@end
|
#ifndef ARK_GRAPHICS_IMPL_FRAME_LABEL_H_
#define ARK_GRAPHICS_IMPL_FRAME_LABEL_H_
#include "core/inf/builder.h"
#include "core/types/safe_ptr.h"
#include "core/types/shared_ptr.h"
#include "graphics/forwarding.h"
#include "graphics/inf/block.h"
#include "graphics/inf/renderer.h"
#include "renderer/forwarding.h"
namespace ark {
class Label : public Renderer, public Block {
public:
Label(const sp<Characters>& characters);
virtual void render(RenderRequest& renderRequest, const V3& position) override;
virtual const sp<Size>& size() override;
// [[plugin::builder("label")]]
class BUILDER : public Builder<Renderer> {
public:
BUILDER(BeanFactory& factory, const document& manifest);
virtual sp<Renderer> build(const Scope& args) override;
private:
sp<Builder<Characters>> _characters;
SafePtr<Builder<String>> _text;
};
private:
sp<Characters> _characters;
};
}
#endif
|
/*
*
* Copyright (c) 2016-2018 Nest Labs, Inc.
* All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* Description:
* This file defines the interface for the radio (OpenThread) diagnostics
* functions.
*/
#ifndef __NLPLATFORMDIAGS_H__
#define __NLPLATFORMDIAGS_H__
#include <openthread/types.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
* Process the platform specific radio diagnostics features.
*
* @param[in] aInstance The context needed when invoking other otPlatRadio APIs.
* @param[in] argc The argument counter of diagnostics command line.
* @param[in] argv The argument vector of diagnostics command line.
* @param[out] aOutput The diagnostics execution result.
* @param[in] aOutputMaxLen The output buffer size.
*/
void nlplatform_diags(otInstance *aInstance, int argc, char *argv[], char *aOutput, size_t aOutputMaxLen);
/**
* Process the platform specific radio diagnostics alarm
*
* @param[in] aInstance The context needed when invoking other otPlatRadio APIs
*/
void nlplatform_diags_alarm(otInstance *aInstance);
#ifdef __cplusplus
}
#endif
#endif /* __NLPLATFORMDIAGS_H__ */
|
#ifndef __ZCC_H__
#define __ZCC_H__
/* The max number of operands per operator: */
#define MAX_ARG 4
/* Max size of an identifier */
#define IDENT_LEN 32
extern int yylineno;
struct VARIABLE;
typedef enum {
NAME_SPACE_LABEL,
NAME_SPACE_VARIABLE
} SPACE;
typedef enum {
SCOPE_GLOBAL,
SCOPE_FUNCTION,
SCOPE_LOCAL
} SCOPE_TYPE;
typedef struct {
unsigned int type : 31; /* INT, CHAR, ... */
unsigned int is_signed : 1;
} TYPE;
typedef enum {
DECL_BASIC_TYPE,
DECL_POINTER,
DECL_ARRAY,
DECL_FUNCTION
} DECL_TYPE;
typedef struct DECL {
DECL_TYPE decl_type;
union {
TYPE type; /* DECL_BASIC_TYPE */
int length; /* DECL_ARRAY */
struct VARIABLE *args; /* DECL_FUNCTION */
} data;
struct DECL *next;
} DECL;
typedef struct VARIABLE {
int storage_class; /* STATIC, EXTERN, ... */
DECL *decl, **last_decl;
char *name;
int offset; /* From frame pointer */
int declared;
int defined;
SPACE space;
SCOPE_TYPE scope;
struct VARIABLE *next;
} VARIABLE;
typedef struct NODE {
int op;
int line;
union {
int detail;
int value;
char *address;
VARIABLE *var;
} data;
DECL *decl;
int numargs;
struct NODE *arg[MAX_ARG];
int lhs : 1;
int tagged : 1;
} NODE;
extern int unsupported;
void output_start(char *outfilename);
void output_function(char *name, NODE *node);
void output_end(void);
char *register_string(char *str);
char *get_op_name(int op);
void free_tree(NODE *node);
void check_lhs(NODE *node);
void scope_start(void);
void scope_end(void);
VARIABLE *new_ident(char *name, SPACE space, SCOPE_TYPE scope);
VARIABLE *get_ident(char *name, SPACE space);
int same_declarations(DECL *d1, DECL *d2);
void output_variables(void);
VARIABLE *get_global_vars(void);
VARIABLE *get_function_vars(void);
NODE *new_node(int op, int numargs);
void delete_node(NODE *node);
int get_decl_size(DECL *decl);
void yyerror(char *error, ...);
void yywarning(char *warning, ...);
extern char pathname[]; /* In zcc.y */
extern char filename[]; /* In zcc.y */
void simplify(NODE *node);
void init_lex(void);
void check_newfile(void);
void check_newline(void);
#endif /* __ZCC_H__ */
|
/*
* Copyright (c) 2008-2021, Hazelcast, Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#pragma once
#include "hazelcast/client/member.h"
#if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
#pragma warning(push)
#pragma warning(disable: 4251) //for dll export
#endif
namespace hazelcast {
namespace client {
class cluster;
/**
* Membership event fired when a new member is added
* to the cluster and/or when a member leaves the cluster.
*
* @see membership_listener
*/
class HAZELCAST_API membership_event {
public:
enum membership_event_type {
MEMBER_JOINED = 1,
MEMBER_LEFT = 2,
};
/**
* Internal API.
* Constructor.
*/
membership_event(cluster &cluster, const member &m, membership_event_type event_type,
const std::unordered_map<boost::uuids::uuid, member, boost::hash<boost::uuids::uuid>> &members_list);
/**
* Destructor
*/
virtual ~membership_event();
/**
* Returns a consistent view of the the members exactly after this MembershipEvent has been processed. So if a
* member is removed, the returned vector will not include this member. And if a member is added it will include
* this member.
*
* The problem with calling the Cluster#getMembers() is that the content could already
* have changed while processing this event so it becomes very difficult to write a deterministic algorithm since
* you can't get a deterministic view of the members. This method solves that problem.
*
* The vector is immutable and ordered. For more information see Cluster#getMembers().
*
* @return the members at the moment after this event.
*/
std::unordered_map<boost::uuids::uuid, member, boost::hash<boost::uuids::uuid>> get_members() const;
/**
* Returns the cluster of the event.
*
* @return the cluster reference
*/
cluster &get_cluster();
/**
* Returns the membership event type; MembershipEvent#MEMBER_JOINED ,
* MembershipEvent#MEMBER_LEFT
*
* @return the membership event type
*/
membership_event_type get_event_type() const;
/**
* Returns the removed or added member.
*
* @return member which is removed/added
*/
const member &get_member() const;
private:
cluster &cluster_;
member member_;
membership_event_type event_type_;
std::unordered_map<boost::uuids::uuid, member, boost::hash<boost::uuids::uuid>> members_;
};
}
}
#if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
#pragma warning(pop)
#endif
|
//---------------------------------------------------------------------------
// Greenplum Database
// Copyright (C) 2013 EMC Corp.
//
// @filename:
// CIOUtils.h
//
// @doc:
// Optimizer I/O utility functions
//---------------------------------------------------------------------------
#ifndef GPOPT_CIOUtils_H
#define GPOPT_CIOUtils_H
#include "gpos/base.h"
namespace gpopt
{
using namespace gpos;
//---------------------------------------------------------------------------
// @class:
// CIOUtils
//
// @doc:
// Optimizer I/O utility functions
//
//---------------------------------------------------------------------------
class CIOUtils
{
public:
// dump given string to output file
static
void Dump(CHAR *szFileName, CHAR *sz);
}; // class CIOUtils
}
#endif // !GPOPT_CIOUtils_H
// EOF
|
#pragma once
#ifndef __DUSCLOPS_H_
#define __DUSCLOPS_H_
#include "PokemonCombat.h"
#define SPEED 2
#define MAX_SIZE 1000
class Dusclops : public PokemonCombat
{
public:
Dusclops();
~Dusclops();
// Called before render is available
bool Awake(pugi::xml_node&);
// Called before the first frame
bool Start();
// Called before all Updates
//bool PreUpdate();
// Called each loop iteration
bool Update(float dt);
// Called before all Updates
//bool PostUpdate();
void Draw();
// Called before quitting
bool CleanUp();
bool Idle();
bool Walking(float dt);
bool Move(float dt);
bool Attack();
void Special_Attack();
void IncrementSpecial();
bool Chasing(float dt);
void OnCollision(Collider*, Collider*);
bool Movebyhit(int speed);
int CheckPlayerPos();
//Special Attack
SDL_Rect rect_special;
iPoint pos_special;
bool stop_anim_special = false;
int angle_special = 0;
private:
//Timer
int timetoplay = 0;
int dis_moved = 0;
int distance = 0;
bool reset_run = false;
bool reset_distance = false;
int timetorun = 0;
int use_cooldown = 0;
//bool drawThrowSP = false; **Only the special attack is launch.**
};
#endif //__DUSCLOPS_H_
|
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
/*!
* Copyright (c) 2020 by Contributors
* \file min_ex-inl.h
* \brief example external operator header file
*/
#ifndef MXNET_OPERATOR_TENSOR_MIN_EX_OP_INL_H_
#define MXNET_OPERATOR_TENSOR_MIN_EX_OP_INL_H_
#include <dmlc/parameter.h>
#include <vector>
#include <algorithm>
#include "operator/mxnet_op.h"
#include "operator/operator_common.h"
#include "operator/elemwise_op_common.h"
namespace mxnet {
namespace op {
template<typename xpu>
void MinExForward(const nnvm::NodeAttrs& attrs,
const OpContext& ctx,
const std::vector<TBlob>& inputs,
const std::vector<OpReqType>& req,
const std::vector<TBlob>& outputs) {
//do nothing
}
inline bool MinExOpShape(const nnvm::NodeAttrs& attrs,
mxnet::ShapeVector* in_attrs,
mxnet::ShapeVector* out_attrs) {
//do nothing
return true;
}
inline bool MinExOpType(const nnvm::NodeAttrs& attrs,
std::vector<int> *in_attrs,
std::vector<int> *out_attrs) {
//do nothing
return true;
}
} // namespace op
} // namespace mxnet
#endif // MXNET_OPERATOR_TENSOR_MIN_EX_OP_INL_H_
|
/*=========================================================================
*
* Copyright Insight Software Consortium
*
* 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.txt
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*=========================================================================*/
#ifndef __itkFlipImageFilter_h
#define __itkFlipImageFilter_h
#include "itkImageToImageFilter.h"
#include "itkFixedArray.h"
namespace itk
{
/** \class FlipImageFilter
* \brief Flips an image across user specified axes.
*
* FlipImageFilter flips an image across user specified axes.
* The flip axes are set via method SetFlipAxes( array ) where
* the input is a FixedArray<bool,ImageDimension>. The image
* is flipped across axes for which array[i] is true.
*
* In terms of grid coordinates the image is flipped within
* the LargestPossibleRegion of the input image. As such,
* the LargestPossibleRegion of the ouput image is the same
* as the input.
*
* In terms of geometric coordinates, the output origin
* is such that the image is flipped with respect to the
* coordinate axes.
*
* \ingroup GeometricTransforms
* \ingroup Multithreaded
* \ingroup Streamed
* \ingroup ITK-ImageGrid
* \wikiexample{Images/FlipImageFilter,Flip an image over specified axes}
*/
template< class TImage >
class ITK_EXPORT FlipImageFilter:
public ImageToImageFilter< TImage, TImage >
{
public:
/** Standard class typedefs. */
typedef FlipImageFilter Self;
typedef ImageToImageFilter< TImage, TImage > Superclass;
typedef SmartPointer< Self > Pointer;
typedef SmartPointer< const Self > ConstPointer;
/** Method for creation through the object factory. */
itkNewMacro(Self);
/** Run-time type information (and related methods). */
itkTypeMacro(FlipImageFilter, ImageToImageFilter);
/** ImageDimension enumeration */
itkStaticConstMacro(ImageDimension, unsigned int, TImage::ImageDimension);
/** Inherited types */
typedef typename Superclass::InputImagePointer InputImagePointer;
typedef typename Superclass::InputImageConstPointer InputImageConstPointer;
typedef typename Superclass::OutputImagePointer OutputImagePointer;
typedef typename Superclass::OutputImageRegionType OutputImageRegionType;
/** Index related types */
typedef typename TImage::IndexType IndexType;
typedef typename IndexType::IndexValueType IndexValueType;
/** FlipAxesArray type */
typedef FixedArray< bool, itkGetStaticConstMacro(ImageDimension) > FlipAxesArrayType;
/** Set/Get the axis to be flipped. The image is flipped along axes
* for which array[i] is true. */
itkSetMacro(FlipAxes, FlipAxesArrayType);
itkGetConstMacro(FlipAxes, FlipAxesArrayType);
/** Controls how the output origin is computed. If FlipAboutOrigin is
* "on", the flip will occur about the origin of the axis, otherwise,
* the flip will occur about the center of the axis.
*/
itkBooleanMacro(FlipAboutOrigin);
itkGetConstMacro(FlipAboutOrigin, bool);
itkSetMacro(FlipAboutOrigin, bool);
/** FlipImageFilter produces an image with different origin and
* direction than the input image. As such, FlipImageFilter needs to
* provide an implementation for GenerateOutputInformation() in
* order to inform the pipeline execution model. The original
* documentation of this method is below.
* \sa ProcessObject::GenerateOutputInformaton() */
virtual void GenerateOutputInformation();
/** FlipImageFilter needs different input requested region than the output
* requested region. As such, FlipImageFilter needs to provide an
* implementation for GenerateInputRequestedRegion() in order to inform the
* pipeline execution model.
* \sa ProcessObject::GenerateInputRequestedRegion() */
virtual void GenerateInputRequestedRegion();
protected:
FlipImageFilter();
~FlipImageFilter() {}
void PrintSelf(std::ostream & os, Indent indent) const;
/** FlipImageFilter can be implemented as a multithreaded filter.
* Therefore, this implementation provides a ThreadedGenerateData() routine
* which is called for each processing thread. The output image data is
* allocated automatically by the superclass prior to calling
* ThreadedGenerateData(). ThreadedGenerateData can only write to the
* portion of the output image specified by the parameter
* "outputRegionForThread"
*
* \sa ImageToImageFilter::ThreadedGenerateData(),
* ImageToImageFilter::GenerateData() */
void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread,
int threadId);
private:
FlipImageFilter(const Self &); //purposely not implemented
void operator=(const Self &); //purposely not implemented
FlipAxesArrayType m_FlipAxes;
bool m_FlipAboutOrigin;
};
} // end namespace itk
#ifndef ITK_MANUAL_INSTANTIATION
#include "itkFlipImageFilter.txx"
#endif
#endif
|
//
// CTLSResponse.h
// IDTech
//
// Created by Randy Palermo on 10/30/14.
// Copyright (c) 2014 IDTech Products. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "IDTEMVData.h"
@class CTLSResponse;
/**
Class to encapsulate the CTLSResponse
*/
@interface CTLSResponse : NSObject {
NSString* track1MSR; //!<Track 1 data from MSR
NSString* track2MSR; //!<Track 2 data from MSR
NSDictionary* clearingRecord; //!<DE 055 data (if available) as a TLV data objects. The DE 055 data is the same data as is included in the Clearing Record
NSDictionary* unencryptedTags; //!<EMV card data
NSDictionary* encryptedTags; //!<EMV card data
NSDictionary* maskedTags; //!<EMV card data
}
/**
* clears all CTLSResponse properties
*/
-(void)clear;
/**
* Singleton instance of CTLSResponse
*/
+ (CTLSResponse *)sharedController;
@property (nonatomic, strong) NSString* track1MSR;
@property (nonatomic, strong) NSString* track2MSR;
@property (nonatomic, strong) NSDictionary* clearingRecord;
@property (nonatomic, strong) NSDictionary* unencryptedTags;
@property (nonatomic, strong) NSDictionary* encryptedTags;
@property (nonatomic, strong) NSDictionary* maskedTags;
@end
|
/* Routines for dealing with '\0' separated arg vectors.
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
Written by Miles Bader <miles@gnu.ai.mit.edu>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2, or (at
your option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include <libc/symbols.h>
#include <argz.h>
#include <string.h>
/* Make '\0' separated arg vector ARGZ printable by converting all the '\0's
except the last into the character SEP. */
void
__argz_stringify(char *argz, size_t len, int sep)
{
while (len > 0)
{
size_t part_len = strlen(argz);
argz += part_len;
len -= part_len + 1;
if (len > 0)
*argz++ = sep;
}
}
weak_alias (__argz_stringify, argz_stringify)
|
//===--- ModuleDiagsConsumer.h - Print module differ diagnostics --*- C++ -*-===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//
//
// This file defines the ModuleDifferDiagsConsumer class, which displays
// diagnostics from the module differ as text to an output.
//
//===----------------------------------------------------------------------===//
#ifndef __SWIFT_MODULE_DIFFER_DIAGS_CONSUMER_H__
#define __SWIFT_MODULE_DIFFER_DIAGS_CONSUMER_H__
#include "llvm/ADT/MapVector.h"
#include "swift/Basic/LLVM.h"
#include "swift/AST/DiagnosticConsumer.h"
#include "swift/Frontend/PrintingDiagnosticConsumer.h"
#include "llvm/Support/raw_ostream.h"
#include <set>
namespace swift {
namespace ide {
namespace api {
/// \brief Diagnostic consumer that displays diagnostics to standard output.
class ModuleDifferDiagsConsumer: public PrintingDiagnosticConsumer {
bool DiagnoseModuleDiff;
llvm::MapVector<StringRef, std::set<std::string>> AllDiags;
public:
ModuleDifferDiagsConsumer(bool DiagnoseModuleDiff);
~ModuleDifferDiagsConsumer();
void handleDiagnostic(SourceManager &SM, SourceLoc Loc,
DiagnosticKind Kind,
StringRef FormatString,
ArrayRef<DiagnosticArgument> FormatArgs,
const DiagnosticInfo &Info) override;
};
}
}
}
#endif
|
/* Copyright 2014-2017 Rsyn
*
* 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.
*/
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/*
* File: PhysicalPin.h
* Author: jucemar
*
* Created on 14 de Setembro de 2016, 21:26
*/
#ifndef PHYSICALDESIGN_PHYSICALPIN_H
#define PHYSICALDESIGN_PHYSICALPIN_H
namespace Rsyn {
class PhysicalPin : public Proxy<PhysicalPinData> {
friend class PhysicalDesign;
protected:
//! @brief Constructs a Rsyn::PhysicalPin object with a pointer to Rsyn::PhysicalPinData.
PhysicalPin(PhysicalPinData * data) : Proxy(data) {}
public:
//! @brief Constructs a Rsyn::PhysicalPin object with a null pointer to Rsyn::PhysicalPinData.
PhysicalPin() : Proxy(nullptr) {}
//! @brief Constructs a Rsyn::PhysicalPin object with a null pointer to Rsyn::PhysicalPinData.
PhysicalPin(std::nullptr_t) : Proxy(nullptr) {}
//! @brief Returns the pin displacement.
//! @details The displacement are independent to abscissa (X) and ordinate (X).
//! The origin to compute pin displacement is the Left-Lower cell point and it is assumed to be (0,0).
//! @warning It was assumed the pin has a fixed position in the cell.
DBUxy getDisplacement () const;
//! @brief Returns the pin displacement to the Dimension parameter dim.
//! @details The displacement are independent to abscissa (X) and ordinate (X).
//! The origin to compute pin displacement is the Left-Lower cell point and it is assumed to be (0,0).
//! @warning It was assumed the pin has a fixed position in the cell.
DBU getDisplacement(const Dimension dim);
//! @brief Returns a vector reference to PhysicalPinGeometry objects related to PhysicalPin.
std::vector<PhysicalPinGeometry> & allPinGeometries();
//! @brief Returns a constant vector reference to PhysicalPinGeometry objects related to PhysicalPin.
const std::vector<PhysicalPinGeometry> & allPinGeometries() const;
//! @brief Returns the total number of PhysicalPinGeometry objects related to PhysicalPin.
std::size_t getNumPinGeometries() const;
//! @brief Returns true if PhysicalPin has PhysicalPinGeometry objects. Otherwise, returns false.
bool hasPinGeometries() const;
//! @brief Returns true if PhysicalPin has no PhysicalPinGeometry objects. Otherwise, returns false.
bool isEmptyPinGeometries() const;
//! @brief Returns an enum of PhysicalPinDirection that gives the PhysicalPin direction.
PhysicalPinDirection getDirection () const;
//! @brief Returns a constant reference to the Bounds object that defines the PhysicalPin boundaries.
//! it is is defined by one of the layer.
const Bounds & getLayerBounds() const;
}; // end class
} // end namespace
#endif /* PHYSICALDESIGN_PHYSICALPIN_H */
|
//
// PAThemeUtility.h
// devMod
//
// Created by Paolo Tagliani on 10/24/14.
// Copyright (c) 2014 Paolo Tagliani. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface PAThemeUtility : NSObject
+ (void)switchToLightMode;
+ (void)switchToDarkMode;
+ (void)resetSettings;
@end
|
/*
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ECCLESIA_MAGENT_LIB_MCEDECODER_DIMM_TRANSLATOR_H_
#define ECCLESIA_MAGENT_LIB_MCEDECODER_DIMM_TRANSLATOR_H_
#include "absl/status/statusor.h"
namespace ecclesia {
// A DIMM slot can be uniquely identified by CPU socket ID, the IMC channel ID
// within CPU socket and the channel slot within a IMC channel.
struct DimmSlotId {
int socket_id;
int imc_channel;
int channel_slot;
};
// Interface class of DIMM translator.
class DimmTranslatorInterface {
public:
virtual ~DimmTranslatorInterface() {}
// Get Google Logical DIMM Number (GLDN) from the socket ID, IMC channel
// number and channel slot ID. Returns a not-OK status if there is not GLDN
// associated with the slot, which generally means that the slot ID that was
// passed does not match any actually existing slot on the platform.
virtual absl::StatusOr<int> GetGldn(const DimmSlotId &dimm_slot) const = 0;
// This method translates a GLDN to a DIMM slot. Returns a non-OK status if
// the platform has no slot that would have that GLDN associated with it.
virtual absl::StatusOr<DimmSlotId> GldnToSlot(int gldn) const = 0;
};
} // namespace ecclesia
#endif // ECCLESIA_MAGENT_LIB_MCEDECODER_DIMM_TRANSLATOR_H_
|
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/rekognition/Rekognition_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace Rekognition
{
namespace Model
{
class AWS_REKOGNITION_API ListDatasetEntriesResult
{
public:
ListDatasetEntriesResult();
ListDatasetEntriesResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
ListDatasetEntriesResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
/**
* <p> A list of entries (images) in the dataset. </p>
*/
inline const Aws::Vector<Aws::String>& GetDatasetEntries() const{ return m_datasetEntries; }
/**
* <p> A list of entries (images) in the dataset. </p>
*/
inline void SetDatasetEntries(const Aws::Vector<Aws::String>& value) { m_datasetEntries = value; }
/**
* <p> A list of entries (images) in the dataset. </p>
*/
inline void SetDatasetEntries(Aws::Vector<Aws::String>&& value) { m_datasetEntries = std::move(value); }
/**
* <p> A list of entries (images) in the dataset. </p>
*/
inline ListDatasetEntriesResult& WithDatasetEntries(const Aws::Vector<Aws::String>& value) { SetDatasetEntries(value); return *this;}
/**
* <p> A list of entries (images) in the dataset. </p>
*/
inline ListDatasetEntriesResult& WithDatasetEntries(Aws::Vector<Aws::String>&& value) { SetDatasetEntries(std::move(value)); return *this;}
/**
* <p> A list of entries (images) in the dataset. </p>
*/
inline ListDatasetEntriesResult& AddDatasetEntries(const Aws::String& value) { m_datasetEntries.push_back(value); return *this; }
/**
* <p> A list of entries (images) in the dataset. </p>
*/
inline ListDatasetEntriesResult& AddDatasetEntries(Aws::String&& value) { m_datasetEntries.push_back(std::move(value)); return *this; }
/**
* <p> A list of entries (images) in the dataset. </p>
*/
inline ListDatasetEntriesResult& AddDatasetEntries(const char* value) { m_datasetEntries.push_back(value); return *this; }
/**
* <p>If the previous response was incomplete (because there is more results to
* retrieve), Amazon Rekognition Custom Labels returns a pagination token in the
* response. You can use this pagination token to retrieve the next set of results.
* </p>
*/
inline const Aws::String& GetNextToken() const{ return m_nextToken; }
/**
* <p>If the previous response was incomplete (because there is more results to
* retrieve), Amazon Rekognition Custom Labels returns a pagination token in the
* response. You can use this pagination token to retrieve the next set of results.
* </p>
*/
inline void SetNextToken(const Aws::String& value) { m_nextToken = value; }
/**
* <p>If the previous response was incomplete (because there is more results to
* retrieve), Amazon Rekognition Custom Labels returns a pagination token in the
* response. You can use this pagination token to retrieve the next set of results.
* </p>
*/
inline void SetNextToken(Aws::String&& value) { m_nextToken = std::move(value); }
/**
* <p>If the previous response was incomplete (because there is more results to
* retrieve), Amazon Rekognition Custom Labels returns a pagination token in the
* response. You can use this pagination token to retrieve the next set of results.
* </p>
*/
inline void SetNextToken(const char* value) { m_nextToken.assign(value); }
/**
* <p>If the previous response was incomplete (because there is more results to
* retrieve), Amazon Rekognition Custom Labels returns a pagination token in the
* response. You can use this pagination token to retrieve the next set of results.
* </p>
*/
inline ListDatasetEntriesResult& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;}
/**
* <p>If the previous response was incomplete (because there is more results to
* retrieve), Amazon Rekognition Custom Labels returns a pagination token in the
* response. You can use this pagination token to retrieve the next set of results.
* </p>
*/
inline ListDatasetEntriesResult& WithNextToken(Aws::String&& value) { SetNextToken(std::move(value)); return *this;}
/**
* <p>If the previous response was incomplete (because there is more results to
* retrieve), Amazon Rekognition Custom Labels returns a pagination token in the
* response. You can use this pagination token to retrieve the next set of results.
* </p>
*/
inline ListDatasetEntriesResult& WithNextToken(const char* value) { SetNextToken(value); return *this;}
private:
Aws::Vector<Aws::String> m_datasetEntries;
Aws::String m_nextToken;
};
} // namespace Model
} // namespace Rekognition
} // namespace Aws
|
#ifndef __DWARF_H__
#define __DWARF_H__
#include "player.h"
class Dwarf: public Player {
public:
Dwarf();
~Dwarf();
void printRace();
};
#endif
|
// Copyright 2011 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef XPAF_QUERY_RUNNER_H_
#define XPAF_QUERY_RUNNER_H_
#include <algorithm>
#include <string>
#include <utility>
#include <vector>
#include "base/macros.h"
#include "base/scoped_ptr.h"
#include "xpaf_parser.h" // for ErrorHandlingMode
namespace xpaf {
class QueryDef;
class QueryGroupDef;
class StringPiece;
class URL;
class XPathWrapper;
namespace internal {
typedef vector<pair<string, bool> > QueryResults;
class QueryRunner {
public:
// Note: 'url' and 'xpath_wrapper' must persist for the lifetime of this
// object.
QueryRunner(const StringPiece& url,
const XPathWrapper& xpath_wrapper,
ErrorHandlingMode error_handling_mode);
~QueryRunner();
void RunStandaloneQuery(const QueryDef& query_def,
QueryResults* results) const;
void RunGroupedQueries(const QueryGroupDef& query_group_def,
vector<QueryResults*>* results_vec) const;
private:
// Takes const char* rather than const string& to avoid an extra conversion.
bool PostProcessResult(const QueryDef& query_def,
const char* orig_result,
string* processed_result) const;
// Used by RunStandaloneQuery() but not RunGroupedQueries().
void PostProcessAndAppendResult(const QueryDef& query_def,
const char* result_str,
QueryResults* results) const;
void RunGroupedQueriesLogError(const QueryGroupDef& query_group_def,
const StringPiece& error) const;
const StringPiece& url_;
const scoped_ptr<const URL> url_obj_;
const XPathWrapper& xpath_wrapper_;
const ErrorHandlingMode error_handling_mode_;
DISALLOW_COPY_AND_ASSIGN(QueryRunner);
};
} // namespace internal
} // namespace xpaf
#endif // XPAF_QUERY_RUNNER_H_
|
//
// BYAWebViewController.h
// ByApartments
//
// Created by odnairy on 17/04/15.
// Copyright (c) 2015 Roman Gardukevich. All rights reserved.
//
#import <UIKit/UIKit.h>
#import <Parse/Parse.h>
#import "BYAApartment.h"
@interface BYAWebViewController : UIViewController
@property (nonatomic, weak) IBOutlet UIWebView* webView;
@property (nonatomic, strong) BYAApartment* apartment;
@end
|
/*
*
* Copyright 2017, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following disclaimer
* in the documentation and/or other materials provided with the
* distribution.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* 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>
typedef void (^CBLandmarkDetectionCallback)(NSDictionary *response, NSError *error);
@interface CBLandmarkDetectionService : NSObject
+ (instancetype)sharedService;
- (void)analyze:(UIImage *)image completion:(CBLandmarkDetectionCallback)completion;
@end
|
/*
* Copyright 2020 The TensorFlow Runtime Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Unit test helpers for GPU wrapper tests.
#ifndef TFRT_CPP_TESTS_GPU_STREAM_COMMON_H_
#define TFRT_CPP_TESTS_GPU_STREAM_COMMON_H_
#include <ostream>
#include "tfrt/cpp_tests/error_util.h"
#include "tfrt/gpu/wrapper/driver_wrapper.h"
namespace tfrt {
namespace gpu {
namespace wrapper {
class Test : public testing::TestWithParam<wrapper::Platform> {};
// Google Test outputs to std::ostream. Provide ADL'able overloads.
template <typename T>
std::ostream& operator<<(std::ostream& os, T item) {
llvm::raw_os_ostream raw_os(os);
raw_os << item;
return os;
}
inline std::ostream& operator<<(std::ostream& os, ContextFlags flags) {
return os << flags.ToOpaqueValue();
}
inline std::ostream& operator<<(std::ostream& os, StreamFlags flags) {
return os << flags.ToOpaqueValue();
}
// Return the current context or die if an error occurs. This is intended for
// passing CurrentContext instances as temporary to simplify test code. Do not
// use unless the code following it requires zero CurrentContext instances.
inline CurrentContext Current() {
auto current = CtxGetCurrent();
cantFail(current.takeError());
return *current;
}
} // namespace wrapper
} // namespace gpu
} // namespace tfrt
#endif // TFRT_CPP_TESTS_GPU_STREAM_COMMON_H_
|
/**
* Copyright 2017-2018 Kakao Corp.
*
* 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.
*/
/*!
* @header KMTListTemplate.h
* @abstract 여러 개의 컨텐츠를 리스트 형태로 보여줄 수 있는 메시지 템플릿입니다.
*/
#import <KakaoMessageTemplate/KMTTemplate.h>
NS_ASSUME_NONNULL_BEGIN
@class KMTContentObject;
@class KMTLinkObject;
@class KMTButtonObject;
@class KMTLinkBuilder;
/*!
* @class KMTListTemplate
* @abstract 여러 개의 컨텐츠를 리스트 형태로 보여줄 수 있는 메시지 템플릿입니다.
* @discussion 리스트 템플릿은 메시지 상단에 노출되는 헤더 타이틀과, 컨텐츠 목록, 버튼 등으로 구성됩니다. 헤더와 컨텐츠 각각의 링크를 가질 수 있습니다. 피드 템플릿과 마찬가지로 하나의 기본 버튼을 가지며 임의의 버튼을 설정할 수 있습니다.
*/
@interface KMTListTemplate : KMTTemplate
/*!
* @property headerTitle
* @abstract 리스트 상단에 노출되는 헤더 타이틀. (최대 200자)
*/
@property (copy, nonatomic) NSString *headerTitle;
/*!
* @property headerLink
* @abstract 헤더 타이틀 내용에 해당하는 링크 정보.
*/
@property (copy, nonatomic) KMTLinkObject *headerLink;
/*!
* @property headerImageURL
* @abstract 리스트 템플릿의 상단에 보이는 이미지 URL
*/
@property (copy, nonatomic, nullable) NSURL *headerImageURL;
/*!
* @property headerImageWidth
* @abstract 리스트 템플릿의 상단에 보이는 이미지 widht, 권장 800 (단위: 픽셀)
*/
@property (copy, nonatomic, nullable) NSNumber *headerImageWidth;
/*!
* @property headerImageHeight
* @abstract 리스트 템플릿의 상단에 보이는 이미지 height, 권장 190 (단위: 픽셀)
*/
@property (copy, nonatomic, nullable) NSNumber *headerImageHeight;
/*!
* @property contents
* @abstract 리스트에 노출되는 컨텐츠 목록. (최소 2개, 최대 3개)
*/
@property (copy, nonatomic) NSArray<KMTContentObject *> *contents;
/*!
* @property buttonTitle
* @abstract 기본 버튼 타이틀("자세히 보기")을 변경하고 싶을 때 설정.
*/
@property (copy, nonatomic, nullable) NSString *buttonTitle;
/*!
* @property buttons
* @abstract 버튼 목록. 버튼 타이틀과 링크를 변경하고 싶을때, 버튼 두개를 사용하고 싶을때 사용. (최대 2개)
*/
@property (copy, nonatomic, nullable) NSArray<KMTButtonObject *> *buttons;
@end
@interface KMTListTemplate (Constructor)
+ (instancetype)listTemplateWithHeaderTitle:(NSString *)headerTitle
headerLink:(KMTLinkObject *)headerLink
contents:(NSArray<KMTContentObject *> *)contents;
- (instancetype)initWithHeaderTitle:(NSString *)headerTitle
headerLink:(KMTLinkObject *)headerLink
contents:(NSArray<KMTContentObject *> *)contents;
@end
@interface KMTListTemplateBuilder : NSObject
@property (copy, nonatomic) NSString *headerTitle;
@property (copy, nonatomic) KMTLinkObject *headerLink;
@property (copy, nonatomic, nullable) NSURL *headerImageURL;
@property (copy, nonatomic, nullable) NSNumber *headerImageWidth;
@property (copy, nonatomic, nullable) NSNumber *headerImageHeight;
@property (copy, nonatomic) NSMutableArray<KMTContentObject *> *contents;
@property (copy, nonatomic, nullable) NSString *buttonTitle;
@property (copy, nonatomic, nullable) NSMutableArray<KMTButtonObject *> *buttons;
- (void)addContent:(KMTContentObject *)content;
- (void)addButton:(KMTButtonObject *)button;
- (KMTListTemplate *)build;
@end
@interface KMTListTemplate (ConstructorWithBuilder)
+ (instancetype)listTemplateWithBuilderBlock:(void (^)(KMTListTemplateBuilder *listTemplateBuilder))builderBlock;
+ (instancetype)listTemplateWithBuilder:(KMTListTemplateBuilder *)builder;
- (instancetype)initWithBuilder:(KMTListTemplateBuilder *)builder;
@end
NS_ASSUME_NONNULL_END
|
/***************************************************************************
RTPAVProfile.h - description
-------------------
begin : Thu Nov 29 2001
copyright : (C) 2001 by Matthias Oppitz
email : Matthias.Oppitz@gmx.de
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#include "inet/common/INETDefs.h"
#include "inet/transportlayer/rtp/RTPProfile.h"
namespace inet {
namespace rtp {
/**
* The class RTPAVProfile is a subclass of RTPProfile. It does not extend
* the functionality of its super class, it just sets some values in
* its initialize() method.
* For for information about the rtp audio/video profile consult
* rfc 1890.
*/
class INET_API RTPAVProfile : public RTPProfile
{
protected:
/**
* This initialisation method sets following values:
* name, rtcpPercentage and preferredPort.
*/
virtual void initialize();
};
} // namespace rtp
} // namespace inet
|
//
// LGLCalenderModel.h
// LGLProgress
//
// Created by 李国良 on 2016/10/11.
// Copyright © 2016年 李国良. All rights reserved.
// https://github.com/liguoliangiOS/LGLCalender.git
#import <Foundation/Foundation.h>
typedef void(^CallBackBlock)(NSMutableArray * result);
@interface LGLCalenderModel : NSObject
@property (nonatomic, assign) NSInteger year;
@property (nonatomic, assign) NSInteger month;
@property (nonatomic, assign) NSInteger firstday; // 本月第一天是周几
@property (nonatomic, strong ) NSMutableArray * details;
+ (void)getCalenderDataWithDate:(NSDate *)date block:(CallBackBlock)block;
@end
|
//
// UserInfoHeaderView.h
// NutzCommunity
//
// Created by DuWei on 15/12/19.
// Copyright (c) 2015年 nutz.cn. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "User.h"
@interface SideMenuHeaderView : UITableViewCell
@property (nonatomic, strong) User *user;
// 点击头像
@property (nonatomic, copy) void(^avatarTappedBlock)();
// 点击退出登录
@property (nonatomic, copy) void(^logoutTappedBlock)();
@end
|
#ifndef windowInstructions_h
#define windowInstructions_h
#include "scanAndRun.h"
namespace windowInstructions
{
extern textWindow window;
int windowCreate(std::vector<variableName> arg, functionsManager* superManager);
int windowDraw(std::vector<variableName> arg, functionsManager* superManager);
int windowDelete(std::vector<variableName> arg, functionsManager* superManager);
int windowClear(std::vector<variableName> arg, functionsManager* superManager);
int windowSetPoint(std::vector<variableName> arg, functionsManager* superManager);
int windowGetKeyInput(std::vector<variableName> arg, functionsManager* superManager);
int windowGetKeyInputNow(std::vector<variableName> arg, functionsManager* superManager);
}
#endif |
//
// MPVASTTracking.h
//
// Copyright 2018-2020 Twitter, Inc.
// Licensed under the MoPub SDK License Agreement
// http://www.mopub.com/legal/sdk-license-agreement/
//
#import <Foundation/Foundation.h>
#import "MPVASTError.h"
#import "MPVideoConfig.h"
@protocol MPVASTTracking <NSObject>
- (instancetype)initWithVideoConfig:(MPVideoConfig *)videoConfig videoURL:(NSURL *)videoURL;
/**
Register the video view for viewability tracking.
* @param videoView A view that is backed by `AVPlayerLayer`, or a superview of it
*/
- (void)registerVideoViewForViewabilityTracking:(UIView *)videoView;
/**
Stop viewability tracking activities.
*/
- (void)stopViewabilityTracking;
/**
Call this when a new video event (@c MPVideoEvent) happens.
@note Some events allows repetition, and some don't.
@note For @c MPVideoEventProgress, call @c handleVideoProgressEvent:videoDuration: instead.
*/
- (void)handleVideoEvent:(MPVideoEvent)videoEvent videoTimeOffset:(NSTimeInterval)videoTimeOffset;
/**
Call this when the video play progress is updated.
@note Do not call this for video complete event. Use @c MPVideoEventComplete instead. Neither
custom timer nor iOS video player time observer manages the video complete event very well (with a
high chance of not firing at all due to timing issue), and iOS provides a specific notification for
the video complete event.
*/
- (void)handleVideoProgressEvent:(NSTimeInterval)videoTimeOffset videoDuration:(NSTimeInterval)videoDuration;
/**
Call this when a VAST related error happens.
*/
- (void)handleVASTError:(MPVASTError)error videoTimeOffset:(NSTimeInterval)videoTimeOffset;
@end
@interface MPVASTTracking : NSObject <MPVASTTracking>
@end
|
//
// AppDelegate.h
// AppStore
//
// Created by Jay on 14/1/2019.
// Copyright © 2019 AA. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface AppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@end
|
#include "annoylib.h"
#include "kissrandom.h"
namespace GoAnnoy {
class AnnoyIndex {
protected:
::AnnoyIndexInterface<int32_t, float> *ptr;
int f;
public:
~AnnoyIndex() {
delete ptr;
};
void addItem(int item, const float* w) {
ptr->add_item(item, w);
};
void build(int q) {
ptr->build(q, 1);
};
bool save(const char* filename, bool prefault) {
return ptr->save(filename, prefault);
};
bool save(const char* filename) {
return ptr->save(filename, true);
};
void unload() {
ptr->unload();
};
bool load(const char* filename, bool prefault) {
return ptr->load(filename, prefault);
};
bool load(const char* filename) {
return ptr->load(filename, true);
};
float getDistance(int i, int j) {
return ptr->get_distance(i, j);
};
void getNnsByItem(int item, int n, int search_k, vector<int32_t>* result, vector<float>* distances) {
ptr->get_nns_by_item(item, n, search_k, result, distances);
};
void getNnsByVector(const float* w, int n, int search_k, vector<int32_t>* result, vector<float>* distances) {
ptr->get_nns_by_vector(w, n, search_k, result, distances);
};
void getNnsByItem(int item, int n, int search_k, vector<int32_t>* result) {
ptr->get_nns_by_item(item, n, search_k, result, NULL);
};
void getNnsByVector(const float* w, int n, int search_k, vector<int32_t>* result) {
ptr->get_nns_by_vector(w, n, search_k, result, NULL);
};
int getNItems() {
return (int)ptr->get_n_items();
};
void verbose(bool v) {
ptr->verbose(v);
};
void getItem(int item, vector<float> *v) {
v->resize(this->f);
ptr->get_item(item, &v->front());
};
bool onDiskBuild(const char* filename) {
return ptr->on_disk_build(filename);
};
};
class AnnoyIndexAngular : public AnnoyIndex
{
public:
AnnoyIndexAngular(int f) {
ptr = new ::AnnoyIndex<int32_t, float, ::Angular, ::Kiss64Random, AnnoyIndexSingleThreadedBuildPolicy>(f);
this->f = f;
}
};
class AnnoyIndexEuclidean : public AnnoyIndex {
public:
AnnoyIndexEuclidean(int f) {
ptr = new ::AnnoyIndex<int32_t, float, ::Euclidean, ::Kiss64Random, AnnoyIndexSingleThreadedBuildPolicy>(f);
this->f = f;
}
};
class AnnoyIndexManhattan : public AnnoyIndex {
public:
AnnoyIndexManhattan(int f) {
ptr = new ::AnnoyIndex<int32_t, float, ::Manhattan, ::Kiss64Random, AnnoyIndexSingleThreadedBuildPolicy>(f);
this->f = f;
}
};
class AnnoyIndexDotProduct : public AnnoyIndex {
public:
AnnoyIndexDotProduct(int f) {
ptr = new ::AnnoyIndex<int32_t, float, ::DotProduct, ::Kiss64Random, AnnoyIndexSingleThreadedBuildPolicy>(f);
this->f = f;
}
};
}
|
#ifndef XDATAFILE_H
#define XDATAFILE_H
/*
Copyright 2011 Tobii Technology AB
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#include <QString>
#include "XDataModel.h"
class XDataFile
{
public:
XDataFile();
static bool saveToFile(XDataModel& model, QString fileName);
static bool readFromFile(XDataModel& model, QString fileName);
};
#endif // XDATAFILE_H
|
// Copyright 2015 Badge Keeper
//
// 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 "BKUserAchievement.h"
@interface BKUnlockedAchievement : BKUserAchievement {
}
@property (readonly, nonatomic) NSArray *rewards;
@end
|
/**
* Copyright (c) 2018 Zachary Puls <zach@zachpuls.com>
*/
#include <string.h>
/**
* @brief Returns a pointer to a string, which is a duplicate of the string
* pointed to by str with, at most, n characters.
*
* @param str A pointer to the string to be duplicated
* @param n The maximum number of characters to be duplicated
* @return char* A pointer to a duplicate of str, which must be freed
*/
char *strndup(const char *str, size_t n) {
return NULL;
}
|
/*
* Copyright (C) 2008 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef _RECOVERY_BOOTLOADER_H
#define _RECOVERY_BOOTLOADER_H
/* Bootloader Message
*
* This structure describes the content of a block in flash
* that is used for recovery and the bootloader to talk to
* each other.
*
* The command field is updated by linux when it wants to
* reboot into recovery or to update radio or bootloader firmware.
* It is also updated by the bootloader when firmware update
* is complete (to boot into recovery for any final cleanup)
*
* The status field is written by the bootloader after the
* completion of an "update-radio" or "update-hboot" command.
*
* The recovery field is only written by linux and used
* for the system to send a message to recovery or the
* other way around.
*
* The stage field is written by packages which restart themselves
* multiple times, so that the UI can reflect which invocation of the
* package it is. If the value is of the format "#/#" (eg, "1/3"),
* the UI will add a simple indicator of that status.
*
* The slot_suffix field is used for A/B implementations where the
* bootloader does not set the androidboot.ro.boot.slot_suffix kernel
* commandline parameter. This is used by fs_mgr to mount /system and
* other partitions with the slotselect flag set in fstab. A/B
* implementations are free to use all 32 bytes and may store private
* data past the first NUL-byte in this field.
*/
struct bootloader_message {
char command[32];
char status[32];
char recovery[768];
// The 'recovery' field used to be 1024 bytes. It has only ever
// been used to store the recovery command line, so 768 bytes
// should be plenty. We carve off the last 256 bytes to store the
// stage string (for multistage packages) and possible future
// expansion.
char stage[32];
char slot_suffix[32];
char reserved[192];
};
/* Read and write the bootloader command from the "misc" partition.
* These return zero on success.
*/
int get_bootloader_message(struct bootloader_message *out);
int set_bootloader_message(const struct bootloader_message *in);
#endif
|
//===----------------------------------------------------------------------===//
//
// Peloton
//
// socket_base.h
//
// Identification: src/include/wire/socket_base.h
//
// Copyright (c) 2015-16, Carnegie Mellon University Database Group
//
//===----------------------------------------------------------------------===//
#pragma once
#include <array>
#include <vector>
#include <thread>
#include <cstring>
#include <mutex>
#include <unistd.h>
#include <sys/file.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <netdb.h>
#include <netinet/in.h>
#include <iostream>
#include "common/logger.h"
#include "common/config.h"
#define SOCKET_BUFFER_SIZE 8192
#define MAX_CONNECTIONS 64
#define DEFAULT_PORT 5432
namespace peloton {
namespace wire {
class PacketManager;
typedef unsigned char uchar;
// use array as memory for the socket buffers can be fixed
typedef std::array<uchar, SOCKET_BUFFER_SIZE> SockBuf;
struct Server {
int port;
int server_fd;
int max_connections;
inline Server(const PelotonConfiguration& config)
: port(config.GetPort()),
server_fd(0),
max_connections(config.GetMaxConnections()) {}
};
// Buffers used to batch meesages at the socket
struct Buffer {
size_t buf_ptr; // buffer cursor
size_t buf_size; // buffer size
SockBuf buf;
inline Buffer() : buf_ptr(0), buf_size(0) {}
inline void Reset() {
buf_ptr = 0;
buf_size = 0;
}
inline size_t GetMaxSize() { return SOCKET_BUFFER_SIZE; }
};
/*
* SocektManager - Wrapper for managing socket.
* B is the STL container type used as the protocol's buffer.
*/
template <typename B>
class SocketManager {
int sock_fd; // file descriptor
Buffer rbuf; // socket's read buffer
Buffer wbuf; // socket's write buffer
private:
/* refill_read_buffer - Used to repopulate read buffer with a fresh
* batch of data from the socket
*/
bool RefillReadBuffer();
public:
inline SocketManager(int sock_fd) : sock_fd(sock_fd) {}
// Reads a packet of length "bytes" from the head of the buffer
bool ReadBytes(B &pkt_buf, size_t bytes);
// Writes a packet into the write buffer
bool BufferWriteBytes(B &pkt_buf, size_t len, uchar type);
// Used to invoke a write into the Socket, once the write buffer is ready
bool FlushWriteBuffer();
void CloseSocket();
};
extern void StartServer(const PelotonConfiguration& configuration,
Server *server);
// Thread function created per client
template <typename P, typename B>
void ClientHandler(std::unique_ptr<int> clientfd);
// Server's "accept loop"
template <typename P, typename B>
void HandleConnections(Server *server);
/*
* Functions defined here for template visibility
*
*/
/*
* handle_connections - Server's accept loop. Takes the protocol's PacketManager
* (P) and STL container type for the protocol's buffer (B)
*/
template <typename P, typename B>
void HandleConnections(Server *server) {
int connfd, clilen;
struct sockaddr_in cli_addr;
clilen = sizeof(cli_addr);
for (;;) {
// block and wait for incoming connection
connfd = accept(server->server_fd, (struct sockaddr *)&cli_addr,
(socklen_t *)&clilen);
if (connfd < 0) {
LOG_ERROR("Server error: Connection not established");
exit(EXIT_FAILURE);
}
std::unique_ptr<int> clientfd(new int(connfd));
LOG_TRACE("LAUNCHING NEW THREAD");
std::thread client_thread(ClientHandler<P, B>, std::move(clientfd));
client_thread.detach();
}
}
/*
* client_handler - Thread function to handle a client.
* Takes the protocol's PacketManager (P) and STL container
* type for the protocol's buffer (B)
*/
template <typename P, typename B>
void ClientHandler(std::unique_ptr<int> clientfd) {
int fd = *clientfd;
LOG_TRACE("Client fd: %d", fd);
SocketManager<B> sm(fd);
P p(&sm);
p.ManagePackets();
}
}
}
|
/*
* Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
#pragma once
#include <aws/elasticbeanstalk/ElasticBeanstalk_EXPORTS.h>
#include <aws/elasticbeanstalk/ElasticBeanstalkRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/elasticbeanstalk/model/ApplicationResourceLifecycleConfig.h>
#include <utility>
namespace Aws
{
namespace ElasticBeanstalk
{
namespace Model
{
/**
*/
class AWS_ELASTICBEANSTALK_API UpdateApplicationResourceLifecycleRequest : public ElasticBeanstalkRequest
{
public:
UpdateApplicationResourceLifecycleRequest();
// Service request name is the Operation name which will send this request out,
// each operation should has unique request name, so that we can get operation's name from this request.
// Note: this is not true for response, multiple operations may have the same response name,
// so we can not get operation's name from response.
inline virtual const char* GetServiceRequestName() const override { return "UpdateApplicationResourceLifecycle"; }
Aws::String SerializePayload() const override;
protected:
void DumpBodyToUrl(Aws::Http::URI& uri ) const override;
public:
/**
* <p>The name of the application.</p>
*/
inline const Aws::String& GetApplicationName() const{ return m_applicationName; }
/**
* <p>The name of the application.</p>
*/
inline void SetApplicationName(const Aws::String& value) { m_applicationNameHasBeenSet = true; m_applicationName = value; }
/**
* <p>The name of the application.</p>
*/
inline void SetApplicationName(Aws::String&& value) { m_applicationNameHasBeenSet = true; m_applicationName = std::move(value); }
/**
* <p>The name of the application.</p>
*/
inline void SetApplicationName(const char* value) { m_applicationNameHasBeenSet = true; m_applicationName.assign(value); }
/**
* <p>The name of the application.</p>
*/
inline UpdateApplicationResourceLifecycleRequest& WithApplicationName(const Aws::String& value) { SetApplicationName(value); return *this;}
/**
* <p>The name of the application.</p>
*/
inline UpdateApplicationResourceLifecycleRequest& WithApplicationName(Aws::String&& value) { SetApplicationName(std::move(value)); return *this;}
/**
* <p>The name of the application.</p>
*/
inline UpdateApplicationResourceLifecycleRequest& WithApplicationName(const char* value) { SetApplicationName(value); return *this;}
/**
* <p>The lifecycle configuration.</p>
*/
inline const ApplicationResourceLifecycleConfig& GetResourceLifecycleConfig() const{ return m_resourceLifecycleConfig; }
/**
* <p>The lifecycle configuration.</p>
*/
inline void SetResourceLifecycleConfig(const ApplicationResourceLifecycleConfig& value) { m_resourceLifecycleConfigHasBeenSet = true; m_resourceLifecycleConfig = value; }
/**
* <p>The lifecycle configuration.</p>
*/
inline void SetResourceLifecycleConfig(ApplicationResourceLifecycleConfig&& value) { m_resourceLifecycleConfigHasBeenSet = true; m_resourceLifecycleConfig = std::move(value); }
/**
* <p>The lifecycle configuration.</p>
*/
inline UpdateApplicationResourceLifecycleRequest& WithResourceLifecycleConfig(const ApplicationResourceLifecycleConfig& value) { SetResourceLifecycleConfig(value); return *this;}
/**
* <p>The lifecycle configuration.</p>
*/
inline UpdateApplicationResourceLifecycleRequest& WithResourceLifecycleConfig(ApplicationResourceLifecycleConfig&& value) { SetResourceLifecycleConfig(std::move(value)); return *this;}
private:
Aws::String m_applicationName;
bool m_applicationNameHasBeenSet;
ApplicationResourceLifecycleConfig m_resourceLifecycleConfig;
bool m_resourceLifecycleConfigHasBeenSet;
};
} // namespace Model
} // namespace ElasticBeanstalk
} // namespace Aws
|
#ifndef PARTICLECONSTRAINT_H
#define PARTICLECONSTRAINT_H
#include "api_effex.h"
/* Example shows how to create a custom Effex Constraint */
class ParticleConstraint : public FXAPI::FXConstraintData
{
private:
typedef FXAPI::FXConstraintData Base;
Float_C4D offset;
public:
virtual Bool Init(GeListNode *node);
virtual bool FillData (BaseObject* node);
virtual bool FillPorts (BaseObject* node , FXAPI::FXServer* server);
virtual void ClearPorts (void);
virtual bool IsParticleConstraint (void) const;
virtual void PrecomputeConstraint (void* t_data);
virtual void FreePrecomputeConstraint(void);
virtual bool GetConstraint (const NAVIE_GLOBAL::vector3d& position, double& src_value, void* local_data, int cpu = 0);
virtual bool GetParticleConstraint (const NAVIE_GLOBAL::vector3d& position, double& src_value, void* local_data, int cpu = 0, const void* t_particle = NULL);
static NodeData *Alloc(void) { return NewObj(ParticleConstraint); }
};
#endif |
// generated by Fast Light User Interface Designer (fluid) version 1.0300
#ifndef CubeMapChooser_h
#define CubeMapChooser_h
#include <FL/Fl.H>
#include <FL/Fl_Menu_Window.H>
#include <FL/Fl_Group.H>
#include <FL/Fl_File_Input.H>
#include <FL/Fl_Light_Button.H>
#include <FL/Fl_Button.H>
#include <FL/Fl_File_Chooser.H>
#include <string>
class TextureMap;
class GraphicalUI;
class CubeMapChooser {
GraphicalUI* caller;
Fl_Menu_Window* w;
Fl_Button* ok;
Fl_Button* cancel;
Fl_File_Input* fi[6];
Fl_Light_Button* fb[6];
TextureMap* cubeFace[6];
std::string fn[6];
std::string btnMsg[6];
typedef void (*fptrarray) (Fl_Widget*, void*);
static void cb_ok(Fl_Widget* o, void* v);
static void cb_cancel(Fl_Widget* o, void* v);
static void cb_ffi (Fl_Widget* o, int i);
static void cb_ffb (Fl_Widget* o, int i);
static void cb_xpi (Fl_Widget* o, void* v);
static void cb_xni (Fl_Widget* o, void* v);
static void cb_ypi (Fl_Widget* o, void* v);
static void cb_yni (Fl_Widget* o, void* v);
static void cb_zpi (Fl_Widget* o, void* v);
static void cb_zni (Fl_Widget* o, void* v);
static void cb_xpb (Fl_Widget* o, void* v);
static void cb_xnb (Fl_Widget* o, void* v);
static void cb_ypb (Fl_Widget* o, void* v);
static void cb_ynb (Fl_Widget* o, void* v);
static void cb_zpb (Fl_Widget* o, void* v);
static void cb_znb (Fl_Widget* o, void* v);
fptrarray cb_fi[6];
fptrarray cb_fb[6];
public:
CubeMapChooser();
void setCaller(GraphicalUI* c) { caller = c; }
void show();
void hide();
};
#endif
|
/*
* DO NOT EDIT. THIS FILE IS GENERATED FROM /home/vbox/tinderbox/4.3-sdk/src/libs/xpcom18a4/xpcom/threads/nsITimerManager.idl
*/
#ifndef __gen_nsITimerManager_h__
#define __gen_nsITimerManager_h__
#ifndef __gen_nsISupports_h__
#include "nsISupports.h"
#endif
/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif
/* starting interface: nsITimerManager */
#define NS_ITIMERMANAGER_IID_STR "8fce8c6a-1dd2-11b2-8352-8cdd2b965efc"
#define NS_ITIMERMANAGER_IID \
{0x8fce8c6a, 0x1dd2, 0x11b2, \
{ 0x83, 0x52, 0x8c, 0xdd, 0x2b, 0x96, 0x5e, 0xfc }}
class NS_NO_VTABLE nsITimerManager : public nsISupports {
public:
NS_DEFINE_STATIC_IID_ACCESSOR(NS_ITIMERMANAGER_IID)
/**
* A flag that turns on the use of idle timers on the main thread.
* this should only be called once.
*
* By default, idle timers are off.
*
* One this is set to TRUE, you are expected to call hasIdleTimers/fireNextIdleTimer
* when you have time in your main loop.
*/
/* attribute boolean useIdleTimers; */
NS_IMETHOD GetUseIdleTimers(PRBool *aUseIdleTimers) = 0;
NS_IMETHOD SetUseIdleTimers(PRBool aUseIdleTimers) = 0;
/* boolean hasIdleTimers (); */
NS_IMETHOD HasIdleTimers(PRBool *_retval) = 0;
/* void fireNextIdleTimer (); */
NS_IMETHOD FireNextIdleTimer(void) = 0;
};
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSITIMERMANAGER \
NS_IMETHOD GetUseIdleTimers(PRBool *aUseIdleTimers); \
NS_IMETHOD SetUseIdleTimers(PRBool aUseIdleTimers); \
NS_IMETHOD HasIdleTimers(PRBool *_retval); \
NS_IMETHOD FireNextIdleTimer(void);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSITIMERMANAGER(_to) \
NS_IMETHOD GetUseIdleTimers(PRBool *aUseIdleTimers) { return _to GetUseIdleTimers(aUseIdleTimers); } \
NS_IMETHOD SetUseIdleTimers(PRBool aUseIdleTimers) { return _to SetUseIdleTimers(aUseIdleTimers); } \
NS_IMETHOD HasIdleTimers(PRBool *_retval) { return _to HasIdleTimers(_retval); } \
NS_IMETHOD FireNextIdleTimer(void) { return _to FireNextIdleTimer(); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSITIMERMANAGER(_to) \
NS_IMETHOD GetUseIdleTimers(PRBool *aUseIdleTimers) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetUseIdleTimers(aUseIdleTimers); } \
NS_IMETHOD SetUseIdleTimers(PRBool aUseIdleTimers) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetUseIdleTimers(aUseIdleTimers); } \
NS_IMETHOD HasIdleTimers(PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->HasIdleTimers(_retval); } \
NS_IMETHOD FireNextIdleTimer(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->FireNextIdleTimer(); }
#if 0
/* Use the code below as a template for the implementation class for this interface. */
/* Header file */
class nsTimerManager : public nsITimerManager
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSITIMERMANAGER
nsTimerManager();
private:
~nsTimerManager();
protected:
/* additional members */
};
/* Implementation file */
NS_IMPL_ISUPPORTS1(nsTimerManager, nsITimerManager)
nsTimerManager::nsTimerManager()
{
/* member initializers and constructor code */
}
nsTimerManager::~nsTimerManager()
{
/* destructor code */
}
/* attribute boolean useIdleTimers; */
NS_IMETHODIMP nsTimerManager::GetUseIdleTimers(PRBool *aUseIdleTimers)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsTimerManager::SetUseIdleTimers(PRBool aUseIdleTimers)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* boolean hasIdleTimers (); */
NS_IMETHODIMP nsTimerManager::HasIdleTimers(PRBool *_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void fireNextIdleTimer (); */
NS_IMETHODIMP nsTimerManager::FireNextIdleTimer()
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* End of implementation class template. */
#endif
#endif /* __gen_nsITimerManager_h__ */
|
#ifndef design_patterns_builder_fat_people_builder_h
#define design_patterns_builder_fat_people_builder_h
#include "people_builder.h"
#include "people.h"
class FatPeopleBuilder : public PeopleBuilder {
public:
FatPeopleBuilder() {}
void MakeHead() override
{ people_->AddPart("Fat head"); }
void MakeBody() override
{ people_->AddPart("Fat body"); }
void MakeArms() override
{ people_->AddPart("Fat arms"); }
void MakeLegs() override
{ people_->AddPart("Fat legs"); }
};
#endif
|
/*
* hellobug.c - "hello, world" program with a bug
*/
/* $begin hellobug */
#include "csapp.h"
void *thread(void *vargp);
int main() {
pthread_t tid;
Pthread_create(&tid, NULL, thread, NULL);
exit(0);
}
/* thread routine */
void *thread(void *vargp) {
Sleep(1);
printf("Hello, world!\n");
return NULL;
}
/* $end hellobug */
|
/*
* File: IAS-QSystemLib/src/qs/Impl/shm/shared/Session.h
*
* Copyright (C) 2015, Albert Krzymowski
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef _IAS_QS_Session_Shared_Session_H_
#define _IAS_QS_Session_Shared_Session_H_
#include <commonlib/commonlib.h>
#include "SessionData.h"
#include "../Attachment.h"
namespace IAS {
namespace QS {
namespace SHM {
namespace Shared {
class MsgEntry;
class Subscription;
/*************************************************************************/
/** The Session class.
*
*/
class Session {
public:
typedef unsigned short int SessionSize;
typedef short unsigned int ID;
enum Mode{
SM_NotAllocated,
SM_Transacted,
SM_AutoCommit
};
Session();
~Session();
void setupTransacted();
void setupAutoCommit();
void commit();
void rollback();
void close();
void tryToClean();
JournalObjectEntry* allocateJOE();
class Holder{
public:
Holder(Session* pSession = 0)
:pSession(pSession){};
~Holder(){ close(); }
void set(Session *pSession){
close();
this->pSession=pSession;
}
bool operator!()const { return pSession == NULL; }
Session* operator=(Session *pSession){ set(pSession); return pSession;}
inline Session* operator->(){
IAS_CHECK_IF_NULL(pSession);
return pSession;
};
private:
Session *pSession;
inline void close(){
if(pSession){
pSession->close();
}
}
};
/*
* Some utilities.
*/
inline bool isAllocated(){
Mutex::Locker locker(mutex);
return isAllocatedNoLock();
}
inline bool isFree() {
Mutex::Locker locker(mutex);
return iMode == SM_NotAllocated;
}
inline bool isType(Mode iMode) {
Mutex::Locker locker(mutex);
return this->iMode == iMode;
}
protected:
Mutex mutex;
Mode iMode;
Mutex mutexAlive;
QS::SHM::QueueAllocator<SessionData>::PtrHolder ptrSessionData;
inline bool isAllocatedNoLock(){
return iMode != SM_NotAllocated;
}
void setupNoLock(Mode iMode);
void rollbackNoLock();
void closeNoLock();
};
}
}
}
}
#endif /* _IAS_QS_Session_SessionShared_H_ */
|
//
// QLParserTest.h
//
// Definition of the QLParserTest class.
//
// Copyright (c) 2007-2014, Applied Informatics Software Engineering GmbH.
// All rights reserved.
//
// SPDX-License-Identifier: GPL-3.0-only
//
#ifndef QLParserTest_INCLUDED
#define QLParserTest_INCLUDED
#include "Poco/OSP/OSP.h"
#include "CppUnit/TestCase.h"
class QLParserTest: public CppUnit::TestCase
{
public:
QLParserTest(const std::string& name);
~QLParserTest();
void testParser();
void setUp();
void tearDown();
static CppUnit::Test* suite();
private:
};
#endif // QLParserTest_INCLUDED
|
/* Copyright(c) 2015 ANECT a.s.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef __SOAP_H__
#define __SOAP_H__
#include "definitions.h"
#ifdef _HAVE_LIBCURL
typedef struct {
char *memory;
size_t size;
} MemoryStruct;
#endif
char *soap_request(const char *URL, const char *action, const char *request);
#endif
|
#pragma once
#include "il2cpp-config.h"
#ifndef _MSC_VER
# include <alloca.h>
#else
# include <malloc.h>
#endif
#include <stdint.h>
// System.Object
struct Il2CppObject;
// System.Security.Cryptography.X509Certificates.X509Certificate
struct X509Certificate_t3432067208;
// System.Security.Cryptography.X509Certificates.X509Chain
struct X509Chain_t2831591730;
// System.IAsyncResult
struct IAsyncResult_t537683269;
// System.AsyncCallback
struct AsyncCallback_t1363551830;
#include "mscorlib_System_MulticastDelegate2585444626.h"
#include "System_System_Net_Security_SslPolicyErrors3085256601.h"
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Net.Security.RemoteCertificateValidationCallback
struct RemoteCertificateValidationCallback_t4087051103 : public MulticastDelegate_t2585444626
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
|
/*
========================================================================
Name : TRamContainer.h
Author : Usanov-Kornilov Nikolay (aka Kolay)
Copyright :
Contacts:
kolayuk@mail.ru
http://kolaysoft.ru
(c) KolaySoft, 2010
Description :
========================================================================
*/
#ifndef TRAMCONTAINER_H
#define TRAMCONTAINER_H
// [[[ begin generated region: do not modify [Generated Includes]
#include <coecntrl.h>
// ]]] end generated region [Generated Includes]
// [[[ begin [Event Handler Includes]
// ]]] end [Event Handler Includes]
// [[[ begin generated region: do not modify [Generated Forward Declarations]
class MEikCommandObserver;
// ]]] end generated region [Generated Forward Declarations]
/**
* Container class for TRamContainer
*
* @class CTRamContainer TRamContainer.h
*/
class CTRamContainer : public CCoeControl
{
public:
// constructors and destructor
CTRamContainer();
static CTRamContainer* NewL(
const TRect& aRect,
const CCoeControl* aParent,
MEikCommandObserver* aCommandObserver );
static CTRamContainer* NewLC(
const TRect& aRect,
const CCoeControl* aParent,
MEikCommandObserver* aCommandObserver );
void ConstructL(
const TRect& aRect,
const CCoeControl* aParent,
MEikCommandObserver* aCommandObserver );
virtual ~CTRamContainer();
public:
// from base class CCoeControl
TInt CountComponentControls() const;
CCoeControl* ComponentControl( TInt aIndex ) const;
TKeyResponse OfferKeyEventL(
const TKeyEvent& aKeyEvent,
TEventCode aType );
void HandleResourceChange( TInt aType );
protected:
// from base class CCoeControl
void SizeChanged();
private:
// from base class CCoeControl
void Draw( const TRect& aRect ) const;
private:
void InitializeControlsL();
void LayoutControls();
CCoeControl* iFocusControl;
MEikCommandObserver* iCommandObserver;
// [[[ begin generated region: do not modify [Generated Methods]
public:
// ]]] end generated region [Generated Methods]
// [[[ begin generated region: do not modify [Generated Type Declarations]
public:
// ]]] end generated region [Generated Type Declarations]
// [[[ begin generated region: do not modify [Generated Instance Variables]
private:
// ]]] end generated region [Generated Instance Variables]
// [[[ begin [Overridden Methods]
protected:
// ]]] end [Overridden Methods]
// [[[ begin [User Handlers]
protected:
// ]]] end [User Handlers]
public:
enum TControls
{
// [[[ begin generated region: do not modify [Generated Contents]
// ]]] end generated region [Generated Contents]
// add any user-defined entries here...
ELastControl
};
};
#endif // TRAMCONTAINER_H
|
/*
* Bean Java VM
* Copyright (C) 2005-2015 Christian Lins <christian@lins.me>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <vm.h>
void do_IFNONNULL(Thread *thread)
{
#ifdef DEBUG
printf("\tIFNONNULL\n");
#endif
}
|
/**
* Appcelerator Titanium Mobile
* Copyright (c) 2010 by QuickDic, Inc. All Rights Reserved.
* Licensed under the terms of the Apache Public License
* Please see the LICENSE included with this distribution for details.
*
* WARNING: This is generated code. Modify at your own risk and without support.
*/
#import "TiBase.h"
#import "TiUIViewProxy.h"
#ifdef USE_TI_UIIOSADVIEW
@interface TiUIiOSAdViewProxy : TiUIViewProxy {
}
// Need these for sanity checking and constants, so they
// must be class-available rather than instance-available
+(NSString*)portraitSize;
+(NSString*)landscapeSize;
@end
#endif
|
//
// GTEntityMapping.h
// LibraryExample
//
// Created by Speechkey on 25.01.2013.
// Copyright (c) 2013 Speechkey. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <RestKit/RestKit.h>
@interface GTEntityMapping : NSObject
@property (nonatomic, strong) Class entityClass;
@property (nonatomic, strong) NSArray *identificationAttributes;
@property (nonatomic, strong) NSArray *attributeMappings;
@property (nonatomic, strong) NSArray *relationships;
@property (nonatomic, strong) NSArray *connections;
@property (nonatomic, strong) NSString *path;
- (RKEntityMapping *)managedEntityMappingWithManagedObjectStore:(RKManagedObjectStore *)managedObjectStore;
- (RKObjectMapping *)entityRequestMapping;
- (RKResponseDescriptor *)managedEntityResponseDescriptorWithManagedObjectStore:(RKManagedObjectStore *)managedObjectStore;
- (RKRequestDescriptor *)entityRequestDescriptor;
@end
|
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
#pragma once
#include "JSDestructibleObject.h"
namespace JSC {
// This class is used as a base for classes such as String,
// Number, Boolean and Date which are wrappers for primitive types.
class JSWrapperObject : public JSDestructibleObject {
public:
typedef JSDestructibleObject Base;
static size_t allocationSize(size_t inlineCapacity)
{
ASSERT_UNUSED(inlineCapacity, !inlineCapacity);
return sizeof(JSWrapperObject);
}
JSValue internalValue() const;
void setInternalValue(VM&, JSValue);
static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue prototype)
{
return Structure::create(vm, globalObject, prototype, TypeInfo(ObjectType, StructureFlags), info());
}
static ptrdiff_t internalValueOffset() { return OBJECT_OFFSETOF(JSWrapperObject, m_internalValue); }
static ptrdiff_t internalValueCellOffset()
{
#if USE(JSVALUE64)
return internalValueOffset();
#else
return internalValueOffset() + OBJECT_OFFSETOF(EncodedValueDescriptor, asBits.payload);
#endif
}
protected:
explicit JSWrapperObject(VM&, Structure*);
JS_EXPORT_PRIVATE static void visitChildren(JSCell*, SlotVisitor&);
private:
WriteBarrier<Unknown> m_internalValue;
};
inline JSWrapperObject::JSWrapperObject(VM& vm, Structure* structure)
: JSDestructibleObject(vm, structure)
{
}
inline JSValue JSWrapperObject::internalValue() const
{
return m_internalValue.get();
}
inline void JSWrapperObject::setInternalValue(VM& vm, JSValue value)
{
ASSERT(value);
ASSERT(!value.isObject());
m_internalValue.set(vm, this, value);
}
} // namespace JSC
|
#include "test.h"
char *str = "hello\nworld";
void test(buffer_t *buf, mark_t *cur) {
char *data;
bint_t data_len;
mark_move_end(cur);
mark_delete_before(cur, 1);
buffer_get(buf, &data, &data_len);
ASSERT("delb", 0, strncmp("hello\nworl", data, data_len));
}
|
#ifndef SCOREBOARD_H
#define SCOREBOARD_H
class Scoreboard {
public:
Scoreboard();
void update_p1(int score);
void increment_p1();
void decrement_p1();
int p1();
void update_p2(int score);
void increment_p2();
void decrement_p2();
int p2();
protected:
int _p1;
int _p2;
};
#endif
|
//
// UIView+TipMessage.h
// MyElong
//
// Created by yangfan on 15/6/17.
// Copyright (c) 2015年 lvyue. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface UIView (TipMessage)
// 生成一个透明的view
+ (id)clearViewWithFrame:(CGRect)rect;
// 隐藏提示框
- (void)removeTipMessage;
// 在view中间显示提示框
- (void)showTipMessage:(NSString *)tips;
// 加入loading动画
- (void)startLoadingByStyle:(UIActivityIndicatorViewStyle)style;
- (void)startLoadingByStyle:(UIActivityIndicatorViewStyle)style AtPoint:(CGPoint)activityCenter;
- (void)startUniformLoading; // 黑底圆角的loading框
// 结束loading动画
- (void)endLoading;
- (void)endUniformLoading;
//将试图转换为Image
- (UIImage *) imageByRenderingViewWithSize:(CGSize) size;
// 显示页面实时提醒的方法
- (void)alertMessage:(NSString *)tipString;
- (void)alertMessage:(NSString *)tipString InRect:(CGRect)rect;
- (void)alertMessage:(NSString *)tipString InRect:(CGRect)rect arrowStartPoint:(CGPoint)point;
- (void)removeAlert;
@end
|
/**
* Appcelerator Titanium Mobile
* Copyright (c) 2009-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.
*
* WARNING: This is generated code. Modify at your own risk and without support.
*/
// A good bit of this code was derived from the Three20 project
// and was customized to work inside StoreApp
//
// All modifications by StoreApp are licensed under
// the Apache License, Version 2.0
//
//
// Copyright 2009 Facebook
//
// 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.
//
#ifdef USE_TI_UIDASHBOARDVIEW
#import <Foundation/Foundation.h>
@class LauncherItem;
@interface LauncherButton : UIButton {
BOOL dragging;
BOOL editing;
LauncherItem *item;
UIButton *button;
UIButton *closeButton;
UIButton *badge;
}
@property(nonatomic,readwrite,retain) LauncherItem *item;
@property(nonatomic,readonly) UIButton *closeButton;
@property(nonatomic) BOOL dragging;
@property(nonatomic) BOOL editing;
@end
#endif |
/**
* Appcelerator Titanium Mobile
* Copyright (c) 2009-2012 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.
*
* WARNING: This is generated code. Modify at your own risk and without support.
*/
#import "TiRootController.h"
#import "TiWindowProxy.h"
/**
The class represent root controller in a view hierarchy.
*/
@protocol TiUIViewControllerIOS6Support <NSObject>
/* Legacy support: UIViewController methods introduced in iOS 6.0
* For those still on 5.1, we have to declare these methods so the
* the compiler knows the right return datatypes.
*/
@optional
- (BOOL)shouldAutorotate;
- (NSUInteger)supportedInterfaceOrientations;
// Returns interface orientation masks.
- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation;
- (BOOL)isBeingDismissed;
@end
@interface TiRootViewController : UIViewController<UIApplicationDelegate,TiRootController,TiOrientationController,TiUIViewControllerIOS6Support> {
@private
//Presentation: background image and color.
UIColor * backgroundColor;
UIImage * backgroundImage;
//View Controller stack:
/*
* Due to historical reasons, there are three arrays that track views/
* windows/viewcontrollers that are 'opened' on the rootViewController.
* For best results, this should be realigned with a traditional container-
* style view controller, perhaps even something proxy-agnostic in the
* future. TODO: Refactor viewController arrays.
*/
NSMutableArray *windowViewControllers;
NSMutableArray * viewControllerStack;
NSMutableArray * windowProxies;
//While no windows are onscreen, present default.png
UIImageView * defaultImageView;
//Orientation handling:
TiOrientationFlags allowedOrientations;
UIInterfaceOrientation orientationHistory[4]; // Physical device orientation history
BOOL forceOrientation; // Force orientation flag
UIInterfaceOrientation windowOrientation; // Current emulated orientation
BOOL isCurrentlyVisible;
//Keyboard handling -- This can probably be done in a better way.
BOOL updatingAccessoryView;
UIView * enteringAccessoryView; //View that will enter.
UIView * accessoryView; //View that is onscreen.
UIView * leavingAccessoryView; //View that is leaving the screen.
TiViewProxy<TiKeyboardFocusableView> * keyboardFocusedProxy; //View whose becoming key affects things.
CGRect startFrame; //Where the keyboard was before the handling
CGRect targetedFrame; //The keyboard place relative to where the accessoryView is moving;
CGRect endFrame; //Where the keyboard will be after the handling
BOOL keyboardVisible; //If false, use enterCurve. If true, use leaveCurve.
UIViewAnimationCurve enterCurve;
CGFloat enterDuration;
UIViewAnimationCurve leaveCurve;
CGFloat leaveDuration;
BOOL forcingStatusBarOrientation;
}
/**
Returns visibility of on-screen keyboard.
*/
@property(nonatomic,readonly) BOOL keyboardVisible;
/*
Returns image view being displayed while application's view is loading.
*/
@property(nonatomic,readonly) UIImageView * defaultImageView;
/**
Returns current window orientation.
*/
@property(nonatomic,readonly) UIInterfaceOrientation windowOrientation;
/*
Tells the controller to hides and release the default image view.
@see defaultImageView
*/
-(void)dismissDefaultImageView;
/*
Provides access to background color of the view represented by the root view controller.
@see backgroundImage
*/
@property(nonatomic,readwrite,retain) UIColor * backgroundColor;
/*
Provides access to background image of the view represented by the root view controller.
@see backgroundColor
*/
@property(nonatomic,readwrite,retain) UIImage * backgroundImage;
/**
Returns currently focused view controller.
@return Focused view controller.
*/
-(UIViewController *)focusedViewController;
-(void)windowFocused:(UIViewController*)focusedViewController;
-(void)windowClosed:(UIViewController *)closedViewController;
/**
Tells the controller to resize its view to the size of main screen.
@return The bounds of the view after resize.
*/
-(CGRect)resizeView;
/**
Tells the controller to resize its view to the size of main screen adjusted according to visibility of status bar.
@return The bounds of the view after resize.
*/
-(CGRect)resizeViewForStatusBarHidden;
/**
Tells the controller to reposition all its subviews.
*/
-(void)repositionSubviews;
-(void)refreshOrientationWithDuration:(NSTimeInterval) duration;
-(NSTimeInterval)suggestedRotationDuration;
/**
Tells the controller to rotate to the specified orientation.
@param newOrientation The new orientation.
@param duration The rotation animation duration.
*/
-(void)manuallyRotateToOrientation:(UIInterfaceOrientation)newOrientation duration:(NSTimeInterval)duration;
-(UIInterfaceOrientation)lastValidOrientation;
/**
Tells the controller to open the specified window proxy.
@param window The window proxy to open.
@param args Reserved for future use.
*/
- (void)openWindow:(TiWindowProxy *)window withObject:(id)args;
/**
Tells the controller to close the specified window proxy.
@param window The window proxy to close.
@param args Reserved for future use.
*/
- (void)closeWindow:(TiWindowProxy *)window withObject:(id)args;
@end
@interface TiRootViewController (unsupported_internal)
/*
* Methods declarations stored or moved in this category are NOT to be used
* by modules, as these methods can be added or removed from pageflip as
* needed, and have not been vetted for long-term use. This category itself
* may be moved to a private header later on, even.
*/
-(void)dismissKeyboard;
-(TiWindowProxy*)topWindow;
@property(nonatomic,readonly) TiViewProxy<TiKeyboardFocusableView> * keyboardFocusedProxy;
@end
|
//
// RadarSeries.h
// SmartChart
//
// Created by Vincent.Niu on 13-6-20.
// Copyright (c) 2013年 Lecast. All rights reserved.
//
#import "RoundSeries.h"
@interface RadarSeries : RoundSeries
{
NSMutableArray * points;
NSObject * data;
CGFloat areaSize;
BOOL isFill;
}
@property (nonatomic, retain) NSMutableArray * points;
@property (nonatomic, retain) NSObject * data;
@property (nonatomic) CGFloat areaSize;
@property (nonatomic) BOOL isFill;
- (id) init : (UIColor *) mColor;
@end
|
/* $NetBSD: plcomvar.h,v 1.15 2014/02/21 16:08:19 skrll Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou. 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.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by Christopher G. Demetriou
* for the NetBSD Project.
* 4. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR 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.
*/
#include "rnd.h"
#include "opt_multiprocessor.h"
#include "opt_lockdebug.h"
#include "opt_plcom.h"
#include "opt_kgdb.h"
#ifdef RND_COM
#include <sys/rnd.h>
#endif
#include <sys/callout.h>
#include <sys/timepps.h>
struct plcom_instance;
int plcomcnattach (struct plcom_instance *, int, int, tcflag_t, int);
void plcomcndetach (void);
#ifdef KGDB
int plcom_kgdb_attach (struct plcom_instance *, int, int, tcflag_t, int);
#endif
int plcom_is_console (bus_space_tag_t, bus_addr_t, bus_space_handle_t *);
/* Hardware flag masks */
#define PLCOM_HW_NOIEN 0x01
#define PLCOM_HW_FIFO 0x02
#define PLCOM_HW_HAYESP 0x04
#define PLCOM_HW_FLOW 0x08
#define PLCOM_HW_DEV_OK 0x20
#define PLCOM_HW_CONSOLE 0x40
#define PLCOM_HW_KGDB 0x80
#define PLCOM_HW_TXFIFO_DISABLE 0x100
/* Buffer size for character buffer */
#define PLCOM_RING_SIZE 2048
struct plcom_instance {
u_int pi_type;
#define PLCOM_TYPE_PL010 0
#define PLCOM_TYPE_PL011 1
uint32_t pi_flags; /* flags for this PLCOM */
#define PLC_FLAG_USE_DMA 0x0001
#define PLC_FLAG_32BIT_ACCESS 0x0002
void *pi_cookie;
bus_space_tag_t pi_iot;
bus_space_handle_t pi_ioh;
bus_addr_t pi_iobase;
bus_addr_t pi_size;
struct plcom_registers *pi_regs;
};
struct plcomcons_info {
int rate;
int frequency;
int type;
tcflag_t cflag;
};
struct plcom_softc {
device_t sc_dev;
struct tty *sc_tty;
void *sc_si;
struct callout sc_diag_callout;
int sc_frequency;
struct plcom_instance sc_pi;
u_int sc_overflows,
sc_floods,
sc_errors;
int sc_hwflags,
sc_swflags;
u_int sc_fifolen;
u_int sc_r_hiwat,
sc_r_lowat;
u_char *volatile sc_rbget,
*volatile sc_rbput;
volatile u_int sc_rbavail;
u_char *sc_rbuf,
*sc_ebuf;
u_char *sc_tba;
u_int sc_tbc,
sc_heldtbc;
volatile u_char sc_rx_flags,
#define RX_TTY_BLOCKED 0x01
#define RX_TTY_OVERFLOWED 0x02
#define RX_IBUF_BLOCKED 0x04
#define RX_IBUF_OVERFLOWED 0x08
#define RX_ANY_BLOCK 0x0f
sc_tx_busy,
sc_tx_done,
sc_tx_stopped,
sc_st_check,
sc_rx_ready;
volatile u_char sc_heldchange;
volatile u_int sc_cr, sc_ratel, sc_rateh, sc_imsc;
volatile u_int sc_msr, sc_msr_delta, sc_msr_mask;
volatile u_char sc_mcr, sc_mcr_active, sc_lcr;
u_char sc_mcr_dtr, sc_mcr_rts, sc_msr_cts, sc_msr_dcd;
u_int sc_fifo;
/* Support routine to program mcr lines for PL010, if present. */
void (*sc_set_mcr)(void *, int, u_int);
void *sc_set_mcr_arg;
/* power management hooks */
int (*enable) (struct plcom_softc *);
void (*disable) (struct plcom_softc *);
int enabled;
/* PPS signal on DCD, with or without inkernel clock disciplining */
u_char sc_ppsmask; /* pps signal mask */
u_char sc_ppsassert; /* pps leading edge */
u_char sc_ppsclear; /* pps trailing edge */
pps_info_t ppsinfo;
pps_params_t ppsparam;
#ifdef RND_COM
krndsource_t rnd_source;
#endif
kmutex_t sc_lock;
};
#if 0
int plcomprobe1 (bus_space_tag_t, bus_space_handle_t);
#endif
int plcomintr (void *);
void plcom_attach_subr (struct plcom_softc *);
int plcom_detach (device_t, int);
int plcom_activate (device_t, enum devact);
|
/***********************************************************************//**
* IngameFront.h
* Enlight Game Application
*
* Created by Ryoutarou Kishi on 2009/11/11.
* Copyright 2009 Altoterras Corporation. All rights reserved.
*
**//***********************************************************************/
#ifndef _SRCR_GUI_INGAME_FRONT_H_
#define _SRCR_GUI_INGAME_FRONT_H_
////////////////////////////////////////////////////////////////////////////
// インクルードファイル
#include "../Base.h"
#include "../../tfw/framemod/FrameExecDraw.h"
////////////////////////////////////////////////////////////////////////////
// クラス
TFW_BEGIN_NS
template<class TYPE> class Point;
typedef Point<f32> PointF32;
template<class TYPE> class Rect;
typedef Rect<f32> RectF32;
typedef Rect<f32> RectF32;
class Texture;
class Panel;
TFW_END_NS
SRCR_BEGIN_NS
class Game;
/*---------------------------------------------------------------------*//**
* インゲーム(通常操作画面)のフロントエンド GUI
*
**//*---------------------------------------------------------------------*/
class IngameFront : public FrameExecDraw
{
//======================================================================
// 定数
public:
// パネル種別
enum ButtonKind
{
BTN_MENU,
BTN_SOUMA,
BTN_MEDITATION,
BTN_GUARDCHARGE,
BTN_ATTRACT,
BTN_CURE,
NUM_BTN
};
// パネル状態
static const u8 BSTAT_OFF = 0;
static const u8 BSTAT_ON = 1;
static const u8 BSTAT_BREAKABLE = 2;
//======================================================================
// クラス
private:
class Button
{
public:
Panel* _pnl;
u8 _bstat;
bool _isEnable;
public:
Button();
~Button();
bool create(Texture* texGuiRef, const RectF32* rectPanel, const RectF32* uvPanel);
void destroy();
};
//======================================================================
// メソッド
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// アクセサ
public:
// 外部有効かどうかを得る
inline bool isEnable() const { return _isEnableOut; }
// 外部有効かどうかを設定する
inline void setEnable(bool isEnable) { _isEnableOut = isEnable; }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// 外部サービス
public:
void setEneblePanel(ButtonKind btnk, bool isEnable);
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// 内部制御
public:
IngameFront();
virtual ~IngameFront();
bool create(Texture* texGuiRef);
void destroy();
void exec(ExecRes* res, const ExecCtx* ec); // フレーム制御
void draw(const RenderCtx* rc); // 描画
void notifyResizeView();
void notifyChangeMode(s32 gmode);
void notifyChangeLeader();
//======================================================================
// 変数
private:
bool _isEnableOut;
bool _isEnableSelf;
Button _btn[NUM_BTN];
Panel* _pnlBreak;
s32 _ipcLeaderCur;
};
SRCR_END_NS
////////////////////////////////////////////////////////////////////////////
#endif // _SRCR_GUI_INGAME_FRONT_H_
|
/*
* Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
#pragma once
#include <aws/guardduty/GuardDuty_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/guardduty/model/UnprocessedAccount.h>
#include <utility>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace GuardDuty
{
namespace Model
{
class AWS_GUARDDUTY_API InviteMembersResult
{
public:
InviteMembersResult();
InviteMembersResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
InviteMembersResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
/**
* <p>A list of objects containing the unprocessed account and a result string
* explaining why it was unprocessed.</p>
*/
inline const Aws::Vector<UnprocessedAccount>& GetUnprocessedAccounts() const{ return m_unprocessedAccounts; }
/**
* <p>A list of objects containing the unprocessed account and a result string
* explaining why it was unprocessed.</p>
*/
inline void SetUnprocessedAccounts(const Aws::Vector<UnprocessedAccount>& value) { m_unprocessedAccounts = value; }
/**
* <p>A list of objects containing the unprocessed account and a result string
* explaining why it was unprocessed.</p>
*/
inline void SetUnprocessedAccounts(Aws::Vector<UnprocessedAccount>&& value) { m_unprocessedAccounts = std::move(value); }
/**
* <p>A list of objects containing the unprocessed account and a result string
* explaining why it was unprocessed.</p>
*/
inline InviteMembersResult& WithUnprocessedAccounts(const Aws::Vector<UnprocessedAccount>& value) { SetUnprocessedAccounts(value); return *this;}
/**
* <p>A list of objects containing the unprocessed account and a result string
* explaining why it was unprocessed.</p>
*/
inline InviteMembersResult& WithUnprocessedAccounts(Aws::Vector<UnprocessedAccount>&& value) { SetUnprocessedAccounts(std::move(value)); return *this;}
/**
* <p>A list of objects containing the unprocessed account and a result string
* explaining why it was unprocessed.</p>
*/
inline InviteMembersResult& AddUnprocessedAccounts(const UnprocessedAccount& value) { m_unprocessedAccounts.push_back(value); return *this; }
/**
* <p>A list of objects containing the unprocessed account and a result string
* explaining why it was unprocessed.</p>
*/
inline InviteMembersResult& AddUnprocessedAccounts(UnprocessedAccount&& value) { m_unprocessedAccounts.push_back(std::move(value)); return *this; }
private:
Aws::Vector<UnprocessedAccount> m_unprocessedAccounts;
};
} // namespace Model
} // namespace GuardDuty
} // namespace Aws
|
//
// Created by lee on 17. 6. 5.
//
#ifndef PLAYTORRENT_CONNECTION_H
#define PLAYTORRENT_CONNECTION_H
#include <memory>
#include <sys/epoll.h>
#include <mutex>
#include <deque>
#include <pthread.h>
namespace PlayTorrent {
enum ConnectionState {
Idle,
Connected,
Bind,
Connecting,
Suspended
};
class Message {
public:
uint8_t* bytesPtr;
size_t length;
Message(uint8_t* bytes, size_t length) // auto delete
:bytesPtr(bytes)
,length(length){
}
~Message() {
delete[] bytesPtr;
}
};
class ConnectionCallback {
public:
virtual void onConnectionLost() = 0;
virtual void onReceived(uint8_t* received, size_t length) = 0;
};
class Connection {
public:
Connection();
virtual ~Connection();
bool requestConnect(std::string host, int port);
inline int getId() {return mId;}
void setConnectionCallback(ConnectionCallback* callback);
void requestSendMessage(uint8_t* bytes, int length);
void onSendMessageQueued();
void onReceivedFromSocket();
void onConnectionLost();
bool bindServerConnection(short port);
private:
void doSelectLooping();
int connectByIp4(std::string host, int port);
bool addSocketToEpoll(int sockFd);
private:
// mutex
const std::mutex CONNECTION_LOCK;
const std::mutex SENDING_BUFFER_LOCK;
int mId;
std::shared_ptr<ConnectionCallback> mCallback;
// poll event
int mPollFd;
int mSendRequestEvent;
struct epoll_event *mEventPollBuffer;
pthread_t mSelectLoopingThread;
// Connection
ConnectionState mConnectionState;
std::string mHost;
int mPort;
int mSocket;
// buffer
std::deque<std::shared_ptr<Message>> mSendMessageQueue;
const uint8_t *mReceiveBuffer;
};
}
#endif //PLAYTORRENT_CONNECTION_H
|
//
// GuestInfoViewController.h
// BeautifulShop
//
// Created by BeautyWay on 14-10-23.
// Copyright (c) 2014年 jenk. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "GuestModel.h"
#import "DealProductModel.h"
@interface GuestInfoViewController : UIViewController
@property(nonatomic,strong)GuestModel * myModel;
@property(nonatomic,strong)NSString * weixinNo;
@end
|
/*
* DO NOT EDIT. THIS FILE IS GENERATED FROM /builds/slave/rel-2.0-xr-osx64-bld/build/dom/interfaces/svg/nsIDOMSVGLineElement.idl
*/
#ifndef __gen_nsIDOMSVGLineElement_h__
#define __gen_nsIDOMSVGLineElement_h__
#ifndef __gen_nsIDOMSVGElement_h__
#include "nsIDOMSVGElement.h"
#endif
/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif
class nsIDOMSVGAnimatedLength; /* forward declaration */
/* starting interface: nsIDOMSVGLineElement */
#define NS_IDOMSVGLINEELEMENT_IID_STR "4ea07ef3-ed66-4b41-8119-4afc6d0ed5af"
#define NS_IDOMSVGLINEELEMENT_IID \
{0x4ea07ef3, 0xed66, 0x4b41, \
{ 0x81, 0x19, 0x4a, 0xfc, 0x6d, 0x0e, 0xd5, 0xaf }}
class NS_NO_VTABLE NS_SCRIPTABLE nsIDOMSVGLineElement : public nsIDOMSVGElement {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDOMSVGLINEELEMENT_IID)
/* readonly attribute nsIDOMSVGAnimatedLength x1; */
NS_SCRIPTABLE NS_IMETHOD GetX1(nsIDOMSVGAnimatedLength **aX1) = 0;
/* readonly attribute nsIDOMSVGAnimatedLength y1; */
NS_SCRIPTABLE NS_IMETHOD GetY1(nsIDOMSVGAnimatedLength **aY1) = 0;
/* readonly attribute nsIDOMSVGAnimatedLength x2; */
NS_SCRIPTABLE NS_IMETHOD GetX2(nsIDOMSVGAnimatedLength **aX2) = 0;
/* readonly attribute nsIDOMSVGAnimatedLength y2; */
NS_SCRIPTABLE NS_IMETHOD GetY2(nsIDOMSVGAnimatedLength **aY2) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIDOMSVGLineElement, NS_IDOMSVGLINEELEMENT_IID)
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIDOMSVGLINEELEMENT \
NS_SCRIPTABLE NS_IMETHOD GetX1(nsIDOMSVGAnimatedLength **aX1); \
NS_SCRIPTABLE NS_IMETHOD GetY1(nsIDOMSVGAnimatedLength **aY1); \
NS_SCRIPTABLE NS_IMETHOD GetX2(nsIDOMSVGAnimatedLength **aX2); \
NS_SCRIPTABLE NS_IMETHOD GetY2(nsIDOMSVGAnimatedLength **aY2);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIDOMSVGLINEELEMENT(_to) \
NS_SCRIPTABLE NS_IMETHOD GetX1(nsIDOMSVGAnimatedLength **aX1) { return _to GetX1(aX1); } \
NS_SCRIPTABLE NS_IMETHOD GetY1(nsIDOMSVGAnimatedLength **aY1) { return _to GetY1(aY1); } \
NS_SCRIPTABLE NS_IMETHOD GetX2(nsIDOMSVGAnimatedLength **aX2) { return _to GetX2(aX2); } \
NS_SCRIPTABLE NS_IMETHOD GetY2(nsIDOMSVGAnimatedLength **aY2) { return _to GetY2(aY2); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIDOMSVGLINEELEMENT(_to) \
NS_SCRIPTABLE NS_IMETHOD GetX1(nsIDOMSVGAnimatedLength **aX1) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetX1(aX1); } \
NS_SCRIPTABLE NS_IMETHOD GetY1(nsIDOMSVGAnimatedLength **aY1) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetY1(aY1); } \
NS_SCRIPTABLE NS_IMETHOD GetX2(nsIDOMSVGAnimatedLength **aX2) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetX2(aX2); } \
NS_SCRIPTABLE NS_IMETHOD GetY2(nsIDOMSVGAnimatedLength **aY2) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetY2(aY2); }
#if 0
/* Use the code below as a template for the implementation class for this interface. */
/* Header file */
class nsDOMSVGLineElement : public nsIDOMSVGLineElement
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIDOMSVGLINEELEMENT
nsDOMSVGLineElement();
private:
~nsDOMSVGLineElement();
protected:
/* additional members */
};
/* Implementation file */
NS_IMPL_ISUPPORTS1(nsDOMSVGLineElement, nsIDOMSVGLineElement)
nsDOMSVGLineElement::nsDOMSVGLineElement()
{
/* member initializers and constructor code */
}
nsDOMSVGLineElement::~nsDOMSVGLineElement()
{
/* destructor code */
}
/* readonly attribute nsIDOMSVGAnimatedLength x1; */
NS_IMETHODIMP nsDOMSVGLineElement::GetX1(nsIDOMSVGAnimatedLength **aX1)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* readonly attribute nsIDOMSVGAnimatedLength y1; */
NS_IMETHODIMP nsDOMSVGLineElement::GetY1(nsIDOMSVGAnimatedLength **aY1)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* readonly attribute nsIDOMSVGAnimatedLength x2; */
NS_IMETHODIMP nsDOMSVGLineElement::GetX2(nsIDOMSVGAnimatedLength **aX2)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* readonly attribute nsIDOMSVGAnimatedLength y2; */
NS_IMETHODIMP nsDOMSVGLineElement::GetY2(nsIDOMSVGAnimatedLength **aY2)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* End of implementation class template. */
#endif
#endif /* __gen_nsIDOMSVGLineElement_h__ */
|
//
// AppDelegate.h
// 导航栏透明度设置
//
// Created by 孙文君 on 15/8/7.
// Copyright (c) 2015年 sunwenjun. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface AppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@end
|
//
// JiveOpenSocial.h
// jive-ios-sdk
//
// Created by Rob Derstadt on 10/24/12.
//
// Copyright 2013 Jive Software 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 <Foundation/Foundation.h>
#import "JiveObject.h"
@class JiveEmbedded;
//! \class JiveOpenSocial
//! https://developers.jivesoftware.com/api/v3/rest/OpenSocialEntity.html
@interface JiveOpenSocial : JiveObject
//! List of ActionLinks representing actions that a person might take against an actionable resource.
@property(nonatomic, readonly, strong) NSArray* actionLinks;
//! List of URIs of Persons to which this activity should be explicitly delivered.
@property(nonatomic, readonly, strong) NSArray* deliverTo;
//! Metadata about an OpenSocial Embedded Experience associated with this activity.
@property(nonatomic, readonly, strong) JiveEmbedded* embed;
@end
|
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/mediaconnect/MediaConnect_EXPORTS.h>
#include <aws/core/AmazonSerializableWebServiceRequest.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <aws/core/http/HttpRequest.h>
namespace Aws
{
namespace MediaConnect
{
class AWS_MEDIACONNECT_API MediaConnectRequest : public Aws::AmazonSerializableWebServiceRequest
{
public:
virtual ~MediaConnectRequest () {}
void AddParametersToRequest(Aws::Http::HttpRequest& httpRequest) const { AWS_UNREFERENCED_PARAM(httpRequest); }
inline Aws::Http::HeaderValueCollection GetHeaders() const override
{
auto headers = GetRequestSpecificHeaders();
if(headers.size() == 0 || (headers.size() > 0 && headers.count(Aws::Http::CONTENT_TYPE_HEADER) == 0))
{
headers.emplace(Aws::Http::HeaderValuePair(Aws::Http::CONTENT_TYPE_HEADER, Aws::JSON_CONTENT_TYPE ));
}
headers.emplace(Aws::Http::HeaderValuePair(Aws::Http::API_VERSION_HEADER, "2018-11-14"));
return headers;
}
protected:
virtual Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const { return Aws::Http::HeaderValueCollection(); }
};
} // namespace MediaConnect
} // namespace Aws
|
#pragma once
#include "AMS/Types.h"
#include "AMS/Net/Serializer.h"
#include "AMS/Discovery/IPeerNotification.h"
#include "AMS/Reactor/IHandler.h"
namespace AMS {
const Poco::Timespan::TimeDiff KWaitUSec(250000); // 250msec
const unsigned int EXPIRY_TIME = 5000000;
class HeartbeatHandler;
class ReceiverTask: public Poco::Task
{
public:
// args[0]: MulticastAddress, args[1]: MulticastPort
ReceiverTask();
~ReceiverTask();
void runTask();
void initialize(const std::vector<std::string>& args, const Poco::UUID& uuid);
void handleBeacon(const Heartbeat& hbeat);
void addNotifier(IPeerNotification* notifier);
void selfNotify(const Heartbeat&);
void destroy();
private:
Poco::Net::IPAddress::Family m_family;
Poco::UInt16 m_port;
Poco::Net::MulticastSocket m_multicastSocket;
Poco::Net::SocketAddress m_socketAddres;
Poco::Net::NetworkInterface m_if;
Poco::UUID m_self;
bool m_selfrcv;
typedef std::map<Poco::UUID, Heartbeat> PeersMap;
PeersMap m_peers;
typedef std::vector<IPeerNotification*> PeerNotifications;
PeerNotifications m_notifiers;
Poco::Timestamp m_ts;
char m_buffer[8192];
HeartbeatHandler* m_hb_handler;
Poco::FastMutex m_mutex;
};
class HeartbeatHandler : public AMS::IHandler {
public:
HeartbeatHandler(ReceiverTask* receiver) : m_receiver(receiver) {}
virtual void handle(AMS::IMsgObj* baseMsg) {
Heartbeat* msg = dynamic_cast<Heartbeat*>(baseMsg);
if (!m_receiver->isCancelled() && msg != 0) {
m_receiver->handleBeacon(*msg);
}
}
private:
ReceiverTask* m_receiver;
};
} |
/* Siconos is a program dedicated to modeling, simulation and control
* of non smooth dynamical systems.
*
* Copyright 2018 INRIA.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef NCP_PATHSEARCH_H
#define NCP_PATHSEARCH_H
/*! \file NCP_PathSearch.h
* \brief Functions for the pathsearch for NCP
*
*/
#include "PathSearch.h"
#include "SiconosBlas.h"
#include "NumericsMatrix.h"
#include "NonlinearComplementarityProblem.h"
#include "LinearComplementarityProblem.h"
#if defined(__cplusplus)
#undef restrict
#define restrict __restrict
#endif
#if defined(__cplusplus) && !defined(BUILD_AS_CPP)
extern "C"
{
#endif
/** compute x from z for an NCP
* \param n size of the problem
* \param z current iterate
* \param F value of the NCP function
* \param[out] x current newton iterate
* */
static inline void ncp_pathsearch_compute_x_from_z(unsigned n, double* restrict z, double* restrict F,double* restrict x)
{
/* init value of x */
/* see Linear Algebra Enhancements to the PATH Solver by Li, Ferris and Munson */
for (unsigned i = 0; i < n; ++i)
{
/* XXX F[i] > 0.0 or F[i] > DBL_EPSILON ? */
if ((z[i] <= 0.0) && (F[i] > 0.0))
x[i] = -F[i];
else
x[i] = z[i];
}
}
/** update the lcp subproblem: M, q and r
* \param problem the NCP problem to solve
* \param lcp_subproblem the lcp problem to fill
* \param n size of the NCP problem
* \param x_plus positive part of x
* \param x current newton iterate
* \param r value of the normal map
*/
static inline void ncp_pathsearch_update_lcp_data(NonlinearComplementarityProblem* problem, LinearComplementarityProblem* lcp_subproblem, unsigned n, double* restrict x_plus, double* restrict x, double* restrict r)
{
/* compute M = nabla F(x_plus) */
problem->compute_nabla_F(problem->env, n, x_plus, problem->nabla_F);
/* r = F_+(x) = F(x_+) + x - x_+ */
/* the real q = q - r = x_+ - x - M x_plus */
/* q = -M x_plus */
NM_gemv(-1.0, problem->nabla_F, x_plus, 0.0, lcp_subproblem->q);
/* first compute r = x - x_+ */
cblas_dcopy(n, x, 1, r, 1); /* r = x */
cblas_daxpy(n, -1.0, x_plus, 1, r, 1); /* r -= x_plus */
/* we factorized computations */
cblas_daxpy(n, -1.0, r, 1, lcp_subproblem->q, 1); /* q -= x - x_plus */
/* Finish r */
problem->compute_F(problem->env, n, x_plus, x); /* compute F(x_plus) */
cblas_daxpy(n, 1.0, x, 1, r, 1); /* r += F(x_plus) */
}
#if defined(__cplusplus) && !defined(BUILD_AS_CPP)
}
#endif
#endif
|
//
// XQQRouteViewController.h
// XQQChatProj
//
// Created by XQQ on 2016/12/13.
// Copyright © 2016年 UIP. All rights reserved.
//
#import <UIKit/UIKit.h>
enum routeType{
XQQRouteTypeWalk = 0,
XQQRouteTypeDrive,
XQQRouteTypeBus
};
@interface XQQRouteViewController : UIViewController
/** 路径规划类型 */
@property(nonatomic, assign) enum routeType routeType;
/** 目的地经纬度 */
@property(nonatomic, assign) CLLocationCoordinate2D endCoord;
/** 我的位置 */
@property(nonatomic, assign) CLLocationCoordinate2D myCoord;
/** 我的城市 */
@property (nonatomic, copy) NSString * myCity;
@end
|
/**
* Copyright (C) 2013 kangliqiang ,kangliq@163.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef __MQADMINIMPL_H__
#define __MQADMINIMPL_H__
#include <string>
#include <list>
#include <set>
#include <vector>
#include "MessageExt.h"
#include "QueryResult.h"
namespace rmq
{
class MQClientFactory;
class MessageQueue;
class MQAdminImpl
{
public:
MQAdminImpl(MQClientFactory* pMQClientFactory);
~MQAdminImpl();
void createTopic(const std::string& key, const std::string& newTopic, int queueNum);
void createTopic(const std::string& key, const std::string& newTopic, int queueNum, int topicSysFlag);
std::vector<MessageQueue>* fetchPublishMessageQueues(const std::string& topic);
std::set<MessageQueue>* fetchSubscribeMessageQueues(const std::string& topic);
long long searchOffset(const MessageQueue& mq, long long timestamp);
long long maxOffset(const MessageQueue& mq);
long long minOffset(const MessageQueue& mq);
long long earliestMsgStoreTime(const MessageQueue& mq);
MessageExt* viewMessage(const std::string& msgId);
QueryResult queryMessage(const std::string& topic,
const std::string& key,
int maxNum,
long long begin,
long long end);
private:
MQClientFactory* m_pMQClientFactory;
};
}
#endif
|
/**
* WinPR: Windows Portable Runtime
* ASN.1 Encoding & Decoding Engine
*
* Copyright 2012 Marc-Andre Moreau <marcandre.moreau@gmail.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <winpr/asn1.h>
#include <winpr/crt.h>
#ifndef _WIN32
ASN1module_t ASN1_CreateModule(ASN1uint32_t nVersion, ASN1encodingrule_e eRule,
ASN1uint32_t dwFlags, ASN1uint32_t cPDU, const ASN1GenericFun_t apfnEncoder[],
const ASN1GenericFun_t apfnDecoder[], const ASN1FreeFun_t apfnFreeMemory[],
const ASN1uint32_t acbStructSize[], ASN1magic_t nModuleName)
{
ASN1module_t module = NULL;
if (!((apfnEncoder) && (apfnDecoder) && (apfnFreeMemory) && (acbStructSize)))
return NULL;
module = (ASN1module_t) malloc(sizeof(struct tagASN1module_t));
ZeroMemory(module, sizeof(struct tagASN1module_t));
if (module)
{
module->nModuleName = nModuleName;
module->dwFlags = dwFlags;
module->eRule = eRule;
module->cPDUs = cPDU;
module->apfnFreeMemory = apfnFreeMemory;
module->acbStructSize = acbStructSize;
if (eRule & ASN1_BER_RULE)
{
module->BER.apfnEncoder = (const ASN1BerEncFun_t*) apfnEncoder;
module->BER.apfnDecoder = (const ASN1BerDecFun_t*) apfnDecoder;
}
}
return module;
}
void ASN1_CloseModule(ASN1module_t pModule)
{
if (!pModule)
free(pModule);
}
ASN1error_e ASN1_CreateEncoder(ASN1module_t pModule, ASN1encoding_t* ppEncoderInfo,
ASN1octet_t* pbBuf, ASN1uint32_t cbBufSize, ASN1encoding_t pParent)
{
ASN1error_e status;
ASN1encoding_t encoder;
ASN1encodingrule_e rule;
if (pModule && ppEncoderInfo)
{
*ppEncoderInfo = 0;
encoder = (ASN1encoding_t) malloc(sizeof(struct ASN1encoding_s));
if (encoder)
{
ZeroMemory(encoder, sizeof(struct ASN1encoding_s));
encoder->magic = 0x44434E45;
encoder->err = 0;
encoder->dwFlags = pModule->dwFlags;
encoder->module = pModule;
if (pbBuf && cbBufSize)
{
encoder->dwFlags |= ASN1ENCODE_SETBUFFER;
encoder->buf = pbBuf;
encoder->pos = pbBuf;
encoder->size = cbBufSize;
}
if (pParent)
{
encoder[1].magic = (ASN1magic_t) pParent;
rule = pParent->eRule;
}
else
{
encoder[1].magic = (ASN1magic_t) encoder;
rule = pModule->eRule;
}
encoder->eRule = rule;
if (encoder->dwFlags & ASN1ENCODE_SETBUFFER)
goto LABEL_SET_BUFFER;
if (!pParent)
{
LABEL_ENCODER_COMPLETE:
*ppEncoderInfo = encoder;
return 0;
}
if (rule & ASN1_BER_RULE)
{
//if (ASN1BEREncCheck(encoder, 1))
{
*encoder->buf = 0;
LABEL_SET_BUFFER:
if (pParent)
pParent[1].version = (ASN1uint32_t) encoder;
goto LABEL_ENCODER_COMPLETE;
}
status = ASN1_ERR_MEMORY;
}
else
{
status = ASN1_ERR_RULE;
}
free(encoder);
}
else
{
status = ASN1_ERR_MEMORY;
}
}
else
{
status = ASN1_ERR_BADARGS;
}
return status;
}
ASN1error_e ASN1_Encode(ASN1encoding_t pEncoderInfo, void* pDataStruct, ASN1uint32_t nPduNum,
ASN1uint32_t dwFlags, ASN1octet_t* pbBuf, ASN1uint32_t cbBufSize)
{
int flags;
ASN1error_e status;
ASN1module_t module;
ASN1BerEncFun_t pfnEncoder;
if (!pEncoderInfo)
return ASN1_ERR_BADARGS;
ASN1EncSetError(pEncoderInfo, ASN1_SUCCESS);
if (dwFlags & 8)
{
pEncoderInfo->dwFlags |= 8;
pEncoderInfo->buf = pbBuf;
pEncoderInfo->pos = pbBuf;
pEncoderInfo->size = cbBufSize;
}
else
{
flags = dwFlags | pEncoderInfo->dwFlags;
if (flags & 0x10)
{
pEncoderInfo->dwFlags &= 0xFFFFFFF7;
pEncoderInfo->buf = 0;
pEncoderInfo->pos = 0;
pEncoderInfo->size = 0;
}
else
{
if (!(dwFlags & ASN1ENCODE_REUSEBUFFER) && (flags & ASN1ENCODE_APPEND))
goto LABEL_MODULE;
pEncoderInfo->pos = pEncoderInfo->buf;
}
}
pEncoderInfo->len = 0;
pEncoderInfo->bit = 0;
LABEL_MODULE:
module = pEncoderInfo->module;
if (nPduNum >= module->cPDUs)
goto LABEL_BAD_PDU;
if (!(pEncoderInfo->eRule & ASN1_BER_RULE))
{
status = ASN1_ERR_RULE;
return ASN1EncSetError(pEncoderInfo, status);
}
pfnEncoder = module->BER.apfnEncoder[nPduNum];
if (!pfnEncoder)
{
LABEL_BAD_PDU:
status = ASN1_ERR_BADPDU;
return ASN1EncSetError(pEncoderInfo, status);
}
if (pfnEncoder(pEncoderInfo, 0, pDataStruct))
{
//ASN1BEREncFlush(pEncoderInfo);
}
else
{
if (pEncoderInfo[1].err >= 0)
ASN1EncSetError(pEncoderInfo, ASN1_ERR_CORRUPT);
}
if (pEncoderInfo[1].err < 0)
{
if (((dwFlags & 0xFF) | (pEncoderInfo->dwFlags & 0xFF)) & 0x10)
{
ASN1_FreeEncoded(pEncoderInfo, pEncoderInfo->buf);
pEncoderInfo->buf = 0;
pEncoderInfo->pos = 0;
pEncoderInfo->bit = 0;
pEncoderInfo->len = 0;
pEncoderInfo->size = 0;
}
}
return pEncoderInfo[1].err;
}
void ASN1_CloseEncoder(ASN1encoding_t pEncoderInfo)
{
ASN1magic_t magic;
if (pEncoderInfo)
{
magic = pEncoderInfo[1].magic;
if (pEncoderInfo != (ASN1encoding_t) magic)
pEncoderInfo[1].version = 0;
free(pEncoderInfo);
}
}
ASN1error_e ASN1EncSetError(ASN1encoding_t enc, ASN1error_e err)
{
ASN1error_e status;
ASN1encoding_t encoder;
ASN1encoding_t nextEncoder;
status = err;
encoder = enc;
while (encoder)
{
nextEncoder = (ASN1encoding_t) &encoder[1];
encoder->err = err;
if (encoder == nextEncoder)
break;
encoder = nextEncoder;
}
return status;
}
ASN1error_e ASN1DecSetError(ASN1decoding_t dec, ASN1error_e err)
{
ASN1error_e status;
ASN1decoding_t decoder;
ASN1decoding_t nextDecoder;
status = err;
decoder = dec;
while (decoder)
{
nextDecoder = (ASN1decoding_t) &decoder[1];
decoder->err = err;
if (decoder == nextDecoder)
break;
decoder = nextDecoder;
}
return status;
}
#endif
|
// OpenCallback.h
#ifndef __OPEN_CALLBACK_H
#define __OPEN_CALLBACK_H
#include "CPP/Common/MyCom.h"
#include "CPP/Windows/FileFind.h"
#include "CPP/7zip/IPassword.h"
#include "CPP/7zip/Archive/IArchive.h"
#ifdef _SFX
#include "ProgressDialog.h"
#else
#include "ProgressDialog2.h"
#endif
class COpenArchiveCallback:
public IArchiveOpenCallback,
public IArchiveOpenVolumeCallback,
public IArchiveOpenSetSubArchiveName,
public IProgress,
public ICryptoGetTextPassword,
public CMyUnknownImp
{
FString _folderPrefix;
NWindows::NFile::NFind::CFileInfo _fileInfo;
// NWindows::NSynchronization::CCriticalSection _criticalSection;
bool _subArchiveMode;
UString _subArchiveName;
public:
bool PasswordIsDefined;
bool PasswordWasAsked;
UString Password;
HWND ParentWindow;
CProgressDialog ProgressDialog;
MY_UNKNOWN_IMP5(
IArchiveOpenCallback,
IArchiveOpenVolumeCallback,
IArchiveOpenSetSubArchiveName,
IProgress,
ICryptoGetTextPassword)
INTERFACE_IProgress(;)
INTERFACE_IArchiveOpenCallback(;)
INTERFACE_IArchiveOpenVolumeCallback(;)
// ICryptoGetTextPassword
STDMETHOD(CryptoGetTextPassword)(BSTR *password);
STDMETHOD(SetSubArchiveName(const wchar_t *name))
{
_subArchiveMode = true;
_subArchiveName = name;
return S_OK;
}
COpenArchiveCallback():
ParentWindow(0)
{
_subArchiveMode = false;
PasswordIsDefined = false;
PasswordWasAsked = false;
}
/*
void Init()
{
PasswordIsDefined = false;
_subArchiveMode = false;
}
*/
void LoadFileInfo(const FString &folderPrefix, const FString &fileName)
{
_folderPrefix = folderPrefix;
if (!_fileInfo.Find(_folderPrefix + fileName))
throw 1;
}
void ShowMessage(const UInt64 *completed);
INT_PTR StartProgressDialog(const UString &title, HANDLE hThread)
{
return ProgressDialog.Create(title, hThread, ParentWindow);
}
};
#endif
|
/*
* Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
#pragma once
#include <aws/ec2/EC2_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/ec2/model/ResponseMetadata.h>
#include <aws/ec2/model/IdFormat.h>
#include <utility>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Xml
{
class XmlDocument;
} // namespace Xml
} // namespace Utils
namespace EC2
{
namespace Model
{
/**
* <p>Contains the output of DescribeIdFormat.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeIdFormatResult">AWS
* API Reference</a></p>
*/
class AWS_EC2_API DescribeIdFormatResponse
{
public:
DescribeIdFormatResponse();
DescribeIdFormatResponse(const Aws::AmazonWebServiceResult<Aws::Utils::Xml::XmlDocument>& result);
DescribeIdFormatResponse& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Xml::XmlDocument>& result);
/**
* <p>Information about the ID format for the resource.</p>
*/
inline const Aws::Vector<IdFormat>& GetStatuses() const{ return m_statuses; }
/**
* <p>Information about the ID format for the resource.</p>
*/
inline void SetStatuses(const Aws::Vector<IdFormat>& value) { m_statuses = value; }
/**
* <p>Information about the ID format for the resource.</p>
*/
inline void SetStatuses(Aws::Vector<IdFormat>&& value) { m_statuses = std::move(value); }
/**
* <p>Information about the ID format for the resource.</p>
*/
inline DescribeIdFormatResponse& WithStatuses(const Aws::Vector<IdFormat>& value) { SetStatuses(value); return *this;}
/**
* <p>Information about the ID format for the resource.</p>
*/
inline DescribeIdFormatResponse& WithStatuses(Aws::Vector<IdFormat>&& value) { SetStatuses(std::move(value)); return *this;}
/**
* <p>Information about the ID format for the resource.</p>
*/
inline DescribeIdFormatResponse& AddStatuses(const IdFormat& value) { m_statuses.push_back(value); return *this; }
/**
* <p>Information about the ID format for the resource.</p>
*/
inline DescribeIdFormatResponse& AddStatuses(IdFormat&& value) { m_statuses.push_back(std::move(value)); return *this; }
inline const ResponseMetadata& GetResponseMetadata() const{ return m_responseMetadata; }
inline void SetResponseMetadata(const ResponseMetadata& value) { m_responseMetadata = value; }
inline void SetResponseMetadata(ResponseMetadata&& value) { m_responseMetadata = std::move(value); }
inline DescribeIdFormatResponse& WithResponseMetadata(const ResponseMetadata& value) { SetResponseMetadata(value); return *this;}
inline DescribeIdFormatResponse& WithResponseMetadata(ResponseMetadata&& value) { SetResponseMetadata(std::move(value)); return *this;}
private:
Aws::Vector<IdFormat> m_statuses;
ResponseMetadata m_responseMetadata;
};
} // namespace Model
} // namespace EC2
} // namespace Aws
|
#include "stdio.h"
#ifndef __API_H__
#define __API_H__
#define api_sprintf(str, format, ...) sprintf(str, format, __VA_ARGS__)
#define api_sscanf(str, format, ...) sscanf(str, format, __VA_ARGS__)
//extern int api_sprintf(char *buf, const char *format, ...);
extern int api_time2string(char *str, char *timebuf);
extern int api_time_to_string5(char *str, char *timebuf);
extern int api_int2str(char *str, int val);
extern int api_date_to_string2(char *str, char *timebuf);
extern int api_date_to_string3(char *str, char *datebuf);
extern int api_int_to_str2(char *str, int val);
extern int api_int_to_string4(char *str, int val);
extern int api_version_to_string(char *str, const char *date);
#endif
|
/*
* Copyright (C) 2013 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY GOOGLE INC. ``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 GOOGLE INC. 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.
*/
#ifndef MockWebRTCDTMFSenderHandler_h
#define MockWebRTCDTMFSenderHandler_h
#include "TestCommon.h"
#include "public/platform/WebMediaStreamTrack.h"
#include "public/platform/WebRTCDTMFSenderHandler.h"
#include "public/platform/WebString.h"
#include "public/testing/WebTask.h"
namespace WebTestRunner {
class WebTestDelegate;
class MockWebRTCDTMFSenderHandler : public WebKit::WebRTCDTMFSenderHandler {
public:
MockWebRTCDTMFSenderHandler(const WebKit::WebMediaStreamTrack&, WebTestDelegate*);
virtual void setClient(WebKit::WebRTCDTMFSenderHandlerClient*) OVERRIDE;
virtual WebKit::WebString currentToneBuffer() OVERRIDE;
virtual bool canInsertDTMF() OVERRIDE;
virtual bool insertDTMF(const WebKit::WebString& tones, long duration, long interToneGap) OVERRIDE;
// WebTask related methods
WebTaskList* taskList() { return &m_taskList; }
void clearToneBuffer() { m_toneBuffer.reset(); }
private:
MockWebRTCDTMFSenderHandler();
WebKit::WebRTCDTMFSenderHandlerClient* m_client;
WebKit::WebMediaStreamTrack m_track;
WebKit::WebString m_toneBuffer;
WebTaskList m_taskList;
WebTestDelegate* m_delegate;
};
}
#endif // MockWebRTCDTMFSenderHandler_h
|
//
// VodPlayController.h
// KSYPlayerDemo
//
// Created by devcdl on 2017/9/11.
// Copyright © 2017年 kingsoft. All rights reserved.
//
#import "PlayController.h"
@class PlayerViewModel, VodPlayOperationView;
@interface VodPlayController : PlayController
@property (nonatomic, strong) PlayerViewModel *playerViewModel;
@property (nonatomic, assign) BOOL fullScreen;
@property (nonatomic, strong) VodPlayOperationView *playOperationView;
- (void)suspendHandler;
- (void)recoveryHandler;
- (void)stopSuspend;
@end
|
#define _CRT_SECURE_NO_WARNINGS
#define MAX_SIZE 20
#include <stdio.h>
typedef struct tagSeqLinkList
{
int data;
int next;
}SeqListList;
int main()
{
int i,j,n,index,head,tail;
SeqListList l[MAX_SIZE];
for (i = 0; i < MAX_SIZE; i++)
{
scanf("%d", &l[i].data);
l[i].next = i + 1;
}
l[MAX_SIZE - 1].next = -1;
printf("ÇëÊäÈëҪɾ³ýµÄÏßË÷ϱê¸öÊý£º");
scanf("%d", &n);
printf("ÇëÊäÈëҪɾ³ýµÄÏßË÷±íµÄϱ꣺\n");
for (i = 0; i < n; i++)
{
printf("ÇëÊäÈëҪɾ³ýµÄÊý£º");
scanf("%d", &index);
j = 0;
while (l[j].next != -1)
{
if (l[j].next == index)
{
head = j;
break;
}
j = l[j].next;
}
tail = l[index].next;
l[j].next = tail;
}
i = 0;
while (l[i].next != -1)
{
printf("%d ", l[i].data);
i = l[i].next;
}
printf("%d", l[i].data);
return 0;
} |
//
// Created by mmoroz on 8/18/20.
//
#ifndef MLPERF_RESNET50_UTIL_H
#define MLPERF_RESNET50_UTIL_H
#include <string>
#include <memory>
#include <tpu.h>
namespace ivatpu {
using TPUDevicePtr = std::shared_ptr<TPUDevice>;
using TPUProgramPtr = std::shared_ptr<TPUProgram>;
const size_t TPU_PROGRAM_QUEUE_LENGTH = 8;
std::pair<TPUDevicePtr, TPUProgramPtr> device_program_load(const std::string& model_path);
}
#endif //MLPERF_RESNET50_UTIL_H
|
/**
* @license Apache-2.0
*
* Copyright (c) 2020 The Stdlib Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "stdlib/strided/base/mskunary/s_t.h"
#include "stdlib/strided/base/mskunary/macros.h"
#include <stdint.h>
/**
* Applies a unary callback accepting and returning signed 8-bit integers to a signed 8-bit integer strided input array, casts the callback's signed 8-bit integer return value to an unsigned 16-bit integer, and assigns results to elements in an unsigned 16-bit integer strided output array.
*
* @param arrays array whose first element is a pointer to a strided input array, whose second element is a pointer to a strided mask array, and whose last element is a pointer to a strided output array
* @param shape array whose only element is the number of elements over which to iterate
* @param strides array containing strides (in bytes) for each strided array
* @param fcn callback
*
* @example
* #include "stdlib/strided/base/mskunary/s_t.h"
* #include <stdint.h>
*
* // Create underlying byte arrays:
* uint8_t x[] = { 0, 0, 0 };
* uint8_t m[] = { 0, 1, 0 };
* uint8_t out[] = { 0, 0, 0, 0, 0, 0 };
*
* // Define a pointer to an array containing pointers to strided arrays:
* uint8_t *arrays[] = { x, m, out };
*
* // Define the strides:
* int64_t strides[] = { 1, 1, 2 }; // 1 byte per int8, 1 byte per uint8, 2 bytes per uint16
*
* // Define the number of elements over which to iterate:
* int64_t shape[] = { 3 };
*
* // Define a callback:
* int8_t abs( const int8_t x ) {
* if ( x < 0 ) {
* return -x;
* }
* return x;
* }
*
* // Apply the callback:
* stdlib_strided_mask_s_t( arrays, shape, strides, (void *)abs );
*/
void stdlib_strided_mask_s_t( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ) {
typedef int8_t func_type( const int8_t x );
func_type *f = (func_type *)fcn;
STDLIB_STRIDED_MSKUNARY_LOOP_CLBK( int8_t, uint16_t )
}
|
/**********************************************************************
*
* Copyright(c) 2016 Alcatel-Lucent.
* All rights reserved.
*
* ALL RIGHTS ARE RESERVED BY ALCATEL-LUCENT. ACCESS TO THIS
* SOURCE CODE IS STRICTLY RESTRICTED UNDER CONTRACT. THIS CODE IS TO
* BE KEPT STRICTLY CONFIDENTIAL.
*
* UNAUTHORIZED MODIFICATIONS OF THIS FILE WILL VOID YOUR SUPPORT
* CONTRACT WITH ALCATEL-LUCENT. IF SUCH MODIFICATIONS ARE FOR
* THE PURPOSE OF CIRCUMVENTING LICENSING LIMITATIONS, LEGAL ACTION
* MAY RESULT.
*
***********************************************************************/
/*! \file location_api.c
* \brief location API implementation
* \author Sean Wang
* \date 2016
* \version 1.0
* @ingroup inner_interface
*/
#define INNER_INTERFACE_C
#include "utils/log/log.h"
#include "app_api.h"
/***
* Function init_inner_interface()
* Initialize the inner interface layer
*
*/
void init_location_interface()
{
PRT_LOG_T(LOG_ERR, INNER_INTERFACE, "Start to init location interface...\n");
}
|
/**
* Appcelerator Titanium Mobile
* Copyright (c) 2009-2015 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.
*
* WARNING: This is generated code. Modify at your own risk and without support.
*/
// A good bit of this code was derived from the Three20 project
// and was customized to work inside RSSReader
//
// All modifications by RSSReader are licensed under
// the Apache License, Version 2.0
//
//
// Copyright 2009 Facebook
//
// 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.
//
#ifdef USE_TI_UIDASHBOARDVIEW
#import <Foundation/Foundation.h>
@class LauncherItem;
@interface LauncherButton : UIButton {
BOOL dragging;
BOOL editing;
LauncherItem *item;
UIButton *button;
UIButton *closeButton;
UIButton *badge;
}
@property(nonatomic,readwrite,retain) LauncherItem *item;
@property(nonatomic,readonly) UIButton *closeButton;
@property(nonatomic) BOOL dragging;
@property(nonatomic) BOOL editing;
@end
#endif
|
//
// sectionHeadView.h
// OurQuanmin
//
// Created by 王建峰 on 16/6/30.
// Copyright © 2016年 tarena. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface SectionHeadView : UIView
@property (weak, nonatomic) IBOutlet UILabel *seedLabel;
@property (weak, nonatomic) IBOutlet UILabel *goldLabel;
@end
|
#ifndef L_ENGINE_COMP_CAMERA
#define L_ENGINE_COMP_CAMERA
#include "../BaseComponentManager.h"
#include "../RenderManager.h"
#include "CompPosition.h"
#include <set>
class ComponentCameraManager;
class ComponentCamera : public BaseComponent {
public:
ComponentCamera(EID id, ComponentPosition *pos, RenderManager *rm,
ComponentCameraManager *manager);
~ComponentCamera();
void Update();
void HandleEvent(const Event *event);
/// For LuaInterface
void SetViewport(Rect viewport);
Rect GetViewport();
private:
RenderCamera mCamera;
ComponentPosition *mPosition;
};
class ComponentCameraManager
: public BaseComponentManager_Impl<ComponentCamera> {
public:
ComponentCameraManager(EventDispatcher *e);
~ComponentCameraManager();
std::unique_ptr<ComponentCamera> ConstructComponent(EID id,
ComponentCamera *parent);
void SetDependencies(ComponentPositionManager *pos, RenderManager *rm);
ComponentPositionManager *dependencyPosition;
RenderManager *dependencyRenderManager;
};
#endif // L_ENGINE_COMP_CAMERA
|
/**
* Copyright 2012 Batis Degryll Ludo
* @file EventStore.h
* @since 2016-03-26
* @date 2018-03-20
* @author Ludo Batis Degryll
* @brief A container to store events. It will store only the sooner event (or events) and will discard every other.
*/
#ifndef ZBE_CORE_EVENTS_EVENTSTORE_H
#define ZBE_CORE_EVENTS_EVENTSTORE_H
#include <limits>
#include <cstdint>
#include <forward_list>
#include "ZBE/core/events/Event.h"
#include "ZBE/core/system/system.h"
namespace zbe {
/** \brief A container to store events. It will store only the sooner event (or events) and will discard every other.
*/
class ZBEAPI EventStore {
public:
EventStore(EventStore const&) = delete; //!< Needed for singleton.
void operator=(EventStore const&) = delete; //!< Needed for singleton.
/** \brief Singleton implementation.
* \return The unique instance of the EventStore.
*/
static EventStore& getInstance();
~EventStore() {}; //!< Empty destructor.
/** \brief Store an event if the event time is the same of the current
* stored ones. If event happen after current ones, it will be ignored. If it happen after, all
* the current events will be wiped and only this one will be saved.
* \param e The event to be stored
*/
void storeEvent(Event* e);
/** \brief Store an instant event
* \param e The event to be stored
*/
void storeInstantEvent(Event* e);
/** \brief Tell all stored events to manage themselves.
* Then the stores will be cleared.
*/
void manageCurrent();
/** \brief Erase all contained events.
*/
void clearStore();
/** \brief Erase all contained timed events.
*/
void clearTimedStore();
/** \brief Erase all contained instant events.
*/
void clearInstantStore();
/** \brief Returns the time of the contained events.
*/
int64_t getTime();
private:
void clearStore(std::forward_list<Event*>&);
void manageStore(std::forward_list<Event*>&);
EventStore() :timedStore(), instantStore(), bettertime(std::numeric_limits<int64_t>::max()) {}
std::forward_list<Event*> timedStore;
std::forward_list<Event*> instantStore;
int64_t bettertime;
};
} // namespace zbe
#endif // CORE_EVENTS_EVENTSTORE_H
|
/*
GNU Mailutils -- a suite of utilities for electronic mail
Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 3 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General
Public License along with this library; if not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA
*/
#include "libmu_py.h"
PyMODINIT_FUNC
initc_api (void)
{
mu_py_init ();
mu_py_attach_modules ();
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.