hexsha
stringlengths
40
40
size
int64
5
1.05M
ext
stringclasses
588 values
lang
stringclasses
305 values
max_stars_repo_path
stringlengths
3
363
max_stars_repo_name
stringlengths
5
118
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
float64
1
191k
max_stars_repo_stars_event_min_datetime
stringdate
2015-01-01 00:00:35
2022-03-31 23:43:49
max_stars_repo_stars_event_max_datetime
stringdate
2015-01-01 12:37:38
2022-03-31 23:59:52
max_issues_repo_path
stringlengths
3
363
max_issues_repo_name
stringlengths
5
118
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
float64
1
134k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
3
363
max_forks_repo_name
stringlengths
5
135
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
float64
1
105k
max_forks_repo_forks_event_min_datetime
stringdate
2015-01-01 00:01:02
2022-03-31 23:27:27
max_forks_repo_forks_event_max_datetime
stringdate
2015-01-03 08:55:07
2022-03-31 23:59:24
content
stringlengths
5
1.05M
avg_line_length
float64
1.13
1.04M
max_line_length
int64
1
1.05M
alphanum_fraction
float64
0
1
09c356d2bb8c941f6b2d2a647eae5499035209d1
12,530
h
C
ScrapCalc/Shared/Libraries/chilkat-9.5.0-ios/include/CkoXml.h
hamza1216/metalcalc-ios
57f83a0a614ca4d024e706d253df3246c0e3a301
[ "MIT" ]
null
null
null
ScrapCalc/Shared/Libraries/chilkat-9.5.0-ios/include/CkoXml.h
hamza1216/metalcalc-ios
57f83a0a614ca4d024e706d253df3246c0e3a301
[ "MIT" ]
null
null
null
ScrapCalc/Shared/Libraries/chilkat-9.5.0-ios/include/CkoXml.h
hamza1216/metalcalc-ios
57f83a0a614ca4d024e706d253df3246c0e3a301
[ "MIT" ]
null
null
null
// Chilkat Objective-C header. // This is a generated header file for Chilkat version 9.5.0.26 // Generic/internal class name = Xml // Wrapped Chilkat C++ class name = CkXml @interface CkoXml : NSObject { @private void *m_obj; } - (id)init; - (void)dealloc; - (void)dispose; - (NSString *)stringWithUtf8: (const char *)s; - (void *)CppImplObj; - (void)setCppImplObj: (void *)pObj; // property getter: Cdata - (BOOL)Cdata; // property setter: Cdata - (void)setCdata: (BOOL)boolVal; // property getter: Content - (NSString *)Content; // property setter: Content - (void)setContent: (NSString *)input; // property getter: ContentInt - (NSNumber *)ContentInt; // property setter: ContentInt - (void)setContentInt: (NSNumber *)intVal; // property getter: DebugLogFilePath - (NSString *)DebugLogFilePath; // property setter: DebugLogFilePath - (void)setDebugLogFilePath: (NSString *)input; // property getter: DocType - (NSString *)DocType; // property setter: DocType - (void)setDocType: (NSString *)input; // property getter: EmitXmlDecl - (BOOL)EmitXmlDecl; // property setter: EmitXmlDecl - (void)setEmitXmlDecl: (BOOL)boolVal; // property getter: Encoding - (NSString *)Encoding; // property setter: Encoding - (void)setEncoding: (NSString *)input; // property getter: LastErrorHtml - (NSString *)LastErrorHtml; // property getter: LastErrorText - (NSString *)LastErrorText; // property getter: LastErrorXml - (NSString *)LastErrorXml; // property getter: NumAttributes - (NSNumber *)NumAttributes; // property getter: NumChildren - (NSNumber *)NumChildren; // property getter: SortCaseInsensitive - (BOOL)SortCaseInsensitive; // property setter: SortCaseInsensitive - (void)setSortCaseInsensitive: (BOOL)boolVal; // property getter: Standalone - (BOOL)Standalone; // property setter: Standalone - (void)setStandalone: (BOOL)boolVal; // property getter: Tag - (NSString *)Tag; // property setter: Tag - (void)setTag: (NSString *)input; // property getter: TreeId - (NSNumber *)TreeId; // property getter: VerboseLogging - (BOOL)VerboseLogging; // property setter: VerboseLogging - (void)setVerboseLogging: (BOOL)boolVal; // property getter: Version - (NSString *)Version; // method: AccumulateTagContent - (NSString *)AccumulateTagContent: (NSString *)tag skipTags: (NSString *)skipTags; // method: AddAttribute - (BOOL)AddAttribute: (NSString *)name value: (NSString *)value; // method: AddAttributeInt - (BOOL)AddAttributeInt: (NSString *)name value: (NSNumber *)value; // method: AddChildTree - (BOOL)AddChildTree: (CkoXml *)tree; // method: AddOrUpdateAttribute - (void)AddOrUpdateAttribute: (NSString *)name value: (NSString *)value; // method: AddOrUpdateAttributeI - (void)AddOrUpdateAttributeI: (NSString *)name value: (NSNumber *)value; // method: AddStyleSheet - (void)AddStyleSheet: (NSString *)styleSheet; // method: AddToAttribute - (void)AddToAttribute: (NSString *)name amount: (NSNumber *)amount; // method: AddToChildContent - (void)AddToChildContent: (NSString *)tag amount: (NSNumber *)amount; // method: AddToContent - (void)AddToContent: (NSNumber *)amount; // method: AppendToContent - (BOOL)AppendToContent: (NSString *)str; // method: BEncodeContent - (BOOL)BEncodeContent: (NSString *)charset db: (NSData *)db; // method: ChildContentMatches - (BOOL)ChildContentMatches: (NSString *)tag pattern: (NSString *)pattern caseSensitive: (BOOL)caseSensitive; // method: ChilkatPath - (NSString *)ChilkatPath: (NSString *)cmd; // method: Clear - (BOOL)Clear; // method: ContentMatches - (BOOL)ContentMatches: (NSString *)pattern caseSensitive: (BOOL)caseSensitive; // method: Copy - (void)Copy: (CkoXml *)node; // method: CopyRef - (void)CopyRef: (CkoXml *)node; // method: DecodeContent - (NSData *)DecodeContent; // method: DecodeEntities - (NSString *)DecodeEntities: (NSString *)str; // method: DecryptContent - (BOOL)DecryptContent: (NSString *)password; // method: EncryptContent - (BOOL)EncryptContent: (NSString *)password; // method: ExtractChildByIndex - (CkoXml *)ExtractChildByIndex: (NSNumber *)index; // method: ExtractChildByName - (CkoXml *)ExtractChildByName: (NSString *)tag attrName: (NSString *)attrName attrValue: (NSString *)attrValue; // method: FindChild - (CkoXml *)FindChild: (NSString *)tag; // method: FindChild2 - (BOOL)FindChild2: (NSString *)tag; // method: FindNextRecord - (CkoXml *)FindNextRecord: (NSString *)tag contentPattern: (NSString *)contentPattern; // method: FindOrAddNewChild - (CkoXml *)FindOrAddNewChild: (NSString *)tag; // method: FirstChild - (CkoXml *)FirstChild; // method: FirstChild2 - (BOOL)FirstChild2; // method: GetAttrValue - (NSString *)GetAttrValue: (NSString *)name; // method: GetAttrValueInt - (NSNumber *)GetAttrValueInt: (NSString *)name; // method: GetAttributeName - (NSString *)GetAttributeName: (NSNumber *)index; // method: GetAttributeValue - (NSString *)GetAttributeValue: (NSNumber *)index; // method: GetAttributeValueInt - (NSNumber *)GetAttributeValueInt: (NSNumber *)index; // method: GetBinaryContent - (NSData *)GetBinaryContent: (BOOL)unzipFlag decryptFlag: (BOOL)decryptFlag password: (NSString *)password; // method: GetChild - (CkoXml *)GetChild: (NSNumber *)index; // method: GetChild2 - (BOOL)GetChild2: (NSNumber *)index; // method: GetChildBoolValue - (BOOL)GetChildBoolValue: (NSString *)tag; // method: GetChildContent - (NSString *)GetChildContent: (NSString *)tag; // method: GetChildContentByIndex - (NSString *)GetChildContentByIndex: (NSNumber *)index; // method: GetChildExact - (CkoXml *)GetChildExact: (NSString *)tag content: (NSString *)content; // method: GetChildIntValue - (NSNumber *)GetChildIntValue: (NSString *)tag; // method: GetChildTag - (NSString *)GetChildTag: (NSNumber *)index; // method: GetChildTagByIndex - (NSString *)GetChildTagByIndex: (NSNumber *)index; // method: GetChildWithAttr - (CkoXml *)GetChildWithAttr: (NSString *)tag attrName: (NSString *)attrName attrValue: (NSString *)attrValue; // method: GetChildWithContent - (CkoXml *)GetChildWithContent: (NSString *)content; // method: GetChildWithTag - (CkoXml *)GetChildWithTag: (NSString *)tag; // method: GetNthChildWithTag - (CkoXml *)GetNthChildWithTag: (NSString *)tag n: (NSNumber *)n; // method: GetNthChildWithTag2 - (BOOL)GetNthChildWithTag2: (NSString *)tag n: (NSNumber *)n; // method: GetParent - (CkoXml *)GetParent; // method: GetParent2 - (BOOL)GetParent2; // method: GetRoot - (CkoXml *)GetRoot; // method: GetRoot2 - (void)GetRoot2; // method: GetSelf - (CkoXml *)GetSelf; // method: GetXml - (NSString *)GetXml; // method: HasAttrWithValue - (BOOL)HasAttrWithValue: (NSString *)name value: (NSString *)value; // method: HasAttribute - (BOOL)HasAttribute: (NSString *)name; // method: HasChildWithContent - (BOOL)HasChildWithContent: (NSString *)content; // method: HasChildWithTag - (BOOL)HasChildWithTag: (NSString *)tag; // method: HasChildWithTagAndContent - (BOOL)HasChildWithTagAndContent: (NSString *)tag content: (NSString *)content; // method: InsertChildTreeAfter - (BOOL)InsertChildTreeAfter: (NSNumber *)index tree: (CkoXml *)tree; // method: InsertChildTreeBefore - (BOOL)InsertChildTreeBefore: (NSNumber *)index tree: (CkoXml *)tree; // method: LastChild - (CkoXml *)LastChild; // method: LastChild2 - (BOOL)LastChild2; // method: LoadXml - (BOOL)LoadXml: (NSString *)xmlData; // method: LoadXml2 - (BOOL)LoadXml2: (NSString *)xmlData autoTrim: (BOOL)autoTrim; // method: LoadXmlFile - (BOOL)LoadXmlFile: (NSString *)path; // method: LoadXmlFile2 - (BOOL)LoadXmlFile2: (NSString *)path autoTrim: (BOOL)autoTrim; // method: NewChild - (CkoXml *)NewChild: (NSString *)tag content: (NSString *)content; // method: NewChild2 - (void)NewChild2: (NSString *)tag content: (NSString *)content; // method: NewChildAfter - (CkoXml *)NewChildAfter: (NSNumber *)index tag: (NSString *)tag content: (NSString *)content; // method: NewChildBefore - (CkoXml *)NewChildBefore: (NSNumber *)index tag: (NSString *)tag content: (NSString *)content; // method: NewChildInt2 - (void)NewChildInt2: (NSString *)tag value: (NSNumber *)value; // method: NextSibling - (CkoXml *)NextSibling; // method: NextSibling2 - (BOOL)NextSibling2; // method: NumChildrenHavingTag - (NSNumber *)NumChildrenHavingTag: (NSString *)tag; // method: PreviousSibling - (CkoXml *)PreviousSibling; // method: PreviousSibling2 - (BOOL)PreviousSibling2; // method: QEncodeContent - (BOOL)QEncodeContent: (NSString *)charset db: (NSData *)db; // method: RemoveAllAttributes - (BOOL)RemoveAllAttributes; // method: RemoveAllChildren - (void)RemoveAllChildren; // method: RemoveAttribute - (BOOL)RemoveAttribute: (NSString *)name; // method: RemoveChild - (void)RemoveChild: (NSString *)tag; // method: RemoveChildByIndex - (void)RemoveChildByIndex: (NSNumber *)index; // method: RemoveChildWithContent - (void)RemoveChildWithContent: (NSString *)content; // method: RemoveFromTree - (void)RemoveFromTree; // method: SaveBinaryContent - (BOOL)SaveBinaryContent: (NSString *)path unzipFlag: (BOOL)unzipFlag decryptFlag: (BOOL)decryptFlag password: (NSString *)password; // method: SaveLastError - (BOOL)SaveLastError: (NSString *)path; // method: SaveXml - (BOOL)SaveXml: (NSString *)path; // method: SearchAllForContent - (CkoXml *)SearchAllForContent: (CkoXml *)after contentPattern: (NSString *)contentPattern; // method: SearchAllForContent2 - (BOOL)SearchAllForContent2: (CkoXml *)after contentPattern: (NSString *)contentPattern; // method: SearchForAttribute - (CkoXml *)SearchForAttribute: (CkoXml *)after tag: (NSString *)tag attr: (NSString *)attr valuePattern: (NSString *)valuePattern; // method: SearchForAttribute2 - (BOOL)SearchForAttribute2: (CkoXml *)after tag: (NSString *)tag attr: (NSString *)attr valuePattern: (NSString *)valuePattern; // method: SearchForContent - (CkoXml *)SearchForContent: (CkoXml *)after tag: (NSString *)tag contentPattern: (NSString *)contentPattern; // method: SearchForContent2 - (BOOL)SearchForContent2: (CkoXml *)after tag: (NSString *)tag contentPattern: (NSString *)contentPattern; // method: SearchForTag - (CkoXml *)SearchForTag: (CkoXml *)after tag: (NSString *)tag; // method: SearchForTag2 - (BOOL)SearchForTag2: (CkoXml *)after tag: (NSString *)tag; // method: SetBinaryContent - (BOOL)SetBinaryContent: (NSData *)data zipFlag: (BOOL)zipFlag encryptFlag: (BOOL)encryptFlag password: (NSString *)password; // method: SetBinaryContent2 - (BOOL)SetBinaryContent2: (NSData *)pByteData szByteData: (NSNumber *)szByteData zipFlag: (BOOL)zipFlag encryptFlag: (BOOL)encryptFlag password: (NSString *)password; // method: SetBinaryContentFromFile - (BOOL)SetBinaryContentFromFile: (NSString *)path zipFlag: (BOOL)zipFlag encryptFlag: (BOOL)encryptFlag password: (NSString *)password; // method: SortByAttribute - (void)SortByAttribute: (NSString *)attrName ascending: (BOOL)ascending; // method: SortByAttributeInt - (void)SortByAttributeInt: (NSString *)attrName ascending: (BOOL)ascending; // method: SortByContent - (void)SortByContent: (BOOL)ascending; // method: SortByTag - (void)SortByTag: (BOOL)ascending; // method: SortRecordsByAttribute - (void)SortRecordsByAttribute: (NSString *)sortTag attrName: (NSString *)attrName ascending: (BOOL)ascending; // method: SortRecordsByContent - (void)SortRecordsByContent: (NSString *)sortTag ascending: (BOOL)ascending; // method: SortRecordsByContentInt - (void)SortRecordsByContentInt: (NSString *)sortTag ascending: (BOOL)ascending; // method: SwapNode - (BOOL)SwapNode: (CkoXml *)node; // method: SwapTree - (BOOL)SwapTree: (CkoXml *)tree; // method: TagContent - (NSString *)TagContent: (NSString *)tag; // method: TagEquals - (BOOL)TagEquals: (NSString *)tag; // method: UnzipContent - (BOOL)UnzipContent; // method: UnzipTree - (BOOL)UnzipTree; // method: UpdateAttribute - (BOOL)UpdateAttribute: (NSString *)attrName attrValue: (NSString *)attrValue; // method: UpdateAttributeInt - (BOOL)UpdateAttributeInt: (NSString *)attrName value: (NSNumber *)value; // method: UpdateChildContent - (void)UpdateChildContent: (NSString *)tag value: (NSString *)value; // method: UpdateChildContentInt - (void)UpdateChildContentInt: (NSString *)tag value: (NSNumber *)value; // method: ZipContent - (BOOL)ZipContent; // method: ZipTree - (BOOL)ZipTree; @end
23.033088
63
0.724342
8ca2f9750217155432cc7984bc305a8a907a616e
5,541
h
C
clients/cpp-pistache-server/generated/impl/PipelineExecutionApiImpl.h
shinesolutions/cloudmanager-api-clients
d73a25878f6cc57af954362ba8dccc90d54e6131
[ "Apache-2.0" ]
3
2020-06-23T05:31:52.000Z
2020-11-26T05:34:57.000Z
clients/cpp-pistache-server/generated/impl/PipelineExecutionApiImpl.h
shinesolutions/cloudmanager-api-clients
d73a25878f6cc57af954362ba8dccc90d54e6131
[ "Apache-2.0" ]
2
2021-01-21T01:19:54.000Z
2021-12-09T22:30:22.000Z
clients/cpp-pistache-server/generated/impl/PipelineExecutionApiImpl.h
shinesolutions/cloudmanager-api-clients
d73a25878f6cc57af954362ba8dccc90d54e6131
[ "Apache-2.0" ]
1
2020-11-18T11:48:13.000Z
2020-11-18T11:48:13.000Z
/** * Cloud Manager API * This API allows access to Cloud Manager programs, pipelines, and environments by an authorized technical account created through the Adobe I/O Console. The base url for this API is https://cloudmanager.adobe.io, e.g. to get the list of programs for an organization, you would make a GET request to https://cloudmanager.adobe.io/api/programs (with the correct set of headers as described below). This swagger file can be downloaded from https://raw.githubusercontent.com/AdobeDocs/cloudmanager-api-docs/master/swagger-specs/api.yaml. * * The version of the OpenAPI document: 1.0.0 * Contact: opensource@shinesolutions.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /* * PipelineExecutionApiImpl.h * * */ #ifndef PIPELINE_EXECUTION_API_IMPL_H_ #define PIPELINE_EXECUTION_API_IMPL_H_ #include <pistache/endpoint.h> #include <pistache/http.h> #include <pistache/router.h> #include <memory> #include <PipelineExecutionApi.h> #include <pistache/optional.h> #include "PipelineExecution.h" #include "PipelineExecutionListRepresentation.h" #include "PipelineExecutionStepState.h" #include "PipelineStepMetrics.h" #include <string> namespace org { namespace openapitools { namespace server { namespace api { using namespace org::openapitools::server::model; class PipelineExecutionApiImpl : public org::openapitools::server::api::PipelineExecutionApi { public: PipelineExecutionApiImpl(std::shared_ptr<Pistache::Rest::Router>); ~PipelineExecutionApiImpl() {} void advance_pipeline_execution(const std::string &programId, const std::string &pipelineId, const std::string &executionId, const std::string &phaseId, const std::string &stepId, const Pistache::Optional<Pistache::Http::Header::Raw> &xGwImsOrgId, const Pistache::Optional<Pistache::Http::Header::Raw> &authorization, const Pistache::Optional<Pistache::Http::Header::Raw> &xApiKey, const Pistache::Optional<Pistache::Http::Header::Raw> &contentType, const Object &body, Pistache::Http::ResponseWriter &response); void cancel_pipeline_execution_step(const std::string &programId, const std::string &pipelineId, const std::string &executionId, const std::string &phaseId, const std::string &stepId, const Pistache::Optional<Pistache::Http::Header::Raw> &xGwImsOrgId, const Pistache::Optional<Pistache::Http::Header::Raw> &authorization, const Pistache::Optional<Pistache::Http::Header::Raw> &xApiKey, const Pistache::Optional<Pistache::Http::Header::Raw> &contentType, const Object &body, Pistache::Http::ResponseWriter &response); void get_current_execution(const std::string &programId, const std::string &pipelineId, const Pistache::Optional<Pistache::Http::Header::Raw> &xGwImsOrgId, const Pistache::Optional<Pistache::Http::Header::Raw> &authorization, const Pistache::Optional<Pistache::Http::Header::Raw> &xApiKey, Pistache::Http::ResponseWriter &response); void get_execution(const std::string &programId, const std::string &pipelineId, const std::string &executionId, const Pistache::Optional<Pistache::Http::Header::Raw> &xGwImsOrgId, const Pistache::Optional<Pistache::Http::Header::Raw> &authorization, const Pistache::Optional<Pistache::Http::Header::Raw> &xApiKey, Pistache::Http::ResponseWriter &response); void get_executions(const std::string &programId, const std::string &pipelineId, const Pistache::Optional<Pistache::Http::Header::Raw> &xGwImsOrgId, const Pistache::Optional<Pistache::Http::Header::Raw> &authorization, const Pistache::Optional<Pistache::Http::Header::Raw> &xApiKey, const Pistache::Optional<std::string> &start, const Pistache::Optional<int32_t> &limit, Pistache::Http::ResponseWriter &response); void get_step_logs(const std::string &programId, const std::string &pipelineId, const std::string &executionId, const std::string &phaseId, const std::string &stepId, const Pistache::Optional<Pistache::Http::Header::Raw> &xGwImsOrgId, const Pistache::Optional<Pistache::Http::Header::Raw> &authorization, const Pistache::Optional<Pistache::Http::Header::Raw> &xApiKey, const Pistache::Optional<std::string> &file, const Pistache::Optional<Pistache::Http::Header::Raw> &accept, Pistache::Http::ResponseWriter &response); void start_pipeline(const std::string &programId, const std::string &pipelineId, const Pistache::Optional<Pistache::Http::Header::Raw> &xGwImsOrgId, const Pistache::Optional<Pistache::Http::Header::Raw> &authorization, const Pistache::Optional<Pistache::Http::Header::Raw> &xApiKey, const Pistache::Optional<Pistache::Http::Header::Raw> &contentType, Pistache::Http::ResponseWriter &response); void step_metric(const std::string &programId, const std::string &pipelineId, const std::string &executionId, const std::string &phaseId, const std::string &stepId, const Pistache::Optional<Pistache::Http::Header::Raw> &xGwImsOrgId, const Pistache::Optional<Pistache::Http::Header::Raw> &authorization, const Pistache::Optional<Pistache::Http::Header::Raw> &xApiKey, Pistache::Http::ResponseWriter &response); void step_state(const std::string &programId, const std::string &pipelineId, const std::string &executionId, const std::string &phaseId, const std::string &stepId, const Pistache::Optional<Pistache::Http::Header::Raw> &xGwImsOrgId, const Pistache::Optional<Pistache::Http::Header::Raw> &authorization, const Pistache::Optional<Pistache::Http::Header::Raw> &xApiKey, Pistache::Http::ResponseWriter &response); }; } } } } #endif
80.304348
534
0.775311
87d5d3b6d14a1a0360c0c230feff16a048e5619b
281
c
C
test/context.c
marcelo-gonzalez/libexchg
8429c9384dd09e59e147442b2bdc486b151fa5ae
[ "MIT" ]
1
2021-12-29T21:41:14.000Z
2021-12-29T21:41:14.000Z
test/context.c
marcelo-gonzalez/libexchg
8429c9384dd09e59e147442b2bdc486b151fa5ae
[ "MIT" ]
null
null
null
test/context.c
marcelo-gonzalez/libexchg
8429c9384dd09e59e147442b2bdc486b151fa5ae
[ "MIT" ]
null
null
null
#include "client.h" struct exchg_net_context *exchg_test_net_ctx(struct exchg_context *ctx) { return ctx->net_context; } struct exchg_context *exchg_test_new(struct exchg_callbacks *c, const struct exchg_options *opts, void *user) { return exchg_new(c, opts, user); }
25.545455
73
0.754448
560356a77bf501f6c164a5207306886e15dbbc62
26,933
h
C
Extras/vectormathlibrary/include/vectormath/spu/c/vec_soa_v.h
tizenorg/platform.upstream.libbullet
eb6918d59f661c0e5b469d6e007f91a82d46a302
[ "Zlib" ]
32
2016-05-22T23:09:19.000Z
2022-03-13T03:32:27.000Z
Common_3/ThirdParty/OpenSource/BulletPhysics/2.77/Extras/vectormathlibrary/include/vectormath/spu/c/vec_soa_v.h
guillaumeblanc/The-Forge
0df6d608ed7ec556f17b91a749e2f19d75973dc9
[ "Apache-2.0" ]
4
2015-07-05T21:09:37.000Z
2019-09-06T14:34:59.000Z
Common_3/ThirdParty/OpenSource/BulletPhysics/2.77/Extras/vectormathlibrary/include/vectormath/spu/c/vec_soa_v.h
guillaumeblanc/The-Forge
0df6d608ed7ec556f17b91a749e2f19d75973dc9
[ "Apache-2.0" ]
17
2016-05-27T11:01:42.000Z
2022-03-13T03:32:30.000Z
/* Copyright (C) 2006, 2007 Sony Computer Entertainment Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the Sony Computer Entertainment Inc nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef _VECTORMATH_VEC_SOA_V_C_H #define _VECTORMATH_VEC_SOA_V_C_H #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /*----------------------------------------------------------------------------- * Constants * for shuffles, words are labeled [x,y,z,w] [a,b,c,d] */ #define _VECTORMATH_SHUF_X 0x00010203 #define _VECTORMATH_SHUF_Y 0x04050607 #define _VECTORMATH_SHUF_Z 0x08090a0b #define _VECTORMATH_SHUF_W 0x0c0d0e0f #define _VECTORMATH_SHUF_A 0x10111213 #define _VECTORMATH_SHUF_B 0x14151617 #define _VECTORMATH_SHUF_C 0x18191a1b #define _VECTORMATH_SHUF_D 0x1c1d1e1f #define _VECTORMATH_SHUF_0 0x80808080 #define _VECTORMATH_SHUF_XAYB ((vec_uchar16)(vec_uint4){ _VECTORMATH_SHUF_X, _VECTORMATH_SHUF_A, _VECTORMATH_SHUF_Y, _VECTORMATH_SHUF_B }) #define _VECTORMATH_SHUF_ZCWD ((vec_uchar16)(vec_uint4){ _VECTORMATH_SHUF_Z, _VECTORMATH_SHUF_C, _VECTORMATH_SHUF_W, _VECTORMATH_SHUF_D }) #define _VECTORMATH_SHUF_ZBW0 ((vec_uchar16)(vec_uint4){ _VECTORMATH_SHUF_Z, _VECTORMATH_SHUF_B, _VECTORMATH_SHUF_W, _VECTORMATH_SHUF_0 }) #define _VECTORMATH_SHUF_XCY0 ((vec_uchar16)(vec_uint4){ _VECTORMATH_SHUF_X, _VECTORMATH_SHUF_C, _VECTORMATH_SHUF_Y, _VECTORMATH_SHUF_0 }) #define _VECTORMATH_SHUF_ZDW0 ((vec_uchar16)(vec_uint4){ _VECTORMATH_SHUF_Z, _VECTORMATH_SHUF_D, _VECTORMATH_SHUF_W, _VECTORMATH_SHUF_0 }) #define _VECTORMATH_SHUF_XAZC ((vec_uchar16)(vec_uint4){ _VECTORMATH_SHUF_X, _VECTORMATH_SHUF_A, _VECTORMATH_SHUF_Z, _VECTORMATH_SHUF_C }) #define _VECTORMATH_SHUF_ZDXB ((vec_uchar16)(vec_uint4){ _VECTORMATH_SHUF_Z, _VECTORMATH_SHUF_D, _VECTORMATH_SHUF_X, _VECTORMATH_SHUF_B }) #define _VECTORMATH_SHUF_YBWD ((vec_uchar16)(vec_uint4){ _VECTORMATH_SHUF_Y, _VECTORMATH_SHUF_B, _VECTORMATH_SHUF_W, _VECTORMATH_SHUF_D }) #define _VECTORMATH_SHUF_XDZB ((vec_uchar16)(vec_uint4){ _VECTORMATH_SHUF_X, _VECTORMATH_SHUF_D, _VECTORMATH_SHUF_Z, _VECTORMATH_SHUF_B }) #define _VECTORMATH_SHUF_YAWC ((vec_uchar16)(vec_uint4){ _VECTORMATH_SHUF_Y, _VECTORMATH_SHUF_A, _VECTORMATH_SHUF_W, _VECTORMATH_SHUF_C }) #define _VECTORMATH_SHUF_ZBXD ((vec_uchar16)(vec_uint4){ _VECTORMATH_SHUF_Z, _VECTORMATH_SHUF_B, _VECTORMATH_SHUF_X, _VECTORMATH_SHUF_D }) #define _VECTORMATH_SHUF_XYCD ((vec_uchar16)(vec_uint4){ _VECTORMATH_SHUF_X, _VECTORMATH_SHUF_Y, _VECTORMATH_SHUF_C, _VECTORMATH_SHUF_D }) #define _VECTORMATH_SLERP_TOL 0.999f /*----------------------------------------------------------------------------- * Definitions */ #ifndef _VECTORMATH_INTERNAL_FUNCTIONS #define _VECTORMATH_INTERNAL_FUNCTIONS #endif static inline VmathSoaVector3 vmathSoaV3MakeFromElems_V( vec_float4 _x, vec_float4 _y, vec_float4 _z ) { VmathSoaVector3 result; vmathSoaV3MakeFromElems(&result, _x, _y, _z); return result; } static inline VmathSoaVector3 vmathSoaV3MakeFromP3_V( VmathSoaPoint3 pnt ) { VmathSoaVector3 result; vmathSoaV3MakeFromP3(&result, &pnt); return result; } static inline VmathSoaVector3 vmathSoaV3MakeFromScalar_V( vec_float4 scalar ) { VmathSoaVector3 result; vmathSoaV3MakeFromScalar(&result, scalar); return result; } static inline VmathSoaVector3 vmathSoaV3MakeFromAos_V( VmathVector3 vec ) { VmathSoaVector3 result; vmathSoaV3MakeFromAos(&result, &vec); return result; } static inline VmathSoaVector3 vmathSoaV3MakeFrom4Aos_V( VmathVector3 vec0, VmathVector3 vec1, VmathVector3 vec2, VmathVector3 vec3 ) { VmathSoaVector3 result; vmathSoaV3MakeFrom4Aos(&result, &vec0, &vec1, &vec2, &vec3); return result; } static inline VmathSoaVector3 vmathSoaV3MakeXAxis_V( ) { VmathSoaVector3 result; vmathSoaV3MakeXAxis(&result); return result; } static inline VmathSoaVector3 vmathSoaV3MakeYAxis_V( ) { VmathSoaVector3 result; vmathSoaV3MakeYAxis(&result); return result; } static inline VmathSoaVector3 vmathSoaV3MakeZAxis_V( ) { VmathSoaVector3 result; vmathSoaV3MakeZAxis(&result); return result; } static inline VmathSoaVector3 vmathSoaV3Lerp_V( vec_float4 t, VmathSoaVector3 vec0, VmathSoaVector3 vec1 ) { VmathSoaVector3 result; vmathSoaV3Lerp(&result, t, &vec0, &vec1); return result; } static inline VmathSoaVector3 vmathSoaV3Slerp_V( vec_float4 t, VmathSoaVector3 unitVec0, VmathSoaVector3 unitVec1 ) { VmathSoaVector3 result; vmathSoaV3Slerp(&result, t, &unitVec0, &unitVec1); return result; } static inline void vmathSoaV3Get4Aos_V( VmathSoaVector3 vec, VmathVector3 *result0, VmathVector3 *result1, VmathVector3 *result2, VmathVector3 *result3 ) { vmathSoaV3Get4Aos(&vec, result0, result1, result2, result3); } static inline void vmathSoaV3LoadXYZArray_V( VmathSoaVector3 *vec, const vec_float4 *threeQuads ) { vmathSoaV3LoadXYZArray(vec, threeQuads); } static inline void vmathSoaV3StoreXYZArray_V( VmathSoaVector3 vec, vec_float4 *threeQuads ) { vmathSoaV3StoreXYZArray(&vec, threeQuads); } static inline void vmathSoaV3StoreHalfFloats_V( VmathSoaVector3 vec0, VmathSoaVector3 vec1, vec_ushort8 *threeQuads ) { vmathSoaV3StoreHalfFloats(&vec0, &vec1, threeQuads); } static inline void vmathSoaV3SetX_V( VmathSoaVector3 *result, vec_float4 _x ) { vmathSoaV3SetX(result, _x); } static inline vec_float4 vmathSoaV3GetX_V( VmathSoaVector3 vec ) { return vmathSoaV3GetX(&vec); } static inline void vmathSoaV3SetY_V( VmathSoaVector3 *result, vec_float4 _y ) { vmathSoaV3SetY(result, _y); } static inline vec_float4 vmathSoaV3GetY_V( VmathSoaVector3 vec ) { return vmathSoaV3GetY(&vec); } static inline void vmathSoaV3SetZ_V( VmathSoaVector3 *result, vec_float4 _z ) { vmathSoaV3SetZ(result, _z); } static inline vec_float4 vmathSoaV3GetZ_V( VmathSoaVector3 vec ) { return vmathSoaV3GetZ(&vec); } static inline void vmathSoaV3SetElem_V( VmathSoaVector3 *result, int idx, vec_float4 value ) { vmathSoaV3SetElem(result, idx, value); } static inline vec_float4 vmathSoaV3GetElem_V( VmathSoaVector3 vec, int idx ) { return vmathSoaV3GetElem(&vec, idx); } static inline VmathSoaVector3 vmathSoaV3Add_V( VmathSoaVector3 vec0, VmathSoaVector3 vec1 ) { VmathSoaVector3 result; vmathSoaV3Add(&result, &vec0, &vec1); return result; } static inline VmathSoaVector3 vmathSoaV3Sub_V( VmathSoaVector3 vec0, VmathSoaVector3 vec1 ) { VmathSoaVector3 result; vmathSoaV3Sub(&result, &vec0, &vec1); return result; } static inline VmathSoaPoint3 vmathSoaV3AddP3_V( VmathSoaVector3 vec, VmathSoaPoint3 pnt1 ) { VmathSoaPoint3 result; vmathSoaV3AddP3(&result, &vec, &pnt1); return result; } static inline VmathSoaVector3 vmathSoaV3ScalarMul_V( VmathSoaVector3 vec, vec_float4 scalar ) { VmathSoaVector3 result; vmathSoaV3ScalarMul(&result, &vec, scalar); return result; } static inline VmathSoaVector3 vmathSoaV3ScalarDiv_V( VmathSoaVector3 vec, vec_float4 scalar ) { VmathSoaVector3 result; vmathSoaV3ScalarDiv(&result, &vec, scalar); return result; } static inline VmathSoaVector3 vmathSoaV3Neg_V( VmathSoaVector3 vec ) { VmathSoaVector3 result; vmathSoaV3Neg(&result, &vec); return result; } static inline VmathSoaVector3 vmathSoaV3MulPerElem_V( VmathSoaVector3 vec0, VmathSoaVector3 vec1 ) { VmathSoaVector3 result; vmathSoaV3MulPerElem(&result, &vec0, &vec1); return result; } static inline VmathSoaVector3 vmathSoaV3DivPerElem_V( VmathSoaVector3 vec0, VmathSoaVector3 vec1 ) { VmathSoaVector3 result; vmathSoaV3DivPerElem(&result, &vec0, &vec1); return result; } static inline VmathSoaVector3 vmathSoaV3RecipPerElem_V( VmathSoaVector3 vec ) { VmathSoaVector3 result; vmathSoaV3RecipPerElem(&result, &vec); return result; } static inline VmathSoaVector3 vmathSoaV3SqrtPerElem_V( VmathSoaVector3 vec ) { VmathSoaVector3 result; vmathSoaV3SqrtPerElem(&result, &vec); return result; } static inline VmathSoaVector3 vmathSoaV3RsqrtPerElem_V( VmathSoaVector3 vec ) { VmathSoaVector3 result; vmathSoaV3RsqrtPerElem(&result, &vec); return result; } static inline VmathSoaVector3 vmathSoaV3AbsPerElem_V( VmathSoaVector3 vec ) { VmathSoaVector3 result; vmathSoaV3AbsPerElem(&result, &vec); return result; } static inline VmathSoaVector3 vmathSoaV3CopySignPerElem_V( VmathSoaVector3 vec0, VmathSoaVector3 vec1 ) { VmathSoaVector3 result; vmathSoaV3CopySignPerElem(&result, &vec0, &vec1); return result; } static inline VmathSoaVector3 vmathSoaV3MaxPerElem_V( VmathSoaVector3 vec0, VmathSoaVector3 vec1 ) { VmathSoaVector3 result; vmathSoaV3MaxPerElem(&result, &vec0, &vec1); return result; } static inline vec_float4 vmathSoaV3MaxElem_V( VmathSoaVector3 vec ) { return vmathSoaV3MaxElem(&vec); } static inline VmathSoaVector3 vmathSoaV3MinPerElem_V( VmathSoaVector3 vec0, VmathSoaVector3 vec1 ) { VmathSoaVector3 result; vmathSoaV3MinPerElem(&result, &vec0, &vec1); return result; } static inline vec_float4 vmathSoaV3MinElem_V( VmathSoaVector3 vec ) { return vmathSoaV3MinElem(&vec); } static inline vec_float4 vmathSoaV3Sum_V( VmathSoaVector3 vec ) { return vmathSoaV3Sum(&vec); } static inline vec_float4 vmathSoaV3Dot_V( VmathSoaVector3 vec0, VmathSoaVector3 vec1 ) { return vmathSoaV3Dot(&vec0, &vec1); } static inline vec_float4 vmathSoaV3LengthSqr_V( VmathSoaVector3 vec ) { return vmathSoaV3LengthSqr(&vec); } static inline vec_float4 vmathSoaV3Length_V( VmathSoaVector3 vec ) { return vmathSoaV3Length(&vec); } static inline VmathSoaVector3 vmathSoaV3Normalize_V( VmathSoaVector3 vec ) { VmathSoaVector3 result; vmathSoaV3Normalize(&result, &vec); return result; } static inline VmathSoaVector3 vmathSoaV3Cross_V( VmathSoaVector3 vec0, VmathSoaVector3 vec1 ) { VmathSoaVector3 result; vmathSoaV3Cross(&result, &vec0, &vec1); return result; } static inline VmathSoaVector3 vmathSoaV3Select_V( VmathSoaVector3 vec0, VmathSoaVector3 vec1, vec_uint4 select1 ) { VmathSoaVector3 result; vmathSoaV3Select(&result, &vec0, &vec1, select1); return result; } #ifdef _VECTORMATH_DEBUG static inline void vmathSoaV3Print_V( VmathSoaVector3 vec ) { vmathSoaV3Print(&vec); } static inline void vmathSoaV3Prints_V( VmathSoaVector3 vec, const char *name ) { vmathSoaV3Prints(&vec, name); } #endif static inline VmathSoaVector4 vmathSoaV4MakeFromElems_V( vec_float4 _x, vec_float4 _y, vec_float4 _z, vec_float4 _w ) { VmathSoaVector4 result; vmathSoaV4MakeFromElems(&result, _x, _y, _z, _w); return result; } static inline VmathSoaVector4 vmathSoaV4MakeFromV3Scalar_V( VmathSoaVector3 xyz, vec_float4 _w ) { VmathSoaVector4 result; vmathSoaV4MakeFromV3Scalar(&result, &xyz, _w); return result; } static inline VmathSoaVector4 vmathSoaV4MakeFromV3_V( VmathSoaVector3 vec ) { VmathSoaVector4 result; vmathSoaV4MakeFromV3(&result, &vec); return result; } static inline VmathSoaVector4 vmathSoaV4MakeFromP3_V( VmathSoaPoint3 pnt ) { VmathSoaVector4 result; vmathSoaV4MakeFromP3(&result, &pnt); return result; } static inline VmathSoaVector4 vmathSoaV4MakeFromQ_V( VmathSoaQuat quat ) { VmathSoaVector4 result; vmathSoaV4MakeFromQ(&result, &quat); return result; } static inline VmathSoaVector4 vmathSoaV4MakeFromScalar_V( vec_float4 scalar ) { VmathSoaVector4 result; vmathSoaV4MakeFromScalar(&result, scalar); return result; } static inline VmathSoaVector4 vmathSoaV4MakeFromAos_V( VmathVector4 vec ) { VmathSoaVector4 result; vmathSoaV4MakeFromAos(&result, &vec); return result; } static inline VmathSoaVector4 vmathSoaV4MakeFrom4Aos_V( VmathVector4 vec0, VmathVector4 vec1, VmathVector4 vec2, VmathVector4 vec3 ) { VmathSoaVector4 result; vmathSoaV4MakeFrom4Aos(&result, &vec0, &vec1, &vec2, &vec3); return result; } static inline VmathSoaVector4 vmathSoaV4MakeXAxis_V( ) { VmathSoaVector4 result; vmathSoaV4MakeXAxis(&result); return result; } static inline VmathSoaVector4 vmathSoaV4MakeYAxis_V( ) { VmathSoaVector4 result; vmathSoaV4MakeYAxis(&result); return result; } static inline VmathSoaVector4 vmathSoaV4MakeZAxis_V( ) { VmathSoaVector4 result; vmathSoaV4MakeZAxis(&result); return result; } static inline VmathSoaVector4 vmathSoaV4MakeWAxis_V( ) { VmathSoaVector4 result; vmathSoaV4MakeWAxis(&result); return result; } static inline VmathSoaVector4 vmathSoaV4Lerp_V( vec_float4 t, VmathSoaVector4 vec0, VmathSoaVector4 vec1 ) { VmathSoaVector4 result; vmathSoaV4Lerp(&result, t, &vec0, &vec1); return result; } static inline VmathSoaVector4 vmathSoaV4Slerp_V( vec_float4 t, VmathSoaVector4 unitVec0, VmathSoaVector4 unitVec1 ) { VmathSoaVector4 result; vmathSoaV4Slerp(&result, t, &unitVec0, &unitVec1); return result; } static inline void vmathSoaV4Get4Aos_V( VmathSoaVector4 vec, VmathVector4 *result0, VmathVector4 *result1, VmathVector4 *result2, VmathVector4 *result3 ) { vmathSoaV4Get4Aos(&vec, result0, result1, result2, result3); } static inline void vmathSoaV4StoreHalfFloats_V( VmathSoaVector4 vec, vec_ushort8 *twoQuads ) { vmathSoaV4StoreHalfFloats(&vec, twoQuads); } static inline void vmathSoaV4SetXYZ_V( VmathSoaVector4 *result, VmathSoaVector3 vec ) { vmathSoaV4SetXYZ(result, &vec); } static inline VmathSoaVector3 vmathSoaV4GetXYZ_V( VmathSoaVector4 vec ) { VmathSoaVector3 result; vmathSoaV4GetXYZ(&result, &vec); return result; } static inline void vmathSoaV4SetX_V( VmathSoaVector4 *result, vec_float4 _x ) { vmathSoaV4SetX(result, _x); } static inline vec_float4 vmathSoaV4GetX_V( VmathSoaVector4 vec ) { return vmathSoaV4GetX(&vec); } static inline void vmathSoaV4SetY_V( VmathSoaVector4 *result, vec_float4 _y ) { vmathSoaV4SetY(result, _y); } static inline vec_float4 vmathSoaV4GetY_V( VmathSoaVector4 vec ) { return vmathSoaV4GetY(&vec); } static inline void vmathSoaV4SetZ_V( VmathSoaVector4 *result, vec_float4 _z ) { vmathSoaV4SetZ(result, _z); } static inline vec_float4 vmathSoaV4GetZ_V( VmathSoaVector4 vec ) { return vmathSoaV4GetZ(&vec); } static inline void vmathSoaV4SetW_V( VmathSoaVector4 *result, vec_float4 _w ) { vmathSoaV4SetW(result, _w); } static inline vec_float4 vmathSoaV4GetW_V( VmathSoaVector4 vec ) { return vmathSoaV4GetW(&vec); } static inline void vmathSoaV4SetElem_V( VmathSoaVector4 *result, int idx, vec_float4 value ) { vmathSoaV4SetElem(result, idx, value); } static inline vec_float4 vmathSoaV4GetElem_V( VmathSoaVector4 vec, int idx ) { return vmathSoaV4GetElem(&vec, idx); } static inline VmathSoaVector4 vmathSoaV4Add_V( VmathSoaVector4 vec0, VmathSoaVector4 vec1 ) { VmathSoaVector4 result; vmathSoaV4Add(&result, &vec0, &vec1); return result; } static inline VmathSoaVector4 vmathSoaV4Sub_V( VmathSoaVector4 vec0, VmathSoaVector4 vec1 ) { VmathSoaVector4 result; vmathSoaV4Sub(&result, &vec0, &vec1); return result; } static inline VmathSoaVector4 vmathSoaV4ScalarMul_V( VmathSoaVector4 vec, vec_float4 scalar ) { VmathSoaVector4 result; vmathSoaV4ScalarMul(&result, &vec, scalar); return result; } static inline VmathSoaVector4 vmathSoaV4ScalarDiv_V( VmathSoaVector4 vec, vec_float4 scalar ) { VmathSoaVector4 result; vmathSoaV4ScalarDiv(&result, &vec, scalar); return result; } static inline VmathSoaVector4 vmathSoaV4Neg_V( VmathSoaVector4 vec ) { VmathSoaVector4 result; vmathSoaV4Neg(&result, &vec); return result; } static inline VmathSoaVector4 vmathSoaV4MulPerElem_V( VmathSoaVector4 vec0, VmathSoaVector4 vec1 ) { VmathSoaVector4 result; vmathSoaV4MulPerElem(&result, &vec0, &vec1); return result; } static inline VmathSoaVector4 vmathSoaV4DivPerElem_V( VmathSoaVector4 vec0, VmathSoaVector4 vec1 ) { VmathSoaVector4 result; vmathSoaV4DivPerElem(&result, &vec0, &vec1); return result; } static inline VmathSoaVector4 vmathSoaV4RecipPerElem_V( VmathSoaVector4 vec ) { VmathSoaVector4 result; vmathSoaV4RecipPerElem(&result, &vec); return result; } static inline VmathSoaVector4 vmathSoaV4SqrtPerElem_V( VmathSoaVector4 vec ) { VmathSoaVector4 result; vmathSoaV4SqrtPerElem(&result, &vec); return result; } static inline VmathSoaVector4 vmathSoaV4RsqrtPerElem_V( VmathSoaVector4 vec ) { VmathSoaVector4 result; vmathSoaV4RsqrtPerElem(&result, &vec); return result; } static inline VmathSoaVector4 vmathSoaV4AbsPerElem_V( VmathSoaVector4 vec ) { VmathSoaVector4 result; vmathSoaV4AbsPerElem(&result, &vec); return result; } static inline VmathSoaVector4 vmathSoaV4CopySignPerElem_V( VmathSoaVector4 vec0, VmathSoaVector4 vec1 ) { VmathSoaVector4 result; vmathSoaV4CopySignPerElem(&result, &vec0, &vec1); return result; } static inline VmathSoaVector4 vmathSoaV4MaxPerElem_V( VmathSoaVector4 vec0, VmathSoaVector4 vec1 ) { VmathSoaVector4 result; vmathSoaV4MaxPerElem(&result, &vec0, &vec1); return result; } static inline vec_float4 vmathSoaV4MaxElem_V( VmathSoaVector4 vec ) { return vmathSoaV4MaxElem(&vec); } static inline VmathSoaVector4 vmathSoaV4MinPerElem_V( VmathSoaVector4 vec0, VmathSoaVector4 vec1 ) { VmathSoaVector4 result; vmathSoaV4MinPerElem(&result, &vec0, &vec1); return result; } static inline vec_float4 vmathSoaV4MinElem_V( VmathSoaVector4 vec ) { return vmathSoaV4MinElem(&vec); } static inline vec_float4 vmathSoaV4Sum_V( VmathSoaVector4 vec ) { return vmathSoaV4Sum(&vec); } static inline vec_float4 vmathSoaV4Dot_V( VmathSoaVector4 vec0, VmathSoaVector4 vec1 ) { return vmathSoaV4Dot(&vec0, &vec1); } static inline vec_float4 vmathSoaV4LengthSqr_V( VmathSoaVector4 vec ) { return vmathSoaV4LengthSqr(&vec); } static inline vec_float4 vmathSoaV4Length_V( VmathSoaVector4 vec ) { return vmathSoaV4Length(&vec); } static inline VmathSoaVector4 vmathSoaV4Normalize_V( VmathSoaVector4 vec ) { VmathSoaVector4 result; vmathSoaV4Normalize(&result, &vec); return result; } static inline VmathSoaVector4 vmathSoaV4Select_V( VmathSoaVector4 vec0, VmathSoaVector4 vec1, vec_uint4 select1 ) { VmathSoaVector4 result; vmathSoaV4Select(&result, &vec0, &vec1, select1); return result; } #ifdef _VECTORMATH_DEBUG static inline void vmathSoaV4Print_V( VmathSoaVector4 vec ) { vmathSoaV4Print(&vec); } static inline void vmathSoaV4Prints_V( VmathSoaVector4 vec, const char *name ) { vmathSoaV4Prints(&vec, name); } #endif static inline VmathSoaPoint3 vmathSoaP3MakeFromElems_V( vec_float4 _x, vec_float4 _y, vec_float4 _z ) { VmathSoaPoint3 result; vmathSoaP3MakeFromElems(&result, _x, _y, _z); return result; } static inline VmathSoaPoint3 vmathSoaP3MakeFromV3_V( VmathSoaVector3 vec ) { VmathSoaPoint3 result; vmathSoaP3MakeFromV3(&result, &vec); return result; } static inline VmathSoaPoint3 vmathSoaP3MakeFromScalar_V( vec_float4 scalar ) { VmathSoaPoint3 result; vmathSoaP3MakeFromScalar(&result, scalar); return result; } static inline VmathSoaPoint3 vmathSoaP3MakeFromAos_V( VmathPoint3 pnt ) { VmathSoaPoint3 result; vmathSoaP3MakeFromAos(&result, &pnt); return result; } static inline VmathSoaPoint3 vmathSoaP3MakeFrom4Aos_V( VmathPoint3 pnt0, VmathPoint3 pnt1, VmathPoint3 pnt2, VmathPoint3 pnt3 ) { VmathSoaPoint3 result; vmathSoaP3MakeFrom4Aos(&result, &pnt0, &pnt1, &pnt2, &pnt3); return result; } static inline VmathSoaPoint3 vmathSoaP3Lerp_V( vec_float4 t, VmathSoaPoint3 pnt0, VmathSoaPoint3 pnt1 ) { VmathSoaPoint3 result; vmathSoaP3Lerp(&result, t, &pnt0, &pnt1); return result; } static inline void vmathSoaP3Get4Aos_V( VmathSoaPoint3 pnt, VmathPoint3 *result0, VmathPoint3 *result1, VmathPoint3 *result2, VmathPoint3 *result3 ) { vmathSoaP3Get4Aos(&pnt, result0, result1, result2, result3); } static inline void vmathSoaP3LoadXYZArray_V( VmathSoaPoint3 *vec, const vec_float4 *threeQuads ) { vmathSoaP3LoadXYZArray(vec, threeQuads); } static inline void vmathSoaP3StoreXYZArray_V( VmathSoaPoint3 vec, vec_float4 *threeQuads ) { vmathSoaP3StoreXYZArray(&vec, threeQuads); } static inline void vmathSoaP3StoreHalfFloats_V( VmathSoaPoint3 pnt0, VmathSoaPoint3 pnt1, vec_ushort8 *threeQuads ) { vmathSoaP3StoreHalfFloats(&pnt0, &pnt1, threeQuads); } static inline void vmathSoaP3SetX_V( VmathSoaPoint3 *result, vec_float4 _x ) { vmathSoaP3SetX(result, _x); } static inline vec_float4 vmathSoaP3GetX_V( VmathSoaPoint3 pnt ) { return vmathSoaP3GetX(&pnt); } static inline void vmathSoaP3SetY_V( VmathSoaPoint3 *result, vec_float4 _y ) { vmathSoaP3SetY(result, _y); } static inline vec_float4 vmathSoaP3GetY_V( VmathSoaPoint3 pnt ) { return vmathSoaP3GetY(&pnt); } static inline void vmathSoaP3SetZ_V( VmathSoaPoint3 *result, vec_float4 _z ) { vmathSoaP3SetZ(result, _z); } static inline vec_float4 vmathSoaP3GetZ_V( VmathSoaPoint3 pnt ) { return vmathSoaP3GetZ(&pnt); } static inline void vmathSoaP3SetElem_V( VmathSoaPoint3 *result, int idx, vec_float4 value ) { vmathSoaP3SetElem(result, idx, value); } static inline vec_float4 vmathSoaP3GetElem_V( VmathSoaPoint3 pnt, int idx ) { return vmathSoaP3GetElem(&pnt, idx); } static inline VmathSoaVector3 vmathSoaP3Sub_V( VmathSoaPoint3 pnt0, VmathSoaPoint3 pnt1 ) { VmathSoaVector3 result; vmathSoaP3Sub(&result, &pnt0, &pnt1); return result; } static inline VmathSoaPoint3 vmathSoaP3AddV3_V( VmathSoaPoint3 pnt, VmathSoaVector3 vec1 ) { VmathSoaPoint3 result; vmathSoaP3AddV3(&result, &pnt, &vec1); return result; } static inline VmathSoaPoint3 vmathSoaP3SubV3_V( VmathSoaPoint3 pnt, VmathSoaVector3 vec1 ) { VmathSoaPoint3 result; vmathSoaP3SubV3(&result, &pnt, &vec1); return result; } static inline VmathSoaPoint3 vmathSoaP3MulPerElem_V( VmathSoaPoint3 pnt0, VmathSoaPoint3 pnt1 ) { VmathSoaPoint3 result; vmathSoaP3MulPerElem(&result, &pnt0, &pnt1); return result; } static inline VmathSoaPoint3 vmathSoaP3DivPerElem_V( VmathSoaPoint3 pnt0, VmathSoaPoint3 pnt1 ) { VmathSoaPoint3 result; vmathSoaP3DivPerElem(&result, &pnt0, &pnt1); return result; } static inline VmathSoaPoint3 vmathSoaP3RecipPerElem_V( VmathSoaPoint3 pnt ) { VmathSoaPoint3 result; vmathSoaP3RecipPerElem(&result, &pnt); return result; } static inline VmathSoaPoint3 vmathSoaP3SqrtPerElem_V( VmathSoaPoint3 pnt ) { VmathSoaPoint3 result; vmathSoaP3SqrtPerElem(&result, &pnt); return result; } static inline VmathSoaPoint3 vmathSoaP3RsqrtPerElem_V( VmathSoaPoint3 pnt ) { VmathSoaPoint3 result; vmathSoaP3RsqrtPerElem(&result, &pnt); return result; } static inline VmathSoaPoint3 vmathSoaP3AbsPerElem_V( VmathSoaPoint3 pnt ) { VmathSoaPoint3 result; vmathSoaP3AbsPerElem(&result, &pnt); return result; } static inline VmathSoaPoint3 vmathSoaP3CopySignPerElem_V( VmathSoaPoint3 pnt0, VmathSoaPoint3 pnt1 ) { VmathSoaPoint3 result; vmathSoaP3CopySignPerElem(&result, &pnt0, &pnt1); return result; } static inline VmathSoaPoint3 vmathSoaP3MaxPerElem_V( VmathSoaPoint3 pnt0, VmathSoaPoint3 pnt1 ) { VmathSoaPoint3 result; vmathSoaP3MaxPerElem(&result, &pnt0, &pnt1); return result; } static inline vec_float4 vmathSoaP3MaxElem_V( VmathSoaPoint3 pnt ) { return vmathSoaP3MaxElem(&pnt); } static inline VmathSoaPoint3 vmathSoaP3MinPerElem_V( VmathSoaPoint3 pnt0, VmathSoaPoint3 pnt1 ) { VmathSoaPoint3 result; vmathSoaP3MinPerElem(&result, &pnt0, &pnt1); return result; } static inline vec_float4 vmathSoaP3MinElem_V( VmathSoaPoint3 pnt ) { return vmathSoaP3MinElem(&pnt); } static inline vec_float4 vmathSoaP3Sum_V( VmathSoaPoint3 pnt ) { return vmathSoaP3Sum(&pnt); } static inline VmathSoaPoint3 vmathSoaP3Scale_V( VmathSoaPoint3 pnt, vec_float4 scaleVal ) { VmathSoaPoint3 result; vmathSoaP3Scale(&result, &pnt, scaleVal); return result; } static inline VmathSoaPoint3 vmathSoaP3NonUniformScale_V( VmathSoaPoint3 pnt, VmathSoaVector3 scaleVec ) { VmathSoaPoint3 result; vmathSoaP3NonUniformScale(&result, &pnt, &scaleVec); return result; } static inline vec_float4 vmathSoaP3Projection_V( VmathSoaPoint3 pnt, VmathSoaVector3 unitVec ) { return vmathSoaP3Projection(&pnt, &unitVec); } static inline vec_float4 vmathSoaP3DistSqrFromOrigin_V( VmathSoaPoint3 pnt ) { return vmathSoaP3DistSqrFromOrigin(&pnt); } static inline vec_float4 vmathSoaP3DistFromOrigin_V( VmathSoaPoint3 pnt ) { return vmathSoaP3DistFromOrigin(&pnt); } static inline vec_float4 vmathSoaP3DistSqr_V( VmathSoaPoint3 pnt0, VmathSoaPoint3 pnt1 ) { return vmathSoaP3DistSqr(&pnt0, &pnt1); } static inline vec_float4 vmathSoaP3Dist_V( VmathSoaPoint3 pnt0, VmathSoaPoint3 pnt1 ) { return vmathSoaP3Dist(&pnt0, &pnt1); } static inline VmathSoaPoint3 vmathSoaP3Select_V( VmathSoaPoint3 pnt0, VmathSoaPoint3 pnt1, vec_uint4 select1 ) { VmathSoaPoint3 result; vmathSoaP3Select(&result, &pnt0, &pnt1, select1); return result; } #ifdef _VECTORMATH_DEBUG static inline void vmathSoaP3Print_V( VmathSoaPoint3 pnt ) { vmathSoaP3Print(&pnt); } static inline void vmathSoaP3Prints_V( VmathSoaPoint3 pnt, const char *name ) { vmathSoaP3Prints(&pnt, name); } #endif #ifdef __cplusplus } #endif /* __cplusplus */ #endif
27.967809
153
0.769762
21c3922ca2b319c34e3c2cee4ba809c98e45db05
296
h
C
cpp/model/SupermarketCatalog.h
RezaQavi-git/SupermarketReceipt-Refactoring-Kata
6f01495809fe7a457edc9cacbfa926bd533195a9
[ "MIT" ]
59
2018-11-27T14:44:49.000Z
2022-02-08T13:14:21.000Z
cpp/model/SupermarketCatalog.h
RezaQavi-git/SupermarketReceipt-Refactoring-Kata
6f01495809fe7a457edc9cacbfa926bd533195a9
[ "MIT" ]
28
2019-01-15T15:21:20.000Z
2022-01-02T11:22:41.000Z
cpp/model/SupermarketCatalog.h
RezaQavi-git/SupermarketReceipt-Refactoring-Kata
6f01495809fe7a457edc9cacbfa926bd533195a9
[ "MIT" ]
161
2018-12-23T21:42:23.000Z
2022-02-25T03:32:09.000Z
#ifndef CPP_SUPERMARKETCATALOG_H #define CPP_SUPERMARKETCATALOG_H #include "Product.h" class SupermarketCatalog { public: virtual void addProduct(const Product& product, double price) = 0; virtual double getUnitPrice(const Product& product) = 0; }; #endif //CPP_SUPERMARKETCATALOG_H
19.733333
70
0.777027
293e1908f30af9a9ba706ace048dd6e30ee1b980
518
h
C
def_lang/include/def_lang/IBool_Value.h
jeanleflambeur/silkopter
cdbc67ee2c85f5c95eb4f52e2e0ba24514962dd8
[ "BSD-3-Clause" ]
36
2015-03-09T16:47:14.000Z
2021-02-04T08:32:04.000Z
def_lang/include/def_lang/IBool_Value.h
jeanlemotan/silkopter
cdbc67ee2c85f5c95eb4f52e2e0ba24514962dd8
[ "BSD-3-Clause" ]
42
2017-02-11T11:15:51.000Z
2019-12-28T16:00:44.000Z
def_lang/include/def_lang/IBool_Value.h
jeanleflambeur/silkopter
cdbc67ee2c85f5c95eb4f52e2e0ba24514962dd8
[ "BSD-3-Clause" ]
5
2015-10-15T05:46:48.000Z
2020-05-11T17:40:36.000Z
#pragma once #include "Result.h" #include "IValue.h" #include "ITemplate_Argument.h" #include "IBool_Type.h" namespace ts { class IBool_Value : virtual public IValue, public virtual ITemplate_Argument { public: virtual ~IBool_Value() = default; typedef IBool_Traits traits; virtual std::shared_ptr<traits::type_interface const> get_specialized_type() const = 0; virtual Result<void> set_value(traits::fundamental_type value) = 0; virtual traits::fundamental_type get_value() const = 0; }; }
20.72
91
0.741313
42e359ce96e145d4684f8c4aff7bebced47ce696
193
h
C
Flotilla/Code/FlotillaServer/ClientPlayer.h
egladysz/Flotilla-Network
32b8bf5fd3e1f3d04bfc7b1007c845c77167cf06
[ "MIT" ]
null
null
null
Flotilla/Code/FlotillaServer/ClientPlayer.h
egladysz/Flotilla-Network
32b8bf5fd3e1f3d04bfc7b1007c845c77167cf06
[ "MIT" ]
null
null
null
Flotilla/Code/FlotillaServer/ClientPlayer.h
egladysz/Flotilla-Network
32b8bf5fd3e1f3d04bfc7b1007c845c77167cf06
[ "MIT" ]
null
null
null
#pragma once struct ClientPlayer { float x = 0; float y = 0; float radius = 20; bool isColliding(float otherX, float otherY) const; bool isColliding(const ClientPlayer& other) const; };
16.083333
52
0.720207
426c93821fcc39e9b50c46b4f40210c509d7958b
6,757
h
C
src/Win/NamedColumns.h
dconnet/AgilityBook
4804c79079d6109294a6d377fb6ebda70bcb30a1
[ "MIT" ]
1
2020-11-23T20:33:41.000Z
2020-11-23T20:33:41.000Z
src/Win/NamedColumns.h
dconnet/AgilityBook
4804c79079d6109294a6d377fb6ebda70bcb30a1
[ "MIT" ]
null
null
null
src/Win/NamedColumns.h
dconnet/AgilityBook
4804c79079d6109294a6d377fb6ebda70bcb30a1
[ "MIT" ]
3
2020-05-04T19:42:26.000Z
2022-03-08T09:36:54.000Z
#pragma once /* * Copyright (c) David Connet. All Rights Reserved. * * License: See License.txt */ /** * @file * @brief interface of the CNamedColumns class * @author David Connet * * Revision History * 2020-04-24 Moved defines from DlgAssignColumns to here. * 2010-03-28 Created. */ #include "AgilityBookOptions.h" #include <vector> /* * If types/columns are added/removed, do not change these numbers. * These numbers are stored in a users registry for the order. * If a column is removed, then the number must be reserved. * (types are stored as a key name "colN", the others are the value of the key) */ #define IO_TYPE_RUNS_FAULTS_TIME 0 #define IO_TYPE_RUNS_TIME_FAULTS 1 #define IO_TYPE_RUNS_OPEN_CLOSE 2 #define IO_TYPE_RUNS_POINTS 3 #define IO_TYPE_CALENDAR 4 #define IO_TYPE_TRAINING 5 #define IO_TYPE_VIEW_TREE_DOG 6 // Tree/Run and TreeList #define IO_TYPE_VIEW_TREE_TRIAL 7 #define IO_TYPE_VIEW_TREE_RUN 8 #define IO_TYPE_VIEW_RUNS_LIST 9 #define IO_TYPE_VIEW_CALENDAR_LIST 10 #define IO_TYPE_VIEW_TRAINING_LIST 11 #define IO_TYPE_CALENDAR_APPT 12 #define IO_TYPE_CALENDAR_TASK 13 #define IO_TYPE_VIEW_CALENDAR 14 #define IO_TYPE_MAX 15 #define IO_RUNS_REG_NAME 0 #define IO_RUNS_CALL_NAME 1 #define IO_RUNS_DATE 2 #define IO_RUNS_VENUE 3 #define IO_RUNS_CLUB 4 #define IO_RUNS_LOCATION 5 #define IO_RUNS_TRIAL_NOTES 6 #define IO_RUNS_DIVISION 7 #define IO_RUNS_LEVEL 8 #define IO_RUNS_EVENT 9 #define IO_RUNS_HEIGHT 10 #define IO_RUNS_JUDGE 11 #define IO_RUNS_HANDLER 12 #define IO_RUNS_CONDITIONS 13 #define IO_RUNS_COURSE_FAULTS 14 #define IO_RUNS_TIME 15 #define IO_RUNS_YARDS 16 #define IO_RUNS_YPS 17 #define IO_RUNS_SCT 18 #define IO_RUNS_TOTAL_FAULTS 19 #define IO_RUNS_REQ_OPENING 20 #define IO_RUNS_REQ_CLOSING 21 #define IO_RUNS_OPENING 22 #define IO_RUNS_CLOSING 23 #define IO_RUNS_REQ_POINTS 24 #define IO_RUNS_POINTS 25 #define IO_RUNS_PLACE 26 #define IO_RUNS_IN_CLASS 27 #define IO_RUNS_DOGSQD 28 #define IO_RUNS_Q 29 #define IO_RUNS_SCORE 30 #define IO_RUNS_TITLE_POINTS 31 #define IO_RUNS_COMMENTS 32 #define IO_RUNS_FAULTS 33 #define IO_CAL_START_DATE 34 #define IO_CAL_END_DATE 35 #define IO_CAL_TENTATIVE 36 #define IO_CAL_ENTERED 37 #define IO_CAL_LOCATION 38 #define IO_CAL_CLUB 39 #define IO_CAL_VENUE 40 #define IO_CAL_OPENS 41 #define IO_CAL_CLOSES 42 #define IO_CAL_NOTES 43 #define IO_LOG_DATE 44 #define IO_LOG_NAME 45 #define IO_LOG_NOTES 46 #define IO_TREE_DOG_REGNAME 47 #define IO_TREE_DOG_CALLNAME 48 #define IO_TREE_DOG_BREED 49 #define IO_TREE_DOG_DOB 50 #define IO_TREE_DOG_AGE 51 #define IO_TREE_TRIAL_START 52 #define IO_TREE_TRIAL_END 53 #define IO_TREE_TRIAL_CLUB 54 #define IO_TREE_TRIAL_VENUE 55 #define IO_TREE_TRIAL_LOCATION 56 #define IO_TREE_TRIAL_NOTES 57 #define IO_TREE_RUN_DATE 58 #define IO_TREE_RUN_Q 59 #define IO_TREE_RUN_EVENT 60 #define IO_TREE_RUN_DIVISION 61 #define IO_TREE_RUN_LEVEL 62 #define IO_TREE_RUN_HEIGHT 63 #define IO_LOG_SUBNAME 64 #define IO_TREE_TRIAL_VERIFIED 65 #define IO_RUNS_SPEED 66 #define IO_CAL_APPT_SUBJECT 67 #define IO_CAL_APPT_START_DATE 68 #define IO_CAL_APPT_START_TIME 69 #define IO_CAL_APPT_END_DATE 70 #define IO_CAL_APPT_END_TIME 71 #define IO_CAL_APPT_ALLDAY 72 #define IO_CAL_APPT_REMINDER 73 #define IO_CAL_APPT_REMINDER_DATE 74 #define IO_CAL_APPT_REMINDER_TIME 75 #define IO_CAL_APPT_ORGANIZER 76 #define IO_CAL_APPT_REQ_ATTENDEES 77 #define IO_CAL_APPT_OPT_ATTENDEES 78 #define IO_CAL_APPT_RESOURCES 79 #define IO_CAL_APPT_BILLING 80 #define IO_CAL_APPT_CATEGORIES 81 #define IO_CAL_APPT_DESCRIPTION 82 #define IO_CAL_APPT_LOCATION 83 #define IO_CAL_APPT_MILEAGE 84 #define IO_CAL_APPT_PRIORITY 85 #define IO_CAL_APPT_PRIVATE 86 #define IO_CAL_APPT_SENSITIVITY 87 #define IO_CAL_APPT_SHOW_TIME_AS 88 #define IO_CAL_TASK_SUBJECT 89 #define IO_CAL_TASK_START_DATE 90 #define IO_CAL_TASK_DUE_DATE 91 #define IO_CAL_TASK_REMINDER 92 #define IO_CAL_TASK_REMINDER_DATE 93 #define IO_CAL_TASK_REMINDER_TIME 94 #define IO_CAL_TASK_COMPLETED_DATE 95 #define IO_CAL_TASK_COMPLETE 96 #define IO_CAL_TASK_TOTAL_WORK 97 #define IO_CAL_TASK_ACTUAL_WORK 98 #define IO_CAL_TASK_BILLING 99 #define IO_CAL_TASK_CATEGORIES 100 #define IO_CAL_TASK_COMPANIES 101 #define IO_CAL_TASK_CONTACTS 102 #define IO_CAL_TASK_MILEAGE 103 #define IO_CAL_TASK_NOTES 104 #define IO_CAL_TASK_PRIORITY 105 #define IO_CAL_TASK_PRIVATE 106 #define IO_CAL_TASK_ROLE 107 #define IO_CAL_TASK_SCH_PRIORITY 108 #define IO_CAL_TASK_SENSITIVITY 109 #define IO_CAL_TASK_STATUS 110 #define IO_RUNS_MIN_YPS 111 #define IO_CAL_DRAWS 112 #define IO_RUNS_OBSTACLES 113 #define IO_RUNS_OPS 114 #define IO_RUNS_SUBNAME 115 #define IO_MAX 116 class CNamedColumns { private: CAgilityBookOptions::ColumnOrder m_eOrder; std::vector<long> m_Columns[IO_TYPE_MAX]; int m_numConfigs; std::wstring m_curConfig; struct CNamedColumnsData { std::wstring configName; std::vector<long> m_Columns[IO_TYPE_MAX]; }; std::vector<CNamedColumnsData> m_Configs; std::vector<CNamedColumnsData>::iterator FindConfig(std::wstring const& inName); public: CNamedColumns(CAgilityBookOptions::ColumnOrder eOrder); void Save(); CAgilityBookOptions::ColumnOrder Order() const { return m_eOrder; } std::wstring GetCurrentConfig() const { return m_curConfig; } std::vector<long> const& Columns(int idx) const { return m_Columns[idx]; } size_t GetAllConfigNames(std::vector<std::wstring>& outNames) const; bool SetCurrentConfig(std::wstring const& inName); bool AddConfig(std::wstring const& inName); ///< Returns if a new one was added bool DeleteConfig(std::wstring const& inName); void ResetDefault(int idxType); void SetColumn(int idxType, std::vector<long> const& columns); };
32.800971
81
0.693651
42730c59ae9c60c7926f08045ad877f3a4890c60
3,105
h
C
PrivateFrameworks/CoreUtils/CUNANDataSession.h
phatblat/macOSPrivateFrameworks
9047371eb80f925642c8a7c4f1e00095aec66044
[ "MIT" ]
17
2018-11-13T04:02:58.000Z
2022-01-20T09:27:13.000Z
PrivateFrameworks/CoreUtils/CUNANDataSession.h
phatblat/macOSPrivateFrameworks
9047371eb80f925642c8a7c4f1e00095aec66044
[ "MIT" ]
3
2018-04-06T02:02:27.000Z
2018-10-02T01:12:10.000Z
PrivateFrameworks/CoreUtils/CUNANDataSession.h
phatblat/macOSPrivateFrameworks
9047371eb80f925642c8a7c4f1e00095aec66044
[ "MIT" ]
1
2018-09-28T13:54:23.000Z
2018-09-28T13:54:23.000Z
// // 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 "WiFiAwareDataSessionDelegate.h" @class CUNANEndpoint, NSObject<OS_dispatch_queue>, NSString, WiFiAwareDataSession, WiFiAwarePublisher, WiFiAwarePublisherDataSessionHandle; @interface CUNANDataSession : NSObject <WiFiAwareDataSessionDelegate> { CDUnknownBlockType _activateCompletion; BOOL _invalidateCalled; BOOL _invalidateDone; struct LogCategory *_ucat; WiFiAwareDataSession *_wfaDataSessionClient; unsigned int _localInterfaceIndex; unsigned int _trafficFlags; NSObject<OS_dispatch_queue> *_dispatchQueue; NSString *_identifier; NSString *_label; CDUnknownBlockType _interruptionHandler; CDUnknownBlockType _invalidationHandler; CUNANEndpoint *_peerEndpoint; WiFiAwarePublisher *_publisher; WiFiAwarePublisherDataSessionHandle *_wfaDataSessionServer; CDUnion_fab80606 _peerAddress; } @property(retain, nonatomic) WiFiAwarePublisherDataSessionHandle *wfaDataSessionServer; // @synthesize wfaDataSessionServer=_wfaDataSessionServer; @property(retain, nonatomic) WiFiAwarePublisher *publisher; // @synthesize publisher=_publisher; @property(nonatomic) unsigned int trafficFlags; // @synthesize trafficFlags=_trafficFlags; @property(retain, nonatomic) CUNANEndpoint *peerEndpoint; // @synthesize peerEndpoint=_peerEndpoint; @property(nonatomic) CDUnion_fab80606 peerAddress; // @synthesize peerAddress=_peerAddress; @property(nonatomic) unsigned int localInterfaceIndex; // @synthesize localInterfaceIndex=_localInterfaceIndex; @property(copy, nonatomic) CDUnknownBlockType invalidationHandler; // @synthesize invalidationHandler=_invalidationHandler; @property(copy, nonatomic) CDUnknownBlockType interruptionHandler; // @synthesize interruptionHandler=_interruptionHandler; @property(copy, nonatomic) NSString *label; // @synthesize label=_label; @property(copy, nonatomic) NSString *identifier; // @synthesize identifier=_identifier; @property(retain, nonatomic) NSObject<OS_dispatch_queue> *dispatchQueue; // @synthesize dispatchQueue=_dispatchQueue; - (void).cxx_destruct; - (void)dataSession:(id)arg1 terminatedWithReason:(long long)arg2; - (BOOL)_dataSession:(id)arg1 confirmedForPeerDataAddress:(id)arg2 serviceSpecificInfo:(id)arg3 error:(id *)arg4; - (void)dataSession:(id)arg1 confirmedForPeerDataAddress:(id)arg2 serviceSpecificInfo:(id)arg3; - (void)dataSession:(id)arg1 failedToStartWithError:(long long)arg2; - (void)dataSessionRequestStarted:(id)arg1; - (void)_terminateServerDataSession; - (void)_invalidated; - (void)_invalidate; - (void)invalidate; - (void)_activateWithCompletion:(CDUnknownBlockType)arg1; - (void)activateWithCompletion:(CDUnknownBlockType)arg1; - (id)descriptionWithLevel:(int)arg1; @property(readonly, copy) NSString *description; - (void)dealloc; - (id)init; // Remaining properties @property(readonly, copy) NSString *debugDescription; @property(readonly) unsigned long long hash; @property(readonly) Class superclass; @end
45.661765
146
0.804187
096daa10ffe676a731b642836514256da3165dfe
724
h
C
Example/Pods/BearSkill/Pod/UIAndExtend/BearAlertView/BearAlertManager.h
holla-world/CRBoxInputView
08bd510ad0db71ec5bc540d89ca5996fefe2227b
[ "MIT" ]
862
2019-01-09T07:30:16.000Z
2022-03-29T07:27:53.000Z
Example/Pods/BearSkill/Pod/UIAndExtend/BearAlertView/BearAlertManager.h
holla-world/CRBoxInputView
08bd510ad0db71ec5bc540d89ca5996fefe2227b
[ "MIT" ]
55
2019-01-11T09:42:45.000Z
2022-03-25T10:51:56.000Z
Example/Pods/BearSkill/Pod/UIAndExtend/BearAlertView/BearAlertManager.h
holla-world/CRBoxInputView
08bd510ad0db71ec5bc540d89ca5996fefe2227b
[ "MIT" ]
108
2019-01-10T04:08:56.000Z
2022-02-14T10:08:39.000Z
// // BearAlertManager.h // #import <Foundation/Foundation.h> @interface BearAlertManager : NSObject<UIActionSheetDelegate,UINavigationControllerDelegate,UIImagePickerControllerDelegate> typedef void (^ContentTapBlock) (void); typedef void (^BgTapBlock) (void); @property (nonatomic, strong) UIView *contentView; @property (assign, nonatomic) CGFloat scaleAniamtionDuration; @property (assign, nonatomic) BOOL needTapBgToFadeOut; @property (copy, nonatomic) BgTapBlock bgTapBlock; @property (copy, nonatomic) ContentTapBlock contentTapBlock; - (void)createAlertBgViewWithFrame:(CGRect)frame; - (void)showInViewAndFadeIn:(UIView *)inView; - (void)fadeOut; - (void)fadeIn; #pragma mark - Usage - (void)Usage; @end
24.965517
124
0.783149
51921b9206d0facce325f69b22f76c8431cbe5bc
1,076
h
C
src/base/port.h
neverchanje/consensus-yaraft
4138c85d999205068350f9b5caedf5a16ff576a3
[ "Apache-2.0" ]
33
2017-07-26T05:39:37.000Z
2020-11-16T07:47:18.000Z
src/base/port.h
neverchanje/yaraft-wal
4138c85d999205068350f9b5caedf5a16ff576a3
[ "Apache-2.0" ]
null
null
null
src/base/port.h
neverchanje/yaraft-wal
4138c85d999205068350f9b5caedf5a16ff576a3
[ "Apache-2.0" ]
8
2017-08-02T20:16:19.000Z
2021-09-30T14:58:51.000Z
// Copyright 2017 Wu Tao // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. #pragma once // // GCC can be told that a certain branch is not likely to be taken (for // instance, a CHECK failure), and use that information in static analysis. // Giving it this information can help it optimize for the common case in // the absence of better information (ie. -fprofile-arcs). // #if defined(__GNUC__) #define PREDICT_FALSE(x) (__builtin_expect(x, 0)) #define PREDICT_TRUE(x) (__builtin_expect(!!(x), 1)) #else #define PREDICT_FALSE(x) x #define PREDICT_TRUE(x) x #endif
35.866667
75
0.741636
ab9ed6f9cf43cc3fe2af38899ffd45768b405783
2,444
h
C
arch/cpu/cc430/pmm.h
etwasanderes2/contiki-ng
62201f23773fb3e6f350a1934fa188d5f9f6e52b
[ "BSD-3-Clause" ]
48
2015-10-02T14:44:58.000Z
2022-01-05T06:30:21.000Z
arch/cpu/cc430/pmm.h
etwasanderes2/contiki-ng
62201f23773fb3e6f350a1934fa188d5f9f6e52b
[ "BSD-3-Clause" ]
18
2019-03-13T13:56:59.000Z
2019-05-02T15:58:39.000Z
arch/cpu/cc430/pmm.h
etwasanderes2/contiki-ng
62201f23773fb3e6f350a1934fa188d5f9f6e52b
[ "BSD-3-Clause" ]
20
2015-12-03T16:38:50.000Z
2022-03-03T07:12:30.000Z
#ifndef __HAL_PMM_H__ #define __HAL_PMM_H__ /****************************************************************************** * Function Library for setting the PMM * File: hal_pmm.h * * Texas Instruments * * Version 1.2 * 10/17/09 * * V1.0 Initial Version * V1.1 Adjustment to UG * V1.2 Added return values *****************************************************************************/ #define PMM_STATUS_OK 0 #define PMM_STATUS_ERROR 1 /* disable the SVS (added by rdaforno) */ #define SVS_DISABLE { PMMCTL0_H = 0xA5;\ SVSMHCTL = 0; /* high-side ctrl register */\ SVSMLCTL = 0; /* low-side ctrl register */ \ PMMCTL0_H = 0x00; } /* enable SVS high-side normal perf. mode (monitoring and supervisor) * set reset/release voltage levels to recommended values (user guide p.84) * note: reset is enabled by default in PMMRIE */ #define SVS_ENABLE { PMMCTL0_H = 0xA5; \ SVSMHCTL = SVSHE | SVMHE | SVSHRVL_2 | SVSMHRRL_2;\ SVSMLCTL = SVMLE | SVSLE | SVSLRVL_2 | SVSMLRRL_2;\ PMMCTL0_H = 0x00; } /* trigger a reset (added by rdaforno) */ #define PMM_TRIGGER_POR { PMMCTL0_H = 0xA5; PMMCTL0_L |= PMMSWPOR; } #define PMM_TRIGGER_BOR { PMMCTL0_H = 0xA5; PMMCTL0_L |= PMMSWBOR; } /* ==================================================================== */ /** * Set the VCore to a new level if it is possible and return a * error - value. * * \param level PMM level ID * \return int 1: error / 0: done */ uint16_t SetVCore(uint8_t level); /* ==================================================================== */ /** * Set the VCore to a higher level, if it is possible. * Return a 1 if voltage at highside (Vcc) is to low * for the selected Level (level). * * \param level PMM level ID * \return int 1: error / 0: done */ uint16_t SetVCoreUp(uint8_t level); /* ==================================================================== */ /** * Set the VCore to a lower level. * Return a 1 if voltage at highside (Vcc) is still to low * for the selected Level (level). * * \param level PMM level ID * \return int 1: done with error / 0: done without error */ uint16_t SetVCoreDown(uint8_t level); #endif /* __HAL_PMM_H__ */
34.422535
79
0.501227
7926f70f3127ab7e4c4e37a71c0acf45ac167702
790
h
C
src/shaders/program_manager.h
happanda/renderize
2b2666a83c78df2cd838bdb2cebca58c27a8c5f1
[ "MIT" ]
null
null
null
src/shaders/program_manager.h
happanda/renderize
2b2666a83c78df2cd838bdb2cebca58c27a8c5f1
[ "MIT" ]
null
null
null
src/shaders/program_manager.h
happanda/renderize
2b2666a83c78df2cd838bdb2cebca58c27a8c5f1
[ "MIT" ]
null
null
null
#pragma once #include <memory> #include "shaders/fwd.h" /// The struct holds a number of Programs and is able to check for the initial files changes, recompiling the programs struct ProgramManager { ProgramManager(); ~ProgramManager(); ProgramManager(ProgramManager&& rhs); ProgramManager const& operator=(ProgramManager&& rhs); void addShader(std::string const& path, GLenum type); void addShader(std::vector<std::string> const& paths, GLenum type); Program create(std::string const& vertShaderPath, std::string const& fragShaderPath); Program create(std::string const& vertShaderPath, std::string const& geomShaderPath, std::string const& fragShaderPath); void checkChanges(); private: struct impl; std::unique_ptr<impl> mImpl; };
31.6
124
0.722785
1cfecbf40920c15cdbc2aa1d1cdba5dc2be65fdf
1,798
h
C
ThirdParty/PhysX/include/NxIntersectionRaySphere.h
uvbs/FullSource
07601c5f18d243fb478735b7bdcb8955598b9a90
[ "MIT" ]
2
2018-07-26T07:58:14.000Z
2019-05-31T14:32:18.000Z
sdk/physx/2.8.3/SDKs/Physics/include/NxIntersectionRaySphere.h
daher-alfawares/xr.desktop
218a7cff7a9be5865cf786d7cad31da6072f7348
[ "Apache-2.0" ]
null
null
null
sdk/physx/2.8.3/SDKs/Physics/include/NxIntersectionRaySphere.h
daher-alfawares/xr.desktop
218a7cff7a9be5865cf786d7cad31da6072f7348
[ "Apache-2.0" ]
5
2021-02-03T10:25:39.000Z
2022-02-23T07:08:37.000Z
#ifndef NX_INTERSECTION_RAY_SPHERE #define NX_INTERSECTION_RAY_SPHERE /*----------------------------------------------------------------------------*\ | | Public Interface to NVIDIA PhysX Technology | | www.nvidia.com | \*----------------------------------------------------------------------------*/ /** \addtogroup physics @{ */ #include "Nxp.h" #include "PhysXLoader.h" //namespace NxCollision //{ /** \brief Ray-sphere intersection test. Returns true if the ray intersects the sphere, and the impact point if needed. \warning #NxCreatePhysicsSDK() must be called before using this function. \param[in] origin Origin of the ray. <b>Range:</b> position vector \param[in] dir Direction of the ray. <b>Range:</b> direction vector \param[in] length Length of the ray. <b>Range:</b> (0,inf) \param[in] center Center of the sphere. <b>Range:</b> position vector \param[in] radius Sphere radius. <b>Range:</b> (0,inf) \param[out] hit_time Distance of intersection between ray and sphere. \param[out] hit_pos Point of intersection between ray and sphere. \return True on intersection. <b>Platform:</b> \li PC SW: Yes \li GPU : Yes [SW] \li PS3 : Yes \li XB360: Yes \li WII : Yes */ NX_INLINE bool NxRaySphereIntersect(const NxVec3& origin, const NxVec3& dir, NxReal length, const NxVec3& center, NxReal radius, NxReal& hit_time, NxVec3& hit_pos) { return NxGetUtilLib()->NxRaySphereIntersect(origin, dir, length, center, radius, hit_time, hit_pos); } //} /** @} */ #endif //NVIDIACOPYRIGHTBEGIN /////////////////////////////////////////////////////////////////////////// // Copyright (c) 2010 NVIDIA Corporation // All rights reserved. www.nvidia.com /////////////////////////////////////////////////////////////////////////// //NVIDIACOPYRIGHTEND
31.54386
164
0.589544
d76afd242537b7d10513a21f37e4545ad75f7f3f
514
c
C
implicit_type_Conversion.c
ankitpatel9300/C-
d5f2803f6dcacea36aae243820b78ed5d75143a2
[ "MIT" ]
null
null
null
implicit_type_Conversion.c
ankitpatel9300/C-
d5f2803f6dcacea36aae243820b78ed5d75143a2
[ "MIT" ]
null
null
null
implicit_type_Conversion.c
ankitpatel9300/C-
d5f2803f6dcacea36aae243820b78ed5d75143a2
[ "MIT" ]
null
null
null
/******************************************************* * Program to demonstrate implicit type conversion ********************************************************/ #include <stdio.h> int main() { int a=100; //type int double b=12.4 ; //type double printf(" \n sum of a(int) and b(double) is %f ",a+b) ; //int will be converted to double char ch= 'a'; printf(" \n sum of a(int) and c(char) is %d ",a+ch) ; //char converted to int return 0; }
22.347826
94
0.418288
0f7946c7f213c3ca05841b8cf896afb48641bce7
411
h
C
lib/include/display/graphic/tft/lgdp453x/commands/TimingCtrl3.h
AIHZP/andysworkshop-stm32plus
8f7868bf30e9df7df38004597a0430d1fe5d0370
[ "BSD-3-Clause" ]
607
2015-01-06T18:38:17.000Z
2022-03-19T18:37:09.000Z
lib/include/display/graphic/tft/lgdp453x/commands/TimingCtrl3.h
AIHZP/andysworkshop-stm32plus
8f7868bf30e9df7df38004597a0430d1fe5d0370
[ "BSD-3-Clause" ]
148
2015-01-02T11:34:15.000Z
2021-05-10T05:15:30.000Z
lib/include/display/graphic/tft/lgdp453x/commands/TimingCtrl3.h
AIHZP/andysworkshop-stm32plus
8f7868bf30e9df7df38004597a0430d1fe5d0370
[ "BSD-3-Clause" ]
203
2015-01-10T14:24:58.000Z
2022-03-25T16:08:57.000Z
/* * This file is a part of the open source stm32plus library. * Copyright (c) 2011 Andy Brown <www.andybrown.me.uk> * Please see website for licensing terms. */ #ifndef __35E464AE_5A80_11E2_B7ED002481184849 #define __35E464AE_5A80_11E2_B7ED002481184849 namespace stm32plus { namespace lgdp453x { namespace TimingCtrl3 { enum { Opcode = 0xef }; } } } #endif
15.222222
60
0.676399
8471c19b8aa0e7570b35df746edc15e39ddf6cf5
968
h
C
Source/ShaderData.h
GearEngine-dev/GearShaderTool
6ec7b7908509bacacc3c00d7ce13ae7693a69852
[ "MIT" ]
2
2019-01-17T13:32:06.000Z
2019-01-17T14:14:18.000Z
Source/ShaderData.h
GearEngine-dev/GearShaderTool
6ec7b7908509bacacc3c00d7ce13ae7693a69852
[ "MIT" ]
null
null
null
Source/ShaderData.h
GearEngine-dev/GearShaderTool
6ec7b7908509bacacc3c00d7ce13ae7693a69852
[ "MIT" ]
1
2019-01-03T03:52:43.000Z
2019-01-03T03:52:43.000Z
#ifndef SHADER_DATA_H #define SHADER_DATA_H #include <vector> #include <map> #include <string> enum BaseDataType { Unknown, Boolean, Int, Half, Float, Double, IntArray, FloatArray, Vector2, Vector3, Vector4, Matrix3, Matrix4 }; struct SingleData { BaseDataType type; void * buffer;//VK_BUFFER uint32_t size; }; struct UniformBufferMember { BaseDataType type; std::string name; uint32_t size; uint32_t offset; }; struct UniformBuffer { std::string name; void * buffer;//VK_BUFFER std::vector<UniformBufferMember> members; uint32_t size; uint32_t set; uint32_t binding; }; struct Sampler2D { std::string name; uint32_t set; uint32_t binding; }; struct StageInput { BaseDataType type; std::string name; uint32_t size; uint32_t offset; }; struct ProgramInfo { std::vector<UniformBuffer> uniformBuffers; std::vector<StageInput> stageInputs; std::vector<Sampler2D> sampler2Ds; uint32_t stageInputsSize; uint32_t setCount; }; #endif
13.828571
43
0.745868
41f0abc36ae84bdf70294f3d7e2e80b55c060a03
5,479
h
C
src/GUI/node.h
ArashMassoudieh/GIFMod_
1fa9eda21fab870fc3baf56462f79eb800d5154f
[ "MIT" ]
5
2017-11-20T19:32:27.000Z
2018-08-28T06:08:45.000Z
src/GUI/node.h
ArashMassoudieh/GIFMod_
1fa9eda21fab870fc3baf56462f79eb800d5154f
[ "MIT" ]
1
2017-07-04T05:40:30.000Z
2017-07-04T05:43:37.000Z
src/GUI/node.h
ArashMassoudieh/GIFMod_
1fa9eda21fab870fc3baf56462f79eb800d5154f
[ "MIT" ]
2
2017-11-09T22:00:45.000Z
2018-08-30T10:56:08.000Z
#pragma once #include <QGraphicsItem> #include "PropModel.h" #include "PropList.h" #include "XString.h" #include "enums.h" //#include "GWidget.h" //using namespace std; class Edge; class GraphWidget; class modelItem; //QT_BEGIN_NAMESPACE class QGraphicsSceneMouseEvent; //QT_END_NAMESPACE struct ParticleInitialConditionItem { QString Particle, Model, Value; }; struct ConstituentInitialConditionItem { QString Constituent, Particle, Model, Value; }; struct NutrientHalfSaturationConstantItem { QString Constituent, Value; }; class Node : public QGraphicsItem { //Q_OBJECT public: Node(GraphWidget *gwidget, QString _type = "Not Defined", QString _name = "No Name", int _ID = -1, int _xx = 0, int _yy = 0, int _width = 200, int _height = 100); Node(modelItem &item, GraphWidget *gwidget); Node(const Node &); ~Node() override { delete model; #ifdef GIFMOD delete particleInitialConditions; delete constituentInitialConditions; delete NutrientHalfSaturationConstants; #endif } objectColor color; Node operator=(const Node &); void addEdge(Edge *edge); QList<Edge *> edges() const { return edgeList; } mPropList getmList(const mProp &_filter) const; mPropList getmList(const QList<mProp>_filter) const; enum { Type = UserType + 1 }; int type() const Q_DECL_OVERRIDE { return Type; } QRectF boundingRect() const Q_DECL_OVERRIDE; QPainterPath shape() const Q_DECL_OVERRIDE; void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) Q_DECL_OVERRIDE; mPropList mpropList() const; QString Name() const { return name; } bool setName(const QString &Name); void setBold(const bool _Bold = true); bool setObjectType(const QString &); bool setObjectSubType(const QString &); mProp ObjectType() const{ return objectType; } int Width() const { return width; } int Height() const { return height; } void setWidth(const int &Width) { width = Width; update(); } void setHeight(const int &Height) { height = Height; update(); } mProp Filter() const { return ObjectType(); } QList<mProp> Filter(const QList<Node*> nodes) const { QList<mProp> objectTypes; foreach (Node* n , nodes) objectTypes.append(n->ObjectType()); return objectTypes; } QVariant getProp(const QString &propName, const int role = Qt::DisplayRole) const; QVariant getProp(const QString &propName, const QList<Node*> nodes, const int role = Qt::DisplayRole) const; XString getValue(const QString &propName) const; bool setProp(const QString &propName, const QVariant &Value, const int role = Qt::EditRole) ; bool setValue(const QString &propName, const XString &Value); mPropList *mList() const; corners corner(const int x, const int y); edgesides edge(const int x, const int y); QModelIndex index(QModelIndex &parent) const { return model->index(0, 0, parent); } void update(bool fast = false); QString g(QString experimentName = "") const; QString cg(QString experimentName = "") const; QString planthsc(QString experimentName = "") const; QString newNodeName(const QString name, QList<Node*> &nodes) const; QList<ParticleInitialConditionItem> &particleInitialCondition(QString experimentName = "") const; QList<ParticleInitialConditionItem> &particleInitialCondition(QString experimentName = ""); QList<ConstituentInitialConditionItem> &constituentInitialCondition(QString experimentName = "") const; QList<ConstituentInitialConditionItem> &constituentInitialCondition(QString experimentName = ""); QList<NutrientHalfSaturationConstantItem> &NutrientHalfSaturationConstant(QString experimentName = "") const; QList<NutrientHalfSaturationConstantItem> &NutrientHalfSaturationConstant(QString experimentName = ""); QMap<QString, QVariant> compact() const; static Node* unCompact(QMap<QString, QVariant>, GraphWidget *gwidget, bool oldVersion = false); static Node* unCompact10(QMap<QString, QVariant>, GraphWidget *gwidget); QStringList codes() const; QMap<QString, condition> variableNameConditions() const; bool errorDetected() const { return (errors.count()>0) ? true : false; } QStringList variableNames() const; QString variableName(QString code) const; int experimentID(); QString experimentName() const; void copyProps(QString sourceExperiment, QString destExperiment); XString val(const QString & code) const; GraphWidget *parent; QString GUI; Object_Types itemType; QMap<QString, QList<ParticleInitialConditionItem>>* particleInitialConditions; QMap<QString, QList<NutrientHalfSaturationConstantItem>>* NutrientHalfSaturationConstants; QMap<QString, QList<ConstituentInitialConditionItem>>* constituentInitialConditions; PropList<Node> props; mProp objectType; QList<Edge *> edgeList; PropModel<Node> *model; QMap<QString, QString> warnings, errors; int minH = 30, minW = 40; bool oldVersionLoad = false; bool isPorous() { QStringList Porous; Porous << "Soil" << "Darcy" << "Storage";// << "" << ""; if (Porous.contains(ObjectType().ObjectType)) return true; else return false; } QString middleText = ""; void changed(); protected: QVariant itemChange(GraphicsItemChange change, const QVariant &value) Q_DECL_OVERRIDE; void contextMenuEvent(QGraphicsSceneContextMenuEvent *event) Q_DECL_OVERRIDE; signals: void hoverMoveEvent(QGraphicsSceneHoverEvent * event) Q_DECL_OVERRIDE; private: int width, height; QString name; QPointF newPos; bool bold = false; };
33.206061
164
0.748494
708f8d8d8eb009eb0746c15f87e5d154e7bccd0a
1,086
c
C
Gathered CTF writeups/ptr-yudai-writeups/2019/ASIS_CTF_Quals_2019/silk_road_i/find_secret.c
mihaid-b/CyberSakura
f60e6b6bfd6898c69b84424b080090ae98f8076c
[ "MIT" ]
1
2022-03-27T06:00:41.000Z
2022-03-27T06:00:41.000Z
Gathered CTF writeups/ptr-yudai-writeups/2019/ASIS_CTF_Quals_2019/silk_road_i/find_secret.c
mihaid-b/CyberSakura
f60e6b6bfd6898c69b84424b080090ae98f8076c
[ "MIT" ]
null
null
null
Gathered CTF writeups/ptr-yudai-writeups/2019/ASIS_CTF_Quals_2019/silk_road_i/find_secret.c
mihaid-b/CyberSakura
f60e6b6bfd6898c69b84424b080090ae98f8076c
[ "MIT" ]
1
2022-03-27T06:01:42.000Z
2022-03-27T06:01:42.000Z
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> void ltoa(long val, char *ptr) { int i; int digit = (int)log10((double)val); ptr[digit + 1] = 0; for(i = digit; i >= 0; i--) { ptr[i] = 0x30 + (val % 10); val /= 10; } } int main() { char str_secret[10]; int x1, x2, y1 ,y2; for(long secret = 10000; secret < 999999999; secret++) { if (secret % 100000 == 0) { printf("%ld\n", secret); } ltoa(secret, str_secret); int l = strlen(str_secret); if ((secret % (l + 2) == 0) && (str_secret[4] == '1')) { x1 = secret / 100000; x2 = secret % 10000; if ((((x2 % 100) / 10 + (x2 / 1000) * 10) - ((x1 / 1000) *10 + x1 % 10) == 1) && (((x1 / 100) % 10) * 10 + (x1 / 10) % 10 + ((x2 %1000) / 100 + ((x2 % 100) / 10) * 10) * -2 == 8)) { y1 = (x1 % 10) * 10 + (x1 / 100) % 10; y2 = ((x2 / 100) % 10) * 10 + x2 % 10; if ((y1 / y2 == 3) && (y1 % y2 == 0)) { if (secret % (x1 * x2) == (l + 2) * (l + 2) * (l + 2) + 6) { printf("%ld\n", secret); break; } } } } } return 0; }
24.681818
187
0.451197
2a743c2d020898f23280123a256a76b5b499af14
751
c
C
LeetCode/misc/majority-element-ii.c
Leoyuseu/Code
34edfbbfb7875b3ed06de393c192c1f13a5074f4
[ "BSD-Source-Code" ]
null
null
null
LeetCode/misc/majority-element-ii.c
Leoyuseu/Code
34edfbbfb7875b3ed06de393c192c1f13a5074f4
[ "BSD-Source-Code" ]
null
null
null
LeetCode/misc/majority-element-ii.c
Leoyuseu/Code
34edfbbfb7875b3ed06de393c192c1f13a5074f4
[ "BSD-Source-Code" ]
null
null
null
/** * Return an array of size *returnSize. * Note: The returned array must be malloced, assume caller calls free(). */ static int cmp(const void *a, const void *b) { return *(int *)a - *(int *)b; } int* majorityElement(int* nums, int numsSize, int* returnSize) { int *ret; int less = numsSize / 3; int cur; int i,count; ret = (int *)malloc(sizeof(int) * (less + 2)); qsort(nums,numsSize,sizeof(int),cmp); cur = 0; i = 0; count = 0; while(i+count < numsSize){ while(i + count < numsSize && nums[i+count] == nums[i]){ count++; } if(count > less) ret[cur++] = nums[i]; i += count; count = 0; } *returnSize = cur; return ret; }
21.457143
73
0.528628
a89404faa07c018871ab73694b86dc6679fce56f
9,632
h
C
dtide/Backends.h
DCPUTeam/DCPUToolchain
1882aadbcbd4226064e4d8be9e7178ba771491d8
[ "MIT" ]
7
2015-10-31T19:11:46.000Z
2022-02-20T23:55:03.000Z
dtide/Backends.h
DCPUTeam/DCPUToolchain
1882aadbcbd4226064e4d8be9e7178ba771491d8
[ "MIT" ]
2
2016-10-07T06:33:34.000Z
2017-12-13T16:00:11.000Z
dtide/Backends.h
DCPUTeam/DCPUToolchain
1882aadbcbd4226064e4d8be9e7178ba771491d8
[ "MIT" ]
4
2015-10-08T02:24:35.000Z
2022-02-20T21:39:29.000Z
#ifndef BACKENDS_H #define BACKENDS_H #include <list> #include <string> #include <deque> #include <stdint.h> class DTIDEGLWidgets; #include "DTIDEGLWidgets.h" struct Line { const char* Path; int LineNumber; }; enum MessageType { StatusType, HardwareType, MemoryType, MemoryDumpType, LineHitType, }; class StatusMessage { public: uint16_t registers[8]; uint16_t pc; uint16_t sp; uint16_t ia; uint16_t ex; }; class HardwareMessage { }; class LineHitMessage { public: Line line; }; union MessageValue { StatusMessage status; HardwareMessage hardware; LineHitMessage hit; }; class DebuggingMessage { public: MessageType type; MessageValue value; }; enum CodeSyntax { DCPUAssembly, C, Brainfuck }; enum ConfigurationType { Integer, Double, String, Directory, File, OptionList }; union ConfigurationValue { int Integer; double Double; std::string* String; std::string* Directory; // Like string except verified by IDE. std::string* File; // Like string except verified by IDE. std::list<std::string>* OptionList; // First option is selected one? }; class ConfigurationOption { public: std::string Grouping; std::string Name; ConfigurationType Type; ConfigurationValue Value; }; class Breakpoint { public: int Line; std::string File; }; class BuildAPI { private: // Maintain state here to determine what file is currently // building. You could use multiple BuildAPIs to do parallel // builds. public: struct IntermediateFile { std::string Path; std::string Language; }; struct ErrorEntry { bool IsWarning; std::string Message; std::string File; int Line; }; // Implemented by IDE. virtual void AddError(std::string message, std::string file, int line) = 0; virtual void AddWarning(std::string message, std::string file, int line) = 0; // langtarget is the language to handle the output file, regardless // of extension. This way, dtcc can produce an assembly file, which // produces an object file, which can be finally linked (the object file // might simply be known as the "Object" language or w/e). When the // result of a build is an output file and there are no more intermediate // files to process, then the build is done (success is determined by // whether there were errors). virtual void AddIntermediateFile(std::string path, std::string langtarget) = 0; virtual void AddOutputFile(std::string path) = 0; virtual void AddSymbolsFile(std::string path) = 0; // Called when build is complete; this essentially means that the tool // is done. Note that toolchains should only call AddIntermediateFile // when the file is fully generated as this can be used again to speed up // parallel builds. virtual void End() = 0; std::list<std::string> GetOutputFiles(); std::list<std::string> GetSymbolFiles(); protected: std::list<IntermediateFile> m_IntermediateFiles; std::list<std::string> m_OutputFiles; std::list<std::string> m_SymbolFiles; std::list<ErrorEntry> m_ErrorEntries; }; class Language { public: virtual std::string GetName() = 0; virtual std::string GetDescription() = 0; // File extensions (can be empty for languages only produced by build outputs // such as object files). virtual std::list<std::string> GetExtensions() = 0; virtual void Build(std::string filename, std::string outputDir, BuildAPI& api) = 0; virtual std::string GetDefaultFileName() = 0; virtual CodeSyntax GetCodeSyntax() = 0; }; class Device { public: // Used for custom devices since you get a reference to a single // instance of the device from GetCustomDevices. This lets you clone // a device to get another one without the IDE knowing the type of device. Device& Clone(); std::string GetName(); std::string GetDescription(); std::string GetDocumentationURL(); std::string GetAuthors(); // Configuration interface (e.g. setting filename for disk device...) std::list<ConfigurationOption> GetOptions(); ConfigurationOption GetOption(); void SetOption(std::string Name, ConfigurationType Type, ConfigurationValue Value); // Debugging interface. bool Has(int devid, std::string name); // Whether there is any data for this name. //template <class T> //T Get<T>(int devid, std::string name, ...) // Each device has a known set of properties (like the screen // might expose the colour and and character in each frame with // different names). Varargs are used to pass in information. void Hide(int devid); // Indicates the emulator / debugger should not show any visible reference of this device // as the IDE wants to draw it itself (for LEM1802 / SPED3 screens). void Show(int devid); // Indicates the emulator should show this device again. }; ; class DebuggingSession { public: // Implemented by IDE. void Stop(); // Execution has finished. void Break(int id, std::string filename, int line); // Break at a certain point (id used for more functions). void AddError(int id, std::string message); // Show error at breakpoint. void AddWarning(int id, std::string message); // Show warning at breakpoint. // Views. virtual void SetMemory(uint16_t memory[0x10000]) = 0; // Sets memory for display in IDE. virtual uint16_t* getMemory() = 0; virtual void RegisterMemoryChange(uint16_t address, uint16_t newValue) = 0; void PushCall(std::string call, std::string language, std::string file, int line); // Pushes a call onto the call stack for the call stack pane. void PopCall(std::string language); // Pop a call from the call stack. // Devices. void SetActiveDevice(int devid, Device& device); // Provides the IDE with a reference to an active device, such as // any LEM1802 screens, etc. which the IDE can then draw inline. // Device IDs are used to differentiate between two devices of the // same type (e.g. two LEM1802 screens). virtual void AddMessage(DebuggingMessage m) = 0; bool HasMessages(); DebuggingMessage GetMessage(); // Breakpoints. virtual void AddBreakpoint(uint16_t address) = 0; bool BreakpointAt(uint16_t address); // Current line virtual void SetCurrentLine(Line l); virtual Line GetLine(); protected: Line m_CurrentLine; std::deque<DebuggingMessage> m_Queue; std::list<uint16_t> m_BreakList; }; enum ModuleType { Preprocessor, Debugger, Optimizer, }; // Device modules are excluded from Module; they use Device instead. class Module { public: std::string GetName(); std::string GetDescription(); std::string GetDocumentationURL(); std::list<std::string> GetAuthors(); ModuleType GetType(); }; class PreprocessorModule : Module { public: std::list<std::string> GetDirectives(); std::list<ConfigurationType> GetDirectiveParameters(); std::string GetDirectiveDescription(); std::list<std::string> GetFutureRequiredDirective(); // (used to specify "ENDUNIT" to "UNIT" for syntax checking) }; class DebuggerModule : Module { public: std::list<std::string> GetCommands(); std::string GetCommandDescription(); // Commands are actually run using the SendCommand API in the Toolchain class. }; class OptimizerModule : Module { public: // Not sure what is available here. Maybe some functions on // how much data was saved or what was changed, but that might require // interacting with the build API or something. }; class Toolchain { public: // Basic informational stuff. virtual std::string GetName() = 0; virtual std::string GetDescription() = 0; virtual std::list<std::string> GetAuthors() = 0; virtual std::string GetLicense() = 0; virtual void Cycle() = 0; virtual void Step() = 0; virtual void SendStatus() = 0; // Configuration interface. //virtual std::list<ConfigurationOption> GetOptions() = 0; //virtual ConfigurationOption GetOption() = 0; //virtual void SetOption(std::string Name, ConfigurationType Type, ConfigurationValue Value) = 0; // Host context stuff virtual void SetWidgetFactory(DTIDEGLWidgets* gl); // Language interface. virtual std::list<Language*> GetLanguages() = 0; Language* GetLanguageByExtension(std::string ext); // Debugging / execution interface. virtual void Start(BuildAPI& result, DebuggingSession* session) = 0; virtual void Pause(DebuggingSession* session) = 0; virtual void Resume(DebuggingSession* session) = 0; virtual void Stop(DebuggingSession* session) = 0; virtual Line LineAt(DebuggingSession* session, uint16_t address) = 0; virtual void RelayResize(int w, int h, void* ud) = 0; //virtual void AttachDevice(DebuggingSession& session, Device& device) = 0; //virtual void DetachDevice(DebuggingSession& session, Device& device) = 0; //virtual void SendCommand(DebuggingSession& session, std::string cmd) = 0; // send custom command (only to be used on user input). // TODO: Some kind of API for live memory update. // Breakpoints. virtual void AddBreakpoint(DebuggingSession* session, Breakpoint& b) = 0; // Modules and extensions. //virtual std::list<Module&> GetModules() = 0; //virtual std::list<Device&> GetCustomDevices() = 0; DTIDEGLWidgets* gl; virtual bool IsPaused(); protected: bool paused; }; #include "Toolchains/Toolchains.h" #endif
28.752239
148
0.691238
622a99369fa9a7f2beed3ad5586b2ffec3c5a666
1,270
c
C
tests/targets/posix/platform_utils.c
kl-cruz/cecc
ceccef2a891db5bffba44cc38233660577a4d83d
[ "0BSD" ]
null
null
null
tests/targets/posix/platform_utils.c
kl-cruz/cecc
ceccef2a891db5bffba44cc38233660577a4d83d
[ "0BSD" ]
null
null
null
tests/targets/posix/platform_utils.c
kl-cruz/cecc
ceccef2a891db5bffba44cc38233660577a4d83d
[ "0BSD" ]
null
null
null
/* * platform_utils.c * * All rights reserved. * * Created on: 17-10-2013 * Author: Karol Lasończyk */ #include "platform_utils.h" #include <sys/time.h> #include <stdio.h> struct timeval start, stop; /** * @brief Init function executed in first lines of tests */ void init(void) { } void inf_loop(void) { } /** * @brief start counting time */ void start_count_time(void) { gettimeofday(&start, NULL ); } /** * @brief stop counting time */ void stop_count_time(void) { gettimeofday(&stop, NULL ); } /** * @brief Function returns elapsed time (stop-start) in µs * @return time in µs */ uint32_t get_us(void) { int diff = (stop.tv_usec + 1000000 * stop.tv_sec) - (start.tv_usec + 1000000 * start.tv_sec); return diff; } uint32_t get_ticks(void) { return 0; } /** * @brief Function required to properly using format library * @param c char * @return */ int fm_putchar(int c) { return putchar(c); } /** * @brief Default pseudo random generator implementation for PC * @param output pseudo random number */ void default_prgn(bn_uint_t *output) { BN_CREATE_VARIABLE(tmp, output->length); uint32_t i; srand(random()); for (i = 0; i < tmp.length; ++i) { tmp.number[i] = random(); } bn_copy(&tmp, output, output->length); }
15.487805
94
0.664567
93f42b834a4ec0f89ed96404c0b3bdc27c3378ed
2,525
h
C
Twitter-Dumped/7.51.5/tfnui/TFNHorizontalLayoutItem.h
ichitaso/TwitterListEnabler
d4d9ba973e59ff7f0d97ae74fc473bdd0aea54df
[ "MIT" ]
1
2019-10-15T09:26:49.000Z
2019-10-15T09:26:49.000Z
Twitter-Dumped/7.52/TFNHorizontalLayoutItem.h
ichitaso/TwitterListEnabler
d4d9ba973e59ff7f0d97ae74fc473bdd0aea54df
[ "MIT" ]
null
null
null
Twitter-Dumped/7.52/TFNHorizontalLayoutItem.h
ichitaso/TwitterListEnabler
d4d9ba973e59ff7f0d97ae74fc473bdd0aea54df
[ "MIT" ]
1
2019-11-17T06:06:49.000Z
2019-11-17T06:06:49.000Z
// // Generated by class-dump 3.5 (64 bit) (Debug version compiled Sep 17 2017 16:24:48). // // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard. // #import <TFNUI/TFNStackLayoutItem.h> @class TFNHorizontalLayout, TFNStackLayout; @interface TFNHorizontalLayoutItem : TFNStackLayoutItem { _Bool _hasAllocatedWidth; TFNStackLayout *_representedLayout; long long _widthPriority; double _minimumWidth; long long _centeredVerticallyOnItemIdentifier; TFNHorizontalLayout *_layout; TFNHorizontalLayoutItem *_previousItem; TFNHorizontalLayoutItem *_nextItem; double _heightAboveBaselineIfUncentered; double _allocatedWidth; double _trailingSpace; struct CGRect _frame; } @property(nonatomic) double trailingSpace; // @synthesize trailingSpace=_trailingSpace; @property(nonatomic) _Bool hasAllocatedWidth; // @synthesize hasAllocatedWidth=_hasAllocatedWidth; @property(nonatomic) double allocatedWidth; // @synthesize allocatedWidth=_allocatedWidth; @property(nonatomic) double heightAboveBaselineIfUncentered; // @synthesize heightAboveBaselineIfUncentered=_heightAboveBaselineIfUncentered; @property(nonatomic) __weak TFNHorizontalLayoutItem *nextItem; // @synthesize nextItem=_nextItem; @property(nonatomic) __weak TFNHorizontalLayoutItem *previousItem; // @synthesize previousItem=_previousItem; @property(readonly, nonatomic) __weak TFNHorizontalLayout *layout; // @synthesize layout=_layout; @property(nonatomic) long long centeredVerticallyOnItemIdentifier; // @synthesize centeredVerticallyOnItemIdentifier=_centeredVerticallyOnItemIdentifier; @property(nonatomic) double minimumWidth; // @synthesize minimumWidth=_minimumWidth; @property(nonatomic) long long widthPriority; // @synthesize widthPriority=_widthPriority; @property(retain, nonatomic) TFNStackLayout *representedLayout; // @synthesize representedLayout=_representedLayout; - (void).cxx_destruct; @property(readonly, nonatomic) TFNHorizontalLayoutItem *nextVisibleItem; @property(readonly, nonatomic) TFNHorizontalLayoutItem *previousVisibleItem; @property(readonly, nonatomic) double heightAboveBaseline; - (void)setAdditionalEdgeInsets:(struct UIEdgeInsets)arg1; - (void)setBaselineEdgeInsets:(struct UIEdgeInsets)arg1; - (void)setTopContentInset:(double)arg1; - (void)setIntrinsicContentSize:(struct CGSize)arg1; - (_Bool)isVisible; @property(nonatomic) struct CGRect frame; // @synthesize frame=_frame; - (id)initWithItemIdentifier:(long long)arg1 layout:(id)arg2; @end
48.557692
153
0.811881
f3fa998330bf845e3b490c1bb0b3bc52a93c69b2
597
h
C
PrivateFrameworks/iWorkImport.framework/TSCH3DChartStageSceneObject.h
shaojiankui/iOS10-Runtime-Headers
6b0d842bed0c52c2a7c1464087b3081af7e10c43
[ "MIT" ]
36
2016-04-20T04:19:04.000Z
2018-10-08T04:12:25.000Z
PrivateFrameworks/iWorkImport.framework/TSCH3DChartStageSceneObject.h
shaojiankui/iOS10-Runtime-Headers
6b0d842bed0c52c2a7c1464087b3081af7e10c43
[ "MIT" ]
null
null
null
PrivateFrameworks/iWorkImport.framework/TSCH3DChartStageSceneObject.h
shaojiankui/iOS10-Runtime-Headers
6b0d842bed0c52c2a7c1464087b3081af7e10c43
[ "MIT" ]
10
2016-06-16T02:40:44.000Z
2019-01-15T03:31:45.000Z
/* Generated by RuntimeBrowser Image: /System/Library/PrivateFrameworks/iWorkImport.framework/iWorkImport */ @interface TSCH3DChartStageSceneObject : TSCH3DSceneObject { TSCH3DSceneObject * mMain; } + (id)objectWithMain:(id)arg1; - (void)dealloc; - (void)getBounds:(id)arg1; - (void)getSceneObjectElementsBounds:(id)arg1; - (void)getSelectionKnobsPositions:(id)arg1; - (id)initWithMain:(id)arg1; - (void)postGetBounds:(id)arg1; - (void)postrender:(id)arg1; - (void)prerender:(id)arg1; - (void)rayPick:(id)arg1; - (void)render:(id)arg1; - (void)render:(id)arg1 selector:(SEL)arg2; @end
24.875
77
0.738693
7a828561d6225e9347e24a01324d98fe89cf2ac3
3,434
h
C
UnionPwMultiAff.h
simbuerg/isl-
28a72cbebcb20cb722dc8712af145ed9af200865
[ "MIT" ]
null
null
null
UnionPwMultiAff.h
simbuerg/isl-
28a72cbebcb20cb722dc8712af145ed9af200865
[ "MIT" ]
null
null
null
UnionPwMultiAff.h
simbuerg/isl-
28a72cbebcb20cb722dc8712af145ed9af200865
[ "MIT" ]
null
null
null
#ifndef ISL_CXX_UnionPwMultiAff_H #define ISL_CXX_UnionPwMultiAff_H #include "isl/aff.h" #include "isl/Ctx.h" #include "isl/Format.h" #include "isl/IslBase.h" #include "isl/IslException.h" #include <string> #include "isl/IslFnPtr.h" namespace isl { class MultiUnionPwAff; class PwMultiAff; class UnionPwAff; class UnionPwMultiAff { protected: Ctx ctx; void * This; public: explicit UnionPwMultiAff(Ctx ctx, isl_union_pw_multi_aff *That) : ctx(ctx), This(That) {} UnionPwMultiAff() : ctx(Ctx(nullptr)), This(nullptr) {} const Ctx &Context() const { return ctx; } __isl_give isl_union_pw_multi_aff *GetCopy() const; /// \brief Release ownership of the wrapped object. /// /// You are on your own now buddy. /// The wrapper cannot be used anymore after calling Give() /// /// \returns the wrapped isl object. __isl_give isl_union_pw_multi_aff *Give(); /// \brief unwrap the stored isl object. /// \return a the wrapped isl object. __isl_give isl_union_pw_multi_aff *Get() const; /// \brief Constructor for isl_union_pw_multi_aff_from_pw_multi_aff /// /// \param pma static UnionPwMultiAff fromPwMultiAff(const PwMultiAff &pma); /// \brief Constructor for isl_union_pw_multi_aff_read_from_str /// /// \param ctx /// \param str static UnionPwMultiAff readFromStr(const Ctx &ctx, std::string str); /// \brief Constructor for isl_union_pw_multi_aff_from_union_pw_aff /// /// \param upa static UnionPwMultiAff fromUnionPwAff(const UnionPwAff &upa); /// \brief Constructor for isl_union_pw_multi_aff_from_multi_union_pw_aff /// /// \param mupa static UnionPwMultiAff fromMultiUnionPwAff(const MultiUnionPwAff &mupa); public: virtual ~UnionPwMultiAff(); /// \brief Generated from ::<isl_union_pw_multi_aff_add> /// /// \param [in] upma2 /// /// \returns A new UnionPwMultiAff UnionPwMultiAff add(const UnionPwMultiAff &upma2) const; /// \brief Generated from ::<isl_union_pw_multi_aff_flat_range_product> /// /// \param [in] upma2 /// /// \returns A new UnionPwMultiAff UnionPwMultiAff flatRangeProduct(const UnionPwMultiAff &upma2) const; /// \brief Generated from ::<isl_union_pw_multi_aff_pullback_union_pw_multi_aff> /// /// \param [in] upma2 /// /// \returns A new UnionPwMultiAff UnionPwMultiAff pullbackUnionPwMultiAff(const UnionPwMultiAff &upma2) const; /// \brief Generated from ::<isl_union_pw_multi_aff_to_str> /// /// /// \returns A new std::string std::string toStr() const; /// \brief Generated from ::<isl_union_pw_multi_aff_union_add> /// /// \param [in] upma2 /// /// \returns A new UnionPwMultiAff UnionPwMultiAff unionAdd(const UnionPwMultiAff &upma2) const; UnionPwMultiAff(const UnionPwMultiAff &Other) : ctx(Other.Context()), This(Other.GetCopy()) {} UnionPwMultiAff &operator=(const UnionPwMultiAff &Other); UnionPwMultiAff (UnionPwMultiAff && Other) : ctx(Other.Context()), This(Other.Give()) {} UnionPwMultiAff &operator=(UnionPwMultiAff && Other) { isl_union_pw_multi_aff *New = Other.Give(); isl_union_pw_multi_aff_free((isl_union_pw_multi_aff *)This); This = New; ctx = Other.Context(); return *this; } /// \brief Implement lt via pointer comparison of the /// wrapped isl objects. bool operator<(const UnionPwMultiAff &RHS) const { return This < RHS.This; } }; } // namespace isl #endif //ISL_CXX_UnionPwMultiAff_H
28.380165
96
0.715783
9324e382b1d68316ea979a10414c8c711f614f0c
888
c
C
lib/my/my_linked_list/my_params_last_to_list.c
math974/my_lollib
37b1b2804dc4a2b5634afb0839431273e4bcc4d3
[ "MIT" ]
5
2021-03-10T07:29:41.000Z
2021-06-02T10:44:24.000Z
lib/my/my_linked_list/my_params_last_to_list.c
math974/my_lollib
37b1b2804dc4a2b5634afb0839431273e4bcc4d3
[ "MIT" ]
null
null
null
lib/my/my_linked_list/my_params_last_to_list.c
math974/my_lollib
37b1b2804dc4a2b5634afb0839431273e4bcc4d3
[ "MIT" ]
null
null
null
/* ** EPITECH PROJECT, 2020 ** my_params_last_to_list.c ** File description: ** create a list last my params */ #include "my_linked_list.h" #include <stdlib.h> #include "my_stdio.h" element_t *initialise_params(int nbr) { element_t *new = malloc(sizeof(*new)); new->data = ((void *)(long)nbr); new->next = NULL; return (new); } liste_t *my_params_last_to_list(int ac, char **av) { liste_t *liste = malloc(sizeof(*liste)); int i = 2; element_t *new = NULL; element_t *element = NULL; liste->head = initialise_params(my_getnbr(av[1])); element = liste->head; while (i < ac) { new = malloc(sizeof(*new)); new->data = ((void *)(long)my_getnbr(av[i])); new->next = NULL; while (element->next != NULL) element = element->next; element->next = new; i = i + 1; } return (liste); }
22.769231
54
0.587838
9e33208deb78557c51e0000e9dbbf6ad5a2317ea
9,452
h
C
Pods/AsyncImageView/AsyncImageView/AsyncImageView.h
ITSVision/Nodius
c2b49c44fef293b172bd1172cffa1daf43b1a594
[ "MIT" ]
398
2015-01-04T00:21:36.000Z
2022-02-06T10:09:44.000Z
Pods/AsyncImageView/AsyncImageView/AsyncImageView.h
ITSVision/Nodius
c2b49c44fef293b172bd1172cffa1daf43b1a594
[ "MIT" ]
26
2015-01-20T20:14:04.000Z
2018-10-24T17:21:56.000Z
Pods/AsyncImageView/AsyncImageView/AsyncImageView.h
ITSVision/Nodius
c2b49c44fef293b172bd1172cffa1daf43b1a594
[ "MIT" ]
75
2015-01-04T00:21:40.000Z
2018-10-03T04:20:03.000Z
// // AsyncImageView.h // // Version 1.6 // // Created by Nick Lockwood on 03/04/2011. // Copyright (c) 2011 Charcoal Design // // Distributed under the permissive zlib License // Get the latest version from here: // // https://github.com/nicklockwood/AsyncImageView // // This software is provided 'as-is', without any express or implied warranty. // In no event will the authors be held liable for any damages arising from the // use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software in a // product, an acknowledgment in the product documentation would be appreciated // but is not required. // // 2. Altered source versions must be plainly marked as such, and must not be // misrepresented as being the original software. // // 3. This notice may not be removed or altered from any source distribution. // #import <UIKit/UIKit.h> #import <QuartzCore/QuartzCore.h> #import <ImageIO/ImageIO.h> #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wobjc-missing-property-synthesis" NS_ASSUME_NONNULL_BEGIN /** * Error domain string for AsyncImageLoader errors. */ extern NSString *const AsyncImageLoaderErrorDomain; /** * This fires when an image has been loaded. The notification object contains * the target object that loaded the image file (e.g. the UIImageView) and the * userInfo dictionary contains the following keys: * - AsyncImageImageKey * - AsyncImageURLKey * - AsyncImageCacheKey */ extern NSString *const AsyncImageLoadDidFinish; /** * This fires when an image did not load due to an error. The notification object * contains the target object that attempted to load the image file (e.g. the * UIImageView) and the userInfo dictionary contains the following keys: * - AsyncImageErrorKey * - AsyncImageURLKey */ extern NSString *const AsyncImageLoadDidFail; /** * The UIImage that was loaded. */ extern NSString *const AsyncImageImageKey; /** * The NSURL that the image was loaded from (or failed to load from). */ extern NSString *const AsyncImageURLKey; /** * The NSCache that the image was stored in. */ extern NSString *const AsyncImageCacheKey; /** * The NSError generated by the underlying NSURLSession */ extern NSString *const AsyncImageErrorKey; /** * AsyncImageLoader manages the loading/downloading and queueing of image * requests. Set properties of the shared loader instance to control loading * behaviour, or call its loading methods directly to preload images off-screen. */ @interface AsyncImageLoader : NSObject /** * The default loader instance used for image requests. */ + (AsyncImageLoader *)sharedLoader; /** * The default cache instance used by image loaders. */ + (NSCache *)defaultCache; /** * The cache to be used for image load requests. You can change this value at * any time and it will affect all subsequent load requests until it is changed * again. By default this is set to `[AsyncImageLoader sharedCache]`. Set this * to nil to disable caching completely, or you can set it to a new NSCache * instance or subclass for fine-grained cache control. */ @property (nonatomic, strong, nullable) NSCache *cache; /** * The number of images to load concurrently. Images are loaded on background * threads but loading too many concurrently can choke the CPU. * The default value is 4. */ @property (nonatomic, assign) NSUInteger concurrentLoads; /** * The loading timeout, in seconds. This defaults to 60, which should be more * than enough for loading over WiFi, but may be too short for downloading large * images over a slow 2G/3G connection. */ @property (nonatomic, assign) NSTimeInterval loadingTimeout; /** * This queues an image for download. If the queue is empty and the image is * already in cache, this will trigger the success action immediately. * * The target is retained by the AsyncImageLoader, however the loader will * monitor to see if the target is being retained by any other objects, and will * release it and terminate the file load if it is not. The target can be nil, * in which case the load will still happen as normal and can completion can be * detected using the `AsyncImageLoadDidFinish` and `AsyncImageLoadDidFail` * notifications. */ - (void)loadImageWithURL:(nullable NSURL *)URL target:(nullable id)target success:(nullable SEL)success failure:(nullable SEL)failure; /** * Works the same as above, except the action will only be called if the loading * is successful. Failure can still be detected using the `AsyncImageLoadDidFail` * notification. */ - (void)loadImageWithURL:(nullable NSURL *)URL target:(nullable id)target action:(nullable SEL)action; /** * Works the same as above, but no target or actions are specified. Use * `AsyncImageLoadDidFinish` and `AsyncImageLoadDidFail` to detect when the * loading is complete. */ - (void)loadImageWithURL:(nullable NSURL *)URL; /** * This cancels loading the image with the specified URL for the specified * target and action. */ - (void)cancelLoadingURL:(nullable NSURL *)URL target:(nullable id)target action:(nullable SEL)action; /** * This cancels loading the image with the specified URL for any actions on the * specified target; */ - (void)cancelLoadingURL:(nullable NSURL *)URL target:(nullable id)target; /** * This cancels loading the image with the specified URL. */ - (void)cancelLoadingURL:(nullable NSURL *)URL; /** * This cancels loading all queued image URLs with the specified action on the * specified target; */ - (void)cancelLoadingImagesForTarget:(nullable id)target action:(nullable SEL)action; /** * This cancels loading all queued image URLs for the specified target; */ - (void)cancelLoadingImagesForTarget:(nullable id)target; /** * Returns the most recent image URL assigned to the target for the given action. * This is not necessarily the next image that will be assigned if several image * URLs have been queued on that target. */ - (NSURL *)URLForTarget:(nullable id)target action:(nullable SEL)action; /** * Returns the most recent image URL assigned to the target. * This is not necessarily the next image that will be assigned if several image * URLs have been queued on that target. */ - (NSURL *)URLForTarget:(nullable id)target; @end /** * a category on UIImageView. This implements provides an `imageURL` property * that can be used to trigger an asynchronous load of a new image. */ @interface UIImageView(AsyncImageView) /** * Upon setting this property, AsyncImageView will begin loading/downloading the * specified image on a background thread. Once the image file has loaded, the * UIImageView's image property will be set to the resultant image. If you set * this property again while the previous image is still loading then the images * will be queued for loading in the order in which they were set. * * This means that you can, for example, set a UIImageView to load a small * thumbnail image and then immediately set it to load a larger image and the * thumbnail image will still be loaded and set before the larger image loads. * * If you access this property it will return the most recent image URL set for * the UIImageView, which may not be the next one to be loaded if several image * URLs have been queued on that image view. If you wish to cancel the * previously loading image, use the `-cancelLoadingURL:target:` method on the * AsyncImageLoader class, passing the UIImageView instance as the target. */ @property (nonatomic, strong, nullable) NSURL *imageURL; @end /** * a subclass of UIImageView. This implements some useful features on top of the * UIImageView category, including the automatic display of a loading spinner, * and a nice crossfade effect when the image loads. */ @interface AsyncImageView : UIImageView /** * If YES, the AsyncImageView will display a loading spinner when the imageURL * is set. This will automatically hide once the image has loaded. Note that * this value should bet set *before* setting the imageURL. Setting this value * when loading is already in progress will have no effect. Defaults to YES. */ @property (nonatomic, assign) BOOL showActivityIndicator; /** * The style that will be used for the UIActivityIndicator (if enabled). Note * that this value should bet set *before* setting the imageURL. Setting this * value when loading is already in progress will cause the spinner to disappear. */ @property (nonatomic, assign) UIActivityIndicatorViewStyle activityIndicatorStyle; /** * The color for the UIActivityIndicator. Defaults to light grey. */ @property (nonatomic, strong, nullable) UIColor *activityIndicatorColor; /** * The crossfade animation duration, in seconds. If value is greater than 0, the * image will crossfade in once it loads instead of appearing suddenly. Defaults * to 0.4. */ @property (nonatomic, assign) NSTimeInterval crossfadeDuration; @end NS_ASSUME_NONNULL_END #pragma clang diagnostic pop
34
82
0.739209
3d01381f3b8099e69aa4cd21beeab0b82d0f47e6
17,294
h
C
core/script_language.h
MattDBell/godot
5938466c848becb269f002191901487135e39ce3
[ "CC-BY-3.0", "Apache-2.0", "MIT" ]
1
2020-04-30T23:05:16.000Z
2020-04-30T23:05:16.000Z
core/script_language.h
MattDBell/godot
5938466c848becb269f002191901487135e39ce3
[ "CC-BY-3.0", "Apache-2.0", "MIT" ]
null
null
null
core/script_language.h
MattDBell/godot
5938466c848becb269f002191901487135e39ce3
[ "CC-BY-3.0", "Apache-2.0", "MIT" ]
null
null
null
/*************************************************************************/ /* script_language.h */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ /* https://godotengine.org */ /*************************************************************************/ /* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */ /* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */ /* */ /* 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 SCRIPT_LANGUAGE_H #define SCRIPT_LANGUAGE_H #include "map.h" #include "pair.h" #include "resource.h" /** @author Juan Linietsky <reduzio@gmail.com> */ class ScriptLanguage; typedef void (*ScriptEditRequestFunction)(const String &p_path); class ScriptServer { enum { MAX_LANGUAGES = 16 }; static ScriptLanguage *_languages[MAX_LANGUAGES]; static int _language_count; static bool scripting_enabled; static bool reload_scripts_on_save; public: static ScriptEditRequestFunction edit_request_func; static void set_scripting_enabled(bool p_enabled); static bool is_scripting_enabled(); _FORCE_INLINE_ static int get_language_count() { return _language_count; } static ScriptLanguage *get_language(int p_idx); static void register_language(ScriptLanguage *p_language); static void unregister_language(ScriptLanguage *p_language); static void set_reload_scripts_on_save(bool p_enable); static bool is_reload_scripts_on_save_enabled(); static void thread_enter(); static void thread_exit(); static void init_languages(); static void finish_languages(); }; class ScriptInstance; class PlaceHolderScriptInstance; class Script : public Resource { GDCLASS(Script, Resource); OBJ_SAVE_TYPE(Script); protected: virtual bool editor_can_reload_from_file() { return false; } // this is handled by editor better void _notification(int p_what); static void _bind_methods(); friend class PlaceHolderScriptInstance; virtual void _placeholder_erased(PlaceHolderScriptInstance *p_placeholder) {} public: virtual bool can_instance() const = 0; virtual Ref<Script> get_base_script() const = 0; //for script inheritance virtual StringName get_instance_base_type() const = 0; // this may not work in all scripts, will return empty if so virtual ScriptInstance *instance_create(Object *p_this) = 0; virtual bool instance_has(const Object *p_this) const = 0; virtual bool has_source_code() const = 0; virtual String get_source_code() const = 0; virtual void set_source_code(const String &p_code) = 0; virtual Error reload(bool p_keep_state = false) = 0; virtual bool has_method(const StringName &p_method) const = 0; virtual MethodInfo get_method_info(const StringName &p_method) const = 0; virtual bool is_tool() const = 0; virtual ScriptLanguage *get_language() const = 0; virtual bool has_script_signal(const StringName &p_signal) const = 0; virtual void get_script_signal_list(List<MethodInfo> *r_signals) const = 0; virtual bool get_property_default_value(const StringName &p_property, Variant &r_value) const = 0; virtual void update_exports() {} //editor tool virtual void get_script_method_list(List<MethodInfo> *p_list) const = 0; virtual void get_script_property_list(List<PropertyInfo> *p_list) const = 0; virtual int get_member_line(const StringName &p_member) const { return -1; } virtual void get_constants(Map<StringName, Variant> *p_constants) {} virtual void get_members(Set<StringName> *p_constants) {} Script() {} }; class ScriptInstance { public: virtual bool set(const StringName &p_name, const Variant &p_value) = 0; virtual bool get(const StringName &p_name, Variant &r_ret) const = 0; virtual void get_property_list(List<PropertyInfo> *p_properties) const = 0; virtual Variant::Type get_property_type(const StringName &p_name, bool *r_is_valid = NULL) const = 0; virtual Object *get_owner() { return NULL; } virtual void get_property_state(List<Pair<StringName, Variant> > &state); virtual void get_method_list(List<MethodInfo> *p_list) const = 0; virtual bool has_method(const StringName &p_method) const = 0; virtual Variant call(const StringName &p_method, VARIANT_ARG_LIST); virtual Variant call(const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error) = 0; virtual void call_multilevel(const StringName &p_method, VARIANT_ARG_LIST); virtual void call_multilevel(const StringName &p_method, const Variant **p_args, int p_argcount); virtual void call_multilevel_reversed(const StringName &p_method, const Variant **p_args, int p_argcount); virtual void notification(int p_notification) = 0; //this is used by script languages that keep a reference counter of their own //you can make make Ref<> not die when it reaches zero, so deleting the reference //depends entirely from the script virtual void refcount_incremented() {} virtual bool refcount_decremented() { return true; } //return true if it can die virtual Ref<Script> get_script() const = 0; virtual bool is_placeholder() const { return false; } enum RPCMode { RPC_MODE_DISABLED, RPC_MODE_REMOTE, RPC_MODE_SYNC, RPC_MODE_MASTER, RPC_MODE_SLAVE, }; virtual RPCMode get_rpc_mode(const StringName &p_method) const = 0; virtual RPCMode get_rset_mode(const StringName &p_variable) const = 0; virtual ScriptLanguage *get_language() = 0; virtual ~ScriptInstance(); }; class ScriptCodeCompletionCache { static ScriptCodeCompletionCache *singleton; public: virtual RES get_cached_resource(const String &p_path) = 0; static ScriptCodeCompletionCache *get_sigleton() { return singleton; } ScriptCodeCompletionCache(); }; class ScriptLanguage { public: virtual String get_name() const = 0; /* LANGUAGE FUNCTIONS */ virtual void init() = 0; virtual String get_type() const = 0; virtual String get_extension() const = 0; virtual Error execute_file(const String &p_path) = 0; virtual void finish() = 0; /* EDITOR FUNCTIONS */ virtual void get_reserved_words(List<String> *p_words) const = 0; virtual void get_comment_delimiters(List<String> *p_delimiters) const = 0; virtual void get_string_delimiters(List<String> *p_delimiters) const = 0; virtual Ref<Script> get_template(const String &p_class_name, const String &p_base_class_name) const = 0; virtual void make_template(const String &p_class_name, const String &p_base_class_name, Ref<Script> &p_script) {} virtual bool is_using_templates() { return false; } virtual bool validate(const String &p_script, int &r_line_error, int &r_col_error, String &r_test_error, const String &p_path = "", List<String> *r_functions = NULL) const = 0; virtual Script *create_script() const = 0; virtual bool has_named_classes() const = 0; virtual bool supports_builtin_mode() const = 0; virtual bool can_inherit_from_file() { return false; } virtual int find_function(const String &p_function, const String &p_code) const = 0; virtual String make_function(const String &p_class, const String &p_name, const PoolStringArray &p_args) const = 0; virtual Error open_in_external_editor(const Ref<Script> &p_script, int p_line, int p_col) { return ERR_UNAVAILABLE; } virtual bool overrides_external_editor() { return false; } virtual Error complete_code(const String &p_code, const String &p_base_path, Object *p_owner, List<String> *r_options, bool &r_force, String &r_call_hint) { return ERR_UNAVAILABLE; } struct LookupResult { enum Type { RESULT_SCRIPT_LOCATION, RESULT_CLASS, RESULT_CLASS_CONSTANT, RESULT_CLASS_PROPERTY, RESULT_CLASS_METHOD }; Type type; Ref<Script> script; String class_name; String class_member; int location; }; virtual Error lookup_code(const String &p_code, const String &p_symbol, const String &p_base_path, Object *p_owner, LookupResult &r_result) { return ERR_UNAVAILABLE; } virtual void auto_indent_code(String &p_code, int p_from_line, int p_to_line) const = 0; virtual void add_global_constant(const StringName &p_variable, const Variant &p_value) = 0; /* MULTITHREAD FUNCTIONS */ //some VMs need to be notified of thread creation/exiting to allocate a stack virtual void thread_enter() {} virtual void thread_exit() {} /* DEBUGGER FUNCTIONS */ virtual String debug_get_error() const = 0; virtual int debug_get_stack_level_count() const = 0; virtual int debug_get_stack_level_line(int p_level) const = 0; virtual String debug_get_stack_level_function(int p_level) const = 0; virtual String debug_get_stack_level_source(int p_level) const = 0; virtual void debug_get_stack_level_locals(int p_level, List<String> *p_locals, List<Variant> *p_values, int p_max_subitems = -1, int p_max_depth = -1) = 0; virtual void debug_get_stack_level_members(int p_level, List<String> *p_members, List<Variant> *p_values, int p_max_subitems = -1, int p_max_depth = -1) = 0; virtual ScriptInstance *debug_get_stack_level_instance(int p_level) { return NULL; } virtual void debug_get_globals(List<String> *p_globals, List<Variant> *p_values, int p_max_subitems = -1, int p_max_depth = -1) = 0; virtual String debug_parse_stack_level_expression(int p_level, const String &p_expression, int p_max_subitems = -1, int p_max_depth = -1) = 0; struct StackInfo { Ref<Script> script; int line; }; virtual Vector<StackInfo> debug_get_current_stack_info() { return Vector<StackInfo>(); } virtual void reload_all_scripts() = 0; virtual void reload_tool_script(const Ref<Script> &p_script, bool p_soft_reload) = 0; /* LOADER FUNCTIONS */ virtual void get_recognized_extensions(List<String> *p_extensions) const = 0; virtual void get_public_functions(List<MethodInfo> *p_functions) const = 0; virtual void get_public_constants(List<Pair<String, Variant> > *p_constants) const = 0; struct ProfilingInfo { StringName signature; uint64_t call_count; uint64_t total_time; uint64_t self_time; }; virtual void profiling_start() = 0; virtual void profiling_stop() = 0; virtual int profiling_get_accumulated_data(ProfilingInfo *p_info_arr, int p_info_max) = 0; virtual int profiling_get_frame_data(ProfilingInfo *p_info_arr, int p_info_max) = 0; virtual void *alloc_instance_binding_data(Object *p_object) { return NULL; } //optional, not used by all languages virtual void free_instance_binding_data(void *p_data) {} //optional, not used by all languages virtual void frame(); virtual ~ScriptLanguage(){}; }; extern uint8_t script_encryption_key[32]; class PlaceHolderScriptInstance : public ScriptInstance { Object *owner; List<PropertyInfo> properties; Map<StringName, Variant> values; ScriptLanguage *language; Ref<Script> script; public: virtual bool set(const StringName &p_name, const Variant &p_value); virtual bool get(const StringName &p_name, Variant &r_ret) const; virtual void get_property_list(List<PropertyInfo> *p_properties) const; virtual Variant::Type get_property_type(const StringName &p_name, bool *r_is_valid = NULL) const; virtual void get_method_list(List<MethodInfo> *p_list) const {} virtual bool has_method(const StringName &p_method) const { return false; } virtual Variant call(const StringName &p_method, VARIANT_ARG_LIST) { return Variant(); } virtual Variant call(const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error) { r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; return Variant(); } //virtual void call_multilevel(const StringName& p_method,VARIANT_ARG_LIST) { return Variant(); } //virtual void call_multilevel(const StringName& p_method,const Variant** p_args,int p_argcount,Variant::CallError &r_error) { return Variant(); } virtual void notification(int p_notification) {} virtual Ref<Script> get_script() const { return script; } virtual ScriptLanguage *get_language() { return language; } Object *get_owner() { return owner; } void update(const List<PropertyInfo> &p_properties, const Map<StringName, Variant> &p_values); //likely changed in editor virtual bool is_placeholder() const { return true; } virtual RPCMode get_rpc_mode(const StringName &p_method) const { return RPC_MODE_DISABLED; } virtual RPCMode get_rset_mode(const StringName &p_variable) const { return RPC_MODE_DISABLED; } PlaceHolderScriptInstance(ScriptLanguage *p_language, Ref<Script> p_script, Object *p_owner); ~PlaceHolderScriptInstance(); }; class ScriptDebugger { int lines_left; int depth; static ScriptDebugger *singleton; Map<int, Set<StringName> > breakpoints; ScriptLanguage *break_lang; public: typedef void (*RequestSceneTreeMessageFunc)(void *); struct LiveEditFuncs { void *udata; void (*node_path_func)(void *, const NodePath &p_path, int p_id); void (*res_path_func)(void *, const String &p_path, int p_id); void (*node_set_func)(void *, int p_id, const StringName &p_prop, const Variant &p_value); void (*node_set_res_func)(void *, int p_id, const StringName &p_prop, const String &p_value); void (*node_call_func)(void *, int p_id, const StringName &p_method, VARIANT_ARG_DECLARE); void (*res_set_func)(void *, int p_id, const StringName &p_prop, const Variant &p_value); void (*res_set_res_func)(void *, int p_id, const StringName &p_prop, const String &p_value); void (*res_call_func)(void *, int p_id, const StringName &p_method, VARIANT_ARG_DECLARE); void (*root_func)(void *, const NodePath &p_scene_path, const String &p_scene_from); void (*tree_create_node_func)(void *, const NodePath &p_parent, const String &p_type, const String &p_name); void (*tree_instance_node_func)(void *, const NodePath &p_parent, const String &p_path, const String &p_name); void (*tree_remove_node_func)(void *, const NodePath &p_at); void (*tree_remove_and_keep_node_func)(void *, const NodePath &p_at, ObjectID p_keep_id); void (*tree_restore_node_func)(void *, ObjectID p_id, const NodePath &p_at, int p_at_pos); void (*tree_duplicate_node_func)(void *, const NodePath &p_at, const String &p_new_name); void (*tree_reparent_node_func)(void *, const NodePath &p_at, const NodePath &p_new_place, const String &p_new_name, int p_at_pos); }; _FORCE_INLINE_ static ScriptDebugger *get_singleton() { return singleton; } void set_lines_left(int p_left); int get_lines_left() const; void set_depth(int p_depth); int get_depth() const; String breakpoint_find_source(const String &p_source) const; void insert_breakpoint(int p_line, const StringName &p_source); void remove_breakpoint(int p_line, const StringName &p_source); bool is_breakpoint(int p_line, const StringName &p_source) const; bool is_breakpoint_line(int p_line) const; void clear_breakpoints(); virtual void debug(ScriptLanguage *p_script, bool p_can_continue = true) = 0; virtual void idle_poll(); virtual void line_poll(); void set_break_language(ScriptLanguage *p_lang); ScriptLanguage *get_break_language() const; virtual void send_message(const String &p_message, const Array &p_args) = 0; virtual bool is_remote() const { return false; } virtual void request_quit() {} virtual void set_request_scene_tree_message_func(RequestSceneTreeMessageFunc p_func, void *p_udata) {} virtual void set_live_edit_funcs(LiveEditFuncs *p_funcs) {} virtual bool is_profiling() const = 0; virtual void add_profiling_frame_data(const StringName &p_name, const Array &p_data) = 0; virtual void profiling_start() = 0; virtual void profiling_end() = 0; virtual void profiling_set_frame_times(float p_frame_time, float p_idle_time, float p_physics_time, float p_physics_frame_time) = 0; ScriptDebugger(); virtual ~ScriptDebugger() { singleton = NULL; } }; #endif
42.077859
183
0.731583
323bc961fb2a74588663870c1c03312e3284255d
78
h
C
Junk/Prime10Trillion/Define.h
stackprobe/Annex
9338f57558c1261eb9ace9ae7fb11640c5266f49
[ "MIT" ]
null
null
null
Junk/Prime10Trillion/Define.h
stackprobe/Annex
9338f57558c1261eb9ace9ae7fb11640c5266f49
[ "MIT" ]
null
null
null
Junk/Prime10Trillion/Define.h
stackprobe/Annex
9338f57558c1261eb9ace9ae7fb11640c5266f49
[ "MIT" ]
1
2021-09-28T23:31:24.000Z
2021-09-28T23:31:24.000Z
#pragma once #define OUTPUT_FILE "C:\\temp\\P10T.dat" #define F_PRIME_SIZE 6
15.6
40
0.74359
d2c11ed2e7026d66d31b834b36a816dd737f7447
13,572
h
C
System/Library/Frameworks/SceneKit.framework/SCNRenderer.h
lechium/iPhoneOS_12.1.1_Headers
aac688b174273dfcbade13bab104461f463db772
[ "MIT" ]
12
2019-06-02T02:42:41.000Z
2021-04-13T07:22:20.000Z
System/Library/Frameworks/SceneKit.framework/SCNRenderer.h
lechium/iPhoneOS_12.1.1_Headers
aac688b174273dfcbade13bab104461f463db772
[ "MIT" ]
null
null
null
System/Library/Frameworks/SceneKit.framework/SCNRenderer.h
lechium/iPhoneOS_12.1.1_Headers
aac688b174273dfcbade13bab104461f463db772
[ "MIT" ]
3
2019-06-11T02:46:10.000Z
2019-12-21T14:58:16.000Z
/* * This header is generated by classdump-dyld 1.0 * on Saturday, June 1, 2019 at 6:46:29 PM Mountain Standard Time * Operating System: Version 12.1.1 (Build 16C5050a) * Image Source: /System/Library/Frameworks/SceneKit.framework/SceneKit * classdump-dyld is licensed under GPLv3, Copyright © 2013-2016 by Elias Limneos. */ #import <SceneKit/SceneKit-Structs.h> #import <libobjc.A.dylib/SCNSceneRenderer.h> #import <libobjc.A.dylib/SCNTechniqueSupport.h> @protocol OS_dispatch_queue, MTLTexture, SCNSceneRenderer; @class SCNScene, SCNNode, SKScene, AVAudioEngine, AVAudioEnvironmentNode, SCNRecursiveLock, NSObject, NSArray, SCNRendererTransitionContext, EAGLContext, SCNMTLRenderContext, UIColor, SCNTechnique, __SKSCNRenderer, SCNAuthoringEnvironment, NSString; @interface SCNRenderer : NSObject <SCNSceneRenderer, SCNTechniqueSupport> { SCNScene* _scene; SCNNode* _pointOfView; SCNNode* _pointOfCulling; SCNRecursiveLock* _lock; NSObject*<OS_dispatch_queue> __renderingQueue; unsigned long long __antialiasingMode; unsigned long long __preparePixelFormat; SCD_Struct_SC107* _framebufferInfo; id<MTLTexture> _mtlTexture; NSArray* _viewPoints; BOOL _pointOfViewWasSet; unsigned _shouldDeleteFramebuffer : 1; unsigned _rendersContinuously : 1; unsigned _isPrivateRenderer : 1; unsigned _isViewPrivateRenderer : 1; unsigned _renderingSnapshot : 1; unsigned _renderingPrepare : 1; unsigned _autoUpdate : 1; unsigned _disableLinearRendering : 1; double _currentSceneTime; double _currentSystemTime; double _deltaTime; double _forceSystemTime; double _lastSystemTime; double __nextFrameTime; SCNRendererTransitionContext* _transitionContext; BOOL _playing; BOOL _loops; BOOL _isAnimating; unsigned _adaptativeState0; unsigned _adaptativeEndFrame; unsigned _adaptativeTechniqueTimeStamp; id _delegate; C3DEngineContextRef _engineContext; unsigned long long _renderingAPI; SCNVector4 __viewport; double __aspectRatio; __drawableSafeAreaInsets; EAGLContext* _glContext; SCNMTLRenderContext* _renderContext; unsigned _jitteringEnabled : 1; unsigned _frozen : 1; unsigned _privateRendererShouldForwardSceneRendererDelegationMessagesToOwner : 1; SCD_Struct_SC108 _privateRendererOwnerDelegationConformance; SCD_Struct_SC108 _delegationConformance; UIColor* _backgroundColor; C3DColor4 _c3dBackgroundColor; SCNRenderer* _preloadRenderer; id<SCNSceneRenderer> _privateRendererOwner; SCNTechnique* _technique; SCNRenderer* _snapshotRenderer; __SKSCNRenderer* _overlayRenderer; id _overlayScene; BOOL _disableOverlays; float _contentScaleFactor; BOOL _isRunningInExtension; BOOL _watchAppInForeground; SCNAuthoringEnvironment* _authoringEnvironment; unsigned long long _debugOptions; BOOL _showStatistics; BOOL _showAuthoringEnvironment; double _statisticsTimeStamp; } @property (nonatomic,retain) SCNScene * scene; @property (nonatomic,readonly) double nextFrameTime; @property (readonly) unsigned long long hash; @property (readonly) Class superclass; @property (copy,readonly) NSString * description; @property (copy,readonly) NSString * debugDescription; @property (assign,nonatomic) double sceneTime; @property (assign,nonatomic,__weak) id<SCNSceneRendererDelegate> delegate; @property (getter=isPlaying) BOOL playing; @property (assign,nonatomic) BOOL loops; @property (nonatomic,retain) SCNNode * pointOfView; @property (assign,nonatomic) BOOL autoenablesDefaultLighting; @property (assign,getter=isJitteringEnabled,nonatomic) BOOL jitteringEnabled; @property (assign,nonatomic) BOOL showsStatistics; @property (assign,nonatomic) unsigned long long debugOptions; @property (nonatomic,retain) SKScene * overlaySKScene; @property (nonatomic,readonly) unsigned long long renderingAPI; @property (nonatomic,readonly) void* context; @property (nonatomic,readonly) id<MTLRenderCommandEncoder> currentRenderCommandEncoder; @property (nonatomic,readonly) id<MTLDevice> device; @property (nonatomic,readonly) unsigned long long colorPixelFormat; @property (nonatomic,readonly) unsigned long long depthPixelFormat; @property (nonatomic,readonly) unsigned long long stencilPixelFormat; @property (nonatomic,readonly) id<MTLCommandQueue> commandQueue; @property (nonatomic,readonly) AVAudioEngine * audioEngine; @property (nonatomic,readonly) AVAudioEnvironmentNode * audioEnvironmentNode; @property (nonatomic,retain) SCNNode * audioListener; @property (nonatomic,copy) SCNTechnique * technique; +(id)rendererWithContext:(id)arg1 options:(id)arg2 ; +(id)rendererWithDevice:(id)arg1 options:(id)arg2 ; -(void)_pause; -(void)setCurrentTime:(double)arg1 ; -(void)setPlaying:(BOOL)arg1 ; -(BOOL)loops; -(const void*)__CFObject; -(void)setLoops:(BOOL)arg1 ; -(double)nextFrameTime; -(void)_jitterAtStep:(unsigned long long)arg1 updateMainFramebuffer:(BOOL)arg2 redisplay:(BOOL)arg3 jitterer:(id)arg4 ; -(id)_authoringEnvironment; -(SKScene *)overlaySKScene; -(BOOL)showsStatistics; -(id)currentCommandBuffer; -(unsigned long long)debugOptions; -(id<MTLRenderCommandEncoder>)currentRenderCommandEncoder; -(void)setDebugOptions:(unsigned long long)arg1 ; -(double)_superSamplingFactor; -(SCNMatrix4)_screenTransform; -(C3DEngineContextRef)_engineContext; -(BOOL)_disableLinearRendering; -(BOOL)_showsAuthoringEnvironment; -(BOOL)_renderGraphEnabled; -(id)_renderingQueue; -(id)hitTestWithSegmentFromPoint:(SCNVector3)arg1 toPoint:(SCNVector3)arg2 options:(id)arg3 ; -(unsigned long long)renderingAPI; -(double)sceneTime; -(void)setSceneTime:(double)arg1 ; -(void)set_antialiasingMode:(unsigned long long)arg1 ; -(void)_updateEngineCallbacks; -(void)_UIOrientationDidChangeNotification:(id)arg1 ; -(id)_initWithOptions:(id)arg1 isPrivateRenderer:(BOOL)arg2 privateRendererOwner:(id)arg3 clearsOnDraw:(BOOL)arg4 context:(void*)arg5 renderingAPI:(unsigned long long)arg6 ; -(id)metalLayer; -(3)viewportWithLetterboxingIfNeeded:; -(void)_invalidateFramebuffer; -(id)_prepareSKRenderer; -(void)_prepareRenderTarget; -(void)_deleteGLFramebuffer; -(void)_createPrepareFramebufferIfNeeded; -(void)_createOffscreenFramebufferIfNeeded; -(void)_prepareGLRenderTarget; -(id)metalDevice; -(unsigned long long)_preparePixelFormat; -(unsigned long long)_antialiasingMode; -(SCNVector3)_projectPoint:(SCNVector3)arg1 viewport:(SCNVector4)arg2 ; -(SCNVector3)_unprojectPoint:(SCNVector3)arg1 viewport:(SCNVector4)arg2 ; -(long long)_getFrameIndex; -(void)_prepareForTransition:(id)arg1 outgoingScene:(id)arg2 outgoingPointOfView:(id)arg3 completionHandler:(/*^block*/id)arg4 ; -(id)_defaultPOVForScene:(id)arg1 ; -(double)_contentsScaleFactor; -(id)_setupSKRendererIfNeeded; -(void)_overlaysDidUpdate:(id)arg1 ; -(BOOL)_installContext; -(void)_beginFrame; -(void)_endFrame; -(void)set_preparePixelFormat:(unsigned long long)arg1 ; -(BOOL)_collectCompilationErrors; -(id)_renderContextMetal; -(BOOL)_preparePreloadRenderer; -(BOOL)_prepareObject:(id)arg1 shouldAbortBlock:(/*^block*/id)arg2 ; -(void)_releasePreloadRenderer; -(BOOL)_preloadResource:(id)arg1 abortHandler:(/*^block*/id)arg2 ; -(void)_setSceneTime:(double)arg1 ; -(void)updateCurrentTimeIfPlayingWithSystemTime:(double)arg1 ; -(double)_systemTime; -(void)_updateSystemTimeAndDeltaTimeWithCurrentTime:(double)arg1 ; -(void)_updateWithSystemTime:(double)arg1 ; -(BOOL)_needsRepetitiveRedraw; -(id)_hitTest:(CGPoint)arg1 viewport:(CGSize)arg2 options:(id)arg3 ; -(BOOL)_isNodeInsideFrustum:(id)arg1 withPointOfView:(id)arg2 viewport:(SCNVector4)arg3 ; -(id)_nodesInsideFrustumWithPointOfView:(id)arg1 viewport:(SCNVector4)arg2 ; -(void)setupAuthoringEnvironement; -(void)_resolveAndDiscardGL; -(void)set_showsAuthoringEnvironment:(BOOL)arg1 ; -(id)_compilationErrors; -(void)_reloadDebugOptions; -(void)_drawAtTime:(double)arg1 ; -(BOOL)isJitteringEnabled; -(void)_renderSceneWithEngineContext:(C3DEngineContextRef)arg1 sceneTime:(double)arg2 ; -(double)_computeNextFrameTime; -(void)set_nextFrameTime:(double)arg1 ; -(void)updateAndDrawStatisticsIfNeeded; -(BOOL)_needsRedrawAsap; -(BOOL)_drawSceneWithNewRenderer:(C3DSceneRef)arg1 ; -(BOOL)_drawSceneWithLegacyRenderer:(C3DSceneRef)arg1 ; -(void)_clearBackBuffer; -(void)set_systemTime:(double)arg1 ; -(void)set_deltaTime:(double)arg1 ; -(void)_installViewport; -(SCNVector4)_viewport; -(void)set_viewport:(SCNVector4)arg1 ; -(void)renderAtTime:(double)arg1 ; -(void)_drawScene:(C3DSceneRef)arg1 ; -(id)MTLTexture; -(void)_updatePointOfView; -(void)_renderAtTime:(double)arg1 ; -(void)_renderAtTime:(double)arg1 viewport:(CGRect)arg2 encoder:(id)arg3 passDescriptor:(id)arg4 commandQueue:(id)arg5 commandBuffer:(id)arg6 ; -(void)_installGLContextAndSetViewport; -(CGImageRef)createSnapshot:(double)arg1 ; -(void)_setBackingSize:(CGSize)arg1 ; -(id)snapshotRendererWithSize:(CGSize)arg1 ; -(id)_computedLightingEnvironmentMapsPath; -(void)set_computedLightingEnvironmentMapsPath:(id)arg1 ; -(id)snapshotAtTime:(double)arg1 ; -(void)_setupOffscreenRendererWithSize:(CGSize)arg1 ; -(void)setOverlaySKScene:(SKScene *)arg1 ; -(void)setJitteringEnabled:(BOOL)arg1 ; -(BOOL)autoenablesDefaultLighting; -(void)setAutoenablesDefaultLighting:(BOOL)arg1 ; -(BOOL)autoAdjustCamera; -(void)setAutoAdjustCamera:(BOOL)arg1 ; -(void)set_superSamplingFactor:(double)arg1 ; -(void)set_screenTransform:(SCNMatrix4)arg1 ; -(void)set_collectCompilationErrors:(BOOL)arg1 ; -(void)__setTransitionContext:(id)arg1 ; -(void)updateProbes:(id)arg1 atTime:(double)arg2 ; -(void)presentScene:(id)arg1 withTransition:(id)arg2 incomingPointOfView:(id)arg3 completionHandler:(/*^block*/id)arg4 ; -(BOOL)isNodeInsideFrustum:(id)arg1 withPointOfView:(id)arg2 ; -(id)nodesInsideFrustumWithPointOfView:(id)arg1 ; -(SCNVector3)projectPoint:(SCNVector3)arg1 ; -(SCNVector3)unprojectPoint:(SCNVector3)arg1 ; -(BOOL)prepareObject:(id)arg1 shouldAbortBlock:(/*^block*/id)arg2 ; -(void)prepareObjects:(id)arg1 withCompletionHandler:(/*^block*/id)arg2 ; -(void)setShowsStatistics:(BOOL)arg1 ; -(unsigned long long)depthPixelFormat; -(unsigned long long)stencilPixelFormat; -(AVAudioEngine *)audioEngine; -(AVAudioEnvironmentNode *)audioEnvironmentNode; -(SCNNode *)audioListener; -(void)setAudioListener:(SCNNode *)arg1 ; -(void)_setContentsScaleFactor:(double)arg1 ; -(CGSize)_backingSize; -(void)set_aspectRatio:(double)arg1 ; -(double)_aspectRatio; -(_C3DRendererContext*)_rendererContextGL; -(void)setPointOfCulling:(id)arg1 ; -(id)pointOfCulling; -(void)_projectPoints:(SCNVector3*)arg1 count:(unsigned long long)arg2 viewport:(SCNVector4)arg3 ; -(void)_didRenderScene:(id)arg1 ; -(void)_willRenderScene:(id)arg1 ; -(id)_readSubdivCacheForHash:(id)arg1 ; -(void)_writeSubdivCacheForHash:(id)arg1 dataProvider:(/*^block*/id)arg2 ; -(void)setScene:(id)arg1 completionHandler:(/*^block*/id)arg2 ; -(BOOL)disableOverlays; -(void)setDisableOverlays:(BOOL)arg1 ; -(id)_copyPassDescription; -(id)_copyRenderGraphDescription; -(void)set_renderGraphEnabled:(BOOL)arg1 ; -(void)_renderGraphFrameRecordingAtPath:(id)arg1 withCompletion:(/*^block*/id)arg2 ; -(BOOL)_recordWithoutExecute; -(void)set_recordWithoutExecute:(BOOL)arg1 ; -(id)programWithNode:(id)arg1 withMaterial:(id)arg2 ; -(BOOL)_privateRendererShouldForwardSceneRendererDelegationMessagesToOwner; -(void)set_privateRendererShouldForwardSceneRendererDelegationMessagesToOwner:(BOOL)arg1 ; -(double)_nextFrameTime; -(void)_drawOverlaySceneAtTime:(double)arg1 ; -(void)setRendersContinuously:(BOOL)arg1 ; -(BOOL)jitteringEnabled; -(id)_copyPerformanceStatistics; -(void)_displayLinkStatsTick; -(void)_displayLinkStatsTack; -(void)_runningInExtension; -(void)_presentFramebuffer; -(BOOL)_enablesDeferredShading; -(void)set_enablesDeferredShading:(BOOL)arg1 ; -(void)set_disableLinearRendering:(BOOL)arg1 ; -(1)_drawableSafeAreaInsets; -(void)set_drawableSafeAreaInsets:; -(void)_drawWithJitteringPresentationMode; -(void)_draw; -(void)renderWithViewport:(CGRect)arg1 commandBuffer:(id)arg2 passDescriptor:(id)arg3 ; -(void)renderAtTime:(double)arg1 viewport:(CGRect)arg2 encoder:(id)arg3 passDescriptor:(id)arg4 commandQueue:(id)arg5 ; -(void)renderAtTime:(double)arg1 commandBuffer:(id)arg2 viewPoints:(id)arg3 ; -(id)snapshotAtTime:(double)arg1 withSize:(CGSize)arg2 antialiasingMode:(unsigned long long)arg3 ; -(void)_updateProbes:(id)arg1 withProgress:(id)arg2 ; -(CGImageRef)copySnapshotWithSize:(CGSize)arg1 ; -(id)initOffscreenRendererWithSize:(CGSize)arg1 options:(id)arg2 ; -(id)privateRendererOwner; -(BOOL)renderMovieToURL:(id)arg1 size:(CGSize)arg2 antialiasingMode:(unsigned long long)arg3 attributes:(id)arg4 error:(id*)arg5 ; -(void)render; -(id<MTLCommandQueue>)commandQueue; -(void)updateAtTime:(double)arg1 ; -(id<MTLDevice>)device; -(BOOL)frozen; -(SCNTechnique *)technique; -(void)setTechnique:(SCNTechnique *)arg1 ; -(void)setScene:(SCNScene *)arg1 ; -(void)_play; -(void)setPointOfView:(SCNNode *)arg1 ; -(void)renderAtTime:(double)arg1 viewport:(CGRect)arg2 commandBuffer:(id)arg3 passDescriptor:(id)arg4 ; -(id)hitTest:(CGPoint)arg1 options:(id)arg2 ; -(id)currentRenderPassDescriptor; -(unsigned long long)colorPixelFormat; -(SCNNode *)pointOfView; -(id)init; -(void)dealloc; -(NSString *)description; -(void)setDelegate:(id<SCNSceneRendererDelegate>)arg1 ; -(void)setBackgroundColor:(id)arg1 ; -(id<SCNSceneRendererDelegate>)delegate; -(void)setContext:(void*)arg1 ; -(void*)context; -(id)backgroundColor; -(SCNScene *)scene; -(void)_setInterfaceOrientation:(long long)arg1 ; -(unsigned long long)_sampleCount; -(void)setFrozen:(BOOL)arg1 ; -(void)lock; -(void)unlock; -(void)_stop; -(double)currentTime; -(BOOL)isPlaying; -(void)_update:(C3DSceneRef)arg1 ; @end
41.631902
249
0.80445
cf93cda9475bd5170777d0a48f2adcbbb2498327
2,008
h
C
OOP/GstHoughCircle.h
stevewells20/host-video
5fb8c58917e549c75f98458345c622f5138f9b7d
[ "MIT" ]
null
null
null
OOP/GstHoughCircle.h
stevewells20/host-video
5fb8c58917e549c75f98458345c622f5138f9b7d
[ "MIT" ]
null
null
null
OOP/GstHoughCircle.h
stevewells20/host-video
5fb8c58917e549c75f98458345c622f5138f9b7d
[ "MIT" ]
null
null
null
#ifndef GstHoughCircle_H // avoid repeated expansion #define GstHoughCircle_H #include "opencv2/imgcodecs.hpp" #include <opencv2/highgui/highgui.hpp> #include <opencv2/imgproc/imgproc.hpp> #include <opencv2/objdetect.hpp> #include <opencv2/opencv.hpp> #include <stdio.h> #include <string> #include "GstAbsFilter.h" using namespace cv; using namespace std; class GstHoughCircle : public GstAbsFilter { private: Mat temp; public: bool on = true; enum trackType {MIN_RADIUS, MAX_RADIUS, DISPERSION, LAST}; GstHoughCircle() { GstAbsFilter::numTrackbars=LAST; GstAbsFilter::trackbars=new TrackbarStruct[LAST]; cout << "GstHoughCircle created!" << endl; /////// // trackbars[x] = {string "Name_of_variable", // int min_slider, // int max_slider, // int max_capacity } trackbars[MIN_RADIUS] = {"min Radius", 15, 200}; trackbars[MAX_RADIUS] = {"max Radius", 40, 200}; trackbars[DISPERSION] = {"Dispersion", 20, 200}; ////// } ~GstHoughCircle() { cout << "GstHoughCircle removed!" << endl; } static void onChange(int i, void* v) { ; } void filter(const Mat &src, const Mat &src_gray, Mat &dst, Rect2d &ROI) { if (on) { ///////////////////////////////Image manipulation////////////////////////////// // cout << "GstHoughCircle.filter()" << endl; medianBlur(src_gray, temp, 5); vector<Vec3f> circles; HoughCircles(temp, circles, HOUGH_GRADIENT, 1, temp.rows / trackbars[DISPERSION].val, 100, 30, trackbars[MIN_RADIUS].val, trackbars[MAX_RADIUS].val ); for (size_t i = 0; i < circles.size(); i++) { Vec3i c = circles[i]; Point center = Point(c[0], c[1]); // circle center circle(dst, center, 1, Scalar(0, 100, 100), 3, LINE_AA); // circle outline int radius = c[2]; circle(dst, center, radius, Scalar(255, 0, 255), 3, LINE_AA); } } //////////////////////////////////////////////////////////////////////////// } }; #endif
25.1
79
0.592131
d0351f908a8ebbff5941ffa061667dd5836597c3
1,363
h
C
third_party/WebKit/Source/core/animation/SVGInterpolationType.h
maidiHaitai/haitaibrowser
a232a56bcfb177913a14210e7733e0ea83a6b18d
[ "BSD-3-Clause" ]
1
2020-09-15T08:43:34.000Z
2020-09-15T08:43:34.000Z
third_party/WebKit/Source/core/animation/SVGInterpolationType.h
maidiHaitai/haitaibrowser
a232a56bcfb177913a14210e7733e0ea83a6b18d
[ "BSD-3-Clause" ]
null
null
null
third_party/WebKit/Source/core/animation/SVGInterpolationType.h
maidiHaitai/haitaibrowser
a232a56bcfb177913a14210e7733e0ea83a6b18d
[ "BSD-3-Clause" ]
null
null
null
// Copyright 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef SVGInterpolationType_h #define SVGInterpolationType_h #include "core/animation/InterpolationType.h" namespace blink { class SVGPropertyBase; class SVGInterpolationType : public InterpolationType { protected: SVGInterpolationType(const QualifiedName& attribute) : InterpolationType(PropertyHandle(attribute)) { } const QualifiedName& attribute() const { return getProperty().svgAttribute(); } virtual InterpolationValue maybeConvertNeutral(const InterpolationValue& underlying, ConversionCheckers&) const; virtual InterpolationValue maybeConvertSVGValue(const SVGPropertyBase&) const = 0; virtual SVGPropertyBase* appliedSVGValue(const InterpolableValue&, const NonInterpolableValue*) const = 0; InterpolationValue maybeConvertSingle(const PropertySpecificKeyframe&, const InterpolationEnvironment&, const InterpolationValue& underlying, ConversionCheckers&) const override; InterpolationValue maybeConvertUnderlyingValue(const InterpolationEnvironment&) const override; void apply(const InterpolableValue&, const NonInterpolableValue*, InterpolationEnvironment&) const override; }; } // namespace blink #endif // SVGInterpolationType_h
40.088235
182
0.805576
6513e87301c3af7fed56d9951832cbc41261e381
427
h
C
HHExtend/HHExtend/Main/Classes/ScrollList/SubModule/Model/TwoLinkageModel.h
YYDreams/HHToolCategory
6eff6a3bb8441841816830c0ba8d813c79a2a438
[ "Apache-2.0" ]
1
2019-11-02T11:19:29.000Z
2019-11-02T11:19:29.000Z
HHExtend/HHExtend/Main/Classes/ScrollList/SubModule/Model/TwoLinkageModel.h
YYDreams/HHToolCategory
6eff6a3bb8441841816830c0ba8d813c79a2a438
[ "Apache-2.0" ]
null
null
null
HHExtend/HHExtend/Main/Classes/ScrollList/SubModule/Model/TwoLinkageModel.h
YYDreams/HHToolCategory
6eff6a3bb8441841816830c0ba8d813c79a2a438
[ "Apache-2.0" ]
null
null
null
// // TwoLinkageModel.h // HHExtend // // Created by flowerflower on 2018/3/28. // Copyright © 2018年 花花. All rights reserved. // #import "BaseModel.h" @interface TwoLinkageModel : BaseModel @property(nonatomic,copy) NSString *title; // <#注释#> @property(nonatomic,copy) NSString *desc; // <#注释#> @property(nonatomic,copy) NSString *index; // <#注释#> @property(nonatomic,assign) CGFloat cellHight; // <#注释#> @end
18.565217
58
0.672131
04a621f8bf9deac788e3822fec8dd96737ecf5b8
214
c
C
lupv1e/ch13/xmalloc.c
yuweijun/books
5be0fec3adce236875fef0f9e1ed8d91ef4acbfe
[ "MIT" ]
1
2018-07-02T12:03:02.000Z
2018-07-02T12:03:02.000Z
lupv1e/ch13/xmalloc.c
yuweijun/books
5be0fec3adce236875fef0f9e1ed8d91ef4acbfe
[ "MIT" ]
null
null
null
lupv1e/ch13/xmalloc.c
yuweijun/books
5be0fec3adce236875fef0f9e1ed8d91ef4acbfe
[ "MIT" ]
null
null
null
#include <sys/types.h> #include "err_exit.h" void * xmalloc(size_t size) { register void * value = malloc(size); if (value == 0) err_exit ("virtual memory exhausted"); return value; }
21.4
47
0.602804
ca367eb3884001a444047a1b2c642c2d5a43ffd9
8,056
h
C
chromium/content/public/browser/download_manager.h
wedataintelligence/vivaldi-source
22a46f2c969f6a0b7ca239a05575d1ea2738768c
[ "BSD-3-Clause" ]
null
null
null
chromium/content/public/browser/download_manager.h
wedataintelligence/vivaldi-source
22a46f2c969f6a0b7ca239a05575d1ea2738768c
[ "BSD-3-Clause" ]
null
null
null
chromium/content/public/browser/download_manager.h
wedataintelligence/vivaldi-source
22a46f2c969f6a0b7ca239a05575d1ea2738768c
[ "BSD-3-Clause" ]
null
null
null
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // // The DownloadManager object manages the process of downloading, including // updates to the history system and providing the information for displaying // the downloads view in the Destinations tab. There is one DownloadManager per // active browser context in Chrome. // // Download observers: // Objects that are interested in notifications about new downloads, or progress // updates for a given download must implement one of the download observer // interfaces: // DownloadManager::Observer: // - allows observers, primarily views, to be notified when changes to the // set of all downloads (such as new downloads, or deletes) occur // Use AddObserver() / RemoveObserver() on the appropriate download object to // receive state updates. // // Download state persistence: // The DownloadManager uses the history service for storing persistent // information about the state of all downloads. The history system maintains a // separate table for this called 'downloads'. At the point that the // DownloadManager is constructed, we query the history service for the state of // all persisted downloads. #ifndef CONTENT_PUBLIC_BROWSER_DOWNLOAD_MANAGER_H_ #define CONTENT_PUBLIC_BROWSER_DOWNLOAD_MANAGER_H_ #include <stdint.h> #include <string> #include <vector> #include "base/callback.h" #include "base/files/file_path.h" #include "base/sequenced_task_runner_helpers.h" #include "base/time/time.h" #include "content/public/browser/download_interrupt_reasons.h" #include "content/public/browser/download_item.h" #include "content/public/browser/download_url_parameters.h" #include "net/base/net_errors.h" #include "net/log/net_log.h" class GURL; namespace url { class Origin; } namespace content { class BrowserContext; class ByteStreamReader; class DownloadManagerDelegate; class DownloadQuery; class DownloadRequestHandle; struct DownloadCreateInfo; // Browser's download manager: manages all downloads and destination view. class CONTENT_EXPORT DownloadManager : public base::SupportsUserData::Data { public: ~DownloadManager() override {} // Sets/Gets the delegate for this DownloadManager. The delegate has to live // past its Shutdown method being called (by the DownloadManager). virtual void SetDelegate(DownloadManagerDelegate* delegate) = 0; virtual DownloadManagerDelegate* GetDelegate() const = 0; // Shutdown the download manager. Content calls this when BrowserContext is // being destructed. If the embedder needs this to be called earlier, it can // call it. In that case, the delegate's Shutdown() method will only be called // once. virtual void Shutdown() = 0; // Interface to implement for observers that wish to be informed of changes // to the DownloadManager's collection of downloads. class CONTENT_EXPORT Observer { public: // A DownloadItem was created. This item may be visible before the filename // is determined; in this case the return value of GetTargetFileName() will // be null. This method may be called an arbitrary number of times, e.g. // when loading history on startup. As a result, consumers should avoid // doing large amounts of work in OnDownloadCreated(). TODO(<whoever>): // When we've fully specified the possible states of the DownloadItem in // download_item.h, we should remove the caveat above. virtual void OnDownloadCreated( DownloadManager* manager, DownloadItem* item) {} // A SavePackage has successfully finished. virtual void OnSavePackageSuccessfullyFinished( DownloadManager* manager, DownloadItem* item) {} // Called when the DownloadManager is being destroyed to prevent Observers // from calling back to a stale pointer. virtual void ManagerGoingDown(DownloadManager* manager) {} protected: virtual ~Observer() {} }; typedef std::vector<DownloadItem*> DownloadVector; // Add all download items to |downloads|, no matter the type or state, without // clearing |downloads| first. virtual void GetAllDownloads(DownloadVector* downloads) = 0; // Called by a download source (Currently DownloadResourceHandler) // to initiate the non-source portions of a download. // Returns the id assigned to the download. If the DownloadCreateInfo // specifies an id, that id will be used. virtual void StartDownload( scoped_ptr<DownloadCreateInfo> info, scoped_ptr<ByteStreamReader> stream, const DownloadUrlParameters::OnStartedCallback& on_started) = 0; // Remove downloads which are same-origin with the given origin and pertain to // the given time constraints. (See |RemoveDownloadsBetween|.) virtual int RemoveDownloadsByOriginAndTime(const url::Origin& origin, base::Time remove_begin, base::Time remove_end) = 0; // Remove downloads after remove_begin (inclusive) and before remove_end // (exclusive). You may pass in null Time values to do an unbounded delete // in either direction. virtual int RemoveDownloadsBetween(base::Time remove_begin, base::Time remove_end) = 0; // Remove downloads will delete all downloads that have a timestamp that is // the same or more recent than |remove_begin|. The number of downloads // deleted is returned back to the caller. virtual int RemoveDownloads(base::Time remove_begin) = 0; // Remove all downloads will delete all downloads. The number of downloads // deleted is returned back to the caller. virtual int RemoveAllDownloads() = 0; // See DownloadUrlParameters for details about controlling the download. virtual void DownloadUrl(scoped_ptr<DownloadUrlParameters> parameters) = 0; // Allow objects to observe the download creation process. virtual void AddObserver(Observer* observer) = 0; // Remove a download observer from ourself. virtual void RemoveObserver(Observer* observer) = 0; // Called by the embedder, after creating the download manager, to let it know // about downloads from previous runs of the browser. virtual DownloadItem* CreateDownloadItem( uint32_t id, const base::FilePath& current_path, const base::FilePath& target_path, const std::vector<GURL>& url_chain, const GURL& referrer_url, const std::string& mime_type, const std::string& original_mime_type, const base::Time& start_time, const base::Time& end_time, const std::string& etag, const std::string& last_modified, int64_t received_bytes, int64_t total_bytes, DownloadItem::DownloadState state, DownloadDangerType danger_type, DownloadInterruptReason interrupt_reason, bool opened) = 0; // The number of in progress (including paused) downloads. // Performance note: this loops over all items. If profiling finds that this // is too slow, use an AllDownloadItemNotifier to count in-progress items. virtual int InProgressCount() const = 0; // The number of in progress (including paused) downloads. // Performance note: this loops over all items. If profiling finds that this // is too slow, use an AllDownloadItemNotifier to count in-progress items. // This excludes downloads that are marked as malicious. virtual int NonMaliciousInProgressCount() const = 0; virtual BrowserContext* GetBrowserContext() const = 0; // Checks whether downloaded files still exist. Updates state of downloads // that refer to removed files. The check runs in the background and may // finish asynchronously after this method returns. virtual void CheckForHistoryFilesRemoval() = 0; // Get the download item for |id| if present, no matter what type of download // it is or state it's in. virtual DownloadItem* GetDownload(uint32_t id) = 0; }; } // namespace content #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_MANAGER_H_
41.525773
80
0.741311
a9eee2262d4e1894f38cbbf1a8f785452ce2bfca
24,139
h
C
Include/Theron/Defines.h
gnu-sandhi/Theron
e31d0a51e9ea245e7a981365fb58023d24e8649d
[ "BSL-1.0" ]
64
2015-01-07T05:52:19.000Z
2022-02-22T09:14:47.000Z
Include/Theron/Defines.h
jessesimpson/Theron
e31d0a51e9ea245e7a981365fb58023d24e8649d
[ "BSL-1.0" ]
null
null
null
Include/Theron/Defines.h
jessesimpson/Theron
e31d0a51e9ea245e7a981365fb58023d24e8649d
[ "BSL-1.0" ]
33
2015-02-16T04:18:25.000Z
2021-04-20T01:18:49.000Z
// Copyright (C) by Ashton Mason. See LICENSE.txt for licensing information. #ifndef THERON_DEFINES_H #define THERON_DEFINES_H /** \file Defines.h \brief Global user-configurable defines. This file defines, in one place, all the defines which can be defined in order to override default options within Theron. Some of them enable or disable debugging functionality, others abstract away platform-specific detail such as code inlining and variable alignment, and still others control aspects of the operation of Theron. \note The intention is that most users will be able to leave these defines at their default values, hardly knowing they're there. But if you do need to override one of them then the best way to do it is to define the define globally in your build (for example as a compiler option), rather than by editing this file. The definitions of the defines in this file are all conditional on the define having not already been defined, so can be easily overridden just by defining the defines yourself globally in your build. */ /** \def THERON_VERSION \brief Exposes the version number of the Theron release in use. This define is defined automatically and matches the major and minor version numbers used to name official releases. Its definition can't be overridden by the user. */ #define THERON_VERSION "5.01" /** \def THERON_WINDOWS \brief Controls the use of Windows features. This define is defined automatically if not predefined by the user. When automatically defined, it is defined as 1 if the Windows platform is detected, and 0 otherwise. In particular this define controls the use of Windows thread and atomic functionality. If Windows functionality is available then it is used in preference to other APIs. The default definition can be overridden by defining it globally in the build - either via the makefile command line options, on the GCC command line using -D, or in the project preprocessor settings in Visual Studio. */ #if !defined(THERON_WINDOWS) #if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) || defined(_WIN64) || defined(WINDOWS) || defined(_WIN32_CE) || defined(__CYGWIN__) #define THERON_WINDOWS 1 #else #define THERON_WINDOWS 0 #endif #endif // THERON_WINDOWS /** \def THERON_MSVC \brief Enables the use of Microsoft Visual C++ features. This define is defined automatically if not predefined by the user. When automatically defined, it is defined as 1 if the Microsoft Visual C++ compiler is detected, and 0 otherwise. The default definition can be overridden by defining it globally in the build - either via the makefile command line options, on the GCC command line using -D, or in the project preprocessor settings in Visual Studio. */ #if !defined(THERON_MSVC) #if defined(_MSC_VER) #define THERON_MSVC 1 #else #define THERON_MSVC 0 #endif #endif // THERON_MSVC /** \def THERON_GCC \brief Enables the use of GCC-specific features. This define is defined automatically if not predefined by the user. When automatically defined, it is defined as 1 if a version of the GCC compiler is detected, and 0 otherwise. The default definition can be overridden by defining it globally in the build - either via the makefile command line options, on the GCC command line using -D, or in the project preprocessor settings in Visual Studio. */ #if !defined(THERON_GCC) #if defined(__GNUC__) #define THERON_GCC 1 #else #define THERON_GCC 0 #endif #endif // THERON_GCC /** \def THERON_64BIT \brief Enables the use of 64-bit environment features. This define is defined automatically if not predefined by the user. When automatically defined, it is defined as 1 if a 64-bit environment is detected, as 0 if a 32-bit environment is detected, or as 1 by default if the environment isn't recognized. Pointers are assumed to be 8 bytes wide when it is defined as 1 and 4 bytes wide when it is defined as 0. The default definition can be overridden by defining it globally in the build - either via the makefile command line options, on the GCC command line using -D, or in the project preprocessor settings in Visual Studio. */ #if !defined(THERON_64BIT) #if THERON_WINDOWS #if defined(_WIN64) #define THERON_64BIT 1 #else #define THERON_64BIT 0 #endif #elif THERON_GCC #if defined(__x86_64__) || defined(__ppc64__) #define THERON_64BIT 1 #else #define THERON_64BIT 0 #endif #else // Assume 64-bit environment by default. #define THERON_64BIT 1 #endif #endif // THERON_64BIT /** \def THERON_DEBUG \brief Controls generation of code for asserts, allocation checking, etc. This is a global define that decides default values for several other defines that individually control aspects of code generation related to debugging. The default definition can be overridden by defining it globally in the build - either via the makefile command line options, on the GCC command line using -D, or in the project preprocessor settings in Visual Studio. If not defined, then THERON_DEBUG defaults to 1 in GCC builds when NDEBUG is not defined, and to 1 in other builds (including Visual C++) when _DEBUG is defined. Otherwise it defaults to 0, disabling debug-related code generation. If THERON_DEBUG is defined as 1, then \ref THERON_ENABLE_ASSERTS defaults to 1, \ref THERON_FORCEINLINE defaults to 'inline', and \ref THERON_ENABLE_DEFAULTALLOCATOR_CHECKS defaults to 1. Otherwise those defines default to 0, forced inlining, and 0, respectively. */ #if !defined(THERON_DEBUG) #if THERON_MSVC #if defined(_DEBUG) #define THERON_DEBUG 1 #else #define THERON_DEBUG 0 #endif #elif THERON_GCC #if defined(NDEBUG) #define THERON_DEBUG 0 #else #define THERON_DEBUG 1 #endif #else #if defined(_DEBUG) #define THERON_DEBUG 1 #else #define THERON_DEBUG 0 #endif #endif #endif // THERON_DEBUG /** \def THERON_ENABLE_ASSERTS \brief Enables generation of code for asserts within Theron. Defaults to 0, disabling asserts, when \ref THERON_DEBUG is 0. Defaults to 1, enabling asserts, when \ref THERON_DEBUG is 1. The default definition can be overridden by defining it globally in the build - either via the makefile command line options, on the GCC command line using -D, or in the project preprocessor settings in Visual Studio. */ #if !defined(THERON_ENABLE_ASSERTS) #if THERON_DEBUG #define THERON_ENABLE_ASSERTS 1 #else #define THERON_ENABLE_ASSERTS 0 #endif #endif /** \def THERON_BOOST \brief Controls whether Boost functionality is used. If THERON_BOOST is defined as 1 then Boost is used, including using boost::thread for thread support and boost::atomic (packaged with Theron) for atomic support. This define is defined automatically if not predefined by the user. When automatically defined, it is defined as 0, disabling the use of Boost. In Windows builds the Windows API is used instead, and in GCC builds Linux/POSIX API is used instead (pthreads). Note that the pthreads support is slow due to emulating atomic operations with locks, therefore it is preferable to use Boost or C++11 if available. The default definition can be overridden by defining it globally in the build - either via the makefile command line options, on the GCC command line using -D, or in the project preprocessor settings in Visual Studio. */ /** \def THERON_CPP11 \brief Controls whether C++11 features are used. If THERON_CPP11 is defined as 1 then C++11 features are used, including using std::thread for thread support and std::atomic for atomic support. This requires either a C++ compiler with built-in support for these C++11 features (eg. a recent version of GCC such as 4.6 or later) or support provided by some third-party library (eg. JustThread). This define is defined automatically if not predefined by the user. When automatically defined, it is defined as 0, disabling the use of C++11. In Windows builds the Windows API is used instead, and in GCC builds Linux/POSIX API is used instead (pthreads). Note that the pthreads support is slow due to emulating atomic operations with locks, therefore it is preferable to use Boost or C++11 if available. The default definition can be overridden by defining it globally in the build - either via the makefile command line options, on the GCC command line using -D, or in the project preprocessor settings in Visual Studio. */ /** \def THERON_POSIX \brief Controls whether POSIX features are used. If THERON_POSIX is defined as 1 then POSIX features may be used, including using POSIX threads (pthreads) as the underlying thread support. This define is defined automatically if not predefined by the user. When automatically defined, it is defined as 1 unless \ref THERON_MSVC is enabled, enabling the use of POSIX features as a fallback with non-MSVC compilers if no alternative API is available. Note that the pthreads support is slow due to emulating atomic operations with locks, therefore it is preferable to use Boost or C++11 features if available. The default definition can be overridden by defining it globally in the build - either via the makefile command line options, on the GCC command line using -D, or in the project preprocessor settings in Visual Studio. */ // Support for legacy defines - use THERON_BOOST or THERON_CPP11 instead! #if defined(THERON_USE_BOOST_THREADS) || defined(THERON_USE_STD_THREADS) #if THERON_USE_BOOST_THREADS #define THERON_BOOST 1 #define THERON_CPP11 0 #elif THERON_USE_STD_THREADS #define THERON_BOOST 0 #define THERON_CPP11 1 #endif #endif // Default definitions - but don't replace any user-defined definitions. #if !defined(THERON_BOOST) #define THERON_BOOST 0 #endif #if !defined(THERON_CPP11) #define THERON_CPP11 0 #endif #if !defined(THERON_POSIX) #if THERON_MSVC #define THERON_POSIX 0 #else #define THERON_POSIX 1 #endif #endif /** \def BOOST_THREAD_BUILD_LIB \brief Controls whether boost::thread is built as a static library or dynamic/shared library. Unless specified otherwise, Theron defaults to building boost::thread as a library. Somewhat bizarrely Boost defaults to dynamically linked under GCC without this define (at least in Boost 1.47). */ #if THERON_BOOST #if !defined(BOOST_THREAD_BUILD_DLL) && !defined(BOOST_THREAD_BUILD_LIB) #define BOOST_THREAD_BUILD_LIB 1 #endif // #endif // THERON_BOOST /** \def THERON_FORCEINLINE \brief Controls force-inlining of core functions within Theron. This define defines the keyword used for inlined function definitions. It is defined automatically if not predefined by the user. When automatically defined, in release builds (when \ref THERON_DEBUG is 0), it defaults to forced inlining in MSVC and GCC builds. In debug builds and on all other platforms, it defaults to the inline keyword, which is required on functions defined within headers. Many functions within Theron are force-inlined via compiler keywords, to avoid function call overhead, resulting in a significant speedup over optionally inlined code. The use of forced inlining does however lead to some code bloat. Therefore it may be desirable to turn it off in some builds. Moreover, it makes debugging difficult when enabled, so it is useful to be able to disable it - and for it to be disabled by default - in debug builds. The default definition can be overridden by defining it globally in the build - either via the makefile command line options, on the GCC command line using -D, or in the project preprocessor settings in Visual Studio. */ #if !defined(THERON_FORCEINLINE) #if THERON_DEBUG #define THERON_FORCEINLINE inline #else // THERON_DEBUG #if THERON_MSVC #define THERON_FORCEINLINE __forceinline #elif THERON_GCC #define THERON_FORCEINLINE inline __attribute__((always_inline)) #else #define THERON_FORCEINLINE inline #endif #endif // THERON_DEBUG #endif // THERON_FORCEINLINE /** \def THERON_NOINLINE \brief Used to prevent functions from being inlined. The default definition can be overridden by defining it globally in the build - either via the makefile command line options, on the GCC command line using -D, or in the project preprocessor settings in Visual Studio. */ #if !defined(THERON_NOINLINE) #if THERON_MSVC #define THERON_NOINLINE __declspec(noinline) #elif THERON_GCC #define THERON_NOINLINE __attribute__((noinline)) #else #define THERON_NOINLINE #endif #endif // THERON_NOINLINE /** \def THERON_ENABLE_DEFAULTALLOCATOR_CHECKS \brief Enables debug checking of allocations in the \ref Theron::DefaultAllocator "DefaultAllocator". This define controls the use of debugging checks in the default allocator used within Theron. It is defined automatically if not predefined by the user. When automatically defined, it is defined as 0 when \ref THERON_DEBUG is 0, and 1 when \ref THERON_DEBUG is 1, so that debug checks are enabled only in debug builds. The default definition can be overridden by defining it globally in the build - either via the makefile command line options, on the GCC command line using -D, or in the project preprocessor settings in Visual Studio. */ #if !defined(THERON_ENABLE_DEFAULTALLOCATOR_CHECKS) // Support THERON_ENABLE_SIMPLEALLOCATOR_CHECKS as a legacy synonym. #if defined(THERON_ENABLE_SIMPLEALLOCATOR_CHECKS) #define THERON_ENABLE_DEFAULTALLOCATOR_CHECKS THERON_ENABLE_SIMPLEALLOCATOR_CHECKS #else #if THERON_DEBUG #define THERON_ENABLE_DEFAULTALLOCATOR_CHECKS 1 #else #define THERON_ENABLE_DEFAULTALLOCATOR_CHECKS 0 #endif // THERON_DEBUG #endif // defined(THERON_ENABLE_SIMPLEALLOCATOR_CHECKS) #endif // THERON_ENABLE_DEFAULTALLOCATOR_CHECKS /** \def THERON_ENABLE_MESSAGE_REGISTRATION_CHECKS \brief Controls run-time reporting of unregistered message types. This define controls run-time reporting of unregistered message types within Theron. It is defined automatically if not predefined by the user. When automatically defined, it is defined as 0, disabling the runtime checks. The default definition can be overridden by defining it globally in the build - either via the makefile command line options, on the GCC command line using -D, or in the project preprocessor settings in Visual Studio. Message types can be registered using the \ref THERON_REGISTER_MESSAGE macro, which notifies Theron of the unique name of a message type. Registering the message types sent within an application causes Theron's internal type ID system to be used to identity messages when they arrive at an actor, instead of the built-in C++ typeid system. This has two useful effects: Firstly, it avoids calling the slow C++ dynamic_cast operator, and instead performs a simple check on the unique name associated with each message type (a fast pointer comparison). Secondly, it allows the C++ compiler's built-in Run-Time Type Information (RTTI) system to be disabled, which avoids storing compiler-generated type IDs in classes. However this efficiency comes with a catch: once we start registering message types, we have to remember to consistently always register *every* message type used by the application. If any of the message types are omitted, then errors may ensue (usually caught by asserts, in debug builds). To make this easier, define \ref THERON_ENABLE_MESSAGE_REGISTRATION_CHECKS as 1 in your local build. This enables run-time error reports that helpfully detect message types that haven't been registered. The default definition can be overridden by defining it globally in the build - either via the makefile command line options, on the GCC command line using -D, or in the project preprocessor settings in Visual Studio. Of course, you should only enable this checking if you are actually intending to register your message types! If you don't care about the overheads of RTTI and dynamic_cast, then it's perfectly fine (and a lot simpler) to just not register *any* message types at all -- and leave this define disabled -- and then everything will work as normal. \note Note that unregistered message types are reported by asserts, so are only active if assert code is also enabled via \ref THERON_ENABLE_ASSERTS. */ #if !defined(THERON_ENABLE_MESSAGE_REGISTRATION_CHECKS) #define THERON_ENABLE_MESSAGE_REGISTRATION_CHECKS 0 #endif // THERON_ENABLE_MESSAGE_REGISTRATION_CHECKS /** \def THERON_ENABLE_UNHANDLED_MESSAGE_CHECKS \brief Enables reporting of undelivered and unhandled messages, which is enabled by default. This define controls reporting of messages that are either not delivered (because no entity exists at the address to which the message is sent, in which case \ref Theron::Actor::Send "Actor::Send" and \ref Theron::Framework::Send "Framework::Send" return false), or not handled by the actor to which they were delivered (because the actor has no message handlers registered for the message type and no default message handler). Such messages are passed to a \ref Theron::Framework::SetFallbackHandler "fallback handler" registered with the \ref Theron::Framework "Framework" concerned (that within which the message was sent, in the case of undelivered messages, and that containing the unresponsive actor, in the case of unhandled messages). The default fallback handler registered with each framework, which is used unless replaced explicitly by a custom user-specified fallback handler, reports such messages to stderr using printf, and asserts, if asserts are enabled with \ref THERON_ENABLE_ASSERTS. This define controls the activation of the default fallback handler. If defined as 1, the default fallback handler reports failures. If defined as 0, it does nothing, and unhandled messages are silently unreported. Defining \ref THERON_ENABLE_UNHANDLED_MESSAGE_CHECKS to 0 effectively turns off the checking. If the intention is to replace the reporting mechanism, then use \ref Theron::Framework::SetFallbackHandler "SetFallbackHandler" to replace the default handler entirely with a custom handler implementation. Defaults to 1 (enabled). Set this to 0 to disable the reporting. The default definition can be overridden by defining it globally in the build - either via the makefile command line options, on the GCC command line using -D, or in the project preprocessor settings in Visual Studio. */ #if !defined(THERON_ENABLE_UNHANDLED_MESSAGE_CHECKS) #define THERON_ENABLE_UNHANDLED_MESSAGE_CHECKS 1 #endif /** \def THERON_ENABLE_BUILD_CHECKS \brief Enables automatic checking of build consistency between the Theron library and client code. This define controls the use of automatic checks that compare the build settings used to build the Theron library with those used to build any client code in which Framework objects are constructed. The checks are performed at framework construction time and compare generated strings that characterize the build settings in the library and (inlined within) client code. Because Theron includes a significant amount of inlined code which gets generated within the client executable rather than within the Theron library itself, it is important that Theron code is generated consistently across these two potentially different environments. Many of the defines defined in Theron/Defines.h affect code generation in non-trivial ways, and it can be unsafe to mix code built with different definitions of these defines. In particular, some of the most important defines are, by default, defined differently in debug and release builds. For example, mixing a debug build of the Theron library with a release build of Theron-based client code, or vice versa, will almost always result in hard-to-find errors. Defaults to 1 (enabled). Set this to 0 to disable the checking if you wish to mix different builds and know for certain that it is safe to do so. The default definition can be overridden by defining it globally in the build - either via the makefile command line options, on the GCC command line using -D, or in the project preprocessor settings in Visual Studio. */ #if !defined(THERON_ENABLE_BUILD_CHECKS) #define THERON_ENABLE_BUILD_CHECKS 1 #endif /** \def THERON_CACHELINE_ALIGNMENT \brief Describes the size of a cache line on the target platform. This define is used internally to align allocated structures to cache-line boundaries. By default it is set to 64 bytes, the size of a cache line on many systems. The value of \ref THERON_CACHELINE_ALIGNMENT can be overridden by defining it globally in the build (in the makefile using -D, or in the project preprocessor settings in Visual Studio). The default definition can be overridden by defining it globally in the build - either via the makefile command line options, on the GCC command line using -D, or in the project preprocessor settings in Visual Studio. By defining THERON_CACHELINE_ALIGNMENT globally within your own project build, you can override the default value and specify a different size, either to optimize allocations for a system with a different cache-line width, or else to disable cache-line alignment completely by specifying a harmless alignment such as 4 bytes. \note Changing this value is unlikely to provide any benefit unless you know for sure that you need to change it. */ #if !defined(THERON_CACHELINE_ALIGNMENT) #define THERON_CACHELINE_ALIGNMENT 64 #endif /** \def THERON_NUMA \brief Enables NUMA support. This define controls the use of NUMA (Non-Uniform Memory Architecture) libraries to implement support for NUMA-aware thread affinities. It is defined automatically if not predefined by the user. When automatically defined, it defaults to 1 in Windows builds and 0 in all other builds. Enabling NUMA support can lead to substantial performance improvements on NUMA hardware, for example some dual-socket Opteron systems. NUMA support is included within recent versions of Windows. On all other builds on all other platforms THERON_NUMA is disabled by default, and must be explicitly defined as 1 in order to enable NUMA support. NUMA support is currently only implemented in Windows and GCC builds. In non-Windows GCC builds NUMA support depends on the numa library. In GCC builds, for example on Linux, you may need to install the libnuma and libnuma-dev package distributions of the libnuma library in order to build Theron with NUMA support. Because libnuma-dev may not be installed on many systems, THERON_NUMA defaults to undefined in non-Windows builds even though NUMA runtime support may be available via libnuma. The default definition can be overridden by defining it globally in the build - either via the makefile command line options, on the GCC command line using -D, or in the project preprocessor settings in Visual Studio. */ #if !defined(THERON_NUMA) #if THERON_WINDOWS #define THERON_NUMA 1 #else #define THERON_NUMA 0 #endif #endif /** \def THERON_XS \brief Enables the use of Crossroads.IO (the XS library) to implement network support for remote actors. This define controls the use of the XS network library to implement support for remote actors. Specifically, message-based communication between actors in Frameworks located in different processes or on different hosts. It is defined automatically if not predefined by the user. When automatically defined, it currently defaults to 0 in all builds, disabling the use of the XS library. \note Network support is currently in a state of development and testing. The default definition can be overridden by defining it globally in the build - either via the makefile command line options, on the GCC command line using -D, or in the project preprocessor settings in Visual Studio. */ #if !defined(THERON_XS) #define THERON_XS 0 #endif #endif // THERON_DEFINES_H
37.599688
144
0.780231
aa4fa1722bc03674bab050a7975b6607c4ac9fd3
1,552
h
C
src/html/HTMLTrackElementImp.h
esrille/escudo
1ba68f6930f1ddb97385a5b488644b6dfa132152
[ "Apache-2.0" ]
29
2015-01-25T15:12:02.000Z
2021-12-01T17:58:17.000Z
src/html/HTMLTrackElementImp.h
esrille/escudo
1ba68f6930f1ddb97385a5b488644b6dfa132152
[ "Apache-2.0" ]
null
null
null
src/html/HTMLTrackElementImp.h
esrille/escudo
1ba68f6930f1ddb97385a5b488644b6dfa132152
[ "Apache-2.0" ]
7
2015-04-15T02:05:21.000Z
2020-06-16T03:53:37.000Z
// Generated by esidl 0.3.0. // This file is expected to be modified for the Web IDL interface // implementation. Permission to use, copy, modify and distribute // this file in any software license is hereby granted. #ifndef ORG_W3C_DOM_BOOTSTRAP_HTMLTRACKELEMENTIMP_H_INCLUDED #define ORG_W3C_DOM_BOOTSTRAP_HTMLTRACKELEMENTIMP_H_INCLUDED #ifdef HAVE_CONFIG_H #include "config.h" #endif #include <org/w3c/dom/html/HTMLTrackElement.h> #include "HTMLElementImp.h" #include <org/w3c/dom/html/HTMLElement.h> #include <org/w3c/dom/html/TextTrack.h> namespace org { namespace w3c { namespace dom { namespace bootstrap { class HTMLTrackElementImp : public ObjectMixin<HTMLTrackElementImp, HTMLElementImp> { public: // HTMLTrackElement std::u16string getKind(); void setKind(const std::u16string& kind); std::u16string getSrc(); void setSrc(const std::u16string& src); std::u16string getSrclang(); void setSrclang(const std::u16string& srclang); std::u16string getLabel(); void setLabel(const std::u16string& label); bool getDefault(); void setDefault(bool _default); unsigned short getReadyState(); html::TextTrack getTrack(); // Object virtual Any message_(uint32_t selector, const char* id, int argc, Any* argv) { return html::HTMLTrackElement::dispatch(this, selector, id, argc, argv); } static const char* const getMetaData() { return html::HTMLTrackElement::getMetaData(); } }; } } } } #endif // ORG_W3C_DOM_BOOTSTRAP_HTMLTRACKELEMENTIMP_H_INCLUDED
25.866667
83
0.731314
80114a63e356c968ca7a01030fce53bea2f1b18b
2,910
c
C
src/commands/elvis/vars.c
macminix/MacMinix
12262051184fb2fe10ad0a2156546454e38a3e57
[ "BSD-3-Clause" ]
30
2015-02-17T23:26:16.000Z
2022-02-22T19:40:04.000Z
src/commands/elvis/vars.c
macminix/MacMinix
12262051184fb2fe10ad0a2156546454e38a3e57
[ "BSD-3-Clause" ]
null
null
null
src/commands/elvis/vars.c
macminix/MacMinix
12262051184fb2fe10ad0a2156546454e38a3e57
[ "BSD-3-Clause" ]
7
2016-07-02T20:33:49.000Z
2022-02-23T14:03:58.000Z
/* vars.c */ /* Author: * Steve Kirkendall * 16820 SW Tallac Way * Beaverton, OR 97006 * kirkenda@jove.cs.pdx.edu, or ...uunet!tektronix!psueea!jove!kirkenda */ /* This file contains variables which weren't happy anyplace else */ #include "vi.h" /*------------------------------------------------------------------------*/ /* used to remember whether the file has been modified */ struct _viflags viflags; /* used to access the tmp file */ long lnum[MAXBLKS]; long nlines; int tmpfd = -1; /* used to keep track of the current file & alternate file */ long origtime; char origname[256]; char prevorig[256]; long prevline = 1; /* used to track various places in the text */ MARK mark[NMARKS]; /* marks 'a through 'z, plus mark '' */ MARK cursor; /* the cursor position within the file */ /* which mode of the editor we're in */ enum _mode mode; /* vi mode? ex mode? quitting? */ /* used to manage the args list */ char args[BLKSIZE]; /* list of filenames to edit */ int argno; /* index of current file in args list */ int nargs; /* number of filenames in args[] */ /* dummy var, never explicitly referenced */ int bavar; /* used only in BeforeAfter macros */ /* have we made a multi-line change? */ int mustredraw; /* must we redraw the whole screen? */ long redrawafter; /* line# of first line that must be redrawn */ long redrawpre; /* line# of last line changed, before change */ long redrawpost; /* line# of last line changed, after change */ /* (redrawpost - redrawpre) = #lines added */ /* used to detect changes that invalidate cached text/blocks */ long changes; /* incremented when file is changed */ /* used to support the pfetch() macro */ int plen; /* length of the line */ long pline; /* line number that len refers to */ long pchgs; /* "changes" level that len refers to */ char *ptext; /* text of previous line, if valid */ /* misc temporary storage - mostly for strings */ BLK tmpblk; /* a block used to accumulate changes */ /* screen oriented stuff */ long topline; /* file line number of top line */ int leftcol; /* column number of left col */ int physcol; /* physical column number that cursor is on */ int physrow; /* physical row number that cursor is on */ /* used to help minimize that "[Hit a key to continue]" message */ int exwrote; /* Boolean: was the last ex command wordy? */ /* This variable affects the behaviour of certain functions -- most importantly * the input function. */ int doingdot; /* boolean: are we doing the "." command? */ /* These are used for reporting multi-line changes to the user */ long rptlines; /* number of lines affected by a command */ char *rptlabel; /* description of how lines were affected */ /* These store info that pertains to the shift-U command */ long U_line; /* line# of the undoable line, or 0L for none */ char U_text[BLKSIZE];/* contents of the undoable line */
33.837209
79
0.667698
a261d05e395d00d569888f8a085bba46ed982ee8
1,908
c
C
code/RobotCDrivers/mindsensors-nxtcam-test1.c
trc492/Ftc2014BlockParty
92580c198b79ce9d98026d5a1a050006f0a3262e
[ "MIT" ]
1
2015-06-13T00:34:11.000Z
2015-06-13T00:34:11.000Z
robotc/example/mindsensors-nxtcam-test1.c
lasarobotics/FTCLibs2014
2be3ec3ac60823473f3070e147acc7833ca0d414
[ "MIT" ]
null
null
null
robotc/example/mindsensors-nxtcam-test1.c
lasarobotics/FTCLibs2014
2be3ec3ac60823473f3070e147acc7833ca0d414
[ "MIT" ]
null
null
null
#pragma config(Sensor, S1, cam, sensorI2CCustomFastSkipStates) //*!!Code automatically generated by 'ROBOTC' configuration wizard !!*// /* * $Id: mindsensors-nxtcam-test1.c 133 2013-03-10 15:15:38Z xander $ */ /** * mindsensors-nxtcam.h provides an API for the Mindsensors NXTCam. This program * demonstrates how to use that API. * * Changelog: * - 0.1: Initial release * - 0.2: More comments * * Credits: * - Gordon Wyeth for writing the original driver and cam_display program * * License: You may use this code as you wish, provided you give credit where it's due. * * THIS CODE WILL ONLY WORK WITH ROBOTC VERSION 3.59 AND HIGHER. * Xander Soldaat (xander_at_botbench.com) * 28 November 2009 * version 0.2 */ #include "drivers/mindsensors-nxtcam.h" // int xscale(int x) - Scales x values from camera coordinates to screen coordinates. int xscale(int x) { return ((x - 12) * 99) / 175; } // int yscale(int y) - Scales y values from camera coordinates to screen coordinates. int yscale(int y) { return ((143 - y) * 63) / 143; } /* Main task */ task main () { blob_array _blobs; // combine all colliding blobs into one bool _condensed = true; //blob_array _blobs; int _l, _t, _r, _b; int _nblobs; eraseDisplay(); // Initialise the camera NXTCAMinit(cam); while(true) { eraseDisplay(); // Fetch all the blobs, have the driver combine all // the colliding blobs. _nblobs = NXTCAMgetBlobs(cam, _blobs, _condensed); for (int i = 0; i < _nblobs; i++) { // Draw the scaled blobs _l = xscale(_blobs[i].x1); _t = yscale(_blobs[i].y1); _r = xscale(_blobs[i].x2); _b = yscale(_blobs[i].y2); nxtFillRect(_l, _t, _r, _b); } nxtDisplayTextLine(1, "%d", _nblobs); wait1Msec(100); } } /* * $Id: mindsensors-nxtcam-test1.c 133 2013-03-10 15:15:38Z xander $ */
24.779221
87
0.644654
c8e3a31875ce057b7270ef653aca542cf61eca2d
1,692
c
C
src/android/jni/frame_queue.c
RitwikSaikia/librealsense
ca352a12a0d7e88236007cb7d105e852afbfa61d
[ "Apache-2.0" ]
1
2019-02-25T19:49:53.000Z
2019-02-25T19:49:53.000Z
src/android/jni/frame_queue.c
santa-sukitoku/librealsense
bcc71f3b01c482dfa51895ab6247135c9c76323d
[ "Apache-2.0" ]
1
2019-03-22T23:12:53.000Z
2020-12-12T04:56:44.000Z
src/android/jni/frame_queue.c
santa-sukitoku/librealsense
bcc71f3b01c482dfa51895ab6247135c9c76323d
[ "Apache-2.0" ]
2
2019-04-22T07:02:14.000Z
2020-10-07T14:05:32.000Z
#include <jni.h> #include "error.h" #include "../../../include/librealsense2/rs.h" JNIEXPORT jlong JNICALL Java_com_intel_realsense_librealsense_FrameQueue_nCreate(JNIEnv *env, jclass type, jint capacity) { rs2_error *e = NULL; rs2_frame_queue *rv = rs2_create_frame_queue(capacity, &e); handle_error(env, e); return (jlong) rv; } JNIEXPORT void JNICALL Java_com_intel_realsense_librealsense_FrameQueue_nDelete(JNIEnv *env, jclass type, jlong handle) { rs2_delete_frame_queue((rs2_frame_queue *) handle); } JNIEXPORT jlong JNICALL Java_com_intel_realsense_librealsense_FrameQueue_nPollForFrame(JNIEnv *env, jclass type, jlong handle) { rs2_frame *output_frame = NULL; rs2_error *e = NULL; int rv = rs2_poll_for_frame((rs2_frame_queue *) handle, &output_frame, &e); handle_error(env, e); return (jlong) (rv ? output_frame : 0); } JNIEXPORT jlong JNICALL Java_com_intel_realsense_librealsense_FrameQueue_nWaitForFrames(JNIEnv *env, jclass type, jlong handle, jint timeout) { rs2_error *e = NULL; rs2_frame *rv = rs2_wait_for_frame((rs2_frame_queue *) handle, (unsigned int) timeout, &e); handle_error(env, e); return (jlong) rv; } JNIEXPORT void JNICALL Java_com_intel_realsense_librealsense_FrameQueue_nEnqueue(JNIEnv *env, jclass type, jlong handle, jlong frameHandle) { rs2_error *e = NULL; rs2_frame_add_ref((rs2_frame *) frameHandle, &e); handle_error(env, e); rs2_enqueue_frame((rs2_frame *) frameHandle, (void *) handle); }
36.782609
99
0.666667
aebf16e355ec0f5641771dc1159173c681142685
1,458
h
C
nugen/EventGeneratorBase/GENIE/EvtTimeNone.h
nusense/nugen
ee4fefda7f2aa5e5ca8ee9c741f07bd3dbef2ed7
[ "Apache-2.0" ]
null
null
null
nugen/EventGeneratorBase/GENIE/EvtTimeNone.h
nusense/nugen
ee4fefda7f2aa5e5ca8ee9c741f07bd3dbef2ed7
[ "Apache-2.0" ]
null
null
null
nugen/EventGeneratorBase/GENIE/EvtTimeNone.h
nusense/nugen
ee4fefda7f2aa5e5ca8ee9c741f07bd3dbef2ed7
[ "Apache-2.0" ]
null
null
null
//////////////////////////////////////////////////////////////////////// /// \file EvtTimeNone.h /// \class evgb::EvtTimeNone /// \brief time distribution that is delta of 0 (no shift) /// /// \author Robert Hatcher <rhatcher \at fnal.gov> /// Fermi National Accelerator Laboratory /// /// \created 2015-06-22 /// \version $Id: EvtTimeNone.h,v 1.1 2015/06/30 18:01:24 rhatcher Exp $ //////////////////////////////////////////////////////////////////////// #ifndef SIMB_EVTTIMENONE_H #define SIMB_EVTTIMENONE_H #include "EvtTimeShiftI.h" #include <string> #include <vector> namespace evgb { class EvtTimeNone : public evgb::EvtTimeShiftI { public: EvtTimeNone(const std::string& config); virtual ~EvtTimeNone(); // // complete the EvtTimeShiftI interface: // /// each schema must take a string that configures it /// it is up to the individual model to parse said string /// and extract parameters virtual void Config(const std::string& config ); /// return time within a 'record' in nanoseconds /// version taking array might be used for relative batch fractions /// that vary on a record-by-record basis virtual double TimeOffset(); virtual double TimeOffset(std::vector<double> v); /// provide a means of printing the configuration virtual void PrintConfig(bool verbose=true); private: }; } // namespace evgb #endif //SIMB_EVTTIMENONE_H
27
72
0.609739
836c8d83be561a9da0d4db7f43d9ebb7d42d8cb6
1,794
h
C
third_party/webrtc/video/frame_dumping_decoder.h
zipated/src
2b8388091c71e442910a21ada3d97ae8bc1845d3
[ "BSD-3-Clause" ]
2,151
2020-04-18T07:31:17.000Z
2022-03-31T08:39:18.000Z
third_party/webrtc/video/frame_dumping_decoder.h
cangulcan/src
2b8388091c71e442910a21ada3d97ae8bc1845d3
[ "BSD-3-Clause" ]
395
2020-04-18T08:22:18.000Z
2021-12-08T13:04:49.000Z
third_party/webrtc/video/frame_dumping_decoder.h
cangulcan/src
2b8388091c71e442910a21ada3d97ae8bc1845d3
[ "BSD-3-Clause" ]
338
2020-04-18T08:03:10.000Z
2022-03-29T12:33:22.000Z
/* * Copyright (c) 2018 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ #ifndef VIDEO_FRAME_DUMPING_DECODER_H_ #define VIDEO_FRAME_DUMPING_DECODER_H_ #include <stdint.h> #include <memory> #include "api/video/encoded_image.h" #include "api/video_codecs/video_codec.h" #include "api/video_codecs/video_decoder.h" #include "modules/video_coding/include/video_codec_interface.h" #include "modules/video_coding/utility/ivf_file_writer.h" #include "rtc_base/platform_file.h" namespace webrtc { // A decoder wrapper that writes the encoded frames to a file. class FrameDumpingDecoder : public VideoDecoder { public: FrameDumpingDecoder(std::unique_ptr<VideoDecoder> decoder, rtc::PlatformFile file); ~FrameDumpingDecoder() override; int32_t InitDecode(const VideoCodec* codec_settings, int32_t number_of_cores) override; int32_t Decode(const EncodedImage& input_image, bool missing_frames, const CodecSpecificInfo* codec_specific_info, int64_t render_time_ms) override; int32_t RegisterDecodeCompleteCallback( DecodedImageCallback* callback) override; int32_t Release() override; bool PrefersLateDecoding() const override; const char* ImplementationName() const override; private: std::unique_ptr<VideoDecoder> decoder_; std::unique_ptr<IvfFileWriter> writer_; }; } // namespace webrtc #endif // VIDEO_FRAME_DUMPING_DECODER_H_
33.849057
71
0.747492
d3bbac76b2626491a4976d9e4361847b7aaef14f
210
h
C
FN_Base/Classes/FNBaseModel.h
GuoSX2014/FN_Base
68262de5973ac6af5bafe574173ee5df7af2bde1
[ "MIT" ]
null
null
null
FN_Base/Classes/FNBaseModel.h
GuoSX2014/FN_Base
68262de5973ac6af5bafe574173ee5df7af2bde1
[ "MIT" ]
null
null
null
FN_Base/Classes/FNBaseModel.h
GuoSX2014/FN_Base
68262de5973ac6af5bafe574173ee5df7af2bde1
[ "MIT" ]
null
null
null
// // FNBaseModel.h // FNYunWei2 // // Created by Adward on 2018/7/31. // Copyright © 2018年 FN. All rights reserved. // #import <Foundation/Foundation.h> @interface FNBaseModel : NSObject<NSCoding> @end
15
46
0.685714
ebff89fab9dae55699cc0b889d499253b9db8101
238
h
C
zSMTH/NavigationViewController.h
zfdang/zSMTH
be0819e50b66395ae24f5e27dd6821a34d111150
[ "MIT" ]
24
2015-05-05T04:40:40.000Z
2019-02-06T01:52:05.000Z
zSMTH/NavigationViewController.h
zfdang/zSMTH
be0819e50b66395ae24f5e27dd6821a34d111150
[ "MIT" ]
1
2015-10-19T16:50:29.000Z
2015-10-21T12:21:14.000Z
zSMTH/NavigationViewController.h
zfdang/zSMTH
be0819e50b66395ae24f5e27dd6821a34d111150
[ "MIT" ]
10
2015-05-14T13:39:52.000Z
2021-11-18T15:24:30.000Z
// // NavigationViewController.h // zSMTH // // Created by Zhengfa DANG on 2015-3-14. // Copyright (c) 2015 Zhengfa. All rights reserved. // #import <UIKit/UIKit.h> @interface NavigationViewController : UINavigationController @end
17
60
0.722689
039992de82bee87814b06c1c9a754e0689a49e14
1,491
c
C
examples/loadexec/memory.c
franciscozdo/FreeRTOS-Amiga
6de616c296b498946fffa50203dbb114c370fe70
[ "MIT" ]
null
null
null
examples/loadexec/memory.c
franciscozdo/FreeRTOS-Amiga
6de616c296b498946fffa50203dbb114c370fe70
[ "MIT" ]
null
null
null
examples/loadexec/memory.c
franciscozdo/FreeRTOS-Amiga
6de616c296b498946fffa50203dbb114c370fe70
[ "MIT" ]
null
null
null
#include <FreeRTOS/FreeRTOS.h> #include <string.h> #include <file.h> typedef struct MemFile { File_t f; const void *buf; long length; } MemFile_t; static long MemoryRead(MemFile_t *f, void *buf, size_t nbyte); static long MemorySeek(MemFile_t *f, long offset, int whence); static void MemoryClose(MemFile_t *f); static FileOps_t MemOps = {.read = (FileRead_t)MemoryRead, .seek = (FileSeek_t)MemorySeek, .close = (FileClose_t)MemoryClose}; File_t *MemoryOpen(const void *buf, size_t length) { MemFile_t *mem = pvPortMalloc(sizeof(MemFile_t)); mem->buf = buf; mem->length = length; mem->f.ops = &MemOps; mem->f.usecount = 1; mem->f.offset = 0; return &mem->f; } static void MemoryClose(MemFile_t *mem) { if (--mem->f.usecount == 0) vPortFree(mem); } static long MemoryRead(MemFile_t *mem, void *buf, size_t nbyte) { long start = mem->f.offset; long nread = nbyte; if (start + nread > mem->length) nread = mem->length - start; memcpy(buf, mem->buf + start, nread); mem->f.offset += nread; return nread; } static long MemorySeek(MemFile_t *mem, long offset, int whence) { if (whence == SEEK_CUR) { offset += mem->f.offset; } else if (whence == SEEK_END) { offset += mem->length; } else if (whence != SEEK_SET) { return -1; } if (offset < 0) { offset = 0; } else if (offset > mem->length) { offset = mem->length; } mem->f.offset = offset; return 0; }
23.296875
65
0.627767
37dc96d0f4926f65ddd2fe8faff404d1fec8e485
2,353
h
C
extensions/third_party/perfetto/protos/perfetto/trace/android/initial_display_state.gen.h
blockspacer/chromium_base_conan
b4749433cf34f54d2edff52e2f0465fec8cb9bad
[ "Apache-2.0", "BSD-3-Clause" ]
6
2020-12-22T05:48:31.000Z
2022-02-08T19:49:49.000Z
extensions/third_party/perfetto/protos/perfetto/trace/android/initial_display_state.gen.h
blockspacer/chromium_base_conan
b4749433cf34f54d2edff52e2f0465fec8cb9bad
[ "Apache-2.0", "BSD-3-Clause" ]
4
2020-05-22T18:36:43.000Z
2021-05-19T10:20:23.000Z
extensions/third_party/perfetto/protos/perfetto/trace/android/initial_display_state.gen.h
blockspacer/chromium_base_conan
b4749433cf34f54d2edff52e2f0465fec8cb9bad
[ "Apache-2.0", "BSD-3-Clause" ]
2
2019-12-06T11:48:16.000Z
2021-09-16T04:44:47.000Z
// DO NOT EDIT. Autogenerated by Perfetto cppgen_plugin #ifndef PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_ANDROID_INITIAL_DISPLAY_STATE_PROTO_CPP_H_ #define PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_ANDROID_INITIAL_DISPLAY_STATE_PROTO_CPP_H_ #include <stdint.h> #include <bitset> #include <vector> #include <string> #include <type_traits> #include "perfetto/protozero/cpp_message_obj.h" #include "perfetto/protozero/copyable_ptr.h" #include "perfetto/base/export.h" namespace perfetto { namespace protos { namespace gen { class InitialDisplayState; } // namespace perfetto } // namespace protos } // namespace gen namespace protozero { class Message; } // namespace protozero namespace perfetto { namespace protos { namespace gen { class PERFETTO_EXPORT InitialDisplayState : public ::protozero::CppMessageObj { public: enum FieldNumbers { kDisplayStateFieldNumber = 1, kBrightnessFieldNumber = 2, }; InitialDisplayState(); ~InitialDisplayState() override; InitialDisplayState(InitialDisplayState&&) noexcept; InitialDisplayState& operator=(InitialDisplayState&&); InitialDisplayState(const InitialDisplayState&); InitialDisplayState& operator=(const InitialDisplayState&); bool operator==(const InitialDisplayState&) const; bool operator!=(const InitialDisplayState& other) const { return !(*this == other); } bool ParseFromArray(const void*, size_t) override; std::string SerializeAsString() const override; std::vector<uint8_t> SerializeAsArray() const override; void Serialize(::protozero::Message*) const; bool has_display_state() const { return _has_field_[1]; } int32_t display_state() const { return display_state_; } void set_display_state(int32_t value) { display_state_ = value; _has_field_.set(1); } bool has_brightness() const { return _has_field_[2]; } double brightness() const { return brightness_; } void set_brightness(double value) { brightness_ = value; _has_field_.set(2); } private: int32_t display_state_{}; double brightness_{}; // Allows to preserve unknown protobuf fields for compatibility // with future versions of .proto files. std::string unknown_fields_; std::bitset<3> _has_field_{}; }; } // namespace perfetto } // namespace protos } // namespace gen #endif // PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_ANDROID_INITIAL_DISPLAY_STATE_PROTO_CPP_H_
30.960526
91
0.774331
bb6151d07f5dbbbea66d64729c8750cf0e9468a2
52,389
c
C
app-3rd-party/ultragrid-1.1-rc4/ultragrid/src/rtp/decoders.c
benyaboy/sage-graphics
090640167329ace4b6ad266d47db5bb2b0394232
[ "Unlicense" ]
null
null
null
app-3rd-party/ultragrid-1.1-rc4/ultragrid/src/rtp/decoders.c
benyaboy/sage-graphics
090640167329ace4b6ad266d47db5bb2b0394232
[ "Unlicense" ]
null
null
null
app-3rd-party/ultragrid-1.1-rc4/ultragrid/src/rtp/decoders.c
benyaboy/sage-graphics
090640167329ace4b6ad266d47db5bb2b0394232
[ "Unlicense" ]
1
2021-07-02T10:31:03.000Z
2021-07-02T10:31:03.000Z
/* * AUTHOR: Ladan Gharai/Colin Perkins * * Copyright (c) 2003-2004 University of Southern California * * Redistribution and use in source and binary forms, with or without * modification, is permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * * This product includes software developed by the University of Southern * California Information Sciences Institute. * * 4. Neither the name of the University nor of the Institute may be used * to endorse or promote products derived from this software without * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO * EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ #include "config.h" #include "config_unix.h" #include "config_win32.h" #include "debug.h" #include "host.h" #include "perf.h" #include "rtp/ldgm.h" #include "rtp/ll.h" #include "rtp/rtp.h" #include "rtp/rtp_callback.h" #include "rtp/pbuf.h" #include "rtp/decoders.h" #include "video.h" #include "video_codec.h" #include "video_decompress.h" #include "video_display.h" #include "vo_postprocess.h" struct state_decoder; struct video_frame * reconfigure_decoder(struct state_decoder * const decoder, struct video_desc desc, struct video_frame *frame); typedef void (*change_il_t)(char *dst, char *src, int linesize, int height); void restrict_returned_codecs(codec_t *display_codecs, size_t *display_codecs_count, codec_t *pp_codecs, int pp_codecs_count); enum decoder_type_t { UNSET, LINE_DECODER, EXTERNAL_DECODER }; struct line_decoder { int base_offset; /* from the beginning of buffer */ double src_bpp; double dst_bpp; int rshift; int gshift; int bshift; decoder_t decode_line; unsigned int dst_linesize; /* framebuffer pitch */ unsigned int dst_pitch; /* framebuffer pitch - it can be larger if SDL resolution is larger than data */ unsigned int src_linesize; /* display data pitch */ }; struct state_decoder { struct video_desc received_vid_desc; struct video_desc display_desc; /* requested values */ int requested_pitch; int rshift, gshift, bshift; unsigned int max_substreams; struct display *display; codec_t *native_codecs; size_t native_count; enum interlacing_t *disp_supported_il; size_t disp_supported_il_cnt; change_il_t change_il; /* actual values */ enum decoder_type_t decoder_type; struct { struct line_decoder *line_decoder; struct { /* OR - it is not union for easier freeing*/ struct state_decompress *ext_decoder; unsigned int accepts_corrupted_frame:1; char **ext_recv_buffer; }; }; codec_t out_codec; // display or postprocessor int pitch; // display pitch, can differ from previous if we have postprocessor int display_pitch; struct { struct vo_postprocess_state *postprocess; struct video_frame *pp_frame; int pp_output_frames_count; }; unsigned int video_mode; unsigned merged_fb:1; void *fec_state; }; struct state_decoder *decoder_init(char *requested_mode, char *postprocess) { struct state_decoder *s; s = (struct state_decoder *) calloc(1, sizeof(struct state_decoder)); s->native_codecs = NULL; s->disp_supported_il = NULL; s->postprocess = NULL; s->change_il = NULL; s->video_mode = VIDEO_NORMAL; s->fec_state = NULL; if(requested_mode) { /* these are data comming from newtork ! */ if(strcasecmp(requested_mode, "help") == 0) { printf("Video mode options\n\n"); printf("-M {tiled-4K | 3D | dual-link }\n"); free(s); exit_uv(129); return NULL; } else if(strcasecmp(requested_mode, "tiled-4K") == 0) { s->video_mode = VIDEO_4K; } else if(strcasecmp(requested_mode, "3D") == 0) { s->video_mode = VIDEO_STEREO; } else if(strcasecmp(requested_mode, "dual-link") == 0) { s->video_mode = VIDEO_DUAL; } else { fprintf(stderr, "[decoder] Unknown video mode (see -M help)\n"); free(s); exit_uv(129); return NULL; } } s->max_substreams = get_video_mode_tiles_x(s->video_mode) * get_video_mode_tiles_y(s->video_mode); if(postprocess) { s->postprocess = vo_postprocess_init(postprocess); if(strcmp(postprocess, "help") == 0) { exit_uv(0); return NULL; } if(!s->postprocess) { fprintf(stderr, "Initializing postprocessor \"%s\" failed.\n", postprocess); free(s); exit_uv(129); return NULL; } } return s; } void restrict_returned_codecs(codec_t *display_codecs, size_t *display_codecs_count, codec_t *pp_codecs, int pp_codecs_count) { int i; for (i = 0; i < (int) *display_codecs_count; ++i) { int j; int found = FALSE; for (j = 0; j < pp_codecs_count; ++j) { if(display_codecs[i] == pp_codecs[j]) { found = TRUE; } } if(!found) { memmove(&display_codecs[i], (const void *) &display_codecs[i + 1], sizeof(codec_t) * (*display_codecs_count - i - 1)); --*display_codecs_count; --i; } } } void decoder_register_video_display(struct state_decoder *decoder, struct display *display) { int ret, i; decoder->display = display; free(decoder->native_codecs); decoder->native_count = 20 * sizeof(codec_t); decoder->native_codecs = (codec_t *) malloc(decoder->native_count * sizeof(codec_t)); ret = display_get_property(decoder->display, DISPLAY_PROPERTY_CODECS, decoder->native_codecs, &decoder->native_count); decoder->native_count /= sizeof(codec_t); if(!ret) { fprintf(stderr, "Failed to query codecs from video display.\n"); exit_uv(129); return; } /* next check if we didn't receive alias for UYVY */ for(i = 0; i < (int) decoder->native_count; ++i) { assert(decoder->native_codecs[i] != Vuy2 && decoder->native_codecs[i] != DVS8); } if(decoder->postprocess) { codec_t *postprocess_supported_codecs; int count; vo_postprocess_get_supported_codecs(decoder->postprocess, &postprocess_supported_codecs, &count); if(postprocess_supported_codecs) restrict_returned_codecs(decoder->native_codecs, &decoder->native_count, postprocess_supported_codecs, count); } free(decoder->disp_supported_il); decoder->disp_supported_il_cnt = 20 * sizeof(enum interlacing_t); decoder->disp_supported_il = malloc(decoder->disp_supported_il_cnt); ret = display_get_property(decoder->display, DISPLAY_PROPERTY_SUPPORTED_IL_MODES, decoder->disp_supported_il, &decoder->disp_supported_il_cnt); if(ret) { decoder->disp_supported_il_cnt /= sizeof(enum interlacing_t); } else { enum interlacing_t tmp[] = { PROGRESSIVE, INTERLACED_MERGED, SEGMENTED_FRAME}; /* default if not said othervise */ memcpy(decoder->disp_supported_il, tmp, sizeof(tmp)); decoder->disp_supported_il_cnt = sizeof(tmp) / sizeof(enum interlacing_t); } } void decoder_destroy(struct state_decoder *decoder) { if(!decoder) return; if(decoder->ext_decoder) { decompress_done(decoder->ext_decoder); decoder->ext_decoder = NULL; } if(decoder->ext_recv_buffer) { char **buf = decoder->ext_recv_buffer; while(*buf != NULL) { free(*buf); buf++; } free(decoder->ext_recv_buffer); decoder->ext_recv_buffer = NULL; } if(decoder->pp_frame) { vo_postprocess_done(decoder->postprocess); decoder->pp_frame = NULL; } if(decoder->line_decoder) { free(decoder->line_decoder); } free(decoder->native_codecs); free(decoder->disp_supported_il); if(decoder->fec_state) ldgm_decoder_destroy(decoder->fec_state); free(decoder); } static codec_t choose_codec_and_decoder(struct state_decoder * const decoder, struct video_desc desc, codec_t *in_codec, decoder_t *decode_line) { codec_t out_codec = (codec_t) -1; *decode_line = NULL; *in_codec = desc.color_spec; /* first deal with aliases */ if(*in_codec == DVS8 || *in_codec == Vuy2) { *in_codec = UYVY; } size_t native; /* first check if the codec is natively supported */ for(native = 0u; native < decoder->native_count; ++native) { out_codec = decoder->native_codecs[native]; if(out_codec == DVS8 || out_codec == Vuy2) out_codec = UYVY; if(*in_codec == out_codec) { if((out_codec == DXT1 || out_codec == DXT1_YUV || out_codec == DXT5) && decoder->video_mode != VIDEO_NORMAL) continue; /* it is a exception, see NOTES #1 */ if(*in_codec == RGBA || /* another exception - we may change shifts */ *in_codec == RGB) continue; *decode_line = (decoder_t) memcpy; decoder->decoder_type = LINE_DECODER; goto after_linedecoder_lookup; } } /* otherwise if we have line decoder */ int trans; for(trans = 0; line_decoders[trans].line_decoder != NULL; ++trans) { for(native = 0; native < decoder->native_count; ++native) { out_codec = decoder->native_codecs[native]; if(out_codec == DVS8 || out_codec == Vuy2) out_codec = UYVY; if(*in_codec == line_decoders[trans].from && out_codec == line_decoders[trans].to) { *decode_line = line_decoders[trans].line_decoder; decoder->decoder_type = LINE_DECODER; goto after_linedecoder_lookup; } } } after_linedecoder_lookup: /* we didn't find line decoder. So try now regular (aka DXT) decoder */ if(*decode_line == NULL) { for(native = 0; native < decoder->native_count; ++native) { int trans; out_codec = decoder->native_codecs[native]; if(out_codec == DVS8 || out_codec == Vuy2) out_codec = UYVY; for(trans = 0; trans < decoders_for_codec_count; ++trans) { if(*in_codec == decoders_for_codec[trans].from && out_codec == decoders_for_codec[trans].to) { decoder->ext_decoder = decompress_init(decoders_for_codec[trans].decompress_index); if(!decoder->ext_decoder) { debug_msg("Decompressor with magic %x was not found.\n"); continue; } int res = 0, ret; size_t size = sizeof(res); ret = decompress_get_property(decoder->ext_decoder, DECOMPRESS_PROPERTY_ACCEPTS_CORRUPTED_FRAME, &res, &size); if(ret && res) { decoder->accepts_corrupted_frame = TRUE; } else { decoder->accepts_corrupted_frame = FALSE; } decoder->decoder_type = EXTERNAL_DECODER; goto after_decoder_lookup; } } } } after_decoder_lookup: if(decoder->decoder_type == UNSET) { fprintf(stderr, "Unable to find decoder for input codec!!!\n"); exit_uv(128); return (codec_t) -1; } decoder->out_codec = out_codec; return out_codec; } static change_il_t select_il_func(enum interlacing_t in_il, enum interlacing_t *supported, int il_out_cnt, /*out*/ enum interlacing_t *out_il) { struct transcode_t { enum interlacing_t in; enum interlacing_t out; change_il_t func; }; struct transcode_t transcode[] = { {UPPER_FIELD_FIRST, INTERLACED_MERGED, il_upper_to_merged}, {INTERLACED_MERGED, UPPER_FIELD_FIRST, il_merged_to_upper} }; int i; /* first try to check if it can be nativelly displayed */ for (i = 0; i < il_out_cnt; ++i) { if(in_il == supported[i]) { *out_il = in_il; return NULL; } } for (i = 0; i < il_out_cnt; ++i) { size_t j; for (j = 0; j < sizeof(transcode) / sizeof(struct transcode_t); ++j) { if(in_il == transcode[j].in && supported[i] == transcode[j].out) { *out_il = transcode[j].out; return transcode[j].func; } } } return NULL; } struct video_frame * reconfigure_decoder(struct state_decoder * const decoder, struct video_desc desc, struct video_frame *frame_display) { codec_t out_codec, in_codec; decoder_t decode_line; enum interlacing_t display_il = 0; //struct video_frame *frame; int render_mode; assert(decoder != NULL); assert(decoder->native_codecs != NULL); free(decoder->line_decoder); decoder->line_decoder = NULL; decoder->decoder_type = UNSET; if(decoder->ext_decoder) { decompress_done(decoder->ext_decoder); decoder->ext_decoder = NULL; } if(decoder->ext_recv_buffer) { char **buf = decoder->ext_recv_buffer; while(*buf != NULL) { free(*buf); buf++; } free(decoder->ext_recv_buffer); decoder->ext_recv_buffer = NULL; } desc.tile_count = get_video_mode_tiles_x(decoder->video_mode) * get_video_mode_tiles_y(decoder->video_mode); out_codec = choose_codec_and_decoder(decoder, desc, &in_codec, &decode_line); if(out_codec == (codec_t) -1) return NULL; struct video_desc display_desc = desc; if(decoder->postprocess) { struct video_desc pp_desc = desc; pp_desc.color_spec = out_codec; vo_postprocess_reconfigure(decoder->postprocess, pp_desc); decoder->pp_frame = vo_postprocess_getf(decoder->postprocess); vo_postprocess_get_out_desc(decoder->postprocess, &display_desc, &render_mode, &decoder->pp_output_frames_count); } if(!is_codec_opaque(out_codec)) { decoder->change_il = select_il_func(desc.interlacing, decoder->disp_supported_il, decoder->disp_supported_il_cnt, &display_il); } else { decoder->change_il = NULL; } size_t len = sizeof(int); int ret; int display_mode; ret = display_get_property(decoder->display, DISPLAY_PROPERTY_VIDEO_MODE, &display_mode, &len); if(!ret) { debug_msg("Failed to get video display mode."); display_mode = DISPLAY_PROPERTY_VIDEO_MERGED; } if (!decoder->postprocess) { /* otherwise we need postprocessor mode, which we obtained before */ render_mode = display_mode; } display_desc.color_spec = out_codec; display_desc.interlacing = display_il; if(!decoder->postprocess && display_mode == DISPLAY_PROPERTY_VIDEO_MERGED) { display_desc.width *= get_video_mode_tiles_x(decoder->video_mode); display_desc.height *= get_video_mode_tiles_y(decoder->video_mode); display_desc.tile_count = 1; } if(!video_desc_eq(decoder->display_desc, display_desc)) { int ret; /* * TODO: put frame should be definitely here. On the other hand, we cannot be sure * that vo driver is initialized so far:( */ //display_put_frame(decoder->display, frame); /* reconfigure VO and give it opportunity to pass us pitch */ ret = display_reconfigure(decoder->display, display_desc); if(!ret) { fprintf(stderr, "[decoder] Unable to reconfigure display.\n"); exit_uv(128); return NULL; } frame_display = display_get_frame(decoder->display); decoder->display_desc = display_desc; } /*if(decoder->postprocess) { frame = decoder->pp_frame; } else { frame = frame_display; }*/ ret = display_get_property(decoder->display, DISPLAY_PROPERTY_RSHIFT, &decoder->rshift, &len); if(!ret) { debug_msg("Failed to get rshift property from video driver.\n"); decoder->rshift = 0; } ret = display_get_property(decoder->display, DISPLAY_PROPERTY_GSHIFT, &decoder->gshift, &len); if(!ret) { debug_msg("Failed to get gshift property from video driver.\n"); decoder->gshift = 8; } ret = display_get_property(decoder->display, DISPLAY_PROPERTY_BSHIFT, &decoder->bshift, &len); if(!ret) { debug_msg("Failed to get bshift property from video driver.\n"); decoder->bshift = 16; } ret = display_get_property(decoder->display, DISPLAY_PROPERTY_BUF_PITCH, &decoder->requested_pitch, &len); if(!ret) { debug_msg("Failed to get pitch from video driver.\n"); decoder->requested_pitch = PITCH_DEFAULT; } int linewidth; if(render_mode == DISPLAY_PROPERTY_VIDEO_SEPARATE_TILES) { linewidth = desc.width; } else { linewidth = desc.width * get_video_mode_tiles_x(decoder->video_mode); } if(!decoder->postprocess) { if(decoder->requested_pitch == PITCH_DEFAULT) decoder->pitch = vc_get_linesize(linewidth, out_codec); else decoder->pitch = decoder->requested_pitch; } else { decoder->pitch = vc_get_linesize(linewidth, out_codec); } if(decoder->requested_pitch == PITCH_DEFAULT) { decoder->display_pitch = vc_get_linesize(display_desc.width, out_codec); } else { decoder->display_pitch = decoder->requested_pitch; } int src_x_tiles = get_video_mode_tiles_x(decoder->video_mode); int src_y_tiles = get_video_mode_tiles_y(decoder->video_mode); if(decoder->decoder_type == LINE_DECODER) { decoder->line_decoder = malloc(src_x_tiles * src_y_tiles * sizeof(struct line_decoder)); if(render_mode == DISPLAY_PROPERTY_VIDEO_MERGED && decoder->video_mode == VIDEO_NORMAL) { struct line_decoder *out = &decoder->line_decoder[0]; out->base_offset = 0; out->src_bpp = get_bpp(in_codec); out->dst_bpp = get_bpp(out_codec); out->rshift = decoder->rshift; out->gshift = decoder->gshift; out->bshift = decoder->bshift; out->decode_line = decode_line; out->dst_pitch = decoder->pitch; out->src_linesize = vc_get_linesize(desc.width, in_codec); out->dst_linesize = vc_get_linesize(desc.width, out_codec); decoder->merged_fb = TRUE; } else if(render_mode == DISPLAY_PROPERTY_VIDEO_MERGED && decoder->video_mode != VIDEO_NORMAL) { int x, y; for(x = 0; x < src_x_tiles; ++x) { for(y = 0; y < src_y_tiles; ++y) { struct line_decoder *out = &decoder->line_decoder[x + src_x_tiles * y]; out->base_offset = y * (desc.height) * decoder->pitch + vc_get_linesize(x * desc.width, out_codec); out->src_bpp = get_bpp(in_codec); out->dst_bpp = get_bpp(out_codec); out->rshift = decoder->rshift; out->gshift = decoder->gshift; out->bshift = decoder->bshift; out->decode_line = decode_line; out->dst_pitch = decoder->pitch; out->src_linesize = vc_get_linesize(desc.width, in_codec); out->dst_linesize = vc_get_linesize(desc.width, out_codec); } } decoder->merged_fb = TRUE; } else if (render_mode == DISPLAY_PROPERTY_VIDEO_SEPARATE_TILES) { int x, y; for(x = 0; x < src_x_tiles; ++x) { for(y = 0; y < src_y_tiles; ++y) { struct line_decoder *out = &decoder->line_decoder[x + src_x_tiles * y]; out->base_offset = 0; out->src_bpp = get_bpp(in_codec); out->dst_bpp = get_bpp(out_codec); out->rshift = decoder->rshift; out->gshift = decoder->gshift; out->bshift = decoder->bshift; out->decode_line = decode_line; out->src_linesize = vc_get_linesize(desc.width, in_codec); out->dst_pitch = out->dst_linesize = vc_get_linesize(desc.width, out_codec); } } decoder->merged_fb = FALSE; } } else if (decoder->decoder_type == EXTERNAL_DECODER) { int buf_size; int i; buf_size = decompress_reconfigure(decoder->ext_decoder, desc, decoder->rshift, decoder->gshift, decoder->bshift, decoder->pitch , out_codec); if(!buf_size) { return NULL; } decoder->ext_recv_buffer = malloc((src_x_tiles * src_y_tiles + 1) * sizeof(char *)); for (i = 0; i < src_x_tiles * src_y_tiles; ++i) decoder->ext_recv_buffer[i] = malloc(buf_size); decoder->ext_recv_buffer[i] = NULL; if(render_mode == DISPLAY_PROPERTY_VIDEO_SEPARATE_TILES) { decoder->merged_fb = FALSE; } else { decoder->merged_fb = TRUE; } } return frame_display; } static int check_for_mode_change(struct state_decoder *decoder, video_payload_hdr_t *hdr, struct video_frame **frame) { uint32_t tmp; int ret = FALSE; unsigned int width, height; codec_t color_spec; enum interlacing_t interlacing; double fps; int fps_pt, fpsd, fd, fi; width = ntohs(hdr->hres); height = ntohs(hdr->vres); color_spec = get_codec_from_fcc(ntohl(hdr->fourcc)); tmp = ntohl(hdr->il_fps); interlacing = (enum interlacing_t) (tmp >> 29); fps_pt = (tmp >> 19) & 0x3ff; fpsd = (tmp >> 15) & 0xf; fd = (tmp >> 14) & 0x1; fi = (tmp >> 13) & 0x1; fps = compute_fps(fps_pt, fpsd, fd, fi); if (!(decoder->received_vid_desc.width == width && decoder->received_vid_desc.height == height && decoder->received_vid_desc.color_spec == color_spec && decoder->received_vid_desc.interlacing == interlacing && //decoder->received_vid_desc.video_type == video_type && decoder->received_vid_desc.fps == fps )) { decoder->received_vid_desc.width = width; decoder->received_vid_desc.height = height; decoder->received_vid_desc.color_spec = color_spec; decoder->received_vid_desc.interlacing = interlacing; decoder->received_vid_desc.fps = fps; *frame = reconfigure_decoder(decoder, decoder->received_vid_desc, *frame); ret = TRUE; } return ret; } int decode_frame(struct coded_data *cdata, void *decode_data) { struct pbuf_video_data *pbuf_data = (struct pbuf_video_data *) decode_data; struct video_frame *frame = pbuf_data->frame_buffer; struct state_decoder *decoder = pbuf_data->decoder; int ret = TRUE; uint32_t width; uint32_t height; uint32_t offset; enum interlacing_t interlacing; int len; codec_t color_spec; rtp_packet *pckt = NULL; unsigned char *source; char *data; uint32_t data_pos; int prints=0; double fps; struct tile *tile = NULL; uint32_t tmp; uint32_t substream; int fps_pt, fpsd, fd, fi; int i; struct linked_list **pckt_list = malloc(decoder->max_substreams * sizeof(struct linked_list *)); uint32_t *buffer_len = malloc(decoder->max_substreams * sizeof(uint32_t)); uint32_t *buffer_num = malloc(decoder->max_substreams * sizeof(uint32_t)); for (i = 0; i < (int) decoder->max_substreams; ++i) { pckt_list[i] = ll_create(); buffer_len[i] = 0; buffer_num[i] = 0; } char **ext_recv_buffer = malloc(decoder->max_substreams * sizeof(char *)); char **fec_buffers = (char **) calloc(decoder->max_substreams, sizeof(char *)); perf_record(UVP_DECODEFRAME, frame); int k, m, c, seed; // LDGM int buffer_number, buffer_length; while (cdata != NULL) { pckt = cdata->data; if(pckt->pt == PT_VIDEO) { video_payload_hdr_t *hdr; hdr = (video_payload_hdr_t *) pckt->data; len = pckt->data_len - sizeof(video_payload_hdr_t); data = (char *) hdr + sizeof(video_payload_hdr_t); width = ntohs(hdr->hres); height = ntohs(hdr->vres); color_spec = get_codec_from_fcc(ntohl(hdr->fourcc)); data_pos = ntohl(hdr->offset); tmp = ntohl(hdr->substream_bufnum); substream = tmp >> 22; buffer_number = tmp & 0x3ffff; buffer_length = ntohl(hdr->length); tmp = ntohl(hdr->il_fps); interlacing = (enum interlacing_t) (tmp >> 29); fps_pt = (tmp >> 19) & 0x3ff; fpsd = (tmp >> 15) & 0xf; fd = (tmp >> 14) & 0x1; fi = (tmp >> 13) & 0x1; fps = compute_fps(fps_pt, fpsd, fd, fi); } else if (pckt->pt == PT_VIDEO_LDGM) { ldgm_payload_hdr_t *hdr; hdr = (ldgm_payload_hdr_t *) pckt->data; len = pckt->data_len - sizeof(ldgm_payload_hdr_t); tmp = ntohl(hdr->substream_bufnum); substream = tmp >> 22; buffer_num[substream] = tmp & 0x3ffff; data_pos = ntohl(hdr->offset); buffer_length = ntohl(hdr->length); if(!fec_buffers[substream]) { fec_buffers[substream] = (char *) malloc(buffer_length); } tmp = ntohl(hdr->k_m_c); k = (tmp >> 23) << 5; m = (0x1ff & (tmp >> 14)) << 5; c = 0x1f & (tmp >> 9); if((tmp & 0x1ff) != 0) { fprintf(stderr, "[decoder] Unexpected data in packet format. Sender uses newer UltraGrid version?\n"); exit_uv(1); ret = FALSE; goto cleanup; } seed = ntohl(hdr->seed); } else { fprintf(stderr, "[decoder] Unknown packet type: %d.\n", pckt->pt); exit_uv(1); ret = FALSE; goto cleanup; } if(substream >= decoder->max_substreams) { fprintf(stderr, "[decoder] received substream ID %d. Expecting at most %d substreams. Did you set -M option?\n", substream, decoder->max_substreams); exit_uv(1); ret = FALSE; goto cleanup; } buffer_num[substream] = buffer_number; buffer_len[substream] = buffer_length; ll_insert(pckt_list[substream], data_pos, len); if (pckt->pt == PT_VIDEO) { /* Critical section * each thread *MUST* wait here if this condition is true */ if (!(decoder->received_vid_desc.width == width && decoder->received_vid_desc.height == height && decoder->received_vid_desc.color_spec == color_spec && decoder->received_vid_desc.interlacing == interlacing && //decoder->received_vid_desc.video_type == video_type && decoder->received_vid_desc.fps == fps )) { decoder->received_vid_desc.width = width; decoder->received_vid_desc.height = height; decoder->received_vid_desc.color_spec = color_spec; decoder->received_vid_desc.interlacing = interlacing; decoder->received_vid_desc.fps = fps; frame = reconfigure_decoder(decoder, decoder->received_vid_desc, frame); pbuf_data->frame_buffer = frame; if(!frame) { ret = FALSE; goto cleanup; } } } else if (pckt->pt == PT_VIDEO_LDGM) { if(!decoder->fec_state) { decoder->fec_state = ldgm_decoder_init(k, m, c, seed); if(decoder->fec_state == NULL) { fprintf(stderr, "[decoder] Unable to initialize LDGM.\n"); exit_uv(1); ret = FALSE; goto cleanup; } int i; } } if(decoder->decoder_type == EXTERNAL_DECODER) { memcpy(ext_recv_buffer, decoder->ext_recv_buffer, decoder->max_substreams * sizeof(char *)); } if (pckt->pt == PT_VIDEO) { if(!decoder->postprocess) { if (!decoder->merged_fb) { tile = vf_get_tile(frame, substream); } else { tile = vf_get_tile(frame, 0); } } else { if (!decoder->merged_fb) { tile = vf_get_tile(decoder->pp_frame, substream); } else { tile = vf_get_tile(decoder->pp_frame, 0); } } if(decoder->decoder_type == LINE_DECODER) { struct line_decoder *line_decoder = &decoder->line_decoder[substream]; /* End of critical section */ /* MAGIC, don't touch it, you definitely break it * *source* is data from network, *destination* is frame buffer */ /* compute Y pos in source frame and convert it to * byte offset in the destination frame */ int y = (data_pos / line_decoder->src_linesize) * line_decoder->dst_pitch; /* compute X pos in source frame */ int s_x = data_pos % line_decoder->src_linesize; /* convert X pos from source frame into the destination frame. * it is byte offset from the beginning of a line. */ int d_x = ((int)((s_x) / line_decoder->src_bpp)) * line_decoder->dst_bpp; /* pointer to data payload in packet */ source = (unsigned char*)(data); /* copy whole packet that can span several lines. * we need to clip data (v210 case) or center data (RGBA, R10k cases) */ while (len > 0) { /* len id payload length in source BPP * decoder needs len in destination BPP, so convert it */ int l = ((int)(len / line_decoder->src_bpp)) * line_decoder->dst_bpp; /* do not copy multiple lines, we need to * copy (& clip, center) line by line */ if (l + d_x > (int) line_decoder->dst_linesize) { l = line_decoder->dst_linesize - d_x; } /* compute byte offset in destination frame */ offset = y + d_x; /* watch the SEGV */ if (l + line_decoder->base_offset + offset <= tile->data_len) { /*decode frame: * we have offset for destination * we update source contiguously * we pass {r,g,b}shifts */ line_decoder->decode_line((unsigned char*)tile->data + line_decoder->base_offset + offset, source, l, line_decoder->rshift, line_decoder->gshift, line_decoder->bshift); /* we decoded one line (or a part of one line) to the end of the line * so decrease *source* len by 1 line (or that part of the line */ len -= line_decoder->src_linesize - s_x; /* jump in source by the same amount */ source += line_decoder->src_linesize - s_x; } else { /* this should not ever happen as we call reconfigure before each packet * iff reconfigure is needed. But if it still happens, something is terribly wrong * say it loudly */ if((prints % 100) == 0) { fprintf(stderr, "WARNING!! Discarding input data as frame buffer is too small.\n" "Well this should not happened. Expect troubles pretty soon.\n"); } prints++; len = 0; } /* each new line continues from the beginning */ d_x = 0; /* next line from beginning */ s_x = 0; y += line_decoder->dst_pitch; /* next line */ } } else if(decoder->decoder_type == EXTERNAL_DECODER) { //int pos = (substream >> 3) & 0x7 + (substream & 0x7) * frame->grid_width; memcpy(decoder->ext_recv_buffer[substream] + data_pos, (unsigned char*)(pckt->data + sizeof(video_payload_hdr_t)), len); } } else { /* PT_VIDEO_LDGM */ memcpy(fec_buffers[substream] + data_pos, (unsigned char*)(pckt->data + sizeof(ldgm_payload_hdr_t)), len); } cdata = cdata->nxt; } if(!pckt) { ret = FALSE; goto cleanup; } if (pckt->pt == PT_VIDEO_LDGM) { int x,y; for (x = 0; x < get_video_mode_tiles_x(decoder->video_mode); ++x) { for (y = 0; y < get_video_mode_tiles_y(decoder->video_mode); ++y) { int pos = x + get_video_mode_tiles_x(decoder->video_mode) * y; char *out_buffer = NULL; int out_len = 0; ldgm_decoder_decode(decoder->fec_state, fec_buffers[pos], buffer_len[pos], &out_buffer, &out_len, pckt_list[pos]); //static int good = 0, bad = 0; if(out_len == 0) { ret = FALSE; fprintf(stderr, "[decoder] LDGM: unable to reconstruct data.\n"); goto cleanup; } //good++; //fprintf(stderr, "good: %d bad: %d\n", good, bad); check_for_mode_change(decoder, (video_payload_hdr_t *) out_buffer, &frame); pbuf_data->frame_buffer = frame; if(!frame) { ret = FALSE; goto cleanup; } struct video_frame *out_frame; int divisor; if(!decoder->postprocess) { out_frame = frame; } else { out_frame = decoder->pp_frame; } if (!decoder->merged_fb) { divisor = decoder->max_substreams; } else { divisor = 1; } tile = vf_get_tile(out_frame, pos % divisor); out_buffer += sizeof(video_payload_hdr_t); out_len -= sizeof(video_payload_hdr_t); if(decoder->decoder_type == EXTERNAL_DECODER) { buffer_len[pos] = out_len; ext_recv_buffer[pos] = out_buffer; } else { // linedecoder struct line_decoder *line_decoder = &decoder->line_decoder[pos]; //fprintf(stderr, "%d %d \n", ll_count_bytes(pckt_list[pos]), length[pos]); buffer_len[pos] = out_len; int data_pos = 0; char *src = out_buffer; char *dst = tile->data; while(data_pos < (int) out_len) { line_decoder->decode_line((unsigned char*)dst, (unsigned char *) src, vc_get_linesize(tile->width ,frame->color_spec), line_decoder->rshift, line_decoder->gshift, line_decoder->bshift); src += line_decoder->src_linesize; dst += vc_get_linesize(tile->width ,frame->color_spec); data_pos += line_decoder->src_linesize; } } } } } else { /* PT_VIDEO */ for(i = 0; i < (int) decoder->max_substreams; ++i) { if(buffer_len[i] != ll_count_bytes(pckt_list[i])) { fprintf(stderr, "Frame incomplete - substream %d, buffer %d: expected %u bytes, got %u. ", i, (unsigned int) buffer_num[i], buffer_len[i], (unsigned int) ll_count_bytes(pckt_list[i])); if(decoder->decoder_type == EXTERNAL_DECODER && !decoder->accepts_corrupted_frame) { ret = FALSE; fprintf(stderr, "dropped.\n"); goto cleanup; } fprintf(stderr, "\n"); } } } if(decoder->decoder_type == EXTERNAL_DECODER) { int tile_width = decoder->received_vid_desc.width; // get_video_mode_tiles_x(decoder->video_mode); int tile_height = decoder->received_vid_desc.height; // get_video_mode_tiles_y(decoder->video_mode); int x, y; struct video_frame *output; if(decoder->postprocess) { output = decoder->pp_frame; } else { output = frame; } for (x = 0; x < get_video_mode_tiles_x(decoder->video_mode); ++x) { for (y = 0; y < get_video_mode_tiles_y(decoder->video_mode); ++y) { int pos = x + get_video_mode_tiles_x(decoder->video_mode) * y; char *out; if(decoder->merged_fb) { tile = vf_get_tile(output, 0); // TODO: OK when rendering directly to display FB, otherwise, do not reflect pitch (we use PP) out = tile->data + y * decoder->pitch * tile_height + vc_get_linesize(tile_width, decoder->out_codec) * x; } else { tile = vf_get_tile(output, x); out = tile->data; } decompress_frame(decoder->ext_decoder, (unsigned char *) out, (unsigned char *) ext_recv_buffer[pos], buffer_len[pos]); } } } if(decoder->postprocess) { int i; vo_postprocess(decoder->postprocess, decoder->pp_frame, frame, decoder->display_pitch); for (i = 1; i < decoder->pp_output_frames_count; ++i) { display_put_frame(decoder->display, (char *) frame); frame = display_get_frame(decoder->display); vo_postprocess(decoder->postprocess, NULL, frame, decoder->display_pitch); } /* get new postprocess frame */ decoder->pp_frame = vo_postprocess_getf(decoder->postprocess); } if(decoder->change_il) { unsigned int i; for(i = 0; i < frame->tile_count; ++i) { struct tile *tile = vf_get_tile(frame, i); decoder->change_il(tile->data, tile->data, vc_get_linesize(tile->width, decoder->out_codec), tile->height); } } cleanup: for(i = 0; i < (int) decoder->max_substreams; ++i) { ll_destroy(pckt_list[i]); free(fec_buffers[i]); } free(pckt_list); free(buffer_len); free(buffer_num); free(fec_buffers); return ret; }
46.076517
173
0.446735
29be7ec8cbd105b3d4a93117711b859151ba8cec
82,103
c
C
src/tests/26_medianOfArray_unittest.c
cdeler/test_interviewbit
31f0eefd5fca196ff09d9e43a1d1a5b3d44454be
[ "MIT" ]
null
null
null
src/tests/26_medianOfArray_unittest.c
cdeler/test_interviewbit
31f0eefd5fca196ff09d9e43a1d1a5b3d44454be
[ "MIT" ]
null
null
null
src/tests/26_medianOfArray_unittest.c
cdeler/test_interviewbit
31f0eefd5fca196ff09d9e43a1d1a5b3d44454be
[ "MIT" ]
null
null
null
// // Created by user on 2/19/19. // #include <stddef.h> #include <setjmp.h> #include <stdarg.h> #include <cmocka.h> #include <malloc.h> #include <string.h> #include "interviewbit.h" static void _test01_smoke(void **state __unused) { double res; int *arg1, *arg2; #if 1 arg1 = NULL; arg2 = (int[]){20, }; res = findMedianSortedArrays(arg1, 0, arg2, 1); assert_true(res == 20.0); arg1 = (int[]){-50, -41, -40, -19, 5, 21, 28}; arg2 = (int[]){-50, -21, -10}; res = findMedianSortedArrays(arg1, 7, arg2, 3); assert_true(res == -20.0); arg1 = (int[]){-37, -9, 10, 19}; arg2 = (int[]){-29, 18, 46}; res = findMedianSortedArrays(arg1, 4, arg2, 3); assert_true(res == 10.0); arg1 = (int[]){-49, 33, 35, 42 }; arg2 = (int[]){-26 }; res = findMedianSortedArrays(arg1, 4, arg2, 1); assert_true(res == 33.0); #else arg1 = (int[]) {-9995,-9991,-9991,-9988,-9987,-9986,-9986,-9985,-9983,-9980,-9980,-9978,-9970,-9967,-9965,-9964, -9963,-9963,-9962,-9962,-9962,-9960,-9959,-9958,-9957,-9957,-9955,-9951,-9951,-9948,-9945,-9945,-9944,-9940,-9933,-9932,-9930,-9925,-9925,-9924,-9924,-9920,-9915,-9913,-9912,-9912,-9911,-9907,-9905,-9904,-9901,-9900,-9900,-9899,-9899,-9896,-9891,-9889,-9887,-9885,-9885,-9882,-9879,-9874,-9873,-9872,-9869,-9866,-9865,-9865,-9856,-9852,-9851,-9850,-9848,-9848,-9841,-9837,-9836,-9836,-9836,-9835,-9834,-9833,-9833,-9831,-9830,-9829,-9829,-9825,-9824,-9824,-9823,-9823,-9818,-9816,-9816,-9815,-9814,-9810,-9809,-9808,-9808,-9808,-9807,-9803,-9801,-9798,-9795,-9795,-9782,-9782,-9778,-9778,-9777,-9777,-9774,-9773,-9770,-9770,-9769,-9769,-9768,-9761,-9759,-9757,-9754,-9754,-9753,-9750,-9750,-9749,-9746,-9744,-9743,-9743,-9742,-9739,-9737,-9737,-9736,-9735,-9734,-9732,-9731,-9731,-9726,-9715,-9713,-9708,-9708,-9706,-9704,-9703,-9692,-9689,-9687,-9686,-9686,-9686,-9680,-9677,-9676,-9673,-9665,-9665,-9663,-9662,-9661,-9660,-9659,-9655,-9648,-9647,-9646,-9643,-9635,-9632,-9629,-9628,-9626,-9625,-9623,-9621,-9614,-9614,-9613,-9613,-9612,-9608,-9607,-9607,-9606,-9606,-9605,-9603,-9600,-9593,-9589,-9586,-9581,-9580,-9579,-9579,-9579,-9577,-9574,-9572,-9570,-9561,-9559,-9558,-9555,-9550,-9545,-9542,-9536,-9536,-9535,-9531,-9529,-9526,-9523,-9522,-9522,-9522,-9521,-9520,-9520,-9519,-9519,-9517,-9515,-9511,-9508,-9500,-9497,-9496,-9494,-9494,-9491,-9489,-9487,-9487,-9487,-9484,-9478,-9478,-9472,-9470,-9468,-9465,-9461,-9459,-9458,-9457,-9454,-9452,-9447,-9447,-9446,-9446,-9446,-9444,-9444,-9443,-9434,-9433,-9433,-9430,-9430,-9429,-9427,-9423,-9414,-9411,-9411,-9406,-9406,-9402,-9400,-9400,-9399,-9394,-9393,-9391,-9389,-9388,-9385,-9384,-9382,-9382,-9382,-9381,-9378,-9376,-9372,-9369,-9368,-9367,-9366,-9365,-9363,-9358,-9357,-9357,-9352,-9351,-9349,-9348,-9347,-9344,-9344,-9340,-9334,-9333,-9331,-9331,-9331,-9330,-9330,-9326,-9325,-9325,-9324,-9321,-9320,-9318,-9317,-9315,-9313,-9313,-9302,-9299,-9298,-9295,-9293,-9293,-9290,-9289,-9287,-9287,-9287,-9286,-9283,-9282,-9281,-9281,-9280,-9280,-9279,-9279,-9278,-9277,-9277,-9276,-9276,-9271,-9268,-9268,-9267,-9267,-9266,-9263,-9262,-9262,-9261,-9258,-9258,-9255,-9254,-9251,-9250,-9250,-9250,-9249,-9244,-9240,-9238,-9234,-9231,-9231,-9230,-9227,-9223,-9217,-9214,-9214,-9213,-9211,-9210,-9208,-9208,-9206,-9204,-9203,-9203,-9202,-9201,-9196,-9195,-9195,-9191,-9183,-9183,-9179,-9176,-9176,-9175,-9171,-9169,-9168,-9168,-9168,-9167,-9163,-9162,-9155,-9153,-9151,-9150,-9141,-9136,-9134,-9132,-9132,-9131,-9129,-9126,-9126,-9126,-9124,-9122,-9119,-9118,-9117,-9117,-9116,-9115,-9115,-9111,-9110,-9109,-9105,-9104,-9101,-9097,-9095,-9090,-9089,-9085,-9080,-9079,-9071,-9069,-9064,-9063,-9062,-9060,-9060,-9059,-9056,-9055,-9054,-9053,-9050,-9049,-9049,-9047,-9046,-9044,-9043,-9042,-9041,-9040,-9039,-9038,-9038,-9038,-9036,-9030,-9030,-9027,-9024,-9022,-9022,-9020,-9018,-9015,-9011,-9007,-9003,-9000,-8998,-8994,-8994,-8992,-8991,-8990,-8989,-8987,-8987,-8981,-8980,-8978,-8978,-8975,-8974,-8973,-8967,-8966,-8958,-8950,-8949,-8948,-8945,-8945,-8939,-8933,-8930,-8930,-8927,-8926,-8926,-8925,-8925,-8924,-8920,-8918,-8918,-8917,-8915,-8911,-8907,-8901,-8897,-8897,-8893,-8893,-8893,-8892,-8885,-8884,-8882,-8882,-8879,-8876,-8876,-8873,-8873,-8871,-8871,-8870,-8863,-8860,-8859,-8859,-8858,-8857,-8850,-8847,-8847,-8846,-8845,-8841,-8835,-8834,-8833,-8831,-8824,-8821,-8819,-8810,-8809,-8807,-8805,-8803,-8801,-8800,-8793,-8791,-8789,-8785,-8782,-8777,-8776,-8776,-8769,-8763,-8761,-8761,-8756,-8751,-8748,-8745,-8743,-8740,-8736,-8736,-8735,-8734,-8733,-8732,-8730,-8729,-8729,-8726,-8724,-8718,-8718,-8717,-8716,-8713,-8713,-8708,-8707,-8705,-8704,-8701,-8696,-8690,-8687,-8687,-8685,-8682,-8682,-8679,-8675,-8674,-8673,-8673,-8672,-8672,-8671,-8670,-8668,-8668,-8663,-8661,-8660,-8656,-8651,-8649,-8648,-8643,-8639,-8632,-8630,-8628,-8626,-8621,-8621,-8621,-8618,-8614,-8614,-8611,-8610,-8610,-8603,-8600,-8600,-8597,-8595,-8594,-8591,-8587,-8584,-8582,-8582,-8579,-8579,-8577,-8577,-8571,-8571,-8570,-8569,-8568,-8566,-8566,-8564,-8563,-8559,-8558,-8555,-8554,-8554,-8553,-8553,-8549,-8545,-8543,-8543,-8542,-8539,-8538,-8537,-8529,-8529,-8529,-8529,-8521,-8517,-8513,-8512,-8512,-8507,-8507,-8507,-8506,-8505,-8505,-8504,-8504,-8503,-8502,-8501,-8501,-8500,-8498,-8495,-8491,-8490,-8490,-8487,-8486,-8486,-8485,-8481,-8480,-8480,-8478,-8477,-8476,-8473,-8473,-8472,-8470,-8469,-8465,-8460,-8456,-8456,-8454,-8453,-8452,-8450,-8446,-8446,-8443,-8440,-8437,-8435,-8432,-8432,-8429,-8428,-8428,-8426,-8424,-8423,-8421,-8418,-8414,-8412,-8409,-8406,-8405,-8402,-8401,-8401,-8393,-8392,-8390,-8388,-8387,-8383,-8382,-8381,-8374,-8374,-8372,-8361,-8356,-8354,-8354,-8353,-8352,-8348,-8347,-8345,-8345,-8344,-8343,-8341,-8341,-8331,-8330,-8329,-8328,-8326,-8322,-8320,-8319,-8317,-8317,-8314,-8311,-8311,-8310,-8308,-8307,-8307,-8305,-8303,-8302,-8301,-8299,-8296,-8292,-8291,-8287,-8285,-8284,-8278,-8271,-8271,-8269,-8267,-8267,-8264,-8263,-8263,-8259,-8257,-8255,-8254,-8252,-8246,-8243,-8242,-8234,-8233,-8229,-8228,-8221,-8216,-8213,-8212,-8212,-8211,-8210,-8209,-8205,-8203,-8202,-8201,-8199,-8196,-8194,-8192,-8187,-8187,-8187,-8187,-8186,-8185,-8183,-8181,-8179,-8177,-8175,-8174,-8173,-8171,-8169,-8167,-8166,-8161,-8154,-8153,-8153,-8152,-8148,-8147,-8147,-8146,-8146,-8143,-8141,-8141,-8140,-8139,-8138,-8131,-8131,-8131,-8128,-8127,-8123,-8122,-8122,-8121,-8120,-8120,-8116,-8115,-8112,-8109,-8106,-8103,-8102,-8102,-8099,-8094,-8093,-8092,-8086,-8085,-8083,-8080,-8080,-8077,-8074,-8071,-8068,-8068,-8068,-8067,-8066,-8064,-8058,-8052,-8048,-8043,-8041,-8041,-8039,-8038,-8038,-8035,-8030,-8030,-8030,-8028,-8027,-8025,-8022,-8022,-8020,-8015,-8012,-8012,-8011,-8008,-8005,-7999,-7998,-7998,-7997,-7994,-7994,-7992,-7990,-7987,-7987,-7987,-7986,-7976,-7975,-7970,-7969,-7968,-7961,-7961,-7958,-7957,-7952,-7949,-7948,-7947,-7945,-7945,-7943,-7943,-7934,-7934,-7933,-7931,-7930,-7929,-7928,-7927,-7926,-7925,-7925,-7921,-7918,-7912,-7908,-7907,-7905,-7901,-7899,-7898,-7894,-7890,-7888,-7886,-7886,-7886,-7875,-7873,-7871,-7870,-7867,-7866,-7866,-7866,-7865,-7864,-7863,-7862,-7861,-7859,-7858,-7855,-7847,-7846,-7846,-7840,-7840,-7837,-7836,-7835,-7834,-7833,-7832,-7832,-7830,-7829,-7827,-7826,-7823,-7821,-7821,-7819,-7815,-7815,-7814,-7814,-7813,-7811,-7802,-7801,-7795,-7792,-7791,-7790,-7788,-7787,-7781,-7781,-7779,-7779,-7777,-7773,-7773,-7772,-7771,-7771,-7770,-7768,-7767,-7764,-7760,-7751,-7750,-7749,-7746,-7738,-7736,-7736,-7733,-7733,-7732,-7730,-7729,-7726,-7726,-7725,-7723,-7722,-7721,-7720,-7717,-7713,-7711,-7711,-7705,-7705,-7704,-7697,-7692,-7691,-7690,-7690,-7687,-7686,-7685,-7684,-7681,-7671,-7670,-7667,-7664,-7663,-7657,-7656,-7647,-7645,-7642,-7641,-7639,-7638,-7638,-7637,-7634,-7632,-7626,-7624,-7621,-7619,-7612,-7609,-7608,-7606,-7606,-7606,-7604,-7603,-7596,-7594,-7593,-7592,-7588,-7587,-7584,-7582,-7581,-7579,-7578,-7574,-7569,-7569,-7568,-7566,-7561,-7560,-7560,-7558,-7556,-7549,-7547,-7544,-7543,-7539,-7535,-7530,-7527,-7525,-7522,-7520,-7519,-7517,-7516,-7514,-7512,-7509,-7504,-7502,-7499,-7498,-7496,-7496,-7491,-7490,-7489,-7487,-7487,-7480,-7479,-7478,-7478,-7473,-7473,-7472,-7465,-7464,-7464,-7464,-7463,-7462,-7462,-7462,-7462,-7461,-7459,-7457,-7455,-7454,-7448,-7445,-7443,-7437,-7437,-7436,-7436,-7436,-7436,-7432,-7431,-7429,-7426,-7425,-7423,-7423,-7422,-7422,-7422,-7417,-7417,-7415,-7415,-7411,-7410,-7407,-7405,-7404,-7395,-7393,-7387,-7386,-7384,-7384,-7383,-7382,-7378,-7378,-7376,-7376,-7376,-7373,-7371,-7367,-7365,-7364,-7360,-7360,-7360,-7358,-7355,-7353,-7352,-7352,-7351,-7351,-7347,-7345,-7343,-7340,-7339,-7338,-7330,-7326,-7325,-7324,-7316,-7315,-7315,-7312,-7311,-7310,-7309,-7302,-7299,-7298,-7296,-7292,-7287,-7287,-7285,-7284,-7284,-7283,-7282,-7280,-7279,-7279,-7279,-7279,-7278,-7278,-7277,-7274,-7271,-7271,-7271,-7269,-7266,-7265,-7264,-7264,-7262,-7260,-7260,-7259,-7259,-7259,-7255,-7255,-7253,-7248,-7246,-7244,-7242,-7242,-7242,-7241,-7239,-7232,-7229,-7228,-7228,-7227,-7225,-7225,-7219,-7216,-7215,-7215,-7214,-7210,-7209,-7209,-7208,-7206,-7205,-7203,-7203,-7201,-7200,-7197,-7197,-7196,-7196,-7189,-7189,-7186,-7184,-7183,-7183,-7182,-7181,-7180,-7179,-7177,-7176,-7175,-7171,-7161,-7160,-7159,-7158,-7139,-7138,-7137,-7132,-7127,-7126,-7124,-7123,-7123,-7121,-7119,-7118,-7117,-7113,-7113,-7112,-7111,-7101,-7093,-7092,-7091,-7088,-7087,-7085,-7081,-7078,-7076,-7075,-7068,-7067,-7067,-7066,-7061,-7060,-7059,-7058,-7058,-7050,-7048,-7045,-7043,-7043,-7042,-7038,-7036,-7035,-7033,-7032,-7029,-7029,-7027,-7026,-7024,-7023,-7021,-7020,-7018,-7018,-7013,-7011,-7006,-7005,-7005,-7005,-7003,-7002,-6999,-6999,-6999,-6994,-6990,-6987,-6985,-6985,-6980,-6980,-6980,-6977,-6977,-6976,-6974,-6972,-6971,-6968,-6961,-6960,-6959,-6955,-6955,-6953,-6953,-6951,-6951,-6949,-6946,-6941,-6937,-6930,-6930,-6924,-6918,-6916,-6915,-6915,-6914,-6914,-6914,-6911,-6906,-6906,-6905,-6902,-6900,-6894,-6894,-6892,-6891,-6891,-6891,-6890,-6890,-6883,-6882,-6882,-6879,-6877,-6875,-6874,-6874,-6873,-6871,-6871,-6868,-6866,-6860,-6859,-6855,-6852,-6851,-6849,-6846,-6845,-6842,-6837,-6836,-6832,-6830,-6829,-6828,-6823,-6823,-6820,-6819,-6819,-6816,-6816,-6814,-6814,-6812,-6812,-6811,-6809,-6809,-6808,-6807,-6803,-6798,-6797,-6797,-6793,-6792,-6792,-6791,-6789,-6789,-6789,-6783,-6782,-6777,-6763,-6762,-6761,-6761,-6759,-6759,-6758,-6757,-6755,-6753,-6750,-6750,-6748,-6746,-6745,-6745,-6741,-6740,-6739,-6733,-6732,-6730,-6729,-6724,-6719,-6717,-6717,-6709,-6703,-6702,-6700,-6698,-6691,-6688,-6687,-6687,-6685,-6679,-6679,-6678,-6677,-6677,-6676,-6673,-6671,-6671,-6670,-6670,-6668,-6667,-6667,-6661,-6660,-6658,-6656,-6655,-6655,-6654,-6647,-6646,-6643,-6640,-6638,-6637,-6633,-6629,-6628,-6628,-6627,-6626,-6625,-6621,-6619,-6618,-6615,-6614,-6611,-6609,-6608,-6606,-6602,-6596,-6594,-6592,-6589,-6588,-6588,-6587,-6585,-6579,-6579,-6578,-6578,-6578,-6577,-6572,-6571,-6567,-6565,-6562,-6561,-6559,-6553,-6552,-6552,-6543,-6540,-6533,-6533,-6528,-6525,-6525,-6521,-6520,-6519,-6517,-6515,-6513,-6511,-6511,-6503,-6503,-6502,-6500,-6499,-6493,-6493,-6488,-6487,-6484,-6483,-6479,-6475,-6468,-6467,-6463,-6458,-6457,-6457,-6455,-6453,-6445,-6444,-6441,-6440,-6440,-6438,-6438,-6434,-6433,-6433,-6425,-6418,-6414,-6406,-6405,-6403,-6401,-6400,-6397,-6391,-6390,-6389,-6387,-6387,-6383,-6381,-6381,-6380,-6379,-6377,-6371,-6371,-6368,-6366,-6366,-6363,-6363,-6360,-6357,-6356,-6356,-6354,-6352,-6352,-6348,-6347,-6346,-6345,-6344,-6344,-6344,-6340,-6340,-6339,-6336,-6328,-6327,-6322,-6319,-6318,-6311,-6307,-6306,-6302,-6302,-6302,-6299,-6294,-6292,-6285,-6280,-6279,-6279,-6277,-6275,-6275,-6275,-6274,-6274,-6271,-6270,-6269,-6268,-6266,-6265,-6264,-6261,-6260,-6257,-6256,-6253,-6249,-6247,-6246,-6244,-6244,-6244,-6244,-6243,-6237,-6237,-6235,-6235,-6233,-6233,-6231,-6230,-6224,-6216,-6214,-6214,-6210,-6208,-6207,-6201,-6199,-6197,-6197,-6195,-6195,-6195,-6194,-6188,-6188,-6184,-6184,-6181,-6181,-6177,-6173,-6168,-6168,-6168,-6167,-6166,-6163,-6161,-6158,-6156,-6155,-6154,-6151,-6151,-6145,-6144,-6143,-6142,-6141,-6136,-6135,-6133,-6132,-6131,-6130,-6129,-6129,-6128,-6123,-6121,-6117,-6113,-6112,-6110,-6106,-6105,-6101,-6099,-6098,-6097,-6096,-6090,-6083,-6083,-6081,-6079,-6079,-6076,-6073,-6073,-6068,-6068,-6067,-6060,-6055,-6050,-6049,-6046,-6033,-6031,-6030,-6028,-6027,-6022,-6022,-6020,-6020,-6019,-6019,-6018,-6016,-6015,-6015,-6013,-6012,-6010,-6008,-6004,-5999,-5996,-5996,-5996,-5996,-5996,-5996,-5995,-5994,-5993,-5992,-5992,-5991,-5990,-5990,-5985,-5984,-5979,-5976,-5966,-5965,-5964,-5961,-5961,-5959,-5956,-5955,-5952,-5949,-5948,-5946,-5946,-5944,-5943,-5941,-5940,-5938,-5936,-5935,-5935,-5933,-5932,-5930,-5929,-5929,-5928,-5925,-5923,-5923,-5923,-5921,-5921,-5920,-5920,-5918,-5918,-5918,-5915,-5912,-5911,-5910,-5903,-5902,-5902,-5902,-5901,-5900,-5898,-5897,-5892,-5886,-5885,-5880,-5879,-5878,-5875,-5874,-5872,-5866,-5862,-5860,-5858,-5853,-5853,-5850,-5848,-5847,-5847,-5845,-5845,-5842,-5841,-5839,-5837,-5836,-5832,-5830,-5829,-5829,-5820,-5820,-5815,-5813,-5809,-5809,-5804,-5804,-5802,-5800,-5796,-5791,-5789,-5788,-5788,-5787,-5786,-5784,-5784,-5782,-5781,-5778,-5777,-5777,-5777,-5776,-5770,-5768,-5766,-5765,-5764,-5759,-5757,-5757,-5757,-5750,-5745,-5738,-5737,-5732,-5731,-5725,-5725,-5721,-5721,-5715,-5714,-5709,-5709,-5706,-5705,-5703,-5703,-5700,-5700,-5697,-5692,-5690,-5689,-5688,-5688,-5687,-5686,-5685,-5685,-5680,-5680,-5679,-5679,-5677,-5673,-5672,-5666,-5666,-5663,-5662,-5661,-5660,-5658,-5655,-5652,-5649,-5649,-5645,-5639,-5639,-5638,-5638,-5634,-5633,-5631,-5631,-5631,-5630,-5628,-5626,-5624,-5622,-5620,-5619,-5618,-5617,-5613,-5611,-5608,-5608,-5607,-5592,-5590,-5590,-5589,-5588,-5588,-5586,-5584,-5580,-5580,-5579,-5575,-5572,-5570,-5568,-5566,-5564,-5564,-5559,-5558,-5557,-5556,-5553,-5553,-5552,-5551,-5551,-5550,-5550,-5550,-5550,-5549,-5549,-5549,-5548,-5548,-5545,-5542,-5541,-5539,-5537,-5537,-5536,-5536,-5534,-5533,-5531,-5528,-5527,-5523,-5522,-5520,-5519,-5518,-5515,-5514,-5511,-5510,-5508,-5507,-5506,-5504,-5503,-5499,-5499,-5499,-5499,-5495,-5495,-5493,-5490,-5488,-5487,-5486,-5485,-5485,-5483,-5483,-5479,-5478,-5478,-5475,-5475,-5470,-5470,-5469,-5466,-5447,-5447,-5444,-5443,-5441,-5441,-5439,-5439,-5438,-5438,-5436,-5434,-5429,-5427,-5425,-5423,-5420,-5419,-5412,-5410,-5407,-5406,-5403,-5402,-5402,-5401,-5398,-5397,-5397,-5396,-5396,-5393,-5391,-5391,-5390,-5386,-5385,-5383,-5383,-5382,-5381,-5376,-5375,-5368,-5361,-5359,-5356,-5354,-5354,-5352,-5352,-5351,-5351,-5348,-5348,-5346,-5345,-5342,-5340,-5340,-5337,-5332,-5332,-5331,-5330,-5329,-5324,-5321,-5321,-5319,-5317,-5314,-5314,-5311,-5307,-5307,-5306,-5305,-5303,-5301,-5301,-5300,-5296,-5296,-5293,-5286,-5284,-5281,-5281,-5280,-5279,-5278,-5277,-5276,-5275,-5273,-5272,-5266,-5264,-5261,-5259,-5257,-5257,-5256,-5251,-5251,-5244,-5239,-5237,-5233,-5228,-5227,-5226,-5226,-5224,-5224,-5221,-5221,-5217,-5215,-5215,-5211,-5208,-5205,-5204,-5204,-5203,-5200,-5197,-5196,-5192,-5190,-5188,-5187,-5185,-5173,-5172,-5167,-5166,-5165,-5164,-5157,-5155,-5155,-5154,-5151,-5148,-5148,-5145,-5144,-5142,-5139,-5134,-5134,-5132,-5130,-5128,-5127,-5125,-5124,-5117,-5116,-5114,-5112,-5107,-5106,-5103,-5100,-5098,-5094,-5090,-5089,-5089,-5088,-5086,-5086,-5084,-5081,-5079,-5075,-5075,-5072,-5069,-5067,-5066,-5066,-5065,-5065,-5062,-5057,-5057,-5056,-5053,-5052,-5048,-5045,-5044,-5043,-5037,-5037,-5036,-5032,-5030,-5027,-5023,-5022,-5022,-5022,-5017,-5017,-5015,-5011,-5010,-5008,-5007,-5006,-5005,-5003,-5001,-5000,-5000,-4997,-4996,-4994,-4991,-4989,-4988,-4988,-4987,-4987,-4984,-4983,-4981,-4976,-4971,-4969,-4968,-4966,-4966,-4965,-4963,-4962,-4961,-4961,-4952,-4950,-4944,-4943,-4942,-4940,-4939,-4937,-4937,-4936,-4933,-4922,-4921,-4920,-4919,-4917,-4916,-4914,-4913,-4910,-4907,-4907,-4905,-4902,-4898,-4893,-4892,-4891,-4887,-4882,-4881,-4881,-4880,-4878,-4877,-4876,-4875,-4871,-4870,-4866,-4864,-4863,-4861,-4857,-4857,-4849,-4846,-4846,-4844,-4843,-4842,-4841,-4841,-4840,-4839,-4839,-4838,-4838,-4836,-4836,-4832,-4830,-4829,-4818,-4813,-4809,-4802,-4800,-4796,-4794,-4793,-4789,-4789,-4787,-4786,-4783,-4780,-4779,-4775,-4769,-4768,-4766,-4765,-4764,-4761,-4761,-4758,-4758,-4757,-4751,-4750,-4748,-4747,-4747,-4746,-4746,-4745,-4744,-4743,-4742,-4741,-4741,-4741,-4740,-4738,-4735,-4735,-4732,-4727,-4725,-4724,-4722,-4721,-4721,-4719,-4718,-4716,-4714,-4714,-4711,-4702,-4701,-4700,-4698,-4695,-4694,-4691,-4690,-4689,-4686,-4684,-4684,-4683,-4678,-4676,-4673,-4670,-4668,-4667,-4666,-4664,-4661,-4661,-4657,-4655,-4649,-4645,-4643,-4642,-4641,-4640,-4636,-4636,-4634,-4633,-4632,-4632,-4631,-4623,-4622,-4611,-4609,-4608,-4606,-4604,-4604,-4604,-4603,-4601,-4599,-4597,-4597,-4595,-4593,-4592,-4591,-4591,-4590,-4587,-4586,-4583,-4567,-4566,-4565,-4564,-4564,-4563,-4559,-4558,-4557,-4557,-4557,-4557,-4550,-4550,-4549,-4549,-4548,-4546,-4544,-4542,-4538,-4537,-4535,-4535,-4531,-4530,-4528,-4527,-4525,-4519,-4517,-4516,-4514,-4512,-4509,-4507,-4506,-4505,-4501,-4496,-4496,-4495,-4494,-4489,-4489,-4485,-4485,-4482,-4480,-4480,-4480,-4475,-4474,-4474,-4474,-4469,-4467,-4466,-4465,-4464,-4464,-4464,-4463,-4454,-4449,-4447,-4447,-4442,-4441,-4441,-4438,-4434,-4432,-4432,-4431,-4430,-4429,-4429,-4428,-4428,-4424,-4423,-4423,-4422,-4418,-4416,-4415,-4411,-4406,-4405,-4401,-4400,-4400,-4397,-4397,-4391,-4387,-4386,-4385,-4385,-4385,-4384,-4382,-4380,-4380,-4376,-4375,-4375,-4372,-4370,-4369,-4368,-4365,-4362,-4361,-4361,-4360,-4360,-4360,-4355,-4354,-4354,-4353,-4351,-4350,-4349,-4348,-4348,-4348,-4347,-4346,-4338,-4337,-4334,-4334,-4334,-4332,-4331,-4330,-4328,-4328,-4325,-4323,-4322,-4321,-4321,-4320,-4318,-4313,-4311,-4310,-4310,-4309,-4304,-4304,-4304,-4294,-4293,-4292,-4290,-4289,-4287,-4286,-4286,-4280,-4280,-4278,-4275,-4274,-4274,-4271,-4269,-4267,-4262,-4257,-4256,-4255,-4255,-4255,-4252,-4252,-4251,-4249,-4249,-4249,-4244,-4243,-4242,-4239,-4238,-4236,-4234,-4233,-4231,-4228,-4227,-4224,-4221,-4221,-4220,-4220,-4220,-4218,-4218,-4216,-4215,-4213,-4212,-4211,-4203,-4202,-4201,-4201,-4193,-4186,-4186,-4183,-4181,-4181,-4181,-4177,-4175,-4174,-4167,-4166,-4164,-4164,-4164,-4162,-4156,-4155,-4155,-4155,-4154,-4151,-4150,-4146,-4142,-4138,-4130,-4130,-4127,-4116,-4115,-4112,-4112,-4111,-4111,-4111,-4110,-4108,-4108,-4099,-4093,-4092,-4092,-4090,-4081,-4080,-4076,-4076,-4070,-4067,-4065,-4064,-4062,-4061,-4060,-4059,-4055,-4055,-4051,-4050,-4050,-4049,-4048,-4045,-4044,-4041,-4038,-4035,-4034,-4033,-4029,-4029,-4029,-4028,-4027,-4026,-4023,-4022,-4021,-4019,-4016,-4015,-4014,-4011,-4011,-4011,-4010,-4009,-4007,-4004,-4004,-4002,-4002,-4000,-3999,-3998,-3996,-3995,-3993,-3992,-3992,-3991,-3991,-3988,-3982,-3980,-3978,-3977,-3977,-3976,-3975,-3974,-3971,-3967,-3966,-3956,-3952,-3952,-3948,-3947,-3945,-3941,-3938,-3938,-3935,-3935,-3934,-3934,-3932,-3930,-3929,-3922,-3922,-3922,-3918,-3910,-3908,-3908,-3906,-3904,-3904,-3903,-3902,-3899,-3898,-3898,-3895,-3893,-3892,-3891,-3891,-3890,-3889,-3887,-3886,-3885,-3883,-3883,-3883,-3883,-3878,-3878,-3877,-3877,-3874,-3873,-3870,-3865,-3864,-3862,-3860,-3859,-3859,-3855,-3854,-3850,-3848,-3848,-3844,-3844,-3841,-3839,-3838,-3837,-3835,-3835,-3835,-3834,-3833,-3833,-3831,-3829,-3826,-3826,-3823,-3822,-3821,-3820,-3816,-3813,-3812,-3811,-3811,-3809,-3807,-3804,-3803,-3798,-3798,-3795,-3793,-3793,-3787,-3787,-3786,-3784,-3782,-3781,-3780,-3773,-3772,-3772,-3769,-3767,-3761,-3758,-3757,-3755,-3755,-3753,-3752,-3748,-3745,-3744,-3742,-3742,-3740,-3739,-3732,-3730,-3723,-3722,-3722,-3717,-3714,-3713,-3712,-3712,-3710,-3709,-3708,-3705,-3705,-3703,-3703,-3701,-3700,-3697,-3697,-3696,-3695,-3693,-3693,-3693,-3688,-3688,-3686,-3683,-3675,-3667,-3666,-3661,-3659,-3657,-3656,-3655,-3653,-3653,-3652,-3651,-3649,-3648,-3646,-3642,-3642,-3639,-3639,-3637,-3636,-3623,-3622,-3622,-3620,-3618,-3616,-3615,-3612,-3608,-3604,-3604,-3599,-3597,-3594,-3591,-3590,-3588,-3587,-3585,-3584,-3584,-3583,-3576,-3574,-3574,-3573,-3573,-3570,-3566,-3565,-3565,-3564,-3563,-3562,-3562,-3562,-3561,-3560,-3560,-3559,-3557,-3556,-3552,-3552,-3552,-3552,-3550,-3548,-3544,-3543,-3539,-3537,-3533,-3532,-3531,-3529,-3528,-3524,-3519,-3515,-3509,-3509,-3508,-3507,-3507,-3505,-3505,-3505,-3501,-3501,-3497,-3495,-3494,-3491,-3488,-3486,-3484,-3483,-3479,-3478,-3473,-3467,-3466,-3466,-3465,-3463,-3462,-3456,-3456,-3449,-3448,-3448,-3446,-3446,-3446,-3446,-3445,-3440,-3440,-3437,-3436,-3436,-3433,-3432,-3430,-3427,-3424,-3420,-3420,-3416,-3415,-3414,-3413,-3411,-3407,-3403,-3401,-3400,-3399,-3397,-3394,-3390,-3387,-3383,-3383,-3380,-3376,-3373,-3372,-3371,-3367,-3367,-3367,-3360,-3357,-3355,-3351,-3348,-3347,-3345,-3343,-3338,-3337,-3337,-3336,-3334,-3332,-3332,-3329,-3326,-3326,-3323,-3321,-3321,-3319,-3319,-3316,-3315,-3315,-3313,-3307,-3305,-3305,-3305,-3302,-3299,-3288,-3285,-3285,-3283,-3278,-3277,-3277,-3274,-3269,-3266,-3266,-3265,-3265,-3259,-3257,-3255,-3255,-3255,-3254,-3253,-3251,-3250,-3248,-3247,-3245,-3242,-3237,-3232,-3232,-3231,-3228,-3228,-3228,-3227,-3225,-3224,-3222,-3221,-3221,-3219,-3219,-3218,-3213,-3212,-3210,-3206,-3205,-3204,-3202,-3196,-3195,-3192,-3192,-3191,-3190,-3180,-3179,-3177,-3170,-3164,-3160,-3159,-3157,-3147,-3146,-3145,-3143,-3143,-3141,-3128,-3125,-3124,-3124,-3124,-3123,-3119,-3116,-3116,-3109,-3108,-3104,-3101,-3094,-3094,-3094,-3089,-3089,-3086,-3085,-3081,-3080,-3080,-3079,-3078,-3074,-3072,-3072,-3071,-3070,-3069,-3065,-3065,-3064,-3063,-3062,-3061,-3060,-3059,-3059,-3057,-3056,-3055,-3055,-3050,-3049,-3047,-3045,-3045,-3044,-3043,-3041,-3040,-3029,-3029,-3027,-3016,-3014,-3012,-3007,-3004,-3003,-3003,-3002,-3000,-2997,-2996,-2995,-2994,-2990,-2990,-2990,-2990,-2989,-2986,-2984,-2982,-2977,-2976,-2971,-2970,-2969,-2964,-2963,-2960,-2960,-2959,-2958,-2957,-2956,-2956,-2954,-2954,-2953,-2951,-2950,-2949,-2948,-2948,-2943,-2939,-2938,-2936,-2934,-2933,-2932,-2931,-2930,-2929,-2928,-2928,-2927,-2926,-2923,-2923,-2922,-2922,-2921,-2920,-2915,-2914,-2903,-2898,-2894,-2894,-2893,-2892,-2892,-2886,-2881,-2880,-2875,-2874,-2873,-2872,-2872,-2871,-2869,-2869,-2869,-2865,-2863,-2859,-2858,-2857,-2854,-2853,-2852,-2850,-2848,-2846,-2845,-2842,-2839,-2838,-2836,-2833,-2832,-2828,-2824,-2824,-2821,-2821,-2820,-2820,-2820,-2812,-2812,-2811,-2810,-2808,-2806,-2804,-2802,-2795,-2794,-2789,-2789,-2787,-2784,-2781,-2780,-2775,-2774,-2773,-2773,-2773,-2761,-2760,-2759,-2757,-2757,-2756,-2756,-2754,-2751,-2749,-2744,-2741,-2737,-2737,-2735,-2731,-2728,-2728,-2727,-2725,-2724,-2724,-2723,-2723,-2719,-2719,-2719,-2718,-2717,-2716,-2714,-2711,-2711,-2710,-2708,-2708,-2708,-2699,-2699,-2696,-2695,-2694,-2692,-2691,-2691,-2689,-2688,-2686,-2686,-2681,-2680,-2679,-2679,-2675,-2674,-2671,-2670,-2670,-2669,-2667,-2663,-2661,-2654,-2652,-2651,-2649,-2647,-2647,-2645,-2644,-2641,-2629,-2625,-2625,-2624,-2621,-2620,-2620,-2619,-2618,-2615,-2611,-2609,-2609,-2605,-2605,-2603,-2598,-2598,-2595,-2593,-2593,-2592,-2591,-2590,-2589,-2582,-2582,-2581,-2580,-2579,-2578,-2573,-2573,-2572,-2570,-2565,-2565,-2564,-2563,-2561,-2555,-2552,-2549,-2545,-2543,-2541,-2540,-2532,-2530,-2528,-2526,-2525,-2522,-2521,-2518,-2515,-2514,-2512,-2509,-2505,-2502,-2501,-2498,-2487,-2486,-2483,-2482,-2479,-2472,-2471,-2469,-2468,-2465,-2465,-2464,-2464,-2459,-2459,-2455,-2453,-2453,-2450,-2448,-2445,-2444,-2444,-2442,-2438,-2436,-2436,-2436,-2434,-2434,-2434,-2431,-2430,-2425,-2422,-2420,-2419,-2418,-2417,-2416,-2414,-2411,-2411,-2408,-2407,-2402,-2401,-2396,-2392,-2391,-2390,-2385,-2382,-2382,-2379,-2378,-2378,-2377,-2377,-2377,-2377,-2376,-2371,-2371,-2370,-2367,-2367,-2364,-2363,-2363,-2363,-2359,-2358,-2357,-2356,-2355,-2353,-2350,-2348,-2347,-2346,-2344,-2344,-2344,-2343,-2340,-2339,-2336,-2336,-2336,-2335,-2335,-2333,-2329,-2326,-2324,-2322,-2319,-2314,-2313,-2312,-2302,-2296,-2295,-2295,-2293,-2293,-2293,-2292,-2291,-2290,-2289,-2289,-2288,-2287,-2284,-2284,-2282,-2282,-2279,-2278,-2276,-2274,-2271,-2271,-2270,-2269,-2263,-2262,-2260,-2258,-2258,-2258,-2257,-2255,-2254,-2252,-2250,-2249,-2245,-2245,-2243,-2243,-2236,-2235,-2234,-2234,-2232,-2229,-2229,-2226,-2224,-2224,-2222,-2220,-2218,-2217,-2214,-2214,-2213,-2210,-2204,-2197,-2192,-2191,-2189,-2182,-2181,-2181,-2179,-2177,-2176,-2175,-2174,-2174,-2171,-2171,-2171,-2166,-2162,-2161,-2159,-2158,-2157,-2156,-2155,-2149,-2149,-2148,-2145,-2145,-2145,-2145,-2142,-2140,-2139,-2138,-2135,-2134,-2133,-2126,-2126,-2125,-2125,-2125,-2123,-2119,-2115,-2115,-2115,-2113,-2113,-2111,-2109,-2108,-2098,-2097,-2097,-2093,-2092,-2090,-2088,-2087,-2085,-2084,-2083,-2081,-2078,-2077,-2077,-2076,-2074,-2073,-2073,-2072,-2069,-2069,-2068,-2067,-2067,-2064,-2064,-2062,-2061,-2061,-2061,-2061,-2060,-2058,-2055,-2054,-2051,-2051,-2049,-2037,-2036,-2035,-2034,-2031,-2030,-2029,-2028,-2026,-2026,-2025,-2023,-2022,-2021,-2020,-2020,-2019,-2018,-2018,-2014,-2011,-2007,-2006,-2005,-2004,-2003,-2001,-1999,-1998,-1998,-1997,-1995,-1990,-1983,-1980,-1972,-1972,-1968,-1966,-1966,-1961,-1960,-1958,-1958,-1956,-1955,-1955,-1955,-1954,-1953,-1952,-1951,-1949,-1949,-1947,-1942,-1942,-1941,-1941,-1940,-1939,-1939,-1938,-1937,-1937,-1937,-1935,-1933,-1931,-1929,-1928,-1926,-1926,-1926,-1925,-1924,-1924,-1922,-1922,-1921,-1917,-1917,-1913,-1907,-1906,-1905,-1905,-1901,-1901,-1895,-1889,-1887,-1879,-1878,-1877,-1876,-1876,-1874,-1873,-1870,-1870,-1869,-1868,-1868,-1862,-1862,-1860,-1860,-1858,-1854,-1853,-1851,-1850,-1848,-1847,-1841,-1838,-1837,-1836,-1836,-1836,-1834,-1833,-1833,-1832,-1832,-1831,-1831,-1826,-1825,-1820,-1820,-1819,-1818,-1817,-1817,-1817,-1808,-1808,-1808,-1807,-1804,-1802,-1801,-1799,-1798,-1792,-1791,-1790,-1790,-1789,-1788,-1784,-1784,-1781,-1775,-1774,-1772,-1769,-1769,-1766,-1761,-1759,-1759,-1758,-1757,-1754,-1750,-1748,-1747,-1746,-1745,-1744,-1744,-1742,-1737,-1733,-1732,-1731,-1725,-1724,-1718,-1714,-1712,-1711,-1710,-1707,-1706,-1706,-1705,-1705,-1701,-1700,-1699,-1698,-1698,-1697,-1696,-1694,-1692,-1689,-1685,-1682,-1677,-1677,-1677,-1676,-1670,-1668,-1668,-1667,-1664,-1664,-1662,-1662,-1658,-1658,-1657,-1657,-1657,-1652,-1650,-1649,-1648,-1647,-1643,-1642,-1640,-1640,-1638,-1635,-1634,-1634,-1633,-1632,-1629,-1627,-1627,-1623,-1621,-1617,-1616,-1616,-1614,-1612,-1610,-1602,-1600,-1600,-1598,-1594,-1594,-1591,-1587,-1587,-1587,-1584,-1581,-1578,-1578,-1575,-1574,-1572,-1572,-1569,-1568,-1566,-1565,-1565,-1559,-1559,-1558,-1557,-1556,-1555,-1552,-1551,-1549,-1541,-1541,-1540,-1540,-1538,-1536,-1533,-1533,-1532,-1530,-1526,-1526,-1525,-1525,-1525,-1523,-1522,-1519,-1516,-1516,-1514,-1513,-1510,-1509,-1509,-1504,-1504,-1503,-1502,-1501,-1500,-1499,-1497,-1495,-1494,-1492,-1492,-1487,-1486,-1483,-1481,-1481,-1478,-1477,-1476,-1475,-1475,-1474,-1473,-1473,-1472,-1471,-1469,-1466,-1466,-1462,-1461,-1460,-1459,-1458,-1452,-1446,-1443,-1437,-1433,-1427,-1425,-1424,-1416,-1415,-1412,-1411,-1409,-1407,-1404,-1395,-1385,-1383,-1380,-1374,-1370,-1369,-1369,-1366,-1365,-1364,-1361,-1359,-1359,-1357,-1356,-1349,-1348,-1346,-1346,-1339,-1336,-1334,-1332,-1331,-1327,-1327,-1326,-1326,-1325,-1325,-1323,-1323,-1321,-1320,-1316,-1313,-1312,-1310,-1309,-1307,-1302,-1301,-1300,-1297,-1297,-1296,-1295,-1291,-1289,-1286,-1281,-1280,-1276,-1274,-1268,-1266,-1264,-1260,-1260,-1259,-1259,-1255,-1254,-1254,-1250,-1247,-1241,-1240,-1239,-1238,-1236,-1236,-1232,-1232,-1227,-1227,-1226,-1220,-1217,-1216,-1216,-1213,-1207,-1205,-1202,-1199,-1196,-1192,-1191,-1191,-1190,-1186,-1186,-1185,-1184,-1184,-1182,-1174,-1174,-1173,-1170,-1168,-1168,-1163,-1157,-1156,-1154,-1145,-1142,-1135,-1133,-1131,-1131,-1128,-1127,-1127,-1125,-1124,-1121,-1121,-1116,-1113,-1113,-1112,-1110,-1110,-1107,-1105,-1104,-1103,-1101,-1099,-1095,-1093,-1093,-1089,-1087,-1086,-1084,-1083,-1077,-1076,-1069,-1066,-1065,-1061,-1060,-1059,-1058,-1056,-1055,-1052,-1051,-1051,-1050,-1048,-1047,-1047,-1045,-1043,-1039,-1038,-1037,-1032,-1025,-1021,-1020,-1019,-1018,-1017,-1017,-1016,-1016,-1011,-1011,-1009,-1007,-1007,-1004,-999,-999,-998,-996,-996,-987,-985,-984,-981,-981,-980,-978,-978,-977,-977,-977,-976,-971,-965,-965,-964,-963,-963,-957,-951,-951,-950,-948,-940,-938,-938,-932,-929,-924,-922,-922,-921,-918,-918,-914,-910,-910,-909,-909,-908,-907,-907,-906,-906,-900,-899,-892,-890,-889,-888,-887,-884,-884,-883,-880,-875,-872,-872,-870,-870,-868,-866,-863,-862,-862,-861,-860,-857,-857,-854,-853,-852,-852,-851,-851,-849,-846,-843,-842,-840,-840,-839,-837,-836,-833,-827,-827,-826,-824,-824,-820,-816,-816,-815,-815,-815,-811,-811,-810,-805,-804,-802,-795,-795,-795,-788,-787,-787,-786,-786,-784,-780,-778,-778,-777,-774,-773,-770,-762,-759,-756,-756,-754,-754,-753,-753,-748,-748,-746,-733,-729,-726,-726,-725,-720,-719,-719,-717,-715,-711,-710,-709,-704,-704,-702,-701,-700,-697,-691,-688,-688,-682,-682,-681,-679,-676,-674,-674,-673,-672,-671,-670,-669,-669,-666,-666,-662,-661,-660,-654,-654,-654,-650,-648,-644,-638,-630,-629,-626,-625,-625,-625,-624,-622,-619,-617,-617,-616,-615,-614,-612,-611,-609,-605,-605,-602,-597,-597,-595,-594,-591,-590,-584,-581,-581,-581,-580,-573,-573,-572,-570,-568,-568,-568,-568,-567,-562,-559,-557,-555,-554,-548,-547,-547,-540,-539,-539,-538,-534,-533,-532,-532,-531,-528,-524,-524,-523,-521,-519,-514,-513,-510,-507,-506,-506,-505,-504,-502,-499,-498,-495,-493,-491,-487,-485,-484,-482,-481,-481,-480,-480,-480,-476,-474,-469,-469,-468,-463,-462,-461,-458,-457,-453,-451,-451,-448,-445,-439,-438,-427,-423,-421,-419,-418,-416,-414,-414,-413,-413,-411,-409,-407,-406,-405,-400,-399,-398,-394,-394,-393,-392,-392,-391,-388,-386,-385,-375,-375,-374,-372,-372,-371,-370,-370,-369,-365,-364,-364,-361,-360,-359,-358,-357,-357,-356,-355,-351,-350,-348,-346,-345,-345,-344,-343,-342,-338,-333,-332,-331,-331,-331,-331,-327,-326,-325,-324,-323,-322,-320,-319,-314,-310,-309,-307,-300,-299,-294,-293,-292,-287,-287,-286,-278,-276,-275,-274,-268,-267,-266,-264,-262,-261,-258,-258,-256,-255,-255,-253,-253,-252,-251,-249,-248,-245,-240,-239,-236,-235,-234,-232,-226,-224,-224,-221,-216,-215,-212,-210,-207,-203,-202,-199,-199,-196,-193,-193,-191,-190,-190,-187,-184,-183,-181,-177,-172,-166,-162,-162,-159,-158,-157,-154,-152,-148,-145,-145,-144,-144,-144,-143,-141,-138,-136,-131,-130,-130,-129,-129,-128,-121,-118,-109,-108,-105,-104,-103,-103,-97,-96,-95,-88,-86,-84,-83,-83,-81,-75,-65,-64,-64,-63,-63,-60,-56,-54,-53,-53,-51,-51,-51,-51,-50,-45,-42,-40,-40,-40,-38,-37,-35,-28,-23,-22,-12,-11,-10,-6,-3,0,5,8,8,9,11,11,14,17,20,20,21,23,26,28,28,29,30,30,30,36,38,38,38,39,41,42,44,44,46,46,48,51,54,55,57,64,67,70,70,73,73,75,76,78,83,84,84,84,88,90,91,91,99,101,101,102,107,107,107,109,113,118,118,121,128,129,130,132,132,138,139,141,145,150,154,154,156,157,169,171,176,176,178,180,183,183,184,189,189,191,194,201,203,204,205,207,208,213,221,223,227,233,234,235,235,239,241,242,245,247,247,247,250,251,252,254,257,258,259,260,261,261,262,263,263,264,266,266,267,273,276,284,288,289,289,292,292,295,295,296,299,299,310,312,313,314,316,317,318,318,322,324,325,326,326,328,331,334,335,336,338,339,341,348,348,349,349,349,352,353,365,366,368,370,372,373,373,373,373,374,376,376,377,379,381,386,388,393,396,397,400,401,407,408,409,410,412,415,418,420,420,420,423,424,426,427,427,428,433,440,441,443,443,446,447,449,451,452,452,457,457,462,463,464,466,470,472,473,473,477,477,479,489,494,494,494,496,497,503,503,510,510,516,517,527,530,533,536,539,540,541,543,545,546,549,551,558,559,564,565,571,575,578,578,579,583,584,587,588,588,589,590,598,600,603,604,605,607,607,611,611,612,613,613,616,620,624,625,627,627,628,635,636,636,637,638,638,642,644,645,646,646,647,652,654,664,667,669,669,670,671,671,675,676,683,683,683,684,689,690,691,691,692,693,698,700,700,702,702,709,712,712,713,714,715,715,716,719,719,720,721,725,725,726,729,732,735,736,737,739,751,759,760,760,760,762,762,762,764,764,771,778,782,785,785,787,790,790,791,791,795,797,800,800,800,802,802,805,806,808,810,814,814,817,817,819,821,824,831,832,836,840,840,842,844,847,848,849,852,854,859,859,861,864,869,870,873,874,876,878,887,890,890,890,898,900,900,901,902,904,907,908,909,909,910,911,912,914,916,918,919,922,922,923,924,924,926,928,928,934,935,937,938,942,947,948,949,949,949,953,955,957,962,963,964,964,968,968,969,972,973,976,977,978,978,980,981,981,982,983,987,988,990,991,992,993,996,1004,1004,1009,1009,1012,1014,1014,1014,1015,1016,1016,1017,1017,1017,1018,1019,1022,1027,1028,1030,1036,1041,1044,1047,1050,1055,1056,1064,1073,1081,1084,1087,1088,1088,1089,1095,1097,1098,1098,1099,1100,1101,1101,1102,1105,1106,1106,1108,1113,1114,1116,1116,1116,1121,1121,1122,1124,1124,1125,1125,1127,1127,1134,1136,1139,1142,1145,1147,1149,1151,1152,1154,1154,1155,1155,1157,1161,1161,1162,1164,1165,1165,1165,1166,1166,1170,1170,1171,1174,1175,1177,1186,1190,1193,1193,1195,1196,1197,1201,1202,1208,1208,1210,1211,1212,1213,1216,1225,1230,1232,1232,1233,1241,1242,1248,1251,1251,1253,1253,1254,1257,1259,1261,1262,1265,1266,1270,1273,1273,1276,1281,1284,1288,1291,1291,1299,1300,1302,1302,1302,1303,1305,1307,1307,1309,1312,1314,1316,1317,1317,1318,1320,1322,1323,1331,1331,1334,1334,1335,1338,1341,1341,1342,1343,1344,1347,1347,1354,1355,1356,1358,1358,1360,1364,1364,1369,1370,1371,1373,1375,1377,1377,1380,1381,1387,1388,1389,1390,1390,1391,1393,1397,1401,1401,1402,1407,1410,1413,1414,1415,1417,1419,1428,1430,1431,1432,1437,1439,1439,1440,1440,1440,1441,1441,1444,1449,1449,1450,1453,1455,1463,1469,1469,1471,1474,1477,1480,1481,1482,1482,1482,1483,1483,1487,1487,1488,1489,1490,1492,1494,1494,1494,1495,1496,1501,1506,1507,1508,1509,1509,1509,1510,1511,1519,1521,1522,1523,1524,1526,1526,1528,1530,1531,1532,1533,1533,1544,1546,1547,1547,1548,1549,1550,1550,1551,1552,1557,1561,1563,1564,1568,1572,1575,1575,1582,1586,1589,1590,1591,1593,1595,1599,1599,1600,1602,1606,1606,1610,1611,1615,1615,1616,1616,1623,1623,1623,1625,1629,1630,1634,1634,1636,1639,1642,1643,1646,1652,1654,1655,1655,1655,1657,1659,1659,1665,1665,1668,1668,1673,1673,1673,1674,1677,1680,1683,1685,1686,1688,1690,1694,1694,1701,1703,1704,1704,1708,1709,1715,1715,1716,1718,1721,1722,1722,1724,1726,1727,1727,1727,1731,1731,1734,1735,1740,1742,1742,1744,1744,1745,1746,1747,1749,1749,1750,1750,1751,1752,1757,1760,1763,1764,1764,1765,1767,1769,1769,1769,1772,1774,1776,1779,1779,1782,1783,1792,1797,1797,1799,1801,1801,1801,1802,1804,1804,1806,1806,1815,1815,1817,1817,1820,1820,1821,1824,1824,1824,1824,1826,1829,1829,1830,1832,1833,1836,1836,1837,1837,1839,1841,1841,1842,1842,1842,1843,1845,1847,1849,1849,1849,1850,1853,1854,1857,1858,1865,1868,1875,1875,1879,1879,1880,1882,1883,1883,1885,1888,1891,1893,1893,1894,1894,1894,1895,1896,1899,1900,1901,1904,1905,1905,1909,1911,1912,1914,1914,1915,1915,1921,1922,1927,1927,1928,1930,1933,1938,1940,1944,1944,1944,1946,1946,1950,1951,1952,1953,1953,1954,1954,1959,1959,1960,1965,1967,1970,1976,1984,1986,1986,1988,1990,1994,1994,1995,1997,1999,2000,2001,2001,2002,2002,2006,2009,2011,2014,2014,2015,2016,2025,2025,2027,2037,2038,2044,2045,2046,2047,2047,2048,2048,2051,2051,2052,2052,2060,2061,2062,2065,2067,2068,2069,2083,2083,2084,2087,2089,2093,2093,2094,2094,2094,2094,2095,2095,2096,2096,2099,2103,2104,2104,2105,2105,2105,2106,2107,2108,2115,2116,2117,2120,2123,2125,2128,2128,2129,2129,2132,2133,2134,2135,2139,2142,2143,2144,2148,2150,2150,2153,2163,2164,2166,2170,2170,2171,2174,2174,2175,2175,2175,2182,2187,2188,2189,2192,2195,2196,2197,2202,2205,2205,2210,2212,2215,2216,2216,2217,2222,2226,2228,2232,2235,2237,2238,2238,2241,2241,2242,2243,2244,2244,2244,2245,2247,2247,2250,2250,2251,2252,2253,2258,2259,2260,2262,2262,2264,2271,2271,2274,2274,2274,2276,2276,2277,2278,2281,2288,2292,2292,2295,2296,2299,2301,2304,2305,2305,2307,2312,2314,2315,2321,2322,2322,2324,2327,2334,2337,2338,2338,2341,2345,2347,2348,2350,2351,2354,2355,2355,2356,2357,2361,2362,2365,2365,2366,2367,2369,2371,2375,2377,2378,2379,2380,2382,2384,2385,2388,2388,2389,2390,2391,2395,2397,2400,2401,2402,2403,2403,2403,2404,2406,2411,2413,2414,2416,2416,2418,2421,2423,2424,2424,2424,2427,2430,2435,2436,2436,2438,2438,2439,2442,2443,2448,2450,2452,2452,2455,2456,2458,2458,2459,2460,2463,2464,2468,2469,2470,2471,2478,2480,2481,2481,2483,2485,2485,2485,2486,2490,2497,2498,2502,2507,2509,2510,2510,2513,2514,2516,2519,2519,2519,2528,2528,2529,2530,2531,2534,2535,2535,2536,2536,2536,2541,2542,2543,2545,2550,2554,2556,2560,2561,2567,2571,2575,2576,2579,2581,2585,2585,2586,2587,2587,2590,2590,2597,2605,2606,2612,2612,2613,2618,2619,2620,2620,2622,2625,2625,2627,2632,2637,2637,2638,2638,2642,2642,2644,2646,2651,2652,2653,2654,2654,2655,2655,2661,2663,2665,2665,2666,2670,2672,2675,2676,2676,2677,2678,2681,2682,2683,2684,2685,2687,2690,2694,2695,2696,2697,2698,2701,2703,2705,2712,2716,2718,2720,2721,2724,2726,2728,2730,2731,2731,2733,2733,2734,2736,2737,2742,2742,2743,2743,2745,2747,2747,2747,2749,2750,2752,2754,2755,2758,2761,2762,2765,2766,2766,2767,2770,2770,2772,2774,2775,2776,2776,2776,2777,2777,2786,2791,2791,2793,2794,2798,2800,2801,2806,2807,2815,2819,2820,2820,2828,2831,2834,2837,2838,2843,2843,2844,2844,2847,2851,2851,2854,2854,2855,2855,2856,2857,2858,2860,2861,2863,2864,2864,2865,2865,2866,2867,2867,2874,2877,2878,2879,2880,2881,2882,2883,2889,2891,2892,2892,2893,2902,2902,2906,2908,2913,2913,2916,2919,2923,2926,2929,2929,2929,2933,2939,2942,2945,2949,2952,2953,2953,2954,2955,2959,2959,2960,2961,2962,2964,2964,2967,2968,2968,2976,2978,2979,2981,2987,2992,2995,3001,3008,3009,3013,3015,3018,3019,3033,3033,3033,3035,3035,3038,3045,3048,3049,3049,3050,3053,3055,3058,3059,3061,3062,3064,3072,3072,3074,3077,3077,3078,3084,3085,3086,3087,3087,3088,3090,3093,3096,3100,3102,3102,3104,3106,3108,3110,3110,3111,3113,3114,3114,3118,3120,3124,3128,3131,3132,3137,3137,3144,3146,3146,3146,3147,3151,3153,3154,3154,3156,3157,3160,3160,3161,3162,3163,3164,3169,3171,3174,3174,3175,3178,3180,3180,3181,3183,3185,3187,3187,3188,3189,3190,3192,3193,3196,3197,3198,3199,3203,3205,3206,3207,3208,3209,3210,3213,3220,3220,3226,3226,3227,3229,3230,3231,3232,3234,3242,3252,3253,3253,3260,3269,3271,3271,3273,3280,3280,3281,3284,3285,3286,3287,3287,3289,3290,3290,3290,3292,3293,3298,3299,3300,3302,3302,3305,3305,3307,3308,3308,3312,3312,3314,3314,3315,3315,3317,3320,3326,3326,3331,3332,3335,3336,3340,3340,3342,3343,3353,3354,3356,3357,3358,3359,3359,3361,3365,3367,3368,3368,3368,3369,3374,3377,3379,3380,3381,3382,3383,3383,3384,3385,3385,3385,3386,3389,3389,3389,3392,3393,3394,3397,3398,3401,3402,3402,3403,3404,3406,3408,3413,3413,3415,3415,3417,3420,3420,3421,3423,3425,3427,3427,3428,3430,3433,3435,3436,3437,3438,3443,3443,3446,3449,3454,3455,3457,3458,3462,3465,3465,3467,3469,3472,3473,3473,3474,3475,3479,3480,3481,3481,3487,3492,3494,3494,3496,3499,3505,3507,3508,3509,3515,3519,3524,3525,3527,3528,3531,3532,3533,3534,3537,3539,3540,3543,3544,3551,3553,3554,3555,3558,3560,3564,3564,3568,3569,3572,3574,3577,3578,3578,3580,3581,3583,3584,3584,3585,3586,3586,3587,3589,3589,3589,3590,3591,3593,3593,3594,3594,3597,3599,3599,3599,3602,3603,3613,3613,3614,3615,3616,3620,3620,3621,3625,3627,3628,3631,3636,3638,3640,3642,3643,3651,3651,3652,3652,3653,3657,3657,3659,3659,3667,3669,3670,3675,3675,3675,3676,3684,3684,3687,3688,3688,3690,3693,3693,3695,3696,3698,3699,3700,3701,3701,3704,3705,3709,3710,3711,3714,3716,3716,3718,3719,3728,3731,3731,3732,3733,3734,3736,3737,3740,3742,3743,3745,3746,3748,3748,3749,3751,3751,3753,3763,3766,3768,3768,3769,3771,3772,3772,3773,3777,3778,3783,3783,3787,3789,3789,3791,3791,3792,3798,3798,3801,3802,3804,3805,3810,3810,3811,3814,3821,3821,3825,3826,3828,3830,3830,3831,3832,3848,3853,3858,3858,3859,3861,3863,3865,3867,3869,3872,3873,3873,3874,3877,3879,3880,3881,3882,3882,3883,3886,3888,3890,3895,3895,3896,3901,3907,3908,3909,3910,3911,3912,3913,3913,3920,3920,3923,3924,3927,3927,3928,3931,3932,3932,3934,3937,3939,3939,3944,3945,3946,3950,3951,3952,3957,3958,3958,3959,3965,3966,3968,3969,3971,3974,3977,3978,3978,3982,3983,3983,3984,3985,3986,3987,3989,3990,3991,3992,3995,3996,3997,3997,4007,4008,4009,4012,4016,4026,4031,4031,4033,4042,4043,4044,4045,4047,4049,4053,4054,4055,4057,4057,4058,4060,4060,4061,4063,4063,4068,4069,4074,4075,4077,4078,4080,4080,4080,4082,4082,4083,4086,4094,4095,4098,4101,4101,4103,4104,4104,4108,4108,4124,4126,4126,4128,4129,4134,4138,4139,4140,4144,4144,4150,4153,4155,4156,4157,4163,4165,4169,4170,4171,4171,4178,4180,4182,4184,4185,4186,4187,4188,4189,4192,4193,4195,4195,4196,4197,4198,4203,4204,4204,4206,4209,4214,4214,4222,4222,4225,4228,4232,4234,4235,4235,4243,4243,4244,4244,4250,4251,4252,4252,4254,4254,4256,4258,4260,4260,4260,4260,4267,4268,4268,4272,4279,4281,4285,4286,4292,4293,4296,4299,4299,4301,4302,4305,4305,4308,4308,4310,4313,4313,4316,4318,4319,4324,4326,4329,4330,4334,4335,4338,4342,4343,4345,4346,4346,4347,4349,4349,4353,4353,4353,4354,4355,4355,4357,4359,4363,4365,4365,4372,4376,4378,4379,4380,4383,4384,4386,4386,4389,4390,4392,4395,4400,4402,4406,4410,4411,4415,4415,4420,4421,4424,4425,4425,4428,4429,4430,4430,4432,4434,4439,4440,4441,4450,4450,4451,4452,4454,4454,4458,4460,4461,4461,4467,4470,4471,4472,4472,4477,4477,4477,4482,4483,4487,4488,4492,4493,4493,4498,4499,4499,4500,4504,4505,4506,4509,4510,4515,4518,4519,4519,4519,4521,4522,4527,4529,4529,4533,4535,4535,4536,4540,4543,4544,4545,4545,4545,4546,4547,4548,4550,4553,4554,4561,4563,4564,4565,4565,4565,4570,4576,4576,4577,4581,4582,4583,4585,4587,4587,4589,4590,4591,4595,4604,4605,4606,4606,4608,4609,4610,4611,4613,4613,4616,4618,4621,4622,4623,4624,4624,4626,4626,4629,4631,4634,4635,4636,4640,4642,4645,4649,4653,4658,4659,4660,4661,4667,4669,4669,4670,4673,4675,4676,4676,4678,4678,4678,4678,4680,4682,4683,4685,4687,4691,4692,4693,4695,4696,4702,4704,4705,4708,4709,4709,4709,4712,4712,4714,4716,4716,4716,4718,4721,4722,4723,4723,4727,4730,4732,4733,4734,4736,4739,4739,4740,4740,4743,4746,4746,4748,4749,4750,4751,4753,4753,4755,4756,4757,4760,4760,4765,4767,4768,4775,4777,4778,4779,4781,4783,4784,4793,4793,4794,4795,4799,4801,4802,4804,4811,4813,4813,4814,4816,4818,4818,4820,4821,4822,4828,4829,4833,4840,4840,4841,4842,4843,4844,4845,4855,4858,4871,4872,4875,4877,4885,4887,4888,4890,4895,4896,4899,4902,4903,4907,4907,4909,4909,4912,4912,4912,4916,4918,4920,4921,4921,4922,4923,4925,4931,4935,4937,4939,4940,4942,4942,4943,4944,4949,4949,4954,4956,4957,4957,4957,4960,4960,4966,4966,4967,4967,4970,4970,4971,4974,4976,4979,4980,4991,4992,4992,4995,5002,5002,5004,5006,5007,5008,5009,5011,5012,5012,5012,5012,5017,5017,5019,5026,5029,5030,5031,5034,5035,5035,5039,5039,5039,5044,5047,5047,5048,5049,5051,5056,5057,5060,5061,5063,5065,5066,5067,5068,5070,5070,5073,5079,5080,5080,5088,5088,5094,5095,5099,5102,5102,5105,5105,5106,5106,5107,5109,5110,5110,5117,5120,5124,5125,5126,5129,5129,5130,5134,5138,5144,5146,5146,5147,5147,5148,5153,5154,5155,5157,5158,5158,5161,5162,5164,5165,5169,5170,5171,5171,5174,5174,5175,5181,5183,5185,5187,5187,5188,5190,5193,5195,5195,5198,5199,5201,5206,5208,5208,5210,5210,5211,5211,5213,5213,5219,5220,5222,5223,5224,5225,5227,5227,5227,5229,5232,5233,5234,5235,5235,5236,5236,5237,5239,5239,5240,5240,5241,5243,5245,5246,5246,5247,5249,5250,5253,5253,5254,5255,5258,5259,5262,5263,5269,5272,5274,5274,5274,5276,5277,5278,5279,5280,5281,5283,5283,5286,5288,5289,5289,5291,5291,5292,5301,5304,5304,5304,5306,5308,5308,5309,5313,5315,5315,5324,5324,5327,5328,5330,5332,5334,5335,5336,5342,5343,5345,5346,5346,5349,5351,5352,5352,5353,5358,5358,5360,5365,5365,5367,5370,5373,5386,5387,5389,5393,5394,5399,5400,5400,5401,5405,5405,5406,5407,5409,5411,5413,5413,5414,5417,5419,5420,5425,5426,5431,5432,5434,5438,5442,5443,5446,5447,5448,5448,5448,5450,5452,5454,5455,5457,5457,5459,5460,5462,5467,5467,5468,5469,5469,5470,5474,5477,5478,5485,5486,5487,5488,5488,5490,5495,5497,5499,5500,5501,5502,5505,5506,5506,5511,5511,5514,5518,5519,5522,5523,5524,5525,5526,5527,5528,5529,5529,5529,5533,5537,5539,5541,5543,5544,5544,5545,5545,5546,5552,5556,5558,5561,5562,5564,5567,5567,5569,5573,5575,5576,5578,5579,5579,5580,5583,5583,5583,5595,5595,5596,5596,5596,5601,5601,5601,5608,5612,5613,5615,5616,5618,5618,5622,5626,5630,5630,5635,5635,5636,5638,5640,5640,5641,5644,5646,5654,5656,5657,5659,5668,5669,5671,5672,5677,5678,5680,5685,5685,5686,5686,5687,5688,5689,5691,5692,5692,5692,5692,5695,5698,5704,5704,5710,5712,5713,5715,5716,5719,5724,5728,5732,5738,5741,5747,5747,5751,5753,5756,5758,5759,5760,5761,5763,5763,5766,5773,5773,5776,5777,5780,5783,5784,5784,5786,5786,5788,5789,5793,5800,5800,5802,5803,5806,5807,5807,5808,5810,5812,5816,5816,5816,5817,5822,5822,5824,5829,5832,5834,5837,5838,5841,5843,5846,5849,5849,5851,5851,5853,5853,5856,5856,5856,5858,5860,5861,5862,5863,5865,5866,5867,5869,5871,5871,5874,5875,5875,5876,5880,5882,5883,5884,5885,5885,5890,5890,5891,5891,5901,5905,5907,5912,5913,5913,5915,5917,5919,5922,5924,5925,5926,5928,5928,5930,5932,5934,5935,5938,5941,5943,5946,5952,5952,5954,5955,5957,5958,5966,5966,5970,5972,5973,5973,5973,5975,5976,5978,5979,5982,5983,5984,5985,5988,5993,5997,5997,5998,6000,6005,6007,6023,6024,6024,6025,6026,6027,6031,6032,6032,6035,6036,6038,6039,6040,6042,6042,6043,6043,6044,6045,6047,6047,6049,6049,6052,6053,6060,6060,6066,6068,6069,6069,6070,6070,6071,6072,6075,6078,6080,6087,6090,6092,6093,6093,6095,6098,6100,6104,6105,6106,6106,6107,6110,6110,6111,6111,6115,6116,6123,6123,6128,6129,6131,6133,6136,6137,6139,6143,6143,6146,6149,6150,6151,6153,6154,6156,6158,6160,6163,6166,6169,6170,6170,6171,6172,6174,6178,6182,6187,6187,6188,6189,6193,6195,6198,6200,6200,6203,6204,6205,6205,6216,6218,6219,6219,6221,6222,6223,6224,6230,6237,6239,6239,6240,6242,6243,6243,6244,6245,6245,6245,6246,6247,6252,6252,6254,6257,6262,6266,6268,6268,6272,6272,6272,6273,6273,6274,6275,6277,6280,6281,6282,6284,6284,6284,6287,6289,6290,6292,6297,6297,6302,6303,6303,6303,6304,6309,6309,6311,6311,6312,6312,6314,6319,6321,6325,6325,6325,6328,6328,6328,6330,6334,6335,6336,6337,6340,6345,6348,6356,6357,6360,6362,6362,6364,6365,6366,6367,6368,6369,6370,6377,6380,6381,6382,6382,6383,6383,6387,6388,6390,6393,6394,6394,6395,6400,6403,6406,6410,6410,6411,6411,6413,6421,6423,6425,6425,6426,6430,6433,6433,6435,6439,6439,6440,6441,6442,6442,6444,6444,6447,6447,6448,6448,6449,6455,6456,6457,6462,6462,6464,6467,6468,6473,6475,6475,6478,6479,6482,6488,6488,6490,6493,6495,6497,6498,6499,6499,6502,6506,6508,6511,6514,6514,6518,6522,6523,6525,6526,6529,6529,6529,6530,6530,6533,6535,6536,6539,6540,6545,6545,6546,6546,6549,6550,6551,6553,6559,6560,6562,6565,6565,6570,6570,6573,6573,6578,6580,6582,6583,6584,6584,6586,6588,6589,6592,6593,6593,6594,6595,6601,6604,6606,6607,6607,6610,6610,6611,6612,6613,6621,6623,6624,6624,6626,6627,6627,6630,6633,6638,6643,6644,6645,6645,6652,6653,6654,6660,6665,6666,6667,6674,6674,6675,6677,6680,6680,6681,6682,6683,6685,6690,6692,6692,6692,6693,6694,6696,6696,6697,6698,6701,6705,6706,6706,6708,6711,6711,6712,6715,6718,6727,6733,6734,6734,6735,6737,6737,6739,6740,6742,6745,6747,6748,6750,6751,6752,6753,6754,6755,6758,6764,6764,6765,6768,6772,6776,6777,6779,6779,6780,6780,6783,6784,6786,6786,6789,6789,6791,6795,6795,6795,6797,6799,6802,6802,6806,6812,6813,6813,6814,6815,6815,6815,6815,6816,6816,6817,6817,6820,6827,6833,6837,6839,6839,6840,6841,6842,6844,6845,6851,6852,6856,6858,6860,6860,6861,6863,6864,6865,6865,6868,6870,6871,6872,6875,6878,6878,6879,6886,6887,6887,6891,6892,6893,6894,6894,6895,6895,6895,6899,6900,6902,6903,6906,6907,6908,6910,6911,6912,6914,6915,6916,6920,6921,6921,6922,6924,6931,6932,6934,6935,6936,6937,6938,6939,6940,6941,6942,6942,6943,6949,6949,6951,6953,6956,6958,6965,6966,6967,6969,6970,6972,6972,6973,6973,6977,6978,6979,6986,6986,6988,6989,6990,6992,6993,6993,6996,6998,7002,7002,7005,7007,7010,7011,7016,7016,7017,7018,7018,7022,7025,7025,7026,7028,7028,7031,7031,7033,7038,7038,7042,7047,7047,7050,7056,7056,7065,7067,7067,7071,7073,7073,7073,7074,7075,7078,7085,7085,7087,7088,7090,7090,7091,7091,7093,7095,7095,7101,7102,7107,7116,7117,7120,7122,7123,7124,7127,7130,7133,7135,7136,7137,7145,7146,7149,7152,7154,7156,7157,7158,7159,7162,7166,7168,7168,7169,7170,7171,7172,7172,7172,7173,7180,7183,7183,7185,7188,7189,7191,7192,7192,7193,7198,7198,7199,7202,7203,7211,7216,7218,7219,7220,7221,7222,7222,7228,7234,7238,7241,7243,7245,7246,7246,7249,7250,7251,7251,7255,7257,7258,7258,7272,7274,7275,7275,7276,7276,7281,7283,7289,7291,7291,7300,7304,7304,7306,7307,7308,7312,7312,7314,7316,7317,7318,7318,7324,7332,7334,7334,7335,7335,7335,7336,7337,7338,7339,7340,7341,7342,7345,7345,7346,7347,7351,7352,7353,7355,7355,7356,7360,7363,7368,7368,7369,7369,7370,7373,7374,7377,7378,7385,7386,7390,7390,7394,7397,7398,7398,7399,7401,7404,7405,7408,7417,7418,7419,7422,7427,7430,7431,7432,7433,7434,7441,7442,7444,7447,7447,7452,7454,7456,7456,7460,7461,7462,7463,7463,7464,7465,7466,7467,7469,7470,7472,7472,7474,7475,7479,7480,7481,7481,7482,7482,7486,7488,7491,7498,7498,7498,7498,7505,7507,7508,7508,7510,7512,7512,7516,7517,7520,7521,7522,7522,7523,7523,7523,7523,7524,7525,7525,7527,7527,7527,7527,7531,7532,7532,7533,7534,7536,7537,7538,7538,7538,7539,7542,7542,7547,7548,7549,7554,7554,7557,7562,7568,7571,7573,7574,7574,7574,7574,7574,7581,7583,7583,7583,7584,7585,7585,7588,7589,7591,7591,7599,7599,7613,7618,7619,7622,7623,7625,7626,7628,7632,7632,7633,7634,7637,7639,7641,7642,7642,7643,7643,7645,7645,7646,7649,7649,7650,7652,7655,7659,7663,7668,7675,7675,7676,7678,7680,7682,7684,7687,7688,7692,7695,7697,7700,7700,7700,7701,7701,7702,7704,7708,7715,7715,7716,7720,7723,7724,7726,7726,7729,7729,7731,7733,7737,7742,7744,7750,7750,7751,7752,7756,7758,7758,7759,7762,7763,7764,7764,7765,7767,7769,7772,7772,7773,7777,7777,7778,7781,7782,7784,7785,7786,7789,7790,7794,7794,7795,7795,7797,7807,7811,7811,7813,7815,7816,7819,7826,7827,7837,7840,7850,7850,7853,7854,7855,7856,7856,7857,7857,7864,7865,7866,7868,7870,7872,7877,7878,7878,7879,7879,7881,7882,7882,7883,7884,7887,7890,7895,7896,7896,7896,7897,7898,7898,7899,7901,7903,7906,7907,7909,7910,7910,7912,7913,7921,7923,7924,7926,7927,7929,7932,7933,7936,7937,7938,7938,7948,7949,7950,7953,7959,7963,7964,7964,7965,7967,7967,7969,7973,7975,7975,7981,7989,7990,7991,7992,7995,7998,8000,8001,8004,8008,8011,8011,8012,8013,8016,8017,8018,8022,8025,8026,8027,8027,8029,8030,8033,8033,8035,8037,8040,8047,8047,8049,8049,8053,8056,8059,8060,8061,8061,8062,8062,8065,8067,8069,8070,8071,8071,8072,8073,8076,8078,8079,8079,8081,8082,8084,8084,8084,8086,8086,8088,8088,8088,8089,8090,8091,8095,8096,8105,8107,8112,8115,8116,8119,8126,8133,8135,8136,8138,8139,8144,8145,8148,8151,8153,8153,8154,8159,8160,8160,8161,8161,8162,8165,8167,8167,8168,8171,8174,8176,8177,8185,8185,8187,8190,8191,8195,8196,8201,8202,8204,8214,8214,8215,8218,8219,8222,8224,8224,8227,8227,8230,8230,8232,8235,8236,8239,8245,8245,8247,8251,8257,8260,8263,8267,8270,8273,8279,8280,8280,8281,8290,8294,8294,8296,8310,8315,8316,8317,8321,8322,8323,8324,8327,8329,8338,8339,8340,8342,8343,8343,8343,8344,8346,8348,8354,8355,8355,8359,8359,8361,8364,8365,8365,8365,8366,8368,8369,8369,8370,8370,8372,8373,8374,8378,8381,8384,8386,8393,8398,8401,8401,8404,8411,8412,8413,8414,8414,8416,8420,8421,8421,8426,8427,8429,8433,8433,8434,8435,8436,8437,8437,8438,8439,8440,8442,8442,8450,8450,8450,8452,8454,8460,8460,8462,8464,8467,8468,8471,8473,8474,8476,8486,8491,8493,8493,8497,8498,8500,8501,8501,8501,8504,8509,8510,8510,8511,8515,8519,8519,8522,8526,8527,8528,8528,8532,8536,8537,8538,8540,8544,8544,8546,8548,8549,8551,8551,8556,8559,8560,8562,8565,8565,8565,8567,8569,8570,8577,8579,8584,8589,8590,8592,8595,8599,8600,8600,8603,8606,8608,8609,8614,8615,8615,8616,8617,8617,8619,8621,8621,8623,8626,8626,8627,8628,8628,8628,8635,8635,8636,8640,8642,8645,8646,8646,8647,8649,8649,8650,8651,8652,8655,8655,8655,8658,8661,8663,8664,8668,8672,8673,8685,8685,8686,8690,8691,8698,8699,8703,8703,8705,8706,8706,8707,8708,8709,8710,8712,8713,8714,8715,8718,8721,8724,8724,8725,8727,8727,8728,8729,8729,8734,8735,8738,8741,8744,8747,8752,8754,8760,8765,8766,8767,8768,8771,8772,8773,8776,8778,8779,8780,8783,8786,8786,8791,8794,8796,8803,8804,8806,8808,8808,8809,8811,8812,8812,8812,8813,8813,8813,8822,8822,8822,8826,8829,8829,8830,8832,8834,8841,8842,8844,8847,8850,8851,8852,8854,8855,8855,8858,8858,8859,8862,8868,8869,8870,8874,8875,8876,8880,8880,8880,8882,8884,8885,8887,8889,8889,8893,8893,8894,8896,8898,8898,8899,8900,8900,8901,8906,8909,8909,8912,8915,8917,8917,8918,8919,8920,8926,8926,8927,8927,8930,8930,8932,8933,8938,8940,8942,8944,8945,8947,8947,8949,8950,8952,8952,8952,8954,8955,8956,8957,8958,8961,8965,8967,8969,8969,8971,8975,8978,8985,8987,8987,8992,8992,8997,8998,8998,9005,9008,9016,9020,9025,9026,9026,9027,9027,9028,9029,9030,9030,9030,9031,9032,9035,9037,9038,9041,9041,9042,9042,9045,9046,9052,9056,9057,9061,9065,9070,9081,9082,9082,9083,9083,9084,9085,9087,9090,9090,9094,9097,9099,9100,9101,9101,9104,9108,9115,9115,9120,9129,9131,9135,9136,9137,9140,9143,9145,9145,9146,9150,9153,9154,9156,9156,9157,9161,9163,9163,9163,9165,9165,9166,9166,9168,9174,9177,9177,9178,9178,9182,9185,9191,9193,9194,9195,9198,9198,9198,9198,9199,9199,9200,9200,9203,9204,9205,9205,9207,9207,9207,9208,9208,9210,9220,9221,9223,9224,9224,9225,9227,9230,9231,9233,9235,9236,9238,9239,9240,9241,9247,9248,9249,9249,9256,9259,9265,9265,9266,9266,9268,9268,9272,9272,9274,9274,9276,9278,9278,9282,9282,9289,9289,9289,9291,9291,9293,9293,9296,9299,9299,9309,9310,9312,9315,9318,9318,9319,9323,9323,9328,9332,9332,9338,9338,9340,9341,9341,9343,9345,9347,9351,9352,9354,9354,9354,9355,9355,9368,9373,9376,9377,9379,9380,9382,9385,9385,9388,9388,9388,9391,9392,9393,9394,9394,9396,9397,9397,9403,9405,9405,9407,9408,9408,9412,9413,9416,9418,9423,9424,9426,9426,9426,9427,9432,9433,9434,9438,9441,9442,9442,9445,9446,9447,9447,9448,9451,9451,9453,9457,9461,9461,9462,9464,9465,9465,9465,9466,9467,9471,9472,9478,9478,9479,9479,9482,9483,9486,9491,9491,9492,9493,9497,9499,9501,9505,9514,9514,9515,9516,9517,9517,9519,9521,9524,9525,9527,9529,9530,9530,9531,9533,9534,9536,9539,9540,9542,9542,9545,9548,9549,9550,9552,9552,9552,9553,9553,9558,9558,9559,9565,9566,9568,9573,9573,9575,9577,9579,9583,9585,9586,9588,9590,9592,9593,9593,9594,9595,9595,9598,9599,9601,9603,9603,9603,9605,9606,9610,9610,9612,9614,9615,9621,9621,9622,9624,9625,9633,9634,9634,9635,9636,9641,9648,9651,9653,9654,9656,9660,9663,9664,9664,9665,9665,9666,9667,9679,9682,9682,9684,9687,9688,9689,9690,9691,9692,9694,9694,9695,9695,9697,9698,9699,9699,9701,9707,9712,9712,9713,9713,9713,9716,9716,9717,9718,9720,9723,9725,9727,9728,9728,9730,9735,9739,9745,9747,9750,9752,9753,9759,9759,9760,9761,9763,9763,9764,9764,9767,9767,9770,9771,9771,9772,9776,9776,9779,9788,9789,9793,9802,9812,9812,9819,9821,9821,9823,9824,9826,9827,9827,9827,9829,9830,9834,9837,9839,9840,9842,9843,9843,9844,9844,9846,9859,9861,9861,9865,9866,9866,9871,9871,9876,9877,9878,9881,9882,9884,9885,9886,9887,9887,9891,9894,9897,9900,9901,9902,9905,9905,9905,9907,9907,9908,9911,9912,9918,9920,9923,9924,9926,9927,9930,9932,9933,9934,9934,9937,9939,9940,9942,9946,9947,9948,9952,9955,9956,9957,9959,9961,9966,9968,9970,9971,9972,9972,9973,9975,9979,9981,9981,9983,9986,9989,9990,9991}; arg2 = (int[]) {-9994,-9990,-9989,-9985,-9981,-9980,-9973,-9967,-9961,-9948,-9947,-9944,-9936,-9933,-9931,-9928, -9924,-9923,-9920,-9920,-9917,-9915,-9912,-9903,-9889,-9884,-9884,-9881,-9879,-9874,-9870,-9866,-9862,-9854,-9849,-9849,-9848,-9846,-9841,-9826,-9825,-9823,-9823,-9822,-9819,-9818,-9815,-9814,-9813,-9804,-9792,-9780,-9770,-9770,-9765,-9764,-9759,-9758,-9753,-9753,-9752,-9748,-9748,-9747,-9746,-9745,-9738,-9735,-9734,-9725,-9721,-9713,-9710,-9710,-9698,-9697,-9694,-9682,-9672,-9671,-9667,-9667,-9660,-9657,-9657,-9647,-9641,-9640,-9637,-9636,-9633,-9633,-9627,-9626,-9623,-9610,-9608,-9605,-9599,-9599,-9593,-9590,-9589,-9588,-9588,-9582,-9579,-9576,-9562,-9562,-9558,-9546,-9543,-9540,-9537,-9525,-9518,-9514,-9505,-9503,-9503,-9497,-9492,-9487,-9479,-9478,-9473,-9470,-9457,-9456,-9455,-9452,-9451,-9446,-9439,-9421,-9415,-9414,-9411,-9409,-9407,-9403,-9402,-9401,-9400,-9387,-9387,-9383,-9365,-9349,-9347,-9346,-9345,-9345,-9344,-9340,-9339,-9326,-9323,-9322,-9322,-9318,-9316,-9316,-9310,-9307,-9294,-9293,-9288,-9288,-9284,-9281,-9274,-9266,-9264,-9255,-9253,-9253,-9251,-9243,-9236,-9234,-9230,-9228,-9224,-9222,-9222,-9213,-9211,-9207,-9203,-9198,-9196,-9194,-9190,-9180,-9176,-9173,-9165,-9163,-9163,-9152,-9147,-9141,-9139,-9132,-9131,-9131,-9115,-9103,-9085,-9070,-9068,-9066,-9056,-9045,-9040,-9028,-9018,-9018,-9017,-9000,-9000,-8992,-8988,-8985,-8983,-8976,-8976,-8974,-8973,-8971,-8970,-8969,-8963,-8961,-8960,-8956,-8949,-8946,-8943,-8937,-8924,-8916,-8909,-8904,-8899,-8888,-8885,-8876,-8875,-8872,-8871,-8866,-8866,-8858,-8855,-8849,-8846,-8844,-8834,-8820,-8820,-8819,-8817,-8807,-8805,-8803,-8786,-8785,-8782,-8773,-8773,-8773,-8770,-8770,-8766,-8763,-8760,-8758,-8742,-8738,-8728,-8722,-8717,-8712,-8711,-8706,-8695,-8691,-8689,-8684,-8683,-8676,-8675,-8674,-8662,-8662,-8661,-8656,-8654,-8651,-8649,-8639,-8639,-8639,-8638,-8638,-8635,-8626,-8623,-8619,-8615,-8614,-8614,-8612,-8607,-8605,-8603,-8594,-8594,-8593,-8593,-8592,-8584,-8580,-8579,-8571,-8562,-8559,-8559,-8549,-8537,-8532,-8532,-8532,-8528,-8525,-8516,-8513,-8507,-8505,-8501,-8501,-8495,-8495,-8493,-8480,-8475,-8466,-8464,-8452,-8446,-8445,-8440,-8439,-8436,-8428,-8425,-8425,-8424,-8424,-8418,-8418,-8412,-8410,-8408,-8405,-8405,-8404,-8394,-8382,-8378,-8378,-8376,-8370,-8369,-8364,-8363,-8361,-8350,-8348,-8347,-8337,-8337,-8336,-8334,-8333,-8331,-8314,-8309,-8307,-8307,-8292,-8291,-8287,-8267,-8263,-8260,-8258,-8253,-8245,-8243,-8235,-8234,-8222,-8222,-8216,-8214,-8213,-8211,-8207,-8199,-8196,-8194,-8192,-8191,-8187,-8179,-8173,-8169,-8168,-8167,-8167,-8161,-8158,-8152,-8152,-8150,-8143,-8143,-8140,-8137,-8137,-8137,-8136,-8134,-8131,-8127,-8112,-8111,-8104,-8104,-8104,-8103,-8099,-8097,-8096,-8086,-8075,-8073,-8065,-8062,-8060,-8055,-8055,-8042,-8037,-8030,-8017,-8017,-8014,-8010,-8009,-8009,-8008,-8002,-8001,-8000,-8000,-7991,-7989,-7984,-7975,-7969,-7964,-7950,-7950,-7943,-7939,-7938,-7938,-7938,-7923,-7918,-7911,-7911,-7908,-7906,-7900,-7900,-7894,-7890,-7889,-7883,-7882,-7876,-7874,-7867,-7859,-7838,-7833,-7832,-7829,-7817,-7817,-7817,-7813,-7808,-7804,-7803,-7801,-7797,-7794,-7791,-7761,-7761,-7760,-7757,-7752,-7750,-7749,-7744,-7741,-7711,-7708,-7707,-7705,-7699,-7694,-7683,-7682,-7678,-7675,-7672,-7671,-7666,-7652,-7650,-7647,-7644,-7640,-7640,-7639,-7637,-7635,-7632,-7630,-7630,-7629,-7620,-7614,-7608,-7604,-7603,-7599,-7596,-7595,-7592,-7591,-7582,-7570,-7566,-7564,-7560,-7559,-7558,-7545,-7543,-7542,-7540,-7539,-7539,-7535,-7532,-7532,-7529,-7527,-7524,-7517,-7517,-7514,-7506,-7505,-7501,-7497,-7489,-7483,-7483,-7471,-7469,-7454,-7453,-7452,-7449,-7446,-7445,-7443,-7443,-7442,-7436,-7429,-7404,-7401,-7391,-7378,-7370,-7368,-7358,-7350,-7348,-7332,-7323,-7307,-7307,-7302,-7297,-7292,-7291,-7291,-7273,-7265,-7260,-7248,-7245,-7244,-7242,-7237,-7237,-7234,-7228,-7227,-7226,-7225,-7223,-7223,-7209,-7207,-7198,-7196,-7194,-7190,-7184,-7180,-7180,-7177,-7174,-7172,-7165,-7164,-7163,-7160,-7153,-7149,-7137,-7137,-7135,-7133,-7129,-7120,-7117,-7113,-7111,-7100,-7099,-7096,-7095,-7094,-7092,-7087,-7086,-7083,-7083,-7079,-7078,-7077,-7074,-7074,-7072,-7072,-7065,-7063,-7062,-7061,-7060,-7057,-7056,-7051,-7045,-7045,-7036,-7035,-7031,-7031,-7024,-7019,-7019,-7009,-6990,-6984,-6973,-6973,-6963,-6956,-6947,-6945,-6944,-6940,-6939,-6934,-6933,-6931,-6930,-6926,-6926,-6909,-6908,-6904,-6900,-6898,-6895,-6890,-6884,-6881,-6877,-6876,-6872,-6872,-6871,-6868,-6864,-6857,-6857,-6856,-6852,-6848,-6847,-6846,-6834,-6831,-6825,-6825,-6824,-6822,-6816,-6816,-6805,-6789,-6788,-6787,-6786,-6784,-6773,-6770,-6756,-6747,-6745,-6744,-6743,-6743,-6742,-6741,-6740,-6738,-6720,-6717,-6712,-6704,-6703,-6695,-6690,-6684,-6681,-6675,-6673,-6668,-6652,-6645,-6640,-6635,-6618,-6614,-6613,-6612,-6611,-6606,-6606,-6602,-6588,-6587,-6583,-6580,-6578,-6574,-6567,-6556,-6552,-6549,-6541,-6538,-6535,-6533,-6531,-6523,-6512,-6501,-6495,-6494,-6488,-6479,-6477,-6476,-6475,-6453,-6452,-6451,-6444,-6442,-6441,-6437,-6437,-6436,-6435,-6435,-6431,-6429,-6429,-6427,-6421,-6419,-6415,-6411,-6409,-6408,-6408,-6404,-6403,-6402,-6397,-6391,-6387,-6382,-6370,-6368,-6364,-6360,-6353,-6353,-6343,-6336,-6336,-6335,-6330,-6326,-6312,-6312,-6308,-6306,-6290,-6282,-6280,-6279,-6279,-6273,-6270,-6268,-6264,-6246,-6243,-6242,-6236,-6235,-6235,-6232,-6231,-6226,-6223,-6217,-6213,-6206,-6204,-6197,-6192,-6188,-6187,-6185,-6185,-6180,-6175,-6175,-6173,-6172,-6171,-6170,-6165,-6162,-6160,-6152,-6149,-6147,-6137,-6136,-6135,-6127,-6126,-6124,-6122,-6122,-6118,-6117,-6114,-6113,-6112,-6109,-6108,-6103,-6098,-6092,-6089,-6088,-6079,-6076,-6073,-6070,-6068,-6064,-6061,-6057,-6056,-6053,-6052,-6046,-6046,-6040,-6037,-6035,-6034,-6019,-6013,-6012,-6008,-6006,-6001,-5999,-5995,-5988,-5983,-5980,-5975,-5973,-5968,-5965,-5963,-5961,-5960,-5957,-5953,-5953,-5953,-5947,-5946,-5943,-5939,-5929,-5927,-5921,-5918,-5917,-5915,-5914,-5914,-5913,-5910,-5904,-5897,-5886,-5878,-5877,-5858,-5855,-5855,-5853,-5850,-5850,-5847,-5840,-5833,-5832,-5825,-5824,-5824,-5812,-5810,-5801,-5798,-5796,-5792,-5790,-5783,-5782,-5780,-5772,-5771,-5769,-5768,-5766,-5761,-5758,-5746,-5729,-5725,-5720,-5711,-5707,-5706,-5701,-5699,-5697,-5692,-5685,-5681,-5678,-5663,-5659,-5656,-5649,-5647,-5645,-5640,-5639,-5630,-5622,-5621,-5619,-5618,-5618,-5615,-5611,-5610,-5607,-5605,-5601,-5596,-5595,-5595,-5594,-5594,-5594,-5586,-5581,-5579,-5573,-5569,-5568,-5559,-5557,-5557,-5555,-5552,-5552,-5548,-5542,-5542,-5539,-5530,-5529,-5526,-5519,-5511,-5508,-5504,-5502,-5502,-5496,-5493,-5493,-5492,-5489,-5483,-5481,-5474,-5472,-5471,-5467,-5465,-5464,-5461,-5460,-5456,-5442,-5441,-5433,-5431,-5427,-5425,-5418,-5416,-5413,-5409,-5405,-5394,-5387,-5382,-5374,-5370,-5368,-5367,-5360,-5344,-5342,-5342,-5334,-5329,-5327,-5327,-5324,-5323,-5314,-5310,-5306,-5303,-5302,-5296,-5295,-5288,-5284,-5280,-5279,-5279,-5277,-5276,-5271,-5269,-5267,-5263,-5259,-5258,-5257,-5249,-5244,-5242,-5242,-5242,-5238,-5236,-5234,-5229,-5227,-5224,-5216,-5209,-5208,-5205,-5205,-5195,-5194,-5190,-5189,-5184,-5181,-5174,-5173,-5168,-5161,-5160,-5155,-5147,-5139,-5139,-5136,-5135,-5133,-5133,-5132,-5132,-5130,-5128,-5116,-5111,-5106,-5105,-5105,-5104,-5102,-5102,-5097,-5092,-5089,-5087,-5084,-5080,-5073,-5067,-5058,-5056,-5049,-5044,-5035,-5034,-5028,-5023,-5018,-5013,-5012,-5008,-4999,-4992,-4983,-4981,-4980,-4979,-4960,-4959,-4957,-4957,-4952,-4940,-4940,-4937,-4936,-4927,-4915,-4912,-4902,-4898,-4895,-4884,-4881,-4868,-4867,-4866,-4866,-4863,-4861,-4853,-4852,-4848,-4847,-4843,-4843,-4834,-4832,-4831,-4826,-4821,-4816,-4816,-4815,-4815,-4806,-4797,-4796,-4795,-4788,-4788,-4788,-4786,-4778,-4775,-4774,-4773,-4763,-4757,-4756,-4748,-4740,-4736,-4736,-4733,-4732,-4731,-4728,-4728,-4726,-4722,-4720,-4704,-4702,-4699,-4696,-4695,-4691,-4689,-4688,-4687,-4683,-4683,-4677,-4676,-4676,-4674,-4670,-4669,-4666,-4662,-4660,-4660,-4657,-4656,-4655,-4653,-4649,-4648,-4647,-4645,-4643,-4643,-4638,-4626,-4626,-4617,-4609,-4608,-4604,-4604,-4603,-4603,-4601,-4598,-4593,-4587,-4586,-4585,-4585,-4570,-4563,-4563,-4560,-4557,-4556,-4555,-4553,-4552,-4552,-4551,-4551,-4548,-4541,-4527,-4521,-4521,-4517,-4516,-4509,-4509,-4507,-4501,-4494,-4487,-4484,-4483,-4482,-4480,-4477,-4473,-4470,-4460,-4458,-4451,-4438,-4436,-4430,-4429,-4429,-4427,-4427,-4423,-4422,-4420,-4409,-4402,-4402,-4391,-4389,-4383,-4380,-4376,-4375,-4372,-4371,-4369,-4368,-4365,-4365,-4362,-4360,-4358,-4356,-4354,-4351,-4350,-4344,-4343,-4341,-4341,-4338,-4336,-4333,-4329,-4324,-4312,-4306,-4299,-4295,-4292,-4279,-4279,-4278,-4267,-4265,-4264,-4263,-4258,-4252,-4247,-4245,-4244,-4242,-4240,-4236,-4223,-4210,-4207,-4206,-4205,-4204,-4197,-4197,-4187,-4186,-4177,-4176,-4170,-4168,-4165,-4160,-4151,-4146,-4141,-4140,-4138,-4135,-4134,-4133,-4128,-4128,-4127,-4123,-4117,-4117,-4115,-4114,-4097,-4094,-4094,-4092,-4086,-4076,-4071,-4071,-4069,-4064,-4061,-4059,-4059,-4046,-4045,-4045,-4044,-4041,-4040,-4037,-4032,-4029,-4029,-4027,-4027,-4022,-4019,-4018,-4018,-4016,-3999,-3987,-3987,-3979,-3977,-3976,-3975,-3963,-3960,-3956,-3954,-3953,-3947,-3933,-3925,-3919,-3913,-3904,-3903,-3902,-3899,-3892,-3871,-3870,-3870,-3868,-3867,-3859,-3857,-3851,-3849,-3846,-3826,-3825,-3819,-3818,-3814,-3813,-3809,-3807,-3805,-3793,-3793,-3787,-3786,-3784,-3781,-3779,-3774,-3765,-3760,-3755,-3755,-3750,-3748,-3748,-3745,-3745,-3739,-3734,-3728,-3721,-3712,-3705,-3696,-3696,-3693,-3689,-3684,-3682,-3680,-3670,-3670,-3665,-3658,-3657,-3653,-3650,-3647,-3645,-3633,-3626,-3626,-3620,-3619,-3618,-3606,-3599,-3594,-3589,-3586,-3586,-3586,-3583,-3578,-3576,-3575,-3574,-3564,-3548,-3540,-3535,-3534,-3533,-3527,-3526,-3526,-3520,-3519,-3519,-3512,-3503,-3502,-3502,-3500,-3496,-3495,-3494,-3493,-3492,-3488,-3478,-3477,-3472,-3469,-3468,-3466,-3459,-3455,-3453,-3448,-3447,-3438,-3437,-3431,-3430,-3427,-3426,-3415,-3414,-3402,-3397,-3396,-3391,-3387,-3386,-3385,-3385,-3385,-3380,-3379,-3379,-3377,-3377,-3370,-3363,-3354,-3350,-3349,-3349,-3348,-3347,-3346,-3346,-3338,-3337,-3329,-3321,-3320,-3312,-3308,-3304,-3303,-3300,-3288,-3287,-3286,-3283,-3283,-3282,-3280,-3275,-3272,-3268,-3258,-3257,-3254,-3248,-3247,-3245,-3236,-3234,-3231,-3229,-3227,-3223,-3222,-3219,-3218,-3216,-3211,-3207,-3207,-3202,-3199,-3194,-3193,-3193,-3190,-3183,-3175,-3173,-3161,-3160,-3157,-3155,-3154,-3150,-3147,-3141,-3134,-3132,-3129,-3128,-3123,-3119,-3114,-3106,-3106,-3104,-3099,-3083,-3083,-3082,-3080,-3079,-3077,-3074,-3070,-3057,-3046,-3040,-3039,-3035,-3032,-3023,-3015,-3008,-3007,-3006,-3002,-2997,-2994,-2989,-2988,-2979,-2979,-2979,-2978,-2973,-2967,-2963,-2958,-2953,-2953,-2946,-2945,-2940,-2937,-2932,-2926,-2921,-2917,-2915,-2911,-2908,-2908,-2905,-2905,-2902,-2899,-2886,-2885,-2884,-2883,-2882,-2880,-2878,-2866,-2865,-2861,-2857,-2853,-2848,-2847,-2841,-2838,-2836,-2827,-2822,-2821,-2819,-2818,-2815,-2811,-2809,-2803,-2802,-2802,-2799,-2799,-2797,-2797,-2795,-2789,-2787,-2781,-2779,-2779,-2775,-2775,-2773,-2772,-2765,-2764,-2763,-2755,-2751,-2747,-2742,-2734,-2731,-2728,-2726,-2723,-2720,-2719,-2712,-2702,-2699,-2698,-2694,-2691,-2690,-2688,-2686,-2672,-2669,-2660,-2654,-2654,-2646,-2635,-2631,-2630,-2625,-2623,-2622,-2615,-2613,-2611,-2600,-2599,-2598,-2598,-2596,-2595,-2580,-2578,-2576,-2573,-2571,-2568,-2565,-2564,-2559,-2558,-2556,-2552,-2547,-2542,-2538,-2533,-2530,-2528,-2526,-2524,-2523,-2522,-2521,-2517,-2512,-2510,-2509,-2507,-2505,-2501,-2501,-2495,-2494,-2486,-2483,-2482,-2482,-2480,-2479,-2478,-2472,-2471,-2470,-2470,-2469,-2463,-2463,-2456,-2449,-2446,-2444,-2443,-2438,-2437,-2433,-2426,-2425,-2423,-2421,-2401,-2400,-2399,-2395,-2395,-2393,-2392,-2382,-2377,-2366,-2351,-2350,-2348,-2343,-2339,-2336,-2327,-2326,-2325,-2323,-2319,-2316,-2312,-2302,-2296,-2296,-2295,-2289,-2288,-2283,-2282,-2282,-2281,-2270,-2270,-2269,-2269,-2267,-2267,-2259,-2251,-2249,-2246,-2245,-2232,-2232,-2226,-2223,-2215,-2214,-2213,-2205,-2201,-2197,-2188,-2184,-2175,-2174,-2170,-2167,-2165,-2159,-2158,-2157,-2156,-2154,-2150,-2143,-2140,-2130,-2128,-2124,-2121,-2117,-2109,-2102,-2102,-2099,-2097,-2087,-2086,-2083,-2079,-2078,-2078,-2077,-2075,-2075,-2072,-2069,-2068,-2064,-2055,-2053,-2048,-2046,-2044,-2042,-2040,-2038,-2037,-2035,-2032,-2029,-2024,-2020,-2019,-2016,-2014,-2004,-2003,-2002,-1995,-1994,-1992,-1991,-1989,-1985,-1983,-1982,-1981,-1981,-1977,-1974,-1973,-1967,-1967,-1965,-1960,-1953,-1945,-1929,-1916,-1907,-1898,-1897,-1896,-1880,-1879,-1861,-1860,-1854,-1844,-1843,-1840,-1839,-1838,-1838,-1837,-1835,-1833,-1829,-1824,-1821,-1816,-1814,-1813,-1812,-1807,-1803,-1803,-1792,-1785,-1783,-1763,-1757,-1753,-1752,-1752,-1748,-1748,-1743,-1741,-1731,-1729,-1728,-1728,-1715,-1707,-1702,-1700,-1698,-1696,-1680,-1673,-1659,-1651,-1648,-1641,-1638,-1637,-1635,-1630,-1627,-1627,-1624,-1622,-1620,-1613,-1608,-1607,-1602,-1600,-1600,-1587,-1580,-1577,-1574,-1573,-1573,-1566,-1565,-1559,-1559,-1558,-1548,-1543,-1538,-1537,-1537,-1537,-1536,-1535,-1533,-1523,-1518,-1514,-1514,-1510,-1505,-1494,-1486,-1483,-1481,-1480,-1480,-1478,-1467,-1465,-1446,-1445,-1444,-1441,-1437,-1436,-1431,-1430,-1423,-1417,-1411,-1403,-1397,-1394,-1390,-1386,-1385,-1383,-1381,-1375,-1362,-1361,-1360,-1355,-1354,-1352,-1347,-1347,-1336,-1330,-1326,-1325,-1322,-1322,-1320,-1313,-1312,-1310,-1308,-1308,-1307,-1307,-1305,-1299,-1298,-1297,-1295,-1291,-1289,-1288,-1288,-1287,-1285,-1280,-1277,-1276,-1276,-1275,-1263,-1262,-1262,-1258,-1258,-1250,-1244,-1241,-1241,-1239,-1238,-1237,-1235,-1234,-1233,-1216,-1215,-1208,-1205,-1201,-1192,-1182,-1176,-1175,-1174,-1158,-1148,-1148,-1147,-1147,-1146,-1145,-1141,-1140,-1140,-1139,-1133,-1125,-1124,-1122,-1121,-1121,-1120,-1109,-1104,-1100,-1086,-1083,-1078,-1072,-1071,-1069,-1066,-1058,-1048,-1045,-1042,-1038,-1031,-1022,-1014,-1012,-1011,-1008,-1005,-1003,-1001,-994,-991,-990,-988,-980,-974,-971,-967,-965,-962,-956,-950,-947,-946,-933,-926,-923,-921,-912,-909,-906,-905,-898,-896,-893,-892,-889,-887,-885,-884,-881,-877,-875,-859,-849,-845,-839,-838,-833,-830,-821,-821,-818,-816,-809,-806,-802,-799,-794,-788,-782,-780,-778,-769,-768,-765,-762,-760,-754,-751,-751,-748,-745,-744,-741,-740,-738,-733,-731,-716,-715,-711,-709,-708,-707,-702,-692,-691,-690,-688,-687,-686,-679,-679,-677,-676,-672,-670,-666,-665,-662,-659,-658,-656,-647,-641,-641,-639,-634,-626,-625,-621,-617,-615,-615,-612,-610,-608,-607,-606,-603,-602,-600,-595,-593,-593,-592,-591,-579,-575,-569,-564,-559,-558,-555,-547,-544,-541,-539,-537,-536,-534,-534,-526,-524,-524,-522,-521,-520,-514,-514,-513,-510,-504,-504,-498,-488,-484,-472,-468,-455,-453,-446,-442,-435,-428,-426,-425,-422,-421,-420,-413,-410,-409,-409,-404,-403,-399,-384,-381,-380,-373,-360,-357,-348,-348,-345,-344,-341,-338,-337,-335,-335,-330,-326,-326,-319,-317,-310,-302,-296,-279,-274,-273,-271,-268,-267,-264,-262,-258,-258,-248,-248,-246,-241,-237,-237,-231,-228,-228,-226,-213,-210,-198,-188,-181,-179,-175,-170,-166,-164,-163,-159,-155,-154,-148,-148,-142,-135,-132,-131,-127,-118,-110,-110,-109,-104,-98,-95,-93,-88,-87,-85,-84,-80,-78,-76,-61,-59,-49,-49,-48,-48,-42,-40,-38,-33,-32,-31,-22,-10,-8,-5,-2,13,18,21,25,27,30,33,34,38,41,42,46,50,50,52,54,54,60,67,76,80,85,88,94,97,102,102,104,106,118,126,132,138,141,142,143,144,146,146,150,158,160,165,171,185,194,197,208,211,212,213,217,220,223,229,230,231,231,231,231,243,245,251,252,256,259,265,270,286,302,302,303,304,308,309,314,325,330,338,339,340,341,342,348,351,364,364,366,369,370,375,379,381,387,390,393,398,402,406,407,410,412,419,419,420,421,423,434,439,455,456,459,465,475,477,488,495,506,506,515,522,524,525,526,527,529,534,536,539,540,543,543,544,549,550,552,558,565,569,575,577,579,579,586,588,590,598,602,606,606,609,617,625,632,644,648,658,658,659,662,664,674,677,680,682,682,686,694,698,701,702,706,707,708,713,715,719,719,719,730,732,735,737,753,754,773,777,787,788,796,799,808,816,821,823,831,833,837,840,842,848,851,852,855,860,862,872,877,877,879,882,883,887,887,889,890,892,895,899,903,907,912,913,913,918,924,924,928,928,933,940,944,948,948,951,957,959,961,964,979,980,990,992,993,1002,1003,1011,1012,1015,1030,1036,1042,1043,1048,1053,1055,1067,1073,1078,1082,1083,1090,1091,1100,1103,1107,1111,1113,1115,1117,1121,1123,1124,1131,1141,1142,1143,1152,1156,1159,1167,1171,1174,1183,1185,1186,1189,1194,1203,1206,1222,1233,1234,1234,1237,1238,1238,1243,1244,1247,1250,1251,1255,1257,1257,1258,1259,1259,1266,1271,1275,1276,1277,1285,1287,1288,1289,1292,1297,1298,1300,1301,1301,1302,1313,1317,1320,1329,1329,1330,1333,1334,1338,1346,1352,1358,1368,1379,1381,1382,1385,1385,1401,1401,1403,1408,1412,1420,1422,1422,1431,1435,1436,1438,1454,1454,1455,1457,1458,1459,1462,1466,1477,1486,1490,1496,1499,1500,1502,1504,1507,1511,1519,1519,1532,1540,1553,1561,1565,1566,1568,1570,1573,1588,1590,1597,1597,1598,1599,1603,1604,1610,1613,1615,1617,1634,1639,1647,1649,1650,1651,1654,1654,1657,1660,1662,1665,1667,1669,1679,1681,1681,1683,1690,1700,1710,1713,1714,1714,1715,1720,1739,1743,1745,1751,1757,1766,1769,1770,1772,1773,1773,1777,1785,1786,1791,1793,1793,1799,1816,1818,1822,1824,1826,1837,1838,1847,1848,1856,1858,1860,1867,1875,1878,1881,1881,1883,1896,1899,1903,1903,1909,1911,1913,1922,1928,1931,1938,1939,1943,1946,1950,1952,1958,1959,1961,1963,1965,1966,1967,1969,1971,1976,1979,1984,1985,1992,1994,1996,2007,2020,2021,2024,2027,2033,2035,2036,2036,2042,2046,2049,2060,2064,2066,2067,2072,2072,2077,2084,2086,2086,2093,2097,2097,2098,2108,2109,2110,2112,2115,2117,2124,2126,2130,2131,2131,2131,2156,2158,2165,2167,2168,2169,2170,2178,2180,2186,2194,2199,2213,2222,2231,2234,2234,2234,2239,2241,2245,2254,2254,2256,2266,2268,2268,2271,2281,2291,2298,2300,2301,2301,2301,2302,2302,2308,2311,2315,2320,2320,2321,2328,2329,2338,2345,2346,2351,2355,2358,2363,2364,2367,2368,2374,2375,2376,2377,2377,2378,2388,2388,2389,2390,2398,2415,2417,2419,2420,2432,2437,2437,2438,2441,2447,2452,2457,2462,2464,2464,2474,2475,2491,2499,2501,2504,2508,2519,2519,2524,2525,2539,2540,2542,2543,2555,2563,2566,2567,2568,2581,2581,2582,2583,2593,2609,2611,2612,2625,2631,2636,2640,2641,2642,2648,2652,2660,2666,2669,2672,2678,2678,2679,2679,2687,2688,2692,2697,2698,2706,2714,2717,2719,2722,2731,2733,2742,2744,2749,2751,2751,2752,2754,2758,2760,2767,2767,2767,2769,2769,2771,2771,2772,2778,2780,2793,2806,2809,2810,2815,2816,2822,2827,2829,2829,2843,2843,2847,2855,2858,2862,2870,2871,2881,2883,2883,2883,2887,2892,2895,2897,2898,2899,2903,2915,2920,2923,2926,2926,2927,2935,2936,2936,2939,2945,2948,2952,2952,2953,2961,2962,2965,2972,2977,2981,2982,2992,2998,2999,3002,3005,3012,3024,3026,3027,3030,3037,3048,3064,3065,3067,3068,3075,3084,3095,3104,3110,3110,3110,3111,3112,3115,3122,3123,3127,3129,3145,3152,3153,3155,3168,3169,3170,3172,3172,3177,3180,3184,3188,3192,3199,3204,3205,3220,3221,3223,3228,3231,3239,3240,3253,3256,3256,3257,3259,3266,3267,3267,3275,3276,3283,3294,3295,3297,3298,3300,3322,3324,3326,3334,3338,3338,3340,3341,3342,3343,3345,3346,3352,3359,3368,3368,3369,3370,3374,3375,3377,3378,3384,3395,3406,3412,3422,3422,3427,3430,3433,3440,3441,3442,3448,3452,3460,3463,3464,3469,3471,3472,3480,3484,3484,3489,3497,3503,3503,3504,3505,3508,3510,3515,3517,3518,3519,3520,3531,3532,3537,3538,3541,3550,3551,3553,3553,3557,3559,3560,3565,3566,3572,3573,3575,3578,3579,3581,3584,3587,3589,3590,3592,3603,3605,3607,3612,3621,3624,3625,3625,3635,3635,3635,3636,3637,3642,3645,3647,3651,3655,3661,3661,3667,3669,3670,3679,3684,3685,3692,3694,3702,3708,3709,3714,3717,3717,3728,3729,3733,3733,3743,3745,3751,3752,3755,3756,3759,3761,3762,3765,3768,3770,3775,3776,3784,3784,3785,3786,3788,3800,3807,3814,3821,3828,3832,3833,3833,3846,3848,3848,3849,3853,3853,3855,3857,3858,3863,3869,3873,3877,3878,3878,3885,3885,3886,3886,3888,3888,3892,3892,3895,3900,3900,3900,3911,3919,3921,3922,3926,3935,3942,3944,3948,3950,3953,3958,3958,3962,3963,3968,3979,3980,3992,3994,3995,3999,4000,4014,4018,4023,4026,4028,4042,4043,4047,4048,4053,4053,4057,4061,4074,4075,4076,4076,4078,4079,4080,4083,4086,4093,4106,4107,4110,4114,4117,4121,4123,4124,4130,4132,4144,4145,4153,4164,4164,4169,4171,4174,4192,4200,4205,4219,4225,4226,4231,4234,4240,4245,4246,4260,4272,4276,4283,4286,4287,4294,4334,4334,4347,4349,4350,4355,4357,4361,4361,4362,4366,4369,4371,4371,4372,4373,4376,4377,4379,4383,4383,4384,4385,4386,4388,4401,4404,4417,4420,4421,4437,4442,4444,4446,4447,4449,4450,4452,4455,4456,4457,4463,4468,4472,4472,4474,4475,4488,4488,4490,4491,4508,4509,4518,4521,4527,4530,4539,4543,4545,4546,4548,4555,4560,4563,4570,4575,4578,4583,4585,4595,4596,4597,4600,4603,4604,4617,4620,4622,4623,4625,4627,4631,4632,4635,4635,4637,4651,4656,4663,4667,4670,4670,4678,4679,4685,4687,4690,4690,4693,4694,4699,4701,4705,4708,4713,4714,4716,4720,4724,4730,4731,4740,4741,4744,4747,4756,4762,4771,4784,4785,4787,4794,4795,4796,4798,4798,4801,4807,4814,4814,4833,4837,4849,4857,4858,4861,4869,4871,4891,4892,4892,4892,4895,4895,4898,4905,4905,4921,4924,4930,4931,4934,4934,4935,4938,4945,4948,4948,4953,4953,4954,4960,4964,4966,4967,4968,4970,4974,4985,4988,4989,4992,4997,5017,5024,5024,5033,5039,5050,5050,5061,5074,5088,5098,5099,5099,5108,5118,5124,5127,5130,5132,5136,5141,5144,5149,5150,5152,5153,5164,5167,5179,5180,5182,5192,5196,5197,5198,5202,5207,5209,5216,5222,5223,5225,5225,5231,5232,5234,5239,5243,5251,5253,5261,5261,5264,5275,5276,5277,5280,5282,5284,5285,5286,5289,5293,5298,5303,5304,5308,5317,5318,5322,5328,5332,5341,5349,5359,5359,5375,5376,5376,5382,5386,5390,5391,5398,5412,5415,5418,5418,5420,5430,5433,5438,5443,5448,5448,5449,5454,5459,5461,5461,5462,5473,5473,5476,5477,5484,5489,5490,5495,5497,5502,5519,5520,5522,5526,5527,5531,5537,5544,5554,5555,5556,5557,5557,5562,5565,5568,5583,5589,5590,5591,5597,5597,5597,5606,5607,5607,5608,5609,5610,5617,5626,5635,5636,5640,5650,5656,5660,5660,5680,5688,5691,5698,5702,5704,5706,5706,5709,5718,5723,5739,5740,5740,5742,5746,5750,5756,5759,5759,5765,5766,5769,5774,5778,5789,5791,5801,5806,5811,5813,5819,5832,5833,5834,5835,5855,5858,5869,5876,5877,5879,5894,5897,5899,5902,5905,5907,5912,5917,5917,5920,5924,5925,5926,5930,5931,5932,5933,5934,5942,5948,5950,5957,5959,5962,5963,5964,5971,5973,5975,5977,5998,6001,6001,6004,6004,6008,6010,6015,6025,6026,6028,6029,6040,6040,6041,6048,6050,6054,6056,6060,6071,6071,6074,6086,6092,6095,6102,6106,6109,6113,6116,6123,6125,6129,6133,6137,6141,6143,6146,6156,6163,6164,6164,6182,6189,6193,6202,6203,6204,6212,6213,6215,6219,6233,6236,6238,6240,6246,6249,6250,6253,6253,6254,6261,6262,6264,6266,6268,6276,6277,6278,6280,6290,6297,6299,6300,6304,6309,6321,6324,6335,6341,6344,6345,6347,6353,6355,6360,6362,6366,6378,6382,6384,6388,6394,6394,6410,6415,6425,6427,6428,6432,6434,6436,6438,6440,6442,6444,6445,6447,6447,6450,6453,6456,6460,6465,6478,6482,6482,6482,6486,6486,6508,6513,6514,6516,6522,6527,6527,6529,6535,6538,6540,6546,6546,6553,6555,6555,6556,6556,6560,6565,6570,6575,6581,6583,6590,6590,6593,6595,6597,6597,6600,6600,6605,6609,6614,6618,6618,6620,6632,6633,6636,6637,6638,6641,6642,6643,6649,6657,6658,6665,6668,6668,6669,6673,6677,6679,6679,6685,6688,6692,6696,6696,6696,6698,6701,6703,6703,6705,6708,6710,6710,6723,6724,6727,6731,6733,6741,6747,6749,6752,6767,6771,6773,6774,6776,6781,6785,6789,6790,6791,6795,6799,6804,6813,6817,6819,6824,6825,6832,6832,6836,6844,6845,6848,6849,6850,6857,6858,6860,6860,6865,6870,6875,6877,6877,6882,6889,6892,6901,6901,6907,6907,6916,6917,6922,6922,6932,6940,6943,6943,6944,6953,6955,6956,6956,6969,6969,6978,6985,6990,6990,6993,6995,7004,7006,7013,7014,7014,7024,7026,7026,7043,7048,7052,7056,7057,7058,7064,7071,7072,7072,7072,7075,7080,7082,7085,7087,7088,7091,7096,7105,7116,7117,7120,7128,7133,7140,7141,7149,7153,7157,7159,7162,7167,7170,7170,7173,7173,7177,7183,7184,7187,7196,7196,7199,7201,7201,7205,7205,7206,7211,7218,7231,7232,7236,7244,7244,7245,7250,7254,7277,7283,7291,7295,7303,7306,7309,7310,7311,7315,7315,7317,7318,7327,7329,7331,7338,7339,7345,7351,7353,7353,7357,7373,7388,7388,7388,7390,7393,7400,7402,7404,7415,7416,7419,7428,7428,7436,7436,7437,7444,7446,7448,7456,7457,7464,7471,7475,7488,7488,7490,7491,7491,7496,7498,7500,7502,7503,7505,7509,7524,7529,7535,7543,7549,7555,7561,7564,7568,7572,7576,7577,7577,7581,7581,7584,7598,7601,7607,7613,7614,7614,7617,7620,7621,7623,7631,7639,7639,7639,7640,7640,7644,7644,7646,7648,7649,7653,7658,7660,7673,7676,7678,7680,7691,7695,7701,7703,7705,7712,7717,7722,7727,7728,7731,7739,7740,7741,7744,7752,7756,7759,7767,7777,7779,7781,7783,7785,7790,7793,7796,7802,7803,7805,7812,7814,7823,7839,7840,7843,7857,7866,7867,7874,7879,7887,7887,7894,7898,7902,7907,7909,7910,7916,7921,7924,7925,7927,7935,7937,7938,7952,7953,7954,7955,7956,7959,7962,7963,7969,7970,7973,7976,7976,7979,7979,7980,7984,7987,7997,8007,8008,8011,8016,8025,8028,8039,8046,8048,8050,8061,8062,8064,8065,8069,8075,8079,8080,8083,8097,8097,8112,8115,8115,8128,8130,8131,8132,8133,8133,8138,8140,8147,8150,8151,8153,8155,8157,8157,8161,8178,8178,8182,8185,8186,8189,8189,8199,8204,8206,8217,8218,8218,8221,8223,8226,8238,8239,8243,8245,8246,8251,8260,8265,8272,8273,8288,8296,8297,8301,8306,8308,8310,8311,8314,8319,8322,8323,8325,8326,8326,8329,8334,8338,8347,8348,8357,8362,8364,8383,8387,8388,8389,8392,8394,8397,8402,8408,8420,8425,8429,8431,8434,8440,8451,8458,8458,8469,8470,8476,8484,8484,8485,8488,8489,8490,8491,8501,8506,8513,8523,8523,8524,8525,8528,8528,8532,8534,8548,8548,8550,8561,8563,8573,8574,8576,8580,8583,8603,8603,8605,8610,8611,8615,8628,8629,8638,8641,8645,8648,8650,8651,8654,8663,8665,8667,8670,8672,8675,8678,8679,8680,8682,8688,8697,8702,8707,8724,8726,8728,8739,8745,8755,8756,8763,8770,8773,8773,8775,8783,8783,8793,8802,8802,8804,8806,8806,8811,8813,8820,8824,8831,8836,8845,8845,8846,8852,8854,8856,8858,8862,8867,8868,8869,8870,8871,8873,8880,8884,8896,8896,8898,8912,8918,8920,8920,8932,8934,8936,8945,8960,8962,8967,8976,8978,8980,8981,8983,8997,9002,9006,9020,9029,9030,9031,9033,9038,9042,9044,9051,9052,9059,9063,9070,9070,9074,9080,9082,9085,9089,9092,9092,9095,9098,9099,9107,9107,9109,9117,9118,9119,9123,9125,9129,9136,9138,9139,9140,9149,9150,9151,9155,9158,9164,9168,9169,9174,9185,9190,9193,9195,9200,9201,9204,9211,9218,9222,9222,9229,9233,9233,9236,9242,9245,9247,9248,9254,9256,9257,9269,9272,9272,9273,9273,9274,9275,9280,9283,9286,9290,9297,9298,9302,9306,9307,9308,9311,9311,9313,9320,9322,9327,9329,9332,9341,9345,9368,9369,9373,9376,9380,9402,9407,9409,9417,9418,9419,9428,9428,9434,9435,9438,9442,9442,9443,9455,9461,9462,9466,9466,9472,9479,9482,9483,9485,9491,9503,9503,9504,9505,9506,9507,9508,9510,9519,9528,9530,9535,9538,9538,9544,9550,9552,9557,9558,9566,9566,9567,9571,9571,9573,9574,9576,9576,9576,9576,9579,9583,9586,9602,9611,9615,9618,9621,9626,9628,9635,9636,9636,9642,9643,9651,9654,9654,9656,9662,9663,9666,9671,9674,9678,9682,9686,9702,9704,9706,9707,9710,9712,9713,9713,9715,9722,9735,9746,9749,9760,9772,9772,9773,9782,9785,9789,9793,9796,9796,9797,9797,9798,9808,9809,9811,9814,9815,9817,9820,9823,9824,9825,9825,9828,9829,9833,9834,9837,9838,9849,9856,9858,9863,9865,9865,9866,9870,9871,9875,9877,9883,9886,9890,9893,9895,9899,9903,9906,9907,9913,9917,9920,9924,9926,9928,9938,9938,9950,9957,9961,9967,9968,9982,9982,9993,9994,9996,9997,9999}; res = findMedianSortedArrays(arg1, 10000, arg2, 5000); printf("%f", res); #endif } int main(int argc, char **argv) { const struct CMUnitTest tests[] = { cmocka_unit_test(_test01_smoke), }; const size_t testsCount = sizeof(tests) / sizeof(struct CMUnitTest); return _cmocka_run_group_tests("test_26", tests, testsCount, NULL, NULL); }
1,225.41791
53,795
0.720132
49fc1a18a6dcc2246475fab91b6d49689535c0b7
4,234
h
C
src/tb_display.h
electricidea/M5StickC-IOT-Temp-logger
d74c4bbb2720635a6da649a8120f4cdb1f3d17f1
[ "MIT" ]
null
null
null
src/tb_display.h
electricidea/M5StickC-IOT-Temp-logger
d74c4bbb2720635a6da649a8120f4cdb1f3d17f1
[ "MIT" ]
null
null
null
src/tb_display.h
electricidea/M5StickC-IOT-Temp-logger
d74c4bbb2720635a6da649a8120f4cdb1f3d17f1
[ "MIT" ]
null
null
null
/****************************************************************************** * tb_display.h * Library for a simple text buffer scrolling display on the M5StickC. * Hague Nusseck @ electricidea * v1.2 02.Feb.2020 * https://github.com/electricidea/M5StickC-TB_Display * * This library makes it easy to display texts on the M5StickC. * The display behaves like a terminal: New text is added at the bottom. * The text scrolls up with every new line. The lines are automatically wrapped. * The display can be used in any orientation. * * Changelog: * v1.0 = initial version * v1.1 = Added delay parameter to tb_display_print_String function * Added text demo in Example (Button B on M5StickC) * v1.2 = Added "delete character" function * screen_xpos and text_buffer_write_pointer_x set in display_show function * * * Distributed as-is; no warranty is given. ******************************************************************************/ // ============================================================= // tb_display_init(int ScreenRotation); // Initialization of the Text Buffer and Screen // ScreenRotation values: // 1 = Button right // 2 = Button above // 3 = Button left // 4 = Button below // Display size of M5StickC = 160x80pixel // With TEXT_HEIGHT=16, the screen can display: // 5 rows of text in landscape mode // 10 rows of text in portrait mode // ============================================================= void tb_display_init(int ScreenRotation); // ============================================================= // tb_display_show(); // clear the screen and display the text buffer // ============================================================= void tb_display_show(); // ============================================================= // tb_display_clear(); // clear the text buffer // without refreshing the screen // call tb_display_show() afterwards to clear the screen // ============================================================= void tb_display_clear(); // ============================================================= // tb_display_new_line(); // creates a new line and scroll the display upwards // ============================================================= void tb_display_new_line(); // ============================================================= // tb_display_print_String(const char *s, int chr_delay = 0); // print a string // The string is added to the text buffer and directly printed // on the screen. // The optional parameter "chr_delay" allows a "character by character" // processing of the String. Then, it looks like Teletype or Typewriter // The delay is in milliseconds. // The text is automatically wrapped if longer than the display // example: // tb_display_print_String("a new line\n"); // tb_display_print_String("one\nand two lines\n"); // // char String_buffer[128]; // snprintf(String_buffer, sizeof(String_buffer), "\nthe value: %i",value); // tb_display_print_String(String_buffer); // // std::string msg; // msg = ss.str(); // const char * c_msg = msg.c_str(); // tb_display_print_String(c_msg); // ============================================================= void tb_display_print_String(const char *s, int chr_delay = 0); // ============================================================= // tb_display_print_char(byte data); // print a single character // the character is added to the text buffer and // directly printed on the screen. // The text is automatically wrapped if longer than the display // example: // tb_display_print_char('X'); // ============================================================= void tb_display_print_char(byte data); // ============================================================= // tb_display_delete_char(); // delete the last character // the last character will be deleted from the text buffer // If the first character of a row is deleted, the display scrolls // automatically down // ============================================================= void tb_display_delete_char();
40.711538
83
0.518186
b734baf4d8caf376d6829348217d43c09a8547b6
1,658
c
C
part06b Expressions with Loops/asmheader.c
PhorkYou/letsbuildacompiler
0854a9d881fa4245082db559b2f065ef92a91e55
[ "MIT" ]
null
null
null
part06b Expressions with Loops/asmheader.c
PhorkYou/letsbuildacompiler
0854a9d881fa4245082db559b2f065ef92a91e55
[ "MIT" ]
null
null
null
part06b Expressions with Loops/asmheader.c
PhorkYou/letsbuildacompiler
0854a9d881fa4245082db559b2f065ef92a91e55
[ "MIT" ]
null
null
null
/* * asmheader.c * Lets's Build a Compiler * This support code creates an executable binary on OS X * It exits with the final ax value in the program's exit code * Use 'echo $?' after running the program to view the exit code from the command line * * Created by Steve Nicholson on 12/4/09. * Copyright 2009 Harmony Ridge Software. All rights reserved. * */ #include <stdio.h> #include "asmheader.h" //This code is from http://zathras.de/angelweb/blog-intel-assembler-on-mac-os-x.htm void asmheader() { printf("#assemble/link with 'gcc file.s -o file'\n"); printf(" .text\n"); printf(".globl _main\n"); printf("_main:\n"); printf(" pushl %%ebp\n"); printf(" movl %%esp, %%ebp\n"); } void asmfooter() { printf("# contents of %%eax will be the exit code\n"); printf(" leave\n"); printf(" ret\n"); printf("#Reserve space for all the one-character variable names\n"); printf(".data\n"); printf("A:\t.space 4\n"); printf("B:\t.space 4\n"); printf("C:\t.space 4\n"); printf("D:\t.space 4\n"); printf("E:\t.space 4\n"); printf("F:\t.space 4\n"); printf("G:\t.space 4\n"); printf("H:\t.space 4\n"); printf("I:\t.space 4\n"); printf("J:\t.space 4\n"); printf("K:\t.space 4\n"); printf("L:\t.space 4\n"); printf("M:\t.space 4\n"); printf("N:\t.space 4\n"); printf("O:\t.space 4\n"); printf("P:\t.space 4\n"); printf("Q:\t.space 4\n"); printf("R:\t.space 4\n"); printf("S:\t.space 4\n"); printf("T:\t.space 4\n"); printf("U:\t.space 4\n"); printf("V:\t.space 4\n"); printf("W:\t.space 4\n"); printf("X:\t.space 4\n"); printf("Y:\t.space 4\n"); printf("Z:\t.space 4\n"); printf(" .subsections_via_symbols\n"); }
27.633333
87
0.624849
bba026dd60f2da6dda08fb033ab8a671006a58f6
963
h
C
book/tlpi/tlpi-book/sockets/ud_ucase.h
deevarvar/myLab
7a5019f5f7fc11e173d350e6e2a7d2c80504782d
[ "MIT" ]
null
null
null
book/tlpi/tlpi-book/sockets/ud_ucase.h
deevarvar/myLab
7a5019f5f7fc11e173d350e6e2a7d2c80504782d
[ "MIT" ]
null
null
null
book/tlpi/tlpi-book/sockets/ud_ucase.h
deevarvar/myLab
7a5019f5f7fc11e173d350e6e2a7d2c80504782d
[ "MIT" ]
3
2016-10-08T15:01:49.000Z
2018-05-24T03:14:24.000Z
/*************************************************************************\ * Copyright (C) Michael Kerrisk, 2014. * * * * This program is free software. You may use, modify, and redistribute it * * under the terms of the GNU Affero General Public License as published * * by the Free Software Foundation, either version 3 or (at your option) * * any later version. This program is distributed without any warranty. * * See the file COPYING.agpl-v3 for details. * \*************************************************************************/ /* Listing 57-5 */ #include <sys/un.h> #include <sys/socket.h> #include <ctype.h> #include "tlpi_hdr.h" #define BUF_SIZE 10 /* Maximum size of messages exchanged between client and server */ #define SV_SOCK_PATH "/tmp/ud_ucase"
43.772727
75
0.471443
f4c320719ba85ba4bd841517a05b6e881f7f8d50
4,970
h
C
System/Library/PrivateFrameworks/NotesShared.framework/ICAttachmentModel.h
lechium/iPhoneOS_12.1.1_Headers
aac688b174273dfcbade13bab104461f463db772
[ "MIT" ]
12
2019-06-02T02:42:41.000Z
2021-04-13T07:22:20.000Z
System/Library/PrivateFrameworks/NotesShared.framework/ICAttachmentModel.h
lechium/iPhoneOS_12.1.1_Headers
aac688b174273dfcbade13bab104461f463db772
[ "MIT" ]
null
null
null
System/Library/PrivateFrameworks/NotesShared.framework/ICAttachmentModel.h
lechium/iPhoneOS_12.1.1_Headers
aac688b174273dfcbade13bab104461f463db772
[ "MIT" ]
3
2019-06-11T02:46:10.000Z
2019-12-21T14:58:16.000Z
/* * This header is generated by classdump-dyld 1.0 * on Saturday, June 1, 2019 at 6:49:45 PM Mountain Standard Time * Operating System: Version 12.1.1 (Build 16C5050a) * Image Source: /System/Library/PrivateFrameworks/NotesShared.framework/NotesShared * classdump-dyld is licensed under GPLv3, Copyright © 2013-2016 by Elias Limneos. */ #import <NotesShared/NotesShared-Structs.h> #import <libobjc.A.dylib/ICAttachmentModelUI.h> #import <libobjc.A.dylib/QLPreviewItem.h> @class NSURL, NSString, ICAttachment; @interface ICAttachmentModel : NSObject <ICAttachmentModelUI, QLPreviewItem> { BOOL _previewGenerationOperationCancelled; BOOL _mergeableDataDirty; ICAttachment* _attachment; } @property (assign) BOOL previewGenerationOperationCancelled; //@synthesize previewGenerationOperationCancelled=_previewGenerationOperationCancelled - In the implementation block @property (nonatomic,__weak,readonly) ICAttachment * attachment; //@synthesize attachment=_attachment - In the implementation block @property (nonatomic,readonly) CGSize intrinsicContentSize; @property (assign,getter=isMergeableDataDirty,nonatomic) BOOL mergeableDataDirty; //@synthesize mergeableDataDirty=_mergeableDataDirty - In the implementation block @property (nonatomic,readonly) BOOL hasPreviews; @property (nonatomic,readonly) BOOL needsFullSizePreview; @property (nonatomic,readonly) NSString * previewImageTypeUTI; @property (nonatomic,readonly) NSString * hardLinkVersion; @property (nonatomic,readonly) BOOL hasThumbnailImage; @property (nonatomic,readonly) BOOL showThumbnailInNoteList; @property (nonatomic,readonly) BOOL canMarkup; @property (nonatomic,readonly) BOOL supportsQuickLook; @property (nonatomic,readonly) NSURL * saveURL; @property (nonatomic,readonly) BOOL canSaveURL; @property (nonatomic,readonly) BOOL canSaveURLWithOtherAttachments; @property (readonly) unsigned long long hash; @property (readonly) Class superclass; @property (copy,readonly) NSString * description; @property (copy,readonly) NSString * debugDescription; @property (nonatomic,readonly) NSURL * previewItemURL; @property (nonatomic,readonly) NSString * previewItemTitle; +(id)contentInfoTextWithAttachmentCount:(unsigned long long)arg1 ; +(void)deletePreviewItemHardLinkURLs; -(BOOL)hasThumbnailImage; -(BOOL)shouldShowInContentInfoText; -(BOOL)providesStandaloneTitleForNote; -(id)standaloneTitleForNote; -(id)additionalIndexableTextContentInNote; -(id)searchableTextContentInNote; -(id)correctedHardlinkURLFileExtensionForExtention:(id)arg1 ; -(BOOL)isMergeableDataDirty; -(void)updateAttachmentMarkedForDeletionStateAttachmentIsInNote:(BOOL)arg1 ; -(void)attachmentWillTurnIntoFault; -(void)attachmentWillRefresh:(BOOL)arg1 ; -(void)attachmentDidRefresh:(BOOL)arg1 ; -(BOOL)canSaveURL; -(BOOL)canSaveURLWithOtherAttachments; -(id)titleForSubAttachment:(id)arg1 ; -(void)writeMergeableData; -(short)sectionForSubAttachments; -(void)updateAfterLoadWithSubAttachmentIdentifierMap:(id)arg1 ; -(void)undeleteSubAttachments; -(BOOL)providesTextContentInNote; -(id)textContentInNote; -(id)attachmentModelType; -(void)noteWillAddOrRemovePassword; -(BOOL)shouldSyncPreviewImageToCloud:(id)arg1 ; -(void)updateFileBasedAttributes; -(void)addLocation; -(NSURL *)saveURL; -(id)searchableTextContentForLocation; -(NSString *)hardLinkVersion; -(id)generateHardLinkURLIfNecessaryForURL:(id)arg1 ; -(id)hardLinkFolderPath; -(id)generateHardLinkURLIfNecessaryForURL:(id)arg1 withFileName:(id)arg2 ; -(BOOL)canMarkup; -(id)searchableTextContent; -(void)regenerateTextContentInNote; -(void)attachmentAwakeFromFetch; -(void)attachmentIsDeallocating:(id)arg1 ; -(void)updateAttachmentSize; -(BOOL)shouldCropImage; -(void)deleteSubAttachments; -(void)willMarkAttachmentForDeletion; -(BOOL)isReadyToPresent; -(id)localizedFallbackTitle; -(id)localizedFallbackSubtitleIOS; -(id)localizedFallbackSubtitleMac; -(id)generateTemporaryURLWithExtension:(id)arg1 ; -(id)dataForQuickLook; -(BOOL)mergeWithMergeableData:(id)arg1 ; -(id)mergeableDataForCopying; -(CGAffineTransform)previewImageOrientationTransform; -(long long)previewImageOrientation; -(NSString *)previewImageTypeUTI; -(BOOL)canConvertToHTMLForSharing; -(id)attributesForSharingHTMLWithTagName:(id*)arg1 textContent:(id*)arg2 ; -(BOOL)needsFullSizePreview; -(id)fileURLForTypeIdentifier:(id)arg1 ; -(id)dataForTypeIdentifier:(id)arg1 ; -(BOOL)shouldGeneratePreviewAfterChangeInSubAttachmentWithIdentifier:(id)arg1 ; -(BOOL)showThumbnailInNoteList; -(BOOL)hasPreviews; -(void)setPreviewGenerationOperationCancelled:(BOOL)arg1 ; -(BOOL)previewGenerationOperationCancelled; -(void)setMergeableDataDirty:(BOOL)arg1 ; -(id)providerDataTypes; -(id)providerFileTypes; -(BOOL)supportsQuickLook; -(void)dealloc; -(CGSize)intrinsicContentSize; -(NSURL *)previewItemURL; -(NSString *)previewItemTitle; -(id)initWithAttachment:(id)arg1 ; -(ICAttachment *)attachment; @end
41.416667
211
0.80664
4f886225e63f34b0fe41d63c39d9df8b81adbdb3
10,234
h
C
Pods/Headers/Public/SPMacro/SPFoundationMacro.h
lishiping/PrivacyPhoto
acbf5d03eae60800c2200fbca866f45dd91eaef1
[ "MIT" ]
6
2017-05-08T08:17:19.000Z
2018-02-06T08:55:07.000Z
Pods/Headers/Public/SPMacro/SPFoundationMacro.h
lishiping/SPCategory
bd17323c95595ed9de14adc2d358fc6803bd6249
[ "MIT" ]
null
null
null
Pods/Headers/Public/SPMacro/SPFoundationMacro.h
lishiping/SPCategory
bd17323c95595ed9de14adc2d358fc6803bd6249
[ "MIT" ]
null
null
null
// // SPFoundationMacro.h // e-mail:83118274@qq.com // // Created by lishiping on 16/11/11. // Copyright (c) 2016年 lishiping. All rights reserved. // //If you think this open source library is of great help to you, please open the URL to click the Star,your approbation can encourage me, the author will publish the better open source library for guys again //如果您认为本开源库对您很有帮助,请打开URL给作者点个赞,您的认可给作者极大的鼓励,作者还会发布更好的开源库给大家 //github address//https://github.com/lishiping/SPWebView //github address//https://github.com/lishiping/SPDebugBar //github address//https://github.com/lishiping/SPFastPush //github address//https://github.com/lishiping/SPMacro //github address//https://github.com/lishiping/SafeData //github address//https://github.com/lishiping/SPCategory //github address//https://github.com/lishiping/SPBaseClass #import <Foundation/Foundation.h> //------------------weak strong reference---------------- //--------------------弱强引用--------------------------- //判断是不是支持arc模式 #if __has_feature(objc_arc) #define SP_WEAK_SELF __weak __typeof(self) weak_self = self; #define SP_WEAK(obj) __weak __typeof(obj) weak_##obj = obj; #define SP_STRONG_SELF __strong __typeof(weak_self) strong_self = weak_self; #define SP_STRONG(obj) __strong __typeof(obj) strong_##obj = weak_##obj; #else #define SP_WEAK_SELF __block __typeof(self) weak_self = self; #define SP_WEAK(obj) __block __typeof(obj) weak_##obj = obj; #define SP_STRONG_SELF __strong __typeof(weak_self) strong_self = weak_self; #define SP_STRONG(obj) __strong __typeof(obj) strong_##obj = weak_##obj; #endif //--------------------Print log--------------------------- //--------------------打印日志--------------------------- #define SP_STRING_FORMAT(fmt, ...) [NSString stringWithFormat:(@"%z, %s(line %d) " fmt), clock(), __FUNCTION__, __LINE__, ##__VA_ARGS__] #if DEBUG #define SP_LOG(...) NSLog(__VA_ARGS__); #define SP_LOG_FMT(fmt, ...) NSLog((@"%s (line %d) " fmt), __FUNCTION__, __LINE__, ##__VA_ARGS__); #define SP_LOG_IF(x, fmt, ...) if (x) {SP_LOG_FMT(fmt, ##__VA_ARGS__);} #define SP_PRINTF(fmt, ...) printf(("%ld, %s (line %d) " fmt), clock(), __FUNCTION__, __LINE__, ##__VA_ARGS__); // 打印super class #define SP_PRINT_FATHERCLASS(obj) [SPFoundationMacro printFatherClass:obj]; /* 打印提供: 时间, 类名, 行数, 函数名 */ #define SP_SUPER_LOG(...) printf("%s, %s, line:%d, %s, %s\n\n",[[SPFoundationMacro sp_stringDate] UTF8String], [[NSString stringWithFormat:@"%s", __FILE__].lastPathComponent UTF8String] ,__LINE__,__FUNCTION__, [[NSString stringWithFormat:__VA_ARGS__] UTF8String]); #else #define SP_LOG(...) #define SP_LOG_FMT(fmt, ...) #define SP_LOG_IF(x, fmt, ...) #define SP_PRINTF(fmt, ...) #define SP_PRINT_FATHERCLASS(obj) #define SP_SUPER_LOG(...) #endif //--------------------assert--------------------------- //--------------------断言--------------------------- #if DEBUG //当condition的值为非真值的时候,断言停留在此,并打印备注消息 //NSAssert(0, @"备注消息"); #define SP_NSAssert(condition, desc) NSAssert(condition,desc); #define SP_ASSERT(obj) assert(obj) #define SP_ASSERT_CLASS(obj, cls) assert((obj) && SP_IS_KIND_OF(obj,cls))//断言实例有值和类型 // (assert main thread)断言在主线程中 #define SP_ASSERT_MAIN_THREAD SP_ASSERT(SP_IS_MAIN_THREAD) #else #define SP_NSAssert(condition, desc) #define SP_ASSERT(obj) #define SP_ASSERT_CLASS(obj, cls) #define SP_ASSERT_MAIN_THREAD #endif //------Code execution time(return min seconds)------------- //------------------代码运算时间(返回毫秒时间)------------------ /* CGFloat time = SP_EXECUTE_TIME( sleep(2); ); SP_LOG(@"代码执行时间%fms",time); */ #define SP_EXECUTE_TIME(block) [SPFoundationMacro calculateRunTimeBlock:^{block}]; //------------------Kind Of Class--------------------- //------------------类型判断--------------------------- // 判断实例类型(含父类) #define SP_IS_KIND_OF(obj, cls) [(obj) isKindOfClass:[cls class]] #define SP_IS_KIND_OF_ClASSNAME(obj, classname) [(obj) isKindOfClass:[NSClassFromString(classname) class]] // 判断实例类型(不含父类) #define SP_IS_MEMBER_OF(obj, cls) [(obj) isMemberOfClass:[cls class]] // 判断实例类型(是否是子类) #define SP_IS_SUBCLASS_OF(obj, cls) [(obj) isSubclassOfClass:[cls class]] //--------------------Notification--------------------------- //--------------------通知--------------------------- #define SP_NOTI_DEFAULT [NSNotificationCenter defaultCenter] // 添加观察者 #define SP_NOTI_ADD_OBSERVER(_obj,_sel,_name,_message) [SP_NOTI_DEFAULT addObserver:_obj selector:_sel name:_name object:_message]; // 发送通知消息(同步) #define SP_NOTI_POST(_name,_message) [SP_NOTI_DEFAULT postNotificationName:_name object:_message]; // 取消观察 #define SP_NOTI_REMOVE_SELF [SP_NOTI_DEFAULT removeObserver:self]; #define SP_NOTI_REMOVE(obj) [SP_NOTI_DEFAULT removeObserver:obj]; #define SP_NOTI_REMOVE_NAME(_obj,_name,_message) [SP_NOTI_DEFAULT removeObserver:_obj name:_name object:_message]; //--------------------APP Version---------------------- //--------------------APP版本--------------------------- //获取APP版本 #ifndef SP_APP_VERSION #define SP_APP_VERSION [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"] //获取APP的build版本 #define SP_APP_BUILD_VERSION [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"] #endif //--------------------Thread------------------------ //--------------------线程--------------------------- // (is main thread)判断是否主线程 #define SP_IS_MAIN_THREAD [NSThread isMainThread] // (run in main thread)使block在主线程中运行,例如下面的用法 //SP_RUN_MAIN_THREAD //(self.view.backgroundColor = [UIColor blueColor]; // NSLog(@"打印当前线程%@",[NSThread currentThread]); // ) #define SP_RUN_MAIN_THREAD(block) if (SP_IS_MAIN_THREAD) {block} else {dispatch_async(dispatch_get_main_queue(), ^{block});} // (run in global thread)使block在子线程中运行,例如下面的用法 //SP_RUN_GlOBAL_THREAD //(NSLog(@"打印当前线程2%@",[NSThread currentThread]); // ) #define SP_RUN_GlOBAL_THREAD(block) if (!SP_IS_MAIN_THREAD) {block} else {dispatch_async(dispatch_get_global_queue(0,0), ^{block});} // (safe run block)安全运行block #define SP_BLOCK(block, ...) if (block) {block(__VA_ARGS__);} //--------------------SandBox Path--------------------------- //--------------------沙盒路径--------------------------- //获取沙盒主目录路径 #define SP_PATH_HOME NSHomeDirectory() //沙盒文档路径 /*Documents 目录:您应该将所有应用程序数据文件写入到这个目录下。这个目录用于存储用户数据或其它应该定期备份的信息。 ②是否会被iTunes同步 是 */ #define SP_PATH_DOCUMENT [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0] //沙盒library路径 /*Library目录:这个目录下有两个子目录:Preference,Caches ①存放内容 苹果建议用来存放默认设置或其它状态信息。该路径下的文件夹,除Caches以外,都会被iTunes备份。 ②是否会被iTunes同步 是,但是要除了Caches子目录外 */ #define SP_PATH_LIBRARY [NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES) objectAtIndex:0] //沙盒Preference路径 /*①存放内容 应用程序的偏好设置文件,配置目录,配置文件。我们使用NSUserDefaults写的设置数据都会保存到该目录下的一个plist文件中,这就是所谓的写到plist中! ②是否会被iTunes同步 是 */ #define SP_PATH_PREFERENCE [[NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES) objectAtIndex:0] stringByAppendingPathComponent:@"Preferences"] //沙盒Caches缓存路径 //Caches 目录:用于存放应用程序专用的支持文件,保存应用程序再次启动过程中需要的信息,存储项目缓存,常用设置。可创建子文件夹。可以用来放置您希望被备份但不希望被用户看到的数据。 /*①存放内容 主要是缓存文件,用户使用过程中缓存都可以保存在这个目录中。前面说过,Documents目录用于保存不可再生的文件,那么这个目录就用于保存那些可再生的文件,比如网络请求的数据。鉴于此,应用程序通常还需要负责删除这些文件。 ②是否会被iTunes同步 否。 */ #define SP_PATH_CACHE [NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) objectAtIndex:0] //沙盒tmp路径 //tmp 目录:这个目录用于存放临时文件,保存应用程序再次启动过程中不需要的信息。该路径下的文件不会被iTunes备份。 /*①存放内容 各种临时文件,保存应用再次启动时不需要的文件。而且,当应用不再需要这些文件时应该主动将其删除,因为该目录下的东西随时有可能被系统清理掉,目前已知的一种可能清理的原因是系统磁盘存储空间不足的时候。 ②是否会被iTunes同步 否 */ #define SP_PATH_TMP NSTemporaryDirectory() //--------------------file--------------------------- //--------------------文件--------------------------- //判断文件是否存在 #define SP_IS_FILE_EXIST(path) [[NSFileManager defaultManager] fileExistsAtPath:(path)] //--------------Reference counting---------------------- //--------------------引用计数--------------------------- //判断是不是支持arc模式 #if __has_feature(objc_arc) #define OC_Retain(x) ARC_Retain(x) #define OC_Copy(x) ARC_Copy(x) #define OC_Release(x) ARC_Release(x) #define OC_Release_View(x) ARC_Release_View(x) #define OC_SuperDealloc #else #define OC_Retain(x) MRC_Retain(x) #define OC_Copy(x) MRC_Copy(x) #define OC_Release(x) MRC_Release(x) #define OC_Release_View(x) MRC_Release_View(x) #define OC_SuperDealloc MRC_Dealloc(super) #endif #define MRC_Retain(x) [(x) retain]; #define MRC_Copy(x) [(x) copy]; #define MRC_Release(x) {if(x){[(x) release];}} #define MRC_Release_View(x) {if(x){[(x) removeFromSuperview];[(x) release];(x)=nil;}} #define MRC_Dealloc(x) [(x) dealloc]; #define ARC_Retain(x) (x) #define ARC_Copy(x) (x) #define ARC_Release(x) {(x)=nil;} #define ARC_Release_View(x) {if(x){[(x) removeFromSuperview];(x)=nil;}} #define ARC_Dealloc(x) //--------------------local Language--------------------------- //--------------------本地语言--------------------------- //判断是否是简体中文环境,(判断前缀,后面可能有地区区分不同) #define SP_LANGUAGE_IS_HANS [[[NSLocale preferredLanguages] objectAtIndex:0] hasPrefix:@"zh-Hans"] //判断是否是繁体中文环境,(判断前缀,后面可能有地区区分不同) #define SP_LANGUAGE_IS_HANT [[[NSLocale preferredLanguages] objectAtIndex:0] hasPrefix:@"zh-Hant"] //判断本地语言是不是英语,(判断前缀,后面可能有地区区分不同) #define SP_LANGUAGE_IS_EN() [[[NSLocale preferredLanguages] objectAtIndex:0] hasPrefix:@"en"] //多语言支持,使用系统多语言方法,省略第二个参数 #define SP_LocalizedString(key) NSLocalizedString(key, nil) //官方多语言字符集 @interface SPFoundationMacro : NSObject //+(void)printBacktrace; // 函数调用堆栈 +(void)printFatherClass:(id)obj; // 打印super class /** 计算代码块的执行时间的方法,用来验证算法的执行效率等其他需要测试执行时间的代码 @param block 代码块 @return (return ms time)返回毫秒运算时间 */ +(double)calculateRunTimeBlock:(void (^)(void))block; /// 当前时间精确到毫秒 + (NSString *)sp_stringDate; @end
30.367953
264
0.651651
4fd28e4fd60cc81995ab1b18d3dccf587629106e
1,268
h
C
vsedit/src/script_editor/syntax_highlighter.h
jkotra/vapoursynth-editor
ee028830d5d390bd3fbde5577577444c011f4987
[ "MIT" ]
null
null
null
vsedit/src/script_editor/syntax_highlighter.h
jkotra/vapoursynth-editor
ee028830d5d390bd3fbde5577577444c011f4987
[ "MIT" ]
null
null
null
vsedit/src/script_editor/syntax_highlighter.h
jkotra/vapoursynth-editor
ee028830d5d390bd3fbde5577577444c011f4987
[ "MIT" ]
null
null
null
#ifndef SYNTAXHIGHLIGHTER_H #define SYNTAXHIGHLIGHTER_H #include "../vapoursynth/vs_plugin_data.h" #include <QSyntaxHighlighter> #include <QTextCharFormat> #include <QStringList> class SettingsManager; class SyntaxHighlighter : public QSyntaxHighlighter { Q_OBJECT public: SyntaxHighlighter(QTextDocument *a_pDocument, VSPluginsList a_pluginsList = VSPluginsList()); virtual ~SyntaxHighlighter(); void setSettingsManager(SettingsManager *a_pSettingsManager); void setCoreName(const QString &a_coreName); void setPluginsList(VSPluginsList a_pluginsList); public slots: void slotLoadSettings(); protected: void highlightBlock(const QString &a_text); private: SettingsManager *m_pSettingsManager; QString m_coreName; VSPluginsList m_pluginsList; QStringList m_keywordsList; QStringList m_operatorsList; QTextCharFormat m_keywordFormat; QTextCharFormat m_operatorFormat; QTextCharFormat m_stringFormat; QTextCharFormat m_numberFormat; QTextCharFormat m_commentFormat; QTextCharFormat m_vsCoreFormat; QTextCharFormat m_vsNamespaceFormat; QTextCharFormat m_vsFunctionFormat; QTextCharFormat m_vsArgumentFormat; }; #endif // SYNTAXHIGHLIGHTER_H
21.491525
69
0.772871
4fe897c2e1f395ea1e2326607609f480df371210
7,118
h
C
contrib/dtnsuite/dtnfog/src/proxy_thread.h
yellowjigi/ion
4fafd7897628e2ead2595ede01470af6105e521e
[ "Unlicense" ]
2
2021-04-08T08:02:41.000Z
2021-04-08T08:41:25.000Z
contrib/dtnsuite/dtnfog/src/proxy_thread.h
bonedaddy/ion-dtn
3c07c53a6002163545fd92ea99b98cdcceea4e17
[ "Unlicense" ]
null
null
null
contrib/dtnsuite/dtnfog/src/proxy_thread.h
bonedaddy/ion-dtn
3c07c53a6002163545fd92ea99b98cdcceea4e17
[ "Unlicense" ]
null
null
null
/******************************************************** Authors: Lorenzo Mustich, lorenzo.mustich@studio.unibo.it Lorenzo Tullini, lorenzo.tullini@studio.unibo.it Carlo Caini (DTNfog project supervisor), carlo.caini@unibo.it License: This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Copyright (c) 2018, Alma Mater Studiorum, University of Bologna ********************************************************/ /* * proxy_thread.h * * This file contains * - library * - data structures * - function interface * used by all of the threads */ #ifndef DTNfog_SRC_PROXY_THREAD_H_ #define DTNfog_SRC_PROXY_THREAD_H_ /** * Includes */ #include <al_bp_api.h> #include <types.h> #include <includes.h> #include <fcntl.h> #include <ctype.h> #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <netdb.h> #include <dirent.h> #include <signal.h> #include <semaphore.h> #include <libgen.h> #include "al_bp_extB.h" #include "definitions.h" #include <sys/types.h> #include <sys/socket.h> #include <sys/ioctl.h> #include <netinet/in.h> #include <net/if.h> /** * Data structures */ /*Data structure to describe initialization status typedef struct proxy_init_status_t { int SOCKET; int THREADS_STARTED; int SEMAPHORETCP; int SEMAPHOREBP; int BPSEND_REGISTRED; int BPRECIVE_REGISTRED; int BPINIT; }proxy_init_status_t;*/ //Data structure for error typedef enum proxy_error_t { SOCKET_ERROR = 0, //Error after socket creation REGISTER_ERROR, //Error after bp registration SEMAPHORE_ERROR, //Error after sem_init THREAD_ERROR //Error returned by thread }proxy_error_t; //Data structure for error typedef enum processing_error_t { RETURN_OK = 0, //Well file extraction MOVING_ERROR, //Error moving file to calcol dir RETURNVALUE_ERROR, //Error not valid tar file VALIDTAR_ERROR, //Error in valid tar checking DELETE_ERROR, //Error in deleting files COMMAND_NOT_FOUND //Error command not found in allowed list }processing_error_t; typedef enum processing_return_t { IS_FOR_CLIENT = 0, //File tar was sanding by a clint IS_FROM_CLOUD, //File tar was sanding by cloud RESULT_FOUND, //In file tar there is result so dtnfog works like a network switch RESULT_NOT_FOUND //In file tar there is no result so dtnfog traies to execute comand }processing_return_t; /*------------------------------- * CIRCULAR BUFFER * ----------------------------- * */ //Data structure for cricular buffer item typedef struct circular_buffer_item { char fileName[FILE_NAME]; char eid[AL_BP_MAX_ENDPOINT_ID]; char ip[IP_LENGTH]; int port; int protocol; //BP=0 TCP=1 }circular_buffer_item; //Data structure for ring buffer typedef struct circular_buffer_t{ circular_buffer_item * buffer; circular_buffer_item * buffer_end; circular_buffer_item * data_start; circular_buffer_item * data_end; int count; int size; pthread_mutex_t mutex; } circular_buffer_t; /*------------------------------- * CALCO UNIT * ----------------------------- * */ typedef struct calcol_unit_info{ circular_buffer_t calcol_unit_buffer; char options; int debug_level; circular_buffer_t * tcp_tosend_buffer; circular_buffer_t *bp_tosend_buffer; int cloud; char allowed_comand[(COMMAND_SIZE*MAX_NUMBER_OF_COMMANDS)+COMMAND_SIZE]; int numberOfCommand; char mycloud[IP_LENGTH]; char communication_address[IP_LENGTH+6]; char tcp_address[IP_LENGTH+6]; char bp_address[IP_LENGTH+6]; char addresso_to_print[IP_LENGTH+6]; int report; }calcol_unit_info_t; typedef struct processor_info{ circular_buffer_item item; circular_buffer_t * tcp_tosend_buffer; circular_buffer_t *bp_tosend_buffer; int debug_level; char options; int cloud; char allowed_comand[(COMMAND_SIZE*MAX_NUMBER_OF_COMMANDS)+COMMAND_SIZE]; int numberOfCommand; char mycloud[IP_LENGTH]; char comunication_address[IP_LENGTH+6]; char tcp_address[IP_LENGTH+6]; char bp_address[IP_LENGTH+6]; char addresso_to_print[IP_LENGTH+6]; int report; }processor_info_t; typedef struct command{ int cmdLen; int number_of_file; char cmd[EXCOMMAND_SIZE]; char files[MAX_NUMBER_OF_FILES][FILE_NAME]; }command_t; /*------------------------------- * SENDER SIDE * ----------------------------- * */ //Data structure for threads TCP SENDER typedef struct tcp_sender_info { int debug_level; char options; circular_buffer_t tcp_tosend_buffer; }tcp_sender_info_t; //Data structure for threads BUNDLE SENDER typedef struct bp_sender_info { al_bp_extB_registration_descriptor rd_send; char options; int debug_level; int error; circular_buffer_t bp_tosend_buffer; }bp_sender_info_t; /*------------------------------- * RECEIVER SIDE * ----------------------------- * */ typedef struct tcp_receiver_info{ int listenSocket_fd; int debug_level; char options; circular_buffer_t * calcol_unit_circular_buffer; }tcp_receiver_info_t; //Data structure for tcp receiver thread which contains the minimum information to coplete the job typedef struct tcp_receiver_thread_info{ int connectClientSocket; tcp_receiver_info_t * proxy_info; struct sockaddr_in cliaddr; circular_buffer_t * calcol_unit_circular_buffer; }tcp_receiver_thread_info_t; typedef struct bp_receiver_info{ al_bp_extB_registration_descriptor rd_receive; int debug_level; char options; int error; circular_buffer_t * calcol_unit_circular_buffer; }bp_receiver_info_t; /** * Function interfaces */ //Thread for TCP receiving void *tcpReceiving(void * arg); //Thread for bundle sending void *bundleSending(void * arg); //Thread for bundle receiving void *bundleReceiving(void * arg); //Thread for TCP sending list void *tcpSending(void * arg); //Thread for TCP sender thread void * tcpSenderThread(void * arg); //Thread for TCP receiver thread void * tcpReceiverThread(void * arg); //Function for program clean exit void proxy_exit(int error); //Thread of calcol and execution of dtnfog void * calcolUnitThread(void * arg); //Thread of calcol processing void * processorThread(void * arg); void circular_buffer_init(circular_buffer_t * cb, int size); void circular_buffer_free(circular_buffer_t* cb); int circular_buffer_isFull(circular_buffer_t* cb); int circular_buffer_push(circular_buffer_t* cb, circular_buffer_item data); circular_buffer_item circular_buffer_pop(circular_buffer_t* cb); int circular_buffer_isEmpty(circular_buffer_t* cb); #endif /* DTNfog_SRC_PROXY_THREAD_H_ */
27.272031
98
0.733212
e288bd73f309c017f5e7e4ae9deb8c3c26aa2588
2,276
h
C
config.h
adamvr/mosquitto-homebrew-mods
a9bccc739eabbbb392b505e9750eba70633bc0f7
[ "BSD-3-Clause" ]
null
null
null
config.h
adamvr/mosquitto-homebrew-mods
a9bccc739eabbbb392b505e9750eba70633bc0f7
[ "BSD-3-Clause" ]
1
2015-05-07T02:32:35.000Z
2015-05-07T07:28:43.000Z
config.h
adamvr/mosquitto-homebrew-mods
a9bccc739eabbbb392b505e9750eba70633bc0f7
[ "BSD-3-Clause" ]
null
null
null
/* ============================================================ * Control compile time options. * * Largely, these are options that are designed to make mosquitto run more * easily in restrictive environments by removing features. * ============================================================ */ /* Uncomment to compile with tcpd/libwrap support. */ //#define WITH_WRAP /* Compile with database upgrading support? If disabled, mosquitto won't * automatically upgrade old database versions. */ //#define WITH_DB_UPGRADE /* Compile with memory tracking support? If disabled, mosquitto won't track * heap memory usage nor export '$SYS/broker/heap/current size', but will use * slightly less memory and CPU time. */ #define WITH_MEMORY_TRACKING /* Compile with the ability to upgrade from old style sqlite persistent * databases to the new mosquitto format. This means a dependency on sqlite. It * isn't needed for new installations. * Not available on Windows. */ #ifndef WIN32 #define WITH_SQLITE_UPGRADE #endif /* Compile with persistent database support. This allows the broker to store * retained messages and durable subscriptions to a file periodically and on * shutdown. This is usually desirable (and is suggested by the MQTT spec), but * it can be disabled by commenting out this define if required. * Not available on Windows. */ #ifndef WIN32 #define WITH_PERSISTENCE #endif /* Compile with 32-bit integer database IDs instead of 64-bit integers. May be * useful in embedded systems or where be64toh()/htobe64() aren't available. * There is the potential for bad things to happen after the IDs wrap around. * This is especially likely if there are old retained messages. Note that at a * sustained rate of 10,000 messages/s, the database ID would overflow every 5 * days. It is also worth noting that a broker compiled with 64-bit DB IDs will * not load a persistent database file saved from a 32-bit DB ID broker and * vice versa. */ //#define WITH_32BIT_DBID /* ============================================================ * Compatibility defines * * Generally for Windows native support. * ============================================================ */ #ifdef WIN32 #define snprintf sprintf_s #define strcasecmp strcmpi #endif
38.576271
79
0.679262
e2ba1744d1e4ecce5a48f5bc352ed03206593b0e
7,402
c
C
drivers/measured_boot/event_log/event_print.c
Nuvoton-Israel/arm-trusted-firmware
469101d48a1b0cb6c93ea5fe3bd3b32b46bd047e
[ "MIT" ]
1,408
2015-01-26T17:15:15.000Z
2022-03-31T12:54:11.000Z
drivers/measured_boot/event_log/event_print.c
Nuvoton-Israel/arm-trusted-firmware
469101d48a1b0cb6c93ea5fe3bd3b32b46bd047e
[ "MIT" ]
1,177
2015-01-07T12:55:46.000Z
2022-01-19T10:49:12.000Z
drivers/measured_boot/event_log/event_print.c
Nuvoton-Israel/arm-trusted-firmware
469101d48a1b0cb6c93ea5fe3bd3b32b46bd047e
[ "MIT" ]
959
2015-01-08T09:12:45.000Z
2022-03-28T03:07:50.000Z
/* * Copyright (c) 2020, Arm Limited. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ #include <assert.h> #include <string.h> #include <common/debug.h> #include <drivers/measured_boot/event_log/event_log.h> #if LOG_LEVEL >= EVENT_LOG_LEVEL /* * Print TCG_EfiSpecIDEventStruct * * @param[in/out] log_addr Pointer to Event Log * @param[in/out] log_size Pointer to Event Log size */ static void id_event_print(uint8_t **log_addr, size_t *log_size) { unsigned int i; uint8_t info_size, *info_size_ptr; void *ptr = *log_addr; id_event_headers_t *event = (id_event_headers_t *)ptr; id_event_algorithm_size_t *alg_ptr; uint32_t event_size, number_of_algorithms; size_t digest_len; #if ENABLE_ASSERTIONS const uint8_t *end_ptr = (uint8_t *)((uintptr_t)*log_addr + *log_size); bool valid = true; #endif assert(*log_size >= sizeof(id_event_headers_t)); /* The fields of the event log header are defined to be PCRIndex of 0, * EventType of EV_NO_ACTION, Digest of 20 bytes of 0, and * Event content defined as TCG_EfiSpecIDEventStruct. */ LOG_EVENT("TCG_EfiSpecIDEvent:\n"); LOG_EVENT(" PCRIndex : %u\n", event->header.pcr_index); assert(event->header.pcr_index == (uint32_t)PCR_0); LOG_EVENT(" EventType : %u\n", event->header.event_type); assert(event->header.event_type == EV_NO_ACTION); LOG_EVENT(" Digest :"); for (i = 0U; i < sizeof(event->header.digest); ++i) { uint8_t val = event->header.digest[i]; (void)printf(" %02x", val); if ((i & U(0xF)) == 0U) { (void)printf("\n"); LOG_EVENT("\t\t :"); } #if ENABLE_ASSERTIONS if (val != 0U) { valid = false; } #endif } if ((i & U(0xF)) != 0U) { (void)printf("\n"); } assert(valid); /* EventSize */ event_size = event->header.event_size; LOG_EVENT(" EventSize : %u\n", event_size); LOG_EVENT(" Signature : %s\n", event->struct_header.signature); LOG_EVENT(" PlatformClass : %u\n", event->struct_header.platform_class); LOG_EVENT(" SpecVersion : %u.%u.%u\n", event->struct_header.spec_version_major, event->struct_header.spec_version_minor, event->struct_header.spec_errata); LOG_EVENT(" UintnSize : %u\n", event->struct_header.uintn_size); /* NumberOfAlgorithms */ number_of_algorithms = event->struct_header.number_of_algorithms; LOG_EVENT(" NumberOfAlgorithms : %u\n", number_of_algorithms); /* Address of DigestSizes[] */ alg_ptr = event->struct_header.digest_size; /* Size of DigestSizes[] */ digest_len = number_of_algorithms * sizeof(id_event_algorithm_size_t); assert(((uintptr_t)alg_ptr + digest_len) <= (uintptr_t)end_ptr); LOG_EVENT(" DigestSizes :\n"); for (i = 0U; i < number_of_algorithms; ++i) { LOG_EVENT(" #%u AlgorithmId : SHA", i); uint16_t algorithm_id = alg_ptr[i].algorithm_id; switch (algorithm_id) { case TPM_ALG_SHA256: (void)printf("256\n"); break; case TPM_ALG_SHA384: (void)printf("384\n"); break; case TPM_ALG_SHA512: (void)printf("512\n"); break; default: (void)printf("?\n"); ERROR("Algorithm 0x%x not found\n", algorithm_id); assert(false); } LOG_EVENT(" DigestSize : %u\n", alg_ptr[i].digest_size); } /* Address of VendorInfoSize */ info_size_ptr = (uint8_t *)((uintptr_t)alg_ptr + digest_len); assert((uintptr_t)info_size_ptr <= (uintptr_t)end_ptr); info_size = *info_size_ptr++; LOG_EVENT(" VendorInfoSize : %u\n", info_size); /* Check VendorInfo end address */ assert(((uintptr_t)info_size_ptr + info_size) <= (uintptr_t)end_ptr); /* Check EventSize */ assert(event_size == (sizeof(id_event_struct_t) + digest_len + info_size)); if (info_size != 0U) { LOG_EVENT(" VendorInfo :"); for (i = 0U; i < info_size; ++i) { (void)printf(" %02x", *info_size_ptr++); } (void)printf("\n"); } *log_size -= (uintptr_t)info_size_ptr - (uintptr_t)*log_addr; *log_addr = info_size_ptr; } /* * Print TCG_PCR_EVENT2 * * @param[in/out] log_addr Pointer to Event Log * @param[in/out] log_size Pointer to Event Log size */ static void event2_print(uint8_t **log_addr, size_t *log_size) { uint32_t event_size, count; size_t sha_size, digests_size = 0U; void *ptr = *log_addr; #if ENABLE_ASSERTIONS const uint8_t *end_ptr = (uint8_t *)((uintptr_t)*log_addr + *log_size); #endif assert(*log_size >= sizeof(event2_header_t)); LOG_EVENT("PCR_Event2:\n"); LOG_EVENT(" PCRIndex : %u\n", ((event2_header_t *)ptr)->pcr_index); LOG_EVENT(" EventType : %u\n", ((event2_header_t *)ptr)->event_type); count = ((event2_header_t *)ptr)->digests.count; LOG_EVENT(" Digests Count : %u\n", count); /* Address of TCG_PCR_EVENT2.Digests[] */ ptr = (uint8_t *)ptr + sizeof(event2_header_t); assert(((uintptr_t)ptr <= (uintptr_t)end_ptr) && (count != 0U)); for (unsigned int i = 0U; i < count; ++i) { /* Check AlgorithmId address */ assert(((uintptr_t)ptr + offsetof(tpmt_ha, digest)) <= (uintptr_t)end_ptr); LOG_EVENT(" #%u AlgorithmId : SHA", i); switch (((tpmt_ha *)ptr)->algorithm_id) { case TPM_ALG_SHA256: sha_size = SHA256_DIGEST_SIZE; (void)printf("256\n"); break; case TPM_ALG_SHA384: sha_size = SHA384_DIGEST_SIZE; (void)printf("384\n"); break; case TPM_ALG_SHA512: sha_size = SHA512_DIGEST_SIZE; (void)printf("512\n"); break; default: (void)printf("?\n"); ERROR("Algorithm 0x%x not found\n", ((tpmt_ha *)ptr)->algorithm_id); panic(); } /* End of Digest[] */ ptr = (uint8_t *)((uintptr_t)ptr + offsetof(tpmt_ha, digest)); assert(((uintptr_t)ptr + sha_size) <= (uintptr_t)end_ptr); /* Total size of all digests */ digests_size += sha_size; LOG_EVENT(" Digest :"); for (unsigned int j = 0U; j < sha_size; ++j) { (void)printf(" %02x", *(uint8_t *)ptr++); if ((j & U(0xF)) == U(0xF)) { (void)printf("\n"); if (j < (sha_size - 1U)) { LOG_EVENT("\t\t :"); } } } } /* TCG_PCR_EVENT2.EventSize */ assert(((uintptr_t)ptr + offsetof(event2_data_t, event)) <= (uintptr_t)end_ptr); event_size = ((event2_data_t *)ptr)->event_size; LOG_EVENT(" EventSize : %u\n", event_size); /* Address of TCG_PCR_EVENT2.Event[EventSize] */ ptr = (uint8_t *)((uintptr_t)ptr + offsetof(event2_data_t, event)); /* End of TCG_PCR_EVENT2.Event[EventSize] */ assert(((uintptr_t)ptr + event_size) <= (uintptr_t)end_ptr); if ((event_size == sizeof(startup_locality_event_t)) && (strcmp((const char *)ptr, TCG_STARTUP_LOCALITY_SIGNATURE) == 0)) { LOG_EVENT(" Signature : %s\n", ((startup_locality_event_t *)ptr)->signature); LOG_EVENT(" StartupLocality : %u\n", ((startup_locality_event_t *)ptr)->startup_locality); } else { LOG_EVENT(" Event : %s\n", (uint8_t *)ptr); } *log_size -= (uintptr_t)ptr + event_size - (uintptr_t)*log_addr; *log_addr = (uint8_t *)ptr + event_size; } #endif /* LOG_LEVEL >= EVENT_LOG_LEVEL */ /* * Print Event Log * * @param[in] log_addr Pointer to Event Log * @param[in] log_size Event Log size */ void dump_event_log(uint8_t *log_addr, size_t log_size) { #if LOG_LEVEL >= EVENT_LOG_LEVEL assert(log_addr != NULL); /* Print TCG_EfiSpecIDEvent */ id_event_print(&log_addr, &log_size); while (log_size != 0U) { event2_print(&log_addr, &log_size); } #endif }
27.827068
81
0.654688
c41fe7bfd7e4d4b53a32e494ba01a130aff54d47
2,144
h
C
Base/BinaryReader.h
ttay24/HiveWE
d323968ab732424188217349b5feadd3906f9c1f
[ "MIT" ]
null
null
null
Base/BinaryReader.h
ttay24/HiveWE
d323968ab732424188217349b5feadd3906f9c1f
[ "MIT" ]
1
2019-11-17T01:12:50.000Z
2019-11-17T01:12:50.000Z
Base/BinaryReader.h
ttay24/HiveWE
d323968ab732424188217349b5feadd3906f9c1f
[ "MIT" ]
null
null
null
#pragma once #include <stdexcept> #include <vector> #include <string> #include <filesystem> namespace fs = std::filesystem; class BinaryReader { public: std::vector<uint8_t> buffer; unsigned long long int position = 0; explicit BinaryReader(std::vector<uint8_t> buffer) : buffer(buffer) {} template<typename T> T read() { // These wouldn't make sense static_assert(std::is_same<T, std::string>() == false); static_assert(std::is_same<T, fs::path>() == false); if (position + sizeof(T) > buffer.size()) { throw std::out_of_range("Trying to read out of range of buffer"); } T result = *reinterpret_cast<T*>(&buffer[position]); position += sizeof(T); return result; } std::string read_string(const size_t size) { if (position + size > buffer.size()) { throw std::out_of_range("Trying to read out of range of buffer"); } std::string result = { reinterpret_cast<char*>(&buffer[position]), static_cast<size_t>(size) }; if (const size_t pos = result.find_first_of('\0', 0); pos != std::string::npos) { result.resize(pos); } position += size; return result; } std::string read_c_string() { std::string string(reinterpret_cast<char*>(buffer.data() + position)); position += string.size() + 1; if (position > buffer.size()) { throw std::out_of_range("Trying to read out of range of buffer"); } return string; } template<typename T> std::vector<T> read_vector(const size_t size) { // These wouldn't make sense static_assert(std::is_same<T, std::string>() == false); static_assert(std::is_same<T, fs::path>() == false); if (position + sizeof(T) * size > buffer.size()) { throw std::out_of_range("Trying to read out of range of buffer"); } std::vector<T> result(reinterpret_cast<T*>(&buffer[position]), reinterpret_cast<T*>(&buffer[position]) + size); position += sizeof(T) * size; return result; } long long remaining() const { return buffer.size() - position; } void advance(const size_t amount) { if (position + amount > buffer.size()) { throw std::out_of_range("Trying to advance past the end of the buffer"); } position += amount; } };
26.8
113
0.669776
c457fa088238645decd48686f2f5c08b9b478fcd
313
c
C
Linux/14math/sin.c
ggwhsd/CPPStudy
0a8d9ebdb4e85304ede633b5a9020268b5d726e6
[ "Apache-2.0" ]
3
2018-12-06T06:53:20.000Z
2019-01-12T03:04:02.000Z
Linux/14math/sin.c
ggwhsd/CPPStudy
0a8d9ebdb4e85304ede633b5a9020268b5d726e6
[ "Apache-2.0" ]
null
null
null
Linux/14math/sin.c
ggwhsd/CPPStudy
0a8d9ebdb4e85304ede633b5a9020268b5d726e6
[ "Apache-2.0" ]
1
2020-07-29T09:01:45.000Z
2020-07-29T09:01:45.000Z
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <time.h> int main() { double a,b; printf("请输入自变量:"); scanf("%lf",&a); b=sin(a); printf("sin(%lf)=%lf\n",a,b); srand((unsigned)time(0)); int test = 0; test = rand()%100 + 1; printf("rand is %d\n",test); return 0; }
14.904762
32
0.543131
c47844b659f0a757df2592e4e674a34046097a6b
85
h
C
Examples/TestReflectionModule.h
JoinCAD/CPP-Reflection
61163369b6b3b370c4ce726dbf8e60e441723821
[ "MIT" ]
540
2015-09-18T09:44:57.000Z
2022-03-25T07:23:09.000Z
Examples/TestReflectionModule.h
yangzhengxing/CPP-Reflection
43ec755b7a5c62e3252c174815c2e44727e11e72
[ "MIT" ]
16
2015-09-23T06:37:43.000Z
2020-04-10T15:40:08.000Z
Examples/TestReflectionModule.h
yangzhengxing/CPP-Reflection
43ec755b7a5c62e3252c174815c2e44727e11e72
[ "MIT" ]
88
2015-09-21T15:12:32.000Z
2021-11-30T14:07:34.000Z
#pragma once #include <ReflectionModule.h> DECLARE_REFLECTION_MODULE( TestModule );
17
40
0.811765
3a0ceb849c068363d8357b724a3edc5fd7e57aec
2,177
h
C
client/include/game/CLoadingScreen.h
MayconFelipeA/sampvoiceatt
3fae8a2cf37dfad2e3925d56aebfbbcd4162b0ff
[ "MIT" ]
368
2015-01-01T21:42:00.000Z
2022-03-29T06:22:22.000Z
client/include/game/CLoadingScreen.h
MayconFelipeA/sampvoiceatt
3fae8a2cf37dfad2e3925d56aebfbbcd4162b0ff
[ "MIT" ]
92
2019-01-23T23:02:31.000Z
2022-03-23T19:59:40.000Z
client/include/game/CLoadingScreen.h
MayconFelipeA/sampvoiceatt
3fae8a2cf37dfad2e3925d56aebfbbcd4162b0ff
[ "MIT" ]
179
2015-02-03T23:41:17.000Z
2022-03-26T08:27:16.000Z
/* Plugin-SDK (Grand Theft Auto San Andreas) header file Authors: GTA Community. See more here https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ #pragma once #include "PluginBase.h" #include "CSprite2d.h" class PLUGIN_API CLoadingScreen { public: static int &m_currDisplayedSplash; // 0x8D093C static int &m_numChunksLoaded; // 0x8D0940 static int &m_chunkBarAppeared; // 0x8D0944 static char *m_PopUpMessage; // m_PopUpMessage[16] static char *m_LoadingGxtMsg2; // m_LoadingGxtMsg2[80] static char *m_LoadingGxtMsg1; // m_LoadingGxtMsg1[80] static bool &m_bActive; // 0xBAB318 static bool &m_bPaused; // 0xBAB319 static bool &m_bWantToPause; // 0xBAB31A static bool &m_bFading; // 0xBAB31C static bool &m_bLegalScreen; // 0xBAB31D static bool &m_bFadeInNextSplashFromBlack; // 0xBAB31E static bool &m_bFadeOutCurrSplashToBlack; // 0xBAB31F static char &m_FadeAlpha; // 0xBAB320 static float &m_StartFadeTime; // 0xBAB324 static float &m_ClockTimeOnPause; // 0xBAB328 static float &m_PauseTime; // 0xBAB32C static bool &m_bReadyToDelete; // 0xBAB33D static float &m_timeSinceLastScreen; // 0xBAB340 static CSprite2d *m_aSplashes; // CSprite2d CLoadingScreen::m_aSplashes[7] 0xBAB35C // funcs static void Shutdown(); static void RenderSplash(); static void LoadSplashes(unsigned char bStarting, unsigned char bNvidia); static void DisplayMessage(char const* message); static void SetLoadingBarMsg(char const* msg1, char const* msg2); static double GetClockTime(bool bIgnorePauseTime); static void Init(bool unusedflag, bool bLoaded); static void Continue(); static void RenderLoadingBar(); static void DisplayNextSplash(); static void StartFading(); static void DisplayPCScreen(); static void Update(); static void DoPCTitleFadeOut(); static void DoPCTitleFadeIn(); static void DoPCScreenChange(unsigned int bFinish); static void NewChunkLoaded(); };
37.534483
97
0.691318
5beea16e835387f9f28b3b6c936c4af823a6e3c9
2,269
c
C
examples/omp/m4ri/tests/test_random.c
byu-vv-lab/civl
f599229ff4830acc75c33149611c65ff4052d516
[ "BSD-3-Clause" ]
null
null
null
examples/omp/m4ri/tests/test_random.c
byu-vv-lab/civl
f599229ff4830acc75c33149611c65ff4052d516
[ "BSD-3-Clause" ]
null
null
null
examples/omp/m4ri/tests/test_random.c
byu-vv-lab/civl
f599229ff4830acc75c33149611c65ff4052d516
[ "BSD-3-Clause" ]
null
null
null
/* * test_random.c * * Application to test functionality of mzd_randomize (and mzd_equal). * In particular if these function correctly for windowed matrices. * * Copyright (C) 2011 Carlo Wood <carlo@alinoe.com> * RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt * Fingerprint16 = 32 EC A7 B6 AC DB 65 A6 F6 F6 55 DD 1C DC FF 61 * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include <m4ri/config.h> #include <stdio.h> #include <stdlib.h> #include <m4ri/m4ri.h> int test_random(rci_t m, rci_t n) { mzd_t *A = mzd_init(m + 3, n + 64); mzd_t *W = mzd_init_window(A, 1, 0, m + 1, n); mzd_t *M = mzd_init(m, n); printf("randomize m: %4d, n: %4d ", m, n); srandom(17); mzd_randomize(M); srandom(17); mzd_randomize(W); int failure = !mzd_equal(M, W); if (failure) { #if 1 printf("FAILED\n"); #else printf("FAILURE: M != W:\n"); printf("M %dx%d:\n", m, n); mzd_print(M); printf("W %dx%d:\n", m, n); mzd_print(W); #endif } else printf("passed\n"); mzd_free(M); mzd_free(A); return failure; } int main() { int status = 0; srandom(17); for (rci_t n = 0; n < 3 * m4ri_radix; n += m4ri_radix) { status += test_random(20, n + 1); status += test_random(20, n + 2); status += test_random(20, n + 32); status += test_random(20, n + 50); status += test_random(20, n + 51); status += test_random(20, n + 52); status += test_random(20, n + 63); status += test_random(20, n + 64); status += test_random(20, n + 65); } if (!status) { printf("All tests passed.\n"); } else { printf("TEST FAILED!\n"); return 1; } return 0; }
26.08046
72
0.630234
75c0423a23cd5f365569fc90c2d9cbc2c3a0d505
1,852
h
C
System/Library/PrivateFrameworks/Home.framework/HFAccessorySettingDefaultAdapterCollection.h
lechium/iPhoneOS_12.1.1_Headers
aac688b174273dfcbade13bab104461f463db772
[ "MIT" ]
12
2019-06-02T02:42:41.000Z
2021-04-13T07:22:20.000Z
System/Library/PrivateFrameworks/Home.framework/HFAccessorySettingDefaultAdapterCollection.h
lechium/iPhoneOS_12.1.1_Headers
aac688b174273dfcbade13bab104461f463db772
[ "MIT" ]
null
null
null
System/Library/PrivateFrameworks/Home.framework/HFAccessorySettingDefaultAdapterCollection.h
lechium/iPhoneOS_12.1.1_Headers
aac688b174273dfcbade13bab104461f463db772
[ "MIT" ]
3
2019-06-11T02:46:10.000Z
2019-12-21T14:58:16.000Z
/* * This header is generated by classdump-dyld 1.0 * on Saturday, June 1, 2019 at 6:48:26 PM Mountain Standard Time * Operating System: Version 12.1.1 (Build 16C5050a) * Image Source: /System/Library/PrivateFrameworks/Home.framework/Home * classdump-dyld is licensed under GPLv3, Copyright © 2013-2016 by Elias Limneos. */ @class HFAccessorySettingManagedConfigurationAdapter, HFAccessorySettingAdapter, HFAccessorySettingSiriLanguageAdapter, NSSet; @interface HFAccessorySettingDefaultAdapterCollection : NSObject { HFAccessorySettingManagedConfigurationAdapter* _managedConfigurationAdapter; HFAccessorySettingAdapter* _mobileTimerAdapter; HFAccessorySettingSiriLanguageAdapter* _siriLanguageAdapter; } @property (nonatomic,retain) HFAccessorySettingManagedConfigurationAdapter * managedConfigurationAdapter; //@synthesize managedConfigurationAdapter=_managedConfigurationAdapter - In the implementation block @property (nonatomic,retain) HFAccessorySettingAdapter * mobileTimerAdapter; //@synthesize mobileTimerAdapter=_mobileTimerAdapter - In the implementation block @property (nonatomic,retain) HFAccessorySettingSiriLanguageAdapter * siriLanguageAdapter; //@synthesize siriLanguageAdapter=_siriLanguageAdapter - In the implementation block @property (nonatomic,readonly) NSSet * allAdapters; -(HFAccessorySettingManagedConfigurationAdapter *)managedConfigurationAdapter; -(HFAccessorySettingSiriLanguageAdapter *)siriLanguageAdapter; -(NSSet *)allAdapters; -(void)setManagedConfigurationAdapter:(HFAccessorySettingManagedConfigurationAdapter *)arg1 ; -(void)setMobileTimerAdapter:(HFAccessorySettingAdapter *)arg1 ; -(void)setSiriLanguageAdapter:(HFAccessorySettingSiriLanguageAdapter *)arg1 ; -(HFAccessorySettingAdapter *)mobileTimerAdapter; @end
56.121212
219
0.812635
591884460dc98e8384fddcc3c0cd9935da30830e
1,364
h
C
SmartDeviceLink/public/SDLEncryptionConfiguration.h
codelynx/sdl_ios
90317e17d408426547b4afed91620bc695a3279c
[ "BSD-3-Clause" ]
171
2015-01-13T14:17:29.000Z
2022-03-18T19:55:24.000Z
SmartDeviceLink/public/SDLEncryptionConfiguration.h
codelynx/sdl_ios
90317e17d408426547b4afed91620bc695a3279c
[ "BSD-3-Clause" ]
1,524
2015-01-16T14:31:10.000Z
2022-03-30T14:37:02.000Z
SmartDeviceLink/public/SDLEncryptionConfiguration.h
codelynx/sdl_ios
90317e17d408426547b4afed91620bc695a3279c
[ "BSD-3-Clause" ]
129
2015-01-15T19:27:18.000Z
2021-11-26T01:49:12.000Z
// // SDLEncryptionConfiguration.h // SmartDeviceLink // // Created by standa1 on 6/17/19. // Copyright © 2019 smartdevicelink. All rights reserved. // #import <Foundation/Foundation.h> #import "SDLServiceEncryptionDelegate.h" @protocol SDLSecurityType; NS_ASSUME_NONNULL_BEGIN /// The encryption configuration data @interface SDLEncryptionConfiguration : NSObject <NSCopying> /** * A set of security managers used to encrypt traffic data. Each OEM has their own proprietary security manager. */ @property (copy, nonatomic, nullable) NSArray<Class<SDLSecurityType>> *securityManagers; /** * A delegate callback that will tell you when an acknowledgement has occurred for starting as secure service. */ @property (weak, nonatomic, nullable) id<SDLServiceEncryptionDelegate> delegate; /** * Creates a default encryption configuration. * * @return A default configuration that may be customized. */ + (instancetype)defaultConfiguration; /** Creates a secure configuration for each of the security managers provided. @param securityManagers The security managers to be used. @param delegate The delegate callback. @return The configuration */ - (instancetype)initWithSecurityManagers:(nullable NSArray<Class<SDLSecurityType>> *)securityManagers delegate:(nullable id<SDLServiceEncryptionDelegate>)delegate; @end NS_ASSUME_NONNULL_END
27.836735
163
0.780792
8a19403b6de70ad393a6ecb13310dd8881982b2e
326
h
C
7/7.2/Sales_data.h
kousikpramanik/C-_Primer_5th
e21fb665f04b26193fc13f9c2c263b782aea3f3c
[ "MIT" ]
null
null
null
7/7.2/Sales_data.h
kousikpramanik/C-_Primer_5th
e21fb665f04b26193fc13f9c2c263b782aea3f3c
[ "MIT" ]
2
2020-08-15T17:33:00.000Z
2021-07-05T14:18:26.000Z
7/7.2/Sales_data.h
kousikpramanik/C-_Primer_5th
e21fb665f04b26193fc13f9c2c263b782aea3f3c
[ "MIT" ]
1
2020-08-15T17:24:54.000Z
2020-08-15T17:24:54.000Z
#ifndef C_PRIMER_5TH_SALES_DATA_H #define C_PRIMER_5TH_SALES_DATA_H #include <string> struct Sales_data { std::string isbn() const { return bookNo; } Sales_data &combine(const Sales_data &other); std::string bookNo; unsigned units_sold = 0; double revenue = 0.0; }; #endif //C_PRIMER_5TH_SALES_DATA_H
19.176471
49
0.726994
0e438bb8d634aeb218e4eb3940525bf5200699be
3,589
h
C
mod_mqtt.h
devcon2012/mod_mqtt
88c38dcad8caa984d02c96657615dba0b08478e7
[ "Apache-2.0" ]
null
null
null
mod_mqtt.h
devcon2012/mod_mqtt
88c38dcad8caa984d02c96657615dba0b08478e7
[ "Apache-2.0" ]
null
null
null
mod_mqtt.h
devcon2012/mod_mqtt
88c38dcad8caa984d02c96657615dba0b08478e7
[ "Apache-2.0" ]
1
2021-10-29T23:25:42.000Z
2021-10-29T23:25:42.000Z
/* * mod_mqtt : map http requests to mqtt * * Klaus Ramstöck * */ #ifndef _MOD_MQTT_H #define _MOD_MQTT_H #include "apr.h" #include "apr_tables.h" #include "ap_config.h" #include "ap_provider.h" #include "httpd.h" #include "http_core.h" #include "http_config.h" #include "http_log.h" #include "http_protocol.h" #include "http_request.h" #include "keyValuePair.h" /* ============================================================================== Our configuration prototype and declaration: ============================================================================== */ typedef enum _Methods { ALLMethods = 0, GETMethod = 1, POSTMethod = 2, INVALIDMethod = 128 } Methods; typedef enum _Encodings { ALLEncodings = 0, URLEncoding = 1, MultiPartEncoding = 2, INVALIDEncoding = 128 } Encodings; /* Allow max 20 vars in MQTTVariables */ #define MQTT_MAX_VARS 20 typedef struct { char context[256]; int enabled; /* Enable or disable our module */ const char *mqtt_server; /* MQTT Server spec */ int mqtt_port; /* MQTT Server port */ const char * mqtt_pubtopic; /* MQTT Server publish topic for query */ const char * mqtt_subtopic; /* MQTT Server subscribe topic for answer */ apr_table_t * mqtt_var_table; /* MQTT variables send , eg "MQTTVariables Id Name Action" */ apr_table_t * mqtt_var_re_table; /* MQTT variables check regexpressions, 'MQTTCheckVariable Action ^submit|receive$' */ Methods methods; /* Methods serviced (GET POST ALL) eg MQTTMethods ALL */ Encodings encodings; /* Allowed enctypes for post: application/x-www-form-urlencoded, multipart/form-data, ALL */ } mqtt_config; /* Handler for the "MQTTEnabled" directive */ const char *mqtt_set_enabled(cmd_parms *cmd, void *cfg, const char *arg); /* Handler for the "MQTTServer" directive */ const char *mqtt_set_server(cmd_parms *cmd, void *cfg, const char *arg); /* Handler for the "MQTTPubTopic" directive */ const char *mqtt_set_pubtopic(cmd_parms *cmd, void *cfg, const char *arg); /* Handler for the "MQTTSubTopic" directive */ const char *mqtt_set_subtopic(cmd_parms *cmd, void *cfg, const char *arg); /* Handler for the "MQTTPort" directive */ const char *mqtt_set_port(cmd_parms *cmd, void *cfg, const char *arg); /* Handler for the "MQTTVariables" directive */ const char *mqtt_set_variables(cmd_parms *cmd, void *cfg, const char *arg); /* Handler for the "MQTTCheckVariable" directive */ const char *mqtt_set_variable_checks(cmd_parms *cmd, void *cfg, const char *arg1, const char *arg2); /* Handler for the "MQTTMethods" directive */ const char *mqtt_set_methods(cmd_parms *cmd, void *cfg, const char *arg); /* Handler for the "MQTTEnctype" directive */ const char *mqtt_set_encodings(cmd_parms *cmd, void *cfg, const char *arg); /* acessors for variaous global objects */ apr_pool_t *mqtt_get_pool(); apr_pool_t *mqtt_set_pool(apr_pool_t *p); int mqtt_handler(request_rec *r); void mqtt_register_hooks(apr_pool_t *pool); void *create_dir_conf(apr_pool_t *pool, char *context); void *merge_dir_conf(apr_pool_t *pool, void *BASE, void *ADD); /* */ int assert_variables(mqtt_config *config, keyValuePair * formdata); /* ============================================================================== The directive structure for our name tag: ============================================================================== */ extern const command_rec mqtt_directives[]; #endif
32.627273
132
0.63416
07b242f7690c352dc1bbb9a4a7189bd7ad455e83
3,288
h
C
Archived/v1/WCDistractionFreeXcodePlugin/Headers/PlugIns/IDEInterfaceBuilderKit/NSView-IBViewAdditions.h
wokalski/Distraction-Free-Xcode-plugin
54ab4b9d9825e8370855b7985d6ff39d64c19f25
[ "MIT" ]
25
2016-03-03T07:43:56.000Z
2021-09-05T08:47:40.000Z
Archived/v1/WCDistractionFreeXcodePlugin/Headers/PlugIns/IDEInterfaceBuilderKit/NSView-IBViewAdditions.h
wokalski/Distraction-Free-Xcode-plugin
54ab4b9d9825e8370855b7985d6ff39d64c19f25
[ "MIT" ]
8
2016-02-23T18:40:20.000Z
2016-08-18T13:21:05.000Z
Archived/v1/WCDistractionFreeXcodePlugin/Headers/PlugIns/IDEInterfaceBuilderKit/NSView-IBViewAdditions.h
wokalski/Distraction-Free-Xcode-plugin
54ab4b9d9825e8370855b7985d6ff39d64c19f25
[ "MIT" ]
4
2016-02-24T13:24:27.000Z
2016-06-28T12:50:36.000Z
// // 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 NSView (IBViewAdditions) + (id)ib_viewWithSize:(struct CGSize)arg1; - (void)ib_removeFromSuperviewMakingAncestorFirstResponderIfNeeded; - (void)ib_setSubviewsMakingAncestorFirstResponderIfNeeded:(id)arg1; - (id)ib_layoutDescription; - (void)ib_centerWithIntegralOriginInRect:(struct CGRect)arg1; - (id)ib_constraintsForMakingFlushWithSuperview; - (BOOL)isMouse:(struct CGPoint)arg1 inRect:(struct CGRect)arg2; - (id)firstAncestorPassingTest:(CDUnknownBlockType)arg1; - (void)scrollRectToVisible:(struct CGRect)arg1 animatingSynchronously:(BOOL)arg2 duration:(double)arg3; - (void)scrollRectToVisible:(struct CGRect)arg1 animatingSynchronously:(BOOL)arg2; - (struct CGRect)rectToScrollRectToVisible:(struct CGRect)arg1 keepingRectVisible:(struct CGRect)arg2; - (CDStruct_f6143a38)convertLine:(CDStruct_f6143a38)arg1 fromView:(id)arg2; - (CDStruct_f6143a38)convertLine:(CDStruct_f6143a38)arg1 toView:(id)arg2; - (long long)convertKnobPosition:(long long)arg1 fromView:(id)arg2; - (long long)convertKnobPosition:(long long)arg1 toView:(id)arg2; - (unsigned long long)convertRectEdge:(unsigned long long)arg1 fromView:(id)arg2; - (unsigned long long)convertRectEdge:(unsigned long long)arg1 toView:(id)arg2; - (id)transformForConvertingPointsFromView:(id)arg1; - (id)transformForConvertingPointsToView:(id)arg1; - (id)transformForConvertingToAncestor:(id)arg1; - (struct CGRect)visibleBoundsIgnoringHiddenAncestors; - (struct CGPoint)convertPointFromScreen:(struct CGPoint)arg1; - (struct CGPoint)convertPointToScreen:(struct CGPoint)arg1; - (struct CGSize)convertSizeToScreen:(struct CGSize)arg1; - (struct CGSize)convertSizeFromScreen:(struct CGSize)arg1; - (struct CGRect)convertRectFromScreen:(struct CGRect)arg1; - (struct CGRect)convertRectToScreen:(struct CGRect)arg1; - (struct CGSize)convertOffsetFromWindow:(struct CGSize)arg1; - (struct CGSize)convertOffsetToWindow:(struct CGSize)arg1; - (struct CGSize)convertSizeFromWindow:(struct CGSize)arg1; - (struct CGSize)convertSizeToWindow:(struct CGSize)arg1; - (struct CGPoint)convertPointFromWindow:(struct CGPoint)arg1; - (struct CGPoint)convertPointToWindow:(struct CGPoint)arg1; - (struct CGRect)convertRectFromWindow:(struct CGRect)arg1; - (struct CGRect)convertRectToWindow:(struct CGRect)arg1; - (CDStruct_c519178c)convertInsetFromWindow:(CDStruct_c519178c)arg1; - (CDStruct_c519178c)convertInsetToWindow:(CDStruct_c519178c)arg1; - (CDStruct_c519178c)convertInset:(CDStruct_c519178c)arg1 fromView:(id)arg2; - (CDStruct_c519178c)convertInset:(CDStruct_c519178c)arg1 toView:(id)arg2; - (struct CGRect)boundsClippedToAncestor:(id)arg1 convertedToView:(id)arg2; - (struct CGRect)boundsClippedToAncestorsConvertedToView:(id)arg1; - (struct CGRect)boundsClippedToAncestorsConvertedToWindow; - (void)makeRectVisible:(struct CGRect)arg1 ofView:(id)arg2; - (void)makeRectVisible:(struct CGRect)arg1; - (void)insertSubview:(id)arg1 atIndex:(long long)arg2; - (void)foreachRectBeingDrawn:(CDUnknownBlockType)arg1; - (BOOL)isVisible; - (void)invokeWithTemporarySuperview:(id)arg1 block:(CDUnknownBlockType)arg2; - (BOOL)ib_isLayerBackedOrHasLayerBackedDescendant; @end
53.901639
104
0.81326
6debe24a2fb64612ef9ff5d2af51368a63e06ddd
2,180
h
C
boinc/api/graphics2.h
tomasbrod/tbboinc
c125cc355b2dc9a1e536b5e5ded028d4e7f4613a
[ "MIT" ]
null
null
null
boinc/api/graphics2.h
tomasbrod/tbboinc
c125cc355b2dc9a1e536b5e5ded028d4e7f4613a
[ "MIT" ]
4
2020-09-07T15:54:45.000Z
2020-09-27T16:47:16.000Z
boinc_new/api/graphics2.h
tomasbrod/tbboinc
c125cc355b2dc9a1e536b5e5ded028d4e7f4613a
[ "MIT" ]
null
null
null
// This file is part of BOINC. // http://boinc.berkeley.edu // Copyright (C) 2008 University of California // // BOINC is free software; you can redistribute it and/or modify it // under the terms of the GNU Lesser General Public License // as published by the Free Software Foundation, // either version 3 of the License, or (at your option) any later version. // // BOINC is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. // See the GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with BOINC. If not, see <http://www.gnu.org/licenses/>. #ifndef BOINC_GRAPHICS2_H #define BOINC_GRAPHICS2_H struct BOINC_STATUS; // Functions that must be supplied by the app // extern void app_graphics_render(int xs, int ys, double time_of_day); extern void app_graphics_init(void); extern void app_graphics_resize(int width, int height); extern void boinc_app_mouse_button(int x, int y, int which, int is_down); extern void boinc_app_mouse_move(int x, int y, int left, int middle, int right); extern void boinc_app_key_press(int, int); extern void boinc_app_key_release(int, int); // Functions that the app can call // extern void boinc_graphics_loop(int argc, char** argv, const char* title=0); extern void boinc_set_windows_icon(const char* icon16,const char* icon48); extern void boinc_close_window_and_quit(const char*); // functions for communication between main app and graphics app // extern void* boinc_graphics_make_shmem(const char*, int); extern void* boinc_graphics_get_shmem(const char*); extern int boinc_write_graphics_status( double cpu_time, double elapsed_time, double fraction_done ); extern int boinc_parse_graphics_status( double* update_time, double* cpu_time, double* elapsed_time, double* fraction_done, BOINC_STATUS* status ); // Implementation stuff // extern double boinc_max_fps; extern double boinc_max_gfx_cpu_frac; extern void get_window_title(char* buf, int len); extern bool throttled_app_render(int, int, double); #endif
36.333333
80
0.777982
ed3d40e6b3c81df2f7790ddc333813320c98bbb3
18,330
h
C
third-party/massivethreads/massivethreads-src/src/myth_worker_func.h
vasslitvinov/chapel
53feadfc838e7f36ef863b1cd8cd5200d2d92ec8
[ "ECL-2.0", "Apache-2.0" ]
3
2019-03-23T02:57:15.000Z
2019-03-23T02:57:22.000Z
third-party/massivethreads/massivethreads-src/src/myth_worker_func.h
vasslitvinov/chapel
53feadfc838e7f36ef863b1cd8cd5200d2d92ec8
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
third-party/massivethreads/massivethreads-src/src/myth_worker_func.h
vasslitvinov/chapel
53feadfc838e7f36ef863b1cd8cd5200d2d92ec8
[ "ECL-2.0", "Apache-2.0" ]
1
2020-04-03T09:33:12.000Z
2020-04-03T09:33:12.000Z
/* * myth_worker_func.h */ #pragma once #ifndef MYTH_WORKER_FUNC_H #define MYTH_WORKER_FUNC_H #include <signal.h> #include <sys/time.h> #include "myth_config.h" #include "myth_init.h" #include "myth_misc.h" #include "myth_worker.h" #include "myth_sched.h" #include "myth_log.h" #include "myth_io.h" #include "myth_init_func.h" #include "myth_misc_func.h" #include "myth_wsqueue_func.h" #include "myth_sched_func.h" #include "myth_log_func.h" #include "myth_io_func.h" #if MYTH_ECO_MODE #include "myth_eco.h" #endif static void myth_sched_loop(void); //TLS implementations #if WENV_IMPL == WENV_IMPL_PTHREAD //TLS by pthread_key_XXX extern pthread_key_t g_env_key; static void myth_env_init(void) { real_pthread_key_create(&g_env_key, NULL); } static void myth_env_fini(void) { real_pthread_key_delete(g_env_key); } static void myth_set_current_env(myth_running_env_t e) { real_pthread_setspecific(g_env_key, (void*)e); } //Return current worker thread descriptor static inline myth_running_env_t myth_get_current_env(void) { myth_running_env_t env = (myth_running_env_t)real_pthread_getspecific(g_env_key); #if 0 myth_assert(env->tid == syscall(SYS_gettid)); #endif return env; } #elif WENV_IMPL == WENV_IMPL_ELF //Initialize static void myth_env_init(void) { } //Cleanup static void myth_env_fini(void) { } //Set worker thread descriptor static void myth_set_current_env(myth_running_env_t e) { g_worker_rank = e->rank; } //Return current worker thread descriptor static inline myth_running_env_t myth_get_current_env(void) { /* if you hit this, it is likely that you create a native pthread, which calls into a MassiveThreads function that in turn calls this */ myth_assert(0 <= g_worker_rank); myth_assert(g_worker_rank < g_envs_sz); myth_running_env_t env = &g_envs[g_worker_rank]; myth_assert(env->rank == g_worker_rank); #if 0 myth_assert(env->tid == syscall(SYS_gettid)); #endif return env; } #elif WENV_IMPL == WENV_IMPL_NONE //Just a global variable. It works one worker thread only. //Initialize static void myth_env_init(void) { } //Cleanup static void myth_env_fini(void) { } //Set worker thread descriptor static void myth_set_current_env(myth_running_env_t e) { } //Return current worker thread descriptor static inline myth_running_env_t myth_get_current_env(void) { return &g_envs[0]; } #else #error "invalide WENV_IMPL" #endif #if WS_TARGET_RANDOM //Search a worker thread that seems to be busy static inline myth_running_env_t myth_env_get_first_busy(myth_running_env_t e) { //If number of worker threads == 1 , always fails if (g_attr.n_workers == 1) return NULL; //Choose randomly int idx; do { idx = myth_random(0,g_attr.n_workers); } while (idx == e->rank); return &g_envs[idx]; } #else //Search a worker thread that seems to be busy static inline myth_running_env_t myth_env_get_first_busy(myth_running_env_t e) { return e->next; } #endif static inline myth_running_env_t myth_env_get_randomly(void) { //If number of worker threads == 1 , always fails if (g_attr.n_workers == 1) return &g_envs[0]; //Choose randomly int idx; idx = myth_random(0, g_attr.n_workers); return &g_envs[idx]; } void myth_alrm_sighandler(int signum,siginfo_t *sinfo,void* ctx); static void myth_setup_worker(int rank) { pid_t tid; //Get thread ID(for debug) tid = syscall(SYS_gettid); myth_running_env_t env = &g_envs[rank]; env->rank = rank; env->exit_flag = 0; env->tid = tid; memset(&env->prof_data, 0, sizeof(myth_prof_data)); //Initialize allocators myth_flmalloc_init_worker(rank); //myth_malloc_wrapper_init_worker(rank); //Initialize logger myth_log_worker_init(env); myth_set_current_env(env); //Initialize random seed myth_random_init(((unsigned)time(NULL)) + rank); //Initialize runqueue myth_queue_init(&env->runnable_q); myth_queue_clear(&env->runnable_q); //Initialize freelist for thread descriptor #if MYTH_SPLIT_STACK_DESC myth_freelist_init(&env->freelist_desc); myth_freelist_init(&env->freelist_stack); #if (INITIAL_STACK_ALLOC_UNIT>0) { //Allocate int i; size_t th_size = sizeof(myth_thread); size_t alloc_size = th_size*INITIAL_STACK_ALLOC_UNIT; #if ALLOCATE_STACK_BY_MALLOC char * th_ptr = myth_flmalloc(env->rank,alloc_size); #else alloc_size += 4095; alloc_size &= ~(0xFFF); #if defined(MAP_STACK) th_ptr = mmap(NULL,alloc_size,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK,-1,0); #else th_ptr = mmap(NULL,alloc_size,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANONYMOUS,-1,0); #endif #endif for (i = 0; i < INITIAL_STACK_ALLOC_UNIT; i++){ myth_thread_t ret = (myth_thread_t)th_ptr; myth_freelist_push(env->freelist_desc,ret); th_ptr += th_size; } } { //Allocate int i; size_t th_size; size_t alloc_size; char *th_ptr; th_size = g_attr.default_stack_size; alloc_size = th_size * INITIAL_STACK_ALLOC_UNIT; #if ALLOCATE_STACK_BY_MALLOC th_ptr = myth_flmalloc(env->rank,alloc_size); #else alloc_size += 4095; alloc_size &= ~(0xFFF); #if defined(MAP_STACK) th_ptr = mmap(NULL,alloc_size,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK,-1,0); #else th_ptr = mmap(NULL,alloc_size,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANONYMOUS,-1,0); #endif #endif /*th_ptr+=th_size-sizeof(void*); for (i=0;i<INITIAL_STACK_ALLOC_UNIT;i++){ void **ret; ret=(void**)th_ptr; myth_freelist_push(env->freelist_stack,ret); th_ptr+=th_size; }*/ th_ptr += th_size - (sizeof(void*)*2); for (i = 0; i < STACK_ALLOC_UNIT; i++) { void** ret = (void**)th_ptr; uintptr_t * blk_size = (uintptr_t*)(th_ptr + sizeof(void*)); *blk_size = 0; //indicates default myth_freelist_push(env->freelist_stack, ret); th_ptr += th_size; } } #endif #else myth_freelist_init(env->freelist_ds); #endif #if MYTH_WRAP_SOCKIO //Initialize I/O myth_io_worker_init(env,&env->io_struct); #endif //MYTH_WRAP_SOCKIO env->this_thread = NULL; //Wait for other worker threads real_pthread_barrier_wait(&g_worker_barrier); //set signal mask if (env->rank != 0){ sigset_t ss; sigemptyset( &ss ); sigaddset(&ss,SIGALRM); real_pthread_sigmask(SIG_BLOCK,&ss,NULL); } else{ struct sigaction newact; memset(&newact,0,sizeof(newact)); newact.sa_sigaction = myth_alrm_sighandler; newact.sa_flags = SA_SIGINFO|SA_RESTART; sigaction(SIGALRM, &newact, NULL); sigaction(SIGVTALRM, &newact, NULL); //Start interval timer struct itimerval tv; memset(&tv, 0, sizeof(struct itimerval)); tv.it_value.tv_usec = 10000; tv.it_interval.tv_usec = 10000; #if MYTH_USE_ITIMER setitimer(ITIMER_REAL,&tv,NULL); #endif } } //Cleanup a worker thread static inline void myth_cleanup_worker(int rank) { #if MYTH_ECO_MODE if (g_eco_mode_enabled){ myth_wakeup_all(); g_envs[rank].c = EXITED; } #endif //synchronize real_pthread_barrier_wait(&g_worker_barrier); myth_running_env_t env; env=myth_get_current_env(); //cleanup timer if (rank==0){ //Stop interval timer struct itimerval tv; memset(&tv,0,sizeof(struct itimerval)); tv.it_value.tv_usec=0; tv.it_interval.tv_usec=0; setitimer(ITIMER_REAL,&tv,NULL); } //Release scheduler's stack if (env->sched.stack) myth_free_with_size(env->sched.stack,0); #if MYTH_WRAP_SOCKIO //Release I/O myth_io_worker_fini(env,&env->io_struct); #endif //Release runqueue myth_queue_fini(&env->runnable_q); //Release thread descriptor of current thread if (env->this_thread)free_myth_thread_struct_desc(env,env->this_thread); //Found in a freelist-ds //Count freelist entry #if MYTH_FL_PROF int fl_num=0; void **ret; while (1){ myth_freelist_pop(env->freelist_stack,ret); if (!ret)break; fl_num++; } if (fl_num) fprintf(stderr,"Rank : %d freelist stack entry : %d\n",rank,fl_num); #endif //Release allocator myth_flmalloc_fini_worker(rank); //myth_malloc_wrapper_fini_worker(rank); //finalize logger myth_log_worker_fini(env); } //Execute worker thread scheduling loop static inline void myth_worker_start_ex_body(int rank) { myth_setup_worker(rank); myth_running_env_t env; env=myth_get_current_env(); env->sched.stack=NULL; //Call thread scheduler myth_sched_loop(); myth_cleanup_worker(rank); } MYTH_CTX_CALLBACK void myth_startpoint_init_ex_1(void *arg1,void *arg2,void *arg3) { myth_running_env_t env = (myth_running_env_t)arg1; myth_thread_t this_th = (myth_thread_t)arg2; (void)arg3; //Add to runqueue myth_queue_push(&env->runnable_q,this_th); } //Execute worker thread scheduling loop introducing current context as a new thread static inline void myth_startpoint_init_ex_body(int rank) { myth_setup_worker(rank); myth_running_env_t env = myth_get_current_env(); env->exit_flag = -1; myth_thread_t this_th; //Allocate thread descriptor for current thread #if MYTH_SPLIT_STACK_DESC this_th = get_new_myth_thread_struct_desc(env); this_th->stack=NULL; #else this_th = get_new_myth_thread_struct_desc(env); #endif #if MYTH_ENABLE_THREAD_ANNOTATION && MYTH_COLLECT_LOG sprintf(this_th->annotation_str,"%p(main)",this_th); #endif //Set worker thread descrptor this_th->env = env; //Initialize context for scheduler env->sched.stack = myth_malloc(MYTH_SCHED_STACK_SIZE); myth_make_context_voidcall(&env->sched.context, myth_sched_loop, (void*)(((char*)env->sched.stack) + MYTH_SCHED_STACK_SIZE - sizeof(void*)), MYTH_SCHED_STACK_SIZE - sizeof(void*)); //Switch to scheduler myth_swap_context_withcall(&this_th->context, &env->sched.context, myth_startpoint_init_ex_1, env, this_th, NULL); } MYTH_CTX_CALLBACK void myth_startpoint_exit_ex_1(void *arg1,void *arg2,void *arg3) { myth_thread_t th=arg1; intptr_t rank=(intptr_t)arg2; (void)arg3; myth_running_env_t target=&g_envs[rank]; th->env=target; while (!myth_queue_trypass(&target->runnable_q,th)){ target=myth_env_get_randomly(); th->env=target; } } //Tell all the worker threads to terminate //Worker threads initialized by "myth_startpoint_init_ex" is NOT terminated by this function //To terminate them, call "myth_startpoint_exit_ex" from the context that "myth_startpoint_init_ex" called static void myth_notify_workers_exit(void) { int i; for (i = 0; i < g_attr.n_workers; i++){ #if MYTH_ECO_MODE if (g_eco_mode_enabled){ // if (g_envs[i].exit_flag==0){ g_envs[i].exit_flag=1; g_envs[i].c = FINISH; } #else if (0) { } #endif else{ if (g_envs[i].exit_flag == 0) g_envs[i].exit_flag = 1; } } } //Return the context introduced by myth_startpoint_init_ex to the original pthread static inline void myth_startpoint_exit_ex_body(int rank) { //First, make sure that the current thread is running on the initial worker myth_running_env_t env = myth_get_current_env(); #if MYTH_ECO_MODE if (g_eco_mode_enabled){ // Wake up all the workers int i; for(i = 0; i < g_attr.n_workers; i++) g_envs[i].finish_ready=1; while (1){ myth_wakeup_all_force(); for(i = 0; i < g_attr.n_workers; i++) { if (i == env->rank) continue; if (g_envs[i].finish_ready != 2) break; } if (i == g_attr.n_workers) break; } } #endif //If running on a different worker, switch context while (env->rank != rank) { intptr_t rank_ = rank; myth_thread_t th; th = env->this_thread; myth_swap_context_withcall(&th->context, &env->sched.context, myth_startpoint_exit_ex_1, (void*)th, (void*) rank_, NULL); myth_rwbarrier(); //Obtain worker thread descriptor again, because env may be changed env = th->env; } //Set exit flag myth_notify_workers_exit(); //Cleanup myth_cleanup_worker(rank); } //Initialize each worker thread static inline void *myth_worker_thread_fn(void *args) { intptr_t rank = (intptr_t)args; #if 0 char *env; int bind_workers; #if MYTH_BIND_WORKERS bind_workers=1; #else bind_workers=0; #endif env=getenv(ENV_MYTH_BIND_WORKERS); if (env){ bind_workers = atoi(env); } #endif if (g_attr.bind_workers > 0){ //Set affinity cpu_set_t cs = myth_get_worker_cpuset(rank); real_pthread_setaffinity_np(real_pthread_self(), sizeof(cpu_set_t), &cs); } if (rank == 0) { //setup as a main thread myth_startpoint_init_ex_body(rank); } else { //setup as a worker myth_worker_start_ex_body(rank); } return NULL; } extern myth_steal_func_t g_myth_steal_func; static inline myth_thread_t myth_steal_body(void) { myth_thread_t ret; myth_running_env_t target; //Choose a worker thread that seems to be busy target=myth_env_get_randomly(); myth_assert(target); //Try to steal thread ret = myth_queue_take(&target->runnable_q); if (ret){ if (!ret->stack){ //Cannot be stolen because it is main thread while (!myth_queue_trypass(&target->runnable_q,ret)){ //Retry changing the target target = myth_env_get_randomly(); } return NULL; } myth_assert(ret->status == MYTH_STATUS_READY); //Change worker thread descriptor ret->env=NULL; } return ret; } static inline void myth_import_body(myth_thread_t th) { myth_running_env_t e = myth_get_current_env(); th->env=e; myth_queue_push(&e->runnable_q,th); } static inline void myth_ext_import_body(myth_thread_t th) { myth_running_env_t target; do{ target = myth_env_get_randomly(); } while (!myth_queue_trypass(&target->runnable_q,th)); } #if MYTH_ECO_MODE //extern static void myth_eco_sched_loop(myth_running_env_t env); static void myth_eco_sched_loop(myth_running_env_t env) { // printf("%d\n",FINISH); while (1) { //sched_yield(); myth_thread_t next_run; //Get runnable thread next_run = myth_queue_pop(&env->runnable_q); #if MYTH_WRAP_SOCKIO //If there is no runnable thread, check I/O if (!next_run){ next_run = myth_io_polling(env); } #endif //If there is no runnable thread after I/O checking, try work-stealing if (!next_run){ if (env->finish_ready == 0) next_run = myth_eco_steal(env->rank); else{ next_run = g_myth_steal_func(env->rank); env->finish_ready = 2; } } if ( ((intptr_t)next_run) == ((intptr_t)FINISH) ) { //next_run == FINISH if (env->rank != 0) { env->this_thread = NULL; return; } else { while (1) { MAY_BE_UNUSED int temp = 0; int j; for (j = 1; j < g_attr.n_workers; j++) { if (g_envs[j].c != EXITED) { temp = 1; } } // if(temp == 0) return; } } } if (next_run) { //sanity check myth_assert(next_run->status==MYTH_STATUS_READY); env->this_thread = next_run; next_run->env = env; //Switch to runnable thread #if MYTH_SCHED_LOOP_DEBUG myth_dprintf("myth_sched_loop:switching to thread:%p\n",next_run); #endif myth_assert(next_run->status==MYTH_STATUS_READY); myth_swap_context(&env->sched.context, &next_run->context); #if MYTH_SCHED_LOOP_DEBUG myth_dprintf("myth_sched_loop:returned from thread:%p\n",(void*)next_run); #endif env->this_thread = NULL; } //Check exit flag if (env->exit_flag == 1) { if (env->rank == 0) while (1) { int temp = 0; int j; for (j = 1; j < g_attr.n_workers; j++) { if (g_envs[j].c != EXITED) { temp = 1; } } if (temp == 0) return; } env->this_thread = NULL; #if MYTH_SCHED_LOOP_DEBUG myth_dprintf("env %p received exit signal,exiting\n",env); #endif return; } } } #endif //Main loop of scheduler static void myth_sched_loop(void) { MAY_BE_UNUSED uint64_t t0,t1; myth_running_env_t env; t0=0; t1=0; env=myth_get_current_env(); myth_log_add_context_switch(env,NULL); #if MYTH_SCHED_LOOP_DEBUG myth_dprintf("myth_sched_loop:entered main loop\n"); #endif #if MYTH_WS_PROF_DETAIL env->prof_data.ws_attempt_count=myth_malloc(sizeof(uint64_t)*g_attr.n_workers); { int i; for (i = 0; i < g_attr.n_workers; i++) { env->prof_data.ws_attempt_count[i] = 0; } } #endif //get the first thread myth_thread_t first_run=myth_queue_pop(&env->runnable_q); real_pthread_barrier_wait(&g_worker_barrier); if (first_run){ //sanity check myth_assert(first_run->status==MYTH_STATUS_READY); env->this_thread=first_run; first_run->env=env; //Switch to runnable thread myth_assert(first_run->status==MYTH_STATUS_READY); myth_swap_context(&env->sched.context, &first_run->context); } env->this_thread=NULL; #if MYTH_ECO_MODE if (g_eco_mode_enabled){ myth_eco_sched_loop(env); return; } #endif while (1) { //sched_yield(); myth_thread_t next_run; //Get runnable thread next_run=myth_queue_pop(&env->runnable_q); #if MYTH_WRAP_SOCKIO //If there is no runnable thread, check I/O if (!next_run){ next_run=myth_io_polling(env); } #endif //If there is no runnable thread after I/O checking, try work-stealing if (!next_run){ //next_run=myth_steal_from_others(env); next_run=g_myth_steal_func(env->rank); } if (next_run) { //sanity check myth_assert(next_run->status==MYTH_STATUS_READY); env->this_thread=next_run; next_run->env=env; //Switch to runnable thread #if MYTH_SCHED_LOOP_DEBUG myth_dprintf("myth_sched_loop:switching to thread:%p\n",next_run); #endif myth_assert(next_run->status==MYTH_STATUS_READY); myth_swap_context(&env->sched.context, &next_run->context); #if MYTH_SCHED_LOOP_DEBUG myth_dprintf("myth_sched_loop:returned from thread:%p\n",(void*)next_run); #endif env->this_thread=NULL; } #if MYTH_PAUSE else { // TODO: make it portable __asm__ __volatile("pause;"); } #endif //Check exit flag if (env->exit_flag==1){ env->this_thread=NULL; #if MYTH_SCHED_LOOP_DEBUG myth_dprintf("env %p received exit signal,exiting\n",env); #endif return; } } } static inline int myth_get_worker_num_body(void) { myth_ensure_init(); myth_running_env_t e = myth_get_current_env(); return e->rank; } static inline int myth_get_num_workers_body(void) { myth_ensure_init(); return g_attr.n_workers; } #endif
27.115385
106
0.707474
4bf21a8cb8ef5d04f4b8f3c89bf31e472d7d4550
689
c
C
line_sensor_test/main/line_sensor_test.c
saharshleo/Wall-E_v2.1
74c0460bb895b20908a74a29e7709324db7a9aee
[ "MIT" ]
null
null
null
line_sensor_test/main/line_sensor_test.c
saharshleo/Wall-E_v2.1
74c0460bb895b20908a74a29e7709324db7a9aee
[ "MIT" ]
null
null
null
line_sensor_test/main/line_sensor_test.c
saharshleo/Wall-E_v2.1
74c0460bb895b20908a74a29e7709324db7a9aee
[ "MIT" ]
null
null
null
//C Headers #include <stdio.h> #include <math.h> #include <time.h> #include <string.h> #include <stdlib.h> //Components #include "sra18.h" static const char *TAG_SENSOR = "line_sensor_test"; //Declare the the channel array consisting of the ADC channel inputs adc1_channel_t channel[4] = {ADC_CHANNEL_7, ADC_CHANNEL_6, ADC_CHANNEL_0, ADC_CHANNEL_3}; int adc_reading[4]; void sensor_task(void *arg) { while(true) { logD(TAG_SENSOR, "RAW 1: %d\tRAW 2: %d\tRAW 3: %d\tRAW 4: %d", adc_reading[1], adc_reading[2], adc_reading[3], adc_reading[4]); } } void app_main() { /* Basic Function for task creation */ xTaskCreate(&sensor_task, "blink task", 4096, NULL, 1, NULL); }
20.264706
131
0.699565
357bbd1ca23a9ca540ab6089cf22c43530418725
525
c
C
software/multifluids_icferst/libmba3d/time.c
msc-acse/acse-9-independent-research-project-Wade003
cfcba990d52ccf535171cf54c0a91b184db6f276
[ "MIT" ]
2
2020-05-11T02:39:46.000Z
2020-05-11T03:08:38.000Z
software/multifluids_icferst/libmba3d/time.c
msc-acse/acse-9-independent-research-project-Wade003
cfcba990d52ccf535171cf54c0a91b184db6f276
[ "MIT" ]
null
null
null
software/multifluids_icferst/libmba3d/time.c
msc-acse/acse-9-independent-research-project-Wade003
cfcba990d52ccf535171cf54c0a91b184db6f276
[ "MIT" ]
2
2020-05-21T22:50:19.000Z
2020-10-28T17:16:31.000Z
#include "confdefs.h" #include <unistd.h> /* sysconf(_SC_CLK_TCK) */ #include <sys/times.h> /* struct tms, times() */ #define SECS_PER_CLOCK (1./sysconf(_SC_CLK_TCK)) #define seconds F77_FUNC(mba3d_seconds, MBA3d_SECONDS) //void seconds_( double *usecs, double *ssecs ) void seconds( double *usecs ) { struct tms t; clock_t utime; clock_t stime; times(&t); utime = t.tms_utime; stime = t.tms_stime; *usecs = utime * SECS_PER_CLOCK; // *ssecs = stime * SECS_PER_CLOCK; }
20.192308
58
0.64381
815557e9e5aa81d5b87eedf93f072a589cb0f8c5
444
h
C
BKKit/modules/network/NetChecker.h
baboy/BKKit
7bdbcce88d8101e7616ea6d30b53142d361ad210
[ "MIT" ]
null
null
null
BKKit/modules/network/NetChecker.h
baboy/BKKit
7bdbcce88d8101e7616ea6d30b53142d361ad210
[ "MIT" ]
null
null
null
BKKit/modules/network/NetChecker.h
baboy/BKKit
7bdbcce88d8101e7616ea6d30b53142d361ad210
[ "MIT" ]
null
null
null
// // NetChecker.h // ITvie // // Created by Zhang Yinghui on 11-3-30. // Copyright 2011 __MyCompanyName__. All rights reserved. // #import <Foundation/Foundation.h> #define NetworkChangedNotification @"NetworkChanged" @interface NetChecker : NSObject + (int) status; + (BOOL) isAvailable; + (BOOL) isConnectWifi; + (BOOL) isConnect3G; + (NSString *)access; @end @interface MacAddress : NSObject +(NSString *)currentAddress; @end
17.76
58
0.711712
8e7daabf3875aeb06ea609c04780c5afddc3acc0
10,619
h
C
sw/device/lib/testing/test_framework/check.h
msfschaffner/opentitan-bak
de4cb1bb9e7b707a3ca2a6882d83af7ed2aa1ab8
[ "Apache-2.0" ]
null
null
null
sw/device/lib/testing/test_framework/check.h
msfschaffner/opentitan-bak
de4cb1bb9e7b707a3ca2a6882d83af7ed2aa1ab8
[ "Apache-2.0" ]
2
2021-11-01T15:02:37.000Z
2022-01-17T14:34:36.000Z
sw/device/lib/testing/test_framework/check.h
msfschaffner/opentitan-bak
de4cb1bb9e7b707a3ca2a6882d83af7ed2aa1ab8
[ "Apache-2.0" ]
null
null
null
// Copyright lowRISC contributors. // Licensed under the Apache License, Version 2.0, see LICENSE for details. // SPDX-License-Identifier: Apache-2.0 #ifndef OPENTITAN_SW_DEVICE_LIB_TESTING_TEST_FRAMEWORK_CHECK_H_ #define OPENTITAN_SW_DEVICE_LIB_TESTING_TEST_FRAMEWORK_CHECK_H_ #include <stdbool.h> #include "sw/device/lib/base/macros.h" #include "sw/device/lib/base/memory.h" #include "sw/device/lib/dif/dif_base.h" #include "sw/device/lib/runtime/hart.h" #include "sw/device/lib/runtime/log.h" #include "sw/device/lib/testing/test_framework/status.h" /** * Runtime assertion macros with log.h integration. */ #ifdef __cplusplus #error "This file is C-only; it is not a polyglot header!" #endif /** * Checks that the given condition is true. If the condition is false, this * function logs and then aborts. * * @param condition An expression to check. * @param ... Arguments to a LOG_* macro, which are evaluated if the check * fails. */ #define CHECK(condition, ...) \ do { \ if (!(condition)) { \ /* NOTE: because the condition in this if \ statement can be statically determined, \ only one of the below string constants \ will be included in the final binary.*/ \ if (OT_VA_ARGS_COUNT(_, ##__VA_ARGS__) == 0) { \ LOG_ERROR("CHECK-fail: " #condition); \ } else { \ LOG_ERROR("CHECK-fail: " __VA_ARGS__); \ } \ /* Currently, this macro will call into \ the test failure code, which logs \ "FAIL" and aborts. In the future, \ we will try to condition on whether \ or not this is a test.*/ \ test_status_set(kTestStatusFailed); \ } \ } while (false) // Note that this is *not* a polyglot header, so we can use the C11-only // _Generic keyword safely. // See: https://en.cppreference.com/w/c/language/generic // clang-format off #define SHOW_MISMATCH_FMT_STR_(a) _Generic((a), \ bool: "CHECK-fail: [%d] got: 0x02%x; want: 0x02%x", \ int8_t: "CHECK-fail: [%d] got: 0x02%x; want: 0x02%x", \ uint8_t: "CHECK-fail: [%d] got: 0x02%x; want: 0x02%x", \ int16_t: "CHECK-fail: [%d] got: 0x04%x; want: 0x04%x", \ uint16_t: "CHECK-fail: [%d] got: 0x04%x; want: 0x04%x", \ int32_t: "CHECK-fail: [%d] got: 0x08%x; want: 0x08%x", \ uint32_t: "CHECK-fail: [%d] got: 0x08%x; want: 0x08%x", \ int64_t: "CHECK-fail: [%d] got: 0x016%x; want: 0x016%x", \ uint64_t: "CHECK-fail: [%d] got: 0x016%x; want: 0x016%x") #define SHOW_MATCH_FMT_STR_(a) _Generic((a), \ bool: "CHECK-fail: [%d] both equal: 0x02%x", \ int8_t: "CHECK-fail: [%d] both equal: 0x02%x", \ uint8_t: "CHECK-fail: [%d] both equal: 0x02%x", \ int16_t: "CHECK-fail: [%d] both equal: 0x04%x", \ uint16_t: "CHECK-fail: [%d] both equal: 0x04%x", \ int32_t: "CHECK-fail: [%d] both equal: 0x08%x", \ uint32_t: "CHECK-fail: [%d] both equal: 0x08%x", \ int64_t: "CHECK-fail: [%d] both equal: 0x016%x", \ uint64_t: "CHECK-fail: [%d] both equal: 0x016%x") // clang-format on /** * Compare `num_items_` of `actual_` against `expected_` buffer. * * Prints differences between `actual_` and `expected_` before logging an error. * Note, the differences between the actual and expected buffer values are * logged via LOG_INFO _before_ the error is logged with LOG_ERROR, since by * default DV simulations are configured to terminate upon the first error. * * @param actual_ Buffer containing actual values. * @param expected_ Buffer containing expected values. * @param num_items_ Number of items to compare. * @param ... Arguments to a LOG_* macro, which are evaluated if the check. */ #define CHECK_ARRAYS_EQ(actual_, expected_, num_items_, ...) \ do { \ static_assert(sizeof(*(actual_)) == sizeof(*(expected_)), \ "CHECK_ARRAYS requires arguments of equal size."); \ bool fail = false; \ for (size_t i = 0; i < num_items_; ++i) { \ if ((actual_)[i] != (expected_)[i]) { \ if (!fail) { \ /* Print a failure message as soon as possible. */ \ if (OT_VA_ARGS_COUNT(_, ##__VA_ARGS__) == 0) { \ LOG_ERROR("CHECK-fail: " #actual_ " does not match " #expected_); \ } else { \ LOG_ERROR("CHECK-fail: " __VA_ARGS__); \ } \ } \ \ LOG_ERROR(SHOW_MISMATCH_FMT_STR_((actual_)[i]), i, (actual_)[i], \ (expected_)[i]); \ fail = true; \ } \ } \ if (fail) { \ /* Currently, this macro will call into \ the test failure code, which logs \ "FAIL" and aborts. In the future, \ we will try to condition on whether \ or not this is a test.*/ \ test_status_set(kTestStatusFailed); \ } \ } while (false) /** * Compare `num_items_` of `actual_` against `not_expected_` buffer. * * Prints matches between `actual_` and `not_expected_` before logging an error. * Note, the matches between the actual and not_expected buffer values are * logged via LOG_INFO _before_ the error is logged with LOG_ERROR, since by * default DV simulations are configured to terminate upon the first error. * * @param actual_ Buffer containing actual values. * @param not_expected_ Buffer containing not expected values. * @param num_items_ Number of items to compare. * @param ... Arguments to a LOG_* macro, which are evaluated if the check. */ #define CHECK_ARRAYS_NE(actual_, not_expected_, num_items_, ...) \ do { \ static_assert(sizeof(*(actual_)) == sizeof(*(not_expected_)), \ "CHECK_ARRAYS requires arguments of equal size."); \ if (memcmp((actual_), (not_expected_), num_items_ * sizeof(*(actual_))) == \ 0) { \ if (OT_VA_ARGS_COUNT(_, ##__VA_ARGS__) == 0) { \ LOG_ERROR("CHECK-fail: " #actual_ " matches " #not_expected_); \ } else { \ LOG_ERROR("CHECK-fail: " __VA_ARGS__); \ } \ for (size_t i = 0; i < num_items_; ++i) { \ LOG_ERROR(SHOW_MATCH_FMT_STR_((actual_)[i]), i, (actual_)[i]); \ } \ /* Currently, this macro will call into \ the test failure code, which logs \ "FAIL" and aborts. In the future, \ we will try to condition on whether \ or not this is a test.*/ \ test_status_set(kTestStatusFailed); \ } \ } while (false) /** * Checks that the given DIF call returns kDifOk. If the DIF call returns a * different dif_result_t value (defined in sw/device/lib/dif/dif_base.h), this * function logs and then aborts. * * @param dif_call DIF call to invoke and check its return value. * @param ... Arguments to a LOG_* macro, which are evaluated if the check * fails. */ #define CHECK_DIF_OK(dif_call, ...) \ do { \ dif_result_t dif_result = dif_call; \ if (dif_result != kDifOk) { \ /* NOTE: because the condition in this if \ statement can be statically determined, \ only one of the below string constants \ will be included in the final binary.*/ \ if (OT_VA_ARGS_COUNT(_, ##__VA_ARGS__) == 0) { \ LOG_ERROR("DIF-fail: " #dif_call " returns %d", dif_result); \ } else { \ LOG_ERROR("DIF-fail: " __VA_ARGS__); \ } \ /* Currently, this macro will call into \ the test failure code, which logs \ "FAIL" and aborts. In the future, \ we will try to condition on whether \ or not this is a test.*/ \ test_status_set(kTestStatusFailed); \ } \ } while (false) #endif // OPENTITAN_SW_DEVICE_LIB_TESTING_TEST_FRAMEWORK_CHECK_H_
55.307292
80
0.451267
4fc51ce3413952801588860667d613c575cafcde
2,620
h
C
src/pigro/lazy.h
erikvalkering/pigro
5532093c32eeb1f3eb59e67e1f7c359d6f36cc46
[ "MIT" ]
17
2021-09-22T09:06:35.000Z
2022-01-21T22:13:29.000Z
src/pigro/lazy.h
erikvalkering/pigro
5532093c32eeb1f3eb59e67e1f7c359d6f36cc46
[ "MIT" ]
null
null
null
src/pigro/lazy.h
erikvalkering/pigro
5532093c32eeb1f3eb59e67e1f7c359d6f36cc46
[ "MIT" ]
null
null
null
#pragma once #include "bind_tuple.h" #include "compressed_tuple.h" #include "overload.h" #include "recursive.h" #include "regular_void.h" #include "tuple_algorithms.h" #include <concepts> #include <cstddef> #include <optional> #include <utility> namespace pigro::detail { template<typename T> struct LazyResult { T value; bool is_changed; }; template<typename T> LazyResult(const T &, bool) -> LazyResult<const T &>; LazyResult(int &&, bool)->LazyResult<int>; constexpr auto value = [](const concepts::lazy_result auto result) { return result.value; }; constexpr auto is_changed = [](const concepts::lazy_result auto result) { return result.is_changed; }; constexpr auto unwrap_value(concepts::lazy_function auto f) { return recursive{ overload{ compressed_tuple{ f } << [](auto &self, std::nullptr_t, auto f) { return f(nullptr); }, [](auto &self) mutable { return self(nullptr).value; }, } }; } constexpr auto lazy(auto f, concepts::lazy_function auto... deps) { using result_t = decltype(f(deps(nullptr).value...)); auto cache = std::optional<result_t>{}; return compressed_tuple{ f, deps... } << [=](std::nullptr_t, auto f, auto... deps) mutable { const auto args = std::tuple{ deps(nullptr)... }; auto changed = !cache || any(args, is_changed); if (changed) { const auto values = transform(args, value); const auto result = std::apply(f, values); changed = cache != result; cache = std::move(result); } return LazyResult{ *cache, changed, }; }; } constexpr auto lazy_value(auto value, auto changed) { return compressed_tuple{ value, changed } << [](std::nullptr_t, auto value, auto changed) { return LazyResult{ value, changed, }; }; }; constexpr auto ensure_lazy(concepts::lazy_function_unwrapped auto dep) { return dep; } constexpr auto ensure_lazy(::std::invocable auto dep) { return detail::lazy( compressed_tuple{ dep } << [](auto, auto dep) mutable { return dep(); }, lazy_value(0, std::true_type{})); } constexpr auto ensure_lazy(auto dep) { return lazy_value(dep, std::false_type{}); } } // namespace pigro::detail namespace pigro { auto lazy(auto f, auto... deps) { auto lazy_f = detail::lazy( regularized_void(f), detail::ensure_lazy(deps)...); auto unwrapped_lazy_f = detail::unwrap_value(lazy_f); return unregularized_void(unwrapped_lazy_f); } } // namespace pigro
24.716981
97
0.627863
9928bc3d1157c5d177386c474955e864233c1d24
5,768
c
C
net/sixlowpan/sixlowpan_tcpsend.c
acassis/nuttx4smoothie
7c9187ca36dad3f16053467d72570a45f6407fee
[ "Zlib" ]
null
null
null
net/sixlowpan/sixlowpan_tcpsend.c
acassis/nuttx4smoothie
7c9187ca36dad3f16053467d72570a45f6407fee
[ "Zlib" ]
null
null
null
net/sixlowpan/sixlowpan_tcpsend.c
acassis/nuttx4smoothie
7c9187ca36dad3f16053467d72570a45f6407fee
[ "Zlib" ]
1
2019-11-14T13:34:13.000Z
2019-11-14T13:34:13.000Z
/**************************************************************************** * net/sixlowpan/sixlowpan_tcpsend.c * * Copyright (C) 2017 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <gnutt@nuttx.org> * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * ****************************************************************************/ /**************************************************************************** * Included Files ****************************************************************************/ #include <nuttx/config.h> #include <assert.h> #include <errno.h> #include <debug.h> #include "nuttx/net/netdev.h" #include "nuttx/net/tcp.h" #include "nuttx/net/sixlowpan.h" #include "netdev/netdev.h" #include "socket/socket.h" #include "tcp/tcp.h" #include "sixlowpan/sixlowpan_internal.h" #if defined(CONFIG_NET_6LOWPAN) && defined(CONFIG_NET_TCP) /**************************************************************************** * Public Functions ****************************************************************************/ /**************************************************************************** * Function: psock_6lowpan_tcp_send * * Description: * psock_6lowpan_tcp_send() call may be used only when the TCP socket is in a * connected state (so that the intended recipient is known). * * Parameters: * psock - An instance of the internal socket structure. * buf - Data to send * len - Length of data to send * * Returned Value: * On success, returns the number of characters sent. On error, * -1 is returned, and errno is set appropriately. Returned error numbers * must be consistent with definition of errors reported by send() or * sendto(). * * Assumptions: * Called with the network locked. * ****************************************************************************/ ssize_t psock_6lowpan_tcp_send(FAR struct socket *psock, FAR const void *buf, size_t len) { FAR struct tcp_conn_s *conn; FAR struct net_driver_s *dev; struct ipv6tcp_hdr_s ipv6tcp; struct rimeaddr_s dest; int ret; DEBUGASSERT(psock != NULL && psock->s_crefs > 0); DEBUGASSERT(psock->s_type == SOCK_STREAM); /* Make sure that this is a valid socket */ if (psock != NULL || psock->s_crefs <= 0) { nerr("ERROR: Invalid socket\n"); return (ssize_t)-EBADF; } /* Make sure that this is a connected TCP socket */ if (psock->s_type != SOCK_STREAM || !_SS_ISCONNECTED(psock->s_flags)) { nerr("ERROR: Not connected\n"); return (ssize_t)-ENOTCONN; } /* Get the underlying TCP connection structure */ conn = (FAR struct tcp_conn_s *)psock->s_conn; DEBUGASSERT(conn != NULL); #if defined(CONFIG_NET_IPv4) && defined(CONFIG_NET_IPv6) /* Ignore if not IPv6 domain */ if (conn->domain != PF_INET6) { nwarn("WARNING: Not IPv6\n"); return (ssize_t)-EPROTOTYPE; } #endif /* Route outgoing message to the correct device */ #ifdef CONFIG_NETDEV_MULTINIC dev = netdev_findby_ipv6addr(conn->u.ipv6.laddr, conn->u.ipv6.raddr); if (dev == NULL || dev->d_lltype != NET_LL_IEEE805154) { nwarn("WARNING: Not routable or not IEEE802.15.4 MAC\n"); return (ssize_t)-ENETUNREACH; } #else dev = netdev_findby_ipv6addr(conn->u.ipv6.raddr); if (dev == NULL) { nwarn("WARNING: Not routable\n"); return (ssize_t)-ENETUNREACH; } #endif #ifdef CONFIG_NET_ICMPv6_NEIGHBOR /* Make sure that the IP address mapping is in the Neighbor Table */ ret = icmpv6_neighbor(conn->u.ipv6.raddr); if (ret < 0) { nerr("ERROR: Not reachable\n"); return (ssize_t)-ENETUNREACH; } #endif /* Initialize the IPv6/TCP headers */ #warning Missing logic /* Set the socket state to sending */ psock->s_flags = _SS_SETSTATE(psock->s_flags, _SF_SEND); /* Get the Rime MAC address of the destination */ #warning Missing logic /* If routable, then call sixlowpan_send() to format and send the 6loWPAN * packet. */ ret = sixlowpan_send(dev, (FAR const struct ipv6_hdr_s *)&ipv6tcp, buf, len, &dest); if (ret < 0) { nerr("ERROR: sixlowpan_send() failed: %d\n", ret); } return ret; } #endif /* CONFIG_NET_6LOWPAN && CONFIG_NET_TCP */
31.867403
79
0.617892
48ea9702be9ff25ca754e2954cb606c180ec44b4
554
h
C
src/BLASxON/gnd/util/inc/m__zero.h
meinkea/RottenCore
310a1cad96558e6e6accc1f67baf141fb921048c
[ "Unlicense" ]
null
null
null
src/BLASxON/gnd/util/inc/m__zero.h
meinkea/RottenCore
310a1cad96558e6e6accc1f67baf141fb921048c
[ "Unlicense" ]
null
null
null
src/BLASxON/gnd/util/inc/m__zero.h
meinkea/RottenCore
310a1cad96558e6e6accc1f67baf141fb921048c
[ "Unlicense" ]
null
null
null
/*! /file m__zero.h * * /brief Zero out all elements in a vector * */ #ifndef BLASxON__M__ZERO_H #define BLASxON__M__ZERO_H // -- CPU Architecture #include "../../cpu_architecture/cpu_architecture.h" // -- BLAS Datatypes // #include "../../datatypes/inc/vector.h" #include "../../datatypes/inc/matrix.h" #ifdef __cplusplus extern "C" { #endif void BLASxON__FuncHEAD m__zero( struct matrix * mDst ) __attribute__((nonull)) ; #ifdef __cplusplus } #endif #endif // BLASxON__M__ZERO_H
13.512195
54
0.626354
8532092809ab84e93bdf753749c1f3eff02dce00
811
h
C
Code/Engine/GameEngine/Messages/TriggerTriggeredMessage.h
fereeh/ezEngine
14e46cb2a1492812888602796db7ddd66e2b7110
[ "MIT" ]
1
2021-06-23T14:44:02.000Z
2021-06-23T14:44:02.000Z
Code/Engine/GameEngine/Messages/TriggerTriggeredMessage.h
fereeh/ezEngine
14e46cb2a1492812888602796db7ddd66e2b7110
[ "MIT" ]
null
null
null
Code/Engine/GameEngine/Messages/TriggerTriggeredMessage.h
fereeh/ezEngine
14e46cb2a1492812888602796db7ddd66e2b7110
[ "MIT" ]
null
null
null
#pragma once #include <GameEngine/GameEngineDLL.h> #include <Core/Messages/EventMessage.h> #include <Core/Messages/TriggerMessage.h> /// \brief Sent when something enters or leaves the trigger struct EZ_GAMEENGINE_DLL ezMsgTriggerTriggered : public ezEventMessage { EZ_DECLARE_MESSAGE_TYPE(ezMsgTriggerTriggered, ezEventMessage); /// Identifies what the message should trigger. Only stores the hashed string, because one should only check for equality with some expected string. Use ezTempHashedString::GetHash() to assign and compare the value. ezUInt32 m_uiMessageStringHash; /// Messages are only sent for 'entered' ('Activated') and 'left' ('Deactivated') ezEnum<ezTriggerState> m_TriggerState; /// The object that entered the trigger volume. ezGameObjectHandle m_hTriggeringObject; };
35.26087
217
0.790382
3f756d6041ff6046318a36c8d7cb457fe6ee3afc
11,753
h
C
Player.h
Sgw32/R3E
8a55dd137d9e102cf4c9c2fee3d89901bdefa3cd
[ "MIT" ]
7
2017-11-27T15:15:08.000Z
2021-03-29T16:53:22.000Z
Player.h
Sgw32/R3E
8a55dd137d9e102cf4c9c2fee3d89901bdefa3cd
[ "MIT" ]
null
null
null
Player.h
Sgw32/R3E
8a55dd137d9e102cf4c9c2fee3d89901bdefa3cd
[ "MIT" ]
4
2017-11-28T02:53:19.000Z
2021-01-29T10:37:52.000Z
///////////////////////////////////////////////////////////////////// ///////////////Original file by:Fyodor Zagumennov aka Sgw32////////// ///////////////I give permission to use this class, but ////////// ///////////////Copyright 2010 (c) ////////// ///////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////// #pragma once #include <Ogre.h> #include <OgreNewt.h> #include "OgreConsole.h" #include <OIS/OIS.h> #include "SoundManager.h" #include "CWeapon.h" #include "HUD.h" #include "ogreconsole.h" #include "PlayerContactCallback.h" #include "PlayerProps.h" #include "Inventory.h" #include <stdlib.h> #include <time.h> #include "ImprovedConfigFile.h" #define NEWTBODYTYPE_PLAYER 1 #define KEY_DOWNR(x) global::getSingleton().getOISKeyboard()->isKeyDown(x) //#define NEWTBODYTYPE_PLAYER 1 class Player { public: Player(); ~Player(); void init(SceneManager *SceneMgr,OgreNewt::World* mWorld,Ogre::Camera* Camera,SoundManager* soundMgr,Ogre::Root* _root); void camera_force_callback( OgreNewt::Body* body ); void MouseMove(const OIS::MouseEvent &arg,Ogre::Real time); void MousePress(const OIS::MouseEvent &arg, OIS::MouseButtonID id); void MouseRelease(const OIS::MouseEvent &arg, OIS::MouseButtonID id); void FCPress(const OIS::KeyEvent &arg); void FCRelease(const OIS::KeyEvent &arg); void FCUpdate(const FrameEvent &evt); void Duck(); void multiply(Real multyplier); void detatch_camera(bool freeze = true); void attach_camera(bool unfreeze = true); void UnDuck(); void shutdown(); void set_additional_force(Vector3 force); void remove_additional_force(); void set_position(Vector3 pos); void freeze(); Ogre::Camera* get_camera(); void unfreeze(); void unfreeze2(); void look_at(Vector3 pos); void cnoclip(); void show_overlay(); void hide_overlay(); void resetNearClip() { mCamera->setNearClipDistance(mProps.nearClip); } void resetFarClip() { mCamera->setFarClipDistance(mProps.farClip); } void resetFov() { mCamera->setFOVy(Degree(mProps.fov)); } void teleport(Vector3 dest); void setParentRelation(SceneNode* pPar); void setParentRelation(String node); void setFullParentRelation(bool allow) { mFullP=allow; } void stopParentRelation(){parentRelation=false;} void processUse(); void changeFOV(Real fov){mCamera->setFOVy(Degree(fov));} Real getFOV(void){return mCamera->getFOVy().valueAngleUnits();} Vector3 checkNotAvailable(void); void destroyFlashLight() { if (flashLight&&(mSceneMgr->hasLight("flashLighter"))) { mViewNode->detachObject(flashLight); LogManager::getSingleton().logMessage(StringConverter::toString(mSceneMgr->hasLight("flashLighter"))+"PLAYERB!!!"); if (flashLight) mSceneMgr->destroyLight(flashLight); flashLight=0; } } void allowFlashLight(bool allow) { if (!allow) { destroyFlashLight(); } mProps.allowflashlight=allow; } void toggleFlashLight(); Vector3 get_direction(); OgreNewt::Body* get_ray_shoot(void); Ogre::Quaternion Player::get_body_orientation(OgreNewt::Body* bod); Ogre::Vector3 Player::get_body_position(OgreNewt::Body* bod); Ogre::Vector3 Player::get_location(); Ogre::Vector3 Player::get_cur_size(); Ogre::Quaternion Player::get_orientation(); SceneNode* getViewNode(void){return mViewNode;} Real getDistFObject(void) { Ogre::Vector3 myPos = get_location(); Ogre::Vector3 direction,end; direction = get_direction(); end=myPos + direction * 100000.0f; OgreNewt::BasicRaycast shootRay(mWorld,myPos,end); if (shootRay.getHitCount()>0) { return shootRay.getFirstHit().mDistance; } else { return 1.0f; } } Vector3 getFObject(void) { Ogre::Vector3 myPos = get_location(); Ogre::Vector3 direction,end; direction = get_direction(); end=myPos + direction * 100000.0f; OgreNewt::BasicRaycast shootRay(mWorld,myPos,end); if (shootRay.getHitCount()>0) { return myPos +shootRay.getFirstHit().mDistance*direction * 100000.0f; } else { return Vector3(1,1,1); } } OgreNewt::Body* getBodyOnBottom() { Vector3 pos = get_location(); OgreNewt::BasicRaycast wallRay1(mWorld,pos,pos-Vector3(0,cur_size.y*2+50,0)); if ((wallRay1.getFirstHit().mBody)) return wallRay1.getFirstHit().mBody; return 0; } bool checkStairEffect(Vector3 pos, Vector3 direction) { //LogManager::getSingleton().logMessage("Position:"+StringConverter::toString(pos-Vector3(0,cur_size.y,0))+"Dir:"+StringConverter::toString(pos-Vector3(0,cur_size.y,0)+direction*40)); OgreNewt::BasicRaycast wallRay1(mWorld,pos-Vector3(0,cur_size.y,0),pos-Vector3(0,cur_size.y,0)+direction*50); OgreNewt::BasicRaycast wallRay2(mWorld,pos-Vector3(0,cur_size.y-mProps.stairEffect,0),pos-Vector3(0,cur_size.y-mProps.stairEffect,0)+direction*40); //LogManager::getSingleton().logMessage("Position:"+StringConverter::toString(pos-Vector3(0,cur_size.y-mProps.stairEffect,0))+"Dir:"+StringConverter::toString(pos-Vector3(0,cur_size.y-mProps.stairEffect,0)+direction*40)); if ((wallRay1.getFirstHit().mBody)&&(!wallRay2.getFirstHit().mBody)) { //LogManager::getSingleton().logMessage("Stair effect possible"); //LogManager::getSingleton().logMessage(wallRay1.getFirstHit().mBody->getName()); return true; } else { //LogManager::getSingleton().logMessage("Stair effect not possible"); //LogManager::getSingleton().logMessage(StringConverter::toString(wallRay1.getHitCount())); //LogManager::getSingleton().logMessage(StringConverter::toString(wallRay2.getHitCount())); return false; } } void reloadPlayer() { mFullP=false; health=100; mCamera->setFOVy(Degree(mProps.fov)); resetNearClip(); resetFarClip(); y_rotation_cont = 0; bod->setPositionOrientation(get_location(),Quaternion::IDENTITY); mViewNode->setOrientation(Quaternion::IDENTITY); if (!alive) { mViewNode->roll(Degree(60)); //bod->setPositionOrientation(get_location(),Quaternion(Degree(-90),Vector3::UNIT_Z)); } alive=true; if (!uv2) uv2 = new OgreNewt::BasicJoints::UpVector(mWorld,bod,Vector3::UNIT_Y); /*uv1 = new OgreNewt::BasicJoints::UpVector(mWorld,bod,Vector3::UNIT_X); uv3 = new OgreNewt::BasicJoints::UpVector(mWorld,bod,Vector3::UNIT_Z);*/ /*if (!uv1&&mProps.upvectors) { uv1 = new OgreNewt::BasicJoints::UpVector(mWorld,bod,Vector3::UNIT_X); uv3 = new OgreNewt::BasicJoints::UpVector(mWorld,bod,Vector3::UNIT_Z); }*/ CWeapon::getSingleton().reload(); m_FrontVelocity = 0; m_StrafeVelocity = 0; bod->setVelocity(Vector3::ZERO); } void playerDie(); const OgreNewt::MaterialID* getPlayerMat(){return playerMat;} bool Player::isOnEarth(); bool isTop(); std::string _tostr(float a); bool noclip; bool dump; Vector3 tr_v; void setOnLadder(bool ladder); void playerShake(Real ma0,Real mb,Real mw) { if (st=-1.0f) { st=0; pa=0; a0=ma0*Ogre::Math::PI/180; b=mb; w=mw; //stdA=mViewNode->_getDerivedOrientation().getRoll().valueDegrees(); stdA=mCamera->getOrientation().getRoll().valueDegrees(); //mViewNode->roll(Radian(a0)); LogManager::getSingleton().logMessage("playerShakez"); } } void shakeAmplitude() { //LogManager::getSingleton().logMessage("shakeAmp"); Real a = a0*exp(-b*st)*cos(sqrt(w*w-b*b)*st); //harmonic oscilator a0-the amplitude in the beginning, b=2*Velocity of rotating / mass, w-cycle frequency; da=a-pa; pa=a; // all this ^ is from the differetial expression d2x/dt^2+2*b*dx/dt+w^2*x=0 //LogManager::getSingleton().logMessage("shakend"); //Real r = a+stdA; //mViewNode->roll(Degree(da)); mCamera->roll(Degree(da)); mCamera->setPosition(Vector3(Ogre::Math::RangeRandom(-fabs(a),fabs(a)),Ogre::Math::RangeRandom(-fabs(a),fabs(a)),Ogre::Math::RangeRandom(-fabs(a),fabs(a)))); //LogManager::getSingleton().logMessage(StringConverter::toString(a)); if (exp(-b*st)<0.02) { mCamera->setPosition(Vector3(0,0,0)); LogManager::getSingleton().logMessage("shakend"); //Real stdB = mViewNode->_getDerivedOrientation().getRoll().valueDegrees(); Real stdB = mCamera->getOrientation().getRoll().valueDegrees(); //mViewNode->setOrientation(mViewNode->getOrientation()*Quaternion(Radian(Degree(-stdB)),Vector3::NEGATIVE_UNIT_Z)); //LogManager::getSingleton().logMessage(StringConverter::toString(stdB)); /*if (fabs(stdB)>=0 && stdB<90) mViewNode->roll(Degree(stdB+180)); if (stdB<=180 && stdB>90) mViewNode->roll(Degree(stdB));*/ st=-1.0f; } } void shockPlayerCutScene(); bool getSkippingCutScene() { return skippingCutScene; } String getCurrentFootstepPrefix(); //Use only outside ladders! No ladder use. void setCurrentFootstepPrefix(String footstep) { if (mFootstep!="ladder") mFootstep=footstep; } Real getMouseSensivity() { return mRotate/2.0f; } void setMouseSensivity(Real mSens) { mRotate=mSens*2.0f; LogManager::getSingleton().logMessage("Now sens is:"+StringConverter::toString(mRotate)); String data = StringConverter::toString(mSens); String nam = "mouseSensivity"; cf.setSetting(nam,data); cf.save(); } void setHealthRegeneration(Real rMul,Real maxHealth = 100.0f); inline Real getRegenerationMultiplier() { return regen_Mul; } inline Real getRegenerationHealth() { return mMaxHealth; } void setAllowSubtitles(bool enable); bool getAllowSubtitles(); unsigned int debug; Real camera_rotation_x; Real camera_rotation_y; Ogre::SceneManager* mSceneMgr; OgreNewt::Body* bod; Vector3 cur_size; Real razbros; bool god; private: bool allowsubtitles; String mFootstep; bool alive; bool parentRelation; bool mFullP; SceneNode* mPar; Vector3 pRelPosition; Vector3 mForce; OgreNewt::World* mWorld; Ogre::Camera* mCamera; Real a0,b,w,st; Real stdA,pa,da; /*Ogre::String debugstr1; Ogre::String debugstr2; Ogre::String debugstr3; Ogre::String debugstr4; Ogre::String debugstr5; Ogre::String debugstr6;*/ Real mRotate; Real mMove; Real jump_power; Real y_rotation_cont; Real x_rotation_cont; Real y_limit_a; Real y_limit_b; Real cam_height; Real fps_speed; Real gravity; Real stop_count; Real stop_count_std; Real regen_Mul; Real mMaxHealth; bool skippingCutScene; bool reset_vel,unpressed; bool front_jump; bool strafe_jump; Ogre::Real jumpTime; //time since jump start Ogre::Real jumpLandedTime; //time since landing Ogre::Real distToFloor; Overlay* debugOverlay; OverlayElement *textbox; Quaternion rot3; ImprovedConfigFile cf; SoundManager* sound; SceneNode *mCamNode; SceneNode *mViewNode; SceneNode *mNoclipNode; Light* flashLight; Ogre::Vector3 size; Ogre::Vector3 MyVel; Ogre::Vector3 inertia; Vector3 mDirection; Vector3 direction; Vector3 stra; /*Ogre::Vector3 m_FrontVelocity; Ogre::Vector3 m_StrafeVelocity;*/ Real m_FrontVelocity; Real m_StrafeVelocity; Vector3 size_dc; Vector3 poo2; Vector3 acel; Vector3 force; Vector3 force2; Real health; const OgreNewt::MaterialID* mMatDefault; OgreNewt::MaterialPair* mMatPair; const OgreNewt::MaterialID* playerMat; PlayerContactCallback* mPhysCallback; bool nowonearth; bool jump; bool no_movement; bool initial; bool jumpStartFinished; //true if jumping start sequence finished bool jumpLanded; //true as soon as I land. importand for the landing sound bool jumping;//if I am jumping, is set to false on landing bool freezed; bool awaitingunduck; std::vector<unsigned int> footsteps; Real fstTimer; int fstindex; bool mLadder; String fstPrf_before; Real regen_Time; OgreNewt::Collision* duckcol; OgreNewt::Collision* col; Ogre::Root* root; OgreNewt::BasicJoints::UpVector* uv1; OgreNewt::BasicJoints::UpVector* uv2; OgreNewt::BasicJoints::UpVector* uv3; PlayerProps mProps; };
28.252404
223
0.711223
eb2e8ab9900a63594ea2dd9a8bca35912c885e30
429
h
C
src/tracker/track_set_utilities.h
johannphilippe/Tracker4
e2eb6700bb8827dc8181aba889a78760f21a98f8
[ "MIT" ]
null
null
null
src/tracker/track_set_utilities.h
johannphilippe/Tracker4
e2eb6700bb8827dc8181aba889a78760f21a98f8
[ "MIT" ]
1
2021-12-28T10:47:47.000Z
2021-12-28T18:54:46.000Z
src/tracker/track_set_utilities.h
johannphilippe/Tracker4
e2eb6700bb8827dc8181aba889a78760f21a98f8
[ "MIT" ]
null
null
null
#ifndef TRACK_SET_UTILITIES_H #define TRACK_SET_UTILITIES_H #include<variant> #include<elements.hpp> #include<widgets/tracker/tracker_track.h> #include<widgets/tracker/sniper_track.h> #include<tracker/track_base.h> using namespace cycfi::elements; namespace jtracker { namespace track_set_utilities { void set_text_to_selected_cells(std::vector<track_t> &t, std::string_view v); }; } #endif // TRACK_SET_UTILITIES_H
17.875
81
0.792541
eb477aae072ca04aa543aeb3efbb3b481ebbd96f
1,014
h
C
crow/qosbyte.h
Mirmik/crow
afd14eb5327564e471b9ee2a9bf67423213660db
[ "MIT" ]
2
2020-03-11T17:47:37.000Z
2020-03-12T13:36:43.000Z
crow/qosbyte.h
Mirmik/crow
afd14eb5327564e471b9ee2a9bf67423213660db
[ "MIT" ]
null
null
null
crow/qosbyte.h
Mirmik/crow
afd14eb5327564e471b9ee2a9bf67423213660db
[ "MIT" ]
null
null
null
#ifndef CROW_QOSBYTE_H #define CROW_QOSBYTE_H #undef round #include <cassert> #include <cmath> #include <type_traits> namespace crow { static constexpr int quant_const = 10; struct qosbyte { uint8_t _qos : 2; uint8_t _quant_code : 6; static uint8_t quant_to_code(uint16_t quant) { auto code = std::round((float)(quant) / quant_const); assert(code >= 0); return code; } uint16_t quant() const { return _quant_code * quant_const + 4; } uint8_t quality() const { return _qos; } void set_quant(uint16_t quant) { _quant_code = quant_to_code(quant); } void set_quality(uint8_t quality) { _qos = quality; } }; static_assert(sizeof(qosbyte) == 1, "qosbyte wrong size"); static inline qosbyte make_qosbyte(uint8_t quality, uint16_t ackquant) { qosbyte q; q._qos = quality; q._quant_code = qosbyte::quant_to_code(ackquant); return q; } } #endif
24.142857
78
0.617357
6a29b8691f12508fa9294eb5fbd00afb05f4dd20
2,633
c
C
vmafd/vmevent/common/memory.c
wfu8/lightwave
cf6a7417cd9807bfcf9bcd99c43c5b2eecf2d298
[ "Apache-2.0" ]
357
2015-04-20T00:16:30.000Z
2022-03-17T05:34:09.000Z
vmafd/vmevent/common/memory.c
wfu8/lightwave
cf6a7417cd9807bfcf9bcd99c43c5b2eecf2d298
[ "Apache-2.0" ]
38
2015-11-19T05:20:53.000Z
2022-03-31T07:21:59.000Z
vmafd/vmevent/common/memory.c
wfu8/lightwave
cf6a7417cd9807bfcf9bcd99c43c5b2eecf2d298
[ "Apache-2.0" ]
135
2015-04-21T15:23:21.000Z
2022-03-30T11:46:36.000Z
/* * Copyright © 2012-2016 VMware, Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the “License”); you may not * use this file except in compliance with the License. You may obtain a copy * of the License at http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an “AS IS” BASIS, without * warranties or conditions of any kind, EITHER EXPRESS OR IMPLIED. See the * License for the specific language governing permissions and limitations * under the License. */ #include "includes.h" DWORD EventLogAllocateStringA( PCSTR pszString, PSTR * ppszString ) { DWORD dwError = 0; PSTR pszNewString = NULL; DWORD dwLen = 0; if (!pszString || !ppszString) { if (ppszString) { *ppszString = NULL; } return 0; } dwLen = EventLogStringLenA(pszString); // + 1 for \'0' dwError = EventLogAllocateMemory(dwLen + 1, (PVOID*)&pszNewString); BAIL_ON_VMEVENT_ERROR(dwError); #ifndef _WIN32 memcpy(pszNewString, pszString, dwLen); #else memcpy_s(pszNewString, (dwLen + 1), pszString, dwLen); #endif *ppszString = pszNewString; cleanup: return dwError; error: VMEVENT_SAFE_FREE_MEMORY(pszNewString); goto cleanup; } DWORD EventLogAllocateMemory( DWORD dwSize, PVOID * ppMemory ) { DWORD dwError = 0; void* pMemory = NULL; if (!ppMemory || !dwSize) { dwError = ERROR_INVALID_PARAMETER; BAIL_ON_VMEVENT_ERROR(dwError); } pMemory = calloc(1, dwSize); if (!pMemory) { dwError = ENOMEM; BAIL_ON_VMEVENT_ERROR(dwError); } cleanup: *ppMemory = pMemory; return dwError; error: VMEVENT_SAFE_FREE_MEMORY(pMemory); pMemory = NULL; goto cleanup; } VOID EventLogFreeStringA( PSTR pszString ) { VMEVENT_SAFE_FREE_MEMORY(pszString); return; } VOID EventLogFreeStringW( PWSTR pszString ) { VMEVENT_SAFE_FREE_MEMORY(pszString); return; } VOID EventLogFreeMemory( PVOID pMemory ) { if (pMemory) { free(pMemory); } } DWORD EventLogConvertUnicodetoAnsiString( PCWSTR pszUnicodeString, PSTR * ppszAnsiString ) { if (!pszUnicodeString || !ppszAnsiString) { if (ppszAnsiString) { *ppszAnsiString = NULL; } return 0; } #ifndef _WIN32 // caller owns ppszAnsiString and should free via RepoFreeStringA(*ppszAnsiString) return LwWc16sToMbs(pszUnicodeString, ppszAnsiString); #else return 0; #endif }
19.360294
87
0.665021
ac22e426cdc81c9e9cfcb8cbfcfb37b1ed376313
297
h
C
Source/ui_macosx/PreferencesWindowController.h
maximu/Play-
c9ea635c66a5cc939b8719b634bc8135ec0d67ce
[ "BSD-2-Clause" ]
1
2021-03-30T16:23:17.000Z
2021-03-30T16:23:17.000Z
Source/ui_macosx/PreferencesWindowController.h
maximu/Play-
c9ea635c66a5cc939b8719b634bc8135ec0d67ce
[ "BSD-2-Clause" ]
null
null
null
Source/ui_macosx/PreferencesWindowController.h
maximu/Play-
c9ea635c66a5cc939b8719b634bc8135ec0d67ce
[ "BSD-2-Clause" ]
null
null
null
#import <Cocoa/Cocoa.h> @interface PreferencesWindowController : NSWindowController { IBOutlet NSToolbar* toolbar; } @property(retain) NSViewController* currentViewController; +(PreferencesWindowController*)defaultController; -(void)show; -(IBAction)onToolBarButtonPressed: (id)sender; @end
19.8
59
0.804714
7537e3e1798ed90fa9979056a3740a08e7f84f78
9,178
h
C
splaytree.h
Kayal314/data_structures
538e671424cae6e6551cef617a7f42b1aec5af5a
[ "MIT" ]
1
2022-03-07T18:04:18.000Z
2022-03-07T18:04:18.000Z
splaytree.h
Kayal314/data_structures
538e671424cae6e6551cef617a7f42b1aec5af5a
[ "MIT" ]
null
null
null
splaytree.h
Kayal314/data_structures
538e671424cae6e6551cef617a7f42b1aec5af5a
[ "MIT" ]
null
null
null
#include <iostream> #include <queue> template <typename T> struct Node { public: T val; Node<T>* left; Node<T>* right; Node<T>* parent; Node() { this->val=T{}; this->left=NULL; this->right=NULL; this->parent=NULL; } Node(T val) { this->val=val; this->left=NULL; this->right=NULL; this->parent=NULL; } }; template <typename T> class SplayTree { private: Node<T>* root; unsigned long size; public: SplayTree() { this->root=NULL; this->size=0; } SplayTree(Node<T>* root) { this->root=root; this->size=0; } ~SplayTree() { if(this->root) release_mem(root); } bool is_empty() { return root==NULL; } unsigned long get_size() { return size; } bool present(T val) { return search(this->root,val)!=NULL; } bool insert(T val) { Node<T>* z=new Node<T>(val); Node<T>* y=NULL; Node<T>* x=this->root; while(x!=NULL) { y=x; if(z->val<x->val) x=x->left; else x=x->right; } z->parent=y; if(y==NULL) this->root=z; else if(z->val<y->val) y->left=z; else y->right=z; splay(z); size++; return true; } // elements of tree s are smaller than those of tree t SplayTree<T>* join(SplayTree<T>* s, SplayTree<T>* t) { Node<T>* max_elem = s->root; while(max_elem->right) max_elem=max_elem->right; s->splay(max_elem); max_elem->right=t->root; return new SplayTree<T>(max_elem); } bool remove(T val) { Node<T>* z = search(this->root,val); if(z==NULL) return false; splay(z); if (z->left==NULL) transplant(z, z->right); else if (z->right==NULL) transplant(z, z->left); else { Node<T>* y = minimum(z->right); if (y->parent != z) { transplant(y, y->right); y->right = z->right; y->right->parent = y; } transplant(z, y); y->left = z->left; y->left->parent = y; } delete z; size--; return true; } void inorder_traversal() { std::cout<<"Inorder Traversal"<<std::endl; inorder(this->root); std::cout<<std::endl; } void preorder_traversal() { std::cout<<"Preorder Traversal"<<std::endl; preorder(this->root); std::cout<<std::endl; } void postorder_traversal() { std::cout<<"Postorder Traversal"<<std::endl; postorder(this->root); std::cout<<std::endl; } void levelorder_traversal() { std::cout<<"Levelorder Traversal"<<std::endl; if(this->root==NULL) return; std::queue<Node<T>*> q; q.push(this->root); while(!q.empty()) { Node<T>* node=q.front(); std::cout<<node->val<<" "; q.pop(); if(node->left!=NULL) q.push(node->left); if(node->right!=NULL) q.push(node->right); } std::cout<<std::endl; } T successor(T val) { Node<T>* x=search(this->root,val); if(x==NULL) { std::cout<<"The value "<<val<<" does not exist in this splay tree"<<std::endl; return T{}; } if(x->right!=NULL) return minimum(x->right)->val; Node<T>* y=x->parent; while(y!=NULL&&x==y->right) { x=y; y=y->parent; } if(y==NULL) { std::cout<<"No successor of "<<val<<" exists in this splay tree"<<std::endl; return T{}; } return y->val; } T predecessor(T val) { Node<T>* x=search(this->root,val); if(x==NULL) { std::cout<<"The value "<<val<<" does not exist in this splay tree"<<std::endl; return T{}; } if(x->left!=NULL) return maximum(x->left)->val; Node<T>* y=x->parent; while(y!=NULL&&x==y->left) { x=y; y=y->parent; } if(y==NULL) { std::cout<<"No predecessor of "<<val<<" exists in this splay tree"<<std::endl; return T{}; } return y->val; } private: void release_mem(Node<T>* node) { if(node->left!=NULL) release_mem(node->left); if(node->right!=NULL) release_mem(node->right); delete node; } void left_rotate(Node<T>* x) { Node<T>* y=x->right; if(y!=NULL) { x->right=y->left; if(y->left!=NULL) y->left->parent=x; y->parent=x->parent; } if(x->parent==NULL) this->root=y; else if(x==x->parent->left) x->parent->left=y; else x->parent->right=y; if(y!=NULL) y->left=x; x->parent=y; } void right_rotate(Node<T>* y) { Node<T>* x=y->left; if(x!=NULL) { y->left=x->right; if(x->right!=NULL) x->right->parent=y; x->parent=y->parent; } if(y->parent==NULL) this->root=x; else if(y==y->parent->right) y->parent->right=x; else y->parent->left=x; if(x!=NULL) x->right=y; y->parent=x; } // if x->parent == this->root void zig(Node<T>* x) { if(x==x->parent->left) right_rotate(x->parent); else left_rotate(x->parent); this->root=x; } // if x->parent != this->root and x and its parent are both left children void zig_zig_left(Node<T>* x) { right_rotate(x->parent->parent); right_rotate(x->parent); } // if x->parent != this->root and x and its parent are both right children void zig_zig_right(Node<T>* x) { left_rotate(x->parent->parent); left_rotate(x->parent); } // if x->parent != this->root and x is the right child and x->parent is the left child void zig_zag_rl(Node<T>* x) { left_rotate(x->parent); right_rotate(x->parent); } // if x->parent != this->root and x is the left child and x->parent is the right child void zig_zag_lr(Node<T>* x) { right_rotate(x->parent); left_rotate(x->parent); } void splay(Node<T>* x) { while(x!=this->root) { if(x->parent==this->root) zig(x); else { Node<T>* p=x->parent; if(x==x->parent->left&&p==p->parent->left) zig_zig_left(x); else if(x==x->parent->left&&p==p->parent->right) zig_zag_lr(x); else if(x==x->parent->right&&p==p->parent->left) zig_zag_rl(x); else zig_zig_right(x); } } this->root=x; } void transplant(Node<T>* x, Node<T>* y) { if (x->parent==NULL) this->root = y; else if (x == x->parent->left) x->parent->left = y; else x->parent->right = y; if (y!=NULL) y->parent = x->parent; } Node<T>* search(Node<T>* x, T val) { if(x==NULL||val==x->val) return x; if(val<x->val) return search(x->left,val); return search(x->right, val); } void inorder(Node<T>* x) { if(x!=NULL) { inorder(x->left); std::cout<<x->val<<" "; inorder(x->right); } } void preorder(Node<T>* x) { if(x!=NULL) { std::cout<<x->val<<" "; preorder(x->left); preorder(x->right); } } void postorder(Node<T>* x) { if(x!=NULL) { postorder(x->left); postorder(x->right); std::cout<<x->val<<" "; } } Node<T>* minimum(Node<T>* x) { while(x->left!=NULL) x=x->left; return x; } Node<T>* maximum(Node<T>* x) { while(x->right!=NULL) x=x->right; return x; } };
22.945
91
0.413598
75610effcf8161bb94c10bd1b96a2dbd66dde148
13,875
h
C
BigNumber/BigNumberGlobalFunc.h
happeneddr9/TrusSize-BigNumber-Library
095af53d702c1ea23e967bf264feea3bcfb7ffee
[ "Unlicense" ]
2
2020-04-09T02:57:33.000Z
2020-04-09T02:57:41.000Z
BigNumber/BigNumberGlobalFunc.h
happeneddr9/TrusSize-BigNumber-Library
095af53d702c1ea23e967bf264feea3bcfb7ffee
[ "Unlicense" ]
null
null
null
BigNumber/BigNumberGlobalFunc.h
happeneddr9/TrusSize-BigNumber-Library
095af53d702c1ea23e967bf264feea3bcfb7ffee
[ "Unlicense" ]
null
null
null
/** * @Name : BigNumberLogic.h * @Date : 2020年4月4日 下午7:30:31 * @Author : happe * @brief : see BigNumber.h, there is ton of operator overloading. */ #pragma once #include "BigNumber.h" namespace BigMath { template <size_t WordSize> constexpr BigNumber<WordSize * 2> multiply(const BigMath::BigNumber<WordSize> &lhs, const BigMath::BigNumber<WordSize> &rhs) { using dtype = BigNumber<WordSize * 2>; dtype tmp = lhs; tmp *= static_cast<dtype>(rhs); return tmp; } } /* Logic operator */ template <size_t WordSize> constexpr BigMath::BigNumber<WordSize> operator&(const BigMath::BigNumber<WordSize> &lhs, const BigMath::BigNumber<WordSize> &rhs) { BigMath::BigNumber<WordSize> tmp = lhs; tmp &= rhs; return tmp; } template <size_t WordSize> constexpr BigMath::BigNumber<WordSize> operator|(const BigMath::BigNumber<WordSize> &lhs, const BigMath::BigNumber<WordSize> &rhs) { BigMath::BigNumber<WordSize> tmp = lhs; tmp |= rhs; return tmp; } template <size_t WordSize> constexpr BigMath::BigNumber<WordSize> operator^(const BigMath::BigNumber<WordSize> &lhs, const BigMath::BigNumber<WordSize> &rhs) { BigMath::BigNumber<WordSize> tmp = lhs; tmp ^= rhs; return tmp; } /* with int */ template <size_t WordSize> constexpr BigMath::BigNumber<WordSize> operator&(const BigMath::BigNumber<WordSize> &lhs, int rhs) { BigMath::BigNumber<WordSize> tmp = lhs; tmp &= rhs; return tmp; } template <size_t WordSize> constexpr BigMath::BigNumber<WordSize> operator|(const BigMath::BigNumber<WordSize> &lhs, int rhs) { BigMath::BigNumber<WordSize> tmp = lhs; tmp |= rhs; return tmp; } template <size_t WordSize> constexpr BigMath::BigNumber<WordSize> operator^(const BigMath::BigNumber<WordSize> &lhs, int rhs) { BigMath::BigNumber<WordSize> tmp = lhs; tmp ^= rhs; return tmp; } /* Another side*/ template <size_t WordSize> constexpr BigMath::BigNumber<WordSize> operator&(int lhs, const BigMath::BigNumber<WordSize> &rhs) { BigMath::BigNumber<WordSize> tmp = lhs; tmp &= rhs; return tmp; } template <size_t WordSize> constexpr BigMath::BigNumber<WordSize> operator|(int lhs, const BigMath::BigNumber<WordSize> &rhs) { BigMath::BigNumber<WordSize> tmp = lhs; tmp |= rhs; return tmp; } template <size_t WordSize> constexpr BigMath::BigNumber<WordSize> operator^(int lhs, const BigMath::BigNumber<WordSize> &rhs) { BigMath::BigNumber<WordSize> tmp = lhs; tmp ^= rhs; return tmp; } /* Compare Logic operator */ template <size_t WordSize> constexpr bool operator==(const BigMath::BigNumber<WordSize> &lhs, const BigMath::BigNumber<WordSize> &rhs) { return (lhs.compare(rhs) == BigMath::BigNumber_Base::EQUAL); } template <size_t WordSize> constexpr bool operator!=(const BigMath::BigNumber<WordSize> &lhs, const BigMath::BigNumber<WordSize> &rhs) { return (lhs.compare(rhs) != BigMath::BigNumber_Base::EQUAL); } template <size_t WordSize> constexpr bool operator>=(const BigMath::BigNumber<WordSize> &lhs, const BigMath::BigNumber<WordSize> &rhs) { return (lhs.compare(rhs) >= BigMath::BigNumber_Base::EQUAL); } template <size_t WordSize> constexpr bool operator<=(const BigMath::BigNumber<WordSize> &lhs, const BigMath::BigNumber<WordSize> &rhs) { return (lhs.compare(rhs) <= BigMath::BigNumber_Base::EQUAL); } template <size_t WordSize> constexpr bool operator>(const BigMath::BigNumber<WordSize> &lhs, const BigMath::BigNumber<WordSize> &rhs) { return (lhs.compare(rhs) == BigMath::BigNumber_Base::LARGER); } template <size_t WordSize> constexpr bool operator<(const BigMath::BigNumber<WordSize> &lhs, const BigMath::BigNumber<WordSize> &rhs) { return (lhs.compare(rhs) == BigMath::BigNumber_Base::SMALLER); } /* different size compare */ template <size_t lsize, size_t rsize> constexpr bool operator==(const BigMath::BigNumber<lsize> &lhs, const BigMath::BigNumber<rsize> &rhs) { using LeftType = BigMath::BigNumber<lsize>; using RightType = BigMath::BigNumber<rsize>; using CompareType = BigMath::LargerType<LeftType, RightType>; return (static_cast<CompareType>(lhs) == static_cast<CompareType>(rhs)); } template <size_t lsize, size_t rsize> constexpr bool operator!=(const BigMath::BigNumber<lsize> &lhs, const BigMath::BigNumber<rsize> &rhs) { using LeftType = BigMath::BigNumber<lsize>; using RightType = BigMath::BigNumber<rsize>; using CompareType = BigMath::LargerType<LeftType, RightType>; return (static_cast<CompareType>(lhs) != static_cast<CompareType>(rhs)); } template <size_t lsize, size_t rsize> constexpr bool operator>=(const BigMath::BigNumber<lsize> &lhs, const BigMath::BigNumber<rsize> &rhs) { using LeftType = BigMath::BigNumber<lsize>; using RightType = BigMath::BigNumber<rsize>; using CompareType = BigMath::LargerType<LeftType, RightType>; return (static_cast<CompareType>(lhs) >= static_cast<CompareType>(rhs)); } template <size_t lsize, size_t rsize> constexpr bool operator<=(const BigMath::BigNumber<lsize> &lhs, const BigMath::BigNumber<rsize> &rhs) { using LeftType = BigMath::BigNumber<lsize>; using RightType = BigMath::BigNumber<rsize>; using CompareType = BigMath::LargerType<LeftType, RightType>; return (static_cast<CompareType>(lhs) <= static_cast<CompareType>(rhs)); } template <size_t lsize, size_t rsize> constexpr bool operator>(const BigMath::BigNumber<lsize> &lhs, const BigMath::BigNumber<rsize> &rhs) { using LeftType = BigMath::BigNumber<lsize>; using RightType = BigMath::BigNumber<rsize>; using CompareType = BigMath::LargerType<LeftType, RightType>; return (static_cast<CompareType>(lhs) > static_cast<CompareType>(rhs)); } template <size_t lsize, size_t rsize> constexpr bool operator<(const BigMath::BigNumber<lsize> &lhs, const BigMath::BigNumber<rsize> &rhs) { using LeftType = BigMath::BigNumber<lsize>; using RightType = BigMath::BigNumber<rsize>; using CompareType = BigMath::LargerType<LeftType, RightType>; return (static_cast<CompareType>(lhs) < static_cast<CompareType>(rhs)); } /* Compare whit int Logic operator */ template <size_t WordSize> constexpr bool operator==(const BigMath::BigNumber<WordSize> &lhs, int rhs) { return (lhs.compare(rhs) == BigMath::BigNumber_Base::EQUAL); } template <size_t WordSize> constexpr bool operator!=(const BigMath::BigNumber<WordSize> &lhs, int rhs) { return (lhs.compare(rhs) != BigMath::BigNumber_Base::EQUAL); } template <size_t WordSize> constexpr bool operator>=(const BigMath::BigNumber<WordSize> &lhs, int rhs) { return (lhs.compare(rhs) >= BigMath::BigNumber_Base::EQUAL); } template <size_t WordSize> constexpr bool operator<=(const BigMath::BigNumber<WordSize> &lhs, int rhs) { return (lhs.compare(rhs) <= BigMath::BigNumber_Base::EQUAL); } template <size_t WordSize> constexpr bool operator>(const BigMath::BigNumber<WordSize> &lhs, int rhs) { return (lhs.compare(rhs) == BigMath::BigNumber_Base::LARGER); } template <size_t WordSize> constexpr bool operator<(const BigMath::BigNumber<WordSize> &lhs, int rhs) { return (lhs.compare(rhs) == BigMath::BigNumber_Base::SMALLER); } /* int Compare Logic operator */ template <size_t WordSize> constexpr bool operator==(int lhs, const BigMath::BigNumber<WordSize> &rhs) { return (rhs.compare(lhs) == BigMath::BigNumber_Base::EQUAL); } template <size_t WordSize> constexpr bool operator!=(int lhs, const BigMath::BigNumber<WordSize> &rhs) { return (rhs.compare(lhs) != BigMath::BigNumber_Base::EQUAL); } template <size_t WordSize> constexpr bool operator>=(int lhs, const BigMath::BigNumber<WordSize> &rhs) { return (rhs.compare(lhs) <= BigMath::BigNumber_Base::EQUAL); } template <size_t WordSize> constexpr bool operator<=(int lhs, const BigMath::BigNumber<WordSize> &rhs) { return (rhs.compare(lhs) >= BigMath::BigNumber_Base::EQUAL); } template <size_t WordSize> constexpr bool operator>(int lhs, const BigMath::BigNumber<WordSize> &rhs) { return (rhs.compare(lhs) == BigMath::BigNumber_Base::SMALLER); } template <size_t WordSize> constexpr bool operator<(int lhs, const BigMath::BigNumber<WordSize> &rhs) { return (rhs.compare(lhs) == BigMath::BigNumber_Base::LARGER); } /* Common operator */ template <size_t WordSize> constexpr BigMath::BigNumber<WordSize> operator+(const BigMath::BigNumber<WordSize> &lhs, const BigMath::BigNumber<WordSize> &rhs) { BigMath::BigNumber<WordSize> tmp = lhs; tmp += rhs; return tmp; } template <size_t WordSize> constexpr BigMath::BigNumber<WordSize> operator-(const BigMath::BigNumber<WordSize> &lhs, const BigMath::BigNumber<WordSize> &rhs) { BigMath::BigNumber<WordSize> tmp = lhs; tmp -= rhs; return tmp; } template <size_t WordSize> constexpr BigMath::BigNumber<WordSize> operator*(const BigMath::BigNumber<WordSize> &lhs, const BigMath::BigNumber<WordSize> &rhs) { BigMath::BigNumber<WordSize> tmp = lhs; tmp *= rhs; return tmp; } template <size_t WordSize> constexpr BigMath::BigNumber<WordSize> operator/(const BigMath::BigNumber<WordSize> &lhs, const BigMath::BigNumber<WordSize> &rhs) { BigMath::BigNumber<WordSize> tmp = lhs; tmp /= rhs; return tmp; } template <size_t WordSize> constexpr BigMath::BigNumber<WordSize> operator%(const BigMath::BigNumber<WordSize> &lhs, const BigMath::BigNumber<WordSize> &rhs) { BigMath::BigNumber<WordSize> tmp = lhs; tmp %= rhs; return tmp; } /* different size */ template <size_t lsize, size_t rsize> constexpr auto operator+(const BigMath::BigNumber<lsize> &lhs, const BigMath::BigNumber<rsize> &rhs) { using LeftType = BigMath::BigNumber<lsize>; using RightType = BigMath::BigNumber<rsize>; using CompareType = BigMath::LargerType<LeftType, RightType>; CompareType tmp(lhs); tmp += rhs; return tmp; } template <size_t lsize, size_t rsize> constexpr auto operator-(const BigMath::BigNumber<lsize> &lhs, const BigMath::BigNumber<rsize> &rhs) { using LeftType = BigMath::BigNumber<lsize>; using RightType = BigMath::BigNumber<rsize>; using CompareType = BigMath::LargerType<LeftType, RightType>; CompareType tmp(lhs); tmp -= rhs; return tmp; } template <size_t lsize, size_t rsize> constexpr auto operator*(const BigMath::BigNumber<lsize> &lhs, const BigMath::BigNumber<rsize> &rhs) { using LeftType = BigMath::BigNumber<lsize>; using RightType = BigMath::BigNumber<rsize>; using CompareType = BigMath::LargerType<LeftType, RightType>; CompareType tmp(lhs); tmp *= rhs; return tmp; } template <size_t lsize, size_t rsize> constexpr auto operator/(const BigMath::BigNumber<lsize> &lhs, const BigMath::BigNumber<rsize> &rhs) { using LeftType = BigMath::BigNumber<lsize>; using RightType = BigMath::BigNumber<rsize>; using CompareType = BigMath::LargerType<LeftType, RightType>; CompareType tmp(lhs); tmp /= rhs; return tmp; } template <size_t lsize, size_t rsize> constexpr auto operator%(const BigMath::BigNumber<lsize> &lhs, const BigMath::BigNumber<rsize> &rhs) { using LeftType = BigMath::BigNumber<lsize>; using RightType = BigMath::BigNumber<rsize>; using CompareType = BigMath::LargerType<LeftType, RightType>; CompareType tmp(lhs); tmp %= rhs; return tmp; } /* Arithmetic operator with int */ template <size_t WordSize> constexpr BigMath::BigNumber<WordSize> operator+(const BigMath::BigNumber<WordSize> &lhs, int rhs) { BigMath::BigNumber<WordSize> tmp = lhs; tmp += rhs; return tmp; } template <size_t WordSize> constexpr BigMath::BigNumber<WordSize> operator-(const BigMath::BigNumber<WordSize> &lhs, int rhs) { BigMath::BigNumber<WordSize> tmp = lhs; tmp -= rhs; return tmp; } template <size_t WordSize> constexpr BigMath::BigNumber<WordSize> operator*(const BigMath::BigNumber<WordSize> &lhs, int rhs) { BigMath::BigNumber<WordSize> tmp = lhs; tmp *= rhs; return tmp; } template <size_t WordSize> constexpr BigMath::BigNumber<WordSize> operator/(const BigMath::BigNumber<WordSize> &lhs, int rhs) { BigMath::BigNumber<WordSize> tmp = lhs; tmp /= rhs; return tmp; } template <size_t WordSize> constexpr BigMath::BigNumber<WordSize> operator%(const BigMath::BigNumber<WordSize> &lhs, int rhs) { BigMath::BigNumber<WordSize> tmp = lhs; tmp %= rhs; return tmp; } /* another side */ template <size_t WordSize> constexpr BigMath::BigNumber<WordSize> operator+(int lhs, const BigMath::BigNumber<WordSize> &rhs) { BigMath::BigNumber<WordSize> tmp = lhs; tmp += rhs; return tmp; } template <size_t WordSize> constexpr BigMath::BigNumber<WordSize> operator-(int lhs, const BigMath::BigNumber<WordSize> &rhs) { BigMath::BigNumber<WordSize> tmp = lhs; tmp -= rhs; return tmp; } template <size_t WordSize> constexpr BigMath::BigNumber<WordSize> operator*(int lhs, const BigMath::BigNumber<WordSize> &rhs) { BigMath::BigNumber<WordSize> tmp = lhs; tmp *= rhs; return tmp; } template <size_t WordSize> constexpr BigMath::BigNumber<WordSize> operator/(int lhs, const BigMath::BigNumber<WordSize> &rhs) { BigMath::BigNumber<WordSize> tmp = lhs; tmp /= rhs; return tmp; } template <size_t WordSize> constexpr BigMath::BigNumber<WordSize> operator%(int lhs, const BigMath::BigNumber<WordSize> &rhs) { BigMath::BigNumber<WordSize> tmp = lhs; tmp %= rhs; return tmp; } template <size_t WordSize> constexpr BigMath::BigNumber<WordSize> operator<<(const BigMath::BigNumber<WordSize> &lhs, size_t rhs) { BigMath::BigNumber<WordSize> tmp = lhs; tmp <<= rhs; return tmp; } template <size_t WordSize> constexpr BigMath::BigNumber<WordSize> operator>>(const BigMath::BigNumber<WordSize> &lhs, size_t rhs) { BigMath::BigNumber<WordSize> tmp = lhs; tmp >>= rhs; return tmp; }
32.267442
110
0.718126
21f5820140abfcda2cfda910afeeedcae1f460f0
965
h
C
src/compaction.h
miohtama/RedisTimeSeries
0cee86057a8d53fb35403f1f3f965ed32c2c31f0
[ "MIT", "Ruby", "BSD-3-Clause" ]
643
2019-05-14T15:38:10.000Z
2022-03-29T01:15:49.000Z
src/compaction.h
miohtama/RedisTimeSeries
0cee86057a8d53fb35403f1f3f965ed32c2c31f0
[ "MIT", "Ruby", "BSD-3-Clause" ]
888
2019-05-15T10:51:07.000Z
2022-03-31T10:40:04.000Z
src/compaction.h
miohtama/RedisTimeSeries
0cee86057a8d53fb35403f1f3f965ed32c2c31f0
[ "MIT", "Ruby", "BSD-3-Clause" ]
107
2019-05-24T11:12:39.000Z
2022-03-31T10:01:00.000Z
/* * Copyright 2018-2019 Redis Labs Ltd. and Contributors * * This file is available under the Redis Labs Source Available License Agreement */ #ifndef COMPACTION_H #define COMPACTION_H #include "consts.h" #include "redismodule.h" #include <sys/types.h> #include <rmutil/util.h> typedef struct AggregationClass { void *(*createContext)(); void (*freeContext)(void *context); void (*appendValue)(void *context, double value); void (*resetContext)(void *context); void (*writeContext)(void *context, RedisModuleIO *io); void (*readContext)(void *context, RedisModuleIO *io); int (*finalize)(void *context, double *value); } AggregationClass; AggregationClass *GetAggClass(TS_AGG_TYPES_T aggType); int StringAggTypeToEnum(const char *agg_type); int RMStringLenAggTypeToEnum(RedisModuleString *aggTypeStr); int StringLenAggTypeToEnum(const char *agg_type, size_t len); const char *AggTypeEnumToString(TS_AGG_TYPES_T aggType); #endif
30.15625
81
0.754404
0dd7a91d2ce70554bf07e319bacf6caf4f43d7fb
366
h
C
inc/terminal_consts.h
SchulichRacingElectrical/hardware-sim
4138c0d6a38c5626629b26167b546a43f7ddcda5
[ "MIT" ]
null
null
null
inc/terminal_consts.h
SchulichRacingElectrical/hardware-sim
4138c0d6a38c5626629b26167b546a43f7ddcda5
[ "MIT" ]
13
2022-01-08T19:57:34.000Z
2022-01-21T21:23:29.000Z
inc/terminal_consts.h
SchulichRacingElectrical/telemetry-sim
ebcefea42714fbcd035b936089c73283db436914
[ "MIT" ]
null
null
null
/* Copyright Schulich Racing, FSAE Written by Justin Tijunelis */ #ifndef TERMINAL_CONSTS_H #define TERMINAL_CONSTS_H #define RESET "\033[0m" #define RED "\033[31m" #define GREEN "\033[32m" #define YELLOW "\033[33m" #define BLUE "\033[34m" #define MAGENTA "\033[35m" #define CYAN "\033[36m" #define WHITE "\033[37m" #endif
20.333333
31
0.644809
be17fda600301e6996e920d606a41123b1459bb3
2,198
h
C
SGBotic_YX_MP3.h
SGBotic/SGBotic_YX_MP3
827de5760f08ef68bbca9e304ab28b2787ec149e
[ "BSD-3-Clause" ]
null
null
null
SGBotic_YX_MP3.h
SGBotic/SGBotic_YX_MP3
827de5760f08ef68bbca9e304ab28b2787ec149e
[ "BSD-3-Clause" ]
null
null
null
SGBotic_YX_MP3.h
SGBotic/SGBotic_YX_MP3
827de5760f08ef68bbca9e304ab28b2787ec149e
[ "BSD-3-Clause" ]
null
null
null
/*************************************************** This is a library for our MP3 Module (DEV-02731) http://www.sgbotic.com/index.php?dispatch=products.view&product_id=2731 Written by KC for SGBotic.com BSD license, all text above must be included in any redistribution ****************************************************/ #include "Arduino.h" #ifdef __AVR__ #include <SoftwareSerial.h> #endif //#define YX_MP3_DEBUG //control commands #define YX_MP3_NEXT 0x01 #define YX_MP3_PREV 0x02 #define YX_MP3_PLAYTRACK 0x03 #define YX_MP3_INCVOLUME 0x04 #define YX_MP3_DECVOLUME 0x05 #define YX_MP3_SETVOLUME 0x06 #define YX_MP3_REPEATTRACK 0x08 #define YX_MP3_SETDEVICE 0x09 #define YX_MP3_SLEEP 0x0A #define YX_MP3_WAKE 0x0B #define YX_MP3_RESET 0x0C #define YX_MP3_PLAY 0x0D #define YX_MP3_PAUSE 0x0E #define YX_MP3_PLAYTRACKFOLDER 0x0F #define YX_MP3_STOP 0x16 #define YX_MP3_REPEATFOLDER 0x17 #define YX_MP3_RANDOMPLAY 0x18 #define YX_MP3_REPEATCURRENT 0x19 #define YX_MP3_SETDAC 0x1A //Query commands #define YX_MP3_GETDEVICE 0x3F #define YX_MP3_ACKERROR 0x40 #define YX_MP3_ACKFEEDBACK 0x41 #define YX_MP3_GETSTATUS 0x42 #define YX_MP3_GETVOLUME 0x43 #define YX_MP3_GETEQ 0x44 #define YX_MP3_GETTOTALTRACKUSBROOT 0x47 #define YX_MP3_GETTOTALTRACKSDROOT 0x48 #define YX_MP3_GETTRACKUSB 0x4B #define YX_MP3_GETTRACKSD 0x4C #define YX_MP3_GETTOTALTRACKFOLDER 0x4E #define YX_MP3_GETTOTALFOLDER 0x4F #define YX_MP3_STARTCODE 0x7E #define YX_MP3_ENDCODE 0xEF #define YX_MP3_VERSION 0xFF #define YX_MP3_PACKETSIZE 0x06 class SGBotic_YX_MP3 { public: #ifdef __AVR__ SGBotic_YX_MP3(SoftwareSerial *); #endif SGBotic_YX_MP3(HardwareSerial *); void begin(uint16_t baud); void writePacket(uint8_t cmd, uint8_t feedback, uint16_t packet); void setVolume(uint16_t volume); void play(); void play(uint16_t track); void play(uint8_t track, uint8_t folder); void repeat(uint16_t track); void repeatFolder(uint16_t track); void reset(); void pause(); void next(); void prev(); void stop(); void sleep(); private: Stream *mySerial; #ifdef __AVR__ SoftwareSerial *swSerial; #endif HardwareSerial *hwSerial; };
24.977273
73
0.746588
8a9144e80358ae4c4bce708e45571d953d10d1d8
257
h
C
libinclude/object/obj_mosaic.h
LinoBigatti/APIagb
5401548a8e723614f19034e1411055bda500430e
[ "MIT" ]
2
2019-02-16T10:11:12.000Z
2019-07-05T15:14:41.000Z
libinclude/object/obj_mosaic.h
LinoBigatti/APIagb-dev
6aae757bcb8ed86e706843bfa50862bf06360f81
[ "MIT" ]
null
null
null
libinclude/object/obj_mosaic.h
LinoBigatti/APIagb-dev
6aae757bcb8ed86e706843bfa50862bf06360f81
[ "MIT" ]
null
null
null
//Edit the object mosaic attributes. #ifndef OBJ_MOSAIC_H #define OBJ_MOSAIC_H #ifdef __cplusplus extern "C" { #endif #include <basics/types.h> #include <IO.h> extern u16 obj_mosaic(u32 h, u32 v); #ifdef __cplusplus } #endif #endif
12.85
37
0.680934
07aac3874044a91ef4fbae7267629560d4955acd
436
h
C
Tools/class-dump/Test/Header/UIFont-Traits.h
silence0201/iOS-Reverse
2a0587e89324d077715c16e636a5fd05dfe30a73
[ "MIT" ]
15
2019-08-05T01:24:20.000Z
2022-01-12T08:19:55.000Z
Tools/class-dump/Test/Header/UIFont-Traits.h
silence0201/iOS-Reverse
2a0587e89324d077715c16e636a5fd05dfe30a73
[ "MIT" ]
null
null
null
Tools/class-dump/Test/Header/UIFont-Traits.h
silence0201/iOS-Reverse
2a0587e89324d077715c16e636a5fd05dfe30a73
[ "MIT" ]
9
2019-09-24T06:26:58.000Z
2021-11-22T08:54:00.000Z
// // Generated by class-dump 3.5 (64 bit). // // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. // #import "UIFont.h" @interface UIFont (Traits) @property(readonly, nonatomic) double fontWeight; @property(readonly, nonatomic) _Bool isColorGlyphs; @property(readonly, nonatomic) _Bool isMonoSpace; @property(readonly, nonatomic) _Bool isItalic; @property(readonly, nonatomic) _Bool isBold; @end
25.647059
83
0.736239
6dcf98c6362947914f431c835388dadc5e79577a
1,165
h
C
PrivateFrameworks/FuseUI.framework/MusicLibrarySearchResultsEntityProviderConfiguration.h
shaojiankui/iOS10-Runtime-Headers
6b0d842bed0c52c2a7c1464087b3081af7e10c43
[ "MIT" ]
36
2016-04-20T04:19:04.000Z
2018-10-08T04:12:25.000Z
PrivateFrameworks/FuseUI.framework/MusicLibrarySearchResultsEntityProviderConfiguration.h
shaojiankui/iOS10-Runtime-Headers
6b0d842bed0c52c2a7c1464087b3081af7e10c43
[ "MIT" ]
null
null
null
PrivateFrameworks/FuseUI.framework/MusicLibrarySearchResultsEntityProviderConfiguration.h
shaojiankui/iOS10-Runtime-Headers
6b0d842bed0c52c2a7c1464087b3081af7e10c43
[ "MIT" ]
10
2016-06-16T02:40:44.000Z
2019-01-15T03:31:45.000Z
/* Generated by RuntimeBrowser Image: /System/Library/PrivateFrameworks/FuseUI.framework/FuseUI */ @interface MusicLibrarySearchResultsEntityProviderConfiguration : MusicLibraryBrowseHeterogenousCollectionViewConfiguration { NSMutableDictionary * _contentDescriptorsForSectionAndTraitCollections; MusicLibrarySearchResultsEntityProvider * _entityValueProvider; } @property (nonatomic, readonly) MusicLibrarySearchResultsEntityProvider *entityProvider; + (id)_defaultLibraryViewConfigurations; + (id)_mediaPickerConfigurationsIncludingPlaylists:(bool)arg1 allowingMultipleSelection:(bool)arg2; + (id)defaultConfiguration; + (id)mediaPickerConfigurationIncludingPlaylists:(bool)arg1 allowingMultipleSelection:(bool)arg2; - (void).cxx_destruct; - (void)_applyTableViewMetricsToContentDescriptor:(id)arg1; - (id)_collectionViewDescriptorForEntityViewDescriptor:(id)arg1; - (id)collectionViewDescriptorForSection:(unsigned long long)arg1 traitCollection:(id)arg2; - (id)entityProvider; - (void)handleCommitPreviewViewController:(id)arg1 fromViewController:(id)arg2; - (id)initWithLibraryViewConfigurations:(id)arg1; - (id)loadEntityViewDescriptor; @end
43.148148
125
0.845494
a35708b6607ba2e57a89fd928795b76ec4ae5675
249
h
C
Examples/RKTwitterCoreData/Classes/RKTwitterAppDelegate.h
smashingboxes/RestKit
eafeb9f9d33e56375788e837b00566d4d7c4dbfc
[ "Apache-2.0" ]
14
2016-04-28T04:50:40.000Z
2018-01-05T03:07:07.000Z
Examples/RKTwitterCoreData/Classes/RKTwitterAppDelegate.h
smashingboxes/RestKit
eafeb9f9d33e56375788e837b00566d4d7c4dbfc
[ "Apache-2.0" ]
4
2015-07-20T14:59:40.000Z
2016-04-05T03:02:52.000Z
Examples/RKTwitterCoreData/Classes/RKTwitterAppDelegate.h
smashingboxes/RestKit
eafeb9f9d33e56375788e837b00566d4d7c4dbfc
[ "Apache-2.0" ]
10
2015-09-15T14:23:46.000Z
2016-12-26T14:46:05.000Z
// // RKTwitterAppDelegate.h // RKTwitter // // Created by Blake Watters on 9/5/10. // Copyright (c) 2009-2012 RestKit. All rights reserved. // #import <UIKit/UIKit.h> @interface RKTwitterAppDelegate : UIResponder <UIApplicationDelegate> @end
19.153846
69
0.722892
35892de55df5a18b1fc3313117bd7d6ce94ea7e1
718
h
C
Userland/DevTools/Profiler/TimelineHeader.h
shubhdev/serenity
9321d9d83d366ad4cf686c856063ff9ac97c18a4
[ "BSD-2-Clause" ]
4
2021-02-23T05:35:25.000Z
2021-06-08T06:11:06.000Z
Userland/DevTools/Profiler/TimelineHeader.h
shubhdev/serenity
9321d9d83d366ad4cf686c856063ff9ac97c18a4
[ "BSD-2-Clause" ]
4
2021-04-27T20:44:44.000Z
2021-06-30T18:07:10.000Z
Userland/DevTools/Profiler/TimelineHeader.h
shubhdev/serenity
9321d9d83d366ad4cf686c856063ff9ac97c18a4
[ "BSD-2-Clause" ]
1
2022-01-10T08:02:34.000Z
2022-01-10T08:02:34.000Z
/* * Copyright (c) 2021, Andreas Kling <kling@serenityos.org> * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include <LibGUI/Frame.h> namespace Profiler { class Profile; class Process; class TimelineHeader final : public GUI::Frame { C_OBJECT(TimelineHeader); public: virtual ~TimelineHeader(); Function<void(bool)> on_selection_change; void update_selection(); private: TimelineHeader(Profile& profile, Process const&); virtual void paint_event(GUI::PaintEvent&) override; virtual void mousedown_event(GUI::MouseEvent&) override; Profile& m_profile; Process const& m_process; RefPtr<Gfx::Bitmap> m_icon; String m_text; bool m_selected; }; }
17.95
60
0.707521
898a4efc5292ca73a1ed8c1382dfd599eeb4ffcb
4,278
c
C
libs/libc/misc/lib_cxx_initialize.c
eenurkka/incubator-nuttx
5c3d6bba6d9ec5015896c3019cd2064696373210
[ "Apache-2.0" ]
1
2022-01-04T04:04:56.000Z
2022-01-04T04:04:56.000Z
libs/libc/misc/lib_cxx_initialize.c
eenurkka/incubator-nuttx
5c3d6bba6d9ec5015896c3019cd2064696373210
[ "Apache-2.0" ]
4
2021-12-04T01:29:43.000Z
2022-03-30T00:02:20.000Z
libs/libc/misc/lib_cxx_initialize.c
eenurkka/incubator-nuttx
5c3d6bba6d9ec5015896c3019cd2064696373210
[ "Apache-2.0" ]
null
null
null
/**************************************************************************** * libs/libc/misc/lib_cxx_initialize.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. The * ASF licenses this file to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance with the * License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations * under the License. * ****************************************************************************/ /**************************************************************************** * Included Files ****************************************************************************/ #include <nuttx/config.h> #include <assert.h> #include <debug.h> #include <sched.h> #include <stdlib.h> #include "libc.h" /**************************************************************************** * Private Types ****************************************************************************/ /* This type defines one entry in initialization array */ typedef CODE void (*initializer_t)(void); /**************************************************************************** * External References ****************************************************************************/ /* _sinit and _einit are symbols exported by the linker script that mark the * beginning and the end of the C++ initialization section. */ extern initializer_t _sinit; extern initializer_t _einit; /* _stext and _etext are symbols exported by the linker script that mark the * beginning and the end of text. */ extern uintptr_t _stext; extern uintptr_t _etext; #if defined(CONFIG_ARCH_SIM) && defined(CONFIG_HOST_MACOS) extern void macho_call_saved_init_funcs(void); #endif /**************************************************************************** * Public Functions ****************************************************************************/ /**************************************************************************** * Name: lib_cxx_initialize * * Description: * If C++ and C++ static constructors are supported, then this function * must be provided by board-specific logic in order to perform * initialization of the static C++ class instances. * * This function should then be called in the application-specific * user_start logic in order to perform the C++ initialization. NOTE * that no component of the core NuttX RTOS logic is involved; this * function definition only provides the 'contract' between application * specific C++ code and platform-specific toolchain support. * ****************************************************************************/ void lib_cxx_initialize(void) { #ifdef CONFIG_HAVE_CXXINITIALIZE static int inited = 0; if (inited == 0) { #if defined(CONFIG_ARCH_SIM) && defined(CONFIG_HOST_MACOS) macho_call_saved_init_funcs(); #else initializer_t *initp; sinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; sinfo("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text * region defined by the linker script. Some toolchains may put * NULL values or counts in the initialization table. */ if ((FAR void *)initializer >= (FAR void *)&_stext && (FAR void *)initializer < (FAR void *)&_etext) { sinfo("Calling %p\n", initializer); initializer(); } } #endif inited = 1; } #endif }
34.5
78
0.538803
3751ab12fb8e5311dc601c9e76fbc8ece6c47909
2,028
c
C
os/testhal/ATSAMA5D2/TC/main.c
Tecnologic/STM32H743_ChibiOS
4e679f0f497bca2e6742dd1f2e945114bee3528b
[ "MIT" ]
null
null
null
os/testhal/ATSAMA5D2/TC/main.c
Tecnologic/STM32H743_ChibiOS
4e679f0f497bca2e6742dd1f2e945114bee3528b
[ "MIT" ]
null
null
null
os/testhal/ATSAMA5D2/TC/main.c
Tecnologic/STM32H743_ChibiOS
4e679f0f497bca2e6742dd1f2e945114bee3528b
[ "MIT" ]
null
null
null
/* ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ #include "ch.h" #include "hal.h" static TCConfig tccfg = { { {TC_OUTPUT_ACTIVE, 440 , NULL}, /* 440 hz clock frequency. */ {TC_OUTPUT_DISABLED, 0, NULL}, {TC_OUTPUT_DISABLED, 0, NULL} } }; /* * Buzzer thread, times are in milliseconds. */ static THD_WORKING_AREA(waThread1, 512); static THD_FUNCTION(Thread1, arg) { (void)arg; chRegSetThreadName("buzzer"); while (true) { tcEnableChannel(&TCD0, 0, 50); palClearLine(LINE_LED_RED); chThdSleepMilliseconds(500); tcDisableChannel(&TCD0, 0); palSetLine(LINE_LED_RED); chThdSleepMilliseconds(500); } } /* * Application entry point. */ int main(void) { /* * System initializations. * - HAL initialization, this also initializes the configured device drivers * and performs the board-specific initializations. * - Kernel initialization, the main() function becomes a thread and the * RTOS is active. */ halInit(); tcInit(); chSysInit(); /* * Initializes the TC0 driver. * GPIOA19 is the TC0 channel 0 output. */ palSetGroupMode(PIOA, PAL_PORT_BIT(19), 0U, PAL_SAMA_FUNC_PERIPH_D | PAL_MODE_SECURE); tcStart(&TCD0, &tccfg); chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO, Thread1, NULL); /* * Normal main() thread activity, in this demo it does nothing. */ while (true) { chThdSleepMilliseconds(500); } }
25.670886
78
0.684418
729ae72dd4d2ce419b886ae2538813a1c98ccf4c
279
h
C
C/benchmark.h
ScarletTanager/goisnotc
02e538ec2130a8e327d1fe58e386d012fcca3dd1
[ "MIT" ]
null
null
null
C/benchmark.h
ScarletTanager/goisnotc
02e538ec2130a8e327d1fe58e386d012fcca3dd1
[ "MIT" ]
null
null
null
C/benchmark.h
ScarletTanager/goisnotc
02e538ec2130a8e327d1fe58e386d012fcca3dd1
[ "MIT" ]
null
null
null
#include "append.h" #ifndef __BENCHMARK_H #define __BENCHMARK_H /* Compute elapsed time in milliseconds */ #define ELAPSED(f, s) (((double)(f - s))/CLOCKS_PER_SEC * 1000) double benchmark(void (*f)(int, go_slice_t *, int **), int count, go_slice_t *s, int **src); #endif
27.9
92
0.684588
e6aedb308eae3833a3697041797c621432157da6
372
h
C
YLCleaner/Xcode-RuntimeHeaders/DocSetViewing/DVSearchField.h
liyong03/YLCleaner
7453187a884c8e783bda1af82cbbb51655ec41c6
[ "MIT" ]
1
2019-02-15T02:16:35.000Z
2019-02-15T02:16:35.000Z
YLCleaner/Xcode-RuntimeHeaders/DocSetViewing/DVSearchField.h
liyong03/YLCleaner
7453187a884c8e783bda1af82cbbb51655ec41c6
[ "MIT" ]
null
null
null
YLCleaner/Xcode-RuntimeHeaders/DocSetViewing/DVSearchField.h
liyong03/YLCleaner
7453187a884c8e783bda1af82cbbb51655ec41c6
[ "MIT" ]
null
null
null
/* * Generated by class-dump 3.3.4 (64 bit). * * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. */ #import "NSSearchField.h" @class DVSearchFieldController; @interface DVSearchField : NSSearchField { DVSearchFieldController *controller; } - (void)awakeFromNib; - (id)newSearchMenuTemplate:(unsigned long long)arg1; @end
17.714286
83
0.709677
8802ba952bc1cb17e5a2383b63729d2fbd53c312
949
h
C
vector.h
RJ722/sea-C-see
45243a7b6e9a2d39d23f1168871b38e91e92c283
[ "MIT" ]
null
null
null
vector.h
RJ722/sea-C-see
45243a7b6e9a2d39d23f1168871b38e91e92c283
[ "MIT" ]
null
null
null
vector.h
RJ722/sea-C-see
45243a7b6e9a2d39d23f1168871b38e91e92c283
[ "MIT" ]
null
null
null
#include <stdbool.h> #define VECTOR_INIT_SIZE 8 // #define CREATE_VECTOR() create_vector // #define SIZEOF_VECTOR(vec) vector vec; sizeof_vector(&vec) // #define CAPACTIY_OF_VECTOR(vec) capacity_of_vector(&vec) // #define VECTOR_IS_EMPTY(vec) vector_is_empty(&vec) // #define VECTOR_AT(vec, index) vector_at(&vec, index) // #define PUSH_IN_VECTOR(vec, item) push_in_vector(&vec, item) // #define INSERT_IN_VECTOR(vec, index, item) insert_in_vec(&vec, index, item) // #define PREPEND_IN_VECTOR(vec, item) prepend_in_vector(&vec, item) typedef struct vector{ int capacity; int size; void *data; } vector; vector *create_vector(); int sizeof_vector(vector *); int capacity_of_vector(vector *); bool vector_is_empty(vector *); int vector_at(vector *, int); void resize_vector(vector *, int); void push_in_vector(vector *, int); void insert_in_vector(vector *, int, int); void prepend_in_vector(vector *, int); int pop_vector(vector *);
30.612903
78
0.744995
8849aae9efc07e4c7545d0cf25a25536c39d972b
1,760
c
C
src/mangle.c
fhtk/mangledeggs
8bac57fe94a492e9af7c6243f3e0c58a28dc86a3
[ "BSD-2-Clause" ]
1
2021-03-26T17:25:43.000Z
2021-03-26T17:25:43.000Z
src/mangle.c
fhtk/mangledeggs
8bac57fe94a492e9af7c6243f3e0c58a28dc86a3
[ "BSD-2-Clause" ]
1
2020-07-05T14:01:10.000Z
2020-07-05T14:01:10.000Z
src/mangle.c
fhtk/mangledeggs
8bac57fe94a492e9af7c6243f3e0c58a28dc86a3
[ "BSD-2-Clause" ]
null
null
null
/****************************************************************************\ * mangledeggslib * * * * Copyright © 2020 Alexander Nicholi * * Released under BSD-2-Clause. * \****************************************************************************/ #include <mangledeggs.h> #include <stdlib.h> #include <string.h> #define RET_IF( x ) \ do \ { \ if( ( x ) ) \ { \ return; \ } \ } while( 0 ) void eg_mangle( const char ** name, const char * type, const char ** out ) { size_t o_sz, o_cap, type_sz, i; char * o; RET_IF( name == NULL || type == NULL || out == NULL ); /* 2 for ‘eg’, 1 for name-type separator */ o_sz = 2; o_cap = 4; o = malloc( sizeof( char ) * 4 ); RET_IF( o == NULL ); o[0] = 'e'; o[1] = 'g'; for( i = 0; name[i] != NULL; ++i ) { size_t item_sz; if( name[i] == NULL ) { break; } item_sz = strlen( name[i] ); while( o_sz + item_sz > o_cap ) { o_cap *= 2; o = realloc( o, o_cap ); RET_IF( o == NULL ); } memcpy( o + o_sz, name[i], item_sz ); /* capitalise the lowercase leading letter, if present */ if( i > 0 && ( o[o_sz] >= 0x61 && o[o_sz] <= 0x7A ) ) { o[o_sz] -= 0x20; } o_sz += item_sz; } type_sz = strlen( type ); /* + 2 is for underscore and NUL byte */ while( o_sz + type_sz + 2 > o_cap ) { o_cap *= 2; o = realloc( o, o_cap ); RET_IF( o == NULL ); } /* apply name-type separator */ o[o_sz++] = '_'; memcpy( o + o_sz, type, type_sz ); o[o_sz + type_sz] = '\0'; o_sz += type_sz + 1; *out = (const char *)o; }
19.340659
78
0.415341
b802924381a4561c5edb092c91699563eb6bd5f0
264
h
C
src/array19.lib/array19/SliceOf.max.h
Fettpet/co-cpp19
928a835c4f66032aa88ce01df7899da86d37df22
[ "MIT" ]
8
2020-05-31T16:13:13.000Z
2022-01-12T08:52:42.000Z
src/array19.lib/array19/SliceOf.max.h
Fettpet/co-cpp19
928a835c4f66032aa88ce01df7899da86d37df22
[ "MIT" ]
null
null
null
src/array19.lib/array19/SliceOf.max.h
Fettpet/co-cpp19
928a835c4f66032aa88ce01df7899da86d37df22
[ "MIT" ]
2
2020-07-21T10:58:28.000Z
2021-07-26T06:52:05.000Z
#pragma once #include "SliceOf.h" namespace array19 { template<class T> constexpr auto sliceMaximum(SliceOf<T> slice) { auto result = T{}; for (auto v : slice) if (v > result) result = v; return result; } } // namespace array19
18.857143
66
0.609848
fc30e715e30ce7f29e238bf1befd8621c5a0cd58
1,038
h
C
Example/Pods/Headers/Public/GofKitLib/UILabel+GofAttributed.h
LeeGof/GofMediatorOCDemo
6c609253d66b23eff20ebcf45795b9eab3f2e609
[ "MIT" ]
null
null
null
Example/Pods/Headers/Public/GofKitLib/UILabel+GofAttributed.h
LeeGof/GofMediatorOCDemo
6c609253d66b23eff20ebcf45795b9eab3f2e609
[ "MIT" ]
null
null
null
Example/Pods/Headers/Public/GofKitLib/UILabel+GofAttributed.h
LeeGof/GofMediatorOCDemo
6c609253d66b23eff20ebcf45795b9eab3f2e609
[ "MIT" ]
null
null
null
// // UILabel+GofAttributed.h // Gof135Editor // // Created by LeeGof on 2017/9/2. // Copyright © 2017年 GofLee. All rights reserved. // #import <UIKit/UIKit.h> @interface UILabel (GofAttributed) /** * 快速设置UILabel的attributedText属性的API,参数中只能使用指定的规则,才可以生效。 * 使用规则:必须是<style font=18 color=red backgroundcolor=#eee underline=1>中间是描述</style> * 目前支持的属性有:font(普通字体)、boldfont(粗体)、color(前景色)、backgroundcolor(背景色)、 * underline(下划线,使用【0,9】数字,分别对应NSUnderlineStyle枚举类型的成员的值) * 1、对于字体font和boldfont的值只能是数值; * 2、color和backgroundcolor的值可以是任何十六进制值,支持0x|0X|#开头, * 也支持系统自带的生成颜色的类方法API函数名,如color=red或者color=redcolor * 3、underline的值只能是NSUnderlineStyle枚举成员的值,取0到9。 * * @param text 待设置样式的文本内容 * * @author huangyibiao * @see NSUnderlineStyle * @note <style></style>只能是全小写,对于属性名和属性值不区分大小写 * * @return YES表示成功设置,NO表示写法有误,且无法过滤,因此无效果。 */ - (BOOL)gof_setAttributedText:(NSString *)text; /** 设置文本(带行间距) @param text 文本 @param lineSpacing 行间距 */ - (void)gof_setText:(NSString *)text lineSpacing:(CGFloat)lineSpacing; @end
24.714286
82
0.734104