text stringlengths 4 6.14k |
|---|
/**
* StreamSwitch is an extensible and scalable media stream server for
* multi-protocol environment.
*
* Copyright (C) 2014 OpenSight (www.opensight.cn)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* 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 Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
**/
/**
* stsw_lock_guard.h
* a auto lock guard implementation
*
* author: OpenSight Team
* date: 2014-11-25
**/
#ifndef STSW_LOCK_GUARD_H
#define STSW_LOCK_GUARD_H
#include<pthread.h>
namespace stream_switch {
class LockGuard{
public:
LockGuard(pthread_mutex_t *lock): lock_(lock)
{
if(lock_ != NULL){
pthread_mutex_lock(lock_);
}
}
~LockGuard()
{
if(lock_ != NULL){
pthread_mutex_unlock(lock_);
}
}
private:
pthread_mutex_t *lock_;
};
}
#endif |
#ifndef GETAUCTIONDETAILSRESPONSEMESSAGE_H_
#define GETAUCTIONDETAILSRESPONSEMESSAGE_H_
#include "../BaseMessage.h"
class GetAuctionDetailsResponse : public BaseMessage {
public:
GetAuctionDetailsResponse(uint64 objectID, const UnicodeString& description) {
insertShort(0x02);
insertInt(0xFE0E644B); //GetAuctionDetailsResponse
insertLong(objectID);
insertUnicode(description);
//Insert item attribute list
insertInt(0); //Number of strings
insertInt(0); //Ascii string
System::out << "Sending an GetAuctionDetailsResponse" << endl;
}
};
#endif /*GETAUCTIONDETAILSRESPONSEMESSAGE_H_*/
|
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "NGAP-IEs"
* found in "../support/ngap-r16.4.0/38413-g40.asn"
* `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps -no-gen-BER -no-gen-XER -no-gen-OER -no-gen-UPER`
*/
#ifndef _NGAP_PDUSessionResourceListCxtRelCpl_H_
#define _NGAP_PDUSessionResourceListCxtRelCpl_H_
#include <asn_application.h>
/* Including external dependencies */
#include <asn_SEQUENCE_OF.h>
#include <constr_SEQUENCE_OF.h>
#ifdef __cplusplus
extern "C" {
#endif
/* Forward declarations */
struct NGAP_PDUSessionResourceItemCxtRelCpl;
/* NGAP_PDUSessionResourceListCxtRelCpl */
typedef struct NGAP_PDUSessionResourceListCxtRelCpl {
A_SEQUENCE_OF(struct NGAP_PDUSessionResourceItemCxtRelCpl) list;
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} NGAP_PDUSessionResourceListCxtRelCpl_t;
/* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_NGAP_PDUSessionResourceListCxtRelCpl;
#ifdef __cplusplus
}
#endif
#endif /* _NGAP_PDUSessionResourceListCxtRelCpl_H_ */
#include <asn_internal.h>
|
/*
Copyright (c) 2014-2019 AscEmu Team <http://www.ascemu.org>
This file is released under the MIT license. See README-MIT for more information.
*/
#pragma once
enum CastInterruptFlags
{
CAST_INTERRUPT_NULL = 0x0,
CAST_INTERRUPT_ON_MOVEMENT = 0x1,
CAST_INTERRUPT_PUSHBACK = 0x2,
CAST_INTERRUPT_ON_INTERRUPT_CAST = 0x4,
CAST_INTERRUPT_ON_INTERRUPT_SCHOOL = 0x8,
CAST_INTERRUPT_ON_DAMAGE_TAKEN = 0x10,
CAST_INTERRUPT_ON_INTERRUPT_ALL = 0x20
};
|
/*****************************************************************************
* cache.c: cache video filter
*****************************************************************************
* Copyright (C) 2010-2018 x264 project
*
* Authors: Steven Walters <kemuri9@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA.
*
* This program is also available under a commercial proprietary license.
* For more information, contact us at licensing@x264.com.
*****************************************************************************/
#include "video.h"
#include "internal.h"
#include "common/common.h"
#define cache_filter x264_glue3(cache, BIT_DEPTH, filter)
#if BIT_DEPTH == 8
#define NAME "cache_8"
#else
#define NAME "cache_10"
#endif
#define LAST_FRAME (h->first_frame + h->cur_size - 1)
typedef struct
{
hnd_t prev_hnd;
cli_vid_filter_t prev_filter;
int max_size;
int first_frame; /* first cached frame */
cli_pic_t **cache;
int cur_size;
int eof; /* frame beyond end of the file */
} cache_hnd_t;
cli_vid_filter_t cache_filter;
static int init( hnd_t *handle, cli_vid_filter_t *filter, video_info_t *info, x264_param_t *param, char *opt_string )
{
intptr_t size = (intptr_t)opt_string;
/* upon a <= 0 cache request, do nothing */
if( size <= 0 )
return 0;
cache_hnd_t *h = calloc( 1, sizeof(cache_hnd_t) );
if( !h )
return -1;
h->max_size = size;
h->cache = malloc( (h->max_size+1) * sizeof(cli_pic_t*) );
if( !h->cache )
return -1;
for( int i = 0; i < h->max_size; i++ )
{
h->cache[i] = malloc( sizeof(cli_pic_t) );
if( !h->cache[i] || x264_cli_pic_alloc( h->cache[i], info->csp, info->width, info->height ) )
return -1;
}
h->cache[h->max_size] = NULL; /* require null terminator for list methods */
h->prev_filter = *filter;
h->prev_hnd = *handle;
*handle = h;
*filter = cache_filter;
return 0;
}
static void fill_cache( cache_hnd_t *h, int frame )
{
/* shift frames out of the cache as the frame request is beyond the filled cache */
int shift = frame - LAST_FRAME;
/* no frames to shift or no frames left to read */
if( shift <= 0 || h->eof )
return;
/* the next frames to read are either
* A) starting at the end of the current cache, or
* B) starting at a new frame that has the end of the cache at the desired frame
* and proceeding to fill the entire cache */
int cur_frame = X264_MAX( h->first_frame + h->cur_size, frame - h->max_size + 1 );
/* the new starting point is either
* A) the current one shifted the number of frames entering/leaving the cache, or
* B) at a new frame that has the end of the cache at the desired frame. */
h->first_frame = X264_MIN( h->first_frame + shift, cur_frame );
h->cur_size = X264_MAX( h->cur_size - shift, 0 );
while( h->cur_size < h->max_size )
{
cli_pic_t temp;
/* the old front frame is going to shift off, overwrite it with the new frame */
cli_pic_t *cache = h->cache[0];
if( h->prev_filter.get_frame( h->prev_hnd, &temp, cur_frame ) ||
x264_cli_pic_copy( cache, &temp ) ||
h->prev_filter.release_frame( h->prev_hnd, &temp, cur_frame ) )
{
h->eof = cur_frame;
return;
}
/* the read was successful, shift the frame off the front to the end */
x264_frame_push( (void*)h->cache, x264_frame_shift( (void*)h->cache ) );
cur_frame++;
h->cur_size++;
}
}
static int get_frame( hnd_t handle, cli_pic_t *output, int frame )
{
cache_hnd_t *h = handle;
FAIL_IF_ERR( frame < h->first_frame, NAME, "frame %d is before first cached frame %d \n", frame, h->first_frame );
fill_cache( h, frame );
if( frame > LAST_FRAME ) /* eof */
return -1;
int idx = frame - (h->eof ? h->eof - h->max_size : h->first_frame);
*output = *h->cache[idx];
return 0;
}
static int release_frame( hnd_t handle, cli_pic_t *pic, int frame )
{
/* the parent filter's frame has already been released so do nothing here */
return 0;
}
static void free_filter( hnd_t handle )
{
cache_hnd_t *h = handle;
h->prev_filter.free( h->prev_hnd );
for( int i = 0; i < h->max_size; i++ )
{
x264_cli_pic_clean( h->cache[i] );
free( h->cache[i] );
}
free( h->cache );
free( h );
}
cli_vid_filter_t cache_filter = { NAME, NULL, init, get_frame, release_frame, free_filter, NULL };
|
# include <worldlib.h>
# include <kernel/kernel.h>
inherit thing THING_LIB;
/*
* Not much else needed.
*/
object iflib_driver;
static void create(varargs int clone) {
if(clone) {
thing::create(clone);
}
}
void set_iflib_driver(object x) {
if(!SYSTEM()) error("Illegal setting of IFLib driver.");
iflib_driver = x;
}
void message(string x) {
if(iflib_driver) iflib_driver -> message(x);
}
void _queue_message(int id, string type, string msg) {
if(iflib_driver) iflib_driver -> queue_message(id, type, msg);
}
void queue_message(int id, string type, string msg) {
if(iflib_driver) call_out("_queue_message", 0, id, type, msg);
}
|
//
// Copyright (C) 2013-2015 University of Amsterdam
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// 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 Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public
// License along with this program. If not, see
// <http://www.gnu.org/licenses/>.
//
#ifndef BOUNDSINGLEITEMVIEW_H
#define BOUNDSINGLEITEMVIEW_H
#include "boundlistview.h"
class boundSingleItemView : public BoundListView
{
Q_OBJECT
public:
boundSingleItemView(QWidget *parent = 0);
virtual int itemCount() const OVERRIDE;
virtual QSize sizeHint() const OVERRIDE;
virtual QSize minimumSizeHint() const OVERRIDE;
};
#endif // BOUNDSINGLEITEMVIEW_H
|
/*
* norama suite - Panorama tools suite
*
* Copyright (c) 2013-2015 FOXEL SA - http://foxel.ch
* Please read <http://foxel.ch/license> for more information.
*
*
* Author(s):
*
* Nils Hamel <n.hamel@foxel.ch>
*
*
* This file is part of the FOXEL project <http://foxel.ch>.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* 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 Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*
* Additional Terms:
*
* You are required to preserve legal notices and author attributions in
* that material or in the Appropriate Legal Notices displayed by works
* containing it.
*
* You are required to attribute the work as explained in the "Usage and
* Attribution" section of <http://foxel.ch/license>.
*/
/*! \file norama-rotate.h
* \author Nils Hamel <n.hamel@foxel.ch>
*
* Software main header
*/
/*! \mainpage norama-rotate
*
* \section norama-suite
* \section _ Panorama tools suite
*
* This software suite offers tools for numerical panoramas manipulation.
* Mostly designed for equirectangular mappings, its role is to provide an
* interface to libgnomonic and its algorithms. It then offers an interface
* to projection and transformation features implemented in the gnomonic
* library. The norama-suite is also interfaced with libcsps in order to
* take advantage of camera motion tracking to operate and align panoramas
* on earth. It also comes with a panorama viewer to complete the suite.
*
* \section Documentation
*
* A detailed documentation can be generated through doxygen. A more general
* documentation can be consulted at https://github.com/FoxelSA/norama-suite/wiki
*
* \section Copyright
*
* Copyright (c) 2013-2015 FOXEL SA - http://foxel.ch \n
* This program is part of the FOXEL project <http://foxel.ch>.
*
* Please read the COPYRIGHT.md file for more information.
*
* \section License
*
* This program is licensed under the terms of the GNU Affero General Public
* License v3 (GNU AGPL), with two additional terms. The content is licensed
* under the terms of the Creative Commons Attribution-ShareAlike 4.0
* International (CC BY-SA) license.
*
* You must read <http://foxel.ch/license> for more information about our
* Licensing terms and our Usage and Attribution guidelines.
*/
/*
Header - Include guard
*/
# ifndef __NR_ROTATE__
# define __NR_ROTATE__
/*
Header - C/C++ compatibility
*/
# ifdef __cplusplus
extern "C" {
# endif
/*
Header - Includes
*/
# include <stdio.h>
# include <stdlib.h>
# include <opencv/cv.h>
# include <opencv/highgui.h>
# include <gnomonic-all.h>
# include <common-all.h>
/*
Header - Preprocessor definitions
*/
/* Standard help */
# define NR_HELP "Usage summary :\n\n" \
"\tnorama-rotate [Arguments] [Parameters] ...\n\n" \
"Short arguments and parameters summary :\n\n" \
"\t-i\tInput equirectangular mapping image\n" \
"\t-o\tOutput equirectangular mapping image\n" \
"\t-a\tAzimuth angle [°] - rotation along z axis\n" \
"\t-e\tElevation angle [°] - rotation along y axis\n" \
"\t-r\tRoll angle [°] - rotation along x axis\n" \
"\t-t\tNumber of threads\n" \
"\t-n\tInterpolation method\n" \
"\t-q\tEquirectangular mapping exportation options\n\n" \
"norama-rotate - norama-suite\n" \
"Copyright (c) 2013-2015 FOXEL SA - http://foxel.ch\n"
/*
Header - Preprocessor macros
*/
/*
Header - Typedefs
*/
/*
Header - Structures
*/
/*
Header - Function prototypes
*/
/*! \brief Software main function
*
* The main function frame follows : parameters are initialized and read.
* The input image is loaded and the output image allocation is created.
* The transformation is applied and the result is exported.
*
* \param argc Standard main parameter
* \param argv Standard main parameter
*/
int main ( int argc, char ** argv );
/*
Header - C/C++ compatibility
*/
# ifdef __cplusplus
}
# endif
/*
Header - Include guard
*/
# endif
|
/**
******************************************************************************
* @file PWR/PWR_STANDBY/Inc/stm32f4xx_it.h
* @author MCD Application Team
* @version V1.0.3
* @date 29-January-2016
* @brief This file contains the headers of the interrupt handlers.
******************************************************************************
* @attention
*
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. Neither the name of STMicroelectronics nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
******************************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __STM32F4xx_IT_H
#define __STM32F4xx_IT_H
#ifdef __cplusplus
extern "C" {
#endif
/* Includes ------------------------------------------------------------------*/
#include "main.h"
/* Exported types ------------------------------------------------------------*/
/* Exported constants --------------------------------------------------------*/
/* Exported macro ------------------------------------------------------------*/
/* Exported functions ------------------------------------------------------- */
void NMI_Handler(void);
void HardFault_Handler(void);
void MemManage_Handler(void);
void BusFault_Handler(void);
void UsageFault_Handler(void);
void SVC_Handler(void);
void DebugMon_Handler(void);
void PendSV_Handler(void);
void SysTick_Handler(void);
void EXTI15_10_IRQHandler(void);
void RTC_Alarm_IRQHandler(void);
#ifdef __cplusplus
}
#endif
#endif /* __STM32F4xx_IT_H */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
|
/*
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef WEBRTC_MODULES_VIDEO_CODING_INTERNAL_DEFINES_H_
#define WEBRTC_MODULES_VIDEO_CODING_INTERNAL_DEFINES_H_
#include "webrtc/typedefs.h"
namespace webrtc
{
#define MASK_32_BITS(x) (0xFFFFFFFF & (x))
inline uint32_t MaskWord64ToUWord32(int64_t w64)
{
return static_cast<uint32_t>(MASK_32_BITS(w64));
}
#define VCM_MAX(a, b) (((a) > (b)) ? (a) : (b))
#define VCM_MIN(a, b) (((a) < (b)) ? (a) : (b))
#define VCM_DEFAULT_CODEC_WIDTH 352
#define VCM_DEFAULT_CODEC_HEIGHT 288
#define VCM_DEFAULT_FRAME_RATE 30
#define VCM_MIN_BITRATE 30
#define VCM_FLUSH_INDICATOR 4
// Helper macros for creating the static codec list
#define VCM_NO_CODEC_IDX -1
#ifdef VIDEOCODEC_VP8
#define VCM_VP8_IDX (VCM_NO_CODEC_IDX + 1)
#else
#define VCM_VP8_IDX VCM_NO_CODEC_IDX
#endif
#ifdef VIDEOCODEC_VP9
#define VCM_VP9_IDX (VCM_VP8_IDX + 1)
#else
#define VCM_VP9_IDX VCM_VP8_IDX
#endif
#ifdef VIDEOCODEC_H264
#define VCM_H264_IDX (VCM_VP9_IDX + 1)
#else
#define VCM_H264_IDX VCM_VP9_IDX
#endif
#ifdef VIDEOCODEC_I420
#define VCM_I420_IDX (VCM_H264_IDX + 1)
#else
#define VCM_I420_IDX VCM_H264_IDX
#endif
#define VCM_NUM_VIDEO_CODECS_AVAILABLE (VCM_I420_IDX + 1)
#define VCM_NO_RECEIVER_ID 0
inline int32_t VCMId(const int32_t vcmId, const int32_t receiverId = 0)
{
return static_cast<int32_t>((vcmId << 16) + receiverId);
}
} // namespace webrtc
#endif // WEBRTC_MODULES_VIDEO_CODING_INTERNAL_DEFINES_H_
|
/* DO NOT EDIT: automatically built by dist/s_include. */
#ifndef _mutex_ext_h_
#define _mutex_ext_h_
#if defined(__cplusplus)
extern "C" {
#endif
int __mutex_alloc(ENV *, int, uint32, db_mutex_t *);
int __mutex_alloc_int(ENV *, int, int, uint32, db_mutex_t *);
int FASTCALL __mutex_free(ENV *, db_mutex_t *);
int __mutex_free_int(ENV *, int, db_mutex_t *);
int __mutex_refresh(ENV *, db_mutex_t);
int __mut_failchk(ENV *);
int __db_fcntl_mutex_init(ENV *, db_mutex_t, uint32);
int __db_fcntl_mutex_lock(ENV *, db_mutex_t, db_timeout_t);
int __db_fcntl_mutex_trylock(ENV *, db_mutex_t);
int __db_fcntl_mutex_unlock(ENV *, db_mutex_t);
int __db_fcntl_mutex_destroy(ENV *, db_mutex_t);
int __mutex_alloc_pp(DB_ENV *, uint32, db_mutex_t *);
int __mutex_free_pp(DB_ENV *, db_mutex_t);
int __mutex_lock_pp(DB_ENV *, db_mutex_t);
int __mutex_unlock_pp(DB_ENV *, db_mutex_t);
int __mutex_get_align(DB_ENV *, uint32 *);
int __mutex_set_align(DB_ENV *, uint32);
int __mutex_get_increment(DB_ENV *, uint32 *);
int __mutex_set_increment(DB_ENV *, uint32);
int __mutex_get_init(DB_ENV *, uint32 *);
int __mutex_set_init(DB_ENV *, uint32);
int __mutex_get_max(DB_ENV *, uint32 *);
int __mutex_set_max(DB_ENV *, uint32);
int __mutex_get_tas_spins(DB_ENV *, uint32 *);
int __mutex_set_tas_spins(DB_ENV *, uint32);
#if !defined(HAVE_ATOMIC_SUPPORT) && defined(HAVE_MUTEX_SUPPORT)
atomic_value_t __atomic_inc(ENV *, db_atomic_t *);
#endif
#if !defined(HAVE_ATOMIC_SUPPORT) && defined(HAVE_MUTEX_SUPPORT)
atomic_value_t __atomic_dec(ENV *, db_atomic_t *);
#endif
#if !defined(HAVE_ATOMIC_SUPPORT) && defined(HAVE_MUTEX_SUPPORT)
int atomic_compare_exchange(ENV *, db_atomic_t *, atomic_value_t, atomic_value_t);
#endif
int __db_pthread_mutex_init(ENV *, db_mutex_t, uint32);
#ifndef HAVE_MUTEX_HYBRID
int __db_pthread_mutex_lock(ENV *, db_mutex_t, db_timeout_t);
#endif
#if defined(HAVE_SHARED_LATCHES)
int __db_pthread_mutex_readlock(ENV *, db_mutex_t);
#endif
#ifdef HAVE_MUTEX_HYBRID
int __db_hybrid_mutex_suspend(ENV *, db_mutex_t, db_timespec *, int);
#endif
int __db_pthread_mutex_unlock(ENV *, db_mutex_t);
int __db_pthread_mutex_destroy(ENV *, db_mutex_t);
int __mutex_open(ENV *, int);
int __mutex_env_refresh(ENV *);
void __mutex_resource_return(ENV *, REGINFO *);
int __mutex_stat_pp(DB_ENV *, DB_MUTEX_STAT **, uint32);
int __mutex_stat_print_pp(DB_ENV *, uint32);
int __mutex_stat_print(ENV *, uint32);
void __mutex_print_debug_single(ENV *, const char *, db_mutex_t, uint32);
void __mutex_print_debug_stats(ENV *, DB_MSGBUF *, db_mutex_t, uint32);
void __mutex_set_wait_info(ENV *, db_mutex_t, uintmax_t *, uintmax_t *);
void __mutex_clear(ENV *, db_mutex_t);
int __db_tas_mutex_init(ENV *, db_mutex_t, uint32);
int __db_tas_mutex_lock(ENV *, db_mutex_t, db_timeout_t);
int __db_tas_mutex_trylock(ENV *, db_mutex_t);
#if defined(HAVE_SHARED_LATCHES)
int __db_tas_mutex_readlock(ENV *, db_mutex_t);
#endif
#if defined(HAVE_SHARED_LATCHES)
int __db_tas_mutex_tryreadlock(ENV *, db_mutex_t);
#endif
int __db_tas_mutex_unlock(ENV *, db_mutex_t);
int __db_tas_mutex_destroy(ENV *, db_mutex_t);
int __db_win32_mutex_init(ENV *, db_mutex_t, uint32);
int __db_win32_mutex_lock(ENV *, db_mutex_t, db_timeout_t);
int __db_win32_mutex_trylock(ENV *, db_mutex_t);
#if defined(HAVE_SHARED_LATCHES)
int __db_win32_mutex_readlock(ENV *, db_mutex_t);
#endif
#if defined(HAVE_SHARED_LATCHES)
int __db_win32_mutex_tryreadlock(ENV *, db_mutex_t);
#endif
int __db_win32_mutex_unlock(ENV *, db_mutex_t);
int __db_win32_mutex_destroy(ENV *, db_mutex_t);
#if defined(__cplusplus)
}
#endif
#endif /* !_mutex_ext_h_ */
|
/*
* This file is part of Kotaka, a mud library for DGD
* http://github.com/shentino/kotaka
*
* Copyright (C) 2018 Raymond Jennings
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* 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 Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <type.h>
private void validate_key(mixed key)
{
switch(typeof(key)) {
case T_INT:
case T_FLOAT:
case T_STRING:
return;
case T_NIL:
case T_MAPPING:
case T_ARRAY:
error("Invalid key type");
case T_OBJECT:
if (sscanf(object_name(key), "%*s#-1")) {
error("Invalid key type");
}
}
}
mapping set_tiered_map(mapping map, mixed args ...)
{
mixed key;
key = args[0];
validate_key(key);
if (sizeof(args) == 2) {
mixed value;
value = args[1];
if (value == nil) {
if (!map) {
return nil;
}
map[key] = nil;
if (map_sizeof(map) == 0) {
map = nil;
}
} else {
if (!map) {
map = ([ ]);
}
map[key] = value;
}
return map;
} else {
mapping submap;
mixed value;
args = args[1 ..];
value = args[sizeof(args) - 1];
if (!map) {
if (value == nil) {
return nil;
} else {
map = ([ ]);
}
}
submap = map[key];
if (!submap) {
submap = ([ ]);
}
submap = set_tiered_map(submap, args ...);
map[key] = submap;
if (!map_sizeof(map)) {
map = nil;
}
return map;
}
}
mixed query_tiered_map(mapping map, mixed args ...)
{
mixed key;
key = args[0];
validate_key(key);
if (sizeof(args) == 1) {
return map ? map[key] : nil;
} else {
mapping submap;
if (!map) {
return nil;
}
submap = map[key];
if (submap) {
return query_tiered_map(submap, args[1 ..] ...);
} else {
return nil;
}
}
}
|
// gls_gpu.h: interface for the GPU memory
//
//////////////////////////////////////////////////////////////////////
#if !defined(_GLS_GPU_H_)
#define _GLS_GPU_H_
#include "fm_matrix.h"
#include "fm_vector.h"
#ifdef __cplusplus
extern "C" {
#endif
#ifdef USECUDA
//#include <curand_kernel.h>
struct GPUobj{
//__device__ struct GPUobj{
int nSize;
//# array of cudaMatrix; ( size:N, Q*Q)
double** all_corMat;
//# array of cudaMatrix; ( size:N, Q*Q)
double** all_corMat_MH;
//# array of cudaMatrix; ( size:N, Q*Q)
double** all_corTimes;
//# array of cudaMatrix; ( size:N, Q*Q)
double** all_corMat_Inv;
//# array of cudaMatrix; ( size:N, Q*Q)
double** all_corMat_MH_Inv;
//# array of cudaVector; ( size:N, Q)
double** all_yi;
//# array of cudaVector; ( size:N, Q)
double** all_rd;
//# array of cudaMatrix; ( size:N, Q*LG)
double** all_ui;
//# cudaMatrix; (size:N*Q)
double* X;
//# cudaMatrix; (size:N*Q)
double* Z;
//# cudaMatrix; (size:N*Q)
double* Z0;
//# cudaVector; (size:N)
double* mInZ;
//# cudaVector; (size: LG)
double* mu;
//# cudaMatrix; (size, NC+1*LG )
double* alpha;
//# cudaMatrix; (size: P*LG)
double* a;
//# cudaMatrix; (size: P*LG)
double* a_old;
//# cudaMatrix; (size: P*LG)
double* d;
//# cudaMatrix; (size: P*LG)
double* d_old;
//# cudaVector (size: P)
double* vctP;
//# cudaMatrix; (size: P*N)
double* gen_a;
//# cudaMatrix; (size: P*N)
double* gen_d;
//# cudaVector (size: P)
double* tau2;
//# cudaVector (size: P)
double* tau2_x;
//# cudaVector for temporary use(size:N)!
double* tVN0;
//# cudaVector for temporary use(size:N)!
double* tVN1;
//# cudaVector for temporary use(size:N)!
double* tVN2;
//# array of cudaMatrix for temporary use! (size:N, Q*Q)
double** tempMat;
// size: N, Q*Q
double** tmp2;
// size: N, Q*Q
double** tmp3;
void* pNext;
};
struct GPUShare{
//__device__ struct GPUShare{
//# array of cudaMatrix for temporary use! (size: Q*Q)
double* tempMat0;
//# array of cudaMatrix for temporary use! (size: Q*Q)
double* tempMat1;
//# array of cudaMatrix for temporary use! (size: Q*Q)
double* tempMat2;
//# array of cudaMatrix for temporary use! (size: Q*Q)
double* tempMat3;
//# array of cudaMatrix for temporary use! (size: Q*Q)
double* tempMat4;
//# array of cudaMatrix for temporary use! (size: Q*Q)
double* tMA;
//# array of cudaMatrix for temporary use! (size: Q*Q)
double* tMB;
//# array of cudaMatrix for temporary use! (size: Q*Q)
double* tMC;
//# array of cudaMatrix for temporary use! (size: Q*Q)
double* tMD;
//# array of cudaMatrix for temporary use! (size: Q*Q)
double* tME;
double* pNext;
};
int _cuda_gpart0( int LG, int N, double rho, double tmp5 );
int _cuda_gpart1( struct GPUobj* gCuda, struct GPUobj* gCpuObj, int LG, int N, double rho, double tmp5 );
int _cuda_gpart2( struct GPUobj* gCuda, struct GPUobj* gCpuObj, struct GPUobj* gGpuMap, int LG, int N, int Q, int nC, double sigma2, CFmMatrix& alpha, CFmMatrix& tmp2, CFmMatrix& tmp3 );
int _cuda_gpart3( struct GPUobj* gCuda, struct GPUobj* gCpuObj, int LG, int N, int Q, int P, CFmMatrix& a, CFmMatrix& d );
int _cuda_gpart4( struct GPUobj* gCuda, struct GPUobj* gCpuObj, struct GPUobj* gGpuMap, int LG, int N, int Q, int j, int nC, double sigma2, CFmVector& mu, CFmMatrix& alpha, CFmMatrix& a, CFmMatrix& tmp2, CFmMatrix& tmp3);
int _cuda_gpart5( struct GPUobj* gCuda, struct GPUobj* gCpuObj, int LG, int N, int Q, int j, CFmMatrix& a, CFmMatrix& a_old );
int _cuda_gpart6( struct GPUobj* gCuda, struct GPUobj* gCpuObj, int LG, int P, double sigma2, double lambda2, double lambda2_x, CFmVector& vctP, CFmMatrix& a, CFmVector& tau2, CFmVector& tau2_x );
int _cuda_gpart7( struct GPUobj* gCuda, struct GPUobj* gCpuObj, struct GPUobj* gGpuMap, int LG, int N, int Q, int j, int nC, double sigma2, CFmMatrix& alpha, CFmVector& mu, CFmMatrix& d, CFmMatrix& tmp2, CFmMatrix& tmp3);
int _cuda_gpart8( struct GPUobj* gCuda, struct GPUobj* gCpuObj, int LG, int N, int Q, int j, CFmMatrix& d, CFmMatrix& d_old);
int _cuda_gpart9( struct GPUobj* gCuda, struct GPUobj* gCpuObj, int LG, int P, double lambda_st2, double lambda_st2_x, double sigma2, CFmVector& vctP, CFmMatrix& d, CFmVector& tau_st2, CFmVector& tau_st2_x);
int _cuda_gpart10(struct GPUobj* gCuda, struct GPUobj* gCpuObj, struct GPUobj* gGpuMap, int LG, int N, int Q, int nC, int nX, double sigma2, CFmMatrix& alpha, CFmVector& mu, CFmMatrix& tmp2, CFmMatrix& tmp3 );
int _cuda_gpart11(struct GPUobj* gCuda, struct GPUobj* gCpuObj, struct GPUobj* gGpuMap, int LG, int N, int Q, int nC, CFmMatrix& alpha, CFmVector& mu, double* sigma2_scale);
int _cuda_gpart12(struct GPUobj* gCuda, struct GPUobj* gCpuObj, struct GPUobj* gGpuMap, int LG, int N, int Q, int nC, double sigma2, CFmMatrix& alpha, CFmVector& mu, double* exp_diff);
int Init_GPUobj(struct GPUobj** pCpuObj, struct GPUobj** pGpuObj, struct GPUobj** pGpuMap, int LG, int N, int P, int Q, int NC);
int Free_GPUobj(struct GPUobj* pGpuObj, struct GPUobj* pCpuObj, struct GPUobj* pGpuMap, int LG, int N);
int _CheckCuda();
#endif
#ifdef __cplusplus
}
#endif
#endif
|
/*
* Generated by asn1c-0.9.28 (http://lionet.info/asn1c)
* From ASN.1 module "EUTRA-RRC-Definitions"
* found in "36331-ac0.asn"
* `asn1c -S /home/nyee/srsLTE/srslte/examples/src/asn1c/skeletons -fcompound-names -fskeletons-copy -gen-PER -pdu=auto`
*/
#include "MeasObjectGERAN.h"
static int
memb_ncc_Permitted_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
const BIT_STRING_t *st = (const BIT_STRING_t *)sptr;
size_t size;
if(!sptr) {
ASN__CTFAIL(app_key, td, sptr,
"%s: value not given (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
if(st->size > 0) {
/* Size in bits */
size = 8 * st->size - (st->bits_unused & 0x07);
} else {
size = 0;
}
if((size == 8)) {
/* Constraint check succeeded */
return 0;
} else {
ASN__CTFAIL(app_key, td, sptr,
"%s: constraint failed (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
}
static asn_per_constraints_t asn_PER_memb_ncc_Permitted_constr_4 GCC_NOTUSED = {
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
{ APC_CONSTRAINED, 0, 0, 8, 8 } /* (SIZE(8..8)) */,
0, 0 /* No PER value map */
};
static int asn_DFL_3_set_0(int set_value, void **sptr) {
Q_OffsetRangeInterRAT_t *st = *sptr;
if(!st) {
if(!set_value) return -1; /* Not a default value */
st = (*sptr = CALLOC(1, sizeof(*st)));
if(!st) return -1;
}
if(set_value) {
/* Install default value 0 */
*st = 0;
return 0;
} else {
/* Test default value 0 */
return (*st == 0);
}
}
static asn_TYPE_member_t asn_MBR_MeasObjectGERAN_1[] = {
{ ATF_NOFLAGS, 0, offsetof(struct MeasObjectGERAN, carrierFreqs),
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_CarrierFreqsGERAN,
0, /* Defer constraints checking to the member type */
0, /* No PER visible constraints */
0,
"carrierFreqs"
},
{ ATF_NOFLAGS, 3, offsetof(struct MeasObjectGERAN, offsetFreq),
(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_Q_OffsetRangeInterRAT,
0, /* Defer constraints checking to the member type */
0, /* No PER visible constraints */
asn_DFL_3_set_0, /* DEFAULT 0 */
"offsetFreq"
},
{ ATF_POINTER, 2, offsetof(struct MeasObjectGERAN, ncc_Permitted),
(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_BIT_STRING,
memb_ncc_Permitted_constraint_1,
&asn_PER_memb_ncc_Permitted_constr_4,
0,
"ncc-Permitted"
},
{ ATF_POINTER, 1, offsetof(struct MeasObjectGERAN, cellForWhichToReportCGI),
(ASN_TAG_CLASS_CONTEXT | (3 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_PhysCellIdGERAN,
0, /* Defer constraints checking to the member type */
0, /* No PER visible constraints */
0,
"cellForWhichToReportCGI"
},
};
static const int asn_MAP_MeasObjectGERAN_oms_1[] = { 1, 2, 3 };
static const ber_tlv_tag_t asn_DEF_MeasObjectGERAN_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static const asn_TYPE_tag2member_t asn_MAP_MeasObjectGERAN_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* carrierFreqs */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* offsetFreq */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* ncc-Permitted */
{ (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* cellForWhichToReportCGI */
};
static asn_SEQUENCE_specifics_t asn_SPC_MeasObjectGERAN_specs_1 = {
sizeof(struct MeasObjectGERAN),
offsetof(struct MeasObjectGERAN, _asn_ctx),
asn_MAP_MeasObjectGERAN_tag2el_1,
4, /* Count of tags in the map */
asn_MAP_MeasObjectGERAN_oms_1, /* Optional members */
3, 0, /* Root/Additions */
3, /* Start extensions */
5 /* Stop extensions */
};
asn_TYPE_descriptor_t asn_DEF_MeasObjectGERAN = {
"MeasObjectGERAN",
"MeasObjectGERAN",
SEQUENCE_free,
SEQUENCE_print,
SEQUENCE_constraint,
SEQUENCE_decode_ber,
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
SEQUENCE_decode_uper,
SEQUENCE_encode_uper,
0, /* Use generic outmost tag fetcher */
asn_DEF_MeasObjectGERAN_tags_1,
sizeof(asn_DEF_MeasObjectGERAN_tags_1)
/sizeof(asn_DEF_MeasObjectGERAN_tags_1[0]), /* 1 */
asn_DEF_MeasObjectGERAN_tags_1, /* Same as above */
sizeof(asn_DEF_MeasObjectGERAN_tags_1)
/sizeof(asn_DEF_MeasObjectGERAN_tags_1[0]), /* 1 */
0, /* No PER visible constraints */
asn_MBR_MeasObjectGERAN_1,
4, /* Elements count */
&asn_SPC_MeasObjectGERAN_specs_1 /* Additional specs */
};
|
/*******************************************************************************
* File Name: CapSense_CSD_Clk2.c
* Version 2.0
*
* Description:
* Provides system API for the clocking, interrupts and watchdog timer.
*
* Note:
* Documentation of the API's in this file is located in the
* System Reference Guide provided with PSoC Creator.
*
********************************************************************************
* Copyright 2008-2012, Cypress Semiconductor Corporation. All rights reserved.
* You may use this file only in accordance with the license, terms, conditions,
* disclaimers, and limitations in the end user license agreement accompanying
* the software package with which this file was provided.
*******************************************************************************/
#include <cydevice_trm.h>
#include "CapSense_CSD_Clk2.h"
/*******************************************************************************
* Function Name: CapSense_CSD_Clk2_Start
********************************************************************************
*
* Summary:
* Starts the clock.
*
* Parameters:
* None
*
* Returns:
* None
*
*******************************************************************************/
void CapSense_CSD_Clk2_Start(void)
{
/* Set the bit to enable the clock. */
CapSense_CSD_Clk2_ENABLE_REG |= CapSense_CSD_Clk2__ENABLE_MASK;
}
/*******************************************************************************
* Function Name: CapSense_CSD_Clk2_Stop
********************************************************************************
*
* Summary:
* Stops the clock and returns immediately. This API does not require the
* source clock to be running but may return before the hardware is actually
* disabled.
*
* Parameters:
* None
*
* Returns:
* None
*
*******************************************************************************/
void CapSense_CSD_Clk2_Stop(void)
{
/* Clear the bit to disable the clock. */
CapSense_CSD_Clk2_ENABLE_REG &= (uint32)(~CapSense_CSD_Clk2__ENABLE_MASK);
}
/*******************************************************************************
* Function Name: CapSense_CSD_Clk2_SetFractionalDividerRegister
********************************************************************************
*
* Summary:
* Modifies the clock divider and the fractional divider.
*
* Parameters:
* clkDivider: Divider register value (0-65535). This value is NOT the
* divider; the clock hardware divides by clkDivider plus one. For example,
* to divide the clock by 2, this parameter should be set to 1.
* fracDivider: Fractional Divider register value (0-31).
* Returns:
* None
*
*******************************************************************************/
void CapSense_CSD_Clk2_SetFractionalDividerRegister(uint16 clkDivider, uint8 clkFractional)
{
#if defined (CapSense_CSD_Clk2__FRAC_MASK)
/* get all but divider bits */
uint32 maskVal = CapSense_CSD_Clk2_DIV_REG &
(uint32)(~(CapSense_CSD_Clk2__DIVIDER_MASK | CapSense_CSD_Clk2__FRAC_MASK));
/* combine mask and new divider val into 32-bit value */
uint32 regVal = clkDivider | (((uint32)clkFractional << 16) & CapSense_CSD_Clk2__FRAC_MASK) | maskVal;
#else
/* get all but integer divider bits */
uint32 maskVal = CapSense_CSD_Clk2_DIV_REG & (uint32)(~(uint32)CapSense_CSD_Clk2__DIVIDER_MASK);
/* combine mask and new divider val into 32-bit value */
uint32 regVal = clkDivider | maskVal;
#endif /* CapSense_CSD_Clk2__FRAC_MASK */
CapSense_CSD_Clk2_DIV_REG = regVal;
}
/*******************************************************************************
* Function Name: CapSense_CSD_Clk2_GetDividerRegister
********************************************************************************
*
* Summary:
* Gets the clock divider register value.
*
* Parameters:
* None
*
* Returns:
* Divide value of the clock minus 1. For example, if the clock is set to
* divide by 2, the return value will be 1.
*
*******************************************************************************/
uint16 CapSense_CSD_Clk2_GetDividerRegister(void)
{
return (uint16)CapSense_CSD_Clk2_DIV_REG;
}
/*******************************************************************************
* Function Name: CapSense_CSD_Clk2_GetFractionalDividerRegister
********************************************************************************
*
* Summary:
* Gets the clock fractional divider register value.
*
* Parameters:
* None
*
* Returns:
* Fractional Divide value of the clock
* 0 if the fractional divider is not in use.
*
*******************************************************************************/
uint8 CapSense_CSD_Clk2_GetFractionalDividerRegister(void)
{
#if defined (CapSense_CSD_Clk2__FRAC_MASK)
/* get fractional divider bits */
uint32 maskVal = CapSense_CSD_Clk2_DIV_REG & CapSense_CSD_Clk2__FRAC_MASK;
return (maskVal >> 16);
#else
return 0u;
#endif /* CapSense_CSD_Clk2__FRAC_MASK */
}
/* [] END OF FILE */
|
//******************************************************************************
///
/// @file frontend/imageprocessing.h
///
/// @todo What's in here?
///
/// @copyright
/// @parblock
///
/// Persistence of Vision Ray Tracer ('POV-Ray') version 3.7.
/// Copyright 1991-2015 Persistence of Vision Raytracer Pty. Ltd.
///
/// POV-Ray is free software: you can redistribute it and/or modify
/// it under the terms of the GNU Affero General Public License as
/// published by the Free Software Foundation, either version 3 of the
/// License, or (at your option) any later version.
///
/// POV-Ray is distributed in the hope that it will be useful,
/// but WITHOUT ANY WARRANTY; without even the implied warranty of
/// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
/// GNU Affero General Public License for more details.
///
/// You should have received a copy of the GNU Affero General Public License
/// along with this program. If not, see <http://www.gnu.org/licenses/>.
///
/// ----------------------------------------------------------------------------
///
/// POV-Ray is based on the popular DKB raytracer version 2.12.
/// DKBTrace was originally written by David K. Buck.
/// DKBTrace Ver 2.0-2.12 were written by David K. Buck & Aaron A. Collins.
///
/// @endparblock
///
//*******************************************************************************
#ifndef POVRAY_FRONTEND_IMAGEPROCESSING_H
#define POVRAY_FRONTEND_IMAGEPROCESSING_H
#include <string>
#include <boost/scoped_ptr.hpp>
#include "base/fileinputoutput.h"
#include "base/image/image.h"
#include "base/povmscpp.h"
#include "base/povmsgid.h"
#include "base/stringutilities.h"
#include "frontend/configfrontend.h"
namespace pov_frontend
{
using namespace pov_base;
class ImageProcessing
{
public:
ImageProcessing(unsigned int width, unsigned int height);
ImageProcessing(POVMS_Object& ropts);
ImageProcessing(shared_ptr<Image>& img);
virtual ~ImageProcessing();
UCS2String WriteImage(POVMS_Object& ropts, POVMSInt frame = 0, int digits = 0);
shared_ptr<Image>& GetImage();
UCS2String GetOutputFilename(POVMS_Object& ropts, POVMSInt frame, int digits);
bool OutputIsStdout(void) { return toStdout; }
bool OutputIsStderr(void) { return toStderr; }
virtual bool OutputIsStdout(POVMS_Object& ropts);
virtual bool OutputIsStderr(POVMS_Object& ropts);
protected:
shared_ptr<Image> image;
bool toStdout;
bool toStderr;
private:
ImageProcessing();
ImageProcessing(const ImageProcessing&);
ImageProcessing& operator=(const ImageProcessing&);
};
}
#endif // POVRAY_FRONTEND_IMAGEPROCESSING_H
|
/*--!>
This file is part of Nebula, a multi-purpose library mainly written in C++.
Copyright 2015-2016 outshined (outshined@riseup.net)
(PGP: 0x8A80C12396A4836F82A93FA79CA3D0F7E8FBCED6)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
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 Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
--------------------------------------------------------------------------<!--*/
#ifndef NIC_03BBCD9441044AFA_NIC
#define NIC_03BBCD9441044AFA_NIC
#include "../common.h"
namespace nebula { namespace foundation { namespace range {
/** @ingroup Foundation
* @{
*/
//------------------------------------------------------------------------------
template <class R>
struct reverse_impl
{
inline static void apply(R &r)
{
ins_::reverse(
range::begin(r),
range::end(r));
}
};
//------------------------------------------------------------------------------
/**
* */
template <class R>
inline void reverse(R &r)
{
reverse_impl<R>::apply(r);
}
/** @} */
}}} // namespaces
#endif // NIC_03BBCD9441044AFA_NIC
|
/**
Released as open source by NCC Group Plc - http://www.nccgroup.com/
Developed by Gabriel Caudrelier, gabriel dot caudrelier at nccgroup dot com
https://github.com/nccgroup/pip3line
Released under AGPL see LICENSE for more information
**/
#ifndef URLENCODE_H
#define URLENCODE_H
#include "transformabstract.h"
class UrlEncode : public TransformAbstract
{
Q_OBJECT
public:
static const QByteArray TEXTCHAR;
explicit UrlEncode();
~UrlEncode();
QString name() const;
QString description() const;
void transform(const QByteArray &input, QByteArray &output);
bool isTwoWays();
QHash<QString, QString> getConfiguration();
bool setConfiguration(QHash<QString, QString> propertiesList);
QWidget * requestGui(QWidget * parent);
static const QString id;
QString help() const;
char getPercentSign();
QByteArray getExclude();
QByteArray getInclude();
void setPercentSign(char val);
void setExclude(QByteArray vals);
void setInclude(QByteArray vals);
private:
char percentSign;
QByteArray exclude;
QByteArray include;
};
#endif // URLENCODE_H
|
/*-
* See the file LICENSE for redistribution information.
*
* Copyright (c) 1996, 2011 Oracle and/or its affiliates. All rights reserved.
*/
/*
* Copyright (c) 1990, 1993
* The Regents of the University of California. 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. Neither the name of the University 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 REGENTS 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 REGENTS 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.
*
* $Id$
*/
#include "db_config.h"
#include "db_int.h"
/*
* memcmp --
*
* PUBLIC: #ifndef HAVE_MEMCMP
* PUBLIC: int memcmp __P((const void *, const void *, size_t));
* PUBLIC: #endif
*/
int
memcmp(s1, s2, n)
const void *s1, *s2;
size_t n;
{
if (n != 0) {
unsigned char *p1 = (unsigned char *)s1,
*p2 = (unsigned char *)s2;
do {
if (*p1++ != *p2++)
return (*--p1 - *--p2);
} while (--n != 0);
}
return (0);
}
|
/*
**********************************************************************
* Copyright (c) 2002-2011, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
*/
#ifndef _UCURR_IMP_H_
#define _UCURR_IMP_H_
#include "unicode/utypes.h"
#include "unicode/unistr.h"
#include "unicode/parsepos.h"
/**
* Internal method. Given a currency ISO code and a locale, return
* the "static" currency name. This is usually the same as the
* UCURR_SYMBOL_NAME, but if the latter is a choice format, then the
* format is applied to the number 2.0 (to yield the more common
* plural) to return a static name.
*
* This is used for backward compatibility with old currency logic in
* DecimalFormat and DecimalFormatSymbols.
*/
U_CFUNC void
uprv_getStaticCurrencyName(const UChar* iso, const char* loc,
icu::UnicodeString& result, UErrorCode& ec);
/**
* Attempt to parse the given string as a currency, either as a
* display name in the given locale, or as a 3-letter ISO 4217
* code. If multiple display names match, then the longest one is
* selected. If both a display name and a 3-letter ISO code
* match, then the display name is preferred, unless it's length
* is less than 3.
*
* @param locale the locale of the display names to match
* @param text the text to parse
* @param pos input-output position; on input, the position within
* text to match; must have 0 <= pos.getIndex() < text.length();
* on output, the position after the last matched character. If
* the parse fails, the position in unchanged upon output.
* @param type currency type to parse against, LONG_NAME only or not
* @return the ISO 4217 code, as a string, of the best match, or
* null if there is no match
*
* @internal
*/
U_CFUNC void
uprv_parseCurrency(const char* locale,
const icu::UnicodeString& text,
icu::ParsePosition& pos,
int8_t type,
UChar* result,
UErrorCode& ec);
#endif /* #ifndef _UCURR_IMP_H_ */
//eof
|
/* Copyright 2009, UCAR/Unidata and OPeNDAP, Inc.
See the COPYRIGHT file for more information. */
#ifndef OCINTERNAL_H
#define OCINTERNAL_H
#include "config.h"
#if defined(_WIN32) || defined(_WIN64)
#include <malloc.h>
#endif
#ifdef _AIX
#include <netinet/in.h>
#endif
#include <stdlib.h>
#include <assert.h>
#include <string.h>
#ifdef HAVE_STRINGS_H
#include <strings.h>
#endif
#ifdef HAVE_STDARG_H
#include <stdarg.h>
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#define CURL_DISABLE_TYPECHECK 1
#include <curl/curl.h>
#include "oclist.h"
#include "ocbytes.h"
#include "ocuri.h"
#define OCCACHEPOS
/* Forwards */
typedef struct OCstate OCstate;
typedef struct OCnode OCnode;
typedef struct OCdata OCdata;
struct OCTriplestore;
/* Define the internal node classification values */
#define OC_None 0
#define OC_State 1
#define OC_Node 2
#define OC_Data 3
/* Define a magic number to mark externally visible oc objects */
#define OCMAGIC ((unsigned int)0x0c0c0c0c) /*clever, huh*/
/* Define a struct that all oc objects must start with */
/* OCheader must be defined here to make it available in other headers */
typedef struct OCheader {
unsigned int magic;
unsigned int occlass;
} OCheader;
#include "oc.h"
#include "ocx.h"
#include "ocnode.h"
#include "ocdata.h"
#include "occonstraints.h"
#include "ocutil.h"
#include "oclog.h"
#include "xxdr.h"
#include "ocdatatypes.h"
#include "occompile.h"
#ifndef nulldup
#define nulldup(s) (s==NULL?NULL:strdup(s))
#endif
/*
* Macros for dealing with flag bits.
*/
#define fset(t,f) ((t) |= (f))
#define fclr(t,f) ((t) &= ~(f))
#define fisset(t,f) ((t) & (f))
#define nullstring(s) (s==NULL?"(null)":s)
#define PATHSEPARATOR "."
/* Define infinity for memory size */
#if SIZEOF_SIZE_T == 4
#define OCINFINITY ((size_t)0xffffffff)
#else
#define OCINFINITY ((size_t)0xffffffffffffffff)
#endif
/* Extend the OCdxd type for internal use */
#define OCVER 3
/* Default initial memory packet size */
#define DFALTPACKETSIZE 0x20000 /*approximately 100k bytes*/
/* Default maximum memory packet size */
#define DFALTMAXPACKETSIZE 0x3000000 /*approximately 50M bytes*/
/* Default user agent string (will have version appended)*/
#define DFALTUSERAGENT "oc"
/* Collect global state info in one place */
extern struct OCGLOBALSTATE {
int initialized;
struct {
int proto_file;
int proto_https;
} curl;
struct OCTriplestore* ocdodsrc; /* the .dodsrc triple store */
} ocglobalstate;
/*! Specifies the OCstate = non-opaque version of OClink */
struct OCstate {
OCheader header; /* class=OC_State */
OClist* trees; /* list<OCNODE*> ; all root objects */
OCURI* uri; /* base URI*/
OCbytes* packet; /* shared by all trees during construction */
struct OCerrdata {/* Hold info for an error return from server */
char* code;
char* message;
long httpcode;
char curlerrorbuf[CURL_ERROR_SIZE]; /* to get curl error message */
} error;
CURL* curl; /* curl handle*/
char curlerror[CURL_ERROR_SIZE];
struct OCcurlflags {
int proto_file;
int proto_https;
int compress;
int verbose;
int timeout;
int followlocation;
int maxredirs;
char* useragent;
char* cookiejar;
char* cookiefile;
} curlflags;
struct OCSSL {
int validate;
char* certificate;
char* key;
char* keypasswd;
char* cainfo; /* certificate authority */
char* capath;
int verifypeer;
} ssl;
struct OCproxy {
char *host;
int port;
} proxy;
struct OCcredentials {
char *username;
char *password;
} creds;
long ddslastmodified;
long datalastmodified;
};
/*! OCtree holds extra state info about trees */
typedef struct OCtree
{
OCdxd dxdclass;
char* constraint;
char* text;
struct OCnode* root; /* cross link */
struct OCstate* state; /* cross link */
OClist* nodes; /* all nodes in tree*/
/* when dxdclass == OCDATADDS */
struct {
char* memory; /* allocated memory if OC_ONDISK is not set */
char* filename; /* If OC_ONDISK is set */
FILE* file;
off_t datasize; /* xdr size on disk or in memory */
off_t bod; /* offset of the beginning of packet data */
off_t ddslen; /* length of ddslen (assert(ddslen <= bod)) */
XXDR* xdrs; /* access either memory or file */
OCdata* data;
} data;
} OCtree;
/* (Almost) All shared procedure definitions are kept here
except for: ocdebug.h ocutil.h
The true external interface is defined in oc.h
*/
#if 0
/* Location: ceparselex.c*/
extern int cedebug;
extern OClist* CEparse(OCstate*,char* input);
#endif
extern OCerror ocopen(OCstate** statep, const char* url);
extern void occlose(OCstate* state);
extern OCerror ocfetch(OCstate*, const char*, OCdxd, OCflags, OCnode**);
extern int oc_network_order;
extern int oc_invert_xdr_double;
extern int ocinternalinitialize(void);
extern OCerror ocupdatelastmodifieddata(OCstate* state);
extern int ocinternalinitialize(void);
extern OCerror ocsetuseragent(OCstate* state, const char* agent);
#endif /*COMMON_H*/
|
/*
* PHP-GTK - The PHP language bindings for GTK+
*
* Copyright (C) 2001-2008 Andrei Zmievski <andrei@php.net>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/* $Id: php_libglade.h,v 1.11 2008/02/29 19:05:53 andrei Exp $: */
#ifndef PHP_LIBGLADE_H
#define PHP_LIBGLADE_H
#include "php_gtk.h"
#if HAVE_LIBGLADE
#include <glade/glade.h>
extern php_gtk_ext_entry libglade_ext_entry;
#define php_gtk_ext_libglade_ptr &libglade_ext_entry
void phpg_glade_register_classes(void);
void phpg_glade_register_constants(const char *strip_prefix);
#else
#define php_gtk_ext_libglade_ptr NULL
#endif /* HAVE_LIBGLADE */
#endif /* PHP_LIBGLADE_H */
|
#ifndef STRATEGIES_PICTURE_SSE41_H_
#define STRATEGIES_PICTURE_SSE41_H_
#include "global.h"
/*****************************************************************************
* This file is part of Kvazaar HEVC encoder.
*
* Copyright (C) 2013-2015 Tampere University of Technology and others (see
* COPYING file).
*
* Kvazaar is free software: you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation; either version 2.1 of the License, or (at your
* option) any later version.
*
* Kvazaar 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 General Public License along
* with Kvazaar. If not, see <http://www.gnu.org/licenses/>.
****************************************************************************/
int kvz_strategy_register_picture_sse41(void* opaque, uint8_t bitdepth);
#endif //STRATEGIES_PICTURE_SSE41_H_
|
/* ADG - Automatic Drawing Generation
* Copyright (C) 2007-2022 Nicola Fontana <ntd at entidi.it>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#if !defined(__ADG_H__)
#error "Only <adg.h> can be included directly."
#endif
#ifndef __ADG_EDGES_H__
#define __ADG_EDGES_H__
G_BEGIN_DECLS
#define ADG_TYPE_EDGES (adg_edges_get_type())
#define ADG_EDGES(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), ADG_TYPE_EDGES, AdgEdges))
#define ADG_EDGES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), ADG_TYPE_EDGES, AdgEdgesClass))
#define ADG_IS_EDGES(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), ADG_TYPE_EDGES))
#define ADG_IS_EDGES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), ADG_TYPE_EDGES))
#define ADG_EDGES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), ADG_TYPE_EDGES, AdgEdgesClass))
typedef struct _AdgEdges AdgEdges;
typedef struct _AdgEdgesClass AdgEdgesClass;
struct _AdgEdges {
/*< private >*/
AdgTrail parent;
};
struct _AdgEdgesClass {
/*< private >*/
AdgTrailClass parent_class;
};
GType adg_edges_get_type (void);
AdgEdges * adg_edges_new (void);
AdgEdges * adg_edges_new_with_source (AdgTrail *source);
void adg_edges_set_source (AdgEdges *edges,
AdgTrail *source);
AdgTrail * adg_edges_get_source (AdgEdges *edges);
void adg_edges_set_axis_angle (AdgEdges *edges,
gdouble angle);
gdouble adg_edges_get_axis_angle (AdgEdges *edges);
void adg_edges_set_critical_angle (AdgEdges *edges,
gdouble angle);
gdouble adg_edges_get_critical_angle (AdgEdges *edges);
G_END_DECLS
#endif /* __ADG_EDGES_H__ */
|
#ifndef _SEMANAGE_NODE_INTERNAL_H_
#define _SEMANAGE_NODE_INTERNAL_H_
#include <semanage/node_record.h>
#include <semanage/nodes_local.h>
#include <semanage/nodes_policy.h>
#include "database.h"
#include "handle.h"
#include "dso.h"
hidden_proto(semanage_node_create)
hidden_proto(semanage_node_compare)
hidden_proto(semanage_node_compare2)
hidden_proto(semanage_node_clone)
hidden_proto(semanage_node_free)
hidden_proto(semanage_node_key_extract)
hidden_proto(semanage_node_key_free)
hidden_proto(semanage_node_get_addr)
hidden_proto(semanage_node_get_addr_bytes)
hidden_proto(semanage_node_get_mask)
hidden_proto(semanage_node_get_mask_bytes)
hidden_proto(semanage_node_get_proto)
hidden_proto(semanage_node_set_addr)
hidden_proto(semanage_node_set_addr_bytes)
hidden_proto(semanage_node_set_mask)
hidden_proto(semanage_node_set_mask_bytes)
hidden_proto(semanage_node_set_proto)
hidden_proto(semanage_node_get_proto_str)
hidden_proto(semanage_node_get_con)
hidden_proto(semanage_node_set_con)
hidden_proto(semanage_node_list_local)
/* NODE RECORD: method table */
extern record_table_t SEMANAGE_NODE_RTABLE;
extern int node_file_dbase_init(semanage_handle_t * handle,
const char *fname, dbase_config_t * dconfig);
extern void node_file_dbase_release(dbase_config_t * dconfig);
extern int node_policydb_dbase_init(semanage_handle_t * handle,
dbase_config_t * dconfig);
extern void node_policydb_dbase_release(dbase_config_t * dconfig);
extern int hidden semanage_node_validate_local(semanage_handle_t * handle);
/* ==== Internal (to nodes) API === */
hidden int semanage_node_compare2_qsort(const semanage_node_t ** node,
const semanage_node_t ** node2);
#endif
|
/*
* simple-account.h - header for a simple account service.
*
* Copyright (C) 2010-2012 Collabora Ltd. <http://www.collabora.co.uk/>
*
* Copying and distribution of this file, with or without modification,
* are permitted in any medium without royalty provided the copyright
* notice and this notice are preserved.
*/
#ifndef __TP_TESTS_SIMPLE_ACCOUNT_H__
#define __TP_TESTS_SIMPLE_ACCOUNT_H__
#include <glib-object.h>
#include <telepathy-glib/telepathy-glib.h>
G_BEGIN_DECLS
typedef struct _TpTestsSimpleAccount TpTestsSimpleAccount;
typedef struct _TpTestsSimpleAccountClass TpTestsSimpleAccountClass;
typedef struct _TpTestsSimpleAccountPrivate TpTestsSimpleAccountPrivate;
struct _TpTestsSimpleAccountClass {
GObjectClass parent_class;
TpDBusPropertiesMixinClass dbus_props_class;
};
struct _TpTestsSimpleAccount {
GObject parent;
TpTestsSimpleAccountPrivate *priv;
};
GType tp_tests_simple_account_get_type (void);
/* TYPE MACROS */
#define TP_TESTS_TYPE_SIMPLE_ACCOUNT \
(tp_tests_simple_account_get_type ())
#define TP_TESTS_SIMPLE_ACCOUNT(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj), TP_TESTS_TYPE_SIMPLE_ACCOUNT, \
TpTestsSimpleAccount))
#define TP_TESTS_SIMPLE_ACCOUNT_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass), TP_TESTS_TYPE_SIMPLE_ACCOUNT, \
TpTestsSimpleAccountClass))
#define TP_TESTS_SIMPLE_IS_ACCOUNT(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj), TP_TESTS_TYPE_SIMPLE_ACCOUNT))
#define TP_TESTS_SIMPLE_IS_ACCOUNT_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE((klass), TP_TESTS_TYPE_SIMPLE_ACCOUNT))
#define TP_TESTS_SIMPLE_ACCOUNT_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS ((obj), TP_TESTS_TYPE_SIMPLE_ACCOUNT, \
TpTestsSimpleAccountClass))
void tp_tests_simple_account_set_presence (TpTestsSimpleAccount *self,
TpConnectionPresenceType presence,
const gchar *status,
const gchar *message);
void tp_tests_simple_account_set_connection (TpTestsSimpleAccount *self,
const gchar *object_path);
void tp_tests_simple_account_removed (TpTestsSimpleAccount *self);
void tp_tests_simple_account_set_enabled (TpTestsSimpleAccount *self,
gboolean enabled);
void tp_tests_simple_account_add_uri_scheme (TpTestsSimpleAccount *self,
const gchar * uri_scheme);
void tp_tests_simple_account_set_avatar (TpTestsSimpleAccount *self,
const gchar *avatar);
G_END_DECLS
#endif /* #ifndef __TP_TESTS_SIMPLE_ACCOUNT_H__ */
|
// El siguiente bloque ifdef muestra la forma estándar de crear macros que facilitan
// la exportación de archivos DLL. Todos los archivos de este archivo DLL se compilan con el símbolo Q3BSP_EXPORTS
// definido en la línea de comandos. Este símbolo no se debe definir en ningún proyecto
// que utilice este archivo DLL. De este modo, otros proyectos cuyos archivos de código fuente incluyan el archivo
// interpreta que las funciones Q3BSP_API se importan de un archivo DLL, mientras que este archivo DLL interpreta los símbolos
// definidos en esta macro como si fueran exportados.
/*
#ifdef Q3BSP_EXPORTS
#define Q3BSP_API __declspec(dllexport)
#else
#define Q3BSP_API __declspec(dllimport)
#endif
// Clase exportada de q3bsp.dll
class Q3BSP_API Cq3bsp {
public:
Cq3bsp(void);
// TODO: agregar métodos aquí.
};
extern Q3BSP_API int nq3bsp;
Q3BSP_API int fnq3bsp(void);
*/
|
/**************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
**
** Contact: Nokia Corporation (qt-info@nokia.com)
**
**
** GNU Lesser General Public License Usage
**
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this file.
** Please review the following information to ensure the GNU Lesser General
** Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** Other Usage
**
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
**
**************************************************************************/
#ifndef QUICKFIXASSISTPROCESSOR_H
#define QUICKFIXASSISTPROCESSOR_H
#include "iassistprocessor.h"
namespace TextEditor {
class TEXTEDITOR_EXPORT QuickFixAssistProcessor : public IAssistProcessor
{
public:
QuickFixAssistProcessor();
virtual ~QuickFixAssistProcessor();
virtual const IAssistProvider *provider() const = 0;
virtual IAssistProposal *perform(const IAssistInterface *interface);
};
} // TextEditor
#endif // QUICKFIXASSISTPROCESSOR_H
|
/**
* Copyright 2017, Huang Yang <elious.huang@gmail.com>. All rights reserved.
*
* See the COPYING file for the terms of usage and distribution.
*/
#include "tlog/tlog.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(int argc, char **argv)
{
int err = tlog_open("./file.conf", TLOG_FILE);
if (0 != err)
{
fprintf(stderr, "open tlog failed: \"file.conf\" %s\n", strerror(-err));
exit(EXIT_FAILURE);
}
const tlog_category *file = tlog_get_category("file");
if (NULL == file)
{
fprintf(stderr, "missing category \"file\"\n");
exit(EXIT_FAILURE);
}
tlog_debug(file, "this is file example");
exit(EXIT_SUCCESS);
}
|
/***************************************************************************
* Copyright (c) 2014 Werner Mayer <wmayer[at]users.sourceforge.net> *
* *
* This file is part of the FreeCAD CAx development system. *
* *
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Library General Public *
* License as published by the Free Software Foundation; either *
* version 2 of the License, or (at your option) any later version. *
* *
* This library is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Library General Public License for more details. *
* *
* You should have received a copy of the GNU Library General Public *
* License along with this library; see the file COPYING.LIB. If not, *
* write to the Free Software Foundation, Inc., 59 Temple Place, *
* Suite 330, Boston, MA 02111-1307, USA *
* *
***************************************************************************/
#ifndef GUI_QUANTITYSPINBOX_H
#define GUI_QUANTITYSPINBOX_H
#include <QAbstractSpinBox>
#include <Base/Quantity.h>
#include "ExpressionBinding.h"
#ifdef Q_MOC_RUN
Q_DECLARE_METATYPE(Base::Quantity)
#endif
namespace Gui {
class QuantitySpinBoxPrivate;
class GuiExport QuantitySpinBox : public QAbstractSpinBox, public ExpressionBinding
{
Q_OBJECT
Q_PROPERTY(QString unit READ unitText WRITE setUnitText)
Q_PROPERTY(double minimum READ minimum WRITE setMinimum)
Q_PROPERTY(double maximum READ maximum WRITE setMaximum)
Q_PROPERTY(double singleStep READ singleStep WRITE setSingleStep)
Q_PROPERTY(Base::Quantity value READ value WRITE setValue NOTIFY valueChanged USER true)
public:
explicit QuantitySpinBox(QWidget *parent = 0);
virtual ~QuantitySpinBox();
/// Get the current quantity
Base::Quantity value() const;
/// Gives the current state of the user input, gives true if it is a valid input with correct quantity
/// or returns false if the input is a unparsable string or has a wrong unit.
bool hasValidInput() const;
/** Sets the Unit this widget is working with.
* After setting the Unit the widget will only accept
* user input with this unit type. Or if the user input
* a value without unit, this one will be added to the resulting
* Quantity.
*/
Base::Unit unit() const;
void setUnit(const Base::Unit &unit);
/// Set the unit property
void setUnitText(const QString&);
/// Get the unit property
QString unitText(void);
/// Get the value of the singleStep property
double singleStep() const;
/// Set the value of the singleStep property
void setSingleStep(double val);
/// Gets the value of the minimum property
double minimum() const;
/// Sets the value of the minimum property
void setMinimum(double min);
/// Gets the value of the maximum property
double maximum() const;
/// Sets the value of the maximum property
void setMaximum(double max);
/// Set the number portion selected
void selectNumber();
void setRange(double min, double max);
Base::Quantity valueFromText(const QString &text) const;
QString textFromValue(const Base::Quantity& val) const;
virtual void stepBy(int steps);
virtual void clear();
virtual QValidator::State validate(QString &input, int &pos) const;
virtual void fixup(QString &str) const;
bool event(QEvent *event);
void setExpression(boost::shared_ptr<App::Expression> expr);
void bind(const App::ObjectIdentifier &_path);
bool apply(const std::string &propName);
bool apply();
public Q_SLOTS:
/// Sets the field with a quantity
void setValue(const Base::Quantity& val);
/// Set a numerical value which gets converted to a quantity with the currently set unit type
void setValue(double);
protected Q_SLOTS:
void userInput(const QString & text);
void openFormulaDialog();
void finishFormulaDialog();
protected:
virtual StepEnabled stepEnabled() const;
virtual void showEvent(QShowEvent * event);
virtual void focusInEvent(QFocusEvent * event);
virtual void focusOutEvent(QFocusEvent * event);
virtual void keyPressEvent(QKeyEvent *event);
virtual void resizeEvent(QResizeEvent *event);
private:
void updateText(const Base::Quantity&);
Q_SIGNALS:
/** Gets emitted if the user has entered a VALID input
* Valid means the user inputted string obeys all restrictions
* like: minimum, maximum and/or the right Unit (if specified).
*/
void valueChanged(const Base::Quantity&);
/** Gets emitted if the user has entered a VALID input
* Valid means the user inputted string obeys all restrictions
* like: minimum, maximum and/or the right Unit (if specified).
*/
void valueChanged(double);
private:
QScopedPointer<QuantitySpinBoxPrivate> d_ptr;
Q_DISABLE_COPY(QuantitySpinBox)
Q_DECLARE_PRIVATE(QuantitySpinBox)
};
} // namespace Gui
#endif // GUI_QUANTITYSPINBOX_H
|
/****************************************************************************
**
** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
** Copyright (C) 2013 Klarälvdalens Datakonsult AB (KDAB).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Compositor.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
**
** "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 Digia Plc and its Subsidiary(-ies) 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."
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QTWAYLAND_QWLTOUCH_P_H
#define QTWAYLAND_QWLTOUCH_P_H
#include <QtCompositor/qwaylandexport.h>
#include <QtCore/QPoint>
#include <QtCompositor/private/qwayland-server-wayland.h>
QT_BEGIN_NAMESPACE
namespace QtWayland {
class Compositor;
class Surface;
class Touch;
class Q_COMPOSITOR_EXPORT TouchGrabber {
public:
TouchGrabber();
virtual ~TouchGrabber();
virtual void down(uint32_t time, int touch_id, const QPointF &position) = 0;
virtual void up(uint32_t time, int touch_id) = 0;
virtual void motion(uint32_t time, int touch_id, const QPointF &position) = 0;
const Touch *touch() const;
Touch *touch();
void setTouch(Touch *touch);
private:
Touch *m_touch;
};
class Q_COMPOSITOR_EXPORT Touch : public QtWaylandServer::wl_touch, public TouchGrabber
{
public:
explicit Touch(Compositor *compositor);
void setFocus(Surface *surface);
void startGrab(TouchGrabber *grab);
void endGrab();
void sendCancel();
void sendFrame();
void sendDown(int touch_id, const QPointF &position);
void sendMotion(int touch_id, const QPointF &position);
void sendUp(int touch_id);
void down(uint32_t time, int touch_id, const QPointF &position);
void up(uint32_t time, int touch_id);
void motion(uint32_t time, int touch_id, const QPointF &position);
private:
static void focusDestroyed(wl_listener *listener, void *data);
Compositor *m_compositor;
Surface *m_focus;
Resource *m_focusResource;
struct Listener
{
wl_listener listener;
Touch *parent;
};
Listener m_focusDestroyListener;
TouchGrabber *m_grab;
};
} // namespace QtWayland
QT_END_NAMESPACE
#endif // QTWAYLAND_QWLTOUCH_P_H
|
/*
* fsu.h - Header for fsutils plugins
*
* Copyright (C) 2010 Collabora Ltd.
* @author: Youness Alaoui <youness.alaoui@collabora.co.uk>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 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 St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef __FSU_H__
#define __FSU_H__
#include <gst/gst.h>
G_BEGIN_DECLS
gboolean is_audio_source (GstElementFactory *factory);
gboolean is_video_source (GstElementFactory *factory);
gboolean is_audio_sink (GstElementFactory *factory);
gboolean is_video_sink (GstElementFactory *factory);
G_END_DECLS
#endif /* __FSU_H__ */
|
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the demonstration applications of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
** contained in the Technology Preview License Agreement accompanying
** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
**
**
**
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef SPREADSHEETDELEGATE_H
#define SPREADSHEETDELEGATE_H
#include <QItemDelegate>
#include "spreadsheet.h"
class SpreadSheetDelegate : public QItemDelegate
{
Q_OBJECT
public:
SpreadSheetDelegate(QObject *parent = 0);
QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &,
const QModelIndex &index) const;
void setEditorData(QWidget *editor, const QModelIndex &index) const;
void setModelData(QWidget *editor, QAbstractItemModel *model,
const QModelIndex &index) const;
private slots:
void commitAndCloseEditor();
};
#endif // SPREADSHEETDELEGATE_H
|
/* thread_info.h: i386 low-level thread information
*
* Copyright (C) 2002 David Howells (dhowells@redhat.com)
* - Incorporating suggestions made by Linus Torvalds and Dave Miller
*/
#ifndef _ASM_THREAD_INFO_H
#define _ASM_THREAD_INFO_H
#ifdef __KERNEL__
#include <linux/config.h>
#include <asm/page.h>
#ifndef __ASSEMBLY__
#include <asm/processor.h>
#endif
/*
* low level task data that entry.S needs immediate access to
* - this struct should fit entirely inside of one cache line
* - this struct shares the supervisor stack pages
* - if the contents of this structure are changed, the assembly constants must also be changed
*/
#ifndef __ASSEMBLY__
struct thread_info {
struct task_struct *task; /* main task structure */
struct exec_domain *exec_domain; /* execution domain */
unsigned long flags; /* low level flags */
unsigned long status; /* thread-synchronous flags */
__u32 cpu; /* current CPU */
__s32 preempt_count; /* 0 => preemptable, <0 => BUG */
mm_segment_t addr_limit; /* thread address space:
0-0xBFFFFFFF for user-thead
0-0xFFFFFFFF for kernel-thread
*/
struct restart_block restart_block;
unsigned long previous_esp; /* ESP of the previous stack in case
of nested (IRQ) stacks
*/
__u8 supervisor_stack[0];
};
#else /* !__ASSEMBLY__ */
/* offsets into the thread_info struct for assembly code access */
#define TI_TASK 0x00000000
#define TI_EXEC_DOMAIN 0x00000004
#define TI_FLAGS 0x00000008
#define TI_STATUS 0x0000000C
#define TI_CPU 0x00000010
#define TI_PRE_COUNT 0x00000014
#define TI_ADDR_LIMIT 0x00000018
#define TI_RESTART_BLOCK 0x000001C
#endif
#define PREEMPT_ACTIVE 0x4000000
#ifdef TARGET_OS2
#ifdef CONFIG_THREAD_SIZE
#define THREAD_SIZE (CONFIG_THREAD_SIZE)
#else
#define THREAD_SIZE (16384)
#endif // CONFIG_THREAD_SIZE
#else // TARGET_OS2
#ifdef CONFIG_4KSTACKS
#define THREAD_SIZE (4096)
#else
#define THREAD_SIZE (8192)
#endif
#endif
#define STACK_WARN (THREAD_SIZE/8)
/*
* macros/functions for gaining access to the thread information structure
*
* preempt_count needs to be 1 initially, until the scheduler is functional.
*/
#ifndef __ASSEMBLY__
#define INIT_THREAD_INFO(tsk) \
{ \
.task = &tsk, \
.exec_domain = &default_exec_domain, \
.flags = 0, \
.cpu = 0, \
.preempt_count = 1, \
.addr_limit = KERNEL_DS, \
.restart_block = { \
.fn = do_no_restart_syscall, \
}, \
}
#define init_thread_info (init_thread_union.thread_info)
#define init_stack (init_thread_union.stack)
/* how to get the thread information struct from C */
#if defined(TARGET_OS2) && defined(CONFIG_LX_OPTIMIZE_SIZE)
extern struct thread_info* current_thread_info(void);
#else
static inline struct thread_info *current_thread_info(void)
{
struct thread_info *ti;
__asm__("andl %%esp,%0; ":"=r" (ti) : "0" (~(THREAD_SIZE - 1)));
return ti;
}
/* how to get the current stack pointer from C */
static inline unsigned long current_stack_pointer(void)
{
unsigned long ti;
__asm__("movl %%esp,%0; ":"=r" (ti) : );
return ti;
}
#endif
/* thread information allocation */
#ifdef CONFIG_DEBUG_STACK_USAGE
#define alloc_thread_info(tsk) \
({ \
struct thread_info *ret; \
\
ret = kmalloc(THREAD_SIZE, GFP_KERNEL); \
if (ret) \
memset(ret, 0, THREAD_SIZE); \
ret; \
})
#else
#define alloc_thread_info(tsk) kmalloc(THREAD_SIZE, GFP_KERNEL)
#endif
#define free_thread_info(info) kfree(info)
#define get_thread_info(ti) get_task_struct((ti)->task)
#define put_thread_info(ti) put_task_struct((ti)->task)
#else /* !__ASSEMBLY__ */
/* how to get the thread information struct from ASM */
#define GET_THREAD_INFO(reg) \
movl $-THREAD_SIZE, reg; \
andl %esp, reg
/* use this one if reg already contains %esp */
#define GET_THREAD_INFO_WITH_ESP(reg) \
andl $-THREAD_SIZE, reg
#endif
/*
* thread information flags
* - these are process state flags that various assembly files may need to access
* - pending work-to-be-done flags are in LSW
* - other flags in MSW
*/
#define TIF_SYSCALL_TRACE 0 /* syscall trace active */
#define TIF_NOTIFY_RESUME 1 /* resumption notification requested */
#define TIF_SIGPENDING 2 /* signal pending */
#define TIF_NEED_RESCHED 3 /* rescheduling necessary */
#define TIF_SINGLESTEP 4 /* restore singlestep on return to user mode */
#define TIF_IRET 5 /* return with iret */
#define TIF_SYSCALL_AUDIT 7 /* syscall auditing active */
#define TIF_POLLING_NRFLAG 16 /* true if poll_idle() is polling TIF_NEED_RESCHED */
#define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE)
#define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME)
#define _TIF_SIGPENDING (1<<TIF_SIGPENDING)
#define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED)
#define _TIF_SINGLESTEP (1<<TIF_SINGLESTEP)
#define _TIF_IRET (1<<TIF_IRET)
#define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT)
#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
/* work to do on interrupt/exception return */
#define _TIF_WORK_MASK \
(0x0000FFFF & ~(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT))
#define _TIF_ALLWORK_MASK 0x0000FFFF /* work to do on any return to u-space */
/*
* Thread-synchronous status.
*
* This is different from the flags in that nobody else
* ever touches our thread-synchronous status, so we don't
* have to worry about atomic accesses.
*/
#define TS_USEDFPU 0x0001 /* FPU was used by this task this quantum (SMP) */
#endif /* __KERNEL__ */
#endif /* _ASM_THREAD_INFO_H */
|
/* summer-web-backend-ram.h */
/* This file is part of libsummer.
* Copyright © 2008-2009 Robin Sonefors <ozamosi@flukkost.nu>
*
* Libsummer is free software: you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2 as published by the Free Software Foundation.
*
* Libsummer is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Palace - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef _SUMMER_WEB_BACKEND_RAM_H
#define _SUMMER_WEB_BACKEND_RAM_H
#include <glib-object.h>
#include "summer-web-backend.h"
G_BEGIN_DECLS
#define SUMMER_TYPE_WEB_BACKEND_RAM summer_web_backend_ram_get_type()
#define SUMMER_WEB_BACKEND_RAM(obj) \
(G_TYPE_CHECK_INSTANCE_CAST ((obj), \
SUMMER_TYPE_WEB_BACKEND_RAM, SummerWebBackendRam))
#define SUMMER_WEB_BACKEND_RAM_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST ((klass), \
SUMMER_TYPE_WEB_BACKEND_RAM, SummerWebBackendRamClass))
#define SUMMER_IS_WEB_BACKEND_RAM(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
SUMMER_TYPE_WEB_BACKEND_RAM))
#define SUMMER_IS_WEB_BACKEND_RAM_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE ((klass), \
SUMMER_TYPE_WEB_BACKEND_RAM))
#define SUMMER_WEB_BACKEND_RAM_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS ((obj), \
SUMMER_TYPE_WEB_BACKEND_RAM, SummerWebBackendRamClass))
typedef struct _SummerWebBackendRam SummerWebBackendRam;
typedef struct _SummerWebBackendRamClass SummerWebBackendRamClass;
struct _SummerWebBackendRam
{
SummerWebBackend parent;
};
struct _SummerWebBackendRamClass
{
SummerWebBackendClass parent_class;
};
GType summer_web_backend_ram_get_type (void);
SummerWebBackend *summer_web_backend_ram_new (const gchar *url);
G_END_DECLS
#endif /* _SUMMER_WEB_BACKEND_RAM_H */
|
/*****************************************************************************************
BioQt - Integrated Bioinformatics Library
Copyright (C) 2013-2014 Usama S Erawab <alrawab@hotmail.com> Libya
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
************************************************************************************************/
#ifndef LEVENSHTEINDISTANCE_H
#define LEVENSHTEINDISTANCE_H
#include <BioQt_global.h>
#include <QtCore>
namespace BioQt {
/**
* @brief The LevenshteinDistance class
*In information theory and computer science, the Levenshtein distance is a string metric for measuring
*the difference between two sequences. Informally, the Levenshtein distance between two words is the
* minimum number of single-character edits (i.e. insertions, deletions or substitutions) required
*to change one word into the other. It is named after Vladimir Levenshtein,
* who considered this distance in 1965.
*see http://en.wikipedia.org/wiki/Levenshtein_distance
*/
class BIOQTSHARED_EXPORT LevenshteinDistance
{
public:
/**
* @brief GetLevenshteinDistance
* @param s1
* @param s2
* @return
*/
static int GetLevenshteinDistance(const QString& s1,const QString& s2);
};
} // namespace BioQt
#endif // BIOQT_LEVENSHTEINDISTANCE_H
|
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2012 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Sam Lantinga
slouken@libsdl.org
*/
#include "SDL_config.h"
#include <3ds.h>
/* Stub until we implement threads on this platform */
typedef Thread SYS_ThreadHandle;
|
/*
* StarPU
* Copyright (C) Université Bordeaux 1, CNRS 2008-2010 (see AUTHORS file)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or (at
* your option) any later version.
*
* 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 Lesser General Public License in COPYING.LGPL for more details.
*/
#include <starpu.h>
#include <starpu_profiling.h>
#include <profiling/profiling.h>
void starpu_bus_profiling_helper_display_summary(void)
{
int long long sum_transferred = 0;
fprintf(stderr, "Data transfer statistics:\n");
int busid;
int bus_cnt = starpu_bus_get_count();
for (busid = 0; busid < bus_cnt; busid++)
{
int src, dst;
src = starpu_bus_get_src(busid);
dst = starpu_bus_get_dst(busid);
struct starpu_bus_profiling_info bus_info;
starpu_bus_get_profiling_info(busid, &bus_info);
int long long transferred = bus_info.transferred_bytes;
int long long transfer_cnt = bus_info.transfer_count;
double elapsed_time = starpu_timing_timespec_to_us(&bus_info.total_time);
fprintf(stderr, "\t%d -> %d\t%.2lf MB\t%.2lfMB/s\t(transfers : %lld - avg %.2lf MB)\n", src, dst, (1.0*transferred)/(1024*1024), transferred/elapsed_time, transfer_cnt, (1.0*transferred)/(transfer_cnt*1024*1024));
sum_transferred += transferred;
}
fprintf(stderr, "Total transfers: %.2lf MB\n", (1.0*sum_transferred)/(1024*1024));
}
|
#ifndef _ROS_pr2_plugs_msgs_DetectPlugOnBaseResult_h
#define _ROS_pr2_plugs_msgs_DetectPlugOnBaseResult_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include "ros/msg.h"
#include "geometry_msgs/PoseStamped.h"
namespace pr2_plugs_msgs
{
class DetectPlugOnBaseResult : public ros::Msg
{
public:
geometry_msgs::PoseStamped plug_pose;
virtual int serialize(unsigned char *outbuffer) const
{
int offset = 0;
offset += this->plug_pose.serialize(outbuffer + offset);
return offset;
}
virtual int deserialize(unsigned char *inbuffer)
{
int offset = 0;
offset += this->plug_pose.deserialize(inbuffer + offset);
return offset;
}
const char * getType(){ return "pr2_plugs_msgs/DetectPlugOnBaseResult"; };
const char * getMD5(){ return "71af249a01ba6b399781f7e0d4e1fbfd"; };
};
}
#endif |
/*
Copyright (C) 2003-2006 by Marten Svanfeldt
2005-2012 by Frank Richter
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __CS_SHADERWRAPPER_H__
#define __CS_SHADERWRAPPER_H__
#include "cssysdef.h"
#include "csutil/objreg.h"
#include "csutil/ref.h"
#include "csutil/scf.h"
#include "csutil/scfstr.h"
#include "csutil/stringreader.h"
#include "iutil/document.h"
#include "iutil/hiercache.h"
#include "iutil/string.h"
#include "ivideo/shader/shader.h"
#include "shader.h"
#include "xmlshader.h"
CS_PLUGIN_NAMESPACE_BEGIN(XMLShader)
{
class csXMLShaderTech;
class csXMLShaderWrapper;
class csXMLShaderPluginWrapper :
public scfImplementation1<csXMLShaderPluginWrapper,
iShaderProgramPlugin>
{
csXMLShaderTech* tech;
size_t variant;
bool FillCacheInfo (iDocumentNode *node,
csXMLShaderTech::CachedPlugin& cacheInfoVP,
csXMLShaderTech::CachedPlugin& cacheInfoFP);
private:
friend class csXMLShaderWrapper;
csXMLShaderTech::CachedPlugin cacheInfoFP;
csXMLShaderTech::CachedPlugin cacheInfoVP;
public:
CS_LEAKGUARD_DECLARE (csXMLShaderPluginWrapper);
csXMLShaderPluginWrapper (iDocumentNode *node, csXMLShaderTech* tech, size_t variant);
virtual csPtr<iShaderProgram> CreateProgram (const char* type);
virtual bool SupportType (const char* type);
virtual csPtr<iStringArray> QueryPrecacheTags (const char* type);
/**
* Warm the given cache with the program specified in \a node.
* \a outObj can return an object which exposes iShaderDestinationResolver.
*/
virtual bool Precache (const char* type, const char* tag,
iBase* previous, iDocumentNode* node,
iHierarchicalCache* cacheTo, csRef<iBase>* outObj = 0);
};
template<typename Impl>
class WrappedShaderDestinationResolver : public virtual iShaderDestinationResolver
{
public:
int ResolveTU (const char* binding)
{
int tu (-1);
csRef<iShaderDestinationResolver> resolveFP (
scfQueryInterfaceSafe<iShaderDestinationResolver> (static_cast<Impl*> (this)->GetFP()));
// Give FP precedence
if (resolveFP)
tu = resolveFP->ResolveTU (binding);
csRef<iShaderDestinationResolver> resolveVP (
scfQueryInterfaceSafe<iShaderDestinationResolver> (static_cast<Impl*> (this)->GetVP()));
// Fall back to VP for TU resolution
if ((tu < 0) && resolveVP)
tu = resolveVP->ResolveTU (binding);
return tu;
}
csVertexAttrib ResolveBufferDestination (const char* binding)
{
csRef<iShaderDestinationResolver> resolveVP (
scfQueryInterfaceSafe<iShaderDestinationResolver> (static_cast<Impl*> (this)->GetVP()));
if (resolveVP)
return resolveVP->ResolveBufferDestination (binding);
// FPs usually don't have buffer destinations, do they?
return CS_VATTRIB_INVALID;
}
};
class csXMLShaderWrapper :
public scfImplementation2<csXMLShaderWrapper,
iShaderProgram,
scfFakeInterface<iShaderDestinationResolver> >,
public WrappedShaderDestinationResolver<csXMLShaderWrapper>
{
private:
csRef<csXMLShaderPluginWrapper> loadingWrapper;
// wrapped programs
csRef<iShaderProgram> vp;
csRef<iShaderProgram> fp;
iShaderProgram::CacheLoadResult LoadProgram (iHierarchicalCache *cache, iBase *previous,
const csXMLShaderTech::CachedPlugin& cacheInfo,
csRef<iString> *failReason,
csRef<iShaderProgram>& prog,
csString& tag);
public:
CS_LEAKGUARD_DECLARE (csXMLShaderWrapper);
static bool FillCachedPlugin (csXMLShaderTech* tech,
iDocumentNode *node,
csXMLShaderTech::CachedPlugin& cacheInfo,
size_t variant);
csXMLShaderWrapper (csXMLShaderPluginWrapper* loadingWrapper);
~csXMLShaderWrapper ();
virtual void Activate ();
virtual void Deactivate ();
virtual bool Compile (iHierarchicalCache *cacheTo,
csRef<iString> *cacheTag = 0);
virtual void GetUsedShaderVars (csBitArray& bits) const;
virtual bool Load (iShaderDestinationResolver *resolve,
const char *program,
const csArray<csShaderVarMapping> &mappings);
virtual bool Load (iShaderDestinationResolver *resolve,
iDocumentNode *node);
virtual iShaderProgram::CacheLoadResult LoadFromCache (
iHierarchicalCache *cache, iBase *previous, iDocumentNode *programNode,
csRef<iString> *failReason = 0, csRef<iString> *cacheTag = 0);
virtual void ResetState ();
virtual void SetupState (const CS::Graphics::RenderMesh *mesh,
CS::Graphics::RenderMeshModes &modes,
const csShaderVariableStack &stack);
// wrapper specific functions: set vertex/fragment shaders
iShaderProgram* GetVP() { return vp; }
iShaderProgram* GetFP() { return fp; }
};
}
CS_PLUGIN_NAMESPACE_END(XMLShader)
#endif // __CS_SHADERWRAPPER_H__
|
#ifndef _ROS_pr2_plugs_msgs_DetectOutletActionResult_h
#define _ROS_pr2_plugs_msgs_DetectOutletActionResult_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include "ros/msg.h"
#include "std_msgs/Header.h"
#include "actionlib_msgs/GoalStatus.h"
#include "pr2_plugs_msgs/DetectOutletResult.h"
namespace pr2_plugs_msgs
{
class DetectOutletActionResult : public ros::Msg
{
public:
std_msgs::Header header;
actionlib_msgs::GoalStatus status;
pr2_plugs_msgs::DetectOutletResult result;
virtual int serialize(unsigned char *outbuffer) const
{
int offset = 0;
offset += this->header.serialize(outbuffer + offset);
offset += this->status.serialize(outbuffer + offset);
offset += this->result.serialize(outbuffer + offset);
return offset;
}
virtual int deserialize(unsigned char *inbuffer)
{
int offset = 0;
offset += this->header.deserialize(inbuffer + offset);
offset += this->status.deserialize(inbuffer + offset);
offset += this->result.deserialize(inbuffer + offset);
return offset;
}
const char * getType(){ return "pr2_plugs_msgs/DetectOutletActionResult"; };
const char * getMD5(){ return "c6653d97b3d2399502859172c644aa34"; };
};
}
#endif |
#ifndef COLLISION_BODY_H
#define COLLISION_BODY_H
#include "CollisionObject.h"
#include "Body.h"
namespace CGE{
class VertexBuffer;
class IndexBuffer;
}
namespace CGE{
class CollisionSpace;
class CollisionBody : public CollisionObject, public Body{
public:
CollisionBody(const Simulator& sim);
virtual ~CollisionBody();
virtual Type getType();
virtual void setPosition(const Vec3f& pos) {Body::setPosition(pos);}
virtual void setOrientation(const Matrix& orientation) {Body::setOrientation(orientation);}
virtual Vec3f getPosition() {return Body::getPosition();}
virtual Matrix getOrientation() {return Body::getOrientation();}
virtual void render(const CGE::Camera& cam);
virtual void initCylinder(const CollisionSpace& space, float height, float radius, float mass);
virtual void initBox(const CollisionSpace& space, float width, float height, float depth, float mass);
virtual void initSphere(const CollisionSpace& space, float radius, float mass);
protected:
CGE::VertexBuffer* mPhysicsVB;
CGE::IndexBuffer* mPhysicsInds[3];
};
}
#endif
|
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
/* Copyright (C) 2002-2004 Novell, Inc. */
#ifndef __E2K_ACTION_H__
#define __E2K_ACTION_H__
#include "e2k-types.h"
#include "e2k-properties.h"
#include "e2k-rule.h"
#ifdef __cplusplus
extern "C" {
#pragma }
#endif /* __cplusplus */
gboolean e2k_actions_extract (guint8 **data,
int *len,
GPtrArray **actions);
void e2k_actions_append (GByteArray *ba,
GPtrArray *actions);
E2kAction *e2k_action_move (GByteArray *store_entryid,
GByteArray *folder_source_key);
E2kAction *e2k_action_copy (GByteArray *store_entryid,
GByteArray *folder_source_key);
E2kAction *e2k_action_reply (GByteArray *template_entryid,
guint8 template_guid[16]);
E2kAction *e2k_action_oof_reply (GByteArray *template_entryid,
guint8 template_guid[16]);
E2kAction *e2k_action_defer (GByteArray *data);
E2kAction *e2k_action_bounce (E2kActionBounceCode bounce_code);
E2kAction *e2k_action_forward (E2kAddrList *list);
E2kAction *e2k_action_delegate (E2kAddrList *list);
E2kAction *e2k_action_tag (const char *propname,
E2kPropType type,
gpointer value);
E2kAction *e2k_action_delete (void);
void e2k_actions_free (GPtrArray *actions);
void e2k_action_free (E2kAction *act);
E2kAddrList *e2k_addr_list_new (int nentries);
void e2k_addr_list_set_local (E2kAddrList *list,
int entry_num,
const char *display_name,
const char *exchange_dn,
const char *email);
void e2k_addr_list_set_oneoff (E2kAddrList *list,
int entry_num,
const char *display_name,
const char *email);
void e2k_addr_list_free (E2kAddrList *list);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __E2K_ACTION_H__ */
|
/** ###################################################################
** This component module is generated by Processor Expert. Do not modify it.
** Filename : task_template_list.h
** Project : FSFK_K64F
** Processor : MK64FN1M0VLL12
** Version : Component 01.110, Driver 01.00, CPU db: 3.00.000
** Repository : Kinetis
** Compiler : GNU C Compiler
** Date/Time : 2015-11-26, 15:07, # CodeGen: 19
**
** Copyright : 1997 - 2015 Freescale Semiconductor, 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:
**
** o Redistributions of source code must retain the above copyright notice, this list
** of conditions and the following disclaimer.
**
** o 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.
**
** o Neither the name of Freescale Semiconductor, 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR
** ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
** (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
** ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
**
** http: www.freescale.com
** mail: support@freescale.com
** ###################################################################*/
/*!
** @file task_template_list.h
** @version 01.00
*/
/*!
** @addtogroup task_template_list_module task_template_list module documentation
** @{
*/
#ifndef __task_template_list_h__
#define __task_template_list_h__
/* MQX Lite task IDs */
#define RDSENSDATA_TASK 1U
#define FUSION_TASK 2U
#define MAGCAL_TASK 3U
/* MQX Lite task stack sizes */
#define RDSENSDATA_TASK_STACK_SIZE (sizeof(TD_STRUCT) + 1536 + PSP_STACK_ALIGNMENT + 1)
#define FUSION_TASK_STACK_SIZE (sizeof(TD_STRUCT) + 1536 + PSP_STACK_ALIGNMENT + 1)
#define MAGCAL_TASK_STACK_SIZE (sizeof(TD_STRUCT) + 1536 + PSP_STACK_ALIGNMENT + 1)
#endif /* __task_template_list_h__ */
/*!
** @}
*/
/*
** ###################################################################
**
** This file was created by Processor Expert 10.5 [05.21]
** for the Freescale Kinetis series of microcontrollers.
**
** ###################################################################
*/
|
/*
* Copyright (C) 2021 Sean Rhodes <sean@starlabs.systems>
*
* SPDX-License-Identifier: LGPL-2.1+
*/
#include "config.h"
#include <sys/io.h>
#include "fu-flashrom-cmos.h"
static gboolean
fu_flashrom_cmos_write(guint8 addr, guint8 val)
{
guint8 tmp;
/* Reject addresses in the second bank */
if (addr >= 128)
return FALSE;
/* Write the value to CMOS */
outb(addr, RTC_BASE_PORT);
outb(val, RTC_BASE_PORT + 1);
/* Read the value back from CMOS */
outb(addr, RTC_BASE_PORT);
tmp = inb(RTC_BASE_PORT + 1);
/* Check the read value against the written */
return (tmp == val);
}
gboolean
fu_flashrom_cmos_reset(GError **error)
{
/* Call ioperm() to grant us access to ports 0x70 and 0x71 */
if (ioperm(RTC_BASE_PORT, 2, TRUE) < 0) {
g_set_error_literal(error,
FWUPD_ERROR,
FWUPD_ERROR_READ,
"failed to gain access to ports 0x70 and 0x71");
return FALSE;
}
/* Write a default value to the CMOS checksum */
if ((!fu_flashrom_cmos_write(CMOS_CHECKSUM_OFFSET, 0xff)) ||
(!fu_flashrom_cmos_write(CMOS_CHECKSUM_OFFSET + 1, 0xff))) {
g_set_error_literal(error, FWUPD_ERROR, FWUPD_ERROR_READ, "failed to reset CMOS");
return FALSE;
}
/* success */
return TRUE;
}
|
/*!The Treasure Box Library
*
* 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.
*
* Copyright (C) 2009-2020, TBOOX Open Source Group.
*
* @author ruki
* @file zip.c
* @ingroup zip
*
*/
/* //////////////////////////////////////////////////////////////////////////////////////
* includes
*/
#include "zip.h"
#include "gzip.h"
#include "zlib.h"
#include "zlibraw.h"
/* //////////////////////////////////////////////////////////////////////////////////////
* interfaces
*/
tb_zip_ref_t tb_zip_init(tb_size_t algo, tb_size_t action)
{
// table
static tb_zip_ref_t (*s_init[])(tb_size_t action) =
{
tb_null
#ifdef TB_CONFIG_PACKAGE_HAVE_ZLIB
, tb_zip_zlibraw_init
, tb_zip_zlib_init
, tb_zip_gzip_init
#else
, tb_null
, tb_null
, tb_null
#endif
};
tb_assert_and_check_return_val(algo < tb_arrayn(s_init) && s_init[algo], tb_null);
// init
return s_init[algo](action);
}
tb_void_t tb_zip_exit(tb_zip_ref_t zip)
{
// check
tb_assert_and_check_return(zip);
// table
static tb_void_t (*s_exit[])(tb_zip_ref_t zip) =
{
tb_null
#ifdef TB_CONFIG_PACKAGE_HAVE_ZLIB
, tb_zip_zlibraw_exit
, tb_zip_zlib_exit
, tb_zip_gzip_exit
#else
, tb_null
, tb_null
, tb_null
#endif
};
tb_assert_and_check_return(zip->algo < tb_arrayn(s_exit) && s_exit[zip->algo]);
// exit
s_exit[zip->algo](zip);
}
tb_long_t tb_zip_spak(tb_zip_ref_t zip, tb_static_stream_ref_t ist, tb_static_stream_ref_t ost, tb_long_t sync)
{
// check
tb_assert_and_check_return_val(zip && zip->spak && ist && ost, -1);
// spank it
return zip->spak(zip, ist, ost, sync);
}
|
/*
* librest - RESTful web services access
* Copyright (c) 2008, 2009, Intel Corporation.
*
* Authors: Rob Bradford <rob@linux.intel.com>
* Ross Burton <ross@linux.intel.com>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU Lesser General Public License,
* version 2.1, as published by the Free Software Foundation.
*
* This program is distributed in the hope 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 program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
*
*/
#include <rest/oauth-proxy.h>
#include <stdio.h>
static void
_call_continous_cb (RestProxyCall *call,
const gchar *buf,
gsize len,
const GError *error,
GObject *weak_object,
gpointer userdata)
{
g_message ("%s", buf);
}
int
main (int argc, char **argv)
{
RestProxy *proxy;
RestProxyCall *call;
GError *error = NULL;
char pin[256];
GMainLoop *loop;
g_thread_init (NULL);
g_type_init ();
loop = g_main_loop_new (NULL, FALSE);
/* Create the proxy */
proxy = oauth_proxy_new ("UfXFxDbUjk41scg0kmkFwA",
"pYQlfI2ZQ1zVK0f01dnfhFTWzizBGDnhNJIw6xwto",
"https://api.twitter.com/", FALSE);
/* First stage authentication, this gets a request token */
if (!oauth_proxy_request_token (OAUTH_PROXY (proxy), "oauth/request_token", "oob", &error))
g_error ("Cannot get request token: %s", error->message);
/* From the token construct a URL for the user to visit */
g_print ("Go to http://twitter.com/oauth/authorize?oauth_token=%s then enter the PIN\n",
oauth_proxy_get_token (OAUTH_PROXY (proxy)));
fgets (pin, sizeof (pin), stdin);
g_strchomp (pin);
/* Second stage authentication, this gets an access token */
if (!oauth_proxy_access_token (OAUTH_PROXY (proxy), "oauth/access_token", pin, &error))
g_error ("Cannot get access token: %s", error->message);
/* We're now authenticated */
/* Post the status message */
call = rest_proxy_new_call (proxy);
g_object_set (proxy, "url-format", "http://stream.twitter.com/", NULL);
rest_proxy_call_set_function (call, "1/statuses/filter.json");
rest_proxy_call_set_method (call, "GET");
rest_proxy_call_add_param (call, "track", "Cameron");
rest_proxy_call_add_param (call, "delimited", "length");
rest_proxy_call_continuous (call,
_call_continous_cb,
NULL,
NULL,
NULL);
g_main_loop_run (loop);
g_object_unref (call);
g_object_unref (proxy);
return 0;
}
|
// Created file "Lib\src\Uuid\propkeys"
typedef struct _GUID
{
unsigned long Data1;
unsigned short Data2;
unsigned short Data3;
unsigned char Data4[8];
} GUID;
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
extern const GUID name = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }
DEFINE_GUID(GUID_SESSION_DISPLAY_STATE, 0x73a5e93a, 0x5bb1, 0x4f93, 0x89, 0x5b, 0xdb, 0xd0, 0xda, 0x85, 0x59, 0x67);
|
/*
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_DESCRIBECONFORMANCEPACKCOMPLIANCERESPONSE_P_H
#define QTAWS_DESCRIBECONFORMANCEPACKCOMPLIANCERESPONSE_P_H
#include "configserviceresponse_p.h"
namespace QtAws {
namespace ConfigService {
class DescribeConformancePackComplianceResponse;
class DescribeConformancePackComplianceResponsePrivate : public ConfigServiceResponsePrivate {
public:
explicit DescribeConformancePackComplianceResponsePrivate(DescribeConformancePackComplianceResponse * const q);
void parseDescribeConformancePackComplianceResponse(QXmlStreamReader &xml);
private:
Q_DECLARE_PUBLIC(DescribeConformancePackComplianceResponse)
Q_DISABLE_COPY(DescribeConformancePackComplianceResponsePrivate)
};
} // namespace ConfigService
} // namespace QtAws
#endif
|
// Created file "Lib\src\strmiids\X64\strmiids"
typedef struct _GUID
{
unsigned long Data1;
unsigned short Data2;
unsigned short Data3;
unsigned char Data4[8];
} GUID;
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
extern const GUID name = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }
DEFINE_GUID(IID_IMediaPosition, 0x56a868b2, 0x0ad4, 0x11ce, 0xb0, 0x3a, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70);
|
//
// GreetingCell.h
// CIC
//
// Created by GiPyeong Lee on 2014. 11. 17..
// Copyright (c) 2014년 com.devsfolder.cic. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface GreetingCell : UITableViewCell
@property (nonatomic, strong) UIImageView *profileImg;
@property (nonatomic,strong) UILabel *label_major;
@property (nonatomic,strong) UILabel *label_name;
@property (nonatomic,strong) UILabel *label_greeting;
@end
|
// Created file "Lib\src\Uuid\X64\netcon_i"
typedef struct _GUID
{
unsigned long Data1;
unsigned short Data2;
unsigned short Data3;
unsigned char Data4[8];
} GUID;
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
extern const GUID name = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }
DEFINE_GUID(IID_IEnumNetConnection, 0xc08956a0, 0x1cd3, 0x11d1, 0xb1, 0xc5, 0x00, 0x80, 0x5f, 0xc1, 0x27, 0x0e);
|
//
// Use this file to import your target's public headers that you would like to expose to Swift.
//
#import "Account.h"
#import "AccountViewController.h" |
// Created file "Lib\src\Shell32\X64\shguid"
typedef struct _GUID
{
unsigned long Data1;
unsigned short Data2;
unsigned short Data3;
unsigned char Data4[8];
} GUID;
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
extern const GUID name = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }
DEFINE_GUID(FOLDERID_NetworkFolder, 0xd20beec4, 0x5ca8, 0x4905, 0xae, 0x3b, 0xbf, 0x25, 0x1e, 0xa0, 0x9b, 0x53);
|
/*
* Index functions
*
* Copyright (c) 2009-2012, Joachim Metz <jbmetz@users.sourceforge.net>
*
* Refer to AUTHORS for acknowledgements.
*
* This software 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 software 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 Lesser General Public License
* along with this software. If not, see <http://www.gnu.org/licenses/>.
*/
#if !defined( _LIBESEDB_INDEX_H )
#define _LIBESEDB_INDEX_H
#include <common.h>
#include <types.h>
#include <liberror.h>
#include "libesedb_catalog_definition.h"
#include "libesedb_extern.h"
#include "libesedb_io_handle.h"
#include "libesedb_libbfio.h"
#include "libesedb_libfcache.h"
#include "libesedb_libfdata.h"
#include "libesedb_table_definition.h"
#include "libesedb_types.h"
#if defined( __cplusplus )
extern "C" {
#endif
typedef struct libesedb_internal_index libesedb_internal_index_t;
struct libesedb_internal_index
{
/* The file IO handle
*/
libbfio_handle_t *file_io_handle;
/* The IO handle
*/
libesedb_io_handle_t *io_handle;
/* The table definition
*/
libesedb_table_definition_t *table_definition;
/* The template table definition
*/
libesedb_table_definition_t *template_table_definition;
/* The index catalog definition
*/
libesedb_catalog_definition_t *index_catalog_definition;
/* The pages vector
*/
libfdata_vector_t *pages_vector;
/* The pages cache
*/
libfcache_cache_t *pages_cache;
/* The long values pages vector
*/
libfdata_vector_t *long_values_pages_vector;
/* The long values pages cache
*/
libfcache_cache_t *long_values_pages_cache;
/* The table values tree
*/
libfdata_tree_t *table_values_tree;
/* The table values cache
*/
libfcache_cache_t *table_values_cache;
/* The long values tree
*/
libfdata_tree_t *long_values_tree;
/* The long values cache
*/
libfcache_cache_t *long_values_cache;
/* The item flags
*/
uint8_t flags;
/* The table values (data) tree
*/
libfdata_tree_t *index_values_tree;
/* The index values cache
*/
libfcache_cache_t *index_values_cache;
};
int libesedb_index_initialize(
libesedb_index_t **index,
libbfio_handle_t *file_io_handle,
libesedb_io_handle_t *io_handle,
libesedb_table_definition_t *table_definition,
libesedb_table_definition_t *template_table_definition,
libesedb_catalog_definition_t *index_catalog_definition,
libfdata_vector_t *pages_vector,
libfcache_cache_t *pages_cache,
libfdata_vector_t *long_values_pages_vector,
libfcache_cache_t *long_values_pages_cache,
libfdata_tree_t *table_values_tree,
libfcache_cache_t *table_values_cache,
libfdata_tree_t *long_values_tree,
libfcache_cache_t *long_values_cache,
uint8_t flags,
liberror_error_t **error );
LIBESEDB_EXTERN \
int libesedb_index_free(
libesedb_index_t **index,
liberror_error_t **error );
LIBESEDB_EXTERN \
int libesedb_index_get_identifier(
libesedb_index_t *index,
uint32_t *identifier,
liberror_error_t **error );
LIBESEDB_EXTERN \
int libesedb_index_get_utf8_name_size(
libesedb_index_t *index,
size_t *utf8_string_size,
liberror_error_t **error );
LIBESEDB_EXTERN \
int libesedb_index_get_utf8_name(
libesedb_index_t *index,
uint8_t *utf8_string,
size_t utf8_string_size,
liberror_error_t **error );
LIBESEDB_EXTERN \
int libesedb_index_get_utf16_name_size(
libesedb_index_t *index,
size_t *utf16_string_size,
liberror_error_t **error );
LIBESEDB_EXTERN \
int libesedb_index_get_utf16_name(
libesedb_index_t *index,
uint16_t *utf16_string,
size_t utf16_string_size,
liberror_error_t **error );
LIBESEDB_EXTERN \
int libesedb_index_get_number_of_records(
libesedb_index_t *index,
int *number_of_records,
liberror_error_t **error );
LIBESEDB_EXTERN \
int libesedb_index_get_record(
libesedb_index_t *index,
int record_entry,
libesedb_record_t **record,
liberror_error_t **error );
#if defined( __cplusplus )
}
#endif
#endif
|
/*
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_UPDATETHINGRESPONSE_P_H
#define QTAWS_UPDATETHINGRESPONSE_P_H
#include "iotresponse_p.h"
namespace QtAws {
namespace IoT {
class UpdateThingResponse;
class UpdateThingResponsePrivate : public IoTResponsePrivate {
public:
explicit UpdateThingResponsePrivate(UpdateThingResponse * const q);
void parseUpdateThingResponse(QXmlStreamReader &xml);
private:
Q_DECLARE_PUBLIC(UpdateThingResponse)
Q_DISABLE_COPY(UpdateThingResponsePrivate)
};
} // namespace IoT
} // namespace QtAws
#endif
|
/*
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_DISABLESNAPSHOTCOPYRESPONSE_H
#define QTAWS_DISABLESNAPSHOTCOPYRESPONSE_H
#include "redshiftresponse.h"
#include "disablesnapshotcopyrequest.h"
namespace QtAws {
namespace Redshift {
class DisableSnapshotCopyResponsePrivate;
class QTAWSREDSHIFT_EXPORT DisableSnapshotCopyResponse : public RedshiftResponse {
Q_OBJECT
public:
DisableSnapshotCopyResponse(const DisableSnapshotCopyRequest &request, QNetworkReply * const reply, QObject * const parent = 0);
virtual const DisableSnapshotCopyRequest * request() const Q_DECL_OVERRIDE;
protected slots:
virtual void parseSuccess(QIODevice &response) Q_DECL_OVERRIDE;
private:
Q_DECLARE_PRIVATE(DisableSnapshotCopyResponse)
Q_DISABLE_COPY(DisableSnapshotCopyResponse)
};
} // namespace Redshift
} // namespace QtAws
#endif
|
//
// Created by Jesse Squires
// http://www.jessesquires.com
//
//
// Documentation
// http://cocoadocs.org/docsets/JSQMessagesViewController
//
//
// GitHub
// https://github.com/jessesquires/JSQMessagesViewController
//
//
// License
// Copyright (c) 2014 Jesse Squires
// Released under an MIT license: http://opensource.org/licenses/MIT
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import "CCJSQMessagesToolbarContentView.h"
@class CCJSQMessagesInputToolbar;
/**
* The `CCJSQMessagesInputToolbarDelegate` protocol defines methods for interacting with
* a `CCJSQMessagesInputToolbar` object.
*/
@protocol CCJSQMessagesInputToolbarDelegate <UIToolbarDelegate>
@required
/**
* Tells the delegate that the toolbar's `rightBarButtonItem` has been pressed.
*
* @param toolbar The object representing the toolbar sending this information.
* @param sender The button that received the touch event.
*/
- (void)messagesInputToolbar:(CCJSQMessagesInputToolbar *)toolbar
didPressRightBarButton:(UIButton *)sender;
/**
* Tells the delegate that the toolbar's `leftBarButtonItem` has been pressed.
*
* @param toolbar The object representing the toolbar sending this information.
* @param sender The button that received the touch event.
*/
- (void)messagesInputToolbar:(CCJSQMessagesInputToolbar *)toolbar
didPressLeftBarButton:(UIButton *)sender;
@end
/**
* An instance of `CCJSQMessagesInputToolbar` defines the input toolbar for
* composing a new message. It is displayed above and follow the movement of the system keyboard.
*/
@interface CCJSQMessagesInputToolbar : UIToolbar
/**
* The object that acts as the delegate of the toolbar.
*/
@property (weak, nonatomic) id<CCJSQMessagesInputToolbarDelegate> delegate;
/**
* Returns the content view of the toolbar. This view contains all subviews of the toolbar.
*/
@property (weak, nonatomic, readonly) CCJSQMessagesToolbarContentView *contentView;
/**
* A boolean value indicating whether the send button is on the right side of the toolbar or not.
*
* @discussion The default value is `YES`, which indicates that the send button is the right-most subview of
* the toolbar's `contentView`. Set to `NO` to specify that the send button is on the left. This
* property is used to determine which touch events correspond to which actions.
*
* @warning Note, this property *does not* change the positions of buttons in the toolbar's content view.
* It only specifies whether the `rightBarButtonItem `or the `leftBarButtonItem` is the send button.
* The other button then acts as the accessory button.
*/
@property (assign, nonatomic) BOOL sendButtonOnRight;
/**
* Specifies the default (minimum) height for the toolbar. The default value is `44.0f`. This value must be positive.
*/
@property (assign, nonatomic) CGFloat preferredDefaultHeight;
/**
* Specifies the maximum height for the toolbar. The default value is `NSNotFound`, which specifies no maximum height.
*/
@property (assign, nonatomic) NSUInteger maximumHeight;
/**
* Enables or disables the send button based on whether or not its `textView` has text.
* That is, the send button will be enabled if there is text in the `textView`, and disabled otherwise.
*/
- (void)toggleSendButtonEnabled;
/**
* Loads the content view for the toolbar.
*
* @discussion Override this method to provide a custom content view for the toolbar.
*
* @return An initialized `CCJSQMessagesToolbarContentView` if successful, otherwise `nil`.
*/
- (CCJSQMessagesToolbarContentView *)loadToolbarContentView;
/**
* Specifies the maximum line for the toolbar
*/
@property (assign, nonatomic) NSUInteger maximumNumberOfLine;
@end
|
/*
* ortpextension.h
*
* The ortpextension library implement RTP extension (Realtime Transport Protocol - RFC 3550)
* Copyright (C) 2011 Orazio Briante orazio.briante@hotmail.it
* Laboratory A.R.T.S. - University Mediterranea of Reggio Calabria - Faculty of Engineering
*
* 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 General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/** \mainpage ortpextension API documentation
*
* \section Init Initializing ortpextension
*
* see ortpextension.h documentation.
*
* \section RtpSession RtpSession Replacement
*
* see the rtpsession_extension.h documentation.
*
* \section RtpExtension Rtp Extension Object:
*
* see the rtp_extension.h documentation.
*
* \section ortpextension Examples Tests:
*
* - rtprecv.c Show how to receive a single RTP stream with a generic Extension.
* - rtpsend.c Show how to send a single RTP stream with a generic Extension.
*
*
* <H2>README</H2>
*
* @verbinclude README
*
*/
/**
* @page ortpextension_readme README
* @verbinclude README
*/
/**
* @page ortpextension_install INSTALL
* @verbinclude INSTALL
*/
/**
* @page ortpextension_license COPYING
* @verbinclude COPYING
*/
/**
* @page ortpextension_changelog ChangeLog
* @verbinclude ChangeLog
*/
/**
* \file ortpextension.h
* \brief The Main Header to Import
*
* This Header File Contain All library Imports to work with RTP Extension.
**/
#ifndef ORTPEXTENSION_H_
#define ORTPEXTENSION_H_
#include <ortpextension/rtp_extension.h>
#include <ortpextension/rtpsession_extension.h>
#endif /* ORTPEXTENSION_H_ */
|
/*
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_CREATENOTIFICATIONRULERESPONSE_H
#define QTAWS_CREATENOTIFICATIONRULERESPONSE_H
#include "codestarnotificationsresponse.h"
#include "createnotificationrulerequest.h"
namespace QtAws {
namespace CodeStarNotifications {
class CreateNotificationRuleResponsePrivate;
class QTAWSCODESTARNOTIFICATIONS_EXPORT CreateNotificationRuleResponse : public CodeStarNotificationsResponse {
Q_OBJECT
public:
CreateNotificationRuleResponse(const CreateNotificationRuleRequest &request, QNetworkReply * const reply, QObject * const parent = 0);
virtual const CreateNotificationRuleRequest * request() const Q_DECL_OVERRIDE;
protected slots:
virtual void parseSuccess(QIODevice &response) Q_DECL_OVERRIDE;
private:
Q_DECLARE_PRIVATE(CreateNotificationRuleResponse)
Q_DISABLE_COPY(CreateNotificationRuleResponse)
};
} // namespace CodeStarNotifications
} // namespace QtAws
#endif
|
/*
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_CREATEWORLDEXPORTJOBRESPONSE_H
#define QTAWS_CREATEWORLDEXPORTJOBRESPONSE_H
#include "robomakerresponse.h"
#include "createworldexportjobrequest.h"
namespace QtAws {
namespace RoboMaker {
class CreateWorldExportJobResponsePrivate;
class QTAWSROBOMAKER_EXPORT CreateWorldExportJobResponse : public RoboMakerResponse {
Q_OBJECT
public:
CreateWorldExportJobResponse(const CreateWorldExportJobRequest &request, QNetworkReply * const reply, QObject * const parent = 0);
virtual const CreateWorldExportJobRequest * request() const Q_DECL_OVERRIDE;
protected slots:
virtual void parseSuccess(QIODevice &response) Q_DECL_OVERRIDE;
private:
Q_DECLARE_PRIVATE(CreateWorldExportJobResponse)
Q_DISABLE_COPY(CreateWorldExportJobResponse)
};
} // namespace RoboMaker
} // namespace QtAws
#endif
|
/*
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_LISTREGEXMATCHSETSREQUEST_P_H
#define QTAWS_LISTREGEXMATCHSETSREQUEST_P_H
#include "wafrequest_p.h"
#include "listregexmatchsetsrequest.h"
namespace QtAws {
namespace WAF {
class ListRegexMatchSetsRequest;
class ListRegexMatchSetsRequestPrivate : public WafRequestPrivate {
public:
ListRegexMatchSetsRequestPrivate(const WafRequest::Action action,
ListRegexMatchSetsRequest * const q);
ListRegexMatchSetsRequestPrivate(const ListRegexMatchSetsRequestPrivate &other,
ListRegexMatchSetsRequest * const q);
private:
Q_DECLARE_PUBLIC(ListRegexMatchSetsRequest)
};
} // namespace WAF
} // namespace QtAws
#endif
|
/*
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_CANCELDATAREPOSITORYTASKREQUEST_P_H
#define QTAWS_CANCELDATAREPOSITORYTASKREQUEST_P_H
#include "fsxrequest_p.h"
#include "canceldatarepositorytaskrequest.h"
namespace QtAws {
namespace FSx {
class CancelDataRepositoryTaskRequest;
class CancelDataRepositoryTaskRequestPrivate : public FSxRequestPrivate {
public:
CancelDataRepositoryTaskRequestPrivate(const FSxRequest::Action action,
CancelDataRepositoryTaskRequest * const q);
CancelDataRepositoryTaskRequestPrivate(const CancelDataRepositoryTaskRequestPrivate &other,
CancelDataRepositoryTaskRequest * const q);
private:
Q_DECLARE_PUBLIC(CancelDataRepositoryTaskRequest)
};
} // namespace FSx
} // namespace QtAws
#endif
|
/*
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_LISTUPDATESRESPONSE_H
#define QTAWS_LISTUPDATESRESPONSE_H
#include "eksresponse.h"
#include "listupdatesrequest.h"
namespace QtAws {
namespace EKS {
class ListUpdatesResponsePrivate;
class QTAWSEKS_EXPORT ListUpdatesResponse : public EksResponse {
Q_OBJECT
public:
ListUpdatesResponse(const ListUpdatesRequest &request, QNetworkReply * const reply, QObject * const parent = 0);
virtual const ListUpdatesRequest * request() const Q_DECL_OVERRIDE;
protected slots:
virtual void parseSuccess(QIODevice &response) Q_DECL_OVERRIDE;
private:
Q_DECLARE_PRIVATE(ListUpdatesResponse)
Q_DISABLE_COPY(ListUpdatesResponse)
};
} // namespace EKS
} // namespace QtAws
#endif
|
/* Copyright (C) 2014-2016 by Martin Langlotz alias stackshadow
This file is part of evillib.
evillib 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.
evillib 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 evillib. If not, see <http://www.gnu.org/licenses/>.
*/
#include "evillib_defines.h"
#include "evillib_depends.h"
#include "core/etObject.h"
#include "core/etDebug.h"
#include "core/etDebug.c"
#include "memory/etMemoryBlock.h"
#include "memory/etMemoryBlock.c"
#include "memory/etMemoryBlockList.h"
#include "memory/etMemoryBlockList.c"
#include "memory/etMemory.h"
#include "memory/etMemory.c"
#include "core/etVersion.h"
#include "core/etVersion.c"
#include "core/etInit.h"
#include "core/etInit.c"
#include "app/etApicheck.h"
#include "app/etApicheck.c"
#include "string/etString.h"
#include "string/etString.c"
#include "string/etStringChar.h"
#include "string/etStringChar.c"
etID_STATE etStringCharTest(){
etApicheckTimer( "etStringChar: Start test.." );
// Vars
etString *etStringActual = NULL;
const char *etStringChar = NULL;
// Allocate a new etString
etStringAlloc( etStringActual );
// Try to get an etString from an empty etString
etStringCharGet( etStringActual, etStringChar );
// Set it with an char
etStringCharSet( etStringActual, "An test String", -1 );
etStringCharGet( etStringActual, etStringChar );
if( strncmp( etStringChar, "An test String", 14 ) == 0 ){
snprintf( etDebugTempMessage, etDebugTempMessageLen, "%p holds the String: '%s' this is good", etStringActual, (char*)etStringChar );
etDebugMessage( etID_LEVEL_DETAIL_MEM, etDebugTempMessage );
} else {
etDebugMessage( etID_LEVEL_CRITICAL, "String is incorrect" );
}
// Copy an smaler string
etStringCharSet( etStringActual, "An test String", 7 );
etStringCharGet( etStringActual, etStringChar );
if( strncmp( etStringChar, "An test", 7 ) == 0 ){
snprintf( etDebugTempMessage, etDebugTempMessageLen, "%p holds the String: '%s' this is good", etStringActual, (char*)etStringChar );
etDebugMessage( etID_LEVEL_DETAIL_MEM, etDebugTempMessage );
} else {
etDebugMessage( etID_LEVEL_CRITICAL, "String is incorrect" );
}
// Add something to the string
etStringCharAdd( etStringActual, " for an longer String" );
etStringCharGet( etStringActual, etStringChar );
if( strncmp( etStringChar, "An test for an longer String", 28 ) == 0 ){
snprintf( etDebugTempMessage, etDebugTempMessageLen, "%p holds the String: '%s' this is good", etStringActual, (char*)etStringChar );
etDebugMessage( etID_LEVEL_DETAIL_MEM, etDebugTempMessage );
} else {
etDebugMessage( etID_LEVEL_CRITICAL, "String is incorrect" );
}
// copy to an char array
//! [etStringCharCopy]
// define an tempArray
char tempArray[100];
// copy from etString to tempArray
etStringCharCopy( etStringActual, tempArray, 100 );
// compare if this is correct
if( strncmp( tempArray, "An test for an longer String", 28 ) == 0 ){
snprintf( etDebugTempMessage, etDebugTempMessageLen, "%p holds the String: '%s' this is good", etStringActual, (char*)tempArray );
etDebugMessage( etID_LEVEL_DETAIL_MEM, etDebugTempMessage );
} else {
etDebugMessage( etID_LEVEL_CRITICAL, "String is incorrect" );
}
//! [etStringCharCopy]
// Find something inside the string
int foundPosition = etStringCharFind( etStringActual, "longer", 0 );
if( foundPosition != 15 ){
etDebugMessage( etID_LEVEL_CRITICAL, "Found the search string 'longer' not instide the string" );
}
// compare it
int compareValue = etStringCharCompare( etStringActual, "An test for an longer String" );
if( foundPosition != 15 ){
etDebugMessage( etID_LEVEL_CRITICAL, "String compare failed" );
}
etStringClean( etStringActual );
etStringCharAdd( etStringActual, " )" );
etStringCharGet( etStringActual, etStringChar );
// End Timer
etApicheckTimer( "OK" );
return etID_YES;
}
etID_STATE etStringWCharTest(){
etApicheckTimer( "etStringChar: Start test.." );
// End Timer
etApicheckTimer( "OK" );
return etID_YES;
}
int main( int argc, const char* argv[] ){
etInit( argc, argv );
etDebugLevelSet( etID_LEVEL_ALL );
etStringCharTest();
etStringWCharTest();
}
|
// Created file "Lib\src\WiaGuid\wiaevent"
typedef struct _GUID
{
unsigned long Data1;
unsigned short Data2;
unsigned short Data3;
unsigned char Data4[8];
} GUID;
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
extern const GUID name = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }
DEFINE_GUID(GUID_DEVINTERFACE_SERENUM_BUS_ENUMERATOR, 0x4d36e978, 0xe325, 0x11ce, 0xbf, 0xc1, 0x08, 0x00, 0x2b, 0xe1, 0x03, 0x18);
|
/*
This source file is part of KBEngine
For the latest info, see http://www.kbengine.org/
Copyright (c) 2008-2016 KBEngine.
KBEngine 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.
KBEngine 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 KBEngine. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef KBE_SOCKETUDPPACKET_H
#define KBE_SOCKETUDPPACKET_H
#include "network/packet.h"
#include "common/objectpool.h"
namespace KBEngine{
namespace Network
{
class UDPPacket : public Packet
{
public:
typedef KBEShared_ptr< SmartPoolObject< UDPPacket > > SmartPoolObjectPtr;
static SmartPoolObjectPtr createSmartPoolObj();
static ObjectPool<UDPPacket>& ObjPool();
static UDPPacket* createPoolObject();
static void reclaimPoolObject(UDPPacket* obj);
static void destroyObjPool();
static size_t maxBufferSize();
UDPPacket(MessageID msgID = 0, size_t res = 0);
virtual ~UDPPacket(void);
int recvFromEndPoint(EndPoint & ep, Address* pAddr = NULL);
virtual void onReclaimObject();
};
typedef SmartPointer<UDPPacket> UDPPacketPtr;
}
}
#endif // KBE_SOCKETUDPPACKET_H
|
// test path tools
#include <string.h>
#include <stdio.h>
#include "utest.h"
#include <ah5.h>
#define EXTERNAL_TEST_FILE (XSTR(AH5_TEST_DATA_DIR) "/test_external_principle.h5")
#define mu_assert_equal2(x, y) mu_assert("Test of equality failed: " #x " != " #y "." , x == y)
#define mu_assert_str_equal2(x, y) mu_assert("Test of equality failed: " #x " != " #y "." , AH5_strcmp(x, y) == 0)
//! Test suite counter.
int tests_run = 0;
char *test_external()
{
hid_t file = -1;
AH5_external_element_t externals;
char success = AH5_TRUE;
AH5_eet_dataset_t* external = NULL;
const char* path_ext = NULL;
hid_t file_ext = 0;
file = H5Fopen(EXTERNAL_TEST_FILE, H5F_ACC_RDONLY, H5P_DEFAULT);
success = AH5_read_external_element(file, &externals);
mu_assert("Fail to read external element.", success == AH5_TRUE);
mu_assert_equal2(externals.nb_datasets, 1);
external = externals.datasets;
mu_assert_equal2(external->nb_eed_items, 1);
mu_assert_str_equal2(
AH5_get_name_from_path(external->principle_file_path), "test_external_principle.h5");
printf("path: %s\n", external->path);
mu_assert_str_equal2(external->path, "/externalElement/external_elements");
mu_assert_str_equal2(external->eed_items[0], "/totö/tutu/titî");
mu_assert_str_equal2(
AH5_get_name_from_path(external->eed_items[1]), "test_external_external.h5");
mu_assert_str_equal2(external->eed_items[2], "/totö2/tutu2/titî2");
success = AH5_is_external_element(&externals, "/totö/tutu/titî", &file_ext, &path_ext);
mu_assert("External not found.", success == AH5_TRUE);
mu_assert_equal2(file_ext, external->file_id[0]);
mu_assert_str_equal2(path_ext, "/totö2/tutu2/titî2");
mu_assert_equal2(path_ext, external->eed_items[2]);
AH5_free_external_element(&externals);
H5Fclose(file);
return MU_FINISHED_WITHOUT_ERRORS;
}
char *test_file_path_next_to()
{
const char* fpath = "/x/y/z";
const char* fname = "toto";
char* fpath2 = NULL;
// Get the size of the resulting path.
size_t size = AH5_file_path_next_to(fpath, fname, NULL, 0);
mu_assert("Wrong size.", size == 10);
fpath2 = malloc(size);
AH5_file_path_next_to(fpath, fname, fpath2, size);
mu_assert("file_path_next_to has failed.", AH5_strcmp(fpath2, "/x/y/toto") == 0);
free(fpath2);
return MU_FINISHED_WITHOUT_ERRORS;
}
char *all_tests()
{
mu_run_test(test_external);
mu_run_test(test_file_path_next_to);
return 0;
}
AH5_UTEST_MAIN(all_tests, tests_run);
|
/*
* File: tiny_codec.h
* Author: nTesla64a
*
* Created on August 31, 2017, 5:06 PM
*/
#ifndef TINY_CODEC_H
#define TINY_CODEC_H
#include <inttypes.h>
#ifdef __cplusplus
extern "C" {
#endif
#define AV_PKT_FLAG_KEY 0x0001 ///< The packet contains a keyframe
#define AV_PKT_FLAG_CORRUPT 0x0002 ///< The packet content is corrupted
typedef struct AVPacket
{
/**
* Presentation timestamp in AVStream->time_base units; the time at which
* the decompressed packet will be presented to the user.
* Can be AV_NOPTS_VALUE if it is not stored in the file.
* pts MUST be larger or equal to dts as presentation cannot happen before
* decompression, unless one wants to view hex dumps. Some formats misuse
* the terms dts and pts/cts to mean something different. Such timestamps
* must be converted to true pts/dts before they are stored in AVPacket.
*/
int64_t pts;
/**
* Duration of this packet in AVStream->time_base units, 0 if unknown.
* Equals next_pts - this_pts in presentation order.
*/
int64_t duration;
int64_t pos; ///< byte position in input stream, -1 if unknown
uint8_t *data;
int size;
int allocated_size;
int stream_index;
/**
* A combination of AV_PKT_FLAG values
*/
uint16_t flags;
uint16_t is_video;
} AVPacket;
typedef struct index_entry_s
{
int64_t pos;
int64_t timestamp;
int size;
int distance;
int flags;
}index_entry_t, *index_entry_p;
typedef struct tiny_codec_s
{
struct SDL_RWops *input;
void *private_context;
void (*free_context)(void *context);
int (*packet)(struct tiny_codec_s *s, struct AVPacket *pkt);
uint64_t fps_num;
uint64_t fps_denum;
struct
{
AVPacket pkt;
uint32_t codec_tag;
uint16_t width;
uint16_t height;
uint8_t *rgba;
void *priv_data;
void (*free_data)(void *data);
int32_t (*decode)(struct tiny_codec_s *s, struct AVPacket *pkt);
uint32_t entry_current;
uint32_t entry_size;
struct index_entry_s *entry;
} video;
struct
{
AVPacket pkt;
uint32_t codec_tag;
uint16_t frquency;
uint16_t format;
uint16_t bit_rate;
uint16_t sample_rate;
uint16_t bits_per_coded_sample;
uint16_t bits_per_sample;
uint16_t channels;
uint32_t extradata_size;
uint8_t *extradata;
void *priv_data;
void (*free_data)(void *data);
int32_t (*decode)(struct tiny_codec_s *s, struct AVPacket *pkt);
uint32_t buff_size;
uint32_t buff_allocated_size;
uint32_t buff_offset;
uint8_t *buff;
uint8_t **buff_p;
uint32_t block_align;
uint32_t entry_current;
uint32_t entry_size;
struct index_entry_s *entry;
} audio;
}tiny_codec_t, *tiny_codec_p;
void av_init_packet(AVPacket *pkt);
int av_get_packet(SDL_RWops *pb, AVPacket *pkt, int size);
void av_packet_unref(AVPacket *pkt);
void codec_init(struct tiny_codec_s *s, SDL_RWops *rw);
void codec_clear(struct tiny_codec_s *s);
void codec_simplify_fps(struct tiny_codec_s *s);
uint32_t codec_resize_audio_buffer(struct tiny_codec_s *s, uint32_t sample_size, uint32_t samples);
int codec_open_rpl(struct tiny_codec_s *s);
#define codec_decode_audio(s) do{ if((s)->packet((s), &(s)->audio.pkt) >= 0) (s)->audio.decode((s), &(s)->audio.pkt); }while(0)
#define codec_decode_video(s) do{ if((s)->packet((s), &(s)->video.pkt) >= 0) (s)->video.decode((s), &(s)->video.pkt); }while(0)
#ifdef __cplusplus
}
#endif
#endif /* TINY_CODEC_H */
|
/* Copyright 2009 Google 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 2.1 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 <errno.h>
#include <grp.h>
#include <nss.h>
#include <pwd.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/param.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <time.h>
#include <unistd.h>
#ifndef BSD
#include <shadow.h>
#endif /* ifndef BSD */
#ifndef NSS_CACHE_H
#define NSS_CACHE_H
#ifdef DEBUG
#undef DEBUG
#define DEBUG(fmt, ...) \
do { \
fprintf(stderr, fmt, ##__VA_ARGS__); \
} while (0)
#else
#define DEBUG(fmt, ...) \
do { \
} while (0)
#endif /* DEBUG */
#define NSS_CACHE_PATH_LENGTH 255
extern char *_nss_cache_setpwent_path(const char *path);
extern char *_nss_cache_setgrent_path(const char *path);
#ifndef BSD
extern char *_nss_cache_setspent_path(const char *path);
#endif /* ifndef BSD */
enum nss_cache_match {
NSS_CACHE_EXACT = 0,
NSS_CACHE_HIGH = 1,
NSS_CACHE_LOW = 2,
NSS_CACHE_ERROR = 3
};
struct nss_cache_args {
char *system_filename;
char *sorted_filename;
void *lookup_function;
void *lookup_value;
void *lookup_result;
char *buffer;
size_t buflen;
char *lookup_key;
size_t lookup_key_length;
};
#endif /* NSS_CACHE_H */
|
/*
* @BEGIN LICENSE
*
* Psi4: an open-source quantum chemistry software package
*
* Copyright (c) 2007-2022 The Psi4 Developers.
*
* The copyrights for code used from other parties are included in
* the corresponding files.
*
* This file is part of Psi4.
*
* Psi4 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, version 3.
*
* Psi4 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 Psi4; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* @END LICENSE
*/
#ifndef CCLAMBDA_PARAMS_H
#define CCLAMBDA_PARAMS_H
/*! \file
\ingroup CCLAMBDA
\brief Enter brief description of file here
*/
#include <string>
namespace psi {
namespace cclambda {
/* Input parameters for cclambda */
struct Params {
int maxiter;
double convergence;
int restart;
long int memory;
int cachelev;
int aobasis;
std::string wfn;
int ref;
int local; /* boolean for using simulated local-CC framework */
int nstates; /* total number of L vectors to compute */
int zeta; /* boolean for solving zeta equations - implies excited state*/
int print;
int dertype;
int diis;
std::string abcd;
int sekino; /* Sekino-Bartlett size-extensive models */
/* the following should be obseleted now or soon */
int all; /* find Ls for all excited states plus ground state */
int ground; /* find L for only ground state */
int num_amps;
};
struct L_Params {
int irrep; /* same as corresponding R */
double R0; /* same as corresponding R */
double cceom_energy; /* same as corresponding R */
int root; /* index of root within irrep */
bool ground; /* boolean, is this a ground state L ? */
char L1A_lbl[32];
char L1B_lbl[32];
char L2AA_lbl[32];
char L2BB_lbl[32];
char L2AB_lbl[32];
char L2RHF_lbl[32];
};
} // namespace cclambda
} // namespace psi
#endif
|
/*
* The MIT License (MIT)
*
* Copyright (c) 2016 ProgSys
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
#ifndef INCLUDE_PG_UTIL_PG_MATRIXUTIL_H_
#define INCLUDE_PG_UTIL_PG_MATRIXUTIL_H_
#include <cmath>
#include <limits.h>
#include <Util/PG_Exception.h>
#include <Util/PG_Matrix.h>
#include <Util/PG_Vector.h>
#include <Util/PG_VectorUtil.h>
namespace PG {
namespace UTIL {
template<typename T>
T const * value_ptr(const tMatrix4x4<T>& mat){
return &(mat[0].x);
}
template<typename T>
tMatrix4x4<T> lookAt( tVector3<T> eyePos, tVector3<T> lookAtPoint, tVector3<T> upVector){
//build a normal base
const tVector3<T> f(normalize(lookAtPoint - eyePos));
const tVector3<T> s(normalize(cross(f, upVector)));
const tVector3<T> u(cross(s, f));
tMatrix4x4<T> viewMat;
viewMat[0][0] = s.x;
viewMat[1][0] = s.y;
viewMat[2][0] = s.z;
viewMat[0][1] = u.x;
viewMat[1][1] = u.y;
viewMat[2][1] = u.z;
viewMat[0][2] =-f.x;
viewMat[1][2] =-f.y;
viewMat[2][2] =-f.z;
viewMat[3][0] =-dot(s, eyePos);
viewMat[3][1] =-dot(u, eyePos);
viewMat[3][2] = dot(f, eyePos);
return viewMat;
}
template<typename T>
tMatrix4x4<T> perspective(T fovy, T aspectRatio, T nearZ, T farZ){
assert_Test("Aspect ratio is 0!", std::abs(aspectRatio - std::numeric_limits<T>::epsilon()) <= static_cast<T>(0));
const T tanHalfFovy = tan(fovy / static_cast<T>(2));
tMatrix4x4<T> perspectiveMat(static_cast<T>(0));
perspectiveMat[0][0] = static_cast<T>(1) / (aspectRatio * tanHalfFovy);
perspectiveMat[1][1] = static_cast<T>(1) / (tanHalfFovy);
perspectiveMat[2][2] = - (farZ + nearZ) / (farZ - nearZ);
perspectiveMat[2][3] = - static_cast<T>(1);
perspectiveMat[3][2] = - (static_cast<T>(2) * farZ * nearZ) / (farZ);
return perspectiveMat;
}
template<typename T>
tMatrix4x4<T> perspective(T fovy, int width, int height, T nearZ, T farZ){
return perspective(fovy, width/static_cast<T>(height), nearZ, farZ);
}
template<typename T>
tMatrix4x4<T> orthogonal(T left, T right, T bottom, T top, T nearZ, T farZ){
tMatrix4x4<T> orthogonalMat;
orthogonalMat[0][0] = static_cast<T>(2) / (right - left);
orthogonalMat[1][1] = static_cast<T>(2) / (top - bottom);
orthogonalMat[2][2] = - static_cast<T>(2) / (farZ - nearZ);
orthogonalMat[3][0] = - (right + left) / (right - left);
orthogonalMat[3][1] = - (top + bottom) / (top - bottom);
orthogonalMat[3][2] = - (farZ + nearZ) / (farZ - nearZ);
return orthogonalMat;
}
// imput in radians
template<typename T>
tMatrix4x4<T> eulerYXZ( const T& yaw, const T& pitch, const T& roll){
const T yaw_cos = cos(yaw);
const T yaw_sin = sin(yaw);
const T pitch_cos = cos(pitch);
const T pitch_sin = sin(pitch);
const T roll_cos = cos(roll);
const T roll_sin = sin(roll);
tMatrix4x4<T> rotationMat;
rotationMat[0][0] = yaw_cos * roll_cos + yaw_sin * pitch_sin * roll_sin;
rotationMat[0][1] = roll_sin * pitch_cos;
rotationMat[0][2] = -yaw_sin * roll_cos + yaw_cos * pitch_sin * roll_sin;
rotationMat[1][0] = -yaw_cos * roll_sin + yaw_sin * pitch_sin * roll_cos;
rotationMat[1][1] = roll_cos * pitch_cos;
rotationMat[1][2] = roll_sin * yaw_sin + yaw_cos * pitch_sin * roll_cos;
rotationMat[2][0] = yaw_sin * pitch_cos;
rotationMat[2][1] = -pitch_sin;
rotationMat[2][2] = yaw_cos * pitch_cos;
return rotationMat;
}
template<typename T>
tMatrix4x4<T> scale(const T& x, const T& y, const T& z){
tMatrix4x4<T> scaleMat;
scaleMat[0][0] = x;
scaleMat[1][1] = y;
scaleMat[2][2] = z;
return scaleMat;
}
template<typename T>
tMatrix4x4<T> scale(const tVector3<T>& vec){
tMatrix4x4<T> scaleMat;
scaleMat[0][0] = vec.x;
scaleMat[1][1] = vec.y;
scaleMat[2][2] = vec.z;
return scaleMat;
}
template<typename T>
tMatrix4x4<T> translation(const T& x, const T& y, const T& z){
tMatrix4x4<T> translationMat;
translationMat[3][0] = x;
translationMat[3][1] = y;
translationMat[3][2] = z;
return translationMat;
}
template<typename T>
tMatrix4x4<T> translation(const tVector3<T>& vec){
tMatrix4x4<T> translationMat;
translationMat[3][0] = vec.x;
translationMat[3][1] = vec.y;
translationMat[3][2] = vec.z;
return translationMat;
}
} /* namespace UTIL */
} /* namespace PG */
#endif /* INCLUDE_PG_UTIL_PG_MATRIXUTIL_H_ */
|
// Copyright (c) 2011-2015 The Cryptonote developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#pragma once
#include "serialization/ISerializer.h"
namespace cryptonote {
template <typename Element, typename Iterator>
void writeSequence(Iterator begin, Iterator end, const std::string& name, ISerializer& s) {
size_t size = std::distance(begin, end);
s.beginArray(size, name);
for (Iterator i = begin; i != end; ++i) {
s(const_cast<Element&>(*i), "");
}
s.endArray();
}
template <typename Element, typename Iterator>
void readSequence(Iterator outputIterator, const std::string& name, ISerializer& s) {
size_t size = 0;
s.beginArray(size, name);
while (size--) {
Element e;
s(e, "");
*outputIterator++ = e;
}
s.endArray();
}
}
|
//
// Generated by the J2ObjC translator. DO NOT EDIT!
// source: /Users/krasnocka/Downloads/j2objc-master/testing/mockito/build_result/java/org/mockito/internal/matchers/Null.java
//
#ifndef _OrgMockitoInternalMatchersNull_H_
#define _OrgMockitoInternalMatchersNull_H_
@protocol OrgHamcrestDescription;
#include "J2ObjC_header.h"
#include "java/io/Serializable.h"
#include "org/mockito/ArgumentMatcher.h"
#define OrgMockitoInternalMatchersNull_serialVersionUID 2823082637424390314LL
@interface OrgMockitoInternalMatchersNull : OrgMockitoArgumentMatcher < JavaIoSerializable > {
}
- (jboolean)matchesWithId:(id)actual;
- (void)describeToWithOrgHamcrestDescription:(id<OrgHamcrestDescription>)description_;
@end
FOUNDATION_EXPORT BOOL OrgMockitoInternalMatchersNull_initialized;
J2OBJC_STATIC_INIT(OrgMockitoInternalMatchersNull)
CF_EXTERN_C_BEGIN
J2OBJC_STATIC_FIELD_GETTER(OrgMockitoInternalMatchersNull, serialVersionUID, jlong)
FOUNDATION_EXPORT OrgMockitoInternalMatchersNull *OrgMockitoInternalMatchersNull_NULL__;
J2OBJC_STATIC_FIELD_GETTER(OrgMockitoInternalMatchersNull, NULL__, OrgMockitoInternalMatchersNull *)
CF_EXTERN_C_END
J2OBJC_TYPE_LITERAL_HEADER(OrgMockitoInternalMatchersNull)
#endif // _OrgMockitoInternalMatchersNull_H_
|
/** \file state_machine.h
* \brief State machine tools.
*
* \author Ivan Koryakovskiy <i.koryakovskiy@tudelft.nl>
* \date 2016-01-01
*
* \copyright \verbatim
* Copyright (c) 2016, Ivan Koryakovskiy
* All rights reserved.
*
* This file is part of GRL, the Generic Reinforcement Learning library.
*
* GRL is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* \endverbatim
*/
#ifndef GRL_STATE_MACHINE_H_
#define GRL_STATE_MACHINE_H_
#include <grl/configurable.h>
namespace grl
{
/// Triggers an event.
class Trigger : public Configurable
{
public:
TYPEINFO("trigger", "Event trigger")
protected:
Vector min_, max_;
double delay_, time_begin_;
bool reset_time_;
public:
Trigger() : delay_(0), time_begin_(0), reset_time_(true) { }
virtual ~Trigger() { }
virtual Trigger *clone() const
{
Trigger *t = new Trigger(*this);
t->min_ = min_;
t->max_ = max_;
t->delay_ = delay_;
return t;
}
// From Configurable
virtual void request(ConfigurationRequest *config)
{
config->push_back(CRP("min", "vector.observation_min", "Minimum of compartment bounding box", min_));
config->push_back(CRP("max", "vector.observation_max", "Maximum of compartment bounding box", max_));
config->push_back(CRP("delay", "double", "Settlement delay for which conditions are continuously fullfilled", delay_, CRP::System, 0.0, DBL_MAX));
}
virtual void configure(Configuration &config)
{
min_ = config["min"].v();
max_ = config["max"].v();
delay_ = config["delay"];
if (min_.size() != max_.size())
throw bad_param("trigger:{min,max}");
}
virtual void reconfigure(const Configuration &config) { }
// Own
virtual int check(double time, const Vector &obs)
{
if (!min_.size())
return 1;
if (obs.size() != min_.size())
throw bad_param("trigger:{obs,min,max}");
// check if observation is within a box
int inside = 1;
for (size_t ii=0; ii != obs.size(); ++ii)
if (obs[ii] < min_[ii] || obs[ii] > max_[ii])
inside = 0;
// reset time counter if out of box
if (!inside || reset_time_)
{
time_begin_ = time;
reset_time_ = false;
}
// check if conditions are satisfied
if ((inside) && (time - time_begin_ >= delay_))
{
reset_time_ = true; // Time will be reset next time the trigger is questioned
return 1;
}
return 0;
}
};
}
#endif /* GRL_STATE_MACHINE_H_ */
|
/******************************************************************************
* Copyright (C) 2015 by Ralf Kaestner *
* ralf.kaestner@gmail.com *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the Lesser GNU General Public License as published by*
* the Free Software Foundation; either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* Lesser GNU General Public License for more details. *
* *
* You should have received a copy of the Lesser GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
******************************************************************************/
#ifndef RQT_MULTIPLOT_CURVE_DATA_CIRCULAR_BUFFER_H
#define RQT_MULTIPLOT_CURVE_DATA_CIRCULAR_BUFFER_H
#include <boost/circular_buffer.hpp>
#include <boost/heap/d_ary_heap.hpp>
#include <rqt_multiplot/CurveData.h>
namespace rqt_multiplot {
class CurveDataCircularBuffer :
public CurveData {
public:
CurveDataCircularBuffer(size_t capacity = 0);
~CurveDataCircularBuffer();
size_t getCapacity() const;
size_t getNumPoints() const;
QPointF getPoint(size_t index) const;
QVector<size_t> getPointsInDistance(double x, double maxDistance)
const;
BoundingRectangle getBounds() const;
void appendPoint(const QPointF& point);
void clearPoints();
private:
class Point;
class XCoordinateRef {
public:
inline XCoordinateRef(double x = 0.0, size_t index = 0) :
x_(x),
index_(index) {
};
inline XCoordinateRef(const XCoordinateRef& src) :
x_(src.x_),
index_(src.index_) {
};
inline bool operator==(const XCoordinateRef& reference) const {
return (x_ == reference.x_);
};
inline bool operator>(const XCoordinateRef& reference) const {
return (x_ > reference.x_);
};
inline bool operator<(const XCoordinateRef& reference) const {
return (x_ < reference.x_);
};
double x_;
size_t index_;
};
typedef boost::circular_buffer<Point> Points;
typedef boost::heap::d_ary_heap<XCoordinateRef, boost::
heap::arity<2>, boost::heap::mutable_<true>, boost::
heap::compare<std::greater<XCoordinateRef> > >
XCoordinateRefMinHeap;
typedef boost::heap::d_ary_heap<double, boost::heap::arity<2>,
boost::heap::mutable_<true>, boost::heap::compare<std::
greater<double> > > CoordinateMinHeap;
typedef boost::heap::d_ary_heap<double, boost::heap::arity<2>,
boost::heap::mutable_<true>, boost::heap::compare<std::
less<double> > > CoordinateMaxHeap;
class Point {
public:
inline Point(const QPointF& point = QPointF(0.0, 0.0)) :
x_(point.x()),
y_(point.y()) {
};
double x_;
double y_;
XCoordinateRefMinHeap::handle_type xMinHandle_;
CoordinateMaxHeap::handle_type xMaxHandle_;
CoordinateMinHeap::handle_type yMinHandle_;
CoordinateMaxHeap::handle_type yMaxHandle_;
};
Points points_;
XCoordinateRefMinHeap xMin_;
CoordinateMaxHeap xMax_;
CoordinateMinHeap yMin_;
CoordinateMaxHeap yMax_;
};
};
#endif
|
/*
pins_arduino.h - Pin definition functions for Arduino
Part of Arduino - http://www.arduino.cc/
Modified by Juan Menendez <juanbm@ingen10.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General
Public License along with this library; if not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330,
Boston, MA 02111-1307 USA
*/
// ATMEL ATMEGA644p TQFP
#ifndef Pins_Arduino_h
#define Pins_Arduino_h
#include <Arduino.h>
#include <avr/pgmspace.h>
//1: OPENDAQ-M 2: OPENDAQ-S
#define HW_VERSION 2
#define PIO1 0
#define PIO2 1
#define PIO3 2
#define PIO4 3
#define PIO5 4
#define PIO6 5
#ifdef ARDUINO_MAIN
// these arrays map port names (e.g. port B) to the
// appropriate addresses for various functions (e.g. reading
// and writing)
const uint16_t PROGMEM port_to_mode_PGM[] = {
NOT_A_PORT,
(uint16_t) &DDRA,
(uint16_t) &DDRB,
(uint16_t) &DDRC,
(uint16_t) &DDRD,
};
const uint16_t PROGMEM port_to_output_PGM[] = {
NOT_A_PORT,
(uint16_t) &PORTA,
(uint16_t) &PORTB,
(uint16_t) &PORTC,
(uint16_t) &PORTD
};
const uint16_t PROGMEM port_to_input_PGM[] = {
NOT_A_PORT,
(uint16_t) &PINA,
(uint16_t) &PINB,
(uint16_t) &PINC,
(uint16_t) &PIND
};
const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[] = {
_BV(7),
_BV(6),
_BV(5),
_BV(4),
_BV(5),
_BV(3)
};
const uint8_t PROGMEM digital_pin_to_port_PGM[] = {
PA,
PA,
PA,
PA,
PD,
PD
};
const uint8_t PROGMEM digital_pin_to_timer_PGM[] = {
NOT_ON_TIMER,
NOT_ON_TIMER,
NOT_ON_TIMER,
NOT_ON_TIMER,
TIMER1B,
NOT_ON_TIMER
};
#endif
#endif
|
// Created file "Lib\src\WiaGuid\X64\wiaevent"
typedef struct _GUID
{
unsigned long Data1;
unsigned short Data2;
unsigned short Data3;
unsigned char Data4[8];
} GUID;
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
extern const GUID name = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }
DEFINE_GUID(GUID_PCIEXPRESS_SETTINGS_SUBGROUP, 0x501a4d13, 0x42af, 0x4429, 0x9f, 0xd1, 0xa8, 0x21, 0x8c, 0x26, 0x8e, 0x20);
|
#ifndef PREFERENCESWIDGET_H
#define PREFERENCESWIDGET_H
#include "imageviewer_global.h"
#include <QWidget>
namespace Ui {
class PreferencesWidget;
}
namespace ImageViewer {
class IMAGEVIEWER_EXPORT PreferencesWidget : public QWidget
{
Q_OBJECT
public:
explicit PreferencesWidget(QWidget *parent = 0);
~PreferencesWidget();
private slots:
void noBackgroundClicked(bool);
void solidColorClicked(bool);
void checkeredBackgroundClicked(bool);
void backgroundColorChanged(const QColor &color);
void imageColorChanged(const QColor &color);
void useOpenGLClicked(bool);
private:
Ui::PreferencesWidget *ui;
};
} // namespace ImageViewer
#endif // PREFERENCESWIDGET_H
|
// Created file "Lib\src\Uuid\rtccore_i"
typedef struct _GUID
{
unsigned long Data1;
unsigned short Data2;
unsigned short Data3;
unsigned char Data4[8];
} GUID;
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
extern const GUID name = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }
DEFINE_GUID(IID_IRTCEnumPresenceDevices, 0x708c2ab7, 0x8bf8, 0x42f8, 0x8c, 0x7d, 0x63, 0x51, 0x97, 0xad, 0x55, 0x39);
|
/* babl - dynamically extendable universal pixel conversion library.
* Copyright (C) 2005-2008, Øyvind Kolås and others.
*
* 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, see
* <http://www.gnu.org/licenses/>.
*/
#ifndef _BABL_CPU_ACCEL_H
#define _BABL_CPU_ACCEL_H
typedef enum
{
BABL_CPU_ACCEL_NONE = 0x0,
/* x86 accelerations */
BABL_CPU_ACCEL_X86_MMX = 0x01000000,
BABL_CPU_ACCEL_X86_3DNOW = 0x40000000,
BABL_CPU_ACCEL_X86_MMXEXT = 0x20000000,
BABL_CPU_ACCEL_X86_SSE = 0x10000000,
BABL_CPU_ACCEL_X86_SSE2 = 0x08000000,
BABL_CPU_ACCEL_X86_SSE3 = 0x02000000,
BABL_CPU_ACCEL_X86_SSSE3 = 0x00800000,
BABL_CPU_ACCEL_X86_SSE4_1 = 0x00400000,
/* BABL_CPU_ACCEL_X86_SSE4_2 = 0x00200000, */
/* BABL_CPU_ACCEL_X86_AVX = 0x00080000, */
BABL_CPU_ACCEL_X86_F16C = 0x00040000,
/* powerpc accelerations */
BABL_CPU_ACCEL_PPC_ALTIVEC = 0x04000000,
BABL_CPU_ACCEL_X86_64 = 0x00100000
} BablCpuAccelFlags;
BablCpuAccelFlags babl_cpu_accel_get_support (void);
void babl_cpu_accel_set_use (unsigned int use);
#endif /* _BABL_CPU_ACCEL_H */
|
// --------------------------------------------------------------------------
// Citadel: Log5.H
//
// This class specifies the contents of LOG5.DAT. This is used to keep track
// of each user's message pointers for each room. For each room, each user
// has an unsigned long that is the number of the newest message on the
// system the last time the user was in the room. Any messages newer than
// this were posted after he was last in the room, and are therefore "new."
class LogEntry5 : public LogStarter
{
m_index *NewPointer;
r_slot MaxRooms;
#ifdef WINCIT
l_index SyncNumber;
Bool SyncSendPaused;
#endif
public:
#ifdef WINCIT
int GetSyncNumber(void)
{
return (SyncNumber);
}
void PauseSyncSend(void)
{
SyncSendPaused = TRUE;
}
void ResumeSyncSend(void);
#endif
r_slot GetMaxRooms(void) const
{
return (MaxRooms);
}
void Clear(void)
{
assert(this);
GAINEXCLUSIVEACCESS();
VerifyHeap();
if (IsValid())
{
memset(NewPointer, 0, MaxRooms * sizeof(*NewPointer));
WINCODE(SyncNumber = CERROR);
WINCODE(SyncSendPaused = FALSE);
VerifyHeap();
}
RELEASEEXCLUSIVEACCESS();
}
LogEntry5(r_slot NumRooms)
{
assert(this);
GAINEXCLUSIVEACCESS();
VerifyHeap();
MaxRooms = NumRooms;
NewPointer = new m_index[NumRooms];
Clear();
ResetFileName();
ADDSYNC();
VerifyHeap();
RELEASEEXCLUSIVEACCESS();
}
~LogEntry5()
{
assert(this);
GAINEXCLUSIVEACCESS();
VerifyHeap();
delete [] NewPointer;
REMOVESYNC();
VerifyHeap();
RELEASEEXCLUSIVEACCESS();
}
LogEntry5(const LogEntry5 &Original)
{
assert(this);
GAINEXCLUSIVEACCESS();
VerifyHeap();
MaxRooms = Original.MaxRooms;
NewPointer = new m_index[MaxRooms];
#ifdef WINCIT
SyncNumber = Original.SyncNumber;
#endif
if (IsValid() && Original.IsValid())
{
memcpy(NewPointer, Original.NewPointer, sizeof(*NewPointer) * MaxRooms);
}
label Buffer;
SetFileName(Original.GetFileName(Buffer, sizeof(Buffer)));
ADDSYNC();
VerifyHeap();
RELEASEEXCLUSIVEACCESS();
}
LogEntry5& operator =(const LogEntry5 &Original)
{
assert(this);
GAINEXCLUSIVEACCESS();
VerifyHeap();
delete [] NewPointer;
MaxRooms = Original.MaxRooms;
NewPointer = new m_index[MaxRooms];
#ifdef WINCIT
SyncNumber = Original.SyncNumber;
#endif
if (IsValid() && Original.IsValid())
{
memcpy(NewPointer, Original.NewPointer, sizeof(*NewPointer) * MaxRooms);
}
label Buffer;
SetFileName(Original.GetFileName(Buffer, sizeof(Buffer)));
VerifyHeap();
RELEASEEXCLUSIVEACCESS();
return (*this);
}
Bool Load(l_index Index);
Bool Save(l_index Index);
void ResetFileName(void)
{
assert(this);
GAINEXCLUSIVEACCESS();
SetFileName(log5Dat);
RELEASEEXCLUSIVEACCESS();
}
void Resize(r_slot NewNumRooms)
{
assert(this);
GAINEXCLUSIVEACCESS();
#if defined(AUXMEM) || defined(WINCIT)
assert(NewNumRooms <= 16376);
#else
assert(NewNumRooms <= 65532u / sizeof(rTable));
#endif
VerifyHeap();
delete [] NewPointer;
MaxRooms = NewNumRooms;
NewPointer = new m_index[MaxRooms];
Clear();
VerifyHeap();
RELEASEEXCLUSIVEACCESS();
}
Bool IsValid(void) const
{
assert(this);
return (NewPointer != NULL);
}
m_index GetRoomNewPointer(r_slot RoomSlot) const
{
assert(this);
assert(RoomSlot >= 0);
assert(RoomSlot < MaxRooms);
return (NewPointer[RoomSlot]);
}
void SetRoomNewPointer(r_slot RoomSlot, m_index NewNewPointer)
{
SYNCDATA(L5_SETROOMNEWPOINTER, RoomSlot, NewNewPointer);
assert(this);
GAINEXCLUSIVEACCESS();
assert(RoomSlot >= 0);
assert(RoomSlot < MaxRooms);
if (IsValid())
{
NewPointer[RoomSlot] = NewNewPointer;
}
RELEASEEXCLUSIVEACCESS();
}
void CopyRoomNewPointers(const LogEntry5 &ToCopy)
{
assert(this);
GAINEXCLUSIVEACCESS();
if (IsValid() && ToCopy.IsValid())
{
r_slot NumCopy = min(MaxRooms, ToCopy.MaxRooms);
memcpy(NewPointer, ToCopy.NewPointer, NumCopy * sizeof(*NewPointer));
}
RELEASEEXCLUSIVEACCESS();
}
const void *GetPointer(void) const
{
assert(this);
return (NewPointer);
}
};
|
#include <stdio.h>
int main(void) {
int s, m, h;
scanf("%d", &s);
h = s / 3600;
s = s - (h * 3600);
m = s / 60;
s = s - (m * 60);
printf("%d h %d min %d s", h, m, s);
return 0;
} |
#define _GNU_SOURCE
#include <sys/types.h>
#include <sys/stat.h>
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#define ALIGN_DOWN( size, align ) ( (size) - ( (size) % (align) ) )
int
main( int argc, char **argv )
{
size_t size, oldsize;
char *endptr;
int i;
if ( argc < 3 ) {
printf( "usage: %s size [file...]\n", argv[0] );
return 1;
}
oldsize = size = strtoull( argv[1], &endptr, 0 );
switch ( *endptr ) {
case '\0':
break;
case 'g':
size *= 1000;
case 'm':
size *= 1000;
case 'k':
size *= 1000;
endptr++;
break;
case 'G':
size *= 1024;
case 'M':
size *= 1024;
case 'K':
size *= 1024;
endptr++;
break;
}
if ( size < oldsize ) {
printf( "integer overflow\n" );
return 1;
}
if ( *endptr != '\0' ) {
printf( "invalid number string '%s'\n", argv[1] );
return 1;
}
for ( i = 2; i < argc; i++ ) {
struct stat stat;
int fd = open( argv[i], O_WRONLY );
if ( fd < 0 ) {
perror( "open" );
return 1;
}
if ( fstat( fd, &stat ) ) {
perror( "stat" );
return 1;
}
if ( stat.st_blocks * 512 > stat.st_blksize + size ) {
off_t trim;
trim = ALIGN_DOWN( stat.st_size - size, stat.st_blksize );
printf( "trimming 0x%zx bytes off file '%s'\n", trim, argv[i] );
if ( fallocate( fd, FALLOC_FL_COLLAPSE_RANGE, 0, trim ) ) {
perror( "fallocate" );
return 1;
}
}
close( fd );
}
}
|
//
// AppDelegate.h
// Sports
//
// Created by 吴超 on 15/6/26.
// Copyright (c) 2015年 吴超. All rights reserved.
//
#import <UIKit/UIKit.h>
@class IndexViewController;
@class DDMenuController;
@interface AppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@property (strong, nonatomic) DDMenuController *menuController;
@property (strong, nonatomic) IndexViewController *indexVC;
+ (AppDelegate *)defaultAppDelegate;
/**
* 显示loading
*
* @param message 提示文字
*/
- (void)showLoading:(NSString *)message;
/**
* 隐藏loading
*/
- (void)hiddenLoading;
/**
* 显示提示文字
*
* @param message 提示文字
*/
- (void)showHint:(NSString *)message Timer:(float)timer;
@end
|
#ifndef NSTD_MAT_TASK_LIST_H
#define NSTD_MAT_TASK_LIST_H
//(*Headers(nstd_mat_task_list)
#include <wx/sizer.h>
#include <wx/menu.h>
#include <wx/grid.h>
#include <wx/button.h>
#include <wx/dialog.h>
//*)
#include "interface/sqlresulttable.h"
#include "xlslib.h"
using namespace xlslib_core;
#define RECORDCOUNT 65536
class nstd_mat_task_list: public wxDialog
{
public:
nstd_mat_task_list(wxWindow* parent=0,wxWindowID id=wxID_ANY,const wxPoint& pos=wxDefaultPosition,const wxSize& size=wxDefaultSize);
virtual ~nstd_mat_task_list();
//(*Declarations(nstd_mat_task_list)
wxMenuItem* MenuItem1;
wxButton* Button_Export;
wxButton* Button_OK;
wxButton* Button_Cancel;
wxMenu menu_units;
sqlResultGrid* gd_task_list;
//*)
void init_nstd_item_header();
void init_nstd_mat_header();
void init_nstd_mat_instance_header();
void show_control(bool b_show);
void Set_Query(wxString s_query)
{
m_query = s_query;
}
void refresh_list(int i_use =1);
wxString m_index_id;
wxArrayString m_units;
bool m_search_mode;
// only for out to excel
void get_array_units();
void init_array_head();
void label_result(int irow,worksheet* _ws, wxPostgreSQLresult * _res);
//only for out to excel
protected:
//(*Identifiers(nstd_mat_task_list)
static const long ID_GRID_TASK_LIST;
static const long ID_BUTTON1;
static const long ID_BUTTON2;
static const long ID_BUTTON3;
static const long IdMenu_Info;
//*)
private:
// only for out to excel
wxArrayString array_head, array_str, array_alias;
wxArrayInt array_format;
wxString get_out_path();
wxString create_project_folder(wxString s_wbs_no, wxString s_loc);
void export_excel(wxString s_wbs_no, workbook* wb1);
// only for out to excel
wxString str_tasks_header;
wxString m_query;
int m_use;
//(*Handlers(nstd_mat_task_list)
void OnButton_OKClick(wxCommandEvent& event);
void OnButton_CancelClick(wxCommandEvent& event);
void OnMenuItem1Selected(wxCommandEvent& event);
void Ongd_task_listCellRightClick(wxGridEvent& event);
void OnButton_ExportClick(wxCommandEvent& event);
//*)
DECLARE_EVENT_TABLE()
};
#endif
|
/*
* ControlUnit.h
*
* Author: tate
*/
#ifndef CONTROLUNIT_H_
#define CONTROLUNIT_H_
#include <bitset>
#include "globals.h"
/*
* =====================================================================================
* Class: ControlUnit
* Description: Thing-that-tells-other-stuff-what-to-do... (of Doom!)
* =====================================================================================
*/
class ControlUnit
{
public:
ControlUnit();
virtual ~ControlUnit() {}
const std::bitset<16> &getSignals() const;
// void setSignals(const std::bitset<16>& sig);
const std::bitset<16> &sendSignals() const;
/* ==================== OPERATORS ======================================= */
// clang-format off
std::bitset<16> operator &(std::bitset<16>& other);
std::bitset<16> operator |(std::bitset<16>& other);
// std::bitset<16> operator ^(std::bitset<16>& other);
// std::bitset<16> operator ~(std::bitset<16>& other);
std::bitset<16> operator =(std::bitset<16>& other);
//std::bitset<16> operator + (std::bitset<16>& other);
//std::bitset<16> operator - (std::bitset<16>& other);
//std::bitset<16> operator == (std::bitset<16>& other);
//std::bitset<16> operator != (std::bitset<16>& other);
// clang-format on
private:
/* ==================== DATA MEMBERS ======================================= */
std::bitset<16> sig;
};
/* ----- end of class ControlUnit ----- */
#endif /* CONTROLUNIT_H_ */
|
/*
Copyright 2013 Cosmogia
*/
#include <libopencm3/stm32/f4/gpio.h>
#include <libopencm3/stm32/f4/usart.h>
#include <libopencm3/stm32/f4/nvic.h>
#include "./usart.h"
void
usart_init(int usart, int irq, int baudrate, int over8) {
/* Setup USART parameters. */
nvic_disable_irq(irq);
usart_disable_rx_interrupt(usart);
usart_disable_tx_interrupt(usart);
usart_disable(usart);
USART_CR1(usart) |= over8; /* This doubles the listed baudrate. */
usart_set_baudrate(usart, baudrate);
usart_set_databits(usart, 8);
usart_set_stopbits(usart, USART_STOPBITS_1);
usart_set_mode(usart, USART_MODE_TX_RX);
usart_set_parity(usart, USART_PARITY_NONE);
usart_set_flow_control(usart, USART_FLOWCONTROL_NONE);
/* Finally enable the USART. */
usart_enable(usart);
usart_enable_rx_interrupt(usart);
usart_enable_tx_interrupt(usart);
nvic_enable_irq(irq);
}
void
usart_uninit(int usart, int irq) {
/* Disable the IRQ. */
nvic_disable_irq(irq);
/* Disable the USART. */
usart_disable(usart);
/* Disable usart Receive interrupt. */
USART_CR1(usart) &= ~USART_CR1_RXNEIE;
}
inline uint8_t
usart_respond_isr(int usart) {
static uint8_t data = 'A';
/* Check if we were called because of RXNE. */
if (((USART_CR1(usart) & USART_CR1_RXNEIE) != 0) &&
((USART_SR(usart) & USART_SR_RXNE) != 0)) {
/* Retrieve the data from the peripheral. */
data = usart_recv(usart);
/* Enable transmit interrupt so it sends back the data. */
USART_CR1(usart) |= USART_CR1_TXEIE;
}
/* Check if we were called because of TXE. */
if (((USART_CR1(usart) & USART_CR1_TXEIE) != 0) &&
((USART_SR(usart) & USART_SR_TXE) != 0)) {
/* Put data into the transmit register. */
usart_send(usart, data);
/* Disable the TXE interrupt as we don't need it anymore. */
USART_CR1(usart) &= ~USART_CR1_TXEIE;
}
return data;
}
|
#pragma once
#define WINDOW_TITLE_MAX_LEN 256
#define WINDOW_CLASS_MAX_LEN 256
#define WINDOWID_FLSERVER_MENUIDSUMVIEW 0x800c
#define WINDOWID_FLSERVER_STATUSFRAME 0xe900
#define WIDGET_WM_INIT_WIDGETS 0xeeff
#include <string>
#include <memory>
#include "../flhookplugin_sdk/headers/FLHook.h"
using namespace std;
namespace raincious
{
namespace FLHookPlugin
{
namespace Revelation
{
namespace Widget
{
class WidgetBase
{
public:
WidgetBase();
virtual ~WidgetBase();
virtual void create(HWND parent, uint top, uint left, uint width, uint height);
// Automatically call in every second for reloading data
virtual void tick();
// Self event proc
virtual LRESULT CALLBACK proc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, UINT_PTR uIdSubclass, DWORD_PTR dwRefData);
// Automatically call when window event been fired (You need to check if thats your event)
virtual void onCreate(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
virtual void onClose(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
virtual void onDestory(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
virtual void onSize(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam, uint top, uint left, uint width, uint height);
virtual void onMove(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam, uint top, uint left, uint width, uint height);
virtual void onCommand(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
virtual void onUpdate(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
virtual void onEvent(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
virtual void onPaint(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam, HDC windowClientArea);
virtual void onDisable();
virtual void onRemove();
// Status set & get
void setDisable(bool dis);
bool isDisabled();
void setPause(bool pus);
bool isPaused();
protected:
typedef struct WidgetSubClassInfo
{
WidgetBase* Instance = NULL;
WNDPROC OldProc = NULL;
};
bool disabled = false;
bool paused = false;
HWND widget = NULL;
static UINT_PTR SubClassIDs;
static map <UINT_PTR, WidgetSubClassInfo> InstanceSubClassIDMap;
static LRESULT CALLBACK WidgetProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, UINT_PTR uIdSubclass, DWORD_PTR dwRefData);
static WidgetBase* GetInstanceBySubClassID(UINT_PTR uIdSubclass);
static bool SetWidgetSubClassProc(WidgetBase* instance);
static bool RemoveWidgetSubClass(WidgetBase* instance);
static LRESULT WINAPI CallWidgetDefaultProc(UINT_PTR uIdSubclass, HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
};
// Mounted widgets
typedef map <const char*, unique_ptr<WidgetBase>> MountedWidgetList;
// Window weights for searching FLServer window
typedef map <HWND, uint> WindowWeights;
// Information for window searching and binding
typedef struct ProcessSearchInfo
{
DWORD processID = 0;
WindowWeights rootWindows;
} processSearchInfo;
class Main
{
public:
static uint Width;
static uint Height;
static Main* Get();
static void Free();
// Mount and unmount a widget
bool mount(const char* name, unique_ptr<WidgetBase> widget);
bool demount(const char* name);
void run();
protected:
static Main* Instance;
bool paused = false;
MountedWidgetList list;
RECT windowOriginalRect, windowExpectingRect, widgetTargetOriginalRect;
uint windowExpectingWidth = 0, windowExpectingHeight = 0, windowOriginalWidth = 0, windowOriginalHeight = 0;
uint widgetTargetOriginalWidth = 0, widgetTargetOriginalHeight = 0;
uint widgetCurrentTop = 0, widgetCurrentLeft = 0, widgetCurrentWidth = 0, widgetCurrentHeight = 0;
HANDLE tickThreadHandle = NULL, uiThreadHandle = NULL;
HWND window = NULL, widgetWindow = NULL;
HHOOK windowEventHook = NULL;
WNDPROC oldWindowProc = NULL;
bool threadStopSignal = false, tickThreadRunning = false, uiThreadRunning = false;
static BOOL CALLBACK EnumServerWindow(HWND hwnd, LPARAM lParam);
static LRESULT CALLBACK WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
static void UIDataUpdateThread();
static void UIMessagingThread();
Main();
~Main();
// Call when adding widgets to the widget area
void create();
void tick();
// Total windows event hooks
void onCreate(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
void onDestory(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
void onClose(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
void onSize(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
void onMove(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
void onCommand(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
void onUpdate(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
void onPaint(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam, HDC windowClientArea);
void onEvent(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
// Window size related functions
void fixWindowSize();
void fixWidgetSize();
};
}
}
}
} |
// An empty effect class as example or template to create new effects
class Empty : public FillerBase
{
private:
// put your class variables here
public:
// standard ctor, will be called on construction
Empty();
// dtor, will be called on destruction
virtual ~Empty();
// overridden init function, will be called on start of the effect
virtual void Init( Gfx *_gfx, Input *_input );
// overridden update function, will be called every frame
virtual void Update( float _rendertime );
// overridden exit function, will be called on shutdown of the effect
virtual void Exit( void );
private:
// put your internal functions here
// declare the class, so it can be constructed from the startup.ini
DECLARE_CLASS(Empty);
};
|
/*
* 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/elastictranscoder/ElasticTranscoder_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace ElasticTranscoder
{
namespace Model
{
/**
* <p>The detected properties of the input file. Elastic Transcoder identifies
* these values from the input file.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/elastictranscoder-2012-09-25/DetectedProperties">AWS
* API Reference</a></p>
*/
class AWS_ELASTICTRANSCODER_API DetectedProperties
{
public:
DetectedProperties();
DetectedProperties(Aws::Utils::Json::JsonView jsonValue);
DetectedProperties& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
/**
* <p>The detected width of the input file, in pixels.</p>
*/
inline int GetWidth() const{ return m_width; }
/**
* <p>The detected width of the input file, in pixels.</p>
*/
inline void SetWidth(int value) { m_widthHasBeenSet = true; m_width = value; }
/**
* <p>The detected width of the input file, in pixels.</p>
*/
inline DetectedProperties& WithWidth(int value) { SetWidth(value); return *this;}
/**
* <p>The detected height of the input file, in pixels.</p>
*/
inline int GetHeight() const{ return m_height; }
/**
* <p>The detected height of the input file, in pixels.</p>
*/
inline void SetHeight(int value) { m_heightHasBeenSet = true; m_height = value; }
/**
* <p>The detected height of the input file, in pixels.</p>
*/
inline DetectedProperties& WithHeight(int value) { SetHeight(value); return *this;}
/**
* <p>The detected frame rate of the input file, in frames per second.</p>
*/
inline const Aws::String& GetFrameRate() const{ return m_frameRate; }
/**
* <p>The detected frame rate of the input file, in frames per second.</p>
*/
inline void SetFrameRate(const Aws::String& value) { m_frameRateHasBeenSet = true; m_frameRate = value; }
/**
* <p>The detected frame rate of the input file, in frames per second.</p>
*/
inline void SetFrameRate(Aws::String&& value) { m_frameRateHasBeenSet = true; m_frameRate = std::move(value); }
/**
* <p>The detected frame rate of the input file, in frames per second.</p>
*/
inline void SetFrameRate(const char* value) { m_frameRateHasBeenSet = true; m_frameRate.assign(value); }
/**
* <p>The detected frame rate of the input file, in frames per second.</p>
*/
inline DetectedProperties& WithFrameRate(const Aws::String& value) { SetFrameRate(value); return *this;}
/**
* <p>The detected frame rate of the input file, in frames per second.</p>
*/
inline DetectedProperties& WithFrameRate(Aws::String&& value) { SetFrameRate(std::move(value)); return *this;}
/**
* <p>The detected frame rate of the input file, in frames per second.</p>
*/
inline DetectedProperties& WithFrameRate(const char* value) { SetFrameRate(value); return *this;}
/**
* <p>The detected file size of the input file, in bytes.</p>
*/
inline long long GetFileSize() const{ return m_fileSize; }
/**
* <p>The detected file size of the input file, in bytes.</p>
*/
inline void SetFileSize(long long value) { m_fileSizeHasBeenSet = true; m_fileSize = value; }
/**
* <p>The detected file size of the input file, in bytes.</p>
*/
inline DetectedProperties& WithFileSize(long long value) { SetFileSize(value); return *this;}
/**
* <p>The detected duration of the input file, in milliseconds.</p>
*/
inline long long GetDurationMillis() const{ return m_durationMillis; }
/**
* <p>The detected duration of the input file, in milliseconds.</p>
*/
inline void SetDurationMillis(long long value) { m_durationMillisHasBeenSet = true; m_durationMillis = value; }
/**
* <p>The detected duration of the input file, in milliseconds.</p>
*/
inline DetectedProperties& WithDurationMillis(long long value) { SetDurationMillis(value); return *this;}
private:
int m_width;
bool m_widthHasBeenSet;
int m_height;
bool m_heightHasBeenSet;
Aws::String m_frameRate;
bool m_frameRateHasBeenSet;
long long m_fileSize;
bool m_fileSizeHasBeenSet;
long long m_durationMillis;
bool m_durationMillisHasBeenSet;
};
} // namespace Model
} // namespace ElasticTranscoder
} // namespace Aws
|
/**
* A class which describes the properties and actions of a channel splitter.
* This channel will take an element at it source and divides the element over
* all its exits.
*
* Please note that this class is NOT responsible for the descruction of the
* specified channels.
*
* @date 16 January, 2015
* @author Joeri HERMANS
* @version 0.1
*
* Copyright 2015 Joeri HERMANS
*
* 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 CHANNEL_SPLITTER_H_
#define CHANNEL_SPLITTER_H_
// BEGIN Includes. ///////////////////////////////////////////////////
// System dependencies.
#include <cassert>
#include <vector>
#include <mutex>
// Application dependencies.
#include <ias/channel/channel.h>
// END Includes. /////////////////////////////////////////////////////
template<class T>
class ChannelSplitter : public Channel<T> {
public:
// BEGIN Class constants. ////////////////////////////////////////
// END Class constants. //////////////////////////////////////////
private:
// BEGIN Private members. ////////////////////////////////////////
/**
* A vector which holds all the exits of the splitter.
*
* @note By default, this vector will be empty.
*/
std::vector<Channel<T> *> mExits;
/**
* A mutex which synchronizes the access to the exit channels.
*/
mutable std::mutex mMutexExits;
// END Private members. //////////////////////////////////////////
// BEGIN Private methods. ////////////////////////////////////////
// END Private methods. //////////////////////////////////////////
protected:
// BEGIN Protected methods. //////////////////////////////////////
// END Protected methods. ////////////////////////////////////////
public:
// BEGIN Constructors. ///////////////////////////////////////////
ChannelSplitter( void ) = default;
ChannelSplitter( const std::vector<Channel<T> *> & exits ) {
mExits = exits;
}
// END Constructors. /////////////////////////////////////////////
// BEGIN Destructor. /////////////////////////////////////////////
virtual ~ChannelSplitter( void ) = default;
// END Destructor. ///////////////////////////////////////////////
// BEGIN Public methods. /////////////////////////////////////////
virtual void pipe( T argument ) {
mMutexExits.lock();
for( auto it = mExits.begin() ; it != mExits.end() ; ++it )
(*it)->pipe(argument);
mMutexExits.unlock();
}
void addChannel( Channel<T> * channel ) {
// Checking the precondition.
assert( channel != nullptr );
mMutexExits.lock();
mExits.push_back(channel);
mMutexExits.unlock();
}
void removeChannel( const Channel<T> * channel ) {
Channel<T> * c;
// Checking the precondition.
assert( channel != nullptr );
mMutexExits.lock();
for( auto it = mExits.begin() ; it != mExits.end() ; ++it ) {
c = (*it);
if( c == channel ) {
mExits.erase(it);
break;
}
}
mMutexExits.unlock();
}
// END Public methods. ///////////////////////////////////////////
// BEGIN Static methods. /////////////////////////////////////////
// END Static methods. ///////////////////////////////////////////
};
#endif /* CHANNEL_SPLITTER_H_ */
|
#pragma once
#include <memory>
namespace Halley
{
class NetworkService;
enum class NetworkProtocol
{
TCP,
UDP
};
class NetworkAPI
{
public:
virtual ~NetworkAPI() {}
virtual std::unique_ptr<NetworkService> createService(NetworkProtocol protocol, int port = 0) = 0;
};
}
|
// This file is part of the Yttrium toolkit.
// Copyright (C) Sergei Blagodarin.
// SPDX-License-Identifier: Apache-2.0
#pragma once
#include <cstddef>
namespace Yt
{
enum class AudioSample
{
i16,
f32,
};
class AudioFormat
{
public:
constexpr AudioFormat() noexcept = default;
constexpr AudioFormat(AudioSample sample_type, size_t channels, size_t frames_per_second) noexcept
: _sample_type{ sample_type }, _channels{ channels }, _frames_per_second{ frames_per_second } {}
constexpr size_t bytes_per_frame() const noexcept { return bytes_per_sample() * _channels; }
constexpr size_t bytes_per_sample() const noexcept { return bytes_per_sample(_sample_type); }
constexpr size_t bytes_per_second() const noexcept { return bytes_per_frame() * _frames_per_second; }
constexpr size_t channels() const noexcept { return _channels; }
constexpr size_t frames_per_second() const noexcept { return _frames_per_second; }
constexpr AudioSample sample_type() const noexcept { return _sample_type; }
static constexpr size_t bytes_per_sample(AudioSample type) noexcept
{
switch (type)
{
case AudioSample::i16: return 2;
case AudioSample::f32: return 4;
}
return 0;
}
private:
AudioSample _sample_type = AudioSample::i16;
size_t _channels = 0;
size_t _frames_per_second = 0;
};
constexpr bool operator==(const AudioFormat& a, const AudioFormat& b) noexcept { return a.sample_type() == b.sample_type() && a.channels() == b.channels() && a.frames_per_second() == b.frames_per_second(); }
constexpr bool operator!=(const AudioFormat& a, const AudioFormat& b) noexcept { return !(a == b); }
}
|
/*
pins_arduino.h - Pin definition functions for Arduino
Part of Arduino - http://www.arduino.cc/
Copyright (c) 2007 David A. Mellis
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General
Public License along with this library; if not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330,
Boston, MA 02111-1307 USA
*/
#ifndef Pins_Arduino_h
#define Pins_Arduino_h
#include <avr/pgmspace.h>
#define NUM_DIGITAL_PINS 22
#define NUM_ANALOG_INPUTS 8
#define analogInputToDigitalPin(p) ((p < 6) ? (p) + 14 : -1)
#if defined(__AVR_ATmega8__)
#define digitalPinHasPWM(p) ((p) == 9 || (p) == 10 || (p) == 11)
#else
#define digitalPinHasPWM(p) ((p) == 3 || (p) == 5 || (p) == 6 || (p) == 9 || (p) == 10 || (p) == 11)
#endif
static const uint8_t SS = 10;
static const uint8_t MOSI = 11;
static const uint8_t MISO = 12;
static const uint8_t SCK = 13;
static const uint8_t SDA = 18;
static const uint8_t SCL = 19;
#define LED_BUILTIN 13
static const uint8_t A0 = 14;
static const uint8_t A1 = 15;
static const uint8_t A2 = 16;
static const uint8_t A3 = 17;
static const uint8_t A4 = 18;
static const uint8_t A5 = 19;
static const uint8_t A6 = 22;
static const uint8_t A7 = 23;
#define digitalPinToPCICR(p) (((p) >= 0 && (p) <= 21) ? (&PCICR) : ((uint8_t *)0))
#define digitalPinToPCICRbit(p) (((p) <= 7) ? 2 : (((p) <= 13) ? 0 : 1))
#define digitalPinToPCMSK(p) (((p) <= 7) ? (&PCMSK2) : (((p) <= 13) ? (&PCMSK0) : (((p) <= 21) ? (&PCMSK1) : ((uint8_t *)0))))
#define digitalPinToPCMSKbit(p) (((p) <= 7) ? (p) : (((p) <= 13) ? ((p) - 8) : ((p) - 14)))
#define digitalPinToInterrupt(p) ((p) == 2 ? 0 : ((p) == 3 ? 1 : NOT_AN_INTERRUPT))
#ifdef ARDUINO_MAIN
// On the Arduino board, digital pins are also used
// for the analog output (software PWM). Analog input
// pins are a separate set.
// ATMEL ATMEGA8 & 168 / ARDUINO
//
// +-\/-+
// PC6 1| |28 PC5 (AI 5)
// (D 0) PD0 2| |27 PC4 (AI 4)
// (D 1) PD1 3| |26 PC3 (AI 3)
// (D 2) PD2 4| |25 PC2 (AI 2)
// PWM+ (D 3) PD3 5| |24 PC1 (AI 1)
// (D 4) PD4 6| |23 PC0 (AI 0)
// VCC 7| |22 GND
// GND 8| |21 AREF
// PB6 9| |20 AVCC
// PB7 10| |19 PB5 (D 13)
// PWM+ (D 5) PD5 11| |18 PB4 (D 12)
// PWM+ (D 6) PD6 12| |17 PB3 (D 11) PWM
// (D 7) PD7 13| |16 PB2 (D 10) PWM
// (D 8) PB0 14| |15 PB1 (D 9) PWM
// +----+
//
// (PWM+ indicates the additional PWM pins on the ATmega168.)
// ATMEL ATMEGA1280 / ARDUINO
//
// 0-7 PE0-PE7 works
// 8-13 PB0-PB5 works
// 14-21 PA0-PA7 works
// 22-29 PH0-PH7 works
// 30-35 PG5-PG0 works
// 36-43 PC7-PC0 works
// 44-51 PJ7-PJ0 works
// 52-59 PL7-PL0 works
// 60-67 PD7-PD0 works
// A0-A7 PF0-PF7
// A8-A15 PK0-PK7
// these arrays map port names (e.g. port B) to the
// appropriate addresses for various functions (e.g. reading
// and writing)
const uint16_t PROGMEM port_to_mode_PGM[] = {
NOT_A_PORT,
NOT_A_PORT,
(uint16_t) &DDRB,
(uint16_t) &DDRC,
(uint16_t) &DDRD,
};
const uint16_t PROGMEM port_to_output_PGM[] = {
NOT_A_PORT,
NOT_A_PORT,
(uint16_t) &PORTB,
(uint16_t) &PORTC,
(uint16_t) &PORTD,
};
const uint16_t PROGMEM port_to_input_PGM[] = {
NOT_A_PORT,
NOT_A_PORT,
(uint16_t) &PINB,
(uint16_t) &PINC,
(uint16_t) &PIND,
};
const uint8_t PROGMEM digital_pin_to_port_PGM[] = {
PD, /* 0 */
PD,
PD,
PD,
PD,
PD,
PD,
PD,
PB, /* 8 */
PB,
PB,
PB,
PB,
PB,
PC, /* 14 */
PC,
PC,
PC,
PC,
PC,
PB,
PB,
};
const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[] = {
_BV(0), /* 0, port D */
_BV(1),
_BV(2),
_BV(3),
_BV(4),
_BV(5),
_BV(6),
_BV(7),
_BV(0), /* 8, port B */
_BV(1),
_BV(2),
_BV(3),
_BV(4),
_BV(5),
_BV(0), /* 14, port C */
_BV(1),
_BV(2),
_BV(3),
_BV(4),
_BV(5),
_BV(6),
_BV(7),
};
const uint8_t PROGMEM digital_pin_to_timer_PGM[] = {
NOT_ON_TIMER, /* 0 - port D */
NOT_ON_TIMER,
NOT_ON_TIMER,
// on the ATmega168, digital pin 3 has hardware pwm
#if defined(__AVR_ATmega8__)
NOT_ON_TIMER,
#else
TIMER2B,
#endif
NOT_ON_TIMER,
// on the ATmega168, digital pins 5 and 6 have hardware pwm
#if defined(__AVR_ATmega8__)
NOT_ON_TIMER,
NOT_ON_TIMER,
#else
TIMER0B,
TIMER0A,
#endif
NOT_ON_TIMER,
NOT_ON_TIMER, /* 8 - port B */
TIMER1A,
TIMER1B,
#if defined(__AVR_ATmega8__)
TIMER2,
#else
TIMER2A,
#endif
NOT_ON_TIMER,
NOT_ON_TIMER,
NOT_ON_TIMER,
NOT_ON_TIMER, /* 14 - port C */
NOT_ON_TIMER,
NOT_ON_TIMER,
NOT_ON_TIMER,
NOT_ON_TIMER,
};
#endif
// These serial port names are intended to allow libraries and architecture-neutral
// sketches to automatically default to the correct port name for a particular type
// of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
// the first hardware serial port whose RX/TX pins are not dedicated to another use.
//
// SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor
//
// SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial
//
// SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library
//
// SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins.
//
// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
// pins are NOT connected to anything by default.
#define SERIAL_PORT_MONITOR Serial
#define SERIAL_PORT_HARDWARE Serial
#endif
|
#pragma once
#include "il2cpp-config.h"
#ifndef _MSC_VER
# include <alloca.h>
#else
# include <malloc.h>
#endif
#include <stdint.h>
// UnityEngine.UI.ObjectPool`1<System.Collections.Generic.List`1<UnityEngine.UI.RectMask2D>>
struct ObjectPool_1_t229885755;
// UnityEngine.Events.UnityAction`1<System.Collections.Generic.List`1<UnityEngine.UI.RectMask2D>>
struct UnityAction_1_t324477633;
#include "mscorlib_System_Object4170816371.h"
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// UnityEngine.UI.ListPool`1<UnityEngine.UI.RectMask2D>
struct ListPool_1_t2454716658 : public Il2CppObject
{
public:
public:
};
struct ListPool_1_t2454716658_StaticFields
{
public:
// UnityEngine.UI.ObjectPool`1<System.Collections.Generic.List`1<T>> UnityEngine.UI.ListPool`1::s_ListPool
ObjectPool_1_t229885755 * ___s_ListPool_0;
// UnityEngine.Events.UnityAction`1<System.Collections.Generic.List`1<T>> UnityEngine.UI.ListPool`1::<>f__am$cache1
UnityAction_1_t324477633 * ___U3CU3Ef__amU24cache1_1;
public:
inline static int32_t get_offset_of_s_ListPool_0() { return static_cast<int32_t>(offsetof(ListPool_1_t2454716658_StaticFields, ___s_ListPool_0)); }
inline ObjectPool_1_t229885755 * get_s_ListPool_0() const { return ___s_ListPool_0; }
inline ObjectPool_1_t229885755 ** get_address_of_s_ListPool_0() { return &___s_ListPool_0; }
inline void set_s_ListPool_0(ObjectPool_1_t229885755 * value)
{
___s_ListPool_0 = value;
Il2CppCodeGenWriteBarrier(&___s_ListPool_0, value);
}
inline static int32_t get_offset_of_U3CU3Ef__amU24cache1_1() { return static_cast<int32_t>(offsetof(ListPool_1_t2454716658_StaticFields, ___U3CU3Ef__amU24cache1_1)); }
inline UnityAction_1_t324477633 * get_U3CU3Ef__amU24cache1_1() const { return ___U3CU3Ef__amU24cache1_1; }
inline UnityAction_1_t324477633 ** get_address_of_U3CU3Ef__amU24cache1_1() { return &___U3CU3Ef__amU24cache1_1; }
inline void set_U3CU3Ef__amU24cache1_1(UnityAction_1_t324477633 * value)
{
___U3CU3Ef__amU24cache1_1 = value;
Il2CppCodeGenWriteBarrier(&___U3CU3Ef__amU24cache1_1, value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
|
// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef BASE_COMPILER_SPECIFIC_H_
#define BASE_COMPILER_SPECIFIC_H_
#pragma once
// TITANIUM: detect compiler based on platform.
#if defined(OS_OSX) || defined(OS_LINUX)
#define COMPILER_GCC
#elif defined(OS_WIN32)
#define COMPILER_MSVC
#endif
#if defined(COMPILER_MSVC)
// Macros for suppressing and disabling warnings on MSVC.
//
// Warning numbers are enumerated at:
// http://msdn.microsoft.com/en-us/library/8x5x43k7(VS.80).aspx
//
// The warning pragma:
// http://msdn.microsoft.com/en-us/library/2c8f766e(VS.80).aspx
//
// Using __pragma instead of #pragma inside macros:
// http://msdn.microsoft.com/en-us/library/d9x1s805.aspx
// MSVC_SUPPRESS_WARNING disables warning |n| for the remainder of the line and
// for the next line of the source file.
#define MSVC_SUPPRESS_WARNING(n) __pragma(warning(suppress:n))
// MSVC_PUSH_DISABLE_WARNING pushes |n| onto a stack of warnings to be disabled.
// The warning remains disabled until popped by MSVC_POP_WARNING.
#define MSVC_PUSH_DISABLE_WARNING(n) __pragma(warning(push)) \
__pragma(warning(disable:n))
// MSVC_PUSH_WARNING_LEVEL pushes |n| as the global warning level. The level
// remains in effect until popped by MSVC_POP_WARNING(). Use 0 to disable all
// warnings.
#define MSVC_PUSH_WARNING_LEVEL(n) __pragma(warning(push, n))
// Pop effects of innermost MSVC_PUSH_* macro.
#define MSVC_POP_WARNING() __pragma(warning(pop))
#define MSVC_DISABLE_OPTIMIZE() __pragma(optimize("", off))
#define MSVC_ENABLE_OPTIMIZE() __pragma(optimize("", on))
// Allows |this| to be passed as an argument in constructor initializer lists.
// This uses push/pop instead of the seemingly simpler suppress feature to avoid
// having the warning be disabled for more than just |code|.
//
// Example usage:
// Foo::Foo() : x(NULL), ALLOW_THIS_IN_INITIALIZER_LIST(y(this)), z(3) {}
//
// Compiler warning C4355: 'this': used in base member initializer list:
// http://msdn.microsoft.com/en-us/library/3c594ae3(VS.80).aspx
#define ALLOW_THIS_IN_INITIALIZER_LIST(code) MSVC_PUSH_DISABLE_WARNING(4355) \
code \
MSVC_POP_WARNING()
#else // Not MSVC
#define MSVC_SUPPRESS_WARNING(n)
#define MSVC_PUSH_DISABLE_WARNING(n)
#define MSVC_PUSH_WARNING_LEVEL(n)
#define MSVC_POP_WARNING()
#define MSVC_DISABLE_OPTIMIZE()
#define MSVC_ENABLE_OPTIMIZE()
#define ALLOW_THIS_IN_INITIALIZER_LIST(code) code
#endif // COMPILER_MSVC
// Annotate a variable indicating it's ok if the variable is not used.
// (Typically used to silence a compiler warning when the assignment
// is important for some other reason.)
// Use like:
// int x ALLOW_UNUSED = ...;
#if defined(COMPILER_GCC)
#define ALLOW_UNUSED __attribute__((unused))
#else
#define ALLOW_UNUSED
#endif
// Annotate a virtual method indicating it must be overriding a virtual
// method in the parent class.
// Use like:
// virtual void foo() OVERRIDE;
#if defined(COMPILER_MSVC)
#define OVERRIDE override
#elif defined(__clang__)
#define OVERRIDE override
#else
#define OVERRIDE
#endif
// Annotate a function indicating the caller must examine the return value.
// Use like:
// int foo() WARN_UNUSED_RESULT;
#if defined(COMPILER_GCC)
#define WARN_UNUSED_RESULT __attribute__((warn_unused_result))
#else
#define WARN_UNUSED_RESULT
#endif
// Tell the compiler a function is using a printf-style format string.
// |format_param| is the one-based index of the format string parameter;
// |dots_param| is the one-based index of the "..." parameter.
// For v*printf functions (which take a va_list), pass 0 for dots_param.
// (This is undocumented but matches what the system C headers do.)
#if defined(COMPILER_GCC)
#define PRINTF_FORMAT(format_param, dots_param) \
__attribute__((format(printf, format_param, dots_param)))
#else
#define PRINTF_FORMAT(format_param, dots_param)
#endif
// WPRINTF_FORMAT is the same, but for wide format strings.
// This doesn't appear to yet be implemented in any compiler.
// See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38308 .
#define WPRINTF_FORMAT(format_param, dots_param)
// If available, it would look like:
// __attribute__((format(wprintf, format_param, dots_param)))
#endif // BASE_COMPILER_SPECIFIC_H_
|
#ifndef __INPUTSERVER_H__
#define __INPUTSERVER_H__
#include "SDL2\SDL.h"
#include "common_net.h"
#define CTRL_MAX_ID_LENGTH 64
#define CTRL_CURRENT_VERSION "GACtrlV01"
#define CTRL_QUEUE_SIZE 65536 // 64K
#define SDL_EVENT_MSGTYPE_NULL 0
#define SDL_EVENT_MSGTYPE_KEYBOARD 1
#define SDL_EVENT_MSGTYPE_MOUSEKEY 2
#define SDL_EVENT_MSGTYPE_MOUSEMOTION 3
#define SDL_EVENT_MSGTYPE_MOUSEWHEEL 4
#define VK_PRETENDED_LCONTROL 0x98 // L_CONTROL key: 162
#define VK_PRETENDED_LALT 0x99 // L_ALT key: 164
typedef unsigned (__stdcall * PTHREAD_START) (void *);
#define chBEGINTHREADEX(psa, cbStack,pfnStartAddr, \
pvParam, fdwCreate, pdwThreadID) \
((HANDLE) _beginthreadex( \
(void *)(psa), \
(unsigned)(cbStack), \
(PTHREAD_START)(pfnStartAddr), \
(void *)(pvParam), \
(unsigned )(fdwCreate), \
(unsigned *)(pdwThreadID)))
// bzero
#ifndef bzero
#define bzero(m,n) ZeroMemory(m, n)
#endif
// bcopy
#ifndef bcopy
#define bcopy(s,d,n) CopyMemory(d, s, n)
#endif
// strncasecmp
#ifndef strncasecmp
#define strncasecmp(a,b,n) _strnicmp(a,b,n)
#endif
// strcasecmp
#ifndef strcasecmp
#define strcasecmp(a,b) _stricmp(a,b)
#endif
// strdup
#ifndef strdup
#define strdup(s) _strdup(s)
#endif
// strtok_r
#ifndef strtok_r
#define strtok_r(s,d,v) strtok_s(s,d,v)
#endif
// snprintf
#ifndef snprintf
#define snprintf(b,n,f,...) _snprintf_s(b,n,_TRUNCATE,f,__VA_ARGS__)
#endif
// vsnprintf
#ifndef vsnprintf
#define vsnprintf(b,n,f,ap) vsnprintf_s(b,n,_TRUNCATE,f,ap)
#endif
// strncpy
#ifndef strncpy
#define strncpy(d,s,n) strncpy_s(d,n,s,_TRUNCATE)
#endif
// getpid
#ifndef getpid
#define getpid _getpid
#endif
// gmtimr_r
#ifndef gmtime_r
#define gmtime_r(pt,ptm) gmtime_s(ptm,pt)
#endif
// dlopen
#ifndef dlopen
#define dlopen(f,opt) LoadLibrary(f)
#endif
// dlsym
#ifndef dlsym
#define dlsym(h,name) GetProcAddress(h,name)
#endif
// dlclose
#ifndef dlclose
#define dlclose(h) FreeLibrary(h)
#endif
#ifndef INET_ADDRSTRLEN
#define INET_ADDRSTRLEN 16
#endif
struct WIN32IMAGE {
int width;
int height;
int bytes_per_line;
};
struct sdlmsg {
unsigned short msgsize; // size of this data-structure
// every message MUST start from a
// unsigned short message size
// the size includes the 'msgsize'
unsigned char msgtype;
unsigned char is_pressed; // for keyboard/mousekey
unsigned char mousebutton; // mouse button
unsigned char mousestate; // mouse state - key combinations for motion
#if SDL_VERSION_ATLEAST(2,0,0)
unsigned char unused1[2]; // padding - 3+1 chars
unsigned short scancode; // keyboard scan code
int sdlkey; // SDLKey value
unsigned int unicode; // unicode or ASCII value
#else
unsigned char scancode; // keyboard scan code
unsigned short sdlkey; // SDLKey value
unsigned short unicode; // unicode or ASCII value
#endif
unsigned short sdlmod; // SDLMod value
unsigned short mousex; // mouse position (big-endian)
unsigned short mousey; // mouse position (big-endian)
unsigned short mouseRelX; // mouse relative position (big-endian)
unsigned short mouseRelY; // mouse relative position (big-endian)
unsigned char relativeMouseMode;// relative mouse mode?
unsigned char padding[8]; // reserved padding
};
typedef void (*msgfunc)(void *, int);
// handshake message:
struct ctrlhandshake {
unsigned char length;
char id[CTRL_MAX_ID_LENGTH];
};
struct queuemsg {
unsigned short msgsize; // a general header for messages
unsigned char msg[2]; // use '2' to prevent Windows from complaining
};
struct myRect{
int left, top;
int right, bottom;
int width, height;
int linesize;
int size;
};
int ctrl_queue_init(int size, int maxunit);
struct queuemsg * ctrl_queue_read_msg();
void ctrl_queue_release_msg();
int ctrl_queue_write_msg(void *msg, int msgsize);
void ctrl_queue_clear();
int ctrl_socket_init(struct RTSPConf *conf);
int ctrl_client_init(struct RTSPConf *conf, const char *ctrlid);
void* ctrl_client_thread(void *rtspconf);
void ctrl_client_sendmsg(void *msg, int msglen);
int ctrl_server_init( const char *ctrlid);
msgfunc ctrl_server_setreplay(msgfunc);
DWORD WINAPI ctrl_server_thread(LPVOID lpParameter);
int crtl_server_readnext(void *msg, int msglen);
double intall_input_hook(CommonNet &dis,HMODULE hModule);
DWORD WINAPI listenKey(LPVOID lpParameter);
//HHOOK kehook = 0;
//bool enableRender = true;
//extern void SetKeyboardHook(HINSTANCE hmode, DWORD dwThreadId);
#endif
|
#ifndef _ASM_RISCV_SIGCONTEXT_H
#define _ASM_RISCV_SIGCONTEXT_H
/* This struct is saved by setup_frame in signal.c, to keep the current
* context while a signal handler is executed. It is restored by sys_sigreturn.
*/
struct sigcontext {
unsigned long epc;
unsigned long ra;
unsigned long sp;
unsigned long gp;
unsigned long tp;
unsigned long t0;
unsigned long t1;
unsigned long t2;
unsigned long s0;
unsigned long s1;
unsigned long a0;
unsigned long a1;
unsigned long a2;
unsigned long a3;
unsigned long a4;
unsigned long a5;
unsigned long a6;
unsigned long a7;
unsigned long s2;
unsigned long s3;
unsigned long s4;
unsigned long s5;
unsigned long s6;
unsigned long s7;
unsigned long s8;
unsigned long s9;
unsigned long s10;
unsigned long s11;
unsigned long t3;
unsigned long t4;
unsigned long t5;
unsigned long t6;
};
#endif /* _ASM_RISCV_SIGCONTEXT_H */
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <unistd.h>
int main(void)
{
int size = 0;
int chunk_size = 512;
void *p = NULL;
while(1) {
if ((p = malloc(chunk_size)) == NULL) {
printf("out of memory!!\n");
break;
}
memset(p, 1, chunk_size);
size += chunk_size;
printf("[%d] - memory is allocated [%8d] bytes \n", getpid(), size);
sleep(1);
}
return 0;
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.