text
stringlengths
4
6.14k
#ifndef SUBTITLELANGUAGE_H #define SUBTITLELANGUAGE_H #include <QtCore> #include <QList> #include <QLocale> class SubtitleLanguage { public: SubtitleLanguage(QString displayName, QString optionId); QString displayName() const { return m_displayName; } QString optionId() const { return m_optionId; } static QList<SubtitleLanguage> getAll(); static SubtitleLanguage getDefault(); private: QString m_displayName; QString m_optionId; }; #endif // SUBTITLELANGUAGE_H
#ifndef __IO_h__ #define __IO_h__ #include <stdio.h> #include <stdlib.h> //malloc() #include "dbg.h" int get_ints(int len, int *num) { // Retrieve len white space seperated integers and place // them in the array num. // http://stackoverflow.com/questions/2539796/c-reading-multiple-numbers-from-single-input-line-scanf if(len == 0) return 0; //Do nothing in case of empty list int i, rc; debug("get_ints: len = %d", len); for(i=0; i<len; i++){ rc = scanf("%d", &num[i]); debug("get_ints: [%d] = %d", i, num[i]); check(rc > 0, "You have to enter a number"); } return 0; error: if(num) free(num); return 1; } int read_word(int max_len, char *target){ // Ignores all leading whitespace and stops at the first whitespace or // when max_len is reached. target is always null-terminated char new_char; int i; while((new_char = fgetc(stdin) != ' ') && (new_char != '\n') && (new_char != '\0') && (new_char == '\t')); for(i = 0; i < max_len - 1; i++){ new_char = (char) fgetc(stdin); debug("read_word: i = %d, new_char = '%c'.", i, new_char); target[i] = new_char; if((new_char == ' ') || (new_char == '\n') || (new_char == '\0') || (new_char == '\t')){ break; } } new_char = '\0'; target[i] = new_char; debug("read_word: i = %d, new_char = '%c'", i, new_char); return i; } int int_print(int len, int *num){ check(len >= 0, "int_print: bad argument: len = %d.", len); check_mem(num); int i; for(i = 0; i < len; i++){ printf("%d ", num[i]); } printf("\n"); return 0; error: return 1; } #endif
/* foo2.c */ #include <stdio.h> void f(void); int x = 1234; int y = 5678; int main() { f(); printf("x = 0x%x y = 0x%x \n", x, y); return 0; }
//Ö÷Á÷³Ì void mainLoop(void);
#include "walker.h" #include <stdlib.h> // malloc #include <sys/types.h> // fstat, open #include <sys/stat.h> // fstat, open #include <unistd.h> // fstat #include <fcntl.h> // open #include <sys/syscall.h> // syscall #include <stdio.h> // perror, sprintf #include <pwd.h> // getpwuid #include <grp.h> // getgrgid void * safe_malloc(size_t size) { void * x = malloc(size); if (x == NULL) { perror("malloc()"); exit(-1); } return x; } void safe_stat(const char* filename, struct stat *buf) { if ( stat(filename, buf) != 0 ) { perror("stat()"); exit(-1); } } void safe_fstat(int fd, struct stat *buf) { if ( fstat(fd, buf) != 0 ) { perror("fstat()"); exit(-1); } } void safe_lstat(const char* filename, struct stat *buf) { if ( lstat(filename, buf) != 0 ) { perror("lstat()"); exit(-1); } } int safe_open(const char *pathname) { int f = open(pathname, WALK_INIT_FLAGS); if (f == -1) { perror(pathname); exit(-1); } return f; } int safe_openat(int f_base, const char *pathname) { int f = openat(f_base, pathname, WALK_FLAGS); if (f == -1) { perror(pathname); // Don't exit } return f; } int safe_getdents(int f, char* buffer) { int ret = syscall(SYS_getdents, f, buffer, WALK_BUFFERSIZE); if (ret == -1) { perror("getdents()"); exit(-1); } return ret; } void getusrgrp(uid_t uid, gid_t gid, char* usr, char* grp) { struct passwd * p = getpwuid(uid); struct group * g = getgrgid(gid); if (p != NULL) { sprintf(usr, "%s", p->pw_name); } else { sprintf(usr, "%d", uid); } if (g != NULL) { sprintf(grp, "%s", g->gr_name); } else { sprintf(grp, "%d", gid); } } void getsizeid(struct stat * s, char* sizeid) { switch (s->st_mode & S_IFMT) { case S_IFCHR: case S_IFBLK: sprintf(sizeid, "0x%x", (unsigned) s->st_rdev); break; default: sprintf(sizeid, "%d", (int) s->st_size); break; } } void getlinkcontents(struct stat * s, const char* path, char* buf, size_t bufsiz) { if ((s->st_mode & S_IFMT) == S_IFLNK) { sprintf(buf, "-> "); size_t ret = readlink(path, &buf[3], bufsiz-3); if (ret == -1) { perror("readlink()"); exit(-1); } if (ret + 3 < bufsiz) buf[ret + 3] = '\0'; else buf[bufsiz-1] = '\0'; } else { buf[0] = '\0'; } }
// // AppDelegate.h // SushiCombos // // Created by NEIL DINGMAN on 3/12/12. // Copyright (c) 2012 __MyCompanyName__. All rights reserved. // #import <UIKit/UIKit.h> @interface AppDelegate : UIResponder <UIApplicationDelegate> @property (strong, nonatomic) UIWindow *window; @property (readonly, strong, nonatomic) NSManagedObjectContext *managedObjectContext; @property (readonly, strong, nonatomic) NSManagedObjectModel *managedObjectModel; @property (readonly, strong, nonatomic) NSPersistentStoreCoordinator *persistentStoreCoordinator; - (void)saveContext; - (NSURL *)applicationDocumentsDirectory; @property (strong, nonatomic) UINavigationController *navigationController; @end
/* * DO NOT EDIT -- generated by the Makefile */ #if !defined(__HAVE_FPOS_POS_H__) #define __HAVE_FPOS_POS_H__ /* do we have fgetpos & fsetpos functions? */ #undef HAVE_FPOS_POS /* no */ #undef FPOS_POS_BITS #endif /* !__HAVE_FPOS_POS_H__ */
/* * Main module header. * Contains some i18n stuff, module versioning, * config and public prototypes from main. */ #ifndef E_MOD_MAIN_H #define E_MOD_MAIN_H typedef struct _Xkb { E_Module *module; E_Config_Dialog *cfd; Ecore_Event_Handler *evh; } Xkb; /* Prototypes */ void _xkb_update_icon(int); E_Config_Dialog *_xkb_cfg_dialog(E_Comp *comp, const char *params); extern Xkb _xkb; #endif
#ifndef LwirCamera_h #define LwirCamera_h /** This is free and unencumbered software released into the public domain. The authors of ISIS do not claim copyright on the contents of this file. For more details about the LICENSE terms and the AUTHORS, you will find files of those names at the top level of this repository. **/ /* SPDX-License-Identifier: CC0-1.0 */ #include "FramingCamera.h" namespace Isis { /** * This is the camera model for the Clementine Long-Wavelength Infrared Camera * * @ingroup SpiceInstrumentsAndCameras * @ingroup Clementine * * @see * http://astrogeology.usgs.gov/Projects/Clementine/nasaclem/sensors/lwir/lwir.html * @see * http://astrogeology.usgs.gov/Projects/Clementine/nasaclem/clemhome.html * @see http://pds-imaging.jpl.nasa.gov/portal/clementine_mission.html * @see http://astrogeology.usgs.gov/Missions/Clementine * * @author 2009-01-16 Jeannie Walldren * * @internal * @history 2009-01-22 Jeannie Walldren - Original Version * @history 2009-08-28 Steven Lambright - Changed inheritance to no longer * inherit directly from Camera. Camera is now pure * virtual, parent class is FramingCamera. * @history 2010-09-16 Steven Lambright - Updated unitTest to not use a DEM. * @history 2011-01-14 Travis Addair - Added new CK/SPK accessor methods, * pure virtual in Camera, implemented in mission * specific cameras. * @history 2011-02-09 Steven Lambright - Major changes to camera classes. * @history 2011-05-03 Jeannie Walldren - Added ShutterOpenCloseTimes() * method. Updated unitTest to test for new methods. * Updated documentation. Replaced Clementine * namespace wrap with Isis namespace. Added Isis * Disclaimer to files. Added NAIF error check to * constructor. Changed centertime in constructor to * add half exposure duration to start time to * maintain consistency with other Clementine models. * @history 2012-07-06 Debbie A. Cook, Updated Spice members to be more compliant with Isis * coding standards. References #972. * @history 2015-08-12 Ian Humphrey and Makayla Shepherd - Added new data members and methods * to get spacecraft and instrument names. Extended unit test to test * these methods. * @history 2015-10-16 Ian Humphrey - Removed declarations of spacecraft and instrument * members and methods and removed implementation of these methods * since Camera now handles this. References #2335. */ class LwirCamera : public FramingCamera { public: LwirCamera(Cube &cube); //! Destroys the LwirCamera object ~LwirCamera() {}; virtual std::pair <iTime, iTime> ShutterOpenCloseTimes(double time, double exposureDuration); /** * CK frame ID - - Instrument Code from spacit run on CK * * @return @b int The appropriate instrument code for the "Camera-matrix" * Kernel Frame ID */ virtual int CkFrameId() const { return (-40000); } /** * CK Reference ID - J2000 * * @return @b int The appropriate instrument code for the "Camera-matrix" * Kernel Reference ID */ virtual int CkReferenceId() const { return (1); } /** * SPK Reference ID - J2000 * * @return @b int The appropriate instrument code for the Spacecraft * Kernel Reference ID */ virtual int SpkReferenceId() const { return (1); } }; }; #endif
#ifdef E_MOD_PHOTO_TYPEDEFS typedef struct _Picture_Local_Dir Picture_Local_Dir; #else #ifndef PHOTO_PICTURE_LOCAL_H_INCLUDED #define PHOTO_PICTURE_LOCAL_H_INCLUDED #define PICTURE_LOCAL_SHOW_LOGO_DEFAULT 1 #define PICTURE_LOCAL_IMPORT_RECURSIVE_DEFAULT 0 #define PICTURE_LOCAL_IMPORT_HIDDEN_DEFAULT 0 #define PICTURE_LOCAL_AUTO_RELOAD_DEFAULT 0 #define PICTURE_LOCAL_POPUP_LOADER_MOD 500 #define PICTURE_LOCAL_POPUP_LOADER_TIME 2 #define PICTURE_LOCAL_POPUP_THUMB_MOD 250 #define PICTURE_LOCAL_POPUP_THUMB_TIME 2 #define PICTURE_LOCAL_POPUP_DEFAULT 2 #define PICTURE_LOCAL_POPUP_NEVER 0 #define PICTURE_LOCAL_POPUP_SUM 1 #define PICTURE_LOCAL_POPUP_ALWAYS 2 #define PICTURE_LOCAL_DIR_NOT_LOADED 0 #define PICTURE_LOCAL_DIR_LOADED 1 #define PICTURE_LOCAL_DIR_LOADING 2 #define PICTURE_LOCAL_DIR_RECURSIVE_DEFAULT 0 #define PICTURE_LOCAL_DIR_READ_HIDDEN_DEFAULT 0 #define PICTURE_LOCAL_GET_RANDOM -1 struct _Picture_Local_Dir { const char *path; int recursive; int read_hidden; int state; E_Config_Dialog *config_dialog; }; int photo_picture_local_init(void); void photo_picture_local_shutdown(void); void photo_picture_local_load_start(void); void photo_picture_local_load_stop(void); int photo_picture_local_load_state_get(void); Picture *photo_picture_local_get(int position); int photo_picture_local_loaded_nb_get(void); int photo_picture_local_tothumb_nb_get(void); void photo_picture_local_ev_set(Photo_Item *pi); void photo_picture_local_ev_raise(int nb); Picture_Local_Dir *photo_picture_local_dir_new(char *path, int recursive, int read_hidden); void photo_picture_local_dir_free(Picture_Local_Dir *dir, int del_dialog); void photo_picture_local_picture_deleteme_nb_update(int how_much); #endif #endif
/* * Tencent is pleased to support the open source community by making * WCDB available. * * Copyright (C) 2017 THL A29 Limited, a Tencent company. * All rights reserved. * * Licensed under the BSD 3-Clause License (the "License"); you may not use * this file except in compliance with the License. You may obtain a copy of * the License at * * https://opensource.org/licenses/BSD-3-Clause * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #import <Foundation/Foundation.h> #import <WCDB/WCTCoding.h> #import <WCDB/WCTCodingMacro.h> #import <WCDB/WCTProperty.h> /** Builtin ORM for "sqlite_sequence" table. For further information, see https://sqlite.org/autoinc.html . */ @interface WCTSequence : NSObject <WCTTableCoding> + (NSString *)TableName; @property(nonatomic, retain) NSString *name; @property(nonatomic, assign) int seq; WCDB_PROPERTY(name) WCDB_PROPERTY(seq) @end
/********************************************************************* * SEGGER MICROCONTROLLER GmbH & Co. KG * * Solutions for real time microcontroller applications * ********************************************************************** * * * (c) 2003-2010 SEGGER Microcontroller GmbH & Co KG * * * * Internet: www.segger.com Support: support@segger.com * * * ********************************************************************** **** emFile file system for embedded applications **** emFile is protected by international copyright laws. Knowledge of the source code may not be used to write a similar product. This file may only be used in accordance with a license and should not be re- distributed in any way. We appreciate your understanding and fairness. ---------------------------------------------------------------------- File : SEGGER.h Purpose : Global types etc & general purpose utility functions ---------------------------END-OF-HEADER------------------------------ */ #ifndef SEGGER_H // Guard against multiple inclusion #define SEGGER_H #include "Global.h" // Type definitions: U8, U16, U32, I8, I16, I32 #if defined(__cplusplus) extern "C" { /* Make sure we have C-declarations in C++ programs */ #endif /********************************************************************* * * Function-like macros * ********************************************************************** */ #define SEGGER_COUNTOF(a) (sizeof(a)/sizeof(a[0])) #define SEGGER_MIN(a,b) (((a) < (b)) ? (a) : (b)) #define SEGGER_MAX(a,b) (((a) > (b)) ? (a) : (b)) /********************************************************************* * * Utiliy functions * ********************************************************************** */ void SEGGER_ARM_memcpy(void * pDest, const void * pSrc, int NumBytes); void SEGGER_memcpy (void * pDest, const void * pSrc, int NumBytes); void SEGGER_snprintf(char * pBuffer, int BufferSize, const char * sFormat, ...); #if defined(__cplusplus) } /* Make sure we have C-declarations in C++ programs */ #endif #endif // Avoid multiple inclusion /*************************** 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/logs/CloudWatchLogs_EXPORTS.h> #include <aws/logs/CloudWatchLogsRequest.h> #include <aws/core/utils/memory/stl/AWSString.h> namespace Aws { namespace CloudWatchLogs { namespace Model { /** */ class AWS_CLOUDWATCHLOGS_API DeleteSubscriptionFilterRequest : public CloudWatchLogsRequest { public: DeleteSubscriptionFilterRequest(); Aws::String SerializePayload() const override; Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** * <p>The name of the log group that is associated with the subscription filter to * delete.</p> */ inline const Aws::String& GetLogGroupName() const{ return m_logGroupName; } /** * <p>The name of the log group that is associated with the subscription filter to * delete.</p> */ inline void SetLogGroupName(const Aws::String& value) { m_logGroupNameHasBeenSet = true; m_logGroupName = value; } /** * <p>The name of the log group that is associated with the subscription filter to * delete.</p> */ inline void SetLogGroupName(Aws::String&& value) { m_logGroupNameHasBeenSet = true; m_logGroupName = value; } /** * <p>The name of the log group that is associated with the subscription filter to * delete.</p> */ inline void SetLogGroupName(const char* value) { m_logGroupNameHasBeenSet = true; m_logGroupName.assign(value); } /** * <p>The name of the log group that is associated with the subscription filter to * delete.</p> */ inline DeleteSubscriptionFilterRequest& WithLogGroupName(const Aws::String& value) { SetLogGroupName(value); return *this;} /** * <p>The name of the log group that is associated with the subscription filter to * delete.</p> */ inline DeleteSubscriptionFilterRequest& WithLogGroupName(Aws::String&& value) { SetLogGroupName(value); return *this;} /** * <p>The name of the log group that is associated with the subscription filter to * delete.</p> */ inline DeleteSubscriptionFilterRequest& WithLogGroupName(const char* value) { SetLogGroupName(value); return *this;} /** * <p>The name of the subscription filter to delete.</p> */ inline const Aws::String& GetFilterName() const{ return m_filterName; } /** * <p>The name of the subscription filter to delete.</p> */ inline void SetFilterName(const Aws::String& value) { m_filterNameHasBeenSet = true; m_filterName = value; } /** * <p>The name of the subscription filter to delete.</p> */ inline void SetFilterName(Aws::String&& value) { m_filterNameHasBeenSet = true; m_filterName = value; } /** * <p>The name of the subscription filter to delete.</p> */ inline void SetFilterName(const char* value) { m_filterNameHasBeenSet = true; m_filterName.assign(value); } /** * <p>The name of the subscription filter to delete.</p> */ inline DeleteSubscriptionFilterRequest& WithFilterName(const Aws::String& value) { SetFilterName(value); return *this;} /** * <p>The name of the subscription filter to delete.</p> */ inline DeleteSubscriptionFilterRequest& WithFilterName(Aws::String&& value) { SetFilterName(value); return *this;} /** * <p>The name of the subscription filter to delete.</p> */ inline DeleteSubscriptionFilterRequest& WithFilterName(const char* value) { SetFilterName(value); return *this;} private: Aws::String m_logGroupName; bool m_logGroupNameHasBeenSet; Aws::String m_filterName; bool m_filterNameHasBeenSet; }; } // namespace Model } // namespace CloudWatchLogs } // namespace Aws
editCreateWorkout: editorButtons: segmentRowButtons: bBegin Set Error Capture [ On ] Allow User Abort [ Off ] # #Capture the segment number. Set Variable [ $segment; Value:Right ( Get ( ActiveLayoutObjectName ) ; 2 ) ] # #If stop variable is not blank then exit script as this #this script was just gone thru and needs stop or it #it will keep going forever. If [ $$stop ≠ "" ] Exit Script [ ] End If # #This script step insures that a workouts time #cannot be modified and then used without re-totaling #the workout first to take account of the modification. Set Field [ activity::go; "" ] # #If field is occupied then clear it and exit script. If [ Get ( ActiveFieldContents ) ≠ "" ] Set Field [ "" ] Go to Field [ ] Exit Script [ ] End If # #Exit script if aEnd is not set. If [ activity::rowAend = "" ] Go to Field [ ] Show Custom Dialog [ Message: "Set the end segment for the first row before setting the beginning segment for this second row."; Buttons: “OK” ] Exit Script [ ] End If # #If selected beginning happens after the end, tell user #that this cannot make a repeat happen and exit sript. If [ $segment > GetValue ( activity::rowAend ; 1 ) ] Go to Field [ ] Show Custom Dialog [ Message: "You have the 2nd row starting after the 1st row ends. These rows must overlap."; Buttons: “OK” ] Refresh Window Exit Script [ ] End If # #Stop icon load script to keep variables from being changed. Set Variable [ $$stopIconInsert; Value:1 ] # #To prevent a logic loop set the stop variable to 1. Set Variable [ $$stop; Value:1 ] # #Collect row ending icon information. Go to Object [ Object Name: "icon" & GetValue ( activity::rowAend ; 1 ) ] January 8, 平成26 12:54:59 Fat and Muscle Efficiency Research.fp7 - bBegin -1-editCreateWorkout: editorButtons: segmentRowButtons: bBegin Set Variable [ $$end; Value:Get ( ActiveFieldContents ) ] Go to Object [ Object Name: "zone" & GetValue ( activity::rowAend ; 1 ) ] Set Variable [ $$endZone; Value:Get ( ActiveFieldContents ) ] Set Variable [ $$endMultiplier; Value:Case ( $$endZone = 5 ; 5 ; $$endZone = "4-5" ; 4.5 ; $$endZone = 4 ; 4 ; $$endZone = "3-4" ; 3.5 ; $$endZone = 3 ; 3 ; $$endZone = "2-3" ; 2.5 ; $$endZone = 2 ; 2 ; $$endZone = 1 ; 1 ; "" ) ] # #Collect row ending icon information. Go to Object [ Object Name: "icon" & $segment ] Set Variable [ $$continue; Value:Get ( ActiveFieldContents ) ] Go to Object [ Object Name: "zone" & $segment ] Set Variable [ $$continueZone; Value:Get ( ActiveFieldContents ) ] Set Variable [ $$continueMultiplier; Value:Case ( $$continueZone = 5 ; 5 ; $$continueZone = "4-5" ; 4.5 ; $$continueZone = 4 ; 4 ; $$continueZone = "3-4" ; 3.5 ; $$continueZone = 3 ; 3 ; $$continueZone = "2-3" ; 2.5 ; $$continueZone = 2 ; 2 ; $$continueZone = 1 ; 1 ; "" ) ] # #See of row ending fits with row ending icon. Perform Script [ “CHUNKcheckIfRepeatingIconsMeet” ] # #Clear variables if it is fine. Set Variable [ $$end ] Set Variable [ $$endZone ] Set Variable [ $$endMultiplier ] Set Variable [ $$continue ] Set Variable [ $$continueZone ] Set Variable [ $$continueMultiplier ] # #Set new row ending. Go to Object [ Object Name: "bBegin" & $segment ] Set Field [ $segment & ¶ ] Set Variable [ $$stop ] Set Variable [ $$stopIconInsert ] Go to Field [ ] # January 8, 平成26 12:54:59 Fat and Muscle Efficiency Research.fp7 - bBegin -2-
#import <Foundation/Foundation.h> #import <sdk/sdk-Swift.h> NS_ASSUME_NONNULL_BEGIN @interface USAutocompleteProExample : NSObject - (NSString*)run; @end NS_ASSUME_NONNULL_END
// // FFNavigationController.h // CollectionsOfExample // // Created by mac on 16/7/17. // Copyright © 2016年 chenfanfang. All rights reserved. // #import <UIKit/UIKit.h> @interface FFNavigationController : UINavigationController @end
/* * Copyright (c) 2020, NVIDIA 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. */ #ifndef _INT4_OFFLINE_SAMPLE_LIBRARY_H #define _INT4_OFFLINE_SAMPLE_LIBRARY_H #include "query_sample_library.h" #include <map> class SampleLibrary : public mlperf::QuerySampleLibrary { public: SampleLibrary(std::string name, std::string mapPath, std::string tensorPath, size_t perfSampleCount, void *imagePtr); ~SampleLibrary(); virtual const std::string &Name() const { return m_Name; } virtual size_t TotalSampleCount() { return m_SampleCount; } virtual size_t PerformanceSampleCount() { return m_PerfSampleCount; } virtual void LoadSamplesToRam(const std::vector<mlperf::QuerySampleIndex>& samples); virtual void UnloadSamplesFromRam(const std::vector<mlperf::QuerySampleIndex>& samples); private: const std::string m_Name; size_t m_SampleCount{ 0 }; size_t m_PerfSampleCount{ 0 }; // maps sampleId to <fileName, label> std::map<mlperf::QuerySampleIndex, std::tuple<std::string, size_t>> m_FileLabelMap; std::string m_TensorPath; std::string m_MapPath; void *m_ImagePtr; }; #endif //_INT4_OFFLINE_SAMPLE_LIBRARY_H
// Copyright 2014-2015 Project Vogue. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef ELANG_HIR_INTRINSIC_NAMES_H_ #define ELANG_HIR_INTRINSIC_NAMES_H_ #include <ostream> namespace elang { namespace hir { ////////////////////////////////////////////////////////////////////// // // Intrinsic function names // #define FOR_EACH_INTRINSIC_NAME(V) V(HeapAlloc) enum class IntrinsicName { #define V(Name) Name, FOR_EACH_INTRINSIC_NAME(V) #undef V }; std::ostream& operator<<(std::ostream& ostream, IntrinsicName name); } // namespace hir } // namespace elang #endif // ELANG_HIR_INTRINSIC_NAMES_H_
// // PickController.h // kaidexing // // Created by 朱巩拓 on 16/5/24. // Copyright © 2016年 dwolf. All rights reserved. // #import "BaseViewController.h" @interface PickController : BaseViewController @property (strong ,nonatomic)NSString *shopID; @end
/* * meego-handset-people - Contacts application * Copyright © 2010, Intel Corporation. * * This program is licensed under the terms and conditions of the * Apache License, version 2.0. The full text of the Apache License is at * http://www.apache.org/licenses/LICENSE-2.0 * */ #ifndef PEOPLE_H #define PEOPLE_H #include <MWidgetController> class QAbstractItemModel; class QModelIndex; class QUuid; class SeasideSyncModel; class SeasideProxyModel; class SeasidePersonModel; class SeasidePeople: public MWidgetController { Q_OBJECT public: SeasidePeople(QGraphicsItem *parent = NULL); virtual ~SeasidePeople(); void setItemModel(QAbstractItemModel *itemModel); QAbstractItemModel *itemModel(); signals: void itemClicked(const QModelIndex& index); void editRequest(const QModelIndex& index); void callNumber(const QString& number); void composeSMS(const QString& number); void composeIM(const QString& chatcontact); void composeEmail(const QString& address); void scrollRequest(const QString &name); void scrollRequest(qreal pos); public slots: void filterAll(); void filterRecent(); void filterFavorites(); void filterSearch(const QString& text); void setFavorite(const QUuid& uuid, bool favorite); void deletePerson(const QUuid& uuid); void scrollTo(const QString& name); void scrollTo(qreal pos); private: SeasideSyncModel *m_realModel; SeasideProxyModel *m_proxyModel; }; #endif // PEOPLE_H
// // ProjectManager.h // Example DataBase Project // // Created by Adam Szeptycki on 13/11/13. // Copyright (c) 2013 Adam Szeptycki. All rights reserved. // #import <Foundation/Foundation.h> #import <CoreData/CoreData.h> #import "Person.h" @class Project; @interface ProjectManager : Person @property (nonatomic, retain) NSString * skype; @property (nonatomic, retain) NSSet *projects; @end @interface ProjectManager (CoreDataGeneratedAccessors) - (void)addProjectsObject:(Project *)value; - (void)removeProjectsObject:(Project *)value; - (void)addProjects:(NSSet *)values; - (void)removeProjects:(NSSet *)values; @end
/*确定在你的Person类中是否有一些构造函数应该是explicit的*/ #pragma once #include<string> class Person { friend std::istream &read(std::istream &is, Person &person); friend std::ostream &print(std::ostream &os, const Person &person); private: std::string name; std::string address; public: const std::string getName() const { return name;} const std::string getAddress() const { return address; } // 构造函数 Person() = default; Person(const std::string &sname, const std::string &saddress) : name(sname), address(saddress) {} explicit Person(std::istream &is) { read(is, *this); } // 可以将构造函数定义成explicit的 }; std::istream &read(std::istream &is, Person &person) { is >> person.name >> person.address; if (!is) person = Person(); return is; } std::ostream &print(std::ostream &os, const Person &person) { os << person.name << " " << person.address; return os; }
//===--- PassesFwd.h - Creation functions for LLVM passes -------*- C++ -*-===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See http://swift.org/LICENSE.txt for license information // See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors // //===----------------------------------------------------------------------===// #ifndef SWIFT_LLVMPASSES_PASSESFWD_H #define SWIFT_LLVMPASSES_PASSESFWD_H namespace llvm { class FunctionPass; class ImmutablePass; class PassRegistry; void initializeSwiftAAWrapperPassPass(PassRegistry &); void initializeSwiftRCIdentityPass(PassRegistry &); void initializeSwiftARCOptPass(PassRegistry &); void initializeSwiftARCContractPass(PassRegistry &); void initializeSwiftStackPromotionPass(PassRegistry &); } namespace swift { llvm::FunctionPass *createSwiftARCOptPass(); llvm::FunctionPass *createSwiftARCContractPass(); llvm::FunctionPass *createSwiftStackPromotionPass(); llvm::ImmutablePass *createSwiftAAWrapperPass(); llvm::ImmutablePass *createSwiftRCIdentityPass(); } // end namespace swift #endif
/** * ParametersImpl.h * * Extended parameters class that can be instantiated * * @author Emiel Bruijntjes <emiel.bruijntjes@copernica.com> * @copyright 2013 Copernica BV */ /** * Set up namespace */ namespace Php { /** * Class definition */ class ParametersImpl : public Parameters { public: /** * Constructor * @param this_ptr Pointer to the object * @param argc Number of arguments * @param tsrm_ls */ ParametersImpl(zval *this_ptr, int argc TSRMLS_DC) : Parameters(this_ptr ? ObjectImpl::find(this_ptr TSRMLS_CC)->object() : nullptr) { // reserve plenty of space reserve(argc); // loop through the arguments for (int i=0; i<argc; i++) { // get the argument zval **arg = (zval **) (zend_vm_stack_top(TSRMLS_C) - 1 - (argc-i)); // append value emplace_back(*arg); } } /** * Do _not_ add a virtual destructor here. * * We are extending a vector, which does not itself * have a virtual destructor, so destructing through * a pointer to this vector has no effect. * * By adding a virtual destructor we create a vtable, * which makes the class bigger, causing slicing and * then we are actually introducing the problem that * we are trying to avoid! */ }; /** * End of namespace */ }
/** * Appcelerator Titanium Mobile * Copyright (c) 2011 by ForestApp, 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. */ #if defined(USE_TI_XML) || defined(USE_TI_NETWORK) #import "TiProxy.h" #import "TiDOMNodeProxy.h" @interface TiDOMCharacterDataProxy : TiDOMNodeProxy { @private } @property(nonatomic,copy,readwrite) NSString * data; @property(nonatomic,readonly) NSNumber * length; -(NSString *) substringData:(id)args; -(void) appendData:(id)args; -(void) insertData:(id)args; -(void) deleteData:(id)args; -(void) replaceData:(id)args; @end #endif
/* * Copyright (C) 2009 Google Inc. All rights reserved. * Copyright (C) 2010 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef SharedWorker_h #define SharedWorker_h #include "core/workers/AbstractWorker.h" namespace WebCore { class ExceptionState; class SharedWorker : public AbstractWorker, public ScriptWrappable { public: static PassRefPtr<SharedWorker> create(ScriptExecutionContext*, const String& url, const String& name, ExceptionState&); virtual ~SharedWorker(); MessagePort* port() const { return m_port.get(); } virtual const AtomicString& interfaceName() const OVERRIDE; private: explicit SharedWorker(ScriptExecutionContext*); RefPtr<MessagePort> m_port; }; } // namespace WebCore #endif // SharedWorker_h
/* vim: set shiftwidth=4 tabstop=8 autoindent cindent expandtab: */ /* 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/. */ /* API for getting a stack trace of the C/C++ stack on the current thread */ #ifndef nsStackWalk_h_ #define nsStackWalk_h_ /* WARNING: This file is intended to be included from C or C++ files. */ #include "nscore.h" #include <mozilla/StandardInteger.h> PR_BEGIN_EXTERN_C typedef void (* NS_WalkStackCallback)(void *aPC, void *aClosure); /** * Call aCallback for the C/C++ stack frames on the current thread, from * the caller of NS_StackWalk to main (or above). * * @param aCallback Callback function, called once per frame. * @param aSkipFrames Number of initial frames to skip. 0 means that * the first callback will be for the caller of * NS_StackWalk. * @param aClosure Caller-supplied data passed through to aCallback. * @param aThread The thread for which the stack is to be retrieved. * Passing null causes us to walk the stack of the * current thread. On Windows, this is a thread HANDLE. * It is currently not supported on any other platform. * * Returns NS_ERROR_NOT_IMPLEMENTED on platforms where it is * unimplemented. * Returns NS_ERROR_UNEXPECTED when the stack indicates that the thread * is in a very dangerous situation (e.g., holding sem_pool_lock in * Mac OS X pthreads code). Callers should then bail out immediately. * * May skip some stack frames due to compiler optimizations or code * generation. */ XPCOM_API(nsresult) NS_StackWalk(NS_WalkStackCallback aCallback, PRUint32 aSkipFrames, void *aClosure, uintptr_t aThread); typedef struct { /* * The name of the shared library or executable containing an * address and the address's offset within that library, or empty * string and zero if unknown. */ char library[256]; PRUptrdiff loffset; /* * The name of the file name and line number of the code * corresponding to the address, or empty string and zero if * unknown. */ char filename[256]; unsigned long lineno; /* * The name of the function containing an address and the address's * offset within that function, or empty string and zero if unknown. */ char function[256]; PRUptrdiff foffset; } nsCodeAddressDetails; /** * For a given pointer to code, fill in the pieces of information used * when printing a stack trace. * * @param aPC The code address. * @param aDetails A structure to be filled in with the result. */ XPCOM_API(nsresult) NS_DescribeCodeAddress(void *aPC, nsCodeAddressDetails *aDetails); /** * Format the information about a code address in a format suitable for * stack traces on the current platform. When available, this string * should contain the function name, source file, and line number. When * these are not available, library and offset should be reported, if * possible. * * @param aPC The code address. * @param aDetails The value filled in by NS_DescribeCodeAddress(aPC). * @param aBuffer A string to be filled in with the description. * The string will always be null-terminated. * @param aBufferSize The size, in bytes, of aBuffer, including * room for the terminating null. If the information * to be printed would be larger than aBuffer, it * will be truncated so that aBuffer[aBufferSize-1] * is the terminating null. */ XPCOM_API(nsresult) NS_FormatCodeAddressDetails(void *aPC, const nsCodeAddressDetails *aDetails, char *aBuffer, PRUint32 aBufferSize); PR_END_EXTERN_C #endif /* !defined(nsStackWalk_h_) */
/* Copyright (c) 2014 Narciso Cerezo. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ #ifndef __Color_H_ #define __Color_H_ #include <SDL2/SDL.h> namespace cocosdl { class Color { public: static Color const &black(); static Color const &white(); static Color const &red(); static Color const &green(); static Color const &blue(); static Color const &yellow(); Color(); Color( const Uint8 red, const Uint8 green, const Uint8 blue, const Uint8 alpha ); Color( const float red, const float green, const float blue, const float alpha ); Color( const Uint32 argb ); Color( const Color &other ); virtual ~Color(); const SDL_Color &getSDL_Color() const { return _color; } Color &operator = ( const Color &color ); Color &operator += ( const Color &color ); Color &operator -= ( const Color &color ); void setComponents( const Uint8 red, const Uint8 green, const Uint8 blue, const Uint8 alpha ); void setComponents( const float red, const float green, const float blue, const float alpha ); void setComponents( const Uint32 argb ); void setRed( const Uint8 red ); void setGreen( const Uint8 red ); void setBlue( const Uint8 red ); void setAlpha( const Uint8 red ); void setRed( const float red ); void setGreen( const float red ); void setBlue( const float red ); void setAlpha( const float red ); const Uint8 getRed() const { return _color.r; } const Uint8 getGreen() const { return _color.g; } const Uint8 getBlue() const { return _color.b; } const Uint8 getAlpha() const { return _color.a; } const float getRedF() const { return (float) _color.r / (float) 0xFF; } const float getGreenF() const { return (float) _color.g / (float) 0xFF; } const float getBlueF() const { return (float) _color.b / (float) 0xFF; } const float getAlphaF() const { return (float) _color.a / (float) 0xFF; } private: SDL_Color _color; }; } #endif //__Color_H_
/* * Copyright 2014-2020 Real Logic Limited. * * 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. */ #ifndef AERON_CONCURRENT_BROADCAST_COPY_BROADCAST_RECEIVER_H #define AERON_CONCURRENT_BROADCAST_COPY_BROADCAST_RECEIVER_H #include <array> #include <functional> #include "concurrent/broadcast/BroadcastReceiver.h" namespace aeron { namespace concurrent { namespace broadcast { typedef std::array<std::uint8_t, 4096> scratch_buffer_t; /** The data handler function signature */ typedef std::function<void(std::int32_t, concurrent::AtomicBuffer &, util::index_t, util::index_t)> handler_t; class CopyBroadcastReceiver { public: explicit CopyBroadcastReceiver(BroadcastReceiver &receiver) : m_receiver(receiver), m_scratchBuffer(m_scratch) { } int receive(const handler_t &handler) { int messagesReceived = 0; const long lastSeenLappedCount = m_receiver.lappedCount(); if (m_receiver.receiveNext()) { if (lastSeenLappedCount != m_receiver.lappedCount()) { throw util::IllegalArgumentException("unable to keep up with broadcast buffer", SOURCEINFO); } const std::int32_t length = m_receiver.length(); if (length > m_scratchBuffer.capacity()) { throw util::IllegalStateException( "buffer required size " + std::to_string(length) + " but only has " + std::to_string(m_scratchBuffer.capacity()), SOURCEINFO); } const std::int32_t msgTypeId = m_receiver.typeId(); m_scratchBuffer.putBytes(0, m_receiver.buffer(), m_receiver.offset(), length); if (!m_receiver.validate()) { throw util::IllegalStateException("unable to keep up with broadcast buffer", SOURCEINFO); } handler(msgTypeId, m_scratchBuffer, 0, length); messagesReceived = 1; } return messagesReceived; } private: AERON_DECL_ALIGNED(scratch_buffer_t m_scratch, 16) = {}; BroadcastReceiver &m_receiver; AtomicBuffer m_scratchBuffer; }; }}} #endif
// // FifthViewController.h // test // // Created by Bee on 12/15/15. // Copyright (c) 2015 Bee. All rights reserved. // #import "HSBaseViewController.h" @interface FifthViewController : HSBaseViewController @end
// // AppDelegate.h // Guile Demo // // Created by Adam Kaplan on 1/13/14. // Copyright (c) 2014 Gilt Groupe. All rights reserved. // #import <UIKit/UIKit.h> @interface AppDelegate : UIResponder <UIApplicationDelegate> @property (strong, nonatomic) UIWindow *window; @end
// // WJYSettingViewController.h // 百思不得姐 // // Created by fangjs on 16/7/21. // Copyright © 2016年 fangjs. All rights reserved. // #import <UIKit/UIKit.h> @interface WJYSettingViewController : UITableViewController @end
/* Copyright (c) 2010,2011, Hewlett-Packard Co. 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 Hewlett-Packard 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 AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PATENT INFRINGEMENT; 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 <stdlib.h> #include <stdio.h> #include <string.h> #include <sys/types.h> #include <sys/stat.h> #include <unistd.h> #include <fcntl.h> #include <errno.h> #include "ifc_print_job.h" #include "lib_wprint.h" #include "wprint_debug.h" #define BUFF_SIZE 8192 typedef struct { const ifc_wprint_t *wprint_ifc; const ifc_print_job_t *print_ifc; } plugin_data_t; static const char *_mime_types[] = { MIME_TYPE_PDF, NULL }; static const char *_print_formats[] = { PRINT_FORMAT_PDF, NULL }; static const char **_get_mime_types(void) { return(_mime_types); } static const char **_get_print_formats(void) { return(_print_formats); } static int _start_job ( wJob_t job_handle, void *wprint_ifc_p, void *print_ifc_p, wprint_job_params_t *job_params ) { plugin_data_t *priv; if (job_params == NULL) return(ERROR); job_params->plugin_data = NULL; if ((wprint_ifc_p == NULL) || (print_ifc_p == NULL)) return(ERROR); priv = (plugin_data_t*)malloc(sizeof(plugin_data_t)); priv->wprint_ifc = (ifc_wprint_t*)wprint_ifc_p; priv->print_ifc = (ifc_print_job_t*)print_ifc_p; job_params->plugin_data = (void*)priv; return(OK); } /* _start_page */ static int _print_page ( wJob_t job_handle, wprint_job_params_t *job_params, char *mime_type, char *pathname ) { plugin_data_t *priv; int fd; int result = OK; int rbytes, wbytes, nbytes = 0; char *buff; if (job_params == NULL) return(ERROR); priv = (plugin_data_t*)job_params->plugin_data; if (priv == NULL) return(ERROR); // open the PDF file and dump it to the socket if (pathname && strlen(pathname)) { buff = malloc(BUFF_SIZE); if (buff == NULL) return(ERROR); fd = open(pathname, O_RDONLY); if (fd != ERROR) { rbytes = read(fd, buff, BUFF_SIZE); while ( (rbytes > 0) && !job_params->cancelled ) { wbytes = priv->print_ifc->send_data(priv->print_ifc, buff, rbytes); if (wbytes == rbytes) { nbytes += wbytes; rbytes = read(fd, buff, BUFF_SIZE); } else { priv->wprint_ifc->debug(DBG_ERROR, "ERROR: write() failed, %s", strerror(errno)); result = ERROR; break; } } priv->wprint_ifc->debug(DBG_LOG, "dumped %d bytes of %s to printer\n", nbytes, pathname); close(fd); } free(buff); } return result; } /* _print_page */ static int _end_job ( wJob_t job_handle, wprint_job_params_t *job_params ) { if (job_params != NULL) { if (job_params->plugin_data != NULL) free(job_params->plugin_data); } return OK; } /* _end_job */ wprint_plugin_t *libwprintplugin_pdf_reg(void) { static const wprint_plugin_t _pdf_plugin = { .version = WPRINT_PLUGIN_VERSION(0), .get_mime_types = _get_mime_types, .get_print_formats = _get_print_formats, .start_job = _start_job, .print_page = _print_page, .print_blank_page = NULL, .end_job = _end_job, }; return((wprint_plugin_t *) &_pdf_plugin); } /* libwpdf_reg */
#pragma once #include "il2cpp-config.h" #ifndef _MSC_VER # include <alloca.h> #else # include <malloc.h> #endif #include <stdint.h> #include "mscorlib_System_MulticastDelegate3201952435.h" // UnityEngine.GUILayoutEntry struct GUILayoutEntry_t3828586629; // System.IAsyncResult struct IAsyncResult_t1999651008; // System.AsyncCallback struct AsyncCallback_t163412349; // System.Object struct Il2CppObject; #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Predicate`1<UnityEngine.GUILayoutEntry> struct Predicate_1_t2271556744 : public MulticastDelegate_t3201952435 { public: public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif
#ifndef __MZX_MACRO_UTIL_H__ #define __MZX_MACRO_UTIL_H__ #define MZX_PRIMITIVE_TOSTRING(x) #x #define MZX_TOSTRING(x) MZX_PRIMITIVE_TOSTRING(x) #define MZX_PRIMITIVE_CAT(x, y) x##y #define MZX_CAT(x, y) MZX_PRIMITIVE_CAT(x, y) #define MZX_ARG_N(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, \ _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, \ _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, \ _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, \ _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, \ _63, N, ...) \ N #define MZX_RSEQ_N() \ 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, \ 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, \ 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, \ 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 #define MZX_COMMASEQ_N() \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 #define MZX_ARG_N_HELPER(...) MZX_ARG_N(__VA_ARGS__) #define MZX_COMMA(...) , #define MZX_HAS_COMMA(...) MZX_ARG_N_HELPER(__VA_ARGS__, MZX_COMMASEQ_N()) #define MZX_VA_SIZE(...) \ MZX_VA_SIZE_HELPER1(MZX_HAS_COMMA(__VA_ARGS__), \ MZX_HAS_COMMA(MZX_COMMA __VA_ARGS__()), \ MZX_ARG_N_HELPER(__VA_ARGS__, MZX_RSEQ_N())) #define MZX_VA_SIZE_HELPER1(x, y, N) MZX_VA_SIZE_HELPER2(x, y, N) #define MZX_VA_SIZE_HELPER2(x, y, N) MZX_VA_SIZE_HELPER3_##x##y(N) #define MZX_VA_SIZE_HELPER3_01(N) 0 #define MZX_VA_SIZE_HELPER3_00(N) 1 #define MZX_VA_SIZE_HELPER3_11(N) N #define MZX_VA_SELECT(NAME, ...) \ MZX_CAT(NAME##_, MZX_VA_SIZE(__VA_ARGS__))(__VA_ARGS__) #define MZX_OFFSETOF(type, member) (std::size_t) & (((type *)0)->member) #define MZX_CONTAINER_OF(ptr, type, member) \ ({ \ const decltype(((type *)0)->member) *__mptr = (ptr); \ (type *)((char *)__mptr - (std::size_t) & (((type *)0)->member)); \ }) #define MZX_ARRAY_SIZE(arr) (sizeof(arr) / sizeof(arr[0])) #endif
/* * $Id: signal.h 1025 2008-04-08 22:59:38Z hubert@u.washington.edu $ * * ======================================================================== * Copyright 2006-2008 University of Washington * Copyright 2013-2016 Eduardo Chappa * * 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 * * ======================================================================== */ #ifndef PITH_SIGNAL_INCLUDED #define PITH_SIGNAL_INCLUDED /* exported protoypes */ /* currently mandatory to implement stubs */ int intr_handling_on(void); void intr_handling_off(void); #endif /* PITH_SIGNAL_INCLUDED */
/* * SPDX-FileCopyrightText: 2016-2021 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ #include <stdlib.h> #include <ctype.h> #include "sdkconfig.h" #include "esp_types.h" #include "esp_log.h" #include "sys/lock.h" #include "freertos/FreeRTOS.h" #include "hal/adc_types.h" #include "hal/adc_ll.h" extern portMUX_TYPE rtc_spinlock; //TODO: Will be placed in the appropriate position after the rtc module is finished. #define ADC_ENTER_CRITICAL() portENTER_CRITICAL(&rtc_spinlock) #define ADC_EXIT_CRITICAL() portEXIT_CRITICAL(&rtc_spinlock) /** * Config monitor of adc digital controller. * * @note The monitor will monitor all the enabled channel data of the each ADC unit at the same time. * @param adc_n ADC unit. * @param config Refer to ``adc_digi_monitor_t``. */ static void adc_digi_monitor_config(adc_ll_num_t adc_n, adc_digi_monitor_t *config) { adc_ll_digi_monitor_set_mode(adc_n, config->mode); adc_ll_digi_monitor_set_thres(adc_n, config->threshold); } /*************************************/ /* Digital controller filter setting */ /*************************************/ esp_err_t adc_digi_filter_reset(adc_digi_filter_idx_t idx) { ADC_ENTER_CRITICAL(); if (idx == ADC_DIGI_FILTER_IDX0) { adc_ll_digi_filter_reset(ADC_NUM_1); } else if (idx == ADC_DIGI_FILTER_IDX1) { adc_ll_digi_filter_reset(ADC_NUM_2); } ADC_EXIT_CRITICAL(); return ESP_OK; } esp_err_t adc_digi_filter_set_config(adc_digi_filter_idx_t idx, adc_digi_filter_t *config) { ADC_ENTER_CRITICAL(); if (idx == ADC_DIGI_FILTER_IDX0) { adc_ll_digi_filter_set_factor(ADC_NUM_1, config->mode); } else if (idx == ADC_DIGI_FILTER_IDX1) { adc_ll_digi_filter_set_factor(ADC_NUM_2, config->mode); } ADC_EXIT_CRITICAL(); return ESP_OK; } esp_err_t adc_digi_filter_get_config(adc_digi_filter_idx_t idx, adc_digi_filter_t *config) { ADC_ENTER_CRITICAL(); if (idx == ADC_DIGI_FILTER_IDX0) { config->adc_unit = ADC_UNIT_1; config->channel = ADC_CHANNEL_MAX; adc_ll_digi_filter_get_factor(ADC_NUM_1, &config->mode); } else if (idx == ADC_DIGI_FILTER_IDX1) { config->adc_unit = ADC_UNIT_2; config->channel = ADC_CHANNEL_MAX; adc_ll_digi_filter_get_factor(ADC_NUM_2, &config->mode); } ADC_EXIT_CRITICAL(); return ESP_OK; } esp_err_t adc_digi_filter_enable(adc_digi_filter_idx_t idx, bool enable) { ADC_ENTER_CRITICAL(); if (idx == ADC_DIGI_FILTER_IDX0) { adc_ll_digi_filter_enable(ADC_NUM_1, enable); } else if (idx == ADC_DIGI_FILTER_IDX1) { adc_ll_digi_filter_enable(ADC_NUM_2, enable); } ADC_EXIT_CRITICAL(); return ESP_OK; } /** * @brief Get the filtered data of adc digital controller filter. For debug. * The data after each measurement and filtering is updated to the DMA by the digital controller. But it can also be obtained manually through this API. * * @note For ESP32S2, The filter will filter all the enabled channel data of the each ADC unit at the same time. * @param idx Filter index. * @return Filtered data. if <0, the read data invalid. */ int adc_digi_filter_read_data(adc_digi_filter_idx_t idx) { if (idx == ADC_DIGI_FILTER_IDX0) { return adc_ll_digi_filter_read_data(ADC_NUM_1); } else if (idx == ADC_DIGI_FILTER_IDX1) { return adc_ll_digi_filter_read_data(ADC_NUM_2); } else { return -1; } } /**************************************/ /* Digital controller monitor setting */ /**************************************/ esp_err_t adc_digi_monitor_set_config(adc_digi_monitor_idx_t idx, adc_digi_monitor_t *config) { ADC_ENTER_CRITICAL(); if (idx == ADC_DIGI_MONITOR_IDX0) { adc_digi_monitor_config(ADC_NUM_1, config); } else if (idx == ADC_DIGI_MONITOR_IDX1) { adc_digi_monitor_config(ADC_NUM_2, config); } ADC_EXIT_CRITICAL(); return ESP_OK; } esp_err_t adc_digi_monitor_enable(adc_digi_monitor_idx_t idx, bool enable) { ADC_ENTER_CRITICAL(); if (idx == ADC_DIGI_MONITOR_IDX0) { adc_ll_digi_monitor_enable(ADC_NUM_1, enable); } else if (idx == ADC_DIGI_MONITOR_IDX1) { adc_ll_digi_monitor_enable(ADC_NUM_2, enable); } ADC_EXIT_CRITICAL(); return ESP_OK; }
// // DDTabItemView.h // Duoduo // // Created by zuoye on 13-11-28. // Copyright (c) 2013年 zuoye. All rights reserved. // #import <Cocoa/Cocoa.h> @interface DDTabItemView : NSView @end
/* MIT License * * Copyright (c) 2016-2020 INRIA, CMU and Microsoft Corporation * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include "EverCrypt_Error.h" /* SNIPPET_START: EverCrypt_Error_uu___is_Success */ bool EverCrypt_Error_uu___is_Success(EverCrypt_Error_error_code projectee) { switch (projectee) { case EverCrypt_Error_Success: { return true; } default: { return false; } } } /* SNIPPET_END: EverCrypt_Error_uu___is_Success */ /* SNIPPET_START: EverCrypt_Error_uu___is_UnsupportedAlgorithm */ bool EverCrypt_Error_uu___is_UnsupportedAlgorithm(EverCrypt_Error_error_code projectee) { switch (projectee) { case EverCrypt_Error_UnsupportedAlgorithm: { return true; } default: { return false; } } } /* SNIPPET_END: EverCrypt_Error_uu___is_UnsupportedAlgorithm */ /* SNIPPET_START: EverCrypt_Error_uu___is_InvalidKey */ bool EverCrypt_Error_uu___is_InvalidKey(EverCrypt_Error_error_code projectee) { switch (projectee) { case EverCrypt_Error_InvalidKey: { return true; } default: { return false; } } } /* SNIPPET_END: EverCrypt_Error_uu___is_InvalidKey */ /* SNIPPET_START: EverCrypt_Error_uu___is_AuthenticationFailure */ bool EverCrypt_Error_uu___is_AuthenticationFailure(EverCrypt_Error_error_code projectee) { switch (projectee) { case EverCrypt_Error_AuthenticationFailure: { return true; } default: { return false; } } } /* SNIPPET_END: EverCrypt_Error_uu___is_AuthenticationFailure */ /* SNIPPET_START: EverCrypt_Error_uu___is_InvalidIVLength */ bool EverCrypt_Error_uu___is_InvalidIVLength(EverCrypt_Error_error_code projectee) { switch (projectee) { case EverCrypt_Error_InvalidIVLength: { return true; } default: { return false; } } } /* SNIPPET_END: EverCrypt_Error_uu___is_InvalidIVLength */ /* SNIPPET_START: EverCrypt_Error_uu___is_DecodeError */ bool EverCrypt_Error_uu___is_DecodeError(EverCrypt_Error_error_code projectee) { switch (projectee) { case EverCrypt_Error_DecodeError: { return true; } default: { return false; } } } /* SNIPPET_END: EverCrypt_Error_uu___is_DecodeError */
#pragma once #include "il2cpp-config.h" #ifndef _MSC_VER # include <alloca.h> #else # include <malloc.h> #endif #include <stdint.h> #include "mscorlib_System_MulticastDelegate3201952435.h" #include "mscorlib_System_UInt322149682021.h" // System.IAsyncResult struct IAsyncResult_t1999651008; // System.AsyncCallback struct AsyncCallback_t163412349; // System.Object struct Il2CppObject; #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Predicate`1<System.UInt32> struct Predicate_1_t592652136 : public MulticastDelegate_t3201952435 { public: public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif
/* Copyright 2015 Google Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ #ifndef TENSORFLOW_LIB_STRINGS_STR_UTIL_H_ #define TENSORFLOW_LIB_STRINGS_STR_UTIL_H_ #include <string> #include <vector> #include "tensorflow/core/lib/core/stringpiece.h" #include "tensorflow/core/lib/gtl/array_slice.h" #include "tensorflow/core/lib/strings/strcat.h" #include "tensorflow/core/platform/port.h" // Basic string utility routines namespace tensorflow { namespace str_util { // Returns a version of 'src' where unprintable characters have been // escaped using C-style escape sequences. string CEscape(const string& src); // Copies "source" to "dest", rewriting C-style escape sequences -- // '\n', '\r', '\\', '\ooo', etc -- to their ASCII equivalents. // // Errors: Sets the description of the first encountered error in // 'error'. To disable error reporting, set 'error' to NULL. // // NOTE: Does not support \u or \U! bool CUnescape(StringPiece source, string* dest, string* error); // If "text" can be successfully parsed as the ASCII representation of // an integer, sets "*val" to the value and returns true. Otherwise, // returns false. bool NumericParse32(const string& text, int32* val); // Removes any trailing whitespace from "*s". void StripTrailingWhitespace(string* s); // Removes leading ascii_isspace() characters. // Returns number of characters removed. size_t RemoveLeadingWhitespace(StringPiece* text); // Removes trailing ascii_isspace() characters. // Returns number of characters removed. size_t RemoveTrailingWhitespace(StringPiece* text); // Removes leading and trailing ascii_isspace() chars. // Returns number of chars removed. size_t RemoveWhitespaceContext(StringPiece* text); // Consume a leading positive integer value. If any digits were // found, store the value of the leading unsigned number in "*val", // advance "*s" past the consumed number, and return true. If // overflow occurred, returns false. Otherwise, returns false. bool ConsumeLeadingDigits(StringPiece* s, uint64* val); // Consume a leading token composed of non-whitespace characters only. // If *s starts with a non-zero number of non-whitespace characters, store // them in *val, advance *s past them, and return true. Else return false. bool ConsumeNonWhitespace(StringPiece* s, StringPiece* val); // If "*s" starts with "expected", consume it and return true. // Otherwise, return false. bool ConsumePrefix(StringPiece* s, StringPiece expected); // Return lower-cased version of s. string Lowercase(StringPiece s); // Return upper-cased version of s. string Uppercase(StringPiece s); // Capitalize first character of each word in "*s". "delimiters" is a // set of characters that can be used as word boundaries. void TitlecaseString(string* s, StringPiece delimiters); // Join functionality template <typename T> string Join(const T& s, const char* sep); struct AllowEmpty { bool operator()(StringPiece sp) const { return true; } }; struct SkipEmpty { bool operator()(StringPiece sp) const { return !sp.empty(); } }; struct SkipWhitespace { bool operator()(StringPiece sp) const { RemoveTrailingWhitespace(&sp); return !sp.empty(); } }; std::vector<string> Split(StringPiece text, char delim); template <typename Predicate> std::vector<string> Split(StringPiece text, char delim, Predicate p); // Split "text" at "delim" characters, and parse each component as // an integer. If successful, adds the individual numbers in order // to "*result" and returns true. Otherwise returns false. bool SplitAndParseAsInts(StringPiece text, char delim, std::vector<int32>* result); // ------------------------------------------------------------------ // Implementation details below template <typename T> string Join(const T& s, const char* sep) { string result; bool first = true; for (const auto& x : s) { tensorflow::strings::StrAppend(&result, (first ? "" : sep), x); first = false; } return result; } inline std::vector<string> Split(StringPiece text, char delim) { return Split(text, delim, AllowEmpty()); } template <typename Predicate> std::vector<string> Split(StringPiece text, char delim, Predicate p) { std::vector<string> result; int token_start = 0; if (!text.empty()) { for (int i = 0; i < text.size() + 1; i++) { if ((i == text.size()) || (text[i] == delim)) { StringPiece token(text.data() + token_start, i - token_start); if (p(token)) { result.push_back(token.ToString()); } token_start = i + 1; } } } return result; } } // namespace str_util } // namespace tensorflow #endif // TENSORFLOW_LIB_STRINGS_STR_UTIL_H_
//////////////////////////////////////////////////////////////////////// // // Copyright 2014 PMC-Sierra, 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. // //////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////// // // Author: Logan Gunthorpe // // Date: Oct 23 2014 // // Description: // Simple utility that functions similar to dd but uses mmap to // read/write data from a file. // //////////////////////////////////////////////////////////////////////// #include <argconfig/argconfig.h> #include <argconfig/report.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <sys/mman.h> #include <sys/time.h> #include <stdio.h> #include <errno.h> #include <stdlib.h> const char program_desc[] = "data dump and write using mmap calls "; struct config { long count; long skip; int write_mode; int mem_mode; int block_size; }; static const struct config defaults = { .count = 128, .block_size = 1, }; static const struct argconfig_commandline_options command_line_options[] = { {"b", "block_size", CFG_POSITIVE, &defaults.block_size, required_argument, "number of bytes to read/write at once" }, {"n", "length", CFG_LONG_SUFFIX, &defaults.count, required_argument, "bytes to read/write" }, {"m", "", CFG_NONE, &defaults.mem_mode, no_argument, "read data into memory, don't output to stdout"}, {"s", "skip", CFG_LONG_SUFFIX, &defaults.skip, required_argument, "skip bytes from the input file" }, {"w", "", CFG_NONE, &defaults.write_mode, no_argument, "write data from stdin"}, {0} }; int main(int argc, char **argv) { struct config cfg; argconfig_append_usage("file"); int args = argconfig_parse(argc, argv, program_desc, command_line_options, &defaults, &cfg, sizeof(cfg)); argv[args+1] = NULL; if (args != 1) { argconfig_print_help(argv[0], program_desc, command_line_options); return -1; } int fd = open(argv[1], cfg.write_mode ? O_RDWR : O_RDONLY); if (fd < 0) { fprintf(stderr, "mmap_dd: %s: %s\n", argv[1], strerror(errno)); return -1; } void *addr = mmap(NULL, cfg.count, (cfg.write_mode ? PROT_WRITE : 0) | PROT_READ, MAP_SHARED, fd, cfg.skip); if (addr == MAP_FAILED) { perror("mmap failed"); return -1; } cfg.count /= cfg.block_size; struct timeval start_time; gettimeofday(&start_time, NULL); size_t transfered; if (cfg.mem_mode) { void *buf = malloc(cfg.count * cfg.block_size); memcpy(buf, addr, cfg.count * cfg.block_size); transfered = cfg.count; free(buf); } else if (cfg.write_mode) { transfered = fread(addr, cfg.block_size, cfg.count, stdin); } else { transfered = fwrite(addr, cfg.block_size, cfg.count, stdout); } transfered *= cfg.block_size; struct timeval end_time; gettimeofday(&end_time, NULL); munmap(addr, cfg.count * cfg.block_size); fprintf(stderr, "\nCopied "); report_transfer_rate(stderr, &start_time, &end_time, transfered); fprintf(stderr, "\n"); return 0; }
// EngineAPI.h: interface for the CEngineAPI class. // //**************************************************************************** // Support for extension DLLs //**************************************************************************** #if !defined(AFX_ENGINEAPI_H__CF21372B_C8B8_4891_82FC_D872C84E1DD4__INCLUDED_) #define AFX_ENGINEAPI_H__CF21372B_C8B8_4891_82FC_D872C84E1DD4__INCLUDED_ #pragma once // Abstract 'Pure' class for DLL interface class ENGINE_API DLL_Pure { public: CLASS_ID CLS_ID; DLL_Pure(void* params) { CLS_ID = 0; }; DLL_Pure() { CLS_ID = 0; }; virtual DLL_Pure* _construct() { return this; } virtual ~DLL_Pure(){}; }; // Class creation/destroying interface extern "C" { typedef DLL_API DLL_Pure* __cdecl Factory_Create(CLASS_ID CLS_ID); typedef DLL_API void __cdecl Factory_Destroy(DLL_Pure* O); }; // Tuning interface extern "C" { typedef void __cdecl VTPause(void); typedef void __cdecl VTResume(void); }; class ENGINE_API CEngineAPI { private: HMODULE hGame; HMODULE hRender; HMODULE hTuner; public: BENCH_SEC_SCRAMBLEMEMBER1 Factory_Create* pCreate; Factory_Destroy* pDestroy; BOOL tune_enabled; VTPause* tune_pause; VTResume* tune_resume; void Initialize(); void InitializeNotDedicated(); void Destroy(); void CreateRendererList(); CEngineAPI(); ~CEngineAPI(); }; #define NEW_INSTANCE(a) Engine.External.pCreate(a) #define DEL_INSTANCE(a) \ { \ Engine.External.pDestroy(a); \ a = NULL; \ } #endif // !defined(AFX_ENGINEAPI_H__CF21372B_C8B8_4891_82FC_D872C84E1DD4__INCLUDED_)
/* Copyright (c) 2007 Cyrus Daboo. 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. */ /* CICalendarURIValue.h Author: Description: <describe the CICalendarURIValue class here> */ #ifndef CICalendarURIValue_H #define CICalendarURIValue_H #include "CICalendarPlainTextValue.h" namespace iCal { class CICalendarURIValue : public CICalendarPlainTextValue { public: CICalendarURIValue() {} CICalendarURIValue(const cdstring& value) : CICalendarPlainTextValue(value) {} CICalendarURIValue(const CICalendarURIValue& copy) : CICalendarPlainTextValue(copy) {} virtual ~CICalendarURIValue() {} CICalendarURIValue& operator=(const CICalendarURIValue& copy) { if (this != &copy) CICalendarPlainTextValue::operator=(copy); return *this; } virtual CICalendarValue* clone() { return new CICalendarURIValue(*this); } virtual EICalValueType GetType() const { return eValueType_URI; } }; } // namespace iCal #endif // CICalendarURIValue_H
/** regex_helper.h -*- C++ -*- Jeremy Barnes, 31 October 2016 Copyright (c) 2016 mldb.ai Inc. All rights reserved. Helper classes for regex. */ #include "mldb/types/regex.h" #include "sql_expression.h" namespace MLDB { /*****************************************************************************/ /* REGEX HELPER */ /*****************************************************************************/ /** Helper class that takes care of regular expression application whether it's a constant value or not. */ struct RegexHelper { RegexHelper(); virtual ~RegexHelper() = default; /// Must be called by child constructor. This performs the actual /// compilation, etc. It can't be done in the real constructor as /// then the compile method would be bound to this one, not the one /// overriden in the sub-class. void init(BoundSqlExpression expr, int argNumber); /// Called to take an expression and turn it into a regex that will be /// applied. Default simply compiles a standard regex. virtual Regex compile(const ExpressionValue & val) const; /// The expression that the regex came from, to help with error messages BoundSqlExpression expr; /// The pre-compiled version of that expression, when it's constant Regex precompiled; /// Is it actually constant (and precompiled), or computed on the fly? bool isPrecompiled; /// What argument contains the regex to be compiled if it's not /// constant? int argNumber; virtual ExpressionValue apply(const std::vector<ExpressionValue> & args, const SqlRowScope & scope, const Regex & regex) const = 0; ExpressionValue operator () (const std::vector<ExpressionValue> & args, const SqlRowScope & scope); }; /*****************************************************************************/ /* APPLY REGEX REPLACE */ /*****************************************************************************/ struct ApplyRegexReplace: public RegexHelper { ApplyRegexReplace(BoundSqlExpression e); virtual ExpressionValue apply(const std::vector<ExpressionValue> & args, const SqlRowScope & scope, const Regex & regex) const; }; /*****************************************************************************/ /* APPLY REGEX MATCH */ /*****************************************************************************/ struct ApplyRegexMatch: public RegexHelper { ApplyRegexMatch(BoundSqlExpression e); virtual ExpressionValue apply(const std::vector<ExpressionValue> & args, const SqlRowScope & scope, const Regex & regex) const; }; /*****************************************************************************/ /* APPLY REGEX SEARCH */ /*****************************************************************************/ struct ApplyRegexSearch: public RegexHelper { ApplyRegexSearch(BoundSqlExpression e); virtual ExpressionValue apply(const std::vector<ExpressionValue> & args, const SqlRowScope & scope, const Regex & regex) const; }; /*****************************************************************************/ /* APPLY LIKE */ /*****************************************************************************/ /** Apply a like expression. */ struct ApplyLike: public RegexHelper { ApplyLike(BoundSqlExpression e, bool isNegative); /// For the LIKE expression, there is a different syntax to standard /// regular expressions, which we deal with here. virtual Regex compile(const ExpressionValue & val) const; virtual ExpressionValue apply(const std::vector<ExpressionValue> & args, const SqlRowScope & scope, const Regex & regex) const; /// This inverts it, ie turns LIKE into NOT LIKE bool isNegative; }; } // namespace MLDB
// // $Id: Speed.h,v 1.6.4.1 2005-12-16 06:22:31 knicewar Exp $ // // Copyright Keith Nicewarner. All rights reserved. // // Represent the abstract concept of a measure of speed. // The internal representation of the units is hidden from the user. // #ifndef Units_Speed_h #define Units_Speed_h #include "SpecificUnit.h" #include "RatioUnitFormat.h" namespace Units { UNITS_DECLARE_BASE_UNIT(Speed, 0, 1, -1, 0, 0, 0, 0, 0); #define SpeedFormat RatioUnitFormat // // 1 m/s = 3.280839895 ft/s = 2.236936292 mi/hr // 1 knot = 1 nmi/hr = 1852 m/h // UNITS_DECLARE_SPECIFIC_UNIT(Speed, MetersPerSecondSpeed, "m/s", 1.0); UNITS_DECLARE_SPECIFIC_UNIT(Speed, FeetPerSecondSpeed, "fps", 0.3048); UNITS_DECLARE_SPECIFIC_UNIT(Speed, KilometersPerHourSpeed, "kph", 1/3.6); // Statute miles per hour UNITS_DECLARE_SPECIFIC_UNIT(Speed, MilesPerHourSpeed, "mph", 1/2.236936292); // Nautical miles per hour UNITS_DECLARE_SPECIFIC_UNIT(Speed, KnotsSpeed, "kts", 1852/3600.0); } // namespace Units #endif // Units_Speed_h
// Operand of this unary operator must be of arithmetic type void main() { abs "str"; }
/* Copyright (c) 2020, Google Inc. * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #ifndef OPENSSL_HEADER_CURVE25519_INTERNAL_H #define OPENSSL_HEADER_CURVE25519_INTERNAL_H #if defined(__cplusplus) extern "C" { #endif #include <CNIOBoringSSL_base.h> #include "../internal.h" #if defined(OPENSSL_ARM) && !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_APPLE) #define BORINGSSL_X25519_NEON // x25519_NEON is defined in asm/x25519-arm.S. void x25519_NEON(uint8_t out[32], const uint8_t scalar[32], const uint8_t point[32]); #endif #if defined(BORINGSSL_HAS_UINT128) #define BORINGSSL_CURVE25519_64BIT #endif #if defined(BORINGSSL_CURVE25519_64BIT) // fe means field element. Here the field is \Z/(2^255-19). An element t, // entries t[0]...t[4], represents the integer t[0]+2^51 t[1]+2^102 t[2]+2^153 // t[3]+2^204 t[4]. // fe limbs are bounded by 1.125*2^51. // Multiplication and carrying produce fe from fe_loose. typedef struct fe { uint64_t v[5]; } fe; // fe_loose limbs are bounded by 3.375*2^51. // Addition and subtraction produce fe_loose from (fe, fe). typedef struct fe_loose { uint64_t v[5]; } fe_loose; #else // fe means field element. Here the field is \Z/(2^255-19). An element t, // entries t[0]...t[9], represents the integer t[0]+2^26 t[1]+2^51 t[2]+2^77 // t[3]+2^102 t[4]+...+2^230 t[9]. // fe limbs are bounded by 1.125*2^26,1.125*2^25,1.125*2^26,1.125*2^25,etc. // Multiplication and carrying produce fe from fe_loose. typedef struct fe { uint32_t v[10]; } fe; // fe_loose limbs are bounded by 3.375*2^26,3.375*2^25,3.375*2^26,3.375*2^25,etc. // Addition and subtraction produce fe_loose from (fe, fe). typedef struct fe_loose { uint32_t v[10]; } fe_loose; #endif // ge means group element. // // Here the group is the set of pairs (x,y) of field elements (see fe.h) // satisfying -x^2 + y^2 = 1 + d x^2y^2 // where d = -121665/121666. // // Representations: // ge_p2 (projective): (X:Y:Z) satisfying x=X/Z, y=Y/Z // ge_p3 (extended): (X:Y:Z:T) satisfying x=X/Z, y=Y/Z, XY=ZT // ge_p1p1 (completed): ((X:Z),(Y:T)) satisfying x=X/Z, y=Y/T // ge_precomp (Duif): (y+x,y-x,2dxy) typedef struct { fe X; fe Y; fe Z; } ge_p2; typedef struct { fe X; fe Y; fe Z; fe T; } ge_p3; typedef struct { fe_loose X; fe_loose Y; fe_loose Z; fe_loose T; } ge_p1p1; typedef struct { fe_loose yplusx; fe_loose yminusx; fe_loose xy2d; } ge_precomp; typedef struct { fe_loose YplusX; fe_loose YminusX; fe_loose Z; fe_loose T2d; } ge_cached; void x25519_ge_tobytes(uint8_t s[32], const ge_p2 *h); int x25519_ge_frombytes_vartime(ge_p3 *h, const uint8_t s[32]); void x25519_ge_p3_to_cached(ge_cached *r, const ge_p3 *p); void x25519_ge_p1p1_to_p2(ge_p2 *r, const ge_p1p1 *p); void x25519_ge_p1p1_to_p3(ge_p3 *r, const ge_p1p1 *p); void x25519_ge_add(ge_p1p1 *r, const ge_p3 *p, const ge_cached *q); void x25519_ge_sub(ge_p1p1 *r, const ge_p3 *p, const ge_cached *q); void x25519_ge_scalarmult_small_precomp( ge_p3 *h, const uint8_t a[32], const uint8_t precomp_table[15 * 2 * 32]); void x25519_ge_scalarmult_base(ge_p3 *h, const uint8_t a[32]); void x25519_ge_scalarmult(ge_p2 *r, const uint8_t *scalar, const ge_p3 *A); void x25519_sc_reduce(uint8_t s[64]); enum spake2_state_t { spake2_state_init = 0, spake2_state_msg_generated, spake2_state_key_generated, }; struct spake2_ctx_st { uint8_t private_key[32]; uint8_t my_msg[32]; uint8_t password_scalar[32]; uint8_t password_hash[64]; uint8_t *my_name; size_t my_name_len; uint8_t *their_name; size_t their_name_len; enum spake2_role_t my_role; enum spake2_state_t state; char disable_password_scalar_hack; }; #if defined(__cplusplus) } // extern C #endif #endif // OPENSSL_HEADER_CURVE25519_INTERNAL_H
/* * (C) Copyright 2007-2013 * Allwinner Technology Co., Ltd. <www.allwinnertech.com> * Martin zheng <zhengjiewen@allwinnertech.com> * * See file CREDITS for list of people who contributed to this * project. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of * the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * MA 02111-1307 USA */ #include <math.h> double hypot(double x, double y) { double a = x, b = y, t1, t2, y1, y2, w; s32_t j, k, ha, hb; GET_HIGH_WORD(ha, x); ha &= 0x7fffffff; GET_HIGH_WORD(hb, y); hb &= 0x7fffffff; if (hb > ha) { a = y; b = x; j = ha; ha = hb; hb = j; } else { a = x; b = y; } SET_HIGH_WORD(a, ha); SET_HIGH_WORD(b, hb); if ((ha - hb) > 0x3c00000) { return a + b; } k = 0; if (ha > 0x5f300000) { if (ha >= 0x7ff00000) { u32_t low; w = a + b; GET_LOW_WORD(low, a); if (((ha & 0xfffff) | low) == 0) w = a; GET_LOW_WORD(low, b); if (((hb ^ 0x7ff00000) | low) == 0) w = b; return w; } ha -= 0x25800000; hb -= 0x25800000; k += 600; SET_HIGH_WORD(a, ha); SET_HIGH_WORD(b, hb); } if (hb < 0x20b00000) { if (hb <= 0x000fffff) { u32_t low; GET_LOW_WORD(low, b); if ((hb | low) == 0) return a; t1 = 0; SET_HIGH_WORD(t1, 0x7fd00000); b *= t1; a *= t1; k -= 1022; } else { ha += 0x25800000; hb += 0x25800000; k -= 600; SET_HIGH_WORD(a, ha); SET_HIGH_WORD(b, hb); } } w = a - b; if (w > b) { t1 = 0; SET_HIGH_WORD(t1, ha); t2 = a - t1; w = sqrt(t1 * t1 - (b * (-b) - t2 * (a + t1))); } else { a = a + a; y1 = 0; SET_HIGH_WORD(y1, hb); y2 = b - y1; t1 = 0; SET_HIGH_WORD(t1, ha+0x00100000); t2 = a - t1; w = sqrt(t1 * y1 - (w * (-w) - (t1 * y2 + t2 * b))); } if (k != 0) { u32_t high; t1 = 1.0; GET_HIGH_WORD(high, t1); SET_HIGH_WORD(t1, high+(k<<20)); return t1 * w; } else return w; }
/* * Copyright(c) 2014, Phil Sampson (http://www.zamma.co.uk) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #pragma once #include "reference_counter.h" #include <glm/glm.hpp> #include <string> #include <vector> #include <unordered_map> namespace ZEGL { class Camera; class Game; /** * Uses vertex and fragment shader code in GLSL to create a shader program * for rendering the game. */ class Shader { public: /** * Create a shader with the given name by either loading from file or * if the shader has already been loaded, incrementing the reference count. * * \param[in] fileName fileName The name of the shader with no path or extension */ Shader(const std::string& fileName = "./res/shaders/basic_shader"); Shader(const Shader& other); ~Shader(); Shader& operator=(Shader const&) = delete; /** * Set the shader active for use in rendering */ void Bind() const; /** * Set the shader as no longer in use for rendering */ void UnBind() const; //@{ /** * Update the specified uniform with a new value. * * \param[in] uniformName Name of the uniform to update * \param[in] value Value to assign to the uniform */ void SetUniformi(const std::string& uniformName, int value) const; void SetUniformf(const std::string& uniformName, float value) const; void SetUniformVector2f(const std::string& uniformName, const glm::vec2& value) const; void SetUniformVector3f(const std::string& uniformName, const glm::vec3& value) const; void SetUniformVector4f(const std::string& uniformName, const glm::vec4& value) const; void SetUniformMatrix4f(const std::string& uniformName, const glm::mat4& value) const; //@} /** * Updates all known uniforms. * * Called every from Game::Update() to update all hard-coded uniform options. */ void UpdateUniforms() const; protected: private: class ShaderData : public ReferenceCounter { public: ShaderData(const std::string& fileName); ShaderData(ShaderData const&) = delete; ShaderData& operator=(ShaderData const&) = delete; ~ShaderData(); inline int GetProgram() const { return m_program; } inline const std::vector<std::string>& GetUniformNames() const { return m_uniformNames; } inline const std::vector<std::string>& GetUniformTypes() const { return m_uniformTypes; } inline const std::unordered_map<std::string, unsigned int>& GetUniformMap() const { return m_uniformMap; } protected: private: void AddProgram(const std::string& text, int type); void AddAllAttributes(const std::string& vertexShaderText); void AddAllUniforms(const std::string& shaderText); void AddUniform(const std::string& uniformName, const std::string& uniformType); void CompileShader() const; static int s_supportedOpenGLLevel; static std::string s_glslVersion; int m_program; std::vector<int> m_shaders; std::vector<std::string> m_uniformNames; std::vector<std::string> m_uniformTypes; std::unordered_map<std::string, unsigned int> m_uniformMap; }; static std::unordered_map<std::string, ShaderData*> s_resourceMap; ShaderData* m_shaderData; std::string m_fileName; }; }
// // Generated by the J2ObjC translator. DO NOT EDIT! // source: com/sparseware/bellavista/service/ConnectionHandler.java // // Created by decoteaud on 3/14/16. // #ifndef _CCPBVConnectionHandler_H_ #define _CCPBVConnectionHandler_H_ @class IOSObjectArray; @class JavaIoReader; @class JavaNetURL; @class JavaNetURLConnection; @protocol RAREiURLConnection; #import "JreEmulation.h" #include "com/appnativa/rare/net/JavaURLConnection.h" #include "com/appnativa/rare/net/iConnectionHandler.h" @interface CCPBVConnectionHandler : NSObject < RAREiConnectionHandler > { @public IOSObjectArray *protocols_; } - (id)initWithNSStringArray:(IOSObjectArray *)protocols; - (id<RAREiURLConnection>)openConnectionWithJavaNetURL:(JavaNetURL *)url withNSString:(NSString *)mimeType; - (void)copyAllFieldsTo:(CCPBVConnectionHandler *)other; @end J2OBJC_FIELD_SETTER(CCPBVConnectionHandler, protocols_, IOSObjectArray *) typedef CCPBVConnectionHandler ComSparsewareBellavistaServiceConnectionHandler; @interface CCPBVConnectionHandler_JavaURLConnectionEx : RAREJavaURLConnection { } - (id)initWithJavaNetURLConnection:(JavaNetURLConnection *)conn; - (id)initWithJavaNetURLConnection:(JavaNetURLConnection *)conn withNSString:(NSString *)userInfo; - (id)initWithJavaNetURLConnection:(JavaNetURLConnection *)conn withNSString:(NSString *)userInfo withNSString:(NSString *)mimeType; - (JavaIoReader *)getReader; @end #endif // _CCPBVConnectionHandler_H_
// // SearchResult.h // StoreSearch // // Created by João Carreira on 19/02/14. // Copyright (c) 2014 João Carreira. All rights reserved. // #import <Foundation/Foundation.h> @interface SearchResult : NSObject // these properties use 'copy' instead of 'strong' as we're dealing with NSString // (a 'copy' will first make a copy of the object and then will treat it as 'strong') @property(nonatomic, copy) NSString *name; @property(nonatomic, copy) NSString *artistName; @property(nonatomic, copy) NSString *artworkURL60; @property(nonatomic, copy) NSString *artworkURL100; @property(nonatomic, copy) NSString *storeURL; @property(nonatomic, copy) NSString *kind; @property(nonatomic, copy) NSString *currency; @property(nonatomic, copy) NSDecimalNumber *price; @property(nonatomic, copy) NSString *genre; -(NSComparisonResult)compareName:(SearchResult *)other; -(NSString *)kindForDisplay; @end
#ifndef __PPU_H_INCLUDED__ #define __PPU_H_INCLUDED__ #include "screen.h" #include "memory.h" #ifdef __cplusplus extern "C" { #endif struct ppu { struct screen* screen; struct memory* memory; unsigned int y; unsigned int x; unsigned int c; unsigned int state; unsigned int busy; }; // LIFECYLE //////////////////////////////////////////////////////////////////// void ppu_init(struct ppu* p, struct screen* screen, struct memory* memory); void ppu_tick(struct ppu* p); #ifdef __cplusplus } #endif #endif // __PPU_H_INCLUDED__
#ifndef _CELESTIAL_CONFIGURE_H_ #define _CELESTIAL_CONFIGURE_H_ #include <string> namespace celestial { class Configure { public: static Configure* instance() { static Configure configure; return &configure; } void init(std::string conf_str); std::string get_log_dir() { return log_dir_; } std::string get_log_prefix() { return log_prefix_; } uint32_t get_log_roll_size() { return log_roll_size_; } std::string get_snapshot_dir() { return snapshot_dir_; } std::string get_snapshot_name() { return snapshot_name_; } uint32_t get_snapshot_max_block_size() { return snapshot_max_block_size_; } private: Configure() = default; Configure(const Configure&) = delete; Configure& operator=(const Configure&) = delete; private: std::string log_dir_; std::string log_prefix_; uint32_t log_roll_size_; std::string snapshot_dir_; std::string snapshot_name_; uint32_t snapshot_max_block_size_; }; } #endif
// // MYTopView.h // 底部标签添加发布按钮 // // Created by admin on 16/5/2. // Copyright © 2016年 程涛. All rights reserved. // #import <UIKit/UIKit.h> @class MYThemeItem; @interface MYTopView : UIView //模型属性 @property (nonatomic, strong) MYThemeItem *item; + (instancetype)topView; @end
// // PayManagerHelper.h // BlackCard // // Created by abx’s mac on 2017/5/23. // Copyright © 2017年 abx’s mac. All rights reserved. // #import <Foundation/Foundation.h> #import "ALiPay.h" #import "WXPay.h" #import "DefaultPay.h" @interface PayManagerHelper : NSObject<OEZHelperProtocol> -(void)setDelegate:(id<PayHelperDelegate>)delegate; -(void)setLazyShowDelegate:(id<PayHelperDelegate>)delegate; - (ALiPay *)aliPay; - (WXPay *)wxPay; - (DefaultPay *)defaultPay; @end
#include "transformations.h" #include <climits> #define SOLID 1 #define CHECKERED 2 #define SPHERE 1 #define POLY 2 #define MESH 3 // class Mesh{ // public: // Mesh(); // }; class Camera{ public: Camera(Vec3 e, Vec3 c, Vec3 up); Vec3 origin; Vec3 x; Vec3 y; Vec3 z; }; class Ray{ public: Ray(Vec3 ori, Vec3 dir); Vec3 origin; Vec3 direction; }; class Sphere{ public: Sphere(); Sphere(Vec3 c, float r); Vec3 center; float radius; }; class Polygon{ public: Polygon(); Polygon(int n); void AddFace(Vec4 v); int numFaces; int numFacesSet; Vec4 *faces; }; class Mesh{ public: Mesh(); Mesh(char * f); char * filename; }; class Object{ public: Object(); Object(Sphere s, int col, int f, int n); Object(Polygon p, int col, int f, int n); Sphere sphere; Polygon poly; Mesh mesh; int color; int finish; int numTrans; int type; bool Collide(Ray r, float &t); Vec3 normal(Vec3 point); }; class Finish{ public: Finish(); Finish(float am, float dif, float spec, float shin, float refl, float trans, float i); float ambiance; float diffuse; float specular; float shininess; float reflect; float transmission; float ior; }; class Pigment{ public: Pigment(); Pigment(int t, Vec3 col1, Vec3 col2, float s); int type; Vec3 color; Vec3 color2; float scale; Vec3 GetColor(Vec3 point); }; class Light{ public: Light(); Light(Vec3 pos, Vec3 inten, Vec3 atten); Vec3 position; Vec3 intensity; Vec3 attenuation; };
/* * Copyright (c) 2017 Intel Corporation * * SPDX-License-Identifier: Apache-2.0 */ #include <syscall_handler.h> #include <aio_comparator.h> _SYSCALL_HANDLER(aio_cmp_disable, dev, index) { _SYSCALL_OBJ(dev, K_OBJ_DRIVER_AIO); return _impl_aio_cmp_disable((struct device *)dev, index); } _SYSCALL_HANDLER1_SIMPLE(aio_cmp_get_pending_int, K_OBJ_DRIVER_AIO, struct device *);
// // MainViewController.h // 玩转二维码 // // Created by pljhonglu on 13-11-11. // Copyright (c) 2013年 pljhonglu. All rights reserved. // #import <UIKit/UIKit.h> #import <AddressBook/AddressBook.h> #import <AddressBookUI/AddressBookUI.h> #import "BaseViewController.h" @interface MainViewController : BaseViewController<UITextFieldDelegate,UITextViewDelegate,ABPeoplePickerNavigationControllerDelegate> @end
// // UIButton+Extension.h // FSBliBli // // Created by 四维图新 on 16/3/19. // Copyright © 2016年 四维图新. All rights reserved. // #import <UIKit/UIKit.h> @interface UIButton (Extension) /* 设置imageView和titleLabel之间的间距大小(在设置了image和title之后调用) 调用位置不受约束 */ - (void)setImageAndTitleHorizonMargin:(CGFloat)margin; /* 将imageView和titleLabel的位置调换,使得imageView在右边,titleLabel在左边 调用时间:放在最后调用最准确。必要时可放在 layoutSubviews 方法中调用。 在titleLabel、imageView和button的frame都确定之后再调用。 */ - (void)setTitleLeftAndImageRightWithHorizonMargin:(CGFloat)margin; /** * 将imageView和titleLabel调成上下结构,使得imageView在上边,titleLabel在下边 * * @param margin imageView和titleLabel在垂直方向上的间距 */ - (void)setImageTopAndTitleBottomWithVerticalMargin:(CGFloat)margin; /** * 将imageView和titleLabel调成上下结构,使得imageView在上边,titleLabel在下边 * * @param margin imageView和titleLabel在垂直方向上的间距 * @param space 为了调整titleLabel的水平居中的值。 */ - (void)setImageTopAndTitleBottomWithVerticalMargin:(CGFloat)margin space:(CGFloat)space; @end
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CHROME_BROWSER_UI_VIEWS_INFOBARS_AFTER_TRANSLATE_INFOBAR_H_ #define CHROME_BROWSER_UI_VIEWS_INFOBARS_AFTER_TRANSLATE_INFOBAR_H_ #include "chrome/browser/translate/options_menu_model.h" #include "chrome/browser/ui/views/infobars/translate_infobar_base.h" #include "chrome/browser/ui/views/infobars/translate_language_menu_model.h" #include "ui/views/controls/button/menu_button_listener.h" class TranslateInfoBarDelegate; namespace views { class MenuButton; } class AfterTranslateInfoBar : public TranslateInfoBarBase, public views::MenuButtonListener { public: AfterTranslateInfoBar(InfoBarService* owner, TranslateInfoBarDelegate* delegate); private: virtual ~AfterTranslateInfoBar(); // TranslateInfoBarBase: virtual void Layout() OVERRIDE; virtual void ViewHierarchyChanged(bool is_add, views::View* parent, views::View* child) OVERRIDE; virtual void ButtonPressed(views::Button* sender, const ui::Event& event) OVERRIDE; virtual int ContentMinimumWidth() const OVERRIDE; // views::MenuButtonListener: virtual void OnMenuButtonClicked(views::View* source, const gfx::Point& point) OVERRIDE; // The text displayed in the infobar is something like: // "Translated from <lang1> to <lang2> [more text in some languages]" // ...where <lang1> and <lang2> are comboboxes. So the text is split in 3 // chunks, each displayed in one of the labels below. views::Label* label_1_; views::Label* label_2_; views::Label* label_3_; views::MenuButton* original_language_menu_button_; views::MenuButton* target_language_menu_button_; views::LabelButton* revert_button_; views::MenuButton* options_menu_button_; scoped_ptr<TranslateLanguageMenuModel> original_language_menu_model_; scoped_ptr<TranslateLanguageMenuModel> target_language_menu_model_; OptionsMenuModel options_menu_model_; // True if the target language comes before the original one. bool swapped_language_buttons_; DISALLOW_COPY_AND_ASSIGN(AfterTranslateInfoBar); }; #endif // CHROME_BROWSER_UI_VIEWS_INFOBARS_AFTER_TRANSLATE_INFOBAR_H_
/* Siconos is a program dedicated to modeling, simulation and control * of non smooth dynamical systems. * * Copyright 2016 INRIA. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <stdio.h> #include <stdlib.h> #include "NonSmoothDrivers.h" #include "frictionContact_test_function.h" int main(void) { int info = 0 ; printf("Test on ./data/Confeti-ex13-4contact-Fc3D-SBM.dat\n"); FILE * finput = fopen("./data/Confeti-ex13-4contact-Fc3D-SBM.dat", "r"); SolverOptions * options = (SolverOptions *) malloc(sizeof(SolverOptions)); info = fc3d_setDefaultSolverOptions(options, SICONOS_FRICTION_3D_NSGS); options->dparam[0] = 1e-12; options->iparam[0] = 10000; options->internalSolvers->solverId = SICONOS_FRICTION_3D_ONECONTACT_ProjectionOnConeWithLocalIteration; options->internalSolvers->iparam[0] = 100; options->internalSolvers->dparam[0] = 1e-6; info = frictionContact_test_function(finput, options); deleteSolverOptions(options); free(options); fclose(finput); printf("\nEnd of test on ./data/Confeti-ex13-4contact-Fc3D-SBM.dat\n"); return info; }
/* * 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/lightsail/Lightsail_EXPORTS.h> #include <aws/lightsail/LightsailRequest.h> #include <aws/core/utils/memory/stl/AWSVector.h> #include <aws/lightsail/model/ContactProtocol.h> #include <utility> namespace Aws { namespace Lightsail { namespace Model { /** */ class AWS_LIGHTSAIL_API GetContactMethodsRequest : public LightsailRequest { public: GetContactMethodsRequest(); // 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 "GetContactMethods"; } Aws::String SerializePayload() const override; Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** * <p>The protocols used to send notifications, such as <code>Email</code>, or * <code>SMS</code> (text messaging).</p> <p>Specify a protocol in your request to * return information about a specific contact method protocol.</p> */ inline const Aws::Vector<ContactProtocol>& GetProtocols() const{ return m_protocols; } /** * <p>The protocols used to send notifications, such as <code>Email</code>, or * <code>SMS</code> (text messaging).</p> <p>Specify a protocol in your request to * return information about a specific contact method protocol.</p> */ inline bool ProtocolsHasBeenSet() const { return m_protocolsHasBeenSet; } /** * <p>The protocols used to send notifications, such as <code>Email</code>, or * <code>SMS</code> (text messaging).</p> <p>Specify a protocol in your request to * return information about a specific contact method protocol.</p> */ inline void SetProtocols(const Aws::Vector<ContactProtocol>& value) { m_protocolsHasBeenSet = true; m_protocols = value; } /** * <p>The protocols used to send notifications, such as <code>Email</code>, or * <code>SMS</code> (text messaging).</p> <p>Specify a protocol in your request to * return information about a specific contact method protocol.</p> */ inline void SetProtocols(Aws::Vector<ContactProtocol>&& value) { m_protocolsHasBeenSet = true; m_protocols = std::move(value); } /** * <p>The protocols used to send notifications, such as <code>Email</code>, or * <code>SMS</code> (text messaging).</p> <p>Specify a protocol in your request to * return information about a specific contact method protocol.</p> */ inline GetContactMethodsRequest& WithProtocols(const Aws::Vector<ContactProtocol>& value) { SetProtocols(value); return *this;} /** * <p>The protocols used to send notifications, such as <code>Email</code>, or * <code>SMS</code> (text messaging).</p> <p>Specify a protocol in your request to * return information about a specific contact method protocol.</p> */ inline GetContactMethodsRequest& WithProtocols(Aws::Vector<ContactProtocol>&& value) { SetProtocols(std::move(value)); return *this;} /** * <p>The protocols used to send notifications, such as <code>Email</code>, or * <code>SMS</code> (text messaging).</p> <p>Specify a protocol in your request to * return information about a specific contact method protocol.</p> */ inline GetContactMethodsRequest& AddProtocols(const ContactProtocol& value) { m_protocolsHasBeenSet = true; m_protocols.push_back(value); return *this; } /** * <p>The protocols used to send notifications, such as <code>Email</code>, or * <code>SMS</code> (text messaging).</p> <p>Specify a protocol in your request to * return information about a specific contact method protocol.</p> */ inline GetContactMethodsRequest& AddProtocols(ContactProtocol&& value) { m_protocolsHasBeenSet = true; m_protocols.push_back(std::move(value)); return *this; } private: Aws::Vector<ContactProtocol> m_protocols; bool m_protocolsHasBeenSet; }; } // namespace Model } // namespace Lightsail } // namespace Aws
/** @file A brief file description @section license License 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. */ /**************************************************************************** P_SSLNetAccept.h NetAccept is a generalized facility which allows Connections of different classes to be accepted either from a blockable thread or by adaptive polling. It is used by the NetProcessor and the ClusterProcessor and should be considered PRIVATE to processor implementations. ****************************************************************************/ #pragma once #include "ts/ink_platform.h" #include "P_Connection.h" #include "P_NetAccept.h" // // NetAccept // Handles accepting connections. // struct SSLNetAccept : public NetAccept { NetProcessor *getNetProcessor() const override; NetAccept *clone() const override; SSLNetAccept(const NetProcessor::AcceptOptions &opt); ~SSLNetAccept() override; };
///////////////////////////////////////////////////////////////////////////////////////////// // Copyright 2017 Intel Corporation // // 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 __CPUTINPUTLAYOUTCACHERDX11_H__ #define __CPUTINPUTLAYOUTCACHERDX11_H__ #include "CPUTInputLayoutCache.h" #include "CPUTOSServicesWin.h" #include "CPUTVertexShaderDX11.h" #include <D3D11.h> // D3D11_INPUT_ELEMENT_DESC #include <map> class CPUTInputLayoutCacheDX11:public CPUTInputLayoutCache { public: ~CPUTInputLayoutCacheDX11() { ClearLayoutCache(); } static CPUTInputLayoutCacheDX11 *GetInputLayoutCache(); static CPUTResult DeleteInputLayoutCache(); CPUTResult GetLayout(ID3D11Device *pDevice, D3D11_INPUT_ELEMENT_DESC *pDXLayout, CPUTVertexShaderDX11 *pVertexShader, ID3D11InputLayout **ppInputLayout); void ClearLayoutCache(); private: // singleton CPUTInputLayoutCacheDX11() { mLayoutList.clear(); } // convert the D3D11_INPUT_ELEMENT_DESC to string key cString GenerateLayoutKey(D3D11_INPUT_ELEMENT_DESC *pDXLayout); CPUTResult VerifyLayoutCompatibility(D3D11_INPUT_ELEMENT_DESC *pDXLayout, ID3DBlob *pVertexShaderBlob); static CPUTInputLayoutCacheDX11 *mpInputLayoutCache; std::map<cString, ID3D11InputLayout*> mLayoutList; }; #endif //#define __CPUTINPUTLAYOUTCACHERDX11_H__
/******************************************************************************* * @file HttpPoolModule_Impl.h 2014\7\25 11:20:55 $ * @author ¿ìµ¶<kuaidao@mogujie.com> * @brief http operation thread pool ******************************************************************************/ #ifndef HTTPPOOLMODULE_IMPL_43FDB575_36B4_4CFC_B205_89A9D1904A4C_H__ #define HTTPPOOLMODULE_IMPL_43FDB575_36B4_4CFC_B205_89A9D1904A4C_H__ #include "Modules/IHttpPoolModule.h" #include "utility/TTThread.h" #include "network/Lock.h" #include <vector> #include <list> /******************************************************************************/ using namespace util; class TTHttpThread; /** * The class <code>HttpPoolModule_Impl</code> * */ class HttpPoolModule_Impl final : public module::IHttpPoolModule { friend class TTHttpThread; public: /** @name Constructors and Destructor*/ //@{ /** * Constructor */ HttpPoolModule_Impl(); /** * Destructor */ virtual ~HttpPoolModule_Impl(); //@} public: virtual void pushHttpOperation(module::IHttpOperation* pOperaion, BOOL bHighPriority = FALSE); virtual void shutdown(); private: /** * ¼ÓÔØÏß³Ì * * @param * @return TRUE : success FALSE : fail * @exception there is no any exception to throw. */ virtual BOOL _launchThread(); /** * È¡ÏûËùÓÐÈÎÎñ * * @param * @return * @exception there is no any exception to throw. */ virtual void _cancelAllOperations(); private: CLock m_mtxLock; std::list<module::IHttpOperation*> m_lstHttpOpers; std::vector<TTHttpThread*> m_vecHttpThread; HANDLE m_hSemaphore; }; class TTHttpThread : public util::TTThread { friend class HttpPoolModule_Impl; public: TTHttpThread(); void shutdown(); private: virtual UInt32 process(); private: BOOL m_bContinue; }; /******************************************************************************/ #endif// HTTPPOOLMODULE_IMPL_43fdb575-36b4-4cfc-b205-89a9d1904a4c_H__
/* * Auto generated Run-Time-Environment Component Configuration File * *** Do not modify ! *** * * Project: 'KnittingMachineController' * Target: 'KnittingMachineController' */ #ifndef RTE_COMPONENTS_H #define RTE_COMPONENTS_H #endif /* RTE_COMPONENTS_H */
/* C implementation of Linked List based Stack ADT */ /* A more modern and reusable implementation */ #include <stdio.h> #include <stdlib.h> #include <stdbool.h> #include "LinkedStack.h" Stack CreateStack(int size) { Stack newS = (Stack)calloc(size, sizeof(Snode)); newS->head = (struct Node *)calloc(size, sizeof(struct Node)); newS->head->next = NULL; newS->cursize = 0; newS->maxsize = size; return newS; } bool IsFull(Stack S) { return S->cursize == S->maxsize; } bool IsEmpty(Stack S) { return S->cursize == 0; } void push(Stack S, ElementType item) { if (IsFull(S)) { fprintf(stderr, "The stack is full.\n"); exit(EXIT_FAILURE); } else { struct Node *temp = (struct Node *)malloc(sizeof(struct Node)); temp->data = item; temp->next = S->head; S->head = temp; S->cursize++; } } ElementType pop(Stack S) { if (IsEmpty(S)) { fprintf(stderr, "The stack is empty.\n"); exit(EXIT_FAILURE); } else { int res = S->head->data; S->head = S->head->next; S->cursize--; return res; } } ElementType top(Stack S) { return S->head->data; } void display(Stack S) { Stack temp = (Stack)malloc(sizeof(Stack)); temp->head = (struct Node *)malloc(sizeof(struct Node)); temp->head = S->head; while (temp->head->next != NULL) { printf("%d ", temp->head->data); temp->head = temp->head->next; } putchar('\n'); }
/* * 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 #ifdef _MSC_VER //disable windows complaining about max template size. #pragma warning (disable : 4503) #endif // _MSC_VER #if defined (USE_WINDOWS_DLL_SEMANTICS) || defined (_WIN32) #ifdef _MSC_VER #pragma warning(disable : 4251) #endif // _MSC_VER #ifdef USE_IMPORT_EXPORT #ifdef AWS_CLOUDWATCHLOGS_EXPORTS #define AWS_CLOUDWATCHLOGS_API __declspec(dllexport) #else #define AWS_CLOUDWATCHLOGS_API __declspec(dllimport) #endif /* AWS_CLOUDWATCHLOGS_EXPORTS */ #else #define AWS_CLOUDWATCHLOGS_API #endif // USE_IMPORT_EXPORT #else // defined (USE_WINDOWS_DLL_SEMANTICS) || defined (WIN32) #define AWS_CLOUDWATCHLOGS_API #endif // defined (USE_WINDOWS_DLL_SEMANTICS) || defined (WIN32)
// // UIView+Extension.h // SinaWeiBo // // Created by 魏伟 on 15/4/25. // Copyright (c) 2015年 weiweiwoep. All rights reserved. // #import <UIKit/UIKit.h> @interface UIView (Extension) @property(nonatomic,assign)CGFloat x; @property(nonatomic,assign)CGFloat y; @property(nonatomic,assign)CGFloat centerX; @property(nonatomic,assign)CGFloat centerY; @property(nonatomic,assign)CGFloat width; @property(nonatomic,assign)CGFloat height; @property(nonatomic,assign)CGSize size; @property(nonatomic,assign)CGPoint origin; @end
#pragma once #include "TextureAsset.h" #include "EngineLayer.h" #include "GPU.h" class SILENCE_EXPORT Cube { GPU_Transfer * transfer; GPU_Sampler * texture; public: Cube(); ~Cube(); void setArea(glm::vec3 position, glm::vec3 size, int texture_repeat_count); void setArea(glm::vec3 position, glm::vec3 size); void setTexture(TextureAsset * asset); GpuID getTextureID(); GpuID getDataID(); };
/* * Created by Joachim Vandersmissen (joachim@vandersmissen.me) * Since: 6/12/16 */ #include <malloc.h> #include "graph.h" // O(1) Edge *edge_create(Vertice *target) { Edge *edge = malloc(sizeof(Edge)); edge->target = target; return edge; } // O(1) Vertice *vertice_create(void *value) { Vertice *vertice = malloc(sizeof(Vertice)); vertice->value = value; vertice->edges = list_create(); return vertice; } // O(1) Graph *graph_create() { Graph *graph = malloc(sizeof(Graph)); graph->edges = 0; graph->vertices = list_create(); return graph; } // O(n) Edge *graph_get_edge(Graph *graph, Vertice* source, Vertice* target) { for (Element *current = source->edges->first; current; current = current->next) { if (((Edge *) current->value)->target == target) return current->value; } return NULL; } // O(n) int graph_adjecent(Graph *graph, Vertice* source, Vertice* target) { return graph_get_edge(graph, source, target) || graph_get_edge(graph, target, source); } // O(1) Vertice *graph_add_vertice(Graph *graph, void *value) { return list_append(graph->vertices, vertice_create(value))->value; } // O(n) void *graph_remove_vertice(Graph *graph, Vertice *vertice) { return ((Vertice *) list_remove(graph->vertices, vertice))->value; } // O(1) Edge *graph_add_edge(Graph *graph, Vertice *source, Vertice *target) { graph->edges++; return list_append(source->edges, edge_create(target))->value; } // O(n²) void graph_remove_edge(Graph *graph, Vertice *source, Vertice *target) { for (Element *current = source->edges->first; current; current = current->next) { if (((Edge *) current->value)->target == target) { list_remove(source->edges, current->value); return; } } }
#pragma once #include "InteractionLayer.h" enum GraphicSettings { HIGH, MEDIUM, LOW }; class OptionsGraphics { LocalAssetManager * package; Window * window; GraphicSettings currentSettings; Button2D graphicsSizeButtons[2]; Text2D graphicsizeLabel; Text2D graphicsSize; SDL_Color colour; public: OptionsGraphics(); ~OptionsGraphics(); void onGamepadButton(int key, int state, int a); void create(LocalAssetManager *, Window *); void render(Renderer2D *); void event(SDL_Event&); void update(); };
// // MeetingPlaceAnnotation.h // Meep // // Created by Alex Jarvis on 15/03/2011. // Copyright 2011 Alex Jarvis. All rights reserved. // #import <Foundation/Foundation.h> #import <MapKit/MapKit.h> @interface MeetingPlaceAnnotation : NSObject <MKAnnotation> { CLLocationCoordinate2D coordinate; NSString *title; NSString *subtitle; NSNumber *_id; } @property (nonatomic) CLLocationCoordinate2D coordinate; @property (nonatomic, copy) NSString *title; @property (nonatomic, copy) NSString *subtitle; @property (nonatomic, copy) NSNumber *_id; @end
#include "v3p_f2c.h" #ifdef __cplusplus extern "C" { #endif VOID #ifdef KR_headers d_cnjg(r, z) doublecomplex *r, *z; #else d_cnjg(doublecomplex *r, doublecomplex *z) #endif { doublereal zi = z->i; r->r = z->r; r->i = -zi; } #ifdef __cplusplus } #endif
// Copyright 2020 DeepMind Technologies Limited. // // 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 COURIER_COURIER_SERVICE_IMPL_H_ #define COURIER_COURIER_SERVICE_IMPL_H_ #include <memory> #include <vector> #include "absl/base/thread_annotations.h" #include "absl/synchronization/mutex.h" #include "grpcpp/server_context.h" #include "courier/courier_service.grpc.pb.h" #include "courier/courier_service.pb.h" #include "courier/router.h" namespace courier { // CourierServiceImpl implements an RPC server for the CourierService. // // Method handlers are invoked via CourierService.Call. Calls can be executed // concurrently with respect to each other but are serialized with respect to // Router.Bind and Router.Unbind. // // Note: Method handlers must not transitively call Bind/Unbind, which would // deadlock. class CourierServiceImpl final : public CourierService::Service { public: CourierServiceImpl(Router* router); // Calls the method handler registered under the name request->method() // and returns the result of the call over RPC. If no method is registered // under the requested name, a NOT_FOUND error is returned. // // This function blocks until the execution has completed. // calls of the binding functions have completed. grpc::Status Call(::grpc::ServerContext* context, const CallRequest* request, CallResponse* reply) override; // Returns a list of the names of all registered method handlers over RPC. // The returned list is advisory only. Presence on the list does not imply // that a call under that name will succeed, nor does absence from the list // imply that a call will fail. // // This function blocks until concurrent calls of the binding functions have // completed. grpc::Status ListMethods(::grpc::ServerContext* context, const ListMethodsRequest* request, ListMethodsResponse* reply) override; private: // Method handlers which are executed on incoming Call requests. Router* router_; }; } // namespace courier #endif // COURIER_COURIER_SERVICE_IMPL_H_
//---------------------------------------------------------- -*- Mode: C++ -*- // $Id: qcutils.h 385 2010-05-27 15:58:30Z sriramsrao $ // // Created 2008/11/01 // // Copyright 2008,2009 Quantcast Corp. // // This file is part of Kosmos File System (KFS). // // 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 QCUTILS_H #define QCUTILS_H #include <stdint.h> #include <string> #define QCRTASSERT(a) \ if (!(a)) QCUtils::AssertionFailure(#a, __FILE__, __LINE__) struct QCUtils { static void FatalError( const char* inMsgPtr, int inSysError); static std::string SysError( int inSysError, const char* inMsgPtr = 0); static void AssertionFailure( const char* inMsgPtr, const char* inFileNamePtr, int inLineNum); static int64_t ReserveFileSpace( int inFd, int64_t inSize); static int AllocateFileSpace( const char* inFileNamePtr, int64_t inSize, int64_t inMinSize = -1, int64_t* inInitialFileSizePtr = 0); static int AllocateFileSpace( int inFd, int64_t inSize, int64_t inMinSize = -1, int64_t* inInitialFileSizePtr = 0); }; #endif /* QCUTILS_H */
/* * Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ #pragma once #include <aws/cloudsearch/CloudSearch_EXPORTS.h> #include <aws/core/client/AWSErrorMarshaller.h> namespace Aws { namespace Client { class AWS_CLOUDSEARCH_API CloudSearchErrorMarshaller : public Client::AWSErrorMarshaller { public: CloudSearchErrorMarshaller() {} virtual ~CloudSearchErrorMarshaller() {} virtual Client::AWSError<Client::CoreErrors> FindErrorByName(const char* exceptionName) const; }; } // namespace CloudSearch } // namespace Aws
// // ZBTextView.h // XLWB // // Created by zhangbin on 16/5/30. // Copyright © 2016年 zhangbin. All rights reserved. // #import <UIKit/UIKit.h> @interface ZBTextView : UITextView /** 占位文字*/ @property(nonatomic,copy)NSString *placeholder; /** 占位文字的颜色*/ @property(nonatomic,strong)UIColor *placeholderColor; @end
/*!The Treasure Box Library * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * Copyright (C) 2009-present, TBOOX Open Source Group. * * @author ruki * @file stristr.c * @ingroup libc * */ /* ////////////////////////////////////////////////////////////////////////////////////// * includes */ #include "string.h" #ifdef TB_CONFIG_LIBC_HAVE_STRCASESTR # include <string.h> #endif /* ////////////////////////////////////////////////////////////////////////////////////// * interfaces */ #ifdef TB_CONFIG_LIBC_HAVE_STRCASESTR tb_char_t* tb_stristr(tb_char_t const* s1, tb_char_t const* s2) { // check tb_assert_and_check_return_val(s1 && s2, tb_null); return strcasestr(s1, s2); } #else tb_char_t* tb_stristr(tb_char_t const* s1, tb_char_t const* s2) { // check tb_assert_and_check_return_val(s1 && s2, tb_null); // init __tb_register__ tb_char_t const* s = s1; __tb_register__ tb_char_t const* p = s2; // done do { if (!*p) return (tb_char_t* )s1; if ((*p == *s) || (tb_tolower(*((tb_byte_t*)p)) == tb_tolower(*((tb_byte_t*)s)))) { ++p; ++s; } else { p = s2; if (!*s) return tb_null; s = ++s1; } } while (1); // no found return tb_null; } #endif
// Generated by Haxe 3.4.0 #ifndef INCLUDED_kha_graphics2_Graphics1 #define INCLUDED_kha_graphics2_Graphics1 #ifndef HXCPP_H #include <hxcpp.h> #endif #ifndef INCLUDED_kha_graphics1_Graphics #include <kha/graphics1/Graphics.h> #endif HX_DECLARE_CLASS2(haxe,io,Bytes) HX_DECLARE_CLASS1(kha,Canvas) HX_DECLARE_CLASS1(kha,Image) HX_DECLARE_CLASS1(kha,Resource) HX_DECLARE_CLASS2(kha,graphics1,Graphics) HX_DECLARE_CLASS2(kha,graphics2,Graphics1) namespace kha{ namespace graphics2{ class HXCPP_CLASS_ATTRIBUTES Graphics1_obj : public hx::Object { public: typedef hx::Object super; typedef Graphics1_obj OBJ_; Graphics1_obj(); public: enum { _hx_ClassId = 0x1d93997f }; void __construct(::Dynamic canvas); inline void *operator new(size_t inSize, bool inContainer=true,const char *inName="kha.graphics2.Graphics1") { return hx::Object::operator new(inSize,inContainer,inName); } inline void *operator new(size_t inSize, int extra) { return hx::Object::operator new(inSize+extra,true,"kha.graphics2.Graphics1"); } static hx::ObjectPtr< Graphics1_obj > __new(::Dynamic canvas); static hx::ObjectPtr< Graphics1_obj > __alloc(hx::Ctx *_hx_ctx,::Dynamic canvas); static void * _hx_vtable; static Dynamic __CreateEmpty(); static Dynamic __Create(hx::DynamicArray inArgs); //~Graphics1_obj(); HX_DO_RTTI_ALL; hx::Val __Field(const ::String &inString, hx::PropertyAccess inCallProp); hx::Val __SetField(const ::String &inString,const hx::Val &inValue, hx::PropertyAccess inCallProp); void __GetFields(Array< ::String> &outFields); static void __register(); void __Mark(HX_MARK_PARAMS); void __Visit(HX_VISIT_PARAMS); bool _hx_isInstanceOf(int inClassId); void *_hx_getInterface(int inHash); ::String __ToString() const { return HX_HCSTRING("Graphics1","\xe6","\x98","\x64","\xaa"); } ::Dynamic canvas; ::kha::Image texture; ::haxe::io::Bytes pixels; void begin(); ::Dynamic begin_dyn(); void end(); ::Dynamic end_dyn(); void setPixel(int x,int y,int color); ::Dynamic setPixel_dyn(); }; } // end namespace kha } // end namespace graphics2 #endif /* INCLUDED_kha_graphics2_Graphics1 */
// // GameLobbyViewController.h // 3004iPhone // // Created by Devin Lynch on 2014-01-25. // // #import <UIKit/UIKit.h> @class GameLobby; @interface GameLobbyViewController : UIViewController<UITableViewDataSource, UITableViewDelegate> { } @property IBOutlet UILabel *playersInLobbyLabel; @property IBOutlet UILabel *playersNeededLabel; @property IBOutlet UITableView *usersTableView; @property GameLobby *gameLobby; -(IBAction)didPressLeave:(id)sender; +(void) stopLobbyStateChecker; @end
/** * Appcelerator Titanium Mobile * Copyright (c) 2009-2012 by Appcelerator, Inc. All Rights Reserved. * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. * * WARNING: This is generated code. Modify at your own risk and without support. */ // A good bit of this code was derived from the Three20 project // and was customized to work inside BgooAppi // // All modifications by BgooAppi are licensed under // the Apache License, Version 2.0 // // // Copyright 2009 Facebook // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // #ifdef USE_TI_UIDASHBOARDVIEW #import <Foundation/Foundation.h> @class LauncherButton; @interface LauncherItem : NSObject { NSString *title; UIImage *image; UIImage *selectedImage; NSInteger badgeValue; BOOL canDelete; LauncherButton *button; UIView *view; id userData; } @property(nonatomic,readwrite,retain) NSString *title; @property(nonatomic,readwrite,retain) UIImage *image; @property(nonatomic,readwrite,retain) UIImage *selectedImage; @property(nonatomic,readwrite,retain) UIView *view; @property(nonatomic,assign) LauncherButton *button; @property(nonatomic,readwrite,assign) id userData; @property(nonatomic) BOOL canDelete; @property(nonatomic) NSInteger badgeValue; @end #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. */ #include "control/estimator/estimator_filter.h" #include <assert.h> #include <stdint.h> #include "common/c_math/kalman.h" #include "common/c_math/linalg.h" #include "common/c_math/vec3.h" void EstimatorFilterCorrectScalarSparse3(const Vec3 *h_meas, int32_t meas_index, double sigma_meas, double total_state_meas_err, Vec *x_hat, Vec *ud, Vec *h, Vec *k, double *dz, double *pzz, Vec *dx_plus) { assert(h_meas != NULL && x_hat != NULL && ud != NULL && h != NULL && k != NULL && dz != NULL && pzz != NULL && dx_plus != NULL); assert(sigma_meas > 0.0); assert(0 <= meas_index && meas_index <= x_hat->length - 3); assert(x_hat->length == h->length && x_hat->length == k->length && ud->length == UdKalmanArrayLength(x_hat->length)); assert(x_hat->length == dx_plus->length); *dz = total_state_meas_err - h_meas->x * VecGet(x_hat, meas_index) - h_meas->y * VecGet(x_hat, meas_index + 1) - h_meas->z * VecGet(x_hat, meas_index + 2); // TODO: Exploit sparsity of H matrix. VecZero(h); *VecPtr(h, meas_index) = h_meas->x; *VecPtr(h, meas_index + 1) = h_meas->y; *VecPtr(h, meas_index + 2) = h_meas->z; // TODO: Validate measurements before applying corrections. UdKalmanCalcWeightVectors(ud, h, k); // Calculate innovation covariance: Pzz = H * P * H^T + R. *pzz = VecDot(h, k) + sigma_meas * sigma_meas; UdKalmanCalcGain(sigma_meas * sigma_meas, h, ud, k); VecScale(k, *dz, dx_plus); VecAdd(dx_plus, x_hat, x_hat); }
#ifndef _ESPRESSO_PACKET_PROCESSOR_H_ #define _ESPRESSO_PACKET_PROCESSOR_H_ #include "network_packets.h" #include "espresso_storage/espresso_storage.h" Packet* process_read_packet(const ReadChunkRequest& request); Packet* process_write_packet(const WriteChunkRequest& request); Packet* process_delete_packet(const DeleteChunkRequest& request); #endif // _ESPRESSO_PACKET_PROCESSOR_H_
/** Wonderfully Integrated Native Object Oriented Neural Network API. STANDARD DISCLAIMER ScienceTechWorks is furnishing this item "as is". ScienceTechWorks does not provide any warranty of the item whatsoever, whether express, implied, or statutory, including, but not limited to, any warranty of merchantability or fitness for a particular purpose or any warranty that the contents of the item will be error-free. In no respect shall ScienceTechWorks incur any liability for any damages, including, but limited to, direct, indirect, special, or consequential damages arising out of, resulting from, or any way connected to the use of the item, whether or not based upon warranty, contract, tort, or otherwise; whether or not injury was sustained by persons or property or otherwise; and whether or not loss was sustained from, or arose out of, the results of, the item, or any services that may be provided by ScienceTechWorks. If a recognizable person appears in this video, use for commercial purposes may infringe a right of privacy or publicity. It may not be used to state or imply the endorsement by ScienceTechWorks employees of a commercial product, process or service, or used in any other manner that might mislead. Accordingly, it is requested that if this video is used in advertising and other commercial promotion, layout and copy be submitted to ScienceTechWorks prior to release. It may not be used to state or imply the endorsement by ScienceTechWorks employees of a commercial product, process or service, or used in any other manner that might mislead. ScienceTechworks@gmail.com Ramon.Talavera@gmail.com **/ #pragma once // -- STL Imports -- #include <string> #include <iostream> #include <sstream> #include <fstream> using namespace std; class Logger { public: ofstream fout; Logger(void); virtual ~Logger(void); bool init(const char *path); void log(string message); void close(void); void disable(); };
/* Copyright (c) 2014 Author: Jeff Weisberg <jaw @ solvemedia.com> Created: 2014-Dec-05 17:40 (EST) Function: client async i/o */ #ifndef __fbdb_clientio_h_ #define __fbdb_clientio_h_ #include "lock.h" class ClientIO { protected: Mutex _lock; NetAddr _addr; google::protobuf::Message *_res; string _rbuf, _wbuf; int _fd; int _state; int _wrpos; int _rlen; bool _polling; lrtime_t _timeout; protected: lrtime_t _rel_timeout; public: ClientIO(const NetAddr&, int, const google::protobuf::Message*); virtual ~ClientIO(); void set_timeout(lrtime_t); void start(void); protected: void retry(const NetAddr&); void discard(void); private: void do_connect(void); void do_read(void); void do_write(void); void do_timeout(void); void do_error(const char *); void do_work(void); void _close(void); virtual void on_error(void) = 0; virtual void on_success(void) = 0; friend int build_pfd(struct pollfd *); friend void process_pfd(struct pollfd *, int); }; #endif /* __fbdb_clientio_h_ */
#ifndef _SPO2_VALUE_VIEW_H_ #define _SPO2_VALUE_VIEW_H_ class c_spo2_value_view : public c_value_view { public: virtual c_wnd* clone(){return new c_spo2_value_view();} virtual void on_init_children(void); }; #endif
#pragma once const int cFiltRefIDsAllocChunk = 10000; // allocate for RefIDs in this many instances class CFilterRefIDs : CCSVFile { int m_NumFilterRefIDs; // number of RefIDs in m_pFilterRefIDs int m_AllocdFilterRefIDs; // allocd RefIDs int *m_pFilterRefIDs; // array of RefIDs static int SortRefIDs( const void *arg1, const void *arg2); public: CFilterRefIDs(void); ~CFilterRefIDs(void); int Open(char *pszFile); // open and load RefIDs from file, expected to be in first field void Reset(void); // resets state back to that immediately following class instantiation bool Locate(int RefID); // returns true if RefID is in RefIDs loaded };
// // VCOpenURL.h // VCommonKit_Example // // Created by Vic Zhou on 3/3/15. // Copyright (c) 2015 everycode. All rights reserved. // #import <Foundation/Foundation.h> @interface VCOpenURL : NSObject //跳转到电子市场页面 + (void)goToAppStoreHomePage:(NSInteger)appid; //跳转到电子市场评论页面 + (void)goToAppStoreCommentPage:(NSInteger)appid; //打开浏览器 + (void)openBrowse:(NSString *)url; //跳到短信页面 + (void)openSmsPage:(NSString *)phonenumber; //打开EMAIL + (void)openEmail:(NSString *)email; //打开电话 + (void)openPhone:(NSString *)number; //打开Google地图 + (void)openGoogleMaps:(NSString *)address; @end
 #include <stdio.h> #include <OMX_Core.h> #include "common/test_omxil.h" #include "common/omxil_utils.h" int main(int argc, char *argv[]) { OMX_ERRORTYPE result; int i; result = OMX_ErrorNone; for (i = 0; i < 100; i++) { result = OMX_Init(); if (result != OMX_ErrorNone) { fprintf(stderr, "OMX_Init i:%d failed.\n", i); goto err_out1; } result = OMX_Deinit(); if (result != OMX_ErrorNone) { fprintf(stderr, "OMX_Deinit i:%d failed.\n", i); goto err_out1; } } return 0; err_out1: fprintf(stderr, "ErrorCode:0x%08x(%s).\n", result, get_omx_errortype_name(result)); return -1; }
#include <stdio.h> #include <stdint.h> #include <interpose.h> int fake_puts(const char *s) { puts("whee"); puts(s); return 0; } __attribute__((constructor)) static void hello() { fprintf(stderr, "Someone loaded me\n"); fprintf(stderr, "%d\n", interpose("_puts", fake_puts)); }
/** * Copyright 2017 Harold Bruintjes * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #pragma once #include "slice.h" #include <sodium.h> #include <cstdint> #include <array> #include <vector> #include <iostream> #include <iomanip> namespace ceema { /** Simple vector for bytes */ typedef std::vector<std::uint8_t> byte_vector; /** Simple fixed size byte array */ template<std::size_t N> struct byte_array : public std::array<std::uint8_t, N> { static constexpr std::size_t array_size = N; byte_array() = default; byte_array(byte_array const &) = default; byte_array(byte_array &&) = default; template<typename Array, std::size_t Offset, std::size_t L> explicit byte_array(slice<Array, Offset, L> const& slice) { std::copy(slice.begin(), slice.end(), this->begin()); } template<typename Array, std::size_t Offset, std::size_t L> explicit byte_array(slice<Array, Offset, L> && slice) { std::copy(slice.begin(), slice.end(), this->begin()); } explicit byte_array(byte_vector const& vec) { auto size = std::min(N, vec.size()); std::copy(vec.begin(), vec.begin() + size, this->begin()); } explicit byte_array(byte_vector&& vec) { auto size = std::min(N, vec.size()); std::copy(vec.begin(), vec.begin() + size, this->begin()); } byte_array& operator=(byte_array const &) = default; byte_array& operator=(byte_array &&) = default; template<typename Array, std::size_t Offset> byte_array& operator=(slice<Array, Offset, N> const& slice) { std::copy(slice.begin(), slice.end(), this->begin()); return *this; } template<typename... Args> explicit byte_array(Args const&&...args) : std::array<std::uint8_t, N>{{std::forward<std::uint8_t>(args)...}} {} }; } namespace std { template<size_t N> inline ostream &operator<<(ostream &os, ceema::byte_array<N> const &array) { auto flags = os.setf(ios::hex); auto fill = os.fill('0'); for (auto const &element: array) { os << hex << setw(2) << static_cast<unsigned>(element); } os.flags(flags); os.fill(fill); return os; } template<typename _CharT, typename _Traits> inline basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& os, ceema::byte_vector const &vec) { auto flags = os.setf(ios::hex); auto fill = os.fill('0'); for (auto const &element: vec) { os << hex << setw(2) << static_cast<unsigned>(element); } os.flags(flags); os.fill(fill); return os; } template<typename A, size_t O, size_t L> inline typename enable_if<is_same<typename A::value_type, uint8_t>::value, ostream &>::type operator<<(ostream &os, ceema::slice<A, O, L> const& slice) { auto flags = os.setf(ios::hex); auto fill = os.fill('0'); for (auto const &element: slice) { os << hex << setw(2) << (unsigned int) element; } os.flags(flags); os.fill(fill); return os; } template<typename A, size_t O, size_t L> inline typename enable_if<!is_same<typename A::value_type, uint8_t>::value, ostream &>::type operator<<(ostream &os, ceema::slice <A, O, L> const& slice) { for (auto const &element: slice) { os << element; } return os; } }
/** * Appcelerator Titanium Mobile * Copyright (c) 2009-2015 by Appcelerator, Inc. All Rights Reserved. * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. * * WARNING: This is generated code. Modify at your own risk and without support. */ #if defined(USE_TI_UITEXTWIDGET) || defined(USE_TI_UITEXTAREA) || defined(USE_TI_UITEXTFIELD) #import "TiUIView.h" @protocol TiUITextWidget #pragma mark Factory methods -(UIView<UITextInputTraits>*)textWidgetView; #pragma mark Public APIs -(BOOL)hasText; @end @interface TiUITextWidget : TiUIView<TiUITextWidget> { @protected UIView<UITextInputTraits>* textWidgetView; BOOL suppressReturn; NSInteger maxLength; TiUIView<TiScrolling> * parentScrollView; @private } -(void)textWidget:(UIView<UITextInputTraits>*)tw didFocusWithText:(NSString *)value; -(void)textWidget:(UIView<UITextInputTraits>*)tw didBlurWithText:(NSString *)value; -(void)setValue_:(id)text; -(void)setSelectionFrom:(id)start to:(id)end; #pragma mark - paypalsample Internal Use Only -(void)updateKeyboardStatus; -(NSDictionary*)selectedRange; @end #endif
/** * Copyright (c) 2007-2014 Kaazing Corporation. All rights reserved. * * 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. */ #import <Foundation/Foundation.h> #import "KGHandler.h" #import "KGDownstreamChannel.h" #import "KGDownstreamHandlerListener.h" #import "KGHttpRequestHandlerFactory.h" @interface KGDownstreamHandler : NSObject <KGHandler> -(void) processProgressEvent:(KGDownstreamChannel *)channel payload:(KGByteBuffer *) payload; -(void) processConnect:(KGDownstreamChannel *) channel uri: (KGHttpURI *)uri protocol:(NSString*) protocol; -(void) processClose:(KGDownstreamChannel *)channel; -(void) setListener:(id <KGDownstreamHandlerListener>)listener; -(void) setNextHandler:(id <KGHttpRequestHandler>)handler; - (void) downstreamOpened:(KGDownstreamChannel *)channel request:(KGHttpRequest *)request; - (void) downstreamClosed:(KGDownstreamChannel *)channel; - (void) downstreamFailed:(KGDownstreamChannel *)channel exception:(NSException*)exception; // this is awful -(id <KGHttpRequestHandler>) nextHandler; -(id <KGDownstreamHandlerListener>)listener; -(void) processMessage:(KGDownstreamChannel *) channel message:(KGByteBuffer *) message; -(void) processTextMessage:(KGDownstreamChannel *) channel message:(NSString*) message; @end
// UIImage+Alpha.h // Created by Trevor Harmon on 9/20/09. // Free for personal or commercial use, with or without modification. // No warranty is expressed or implied. // NOTE: FindATDN2 modified to convert from Category to // new Class name since iPhone seems to have some issues with Categories // of built in Classes // Helper methods for adding an alpha layer to an image @interface UIImageAlpha : NSObject { } + (BOOL)hasAlpha:(UIImage*)image; + (UIImage *)imageWithAlpha:(UIImage*)image; + (UIImage *)transparentBorderImage:(NSUInteger)borderSize image:(UIImage*)image; @end
/* * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef UFG_PROCESS_MESH_H_ #define UFG_PROCESS_MESH_H_ #include <limits> #include "common/common.h" #include "common/logging.h" #include "gltf/cache.h" #include "gltf/gltf.h" #include "process/math.h" #include "pxr/base/vt/array.h" namespace ufg { using PXR_NS::VtArray; constexpr uint32_t kNoIndex = std::numeric_limits<uint32_t>::max(); size_t GetUsedPoints( size_t pos_count, const uint32_t* indices, size_t count, std::vector<bool>* out_used); void GetTriIndices( const std::vector<uint32_t>& pos_to_point_map, const uint32_t* indices, size_t count, VtArray<int>* out_vert_counts, VtArray<int>* out_vert_indices); template <typename T> void ReverseTriWinding(T* indices, size_t count) { UFG_ASSERT_LOGIC(count % 3 == 0); T* const end = indices + count; for (T* it = indices; it != end; it += 3) { const T i1 = it[1]; const T i2 = it[2]; it[1] = i2; it[2] = i1; } } struct PrimInfo { using Uvset = VtArray<GfVec2f>; using UvsetMap = std::map<Gltf::Mesh::Attribute::Number, Uvset>; VtArray<int> tri_vert_counts; VtArray<int> tri_vert_indices; VtArray<GfVec3f> pos; VtArray<GfVec3f> norm; UvsetMap uvs; uint8_t color_stride = 0; uint8_t skin_index_stride = 0; uint8_t skin_weight_stride = 0; VtArray<GfVec3f> color3; VtArray<GfVec4f> color4; std::vector<int> skin_indices; std::vector<float> skin_weights; void Swap(PrimInfo* other); }; struct MeshInfo { std::vector<PrimInfo> prims; }; void GetMeshInfo(const Gltf& gltf, Gltf::Id mesh_id, GltfCache* gltf_cache, MeshInfo* out_info, Logger* logger); } // namespace ufg #endif // UFG_PROCESS_MESH_H_
// // JHScrollView.h // JHKit // // Created by muma on 2016/12/10. // Copyright © 2016年 weygo.com. All rights reserved. // #import <UIKit/UIKit.h> @interface JHScrollView : UIScrollView @end
/* * Copyright (c) 2016 Intel Corporation. * * SPDX-License-Identifier: Apache-2.0 */ /** * @file * @brief Network Events code public header */ #ifndef __NET_EVENT_H__ #define __NET_EVENT_H__ /* Network Interface events */ #define _NET_IF_LAYER NET_MGMT_LAYER_L1 #define _NET_IF_CORE_CODE 0x001 #define _NET_EVENT_IF_BASE (NET_MGMT_EVENT_BIT | \ NET_MGMT_IFACE_BIT | \ NET_MGMT_LAYER(_NET_IF_LAYER) | \ NET_MGMT_LAYER_CODE(_NET_IF_CORE_CODE)) enum net_event_if_cmd { NET_EVENT_IF_CMD_DOWN = 0, NET_EVENT_IF_CMD_UP, }; #define NET_EVENT_IF_DOWN \ (_NET_EVENT_IF_BASE | NET_EVENT_IF_CMD_DOWN) #define NET_EVENT_IF_UP \ (_NET_EVENT_IF_BASE | NET_EVENT_IF_CMD_UP) /* IPv6 Events */ #define _NET_IPV6_LAYER NET_MGMT_LAYER_L3 #define _NET_IPV6_CORE_CODE 0x600 #define _NET_EVENT_IPV6_BASE (NET_MGMT_EVENT_BIT | \ NET_MGMT_IFACE_BIT | \ NET_MGMT_LAYER(_NET_IPV6_LAYER) | \ NET_MGMT_LAYER_CODE(_NET_IPV6_CORE_CODE)) enum net_event_ipv6_cmd { NET_EVENT_IPV6_CMD_ADDR_ADD = 0, NET_EVENT_IPV6_CMD_ADDR_DEL, NET_EVENT_IPV6_CMD_MADDR_ADD, NET_EVENT_IPV6_CMD_MADDR_DEL, NET_EVENT_IPV6_CMD_PREFIX_ADD, NET_EVENT_IPV6_CMD_PREFIX_DEL, }; #define NET_EVENT_IPV6_ADDR_ADD \ (_NET_EVENT_IPV6_BASE | NET_EVENT_IPV6_CMD_ADDR_ADD) #define NET_EVENT_IPV6_ADDR_DEL \ (_NET_EVENT_IPV6_BASE | NET_EVENT_IPV6_CMD_ADDR_DEL) #define NET_EVENT_IPV6_MADDR_ADD \ (_NET_EVENT_IPV6_BASE | NET_EVENT_IPV6_CMD_MADDR_ADD) #define NET_EVENT_IPV6_MADDR_DEL \ (_NET_EVENT_IPV6_BASE | NET_EVENT_IPV6_CMD_MADDR_DEL) #define NET_EVENT_IPV6_PREFIX_ADD \ (_NET_EVENT_IPV6_BASE | NET_EVENT_IPV6_CMD_PREFIX_ADD) #define NET_EVENT_IPV6_PREFIX_DEL \ (_NET_EVENT_IPV6_BASE | NET_EVENT_IPV6_CMD_PREFIX_DEL) /* IPv4 Events*/ #define _NET_IPV4_LAYER NET_MGMT_LAYER_L3 #define _NET_IPV4_CORE_CODE 0x400 #define _NET_EVENT_IPV4_BASE (NET_MGMT_EVENT_BIT | \ NET_MGMT_IFACE_BIT | \ NET_MGMT_LAYER(_NET_IPV4_LAYER) | \ NET_MGMT_LAYER_CODE(_NET_IPV4_CORE_CODE)) enum net_event_ipv4_cmd { NET_EVENT_IPV4_CMD_ADDR_ADD = 0, NET_EVENT_IPV4_CMD_ADDR_DEL, NET_EVENT_IPV4_CMD_ROUTER_ADD, }; #define NET_EVENT_IPV4_ADDR_ADD \ (_NET_EVENT_IPV4_BASE | NET_EVENT_IPV4_CMD_ADDR_ADD) #define NET_EVENT_IPV4_ADDR_DEL \ (_NET_EVENT_IPV4_BASE | NET_EVENT_IPV4_CMD_ADDR_DEL) #define NET_EVENT_IPV4_ROUTER_ADD \ (_NET_EVENT_IPV4_BASE | NET_EVENT_IPV4_CMD_ROUTER_ADD) #endif /* __NET_EVENT_H__ */
#ifndef CYCLELIST #define CYCLELIST // элемент циклического списка struct CycleListElement; // циклический список struct CycleList; // создает циклический список CycleList* createCycle(); // удаляет циклический список void deleteCycle(CycleList* cycle); // добавляет первый элемент в список void addFirst(int value, CycleList* cycle); // вставляет новый элемент списка за текущим void insert(int value, CycleListElement* current, CycleList *cycle); // удаляет текущий элемент списка void remove(CycleListElement* current, CycleList *cycle); // возвращает значение текущего элемента списка int getValue(CycleListElement* current); // возвращает указатель на элемент, следующий за текущим CycleListElement* next(CycleListElement* current); // возвращает указатель на предыдущий элемент CycleListElement* previous(CycleListElement* current); // возвращает указатель на элемент, следующий за текущим через step CycleListElement* moveNext(CycleListElement* current, int step); // возвращает указатель на 1 элемент списка CycleListElement* getFirst(CycleList* cycle); // возвращает размер списка int getSize(CycleList* cycle); // выводит значения элементов списка в консоль через пробел void printCycle(CycleList* cycle); #endif // CYCLELIST