text
stringlengths
4
6.14k
// Copyright (c) 2011-2016 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_QT_RECENTREQUESTSTABLEMODEL_H #define BITCOIN_QT_RECENTREQUESTSTABLEMODEL_H #include <qt/walletmodel.h> #include <QAbstractTableModel> #include <QDateTime> #include <QStringList> class RecentRequestEntry { public: RecentRequestEntry() : nVersion(RecentRequestEntry::CURRENT_VERSION), id(0) {} static const int CURRENT_VERSION = 1; int nVersion; int64_t id; QDateTime date; SendCoinsRecipient recipient; ADD_SERIALIZE_METHODS; template <typename Stream, typename Operation> inline void SerializationOp(Stream &s, Operation ser_action) { unsigned int nDate = date.toTime_t(); READWRITE(this->nVersion); READWRITE(id); READWRITE(nDate); READWRITE(recipient); if (ser_action.ForRead()) date = QDateTime::fromTime_t(nDate); } }; class RecentRequestEntryLessThan { public: RecentRequestEntryLessThan(int nColumn, Qt::SortOrder fOrder) : column(nColumn), order(fOrder) {} bool operator()(RecentRequestEntry &left, RecentRequestEntry &right) const; private: int column; Qt::SortOrder order; }; /** * Model for list of recently generated payment requests / bitcoincash: URIs. * Part of wallet model. */ class RecentRequestsTableModel : public QAbstractTableModel { Q_OBJECT public: explicit RecentRequestsTableModel(WalletModel *parent); ~RecentRequestsTableModel(); enum ColumnIndex { Date = 0, Label = 1, Message = 2, Amount = 3, NUMBER_OF_COLUMNS }; /** @name Methods overridden from QAbstractTableModel @{*/ int rowCount(const QModelIndex &parent) const override; int columnCount(const QModelIndex &parent) const override; QVariant data(const QModelIndex &index, int role) const override; bool setData(const QModelIndex &index, const QVariant &value, int role) override; QVariant headerData(int section, Qt::Orientation orientation, int role) const override; QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const override; bool removeRows(int row, int count, const QModelIndex &parent = QModelIndex()) override; Qt::ItemFlags flags(const QModelIndex &index) const override; /*@}*/ const RecentRequestEntry &entry(int row) const { return list[row]; } void addNewRequest(const SendCoinsRecipient &recipient); void addNewRequest(const std::string &recipient); void addNewRequest(RecentRequestEntry &recipient); public Q_SLOTS: void sort(int column, Qt::SortOrder order = Qt::AscendingOrder) override; void updateDisplayUnit(); private: WalletModel *walletModel; QStringList columns; QList<RecentRequestEntry> list; int64_t nReceiveRequestsMaxId{0}; /** Updates the column title to "Amount (DisplayUnit)" and emits * headerDataChanged() signal for table headers to react. */ void updateAmountColumnTitle(); /** Gets title for amount column including current display unit if * optionsModel reference available. */ QString getAmountTitle(); }; #endif // BITCOIN_QT_RECENTREQUESTSTABLEMODEL_H
#pragma once void colors_default_init(void); void colors_default_show(void); void colors_default_deinit(void); void colors_default_reload_data_and_mark_dirty(void);
/* Excercise 1-3 Modify the temperature conversion program to print a heading above the table */ #include <stdio.h> int main() { float fahr, celsius; int lower, upper, step; lower = 0; upper = 300; step = 20; fahr = lower; printf(" F C\n"); /* Sweet header */ while(fahr <= upper) { celsius = (5.0/9.0) * (fahr-32.0); printf("%3.0f %6.1f\n", fahr, celsius); fahr = fahr + step; } }
#ifndef CCAMERASLIST_H #define CCAMERASLIST_H #include "compiler/compiler_warnings_control.h" DISABLE_COMPILER_WARNINGS #include <QDialog> RESTORE_COMPILER_WARNINGS namespace Ui { class CCamerasList; } class CCamerasList : public QDialog { public: explicit CCamerasList(QWidget *parent = 0); ~CCamerasList(); void listUpdated(const QStringList& camerasList, int currentCameraIndex = -1); private: Ui::CCamerasList *ui; }; #endif // CCAMERASLIST_H
#pragma once #include "AbstractDatabase.h" #include "IEmission.h" namespace PR { using EmissionDatabase = MixedDatabase<IEmission>; } // namespace PR
#ifdef __OBJC__ #import <UIKit/UIKit.h> #else #ifndef FOUNDATION_EXPORT #if defined(__cplusplus) #define FOUNDATION_EXPORT extern "C" #else #define FOUNDATION_EXPORT extern #endif #endif #endif FOUNDATION_EXPORT double Pods_BluejayTestsVersionNumber; FOUNDATION_EXPORT const unsigned char Pods_BluejayTestsVersionString[];
// // DAAttributedStringFormatter.h // PrairieSchooner // // Created by David Levi on 1/11/13. // Copyright (c) 2013 Double Apps Inc. All rights reserved. // #import <Foundation/Foundation.h> extern NSString* const DALinkAttributeName; extern NSString* const DABackgroundColorAttributeName; @interface DAAttributedStringFormatter : NSObject @property (assign,nonatomic) CGFloat defaultPointSize; @property (assign,nonatomic) NSInteger defaultWeight; @property (strong,nonatomic) NSString* defaultFontFamily; @property (strong,nonatomic) UIColor* defaultColor; @property (strong,nonatomic) UIColor* defaultBackgroundColor; @property (strong,nonatomic) NSArray* fontFamilies; @property (strong,nonatomic) NSArray* colors; - (NSAttributedString*) formatString:(NSString*)format; // This is deprecated, just use formatString: - (NSAttributedString*) formatString:(NSString*)format linkRanges:(NSArray**)linkRanges_p; @end
//#import "GPUImageFilter.h" #import "GPUImage.h" @interface LFGPUImageEmptyFilter : GPUImageFilter { } @end
#pragma once const char* const c_textureDirectory = "data/textures/";
#ifdef __OBJC__ #import <UIKit/UIKit.h> #else #ifndef FOUNDATION_EXPORT #if defined(__cplusplus) #define FOUNDATION_EXPORT extern "C" #else #define FOUNDATION_EXPORT extern #endif #endif #endif FOUNDATION_EXPORT double Pods_AwesomeData_ExampleVersionNumber; FOUNDATION_EXPORT const unsigned char Pods_AwesomeData_ExampleVersionString[];
// // BirdsMasterViewController.h // BridWatching // // Created by Yun on 13-8-16. // Copyright (c) 2013年 伟平 周. All rights reserved. // #import <UIKit/UIKit.h> @interface BirdsMasterViewController : UITableViewController @end
// // MDDBHelper.h // MDHandleData // // Created by 没懂 on 2017/4/18. // Copyright © 2017年 com.infomacro. All rights reserved. // #import <Foundation/Foundation.h> @class FMDatabase; @class FMDatabaseQueue; @interface MDDBHelper : NSObject { FMDatabase* _db; FMDatabaseQueue* _dbQueue; } /** * 获取数据库单例对象 * * @return 数据库对象。 */ +(MDDBHelper *)instance; /** * 数据库操作队列 * * @return 队列 */ -(FMDatabaseQueue *)queue; /** * 数据库 * * @return db */ -(FMDatabase *)db; @end
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include "DexClass.h" #include "ReferencedState.h" namespace ir_meta_io { void dump(const Scope& classes, const std::string& output_dir); bool load(const std::string& input_dir); class IRMetaIO { public: struct bit_rstate_t { ReferencedState::InnerStruct inner_struct; }; static void serialize_rstate(const ReferencedState& rstate, std::ofstream& ostrm); static void deserialize_rstate(const char** _ptr, ReferencedState& rstate); /** * Only serialize meta data of class/method/field if they are not default */ template <typename T> static bool is_default_meta(const T* obj) { return obj->get_deobfuscated_name_or_empty() == show(obj) && !obj->rstate.inner_struct.m_by_string && !obj->rstate.inner_struct.m_by_resources && !obj->rstate.inner_struct.m_is_serde && !obj->rstate.inner_struct.m_keep && !obj->rstate.inner_struct.m_assumenosideeffects && !obj->rstate.inner_struct.m_whyareyoukeeping && !obj->rstate.inner_struct.m_set_allowshrinking && !obj->rstate.inner_struct.m_unset_allowshrinking && !obj->rstate.inner_struct.m_set_allowobfuscation && !obj->rstate.inner_struct.m_unset_allowobfuscation; } }; } // namespace ir_meta_io
// // Utilities.h // thermaleraser // // Created by Mark Larus on 10/30/12. // Copyright (c) 2012 Kenyon College. All rights reserved. // #ifndef __thermaleraser__Utilities__ #define __thermaleraser__Utilities__ #include <iostream> #include <gsl/gsl_rng.h> #include <set> #include <boost/iterator/iterator_facade.hpp> #include "Reservoir.h" namespace DemonBase { typedef std::set<DemonBase::SystemState *> StateSet; StateSet getValidStates(); } unsigned int randomShortIntWithBitDistribution(double ratioOfOnesToZeroes, int nbits, gsl_rng* generator); int bitCount(unsigned int number, int nbits); template <class BooleanIterator> class PackedBooleanIterator : public boost::iterator_facade<PackedBooleanIterator<BooleanIterator>, const char, boost::forward_traversal_tag>{ public: PackedBooleanIterator(BooleanIterator b, BooleanIterator e) : iterator(b), end(e) { currentValue = getEightBits(); } private: BooleanIterator iterator; BooleanIterator end; char currentValue; friend class boost::iterator_core_access; void increment() { currentValue = getEightBits(); } inline char getEightBits() { int count = 0; char result = '\0'; while (iterator!=end && count != 8) { int bit = *iterator ? 1 : 0; result |= (bit << count); ++iterator; ++count; } return result; } const char &dereference() const { return currentValue; } bool equal(PackedBooleanIterator<BooleanIterator> const& other) const { return iterator == other.iterator; } }; gsl_rng *GSLRandomNumberGenerator(); #endif /* defined(__thermaleraser__Utilities__) */
#pragma once /****************************************************************************** * \file ReviseCoreUIRendering.h * \author tlange ******************************************************************************/ // Revise includes #include "ReviseCorePrerequisites.h" #include "ReviseMathTypes.h" #include "ReviseFoundationTlsfAllocator.h" #include "ReviseFoundationName.h" #include "ReviseRendererSystem.h" #include "ReviseUIRenderingHelper.h" // External includes #include <atomic> namespace Revise { namespace Core { struct UIRendering { enum BlendMode { BM_ABLEND, BM_ADDITIVE, BM_ELEMENT_COUNT }; enum DepthMode { DM_NO_CHECK_NO_WRITE, DM_CHECK_ONLY, DM_WRITE_ONLY, DM_CHECK_AND_WRITE, DM_INHERIT_FROM_SHEET, DM_INHERIT_FROM_PARENT, DM_ELEMENT_COUNT }; static void init(uint32_t p_MaxVertexCount = 65535u, uint32_t p_GeometryDataPoolSize = 1024u); static void shutdown(); static uint8_t* lockVertexBuffer(); static void unlockVertexBuffer(); static uint8_t* getLockedVertexBuffer() { return ms_LockedVertexBuffer; } static void queueUiForRendering(Renderer::RenderQueue* p_RenderQueue); static Foundation::Ref& getMaterial( Foundation::Name32 p_TextureName, uint8_t p_BlendMode, uint8_t p_DepthMode, const Foundation::Name32& p_MaskName, const Foundation::Name32& p_GpuPrgOverride = Foundation::Name32::Blank); static void updateImageMaterial(Foundation::Ref p_Ref); static void updatePanelMaterial(Foundation::Ref p_Ref, Foundation::Name32 p_MatName); static void updateFontMaterial(Foundation::Name32 p_TextureName, uint8_t p_BlendMode, uint8_t p_DepthMode, bool p_Sdf, Foundation::Ref& p_MaterialId); static void createFontRenderingDataStorageBuffer(); static void writeFontRenderingDataStorageBuffer(); protected: /// material cache entry struct MaterialEntry { uint8_t blendMode; uint8_t depthMode; Foundation::Name32 textureName; Foundation::Name32 maskName; Foundation::Ref materialId; }; /// stores cached material entries typedef Foundation::Array<MaterialEntry> MaterialEntryArray; /// stores cached material entries static MaterialEntryArray* ms_MaterialArray; static MaterialEntryArray& materialArray() { return *ms_MaterialArray; } static Renderer::GeometryData ms_MasterGeometryData; static Renderer::GeometryData* ms_GeometryDataPool; static uint32_t ms_GeometryDataPoolSize; static uint8_t* ms_LockedVertexBuffer; static Foundation::Array<UI::RenderOperationData>* ms_UiRops; static Foundation::Array<UI::RenderOperationData>& uiRops() { return *ms_UiRops; } static uint32_t ms_FontRenderingDataStorageBufferId; }; } // end of Core namespace } // end of Revise namespace
#include <noderb_http.h> typedef struct { VALUE parser; int pre_headers; } nodeRb_http; VALUE nodeRbHttpParser; VALUE nodeRbHttpPointer; int nodeRb_http_on_message_begin(http_parser* parser) { nodeRb_http* client = parser->data; rb_funcall(client->parser, rb_intern("on_message_begin"), 0); return 0; } int nodeRb_http_on_url(http_parser* parser, const char *buf, size_t len) { nodeRb_http* client = parser->data; if(parser->type == HTTP_REQUEST){ rb_funcall(client->parser, rb_intern("on_method"), 1, rb_str_new2(http_method_str(parser->method))); } rb_funcall(client->parser, rb_intern("on_url"), 1, rb_str_new(buf, len)); return 0; } int nodeRb_http_on_header_field(http_parser* parser, const char *buf, size_t len) { nodeRb_http* client = parser->data; rb_funcall(client->parser, rb_intern("on_header_field"), 1, rb_str_new(buf, len)); return 0; } int nodeRb_http_on_header_value(http_parser* parser, const char *buf, size_t len) { nodeRb_http* client = parser->data; rb_funcall(client->parser, rb_intern("on_header_value"), 1, rb_str_new(buf, len)); return 0; } int nodeRb_http_on_headers_complete(http_parser* parser) { nodeRb_http* client = parser->data; rb_funcall(client->parser, rb_intern("on_version"), 2, rb_int2inum(parser->http_major), rb_int2inum(parser->http_minor)); if(parser->type == HTTP_RESPONSE){ rb_funcall(client->parser, rb_intern("on_status_code"), 1, rb_int2inum(parser->status_code)); } if (http_should_keep_alive(parser)) { rb_funcall(client->parser, rb_intern("on_keep_alive"), 1, Qtrue); } rb_funcall(client->parser, rb_intern("on_headers_complete"), 0); return 0; } int nodeRb_http_on_body(http_parser* parser, const char *buf, size_t len) { nodeRb_http* client = parser->data; rb_funcall(client->parser, rb_intern("on_body"), 1, rb_str_new(buf, len)); return 0; } int nodeRb_http_on_message_complete(http_parser* parser) { nodeRb_http* client = parser->data; rb_funcall(client->parser, rb_intern("on_message_complete"), 0); return 0; } VALUE nodeRb_http_setup(VALUE self, VALUE type) { http_parser_settings* settings = malloc(sizeof (http_parser_settings)); settings->on_message_begin = nodeRb_http_on_message_begin; settings->on_url = nodeRb_http_on_url; settings->on_header_field = nodeRb_http_on_header_field; settings->on_header_value = nodeRb_http_on_header_value; settings->on_headers_complete = nodeRb_http_on_headers_complete; settings->on_body = nodeRb_http_on_body; settings->on_message_complete = nodeRb_http_on_message_complete; http_parser* parser = malloc(sizeof (http_parser)); if(ID2SYM(rb_intern("response")) == type){ http_parser_init(parser, HTTP_RESPONSE); }else{ http_parser_init(parser, HTTP_REQUEST); } nodeRb_http* client = malloc(sizeof (nodeRb_http)); client->parser = self; parser->data = client; rb_iv_set(self, "settings", Data_Wrap_Struct(nodeRbHttpPointer, 0, NULL, settings)); rb_iv_set(self, "parser", Data_Wrap_Struct(nodeRbHttpPointer, 0, NULL, parser)); return self; }; VALUE nodeRb_http_parse(VALUE self, VALUE data) { http_parser_settings* settings; http_parser* parser; VALUE rsettings = rb_iv_get(self, "settings"); VALUE rparser = rb_iv_get(self, "parser"); Data_Get_Struct(rsettings, http_parser_settings, settings); Data_Get_Struct(rparser, http_parser, parser); size_t parsed = http_parser_execute(parser, settings, rb_string_value_cstr(&data), RSTRING_LEN(data)); if (parser->upgrade) { rb_funcall(self, rb_intern("on_upgrade"), 0); } else if (parsed != (unsigned) RSTRING_LEN(data)) { rb_funcall(self, rb_intern("on_error"), 2, rb_str_new2(http_errno_name(parser->http_errno)), rb_str_new2(http_errno_description(parser->http_errno))); }; return self; }; VALUE nodeRb_http_dispose(VALUE self) { http_parser_settings* settings; http_parser* parser; Data_Get_Struct(rb_iv_get(self, "settings"), http_parser_settings, settings); Data_Get_Struct(rb_iv_get(self, "parser"), http_parser, parser); free(parser->data); free(settings); free(parser); return self; }; void Init_noderb_http_extension() { // Define module VALUE nodeRb = rb_define_module("NodeRb"); // Modules VALUE nodeRbModules = rb_define_module_under(nodeRb, "Modules"); // Http VALUE nodeRbHttp = rb_define_module_under(nodeRbModules, "Http"); // Http parser nodeRbHttpPointer = rb_define_class_under(nodeRbHttp, "Pointer", rb_cObject); nodeRbHttpParser = rb_define_module_under(nodeRbHttp, "Parser"); // Methods rb_define_method(nodeRbHttpParser, "setup", nodeRb_http_setup, 1); rb_define_method(nodeRbHttpParser, "parse", nodeRb_http_parse, 1); rb_define_method(nodeRbHttpParser, "dispose", nodeRb_http_dispose, 0); }
#include <stdio.h> #if 0 Write a program detab that replaces tabs in the input with the proper number of blanks to space to the next tab stop. Assume a fixed set of tab stops, say every n columns. Should n be a variable or a symbolic parameter? #endif static const int MAXLINE = 1000; static const int TS = 8; int getline(char s[], int lim) { int c = 0; int i = 0; lim = lim > 0 ? lim - 1 : 0; for (i = 0; i < lim && (c = getchar()) != EOF && c != '\n'; ++i) s[i] = c; s[i] = '\0'; if ('\n' != c) for ( ; (c = getchar()) != EOF && c != '\n'; ++i) ; if (0 == i && EOF == c) return -1; return i; } int detab(char s[], char t[]) { int i = 0; int c = 0; int j = 0; int x = 0; for ( ; s[i]; ++i) switch (s[i]) { // // Drop tab, proceed to next tabstop. // case '\t': x = TS - (c % TS); for (j = 0; j < x; ++j) t[c++] = ' '; break; // // Copy. // default: t[c++] = s[i]; } t[c] = '\0'; return c; } int main(int argc, char* argv[]) { int len = 0; char line0[MAXLINE]; char line1[MAXLINE]; while ((len = getline(line0, MAXLINE)) > -1) { detab(line0, line1); printf("%s\n", line1); } return 0; }
#ifndef __BVH_H__ #define __BVH_H__ #include <Eigen/Core> #include "bounding_box.h" #include <queue> #include <algorithm> #include <assert.h> #include <vector> #include <iostream> /* Declaration of Bounding Volume Heirarchy (BVH) data struct */ class BVHNode { public: BVHNode *left; BVHNode *right; Eigen::RowVector4i triangle; BoundingBox *boundingBox; BVHNode(Eigen::MatrixXd *allV, Eigen::MatrixXi *allF, std::vector<Eigen::MatrixXd> *allTriPoints, std::vector<int> triInds); ~BVHNode() {}; bool isLeaf() { return (left == nullptr && right == nullptr); }; void inspectTree(); static Eigen::MatrixXd triangleToPoints(Eigen::MatrixXd *points, Eigen::VectorXi triangle); private: void buildNode(Eigen::MatrixXd *allV, Eigen::MatrixXi *allF, std::vector<Eigen::MatrixXd> *allTriPoints, std::vector<int> triInds); BoundingBox* findBoundingBoxSet(std::vector<Eigen::MatrixXd> *allTriPoints, std::vector<int> triInds); }; #endif
#ifndef igs_tga_encode_h #define igs_tga_encode_h #include <fstream> // std::ofstream #include <sstream> // std::ostringstream #include <stdexcept> /* std::domain_error */ #include "igs_resource_irw.h" #include "igs_tga_pixel.h" namespace igs { namespace tga { namespace encode { /* --- Pixelñ°Ì¤Î½èÍý ------------------------------- */ class pixel { public: pixel(const bool byte_swap_sw); void exec(const igs::image::pixel::rgba32& in , igs::tga::pixel::bgra32& out); void exec(const igs::image::pixel::rgb24& in , igs::tga::pixel::bgr24& out); void exec(const igs::image::pixel::rgba32& in , igs::tga::pixel::argb1555& out); void exec(const igs::image::pixel::rgb24& in , igs::tga::pixel::argb0555& out); void exec(const igs::image::pixel::gray8& in , igs::tga::pixel::bw8& out); private: //pixel(){} const bool byte_swap_sw_; }; /* --- 1¸Ä°Ê¾å¤ÎƱPixelϢ³ -------------------------- */ template<class SOU> size_t count_rle_pixel( const SOU* pixel, const size_t psize ) { for (size_t current=1; current < psize; ++current) {/* ¼¡°ÌÃÖ */ SOU tmp = *pixel++; /* pixel¤ò¼è¤ê¼¡¤Ø */ if (!igs::image::pixel::equal(tmp,(*pixel))) { return current; } /* °ãPixel»ß */ } return psize; /* ¥ë¡¼¥×¤¬ºÇ¸å¤Þ¤Ç¤¤¤Ã¤¿¾ì¹ç */ } /* --- 0¸Ä°Ê¾å¤Î°ãPixel¤ÎϢ³ ------------------------ */ template<class SOU> size_t count_raw_pixel( const SOU* pixel, const size_t psize ) { for (size_t current=1; current < psize; ++current) {/* ¼¡°ÌÃÖ */ SOU tmp = *pixel++; /* pixel¤ò¼è¤ê¼¡¤Ø */ if (igs::image::pixel::equal(tmp,(*pixel))) { return current-1; } /* ³Pixel»ß */ } return psize; /* ¥ë¡¼¥×¤¬ºÇ¸å¤Þ¤Ç¤¤¤Ã¤¿¾ì¹ç */ } /* --- bytes data¤ÎÊݸ ------------------------------ */ void wbytes( char* data, int size , const std::string& file_path , std::ofstream& ofs ); /* --- Pixel¤ÎÊݸ ----------------------------------- */ template<class DES> void wpixel( const DES& pixel , const std::string& file_path , std::ofstream& ofs ) { igs::tga::encode::wbytes( igs::resource::pointer_cast<char *>( const_cast<DES *>(&pixel)), sizeof(DES), file_path, ofs ); } /* --- Run Length¤ØÉ乿²½(encode)¤·Êݸ -------------- */ template<class SOU, class DES> void run_length( const SOU* sour_image , const size_t sour_bytes , DES& dest_pixel , igs::tga::encode::pixel& encoder , const std::string& file_path, std::ofstream& ofs ) { size_t rle_count = 0; size_t raw_count = 0; const size_t sou_tota_pixel = sour_bytes / sizeof(SOU); size_t sou_rest_pixel = sour_bytes / sizeof(SOU); for (size_t ii = 0; ii < sou_tota_pixel; ++ii) { rle_count = count_rle_pixel(sour_image,sou_rest_pixel); raw_count = count_raw_pixel(sour_image,sou_rest_pixel); if (128 < rle_count) { rle_count = 128; } if (128 < raw_count) { raw_count = 128; } if (1 < rle_count) { if (sou_rest_pixel < rle_count) {return;} sou_rest_pixel -= rle_count; ii += rle_count; /* Ƭ¤Î¥³¡¼¥É(RLE packet) */ char byte=static_cast<char>((rle_count-1)|0x80); wbytes(&byte,1,file_path,ofs); /* rle¥Ç¡¼¥¿¤òÊݸ */ encoder.exec(*sour_image,dest_pixel); wpixel(dest_pixel,file_path,ofs); sour_image += rle_count; } if (0 < raw_count) { if (sou_rest_pixel < raw_count) {return;} sou_rest_pixel -= raw_count; ii += rle_count; /* Ƭ¤Î¥³¡¼¥É(RAW packet) */ char byte = static_cast<char>(raw_count-1); wbytes(&byte,1,file_path,ofs); /* raw¥Ç¡¼¥¿¤òÊݸ */ while (0 < raw_count--) { encoder.exec(*sour_image++,dest_pixel); wpixel(dest_pixel,file_path,ofs); } } } } /* --- Uncompressed¤È¤·¤ÆÊݸ ------------------------ */ template<class SOU, class DES> void uncompressed( const SOU* sour_image , const size_t sour_bytes , DES& dest_pixel , igs::tga::encode::pixel& encoder , const std::string& file_path, std::ofstream& ofs ) { size_t sou_rest_pixel = sour_bytes / sizeof(SOU); for (size_t ii = 0; ii < sou_rest_pixel; ++ii) { encoder.exec(*sour_image++,dest_pixel); wpixel(dest_pixel,file_path,ofs); } } } } } #endif /* !igs_tga_encode_h */
// Copyright (c) 2014 The LevelDB Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. See the AUTHORS file for names of contributors. #ifndef STORAGE_LEVELDB_INCLUDE_DUMPFILE_H_ #define STORAGE_LEVELDB_INCLUDE_DUMPFILE_H_ #include <string> #include "leveldb/env.h" #include "leveldb/status.h" namespace leveldb { // Dump the contents of the file named by fname in text format to // *dst. Makes a sequence of dst->Append() calls; each call is passed // the newline-terminated text corresponding to a single item found // in the file. // // Returns a non-OK result if fname does not name a leveldb storage // file, or if the file cannot be read. Status DumpFile(Env* env, const std::string& fname, WritableFile* dst); } // namespace leveldb #endif // STORAGE_LEVELDB_INCLUDE_DUMPFILE_H_
// // MainTabBarController.h // HNBKitDemo // // Created by 开发 on 2017/7/20. // Copyright © 2017年 开发. All rights reserved. // #import <UIKit/UIKit.h> @interface MainTabBarController : UITabBarController @end
#pragma once #ifndef ENET_CONNECTED_PEER_H #define ENET_CONNECTED_PEER_H #include "config_libenetwrap.h" #include <string> // Needs a bit different forward definiton because thats how enet declares its types struct _ENetPeer; typedef _ENetPeer ENetPeer; struct _ENetHost; typedef _ENetHost ENetHost; #ifdef INTERROGATE typedef unsigned char enet_uint8; #else #include "enet/types.h" #endif class ENetConnectedPeerPy { PUBLISHED : ENetConnectedPeerPy(); ~ENetConnectedPeerPy(); bool get_has_messages() const; MAKE_PROPERTY(has_messages, get_has_messages); std::string take_message(); void send_message(const std::string& bytes, enet_uint8 channel = 0, bool reliable = true); public: #ifndef INTERROGATE void set_peer(ENetPeer* peer); void set_host(ENetHost* peer); ENetPeer* get_peer(); void on_message_recieved(const std::string& bytes, enet_uint8 channel); #endif public: struct impl; inline impl* get_impl() { return _impl; }; private: impl* _impl; }; #endif
// // Generated by class-dump 3.5 (64 bit). // // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. // #import "DVTLayerHostingView.h" @class NSArray, NSMapTable, NSMutableArray; __attribute__((visibility("hidden"))) @interface GPURenderBufferCanvas : DVTLayerHostingView { NSMutableArray *_displayedRenderBuffers; NSMapTable *_renderBufferObsTokens; NSArray *_renderBufferViewConstraints; BOOL _landscape; } + (BOOL)requiresConstraintBasedLayout; + (id)separatorColor; @property(nonatomic) BOOL landscape; // @synthesize landscape=_landscape; - (void).cxx_destruct; - (struct CGSize)fauxUIElementSize:(id)arg1; - (struct CGPoint)fauxUIElementPosition:(id)arg1; - (void)fauxUIElement:(id)arg1 setFocus:(id)arg2; - (BOOL)isFauxUIElementFocusable:(id)arg1; - (id)accessibilityAttributeValue:(id)arg1; - (id)accessibilityAttributeNames; - (BOOL)accessibilityIsIgnored; @property(retain, nonatomic) NSArray *renderBuffers; // @dynamic renderBuffers; - (void)refreshLayout; - (void)updateConstraints; - (void)updateRenderBufferViewConstraints; - (id)constraintsForRenderBufferViews:(id)arg1; - (void)setRenderBufferViewConstraints:(id)arg1; - (void)drawRect:(struct CGRect)arg1; - (void)drawSeperatorLines:(struct CGRect)arg1; - (BOOL)canBecomeKeyView; - (BOOL)acceptsFirstResponder; - (void)setup; - (void)awakeFromNib; - (id)initWithFrame:(struct CGRect)arg1; @end
/* * Generated by class-dump 3.3.4 (64 bit). * * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. */ #import "NSObject-Protocol.h" @protocol GQPObjectHandler <NSObject> - (void)handleObject:(id)arg1; @end
// // Simperium-OSX.h // Simperium-OSX // // Created by Jorge Leandro Perez on 3/29/16. // Copyright © 2016 Simperium. All rights reserved. // #import <UIKit/UIKit.h> //! Project version number for Simperium-iOS. FOUNDATION_EXPORT double Simperium_OSXVersionNumber; //! Project version string for Simperium-iOS. FOUNDATION_EXPORT const unsigned char Simperium_OSXVersionString[]; #pragma mark ==================================================================================== #pragma mark Public Headers #pragma mark ==================================================================================== #import <Simperium/Simperium.h> #import <Simperium/SPAuthenticationInterface.h> #import <Simperium/SPAuthenticationViewController.h> #import <Simperium/SPAuthenticationConfiguration.h> #import <Simperium/SPAuthenticator.h> #import <Simperium/SPBucket.h> #import <Simperium/SPCoreDataExporter.h> #import <Simperium/SPDiffable.h> #import <Simperium/SPLogger.h> #import <Simperium/SPManagedObject.h> #import <Simperium/SPNetworkInterface.h> #import <Simperium/SPStorageProvider.h> #import <Simperium/SPUser.h>
// // WorkOrderGroup.h // qmcp // // Created by 谢永明 on 16/4/8. // Copyright © 2016年 inforshare. All rights reserved. // #import <Foundation/Foundation.h> @interface WorkOrderGroup : NSObject @property(nonatomic,copy) NSArray *assign; @property(nonatomic,copy) NSArray *unassign; @end
// // LQSPluginView.h // myOrgForum // // Created by Queen_B on 2016/11/20. // Copyright © 2016年 SkyAndSea. All rights reserved. // #import <UIKit/UIKit.h> @protocol LQSPluginViewDelegate <NSObject> - (void)didSelectBtnAtIndex:(UIButton *)selectedBtn; @end @interface LQSPluginView : UIView @property (nonatomic,weak)id <LQSPluginViewDelegate> lqsPluginViewDelegate; + (instancetype)pluginView; - (void)setupSubViews; - (void)addPlugBtn:(UIButton *)btn WithBtnNormImg:(NSString *)normImgName andhightlightImgName:(NSString *)heightlightImgName; @end
#include<stdio.h> int main() { int i,j,k,num; printf("enter the size of pattern: "); scanf("%d",&num); for(i=0;i<num;i++) { for(j=0;j<num-i-1;j++) { printf(" "); } for(k=0;k<=i*2;k++) { printf("* "); } printf("\n"); } for(i=0;i<num-1;i++) { for(j=0;j<=i;j++) { printf(" "); } for(k=1;k<(num-i-1)*2;k++) { printf("* "); } printf("\n"); } return 0; }
//------------------------------------------------------------------------------------------------------- // Copyright (C) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. //------------------------------------------------------------------------------------------------------- // Common definitions used outside parser so that we don't have to include the whole Parser.h. #pragma once namespace Js { typedef int32 ByteCodeLabel; // Size of this match the offset size in layouts typedef uint32 RegSlot; typedef uint8 RegSlot_OneByte; typedef int8 RegSlot_OneSByte; typedef int16 RegSlot_TwoSByte; typedef uint16 RegSlot_TwoByte; } enum ErrorTypeEnum { kjstError, kjstEvalError, kjstRangeError, kjstReferenceError, kjstSyntaxError, kjstTypeError, kjstURIError, kjstWebAssemblyCompileError, kjstWebAssemblyRuntimeError, kjstWebAssemblyLinkError, kjstCustomError, #ifdef ENABLE_PROJECTION kjstWinRTError, #endif }; struct ParseNode; typedef ParseNode *ParseNodePtr; struct Ident; typedef Ident *IdentPtr; struct ModuleImportOrExportEntry { IdentPtr moduleRequest; IdentPtr importName; IdentPtr localName; IdentPtr exportName; }; typedef SList<ModuleImportOrExportEntry, ArenaAllocator> ModuleImportOrExportEntryList; typedef SList<IdentPtr, ArenaAllocator> IdentPtrList; // // Below was moved from scrutil.h to share with chakradiag. // #define HR(sc) ((HRESULT)(sc))
/* vi: set sw=4 ts=4: */ /* Copyright 2005 Rob Landley <rob@landley.net> * * Switch from rootfs to another filesystem as the root of the mount tree. * * Licensed under GPL version 2, see file LICENSE in this tarball for details. */ #include "libbb.h" #include <sys/vfs.h> // Make up for header deficiencies. #ifndef RAMFS_MAGIC #define RAMFS_MAGIC 0x858458f6 #endif #ifndef TMPFS_MAGIC #define TMPFS_MAGIC 0x01021994 #endif #ifndef MS_MOVE #define MS_MOVE 8192 #endif static dev_t rootdev; // Recursively delete contents of rootfs. static void delete_contents(const char *directory) { DIR *dir; struct dirent *d; struct stat st; // Don't descend into other filesystems if (lstat(directory, &st) || st.st_dev != rootdev) return; // Recursively delete the contents of directories. if (S_ISDIR(st.st_mode)) { dir = opendir(directory); if (dir) { while ((d = readdir(dir))) { char *newdir = d->d_name; // Skip . and .. if (*newdir=='.' && (!newdir[1] || (newdir[1]=='.' && !newdir[2]))) continue; // Recurse to delete contents newdir = alloca(strlen(directory) + strlen(d->d_name) + 2); sprintf(newdir, "%s/%s", directory, d->d_name); delete_contents(newdir); } closedir(dir); // Directory should now be empty. Zap it. rmdir(directory); } // It wasn't a directory. Zap it. } else unlink(directory); } int switch_root_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; int switch_root_main(int argc, char **argv) { char *newroot, *console = NULL; struct stat st1, st2; struct statfs stfs; // Parse args (-c console) opt_complementary = "-2"; getopt32(argv, "c:", &console); argv += optind; // Change to new root directory and verify it's a different fs. newroot = *argv++; xchdir(newroot); if (lstat(".", &st1) || lstat("/", &st2) || st1.st_dev == st2.st_dev) { bb_error_msg_and_die("bad newroot %s", newroot); } rootdev = st2.st_dev; // Additional sanity checks: we're about to rm -rf /, so be REALLY SURE // we mean it. (I could make this a CONFIG option, but I would get email // from all the people who WILL eat their filesystems.) if (lstat("/init", &st1) || !S_ISREG(st1.st_mode) || statfs("/", &stfs) || (stfs.f_type != RAMFS_MAGIC && stfs.f_type != TMPFS_MAGIC) || getpid() != 1) { bb_error_msg_and_die("not rootfs"); } // Zap everything out of rootdev delete_contents("/"); // Overmount / with newdir and chroot into it. The chdir is needed to // recalculate "." and ".." links. if (mount(".", "/", NULL, MS_MOVE, NULL) || chroot(".")) bb_error_msg_and_die("error moving root"); xchdir("/"); // If a new console specified, redirect stdin/stdout/stderr to that. if (console) { close(0); xopen(console, O_RDWR); dup2(0, 1); dup2(0, 2); } // Exec real init. (This is why we must be pid 1.) execv(argv[0], argv); bb_perror_msg_and_die("bad init %s", argv[0]); }
#pragma once #include "geometry.h" #include <vector> std::vector<rbt::point<double>> FindPath(cv::Mat matn, rbt::pose<double> const& posefStart, rbt::point<double> const& ptfEnd); std::vector<rbt::pose<double>> PathConfigurationSpace(cv::Mat matn, rbt::pose<double> const& posefStart, rbt::point<double> const& ptfEnd);
#ifndef LMICE_EAL_SHM_H #define LMICE_EAL_SHM_H #include <stdint.h> #if defined(__APPLE__) || defined(__linux__) typedef int shmfd_t; typedef void* addr_t; #include <unistd.h> #include <sys/mman.h> struct lmice_shm_s { shmfd_t fd; uint32_t size; addr_t addr; char name [32]; }; #define INVALID_HANDLE_VALUE -1 #elif defined(_WIN32) #include "lmice_eal_shm_win.h" #endif typedef struct lmice_shm_s lmice_shm_t; int eal_shm_create(lmice_shm_t* shm); int eal_shm_destroy(lmice_shm_t* shm); int eal_shm_open(lmice_shm_t* shm, int mode); int eal_shm_close(shmfd_t fd, addr_t addr); void eal_shm_zero(lmice_shm_t* shm); int eal_shm_open_readonly(lmice_shm_t* shm); int eal_shm_open_readwrite(lmice_shm_t* shm); int eal_shm_hash_name(uint64_t hval, char* name); int eal_shm_create_or_open(lmice_shm_t* shm); #endif /** LMICE_EAL_SHM_H */
// Copyright (c) 2014 Jérémy Ansel // Licensed under the MIT license. See LICENSE.txt #pragma once template<class T> class CoMemPtr { private: T* _ptr; public: CoMemPtr() { this->_ptr = nullptr; } CoMemPtr(T* ptr) { this->_ptr = ptr; } ~CoMemPtr() { this->Free(); } operator T*() { return this->_ptr; } operator bool() { return this->_ptr != nullptr; } T** operator &() { this->Free(); return &this->_ptr; } void Free() { if (this->_ptr != nullptr) { CoTaskMemFree(this->_ptr); } } T* Get() { return this->_ptr; } T** GetAddressOf() { return &this->_ptr; } };
/* CPlatformer - Platformer feito em C, * SDL e OpenGL. * * stdafx.h * * Criado por Lucas Vieira * Unifei - Campus Itabira, 2013. */ #ifndef STDAFX_H #define STDAFX_H // Bibliotecas #include <stdio.h> #include <stdbool.h> #include <stdlib.h> #include <SDL/SDL.h> #include <GL/gl.h> #include <GL/glu.h> // Definições #define WIN_WIDTH 640 #define WIN_HEIGHT 480 #define FRAMERATE 30.0 // Definições de tipos typedef SDLKey KeyboardKey; typedef Uint8 MouseButton; typedef unsigned char byte; #endif
/* Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef NavigatorMediaStream_h #define NavigatorMediaStream_h #include "wtf/PassRefPtr.h" #include "wtf/text/WTFString.h" namespace WebCore { class Dictionary; class ExceptionState; class Navigator; class NavigatorUserMediaErrorCallback; class NavigatorUserMediaSuccessCallback; class NavigatorMediaStream { public: static void webkitGetUserMedia(Navigator*, const Dictionary&, PassOwnPtr<NavigatorUserMediaSuccessCallback>, PassOwnPtr<NavigatorUserMediaErrorCallback>, ExceptionState&); private: NavigatorMediaStream(); ~NavigatorMediaStream(); }; } // namespace WebCore #endif // NavigatorMediaStream_h
#import <UIKit/UIKit.h> @interface DetailCell : UITableViewCell { UITextField *type; UITextField *name; UITextField *prompt; BOOL promptMode; } @property (readonly, retain) UITextField *type; @property (readonly, retain) UITextField *name; @property (readonly, retain) UITextField *prompt; @property BOOL promptMode; @end
// -*- C++ -*- //===-------------------- support/android/wchar_support.c ------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #ifndef LLVM_LIBCXX_SUPPORT_ANDROID_WCHAR_H #define LLVM_LIBCXX_SUPPORT_ANDROID_WCHAR_H #include_next <wchar.h> #include <xlocale.h> #ifdef __cplusplus extern "C" { #endif // Add missing declarations that are not in the NDK. float wcstof(const wchar_t*, wchar_t**); long wcstol(const wchar_t* nptr, wchar_t**, int); long double wcstold(const wchar_t*, wchar_t**); long long wcstoll(const wchar_t*, wchar_t**, int); unsigned long long wcstoull(const wchar_t*, wchar_t**, int); extern size_t wcsnrtombs (char *dst, const wchar_t **src, size_t nwc, size_t len, mbstate_t *ps); extern size_t mbsnrtowcs (wchar_t *dst, const char **src, size_t nmc, size_t len, mbstate_t *ps); int wcscoll_l(const wchar_t*, const wchar_t*, locale_t); int wcsxfrm_l(wchar_t*, const wchar_t*, size_t, locale_t); #ifdef __cplusplus } // extern "C" #endif #endif // LLVM_LIBCXX_SUPPORT_ANDROID_WCHAR_H
// // 2019-01-04, jjuiddong // packet protocol header class interface // // cProtocol // protocol type : 4 byte ascii type // packet length : 4 byte ascii type // // header { // char protocol[4]; // char packetSize[4]; // }; // #pragma once namespace network { interface iProtocol { virtual bool MakeHeader(const char *protocol, const int length) = 0; virtual bool GetHeader(const BYTE *data, OUT int &byteSize) = 0; virtual bool WriteHeader(BYTE *dst, const int packetSize) = 0; virtual int GetHeaderSize() = 0; virtual int GetProtocolType() = 0; virtual int GetPacketLength() = 0; virtual bool IsValidPacket() = 0; }; class cProtocol : public iProtocol { public: cProtocol(); cProtocol(const char protocol[4]); virtual ~cProtocol(); virtual bool MakeHeader(const char *protocol, const int length) override; virtual bool GetHeader(const BYTE *data, OUT int &byteSize) override; virtual bool WriteHeader(BYTE *dst, const int packetSize) override; virtual int GetHeaderSize() override; virtual int GetProtocolType() override; virtual int GetPacketLength() override; virtual bool IsValidPacket() override; public: char m_protocol[4]; int m_packetLength; }; }
// The MIT License (MIT) // // Copyright (c) 2013 Florida International University // // 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. // // UserView.h // Mobile Clinic // // Created by Michael Montaque on 3/23/13. // #import <Cocoa/Cocoa.h> #import "UserObject.h" @interface UserView : NSViewController<NSTableViewDataSource,NSTableViewDelegate> @property (weak) IBOutlet NSTableView *tableView; @property (weak) IBOutlet NSTextField *usernameLabel; @property (weak) IBOutlet NSComboBox *primaryRolePicker; @property (weak) IBOutlet NSProgressIndicator *loadIndicator; @property (weak) IBOutlet NSComboBox *userStatus; @property (weak) IBOutlet NSButton *sTriage; @property (weak) IBOutlet NSButton *sDoctor; @property (weak) IBOutlet NSButton *sPharmacist; @property (weak) IBOutlet NSButton *sAdministrator; - (IBAction)refreshTable:(id)sender; - (IBAction)commitChanges:(id)sender; - (IBAction)cloudSync:(id)sender; @end
#ifndef _WZ_GEOMETRY #define _WZ_GEOMETRY #include "WZ_Math.h" #include "GL/glut.h" namespace wz_geometry { void drawAxis(); void drawGrid(); void renderWireCube( GLdouble dSize ); }; #endif
// To check if a library is compiled with CocoaPods you // can use the `COCOAPODS` macro definition which is // defined in the xcconfigs so it is available in // headers also when they are imported in the client // project. // ASCoreDataPriorityQueue #define COCOAPODS_POD_AVAILABLE_ASCoreDataPriorityQueue #define COCOAPODS_VERSION_MAJOR_ASCoreDataPriorityQueue 0 #define COCOAPODS_VERSION_MINOR_ASCoreDataPriorityQueue 1 #define COCOAPODS_VERSION_PATCH_ASCoreDataPriorityQueue 0 // Expecta #define COCOAPODS_POD_AVAILABLE_Expecta #define COCOAPODS_VERSION_MAJOR_Expecta 0 #define COCOAPODS_VERSION_MINOR_Expecta 3 #define COCOAPODS_VERSION_PATCH_Expecta 1 // MagicalRecord #define COCOAPODS_POD_AVAILABLE_MagicalRecord #define COCOAPODS_VERSION_MAJOR_MagicalRecord 2 #define COCOAPODS_VERSION_MINOR_MagicalRecord 2 #define COCOAPODS_VERSION_PATCH_MagicalRecord 0 // MagicalRecord/Core #define COCOAPODS_POD_AVAILABLE_MagicalRecord_Core #define COCOAPODS_VERSION_MAJOR_MagicalRecord_Core 2 #define COCOAPODS_VERSION_MINOR_MagicalRecord_Core 2 #define COCOAPODS_VERSION_PATCH_MagicalRecord_Core 0 // Specta #define COCOAPODS_POD_AVAILABLE_Specta #define COCOAPODS_VERSION_MAJOR_Specta 0 #define COCOAPODS_VERSION_MINOR_Specta 2 #define COCOAPODS_VERSION_PATCH_Specta 1
// // Generated by class-dump 3.5 (64 bit). // // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. // #import "NSView.h" @interface IDEDebugGaugeReportHeaderBackground : NSView { BOOL _shouldDrawBottomSeparator; } @property BOOL shouldDrawBottomSeparator; // @synthesize shouldDrawBottomSeparator=_shouldDrawBottomSeparator; - (void)drawRect:(struct CGRect)arg1; - (id)initWithFrame:(struct CGRect)arg1; @end
/* NSPropertyList.h Copyright (c) 2002-2012, Apple Inc. All rights reserved. */ #import <Foundation/NSObject.h> #include <CoreFoundation/CFPropertyList.h> @class NSData, NSString, NSError, NSInputStream, NSOutputStream; typedef NS_OPTIONS(NSUInteger, NSPropertyListMutabilityOptions) { NSPropertyListImmutable = kCFPropertyListImmutable, NSPropertyListMutableContainers = kCFPropertyListMutableContainers, NSPropertyListMutableContainersAndLeaves = kCFPropertyListMutableContainersAndLeaves }; typedef NS_ENUM(NSUInteger, NSPropertyListFormat) { NSPropertyListOpenStepFormat = kCFPropertyListOpenStepFormat, NSPropertyListXMLFormat_v1_0 = kCFPropertyListXMLFormat_v1_0, NSPropertyListBinaryFormat_v1_0 = kCFPropertyListBinaryFormat_v1_0 }; typedef NSUInteger NSPropertyListReadOptions; typedef NSUInteger NSPropertyListWriteOptions; @interface NSPropertyListSerialization : NSObject { void *reserved[6]; } /* Verify that a specified property list is valid for a given format. Returns YES if the property list is valid. */ + (BOOL)propertyList:(id)plist isValidForFormat:(NSPropertyListFormat)format; /* Create an NSData from a property list. The format can be either NSPropertyListXMLFormat_v1_0 or NSPropertyListBinaryFormat_v1_0. The options parameter is currently unused and should be set to 0. If an error occurs the return value will be nil and the error parameter (if non-NULL) set to an autoreleased NSError describing the problem. */ + (NSData *)dataWithPropertyList:(id)plist format:(NSPropertyListFormat)format options:(NSPropertyListWriteOptions)opt error:(out NSError **)error NS_AVAILABLE(10_6, 4_0); /* Write a property list to an output stream. The stream should be opened and configured. The format can be either NSPropertyListXMLFormat_v1_0 or NSPropertyListBinaryFormat_v1_0. The options parameter is currently unused and should be set to 0. If an error occurs the return value will be 0 and the error parameter (if non-NULL) set to an autoreleased NSError describing the problem. In a successful case, the return value is the number of bytes written to the stream. */ + (NSInteger)writePropertyList:(id)plist toStream:(NSOutputStream *)stream format:(NSPropertyListFormat)format options:(NSPropertyListWriteOptions)opt error:(out NSError **)error NS_AVAILABLE(10_6, 4_0); /* Create a property list from an NSData. The options can be any of NSPropertyListMutabilityOptions. If the format parameter is non-NULL, it will be filled out with the format that the property list was stored in. If an error occurs the return value will be nil and the error parameter (if non-NULL) set to an autoreleased NSError describing the problem. */ + (id)propertyListWithData:(NSData *)data options:(NSPropertyListReadOptions)opt format:(NSPropertyListFormat *)format error:(out NSError **)error NS_AVAILABLE(10_6, 4_0); /* Create a property list by reading from an NSInputStream. The options can be any of NSPropertyListMutabilityOptions. If the format parameter is non-NULL, it will be filled out with the format that the property list was stored in. If an error occurs the return value will be nil and the error parameter (if non-NULL) set to an autoreleased NSError describing the problem. */ + (id)propertyListWithStream:(NSInputStream *)stream options:(NSPropertyListReadOptions)opt format:(NSPropertyListFormat *)format error:(out NSError **)error NS_AVAILABLE(10_6, 4_0); /* This method is obsolete and will be deprecated soon. Use dataWithPropertyList:format:options:error: instead. */ + (NSData *)dataFromPropertyList:(id)plist format:(NSPropertyListFormat)format errorDescription:(out __strong NSString **)errorString; /* This method is obsolete and will be deprecated soon. Use propertyListWithData:options:format:error: instead. */ + (id)propertyListFromData:(NSData *)data mutabilityOption:(NSPropertyListMutabilityOptions)opt format:(NSPropertyListFormat *)format errorDescription:(out __strong NSString **)errorString; @end
// // ModifyPasswordViewController.h // xbsz // // Created by lotus on 2017/5/16. // Copyright © 2017年 lotus. All rights reserved. // #import "CXWhitePushViewController.h" @interface ModifyPasswordViewController : CXWhitePushViewController @end
#import <UIKit/UIKit.h> #import "LayoutParams.h" @interface FWScrollView : UIScrollView - (void)layoutSubviews; - (void)updateVisibility:(CGRect)bounds; - (NSInteger)indexForVisiblePage; - (void)setPage:(NSInteger)page; - (BOOL)reselectCurrentPage; - (void)showPage:(NSInteger)page animated:(BOOL)animated; - (void)flush; - (LayoutParams *)findParams:(UIView *)view; - (void)addItem:(LayoutParams *)linearLayoutItem; - (void)removeItem:(LayoutParams *)linearLayoutItem; - (void)removeAllItems; - (void)insertItem:(LayoutParams *)newItem beforeItem:(LayoutParams *)existingItem; - (void)insertItem:(LayoutParams *)newItem afterItem:(LayoutParams *)existingItem; - (void)insertItem:(LayoutParams *)newItem atIndex:(NSUInteger)index; - (void)moveItem:(LayoutParams *)movingItem toIndex:(NSUInteger)index; - (void)swapItem:(LayoutParams *)firstItem withItem:(LayoutParams *)secondItem; @property (nonatomic, strong) NSMutableArray *items; @property (nonatomic, strong) NSLayoutConstraint *topConstraint; @property (nonatomic, strong) NSLayoutConstraint *leftConstraint; @property (nonatomic, strong) NSLayoutConstraint *widthConstraint; @property (nonatomic, strong) NSLayoutConstraint *heightConstraint; @property (nonatomic, assign) int currentPage; @property (nonatomic, assign) int currentPageInternalId; @property (nonatomic, assign) int currentTopInset; @end
// // FlipsideViewController.h // ExperienceCamera // // Created by Brian Rogers on 6/22/13. // Copyright (c) 2013 Brian Rogers. All rights reserved. // #import <UIKit/UIKit.h> @class FlipsideViewController; @protocol FlipsideViewControllerDelegate - (void)flipsideViewControllerDidFinish:(FlipsideViewController *)controller; @end @interface FlipsideViewController : UIViewController @property (weak, nonatomic) id <FlipsideViewControllerDelegate> delegate; @property (weak, nonatomic) IBOutlet UIWebView *webview; - (IBAction)done:(id)sender; @end
// // NSMutableArray+VFoundation.h // VFoundation // // Created by JessieYong on 14-3-10. // Copyright (c) 2014年 SJ. All rights reserved. // #import <Foundation/Foundation.h> /** * NSMutableArray' category in VFoundation */ @interface NSMutableArray (NSMutableArrayVFoundation) /** * move object * * @return move Successful */ - (BOOL)moveObjectFromIndex:(NSUInteger)fromIndex toIndex:(NSUInteger)toIndex; /* * swap Objects in array * * @return swap Successful */ - (BOOL)swapObjectAtIndex:(NSUInteger)fromIndex withObjectAtIndex:(NSUInteger)toIndex; - (void)removeFirstObject; @end
/* dswap.f -- translated by f2c (version 20061008). You must link the resulting object file with libf2c: on Microsoft Windows system, link with libf2c.lib; on Linux or Unix systems, link with .../path/to/libf2c.a -lm or, if you install libf2c.a in a standard place, with -lf2c -lm -- in that order, at the end of the command line, as in cc *.o -lf2c -lm Source for libf2c is in /netlib/f2c/libf2c.zip, e.g., http://www.netlib.org/f2c/libf2c.zip */ #include "f2c.h" ////#include "blaswrap.h" /* Subroutine */ int dswap_(integer *n, doublereal *dx, integer *incx, doublereal *dy, integer *incy) { /* System generated locals */ integer i__1; /* Local variables */ integer i__, m, ix, iy, mp1; doublereal dtemp; /* .. Scalar Arguments .. */ /* .. */ /* .. Array Arguments .. */ /* .. */ /* Purpose */ /* ======= */ /* interchanges two vectors. */ /* uses unrolled loops for increments equal one. */ /* jack dongarra, linpack, 3/11/78. */ /* modified 12/3/93, array(1) declarations changed to array(*) */ /* .. Local Scalars .. */ /* .. */ /* .. Intrinsic Functions .. */ /* .. */ /* Parameter adjustments */ --dy; --dx; /* Function Body */ if (*n <= 0) { return 0; } if (*incx == 1 && *incy == 1) { goto L20; } /* code for unequal increments or equal increments not equal */ /* to 1 */ ix = 1; iy = 1; if (*incx < 0) { ix = (-(*n) + 1) * *incx + 1; } if (*incy < 0) { iy = (-(*n) + 1) * *incy + 1; } i__1 = *n; for (i__ = 1; i__ <= i__1; ++i__) { dtemp = dx[ix]; dx[ix] = dy[iy]; dy[iy] = dtemp; ix += *incx; iy += *incy; /* L10: */ } return 0; /* code for both increments equal to 1 */ /* clean-up loop */ L20: m = *n % 3; if (m == 0) { goto L40; } i__1 = m; for (i__ = 1; i__ <= i__1; ++i__) { dtemp = dx[i__]; dx[i__] = dy[i__]; dy[i__] = dtemp; /* L30: */ } if (*n < 3) { return 0; } L40: mp1 = m + 1; i__1 = *n; for (i__ = mp1; i__ <= i__1; i__ += 3) { dtemp = dx[i__]; dx[i__] = dy[i__]; dy[i__] = dtemp; dtemp = dx[i__ + 1]; dx[i__ + 1] = dy[i__ + 1]; dy[i__ + 1] = dtemp; dtemp = dx[i__ + 2]; dx[i__ + 2] = dy[i__ + 2]; dy[i__ + 2] = dtemp; /* L50: */ } return 0; } /* dswap_ */
#include "types.h" #include "x86.h" #include "defs.h" #include "date.h" #include "param.h" #include "memlayout.h" #include "mmu.h" #include "proc.h" int sys_fork(void) { return fork(); } int sys_exit(void) { exit(); return 0; // not reached } int sys_wait(void) { return wait(); } int sys_kill(void) { int pid; if(argint(0, &pid) < 0) return -1; return kill(pid); } int sys_getpid(void) { return proc->pid; } int sys_sbrk(void) { int addr; int n; if(argint(0, &n) < 0) return -1; addr = proc->sz; if(growproc(n) < 0) return -1; return addr; } int sys_sleep(void) { int n; uint ticks0; if(argint(0, &n) < 0) return -1; acquire(&tickslock); ticks0 = ticks; while(ticks - ticks0 < n){ if(proc->killed){ release(&tickslock); return -1; } sleep(&ticks, &tickslock); } release(&tickslock); return 0; } // return how many clock tick interrupts have occurred // since start. int sys_uptime(void) { uint xticks; acquire(&tickslock); xticks = ticks; release(&tickslock); return xticks; } int sys_kthread_create(void){ void*(*start_func)(); void* stack; int stack_size; if(argint(0, (int*)&start_func) < 0) return -1; if(argint(1, (int*)&stack) < 0) return -1; if(argint(2, (int*)&stack_size) < 0) return -1; return kthread_create(start_func, stack, stack_size); } int sys_kthread_id(void){ return kthread_id(); } int sys_kthread_exit(void){ kthread_exit(); return 0; } int sys_kthread_join(void){ int kthread_id; if(argint(0, &kthread_id) < 0) return -1; kthread_join(kthread_id); return 0; } int sys_kthread_mutex_alloc(){ return kthread_mutex_alloc(); } int sys_kthread_mutex_dealloc(){ int mutex_id; if(argint(0, &mutex_id) < 0) return -1; return kthread_mutex_dealloc(mutex_id); } int sys_kthread_mutex_lock(){ int mutex_id; if(argint(0, &mutex_id) < 0) return -1; return kthread_mutex_lock(mutex_id); } int sys_kthread_mutex_unlock(){ int mutex_id; if(argint(0, &mutex_id) < 0) return -1; return kthread_mutex_unlock(mutex_id); } int sys_kthread_mutex_num(){ int mutex_id; if(argint(0, &mutex_id) < 0) return -1; return kthread_mutex_num(mutex_id); } int sys_forkcow(void) { return forkcow(); } int sys_waitcow(void) { return waitcow(); } int sys_procdump(void) { procdump(); return 0; }
// // AppDelegate.h // Wrapper // // Created by Adriana Santos on 10/12/2012. // Copyright (c) 2012 Adriana Santos. All rights reserved. // #import <UIKit/UIKit.h> @interface AppDelegate : UIResponder <UIApplicationDelegate> @property (strong, nonatomic) UIWindow *window; @end
// // AEImage+Parsing.h // FiveHundredPX // // Created by Ahmed Eid on 3/31/15. // Copyright (c) 2015 AhmedEid. All rights reserved. // #import "AEImage.h" @interface AEImage (Parsing) +(AEImage *)imageFromJSONDictionary:(NSDictionary *)dict; @end
// // MenuViewInterface.h // VIPER // // Created by n0p and Mari on 2015-05-04. // Copyright (c) 2015 Improve Digital. All rights reserved. // #import <Foundation/Foundation.h> @class MainMenuViewModel; @protocol MenuViewInterface <NSObject> - (void)reloadMenuData:(MainMenuViewModel *)data; @end
#ifndef GAMEPATH_H #define GAMEPATH_H #include <glib.h> typedef struct gamepath { gint** path; guint num_row; guint num_col; } GamePath; GamePath* game_path_new_random (guint num_col, guint num_row); gint game_path_get_nth_row (GamePath* game_path, guint n); gint game_path_get_nth_col (GamePath* game_path, guint n); void game_path_free (GamePath* game_path); #endif /* GAMEPATH_H */
// // SpecHelper.h // Cedule // // Created by Klaas Pieter Annema on 04-11-13. // Copyright (c) 2013 Annema. All rights reserved. // #import "Specta.h" #define EXP_SHORTHAND #import "Expecta.h" #define HC_SHORTHAND #import <OCHamcrest/OCHamcrest.h> #define MOCKITO_SHORTHAND #import <OCMockito/OCMockito.h>
// Generated by Haxe 3.3.0 #ifndef INCLUDED_flixel_system_frontEnds_InputFrontEnd #define INCLUDED_flixel_system_frontEnds_InputFrontEnd #ifndef HXCPP_H #include <hxcpp.h> #endif HX_DECLARE_CLASS2(flixel,input,FlxKeyManager) HX_DECLARE_CLASS2(flixel,input,FlxPointer) HX_DECLARE_CLASS2(flixel,input,IFlxInputManager) HX_DECLARE_CLASS3(flixel,input,gamepad,FlxGamepadManager) HX_DECLARE_CLASS3(flixel,input,keyboard,FlxKeyboard) HX_DECLARE_CLASS3(flixel,input,mouse,FlxMouse) HX_DECLARE_CLASS3(flixel,_hx_system,frontEnds,InputFrontEnd) HX_DECLARE_CLASS2(flixel,util,IFlxDestroyable) namespace flixel{ namespace _hx_system{ namespace frontEnds{ class HXCPP_CLASS_ATTRIBUTES InputFrontEnd_obj : public hx::Object { public: typedef hx::Object super; typedef InputFrontEnd_obj OBJ_; InputFrontEnd_obj(); public: void __construct(); inline void *operator new(size_t inSize, bool inContainer=true,const char *inName="flixel.system.frontEnds.InputFrontEnd") { 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,"flixel.system.frontEnds.InputFrontEnd"); } static hx::ObjectPtr< InputFrontEnd_obj > __new(); static Dynamic __CreateEmpty(); static Dynamic __Create(hx::DynamicArray inArgs); //~InputFrontEnd_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); ::String __ToString() const { return HX_HCSTRING("InputFrontEnd","\xbc","\x9c","\xcc","\x29"); } ::flixel::input::mouse::FlxMouse replace_flixel_input_mouse_FlxMouse( ::flixel::input::mouse::FlxMouse Old, ::flixel::input::mouse::FlxMouse New); ::Dynamic replace_flixel_input_mouse_FlxMouse_dyn(); ::flixel::input::gamepad::FlxGamepadManager add_flixel_input_gamepad_FlxGamepadManager( ::flixel::input::gamepad::FlxGamepadManager Input); ::Dynamic add_flixel_input_gamepad_FlxGamepadManager_dyn(); ::flixel::input::mouse::FlxMouse add_flixel_input_mouse_FlxMouse( ::flixel::input::mouse::FlxMouse Input); ::Dynamic add_flixel_input_mouse_FlxMouse_dyn(); ::flixel::input::keyboard::FlxKeyboard add_flixel_input_keyboard_FlxKeyboard( ::flixel::input::keyboard::FlxKeyboard Input); ::Dynamic add_flixel_input_keyboard_FlxKeyboard_dyn(); ::Array< ::Dynamic> list; Bool resetOnStateSwitch; void reset(); ::Dynamic reset_dyn(); void update(); ::Dynamic update_dyn(); void onFocus(); ::Dynamic onFocus_dyn(); void onFocusLost(); ::Dynamic onFocusLost_dyn(); void onStateSwitch(); ::Dynamic onStateSwitch_dyn(); void destroy(); ::Dynamic destroy_dyn(); }; } // end namespace flixel } // end namespace system } // end namespace frontEnds #endif /* INCLUDED_flixel_system_frontEnds_InputFrontEnd */
// // Created by yun on 2016/11/9. // Copyright (c) 2017 yun. All rights reserved. // #import <UIKit/UIKit.h> @interface YunValueHelper : NSObject + (NSString *)intStr:(NSInteger)intValue; + (NSString *)intStr:(NSInteger)intValue append:(NSString *)append; + (NSString *)intStr:(NSInteger)intValue format:(NSString *)format; + (NSString *)floatStr:(CGFloat)value; + (NSString *)doubleStr:(double)value; + (NSString *)priceDbStr:(double)price; + (NSString *)priceFlStr:(CGFloat)price; + (NSString *)priceStrWithStr:(NSString *)priceStr; + (NSString *)strWithoutSpace:(NSString *)str; + (NSMutableString *)randomChinese:(NSInteger)len; + (NSMutableString *)randomChineseWithMaxLength:(NSInteger)maxLen; + (NSString *)randomStrWithLength:(NSInteger)len; + (NSString *)randomStrWithMaxLength:(NSInteger)maxLen; + (NSString *)strWithDic:(NSDictionary *)dic; + (NSString *)boolStr:(BOOL)boolValue; + (NSInteger)randomInt:(NSInteger)max; + (BOOL)randomBool; + (NSString *)str:(NSString *)str withDef:(NSString *)def; @end
// // MSCollectionCellModel.h // MMTableViewDemo // // Created by Mac mini 2012 on 15-2-27. // Copyright (c) 2015年 Mac mini 2012. All rights reserved. // #import <Foundation/Foundation.h> #import <UIKit/UIKit.h> #import "MSCellModel.h" /** * cell的viewmodel, 一个cell对应一个cellModel */ @protocol MSCollectionCellModel <MSCellModel> /** * 单个item的尺寸 */ @property (nonatomic, assign) CGSize layoutSize; @end
int simpleInvert(double* const a, double* const b, int m);
// Copyright: 2015 Steven Lamerton // License: MIT, see LICENSE #ifndef MAP_GENERATOR_H_ #define MAP_GENERATOR_H_ #include <set> #include <string> class MapGenerator { public: void AddInclusion(std::pair<std::string, std::string> inclusion); void AddSystemFile(std::string path); void PrintMap(); void RemoveSystemInclusions(); private: std::set<std::pair<std::string, std::string>> inclusions_; std::set<std::string> system_files_; }; #endif
/** * \file * * \brief SPI example configuration. * * Copyright (c) 2011-2014 Atmel Corporation. All rights reserved. * * \asf_license_start * * \page License * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * 3. The name of Atmel may not be used to endorse or promote products derived * from this software without specific prior written permission. * * 4. This software may only be redistributed and used in connection with an * Atmel microcontroller product. * * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * * \asf_license_stop * */ /** * \defgroup spi_example_pin_defs * - <b> SAM4S-Xplained -- SAM4S-Xplained </b> * - VCC -- VCC * - NPCS0(PA11) -- NPCS0(PA11) * - MISO(PA12) -- MISO(PA12) * - MOSI(PA13) -- MOSI(PA13) * - SPCK(PA14) -- SPCK(PA14) * - GND -- GND */ /** * Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> */ #ifndef CONF_SPI_EXAMPLE_H_INCLUDED #define CONF_SPI_EXAMPLE_H_INCLUDED /// @cond 0 /**INDENT-OFF**/ #ifdef __cplusplus extern "C" { #endif /**INDENT-ON**/ /// @endcond #define SPI_Handler SPI_Handler #define SPI_IRQn SPI_IRQn /// @cond 0 /**INDENT-OFF**/ #ifdef __cplusplus } #endif /**INDENT-ON**/ /// @endcond #endif /* CONF_SPI_EXAMPLE_H_INCLUDED */
// // Observer.h // Observer // // Created by hukaiyin on 16/3/12. // Copyright © 2016年 HKY. All rights reserved. // #import <Foundation/Foundation.h> #import "Secretary.h" @interface Observer : NSObject @property (nonatomic, strong) NSString *name; @property (nonatomic, strong) Secretary *sub; - (instancetype)initWithName:(NSString *)name Secretary:(Secretary *)sub; - (void)update; @end
/** */ #import "SVGKSource.h" NS_ASSUME_NONNULL_BEGIN @interface SVGKSourceString : SVGKSource <NSCopying> @property (nonatomic, strong, readonly) NSString* rawString; - (instancetype)initWithContentsOfString:(NSString*)theStr; + (instancetype)sourceFromContentsOfString:(NSString*)rawString; @end NS_ASSUME_NONNULL_END
#ifndef PATH_LIST_H #define PATH_LIST_H #include "../common/io/outputStream.h" #include "path.h" #include "location.h" #include "locationList.h" /** * Tre struct defining a list of paths. */ typedef struct { /** An array of pointer on paths. */ PathData(*paths)[]; /** the size of the list. */ unsigned int size; /** the max size of the list. */ unsigned int maxSize; } PathList; /** * Initializes the path. * @param pathList the pathList to initialize. */ void initPathList(PathList* pathList, PathData(*pathListArray)[], unsigned int pathListSize); /** * Clear the path list. */ void clearPathList(PathList* pathList); /** * Fill a path and add a path to the list. * @return the path from the list */ PathData* addPath(PathList* pathList); /** * Add a Path, with structure filled with all data. */ PathData* addFilledPath(PathList* pathList, LocationList* locationList, char* locationName1, char* locationName2, float cost, float controlPointDistance1, float controlPointDistance2, float angleRadian1, float angleRadian2, unsigned char accelerationFactor, unsigned char speedFactor, bool mustGoBackward); /** * Get the path at index. */ PathData* getPath(PathList* pathList, unsigned int index); /** * Returns the path corresponding to the both location. */ PathData* getPathOfLocations(PathList* pathList, Location* location1, Location* location2); /** * Get the count of paths. */ unsigned int getPathCount(PathList* pathList); // OBSTACLE MANAGEMENT void pathListDecreaseObstacleCost(PathList* pathList); /** * When Temporary Paths have been used and the robot is now back to permanent Location, we must mark the pathData which were generated * as reusable. */ void pathListClearTemporaryPaths(PathList* pathList); PathData* findPathDataToRecycleIfAny(PathList* pathList); #endif
#import <UIKit/UIKit.h> FOUNDATION_EXPORT double Pods_SwiftyVerticalScrollBar_ExampleVersionNumber; FOUNDATION_EXPORT const unsigned char Pods_SwiftyVerticalScrollBar_ExampleVersionString[];
/* * DICE2007Setup_terminate.h * * Code generation for function 'DICE2007Setup_terminate' * * C source code generated on: Sat Sep 1 10:38:21 2012 * */ #ifndef __DICE2007SETUP_TERMINATE_H__ #define __DICE2007SETUP_TERMINATE_H__ /* Include files */ #include <stddef.h> #include <stdlib.h> #include <string.h> #include "rtwtypes.h" #include "DICE2007Setup_types.h" /* Type Definitions */ /* Named Constants */ /* Variable Declarations */ /* Variable Definitions */ /* Function Declarations */ extern void DICE2007Setup_terminate(void); #endif /* End of code generation (DICE2007Setup_terminate.h) */
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2011 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ #include "mpiimpl.h" /* -- Begin Profiling Symbol Block for routine MPI_Type_get_true_extent_x */ #if defined(HAVE_PRAGMA_WEAK) #pragma weak MPI_Type_get_true_extent_x = PMPI_Type_get_true_extent_x #elif defined(HAVE_PRAGMA_HP_SEC_DEF) #pragma _HP_SECONDARY_DEF PMPI_Type_get_true_extent_x MPI_Type_get_true_extent_x #elif defined(HAVE_PRAGMA_CRI_DUP) #pragma _CRI duplicate MPI_Type_get_true_extent_x as PMPI_Type_get_true_extent_x #elif defined(HAVE_WEAK_ATTRIBUTE) int MPI_Type_get_true_extent_x(MPI_Datatype datatype, MPI_Count *lb, MPI_Count *extent) __attribute__((weak,alias("PMPI_Type_get_true_extent_x"))); #endif /* -- End Profiling Symbol Block */ /* Define MPICH_MPI_FROM_PMPI if weak symbols are not supported to build the MPI routines */ #ifndef MPICH_MPI_FROM_PMPI #undef MPI_Type_get_true_extent_x #define MPI_Type_get_true_extent_x PMPI_Type_get_true_extent_x /* any non-MPI functions go here, especially non-static ones */ #undef FUNCNAME #define FUNCNAME MPIR_Type_get_true_extent_x_impl #undef FCNAME #define FCNAME MPIU_QUOTE(FUNCNAME) void MPIR_Type_get_true_extent_x_impl(MPI_Datatype datatype, MPI_Count *true_lb, MPI_Count *true_extent) { MPID_Datatype *datatype_ptr = NULL; MPID_Datatype_get_ptr(datatype, datatype_ptr); if (HANDLE_GET_KIND(datatype) == HANDLE_KIND_BUILTIN) { *true_lb = 0; *true_extent = MPID_Datatype_get_basic_size(datatype); } else { *true_lb = datatype_ptr->true_lb; *true_extent = datatype_ptr->true_ub - datatype_ptr->true_lb; } } #endif /* MPICH_MPI_FROM_PMPI */ #undef FUNCNAME #define FUNCNAME MPI_Type_get_true_extent_x #undef FCNAME #define FCNAME MPIU_QUOTE(FUNCNAME) /*@ MPI_Type_get_true_extent_x - XXX description here Input Parameters: . datatype - datatype (handle) Output Parameters: + true_lb - true lower bound of datatype (integer) - true_extent - true extent of datatype (integer) .N ThreadSafe .N Fortran .N Errors @*/ int MPI_Type_get_true_extent_x(MPI_Datatype datatype, MPI_Count *true_lb, MPI_Count *true_extent) { int mpi_errno = MPI_SUCCESS; MPID_MPI_STATE_DECL(MPID_STATE_MPI_TYPE_GET_TRUE_EXTENT_X); MPIU_THREAD_CS_ENTER(ALLFUNC,); MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_TYPE_GET_TRUE_EXTENT_X); /* Validate parameters, especially handles needing to be converted */ # ifdef HAVE_ERROR_CHECKING { MPID_BEGIN_ERROR_CHECKS { MPIR_ERRTEST_DATATYPE(datatype, "datatype", mpi_errno); /* TODO more checks may be appropriate */ if (mpi_errno != MPI_SUCCESS) goto fn_fail; } MPID_END_ERROR_CHECKS } # endif /* HAVE_ERROR_CHECKING */ /* Convert MPI object handles to object pointers */ /* Validate parameters and objects (post conversion) */ # ifdef HAVE_ERROR_CHECKING { MPID_BEGIN_ERROR_CHECKS { if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN) { MPID_Datatype *datatype_ptr = NULL; MPID_Datatype_get_ptr(datatype, datatype_ptr); MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno); } /* TODO more checks may be appropriate (counts, in_place, buffer aliasing, etc) */ if (mpi_errno != MPI_SUCCESS) goto fn_fail; } MPID_END_ERROR_CHECKS } # endif /* HAVE_ERROR_CHECKING */ /* ... body of routine ... */ MPIR_Type_get_true_extent_x_impl(datatype, true_lb, true_extent); /* ... end of body of routine ... */ fn_exit: MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_TYPE_GET_TRUE_EXTENT_X); MPIU_THREAD_CS_EXIT(ALLFUNC,); return mpi_errno; fn_fail: /* --BEGIN ERROR HANDLING-- */ # ifdef HAVE_ERROR_CHECKING { mpi_errno = MPIR_Err_create_code( mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, "**mpi_type_get_true_extent_x", "**mpi_type_get_true_extent_x %D %p %p", datatype, true_lb, true_extent); } # endif mpi_errno = MPIR_Err_return_comm(NULL, FCNAME, mpi_errno); goto fn_exit; /* --END ERROR HANDLING-- */ }
#ifndef _ISR_H #define _ISR_H #define IRQ0 32 #define IRQ1 33 #define IRQ2 34 #define IRQ3 35 #define IRQ4 36 #define IRQ5 37 #define IRQ6 38 #define IRQ7 39 #define IRQ8 40 #define IRQ9 41 #define IRQ10 42 #define IRQ11 43 #define IRQ12 44 #define IRQ13 45 #define IRQ14 46 #define IRQ15 47 typedef struct registers { u32 ds; // Data segment selector u32 edi, esi, ebp, esp, ebx, edx, ecx, eax; // Pushed by pusha. u32 int_no, err_code; // Interrupt number and error code (if applicable) u32 eip, cs, eflags, useresp, ss; // Pushed by the processor automatically. } registers_t; typedef void (*isr_t)(registers_t*); void register_interrupt_handler(u8 n, isr_t handler); #endif
/* * EventBlock.h * DataFileIndexer * * Created by bkennedy on 2/19/08. * Copyright 2008 MIT. All rights reserved. * */ #ifndef EventBlock_ #define EventBlock_ #include <set> #include <vector> #include <boost/shared_ptr.hpp> #include <boost/serialization/serialization.hpp> #include <boost/serialization/extended_type_info.hpp> #include <boost/serialization/library_version_type.hpp> #include <boost/serialization/set.hpp> #include <boost/serialization/singleton.hpp> #include <boost/serialization/shared_ptr.hpp> #include <boost/serialization/split_member.hpp> #include <boost/serialization/vector.hpp> #include "Utilities.h" BEGIN_NAMESPACE_MW BEGIN_NAMESPACE(scarab) class EventBlock { public: EventBlock(long int offset, MWTime min_time, MWTime max_time, const std::set<unsigned int> &_event_codes); explicit EventBlock(const std::vector<boost::shared_ptr<EventBlock>> &child_event_blocks); bool hasTime(MWTime lower_bound, MWTime upper_bound) const { return lower_bound <= maximum_time && upper_bound >= minimum_time; } bool hasEventCode(unsigned int code) const { return (event_codes.find(code) != event_codes.end()); } bool hasEventCodes(const std::set<unsigned int> &event_codes_to_match) const; bool isLeaf() const { return _children.empty(); } void addChild(const boost::shared_ptr<EventBlock> &child); MWTime maximumTime() const { return maximum_time; } MWTime minimumTime() const { return minimum_time; } long int blockOffset() const { return file_offset; } const std::set<unsigned int>& eventCodes() const { return event_codes; } void children(std::vector<boost::shared_ptr<EventBlock> > &matching_child_blocks, const std::set<unsigned int> &event_codes, MWTime lower_bound, MWTime upper_bound) const; private: friend class boost::serialization::access; // This is used only by boost::serialization when loading an archive EventBlock() {} template<class Archive> void save(Archive & ar, const unsigned int version) const { ar << file_offset; ar << minimum_time; ar << maximum_time; ar << event_codes; ar << _children; } template<class Archive> void load(Archive & ar, const unsigned int version) { ar >> file_offset; ar >> minimum_time; ar >> maximum_time; if (version > 0) { ar >> event_codes; } else { std::vector<unsigned int> codes; ar >> codes; event_codes.clear(); event_codes.insert(codes.begin(), codes.end()); } ar >> _children; } BOOST_SERIALIZATION_SPLIT_MEMBER() long int file_offset; MWTime minimum_time; MWTime maximum_time; std::set<unsigned int> event_codes; std::vector<boost::shared_ptr<EventBlock> > _children; }; END_NAMESPACE(scarab) END_NAMESPACE_MW BOOST_CLASS_VERSION(mw::scarab::EventBlock, 1) #endif // EventBlock_
// Copyright (c) 2017 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // // --------------------------------------------------------------------------- // // This file was generated by the CEF translator tool. If making changes by // hand only do so within the body of existing method and function // implementations. See the translator.README.txt file in the tools directory // for more information. // #ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_LABEL_BUTTON_CTOCPP_H_ #define CEF_LIBCEF_DLL_CTOCPP_VIEWS_LABEL_BUTTON_CTOCPP_H_ #pragma once #if !defined(WRAPPING_CEF_SHARED) #error This file can be included wrapper-side only #endif #include "include/views/cef_label_button.h" #include "include/capi/views/cef_label_button_capi.h" #include "include/views/cef_menu_button.h" #include "include/capi/views/cef_menu_button_capi.h" #include "libcef_dll/ctocpp/ctocpp.h" // Wrap a C structure with a C++ class. // This class may be instantiated and accessed wrapper-side only. class CefLabelButtonCToCpp : public CefCToCpp<CefLabelButtonCToCpp, CefLabelButton, cef_label_button_t> { public: CefLabelButtonCToCpp(); // CefLabelButton methods. CefRefPtr<CefMenuButton> AsMenuButton() OVERRIDE; void SetText(const CefString& text) OVERRIDE; CefString GetText() OVERRIDE; void SetImage(cef_button_state_t button_state, CefRefPtr<CefImage> image) OVERRIDE; CefRefPtr<CefImage> GetImage(cef_button_state_t button_state) OVERRIDE; void SetTextColor(cef_button_state_t for_state, cef_color_t color) OVERRIDE; void SetEnabledTextColors(cef_color_t color) OVERRIDE; void SetFontList(const CefString& font_list) OVERRIDE; void SetHorizontalAlignment(cef_horizontal_alignment_t alignment) OVERRIDE; void SetMinimumSize(const CefSize& size) OVERRIDE; void SetMaximumSize(const CefSize& size) OVERRIDE; // CefButton methods. CefRefPtr<CefLabelButton> AsLabelButton() OVERRIDE; void SetState(cef_button_state_t state) OVERRIDE; cef_button_state_t GetState() OVERRIDE; void SetTooltipText(const CefString& tooltip_text) OVERRIDE; void SetAccessibleName(const CefString& name) OVERRIDE; // CefView methods. CefRefPtr<CefBrowserView> AsBrowserView() OVERRIDE; CefRefPtr<CefButton> AsButton() OVERRIDE; CefRefPtr<CefPanel> AsPanel() OVERRIDE; CefRefPtr<CefScrollView> AsScrollView() OVERRIDE; CefRefPtr<CefTextfield> AsTextfield() OVERRIDE; CefString GetTypeString() OVERRIDE; CefString ToString(bool include_children) OVERRIDE; bool IsValid() OVERRIDE; bool IsAttached() OVERRIDE; bool IsSame(CefRefPtr<CefView> that) OVERRIDE; CefRefPtr<CefViewDelegate> GetDelegate() OVERRIDE; CefRefPtr<CefWindow> GetWindow() OVERRIDE; int GetID() OVERRIDE; void SetID(int id) OVERRIDE; CefRefPtr<CefView> GetParentView() OVERRIDE; CefRefPtr<CefView> GetViewForID(int id) OVERRIDE; void SetBounds(const CefRect& bounds) OVERRIDE; CefRect GetBounds() OVERRIDE; CefRect GetBoundsInScreen() OVERRIDE; void SetSize(const CefSize& size) OVERRIDE; CefSize GetSize() OVERRIDE; void SetPosition(const CefPoint& position) OVERRIDE; CefPoint GetPosition() OVERRIDE; CefSize GetPreferredSize() OVERRIDE; void SizeToPreferredSize() OVERRIDE; CefSize GetMinimumSize() OVERRIDE; CefSize GetMaximumSize() OVERRIDE; int GetHeightForWidth(int width) OVERRIDE; void InvalidateLayout() OVERRIDE; void SetVisible(bool visible) OVERRIDE; bool IsVisible() OVERRIDE; bool IsDrawn() OVERRIDE; void SetEnabled(bool enabled) OVERRIDE; bool IsEnabled() OVERRIDE; void SetFocusable(bool focusable) OVERRIDE; bool IsFocusable() OVERRIDE; bool IsAccessibilityFocusable() OVERRIDE; void RequestFocus() OVERRIDE; void SetBackgroundColor(cef_color_t color) OVERRIDE; cef_color_t GetBackgroundColor() OVERRIDE; bool ConvertPointToScreen(CefPoint& point) OVERRIDE; bool ConvertPointFromScreen(CefPoint& point) OVERRIDE; bool ConvertPointToWindow(CefPoint& point) OVERRIDE; bool ConvertPointFromWindow(CefPoint& point) OVERRIDE; bool ConvertPointToView(CefRefPtr<CefView> view, CefPoint& point) OVERRIDE; bool ConvertPointFromView(CefRefPtr<CefView> view, CefPoint& point) OVERRIDE; }; #endif // CEF_LIBCEF_DLL_CTOCPP_VIEWS_LABEL_BUTTON_CTOCPP_H_
// ========================================================================== // // The MIT License (MIT) // // // // Copyright (c) 2017 Intel 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 // // in all copies or substantial portions of the Software. // // // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL // // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING // // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // // DEALINGS IN THE SOFTWARE. // // ========================================================================== // #pragma once #include "../../pack.h" namespace tsimd { template <typename PACK_T, typename OFFSET_T> TSIMD_INLINE void scatter(const PACK_T &p, void *_dst, const pack<OFFSET_T, PACK_T::static_size> &o) { auto *dst = (typename PACK_T::element_t *)_dst; for (int i = 0; i < PACK_T::static_size; ++i) dst[o[i]] = p[i]; } template <typename PACK_T, typename OFFSET_T> TSIMD_INLINE void scatter( const PACK_T &p, void *_dst, const pack<OFFSET_T, PACK_T::static_size> &o, const mask<typename PACK_T::element_t, PACK_T::static_size> &m) { auto *dst = (typename PACK_T::element_t *)_dst; for (int i = 0; i < PACK_T::static_size; ++i) if (m[i]) dst[o[i]] = p[i]; } } // namespace tsimd
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2013 The TipaulCoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_CHAIN_PARAMS_H #define BITCOIN_CHAIN_PARAMS_H #include "bignum.h" #include "uint256.h" #include "util.h" #include <vector> using namespace std; #define MESSAGE_START_SIZE 4 typedef unsigned char MessageStartChars[MESSAGE_START_SIZE]; class CAddress; class CBlock; struct CDNSSeedData { string name, host; CDNSSeedData(const string &strName, const string &strHost) : name(strName), host(strHost) {} }; /** * CChainParams defines various tweakable parameters of a given instance of the * TipaulCoin system. There are three: the main network on which people trade goods * and services, the public test network which gets reset from time to time and * a regression test mode which is intended for private networks only. It has * minimal difficulty to ensure that blocks can be found instantly. */ class CChainParams { public: enum Network { MAIN, TESTNET, REGTEST, }; enum Base58Type { PUBKEY_ADDRESS, SCRIPT_ADDRESS, SECRET_KEY, EXT_PUBLIC_KEY, EXT_SECRET_KEY, MAX_BASE58_TYPES }; const uint256& HashGenesisBlock() const { return hashGenesisBlock; } const MessageStartChars& MessageStart() const { return pchMessageStart; } const vector<unsigned char>& AlertKey() const { return vAlertPubKey; } int GetDefaultPort() const { return nDefaultPort; } const CBigNum& ProofOfWorkLimit() const { return bnProofOfWorkLimit; } int SubsidyHalvingInterval() const { return nSubsidyHalvingInterval; } virtual const CBlock& GenesisBlock() const = 0; virtual bool RequireRPCPassword() const { return true; } const string& DataDir() const { return strDataDir; } virtual Network NetworkID() const = 0; const vector<CDNSSeedData>& DNSSeeds() const { return vSeeds; } const std::vector<unsigned char> &Base58Prefix(Base58Type type) const { return base58Prefixes[type]; } virtual const vector<CAddress>& FixedSeeds() const = 0; int RPCPort() const { return nRPCPort; } protected: CChainParams() {}; uint256 hashGenesisBlock; MessageStartChars pchMessageStart; // Raw pub key bytes for the broadcast alert signing key. vector<unsigned char> vAlertPubKey; int nDefaultPort; int nRPCPort; CBigNum bnProofOfWorkLimit; int nSubsidyHalvingInterval; string strDataDir; vector<CDNSSeedData> vSeeds; std::vector<unsigned char> base58Prefixes[MAX_BASE58_TYPES]; }; /** * Return the currently selected parameters. This won't change after app startup * outside of the unit tests. */ const CChainParams &Params(); /** Sets the params returned by Params() to those for the given network. */ void SelectParams(CChainParams::Network network); /** * Looks for -regtest or -testnet and then calls SelectParams as appropriate. * Returns false if an invalid combination is given. */ bool SelectParamsFromCommandLine(); inline bool TestNet() { // Note: it's deliberate that this returns "false" for regression test mode. return Params().NetworkID() == CChainParams::TESTNET; } inline bool RegTest() { return Params().NetworkID() == CChainParams::REGTEST; } #endif
/** * @file ic_dfu.h * @author Paweł Kaźmierzewski <p.kazmierzewski@inteliclinic.com> * @author Wojtek Weclewski <w.weclewski@inteliclinic.com> * @date October, 2016 * @brief Neuroon DFU API interface * * Functions provided with this file populates memory with data understandable * by Neuroon mask in DFU mode and make mask enter DFU mode. */ #ifndef IC_DFU_H #define IC_DFU_H #ifdef __cplusplus extern "C" { #endif #include <limits.h> // CHAR_BIT macro #include <stddef.h> // size_t type #include <stdint.h> #include <stdio.h> // FILE type #if CHAR_BIT != 8 #error "Char is not 8 bit!" #endif /** @defgroup DFU_API * * @{ */ /** * @brief Firmaware type * * */ typedef enum{ SD_FIRMWARE = 0x00, /*!< Nordic Soft Device */ APP_FIRMWARE = 0x01, /*!< Neuroon firmware */ DFU_FIRMWARE = 0x02 /*!< DFU */ }e_firmwareType; /** * @brief Firmaware major release * * */ typedef enum{ LEGACY_NEUROON_FIRMWARE = 0x00, /*!< firmware 2.0.x.x */ NEW_NEUROON_FIRMWARE = 0x01 /*!< firmware 2.1.x.x */ }e_firmwareMilestone; /** * @brief Next step order * * Encoded orders for application to execute */ typedef enum{ DFU_SEND_NEXT_DATASET = 0x00, /*!< send data stored in output frame */ DFU_RESEND_DATASET, /*!< resend previous data set */ DFU_TERMINATE, /*!< Mask encoutered critical error in DFU mode */ DFU_END /*!< Update finished */ }e_dfuAction; /** * @brief Generate "go to dfu" command * * @param[out] frame pointer to 20 bytes array where frame will be stored * @param[in,out] len pointer to size_t value where function will put length of array * @param[in] firmware choose firmware type * * @return characteristic index * */ int goto_dfu(char *frame, size_t *len, e_firmwareMilestone firmware); /** * @brief Generate start update command for dfu * * @param[out] frame pointer to 20 bytes array where frame will be stored * @param[in,out] len pointer to size_t value where function will put lenght of array * @param[in] fb pointer to memory with storred binary file * @param[in] file_len length of fb buffer * @param[in] firm @ref e_firmwareType binary file type * @param[in] version binary version build from 4 bytes. Ex 16777985 = 1.0.3.1 * * @return characteristic index */ int dfu_start_update(char *frame, size_t *len, char *fb, size_t file_len, e_firmwareType firm, uint32_t version); /** * @brief Generate start update command for dfu * * @param[out] frame pointer to 20 bytes array where frame will be stored * @param[in,out] len pointer to size_t value where function will put lenght of array * @param[in] fp pointer to file handle(@ref FILE) * @param[in] firm @ref e_firmwareType binary file type * @param[in] version binary version build from 4 bytes. Ex 16777985 = 1.0.3.1 * * @return characteristic index */ int dfu_start_update_fp(char *frame, size_t *len, FILE *fp, e_firmwareType firm, uint32_t version); /** * @brief Receive data from dfu response characteristic * * @param[in] response_frame 20 byte array with response frame * @param[in] response_len response array length * @param[out] frame pointer to 20 bytes array where binary data will be stored * @param[in,out] len pointer to size_t value where function will put output frame * length * @param[out] action next step for update * * @return characteristic index */ int dfu_response_sink(char *response_frame, size_t response_len, char* frame, size_t *len, e_dfuAction *action); /** @} */ //End of DFU_API #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* !IC_DFU_H */
// // Generated by class-dump 3.5 (64 bit). // // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. // #import "NSObject.h" @class NSString; @interface FavProductItem : NSObject { NSString *_title; NSString *_description; NSString *_thumbUrl; NSString *_info; NSString *_sellerName; NSString *_productUrl; } @property(retain, nonatomic) NSString *productUrl; // @synthesize productUrl=_productUrl; @property(retain, nonatomic) NSString *sellerName; // @synthesize sellerName=_sellerName; @property(retain, nonatomic) NSString *info; // @synthesize info=_info; @property(retain, nonatomic) NSString *thumbUrl; // @synthesize thumbUrl=_thumbUrl; @property(retain, nonatomic) NSString *description; // @synthesize description=_description; @property(retain, nonatomic) NSString *title; // @synthesize title=_title; - (void).cxx_destruct; - (id)copyWithZone:(struct _NSZone *)arg1; - (id)initWithCoder:(id)arg1; - (void)encodeWithCoder:(id)arg1; - (id)init; @end
// // VerbalExpressions.h // VerbalExpressions // // Created by Dominique d'Argent on 04/06/14. // Copyright (c) 2014 Dominique d'Argent. All rights reserved. // #import <UIKit/UIKit.h> //! Project version number for VerbalExpressions. FOUNDATION_EXPORT double VerbalExpressionsVersionNumber; //! Project version string for VerbalExpressions. FOUNDATION_EXPORT const unsigned char VerbalExpressionsVersionString[]; // In this header, you should import all the public headers of your framework using statements like #import <VerbalExpressions/PublicHeader.h>
/* Copyright (c) 2014-2015 NicoHood See the readme for credit to other people. 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 guard #pragma once #include <Arduino.h> #include "HID-Settings.h" #include "ImprovedKeylayouts.h" class KeyboardAPI : public Print { public: inline void begin(void); inline void end(void); // Raw Keycode API functions inline size_t write(KeyboardKeycode k); inline size_t press(KeyboardKeycode k); inline size_t release(KeyboardKeycode k); inline size_t remove(KeyboardKeycode k); inline size_t add(KeyboardKeycode k); inline size_t releaseAll(void); //press(uint8_t key, uint8_t modifier) TODO variadic template // Print API functions inline virtual size_t write(uint8_t k) override; inline size_t press(uint8_t k); inline size_t release(uint8_t k); inline size_t add(uint8_t k); inline size_t remove(uint8_t k); // Needs to be implemented in a lower level virtual size_t removeAll(void) = 0; virtual int send(void) = 0; private: virtual size_t set(KeyboardKeycode k, bool s) = 0; inline size_t set(uint8_t k, bool s); }; // Implementation is inline #include "KeyboardAPI.hpp"
#include <cassert> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstdlib> #include <cstring> #include <arpa/inet.h> #include <netdb.h> #include <netinet/in.h> #include <sys/socket.h> #include <sys/time.h> #include <sys/types.h> #include <unistd.h> #include <algorithm> #include <fstream> #include <iostream> #include <map> #include <memory> #include <string> #include <thread> #include <vector> #include <flycapture/FlyCapture2.h> #include <opencv2/core/core.hpp> #include <opencv2/highgui/highgui.hpp> #include <opencv2/imgproc/imgproc.hpp> #include <opencv2/video/tracking.hpp> #include <opencv2/features2d.hpp> #include <opencv2/xfeatures2d.hpp> #include <opencv2/xfeatures2d/nonfree.hpp> #include <cpp_mpl.hpp>
/* * sha1_test.c test assertions * * Copyright (C) 2008, Jason L. Shiffer <jshiffer@zerotao.org>. All Rights Reserved. * See file COPYING for details. * */ /* * Description: */ #ifdef HAVE_CONFIG_H # include <libzt/zt_config.h> #endif /* HAVE_CONFIG_H */ #ifdef HAVE_STRING_H # include <string.h> #endif /* HAVE_STRING_H */ #define ZT_WITH_UNIT #include <zt.h> static void basic_tests(struct zt_unit_test *test, void *data UNUSED) { /* get rid of the log message for the moment */ char * tdata[] = { "abc", "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq", "http://www.google.com" }; char * results[] = { "a9993e364706816aba3e25717850c26c9cd0d89d", "84983e441c3bd26ebaae4aa1f95129e5e54670f1", "738ddf35b3a85a7a6ba7b232bd3d5f1e4d284ad1" }; uint8_t digest[20]; uint8_t digest2[20]; char sha1[41]; int i; zt_sha1_ctx ctx; for (i = 0; i < (int)sizeof_array(tdata); i++) { zt_sha1_data(tdata[i], strlen(tdata[i]), digest); zt_sha1_tostr(digest, sha1); ZT_UNIT_ASSERT(test, strncmp(results[i], sha1, 40) == 0); } zt_sha1_init(&ctx); for (i = 0; i < 1000000; i++) { zt_sha1_update(&ctx, (uint8_t *)"a", 1); } zt_sha1_finalize(&ctx, digest); zt_sha1_tostr(digest, sha1); ZT_UNIT_ASSERT(test, strncmp(sha1, "34aa973cd4c4daa4f61eeb2bdbad27316534016f", 40) == 0); memset(digest2, 0, 20); zt_str_tosha1(sha1, digest2); /* printf("%20s %20s\n", digest2, digest); */ ZT_UNIT_ASSERT(test, memcmp(digest2, digest, 20) == 0); } int register_sha1_suite(struct zt_unit *unit) { struct zt_unit_suite * suite; suite = zt_unit_register_suite(unit, "sha1 tests", NULL, NULL, NULL); zt_unit_register_test(suite, "basic", basic_tests); return 0; }
#include <stdio.h> int next_serial(); int next_serial(){ // a local variable that keeps its value between function calls static int result = 0; result += 1; return result; } int main() { printf("%d\n", next_serial()); printf("%d\n", next_serial()); return 0; }
/* Copyright 2016 Matthew Holder Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #pragma once #include "targetver.h" #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers #include "ntUPSd.Core.Base.h"
/* * Generated by class-dump 3.3.4 (64 bit). * * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. */ #import "ISOperation.h" @class NSNumber, SSMutableAuthenticationContext; @interface SUScriptAuthenticationOperation : ISOperation { NSNumber *_authenticatedDSID; SSMutableAuthenticationContext *_authenticationContext; } @property(retain) NSNumber *authenticatedDSID; // @synthesize authenticatedDSID=_authenticatedDSID; - (void)setScriptOptions:(id)arg1; - (void)sendCompletionCallback:(id)arg1; - (void)run; - (id)authenticatedAccountDSID; - (void)dealloc; - (id)initWithAccountIdentifier:(id)arg1; - (id)init; @end
/* Project Euler ** 19 ** How many Sundays fell on the first of the month during the 21st century - ** 1 Jan 1901 to 31 Dec 2000 ** 1 Jan 1900 was a Monday ** Leap years occur on every year divisible by 4 */ #include <stdio.h> int main(int argc, char** argv) { int sundays = 0; unsigned long day = 2; // monday is 1 int date = 1; // actual day of the month int month = 1; // jan is 1 int year = 1901; for(year = 1901; year < 2001; year++) { if(year%4 == 0) { //leap year for(month = 1; month < 13; month++) { if(month == 9 || month == 4 || month == 6 || month == 11) { for(date = 1; date < 31; date++) { day++; if(date == 1 && (day%7 == 0)) { sundays++; } } }else if(month == 1 || month == 3 || month == 5 || month == 7 || month == 8 || month == 10 || month == 12) { for(date = 1; date < 32; date++) { day++; if(date == 1 && (day%7 == 0)) { sundays++; } } } else { // feb for(date = 1; date < 30; date++) { day++; if(date == 1 && (day%7 == 0)) { sundays++; } } } } } else { for(month = 1; month < 13; month++) { if(month == 9 || month == 4 || month == 6 || month == 11) { for(date = 1; date < 31; date++) { day++; if(date == 1 && (day%7 == 0)) { sundays++; } } }else if(month == 1 || month == 3 || month == 5 || month == 7 || month == 8 || month == 10 || month == 12) { for(date = 1; date < 32; date++) { day++; if(date == 1 && (day%7 == 0)) { sundays++; } } } else { // feb for(date = 1; date < 29; date++) { day++; if(date == 1 && (day%7 == 0)) { sundays++; } } } } } } printf("Number of Sundays = %d\n", sundays); }
#include<graphics.h> void plot(int x, int y) { if(x>=0 && x<=600 && y>=0 && y<=400) putpixel(x, y, WHITE); } void main() { int gd = DETECT, gm, i; initgraph(&gd, &gm, NULL); int xc = 110, yc = 100, r = 100; int p = 1 - r; int x = 0, y = r; while(x<y){ plot(x+xc, y+yc); plot(-x+xc, y+yc); plot(x+xc, -y+yc); plot(-x+xc, -y+yc); plot(y+xc, x+yc); plot(-y+xc, x+yc); plot(y+xc, -x+yc); plot(-y+xc, -x+yc); x++; if(p<0){ p = p + 2*x +1; } else{ y--; p = p + 2*x - 2*y + 1; } } getch(); closegraph(); }
C $Header$ C $Name$ CBOP C !ROUTINE: CTRL_OPTIONS.h C !INTERFACE: C #include "CTRL_OPTIONS.h" C !DESCRIPTION: C *==================================================================* C | CPP options file for Control (ctrl) package: C | Control which optional features to compile in this package code. C *==================================================================* CEOP #ifndef CTRL_OPTIONS_H #define CTRL_OPTIONS_H #include "PACKAGES_CONFIG.h" #include "CPP_OPTIONS.h" #ifdef ALLOW_CTRL #ifdef ECCO_CPPOPTIONS_H C-- When multi-package option-file ECCO_CPPOPTIONS.h is used (directly included C in CPP_OPTIONS.h), this option file is left empty since all options that C are specific to this package are assumed to be set in ECCO_CPPOPTIONS.h #else /* ndef ECCO_CPPOPTIONS_H */ C ================================================================== C-- Package-specific Options & Macros go here C allow use of legacy ecco/ctrl codes #define ECCO_CTRL_DEPRECATED #define EXCLUDE_CTRL_PACK #undef ALLOW_NONDIMENSIONAL_CONTROL_IO C >>> Initial values. #define ALLOW_THETA0_CONTROL #define ALLOW_SALT0_CONTROL #undef ALLOW_TR10_CONTROL #undef ALLOW_TAUU0_CONTROL #undef ALLOW_TAUV0_CONTROL #undef ALLOW_SFLUX0_CONTROL #undef ALLOW_HFLUX0_CONTROL #undef ALLOW_SSS0_CONTROL #undef ALLOW_SST0_CONTROL C >>> Surface fluxes. #undef ALLOW_HFLUX_CONTROL #undef ALLOW_SFLUX_CONTROL #undef ALLOW_USTRESS_CONTROL #undef ALLOW_VSTRESS_CONTROL #undef ALLOW_SWFLUX_CONTROL #undef ALLOW_LWFLUX_CONTROL C >>> Atmospheric state. #undef ALLOW_ATEMP_CONTROL #undef ALLOW_AQH_CONTROL #undef ALLOW_UWIND_CONTROL #undef ALLOW_VWIND_CONTROL #undef ALLOW_PRECIP_CONTROL C >>> Other Control. #define ALLOW_DIFFKR_CONTROL #undef ALLOW_KAPGM_CONTROL #undef ALLOW_KAPREDI_CONTROL #undef ALLOW_BOTTOMDRAG_CONTROL C >>> pkg/shelfice fluxes. #define ALLOW_SHIFWFLX_CONTROL C >>> Generic Control. #undef ALLOW_GENARR2D_CONTROL #undef ALLOW_GENARR3D_CONTROL #undef ALLOW_GENTIM2D_CONTROL C o Rotation of wind/stress controls adjustments C from Eastward/Northward to model grid directions #undef ALLOW_ROTATE_UV_CONTROLS C o use pkg/smooth correlation operator (incl. smoother) for 2D controls (Weaver, Courtier 01) C This CPP option just sets the default for ctrlSmoothCorrel2D to .TRUE. #undef ALLOW_SMOOTH_CORREL2D C o use pkg/smooth correlation operator (incl. smoother) for 3D controls (Weaver, Courtier 01) C This CPP option just sets the default for ctrlSmoothCorrel3D to .TRUE. #undef ALLOW_SMOOTH_CORREL3D C o apply pkg/ctrl/ctrl_smooth.F to 2D controls (outside of ctrlSmoothCorrel2D) #undef ALLOW_CTRL_SMOOTH C o apply pkg/smooth/smooth_diff2d.F to 2D controls (outside of ctrlSmoothCorrel2D) #undef ALLOW_SMOOTH_CTRL2D C o apply pkg/smooth/smooth_diff3d.F to 3D controls (outside of ctrlSmoothCorrel3D) #undef ALLOW_SMOOTH_CTRL3D C ================================================================== #endif /* ndef ECCO_CPPOPTIONS_H */ #endif /* ALLOW_CTRL */ #endif /* CTRL_OPTIONS_H */
// // JLDViewController.h // JLDOverflowLabel // // Created by Jean-Luc Dagon on 10/05/13. // Copyright (c) 2013 Cocoapps. All rights reserved. // #import <UIKit/UIKit.h> #import "JLDOverflowLabel.h" @interface JLDViewController : UIViewController @property (nonatomic, strong) IBOutlet JLDOverflowLabel *overflowLabel1; @property (nonatomic, strong) IBOutlet JLDOverflowLabel *overflowLabel2; @property (nonatomic, strong) IBOutlet JLDOverflowLabel *overflowLabel3; @end
#include "solution.h" void fizzbuzz(int number, char* string) { /***** Enter solution here! *****/ }
// Mutual exclusion spin locks. #include "types.h" #include "defs.h" #include "param.h" #include "x86.h" #include "memlayout.h" #include "mmu.h" #include "proc.h" #include "spinlock.h" void initlock(struct spinlock *lk, char *name) { lk->name = name; lk->locked = 0; lk->cpu = 0; } // Acquire the lock. // Loops (spins) until the lock is acquired. // Holding a lock for a long time may cause // other CPUs to waste time spinning to acquire it. void acquire(struct spinlock *lk) { pushcli(); // disable interrupts to avoid deadlock. if(holding(lk)) panic("acquire"); // The xchg is atomic. // It also serializes, so that reads after acquire are not // reordered before it. while(xchg(&lk->locked, 1) != 0) ; // Record info about lock acquisition for debugging. lk->cpu = cpu; getcallerpcs(&lk, lk->pcs); } // Release the lock. void release(struct spinlock *lk) { if(!holding(lk)) panic("release"); lk->pcs[0] = 0; lk->cpu = 0; // The xchg serializes, so that reads before release are // not reordered after it. The 1996 PentiumPro manual (Volume 3, // 7.2) says reads can be carried out speculatively and in // any order, which implies we need to serialize here. // But the 2007 Intel 64 Architecture Memory Ordering White // Paper says that Intel 64 and IA-32 will not move a load // after a store. So lock->locked = 0 would work here. // The xchg being asm volatile ensures gcc emits it after // the above assignments (and after the critical section). xchg(&lk->locked, 0); popcli(); } // Record the current call stack in pcs[] by following the %ebp chain. void getcallerpcs(void *v, uint pcs[]) { uint *ebp; int i; ebp = (uint*)v - 2; for(i = 0; i < 10; i++){ if(ebp == 0 || ebp < (uint*)KERNBASE || ebp == (uint*)0xffffffff) break; pcs[i] = ebp[1]; // saved %eip ebp = (uint*)ebp[0]; // saved %ebp } for(; i < 10; i++) pcs[i] = 0; } // Check whether this cpu is holding the lock. int holding(struct spinlock *lock) { return lock->locked && lock->cpu == cpu; } // Pushcli/popcli are like cli/sti except that they are matched: // it takes two popcli to undo two pushcli. Also, if interrupts // are off, then pushcli, popcli leaves them off. void pushcli(void) { int eflags; eflags = readeflags(); cli(); if(cpu->ncli++ == 0) cpu->intena = eflags & FL_IF; } void popcli(void) { if(readeflags()&FL_IF) panic("popcli - interruptible"); if(--cpu->ncli < 0) panic("popcli"); if(cpu->ncli == 0 && cpu->intena) sti(); }
/*! @file MemoryMonitor.h Declarations for MemoryMonitor class * */ #ifndef MEMORYMONITOR_H #define MEMORYMONITOR_H #include "eirBase.h" #include <QObject> #include <QMap> #include <QMultiMap> #include <QQueue> #include <QTimer> #include "Singleton.h" #include "MemoryMonitorItem.h" class EIRBASESHARED_EXPORT MemoryMonitor : public QObject { Q_OBJECT DECLARE_SINGLETON(MemoryMonitor); public: typedef qint64 checkpoint_t; private: struct MemoryCheckpointItem { checkpoint_t _ckpt; Qt::HANDLE _thread; quint64 thread_bytes; }; public: void setFreeQueueMsec(const qint64 ems); void setFreeQueueTime(const qint64 ems); void setFreeQueueSize(const int items); void * newMemory(void * ptr, const size_t bytes, void * parent, const QString & varName, const QString & typeName, const QString & funcInfo, const QString & fileName, const int fileLine); void freeMemory(void * ptr, const QString & funcInfo); void adopt(void * ptr, void * newParent); quint64 currentBytes(void) const; quint64 totalAlloc(void) const; quint64 totalFree(void) const; int allocSize(void) const; checkpoint_t makeCheckpoint(void * parent); bool checkCheckpoint(const checkpoint_t cp); bool killCheckpoint(const checkpoint_t cp); void blogReport(const bool detailed=false); signals: public slots: void initialPoint(void); private slots: void freeQueueCheck(void); void destroyingObject(void); private: QMap<void *, MemoryMonitorItem> alloc_pv_item_map; QMultiMap<void *, MemoryMonitorItem> free_pv_item_mmap; QQueue<MemoryMonitorItem> free_item_q; QMap<checkpoint_t, MemoryCheckpointItem> ckpt_item_map; quint64 currentBytes_u64; quint64 totalAlloc_u64; quint64 totalFree_u64; bool isInitial; int freeQueueSize_i; qint64 freeQueue_ems; QTimer * freeQueue_timer; }; #endif // MEMORYMONITOR_H
#pragma once #include <glbinding/gl/bitfield.h> #include <glbinding/nogl.h> namespace gl46 { // import bitfields to namespace using gl::GL_ACCUM_BUFFER_BIT; using gl::GL_ALL_ATTRIB_BITS; using gl::GL_ALL_BARRIER_BITS; using gl::GL_ALL_SHADER_BITS; using gl::GL_ATOMIC_COUNTER_BARRIER_BIT; using gl::GL_BUFFER_UPDATE_BARRIER_BIT; using gl::GL_CLIENT_ALL_ATTRIB_BITS; using gl::GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT; using gl::GL_CLIENT_PIXEL_STORE_BIT; using gl::GL_CLIENT_STORAGE_BIT; using gl::GL_CLIENT_VERTEX_ARRAY_BIT; using gl::GL_COLOR_BUFFER_BIT; using gl::GL_COMMAND_BARRIER_BIT; using gl::GL_COMPUTE_SHADER_BIT; using gl::GL_CONTEXT_COMPATIBILITY_PROFILE_BIT; using gl::GL_CONTEXT_CORE_PROFILE_BIT; using gl::GL_CONTEXT_FLAG_DEBUG_BIT; using gl::GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT; using gl::GL_CONTEXT_FLAG_NO_ERROR_BIT; using gl::GL_CONTEXT_FLAG_NO_ERROR_BIT_KHR; using gl::GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT; using gl::GL_CURRENT_BIT; using gl::GL_DEPTH_BUFFER_BIT; using gl::GL_DYNAMIC_STORAGE_BIT; using gl::GL_ELEMENT_ARRAY_BARRIER_BIT; using gl::GL_ENABLE_BIT; using gl::GL_EVAL_BIT; using gl::GL_FOG_BIT; using gl::GL_FRAGMENT_SHADER_BIT; using gl::GL_FRAMEBUFFER_BARRIER_BIT; using gl::GL_GEOMETRY_SHADER_BIT; using gl::GL_HINT_BIT; using gl::GL_LIGHTING_BIT; using gl::GL_LINE_BIT; using gl::GL_LIST_BIT; using gl::GL_MAP_COHERENT_BIT; using gl::GL_MAP_FLUSH_EXPLICIT_BIT; using gl::GL_MAP_INVALIDATE_BUFFER_BIT; using gl::GL_MAP_INVALIDATE_RANGE_BIT; using gl::GL_MAP_PERSISTENT_BIT; using gl::GL_MAP_READ_BIT; using gl::GL_MAP_UNSYNCHRONIZED_BIT; using gl::GL_MAP_WRITE_BIT; using gl::GL_MULTISAMPLE_BIT; using gl::GL_NONE_BIT; using gl::GL_PIXEL_BUFFER_BARRIER_BIT; using gl::GL_PIXEL_MODE_BIT; using gl::GL_POINT_BIT; using gl::GL_POLYGON_BIT; using gl::GL_POLYGON_STIPPLE_BIT; using gl::GL_QUERY_BUFFER_BARRIER_BIT; using gl::GL_SCISSOR_BIT; using gl::GL_SHADER_IMAGE_ACCESS_BARRIER_BIT; using gl::GL_SHADER_STORAGE_BARRIER_BIT; using gl::GL_STENCIL_BUFFER_BIT; using gl::GL_SYNC_FLUSH_COMMANDS_BIT; using gl::GL_TESS_CONTROL_SHADER_BIT; using gl::GL_TESS_EVALUATION_SHADER_BIT; using gl::GL_TEXTURE_BIT; using gl::GL_TEXTURE_FETCH_BARRIER_BIT; using gl::GL_TEXTURE_UPDATE_BARRIER_BIT; using gl::GL_TRANSFORM_BIT; using gl::GL_TRANSFORM_FEEDBACK_BARRIER_BIT; using gl::GL_UNIFORM_BARRIER_BIT; using gl::GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT; using gl::GL_VERTEX_SHADER_BIT; using gl::GL_VIEWPORT_BIT; } // namespace gl46
/** * Copyright (c) 2013 Christopher Kilding * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #pragma once #include "stdafx.h" using namespace openni; class SharedDevice { private: openni::Device device; public: SharedDevice(); ~SharedDevice(); openni::Device& getDevice(); };
// // Generated by class-dump 3.5 (64 bit). // // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. // #import "NSObject.h" #import "DBGNSImageProvider.h" @class DBGDataValue, DBGNSDataForDataValueProvider, DVTObservingToken, NSData, NSImage, NSString; @interface DBGNSImageProviderForCGImage : NSObject <DBGNSImageProvider> { DBGDataValue *_dataValue; BOOL _hasImageBeenRetrieved; NSImage *_image; BOOL _wasCancelled; unsigned long long _width; unsigned long long _height; unsigned long long _bitsPerComponent; unsigned long long _bitsPerPixel; unsigned long long _bytesPerRow; NSString *_colorSpaceName; unsigned int _bitmapInfo; int _renderingIntent; NSData *_iccProfileData; DBGNSDataForDataValueProvider *_nsDataForDataValueProvider; DVTObservingToken *_nsDataForDataValueProviderObserver; DBGNSDataForDataValueProvider *_iccProfileNSDataForDataValueProvider; DVTObservingToken *_iccProfileNSDataForDataValueProviderObserver; } @property(readonly) BOOL hasImageBeenRetrieved; // @synthesize hasImageBeenRetrieved=_hasImageBeenRetrieved; @property(readonly) NSImage *image; // @synthesize image=_image; - (void).cxx_destruct; - (void)_imageWasFetched:(id)arg1; - (void)_failedToGetData; - (void)_releaseDataValue:(id)arg1; - (void)_fetchICCProfileCompletionHandler:(CDUnknownBlockType)arg1; - (void)_fetchColorSpaceName:(CDUnknownBlockType)arg1; - (void)_fetchValueFromCGFunction:(id)arg1 completionHandler:(CDUnknownBlockType)arg2; - (void)_retrieveData; - (void)_startRetrieval; - (void)cancel; - (id)initWithDataValue:(id)arg1 options:(id)arg2; // Remaining properties @property(readonly, copy) NSString *debugDescription; @property(readonly, copy) NSString *description; @property(readonly) unsigned long long hash; @property(readonly) Class superclass; @end
/******************************************************************************* CYCLOP+ brings OLED support and manual channel selection to the HobbyKing Quanum Cyclops FPV googles. The rx5808-pro and rx5808-pro-diversity projects served as a starting point for the code base, even if little of the actual code remains. Without those projects CYCLOP+ would not have been created. All possible credit goes to the two mentioned projects and their contributors. I have used wonho-makers Adafruit_SH1106 library to add support for OLED screens with an SH1106 controller. The default is to use SSD1306 OLEDs. The MIT License (MIT) Copyright (c) 2017 Kjell Kernen (Dvogonen) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ********************************************************************************/ #ifndef cyclop_plus_h #define cyclop_plus_h // The OLED I2C address may be 0x2C or 0x3C. 0x3C is almost always used //#define OLED_I2C_ADR 0x2C #define OLED_I2C_ADR 0x3C // SSD1306 and SH1106 OLED displays are supported. Select one. #define SSD1306_OLED_DRIVER //#define SH1106_OLED_DRIVER // This definition is used by the ADAFRUIT library #define OLED_128x64_ADAFRUIT_SCREENS // User Configuration Options #define FLIP_SCREEN_OPTION 0 #define BATTERY_ALARM_OPTION 1 #define ALARM_LEVEL_OPTION 2 #define BATTERY_TYPE_OPTION 3 #define BATTERY_CALIB_OPTION 4 #define SHOW_STARTSCREEN_OPTION 5 #define SAVE_SCREEN_OPTION 6 #define A_BAND_OPTION 7 #define B_BAND_OPTION 8 #define E_BAND_OPTION 9 #define F_BAND_OPTION 10 #define R_BAND_OPTION 11 #define L_BAND_OPTION 12 #define FLIP_SCREEN_DEFAULT 1 /* On */ #define BATTERY_ALARM_DEFAULT 1 /* On */ #define ALARM_LEVEL_DEFAULT 5 /* Value 1-8 */ #define BATTERY_TYPE_DEFAULT 0 /* 0=3s, 1=2s */ #define BATTERY_CALIB_DEFAULT 128 /* 0 */ #define SHOW_STARTSCREEN_DEFAULT 1 /* Yes */ #define SAVE_SCREEN_DEFAULT 0 /* No */ #define A_BAND_DEFAULT 1 /* On */ #define B_BAND_DEFAULT 1 /* On */ #define E_BAND_DEFAULT 1 /* On */ #define F_BAND_DEFAULT 1 /* On */ #define R_BAND_DEFAULT 1 /* On */ #define L_BAND_DEFAULT 1 /* On */ #define MAX_OPTIONS 13 // User Configuration Commands #define TEST_ALARM_COMMAND 13 #define RESET_SETTINGS_COMMAND 14 #define EXIT_COMMAND 15 #define MAX_COMMANDS 3 // Number of lines in configuration menu #define MAX_OPTION_LINES 7 // Delay after key click before screen save (in milli seconds) #define SAVE_SCREEN_DELAY_MS 10000 // Alarm timing constants (in milli seconds) #define ALARM_MAX_ON 50 #define ALARM_MAX_OFF 200 #define ALARM_MED_ON 100 #define ALARM_MED_OFF 1000 #define ALARM_MIN_ON 200 #define ALARM_MIN_OFF 3000 // Digital pin definitions #define SPI_CLOCK_PIN 2 #define SLAVE_SELECT_PIN 3 #define SPI_DATA_PIN 4 #define BUTTON_PIN 5 #define ALARM_PIN 6 #define LED_PIN 13 // Analog pin definitions #define VOLTAGE_METER_PIN A1 #define RSSI_PIN A6 // Minimum delay between setting a channel and trusting the RSSI values #define RSSI_STABILITY_DELAY_MS 25 // RSSI threshold for accepting a channel #define RSSI_TRESHOLD 250 // Channels in use #define CHANNEL_MIN (options[L_BAND_OPTION] ? 0 : 8) #define CHANNEL_MAX 47 //* Frequency resolutions #define SCANNING_STEP (options[L_BAND_OPTION] ? 6 : 3) // Max and Min frequencies #define FREQUENCY_MIN (options[L_BAND_OPTION] ? 5345 : 5645) #define FREQUENCY_MAX 5945 //EEPROM addresses #define EEPROM_CHANNEL 0 #define EEPROM_OPTIONS 1 #define EEPROM_CHECK (EEPROM_OPTIONS + MAX_OPTIONS) // click types #define NO_CLICK 0 #define SINGLE_CLICK 1 #define DOUBLE_CLICK 2 #define LONG_CLICK 3 #define WAKEUP_CLICK 4 // Button pins go low or high on button clicks #define BUTTON_PRESSED LOW // LED state defines #define LED_OFF LOW #define LED_ON HIGH // Release information #define VER_DATE_STRING "2017-03-13" #define VER_INFO_STRING "v1.6 by Dvogonen" #define VER_EEPROM 240 #endif // cyclop_plus_h
// // EndlessCarouselViewCell.h // EndlessCarouselView // // Created by Mark on 5/6/14. // Copyright (c) 2014 Mark Kryzhanouski. All rights reserved. // #import <UIKit/UIKit.h> @interface EndlessCarouselViewCell : UIControl { @private NSString* _text; UIFont* _font; NSUInteger _index; EndlessCarouselViewCell* __weak _nextView; EndlessCarouselViewCell* __weak _previousView; } @property (nonatomic, strong) NSString* text; @property (nonatomic, strong) UIFont* font; @property (nonatomic, strong) UIView* contentView; @property (nonatomic, assign) NSUInteger index; @property (nonatomic, weak) EndlessCarouselViewCell* nextView; @property (nonatomic, weak) EndlessCarouselViewCell* previousView; - (id)initWithFrame:(CGRect)frame andIndex:(NSUInteger)theIndex; @end
// // MapOverlayCreatorAppDelegate.h // MapOverlayCreator // // Created by Philipp Häfele on 01.02.14. // Copyright (c) 2014 Philipp Häfele. All rights reserved. // #import <UIKit/UIKit.h> @interface MapOverlayCreatorAppDelegate : UIResponder <UIApplicationDelegate> @property (strong, nonatomic) UIWindow *window; @end
// // DBChatAvatarView.h // // Copyright (c) 2015 Diana Belogrivaya. All rights reserved. // #import <UIKit/UIKit.h> @class DBChatAvatarView; typedef NS_ENUM(NSInteger, DBChatAvatarState) { DBChatAvatarStateNone, DBChatAvatarStateOffline, DBChatAvatarStateOnline }; @protocol DBChatAvatarViewDataSource <NSObject> - (NSInteger)numberOfUsersInChatAvatarView:(DBChatAvatarView *)chatAvatarView; - (DBChatAvatarState)stateForAvatarAtIndex:(NSInteger)avatarIndex inChatAvatarView:(DBChatAvatarView *)chatAvatarView; - (UIImage *)imageForAvatarAtIndex:(NSInteger)avatarIndex inChatAvatarView:(DBChatAvatarView *)chatAvatarView; @end @interface DBChatAvatarView : UIView @property (weak, nonatomic) id <DBChatAvatarViewDataSource> chatAvatarDataSource; - (void)reloadAvatars; - (void)reset; @end
#ifdef __OBJC__ #import <UIKit/UIKit.h> #else #ifndef FOUNDATION_EXPORT #if defined(__cplusplus) #define FOUNDATION_EXPORT extern "C" #else #define FOUNDATION_EXPORT extern #endif #endif #endif FOUNDATION_EXPORT double Pods_imgurupload_client_ExampleVersionNumber; FOUNDATION_EXPORT const unsigned char Pods_imgurupload_client_ExampleVersionString[];
// (C) Todd D. Vance, Deplorable Mountaineer #pragma once #include "GameFramework/NavMovementComponent.h" #include "TankMovementComponent.generated.h" class UTankTrack; /** * */ UCLASS(ClassGroup = (Custom), meta = (BlueprintSpawnableComponent)) class BATTLETANKREPRISE_API UTankMovementComponent : public UNavMovementComponent { GENERATED_BODY() public: UFUNCTION(BlueprintCallable, Category = "Input") void IntendMoveForward(float Throw); UFUNCTION(BlueprintCallable, Category = "Input") void IntendTurnRight(float Throw); UFUNCTION(BlueprintCallable, Category = "Input") void Initialize(UTankTrack* LeftTrackToSet, UTankTrack* RightTrackToSet); //TODO Check best protection private: virtual void RequestDirectMove(const FVector& MoveVelocity, bool bForceMaxSpeed) override; UTankTrack* LeftTrack = nullptr; UTankTrack* RightTrack = nullptr; };
// 自己参照構造体のテスト2 #include <stdio.h> #include <string.h> #include <stdlib.h> struct list { int value; struct list *prev; struct list *next; /* 自己参照構造体 */ }; typedef struct node Node; struct node { int value; Node *prev; Node *next; uint8_t *pixel_data; }; int main(int argc, const char * argv[]) { // insert code here... Node *node; node = (Node *)malloc(sizeof(Node)); node->value = 3; printf("%d\n",node->value); free(node); struct list *tree; tree = (struct list *)malloc(sizeof(struct list)); tree->value = 1; tree->prev = NULL; tree->next = NULL; struct list *tree2; tree2 = (struct list *)malloc(sizeof(struct list)); tree2->value = 2; tree2->prev = NULL; tree2->next = NULL; tree->next = tree2; tree2->prev = tree; struct list *p; p = tree; p = p->next; printf("%d\n",p->value); struct list *p2; p2 = p->prev; free(p); p = p2; printf("%d\n",p->value); free(p); return 0; }
typedef struct rec { /* outgoing UDP data */ u_short seq; /* sequence number */ } Rec; typedef struct timeval Timeval; typedef struct sockaddr Sockaddr; /* the following are a few definitions from Stevens' unp.h */ typedef void Sigfunc(int); /* for signal handlers */ #define max(a,b) ((a) > (b) ? (a) : (b)) /* the following are prototypes for the Stevens utilities in util.c */ char *Sock_ntop_host(const struct sockaddr *sa, socklen_t salen); void sock_set_port(struct sockaddr *sa, socklen_t salen, int port); int sock_cmp_addr(const struct sockaddr *sa1, const struct sockaddr *sa2, socklen_t salen); void tv_sub (struct timeval *out, struct timeval *in); char *icmpcode_v4(int code); Sigfunc *Signal(int signo, Sigfunc *func); void *Calloc(size_t n, size_t size); void Gettimeofday(struct timeval *tv, void *foo); void Pipe(int *fds); void Bind(int fd, const struct sockaddr *sa, socklen_t salen); void Setsockopt(int fd, int level, int optname, const void *optval, socklen_t optlen); void Sendto(int fd, const void *ptr, size_t nbytes, int flags, const struct sockaddr *sa, socklen_t salen); struct addrinfo *Host_serv(const char *host, const char *serv, int family, int socktype); ssize_t Read(int fd, void *ptr, size_t nbytes); void Write(int fd, void *ptr, size_t nbytes); ssize_t Recvfrom(int fd, void *ptr, size_t nbytes, int flags, struct sockaddr *sa, socklen_t *salenptr); void err_sys (char *fmt, ...); void err_quit (char *fmt, ...);
// Copyright 2017 jem@seethis.link // Licensed under the MIT license (http://opensource.org/licenses/MIT) #pragma once #include "core/util.h" #include "usb/util/descriptor_defs.h" #include "usb/util/requests.h" #include "usb_user_impl.h" #if USE_WEBUSB #include "usb/util/webusb.h" #endif #define USB_VERSION_ACCESS_TYPE USB_VERSION_HID_INTERFACE_3 typedef struct usb_config_desc_keyboard_t { usb_config_desc_t conf; usb_interface_desc_t intf0; usb_hid_desc_t hid0; usb_endpoint_desc_t ep1in; usb_interface_desc_t intf1; usb_hid_desc_t hid1; usb_endpoint_desc_t ep2in; usb_interface_desc_t intf2; usb_hid_desc_t hid2; usb_endpoint_desc_t ep3in; usb_interface_desc_t intf3; usb_hid_desc_t hid3; usb_endpoint_desc_t ep4in; usb_endpoint_desc_t ep4out; usb_interface_desc_t intf4; usb_hid_desc_t hid4; usb_endpoint_desc_t ep5in; #ifdef USE_WEBUSB usb_webusb_desc_t webusb; #endif } ATTR_PACKED usb_config_desc_keyboard_t; // endpoint and interface numbers #define INTERFACE_BOOT_KEYBOARD 0 #define INTERFACE_MOUSE 1 #define INTERFACE_MEDIA 2 #define INTERFACE_VENDOR 3 #define INTERFACE_NKRO_KEYBOARD 4 #define NUM_INTERFACES (INTERFACE_NKRO_KEYBOARD+1) #define EP_NUM_BOOT_KEYBOARD 1 #define EP_NUM_MOUSE 2 #define EP_NUM_MEDIA 3 #ifdef ENDPOINT_IN_OUT_SEPARATE // On some ports (atmega32u4), the USB hardware must assign IN and OUT endpoints // to separate ENDPOINT numbers. # define EP_NUM_VENDOR_IN 4 # define EP_NUM_VENDOR_OUT 5 # define EP_NUM_NKRO_KEYBOARD 6 #else # define EP_NUM_VENDOR 4 # define EP_NUM_VENDOR_IN EP_NUM_VENDOR # define EP_NUM_VENDOR_OUT EP_NUM_VENDOR # define EP_NUM_NKRO_KEYBOARD 5 #endif // endpoint sizes #define EP_SIZE_VENDOR 0x40 #define EP0_SIZE 0x40 #define EP_IN_SIZE_BOOT_KEYBOARD 0x08 #define EP_IN_SIZE_MOUSE 0x08 #define EP_IN_SIZE_MEDIA 0x08 #define EP_IN_SIZE_VENDOR EP_SIZE_VENDOR #define EP_IN_SIZE_NKRO_KEYBOARD 0x20 #define EP_OUT_SIZE_BOOT_KEYBOARD 0 #define EP_OUT_SIZE_MOUSE 0 #define EP_OUT_SIZE_MEDIA 0 #define EP_OUT_SIZE_VENDOR EP_SIZE_VENDOR #define EP_OUT_SIZE_NKRO_KEYBOARD 0 #define EP0_IN_SIZE EP0_SIZE #define EP1_IN_SIZE EP_IN_SIZE_BOOT_KEYBOARD #define EP2_IN_SIZE EP_IN_SIZE_MOUSE #define EP3_IN_SIZE EP_IN_SIZE_MEDIA #define EP4_IN_SIZE EP_IN_SIZE_VENDOR #define EP5_IN_SIZE EP_IN_SIZE_NKRO_KEYBOARD #define EP0_OUT_SIZE EP0_SIZE #define EP1_OUT_SIZE 0 #define EP2_OUT_SIZE 0 #define EP3_OUT_SIZE 0 #define EP4_OUT_SIZE EP_OUT_SIZE_VENDOR #define EP5_OUT_SIZE 0 // report intervals for enpdoints (in ms) #define REPORT_INTERVAL_BOOT_KEYBOARD 1 #define REPORT_INTERVAL_MEDIA 10 #define REPORT_INTERVAL_MOUSE 1 #define REPORT_INTERVAL_VENDOR_IN 1 #define REPORT_INTERVAL_VENDOR_OUT 1 #define REPORT_INTERVAL_NKRO_KEYBOARD 1 // report id for media report #define REPORT_ID_SYSTEM 0x01 #define REPORT_ID_CONSUMER 0x02 // report sizes (including report ID) #define REPORT_SIZE_SYSTEM 0x02 #define REPORT_SIZE_CONSUMER 0x03 #define VENDOR_REPORT_SIZE EP_SIZE_VENDOR // string descriptors #define USB_STRING_DESC_COUNT 5 #define STRING_DESC_NONE 0 #define STRING_DESC_MANUFACTURER 1 #define STRING_DESC_PRODUCT 2 #define STRING_DESC_SERIAL_NUMBER 3 extern ROM const usb_config_desc_keyboard_t usb_config_desc; extern ROM const usb_device_desc_t usb_device_desc; extern ROM const uint16_t usb_string_desc_0[2]; extern ROM const uint16_t usb_string_desc_1[8]; extern ROM const uint16_t usb_string_desc_2[]; extern ROM const uint16_t usb_string_desc_3[]; extern ROM const uint8_t sizeof_hid_desc_boot_keyboard; extern ROM const uint8_t hid_desc_boot_keyboard[]; extern ROM const uint8_t sizeof_hid_desc_media; extern ROM const uint8_t hid_desc_media[]; extern ROM const uint8_t sizeof_hid_desc_mouse; extern ROM const uint8_t hid_desc_mouse[]; extern ROM const uint8_t sizeof_hid_desc_vendor; extern ROM const uint8_t hid_desc_vendor[]; extern ROM const uint8_t sizeof_hid_desc_nkro_keyboard; extern ROM const uint8_t hid_desc_nkro_keyboard[]; void usb_ep0_packetizer_data_set(const ROM uint8_t *data, uint16_t size); void usb_ep0_packetizer_data_send(void); void usb_get_descriptor(const XRAM usb_request_t *request);
#pragma once #include "ofMain.h" #include "ImgAnalysisThread.h" class ofApp : public ofBaseApp{ public: void setup(); void update(); void draw(); void keyPressed(int key); void keyReleased(int key); void mouseMoved(int x, int y ); void mouseDragged(int x, int y, int button); void mousePressed(int x, int y, int button); void mouseReleased(int x, int y, int button); void mouseEntered(int x, int y); void mouseExited(int x, int y); void windowResized(int w, int h); void dragEvent(ofDragInfo dragInfo); void gotMessage(ofMessage msg); ofVideoGrabber grabber; ImgAnalysisThread analyzer; };