text
stringlengths
4
6.14k
#include<stdio.h> // automatic type conversions in function calls main() { extern int i;// What does extern do? Does it have an effect on the output? double x=3.00; long j=34L; f(j,x); } f(float f,short p) { printf("%f ",f); printf("%d",p); }
#pragma once #include <stdint.h> #pragma warning (push, 0) #define DBGHELP_TRANSLATE_TCHAR #define NOMINMAX #include <windows.h> #include <atlbase.h> #include <mmsystem.h> #include <tlhelp32.h> #include <psapi.h> #include <dbghelp.h> #include <QtCore> #include <QtConcurrent> #include <QtWidgets> #include <QtGui> #import "libid:80cc9f66-e7d8-4ddd-85b6-d9e6cd0e93e2" version("8.0") lcid("0") raw_interfaces_only named_guids #pragma warning (pop)
/* * indextree.h * * Created on: 2012-11-26 * Author: kevin */ #ifndef INDEXTREE_HPP__ #define INDEXTREE_HPP__ #include <set> #include "container/vector.hpp" #include "container/string.hpp" namespace zl { class IndexTreeNode; struct IndexTreeNodeCompare { bool operator()(IndexTreeNode* first, IndexTreeNode* sencond) const; }; class IndexTreeNode { public: char m_value; std::set<IndexTreeNode*, IndexTreeNodeCompare> m_next; bool m_isEnd; int count; int id; public: IndexTreeNode() { m_value = ' '; m_isEnd = false; m_next.clear(); } ~IndexTreeNode() { } bool compare(IndexTreeNode* second) { return this->m_value > second->m_value; } }; class IndexTree { private: IndexTreeNode* m_root; protected: IndexTreeNode* CreateNode(char value); void DestoryNode(IndexTreeNode* node); void DestoryTree(); public: IndexTree() { m_root = CreateNode(' '); } ~IndexTree() { DestoryTree(); } int init(CSimpleVector<basic_string>& stringlist); int add(const char* Data, int len, int id); bool remove(const char* Data, int len); IndexTreeNode* find(const char* FoundData); void release(); }; } #endif // INDEXTREE_H__
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_struct_lib.h :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: mmartin <mmartin@student.42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2014/03/25 21:34:09 by mmartin #+# #+# */ /* Updated: 2014/03/25 21:35:17 by mmartin ### ########.fr */ /* */ /* ************************************************************************** */ #ifndef FT_STRUCT_LIB_H # define FT_STRUCT_LIB_H typedef struct s_list { void *content; size_t content_size; struct s_list *next; } t_list; typedef struct s_btree { struct s_btree *left; struct s_btree *right; char *item; } t_btree; typedef struct s_atof { double ip; double fp; int div; int sign; int flag; } t_atof; typedef struct s_info { char *start; char *buf; int fd; int offset; struct s_info *next; } t_info; #endif
#include <stdint.h> #include "tool.h" #include "file.h" #pragma pack(1) struct fat12_bs { uint8_t bootjmp[3]; uint8_t oem_name[8]; uint16_t byt_per_sector; uint8_t sect_per_clust; uint16_t reserved_sectors; uint8_t fat_amnt; uint16_t dir_entry_count; uint16_t total_sectors; uint8_t media_type; uint16_t sector_per_fat; uint16_t sector_per_track; uint16_t head_side_amnt; uint32_t hidden_sectors; uint32_t large_total_sectors; /* FAT 12 EBPB */ uint8_t drive_num; uint8_t reserved; uint8_t signature; uint8_t volume_serial[4]; uint8_t volume_label[11]; uint8_t system_id_string[8]; /* BOOT CODE FOLLOWED BY BOOT SIG */ }; int initialize_fat(char type) { struct fat12_bs block; /* I suck with names */ /* BPB */ block.bootjmp[0] = 0xeb; block.bootjmp[1] = 0x3c; block.bootjmp[2] = 0x90; fill(block.oem_name, "MSWIN4.1", 8); block.byt_per_sector = 512; block.sect_per_clust = 1; block.reserved_sectors = 1; /* TODO: MAKE 2 FAT vs 1 FAT OPTIONAL! */ block.fat_amnt = 2; /* TODO: DROP HDD SUPPORT, VHD IS BETTER FOR THAT? Not if someone wants fat12 disk * IN ADDITION TO THIS THERE IS ALSO THE MATTER OF 5.25 DISKS AND OTHER ASSORTMENTS */ block.dir_entry_count = 224; //Unsure if this is correct! switch (type) { case 0: break; case 1: /* 1.44 mb diskette. 1 474 560 byte -> 2880 sectors */ block.total_sectors = 2880; //2 byte block.media_type = 0xf0; block.sector_per_fat = 9; /* DOS 3.31 BPB */ //this being selectable might be a plus block.sector_per_track = 18; block.head_side_amnt = 2; //double density block.hidden_sectors = 0; block.large_total_sectors = 0; //only use if total sector count is 0 /* EBPB */ block.drive_num = 0; //first removable media. block.reserved = 0; block.signature = 0x29; // THIS SHOULD BE OPTIONAL. // 0x28 is pre ms-dos 4.0 lacking the two following sources, isntead having a DPT (int 1Eh). fill(block.volume_serial, "AABB", 4); //TODO: Make this generate a better number. fill(block.volume_label, "VIVI ", 11); fill(block.system_id_string, "FAT12 ", 8); break; case 2: break; } /* ========== SIXTY-ONE BYTES (61 b) ========= */ /* Boot code, this is NOT a system disk! */ write_image_header(&block); return 0; }
/********************************************************************************************* * Name : projectLoader.h * Description : Loads the project file to memory ********************************************************************************************/ #pragma once #ifndef _VSMAKE_PROJECT_LOADER_H_ #define _VSMAKE_PROJECT_LOADER_H_ #include "vsmake_cfg.h" #include "vsmake_constants.h" class Project_PrivateData; // Evitamos incluir cabeceras de libxml2 namespace tinyxml2 { class XMLElement; } /** * \see //https://docs.microsoft.com/en-us/cpp/build/reference/vcxproj-file-structure?view=msvc-160 */ class VSMAKE_LOCAL ProjectLoader { private: static std::string getConfNameFromConfition (const char * condition); static void loadProjectProperties (Project_PrivateData & project, tinyxml2::XMLElement * root); static void loadProjectConfigurations (Project_PrivateData & project, tinyxml2::XMLElement * root); static void loadConfigurationsProperties (Project_PrivateData & project, tinyxml2::XMLElement * root); static void loadSourceFiles (Project_PrivateData & project, tinyxml2::XMLElement * root); public: static VsMakeErrorCode loadProject (Project_PrivateData & project); }; #endif //_VSMAKE_PROJECT_LOADER_H_
/* * alt_sys_init.c - HAL initialization source * * Machine generated for CPU 'cpu' in SOPC Builder design 'dtb_system' * SOPC Builder design path: ../../dtb/dtb_system.sopcinfo * * Generated: Tue Jan 20 08:11:51 CET 2015 */ /* * DO NOT MODIFY THIS FILE * * Changing this file will have subtle consequences * which will almost certainly lead to a nonfunctioning * system. If you do modify this file, be aware that your * changes will be overwritten and lost when this file * is generated again. * * DO NOT MODIFY THIS FILE */ /* * License Agreement * * Copyright (c) 2008 * Altera Corporation, San Jose, California, USA. * All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. * * This agreement shall be governed in all respects by the laws of the State * of California and by the laws of the United States of America. */ #include "system.h" #include "sys/alt_irq.h" #include "sys/alt_sys_init.h" #include <stddef.h> /* * Device headers */ #include "altera_nios2_qsys_irq.h" #include "altera_avalon_epcs_flash_controller.h" #include "altera_avalon_jtag_uart.h" #include "altera_avalon_performance_counter.h" #include "altera_avalon_sgdma.h" #include "altera_avalon_sysid_qsys.h" #include "altera_avalon_timer.h" #include "altera_eth_tse.h" /* * Allocate the device storage */ ALTERA_NIOS2_QSYS_IRQ_INSTANCE ( CPU, cpu); ALTERA_AVALON_EPCS_FLASH_CONTROLLER_INSTANCE ( EPCS_CONTROLLER, epcs_controller); ALTERA_AVALON_JTAG_UART_INSTANCE ( JTAG_UART, jtag_uart); ALTERA_AVALON_PERFORMANCE_COUNTER_INSTANCE ( PERFORMANCE_COUNTER, performance_counter); ALTERA_AVALON_SGDMA_INSTANCE ( SGDMA_RX, sgdma_rx); ALTERA_AVALON_SGDMA_INSTANCE ( SGDMA_TX, sgdma_tx); ALTERA_AVALON_SGDMA_INSTANCE ( USB_TX_DMA, usb_tx_dma); ALTERA_AVALON_SYSID_QSYS_INSTANCE ( SYSID, sysid); ALTERA_AVALON_TIMER_INSTANCE ( SYS_TIMER, sys_timer); ALTERA_ETH_TSE_INSTANCE ( TSE_MAC, tse_mac); /* * Initialize the interrupt controller devices * and then enable interrupts in the CPU. * Called before alt_sys_init(). * The "base" parameter is ignored and only * present for backwards-compatibility. */ void alt_irq_init ( const void* base ) { ALTERA_NIOS2_QSYS_IRQ_INIT ( CPU, cpu); alt_irq_cpu_enable_interrupts(); } /* * Initialize the non-interrupt controller devices. * Called after alt_irq_init(). */ void alt_sys_init( void ) { ALTERA_AVALON_TIMER_INIT ( SYS_TIMER, sys_timer); ALTERA_AVALON_EPCS_FLASH_CONTROLLER_INIT ( EPCS_CONTROLLER, epcs_controller); ALTERA_AVALON_JTAG_UART_INIT ( JTAG_UART, jtag_uart); ALTERA_AVALON_PERFORMANCE_COUNTER_INIT ( PERFORMANCE_COUNTER, performance_counter); ALTERA_AVALON_SGDMA_INIT ( SGDMA_RX, sgdma_rx); ALTERA_AVALON_SGDMA_INIT ( SGDMA_TX, sgdma_tx); ALTERA_AVALON_SGDMA_INIT ( USB_TX_DMA, usb_tx_dma); ALTERA_AVALON_SYSID_QSYS_INIT ( SYSID, sysid); ALTERA_ETH_TSE_INIT ( TSE_MAC, tse_mac); }
// CodeLocation.h // Declares the CodeLocation class representing a container for a share-able Allocation's code location #ifndef CODELOCATION_H #define CODELOCATION_H #include <memory> #include <QString> /** Represents a single code location in the memoryspace of the examined process, together with any available debugging information. Generally returned from a CodeLocationFactory which maintains a map of address -> CodeLocation instances, so that multiple queries for the same address return the same code location. */ class CodeLocation { public: CodeLocation(quint64 a_Address); void setAddress(quint64 a_Address) { m_Address = a_Address; } void setFunctionName(const QString & a_FunctionName) { m_FunctionName = a_FunctionName; } void setFileName(const QString & a_FileName) { m_FileName = a_FileName; } void setFileLineNum(quint32 a_FileLineNum) { m_FileLineNum = a_FileLineNum; } void setHasTriedParsing() { m_HasTriedParsing = true; } quint64 getAddress() const { return m_Address; } const QString & getFunctionName() const { return m_FunctionName; } const QString & getFileName() const { return m_FileName; } quint32 getFileLineNum() const { return m_FileLineNum; } bool hasTriedParsing() const { return m_HasTriedParsing; } protected: /** The raw address in the memoryspace. */ quint64 m_Address; /** The name of the function. Empty if not available, may also be "???" if valgrind fails to identify the location. */ QString m_FunctionName; /** Source code file. Empty if not available. */ QString m_FileName; /** Source code line number. 0 if not available. */ quint32 m_FileLineNum; /** True if the code location details have been parsed from the Massif log. False for newly created CodeLocation instance. Used by the parser to skip parsing of known locations. */ bool m_HasTriedParsing; }; typedef std::shared_ptr<CodeLocation> CodeLocationPtr; #endif // CODELOCATION_H
#include "tap.h" #include "test.h" #include "bson.h" #include <string.h> void test_bson_cursor_new (void) { bson *b; bson_cursor *c; ok (bson_cursor_new (NULL) == NULL, "bson_cursor_new(NULL) should fail"); b = bson_new (); ok (bson_cursor_new (b) == NULL, "bson_cursor_new() should fail with an unfinished BSON object"); bson_free (b); b = test_bson_generate_full (); ok ((c = bson_cursor_new (b)) != NULL, "bson_cursor_new() works"); bson_cursor_free (c); bson_free (b); } RUN_TEST (3, bson_cursor_new);
// Copyright (c) PLUMgrid, Inc. // Licensed under the Apache License, Version 2.0 (the "License") #include <bcc/proto.h> // physical endpoint manager (pem) tables which connects VMs and bridges // <ifindex_in, ifindex_out> BPF_TABLE("hash", u32, u32, pem_dest, 256); // <0, tx_pkts> BPF_TABLE("array", u32, u32, pem_stats, 1); int pem(struct __sk_buff *skb) { u32 ifindex_in, *ifindex_p; ifindex_in = skb->ingress_ifindex; ifindex_p = pem_dest.lookup(&ifindex_in); if (ifindex_p) { #if 1 /* accumulate stats */ u32 index = 0; u32 *value = pem_stats.lookup(&index); if (value) lock_xadd(value, 1); #endif bpf_clone_redirect(skb, *ifindex_p, 0); } return 1; }
#ifndef _ELNET_UTIL_H #define _ELNET_UTIL_H #ifdef __cplusplus extern "C" { #endif void standardise_data(double **x, double *y, int N, int p, double *xm, double *xs, double *ym, double *ys); double **new_matrix(int n, int m); double **copy_matrix(double **x, int n, int m); void release_matrix(double **x); double *new_vector(int n); double *copy_vector(double *x, int n); void release_vector(double *x); #ifdef __cplusplus } #endif #endif
/****************************************************************************** * $Id: parsexsd.h 57b6aec245c1a56e51fed67ce205928d67cb0038 2015-11-26 14:14:41Z Even Rouault $ * * Project: GML Reader * Purpose: Implementation of GMLParseXSD() * Author: Frank Warmerdam, warmerdam@pobox.com * ****************************************************************************** * Copyright (c) 2005, Frank Warmerdam * Copyright (c) 2010, Even Rouault <even dot rouault at mines-paris dot org> * * 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 PARSEXSD_H_INCLUDED #define PARSEXSD_H_INCLUDED #include <vector> #include "gmlreader.h" bool GMLParseXSD( const char *pszFile, std::vector<GMLFeatureClass*> & aosClasses, bool& bFullyUnderstood ); #endif // PARSEXSD_H_INCLUDED
// // ParkifyFrontPageViewControllerViewController.h // Parkify2 // // Created by Me on 7/8/12. // Copyright (c) 2012 __MyCompanyName__. All rights reserved. // #import <UIKit/UIKit.h> @interface ParkifySignInPageViewController : UIViewController <UITextFieldDelegate> @property (weak, nonatomic) IBOutlet UITextField *emailField; @property (weak, nonatomic) IBOutlet UITextField *passwordField; - (IBAction)loginButtonPressed:(UIButton *)sender; @property (weak, nonatomic) IBOutlet UILabel *emailLabel; @property (weak, nonatomic) IBOutlet UILabel *passwordLabel; @property (weak, nonatomic) IBOutlet UIButton *signUpButton; @property (weak, nonatomic) IBOutlet UILabel *signUpLabel; @property (weak, nonatomic) IBOutlet UILabel *errorLabel; - (IBAction)signUpButtonPressed:(UIButton *)sender; - (IBAction)cancelButtonPressed:(UIBarButtonItem *)sender; - (IBAction)resetPasswordTapped:(id)sender; @property (weak, nonatomic) IBOutlet UIButton *LoginButton; @property (weak, nonatomic) IBOutlet UILabel *loginLabel; @property (weak, nonatomic) IBOutlet UILabel *greetingLabel; - (IBAction)logoutButtonPressed:(UIButton *)sender; @property (weak, nonatomic) IBOutlet UIButton *forgotPasswordButton; - (IBAction)forgotPasswordButtonTapped:(id)sender; @property (weak, nonatomic) IBOutlet UILabel *forgotPasswordLabel; - (IBAction)callParkify:(UIButton *)sender; @end
/* Copyright 2014-2017 Rsyn * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ namespace Rsyn { class SandboxNet : public Proxy<SandboxNetData> { RSYN_FRIEND_OF_GENERIC_LIST_COLLECTION; friend class Sandbox; friend class SandboxPin; friend class SandboxArc; private: SandboxNet(SandboxNetData * data) : Proxy(data) {} public: SandboxNet() {} SandboxNet(std::nullptr_t) {} Sandbox getSandbox(); const Sandbox getSandbox() const; Design getDesign(); const Design getDesign() const; Net getRelated() const; const std::string &getName() const; int getNumPins() const; int getNumSinks() const; int getNumDrivers() const; SandboxPin getDriver() const; TopologicalIndex getTopologicalIndex() const; bool hasMultipleDrivers() const; bool hasSingleDriver() const; bool hasDriver() const; bool hasSink() const; // Indicates whether or not this net is a virtual one (i.e. connects a // virtual port to its attached pin). bool isVirtual() const; Range<CollectionOfSandboxPins> allPins() const; Range<CollectionOfSandboxPinsFilteredByDirection> allPins(const Direction direction) const; Range<CollectionOfSandboxArcs> allArcs() const; }; // end class } // end namespace
/* * Copyright (c) 2016, Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * 3. Neither the name of the Intel Corporation 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 INTEL CORPORATION 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. */ #include "rar.h" #if (HAS_RAR) int rar_set_mode(const rar_state_t mode) { QM_CHECK(mode <= RAR_RETENTION, -EINVAL); volatile uint32_t i = 32; volatile uint32_t reg; switch (mode) { case RAR_RETENTION: QM_SCSS_PMU->aon_vr |= (QM_AON_VR_PASS_CODE | QM_AON_VR_ROK_BUF_VREG_MASK); QM_SCSS_PMU->aon_vr |= (QM_AON_VR_PASS_CODE | QM_AON_VR_VREG_SEL); break; case RAR_NORMAL: reg = QM_SCSS_PMU->aon_vr & ~QM_AON_VR_VREG_SEL; QM_SCSS_PMU->aon_vr = QM_AON_VR_PASS_CODE | reg; /* Wait for >= 2usec, at most 64 clock cycles. */ while (i--) { __asm__ __volatile__("nop"); } reg = QM_SCSS_PMU->aon_vr & ~QM_AON_VR_ROK_BUF_VREG_MASK; QM_SCSS_PMU->aon_vr = QM_AON_VR_PASS_CODE | reg; break; } return 0; } #endif
//////////////////////////////////////////////////////////////////////////// // Module : alife_spawn_registry_header.h // Created : 15.01.2003 // Modified : 12.05.2004 // Author : Dmitriy Iassenev // Description : ALife spawn registry header //////////////////////////////////////////////////////////////////////////// #pragma once #include "../xrEngine/xrLevel.h" class CALifeSpawnHeader { protected: u32 m_version; xrGUID m_guid; xrGUID m_graph_guid; u32 m_count; u32 m_level_count; public: virtual ~CALifeSpawnHeader(); virtual void load(IReader& file_stream); IC u32 version() const; IC const xrGUID& guid() const; IC const xrGUID& graph_guid() const; IC u32 count() const; IC u32 level_count() const; }; #include "alife_spawn_registry_header_inline.h"
#pragma once #include "Socket.h" #include "TaskThread.h" #include "xTime.h" #include "xEntry.h" enum NPState { NP_CREATE = 0, NP_VERIFIED, NP_ESTABLISH, NP_DISCONNECT, NP_CLOSE, }; class TaskThread; class NetProcessor : public xEntry { friend class LogGate; public: NetProcessor(const char *n); virtual ~NetProcessor(); /****************************************************************/ /* TCP */ /****************************************************************/ public: void addClientEpoll(int fd) { clientSock.addEpoll(fd); } void addClientEpoll() { clientSock.addEpoll(); } void delClientEpoll() { clientSock.delEpoll(); } void addServerEpoll(std::string tag, int fd) { auto it = tag_sockid_list.find(tag); if(it != tag_sockid_list.end()) { addServerEpoll(it->second, fd); } } void addServerEpoll(int sockid, int fd) { auto it = server_sockets.find(sockid); if(it != server_sockets.end()) { it->second->addEpoll(fd); } } void addServerEpoll(std::string tag) { auto it = tag_sockid_list.find(tag); if(it != tag_sockid_list.end()) { addServerEpoll(it->second); } } void addServerEpoll(int sockid) { auto it = server_sockets.find(sockid); if(it != server_sockets.end()) { it->second->addEpoll(); } } void delServerEpoll(std::string tag) { auto it = tag_sockid_list.find(tag); if(it != tag_sockid_list.end()) { delServerEpoll(it->second); } } void delServerEpoll(int sockid) { auto it = server_sockets.find(sockid); if(it != server_sockets.end()) { it->second->delEpoll(); } } void delAllServerEpoll() { for(auto it = server_sockets.begin(); it != server_sockets.end(); it++) { it->second->delEpoll(); } } public: bool isValid() { return clientSock.valid(); } bool connect(std::string tag); bool accept(int sockfd, const sockaddr* addr, DWORD addr_len) { return clientSock.accept(sockfd, addr, addr_len); } void disconnect(); //发送消息 bool sendCmdToClient(const void *cmd, unsigned int len); bool sendCmdToServer(const void *cmd, unsigned int len); int realSendClientCmd() { return clientSock.sendCmd(); } int realSendServerCmd(int sockid) { auto it = server_sockets.find(sockid); if(it != server_sockets.end()) { return it->second->sendCmd(); } return -1; } //接收消息 bool readCmdFromClientSocket() { return clientSock.readToBuf(); } bool readCmdFromServerSocket(int sockid) { auto it = server_sockets.find(sockid); if(it != server_sockets.end()) { return it->second->readToBuf(); } return false; } bool getCmdFromClientSocketBuf(unsigned char *&cmd, unsigned int &len) { return clientSock.getCmd(cmd, len); } bool getCmdFromServerSocketBuf(int sockid, unsigned char *&cmd, unsigned int &len) { auto it = server_sockets.find(sockid); if(it != server_sockets.end()) { return it->second->getCmd(cmd, len); } return false; } bool popCmdFromClientSocketBuf() { return clientSock.popCmd(); } bool popCmdFromServerSocketBuf(int sockid) { auto it = server_sockets.find(sockid); if(it != server_sockets.end()) { return it->second->popCmd(); } return false; } const Socket& getClientSocket() const { return clientSock; } const NetAddr& getClientAddr() const { return clientSock.getAddr(); } Socket* getCurServerSock() { return cur_server_sock; } Socket* getServerSocket(std::string tag) { auto it = tag_sockid_list.find(tag); if(it != tag_sockid_list.end()) { return getServerSocket(it->second); } return NULL; } Socket* getServerSocket(int sockid) { auto it = server_sockets.find(sockid); if(it != server_sockets.end()) { return it->second; } return NULL; } protected: Socket clientSock; std::map<int, Socket*> server_sockets; std::map<std::string, int> tag_sockid_list; Socket* cur_server_sock; public: NPState np_state() { return np_state_; } void set_np_state(NPState np_state) { np_state_ = np_state; } private: NPState np_state_; public: TaskThread *thread; };
#pragma once #include <Cutelyst/Controller> namespace crrc { class Departments : public Cutelyst::Controller { Q_OBJECT public: explicit Departments( QObject* parent = nullptr ) : Controller( parent ) {} ~Departments() = default; C_ATTR( index, :Path( "/departments" ) : Args( 0 ) ) void index( Cutelyst::Context* c ); C_ATTR( base, :Chained( "/" ) : PathPart( "departments" ) : CaptureArgs( 0 ) ) void base( Cutelyst::Context* ) const; C_ATTR( object, :Chained( "base" ) : PathPart( "id" ) : CaptureArgs( 1 ) ) void object( Cutelyst::Context* c, const QString& id ) const; C_ATTR( data, :Chained( "object" ) : PathPart( "data" ) : Args( 0 ) ) void data( Cutelyst::Context* c ) const; }; }
// // Consumer.h // PaynetEasyTransfer // // Created by Sergey Anisiforov on 23/03/17. // Copyright © 2017 payneteasy. All rights reserved. // #import "ConsumerProtocol.h" @interface Consumer : NSObject <ConsumerProtocol> @property (nonatomic, strong) NSString *deviceNumber; @end
/* * Конфигурация сервера по умолчанию. * * Copyright (C) 1992-1995 Cronyx Ltd. * Автор: Сергей Вакуленко, vak@cronyx.ru * Wed Feb 8 18:29:31 MSK 1995 */ #define VERSION "E-mail to News Gate, Version 1.0" #define COPYRIGHT "Copyright (C) 1995 Cronyx Ltd." extern char *MAILDIR, *NEWSSPOOLDIR, *LOGFILE, *CONFIGFILE, *LISTS, *APPROVED; extern int DAEMONDELAY; #ifdef INITCONFIG char *CONFIGFILE = "/etc/gateserv.conf"; char *MAILDIR = "/var/mail"; char *APPROVED = "nobody@nowhere.net"; char *LISTS = ""; char *LOGFILE = "/var/log/gatelog"; char *NEWSSPOOLDIR = "/var/spool/news"; int DAEMONDELAY = 30; /* seconds */ struct { char *name; int *value; } inttable [] = { { "daemondelay", &DAEMONDELAY }, { 0, 0 }, }; struct { char *name; char **value; } strtable [] = { { "log", &LOGFILE }, { "maildir", &MAILDIR }, { "newsspooldir", &NEWSSPOOLDIR }, { "lists", &LISTS }, { "approved", &APPROVED }, { 0, 0 }, }; #endif /* INITCONFIG */
/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include <aws/opensearch/OpenSearchService_EXPORTS.h> #include <aws/opensearch/OpenSearchServiceRequest.h> #include <aws/core/utils/memory/stl/AWSString.h> #include <utility> namespace Aws { namespace Http { class URI; } //namespace Http namespace OpenSearchService { namespace Model { /** * <p> Container for the request parameters to <code> <a>GetCompatibleVersions</a> * </code> operation. </p><p><h3>See Also:</h3> <a * href="http://docs.aws.amazon.com/goto/WebAPI/opensearch-2021-01-01/GetCompatibleVersionsRequest">AWS * API Reference</a></p> */ class AWS_OPENSEARCHSERVICE_API GetCompatibleVersionsRequest : public OpenSearchServiceRequest { public: GetCompatibleVersionsRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "GetCompatibleVersions"; } Aws::String SerializePayload() const override; void AddQueryStringParameters(Aws::Http::URI& uri) const override; inline const Aws::String& GetDomainName() const{ return m_domainName; } inline bool DomainNameHasBeenSet() const { return m_domainNameHasBeenSet; } inline void SetDomainName(const Aws::String& value) { m_domainNameHasBeenSet = true; m_domainName = value; } inline void SetDomainName(Aws::String&& value) { m_domainNameHasBeenSet = true; m_domainName = std::move(value); } inline void SetDomainName(const char* value) { m_domainNameHasBeenSet = true; m_domainName.assign(value); } inline GetCompatibleVersionsRequest& WithDomainName(const Aws::String& value) { SetDomainName(value); return *this;} inline GetCompatibleVersionsRequest& WithDomainName(Aws::String&& value) { SetDomainName(std::move(value)); return *this;} inline GetCompatibleVersionsRequest& WithDomainName(const char* value) { SetDomainName(value); return *this;} private: Aws::String m_domainName; bool m_domainNameHasBeenSet; }; } // namespace Model } // namespace OpenSearchService } // namespace Aws
/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include <aws/route53-recovery-control-config/Route53RecoveryControlConfig_EXPORTS.h> namespace Aws { template<typename RESULT_TYPE> class AmazonWebServiceResult; namespace Utils { namespace Json { class JsonValue; } // namespace Json } // namespace Utils namespace Route53RecoveryControlConfig { namespace Model { class AWS_ROUTE53RECOVERYCONTROLCONFIG_API UntagResourceResult { public: UntagResourceResult(); UntagResourceResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result); UntagResourceResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result); }; } // namespace Model } // namespace Route53RecoveryControlConfig } // namespace Aws
// // AppDelegate.h // 画矩形 // // Created by wangju on 15/12/15. // Copyright © 2015年 wangju. All rights reserved. // #import <UIKit/UIKit.h> @interface AppDelegate : UIResponder <UIApplicationDelegate> @property (strong, nonatomic) UIWindow *window; @end
// // MessageVerify.h // MyChat // // Created by Mac on 15/9/2. // Copyright © 2015年 Zeng. All rights reserved. // #import <Foundation/Foundation.h> @interface MessageVerify : NSObject /** * @brief 获得唯一实例 * * @return 返回唯一实例 */ + (instancetype)shareInstance; /** * @brief 验证手机号 * * @param tel 需验证的手机号 * * @return 成YES 失败NO */ - (BOOL)verifyTel:(NSString *)tel; /** * @brief 验证密码 * * @param tel 需验证的密码 * * @return 成YES 失败NO */ - (BOOL)verifyPwd:(NSString *)pwd; @end
/* Copyright 2013 KLab Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ struct SUserStruct { // Here add your custom information needed in the decrypter };
/* * 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/sagemaker/SageMaker_EXPORTS.h> #include <aws/sagemaker/model/S3DataSource.h> #include <aws/sagemaker/model/FileSystemDataSource.h> #include <utility> namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace SageMaker { namespace Model { /** * <p>Describes the location of the channel data.</p><p><h3>See Also:</h3> <a * href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DataSource">AWS * API Reference</a></p> */ class AWS_SAGEMAKER_API DataSource { public: DataSource(); DataSource(Aws::Utils::Json::JsonView jsonValue); DataSource& operator=(Aws::Utils::Json::JsonView jsonValue); Aws::Utils::Json::JsonValue Jsonize() const; /** * <p>The S3 location of the data source that is associated with a channel.</p> */ inline const S3DataSource& GetS3DataSource() const{ return m_s3DataSource; } /** * <p>The S3 location of the data source that is associated with a channel.</p> */ inline bool S3DataSourceHasBeenSet() const { return m_s3DataSourceHasBeenSet; } /** * <p>The S3 location of the data source that is associated with a channel.</p> */ inline void SetS3DataSource(const S3DataSource& value) { m_s3DataSourceHasBeenSet = true; m_s3DataSource = value; } /** * <p>The S3 location of the data source that is associated with a channel.</p> */ inline void SetS3DataSource(S3DataSource&& value) { m_s3DataSourceHasBeenSet = true; m_s3DataSource = std::move(value); } /** * <p>The S3 location of the data source that is associated with a channel.</p> */ inline DataSource& WithS3DataSource(const S3DataSource& value) { SetS3DataSource(value); return *this;} /** * <p>The S3 location of the data source that is associated with a channel.</p> */ inline DataSource& WithS3DataSource(S3DataSource&& value) { SetS3DataSource(std::move(value)); return *this;} /** * <p>The file system that is associated with a channel.</p> */ inline const FileSystemDataSource& GetFileSystemDataSource() const{ return m_fileSystemDataSource; } /** * <p>The file system that is associated with a channel.</p> */ inline bool FileSystemDataSourceHasBeenSet() const { return m_fileSystemDataSourceHasBeenSet; } /** * <p>The file system that is associated with a channel.</p> */ inline void SetFileSystemDataSource(const FileSystemDataSource& value) { m_fileSystemDataSourceHasBeenSet = true; m_fileSystemDataSource = value; } /** * <p>The file system that is associated with a channel.</p> */ inline void SetFileSystemDataSource(FileSystemDataSource&& value) { m_fileSystemDataSourceHasBeenSet = true; m_fileSystemDataSource = std::move(value); } /** * <p>The file system that is associated with a channel.</p> */ inline DataSource& WithFileSystemDataSource(const FileSystemDataSource& value) { SetFileSystemDataSource(value); return *this;} /** * <p>The file system that is associated with a channel.</p> */ inline DataSource& WithFileSystemDataSource(FileSystemDataSource&& value) { SetFileSystemDataSource(std::move(value)); return *this;} private: S3DataSource m_s3DataSource; bool m_s3DataSourceHasBeenSet; FileSystemDataSource m_fileSystemDataSource; bool m_fileSystemDataSourceHasBeenSet; }; } // namespace Model } // namespace SageMaker } // namespace Aws
#pragma once #include<glm/glm.hpp> #include<glm/gtc/matrix_transform.hpp> #include<GL\glew.h> namespace Engine { class Camera { public: Camera(); ~Camera(); void init(int width, int height); void update(); glm::vec2 convertToWorldCoordonates(glm::vec2 screenCoords); bool checkIfInView(const glm::vec2& position, const glm::vec2& dimension); const glm::mat4& getCameraMatrix() const { return _cameraMatrix; } void offsetPosition(const glm::vec2& offset) { _position += offset; _update = true; } void setPosition(const glm::vec2& offset) { _position = offset; _update = true; } void offsetScale(float offset) { _scale += offset; if (_scale < 0.001f) _scale = 0.001f; _update = true; } private: int _screenWidth, _screenHeight; float _scale; bool _update; glm::vec2 _position; glm::mat4 _cameraMatrix; glm::mat4 _orthoMatrix; }; }
/* * %CopyrightBegin% * * Copyright Ericsson AB 2001-2018. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * %CopyrightEnd% * */ /* FIXME why not use ei_malloc here? */ #include "eidef.h" #include <stdlib.h> #include "ei.h" #include "ei_locking.h" #ifdef __WIN32__ #ifdef USE_DECLSPEC_THREAD /* Define (and initialize) the variable __erl_errno */ volatile __declspec(thread) int __erl_errno = 0; #else static volatile DWORD errno_tls_index = TLS_OUT_OF_INDEXES; static LONG volatile tls_init_mutex = 0; #endif #endif #if defined(VXWORKS) /* Moved to each of the erl_*threads.c files, as they seem to know how to get thread-safety. */ static volatile int __erl_errno; volatile int *__erl_errno_place(void) { /* This check is somewhat insufficient, double task var entries will occur if __erl_errno is actually -1, which on the other hand is an invalid error code. */ if (taskVarGet(taskIdSelf(), &__erl_errno) == ERROR) { taskVarAdd(taskIdSelf(), &__erl_errno); } return &__erl_errno; } #endif /* VXWORKS */ #if defined(__WIN32__) #ifdef USE_DECLSPEC_THREAD volatile int *__erl_errno_place(void) { return &__erl_errno; } #else static void tls_init_once(void) { if (errno_tls_index != TLS_OUT_OF_INDEXES) { return; } if (InterlockedExchange((LPLONG) &tls_init_mutex,1L) == 0) { /* I was first */ errno_tls_index = TlsAlloc(); if (errno_tls_index == TLS_OUT_OF_INDEXES) { fprintf(stderr, "FATAL ERROR: can not allocate TLS index for " "erl_errno (error code = %d)!\n",GetLastError()); exit(1); } } else { while (errno_tls_index == TLS_OUT_OF_INDEXES) { SwitchToThread(); } } } volatile int *__erl_errno_place(void) { volatile int *ptr; tls_init_once(); ptr = TlsGetValue(errno_tls_index); if (ptr == NULL) { ptr = malloc(sizeof(int)); *ptr = 0; TlsSetValue(errno_tls_index, (PVOID) ptr); } return ptr; } #endif /* USE_DECLSPEC_THREAD */ #endif /* __WIN32__ */ #if defined(_REENTRANT) && !defined(VXWORKS) && !defined(__WIN32__) #if defined(HAVE_PTHREAD_H) || defined(HAVE_MIT_PTHREAD_H) void *ei_m_create(void) { pthread_mutex_t *l; if ((l = malloc(sizeof(*l)))) { /* FIXME get memory or abort */ pthread_mutex_init(l,NULL); } return l; } int ei_m_destroy(void *l) { int r = pthread_mutex_destroy(l); free(l); return r; } int ei_m_lock(void *l) { return pthread_mutex_lock(l); } int ei_m_trylock(void *l) { return pthread_mutex_trylock(l); } int ei_m_unlock(void *l) { return pthread_mutex_unlock(l); } /* * Thread-specific erl_errno variable. * * The second line below will give a "missing braces around initializer" * on Solaris but the code will work. */ static pthread_key_t erl_errno_key; static pthread_once_t erl_errno_key_once = PTHREAD_ONCE_INIT; /* * Destroy per-thread erl_errno locus */ static void erl_errno_destroy(void * ptr) { free(ptr); } /* * Allocate erl_errno key. * This will be done once for all threads */ static void erl_errno_key_alloc(void) { pthread_key_create(&erl_errno_key, erl_errno_destroy); } /* * Return a pointer to the erl_errno locus. * If pthread functions fail we fall back to using fallback_errno * so that the main thread (actually not a thread in all ascpects) * still will set and get an erl_errno value. * Actually this is a bit to nice, it would be preferrable to exit fatal * as we do on windows, but we might break some code with one thread * but still compiled with -D_REENTRANT, so we'll leave it here. */ volatile int *__erl_errno_place(void) { int *erl_errno_p; static volatile int use_fallback = 0; static volatile int fallback_errno = 0; if (use_fallback) { return &fallback_errno; } /* This will create the key once for all threads */ if (pthread_once(&erl_errno_key_once, erl_errno_key_alloc) != 0) { use_fallback = 1; return &fallback_errno; } /* This is the normal case, return the pointer to the data */ if ((erl_errno_p = pthread_getspecific(erl_errno_key)) != NULL) { return erl_errno_p; } if ((erl_errno_p = malloc(sizeof(int))) == NULL) { use_fallback = 1; return &fallback_errno; } *erl_errno_p = 0; if (pthread_setspecific(erl_errno_key, erl_errno_p) != 0 || (erl_errno_p = pthread_getspecific(erl_errno_key)) == NULL) { free(erl_errno_p); return &fallback_errno; } return erl_errno_p; } #endif /* HAVE_PTHREAD_H || HAVE_MIT_PTHREAD_H */ #endif /* _REENTRANT && !VXWORKS && !__WIN32__ */ #if !defined(_REENTRANT) && !defined(VXWORKS) && !defined(__WIN32__) volatile int __erl_errno; #endif
/** * Copyright (c) 2015 - 2017, Nordic Semiconductor ASA * * 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, except as embedded into a Nordic * Semiconductor ASA integrated circuit in a product or a software update for * such product, 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 Nordic Semiconductor ASA nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * 4. This software, with or without modification, must only be used with a * Nordic Semiconductor ASA integrated circuit. * * 5. Any software provided in binary form under this license must not be reverse * engineered, decompiled, modified and/or disassembled. * * THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA "AS IS" AND ANY EXPRESS * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA 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. * */ #include "sdk_common.h" #if NRF_MODULE_ENABLED(ANT_BSC) #include "ant_bsc_page_2.h" #define NRF_LOG_MODULE_NAME "ANT_BCS_PAGE_2" #if ANT_BSC_PAGE_2_LOG_ENABLED #define NRF_LOG_LEVEL ANT_BSC_PAGE_2_LOG_LEVEL #define NRF_LOG_INFO_COLOR ANT_BSC_PAGE_2_INFO_COLOR #else // ANT_BSC_PAGE_2_LOG_ENABLED #define NRF_LOG_LEVEL 0 #endif // ANT_BSC_PAGE_2_LOG_ENABLED #include "nrf_log.h" /**@brief BSC page 2 data layout structure. */ typedef struct { uint8_t manuf_id; uint8_t serial_num_LSB; uint8_t serial_num_MSB; uint8_t reserved[4]; }ant_bsc_page2_data_layout_t; /**@brief Function for printing speed or cadence page2 data. */ static void page2_data_log(ant_bsc_page2_data_t const * p_page_data) { NRF_LOG_INFO("Manufacturer ID: %u\r\n", (unsigned int)p_page_data->manuf_id); NRF_LOG_INFO("Serial No (upper 16-bits): 0x%X\r\n", (unsigned int)p_page_data->serial_num); } void ant_bsc_page_2_encode(uint8_t * p_page_buffer, ant_bsc_page2_data_t const * p_page_data) { ant_bsc_page2_data_layout_t * p_outcoming_data = (ant_bsc_page2_data_layout_t *)p_page_buffer; uint32_t serial_num = p_page_data->serial_num; p_outcoming_data->manuf_id = (uint8_t)p_page_data->manuf_id; p_outcoming_data->serial_num_LSB = (uint8_t)(serial_num & UINT8_MAX); p_outcoming_data->serial_num_MSB = (uint8_t)((serial_num >> 8) & UINT8_MAX); page2_data_log( p_page_data); } void ant_bsc_page_2_decode(uint8_t const * p_page_buffer, ant_bsc_page2_data_t * p_page_data) { ant_bsc_page2_data_layout_t const * p_incoming_data = (ant_bsc_page2_data_layout_t *)p_page_buffer; uint32_t serial_num = (uint32_t)((p_incoming_data->serial_num_MSB << 8) + p_incoming_data->serial_num_LSB); p_page_data->manuf_id = (uint32_t)p_incoming_data->manuf_id; p_page_data->serial_num = serial_num; page2_data_log( p_page_data); } #endif // NRF_MODULE_ENABLED(ANT_BSC)
// // NCPersonPickerVC.h // NestContact // // Created by sunny on 13-10-8. // Copyright (c) 2013年 sunny. All rights reserved. // #import <UIKit/UIKit.h> @interface NCPersonPickerVC : UIViewController @end
// // HFPhotoViewController.h // HFHS // // Created by Mark Glagola on 3/5/13. // Copyright (c) 2013 Mark Glagola. All rights reserved. // #import "HFViewController.h" #import "PunchScrollView.h" #import "YIPopupTextView.h" @interface HFPhotoViewController : HFViewController <UIGestureRecognizerDelegate, PunchScrollViewDataSource, PunchScrollViewDelegate> { NSUInteger _selectedIndex; } //should pass in an array of 'Photo' objects not UIImages - (id) initWithPhotos:(NSArray*)photosArray atStartIndex:(NSUInteger)index; @property (nonatomic) PunchScrollView *scrollView; @property (nonatomic, readonly) NSMutableArray *photos; - (NSUInteger) selectedIndex; @end
/* MIT Copyright Notice Copyright 2003 M.I.T. Permission is hereby granted, without written agreement or royalty fee, to use, copy, modify, and distribute this software and its documentation for any purpose, provided that the above copyright notice and the following three paragraphs appear in all copies of this software. IN NO EVENT SHALL M.I.T. BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF M.I.T. HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMANGE. M.I.T. SPECIFICALLY DISCLAIMS ANY WARRANTIES INCLUDING, BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THE SOFTWARE IS PROVIDED ON AN "AS-IS" BASIS AND M.I.T. HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. $Author: tleek $ $Date: 2004/01/05 17:27:49 $ $Header: /mnt/leo2/cvs/sabo/hist-040105/wu-ftpd/f2/my-include.h,v 1.1.1.1 2004/01/05 17:27:49 tleek Exp $ */ /* WU-FTPD Copyright Notice Copyright (c) 1999,2000 WU-FTPD Development Group. All rights reserved. Portions Copyright (c) 1980, 1985, 1988, 1989, 1990, 1991, 1993, 1994 The Regents of the University of California. Portions Copyright (c) 1993, 1994 Washington University in Saint Louis. Portions Copyright (c) 1996, 1998 Berkeley Software Design, Inc. Portions Copyright (c) 1989 Massachusetts Institute of Technology. Portions Copyright (c) 1998 Sendmail, Inc. Portions Copyright (c) 1983, 1995, 1996, 1997 Eric P. Allman. Portions Copyright (c) 1997 by Stan Barber. Portions Copyright (c) 1997 by Kent Landfield. Portions Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996, 1997 Free Software Foundation, Inc. Use and distribution of this software and its source code are governed by the terms and conditions of the WU-FTPD Software License ("LICENSE"). If you did not receive a copy of the license, it may be obtained online at http://www.wu-ftpd.org/license.html. $Author: tleek $ $Date: 2004/01/05 17:27:49 $ $Header: /mnt/leo2/cvs/sabo/hist-040105/wu-ftpd/f2/my-include.h,v 1.1.1.1 2004/01/05 17:27:49 tleek Exp $ */ /* <source> */ extern char *my_realpath(const char *pathname, char *result, char* chroot_path); #define MAXPATHLEN 46 #define HAVE_SYMLINK 1 #define HAVE_GETCWD 1 /* </source> */
#ifndef CONFIG_H_ #define CONFIG_H_ #include <stdbool.h> #include <inttypes.h> enum ConfigFileAttr { ATTR_SERVERS = 1, ATTR_CLIENTS, ATTR_MSG_SIZE, ATTR_NUM_CONCURR_MSGS, }; struct ConfigInfo { int num_servers; int num_clients; char **servers; /* list of servers */ char **clients; /* list of clients */ bool is_server; /* if the current node is server */ int rank; /* the rank of the node */ int msg_size; /* the size of each echo message */ int num_concurr_msgs; /* the number of messages can be sent concurrently */ char *sock_port; /* socket port number */ }__attribute__((aligned(64))); extern struct ConfigInfo config_info; int parse_config_file (char *fname); void destroy_config_info (); void print_config_info (); #endif /* CONFIG_H_*/
#ifndef MULTIPLY_H #define MULTIPLY_H // The function passed to pthread_create // Params: threadID void* multiplyBlock(void*); // The function to parse the number of threads from the // command line // Params: int argc, char** argv int parse_number_threads(int, char**); //Prints the usage of the binary from the terminal void print_usage(); // Tests if the input ineger is a square number // Params: int number to check int check_square(int); // Solves a block in the result matrix // Params: int row lower bound, int column lower bound, // int row upper bound, int column upper bound void solve_block(int, int, int, int); // Multiply the vectors in matracies A and B that corrispond // to elemnt i and j in result matrix C (Cij) // Params: int i, int j int multiply_vector(int, int); // Creates a size x size result matrix C // Params: int size void create_result_matrix(int); #endif
#import <Foundation/Foundation.h> #import "PBObject.h" /** * Location Intelligence APIs * Incorporate our extensive geodata into everyday applications, business processes and workflows. * * OpenAPI spec version: 8.5.0 * * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. * * 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. */ @protocol PBPolygonGeometry @end @interface PBPolygonGeometry : PBObject @property(nonatomic) NSString* type; @property(nonatomic) NSArray<NSArray<NSArray<NSNumber*>*>*>* coordinates; @end
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef nsHyphenator_h__ #define nsHyphenator_h__ #include "nsCOMPtr.h" #include "nsString.h" #include "nsTArray.h" class nsIURI; class nsHyphenator { public: explicit nsHyphenator(nsIURI *aURI); NS_INLINE_DECL_REFCOUNTING(nsHyphenator) bool IsValid(); nsresult Hyphenate(const nsAString& aText, FallibleTArray<bool>& aHyphens); private: ~nsHyphenator(); protected: void *mDict; }; #endif // nsHyphenator_h__
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* vim: set ts=8 sts=2 et sw=2 tw=80: */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef mozilla_dom_DOMImplementation_h #define mozilla_dom_DOMImplementation_h #include "nsIDOMDOMImplementation.h" #include "nsWrapperCache.h" #include "mozilla/Attributes.h" #include "mozilla/ErrorResult.h" #include "nsCOMPtr.h" #include "nsCycleCollectionParticipant.h" #include "nsIDocument.h" #include "nsIScriptGlobalObject.h" #include "nsIURI.h" #include "nsIWeakReferenceUtils.h" #include "nsString.h" class nsIDOMDocument; namespace mozilla { namespace dom { class DocumentType; class DOMImplementation final : public nsIDOMDOMImplementation , public nsWrapperCache { ~DOMImplementation() { } public: DOMImplementation(nsIDocument* aOwner, nsIGlobalObject* aScriptObject, nsIURI* aDocumentURI, nsIURI* aBaseURI) : mOwner(aOwner) , mScriptObject(do_GetWeakReference(aScriptObject)) , mDocumentURI(aDocumentURI) , mBaseURI(aBaseURI) { MOZ_ASSERT(aOwner); } NS_DECL_CYCLE_COLLECTING_ISUPPORTS NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(DOMImplementation) nsIDocument* GetParentObject() const { return mOwner; } virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override; // nsIDOMDOMImplementation NS_DECL_NSIDOMDOMIMPLEMENTATION bool HasFeature(const nsAString& aFeature, const nsAString& aVersion); already_AddRefed<DocumentType> CreateDocumentType(const nsAString& aQualifiedName, const nsAString& aPublicId, const nsAString& aSystemId, ErrorResult& aRv); already_AddRefed<nsIDocument> CreateDocument(const nsAString& aNamespaceURI, const nsAString& aQualifiedName, nsIDOMDocumentType* aDoctype, ErrorResult& aRv); already_AddRefed<nsIDocument> CreateHTMLDocument(const Optional<nsAString>& aTitle, ErrorResult& aRv); private: nsresult CreateDocument(const nsAString& aNamespaceURI, const nsAString& aQualifiedName, nsIDOMDocumentType* aDoctype, nsIDocument** aDocument, nsIDOMDocument** aDOMDocument); nsresult CreateHTMLDocument(const nsAString& aTitle, nsIDocument** aDocument, nsIDOMDocument** aDOMDocument); nsCOMPtr<nsIDocument> mOwner; nsWeakPtr mScriptObject; nsCOMPtr<nsIURI> mDocumentURI; nsCOMPtr<nsIURI> mBaseURI; }; } // namespace dom } // namespace mozilla #endif // mozilla_dom_DOMImplementation_h
/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */ /* plugins/kdb/ldap/libkdb_ldap/kdb_xdr.c */ /* * Copyright 1995 by the Massachusetts Institute of Technology. * All Rights Reserved. * * Export of this software from the United States of America may * require a specific license from the United States Government. * It is the responsibility of any person or organization contemplating * export to obtain such a license before exporting. * * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and * distribute this software and its documentation for any purpose and * without fee is hereby granted, provided that the above copyright * notice appear in all copies and that both that copyright notice and * this permission notice appear in supporting documentation, and that * the name of M.I.T. not be used in advertising or publicity pertaining * to distribution of the software without specific, written prior * permission. Furthermore if you modify this software you must label * your software as modified software and not distribute it in such a * fashion that it might be confused with the original M.I.T. software. * M.I.T. makes no representations about the suitability of * this software for any purpose. It is provided "as is" without express * or implied warranty. */ #include <k5-int.h> #include <string.h> #include <stdio.h> #include <errno.h> #include "kdb_xdr.h" #define safe_realloc(p,n) ((p)?(realloc(p,n)):(malloc(n))) krb5_error_code krb5_dbe_update_tl_data(krb5_context context, krb5_db_entry *entry, krb5_tl_data *new_tl_data) { krb5_tl_data * tl_data; krb5_octet * tmp; /* copy the new data first, so we can fail cleanly if malloc() fails */ if ((tmp = (krb5_octet *) malloc(new_tl_data->tl_data_length)) == NULL) return(ENOMEM); /* Find an existing entry of the specified type and point at it, or NULL if not found */ for (tl_data = entry->tl_data; tl_data; tl_data = tl_data->tl_data_next) if (tl_data->tl_data_type == new_tl_data->tl_data_type) break; /* if necessary, chain a new record in the beginning and point at it */ if (!tl_data) { if ((tl_data = (krb5_tl_data *) calloc(1, sizeof(krb5_tl_data))) == NULL) { free(tmp); return(ENOMEM); } tl_data->tl_data_next = entry->tl_data; entry->tl_data = tl_data; entry->n_tl_data++; } /* fill in the record */ if (tl_data->tl_data_contents) free(tl_data->tl_data_contents); tl_data->tl_data_type = new_tl_data->tl_data_type; tl_data->tl_data_length = new_tl_data->tl_data_length; tl_data->tl_data_contents = tmp; memcpy(tmp, new_tl_data->tl_data_contents, tl_data->tl_data_length); return(0); } krb5_error_code krb5_dbe_lookup_tl_data(krb5_context context, krb5_db_entry *entry, krb5_tl_data *ret_tl_data) { krb5_tl_data *tl_data; for (tl_data = entry->tl_data; tl_data; tl_data = tl_data->tl_data_next) { if (tl_data->tl_data_type == ret_tl_data->tl_data_type) { *ret_tl_data = *tl_data; return(0); } } /* if the requested record isn't found, return zero bytes. if it ever means something to have a zero-length tl_data, this code and its callers will have to be changed */ ret_tl_data->tl_data_length = 0; ret_tl_data->tl_data_contents = NULL; return(0); } krb5_error_code krb5_dbe_update_last_pwd_change(krb5_context context, krb5_db_entry *entry, krb5_timestamp stamp) { krb5_tl_data tl_data; krb5_octet buf[4]; /* this is the encoded size of an int32 */ tl_data.tl_data_type = KRB5_TL_LAST_PWD_CHANGE; tl_data.tl_data_length = sizeof(buf); krb5_kdb_encode_int32((krb5_int32) stamp, buf); tl_data.tl_data_contents = buf; return(krb5_dbe_update_tl_data(context, entry, &tl_data)); } krb5_error_code krb5_dbe_lookup_last_pwd_change(krb5_context context, krb5_db_entry *entry, krb5_timestamp *stamp) { krb5_tl_data tl_data; krb5_error_code code; krb5_int32 tmp; tl_data.tl_data_type = KRB5_TL_LAST_PWD_CHANGE; if ((code = krb5_dbe_lookup_tl_data(context, entry, &tl_data))) return(code); if (tl_data.tl_data_length != 4) { *stamp = 0; return(0); } krb5_kdb_decode_int32(tl_data.tl_data_contents, tmp); *stamp = (krb5_timestamp) tmp; return(0); }
#include<stdio.h> int main(){ printf("hello world!\n"); return 0; }
/* * Copyright 2015 The Foundry Visionmongers Ltd. * * 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 * * Neither the name of The Foundry nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * 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 FILELOADCOMMAND_H #define FILELOADCOMMAND_H #include <lx_plugin.hpp> #include <lxu_command.hpp> #include <lx_command.hpp> #include <lx_io.hpp> #include <lx_seltypes.hpp> #include <lxu_select.hpp> #include "common.h" #define FILE_LOAD_SERVER_NAME "file.browse" #define ARG_FILENAME "filename" #define ARGi_FILENAME 0 /* * Implement the command class. This inherits from CLxBasicCommand, * which is a wrapper class that does a lot of the heavy lifting * when implementing a command. * * CCommandLoadFile is a command for loading a VDB file or a sequence of VDB files. * It contains a sub command for openning a file dialog. * The feature list of a VDB file is also loaded here. */ class CCommandLoadFile : public CLxBasicCommand { public: static void initialize () { CLxGenericPolymorph *srv; srv = new CLxPolymorph <CCommandLoadFile>; srv->AddInterface(new CLxIfc_Command <CCommandLoadFile>); srv->AddInterface(new CLxIfc_Attributes <CCommandLoadFile>); srv->AddInterface(new CLxIfc_AttributesUI <CCommandLoadFile>); srv->AddInterface(new CLxIfc_StaticDesc <CCommandLoadFile>); thisModule.AddServer (FILE_LOAD_SERVER_NAME, srv); } CCommandLoadFile (); int basic_CmdFlags () LXx_OVERRIDE; bool basic_Enable ( CLxUser_Message &msg) LXx_OVERRIDE; void cmd_Interact () LXx_OVERRIDE; void cmd_Execute ( unsigned flags) LXx_OVERRIDE; static LXtTagInfoDesc descInfo[]; }; #endif
/** @file * @brief main fuse_kafka source **/ #include "version.h" #ifdef HAVE_CONFIG_H #include <config.h> #endif #define _GNU_SOURCE #include <stdio.h> #include <string.h> #include <unistd.h> #include <fcntl.h> #include <errno.h> #include <sys/time.h> #include <stdarg.h> #include <stdlib.h> #include "time_queue.c" #include <sys/stat.h> #ifndef MINGW_VER #include <sys/wait.h> #endif #include "dynamic_configuration.c" #include "input.h" /** @brief declare a configuration item, which is a list of string an * and a number of those */ #include "arguments.c" #include "trace.c" #include "output.h" #include "plugin.c" #include "input.h" // global variable used in atexit config conf; void configuration_clean() { free_fields_and_tags(&conf); } int my_input_setup(int argc, char** argv, int limit) { char* input = "overlay"; if(conf.input_n > 0) input = conf.input[0]; input_setup_t f = (input_setup_t) load_plugin_function(INPUT_PLUGIN_PREFIX, input, "input_setup_internal"); if(f != NULL) return f(limit, argv, &conf); return 1; } int fuse_kafka_main(int argc, char *argv[]) { trace_debug("fuse_kafka_main: starting"); int i; int limit = get_limit(argc, argv); atexit(configuration_clean); memset(&conf, 0, sizeof(config)); trace_debug("fuse_kafka_main: calling parse_arguments(%d - %d - 1, %d + %d + 1, %d)", argc, limit, argv, limit, &conf); if(parse_arguments(argc - limit - 1, argv + limit + 1, &conf)) { trace_debug("arguments parsed, input setup"); my_input_setup(argc, argv, limit); trace_debug("input_setup done"); } #ifndef MINGW_VER wait(NULL); #endif trace_debug("fuse_kafka_main: done"); return 0; } char* cmd = NULL; #ifdef TEST #include "test.c" #else int main(int argc, char** argv) { trace_debug("main: calling fuse_kafka_main(%d, %d)", argc, argv); fuse_kafka_main(argc, argv); } #endif
/* * Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ #pragma once #include <aws/ssm/SSM_EXPORTS.h> #include <aws/ssm/SSMRequest.h> #include <aws/core/utils/memory/stl/AWSString.h> #include <aws/ssm/model/ResourceDataSyncS3Destination.h> #include <utility> namespace Aws { namespace SSM { namespace Model { /** */ class AWS_SSM_API CreateResourceDataSyncRequest : public SSMRequest { public: CreateResourceDataSyncRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "CreateResourceDataSync"; } Aws::String SerializePayload() const override; Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** * <p>A name for the configuration.</p> */ inline const Aws::String& GetSyncName() const{ return m_syncName; } /** * <p>A name for the configuration.</p> */ inline void SetSyncName(const Aws::String& value) { m_syncNameHasBeenSet = true; m_syncName = value; } /** * <p>A name for the configuration.</p> */ inline void SetSyncName(Aws::String&& value) { m_syncNameHasBeenSet = true; m_syncName = std::move(value); } /** * <p>A name for the configuration.</p> */ inline void SetSyncName(const char* value) { m_syncNameHasBeenSet = true; m_syncName.assign(value); } /** * <p>A name for the configuration.</p> */ inline CreateResourceDataSyncRequest& WithSyncName(const Aws::String& value) { SetSyncName(value); return *this;} /** * <p>A name for the configuration.</p> */ inline CreateResourceDataSyncRequest& WithSyncName(Aws::String&& value) { SetSyncName(std::move(value)); return *this;} /** * <p>A name for the configuration.</p> */ inline CreateResourceDataSyncRequest& WithSyncName(const char* value) { SetSyncName(value); return *this;} /** * <p>Amazon S3 configuration details for the sync.</p> */ inline const ResourceDataSyncS3Destination& GetS3Destination() const{ return m_s3Destination; } /** * <p>Amazon S3 configuration details for the sync.</p> */ inline void SetS3Destination(const ResourceDataSyncS3Destination& value) { m_s3DestinationHasBeenSet = true; m_s3Destination = value; } /** * <p>Amazon S3 configuration details for the sync.</p> */ inline void SetS3Destination(ResourceDataSyncS3Destination&& value) { m_s3DestinationHasBeenSet = true; m_s3Destination = std::move(value); } /** * <p>Amazon S3 configuration details for the sync.</p> */ inline CreateResourceDataSyncRequest& WithS3Destination(const ResourceDataSyncS3Destination& value) { SetS3Destination(value); return *this;} /** * <p>Amazon S3 configuration details for the sync.</p> */ inline CreateResourceDataSyncRequest& WithS3Destination(ResourceDataSyncS3Destination&& value) { SetS3Destination(std::move(value)); return *this;} private: Aws::String m_syncName; bool m_syncNameHasBeenSet; ResourceDataSyncS3Destination m_s3Destination; bool m_s3DestinationHasBeenSet; }; } // namespace Model } // namespace SSM } // namespace Aws
/** Licensed Materials - Property of IBM (C) Copyright 2015 IBM Corp. 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. */ // // WLResponse.h // Worklight SDK // // Created by Benjamin Weingarten on 3/7/10. // Copyright (C) Worklight Ltd. 2006-2012. All rights reserved. // #import <Foundation/Foundation.h> #import "WLProcedureInvocationResult.h" /** * This class contains the result of a procedure invocation. IBM MobileFirst Platform passes this class as an argument to the * delegate methods of <code>WLClient</code> <code>invokeProcedure</code> methods. */ @interface WLResponse : NSObject { WLProcedureInvocationResult *invocationResult; NSObject *invocationContext; NSString *responseText; NSDictionary *userInfoDict; } /** * Retrieves the HTTP status from the response. */ @property (nonatomic) NSInteger status; /** * error in case of fail response */ @property (nonatomic) NSError* error; /** * Response data from the server. */ @property (nonatomic, strong) WLProcedureInvocationResult *invocationResult; /** * Invocation context object passed when calling <code>invokeProcedure</code>. */ @property (nonatomic, strong) NSObject *invocationContext; /** * Original response text from the server. */ @property (nonatomic, strong) NSString *responseText; /** * Retrieves the headers from the response. */ @property (nonatomic, strong) NSDictionary* headers; /** * Original response data from the server. */ @property (readonly) NSData* responseData; /** * user info */ @property (nonatomic, strong) NSDictionary* userInfoDict; /** * Returns the value <code>NSDictionary</code> in case the response is a JSON response, otherwise it returns the value nil. */ @property (readonly) NSDictionary * responseJSON; /** * Returns the value <code>NSDictionary</code> in case the response is a JSON response, otherwise it returns the value nil. * * @param NSDictionary Root of the JSON object * * @deprecated This method is deprecated. Use the responseJSON property instead. * **/ -(NSDictionary *)getResponseJson; @end
#pragma once #include "il2cpp-config.h" #ifndef _MSC_VER # include <alloca.h> #else # include <malloc.h> #endif #include <stdint.h> #include <assert.h> #include <exception> // UIGrid struct UIGrid_t2503122938; // System.Collections.Generic.List`1<UnityEngine.Transform> struct List_1_t1081512082; // UnityEngine.Transform struct Transform_t284553113; #include "codegen/il2cpp-codegen.h" #include "UnityEngine_UnityEngine_Transform284553113.h" // System.Void UIGrid::.ctor() extern "C" void UIGrid__ctor_m2622496225 (UIGrid_t2503122938 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UIGrid::set_repositionNow(System.Boolean) extern "C" void UIGrid_set_repositionNow_m4256342803 (UIGrid_t2503122938 * __this, bool ___value, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Collections.Generic.List`1<UnityEngine.Transform> UIGrid::GetChildList() extern "C" List_1_t1081512082 * UIGrid_GetChildList_m3159777789 (UIGrid_t2503122938 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Transform UIGrid::GetChild(System.Int32) extern "C" Transform_t284553113 * UIGrid_GetChild_m1294645208 (UIGrid_t2503122938 * __this, int32_t ___index, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Int32 UIGrid::GetIndex(UnityEngine.Transform) extern "C" int32_t UIGrid_GetIndex_m167494768 (UIGrid_t2503122938 * __this, Transform_t284553113 * ___trans, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UIGrid::AddChild(UnityEngine.Transform) extern "C" void UIGrid_AddChild_m3225638271 (UIGrid_t2503122938 * __this, Transform_t284553113 * ___trans, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UIGrid::AddChild(UnityEngine.Transform,System.Boolean) extern "C" void UIGrid_AddChild_m2997186590 (UIGrid_t2503122938 * __this, Transform_t284553113 * ___trans, bool ___sort, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean UIGrid::RemoveChild(UnityEngine.Transform) extern "C" bool UIGrid_RemoveChild_m3942453210 (UIGrid_t2503122938 * __this, Transform_t284553113 * ___t, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UIGrid::Init() extern "C" void UIGrid_Init_m1837248595 (UIGrid_t2503122938 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UIGrid::Start() extern "C" void UIGrid_Start_m1569634017 (UIGrid_t2503122938 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UIGrid::Update() extern "C" void UIGrid_Update_m1419866444 (UIGrid_t2503122938 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Int32 UIGrid::SortByName(UnityEngine.Transform,UnityEngine.Transform) extern "C" int32_t UIGrid_SortByName_m3179856323 (Il2CppObject * __this /* static, unused */, Transform_t284553113 * ___a, Transform_t284553113 * ___b, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Int32 UIGrid::SortHorizontal(UnityEngine.Transform,UnityEngine.Transform) extern "C" int32_t UIGrid_SortHorizontal_m646783841 (Il2CppObject * __this /* static, unused */, Transform_t284553113 * ___a, Transform_t284553113 * ___b, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Int32 UIGrid::SortVertical(UnityEngine.Transform,UnityEngine.Transform) extern "C" int32_t UIGrid_SortVertical_m3217656271 (Il2CppObject * __this /* static, unused */, Transform_t284553113 * ___a, Transform_t284553113 * ___b, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UIGrid::Sort(System.Collections.Generic.List`1<UnityEngine.Transform>) extern "C" void UIGrid_Sort_m3204039610 (UIGrid_t2503122938 * __this, List_1_t1081512082 * ___list, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UIGrid::Reposition() extern "C" void UIGrid_Reposition_m1545122591 (UIGrid_t2503122938 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UIGrid::ConstrainWithinPanel() extern "C" void UIGrid_ConstrainWithinPanel_m383666469 (UIGrid_t2503122938 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UIGrid::ResetPosition(System.Collections.Generic.List`1<UnityEngine.Transform>) extern "C" void UIGrid_ResetPosition_m1124355824 (UIGrid_t2503122938 * __this, List_1_t1081512082 * ___list, const MethodInfo* method) IL2CPP_METHOD_ATTR;
/* GNU Mailutils -- a suite of utilities for electronic mail Copyright (C) 2003, 2007, 2010 Free Software Foundation, Inc. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifdef HAVE_CONFIG_H # include <config.h> #endif #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/types.h> #include <sys/time.h> #include <unistd.h> #include <errno.h> #include <mailutils/sys/pop3.h> #include <mailutils/error.h> int mu_pop3_carrier_is_ready (mu_stream_t carrier, int flag, int timeout) { struct timeval tv, *tvp = NULL; int wflags = flag; int status; if (timeout >= 0) { tv.tv_sec = timeout / 100; tv.tv_usec = (timeout % 1000) * 1000; tvp = &tv; } status = mu_stream_wait (carrier, &wflags, tvp); if (status) return 0; /* FIXME: provide a way to return error code! */ return wflags & flag; } /* Read a complete line from the pop server. Transform CRLF to LF, remove the stuff byte termination octet ".", put a null in the buffer when done. And Do a select() (stream_is_readready()) for the timeout. */ static int mu_pop3_getline (mu_pop3_t pop3) { size_t n = 0; size_t total = pop3->io.ptr - pop3->io.buf; int status = 0; /* Must get a full line before bailing out. */ do { /* Timeout with select(), note that we have to reset select() since on linux tv is modified when error. */ if (pop3->timeout) { int ready = mu_pop3_carrier_is_ready (pop3->carrier, MU_STREAM_READY_RD, pop3->timeout); if (ready == 0) return ETIMEDOUT; } status = mu_stream_sequential_readline (pop3->carrier, pop3->io.buf + total, pop3->io.len - total, &n); if (status != 0) return status; /* The server went away: It maybe a timeout and some pop server does not send the -ERR. Consider this like an error. */ if (n == 0) return EIO; total += n; pop3->io.nl = memchr (pop3->io.buf, '\n', total); if (pop3->io.nl == NULL) /* Do we have a full line. */ { /* Allocate a bigger buffer ? */ if (total >= pop3->io.len - 1) { pop3->io.len *= 2; pop3->io.buf = realloc (pop3->io.buf, pop3->io.len + 1); if (pop3->io.buf == NULL) return ENOMEM; } } pop3->io.ptr = pop3->io.buf + total; } while (pop3->io.nl == NULL); /* Bail only if we have a complete line. */ /* When examining a multi-line response, the client checks to see if the line begins with the termination octet "."(DOT). If yes and if octets other than CRLF follow, the first octet of the line (the termination octet) is stripped away. */ if (total >= 3 && pop3->io.buf[0] == '.') { if (pop3->io.buf[1] != '\r' && pop3->io.buf[2] != '\n') { memmove (pop3->io.buf, pop3->io.buf + 1, total - 1); pop3->io.ptr--; pop3->io.nl--; } /* And if CRLF immediately follows the termination character, then the response from the POP server is ended and the line containing ".CRLF" is not considered part of the multi-line response. */ else if (pop3->io.buf[1] == '\r' && pop3->io.buf[2] == '\n') { pop3->io.buf[0] = '\0'; pop3->io.ptr = pop3->io.buf; pop3->io.nl = NULL; } } /* \r\n --> \n\0, conversion. */ if (pop3->io.nl > pop3->io.buf) { *(pop3->io.nl - 1) = '\n'; *(pop3->io.nl) = '\0'; pop3->io.ptr = pop3->io.nl; } return status; } /* Call pop3_getline() for the dirty work, and consume i.e. put in the user buffer only buflen. If buflen == 0 or buffer == NULL nothing is consume, the data is save for another call to pop3_readline() with a buffer != NULL. */ int mu_pop3_readline (mu_pop3_t pop3, char *buffer, size_t buflen, size_t *pnread) { size_t nread = 0; size_t n = 0; int status = 0; /* Do we need to fill up? Yes if no NL or the buffer is empty. */ if (pop3->carrier && (pop3->io.nl == NULL || pop3->io.ptr == pop3->io.buf)) { status = mu_pop3_getline (pop3); if (status != 0) return status; } /* How much we can copy ? */ n = pop3->io.ptr - pop3->io.buf; /* Consume the line? */ if (buffer && buflen) { buflen--; /* For the null. */ if (buflen) { int nleft = buflen - n; /* We got more then requested. */ if (nleft < 0) { size_t sentinel; nread = buflen; sentinel = pop3->io.ptr - (pop3->io.buf + nread); memcpy (buffer, pop3->io.buf, nread); memmove (pop3->io.buf, pop3->io.buf + nread, sentinel); pop3->io.ptr = pop3->io.buf + sentinel; } else { /* Drain our buffer. */; nread = n; memcpy (buffer, pop3->io.buf, nread); pop3->io.ptr = pop3->io.buf; /* Clear of all residue. */ memset (pop3->io.buf, '\0', pop3->io.len); } } buffer[nread] = '\0'; } else nread = n; if (pnread) *pnread = nread; return status; }
/* * Copyright (c) 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. */ #ifndef _CLOCK_CONFIG_H_ #define _CLOCK_CONFIG_H_ #include "fsl_common.h" /******************************************************************************* * Definitions ******************************************************************************/ #define BOARD_XTAL0_CLK_HZ 12000000U /*!< Board xtal0 frequency in Hz */ #define BOARD_XTAL32K_CLK_HZ 32768U /*!< Board RTC xtal frequency in Hz */ /******************************************************************************* ********************* Configuration BOARD_BootClockHSRUN ********************** ******************************************************************************/ /******************************************************************************* * Definitions for BOARD_BootClockHSRUN configuration ******************************************************************************/ #define BOARD_BOOTCLOCKHSRUN_CORE_CLOCK 120000000U /*!< Core clock frequency: 120000000Hz */ /*! @brief MCG set for BOARD_BootClockHSRUN configuration. */ extern const mcg_config_t mcgConfig_BOARD_BootClockHSRUN; /*! @brief SIM module set for BOARD_BootClockHSRUN configuration. */ extern const sim_clock_config_t simConfig_BOARD_BootClockHSRUN; /*! @brief OSC set for BOARD_BootClockHSRUN configuration. */ extern const osc_config_t oscConfig_BOARD_BootClockHSRUN; /******************************************************************************* * API for BOARD_BootClockHSRUN configuration ******************************************************************************/ #if defined(__cplusplus) extern "C" { #endif /* __cplusplus*/ /*! * @brief This function executes configuration of clocks. * */ void BOARD_BootClockHSRUN(void); #if defined(__cplusplus) } #endif /* __cplusplus*/ /******************************************************************************* ********************* Configuration BOARD_BootClockVLPR *********************** ******************************************************************************/ /******************************************************************************* * Definitions for BOARD_BootClockVLPR configuration ******************************************************************************/ #define BOARD_BOOTCLOCKVLPR_CORE_CLOCK 4000000U /*!< Core clock frequency: 4000000Hz */ /*! @brief MCG set for BOARD_BootClockVLPR configuration. */ extern const mcg_config_t mcgConfig_BOARD_BootClockVLPR; /*! @brief SIM module set for BOARD_BootClockVLPR configuration. */ extern const sim_clock_config_t simConfig_BOARD_BootClockVLPR; /*! @brief OSC set for BOARD_BootClockVLPR configuration. */ extern const osc_config_t oscConfig_BOARD_BootClockVLPR; /******************************************************************************* * API for BOARD_BootClockVLPR configuration ******************************************************************************/ #if defined(__cplusplus) extern "C" { #endif /* __cplusplus*/ /*! * @brief This function executes configuration of clocks. * */ void BOARD_BootClockVLPR(void); #if defined(__cplusplus) } #endif /* __cplusplus*/ #endif /* _CLOCK_CONFIG_H_ */
#ifndef K_ARCHIVE_TAR_TARENTRYHEADER_H #define K_ARCHIVE_TAR_TARENTRYHEADER_H #include "TarHelper.h" class TarHeader_checkSum_Test; namespace K { /** * this header struct describes one entry (file) * within a .tar archive. * it can be used for both, reading and writing .tar files. */ struct TarEntryHeader { private: friend class UnTarStream; friend class TarStream; friend class TarHeader_checkSum_Test; /** the entry's name (e.g. filename) */ char name[100]; char mode[8]; /** the entry's UID (ordinal ascii) */ char uid[8]; /** the entry's GID (ordinal ascii) */ char gid[8]; /** the entry's real size in bytes (ordinal ascii) */ char size[12]; char mtime[12]; char chksum[8]; char typeflag; char linkname[100]; char magic[6]; char version[2]; char uname[32]; char gname[32]; char devmajor[8]; char devminor[8]; char prefix[155]; public: /** get a new, empty header, pre-filled with timestamp, magic-byte, etc.. */ static TarEntryHeader getEmptyHeader() { TarEntryHeader teh; memset(&teh, 0, sizeof(TarEntryHeader)); memcpy(teh.mode, "000664 ", 7); memcpy(teh.uid, "001750 ", 7); memcpy(teh.gid, "001750 ", 7); teh.setSize(0); teh.setTimestamp(0); //memcpy(teh.mtime, "10000000000 ", 12); memcpy(teh.magic, "ustar", 5); memcpy(teh.version, "00", 2); memcpy(teh.uname, "none", 4); memcpy(teh.gname, "none", 4); memcpy(teh.devmajor, "000000 ", 7); memcpy(teh.devminor, "000000 ", 7); return teh; } /** get a new header for a file of the given size */ static TarEntryHeader getFileHeader(const std::string& fileName, unsigned int size) { TarEntryHeader teh = getEmptyHeader(); teh.setSize(size); teh.setFileName(fileName); teh.setType(TAR_TYPE_NORMAL_FILE); return teh; } /** get a new header for a directory */ static TarEntryHeader getDirHeader(const std::string& dirName) { TarEntryHeader teh = getEmptyHeader(); teh.setSize(0); teh.setFileName(dirName); teh.setType(TAR_TYPE_DIRECTORY); return teh; } private: /** hidden ctor. use factory method(s) instead */ TarEntryHeader() { } /** set all bytes to zero */ void zero() { memset(this, 0, sizeof(TarEntryHeader)); } /** calculate the headers's checksum */ unsigned int calcCheckSum() { char tmp[8]; memcpy(tmp, chksum, 8); memcpy(chksum, " ", 8); int sum = 0; for (unsigned int i = 0; i < sizeof(TarEntryHeader); ++i) { sum += ((uint8_t*)this)[i]; } memcpy(chksum, tmp, 8); return sum; } public: /** update the header's checksum depending on its other values */ void updateChecksum() { unsigned int sum = calcCheckSum(); TarHelper::intToOrdAscii(sum, chksum, 7); } /** get the currently stored checksum */ uint32_t getCheckSum() { return (uint32_t) TarHelper::ordAsciiToInt(chksum, 7); } /** get the entry's size in bytes */ uint32_t getSize() const {return (uint32_t) TarHelper::ordAsciiToInt(size,12);} /** set the entry's size in bytes */ void setSize(const unsigned int s) {TarHelper::intToOrdAscii(s, size, 12); size[11] = 0x20;} ///** get the entry's size in bytes as multiples of 512 */ //unsigned int getBlockedSize() const { return TarHelper::roundUp(getSize(), 512); } /** get the entry's filename */ std::string getFileName() const {return std::string(name);} /** set the entry's filename */ void setFileName(const std::string& str) { unsigned int strLen = (unsigned int) str.length(); unsigned int maxLen = (unsigned int) sizeof(name) - 1; unsigned int len = (strLen < maxLen) ? (strLen) : (maxLen); memcpy(name, str.data(), len); name[len] = 0; } /** get the unix timestamp for this entry */ uint32_t getTimestamp() const { uint32_t ts = TarHelper::ordAsciiToInt(mtime, 12); return ts; } /** set the unix timestamp for this entry */ void setTimestamp(const uint32_t ts) { TarHelper::intToOrdAscii(ts, mtime, 12); } /** set the entry's timestamp to "now" */ void setTimestampNow() { setTimestamp( (uint32_t) time(nullptr) ); } /** set the type for this entry (file, dir, ...) */ void setType(uint8_t type) { typeflag = type; } }; } #endif // TARENTRYHEADER_H
// // PayDoneViewModel.h // Sfj // // Created by M on 2017/6/1. // Copyright © 2017年 dabao. All rights reserved. // #import <Foundation/Foundation.h> @interface PayDoneViewModel : NSObject<UITableViewDelegate, UITableViewDataSource> @end
///////////////////////////////////////////////////////////////////////////// // Copyright (c) 2009-2011 Alan Wright. All rights reserved. // Distributable under the terms of either the Apache License (Version 2.0) // or the GNU Lesser General Public License. ///////////////////////////////////////////////////////////////////////////// #ifndef MAPOFSETS_H #define MAPOFSETS_H namespace Lucene { /// Helper class for keeping Lists of Objects associated with keys. template <class MAPKEY, class MAPHASH, class MAPEQUAL, class SETVALUE, class SETHASH, class SETEQUAL> class MapOfSets { public: typedef HashSet<SETVALUE, SETHASH, SETEQUAL> set_type; typedef HashMap<MAPKEY, set_type, MAPHASH, MAPEQUAL> map_type; MapOfSets(map_type m) { theMap = m; } protected: map_type theMap; public: /// @return direct access to the map backing this object. map_type getMap() { return theMap; } /// Adds val to the HashSet associated with key in the HashMap. If key is not already in the map, /// a new HashSet will first be created. /// @return the size of the HashSet associated with key once val is added to it. int32_t put(MAPKEY key, SETVALUE val) { typename map_type::iterator entry = theMap.find(key); if (entry != theMap.end()) { entry->second.add(val); return entry->second.size(); } else { set_type theSet(set_type::newInstance()); theSet.add(val); theMap.put(key, theSet); return 1; } } /// Adds multiple vals to the HashSet associated with key in the HashMap. If key is not already in /// the map, a new HashSet will first be created. /// @return the size of the HashSet associated with key once val is added to it. int32_t putAll(MAPKEY key, set_type vals) { typename map_type::iterator entry = theMap.find(key); if (entry != theMap.end()) { entry->second.addAll(vals.begin(), vals.end()); return entry->second.size(); } else { set_type theSet(set_type::newInstance(vals.begin(), vals.end())); theMap.put(key, theSet); return theSet.size(); } } }; } #endif
/* * Copyright 2020 Makani Technologies LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef AVIONICS_FIRMWARE_DRIVERS_FAA_LIGHT_H_ #define AVIONICS_FIRMWARE_DRIVERS_FAA_LIGHT_H_ void FaaLightInit(void); void FaaLightSendStatusMessage(void); void FaaLightPoll(void); #endif // AVIONICS_FIRMWARE_DRIVERS_FAA_LIGHT_H_
// // SMTPClientSessionTest.h // // Definition of the SMTPClientSessionTest class. // // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. // and Contributors. // // SPDX-License-Identifier: BSL-1.0 // #ifndef SMTPClientSessionTest_INCLUDED #define SMTPClientSessionTest_INCLUDED #include "Poco/Net/Net.h" #include "CppUnit/TestCase.h" class SMTPClientSessionTest: public CppUnit::TestCase { public: SMTPClientSessionTest(const std::string& name); ~SMTPClientSessionTest(); void testLoginEHLO(); void testLoginHELO(); void testLoginFailed(); void testSend(); void testSendMultiRecipient(); void testMultiSeparateRecipient(); void testSendFailed(); void setUp(); void tearDown(); static CppUnit::Test* suite(); private: }; #endif // SMTPClientSessionTest_INCLUDED
/* * Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ #pragma once #include <aws/ec2/EC2_EXPORTS.h> #include <aws/ec2/EC2Request.h> #include <aws/core/utils/memory/stl/AWSString.h> #include <utility> namespace Aws { namespace EC2 { namespace Model { /** */ class AWS_EC2_API DisassociateIamInstanceProfileRequest : public EC2Request { public: DisassociateIamInstanceProfileRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "DisassociateIamInstanceProfile"; } Aws::String SerializePayload() const override; protected: void DumpBodyToUrl(Aws::Http::URI& uri ) const override; public: /** * <p>The ID of the IAM instance profile association.</p> */ inline const Aws::String& GetAssociationId() const{ return m_associationId; } /** * <p>The ID of the IAM instance profile association.</p> */ inline bool AssociationIdHasBeenSet() const { return m_associationIdHasBeenSet; } /** * <p>The ID of the IAM instance profile association.</p> */ inline void SetAssociationId(const Aws::String& value) { m_associationIdHasBeenSet = true; m_associationId = value; } /** * <p>The ID of the IAM instance profile association.</p> */ inline void SetAssociationId(Aws::String&& value) { m_associationIdHasBeenSet = true; m_associationId = std::move(value); } /** * <p>The ID of the IAM instance profile association.</p> */ inline void SetAssociationId(const char* value) { m_associationIdHasBeenSet = true; m_associationId.assign(value); } /** * <p>The ID of the IAM instance profile association.</p> */ inline DisassociateIamInstanceProfileRequest& WithAssociationId(const Aws::String& value) { SetAssociationId(value); return *this;} /** * <p>The ID of the IAM instance profile association.</p> */ inline DisassociateIamInstanceProfileRequest& WithAssociationId(Aws::String&& value) { SetAssociationId(std::move(value)); return *this;} /** * <p>The ID of the IAM instance profile association.</p> */ inline DisassociateIamInstanceProfileRequest& WithAssociationId(const char* value) { SetAssociationId(value); return *this;} private: Aws::String m_associationId; bool m_associationIdHasBeenSet; }; } // namespace Model } // namespace EC2 } // namespace Aws
#include "nit.common.h" extern const int COLOR_list__List__get_node; extern const int COLOR_abstract_collection__Container__item; val* list__List___91d_93d(val* self, long p0); extern const int COLOR_abstract_collection__Sequence_FT0; extern const int COLOR_abstract_collection__Container__item_61d; void list__List___91d_93d_61d(val* self, long p0, val* p1); extern const int COLOR_list__List___head; val* list__List__first(val* self); void list__List__first_61d(val* self, val* p0); extern const int COLOR_list__List___tail; val* list__List__last(val* self); void list__List__last_61d(val* self, val* p0); short int list__List__is_empty(val* self); extern const int COLOR_list__ListNode__next; long list__List__length(val* self); extern const int COLOR_abstract_collection__Collection_FT0; extern const int COLOR_list__List__search_node_after; short int list__List__has(val* self, val* p0); extern const int COLOR_kernel__Object___33d_61d; short int list__List__has_only(val* self, val* p0); long list__List__count(val* self, val* p0); extern const struct type type_kernel__Int; extern const int COLOR_abstract_collection__Collection__length; val* NEW_list__List(const struct type* type); extern const int COLOR_list__Listlist__List_FT0; extern const int COLOR_list__List__init; extern const int COLOR_abstract_collection__SequenceRead___91d_93d; extern const int COLOR_abstract_collection__SimpleCollection__add; val* list__List__slice(val* self, long p0, long p1); val* NEW_list__ListNode(const struct type* type); extern const int COLOR_list__ListNodelist__List_FT0; extern const int COLOR_list__ListNode__init; extern const int COLOR_list__ListNode__next_61d; extern const int COLOR_list__ListNode__prev_61d; void list__List__push(val* self, val* p0); void list__List__unshift(val* self, val* p0); extern const int COLOR_abstract_collection__RemovableCollection__clear; void list__List__link(val* self, val* p0); extern const int COLOR_list__ListNode__prev; val* list__List__pop(val* self); val* list__List__shift(val* self); extern const int COLOR_abstract_collection__RemovableCollection_FT0; extern const int COLOR_list__List__remove_node; void list__List__remove(val* self, val* p0); void list__List__remove_at(val* self, long p0); void list__List__clear(val* self); val* NEW_list__ListIterator(const struct type* type); extern const int COLOR_list__ListIteratorlist__List_FT0; extern const int COLOR_list__ListIterator__init; val* list__List__iterator(val* self); void list__List__init(val* self); extern const int COLOR_abstract_collection__Collectionlist__List_FT0; extern const int COLOR_abstract_collection__Sequence__append; void list__List__from(val* self, val* p0); val* list__List__get_node(val* self, long p0); extern const int COLOR_list__List_FT0; val* list__List__search_node_after(val* self, val* p0, val* p1); void list__List__remove_node(val* self, val* p0); void list__List__insert_before(val* self, val* p0, val* p1); extern const int COLOR_list__ListIterator___node; val* list__ListIterator__item(val* self); extern const int COLOR_list__ListIterator_FT0; void list__ListIterator__item_61d(val* self, val* p0); short int list__ListIterator__is_ok(val* self); extern const int COLOR_list__ListIterator___index; void list__ListIterator__next(val* self); extern const int COLOR_list__Listlist__ListIterator_FT0; extern const int COLOR_list__ListIterator___list; void list__ListIterator__init(val* self, val* p0); long list__ListIterator__index(val* self); void list__ListIterator__delete(val* self); extern const int COLOR_list__List__insert_before; void list__ListIterator__insert_before(val* self, val* p0); extern const int COLOR_list__ListNode_FT0; extern const int COLOR_abstract_collection__Container__init; void list__ListNode__init(val* self, val* p0); extern const int COLOR_list__ListNode___next; val* list__ListNode__next(val* self); extern const int COLOR_list__ListNodelist__ListNode_FT0; void list__ListNode__next_61d(val* self, val* p0); extern const int COLOR_list__ListNode___prev; val* list__ListNode__prev(val* self); void list__ListNode__prev_61d(val* self, val* p0);
// // Copyright 2016 Jeff Bush // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // #include <nyuzi.h> #include <stdio.h> // // Pass an invalid user buffer to a syscall. Ensure this returns an error // rather than crashing the kernel. // int main() { int retval; void *ptr; // The parameter to the first syscall is a null pointer, which will fail and // return an error. This should print a negative number. retval = write_console((char*) 0, 5); printf("printstr returned %d\n", retval); // CHECK: printstr returned -1 // The name is invalid and will fail to copy. Ensure it returns 0. ptr = create_area(0, 0x1000, AREA_PLACE_SEARCH_UP, (char*) 1, AREA_WRITABLE); printf("create area returned %p \n", ptr); // CHECK: create area returned 0 } // CHECK: init process has exited, shutting down
static const char * fallback_ui_file = "<ui>\n" " <menubar name='main-window-menu'>\n" " <menu action='file-menu'>\n" " <menuitem action='open-torrent-menu'/>\n" " <menuitem action='open-torrent-from-url'/>\n" " <menuitem action='new-torrent'/>\n" " <separator/>\n" " <menuitem action='start-all-torrents'/>\n" " <menuitem action='pause-all-torrents'/>\n" " <separator/>\n" " <menuitem action='quit'/>\n" " </menu>\n" " <menu action='edit-menu'>\n" " <menuitem action='select-all'/>\n" " <menuitem action='deselect-all'/>\n" " <separator/>\n" " <menuitem action='edit-preferences'/>\n" " </menu>\n" " <menu action='torrent-menu'>\n" " <menuitem action='show-torrent-properties'/>\n" " <menuitem action='open-torrent-folder'/>\n" " <separator/>\n" " <menuitem action='torrent-start'/>\n" " <menuitem action='torrent-start-now'/>\n" " <menuitem action='torrent-reannounce'/>\n" " <menu action='queue-menu'>\n" " <menuitem action='queue-move-top'/>\n" " <menuitem action='queue-move-up'/>\n" " <menuitem action='queue-move-down'/>\n" " <menuitem action='queue-move-bottom'/>\n" " </menu>\n" " <menuitem action='torrent-stop'/>\n" " <separator/>\n" " <menuitem action='relocate-torrent'/>\n" " <menuitem action='torrent-verify'/>\n" " <menuitem action='copy-magnet-link-to-clipboard'/>\n" " <separator/>\n" " <menuitem action='remove-torrent'/>\n" " <menuitem action='delete-torrent'/>\n" " </menu>\n" " <menu action='view-menu'>\n" " <menuitem action='compact-view'/>\n" " <separator/>\n" " <menuitem action='show-toolbar'/>\n" " <menuitem action='show-filterbar'/>\n" " <menuitem action='show-statusbar'/>\n" " <separator/>\n" " <menuitem action='sort-by-activity'/>\n" " <menuitem action='sort-by-age'/>\n" " <menuitem action='sort-by-name'/>\n" " <menuitem action='sort-by-progress'/>\n" " <menuitem action='sort-by-queue'/>\n" " <menuitem action='sort-by-ratio'/>\n" " <menuitem action='sort-by-size'/>\n" " <menuitem action='sort-by-state'/>\n" " <menuitem action='sort-by-time-left'/>\n" " <separator/>\n" " <menuitem action='sort-reversed'/>\n" " </menu>\n" " <menu action='help-menu'>\n" " <menuitem action='toggle-message-log'/>\n" " <menuitem action='show-stats'/>\n" " <separator/>\n" " <menuitem action='donate'/>\n" " <separator/>\n" " <menuitem action='help'/>\n" " <menuitem action='show-about-dialog'/>\n" " </menu>\n" " </menubar>\n" "\n" " <toolbar name='main-window-toolbar'>\n" " <toolitem action='open-torrent-toolbar'/>\n" " <toolitem action='torrent-start'/>\n" " <toolitem action='torrent-stop'/>\n" " <toolitem action='remove-torrent'/>\n" " <separator/>\n" " <toolitem action='show-torrent-properties'/>\n" " </toolbar>\n" "\n" " <popup name='main-window-popup'>\n" " <menuitem action='show-torrent-properties'/>\n" " <menuitem action='open-torrent-folder'/>\n" " <separator/>\n" " <menu action='sort-menu'>\n" " <menuitem action='sort-by-activity'/>\n" " <menuitem action='sort-by-age'/>\n" " <menuitem action='sort-by-name'/>\n" " <menuitem action='sort-by-progress'/>\n" " <menuitem action='sort-by-ratio'/>\n" " <menuitem action='sort-by-size'/>\n" " <menuitem action='sort-by-state'/>\n" " <menuitem action='sort-by-time-left'/>\n" " <separator/>\n" " <menuitem action='sort-reversed'/>\n" " </menu>\n" " <separator/>\n" " <menuitem action='torrent-start'/>\n" " <menuitem action='torrent-start-now'/>\n" " <menuitem action='torrent-reannounce'/>\n" " <menu action='queue-menu'>\n" " <menuitem action='queue-move-top'/>\n" " <menuitem action='queue-move-up'/>\n" " <menuitem action='queue-move-down'/>\n" " <menuitem action='queue-move-bottom'/>\n" " </menu>\n" " <menuitem action='torrent-stop'/>\n" " <separator/>\n" " <menuitem action='relocate-torrent'/>\n" " <menuitem action='torrent-verify'/>\n" " <menuitem action='copy-magnet-link-to-clipboard'/>\n" " <separator/>\n" " <menuitem action='remove-torrent'/>\n" " <menuitem action='delete-torrent'/>\n" " </popup>\n" "\n" " <popup name='icon-popup'>\n" " <menuitem action='toggle-main-window'/>\n" " <separator/>\n" " <menuitem action='open-torrent-menu'/>\n" " <menuitem action='open-torrent-from-url'/>\n" " <separator/>\n" " <menuitem action='pause-all-torrents'/>\n" " <menuitem action='start-all-torrents'/>\n" " <separator/>\n" " <menuitem action='alt-speed-enabled'/>\n" " <separator/>\n" " <menuitem action='quit'/>\n" " </popup>\n" "\n" "</ui>";
#ifndef CDispatch_h__ #define CDispatch_h__ #include "DispatchInterface.h" #include <QString> #include "BaseDatas.h" /** * @class <CDispatch> * @brief 时间调度清除数据. * * 这里是类的详细描述 * @note 这里是注意事项 * @see DispatchInterface */ class CDispatch : public DispatchInterface { Q_OBJECT public: CDispatch(QList<BaseDatas> datas); CDispatch(const QString &fullPath, const QString &style, const QString &freeSpace, const int &timeLine, const QStringList &regex); ~CDispatch(); void setParam(const BaseDatas &data); void doNow(); signals: void begin(); void clearBegin(const QString &dir); void clearEnd(const QString &dir); public slots: /** * @brief 定时清理数据 * @param const QSharedPointer<TimerCallBackParam> & data * @return void */ virtual void Dispatch(const QSharedPointer<TimerCallBackParam> &data); void beginProcess(); void dowork(); private: //QThread *m_pThreadSelf; QString m_fullpath; QString m_style; int m_timeLine; QStringList m_regex; QString m_freeSpace; QList<BaseDatas> m_datas; ///< 存储每个监控目录的设置 BaseDatas m_oBaseData; bool m_bHasFinished; }; #endif // CDispatch_h__
#include <string.h> #include <stdlib.h> #include <stdio.h> #include "rt.h" #include "get_next_line.h" double inter_plan(t_vector *v, t_point *eye, t_object *object) { t_plan_infos *p; p = (t_plan_infos*)object; p->obj.k = 0; if (v->z == 0) return (0); p->obj.k = -((eye->z + p->z) / v->z); if (p->obj.k < 0) return (0); return (p->obj.k); } t_list *parse_plan(int fd, char **buf, t_list *next) { t_plan_infos *p; p = malloc(1 * sizeof(*p)); if (p == NULL) exit(1); memset(p, 0, sizeof(*p)); free(*buf); while ((*buf = get_next_line(fd)) != NULL) { if (strncmp(*buf, "color=", 6) == 0) sscanf(*buf + 6, "%x\n", &p->obj.color); else if (strncmp(*buf, "z=", 2) == 0) sscanf(*buf + 2, "%d\n", &p->z); else break ; free(*buf); } return (new_object((t_object*)p, &inter_plan, next)); }
// // LGLineController.h // LGPdf // // Created by Luna Gao on 16/9/9. // Copyright © 2016年 luna.gao. All rights reserved. // #ifndef __LGLineController #import <Foundation/Foundation.h> #import "LGPdfLine.h" @interface LGLineController : NSObject - (void)add:(LGPdfLine *)element withContext:(CGContextRef)pdfContext; @end #endif
// // KYArcTab.h // KYArcTab // // Created by Kaijie Yu on 2/1/12. // Copyright (c) 2012 Kjuly. All rights reserved. // #import <UIKit/UIKit.h> #import <QuartzCore/QuartzCore.h> // For debuging graphics //#define KY_ARCTAB_DEBUG_GRAPHICS 1 // View Basic //#define kKYArcTabViewHeight CGRectGetHeight([UIScreen mainScreen].applicationFrame) #define kKYArcTabViewHeight 960.f //#define kKYArcTabViewWidth CGRectGetWidth([UIScreen mainScreen].applicationFrame) #define kKYArcTabViewWidth 640.f // Notification Name // Notification for toggling tab bar #define kKYNArcTabToggleTabBar @"KYNArcTabToggleTabBar" // Tag Constants #define kKYNArcTabArrowTag 1021 #define kKYNArcTabSelectedItemTag 1022 #define kKYNArcTabSelectedViewControllerTag 1023 @protocol KYArcTabDelegate - (UIImage *)iconFor:(NSUInteger)itemIndex; @optional - (void)touchUpInsideItemAtIndex:(NSUInteger)itemIndex; - (void)touchDownAtItemAtIndex:(NSUInteger)itemIndex withPreviousItemIndex:(NSUInteger)previousItemIndex; @end @interface KYArcTab : UIView { NSObject <KYArcTabDelegate> * delegate_; NSMutableArray * buttons_; NSInteger previousItemIndex_; } @property (nonatomic, assign) NSObject <KYArcTabDelegate> * delegate; @property (nonatomic, retain) NSMutableArray * buttons; @property (nonatomic, assign) NSInteger previousItemIndex; // Designated initializer - (id)initWithFrame:(CGRect)frame // frame of tab bar tabBarSize:(CGSize)tabBarSize // size of tab bar backgroundColor:(UIColor *)backgroundColor // background color of tab bar itemSize:(CGSize)itemSize // size of items on tab bar itemCount:(NSUInteger)itemCount // number of items on tab bar arrow:(UIImage *)arrow // arrow on the tab bar tag:(NSInteger)tag // tag for the tab bar delegate:(NSObject <KYArcTabDelegate> *)delegate; // Action of touch down on tab bar item - (void)touchDownAction:(UIButton *)button; // Action for selected item - (void)selectItemAtIndex:(NSInteger)index; // TODO: // This message is for device's rotation management //- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation // duration:(NSTimeInterval)duration; @end
//////////////////////////////////////////////////////////////////////////////// /// DISCLAIMER /// /// Copyright 2014-2017 ArangoDB GmbH, Cologne, Germany /// Copyright 2004-2014 triAGENS GmbH, Cologne, Germany /// /// 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 holder is ArangoDB GmbH, Cologne, Germany /// /// @author Jan Steemann //////////////////////////////////////////////////////////////////////////////// #ifndef ARANGOD_COLLECTION_EXPORT_H #define ARANGOD_COLLECTION_EXPORT_H 1 #include <unordered_set> #include "Basics/Common.h" #include "Basics/debugging.h" namespace arangodb { struct CollectionExport { public: struct Restrictions { enum Type { RESTRICTION_NONE, RESTRICTION_INCLUDE, RESTRICTION_EXCLUDE }; Restrictions() : fields(), type(RESTRICTION_NONE) {} std::unordered_set<std::string> fields; Type type; }; static bool IncludeAttribute(CollectionExport::Restrictions::Type const restrictionType, std::unordered_set<std::string> const& fields, std::string const& key) { if (restrictionType == CollectionExport::Restrictions::RESTRICTION_INCLUDE || restrictionType == CollectionExport::Restrictions::RESTRICTION_EXCLUDE) { bool const keyContainedInRestrictions = (fields.find(key) != fields.end()); if ((restrictionType == CollectionExport::Restrictions::RESTRICTION_INCLUDE && !keyContainedInRestrictions) || (restrictionType == CollectionExport::Restrictions::RESTRICTION_EXCLUDE && keyContainedInRestrictions)) { // exclude the field return false; } // include the field return true; } else { // no restrictions TRI_ASSERT(restrictionType == CollectionExport::Restrictions::RESTRICTION_NONE); return true; } return true; } }; } // namespace arangodb #endif
/* Copyright (c) 2011, Siemens Corporate Research a Division of Siemens Corporation All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ /* * \brief * \author Sylvain Jaume, Francois Huguet */ # ifndef SO_VTK_CELLLOCATOR_H_ # define SO_VTK_CELLLOCATOR_H_ # include <Inventor/engines/SoSubEngine.h> # include "xip/inventor/vtk/SoSFVtkAlgorithmOutput.h" # include "xip/inventor/vtk/SoSFVtkObject.h" # include "vtkCellLocator.h" # include "Inventor/fields/SoSFInt32.h" # include "Inventor/fields/SoSFFloat.h" class SoVtkCellLocator : public SoEngine { SO_ENGINE_HEADER( SoVtkCellLocator ); public: /// Constructor SoVtkCellLocator(); /// Class Initialization static void initClass(); // Inputs /// DataSet of type vtkDataSet SoSFVtkObject DataSet; /// RetainCellLists SoSFInt32 RetainCellLists; /// CacheCellBounds SoSFInt32 CacheCellBounds; /// NumberOfCellsPerBucket SoSFInt32 NumberOfCellsPerBucket; /// Automatic SoSFInt32 Automatic; /// MaxLevel SoSFInt32 MaxLevel; /// Tolerance SoSFFloat Tolerance; // Outputs /// SoSFVtkObject of type vtkDataSet SoEngineOutput oDataSet; /// SoSFVtkObject of type CellLocator SoEngineOutput Output; protected: /// Destructor ~SoVtkCellLocator(); /// Evaluate Function virtual void evaluate(); /// inputChanged Function virtual void inputChanged(SoField *); /// reset Function virtual void reset(); /// vtkDataSet SoVtkObject *mDataSet; /// vtkCellLocator SoVtkObject *mOutput; private: vtkCellLocator* mObject; /// addCalled checks if the Add*() method has been called bool addCalled; }; #endif // SO_VTK_CELLLOCATOR_H_
// // Generated by the J2ObjC translator. DO NOT EDIT! // source: /Users/tball/tmp/j2objc/testing/mockito/build_result/java/org/mockito/internal/configuration/injection/scanner/MockScanner.java // #ifndef _OrgMockitoInternalConfigurationInjectionScannerMockScanner_H_ #define _OrgMockitoInternalConfigurationInjectionScannerMockScanner_H_ @class IOSClass; @class JavaLangReflectField; @class OrgMockitoInternalUtilMockUtil; @protocol JavaUtilSet; #include "J2ObjC_header.h" @interface OrgMockitoInternalConfigurationInjectionScannerMockScanner : NSObject { } - (instancetype)initWithId:(id)instance withIOSClass:(IOSClass *)clazz; - (void)addPreparedMocksWithJavaUtilSet:(id<JavaUtilSet>)mocks; @end J2OBJC_EMPTY_STATIC_INIT(OrgMockitoInternalConfigurationInjectionScannerMockScanner) CF_EXTERN_C_BEGIN CF_EXTERN_C_END J2OBJC_TYPE_LITERAL_HEADER(OrgMockitoInternalConfigurationInjectionScannerMockScanner) #endif // _OrgMockitoInternalConfigurationInjectionScannerMockScanner_H_
/** * Appcelerator Titanium Mobile * Copyright (c) 2010 by imyredmine, Inc. All Rights Reserved. * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. * * WARNING: This is generated code. Modify at your own risk and without support. */ #import "TiProxy.h" #ifdef USE_TI_UIIOS #if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_4_0 #ifdef USE_TI_UIIOSADVIEW #import "TiUIiOSAdViewProxy.h" #endif #endif @interface TiUIiOSProxy : TiProxy { @private } #if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_4_0 #ifdef USE_TI_UIIOSADVIEW -(id)createAdView:(id)args; #endif #endif @end #endif
#pragma once #include <cstdint> struct ip4_addr { uint32_t addr; }; typedef struct ip4_addr ip4_addr_t;
// Copyright 2017-2020 The Verible Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. #ifndef VERIBLE_VERILOG_FORMATTING_TOKEN_ANNOTATOR_H_ #define VERIBLE_VERILOG_FORMATTING_TOKEN_ANNOTATOR_H_ #include <vector> #include "common/formatting/format_token.h" #include "common/text/symbol.h" #include "common/text/text_structure.h" #include "common/text/token_info.h" #include "verilog/formatting/format_style.h" namespace verilog { namespace formatter { // Annotates inter-token information: spacing required between tokens, // line-break penalties and decisions. // style: Verilog-specific configuration // tokens_begin, tokens_end: range of format tokens to be initialized. // TODO(b/130091585): replace modifiable unwrapped line with a read-only // struct and return separate annotations. void AnnotateFormattingInformation( const FormatStyle& style, const verible::TextStructureView& text_structure, std::vector<verible::PreFormatToken>* format_tokens); // This interface is only provided for testing, without requiring a // TextStructureView. // buffer_start: start of the text buffer that is being formatted. // syntax_tree_root: syntax tree used for context-sensitive behavior. // eof_token: EOF token pointing to the end of the unformatted string. void AnnotateFormattingInformation( const FormatStyle& style, const char* buffer_start, const verible::Symbol* syntax_tree_root, const verible::TokenInfo& eof_token, std::vector<verible::PreFormatToken>* format_tokens); } // namespace formatter } // namespace verilog #endif // VERIBLE_VERILOG_FORMATTING_TOKEN_ANNOTATOR_H_
#include "esp_spi_flash.h" int spi_flash_get_chip_size() { return (1024 * 1024 * 1024); }
/** * @file: host.h * Assertion related routines of Utils library for scheme compiler project * @defgroup Asserts Assertions * @brief Assertion routines/macros * @ingroup Utils */ /* * Copyright (C) 2012 MIPT Scheme Compiler team */ #pragma once #ifndef UTILS_HOST_H #define UTILS_HOST_H /* System headers */ #include <cstdlib> #include <iostream> #include <fstream> #include <sstream> #include <string> #include <map> #include <algorithm> #include <list> #include <vector> #include <cstdio> #include <cstdarg> #include <numeric> #include <boost/array.hpp> #include <boost/timer.hpp> #define BOOST_TEST_DYN_LINK using namespace std; #endif /* UTILS_HOST_H */
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Implementation of the user-space ashmem API for devices, which have our * ashmem-enabled kernel. See ashmem-sim.c for the "fake" tmp-based version, * used by the simulator. */ #ifndef IPCMESSAGEJS_H #define IPCMESSAGEJS_H // Message from Platform to Script in ScriptBridge enum class IPCJSMsg { INITFRAMEWORK, EXECJSSERVICE, TAKEHEAPSNAPSHOT, EXECJS, CREATEINSTANCE, DESTORYINSTANCE, EXECJSONINSTANCE, EXECJSWITHRESULT, EXECJSWITHCALLBACK, UPDATEGLOBALCONFIG, EXECTIMERCALLBACK, INITAPPFRAMEWORK, CREATEAPPCONTEXT, EXECJSONAPPWITHRESULT, CALLJSONAPPCONTEXT, DESTORYAPPCONTEXT, }; // Message from Script to Core in ScriptBridge enum class IPCProxyMsg { SETJSFVERSION, REPORTEXCEPTION, CALLNATIVE, CALLNATIVEMODULE, CALLNATIVECOMPONENT, CALLADDELEMENT, SETTIMEOUT, NATIVELOG, CALLCREATEBODY, CALLUPDATEFINISH, CALLCREATEFINISH, CALLREFRESHFINISH, CALLUPDATEATTRS, CALLUPDATESTYLE, CALLREMOVEELEMENT, CALLMOVEELEMENT, CALLADDEVENT, CALLREMOVEEVENT, CALLGCANVASLINK, CALLT3DLINK, SETINTERVAL, CLEARINTERVAL, POSTMESSAGE, DISPATCHMESSAGE, DISPATCHMESSAGESYNC, ONRECEIVEDRESULT, UPDATECOMPONENTDATA, }; // Message from Script to Core in ScriptBridge // Message from Core to Platform in PlatformBridge enum class IPCMsgFromCoreToPlatform { INVOKE_MEASURE_FUNCTION = 100, INVOKE_LAYOUT_BEFORE, INVOKE_LAYOUT_AFTER, SET_JS_VERSION, REPORT_EXCEPTION, CALL_NATIVE, CALL_NATIVE_MODULE, CALL_NATIVE_COMPONENT, SET_TIMEOUT, NATIVE_LOG, UPDATE_FINISH, REFRESH_FINISH, ADD_EVENT, REMOVE_EVENT, CREATE_BODY, ADD_ELEMENT, LAYOUT, UPDATE_STYLE, UPDATE_ATTR, CREATE_FINISH, RENDER_SUCCESS, REMOVE_ELEMENT, MOVE_ELEMENT, APPEND_TREE_CREATE_FINISH, HAS_TRANSITION_PROS, POST_MESSAGE, DISPATCH_MESSAGE }; // Message from Platform to Core in PlatformBridge enum class IPCMsgFromPlatformToCore { SET_DEFAULT_HEIGHT_AND_WIDTH_INTO_ROOT_DOM = 100, ON_INSTANCE_CLOSE, SET_STYLE_WIDTH, SET_STYLE_HEIGHT, SET_MARGIN, SET_PADDING, SET_POSITION, MARK_DIRTY, SET_VIEWPORT_WIDTH, FORCE_LAYOUT, NOTIFY_LAYOUT, GET_FIRST_SCREEN_RENDER_TIME, GET_RENDER_FINISH_TIME, SET_RENDER_CONTAINER_WRAP_CONTENT, BIND_MEASUREMENT_TO_RENDER_OBJECT, REGISTER_CORE_ENV, GET_RENDER_OBJECT, UPDATE_RENDER_OBJECT_STYLE, UPDATE_RENDER_OBJECT_ATTR, COPY_RENDER_OBJECT, SET_MEASURE_FUNCTION_ADAPTER, SET_PLATFORM, SET_DEVICE_WIDTH_AND_HEIGHT, ADD_OPTION, INIT_FRAMEWORK, INIT_APP_FRAMEWORK, CREATE_APP_CONTEXT, EXEC_JS_ON_APP_WITH_RESULT, CALL_JS_ON_APP_CONTEXT, DESTROY_APP_CONTEXT, EXEC_JS_SERVICE, EXEC_TIME_CALLBACK, EXEC_JS, EXEC_JS_WITH_RESULT, CREATE_INSTANCE, EXEC_JS_ON_INSTANCE, DESTROY_INSTANCE, UPDATE_GLOBAL_CONFIG }; #endif /* IPCMESSAGEJS_H */
#pragma once #include "source/common/protobuf/utility.h" #include "source/extensions/filters/http/cache/http_cache.h" #include "absl/base/thread_annotations.h" #include "absl/container/flat_hash_map.h" #include "absl/synchronization/mutex.h" // included to make code_format happy #include "envoy/extensions/cache/simple_http_cache/v3/config.pb.h" namespace Envoy { namespace Extensions { namespace HttpFilters { namespace Cache { // Example cache backend that never evicts. Not suitable for production use. class SimpleHttpCache : public HttpCache { private: struct Entry { Http::ResponseHeaderMapPtr response_headers_; ResponseMetadata metadata_; std::string body_; }; // Looks for a response that has been varied. Only called from lookup. Entry varyLookup(const LookupRequest& request, const Http::ResponseHeaderMapPtr& response_headers); // A list of headers that we do not want to update upon validation // We skip these headers because either it's updated by other application logic // or they are fall into categories defined in the IETF doc below // https://www.ietf.org/archive/id/draft-ietf-httpbis-cache-18.html s3.2 static const absl::flat_hash_set<Http::LowerCaseString> headersNotToUpdate(); public: // HttpCache LookupContextPtr makeLookupContext(LookupRequest&& request) override; InsertContextPtr makeInsertContext(LookupContextPtr&& lookup_context) override; void updateHeaders(const LookupContext& lookup_context, const Http::ResponseHeaderMap& response_headers, const ResponseMetadata& metadata) override; CacheInfo cacheInfo() const override; Entry lookup(const LookupRequest& request); void insert(const Key& key, Http::ResponseHeaderMapPtr&& response_headers, ResponseMetadata&& metadata, std::string&& body); // Inserts a response that has been varied on certain headers. void varyInsert(const Key& request_key, Http::ResponseHeaderMapPtr&& response_headers, ResponseMetadata&& metadata, std::string&& body, const Http::RequestHeaderMap& request_headers, const VaryAllowList& vary_allow_list); absl::Mutex mutex_; absl::flat_hash_map<Key, Entry, MessageUtil, MessageUtil> map_ ABSL_GUARDED_BY(mutex_); }; } // namespace Cache } // namespace HttpFilters } // namespace Extensions } // namespace Envoy
// Copyright (c) 2014 Luca Marturana. All rights reserved. // Licensed under Apache 2.0, see LICENSE for details #pragma once #include <string> #include <redis3m/connection.h> #include <redis3m/command.h> #include <map> #include <stdexcept> namespace redis3m { namespace patterns { template<typename Model> /** * @brief Simple object storage, ready to use save, find and remove * of {@link model} classes. id management is not provided. */ class simple_obj_store { public: /** * @brief As the name says, get an object from id specifying it's unique * identifier * @param conn * @param id * @return Use {@link model.loaded()} to check if it's valid or not */ Model find(connection::ptr_t connection, const std::string& id) { redis3m::reply r = connection->run(redis3m::command("HGETALL")(Model::model_name() + ":" + id)); const std::vector<redis3m::reply>& key_values = r.elements(); if (key_values.size() > 0) { std::map<std::string, std::string> serialized; for (uint32_t i=0; i < key_values.size(); i+=2) { serialized[key_values.at(i).str()] = key_values.at(i+1).str(); } return Model(id, serialized); } else { return Model(); } } /** * @brief Save an object on database, or update it if it's already present. * Append only method, for using inside a transaction for example. You should * take care of calling {@link connection::get_reply()} after it. * @param conn * @param model */ void append_save(connection::ptr_t connection, const Model& m) { std::map<std::string, std::string> serialized = m.to_map(); std::vector<std::string> hmset_command; hmset_command.push_back("HMSET"); hmset_command.push_back(Model::model_name() + ":" + m.id()); for(const auto& item : serialized) { hmset_command.push_back(item.first); hmset_command.push_back(item.second); } connection->append(hmset_command); } /** * @brief Save an object on database, or update it if it's already present * @param conn * @param model */ void save(connection::ptr_t connection, const Model& m) { append_save(connection, m); connection->get_reply(); } /** * @brief Remove object and all related data from database. * Append only method, for using inside a transaction for example. You should * take care of calling {@link connection::get_reply()} after it. * @param conn * @param model */ void append_remove(connection::ptr_t connection, const Model& m) { connection->append(command("DEL")(m.model_name() + ":" + m.id())); } /** * @brief Remove object and all related data from database * @param conn * @param model */ void remove(connection::ptr_t connection, const Model& m) { append_remove(connection, m); connection->get_reply(); } /** * @brief Returns Redis Key used to save object data * @param id * @return */ inline std::string model_key(const std::string& id) { return Model::model_name() + ":" + id; } }; } }
/* Web Polygraph http://www.web-polygraph.org/ * Copyright 2003-2011 The Measurement Factory * Licensed under the Apache License, Version 2.0 */ #ifndef POLYGRAPH__RUNTIME_PERSISTWORKSETMGR_H #define POLYGRAPH__RUNTIME_PERSISTWORKSETMGR_H #include "base/UniqId.h" class String; class IBStream; class OBStream; // persistent working set class PersistWorkSetMgr { public: PersistWorkSetMgr(); ~PersistWorkSetMgr(); void configure(); const UniqId &id() const; int version() const; void openInput(const String &anInFname); void openOutput(const String &anOutFname); void loadSeeds(); void storeSeeds(); void loadUniverses(); void storeUniverses(); IBStream *loadSideState(); // may be null OBStream *storeSideState(); // may be null void checkInput(); void checkOutput(); void closeInput(); void closeOutput(); void close(); protected: void loadHeader(); void storeHeader(); void loadMagic(); void storeMagic(); void loadTag(int expectedTag); void storeTag(int expectedTag); private: IBStream *theInStream; OBStream *theOutStream; UniqId theId; int theVersion; }; extern PersistWorkSetMgr ThePersistWorkSetMgr; #endif
/* * Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ #pragma once #include <aws/support/Support_EXPORTS.h> #include <aws/core/utils/memory/stl/AWSVector.h> #include <aws/core/utils/memory/stl/AWSString.h> #include <aws/support/model/Communication.h> #include <utility> namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace Support { namespace Model { /** * <p>The five most recent communications associated with the case.</p><p><h3>See * Also:</h3> <a * href="http://docs.aws.amazon.com/goto/WebAPI/support-2013-04-15/RecentCaseCommunications">AWS * API Reference</a></p> */ class AWS_SUPPORT_API RecentCaseCommunications { public: RecentCaseCommunications(); RecentCaseCommunications(Aws::Utils::Json::JsonView jsonValue); RecentCaseCommunications& operator=(Aws::Utils::Json::JsonView jsonValue); Aws::Utils::Json::JsonValue Jsonize() const; /** * <p>The five most recent communications associated with the case.</p> */ inline const Aws::Vector<Communication>& GetCommunications() const{ return m_communications; } /** * <p>The five most recent communications associated with the case.</p> */ inline void SetCommunications(const Aws::Vector<Communication>& value) { m_communicationsHasBeenSet = true; m_communications = value; } /** * <p>The five most recent communications associated with the case.</p> */ inline void SetCommunications(Aws::Vector<Communication>&& value) { m_communicationsHasBeenSet = true; m_communications = std::move(value); } /** * <p>The five most recent communications associated with the case.</p> */ inline RecentCaseCommunications& WithCommunications(const Aws::Vector<Communication>& value) { SetCommunications(value); return *this;} /** * <p>The five most recent communications associated with the case.</p> */ inline RecentCaseCommunications& WithCommunications(Aws::Vector<Communication>&& value) { SetCommunications(std::move(value)); return *this;} /** * <p>The five most recent communications associated with the case.</p> */ inline RecentCaseCommunications& AddCommunications(const Communication& value) { m_communicationsHasBeenSet = true; m_communications.push_back(value); return *this; } /** * <p>The five most recent communications associated with the case.</p> */ inline RecentCaseCommunications& AddCommunications(Communication&& value) { m_communicationsHasBeenSet = true; m_communications.push_back(std::move(value)); return *this; } /** * <p>A resumption point for pagination.</p> */ inline const Aws::String& GetNextToken() const{ return m_nextToken; } /** * <p>A resumption point for pagination.</p> */ inline void SetNextToken(const Aws::String& value) { m_nextTokenHasBeenSet = true; m_nextToken = value; } /** * <p>A resumption point for pagination.</p> */ inline void SetNextToken(Aws::String&& value) { m_nextTokenHasBeenSet = true; m_nextToken = std::move(value); } /** * <p>A resumption point for pagination.</p> */ inline void SetNextToken(const char* value) { m_nextTokenHasBeenSet = true; m_nextToken.assign(value); } /** * <p>A resumption point for pagination.</p> */ inline RecentCaseCommunications& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;} /** * <p>A resumption point for pagination.</p> */ inline RecentCaseCommunications& WithNextToken(Aws::String&& value) { SetNextToken(std::move(value)); return *this;} /** * <p>A resumption point for pagination.</p> */ inline RecentCaseCommunications& WithNextToken(const char* value) { SetNextToken(value); return *this;} private: Aws::Vector<Communication> m_communications; bool m_communicationsHasBeenSet; Aws::String m_nextToken; bool m_nextTokenHasBeenSet; }; } // namespace Model } // namespace Support } // namespace Aws
/* * 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/serverlessrepo/ServerlessApplicationRepository_EXPORTS.h> #include <aws/serverlessrepo/ServerlessApplicationRepositoryRequest.h> #include <aws/core/utils/memory/stl/AWSString.h> #include <aws/core/utils/memory/stl/AWSVector.h> #include <aws/serverlessrepo/model/ApplicationPolicyStatement.h> #include <utility> namespace Aws { namespace ServerlessApplicationRepository { namespace Model { /** */ class AWS_SERVERLESSAPPLICATIONREPOSITORY_API PutApplicationPolicyRequest : public ServerlessApplicationRepositoryRequest { public: PutApplicationPolicyRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "PutApplicationPolicy"; } Aws::String SerializePayload() const override; /** * <p>The Amazon Resource Name (ARN) of the application.</p> */ inline const Aws::String& GetApplicationId() const{ return m_applicationId; } /** * <p>The Amazon Resource Name (ARN) of the application.</p> */ inline void SetApplicationId(const Aws::String& value) { m_applicationIdHasBeenSet = true; m_applicationId = value; } /** * <p>The Amazon Resource Name (ARN) of the application.</p> */ inline void SetApplicationId(Aws::String&& value) { m_applicationIdHasBeenSet = true; m_applicationId = std::move(value); } /** * <p>The Amazon Resource Name (ARN) of the application.</p> */ inline void SetApplicationId(const char* value) { m_applicationIdHasBeenSet = true; m_applicationId.assign(value); } /** * <p>The Amazon Resource Name (ARN) of the application.</p> */ inline PutApplicationPolicyRequest& WithApplicationId(const Aws::String& value) { SetApplicationId(value); return *this;} /** * <p>The Amazon Resource Name (ARN) of the application.</p> */ inline PutApplicationPolicyRequest& WithApplicationId(Aws::String&& value) { SetApplicationId(std::move(value)); return *this;} /** * <p>The Amazon Resource Name (ARN) of the application.</p> */ inline PutApplicationPolicyRequest& WithApplicationId(const char* value) { SetApplicationId(value); return *this;} /** * <p>An array of policy statements applied to the application.</p> */ inline const Aws::Vector<ApplicationPolicyStatement>& GetStatements() const{ return m_statements; } /** * <p>An array of policy statements applied to the application.</p> */ inline void SetStatements(const Aws::Vector<ApplicationPolicyStatement>& value) { m_statementsHasBeenSet = true; m_statements = value; } /** * <p>An array of policy statements applied to the application.</p> */ inline void SetStatements(Aws::Vector<ApplicationPolicyStatement>&& value) { m_statementsHasBeenSet = true; m_statements = std::move(value); } /** * <p>An array of policy statements applied to the application.</p> */ inline PutApplicationPolicyRequest& WithStatements(const Aws::Vector<ApplicationPolicyStatement>& value) { SetStatements(value); return *this;} /** * <p>An array of policy statements applied to the application.</p> */ inline PutApplicationPolicyRequest& WithStatements(Aws::Vector<ApplicationPolicyStatement>&& value) { SetStatements(std::move(value)); return *this;} /** * <p>An array of policy statements applied to the application.</p> */ inline PutApplicationPolicyRequest& AddStatements(const ApplicationPolicyStatement& value) { m_statementsHasBeenSet = true; m_statements.push_back(value); return *this; } /** * <p>An array of policy statements applied to the application.</p> */ inline PutApplicationPolicyRequest& AddStatements(ApplicationPolicyStatement&& value) { m_statementsHasBeenSet = true; m_statements.push_back(std::move(value)); return *this; } private: Aws::String m_applicationId; bool m_applicationIdHasBeenSet; Aws::Vector<ApplicationPolicyStatement> m_statements; bool m_statementsHasBeenSet; }; } // namespace Model } // namespace ServerlessApplicationRepository } // namespace Aws
/* Copyright 2017 American Printing House for the Blind Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ #ifndef TABLE_OUTPUT_H #define TABLE_OUTPUT_H #include <stdio.h> #include "table.h" /******************************************************************************/ void table_output(FILE *output, const struct table *table); /******************************************************************************/ static inline void table_convert_markers(const struct table *table, unichar *uchars, const int uchars_len) { int i; if(table) { for(i = 0; i < uchars_len; i++) if(uchars[i] == table->marker_user) uchars[i] = u'⟘'; else if(uchars[i] == table->marker_begin) uchars[i] = u'⟪'; else if(uchars[i] == table->marker_end) uchars[i] = u'⟫'; else if(uchars[i] == table->marker_modifier) uchars[i] = u'★'; else if(uchars[i] == table->marker_hard) uchars[i] = u'⟠'; else if(uchars[i] == table->marker_soft) uchars[i] = u'⟊'; else if(uchars[i] == table->marker_internal) uchars[i] = u'☣'; } else for(i = 0; i < uchars_len; i++) switch(uchars[i]) { case TABLE_MARKER_USER: uchars[i] = u'⟘'; break; case TABLE_MARKER_BEGIN: uchars[i] = u'⟪'; break; case TABLE_MARKER_END: uchars[i] = u'⟫'; break; case TABLE_MARKER_MODIFIER: uchars[i] = u'★'; break; case TABLE_MARKER_HARD: uchars[i] = u'⟠'; break; case TABLE_MARKER_SOFT: uchars[i] = u'⟊'; break; case TABLE_MARKER_INTERNAL: uchars[i] = u'☣'; break; //case : uchars[i] = u'⟨'; break; //case : uchars[i] = u'⟩'; break; //case : uchars[i] = u'☓'; break; } } /******************************************************************************/ #endif /* TABLE_OUTPUT_H */
// // XYTrendViewModel.h // WUO // // Created by mofeini on 17/1/3. // Copyright © 2017年 com.test.demo. All rights reserved. // #import <UIKit/UIKit.h> #import "XYHTTPResponseInfo.h" #import "XYTrendItem.h" @interface XYTrendViewModel : NSObject @property (nonatomic, strong) XYHTTPResponseInfo *info; @property (nonatomic, strong) XYTrendItem *item; @property (nonatomic, assign) CGRect cellBounds; @property (nonatomic, assign) CGFloat cellHeight; @property (nonatomic, assign) CGRect title_labelFrame; @property (nonatomic, assign) CGRect contentLableFrame; @property (nonatomic, assign) CGRect picCollectionViewFrame; @property (nonatomic, assign) CGRect readCountBtnFrame; @property (nonatomic, assign) CGRect toolViewFrame; @property (nonatomic, assign) CGRect nameLabelFrame; @property (nonatomic, assign) CGRect jobLabelFrame; @property (nonatomic, assign) CGRect videoImgViewFrame; @property (nonatomic, assign) CGRect rankingFrame; @property (nonatomic, assign) CGRect headerFrame; @property (nonatomic, assign) CGRect investBtnFrame; @property (nonatomic, assign) CGFloat contentWidth; @property (nonatomic, assign) CGFloat picItemWH; /** 记录模型所在的tableViewview上次滚动的偏移量 */ @property (nonatomic, assign) CGPoint previousContentOffset; + (instancetype)trendViewModelWithTrend:(XYTrendItem *)item info:(XYHTTPResponseInfo *)info; @end
// // ARCURLNavigatorPattern.h // ARCo Example // // Created by GREGORY GENTLING on 9/10/11. // Copyright (c) 2011 __MyCompanyName__. All rights reserved. // #import <Foundation/Foundation.h> #import "ARCPatternTEXT.h" #import "ARCURLPattern.h" @interface ARCURLNavigatorPattern : ARCURLPattern { Class _targetClass; id _targetObject; ARCURLArgumentType _navigationMode; NSString* _parentURL; NSInteger _transition; NSInteger _argumentCount; UIModalPresentationStyle _modalPresentationStyle; } @property (nonatomic, assign) Class targetClass; @property (nonatomic, strong) id targetObject; @property (nonatomic, readonly) ARCURLArgumentType navigationMode; @property (nonatomic, copy) NSString* parentURL; @property (nonatomic, assign) NSInteger transition; @property (nonatomic, assign) NSInteger argumentCount; @property (nonatomic, readonly) BOOL isUniversal; @property (nonatomic, readonly) BOOL isFragment; @property (nonatomic, assign) UIModalPresentationStyle modalPresentationStyle; - (id)initWithTarget:(id)target; - (id)initWithTarget:(id)target mode:(ARCURLArgumentType)navigationMode; - (void)compile; - (BOOL)matchURL:(NSURL*)URL; - (id)invoke:(id)target withURL:(NSURL*)URL query:(NSDictionary*)query; /** * either instantiates an object or delegates object creation * depending on current configuration * @return the newly created object or nil if something went wrong */ - (id)createObjectFromURL:(NSURL*)URL query:(NSDictionary*)query; @end
// // PGTSConnectionPrivate.h // BaseTen // // Copyright 2006-2010 Marko Karppinen & Co. LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // @interface PGTSConnection (PGTSConnectionPrivate) - (void) _setConnector: (PGTSConnector *) anObject; - (void) _setSocketDescriptor: (BXSocketDescriptor *) desc; - (void) _sendNextQuery; - (void) _sendOrEnqueueQuery: (PGTSQueryDescription *) query; - (void) _processNotifications; - (void) _checkConnectionStatus; @end
// RISC-V rv32iac Sanity Checks -*- C -*- // Copyright lowRISC contributors. // Licensed under the Apache License, Version 2.0, see LICENSE for details. // SPDX-License-Identifier: Apache-2.0 #include "utils.h" // Architecture-Specific Preprocessor Definitions: CHECK_DEFINED_EQ(__riscv_xlen, 32); #define HAS_M 0 #define HAS_A 1 #define HAS_F 0 #define HAS_D 0 #define HAS_C 1 #include "check-exts.h"
// // ogles_gpgpu project - GPGPU for mobile devices and embedded systems using OpenGL ES 2.0 // // Author: Markus Konrad <post@mkonrad.net>, Winter 2014/2015 // http://www.mkonrad.net // // See LICENSE file in project repository root for the license. // /** * Base class for filter (fragment shader only) processors. */ #ifndef OGLES_GPGPU_COMMON_PROC_FILTERPROCBASE #define OGLES_GPGPU_COMMON_PROC_FILTERPROCBASE #include "../../common_includes.h" #include "procbase.h" namespace ogles_gpgpu { /** * Base class for filter processors. Such processors implement image processing * tasks with fragment shaders. They output is rendered on a fullscreen quad. */ class FilterProcBase : public ProcBase { public: FilterProcBase() : ProcBase(), fragShaderSrcForCompilation(NULL) {} /** * Set output orientation to <o>. */ virtual void setOutputRenderOrientation(RenderOrientation o); /** * Use texture id <id> as input texture at texture <useTexUnit> with texture target <target>. */ virtual void useTexture(GLuint id, GLuint useTexUnit = 1, GLenum target = GL_TEXTURE_2D); protected: /** * Common initialization method for filters with fragment shader source <fShaderSrc> * and render output orientation <o>. */ void filterInit(const char *fShaderSrc, RenderOrientation o = RenderOrientationNone); /** * Common filter shader creation method with fragment shader source <fShaderSrc> and * texture target <target>. */ void filterShaderSetup(const char *fShaderSrc, GLenum target); /** * Initialize texture coordinate buffer according to member variable * <renderOrientation> or override member variable by <overrideRenderOrientation>. */ void initTexCoordBuf(RenderOrientation overrideRenderOrientation = RenderOrientationNone); void filterRenderPrepare(); void filterRenderSetCoords(); void filterRenderDraw(); void filterRenderCleanup(); static const char *vshaderDefault; // default vertex shader to render a fullscreen quad const char *fragShaderSrcForCompilation; // used fragment shader source for shader compilation GLint shParamAPos; // shader attribute vertex positions GLint shParamATexCoord; // shader attribute texture coordinates GLfloat vertexBuf[OGLES_GPGPU_QUAD_VERTEX_BUFSIZE]; // vertex data buffer for a quad GLfloat texCoordBuf[OGLES_GPGPU_QUAD_TEX_BUFSIZE]; // texture coordinate data buffer for a quad }; } #endif
/******************************************************************************* **NOTE** This code was generated by a tool and will occasionally be overwritten. We welcome comments and issues regarding this code; they will be addressed in the generation tool. If you wish to submit pull requests, please do so for the templates in that tool. This code was generated by Vipr (https://github.com/microsoft/vipr) using the T4TemplateWriter (https://github.com/msopentech/vipr-t4templatewriter). Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the Apache License 2.0; see LICENSE in the source repository root for authoritative license information. ******************************************************************************/ #ifndef MSGRAPHSERVICEDEVICEFETCHER_H #define MSGRAPHSERVICEDEVICEFETCHER_H #import "MSGraphServiceModels.h" #import "api/api.h" #import "core/core.h" #import "core/MSOrcEntityFetcher.h" @class MSGraphServiceAlternativeSecurityIdCollectionFetcher; @class MSGraphServiceDirectoryObjectCollectionFetcher; @class MSGraphServiceDirectoryObjectCollectionFetcher; @class MSGraphServiceDirectoryObjectFetcher; @class MSGraphServiceDeviceOperations; /** MSGraphServiceDeviceFetcher * */ __deprecated_msg("This SDK is deprecated. Please review the README for further information (https://github.com/OfficeDev/Microsoft-Graph-SDK-iOS).") @interface MSGraphServiceDeviceFetcher : MSOrcEntityFetcher @property (copy, nonatomic, readonly) MSGraphServiceDeviceOperations *operations; - (instancetype)initWithUrl:(NSString*)urlComponent parent:(id<MSOrcExecutable>)parent; - (void)readWithCallback:(void (^)(MSGraphServiceDevice *, MSOrcError *))callback; - (void)update:(MSGraphServiceDevice *)device callback:(void (^)(MSGraphServiceDevice *, MSOrcError*))callback ; - (void)delete:(void(^)(int status, MSOrcError *))callback; - (MSGraphServiceDeviceFetcher *)addCustomParametersWithName:(NSString *)name value:(id)value; - (MSGraphServiceDeviceFetcher *)addCustomHeaderWithName:(NSString *)name value:(NSString *)value; - (MSGraphServiceDeviceFetcher *)select:(NSString *)params; - (MSGraphServiceDeviceFetcher *)expand:(NSString *)value; @property (strong, nonatomic, readonly, getter=registeredOwners) MSGraphServiceDirectoryObjectCollectionFetcher *registeredOwners; - (MSGraphServiceDirectoryObjectFetcher *)registeredOwnersById:(id)identifier; @property (strong, nonatomic, readonly, getter=registeredUsers) MSGraphServiceDirectoryObjectCollectionFetcher *registeredUsers; - (MSGraphServiceDirectoryObjectFetcher *)registeredUsersById:(id)identifier; @end #endif
/** *@cond doxygenLibsbmlInternal ** * * @file OutputCompressor.h * @brief utility class for output compression * @author Akiya Jouraku * * * <!-------------------------------------------------------------------------- * This file is part of libSBML. Please visit http://sbml.org for more * information about SBML, and the latest version of libSBML. * * Copyright (C) 2013-2015 jointly by the following organizations: * 1. California Institute of Technology, Pasadena, CA, USA * 2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK * 3. University of Heidelberg, Heidelberg, Germany * * Copyright (C) 2009-2013 jointly by the following organizations: * 1. California Institute of Technology, Pasadena, CA, USA * 2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK * * Copyright (C) 2006-2008 by the California Institute of Technology, * Pasadena, CA, USA * * Copyright (C) 2002-2005 jointly by the following organizations: * 1. California Institute of Technology, Pasadena, CA, USA * 2. Japan Science and Technology Agency, Japan * * 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. A copy of the license agreement is provided * in the file named "LICENSE.txt" included with this software distribution * and also available online as http://sbml.org/software/libsbml/license.html * ---------------------------------------------------------------------- -->*/ #ifndef OutputCompressor_h #define OutputCompressor_h #include <iostream> #include <sbml/common/extern.h> #include <sbml/compress/CompressCommon.h> LIBSBML_CPP_NAMESPACE_BEGIN class LIBSBML_EXTERN OutputCompressor { public: /** * Opens the given gzip file as a gzofstream (subclass of std::ofstream class) object * for write access and returned the stream object. * * @param filename a string, the gzip file name to be written. * * @note ZlibNotLinked will be thrown if zlib is not linked with libSBML at compile time. * * @return a ostream* object bound to the given gzip file or NULL if the initialization * for the object failed. */ static std::ostream* openGzipOStream(const std::string& filename); /** * Opens the given bzip2 file as a bzofstream (subclass of std::ofstream class) object * for write access and returned the stream object. * * @param filename a string, the bzip2 file name to be written. * * @note Bzip2NotLinked will be thrown if zlib is not linked with libSBML at compile time. * * @return a ostream* object bound to the given bzip2 file or NULL if the initialization * for the object failed. */ static std::ostream* openBzip2OStream(const std::string& filename); /** * Opens the given zip file as a zipofstream (subclass of std::ofstream class) object * for write access and returned the stream object. * * @param filename a string, the zip archive file name to be written. * @param filenameinzip a string, the file name to be archived in the above zip archive file. * ('filenameinzip' will be extracted when the 'filename' is unzipped) * * @note ZlibNotLinked will be thrown if zlib is not linked with libSBML at compile time. * * @return a ostream* object bound to the given zip file or NULL if the initialization * for the object failed. */ static std::ostream* openZipOStream(const std::string& filename, const std::string& filenameinzip); }; LIBSBML_CPP_NAMESPACE_END #endif // OutputCompressor_h /** @endcond */
/** \file uart3.h \author G. Icking-Konert \date 2013-11-22 \version 0.1 \brief implementation of UART3 / LINUART functions & macros implementation of UART3 / LINUART functions and macros for send & receive. Optional functionality via #define: - USE_UART234_TXE_ISR: use TXE interrupt (shared with UART2+4, default is w/o ISR) - USE_UART234_RXF_ISR: use RXF interrupt (shared with UART2+4, default is w/o ISR) */ /*----------------------------------------------------------------------------- INCLUDE FILES -----------------------------------------------------------------------------*/ #include "uart3.h" /*---------------------------------------------------------- FUNCTIONS ----------------------------------------------------------*/ /** \fn void UART3_begin(uint32_t BR) \brief initialize UART3 for blocking/polling communication \param[in] BR baudrate [Baud] initialize UART3 for communication with specified baudrate. Use 1 start, 8 data and 1 stop bit; no parity or flow control. */ void UART3_begin(uint32_t BR) { volatile uint16_t val16; // set UART3 behaviour UART3.CR1.byte = UART3_CR1_RESET_VALUE; // enable UART3, 8 data bits, no parity control UART3.CR2.byte = UART3_CR2_RESET_VALUE; // no interrupts, disable sender/receiver UART3.CR3.byte = UART3_CR3_RESET_VALUE; // no LIN support, 1 stop bit, no clock output(?) // set baudrate (note: BRR2 must be written before BRR1!) val16 = (uint16_t) (((uint32_t) 16000000L)/BR); UART3.BRR2.byte = (uint8_t) (((val16 & 0xF000) >> 8) | (val16 & 0x000F)); UART3.BRR1.byte = (uint8_t) ((val16 & 0x0FF0) >> 4); // enable transmission UART3.CR2.reg.REN = 1; // enable receiver UART3.CR2.reg.TEN = 1; // enable sender } // UART3_begin /** \fn void UART3_writeBytes(uint16_t num, uint8_t *data) \brief send arry of bytes via UART3 \param[in] num buf size in bytes \param[in] data bytes to send send array of bytes via UART3 directly */ void UART3_writeBytes(uint16_t num, uint8_t *data) { uint16_t i; // send bytes for (i=0; i<num; i++) { UART3_write(data[i]); } } // UART3_writeBytes /*----------------------------------------------------------------------------- END OF MODULE -----------------------------------------------------------------------------*/
// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://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. // Generated by the Codegen C++ plugin. // If you make any local changes, they will be lost. // source: google/cloud/notebooks/v1/managed_service.proto #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NOTEBOOKS_MANAGED_NOTEBOOK_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NOTEBOOKS_MANAGED_NOTEBOOK_CONNECTION_IDEMPOTENCY_POLICY_H #include "google/cloud/idempotency.h" #include "google/cloud/internal/retry_policy.h" #include "google/cloud/version.h" #include <google/cloud/notebooks/v1/managed_service.grpc.pb.h> #include <memory> namespace google { namespace cloud { namespace notebooks { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN class ManagedNotebookServiceConnectionIdempotencyPolicy { public: virtual ~ManagedNotebookServiceConnectionIdempotencyPolicy() = 0; /// Create a new copy of this object. virtual std::unique_ptr<ManagedNotebookServiceConnectionIdempotencyPolicy> clone() const = 0; virtual google::cloud::Idempotency ListRuntimes( google::cloud::notebooks::v1::ListRuntimesRequest request) = 0; virtual google::cloud::Idempotency GetRuntime( google::cloud::notebooks::v1::GetRuntimeRequest const& request) = 0; virtual google::cloud::Idempotency CreateRuntime( google::cloud::notebooks::v1::CreateRuntimeRequest const& request) = 0; virtual google::cloud::Idempotency DeleteRuntime( google::cloud::notebooks::v1::DeleteRuntimeRequest const& request) = 0; virtual google::cloud::Idempotency StartRuntime( google::cloud::notebooks::v1::StartRuntimeRequest const& request) = 0; virtual google::cloud::Idempotency StopRuntime( google::cloud::notebooks::v1::StopRuntimeRequest const& request) = 0; virtual google::cloud::Idempotency SwitchRuntime( google::cloud::notebooks::v1::SwitchRuntimeRequest const& request) = 0; virtual google::cloud::Idempotency ResetRuntime( google::cloud::notebooks::v1::ResetRuntimeRequest const& request) = 0; virtual google::cloud::Idempotency ReportRuntimeEvent( google::cloud::notebooks::v1::ReportRuntimeEventRequest const& request) = 0; }; std::unique_ptr<ManagedNotebookServiceConnectionIdempotencyPolicy> MakeDefaultManagedNotebookServiceConnectionIdempotencyPolicy(); GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace notebooks } // namespace cloud } // namespace google #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NOTEBOOKS_MANAGED_NOTEBOOK_CONNECTION_IDEMPOTENCY_POLICY_H
// Copyright 2010-2014 Google // 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 OR_TOOLS_BASE_SPLIT_H_ #define OR_TOOLS_BASE_SPLIT_H_ #include <stddef.h> #include <string> #include <utility> #include <vector> #include "ortools/base/integral_types.h" #include "ortools/base/logging.h" #include "ortools/base/stringpiece.h" namespace strings { std::vector<std::string> Split(const std::string& full, const char* delim, int flags); std::vector<std::string> Split(const std::string& full, char delim, int flags); // StringPiece version. Its advantages is that it avoids creating a lot of // small strings. Note however that the full std::string must outlive the usage // of the result. // // Hack: the int64 allow the C++ compiler to distinguish the two functions. It // is possible to implement this more cleanly at the cost of more complexity. std::vector<StringPiece> Split(const std::string& full, const char* delim, int64 flags); namespace delimiter { inline const char* AnyOf(const char* x) { return x; } } // namespace delimiter inline int SkipEmpty() { return 0xDEADBEEF; } } // namespace strings // Split a std::string using a nul-terminated list of character // delimiters. For each component, parse using the provided // parsing function and if successful, append it to 'result'. // Return true if and only if all components parse successfully. // If there are consecutive delimiters, this function skips over // all of them. This function will correctly handle parsing // strings that have embedded \0s. template <class T> bool SplitStringAndParse(StringPiece source, const std::string& delim, bool (*parse)(const std::string& str, T* value), std::vector<T>* result); // We define here a very truncated version of the powerful strings::Split() // function. As of 2013-04, it can only be used like this: // const char* separators = ...; // std::vector<std::string> result = strings::Split( // full, strings::delimiter::AnyOf(separators), strings::SkipEmpty()); // // TODO(user): The current interface has a really bug prone side effect because // it can also be used without the AnyOf(). If separators contains only one // character, this is fine, but if it contains more, then the meaning is // different: Split() should interpret the whole std::string as a delimiter. Fix // this. // ###################### TEMPLATE INSTANTIATIONS BELOW ####################### template <class T> bool SplitStringAndParse(const std::string& source, const std::string& delim, bool (*parse)(const std::string& str, T* value), std::vector<T>* result) { CHECK(nullptr != parse); CHECK(nullptr != result); CHECK_GT(delim.size(), 0); const std::vector<StringPiece> pieces = ::strings::Split(source, strings::delimiter::AnyOf(delim.c_str()), static_cast<int64>(strings::SkipEmpty())); T t; for (StringPiece piece : pieces) { if (!parse(piece.as_string(), &t)) return false; result->push_back(t); } return true; } #endif // OR_TOOLS_BASE_SPLIT_H_
// // QMPublicHeader.h // QQMusic // // Created by xwmedia01 on 17/3/2. // Copyright © 2017年 xwmedia01. All rights reserved. // #ifndef QMPublicHeader_h #define QMPublicHeader_h #import "UIImageView+WebCache.h" #import "AFNetworking.h" #import "UIView+Toast.h" #import "UIView+Extension.h" #import "NSObject+Category.h" #import "NSString+Category.h" #import "NSString+Validate.h" #import "LocalDataSource.h" #import "UIColor+Category.h" #import "QMMusicCenterRequest.h" #import "SongInfoModel.h" #endif /* QMPublicHeader_h */
#pragma once #include <string> namespace Atlas { class Shader { public: unsigned int atlasID; std::string name; unsigned int glProgramID; // Common Shader variables int texLoc; int viewLoc; int projLoc; int modelLoc; // Lighting shader variables //int _ambientLightColour; int objectColour; int positionalLightColour; int positionalLightPos; int viewerPos; int ambientLightColour; }; }
/* * DO NOT EDIT. THIS FILE IS GENERATED FROM ../../../dist/idl\nsICSSUnprefixingService.idl */ #ifndef __gen_nsICSSUnprefixingService_h__ #define __gen_nsICSSUnprefixingService_h__ #ifndef __gen_nsISupports_h__ #include "nsISupports.h" #endif /* For IDL files that don't want to include root IDL files. */ #ifndef NS_NO_VTABLE #define NS_NO_VTABLE #endif /* starting interface: nsICSSUnprefixingService */ #define NS_ICSSUNPREFIXINGSERVICE_IID_STR "a5d6e2f4-d3ec-11e4-b002-782bcbaebb28" #define NS_ICSSUNPREFIXINGSERVICE_IID \ {0xa5d6e2f4, 0xd3ec, 0x11e4, \ { 0xb0, 0x02, 0x78, 0x2b, 0xcb, 0xae, 0xbb, 0x28 }} class NS_NO_VTABLE nsICSSUnprefixingService : public nsISupports { public: NS_DECLARE_STATIC_IID_ACCESSOR(NS_ICSSUNPREFIXINGSERVICE_IID) /* boolean generateUnprefixedDeclaration (in AString aPropName, in AString aRightHalfOfDecl, out AString aUnprefixedDecl); */ NS_IMETHOD GenerateUnprefixedDeclaration(const nsAString & aPropName, const nsAString & aRightHalfOfDecl, nsAString & aUnprefixedDecl, bool *_retval) = 0; /* boolean generateUnprefixedGradientValue (in AString aPrefixedFuncName, in AString aPrefixedFuncBody, out AString aUnprefixedFuncName, out AString aUnprefixedFuncBody); */ NS_IMETHOD GenerateUnprefixedGradientValue(const nsAString & aPrefixedFuncName, const nsAString & aPrefixedFuncBody, nsAString & aUnprefixedFuncName, nsAString & aUnprefixedFuncBody, bool *_retval) = 0; }; NS_DEFINE_STATIC_IID_ACCESSOR(nsICSSUnprefixingService, NS_ICSSUNPREFIXINGSERVICE_IID) /* Use this macro when declaring classes that implement this interface. */ #define NS_DECL_NSICSSUNPREFIXINGSERVICE \ NS_IMETHOD GenerateUnprefixedDeclaration(const nsAString & aPropName, const nsAString & aRightHalfOfDecl, nsAString & aUnprefixedDecl, bool *_retval) override; \ NS_IMETHOD GenerateUnprefixedGradientValue(const nsAString & aPrefixedFuncName, const nsAString & aPrefixedFuncBody, nsAString & aUnprefixedFuncName, nsAString & aUnprefixedFuncBody, bool *_retval) override; /* Use this macro to declare functions that forward the behavior of this interface to another object. */ #define NS_FORWARD_NSICSSUNPREFIXINGSERVICE(_to) \ NS_IMETHOD GenerateUnprefixedDeclaration(const nsAString & aPropName, const nsAString & aRightHalfOfDecl, nsAString & aUnprefixedDecl, bool *_retval) override { return _to GenerateUnprefixedDeclaration(aPropName, aRightHalfOfDecl, aUnprefixedDecl, _retval); } \ NS_IMETHOD GenerateUnprefixedGradientValue(const nsAString & aPrefixedFuncName, const nsAString & aPrefixedFuncBody, nsAString & aUnprefixedFuncName, nsAString & aUnprefixedFuncBody, bool *_retval) override { return _to GenerateUnprefixedGradientValue(aPrefixedFuncName, aPrefixedFuncBody, aUnprefixedFuncName, aUnprefixedFuncBody, _retval); } /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ #define NS_FORWARD_SAFE_NSICSSUNPREFIXINGSERVICE(_to) \ NS_IMETHOD GenerateUnprefixedDeclaration(const nsAString & aPropName, const nsAString & aRightHalfOfDecl, nsAString & aUnprefixedDecl, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GenerateUnprefixedDeclaration(aPropName, aRightHalfOfDecl, aUnprefixedDecl, _retval); } \ NS_IMETHOD GenerateUnprefixedGradientValue(const nsAString & aPrefixedFuncName, const nsAString & aPrefixedFuncBody, nsAString & aUnprefixedFuncName, nsAString & aUnprefixedFuncBody, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GenerateUnprefixedGradientValue(aPrefixedFuncName, aPrefixedFuncBody, aUnprefixedFuncName, aUnprefixedFuncBody, _retval); } #if 0 /* Use the code below as a template for the implementation class for this interface. */ /* Header file */ class nsCSSUnprefixingService : public nsICSSUnprefixingService { public: NS_DECL_ISUPPORTS NS_DECL_NSICSSUNPREFIXINGSERVICE nsCSSUnprefixingService(); private: ~nsCSSUnprefixingService(); protected: /* additional members */ }; /* Implementation file */ NS_IMPL_ISUPPORTS(nsCSSUnprefixingService, nsICSSUnprefixingService) nsCSSUnprefixingService::nsCSSUnprefixingService() { /* member initializers and constructor code */ } nsCSSUnprefixingService::~nsCSSUnprefixingService() { /* destructor code */ } /* boolean generateUnprefixedDeclaration (in AString aPropName, in AString aRightHalfOfDecl, out AString aUnprefixedDecl); */ NS_IMETHODIMP nsCSSUnprefixingService::GenerateUnprefixedDeclaration(const nsAString & aPropName, const nsAString & aRightHalfOfDecl, nsAString & aUnprefixedDecl, bool *_retval) { return NS_ERROR_NOT_IMPLEMENTED; } /* boolean generateUnprefixedGradientValue (in AString aPrefixedFuncName, in AString aPrefixedFuncBody, out AString aUnprefixedFuncName, out AString aUnprefixedFuncBody); */ NS_IMETHODIMP nsCSSUnprefixingService::GenerateUnprefixedGradientValue(const nsAString & aPrefixedFuncName, const nsAString & aPrefixedFuncBody, nsAString & aUnprefixedFuncName, nsAString & aUnprefixedFuncBody, bool *_retval) { return NS_ERROR_NOT_IMPLEMENTED; } /* End of implementation class template. */ #endif #define NS_CSSUNPREFIXINGSERVICE_CONTRACTID \ "@mozilla.org/css-unprefixing-service;1" #endif /* __gen_nsICSSUnprefixingService_h__ */
/*D************************************************************/ /* modul: free a buffer */ /* */ /* copyright: yafra.org, Basel, Switzerland */ /**************************************************************/ #include <stdio.h> #include <stdlib.h> #include <mpdef.h> #include <mpprolib.h> static char rcsid[]="$Header: /yafra/cvsroot/mapo/source/lib/free.c,v 1.3 2008-11-23 15:44:39 mwn Exp $"; /*************************************************************** * function: free a memory pointer * ***************************************************************/ void MPfree(void *ptr) { if (ptr != NULL) free(ptr); ptr = NULL; } /*************************************************************** * function: free up a MEMOBJ * ***************************************************************/ void MPfreeobj(MEMOBJ *memobj) { if (memobj->buffer != NULL) free(memobj->buffer); memobj->buffer = 0; memobj->datalen = 0; memobj->alloclen = 0; } /*************************************************************** * function: free up an array * ***************************************************************/ void MPfreearray(char **ptr, int arraysize) { int i; // TODO on other than HP-UX bugy - check if still valid with XP+ or Ubuntu /* free arrays */ for (i=0; i<arraysize; i++) { if (ptr[i] != NULL) free((void *)ptr[i]); } /* free pointer to arrays */ if (ptr != NULL) free((void *)ptr); }
// // Copyright 2012 Lolay, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // #import <Foundation/Foundation.h> @interface NSDate (Lolay) - (NSInteger) ageForCalendar:(NSCalendar*) calendar; - (NSInteger) age; + (NSInteger) ageFromDate:(NSDate*) date; + (NSInteger) ageFromDate:(NSDate*) date calendar:(NSCalendar*) calendar; - (NSString*) rfc1123String; + (NSString*) rfc1123StringFromDate:(NSDate*) date; - (NSString*) iso8601BasicString; + (NSString*) iso8601BasicStringFromDate:(NSDate*) date; + (NSDate *) dateFromISO8601String: (NSString *)anISO8601String; - (NSString*) iso8601ExtendedString; + (NSString*) iso8601ExtendedStringFromDate:(NSDate*) date; - (BOOL) isEarlierThan:(NSDate*) date; - (BOOL) isLaterThan:(NSDate*) date; + (NSDate*) midnight; + (NSDate*) midnightForDate:(NSDate*) date; - (NSDate*) midnight; - (NSInteger)daysBetween:(NSDate *)compareDate; @end
/* 参考akQuan的思路,记录最晚开始时间,使用暴力的全局搜索 * 获得最好结果。 */ #include <stdio.h> #include <time.h> #include <string.h> int a[30][4], n, vis[30]; int sum, max; void dfs(int time) { int i; for (i = 0; i < n; i++) { if (a[i][3]>=time && vis[i] == 0) { sum += a[i][0]; vis[i] = 1; if (max<sum) { max = sum; } dfs(time+a[i][1]); vis[i] = 0; sum -= a[i][0]; } } } int main(int argc, char* argv[]) { int i; freopen("input.txt", "r", stdin); double start, end; start = clock(); while (scanf("%d", &n), n>0) { //printf("%d\n", n); for (i = 0; i < n; i++) { scanf("%d %d %d", &a[i][0], &a[i][1], &a[i][2]); a[i][3] = a[i][2] - a[i][1]; } sum = max = 0; memset(vis, 0, sizeof(vis)); dfs(0); printf("%d\n", max); } end = clock(); printf("%.3lf MS\n", (end-start)/1000); return 0; }
/** * @license Apache-2.0 * * Copyright (c) 2018 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "stdlib/math/base/special/clamp.h" #include "stdlib/math/base/assert/is_nan.h" #include "stdlib/math/base/assert/is_negative_zero.h" /** * Restricts a double-precision floating-point number to a specified range. * * @param v number * @param min minimum value * @param max maximum value * @return restricted value * * @example * double y = stdlib_base_clamp( 3.14, 0.0, 5.0 ); * // returns 3.14 * * @example * double y = stdlib_base_clamp( -3.14, 0.0, 5.0 ); * // returns 0.0 */ double stdlib_base_clamp( const double v, const double min, const double max ) { if ( stdlib_base_is_nan( v ) || stdlib_base_is_nan( min ) || stdlib_base_is_nan( max ) ) { return 0.0 / 0.0; // NaN } // Simple cases... if ( v < min ) { return min; } if ( v > max ) { return max; } // Special cases for handling +-0.0... if ( min == 0.0 && stdlib_base_is_negative_zero( v ) ) { return min; // +-0.0 } if ( v == 0.0 && stdlib_base_is_negative_zero( max ) ) { return max; // -0.0 } // Case: min <= v <= max return v; }
/* * 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/devicefarm/DeviceFarm_EXPORTS.h> #include <aws/devicefarm/model/BillingMethod.h> #include <aws/core/utils/memory/stl/AWSVector.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 DeviceFarm { namespace Model { /** * <p>Configuration settings for a remote access session, including billing * method.</p><p><h3>See Also:</h3> <a * href="http://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/CreateRemoteAccessSessionConfiguration">AWS * API Reference</a></p> */ class AWS_DEVICEFARM_API CreateRemoteAccessSessionConfiguration { public: CreateRemoteAccessSessionConfiguration(); CreateRemoteAccessSessionConfiguration(Aws::Utils::Json::JsonView jsonValue); CreateRemoteAccessSessionConfiguration& operator=(Aws::Utils::Json::JsonView jsonValue); Aws::Utils::Json::JsonValue Jsonize() const; /** * <p>The billing method for the remote access session.</p> */ inline const BillingMethod& GetBillingMethod() const{ return m_billingMethod; } /** * <p>The billing method for the remote access session.</p> */ inline void SetBillingMethod(const BillingMethod& value) { m_billingMethodHasBeenSet = true; m_billingMethod = value; } /** * <p>The billing method for the remote access session.</p> */ inline void SetBillingMethod(BillingMethod&& value) { m_billingMethodHasBeenSet = true; m_billingMethod = std::move(value); } /** * <p>The billing method for the remote access session.</p> */ inline CreateRemoteAccessSessionConfiguration& WithBillingMethod(const BillingMethod& value) { SetBillingMethod(value); return *this;} /** * <p>The billing method for the remote access session.</p> */ inline CreateRemoteAccessSessionConfiguration& WithBillingMethod(BillingMethod&& value) { SetBillingMethod(std::move(value)); return *this;} /** * <p>An array of Amazon Resource Names (ARNs) included in the VPC endpoint * configuration.</p> */ inline const Aws::Vector<Aws::String>& GetVpceConfigurationArns() const{ return m_vpceConfigurationArns; } /** * <p>An array of Amazon Resource Names (ARNs) included in the VPC endpoint * configuration.</p> */ inline void SetVpceConfigurationArns(const Aws::Vector<Aws::String>& value) { m_vpceConfigurationArnsHasBeenSet = true; m_vpceConfigurationArns = value; } /** * <p>An array of Amazon Resource Names (ARNs) included in the VPC endpoint * configuration.</p> */ inline void SetVpceConfigurationArns(Aws::Vector<Aws::String>&& value) { m_vpceConfigurationArnsHasBeenSet = true; m_vpceConfigurationArns = std::move(value); } /** * <p>An array of Amazon Resource Names (ARNs) included in the VPC endpoint * configuration.</p> */ inline CreateRemoteAccessSessionConfiguration& WithVpceConfigurationArns(const Aws::Vector<Aws::String>& value) { SetVpceConfigurationArns(value); return *this;} /** * <p>An array of Amazon Resource Names (ARNs) included in the VPC endpoint * configuration.</p> */ inline CreateRemoteAccessSessionConfiguration& WithVpceConfigurationArns(Aws::Vector<Aws::String>&& value) { SetVpceConfigurationArns(std::move(value)); return *this;} /** * <p>An array of Amazon Resource Names (ARNs) included in the VPC endpoint * configuration.</p> */ inline CreateRemoteAccessSessionConfiguration& AddVpceConfigurationArns(const Aws::String& value) { m_vpceConfigurationArnsHasBeenSet = true; m_vpceConfigurationArns.push_back(value); return *this; } /** * <p>An array of Amazon Resource Names (ARNs) included in the VPC endpoint * configuration.</p> */ inline CreateRemoteAccessSessionConfiguration& AddVpceConfigurationArns(Aws::String&& value) { m_vpceConfigurationArnsHasBeenSet = true; m_vpceConfigurationArns.push_back(std::move(value)); return *this; } /** * <p>An array of Amazon Resource Names (ARNs) included in the VPC endpoint * configuration.</p> */ inline CreateRemoteAccessSessionConfiguration& AddVpceConfigurationArns(const char* value) { m_vpceConfigurationArnsHasBeenSet = true; m_vpceConfigurationArns.push_back(value); return *this; } private: BillingMethod m_billingMethod; bool m_billingMethodHasBeenSet; Aws::Vector<Aws::String> m_vpceConfigurationArns; bool m_vpceConfigurationArnsHasBeenSet; }; } // namespace Model } // namespace DeviceFarm } // namespace Aws
// // YLMind.c // YLSinaBlog // // Created by LongMa on 15/11/29. // Copyright © 2015年 LongMa. All rights reserved. // /* aece6e0 HEAD@{8}: clone: from https://github.com/Dast1990/sinaBlogOC.git V1.在tabBarC基础上显示了4个子控制器的界面。设置了pch文件,测试用的xib。设置了子控制器的leftBarButtonItem属性,待完善自定义导航控制器。 V2.写UIView分类,方直接.size,.x 等快速代码 V3. 统一所有导航控制器左上角和右上角的内容。 自定义导航控制器,拦截(重写自带的方法)所有push出来的控制器(必须调用[super push方法],才能显示tabBarC的四个子控制器) 通过push方法中控制器参数,设置器左上角和右上角的内容(当导航控制器的子控制器数大于1时,才设置导航栏的左右item) 隐藏tabbar(无效:[super push方法]位置不对,要放在最后) V4.取消创建随机色(不合理),设置window颜色为白色。 V5在pct中增加了YLLOG(…) debug下取代NSLog的代码 V6.封装了UIBarButtonItem+Extension 分类文件,方便以后UIBarButtonItem类属性 的创建。 V7.向首页增加了左右item,点击item的方法暂时未实现(找朋友和扫二维码); 在导航控制器的 +initialize 方法中 设置导航栏全局样式. V8.在消息界面为导航栏右item设置文字,设置为不可用,并使之显示为亮灰色。 切换界面回来(viewWillAppear重新设置了颜色为亮灰色)又变回了全局橘色,why? A:因为appearance设置会与tinitColor会冲突。 不设置tinitColor而在全局对象设置不可用状态颜色就好了! V9.设置发现界面导航栏的搜索框 */
#include "pd_ringbuffer.h" #include "pd_log.h" int pd_ringbuffer_init(struct PdRingBuffer *rb) { int ret = 0; if (NULL == rb) { PD_LOG(WARN, "ringbuffer null pointer"); ret = -1; } else if (NULL == (rb->buf = (char*)malloc(PD_RING_BUF_LEN))) { PD_LOG(WARN, "alloc ringbuffer fail, this=%p", rb); ret = -1; } else { rb->consumer = 0; rb->producer = 0; } return ret; } void pd_ringbuffer_destroy(struct PdRingBuffer *rb) { if (NULL != rb && NULL != rb->buf) { free(rb->buf); } } char* pd_ringbuffer_get_producer_buffer(struct PdRingBuffer *rb) { char *ret = NULL; if (NULL == rb) { PD_LOG(WARN, "ringbuffer null pointer"); } else if (PD_RING_BUF_LEN <= (rb->producer - rb->consumer)) { PD_LOG(DEBUG, "ringbuffer full, this=%p", rb); } else { int64_t normal_producer = rb->producer % PD_RING_BUF_LEN; ret = rb->buf + normal_producer; } return ret; } char* pd_ringbuffer_get_consumer_buffer(struct PdRingBuffer *rb) { char *ret = NULL; if (NULL == rb) { PD_LOG(WARN, "ringbuffer null pointer"); } else if (0 >= (rb->producer - rb->consumer)) { PD_LOG(DEBUG, "ringbuffer empty, this=%p", rb); } else { int64_t normal_consumer = rb->consumer % PD_RING_BUF_LEN; ret = rb->buf + normal_consumer; } return ret; } int pd_ringbuffer_get_producer_length(struct PdRingBuffer *rb) { int ret = 0; if (NULL == rb) { PD_LOG(WARN, "ringbuffer null pointer"); } else if (PD_RING_BUF_LEN <= (rb->producer - rb->consumer)) { PD_LOG(DEBUG, "ringbuffer full, this=%p", rb); } else { int64_t normal_producer = rb->producer % PD_RING_BUF_LEN; int64_t remainder = PD_RING_BUF_LEN - (rb->producer - rb->consumer); if ((normal_producer + remainder) <= PD_RING_BUF_LEN) { ret = (int)remainder; } else { ret = (int)(PD_RING_BUF_LEN - normal_producer); } } return ret; } int pd_ringbuffer_get_consumer_length(struct PdRingBuffer *rb) { int ret = 0; if (NULL == rb) { PD_LOG(WARN, "ringbuffer null pointer"); } else if (0 >= (ret = (int)(rb->producer - rb->consumer))) { PD_LOG(DEBUG, "ringbuffer empty, this=%p", rb); } else { int64_t normal_consumer = rb->consumer % PD_RING_BUF_LEN; int64_t remainder = rb->producer - rb->consumer; if ((normal_consumer + remainder) <= PD_RING_BUF_LEN) { ret = (int)remainder; } else { ret = (int)(PD_RING_BUF_LEN - normal_consumer); } } return ret; } void pd_ringbuffer_produce(struct PdRingBuffer *rb, const int length) { if (NULL == rb) { PD_LOG(WARN, "ringbuffer null pointer"); } else if (PD_RING_BUF_LEN < (length + rb->producer - rb->consumer)) { PD_LOG(DEBUG, "ringbuffer will full, this=%p", rb); } else { rb->producer += length; } } void pd_ringbuffer_consume(struct PdRingBuffer *rb, const int length) { if (NULL == rb) { PD_LOG(WARN, "ringbuffer null pointer"); } else if (0 > (rb->producer - rb->consumer - length)) { PD_LOG(DEBUG, "ringbuffer will empty, this=%p", rb); } else { rb->consumer += length; } } int pd_ringbuffer_get_free(struct PdRingBuffer *rb) { int ret = -1; if (NULL == rb) { PD_LOG(WARN, "ringbuffer null pointer"); } else { ret = (int)(PD_RING_BUF_LEN - (rb->producer - rb->consumer)); } return ret; } int pd_ringbuffer_get_total(struct PdRingBuffer *rb) { int ret = -1; if (NULL == rb) { PD_LOG(WARN, "ringbuffer null pointer"); } else { ret = (int)(rb->producer - rb->consumer); } return ret; }
/** ****************************************************************************** * @file TIM/TIM_OCToggle/stm32f4xx_conf.h * @author MCD Application Team * @version V1.2.0 * @date 19-September-2013 * @brief Library configuration file. ****************************************************************************** * @attention * * <h2><center>&copy; COPYRIGHT 2013 STMicroelectronics</center></h2> * * Licensed under MCD-ST Liberty SW License Agreement V2, (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.st.com/software_license_agreement_liberty_v2 * * 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. * ****************************************************************************** */ /* Define to prevent recursive inclusion -------------------------------------*/ #ifndef __STM32F4xx_CONF_H #define __STM32F4xx_CONF_H /* Includes ------------------------------------------------------------------*/ /* Uncomment the line below to enable peripheral header file inclusion */ #include "stm32f4xx_adc.h" #include "stm32f4xx_crc.h" #include "stm32f4xx_dbgmcu.h" #include "stm32f4xx_dma.h" #include "stm32f4xx_exti.h" #include "stm32f4xx_flash.h" #include "stm32f4xx_gpio.h" #include "stm32f4xx_i2c.h" #include "stm32f4xx_iwdg.h" #include "stm32f4xx_pwr.h" #include "stm32f4xx_rcc.h" #include "stm32f4xx_rtc.h" #include "stm32f4xx_sdio.h" #include "stm32f4xx_spi.h" #include "stm32f4xx_syscfg.h" #include "stm32f4xx_tim.h" #include "stm32f4xx_usart.h" #include "stm32f4xx_wwdg.h" #include "misc.h" /* High level functions for NVIC and SysTick (add-on to CMSIS functions) */ #if defined (STM32F429_439xx) #include "stm32f4xx_cryp.h" #include "stm32f4xx_hash.h" #include "stm32f4xx_rng.h" #include "stm32f4xx_can.h" #include "stm32f4xx_dac.h" #include "stm32f4xx_dcmi.h" #include "stm32f4xx_dma2d.h" #include "stm32f4xx_fmc.h" #include "stm32f4xx_ltdc.h" #include "stm32f4xx_sai.h" #endif /* STM32F429_439xx */ #if defined (STM32F427_437xx) #include "stm32f4xx_cryp.h" #include "stm32f4xx_hash.h" #include "stm32f4xx_rng.h" #include "stm32f4xx_can.h" #include "stm32f4xx_dac.h" #include "stm32f4xx_dcmi.h" #include "stm32f4xx_dma2d.h" #include "stm32f4xx_fmc.h" #include "stm32f4xx_sai.h" #endif /* STM32F427_437xx */ #if defined (STM32F40_41xxx) #include "stm32f4xx_cryp.h" #include "stm32f4xx_hash.h" #include "stm32f4xx_rng.h" #include "stm32f4xx_can.h" #include "stm32f4xx_dac.h" #include "stm32f4xx_dcmi.h" #include "stm32f4xx_fsmc.h" #endif /* STM32F40_41xxx */ /* Exported types ------------------------------------------------------------*/ /* Exported constants --------------------------------------------------------*/ /* If an external clock source is used, then the value of the following define should be set to the value of the external clock source, else, if no external clock is used, keep this define commented */ /*#define I2S_EXTERNAL_CLOCK_VAL 12288000 */ /* Value of the external clock in Hz */ /* Uncomment the line below to expanse the "assert_param" macro in the Standard Peripheral Library drivers code */ /* #define USE_FULL_ASSERT 1 */ /* Exported macro ------------------------------------------------------------*/ #ifdef USE_FULL_ASSERT /** * @brief The assert_param macro is used for function's parameters check. * @param expr: If expr is false, it calls assert_failed function which reports * the name of the source file and the source line number of the call * that failed. If expr is true, it returns no value. * @retval None */ #define assert_param(expr) ((expr) ? (void)0 : assert_failed((uint8_t *)__FILE__, __LINE__)) /* Exported functions ------------------------------------------------------- */ void assert_failed(uint8_t* file, uint32_t line); #else #define assert_param(expr) ((void)0) #endif /* USE_FULL_ASSERT */ #endif /* __STM32F4xx_CONF_H */ /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
/* * Copyright 2010-2016 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/workspaces/WorkSpaces_EXPORTS.h> #include <aws/workspaces/WorkSpacesRequest.h> #include <aws/core/utils/memory/stl/AWSVector.h> #include <aws/workspaces/model/StartRequest.h> namespace Aws { namespace WorkSpaces { namespace Model { /** */ class AWS_WORKSPACES_API StartWorkspacesRequest : public WorkSpacesRequest { public: StartWorkspacesRequest(); Aws::String SerializePayload() const override; Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** * <p>The requests.</p> */ inline const Aws::Vector<StartRequest>& GetStartWorkspaceRequests() const{ return m_startWorkspaceRequests; } /** * <p>The requests.</p> */ inline void SetStartWorkspaceRequests(const Aws::Vector<StartRequest>& value) { m_startWorkspaceRequestsHasBeenSet = true; m_startWorkspaceRequests = value; } /** * <p>The requests.</p> */ inline void SetStartWorkspaceRequests(Aws::Vector<StartRequest>&& value) { m_startWorkspaceRequestsHasBeenSet = true; m_startWorkspaceRequests = value; } /** * <p>The requests.</p> */ inline StartWorkspacesRequest& WithStartWorkspaceRequests(const Aws::Vector<StartRequest>& value) { SetStartWorkspaceRequests(value); return *this;} /** * <p>The requests.</p> */ inline StartWorkspacesRequest& WithStartWorkspaceRequests(Aws::Vector<StartRequest>&& value) { SetStartWorkspaceRequests(value); return *this;} /** * <p>The requests.</p> */ inline StartWorkspacesRequest& AddStartWorkspaceRequests(const StartRequest& value) { m_startWorkspaceRequestsHasBeenSet = true; m_startWorkspaceRequests.push_back(value); return *this; } /** * <p>The requests.</p> */ inline StartWorkspacesRequest& AddStartWorkspaceRequests(StartRequest&& value) { m_startWorkspaceRequestsHasBeenSet = true; m_startWorkspaceRequests.push_back(value); return *this; } private: Aws::Vector<StartRequest> m_startWorkspaceRequests; bool m_startWorkspaceRequestsHasBeenSet; }; } // namespace Model } // namespace WorkSpaces } // namespace Aws
//===-- tsan_clock.h --------------------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // This file is a part of ThreadSanitizer (TSan), a race detector. // //===----------------------------------------------------------------------===// #ifndef TSAN_CLOCK_H #define TSAN_CLOCK_H #include "tsan_defs.h" #include "tsan_vector.h" namespace __tsan { // The clock that lives in sync variables (mutexes, atomics, etc). class SyncClock { public: SyncClock(); uptr size() const { return clk_.Size(); } void Reset() { clk_.Reset(); } private: Vector<u64> clk_; friend struct ThreadClock; }; // The clock that lives in threads. struct ThreadClock { public: ThreadClock(); u64 get(unsigned tid) const { DCHECK_LT(tid, kMaxTidInClock); return clk_[tid]; } void set(unsigned tid, u64 v) { DCHECK_LT(tid, kMaxTid); DCHECK_GE(v, clk_[tid]); clk_[tid] = v; if (nclk_ <= tid) nclk_ = tid + 1; } void tick(unsigned tid) { DCHECK_LT(tid, kMaxTid); clk_[tid]++; if (nclk_ <= tid) nclk_ = tid + 1; } uptr size() const { return nclk_; } void acquire(const SyncClock *src); void release(SyncClock *dst) const; void acq_rel(SyncClock *dst); void ReleaseStore(SyncClock *dst) const; private: uptr nclk_; u64 clk_[kMaxTidInClock]; }; } // namespace __tsan #endif // TSAN_CLOCK_H
// // NIMLocationContentConfig.h // NIMKit // // Created by amao on 9/15/15. // Copyright (c) 2015 NetEase. All rights reserved. // #import "NIMBaseSessionContentConfig.h" @interface NIMLocationContentConfig : NIMBaseSessionContentConfig<NIMSessionContentConfig> @end
/* * 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/mobile/Mobile_EXPORTS.h> #include <aws/mobile/MobileRequest.h> #include <aws/core/utils/memory/stl/AWSString.h> #include <utility> namespace Aws { namespace Mobile { namespace Model { /** * <p> Request structure used in requests to export project configuration details. * </p><p><h3>See Also:</h3> <a * href="http://docs.aws.amazon.com/goto/WebAPI/mobile-2017-07-01/ExportProjectRequest">AWS * API Reference</a></p> */ class AWS_MOBILE_API ExportProjectRequest : public MobileRequest { public: ExportProjectRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "ExportProject"; } Aws::String SerializePayload() const override; /** * <p> Unique project identifier. </p> */ inline const Aws::String& GetProjectId() const{ return m_projectId; } /** * <p> Unique project identifier. </p> */ inline void SetProjectId(const Aws::String& value) { m_projectIdHasBeenSet = true; m_projectId = value; } /** * <p> Unique project identifier. </p> */ inline void SetProjectId(Aws::String&& value) { m_projectIdHasBeenSet = true; m_projectId = std::move(value); } /** * <p> Unique project identifier. </p> */ inline void SetProjectId(const char* value) { m_projectIdHasBeenSet = true; m_projectId.assign(value); } /** * <p> Unique project identifier. </p> */ inline ExportProjectRequest& WithProjectId(const Aws::String& value) { SetProjectId(value); return *this;} /** * <p> Unique project identifier. </p> */ inline ExportProjectRequest& WithProjectId(Aws::String&& value) { SetProjectId(std::move(value)); return *this;} /** * <p> Unique project identifier. </p> */ inline ExportProjectRequest& WithProjectId(const char* value) { SetProjectId(value); return *this;} private: Aws::String m_projectId; bool m_projectIdHasBeenSet; }; } // namespace Model } // namespace Mobile } // namespace Aws
/** * @license Apache-2.0 * * Copyright (c) 2021 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "stdlib/math/base/ops/caddf.h" #include "stdlib/complex/float32.h" #include "stdlib/complex/reimf.h" /** * Adds two single-precision complex floating-point numbers. * * @param z1 input value * @param z2 input value * @return result * * @example * #include "stdlib/complex/float32.h" * #include "stdlib/complex/realf.h" * #include "stdlib/complex/imagf.h" * * stdlib_complex64_t z = stdlib_complex64( 3.0f, -2.0f ); * * stdlib_complex64_t out = stdlib_base_caddf( z, z ); * * float re = stdlib_realf( out ); * // returns 6.0f * * float im = stdlib_imagf( out ); * // returns -4.0f */ stdlib_complex64_t stdlib_base_caddf( const stdlib_complex64_t z1, const stdlib_complex64_t z2 ) { float re1; float re2; float im1; float im2; float re; float im; stdlib_reimf( z1, &re1, &im1 ); stdlib_reimf( z2, &re2, &im2 ); re = re1 + re2; im = im1 + im2; return stdlib_complex64( re, im ); }